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
package/cspell.json
DELETED
package/dist/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { default as NewFeature } from "./UI/NewFeature";
|
|
2
|
-
export { default as JSONSyntaxFromData } from "./Developer/JSONSyntaxFromData";
|
|
3
|
-
export { default as JSONSyntaxFromText } from "./Developer/JSONSyntaxFromText";
|
|
4
|
-
export { default as normalize } from "./utility/normalize";
|
|
5
|
-
export { default as words } from "./utility/words";
|
|
6
|
-
export { default as paymentUtils } from "./Payment/index";
|
|
7
|
-
export { default as Payment } from "./Payment/Pieces/Payment";
|
package/dist/package.json
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "17.7.0",
|
|
3
|
-
"name": "x25",
|
|
4
|
-
"description": "x25",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"types": "./index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"load": "npm run intern-pre && cd dist && npm run ts && npm run intern-copy && npm run clean-dist && npm publish",
|
|
9
|
-
"load-beta": "npm run intern-pre && cd dist && npm run ts && npm run intern-copy && npm publish --tag beta",
|
|
10
|
-
"eslint": "eslint --ext .tsx,.ts src --fix",
|
|
11
|
-
"intern-pre": "npm run eslint && npm run intern-clean && npm run intern-build",
|
|
12
|
-
"knip": "knip --include-libs",
|
|
13
|
-
"intern-build-scss": "sass --style=compressed --no-source-map src:dist",
|
|
14
|
-
"intern-copy": " copy package.json dist",
|
|
15
|
-
"lint": "npm run ts:check & npm run eslint",
|
|
16
|
-
"intern-build": "npm run intern-build-scss",
|
|
17
|
-
"intern-clean": "rimraf dist dist",
|
|
18
|
-
"intern-test": "vitest",
|
|
19
|
-
"check": "node script/check & npm run depcheck & npm run check:npm-check",
|
|
20
|
-
"check:npm-check": "npm-check -u -i \"{rc-tooltip,react,react-dom}\" --specials=bin,eslint,babel,webpack",
|
|
21
|
-
"depcheck": "depcheck --ignores=@docusaurus/react-loadable,webpack-cli,@hot-loader/react-dom --ignore-patterns=server,node_modules,tmp,fonts",
|
|
22
|
-
"check:global": "npm-check -gu",
|
|
23
|
-
"clean-dist": "trash \"./**/*.test.*\"",
|
|
24
|
-
"ts:check": "tsc --noEmit",
|
|
25
|
-
"ts": "tsc --declaration"
|
|
26
|
-
},
|
|
27
|
-
"repository": {
|
|
28
|
-
"type": "git",
|
|
29
|
-
"url": "git+https://github.com/cristian-sima/x25.git"
|
|
30
|
-
},
|
|
31
|
-
"keywords": [],
|
|
32
|
-
"author": "SC SIDEWORK SRL",
|
|
33
|
-
"license": "MIT",
|
|
34
|
-
"bugs": {
|
|
35
|
-
"url": "https://github.com/cristian-sima/x25/issues"
|
|
36
|
-
},
|
|
37
|
-
"homepage": "https://github.com/cristian-sima/x25#readme",
|
|
38
|
-
"babel": {
|
|
39
|
-
"presets": [
|
|
40
|
-
[
|
|
41
|
-
"@babel/preset-env",
|
|
42
|
-
{
|
|
43
|
-
"targets": {
|
|
44
|
-
"node": "current"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
"@babel/preset-typescript",
|
|
49
|
-
"@babel/preset-react"
|
|
50
|
-
],
|
|
51
|
-
"env": {
|
|
52
|
-
"production": {
|
|
53
|
-
"plugins": [
|
|
54
|
-
"@babel/plugin-syntax-dynamic-import",
|
|
55
|
-
"@babel/plugin-proposal-class-properties",
|
|
56
|
-
"@babel/plugin-proposal-export-default-from",
|
|
57
|
-
"@babel/plugin-transform-modules-commonjs",
|
|
58
|
-
"@babel/plugin-transform-react-constant-elements",
|
|
59
|
-
"@babel/plugin-transform-react-inline-elements",
|
|
60
|
-
"@babel/plugin-transform-typescript",
|
|
61
|
-
"transform-react-remove-prop-types"
|
|
62
|
-
]
|
|
63
|
-
},
|
|
64
|
-
"development": {
|
|
65
|
-
"plugins": [
|
|
66
|
-
"@babel/plugin-syntax-dynamic-import",
|
|
67
|
-
"@babel/plugin-proposal-class-properties",
|
|
68
|
-
"@babel/plugin-proposal-export-default-from",
|
|
69
|
-
"@babel/plugin-transform-modules-commonjs"
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
"engines": {
|
|
75
|
-
"node": ">=18"
|
|
76
|
-
},
|
|
77
|
-
"devDependencies": {
|
|
78
|
-
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
79
|
-
"@babel/plugin-proposal-export-default-from": "^7.23.3",
|
|
80
|
-
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
81
|
-
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
|
|
82
|
-
"@babel/plugin-transform-react-constant-elements": "^7.23.3",
|
|
83
|
-
"@babel/plugin-transform-react-inline-elements": "^7.23.3",
|
|
84
|
-
"@babel/plugin-transform-typescript": "^7.23.5",
|
|
85
|
-
"@babel/preset-env": "^7.23.5",
|
|
86
|
-
"@babel/preset-react": "^7.23.3",
|
|
87
|
-
"@babel/preset-typescript": "^7.23.3",
|
|
88
|
-
"@types/superagent": "^8.1.9",
|
|
89
|
-
"@typescript-eslint/eslint-plugin": "^6.13.1",
|
|
90
|
-
"@typescript-eslint/parser": "^6.13.1",
|
|
91
|
-
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
92
|
-
"copy": "^0.3.2",
|
|
93
|
-
"css-loader": "^6.8.1",
|
|
94
|
-
"depcheck": "^1.4.7",
|
|
95
|
-
"eslint": "^8.54.0",
|
|
96
|
-
"eslint-import-resolver-typescript": "^3.6.1",
|
|
97
|
-
"eslint-plugin-import": "^2.29.0",
|
|
98
|
-
"eslint-plugin-react": "^7.33.2",
|
|
99
|
-
"knip": "^5.36.2",
|
|
100
|
-
"npm-check": "^6.0.1",
|
|
101
|
-
"rimraf": "3.0.2",
|
|
102
|
-
"sass": "^1.98.0",
|
|
103
|
-
"style-loader": "^3.3.3",
|
|
104
|
-
"trash-cli": "^6.0.0",
|
|
105
|
-
"ts-loader": "^9.5.1",
|
|
106
|
-
"typescript": "^5.3.2",
|
|
107
|
-
"vitest": "^1.4.0",
|
|
108
|
-
"webpack": "^5.89.0"
|
|
109
|
-
},
|
|
110
|
-
"overrides": {
|
|
111
|
-
"rc-tooltip": {
|
|
112
|
-
"react": "$react"
|
|
113
|
-
},
|
|
114
|
-
"react-datepicker": {
|
|
115
|
-
"react": "$react"
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
"dependencies": {
|
|
119
|
-
"@docusaurus/react-loadable": "^5.5.2",
|
|
120
|
-
"@reduxjs/toolkit": "^1.9.7",
|
|
121
|
-
"classnames": "^2.3.2",
|
|
122
|
-
"final-form": "^4.20.10",
|
|
123
|
-
"immutable": "^4.3.4",
|
|
124
|
-
"moment": "^2.29.4",
|
|
125
|
-
"rc-tooltip": "^5.3.1",
|
|
126
|
-
"react": "^17.0.2",
|
|
127
|
-
"react-final-form": "^6.5.9",
|
|
128
|
-
"react-immutable-form": "^1.1.7",
|
|
129
|
-
"react-immutable-form-with-bootstrap": "^1.0.9",
|
|
130
|
-
"react-notification-system-redux2": "^3.0.4",
|
|
131
|
-
"react-redux": "^8.1.3",
|
|
132
|
-
"redux": "^4.2.1",
|
|
133
|
-
"reselect": "^4.1.8",
|
|
134
|
-
"superagent": "^8.1.2",
|
|
135
|
-
"x25": "^17.4.70"
|
|
136
|
-
}
|
|
137
|
-
}
|
package/script/check.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
|
-
|
|
3
|
-
console.log("This is the start of checking deps.");
|
|
4
|
-
|
|
5
|
-
console.warn(`
|
|
6
|
-
=======================================================================================
|
|
7
|
-
Please check manually if the version of react-loadable is greater than v5.5.0.
|
|
8
|
-
If so, go to x25 and
|
|
9
|
-
- remove @docusaurus/react-loadable from tsconfig.json
|
|
10
|
-
- install react-loadable
|
|
11
|
-
- remove @docusaurus/react-loadable from package.json from checking
|
|
12
|
-
|
|
13
|
-
This was necessary because react-loadable was not updated and it showed some warnings.
|
|
14
|
-
=======================================================================================
|
|
15
|
-
`);
|
package/src/Account/Load.tsx
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { connect } from "react-redux";
|
|
3
|
-
import { LargeErrorMessage, LoadingMessage } from "../Messages";
|
|
4
|
-
import type { Dispatch, State } from "../types";
|
|
5
|
-
import { words } from "../utility";
|
|
6
|
-
import { fetchInitialInformation as fetchInitialInformationAction } from "./actions";
|
|
7
|
-
import { selectors } from "./reducer";
|
|
8
|
-
|
|
9
|
-
type PropTypes = {
|
|
10
|
-
readonly appName: string;
|
|
11
|
-
readonly isFetching: boolean;
|
|
12
|
-
readonly hasError: boolean;
|
|
13
|
-
readonly data: any;
|
|
14
|
-
readonly children: any;
|
|
15
|
-
readonly shouldFetch: any;
|
|
16
|
-
readonly fetchInitialInformation: () => void;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const mapStateToProps = (state: State) => ({
|
|
20
|
-
data : selectors.getCurrentAccount(state),
|
|
21
|
-
hasError : selectors.getCurrentAccountHasError(state),
|
|
22
|
-
fetched : selectors.getCurrentAccountIsFetched(state),
|
|
23
|
-
isFetching : selectors.getCurrentAccountIsFetching(state),
|
|
24
|
-
shouldFetch : selectors.getCurrentAccountShouldFetch(state),
|
|
25
|
-
}),
|
|
26
|
-
mapDispatchToProps = (dispatch: Dispatch, {
|
|
27
|
-
appName,
|
|
28
|
-
} : { appName : string }) => ({
|
|
29
|
-
fetchInitialInformation () {
|
|
30
|
-
setTimeout(() => {
|
|
31
|
-
dispatch(fetchInitialInformationAction(appName));
|
|
32
|
-
});
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
}),
|
|
36
|
-
|
|
37
|
-
LoadAccount = (props: PropTypes) => {
|
|
38
|
-
const { children, data, isFetching, shouldFetch, hasError, fetchInitialInformation } = props;
|
|
39
|
-
|
|
40
|
-
React.useEffect(() => {
|
|
41
|
-
if (shouldFetch) {
|
|
42
|
-
fetchInitialInformation();
|
|
43
|
-
}
|
|
44
|
-
}, [shouldFetch, isFetching, hasError]);
|
|
45
|
-
|
|
46
|
-
if (isFetching) {
|
|
47
|
-
return <LoadingMessage message={words.PleaseWait} />;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (hasError) {
|
|
51
|
-
return <LargeErrorMessage message={words.ThereWasAProblem} onRetry={fetchInitialInformation} />;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (data.size === 0) {
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return children;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export default connect(mapStateToProps, mapDispatchToProps)(LoadAccount);
|
package/src/Account/actions.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { createAsyncThunk } from "@reduxjs/toolkit";
|
|
2
|
-
import * as Immutable from "immutable";
|
|
3
|
-
import agent from "superagent";
|
|
4
|
-
import { normalize } from "../";
|
|
5
|
-
import { noError } from "../utility";
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
{ normalizeArrayByField, normalizeArray } = normalize,
|
|
9
|
-
normalizeInitialInformation = (info: any) => {
|
|
10
|
-
const { Account, IsConnected, Counties, Companies } = info;
|
|
11
|
-
|
|
12
|
-
return {
|
|
13
|
-
Account : Immutable.fromJS(Account || {}),
|
|
14
|
-
IsConnected,
|
|
15
|
-
Error : IsConnected ? noError : "Not connected",
|
|
16
|
-
Counties : (
|
|
17
|
-
typeof Counties === "undefined"
|
|
18
|
-
? Immutable.List()
|
|
19
|
-
: normalizeArrayByField(Counties, "Short").entities
|
|
20
|
-
),
|
|
21
|
-
Companies: (
|
|
22
|
-
typeof Companies === "undefined"
|
|
23
|
-
? Immutable.List()
|
|
24
|
-
: normalizeArray(Companies).entities
|
|
25
|
-
),
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const
|
|
30
|
-
fetchInitialInformation = createAsyncThunk("account/FETCH_INITIAL_INFORMATION",
|
|
31
|
-
async (app : string) => {
|
|
32
|
-
const response = await agent.
|
|
33
|
-
get("/api/extern/get-initial-information").
|
|
34
|
-
type("form").
|
|
35
|
-
query({
|
|
36
|
-
app,
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
return normalizeInitialInformation(response?.body || {});
|
|
40
|
-
},
|
|
41
|
-
),
|
|
42
|
-
modifyCurrentAccountData = (newAccountDataToMerge : Immutable.Map<string, any>) => ({
|
|
43
|
-
type : "account/MODIFY_DATA",
|
|
44
|
-
payload : newAccountDataToMerge,
|
|
45
|
-
});
|
package/src/Account/index.ts
DELETED
package/src/Account/reducer.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { createSelector } from "reselect";
|
|
2
|
-
import * as Immutable from "immutable";
|
|
3
|
-
import { getAccountState } from "../config";
|
|
4
|
-
import { isAdministratorAccount, noError } from "../utility";
|
|
5
|
-
import type { Action, State } from "src/types";
|
|
6
|
-
|
|
7
|
-
type AccountModifyAction= {
|
|
8
|
-
payload: Immutable.Map<string, any>
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const initialState = Immutable.Map({
|
|
12
|
-
error : noError,
|
|
13
|
-
fetched : false,
|
|
14
|
-
fetching : false,
|
|
15
|
-
info : Immutable.Map(),
|
|
16
|
-
companies : Immutable.Map(),
|
|
17
|
-
}),
|
|
18
|
-
|
|
19
|
-
fetchCurrentAccountPending = (state: any) => state.merge({
|
|
20
|
-
error : noError,
|
|
21
|
-
fetching : true,
|
|
22
|
-
}),
|
|
23
|
-
fetchCurrentAccountRejected = (state: any) => state.merge({
|
|
24
|
-
error : "Error",
|
|
25
|
-
fetching : false,
|
|
26
|
-
}),
|
|
27
|
-
fetchCurrentAccountFulfilled = (state: any, {
|
|
28
|
-
payload,
|
|
29
|
-
} : { payload : { Account : any, Companies : any } }) => state.mergeDeep({
|
|
30
|
-
fetched : true,
|
|
31
|
-
fetching : false,
|
|
32
|
-
info : payload.Account,
|
|
33
|
-
companies : payload.Companies,
|
|
34
|
-
}),
|
|
35
|
-
accountChangePassword = (state: any) => state.setIn(["info", "RequireChange"], false),
|
|
36
|
-
accountModify = (state: any, { payload } : AccountModifyAction) => (
|
|
37
|
-
state.update("info", (info : Immutable.Map<string, any>) => (
|
|
38
|
-
info.mergeDeep(payload)
|
|
39
|
-
),
|
|
40
|
-
)),
|
|
41
|
-
accountGaveConsent = (state: any) => state.setIn(["info", "HasToGiveConsent"], false),
|
|
42
|
-
|
|
43
|
-
reducer = (state: any = initialState, action: Action) => {
|
|
44
|
-
switch (action.type) {
|
|
45
|
-
case "account/FETCH_INITIAL_INFORMATION/pending":
|
|
46
|
-
return fetchCurrentAccountPending(state);
|
|
47
|
-
|
|
48
|
-
case "account/FETCH_INITIAL_INFORMATION/rejected":
|
|
49
|
-
return fetchCurrentAccountRejected(state);
|
|
50
|
-
|
|
51
|
-
case "account/FETCH_INITIAL_INFORMATION/fulfilled":
|
|
52
|
-
return fetchCurrentAccountFulfilled(state, action);
|
|
53
|
-
|
|
54
|
-
case "account/ACCOUNT_CHANGE_PASSWORD":
|
|
55
|
-
return accountChangePassword(state);
|
|
56
|
-
|
|
57
|
-
case "account/MODIFY_DATA":
|
|
58
|
-
return accountModify(state, action);
|
|
59
|
-
|
|
60
|
-
case "account/ACCOUNT_GAVE_CONSENT":
|
|
61
|
-
return accountGaveConsent(state);
|
|
62
|
-
|
|
63
|
-
default:
|
|
64
|
-
return state;
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
getFetched = (state: State) => getAccountState(state).get("fetched"),
|
|
69
|
-
getError = (state: State) => getAccountState(state).get("error"),
|
|
70
|
-
|
|
71
|
-
getCurrentAccount = (state: State) => getAccountState(state).get("info"),
|
|
72
|
-
getCurrentAccountCompanies = (state: State) => getAccountState(state).get("companies"),
|
|
73
|
-
getCurrentAccountIsFetching = (state: State) => getAccountState(state).get("fetching"),
|
|
74
|
-
getCurrentAccountShouldFetch = createSelector(
|
|
75
|
-
getCurrentAccountIsFetching,
|
|
76
|
-
getFetched,
|
|
77
|
-
getError,
|
|
78
|
-
(isFetching, isFetched, error) => !isFetching && !isFetched && error === noError,
|
|
79
|
-
),
|
|
80
|
-
getCurrentAccountIsFetched = createSelector(
|
|
81
|
-
getCurrentAccountIsFetching,
|
|
82
|
-
getFetched,
|
|
83
|
-
getError,
|
|
84
|
-
(isFetching, isFetched, error) => !isFetching && isFetched && error === noError,
|
|
85
|
-
),
|
|
86
|
-
getCurrentAccountHasError = createSelector(
|
|
87
|
-
getError, (error) => error !== noError,
|
|
88
|
-
),
|
|
89
|
-
getIsCurrentAccountAdministrator = createSelector(
|
|
90
|
-
getCurrentAccount,
|
|
91
|
-
(account) => isAdministratorAccount(account.get("Type")),
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
export const selectors = {
|
|
95
|
-
getCurrentAccountCompanies,
|
|
96
|
-
getCurrentAccount,
|
|
97
|
-
getCurrentAccountIsFetching,
|
|
98
|
-
getCurrentAccountShouldFetch,
|
|
99
|
-
getCurrentAccountIsFetched,
|
|
100
|
-
getCurrentAccountHasError,
|
|
101
|
-
getIsCurrentAccountAdministrator,
|
|
102
|
-
};
|
|
103
|
-
export default reducer;
|
package/src/Async/InitModule.tsx
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { useDispatch, useSelector } from "react-redux";
|
|
5
|
-
import { words } from "../utility";
|
|
6
|
-
|
|
7
|
-
import { LoadingMessage } from "../Messages/Loading";
|
|
8
|
-
import { getIsModuleReady, moduleIsReadyAction } from "../reducer/module";
|
|
9
|
-
import type { Loaded } from "./types";
|
|
10
|
-
import { initModule } from "./util";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
type InitModuleProps = {
|
|
14
|
-
readonly loaded: Loaded;
|
|
15
|
-
readonly props: any;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const InitModule = ({ loaded, props } : InitModuleProps) => {
|
|
19
|
-
const
|
|
20
|
-
current = loaded.default,
|
|
21
|
-
{ module, Component } = current,
|
|
22
|
-
ready = useSelector((state : any) => getIsModuleReady(state, module)),
|
|
23
|
-
dispatch = useDispatch();
|
|
24
|
-
|
|
25
|
-
React.useEffect(() => {
|
|
26
|
-
if (!ready) {
|
|
27
|
-
initModule(current, () => {
|
|
28
|
-
dispatch(moduleIsReadyAction(module));
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}, [ready]);
|
|
32
|
-
|
|
33
|
-
if (ready) {
|
|
34
|
-
return <Component {...props} />;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<div className="mt-3">
|
|
39
|
-
<LoadingMessage message={words.PleaseWait} />
|
|
40
|
-
</div>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export default InitModule;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
type LoadingPropTypes = {
|
|
2
|
-
readonly error?: any;
|
|
3
|
-
readonly timedOut: boolean;
|
|
4
|
-
readonly pastDelay: boolean;
|
|
5
|
-
readonly retry: () => any;
|
|
6
|
-
};
|
|
7
|
-
import React from "react";
|
|
8
|
-
import { LoadingMessage } from "../Messages/Loading";
|
|
9
|
-
import { UpdateApplicationMessage } from "../Messages/Update";
|
|
10
|
-
import { words } from "../utility";
|
|
11
|
-
import TheError from "../utility/dev/TheError";
|
|
12
|
-
import SimulatedException from "./SimulatedException";
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
RouteLoading = ({ error : theError, retry, pastDelay, timedOut }: LoadingPropTypes) => {
|
|
16
|
-
if (theError) {
|
|
17
|
-
|
|
18
|
-
if (theError.name === "ChunkLoadError") {
|
|
19
|
-
return (
|
|
20
|
-
<UpdateApplicationMessage />
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// eslint-disable-next-line no-undef
|
|
25
|
-
if (process.env.NODE_ENV === "development") {
|
|
26
|
-
return (
|
|
27
|
-
<TheError
|
|
28
|
-
error={theError}
|
|
29
|
-
refresh={retry}
|
|
30
|
-
/>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
throw new SimulatedException(theError);
|
|
35
|
-
} else if (timedOut) {
|
|
36
|
-
return (
|
|
37
|
-
<div>{words.ItLoadsSlower}
|
|
38
|
-
<button
|
|
39
|
-
className="btn btn-primary btn-block"
|
|
40
|
-
onClick={retry} type="button">{words.TryAgain}
|
|
41
|
-
</button>
|
|
42
|
-
</div>
|
|
43
|
-
);
|
|
44
|
-
} else if (pastDelay) {
|
|
45
|
-
// When the loader has taken longer than the delay
|
|
46
|
-
return (
|
|
47
|
-
<div className="mt-3">
|
|
48
|
-
<LoadingMessage message={words.PleaseWait} />
|
|
49
|
-
</div>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// When the loader has just started
|
|
54
|
-
return null;
|
|
55
|
-
|
|
56
|
-
// if (error) {
|
|
57
|
-
// return (
|
|
58
|
-
// <ErrorBoundary />
|
|
59
|
-
// );
|
|
60
|
-
// }
|
|
61
|
-
|
|
62
|
-
// if (timedOut) {
|
|
63
|
-
// return (
|
|
64
|
-
// <div>{words.ItLoadsSlower}
|
|
65
|
-
// <button className="btn btn-primary btn-block" onClick={retry} type="button">
|
|
66
|
-
// {words.TryAgain}
|
|
67
|
-
// </button>
|
|
68
|
-
// </div>
|
|
69
|
-
// );
|
|
70
|
-
// }
|
|
71
|
-
|
|
72
|
-
// return (
|
|
73
|
-
// <div className="mt-3">
|
|
74
|
-
// <LoadingMessage message={words.PleaseWait} />
|
|
75
|
-
// </div>
|
|
76
|
-
// )
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export default RouteLoading;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-classes-per-file */
|
|
2
|
-
class CustomError extends Error {
|
|
3
|
-
constructor (theError : any) {
|
|
4
|
-
super(theError);
|
|
5
|
-
this.message = theError.message;
|
|
6
|
-
this.name = theError.name;
|
|
7
|
-
this.stack = theError.stack;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class SimulatedException extends CustomError {}
|
|
14
|
-
|
|
15
|
-
export default SimulatedException;
|
package/src/Async/helpers.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/* eslint-disable prefer-object-has-own */
|
|
2
|
-
/* eslint-disable no-undefined */
|
|
3
|
-
|
|
4
|
-
import { Reducers } from "./types";
|
|
5
|
-
|
|
6
|
-
export const
|
|
7
|
-
has = (obj : any, key : string) : boolean => {
|
|
8
|
-
const keyParts = key.split(".");
|
|
9
|
-
|
|
10
|
-
return Boolean(obj) && (
|
|
11
|
-
keyParts.length > 1
|
|
12
|
-
? has(obj[key.split(".")[0]], keyParts.slice(1).join("."))
|
|
13
|
-
: Object.hasOwnProperty.call(obj, key)
|
|
14
|
-
);
|
|
15
|
-
},
|
|
16
|
-
get = (obj: any, key: string, defaultValue: any) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
let theObject = obj;
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
theKey = typeof key === "string" && String(key).includes(".") ? key.split(".") : key,
|
|
23
|
-
getKey = (current: number) => {
|
|
24
|
-
if (typeof theObject !== "object") {
|
|
25
|
-
return undefined;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return theObject[theKey[current]];
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
for (let current = 0; current < theKey.length; current += 1) {
|
|
32
|
-
theObject = theObject ? getKey(current) : undefined;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return theObject === undefined ? defaultValue : theObject;
|
|
37
|
-
},
|
|
38
|
-
/* eslint-disable */
|
|
39
|
-
set = (obj : any, keys : any, val : any) => {
|
|
40
|
-
keys.split && (keys=keys.split('.'));
|
|
41
|
-
var i=0, l=keys.length, t=obj, x, k;
|
|
42
|
-
while (i < l) {
|
|
43
|
-
k = keys[i++];
|
|
44
|
-
if (k === '__proto__' || k === 'constructor' || k === 'prototype') break;
|
|
45
|
-
t = t[k] = (i === l) ? val : (typeof(x=t[k])===typeof(keys)) ? x : (keys[i]*0 !== 0 || !!~(''+keys[i]).indexOf('.')) ? {} : [];
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
export class CombineReducersError extends Error {
|
|
51
|
-
reducers: Reducers;
|
|
52
|
-
|
|
53
|
-
constructor (message : string, reducers : Reducers) {
|
|
54
|
-
super(message);
|
|
55
|
-
this.name = "CombineReducersError";
|
|
56
|
-
this.reducers = reducers;
|
|
57
|
-
}
|
|
58
|
-
}
|
package/src/Async/index.tsx
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/* eslint-disable new-cap, react/prefer-stateless-function, react/require-optimization */
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import Loadable from "react-loadable";
|
|
4
|
-
import InitModule from "./InitModule";
|
|
5
|
-
import RouteLoading from "./RouteLoading";
|
|
6
|
-
import { Loaded } from "./types";
|
|
7
|
-
|
|
8
|
-
// type injectPaginatorTypes = {
|
|
9
|
-
// key: string,
|
|
10
|
-
// itemsReducer: any;
|
|
11
|
-
// pagesReducer: any;
|
|
12
|
-
// };
|
|
13
|
-
// import { injectReducer } from "redux-injector";
|
|
14
|
-
// import { injectModals } from "../Modal/util";
|
|
15
|
-
const timeout = 15000;
|
|
16
|
-
|
|
17
|
-
export let ErrorBoundary = ({ children } : any) => (
|
|
18
|
-
children
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
export let AppLogo : any = null;
|
|
22
|
-
|
|
23
|
-
// const injectPaginator = ({ key, itemsReducer, pagesReducer } : injectPaginatorTypes) => {
|
|
24
|
-
// injectReducer(`entities.${key}`, itemsReducer);
|
|
25
|
-
// injectReducer(`paginations.${key}`, pagesReducer);
|
|
26
|
-
// };
|
|
27
|
-
// const renderWithReducer = (route, props) => {
|
|
28
|
-
// const { Component, reducers, modals, paginators } = route.default;
|
|
29
|
-
//
|
|
30
|
-
// if (reducers) {
|
|
31
|
-
// if (Array.isArray(reducers)) {
|
|
32
|
-
// for (const { key, func } of reducers) {
|
|
33
|
-
// injectReducer(key, func);
|
|
34
|
-
// }
|
|
35
|
-
// } else {
|
|
36
|
-
// const { key, func } = reducers;
|
|
37
|
-
//
|
|
38
|
-
// injectReducer(key, func);
|
|
39
|
-
// }
|
|
40
|
-
// }
|
|
41
|
-
//
|
|
42
|
-
// if (modals) {
|
|
43
|
-
// injectModals(modals);
|
|
44
|
-
// }
|
|
45
|
-
//
|
|
46
|
-
// if (paginators) {
|
|
47
|
-
// if (Array.isArray(paginators)) {
|
|
48
|
-
// for (const paginator of paginators) {
|
|
49
|
-
// injectPaginator(paginator);
|
|
50
|
-
// }
|
|
51
|
-
// } else {
|
|
52
|
-
// injectPaginator(paginators);
|
|
53
|
-
// }
|
|
54
|
-
// }
|
|
55
|
-
//
|
|
56
|
-
// return <Component {...props} />;
|
|
57
|
-
// };
|
|
58
|
-
export const
|
|
59
|
-
setErrorBoundary = (theError: any) => {
|
|
60
|
-
ErrorBoundary = theError;
|
|
61
|
-
},
|
|
62
|
-
setAppLogo = (theLogo: any) => {
|
|
63
|
-
AppLogo = theLogo;
|
|
64
|
-
},
|
|
65
|
-
createAsyncRoute = (loader : any) => Loadable({
|
|
66
|
-
loader,
|
|
67
|
-
loading : RouteLoading,
|
|
68
|
-
render : (loaded : Loaded, props : any) => (
|
|
69
|
-
<InitModule loaded={loaded} props={props} />
|
|
70
|
-
),
|
|
71
|
-
timeout,
|
|
72
|
-
});
|