This commit is contained in:
Iliyan Angelov
2025-09-14 23:24:25 +03:00
commit c67067a2a4
71311 changed files with 6800714 additions and 0 deletions

21
frontend/node_modules/react-confirm-alert/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015 library-boilerplate-author
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

108
frontend/node_modules/react-confirm-alert/Readme.md generated vendored Normal file
View File

@@ -0,0 +1,108 @@
# react-confirm-alert
### React 18 is supported!!
### For React <= 17.x.x use version 2.x.x
React component confirm dialog. [Live demo](https://ga-mo.github.io/react-confirm-alert/demo/)
[![npm version](https://badge.fury.io/js/react-confirm-alert.svg)](https://badge.fury.io/js/react-confirm-alert)
Document for
[v.1.x.x](https://github.com/GA-MO/react-confirm-alert/blob/master/Document-v1.md),
[v.2.x.x](https://github.com/GA-MO/react-confirm-alert/blob/master/Document-v2.md)
## Getting started
#### Install with NPM:
```
$ npm install react-confirm-alert --save
```
#### Options
```jsx
const options = {
title: 'Title',
message: 'Message',
buttons: [
{
label: 'Yes',
onClick: () => alert('Click Yes')
},
{
label: 'No',
onClick: () => alert('Click No')
}
],
closeOnEscape: true,
closeOnClickOutside: true,
keyCodeForClose: [8, 32],
willUnmount: () => {},
afterClose: () => {},
onClickOutside: () => {},
onKeypress: () => {},
onKeypressEscape: () => {},
overlayClassName: "overlay-custom-class-name"
};
confirmAlert(options);
```
#### Use with function:
```jsx
import { confirmAlert } from 'react-confirm-alert'; // Import
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
class App extends React.Component {
submit = () => {
confirmAlert({
title: 'Confirm to submit',
message: 'Are you sure to do this.',
buttons: [
{
label: 'Yes',
onClick: () => alert('Click Yes')
},
{
label: 'No',
onClick: () => alert('Click No')
}
]
});
};
render() {
return (
<div className='container'>
<button onClick={this.submit}>Confirm dialog</button>
</div>
);
}
}
```
#### Custom UI Component
```js
confirmAlert({
customUI: ({ onClose }) => {
return (
<div className='custom-ui'>
<h1>Are you sure?</h1>
<p>You want to delete this file?</p>
<button onClick={onClose}>No</button>
<button
onClick={() => {
this.handleClickDelete();
onClose();
}}
>
Yes, Delete it!
</button>
</div>
);
}
});
```

31
frontend/node_modules/react-confirm-alert/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,31 @@
import React, { ButtonHTMLAttributes } from 'react';
declare module 'react-confirm-alert' {
export interface ReactConfirmAlertProps {
targetId?: string
title?: string
message?: string
buttons?: Array<{
label: string
className?: string
} & ButtonHTMLAttributes<HTMLButtonElement>>
childrenElement?: () => React.ReactNode
customUI?: (customUiOptions: {
title: string
message: string
onClose: () => void
}) => React.ReactNode
closeOnClickOutside?: boolean
closeOnEscape?: boolean
keyCodeForClose?: Array<number>
willUnmount?: () => void
onClickOutside?: () => void
onKeypressEscape?: () => void
onkeyPress?: () => void
overlayClassName?: string
}
export function confirmAlert(options: ReactConfirmAlertProps): void
export default class ReactConfirmAlert extends React.Component<ReactConfirmAlertProps> {}
}

298
frontend/node_modules/react-confirm-alert/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1,298 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _class, _temp2;
exports.confirmAlert = confirmAlert;
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _client = require('react-dom/client');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var ReactConfirmAlert = (_temp2 = _class = function (_Component) {
_inherits(ReactConfirmAlert, _Component);
function ReactConfirmAlert() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, ReactConfirmAlert);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ReactConfirmAlert.__proto__ || Object.getPrototypeOf(ReactConfirmAlert)).call.apply(_ref, [this].concat(args))), _this), _this.handleClickButton = function (button) {
if (button.onClick) button.onClick();
_this.close();
}, _this.handleClickOverlay = function (e) {
var _this$props = _this.props,
closeOnClickOutside = _this$props.closeOnClickOutside,
onClickOutside = _this$props.onClickOutside;
var isClickOutside = e.target === _this.overlay;
if (closeOnClickOutside && isClickOutside) {
onClickOutside();
_this.close();
}
e.stopPropagation();
}, _this.close = function () {
var afterClose = _this.props.afterClose;
removeBodyClass();
removeElementReconfirm(_this.props);
removeSVGBlurReconfirm(afterClose);
}, _this.keyboard = function (event) {
var _this$props2 = _this.props,
closeOnEscape = _this$props2.closeOnEscape,
onKeypressEscape = _this$props2.onKeypressEscape,
onkeyPress = _this$props2.onkeyPress,
keyCodeForClose = _this$props2.keyCodeForClose;
var keyCode = event.keyCode;
var isKeyCodeEscape = keyCode === 27;
if (keyCodeForClose.includes(keyCode)) {
_this.close();
}
if (closeOnEscape && isKeyCodeEscape) {
onKeypressEscape(event);
_this.close();
}
if (onkeyPress) {
onkeyPress();
}
}, _this.componentDidMount = function () {
document.addEventListener('keydown', _this.keyboard, false);
}, _this.componentWillUnmount = function () {
document.removeEventListener('keydown', _this.keyboard, false);
_this.props.willUnmount();
}, _this.renderCustomUI = function () {
var _this$props3 = _this.props,
title = _this$props3.title,
message = _this$props3.message,
buttons = _this$props3.buttons,
customUI = _this$props3.customUI;
var dataCustomUI = {
title: title,
message: message,
buttons: buttons,
onClose: _this.close
};
return customUI(dataCustomUI);
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(ReactConfirmAlert, [{
key: 'render',
value: function render() {
var _this2 = this;
var _props = this.props,
title = _props.title,
message = _props.message,
buttons = _props.buttons,
childrenElement = _props.childrenElement,
customUI = _props.customUI,
overlayClassName = _props.overlayClassName;
return _react2.default.createElement(
'div',
{
className: 'react-confirm-alert-overlay ' + overlayClassName,
ref: function ref(dom) {
return _this2.overlay = dom;
},
onClick: this.handleClickOverlay
},
_react2.default.createElement(
'div',
{ className: 'react-confirm-alert' },
customUI ? this.renderCustomUI() : _react2.default.createElement(
'div',
{ className: 'react-confirm-alert-body' },
title && _react2.default.createElement(
'h1',
null,
title
),
message,
childrenElement(),
_react2.default.createElement(
'div',
{ className: 'react-confirm-alert-button-group' },
buttons.map(function (button, i) {
return _react2.default.createElement(
'button',
_extends({
key: i,
className: button.className
}, button, {
onClick: function onClick(e) {
return _this2.handleClickButton(button);
}
}),
button.label
);
})
)
)
)
);
}
}]);
return ReactConfirmAlert;
}(_react.Component), _class.propTypes = {
title: _propTypes2.default.string,
message: _propTypes2.default.string,
buttons: _propTypes2.default.array.isRequired,
childrenElement: _propTypes2.default.func,
customUI: _propTypes2.default.func,
closeOnClickOutside: _propTypes2.default.bool,
closeOnEscape: _propTypes2.default.bool,
keyCodeForClose: _propTypes2.default.arrayOf(_propTypes2.default.number),
willUnmount: _propTypes2.default.func,
afterClose: _propTypes2.default.func,
onClickOutside: _propTypes2.default.func,
onKeypressEscape: _propTypes2.default.func,
onkeyPress: _propTypes2.default.func,
overlayClassName: _propTypes2.default.string
}, _class.defaultProps = {
buttons: [{
label: 'Cancel',
onClick: function onClick() {
return null;
},
className: null
}, {
label: 'Confirm',
onClick: function onClick() {
return null;
},
className: null
}],
childrenElement: function childrenElement() {
return null;
},
closeOnClickOutside: true,
closeOnEscape: true,
keyCodeForClose: [],
willUnmount: function willUnmount() {
return null;
},
afterClose: function afterClose() {
return null;
},
onClickOutside: function onClickOutside() {
return null;
},
onKeypressEscape: function onKeypressEscape() {
return null;
}
}, _temp2);
exports.default = ReactConfirmAlert;
var root = null;
var targetId = 'react-confirm-alert';
function createSVGBlurReconfirm() {
// If has svg ignore to create the svg
var svg = document.getElementById('react-confirm-alert-firm-svg');
if (svg) return;
var svgNS = 'http://www.w3.org/2000/svg';
var feGaussianBlur = document.createElementNS(svgNS, 'feGaussianBlur');
feGaussianBlur.setAttribute('stdDeviation', '0.3');
var filter = document.createElementNS(svgNS, 'filter');
filter.setAttribute('id', 'gaussian-blur');
filter.appendChild(feGaussianBlur);
var svgElem = document.createElementNS(svgNS, 'svg');
svgElem.setAttribute('id', 'react-confirm-alert-firm-svg');
svgElem.setAttribute('class', 'react-confirm-alert-svg');
svgElem.appendChild(filter);
document.body.appendChild(svgElem);
}
function removeSVGBlurReconfirm(afterClose) {
var svg = document.getElementById('react-confirm-alert-firm-svg');
if (svg) {
svg.parentNode.removeChild(svg);
}
document.body.children[0].classList.remove('react-confirm-alert-blur');
afterClose();
}
function createElementReconfirm(properties) {
var divTarget = document.getElementById(properties.targetId || targetId);
if (properties.targetId && !divTarget) {
console.error('React Confirm Alert:', 'Can not get element id (#' + properties.targetId + ')');
}
if (divTarget) {
root = (0, _client.createRoot)(divTarget);
root.render(_react2.default.createElement(ReactConfirmAlert, properties));
} else {
document.body.children[0].classList.add('react-confirm-alert-blur');
divTarget = document.createElement('div');
divTarget.id = targetId;
document.body.appendChild(divTarget);
root = (0, _client.createRoot)(divTarget);
root.render(_react2.default.createElement(ReactConfirmAlert, properties));
}
}
function removeElementReconfirm(properties) {
var target = document.getElementById(properties.targetId || targetId);
if (target) {
root.unmount(target);
}
}
function addBodyClass() {
document.body.classList.add('react-confirm-alert-body-element');
}
function removeBodyClass() {
document.body.classList.remove('react-confirm-alert-body-element');
}
function confirmAlert(properties) {
addBodyClass();
createSVGBlurReconfirm();
createElementReconfirm(properties);
}

79
frontend/node_modules/react-confirm-alert/package.json generated vendored Normal file
View File

@@ -0,0 +1,79 @@
{
"name": "react-confirm-alert",
"version": "3.0.6",
"description": "react component confirm dialog.",
"main": "lib/index.js",
"scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --hot --inline",
"test": "npm run lint && mocha ./test/**/*.test.js --compilers js:babel-register",
"test:watch": "mocha ./test/**/*.test.js --compilers js:babel-register --watch",
"lint": "eslint ./src",
"clean": "rimraf lib",
"build": "npm run clean && cross-env NODE_ENV=production babel src --out-dir lib && npm run build:demo",
"build:demo": "cross-env NODE_ENV=production webpack --config webpack.config.production.js",
"prepublish": "npm run build"
},
"repository": {
"type": "git",
"url": "https://github.com/GA-MO/react-confirm-alert.git"
},
"keywords": [
"react alert example",
"redux confirm dialog",
"confirm alert react js",
"react-confirm-alert",
"react-confirm",
"confirm-dialog",
"confirm",
"dialog",
"react"
],
"author": "Thawatchai Kuansombat (thawatchai.deartk@gmail.com)",
"license": "MIT",
"bugs": {
"url": "https://github.com/GA-MO/react-confirm-alert/issues"
},
"homepage": "https://github.com/GA-MO/react-confirm-alert",
"typings": "./index.d.ts",
"files": [
"lib",
"src/react-confirm-alert.css",
"index.d.ts"
],
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^7.2.3",
"babel-loader": "^7.1.2",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-polyfill": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"chai": "^4.1.2",
"cross-env": "^5.2.0",
"css-loader": "^0.28.7",
"eslint": "^4.5.0",
"eslint-config-standard": "^10.2.1",
"eslint-config-standard-react": "^5.0.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.1.1",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-react": "^7.3.0",
"eslint-plugin-standard": "^3.0.1",
"mocha": "^3.5.0",
"prop-types": "^15.6.2",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-hot-loader": "^4.3.3",
"rimraf": "^2.6.1",
"style-loader": "^0.18.2",
"url-loader": "^0.5.9",
"webpack": "^3.5.5",
"webpack-dev-server": "^2.7.1"
},
"peerDependencies": {
"react": ">=18.0.0",
"react-dom": ">=10.0.0"
}
}

