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,91 +0,0 @@
|
|
|
1
|
-
import Immutable from "immutable";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { ImmutableForm } from "react-immutable-form";
|
|
4
|
-
import { formUtils } from "react-immutable-form-with-bootstrap";
|
|
5
|
-
import { onSubmitImmutableFormFunc } from "react-immutable-form/types";
|
|
6
|
-
import { PaymentBankTransferConfirmForm } from "../../core/types";
|
|
7
|
-
import BankTransferNumberField from "./BankTransferNumberField";
|
|
8
|
-
import validate from "./validate";
|
|
9
|
-
|
|
10
|
-
type BankTransferFormProps = {
|
|
11
|
-
readonly buttonLabel: string;
|
|
12
|
-
readonly initialValues?: Immutable.Map<string, any>;
|
|
13
|
-
readonly onSubmit: onSubmitImmutableFormFunc;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
BankTransferForm = (props : BankTransferFormProps) => {
|
|
18
|
-
const
|
|
19
|
-
{ buttonLabel, initialValues, onSubmit } = props,
|
|
20
|
-
onSubmitError = formUtils.useOnSubmitWithDispatch(),
|
|
21
|
-
onServerFailed = formUtils.useOnServerFailed();
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<ImmutableForm<PaymentBankTransferConfirmForm>
|
|
25
|
-
initialValidators={validate}
|
|
26
|
-
initialValues={initialValues}
|
|
27
|
-
onServerFailed={onServerFailed}
|
|
28
|
-
onSubmit={onSubmit}
|
|
29
|
-
onSubmitError={onSubmitError}>
|
|
30
|
-
{(form) => {
|
|
31
|
-
const
|
|
32
|
-
formError = form.management.get("formError"),
|
|
33
|
-
isSubmitting = form.management.get("isSubmitting"),
|
|
34
|
-
numberInputRef = React.useRef(null as any),
|
|
35
|
-
focusNumberInput = () => numberInputRef?.current?.focus();
|
|
36
|
-
|
|
37
|
-
React.useEffect(() => {
|
|
38
|
-
focusNumberInput();
|
|
39
|
-
}, []);
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<form autoComplete="off" onSubmit={form.handleSubmit}>
|
|
43
|
-
<div className="container">
|
|
44
|
-
<div className="row">
|
|
45
|
-
<div className="col-lg-6 offset-lg-3">
|
|
46
|
-
{formError ? (
|
|
47
|
-
<div className="alert alert-danger mt-2">
|
|
48
|
-
{formError}
|
|
49
|
-
</div>
|
|
50
|
-
) : null}
|
|
51
|
-
|
|
52
|
-
<div className="alert alert-primary">
|
|
53
|
-
{"Te rugăm să completezi numărul tranzacției bancare:"}
|
|
54
|
-
</div>
|
|
55
|
-
<div className="container">
|
|
56
|
-
<div className="row">
|
|
57
|
-
<div className="col-md">
|
|
58
|
-
<BankTransferNumberField
|
|
59
|
-
inputProps={{
|
|
60
|
-
ref: numberInputRef,
|
|
61
|
-
}}
|
|
62
|
-
/>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
<div className="text-center my-3">
|
|
67
|
-
<button
|
|
68
|
-
aria-label={buttonLabel}
|
|
69
|
-
className="btn btn-primary"
|
|
70
|
-
disabled={isSubmitting}
|
|
71
|
-
type="submit">
|
|
72
|
-
{isSubmitting ? (
|
|
73
|
-
<span>
|
|
74
|
-
<i className="fa fa-refresh fa-spin fa-fw" />
|
|
75
|
-
{" Așteaptă"}
|
|
76
|
-
</span>
|
|
77
|
-
) : `${buttonLabel}`}
|
|
78
|
-
</button>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
</form>
|
|
84
|
-
);
|
|
85
|
-
}}
|
|
86
|
-
</ImmutableForm>
|
|
87
|
-
);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export default BankTransferForm;
|
|
91
|
-
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import Immutable from "immutable";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { ImmutableFormError } from "react-immutable-form";
|
|
5
|
-
import { onSubmitImmutableFormFunc } from "react-immutable-form/types";
|
|
6
|
-
import { useDispatch } from "react-redux";
|
|
7
|
-
import superagent from "superagent";
|
|
8
|
-
import { hideModal } from "../../../actions";
|
|
9
|
-
import { paymentShowBankTransferDoneAction } from "../../core/actions";
|
|
10
|
-
import { PaymentBankTransferConfirmForm } from "../../core/types";
|
|
11
|
-
import BankTransferForm from "./BankTransferForm";
|
|
12
|
-
|
|
13
|
-
type BankTransferFormWrapperProps = {
|
|
14
|
-
readonly details: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
BankTransferFormWrapper = (props : BankTransferFormWrapperProps) => {
|
|
19
|
-
const
|
|
20
|
-
dispatch = useDispatch(),
|
|
21
|
-
performModify = () => {
|
|
22
|
-
dispatch(hideModal());
|
|
23
|
-
dispatch(paymentShowBankTransferDoneAction());
|
|
24
|
-
},
|
|
25
|
-
getURL = () => "/api/settings/payments/confirm-bank-transfer",
|
|
26
|
-
onSubmit : onSubmitImmutableFormFunc = async (values: Immutable.Map<string, any>) => {
|
|
27
|
-
const
|
|
28
|
-
formData = values.toJS() as PaymentBankTransferConfirmForm,
|
|
29
|
-
performRequest = () => (
|
|
30
|
-
superagent.
|
|
31
|
-
put(getURL()).
|
|
32
|
-
set("Accept", "application/json").
|
|
33
|
-
send({
|
|
34
|
-
...formData,
|
|
35
|
-
Details: props.details,
|
|
36
|
-
})
|
|
37
|
-
),
|
|
38
|
-
{ body } = await performRequest();
|
|
39
|
-
|
|
40
|
-
if (body.Error !== "") {
|
|
41
|
-
throw new ImmutableFormError(body.Error);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
performModify();
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<BankTransferForm
|
|
49
|
-
buttonLabel="Finalizează proces"
|
|
50
|
-
onSubmit={onSubmit}
|
|
51
|
-
/>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export default BankTransferFormWrapper;
|
|
56
|
-
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import Immutable from "immutable";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { ImmutableField } from "react-immutable-form";
|
|
5
|
-
import { InputTemplate } from "react-immutable-form-with-bootstrap";
|
|
6
|
-
|
|
7
|
-
type BankTransferNumberFieldProps = {
|
|
8
|
-
readonly inputProps?: React.HTMLAttributes<HTMLElement> & { ref?: React.RefObject<any> };
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
BankTransferNumberField = (props : BankTransferNumberFieldProps) => {
|
|
13
|
-
const
|
|
14
|
-
componentProps = React.useMemo(() => Immutable.Map({
|
|
15
|
-
label: "Număr tranzacție",
|
|
16
|
-
}), []);
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<ImmutableField
|
|
20
|
-
component={InputTemplate}
|
|
21
|
-
componentProps={componentProps}
|
|
22
|
-
inputProps={{
|
|
23
|
-
...props.inputProps,
|
|
24
|
-
placeholder: "ex. 238747324",
|
|
25
|
-
}}
|
|
26
|
-
name="TransferNumber"
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export default BankTransferNumberField;
|
|
32
|
-
|
|
33
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-undefined */
|
|
2
|
-
import Immutable from "immutable";
|
|
3
|
-
import { validateString } from "../../../utility";
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
TransferNumber = validateString({
|
|
7
|
-
optional : false,
|
|
8
|
-
min : 1,
|
|
9
|
-
max : 500,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export default Immutable.Map({
|
|
13
|
-
TransferNumber,
|
|
14
|
-
});
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import React, { useEffect, useRef } from "react";
|
|
3
|
-
import { config } from "../../config";
|
|
4
|
-
import { LoadingMessage } from "../../Messages";
|
|
5
|
-
|
|
6
|
-
type MobilPayFormProp = {
|
|
7
|
-
readonly envKey: string;
|
|
8
|
-
readonly data: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
MobilPayForm = (props : MobilPayFormProp) => {
|
|
13
|
-
const
|
|
14
|
-
{ envKey, data } = props,
|
|
15
|
-
formRef = useRef<HTMLFormElement>(null),
|
|
16
|
-
timeoutRef = useRef<any>(null),
|
|
17
|
-
delay = 1000,
|
|
18
|
-
submit = () => {
|
|
19
|
-
formRef.current?.submit();
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
startWaiting = () => {
|
|
23
|
-
timeoutRef.current = setTimeout(() => {
|
|
24
|
-
submit();
|
|
25
|
-
}, delay);
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
stopWaiting = () => {
|
|
29
|
-
clearTimeout(timeoutRef.current);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
startWaiting();
|
|
34
|
-
return () => stopWaiting();
|
|
35
|
-
}, [envKey, data]);
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<form action={config.MobilPayURL} method="POST" ref={formRef}>
|
|
39
|
-
<input name="env_key" type="hidden" value={envKey} />
|
|
40
|
-
<input name="data" type="hidden" value={data} />
|
|
41
|
-
<LoadingMessage className="mt-5" message="Se inițiază conexiunea..." />
|
|
42
|
-
</form>
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export default MobilPayForm;
|
|
47
|
-
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/* eslint-disable no-magic-numbers */
|
|
3
|
-
|
|
4
|
-
import Immutable from "immutable";
|
|
5
|
-
import React from "react";
|
|
6
|
-
import { ImmutableFormError } from "react-immutable-form";
|
|
7
|
-
import { useDispatch } from "react-redux";
|
|
8
|
-
import { paymentPayUsingBankTransferModalAction } from "../core/actions";
|
|
9
|
-
import { SIDEWORK_APPLICATION } from "../core/codes";
|
|
10
|
-
import { addPayment as addPaymentRequest } from "../core/request";
|
|
11
|
-
import type { PaymentBankTransferArgsTypes } from "../core/types";
|
|
12
|
-
import { getDetails } from "../core/util/util";
|
|
13
|
-
import MobilPayForm from "./MobilPayForm";
|
|
14
|
-
|
|
15
|
-
type PaymentProps = {
|
|
16
|
-
readonly companyID: number;
|
|
17
|
-
readonly children: any;
|
|
18
|
-
readonly application: SIDEWORK_APPLICATION;
|
|
19
|
-
readonly url?: string;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
/**
|
|
24
|
-
* Injects a createPayment method ready for dealing with adding the payment.
|
|
25
|
-
After that, it submits the payment
|
|
26
|
-
*/
|
|
27
|
-
Payment = (props : PaymentProps) => {
|
|
28
|
-
const
|
|
29
|
-
[ info, setInfo ] = React.useState(Immutable.Map({
|
|
30
|
-
envKey : "",
|
|
31
|
-
data : "",
|
|
32
|
-
show3rdServiceForm : false,
|
|
33
|
-
})),
|
|
34
|
-
dispatch = useDispatch(),
|
|
35
|
-
payUsingBankTransfer = (options : PaymentBankTransferArgsTypes) => () => {
|
|
36
|
-
dispatch(paymentPayUsingBankTransferModalAction(props.application, options));
|
|
37
|
-
},
|
|
38
|
-
createPayment = (rawData : any) => {
|
|
39
|
-
const
|
|
40
|
-
data = rawData.toJS(),
|
|
41
|
-
{ companyID } = props,
|
|
42
|
-
Details = getDetails(props.application, {
|
|
43
|
-
...data,
|
|
44
|
-
companyID,
|
|
45
|
-
}),
|
|
46
|
-
toSend = {
|
|
47
|
-
CompanyID: companyID,
|
|
48
|
-
Details,
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return addPaymentRequest(toSend).
|
|
52
|
-
then((response : any) => {
|
|
53
|
-
if (response.Error === "") {
|
|
54
|
-
setInfo(Immutable.Map({
|
|
55
|
-
envKey : response.EnvKey,
|
|
56
|
-
data : response.Data,
|
|
57
|
-
show3rdServiceForm : true,
|
|
58
|
-
}));
|
|
59
|
-
}
|
|
60
|
-
}).
|
|
61
|
-
catch(() => {
|
|
62
|
-
// eslint-disable-next-line no-alert
|
|
63
|
-
throw new ImmutableFormError("Ceva nu a mers cum trebuia");
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
{ children, companyID } = props;
|
|
68
|
-
|
|
69
|
-
if (info.get("show3rdServiceForm")) {
|
|
70
|
-
return (
|
|
71
|
-
<MobilPayForm
|
|
72
|
-
data={info.get("data") as string}
|
|
73
|
-
envKey={info.get("envKey") as string}
|
|
74
|
-
/>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if (children === null) {
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return (
|
|
83
|
-
React.cloneElement(children, {
|
|
84
|
-
companyID,
|
|
85
|
-
createPayment,
|
|
86
|
-
payUsingBankTransfer,
|
|
87
|
-
})
|
|
88
|
-
);
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
export default Payment;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { createModal } from "../../utility";
|
|
4
|
-
|
|
5
|
-
export const paymentPayUsingBankTransferModalAction = (
|
|
6
|
-
(application : string, options : any) : any => (
|
|
7
|
-
createModal("PAYMENT_BANK_TRANSFER", {
|
|
8
|
-
application,
|
|
9
|
-
options,
|
|
10
|
-
})
|
|
11
|
-
)
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
export const paymentShowBankTransferDoneAction = () : any => (
|
|
15
|
-
createModal("PAYMENT_WAS_DONE")
|
|
16
|
-
);
|
|
17
|
-
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-shadow */
|
|
2
|
-
|
|
3
|
-
/** Payment types for all sidework ecosystem */
|
|
4
|
-
export enum SIDEWORK_APPLICATION {
|
|
5
|
-
/**
|
|
6
|
-
* ApplicationCodeSMSAlert
|
|
7
|
-
* Example: smsalert-1000-3
|
|
8
|
-
* - credits: number of credits (e.g., 1000)
|
|
9
|
-
* - companyID: ID of the company (e.g., 3)
|
|
10
|
-
*/
|
|
11
|
-
SMS_ALERT = "smsalert",
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* ApplicationCodeInvoiceService
|
|
15
|
-
* Example: facturare-2-76
|
|
16
|
-
* - months: number of months (e.g., 2)
|
|
17
|
-
* - companyID: ID of the company (e.g., 76)
|
|
18
|
-
*/
|
|
19
|
-
INVOICES_SUBSCRIPTION = "facturare",
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* ApplicationCodeAutoService
|
|
23
|
-
* Example: auto-2-76
|
|
24
|
-
* - months: number of months (e.g., 2)
|
|
25
|
-
* - companyID: ID of the company (e.g., 76)
|
|
26
|
-
*/
|
|
27
|
-
SIDENOTE_SUBSCRIPTION = "auto",
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// Usage example
|
|
31
|
-
export default SIDEWORK_APPLICATION;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import agent from "superagent";
|
|
4
|
-
|
|
5
|
-
const normalizePayment = (resolve : any, reject : any) => (
|
|
6
|
-
(error : any, response : any) => {
|
|
7
|
-
|
|
8
|
-
if (error) {
|
|
9
|
-
reject({ error });
|
|
10
|
-
} else {
|
|
11
|
-
const { body } = response,
|
|
12
|
-
{ Error } = body;
|
|
13
|
-
|
|
14
|
-
if (typeof Error !== "undefined" && Error !== "") {
|
|
15
|
-
reject({
|
|
16
|
-
error: Error,
|
|
17
|
-
});
|
|
18
|
-
} else {
|
|
19
|
-
resolve({
|
|
20
|
-
...body,
|
|
21
|
-
Error,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
export const addPayment = (data : any) => (
|
|
29
|
-
new Promise((resolve, reject) => (
|
|
30
|
-
agent.
|
|
31
|
-
put("/api/settings/payments").
|
|
32
|
-
set("Accept",
|
|
33
|
-
"application/json").
|
|
34
|
-
send(data).
|
|
35
|
-
end(normalizePayment(resolve,
|
|
36
|
-
reject))
|
|
37
|
-
))
|
|
38
|
-
);
|
|
39
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export type PaymentOptions = {
|
|
4
|
-
reference: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export type PaymentBankTransferArgsTypes = any;
|
|
8
|
-
// Immutable.Map({
|
|
9
|
-
// Credits,
|
|
10
|
-
// companyID,
|
|
11
|
-
// amount,
|
|
12
|
-
// }),
|
|
13
|
-
|
|
14
|
-
export type PaymentPayUsingBankTransferType = (application: string, options: PaymentBankTransferArgsTypes) => void;
|
|
15
|
-
|
|
16
|
-
export type PaymentBankTransferConfirmForm = {
|
|
17
|
-
Details: string;
|
|
18
|
-
TransferNumber: string;
|
|
19
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export const
|
|
2
|
-
sideworkCompanyInfo = {
|
|
3
|
-
to : "S.C. SIDEWORK S.R.L.",
|
|
4
|
-
cif : "40375263",
|
|
5
|
-
regCom : "J52/21/2019",
|
|
6
|
-
address : "B-dul Republicii, Bl. B3, Ap. 19, Et. 2, Camera 1 & Camera 2, Bolintin Vale, Giurgiu",
|
|
7
|
-
|
|
8
|
-
bankName : "Banca Transilvania S.A.",
|
|
9
|
-
bankAccount : "RO27 BTRL RONC RT04 8269 9301",
|
|
10
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
type DataType = {
|
|
3
|
-
Credits: number;
|
|
4
|
-
Months: number;
|
|
5
|
-
companyID: number;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
import codes, { SIDEWORK_APPLICATION } from "../codes";
|
|
9
|
-
|
|
10
|
-
const getDetails = (application : SIDEWORK_APPLICATION, data : DataType) => {
|
|
11
|
-
|
|
12
|
-
const getParams = () => {
|
|
13
|
-
const { Credits, Months, companyID } = data;
|
|
14
|
-
|
|
15
|
-
switch (application) {
|
|
16
|
-
case codes.SMS_ALERT:
|
|
17
|
-
|
|
18
|
-
return [
|
|
19
|
-
Credits,
|
|
20
|
-
companyID,
|
|
21
|
-
];
|
|
22
|
-
|
|
23
|
-
case codes.SIDENOTE_SUBSCRIPTION:
|
|
24
|
-
case codes.INVOICES_SUBSCRIPTION:
|
|
25
|
-
return [
|
|
26
|
-
Months,
|
|
27
|
-
companyID,
|
|
28
|
-
];
|
|
29
|
-
|
|
30
|
-
default:
|
|
31
|
-
return [];
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
return `${application}-${getParams().join("-")}`;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export {
|
|
39
|
-
getDetails,
|
|
40
|
-
};
|
|
41
|
-
|
package/src/Payment/index.ts
DELETED
package/src/UI/Collapse.tsx
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-undefined */
|
|
2
|
-
import React, { useEffect, useRef, useState } from "react";
|
|
3
|
-
|
|
4
|
-
type CollapseProps = {
|
|
5
|
-
readonly open?: boolean;
|
|
6
|
-
readonly children: any;
|
|
7
|
-
readonly contentClassName: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const Collapse = ({ open, children, contentClassName } : CollapseProps) => {
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
contentContainerClassName = "collapsible-content-padding-edonec",
|
|
14
|
-
|
|
15
|
-
[visibleTimeout, setVisibleTimeout] = useState(0),
|
|
16
|
-
[overflow, setOverflow] = useState(open ? "hidden" : "visible"),
|
|
17
|
-
|
|
18
|
-
[isOpen, setIsOpen] = useState(open),
|
|
19
|
-
[height, setHeight] = useState<number | undefined>(open ? undefined : 0),
|
|
20
|
-
|
|
21
|
-
ref = useRef<HTMLDivElement>(null);
|
|
22
|
-
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
setIsOpen(open);
|
|
25
|
-
}, [open]);
|
|
26
|
-
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
if (!height || !isOpen || !ref.current) {
|
|
29
|
-
return undefined;
|
|
30
|
-
}
|
|
31
|
-
const resizeObserver = new ResizeObserver((element) => {
|
|
32
|
-
setHeight(element[0].contentRect.height);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
resizeObserver.observe(ref.current);
|
|
36
|
-
return () => {
|
|
37
|
-
resizeObserver.disconnect();
|
|
38
|
-
};
|
|
39
|
-
}, [height, isOpen]);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
clearTimeout(visibleTimeout);
|
|
44
|
-
|
|
45
|
-
const delay = 100;
|
|
46
|
-
|
|
47
|
-
setOverflow("hidden");
|
|
48
|
-
|
|
49
|
-
if (isOpen) {
|
|
50
|
-
setHeight(ref.current?.getBoundingClientRect().height);
|
|
51
|
-
} else {
|
|
52
|
-
setHeight(0);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const theTimeout : any = setTimeout(() => {
|
|
56
|
-
if (isOpen) {
|
|
57
|
-
setOverflow("visible");
|
|
58
|
-
}
|
|
59
|
-
}, delay);
|
|
60
|
-
|
|
61
|
-
setVisibleTimeout(theTimeout);
|
|
62
|
-
|
|
63
|
-
return () => {
|
|
64
|
-
clearTimeout(visibleTimeout);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
}, [isOpen]);
|
|
68
|
-
|
|
69
|
-
return (
|
|
70
|
-
<div
|
|
71
|
-
className={`collapsible-content-edonec ${contentClassName}`} style={{ height,
|
|
72
|
-
overflow }}>
|
|
73
|
-
<div className={contentContainerClassName} ref={ref}>
|
|
74
|
-
{children}
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
);
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export default Collapse;
|
package/src/UI/LoadImages.tsx
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect } from "react";
|
|
2
|
-
|
|
3
|
-
import { ErrorMessage, LoadingMessage } from "../Messages";
|
|
4
|
-
|
|
5
|
-
type LoadImagesProps = {
|
|
6
|
-
readonly children: any;
|
|
7
|
-
readonly images: string[];
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const LoadImages = (props : LoadImagesProps) => {
|
|
11
|
-
const
|
|
12
|
-
[loaded, setLoaded] = useState(false),
|
|
13
|
-
[hasError, setHasError] = useState(false),
|
|
14
|
-
|
|
15
|
-
fetchAll = () => {
|
|
16
|
-
setHasError(false);
|
|
17
|
-
setLoaded(false);
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
loadImage = (image : any) => new Promise((resolve, reject) => {
|
|
21
|
-
const loadImg = new Image();
|
|
22
|
-
|
|
23
|
-
loadImg.src = image;
|
|
24
|
-
loadImg.onload = () => {
|
|
25
|
-
resolve(image);
|
|
26
|
-
};
|
|
27
|
-
loadImg.onerror = (err) => {
|
|
28
|
-
reject(err);
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
Promise.all(props.images.map((image) => loadImage(image))).
|
|
33
|
-
then(() => setLoaded(true)).
|
|
34
|
-
catch(() => () => {
|
|
35
|
-
setHasError(true);
|
|
36
|
-
setLoaded(false);
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
useEffect(() => {
|
|
41
|
-
fetchAll();
|
|
42
|
-
}, []);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (loaded) {
|
|
46
|
-
return props.children;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (hasError) {
|
|
50
|
-
return <ErrorMessage message="Problem loading" onRetry={fetchAll} />;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<LoadingMessage className="mt-5" />
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export default LoadImages;
|
package/src/UI/NewFeature.tsx
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
type NewFeatureProps = {
|
|
4
|
-
readonly message?: string;
|
|
5
|
-
readonly description?: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const NewFeature = (props : NewFeatureProps) => (
|
|
9
|
-
<span className="mx-1">
|
|
10
|
-
<span className="badge rounded-pill text-bg-warning">
|
|
11
|
-
{props.message ?props.message : "Nou"}
|
|
12
|
-
</span>
|
|
13
|
-
{
|
|
14
|
-
props.description ? (
|
|
15
|
-
<span className="text-muted ms-1 small">
|
|
16
|
-
{props.description}
|
|
17
|
-
</span>
|
|
18
|
-
) : null
|
|
19
|
-
}
|
|
20
|
-
</span>
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
export default NewFeature;
|