x25 17.7.0 → 17.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +7 -1
- package/package.json +3 -3
- package/utility/normalize.test.d.ts +1 -0
- package/utility/normalize.test.js +40 -0
- package/utility/normalize.test.js.map +1 -0
- package/utility/strings.test.d.ts +1 -0
- package/utility/strings.test.js +104 -0
- package/utility/strings.test.js.map +1 -0
- package/utility/validation/validate/email.test.d.ts +1 -0
- package/utility/validation/validate/email.test.js +24 -0
- package/utility/validation/validate/email.test.js.map +1 -0
- package/.eslintignore +0 -3
- package/.eslintrc.json +0 -350
- package/.vscode/settings.json +0 -61
- package/conf/dev.js +0 -19
- package/conf/dist.js +0 -19
- package/conf/polyfills/tempPolyfills.js +0 -7
- package/cspell.json +0 -18
- package/dist/index.d.ts +0 -7
- package/dist/package.json +0 -137
- package/script/check.js +0 -15
- package/src/Account/Load.tsx +0 -61
- package/src/Account/actions.ts +0 -45
- package/src/Account/index.ts +0 -4
- package/src/Account/reducer.ts +0 -103
- package/src/Async/InitModule.tsx +0 -44
- package/src/Async/RouteLoading.tsx +0 -79
- package/src/Async/SimulatedException.ts +0 -15
- package/src/Async/helpers.ts +0 -58
- package/src/Async/index.tsx +0 -72
- package/src/Async/types.ts +0 -39
- package/src/Async/util.ts +0 -110
- package/src/Developer/JSONSyntaxFromData.tsx +0 -24
- package/src/Developer/JSONSyntaxFromText.tsx +0 -33
- package/src/Developer/types.ts +0 -14
- package/src/Developer/util.ts +0 -41
- package/src/Inputs/CaptchaBox.tsx +0 -78
- package/src/Inputs/DateInput.tsx +0 -124
- package/src/Inputs/DateTemplate.tsx +0 -147
- package/src/Inputs/DelayInputChange.tsx +0 -104
- package/src/Inputs/InputTemplate.tsx +0 -68
- package/src/Inputs/LabelTemplate.tsx +0 -46
- package/src/Inputs/NumericInput.tsx +0 -130
- package/src/Inputs/NumericTemplate.tsx +0 -126
- package/src/Inputs/Selects/Custom.tsx +0 -49
- package/src/Inputs/Selects/Simple.tsx +0 -63
- package/src/Inputs/Selects/index.tsx +0 -26
- package/src/Inputs/SimpleInput.tsx +0 -42
- package/src/Inputs/SimpleTextarea.tsx +0 -43
- package/src/Inputs/TextareaTemplate.tsx +0 -49
- package/src/Inputs/common.ts +0 -44
- package/src/Inputs/index.ts +0 -13
- package/src/Loader/LoaderRender.tsx +0 -88
- package/src/Loader/index.ts +0 -195
- package/src/Messages/CenterLoading.tsx +0 -48
- package/src/Messages/Error.tsx +0 -77
- package/src/Messages/Loading.tsx +0 -55
- package/src/Messages/Update.tsx +0 -32
- package/src/Messages/index.ts +0 -2
- package/src/Modal/ConfirmationModal.tsx +0 -120
- package/src/Modal/ModalWindow.tsx +0 -167
- package/src/Modal/Root.tsx +0 -64
- package/src/Modal/actions.ts +0 -12
- package/src/Modal/getComponent.tsx +0 -24
- package/src/Modal/index.ts +0 -5
- package/src/Modal/reducer.ts +0 -52
- package/src/Modal/types.ts +0 -47
- package/src/Modal/util.ts +0 -12
- package/src/Payment/Modal/BankTransfer.tsx +0 -117
- package/src/Payment/Modal/BankTransferDoneModal.tsx +0 -27
- package/src/Payment/Modal/index.ts +0 -11
- package/src/Payment/Pieces/BankTransferForm/BankTransferForm.tsx +0 -91
- package/src/Payment/Pieces/BankTransferForm/BankTransferFormWrapper.tsx +0 -56
- package/src/Payment/Pieces/BankTransferForm/BankTransferNumberField.tsx +0 -33
- package/src/Payment/Pieces/BankTransferForm/validate.ts +0 -14
- package/src/Payment/Pieces/MobilPayForm.tsx +0 -47
- package/src/Payment/Pieces/Payment.tsx +0 -91
- package/src/Payment/core/actions.ts +0 -17
- package/src/Payment/core/codes.ts +0 -31
- package/src/Payment/core/request.ts +0 -39
- package/src/Payment/core/types.d.ts +0 -19
- package/src/Payment/core/util/info.ts +0 -10
- package/src/Payment/core/util/util.ts +0 -41
- package/src/Payment/index.ts +0 -9
- package/src/UI/Collapse.tsx +0 -80
- package/src/UI/LoadImages.tsx +0 -58
- package/src/UI/NewFeature.tsx +0 -23
- package/src/UI/Things.tsx +0 -30
- package/src/actions.ts +0 -48
- package/src/config.ts +0 -19
- package/src/index.ts +0 -16
- package/src/node_modules/.vitest/results.json +0 -1
- package/src/reducer/captchas.ts +0 -34
- package/src/reducer/index.ts +0 -17
- package/src/reducer/module.ts +0 -31
- package/src/styles/_json.scss +0 -48
- package/src/styles/index.scss +0 -1
- package/src/types.ts +0 -27
- package/src/utility/breakpoint.tsx +0 -88
- package/src/utility/calendar.ts +0 -23
- package/src/utility/date.ts +0 -108
- package/src/utility/dev/ErrorBoundary.tsx +0 -90
- package/src/utility/dev/TheError.tsx +0 -74
- package/src/utility/dev/index.ts +0 -109
- package/src/utility/dev/types.ts +0 -8
- package/src/utility/hooks.ts +0 -32
- package/src/utility/index.ts +0 -17
- package/src/utility/languages/date.ts +0 -2
- package/src/utility/languages/english.ts +0 -127
- package/src/utility/languages/ro.ts +0 -123
- package/src/utility/normalize.test.ts +0 -43
- package/src/utility/normalize.ts +0 -75
- package/src/utility/numbers.ts +0 -62
- package/src/utility/numeric.ts +0 -103
- package/src/utility/others.tsx +0 -53
- package/src/utility/strings.test.ts +0 -123
- package/src/utility/strings.ts +0 -22
- package/src/utility/uuid.ts +0 -30
- package/src/utility/validation/common.ts +0 -255
- package/src/utility/validation/index.ts +0 -24
- package/src/utility/validation/specific.ts +0 -18
- package/src/utility/validation/types.ts +0 -53
- package/src/utility/validation/validate/date.ts +0 -52
- package/src/utility/validation/validate/email.test.ts +0 -26
- package/src/utility/validation/validate/email.ts +0 -3
- package/src/utility/validation/validate/index.ts +0 -2
- package/src/utility/words.ts +0 -82
- package/tsconfig.json +0 -95
- package/vite.config.ts +0 -10
- package/webpack.config.js +0 -67
- package/x25.wiki/Account.md +0 -41
- package/x25.wiki/Company.md +0 -39
- package/x25.wiki/Header.md +0 -21
- package/x25.wiki/Home.md +0 -1
- package/x25.wiki/Inputs.md +0 -32
- package/x25.wiki/Messages.md +0 -27
- package/x25.wiki/Payment.md +0 -42
- /package/{dist/Account → Account}/Load.d.ts +0 -0
- /package/{dist/Account → Account}/Load.js +0 -0
- /package/{dist/Account → Account}/Load.js.map +0 -0
- /package/{dist/Account → Account}/actions.d.ts +0 -0
- /package/{dist/Account → Account}/actions.js +0 -0
- /package/{dist/Account → Account}/actions.js.map +0 -0
- /package/{dist/Account → Account}/index.d.ts +0 -0
- /package/{dist/Account → Account}/index.js +0 -0
- /package/{dist/Account → Account}/index.js.map +0 -0
- /package/{dist/Account → Account}/reducer.d.ts +0 -0
- /package/{dist/Account → Account}/reducer.js +0 -0
- /package/{dist/Account → Account}/reducer.js.map +0 -0
- /package/{dist/Async → Async}/InitModule.d.ts +0 -0
- /package/{dist/Async → Async}/InitModule.js +0 -0
- /package/{dist/Async → Async}/InitModule.js.map +0 -0
- /package/{dist/Async → Async}/RouteLoading.d.ts +0 -0
- /package/{dist/Async → Async}/RouteLoading.js +0 -0
- /package/{dist/Async → Async}/RouteLoading.js.map +0 -0
- /package/{dist/Async → Async}/SimulatedException.d.ts +0 -0
- /package/{dist/Async → Async}/SimulatedException.js +0 -0
- /package/{dist/Async → Async}/SimulatedException.js.map +0 -0
- /package/{dist/Async → Async}/helpers.d.ts +0 -0
- /package/{dist/Async → Async}/helpers.js +0 -0
- /package/{dist/Async → Async}/helpers.js.map +0 -0
- /package/{dist/Async → Async}/index.d.ts +0 -0
- /package/{dist/Async → Async}/index.js +0 -0
- /package/{dist/Async → Async}/index.js.map +0 -0
- /package/{dist/Async → Async}/types.d.ts +0 -0
- /package/{dist/Async → Async}/types.js +0 -0
- /package/{dist/Async → Async}/types.js.map +0 -0
- /package/{dist/Async → Async}/util.d.ts +0 -0
- /package/{dist/Async → Async}/util.js +0 -0
- /package/{dist/Async → Async}/util.js.map +0 -0
- /package/{dist/Developer → Developer}/JSONSyntaxFromData.d.ts +0 -0
- /package/{dist/Developer → Developer}/JSONSyntaxFromData.js +0 -0
- /package/{dist/Developer → Developer}/JSONSyntaxFromData.js.map +0 -0
- /package/{dist/Developer → Developer}/JSONSyntaxFromText.d.ts +0 -0
- /package/{dist/Developer → Developer}/JSONSyntaxFromText.js +0 -0
- /package/{dist/Developer → Developer}/JSONSyntaxFromText.js.map +0 -0
- /package/{dist/Developer → Developer}/types.d.ts +0 -0
- /package/{dist/Developer → Developer}/types.js +0 -0
- /package/{dist/Developer → Developer}/types.js.map +0 -0
- /package/{dist/Developer → Developer}/util.d.ts +0 -0
- /package/{dist/Developer → Developer}/util.js +0 -0
- /package/{dist/Developer → Developer}/util.js.map +0 -0
- /package/{dist/Inputs → Inputs}/CaptchaBox.d.ts +0 -0
- /package/{dist/Inputs → Inputs}/CaptchaBox.js +0 -0
- /package/{dist/Inputs → Inputs}/CaptchaBox.js.map +0 -0
- /package/{dist/Inputs → Inputs}/DateInput.d.ts +0 -0
- /package/{dist/Inputs → Inputs}/DateInput.js +0 -0
- /package/{dist/Inputs → Inputs}/DateInput.js.map +0 -0
- /package/{dist/Inputs → Inputs}/DateTemplate.d.ts +0 -0
- /package/{dist/Inputs → Inputs}/DateTemplate.js +0 -0
- /package/{dist/Inputs → Inputs}/DateTemplate.js.map +0 -0
- /package/{dist/Inputs → Inputs}/DelayInputChange.d.ts +0 -0
- /package/{dist/Inputs → Inputs}/DelayInputChange.js +0 -0
- /package/{dist/Inputs → Inputs}/DelayInputChange.js.map +0 -0
- /package/{dist/Inputs → Inputs}/InputTemplate.d.ts +0 -0
- /package/{dist/Inputs → Inputs}/InputTemplate.js +0 -0
- /package/{dist/Inputs → Inputs}/InputTemplate.js.map +0 -0
- /package/{dist/Inputs → Inputs}/LabelTemplate.d.ts +0 -0
- /package/{dist/Inputs → Inputs}/LabelTemplate.js +0 -0
- /package/{dist/Inputs → Inputs}/LabelTemplate.js.map +0 -0
- /package/{dist/Inputs → Inputs}/NumericInput.d.ts +0 -0
- /package/{dist/Inputs → Inputs}/NumericInput.js +0 -0
- /package/{dist/Inputs → Inputs}/NumericInput.js.map +0 -0
- /package/{dist/Inputs → Inputs}/NumericTemplate.d.ts +0 -0
- /package/{dist/Inputs → Inputs}/NumericTemplate.js +0 -0
- /package/{dist/Inputs → Inputs}/NumericTemplate.js.map +0 -0
- /package/{dist/Inputs → Inputs}/Selects/Custom.d.ts +0 -0
- /package/{dist/Inputs → Inputs}/Selects/Custom.js +0 -0
- /package/{dist/Inputs → Inputs}/Selects/Custom.js.map +0 -0
- /package/{dist/Inputs → Inputs}/Selects/Simple.d.ts +0 -0
- /package/{dist/Inputs → Inputs}/Selects/Simple.js +0 -0
- /package/{dist/Inputs → Inputs}/Selects/Simple.js.map +0 -0
- /package/{dist/Inputs → Inputs}/Selects/index.d.ts +0 -0
- /package/{dist/Inputs → Inputs}/Selects/index.js +0 -0
- /package/{dist/Inputs → Inputs}/Selects/index.js.map +0 -0
- /package/{dist/Inputs → Inputs}/SimpleInput.d.ts +0 -0
- /package/{dist/Inputs → Inputs}/SimpleInput.js +0 -0
- /package/{dist/Inputs → Inputs}/SimpleInput.js.map +0 -0
- /package/{dist/Inputs → Inputs}/SimpleTextarea.d.ts +0 -0
- /package/{dist/Inputs → Inputs}/SimpleTextarea.js +0 -0
- /package/{dist/Inputs → Inputs}/SimpleTextarea.js.map +0 -0
- /package/{dist/Inputs → Inputs}/TextareaTemplate.d.ts +0 -0
- /package/{dist/Inputs → Inputs}/TextareaTemplate.js +0 -0
- /package/{dist/Inputs → Inputs}/TextareaTemplate.js.map +0 -0
- /package/{dist/Inputs → Inputs}/common.d.ts +0 -0
- /package/{dist/Inputs → Inputs}/common.js +0 -0
- /package/{dist/Inputs → Inputs}/common.js.map +0 -0
- /package/{dist/Inputs → Inputs}/index.d.ts +0 -0
- /package/{dist/Inputs → Inputs}/index.js +0 -0
- /package/{dist/Inputs → Inputs}/index.js.map +0 -0
- /package/{dist/Loader → Loader}/LoaderRender.d.ts +0 -0
- /package/{dist/Loader → Loader}/LoaderRender.js +0 -0
- /package/{dist/Loader → Loader}/LoaderRender.js.map +0 -0
- /package/{dist/Loader → Loader}/index.d.ts +0 -0
- /package/{dist/Loader → Loader}/index.js +0 -0
- /package/{dist/Loader → Loader}/index.js.map +0 -0
- /package/{dist/Messages → Messages}/CenterLoading.d.ts +0 -0
- /package/{dist/Messages → Messages}/CenterLoading.js +0 -0
- /package/{dist/Messages → Messages}/CenterLoading.js.map +0 -0
- /package/{dist/Messages → Messages}/Error.d.ts +0 -0
- /package/{dist/Messages → Messages}/Error.js +0 -0
- /package/{dist/Messages → Messages}/Error.js.map +0 -0
- /package/{dist/Messages → Messages}/Loading.d.ts +0 -0
- /package/{dist/Messages → Messages}/Loading.js +0 -0
- /package/{dist/Messages → Messages}/Loading.js.map +0 -0
- /package/{dist/Messages → Messages}/Update.d.ts +0 -0
- /package/{dist/Messages → Messages}/Update.js +0 -0
- /package/{dist/Messages → Messages}/Update.js.map +0 -0
- /package/{dist/Messages → Messages}/index.d.ts +0 -0
- /package/{dist/Messages → Messages}/index.js +0 -0
- /package/{dist/Messages → Messages}/index.js.map +0 -0
- /package/{dist/Modal → Modal}/ConfirmationModal.d.ts +0 -0
- /package/{dist/Modal → Modal}/ConfirmationModal.js +0 -0
- /package/{dist/Modal → Modal}/ConfirmationModal.js.map +0 -0
- /package/{dist/Modal → Modal}/ModalWindow.d.ts +0 -0
- /package/{dist/Modal → Modal}/ModalWindow.js +0 -0
- /package/{dist/Modal → Modal}/ModalWindow.js.map +0 -0
- /package/{dist/Modal → Modal}/Root.d.ts +0 -0
- /package/{dist/Modal → Modal}/Root.js +0 -0
- /package/{dist/Modal → Modal}/Root.js.map +0 -0
- /package/{dist/Modal → Modal}/actions.d.ts +0 -0
- /package/{dist/Modal → Modal}/actions.js +0 -0
- /package/{dist/Modal → Modal}/actions.js.map +0 -0
- /package/{dist/Modal → Modal}/getComponent.d.ts +0 -0
- /package/{dist/Modal → Modal}/getComponent.js +0 -0
- /package/{dist/Modal → Modal}/getComponent.js.map +0 -0
- /package/{dist/Modal → Modal}/index.d.ts +0 -0
- /package/{dist/Modal → Modal}/index.js +0 -0
- /package/{dist/Modal → Modal}/index.js.map +0 -0
- /package/{dist/Modal → Modal}/reducer.d.ts +0 -0
- /package/{dist/Modal → Modal}/reducer.js +0 -0
- /package/{dist/Modal → Modal}/reducer.js.map +0 -0
- /package/{dist/Modal → Modal}/types.d.ts +0 -0
- /package/{dist/Modal → Modal}/types.js +0 -0
- /package/{dist/Modal → Modal}/types.js.map +0 -0
- /package/{dist/Modal → Modal}/util.d.ts +0 -0
- /package/{dist/Modal → Modal}/util.js +0 -0
- /package/{dist/Modal → Modal}/util.js.map +0 -0
- /package/{dist/Payment → Payment}/Modal/BankTransfer.d.ts +0 -0
- /package/{dist/Payment → Payment}/Modal/BankTransfer.js +0 -0
- /package/{dist/Payment → Payment}/Modal/BankTransfer.js.map +0 -0
- /package/{dist/Payment → Payment}/Modal/BankTransferDoneModal.d.ts +0 -0
- /package/{dist/Payment → Payment}/Modal/BankTransferDoneModal.js +0 -0
- /package/{dist/Payment → Payment}/Modal/BankTransferDoneModal.js.map +0 -0
- /package/{dist/Payment → Payment}/Modal/index.d.ts +0 -0
- /package/{dist/Payment → Payment}/Modal/index.js +0 -0
- /package/{dist/Payment → Payment}/Modal/index.js.map +0 -0
- /package/{dist/Payment → Payment}/Pieces/BankTransferForm/BankTransferForm.d.ts +0 -0
- /package/{dist/Payment → Payment}/Pieces/BankTransferForm/BankTransferForm.js +0 -0
- /package/{dist/Payment → Payment}/Pieces/BankTransferForm/BankTransferForm.js.map +0 -0
- /package/{dist/Payment → Payment}/Pieces/BankTransferForm/BankTransferFormWrapper.d.ts +0 -0
- /package/{dist/Payment → Payment}/Pieces/BankTransferForm/BankTransferFormWrapper.js +0 -0
- /package/{dist/Payment → Payment}/Pieces/BankTransferForm/BankTransferFormWrapper.js.map +0 -0
- /package/{dist/Payment → Payment}/Pieces/BankTransferForm/BankTransferNumberField.d.ts +0 -0
- /package/{dist/Payment → Payment}/Pieces/BankTransferForm/BankTransferNumberField.js +0 -0
- /package/{dist/Payment → Payment}/Pieces/BankTransferForm/BankTransferNumberField.js.map +0 -0
- /package/{dist/Payment → Payment}/Pieces/BankTransferForm/validate.d.ts +0 -0
- /package/{dist/Payment → Payment}/Pieces/BankTransferForm/validate.js +0 -0
- /package/{dist/Payment → Payment}/Pieces/BankTransferForm/validate.js.map +0 -0
- /package/{dist/Payment → Payment}/Pieces/MobilPayForm.d.ts +0 -0
- /package/{dist/Payment → Payment}/Pieces/MobilPayForm.js +0 -0
- /package/{dist/Payment → Payment}/Pieces/MobilPayForm.js.map +0 -0
- /package/{dist/Payment → Payment}/Pieces/Payment.d.ts +0 -0
- /package/{dist/Payment → Payment}/Pieces/Payment.js +0 -0
- /package/{dist/Payment → Payment}/Pieces/Payment.js.map +0 -0
- /package/{dist/Payment → Payment}/core/actions.d.ts +0 -0
- /package/{dist/Payment → Payment}/core/actions.js +0 -0
- /package/{dist/Payment → Payment}/core/actions.js.map +0 -0
- /package/{dist/Payment → Payment}/core/codes.d.ts +0 -0
- /package/{dist/Payment → Payment}/core/codes.js +0 -0
- /package/{dist/Payment → Payment}/core/codes.js.map +0 -0
- /package/{dist/Payment → Payment}/core/request.d.ts +0 -0
- /package/{dist/Payment → Payment}/core/request.js +0 -0
- /package/{dist/Payment → Payment}/core/request.js.map +0 -0
- /package/{dist/Payment → Payment}/core/util/info.d.ts +0 -0
- /package/{dist/Payment → Payment}/core/util/info.js +0 -0
- /package/{dist/Payment → Payment}/core/util/info.js.map +0 -0
- /package/{dist/Payment → Payment}/core/util/util.d.ts +0 -0
- /package/{dist/Payment → Payment}/core/util/util.js +0 -0
- /package/{dist/Payment → Payment}/core/util/util.js.map +0 -0
- /package/{dist/Payment → Payment}/index.d.ts +0 -0
- /package/{dist/Payment → Payment}/index.js +0 -0
- /package/{dist/Payment → Payment}/index.js.map +0 -0
- /package/{dist/UI → UI}/Collapse.d.ts +0 -0
- /package/{dist/UI → UI}/Collapse.js +0 -0
- /package/{dist/UI → UI}/Collapse.js.map +0 -0
- /package/{dist/UI → UI}/LoadImages.d.ts +0 -0
- /package/{dist/UI → UI}/LoadImages.js +0 -0
- /package/{dist/UI → UI}/LoadImages.js.map +0 -0
- /package/{dist/UI → UI}/NewFeature.d.ts +0 -0
- /package/{dist/UI → UI}/NewFeature.js +0 -0
- /package/{dist/UI → UI}/NewFeature.js.map +0 -0
- /package/{dist/UI → UI}/Things.d.ts +0 -0
- /package/{dist/UI → UI}/Things.js +0 -0
- /package/{dist/UI → UI}/Things.js.map +0 -0
- /package/{dist/actions.d.ts → actions.d.ts} +0 -0
- /package/{dist/actions.js → actions.js} +0 -0
- /package/{dist/actions.js.map → actions.js.map} +0 -0
- /package/{dist/config.d.ts → config.d.ts} +0 -0
- /package/{dist/config.js → config.js} +0 -0
- /package/{dist/config.js.map → config.js.map} +0 -0
- /package/{dist/index.js → index.js} +0 -0
- /package/{dist/index.js.map → index.js.map} +0 -0
- /package/{dist/reducer → reducer}/captchas.d.ts +0 -0
- /package/{dist/reducer → reducer}/captchas.js +0 -0
- /package/{dist/reducer → reducer}/captchas.js.map +0 -0
- /package/{dist/reducer → reducer}/index.d.ts +0 -0
- /package/{dist/reducer → reducer}/index.js +0 -0
- /package/{dist/reducer → reducer}/index.js.map +0 -0
- /package/{dist/reducer → reducer}/module.d.ts +0 -0
- /package/{dist/reducer → reducer}/module.js +0 -0
- /package/{dist/reducer → reducer}/module.js.map +0 -0
- /package/{dist/styles → styles}/index.css +0 -0
- /package/{dist/types.d.ts → types.d.ts} +0 -0
- /package/{dist/types.js → types.js} +0 -0
- /package/{dist/types.js.map → types.js.map} +0 -0
- /package/{dist/utility → utility}/breakpoint.d.ts +0 -0
- /package/{dist/utility → utility}/breakpoint.js +0 -0
- /package/{dist/utility → utility}/breakpoint.js.map +0 -0
- /package/{dist/utility → utility}/calendar.d.ts +0 -0
- /package/{dist/utility → utility}/calendar.js +0 -0
- /package/{dist/utility → utility}/calendar.js.map +0 -0
- /package/{dist/utility → utility}/date.d.ts +0 -0
- /package/{dist/utility → utility}/date.js +0 -0
- /package/{dist/utility → utility}/date.js.map +0 -0
- /package/{dist/utility → utility}/dev/ErrorBoundary.d.ts +0 -0
- /package/{dist/utility → utility}/dev/ErrorBoundary.js +0 -0
- /package/{dist/utility → utility}/dev/ErrorBoundary.js.map +0 -0
- /package/{dist/utility → utility}/dev/TheError.d.ts +0 -0
- /package/{dist/utility → utility}/dev/TheError.js +0 -0
- /package/{dist/utility → utility}/dev/TheError.js.map +0 -0
- /package/{dist/utility → utility}/dev/index.d.ts +0 -0
- /package/{dist/utility → utility}/dev/index.js +0 -0
- /package/{dist/utility → utility}/dev/index.js.map +0 -0
- /package/{dist/utility → utility}/dev/types.d.ts +0 -0
- /package/{dist/utility → utility}/dev/types.js +0 -0
- /package/{dist/utility → utility}/dev/types.js.map +0 -0
- /package/{dist/utility → utility}/hooks.d.ts +0 -0
- /package/{dist/utility → utility}/hooks.js +0 -0
- /package/{dist/utility → utility}/hooks.js.map +0 -0
- /package/{dist/utility → utility}/index.d.ts +0 -0
- /package/{dist/utility → utility}/index.js +0 -0
- /package/{dist/utility → utility}/index.js.map +0 -0
- /package/{dist/utility → utility}/languages/date.d.ts +0 -0
- /package/{dist/utility → utility}/languages/date.js +0 -0
- /package/{dist/utility → utility}/languages/date.js.map +0 -0
- /package/{dist/utility → utility}/languages/english.d.ts +0 -0
- /package/{dist/utility → utility}/languages/english.js +0 -0
- /package/{dist/utility → utility}/languages/english.js.map +0 -0
- /package/{dist/utility → utility}/languages/ro.d.ts +0 -0
- /package/{dist/utility → utility}/languages/ro.js +0 -0
- /package/{dist/utility → utility}/languages/ro.js.map +0 -0
- /package/{dist/utility → utility}/normalize.d.ts +0 -0
- /package/{dist/utility → utility}/normalize.js +0 -0
- /package/{dist/utility → utility}/normalize.js.map +0 -0
- /package/{dist/utility → utility}/numbers.d.ts +0 -0
- /package/{dist/utility → utility}/numbers.js +0 -0
- /package/{dist/utility → utility}/numbers.js.map +0 -0
- /package/{dist/utility → utility}/numeric.d.ts +0 -0
- /package/{dist/utility → utility}/numeric.js +0 -0
- /package/{dist/utility → utility}/numeric.js.map +0 -0
- /package/{dist/utility → utility}/others.d.ts +0 -0
- /package/{dist/utility → utility}/others.js +0 -0
- /package/{dist/utility → utility}/others.js.map +0 -0
- /package/{dist/utility → utility}/strings.d.ts +0 -0
- /package/{dist/utility → utility}/strings.js +0 -0
- /package/{dist/utility → utility}/strings.js.map +0 -0
- /package/{dist/utility → utility}/uuid.d.ts +0 -0
- /package/{dist/utility → utility}/uuid.js +0 -0
- /package/{dist/utility → utility}/uuid.js.map +0 -0
- /package/{dist/utility → utility}/validation/common.d.ts +0 -0
- /package/{dist/utility → utility}/validation/common.js +0 -0
- /package/{dist/utility → utility}/validation/common.js.map +0 -0
- /package/{dist/utility → utility}/validation/index.d.ts +0 -0
- /package/{dist/utility → utility}/validation/index.js +0 -0
- /package/{dist/utility → utility}/validation/index.js.map +0 -0
- /package/{dist/utility → utility}/validation/specific.d.ts +0 -0
- /package/{dist/utility → utility}/validation/specific.js +0 -0
- /package/{dist/utility → utility}/validation/specific.js.map +0 -0
- /package/{dist/utility → utility}/validation/types.d.ts +0 -0
- /package/{dist/utility → utility}/validation/types.js +0 -0
- /package/{dist/utility → utility}/validation/types.js.map +0 -0
- /package/{dist/utility → utility}/validation/validate/date.d.ts +0 -0
- /package/{dist/utility → utility}/validation/validate/date.js +0 -0
- /package/{dist/utility → utility}/validation/validate/date.js.map +0 -0
- /package/{dist/utility → utility}/validation/validate/email.d.ts +0 -0
- /package/{dist/utility → utility}/validation/validate/email.js +0 -0
- /package/{dist/utility → utility}/validation/validate/email.js.map +0 -0
- /package/{dist/utility → utility}/validation/validate/index.d.ts +0 -0
- /package/{dist/utility → utility}/validation/validate/index.js +0 -0
- /package/{dist/utility → utility}/validation/validate/index.js.map +0 -0
- /package/{dist/utility → utility}/words.d.ts +0 -0
- /package/{dist/utility → utility}/words.js +0 -0
- /package/{dist/utility → utility}/words.js.map +0 -0
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import React, { useState } from "react";
|
|
3
|
-
import { useDispatch } from "react-redux";
|
|
4
|
-
import { notifyError } from "../actions";
|
|
5
|
-
import { words } from "../utility";
|
|
6
|
-
import ModalWindow from "./ModalWindow";
|
|
7
|
-
import { ConfirmationModalProps, FooterProps } from "./types";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type ModalFooterProps = FooterProps & {
|
|
11
|
-
readonly tryToClose: (cb? : any) => any;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const ModalFooter = (props : ModalFooterProps) => {
|
|
15
|
-
const
|
|
16
|
-
{ message: languageMessage, label } = words,
|
|
17
|
-
|
|
18
|
-
dispatch = useDispatch(),
|
|
19
|
-
{
|
|
20
|
-
cancelButtonLabel = label.cancel,
|
|
21
|
-
confirmButtonLabel = label.remove,
|
|
22
|
-
errMessage = languageMessage.failPerform,
|
|
23
|
-
|
|
24
|
-
isResponseValid = (response: any) => ({
|
|
25
|
-
valid : response === "",
|
|
26
|
-
error : response,
|
|
27
|
-
}),
|
|
28
|
-
|
|
29
|
-
confirmButtonColor = "danger",
|
|
30
|
-
|
|
31
|
-
showError = (msg : any) => {
|
|
32
|
-
dispatch(notifyError(msg));
|
|
33
|
-
},
|
|
34
|
-
} = props,
|
|
35
|
-
|
|
36
|
-
[isPerforming, setIsPerforming] = useState(false),
|
|
37
|
-
|
|
38
|
-
endPerforming = (cb?: any) => {
|
|
39
|
-
setIsPerforming(false);
|
|
40
|
-
|
|
41
|
-
if (typeof cb === "function") {
|
|
42
|
-
cb();
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
handleConfirmation = () => {
|
|
47
|
-
const { request, onSuccess, tryToClose, onBeforeSuccessClosing } = props;
|
|
48
|
-
|
|
49
|
-
setIsPerforming(true);
|
|
50
|
-
|
|
51
|
-
request().
|
|
52
|
-
then((possibleResponse : any) => {
|
|
53
|
-
const
|
|
54
|
-
theResponse = possibleResponse.response ? possibleResponse.response : possibleResponse,
|
|
55
|
-
{ body } = theResponse,
|
|
56
|
-
{ valid, error } = isResponseValid(body);
|
|
57
|
-
|
|
58
|
-
if (typeof onBeforeSuccessClosing === "function") {
|
|
59
|
-
onBeforeSuccessClosing(body);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (valid) {
|
|
63
|
-
tryToClose(() => {
|
|
64
|
-
if (typeof onSuccess === "function") {
|
|
65
|
-
onSuccess(body);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
} else {
|
|
69
|
-
endPerforming();
|
|
70
|
-
showError(error);
|
|
71
|
-
}
|
|
72
|
-
}).
|
|
73
|
-
catch((exception : any) => {
|
|
74
|
-
endPerforming();
|
|
75
|
-
showError(errMessage);
|
|
76
|
-
// eslint-disable-next-line no-console
|
|
77
|
-
console.log("exception", exception);
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
return (
|
|
82
|
-
<div className="modal-footer">
|
|
83
|
-
<button
|
|
84
|
-
className="btn btn-secondary me-1"
|
|
85
|
-
disabled={isPerforming}
|
|
86
|
-
onClick={props.tryToClose}
|
|
87
|
-
type="button">
|
|
88
|
-
{cancelButtonLabel}
|
|
89
|
-
</button>
|
|
90
|
-
<button
|
|
91
|
-
autoFocus={props.focusButton}
|
|
92
|
-
className={`btn ${confirmButtonColor ? `btn-${confirmButtonColor}` : ""}`}
|
|
93
|
-
disabled={isPerforming}
|
|
94
|
-
onClick={handleConfirmation}
|
|
95
|
-
type="button">
|
|
96
|
-
{
|
|
97
|
-
isPerforming ? (
|
|
98
|
-
<span>
|
|
99
|
-
<i className="fa fa-refresh fa-spin fa-fw" />
|
|
100
|
-
{` ${words.PleaseWait}`}
|
|
101
|
-
</span>
|
|
102
|
-
) : confirmButtonLabel
|
|
103
|
-
}
|
|
104
|
-
</button>
|
|
105
|
-
</div>
|
|
106
|
-
);
|
|
107
|
-
},
|
|
108
|
-
ConfirmationModal = (props : ConfirmationModalProps) => (
|
|
109
|
-
<ModalWindow
|
|
110
|
-
doNoPassTryToCloseToBody
|
|
111
|
-
{...props}
|
|
112
|
-
Footer={ModalFooter}
|
|
113
|
-
title={props.title ? props.title : words.Confirmation}>
|
|
114
|
-
<div>
|
|
115
|
-
{props.footerProps.message}
|
|
116
|
-
</div>
|
|
117
|
-
</ModalWindow>
|
|
118
|
-
);
|
|
119
|
-
|
|
120
|
-
export default ConfirmationModal;
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useRef, useState } from "react";
|
|
2
|
-
import { useDispatch } from "react-redux";
|
|
3
|
-
import { hideModal } from "./actions";
|
|
4
|
-
import { ModalWindowProps } from "./types";
|
|
5
|
-
|
|
6
|
-
const ModalWindow = (props : ModalWindowProps) => {
|
|
7
|
-
const
|
|
8
|
-
delay = 150,
|
|
9
|
-
{ size = "", Footer, Header } = props,
|
|
10
|
-
|
|
11
|
-
[show, setShow] = useState(false),
|
|
12
|
-
[waitingToClose, setWaitingToClose] = useState(false),
|
|
13
|
-
|
|
14
|
-
[enterTimeout, setEnterTimeout] = useState(0),
|
|
15
|
-
[exitTimeout, setExitTimeout] = useState(0),
|
|
16
|
-
|
|
17
|
-
bodyRef : any = useRef(null),
|
|
18
|
-
dialogRef : any = useRef(null),
|
|
19
|
-
|
|
20
|
-
dispatch = useDispatch(),
|
|
21
|
-
|
|
22
|
-
tryToClose = (cbTryToClose? : any) => {
|
|
23
|
-
const
|
|
24
|
-
closeModal = () => {
|
|
25
|
-
if (!props.preventDispatchHideModal) {
|
|
26
|
-
dispatch(hideModal());
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (typeof props.onClose === "function") {
|
|
30
|
-
props.onClose();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (typeof cbTryToClose === "function") {
|
|
34
|
-
cbTryToClose();
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
clearTimeout(enterTimeout);
|
|
39
|
-
clearTimeout(exitTimeout);
|
|
40
|
-
|
|
41
|
-
setWaitingToClose(true);
|
|
42
|
-
setShow(false);
|
|
43
|
-
|
|
44
|
-
const theExit : any = setTimeout(() => {
|
|
45
|
-
closeModal();
|
|
46
|
-
}, delay);
|
|
47
|
-
|
|
48
|
-
setExitTimeout(theExit);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
const handleClickOutside = (event : MouseEvent) => {
|
|
53
|
-
const isClickOutsideButNotOnButton = (
|
|
54
|
-
bodyRef.current && bodyRef.current.contains(event.target) &&
|
|
55
|
-
!dialogRef.current.contains(event.target)
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
if (isClickOutsideButNotOnButton) {
|
|
59
|
-
tryToClose();
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
64
|
-
|
|
65
|
-
return () => {
|
|
66
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
67
|
-
};
|
|
68
|
-
}, [bodyRef]);
|
|
69
|
-
|
|
70
|
-
useEffect(() => {
|
|
71
|
-
const keyPressed = (event : KeyboardEvent) => {
|
|
72
|
-
if (event.key === "Escape" && !props.doNotCloseByEscape) {
|
|
73
|
-
tryToClose();
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
if (!props.doNotCloseByEscape) {
|
|
78
|
-
document.addEventListener("keydown", keyPressed, false);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return () => {
|
|
82
|
-
if (!props.doNotCloseByEscape) {
|
|
83
|
-
document.removeEventListener("keydown", keyPressed, false);
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
}, [!props.doNotCloseByEscape]);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
useEffect(() => {
|
|
90
|
-
if (!show && !waitingToClose) {
|
|
91
|
-
|
|
92
|
-
const theEnter : any = setTimeout(() => {
|
|
93
|
-
setShow(true);
|
|
94
|
-
}, delay);
|
|
95
|
-
|
|
96
|
-
setEnterTimeout(theEnter);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
}, [show, waitingToClose]);
|
|
100
|
-
|
|
101
|
-
useEffect(() => () => {
|
|
102
|
-
clearTimeout(enterTimeout);
|
|
103
|
-
clearTimeout(exitTimeout);
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
useEffect(() => {
|
|
107
|
-
if (props.pleaseClose) {
|
|
108
|
-
tryToClose();
|
|
109
|
-
}
|
|
110
|
-
}, [props.pleaseClose]);
|
|
111
|
-
|
|
112
|
-
return (
|
|
113
|
-
<div
|
|
114
|
-
className={`modal fade d-block ${show ? "show" : ""}`}
|
|
115
|
-
ref={bodyRef}
|
|
116
|
-
style={{
|
|
117
|
-
background: "rgb(0 0 0 / 45%)",
|
|
118
|
-
}}>
|
|
119
|
-
<div className={`modal-dialog modal-${size}`} ref={dialogRef} role="document">
|
|
120
|
-
<div className="modal-content">
|
|
121
|
-
{
|
|
122
|
-
props.customContent ? (
|
|
123
|
-
React.cloneElement(props.children, { tryToClose })
|
|
124
|
-
) : (
|
|
125
|
-
<>
|
|
126
|
-
<div className="modal-header">
|
|
127
|
-
{
|
|
128
|
-
typeof Header === "undefined" ? (
|
|
129
|
-
<h5 className="modal-title">
|
|
130
|
-
{props.title}
|
|
131
|
-
</h5>
|
|
132
|
-
) : (
|
|
133
|
-
<Header title={props.title} {...props.headerProps} tryToClose={tryToClose} />
|
|
134
|
-
)
|
|
135
|
-
}
|
|
136
|
-
<button
|
|
137
|
-
aria-label="Close"
|
|
138
|
-
className="btn btn-link"
|
|
139
|
-
data-dismiss="modal"
|
|
140
|
-
onClick={tryToClose}
|
|
141
|
-
type="button">
|
|
142
|
-
<i className="fa fa-times" />
|
|
143
|
-
</button>
|
|
144
|
-
</div>
|
|
145
|
-
<div className="modal-body">
|
|
146
|
-
{
|
|
147
|
-
props.doNoPassTryToCloseToBody ? props.children : React.cloneElement(props.children, { tryToClose })
|
|
148
|
-
}
|
|
149
|
-
</div>
|
|
150
|
-
</>
|
|
151
|
-
)
|
|
152
|
-
}
|
|
153
|
-
{
|
|
154
|
-
typeof Footer === "undefined" ? null : (
|
|
155
|
-
<Footer {...props.footerProps} tryToClose={tryToClose} />
|
|
156
|
-
)
|
|
157
|
-
}
|
|
158
|
-
</div>
|
|
159
|
-
</div>
|
|
160
|
-
</div>
|
|
161
|
-
);
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
export default ModalWindow;
|
|
166
|
-
|
|
167
|
-
|
package/src/Modal/Root.tsx
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { useSelector } from "react-redux";
|
|
3
|
-
import { propsAreEqualCreator } from "../utility/others";
|
|
4
|
-
import getComponent from "./getComponent";
|
|
5
|
-
import { selectors } from "./reducer";
|
|
6
|
-
import { Modals } from "./types";
|
|
7
|
-
|
|
8
|
-
type RawModalRootProps = {
|
|
9
|
-
readonly list: Modals;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
propsAreEqual = propsAreEqualCreator([], ["list"]),
|
|
14
|
-
RawModalRoot = ({ list } : RawModalRootProps) => {
|
|
15
|
-
if (list.size === 0) {
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<>
|
|
21
|
-
{
|
|
22
|
-
list.map((current : any, index : number) => {
|
|
23
|
-
const
|
|
24
|
-
modalType = current.get("type"),
|
|
25
|
-
Component = getComponent(modalType),
|
|
26
|
-
isTheLastOne = index !== list.size - 1;
|
|
27
|
-
|
|
28
|
-
if (typeof Component === "undefined") {
|
|
29
|
-
return (
|
|
30
|
-
<div key="no-modal">
|
|
31
|
-
{`No MODAL component for the type [${modalType}] in Modal/components.jsx`}
|
|
32
|
-
</div>
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const theProps = (
|
|
37
|
-
current?.hasIn(["props", "immutableProps"]) ? ({
|
|
38
|
-
modalProps: current.get("props"),
|
|
39
|
-
}) : (
|
|
40
|
-
current.get("props").toJS()
|
|
41
|
-
)
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<Component
|
|
46
|
-
doNotCloseByEscape={isTheLastOne}
|
|
47
|
-
key={index}
|
|
48
|
-
pleaseClose={current.get("pleaseClose")}
|
|
49
|
-
{...theProps}
|
|
50
|
-
/>
|
|
51
|
-
);
|
|
52
|
-
})
|
|
53
|
-
}
|
|
54
|
-
</>
|
|
55
|
-
);
|
|
56
|
-
},
|
|
57
|
-
InnerModalRoot = React.memo(RawModalRoot, propsAreEqual),
|
|
58
|
-
ModalRoot = () => {
|
|
59
|
-
const list = useSelector(selectors.getModals);
|
|
60
|
-
|
|
61
|
-
return <InnerModalRoot list={list} />;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export default ModalRoot;
|
package/src/Modal/actions.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { ErrorMessage } from "../Messages";
|
|
4
|
-
import ModalWindow from "./ModalWindow";
|
|
5
|
-
import { getModal } from "./util";
|
|
6
|
-
|
|
7
|
-
const NothingSelected = () => (
|
|
8
|
-
<ModalWindow onClose={() => {}} title="Not registered">
|
|
9
|
-
<ErrorMessage message="Please define a modal component in Modal/components.jsx" />
|
|
10
|
-
</ModalWindow>
|
|
11
|
-
),
|
|
12
|
-
|
|
13
|
-
/* eslint-disable complexity */
|
|
14
|
-
getComponent = (type: any): (props : any) => JSX.Element => {
|
|
15
|
-
const AutoModal = getModal(type);
|
|
16
|
-
|
|
17
|
-
if (AutoModal !== null) {
|
|
18
|
-
return AutoModal;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return NothingSelected;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default getComponent;
|
package/src/Modal/index.ts
DELETED
package/src/Modal/reducer.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import * as Immutable from "immutable";
|
|
2
|
-
import { getModalsState } from "../config";
|
|
3
|
-
import { Modals } from "./types";
|
|
4
|
-
import type { Action, State } from "src/types";
|
|
5
|
-
|
|
6
|
-
const initialState = Immutable.List<Immutable.Map<string, any>>(),
|
|
7
|
-
|
|
8
|
-
showModal = (state: any, {
|
|
9
|
-
payload: {
|
|
10
|
-
modalType,
|
|
11
|
-
modalProps,
|
|
12
|
-
},
|
|
13
|
-
} : { payload : { modalType : any, modalProps : any }}) => state.push(Immutable.Map({
|
|
14
|
-
type : modalType,
|
|
15
|
-
props : Immutable.Map(modalProps),
|
|
16
|
-
})),
|
|
17
|
-
hideModal = (state: any) => state.pop(),
|
|
18
|
-
softHideModal = (state: any) => {
|
|
19
|
-
const lastPosition = -1;
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
state.update(lastPosition, (lastMap: Immutable.Map<string, any>) => (
|
|
23
|
-
lastMap.set("pleaseClose", true)
|
|
24
|
-
))
|
|
25
|
-
);
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
reducer = (state: any = initialState, action: Action) => {
|
|
29
|
-
switch (action.type) {
|
|
30
|
-
case "SHOW_MODAL":
|
|
31
|
-
return showModal(state, action);
|
|
32
|
-
|
|
33
|
-
case "HIDE_MODAL":
|
|
34
|
-
return hideModal(state);
|
|
35
|
-
|
|
36
|
-
case "SOFT_HIDE_MODAL":
|
|
37
|
-
return softHideModal(state);
|
|
38
|
-
|
|
39
|
-
case "CLEAR_MODALS":
|
|
40
|
-
return state.clear();
|
|
41
|
-
|
|
42
|
-
default:
|
|
43
|
-
return state;
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
getModals = (state: State) => (getModalsState(state) || initialState) as Modals;
|
|
48
|
-
|
|
49
|
-
export const selectors = {
|
|
50
|
-
getModals,
|
|
51
|
-
};
|
|
52
|
-
export default reducer;
|
package/src/Modal/types.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export type ModalsTypes = Record<string, React.ReactNode>;
|
|
4
|
-
|
|
5
|
-
export type Modals = Immutable.List<Immutable.Map<string, any>>;
|
|
6
|
-
|
|
7
|
-
type CommonProps = {
|
|
8
|
-
pleaseClose?: boolean;
|
|
9
|
-
isStack?: boolean;
|
|
10
|
-
isLastOne?: boolean;
|
|
11
|
-
onClose?: () => any;
|
|
12
|
-
doNotCloseByEscape?: boolean;
|
|
13
|
-
preventDispatchHideModal?: boolean;
|
|
14
|
-
Footer?: any;
|
|
15
|
-
Header?: any;
|
|
16
|
-
footerProps?: FooterProps;
|
|
17
|
-
headerProps?: any;
|
|
18
|
-
size?: "lg" | "sm" | "xl" | "";
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type ModalWindowProps = CommonProps & {
|
|
22
|
-
customContent?: boolean;
|
|
23
|
-
title: string;
|
|
24
|
-
doNoPassTryToCloseToBody?: boolean;
|
|
25
|
-
children: JSX.Element;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export type ConfirmationModalProps = CommonProps & {
|
|
29
|
-
title?: string;
|
|
30
|
-
children?: JSX.Element;
|
|
31
|
-
footerProps: FooterProps
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type FooterProps = {
|
|
35
|
-
readonly confirmButtonColor?:string;
|
|
36
|
-
readonly cancelButtonLabel?: string;
|
|
37
|
-
readonly errMessage?: string;
|
|
38
|
-
readonly isResponseValid?: (response: any) => { valid: boolean; error: string; };
|
|
39
|
-
readonly confirmButtonLabel?: string;
|
|
40
|
-
readonly focusButton?: boolean;
|
|
41
|
-
readonly showError?: (message?: string) => void;
|
|
42
|
-
|
|
43
|
-
readonly message: any;
|
|
44
|
-
readonly request: () => Promise<any>;
|
|
45
|
-
readonly onSuccess?: (response: any) => void;
|
|
46
|
-
readonly onBeforeSuccessClosing?: (response: any) => void;
|
|
47
|
-
}
|
package/src/Modal/util.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import React, { useState } from "react";
|
|
4
|
-
import { ModalWindow } from "../../Modal";
|
|
5
|
-
import { numberToLocale } from "../../utility";
|
|
6
|
-
import { SIDEWORK_APPLICATION } from "../core/codes";
|
|
7
|
-
import { sideworkCompanyInfo as info } from "../core/util/info";
|
|
8
|
-
import { getDetails } from "../core/util/util";
|
|
9
|
-
import BankTransferFormWrapper from "../Pieces/BankTransferForm/BankTransferFormWrapper";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
type PaymentBankTransferProps = {
|
|
13
|
-
readonly application: SIDEWORK_APPLICATION;
|
|
14
|
-
readonly options: any;
|
|
15
|
-
readonly info : any;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
PaymentBankTransfer = ({ application, options }: PaymentBankTransferProps) => {
|
|
20
|
-
const [done, setDone] = useState(false),
|
|
21
|
-
details = getDetails(application, options),
|
|
22
|
-
|
|
23
|
-
transferIsDone = () => {
|
|
24
|
-
setDone(true);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
if (done) {
|
|
28
|
-
return <BankTransferFormWrapper details={details} />;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<div className="container">
|
|
33
|
-
<div className="row">
|
|
34
|
-
<div className="col-xl">
|
|
35
|
-
<h4>
|
|
36
|
-
{"Pasul "}
|
|
37
|
-
<span className="badge text-bg-primary rounded-circle">1</span>
|
|
38
|
-
</h4>
|
|
39
|
-
<div className="text-muted">{"Te rugăm să operezi următorul transfer bancar."}</div>
|
|
40
|
-
<div className="container mt-3">
|
|
41
|
-
<div className="row">
|
|
42
|
-
<div className="col-lg card">
|
|
43
|
-
<div className="container card-body">
|
|
44
|
-
<div className="row">
|
|
45
|
-
<div className="col-md-4 text-md-right">{"Către"}</div>
|
|
46
|
-
<div className="col-md-8 fw-bold">{info.to}</div>
|
|
47
|
-
</div>
|
|
48
|
-
<div className="row">
|
|
49
|
-
<div className="col-md-4 text-md-right">{""}</div>
|
|
50
|
-
<div className="col-md-8 small">
|
|
51
|
-
{`C.I.F. ${info.cif} și Reg. Com. ${info.regCom}`}
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
<div className="row">
|
|
55
|
-
<div className="col-md-4 text-md-right text-muted">{"Din"}</div>
|
|
56
|
-
<div className="col-md-8 small text-muted">{info.address}</div>
|
|
57
|
-
</div>
|
|
58
|
-
<hr />
|
|
59
|
-
<div className="row">
|
|
60
|
-
<div className="col-md-4 text-md-right">{"Numele băncii"}</div>
|
|
61
|
-
<div className="col-md-8">{info.bankName}</div>
|
|
62
|
-
</div>
|
|
63
|
-
<div className="row">
|
|
64
|
-
<div className="col-md-4 text-md-right">{"IBAN"}</div>
|
|
65
|
-
<div className="col-md-8 fw-bold">{info.bankAccount}</div>
|
|
66
|
-
</div>
|
|
67
|
-
<div className="row">
|
|
68
|
-
<div className="col-md-4 text-md-right">{"Suma"}</div>
|
|
69
|
-
<div className="col-md-8 fw-bold">
|
|
70
|
-
{numberToLocale(options.amount)}{" lei"}
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
<div className="row">
|
|
74
|
-
<div className="col-md-4 text-md-right">{"Referință"}</div>
|
|
75
|
-
<div className="col-md-8 fw-bold">
|
|
76
|
-
<code>{details}</code>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
<div className="alert alert-warning mt-3">
|
|
84
|
-
<i className="fa fa-exclamation-circle me-1" />
|
|
85
|
-
{"Este foarte important să scrii cu atenție câmpul \"Referință\""}
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
<div className="col-xl">
|
|
89
|
-
<h4>
|
|
90
|
-
{"Pasul "}
|
|
91
|
-
<span className="badge text-bg-primary rounded-circle">2</span>
|
|
92
|
-
</h4>
|
|
93
|
-
<div className="mt-4">
|
|
94
|
-
{"După ce ai efectuat transferul bancar, apasă următorul buton:"}
|
|
95
|
-
</div>
|
|
96
|
-
<div className="text-center">
|
|
97
|
-
<button
|
|
98
|
-
className="btn btn-block btn-primary mt-4 me-1 ms-1 mb-3"
|
|
99
|
-
onClick={transferIsDone}
|
|
100
|
-
type="button">
|
|
101
|
-
<i className="fa fa-check me-1" />
|
|
102
|
-
{"Am efectuat transferul bancar"}
|
|
103
|
-
</button>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
108
|
-
);
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
PaymentBankTransferModal = (props: PaymentBankTransferProps) => (
|
|
112
|
-
<ModalWindow size="xl" title="Transfer bancar">
|
|
113
|
-
<PaymentBankTransfer {...props} />
|
|
114
|
-
</ModalWindow>
|
|
115
|
-
);
|
|
116
|
-
|
|
117
|
-
export default PaymentBankTransferModal;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { ModalWindow } from "../../Modal";
|
|
5
|
-
|
|
6
|
-
const PaymentBankTransferDoneModal = () => (
|
|
7
|
-
<ModalWindow title="Totul e în regulă!">
|
|
8
|
-
<div className="mt-2">
|
|
9
|
-
<h3 className="text-success">
|
|
10
|
-
<i className="fa fa-check text-success" /> {"Am înregistrat cererea ta"}
|
|
11
|
-
</h3>
|
|
12
|
-
<div className="mt-4">
|
|
13
|
-
<h5 className="mt-2">{"Ce se întâmplă acum?"}</h5>
|
|
14
|
-
{"Rămâne să primim confirmarea din partea băncii tale și vom efectua operațiunile"}
|
|
15
|
-
</div>
|
|
16
|
-
<h5 className="mt-3">{"Cât timp va dura?"}</h5>
|
|
17
|
-
<div>
|
|
18
|
-
{`Durează între 1 și 3 zile lucrătoare pentru operațiunea bancară să
|
|
19
|
-
se desfășoare. În momentul în care am primit banii în cont, te rugăm să acorzi
|
|
20
|
-
1-2 zile lucrătoare să operăm modificările pe platforma Sidework și să
|
|
21
|
-
te bucuri de beneficii.`}
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
</ModalWindow>
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
export default PaymentBankTransferDoneModal;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import PaymentBankTransferModal from "./BankTransfer";
|
|
4
|
-
import PaymentBankTransferDoneModal from "./BankTransferDoneModal";
|
|
5
|
-
|
|
6
|
-
const paymentModals = {
|
|
7
|
-
"PAYMENT_BANK_TRANSFER" : PaymentBankTransferModal,
|
|
8
|
-
"PAYMENT_WAS_DONE" : PaymentBankTransferDoneModal,
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export default paymentModals;
|