View File

@@ -0,0 +1,117 @@
body.react-confirm-alert-body-element {
overflow: hidden;
}
.react-confirm-alert-blur {
filter: url(#gaussian-blur);
filter: blur(2px);
-webkit-filter: blur(2px);
}
.react-confirm-alert-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 99;
background: rgba(255, 255, 255, 0.9);
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
display: flex;
justify-content: center;
-ms-align-items: center;
align-items: center;
opacity: 0;
-webkit-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;
-moz-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;
-o-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;
animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;
}
.react-confirm-alert-body {
font-family: Arial, Helvetica, sans-serif;
width: 400px;
padding: 30px;
text-align: left;
background: #fff;
border-radius: 10px;
box-shadow: 0 20px 75px rgba(0, 0, 0, 0.13);
color: #666;
}
.react-confirm-alert-svg {
position: absolute;
top: 0;
left: 0;
}
.react-confirm-alert-body > h1 {
margin-top: 0;
}
.react-confirm-alert-body > h3 {
margin: 0;
font-size: 16px;
}
.react-confirm-alert-button-group {
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
display: flex;
justify-content: flex-start;
margin-top: 20px;
}
.react-confirm-alert-button-group > button {
outline: none;
background: #333;
border: none;
display: inline-block;
padding: 6px 18px;
color: #eee;
margin-right: 10px;
border-radius: 5px;
font-size: 12px;
cursor: pointer;
}
@-webkit-keyframes react-confirm-alert-fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@-moz-keyframes react-confirm-alert-fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@-o-keyframes react-confirm-alert-fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes react-confirm-alert-fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}