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,104 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-len */
|
|
2
|
-
import React, { useState } from "react";
|
|
3
|
-
|
|
4
|
-
type TypeInputPropTypes = {
|
|
5
|
-
readonly autoComplete?: string;
|
|
6
|
-
readonly autoFocus?: boolean;
|
|
7
|
-
readonly className?: string;
|
|
8
|
-
readonly delay?: number;
|
|
9
|
-
readonly id?: string;
|
|
10
|
-
readonly inputRef?: React.RefObject<HTMLInputElement>;
|
|
11
|
-
readonly name?: string;
|
|
12
|
-
readonly placeholder?: string;
|
|
13
|
-
readonly tabIndex?: number;
|
|
14
|
-
readonly value: any;
|
|
15
|
-
readonly change: (event: any) => void;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const delay = 700;
|
|
19
|
-
|
|
20
|
-
export const
|
|
21
|
-
DelayInputChange = (props : TypeInputPropTypes) => {
|
|
22
|
-
const
|
|
23
|
-
[timeoutValue, setTimeoutValue] = useState(0 as any),
|
|
24
|
-
[isWaiting, setIsWaiting] = useState(false),
|
|
25
|
-
[value, setValue] = useState(props.value),
|
|
26
|
-
|
|
27
|
-
stopWaiting = (newValue: string) => {
|
|
28
|
-
clearTimeout(timeoutValue);
|
|
29
|
-
|
|
30
|
-
setIsWaiting(false);
|
|
31
|
-
setValue(newValue);
|
|
32
|
-
|
|
33
|
-
props.change({
|
|
34
|
-
target: {
|
|
35
|
-
value: newValue,
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
},
|
|
39
|
-
handleKeyPressed = (event: any) => {
|
|
40
|
-
if (event.key === "Enter") {
|
|
41
|
-
stopWaiting(value);
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
delayChange = ({ target: { value : newValue } } : any) => {
|
|
45
|
-
clearTimeout(timeoutValue);
|
|
46
|
-
|
|
47
|
-
if (value === "") {
|
|
48
|
-
stopWaiting(newValue);
|
|
49
|
-
} else {
|
|
50
|
-
setIsWaiting(true);
|
|
51
|
-
setValue(newValue);
|
|
52
|
-
|
|
53
|
-
const newTimeout = setTimeout(() => {
|
|
54
|
-
setIsWaiting(false);
|
|
55
|
-
props.change({
|
|
56
|
-
target: {
|
|
57
|
-
value: newValue,
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
}, props.delay || delay);
|
|
61
|
-
|
|
62
|
-
setTimeoutValue(newTimeout);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
React.useEffect(() => {
|
|
67
|
-
if (props.value !== value) {
|
|
68
|
-
setValue(props.value);
|
|
69
|
-
}
|
|
70
|
-
}, [props.value]);
|
|
71
|
-
|
|
72
|
-
return (
|
|
73
|
-
<div className="delay-input">
|
|
74
|
-
<input
|
|
75
|
-
autoComplete={props.autoComplete}
|
|
76
|
-
autoFocus={props.autoFocus}
|
|
77
|
-
className={props.className}
|
|
78
|
-
id={props.id}
|
|
79
|
-
name={props.name}
|
|
80
|
-
onChange={delayChange}
|
|
81
|
-
onKeyPress={handleKeyPressed}
|
|
82
|
-
placeholder={props.placeholder}
|
|
83
|
-
ref={props.inputRef}
|
|
84
|
-
tabIndex={props.tabIndex}
|
|
85
|
-
value={value}
|
|
86
|
-
/>
|
|
87
|
-
{isWaiting ? <div className="spinner-border spinner-border-sm text-primary d-inline-block" /> : (
|
|
88
|
-
value === "" ? null : (
|
|
89
|
-
<i
|
|
90
|
-
className={`fa fa-times cursor-pointer
|
|
91
|
-
text-primary clear-value d-inline-block`}
|
|
92
|
-
onClick={() => {
|
|
93
|
-
props.change({
|
|
94
|
-
target: {
|
|
95
|
-
value: "",
|
|
96
|
-
},
|
|
97
|
-
});
|
|
98
|
-
}} />
|
|
99
|
-
)
|
|
100
|
-
)}
|
|
101
|
-
</div>
|
|
102
|
-
);
|
|
103
|
-
};
|
|
104
|
-
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import classnames from "classnames";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { MetaProps } from "src/types";
|
|
6
|
-
|
|
7
|
-
type InputTemplatePropTypes = {
|
|
8
|
-
readonly autoComplete?: string;
|
|
9
|
-
readonly autoFocus?: boolean;
|
|
10
|
-
readonly disabled?: boolean;
|
|
11
|
-
readonly divClass?: string;
|
|
12
|
-
readonly input: any;
|
|
13
|
-
readonly inputClass?: string;
|
|
14
|
-
readonly label: string;
|
|
15
|
-
readonly left?: string;
|
|
16
|
-
readonly meta: MetaProps;
|
|
17
|
-
readonly placeholder: string;
|
|
18
|
-
readonly right?: string;
|
|
19
|
-
readonly tabIndex?: string;
|
|
20
|
-
readonly theType?: "input" | "password";
|
|
21
|
-
readonly inputRef?: (callback: (node: any) => void) => void;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const OldInputTemplate = (props: InputTemplatePropTypes) => {
|
|
25
|
-
const
|
|
26
|
-
{
|
|
27
|
-
input = {}, theType, label, inputRef, autoFocus, inputClass, divClass,
|
|
28
|
-
placeholder, left, tabIndex, right, autoComplete, disabled,
|
|
29
|
-
meta: { submitting, touched, error } = {},
|
|
30
|
-
} = props,
|
|
31
|
-
warningClass = `${touched && error ? " is-invalid" : ""}`,
|
|
32
|
-
customClass = `${inputClass ? ` ${inputClass}` : ""}`,
|
|
33
|
-
classForInput = `form-control ${warningClass}${customClass}`,
|
|
34
|
-
classForDiv = `form-group row mt-md-2 ${divClass ? divClass : ""}`;
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<div className={classnames(`${classForDiv} d-flex`, {
|
|
38
|
-
"is-invalid": touched && error,
|
|
39
|
-
})}>
|
|
40
|
-
<label
|
|
41
|
-
className={`${left ? left : "col-md-4 text-md-end"} form-control-label align-self-center`}
|
|
42
|
-
htmlFor={input.name}>
|
|
43
|
-
{label}
|
|
44
|
-
</label>
|
|
45
|
-
<div className={`${right ? right : "col-md-8"} align-self-center`}>
|
|
46
|
-
<input
|
|
47
|
-
{...input}
|
|
48
|
-
aria-label={label}
|
|
49
|
-
autoComplete={autoComplete}
|
|
50
|
-
autoFocus={autoFocus}
|
|
51
|
-
className={classForInput}
|
|
52
|
-
disabled={submitting || disabled}
|
|
53
|
-
id={input.name} placeholder={placeholder}
|
|
54
|
-
ref={inputRef ? inputRef : null}
|
|
55
|
-
tabIndex={tabIndex}
|
|
56
|
-
type={theType}
|
|
57
|
-
/>
|
|
58
|
-
<div className="invalid-feedback">
|
|
59
|
-
{touched && error ? (
|
|
60
|
-
<span>
|
|
61
|
-
{error}
|
|
62
|
-
</span>
|
|
63
|
-
) : null}
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
);
|
|
68
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { MetaProps } from "src/types";
|
|
4
|
-
|
|
5
|
-
type LabelTemplatePropTypes = {
|
|
6
|
-
readonly input: any;
|
|
7
|
-
readonly label: string;
|
|
8
|
-
readonly tabIndex?: string;
|
|
9
|
-
readonly offset?: string;
|
|
10
|
-
readonly meta: MetaProps;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const OldLabelTemplate = (props: LabelTemplatePropTypes) => {
|
|
14
|
-
const {
|
|
15
|
-
input = {}, tabIndex, label, offset, meta: { submitting, touched, error } = {},
|
|
16
|
-
} = props;
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<div className="container">
|
|
20
|
-
<div className="form-group mt-md-2 row mb-1">
|
|
21
|
-
<div className={`${offset || ""} col custom-control custom-checkbox`}>
|
|
22
|
-
<input
|
|
23
|
-
{...input}
|
|
24
|
-
aria-label={label}
|
|
25
|
-
className="custom-control-input"
|
|
26
|
-
disabled={submitting}
|
|
27
|
-
id={input.name}
|
|
28
|
-
tabIndex={tabIndex}
|
|
29
|
-
type="checkbox" />
|
|
30
|
-
<label
|
|
31
|
-
className="custom-control-label"
|
|
32
|
-
htmlFor={input.name}>
|
|
33
|
-
{label}
|
|
34
|
-
</label>
|
|
35
|
-
<div className="invalid-feedback">
|
|
36
|
-
{touched && error ? (
|
|
37
|
-
<span>
|
|
38
|
-
{error}
|
|
39
|
-
</span>
|
|
40
|
-
) : null}
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
);
|
|
46
|
-
};
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import classnames from "classnames";
|
|
5
|
-
import React from "react";
|
|
6
|
-
import { formatZeroValue } from "../utility";
|
|
7
|
-
import { clearFloatOnBlur, floatToEnglishComma, getFloatValueToStore, isFloat } from "./common";
|
|
8
|
-
|
|
9
|
-
type NumericPropTypes = {
|
|
10
|
-
readonly autoFocus?: boolean;
|
|
11
|
-
readonly currency?: boolean;
|
|
12
|
-
readonly customClass?: any;
|
|
13
|
-
readonly disabled?: boolean;
|
|
14
|
-
readonly input: any;
|
|
15
|
-
readonly label?: string;
|
|
16
|
-
readonly meta: any;
|
|
17
|
-
readonly onRegisterRef?: any;
|
|
18
|
-
readonly optional?: boolean;
|
|
19
|
-
readonly placeholder?: string;
|
|
20
|
-
readonly precision?: number;
|
|
21
|
-
readonly size?: number;
|
|
22
|
-
readonly tabIndex?: number;
|
|
23
|
-
readonly value?: string;
|
|
24
|
-
readonly form: any; readonly formatValue: (raw: any, optional?: boolean) => string;
|
|
25
|
-
readonly normalizeValue: (raw: any) => any;
|
|
26
|
-
readonly onBlur?: () => void;
|
|
27
|
-
readonly onChange: (event: any) => void;
|
|
28
|
-
readonly onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
29
|
-
readonly onKeyDown?: (event: any) => void;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const
|
|
33
|
-
OldNumericInput = (props : NumericPropTypes) => {
|
|
34
|
-
const
|
|
35
|
-
{
|
|
36
|
-
precision = 2,
|
|
37
|
-
customClass, input, label, disabled, currency, tabIndex, onRegisterRef, formatValue = formatZeroValue,
|
|
38
|
-
size, placeholder, meta: { submitting, touched, error } = {},
|
|
39
|
-
} = props,
|
|
40
|
-
|
|
41
|
-
[value, setValue] = React.useState(input.value || ""),
|
|
42
|
-
|
|
43
|
-
noCurrency = (typeof currency === "undefined" || currency === false),
|
|
44
|
-
valueToShow = formatValue(value, props.optional),
|
|
45
|
-
|
|
46
|
-
updateValue = (targetValue : any) => {
|
|
47
|
-
setValue(targetValue);
|
|
48
|
-
|
|
49
|
-
let valueToStore = targetValue;
|
|
50
|
-
|
|
51
|
-
if (isFloat(floatToEnglishComma(targetValue))) {
|
|
52
|
-
valueToStore = getFloatValueToStore(targetValue);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
input.onChange(valueToStore);
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
handleBlur = ({ target: { value: targetValue } } : any) => {
|
|
59
|
-
const
|
|
60
|
-
newValue = clearFloatOnBlur(value, precision),
|
|
61
|
-
hasChanged = value !== newValue;
|
|
62
|
-
|
|
63
|
-
if (hasChanged) {
|
|
64
|
-
updateValue(newValue);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (typeof input.onBlur === "function") {
|
|
68
|
-
input.onBlur(targetValue);
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
handleChange = ({ target: { value: targetValue } }: any) => {
|
|
73
|
-
updateValue(targetValue);
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
handleFocus = (event : React.FocusEvent<HTMLInputElement>) => {
|
|
77
|
-
if (typeof input.onFocus === "function") {
|
|
78
|
-
input.onFocus(event);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if (typeof props.onFocus === "function") {
|
|
82
|
-
props.onFocus(event);
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
inputComponent = (
|
|
87
|
-
<input
|
|
88
|
-
aria-label={label}
|
|
89
|
-
autoFocus={props.autoFocus}
|
|
90
|
-
className={classnames(`form-control ${customClass || ""}`, {
|
|
91
|
-
"is-invalid": touched && error,
|
|
92
|
-
})}
|
|
93
|
-
disabled={submitting || disabled}
|
|
94
|
-
id={input.name}
|
|
95
|
-
inputMode="decimal"
|
|
96
|
-
maxLength={size}
|
|
97
|
-
onBlur={handleBlur}
|
|
98
|
-
onChange={handleChange}
|
|
99
|
-
onFocus={handleFocus}
|
|
100
|
-
onKeyDown={props.onKeyDown}
|
|
101
|
-
placeholder={placeholder || label}
|
|
102
|
-
ref={onRegisterRef}
|
|
103
|
-
tabIndex={tabIndex}
|
|
104
|
-
type="text"
|
|
105
|
-
value={valueToShow}
|
|
106
|
-
/>
|
|
107
|
-
);
|
|
108
|
-
|
|
109
|
-
React.useEffect(() => {
|
|
110
|
-
if (isFloat(input.value) || input.value === "") {
|
|
111
|
-
updateValue(input.value);
|
|
112
|
-
}
|
|
113
|
-
}, [input.value]);
|
|
114
|
-
|
|
115
|
-
if (noCurrency) {
|
|
116
|
-
return inputComponent;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return (
|
|
120
|
-
<div className="input-group">
|
|
121
|
-
{inputComponent}
|
|
122
|
-
<div className="input-group-append">
|
|
123
|
-
<span className="input-group-text">
|
|
124
|
-
{currency}
|
|
125
|
-
</span>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
);
|
|
129
|
-
};
|
|
130
|
-
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
type NumericPropTypes = {
|
|
3
|
-
readonly autoFocus?: boolean;
|
|
4
|
-
readonly customClass?: any;
|
|
5
|
-
readonly disabled?: boolean;
|
|
6
|
-
readonly divClass?: any;
|
|
7
|
-
readonly input: any;
|
|
8
|
-
readonly inputClass?: string;
|
|
9
|
-
readonly label?: string;
|
|
10
|
-
readonly left?: string;
|
|
11
|
-
readonly meta: MetaProps;
|
|
12
|
-
readonly onRegisterRef?: any;
|
|
13
|
-
readonly optional?: boolean;
|
|
14
|
-
readonly placeholder?: string;
|
|
15
|
-
readonly precision?: number;
|
|
16
|
-
readonly right?: string;
|
|
17
|
-
readonly size?: number;
|
|
18
|
-
readonly tabIndex?: number;
|
|
19
|
-
readonly type: string;
|
|
20
|
-
readonly value?: string;
|
|
21
|
-
readonly formatValue: (raw: any, optional?: boolean) => string;
|
|
22
|
-
readonly normalizeValue: (raw: string | null) => any;
|
|
23
|
-
readonly onBlur?: () => void;
|
|
24
|
-
readonly onChange?: (event: any) => void;
|
|
25
|
-
readonly onKeyDown?: (event: any) => void;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
import classnames from "classnames";
|
|
29
|
-
import React from "react";
|
|
30
|
-
import { formatZeroValue } from "../utility";
|
|
31
|
-
import { clearFloatOnBlur, floatToEnglishComma, getFloatValueToStore, isFloat } from "./common";
|
|
32
|
-
import { MetaProps } from "src/types";
|
|
33
|
-
|
|
34
|
-
export const
|
|
35
|
-
OldNumericTemplate = (props : NumericPropTypes) => {
|
|
36
|
-
const
|
|
37
|
-
{
|
|
38
|
-
precision = 2,
|
|
39
|
-
input = {}, right, tabIndex, divClass, label,
|
|
40
|
-
onRegisterRef,
|
|
41
|
-
meta: { submitting, touched, error } = {}, formatValue = formatZeroValue,
|
|
42
|
-
type, autoFocus, inputClass, placeholder, left, size, disabled,
|
|
43
|
-
} = props,
|
|
44
|
-
|
|
45
|
-
[value, setValue] = React.useState(props.input.value || ""),
|
|
46
|
-
|
|
47
|
-
valueToShow = formatValue(value, props.optional),
|
|
48
|
-
|
|
49
|
-
updateValue = (targetValue: any) => {
|
|
50
|
-
setValue(targetValue);
|
|
51
|
-
|
|
52
|
-
let valueToStore = targetValue;
|
|
53
|
-
|
|
54
|
-
if (isFloat(floatToEnglishComma(targetValue))) {
|
|
55
|
-
valueToStore = getFloatValueToStore(targetValue);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
input.onChange(valueToStore);
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
handleBlur = (event: any) => {
|
|
62
|
-
const
|
|
63
|
-
newValue = clearFloatOnBlur(value, precision),
|
|
64
|
-
hasChanged = value !== newValue;
|
|
65
|
-
|
|
66
|
-
if (hasChanged) {
|
|
67
|
-
updateValue(newValue);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
input.onBlur(event);
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
handleChange = ({ target: { value : targetValue } }: any) => {
|
|
74
|
-
updateValue(targetValue);
|
|
75
|
-
},
|
|
76
|
-
warningClass = `${touched && error ? " is-invalid" : ""}`,
|
|
77
|
-
customClass = `${inputClass ? ` ${inputClass}` : ""}`,
|
|
78
|
-
classForInput = `form-control ${warningClass}${customClass}`,
|
|
79
|
-
classForDiv = `form-group mt-md-2 row ${divClass ? divClass : ""}`;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
React.useEffect(() => {
|
|
83
|
-
if (isFloat(input.value) || input.value === "") {
|
|
84
|
-
updateValue(input.value);
|
|
85
|
-
}
|
|
86
|
-
}, [input.value]);
|
|
87
|
-
|
|
88
|
-
return (
|
|
89
|
-
<div className={classnames(`${classForDiv} d-flex`, {
|
|
90
|
-
"is-invalid": touched && error,
|
|
91
|
-
})}>
|
|
92
|
-
<label
|
|
93
|
-
className={`${left ? `${left} align-self-center` : "col-md-4 text-md-end"} form-control-label align-self-center`}
|
|
94
|
-
htmlFor={input.name}>
|
|
95
|
-
{label}
|
|
96
|
-
</label>
|
|
97
|
-
<div className={right ? `${right} align-self-center` : "col-md-8 align-self-center"}>
|
|
98
|
-
<input
|
|
99
|
-
aria-label={label}
|
|
100
|
-
autoFocus={autoFocus}
|
|
101
|
-
className={classForInput}
|
|
102
|
-
disabled={submitting || disabled}
|
|
103
|
-
id={input.name}
|
|
104
|
-
inputMode="decimal"
|
|
105
|
-
maxLength={size}
|
|
106
|
-
onBlur={handleBlur}
|
|
107
|
-
onChange={handleChange}
|
|
108
|
-
onKeyDown={props.onKeyDown}
|
|
109
|
-
placeholder={placeholder}
|
|
110
|
-
ref={onRegisterRef}
|
|
111
|
-
tabIndex={tabIndex}
|
|
112
|
-
type={type}
|
|
113
|
-
value={valueToShow}
|
|
114
|
-
/>
|
|
115
|
-
<div className="invalid-feedback">
|
|
116
|
-
{touched && error ? (
|
|
117
|
-
<span>
|
|
118
|
-
{error}
|
|
119
|
-
</span>
|
|
120
|
-
) : null}
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
</div>
|
|
124
|
-
);
|
|
125
|
-
};
|
|
126
|
-
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import React from "react";
|
|
3
|
-
import Simple from "./Simple";
|
|
4
|
-
import { MetaProps } from "src/types";
|
|
5
|
-
|
|
6
|
-
type SelectMonthPropTypes = {
|
|
7
|
-
readonly disabled: boolean;
|
|
8
|
-
readonly input: any;
|
|
9
|
-
readonly valueKey?: string;
|
|
10
|
-
readonly nameKey?: string;
|
|
11
|
-
readonly label?: string;
|
|
12
|
-
readonly isImmutable?: boolean;
|
|
13
|
-
readonly showEmptyOption?: boolean;
|
|
14
|
-
readonly tabIndex?: string;
|
|
15
|
-
readonly left?: string;
|
|
16
|
-
readonly inputClass?: string;
|
|
17
|
-
readonly right?: string;
|
|
18
|
-
readonly id?: string;
|
|
19
|
-
readonly data: any;
|
|
20
|
-
readonly meta: MetaProps;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const OldCustomSelect = (props: SelectMonthPropTypes) => {
|
|
24
|
-
const
|
|
25
|
-
{ input = {}, meta = {} as MetaProps, left, right, label, id } = props,
|
|
26
|
-
customID = `custom-select-${input.name}${id || ""}`;
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<div className="form-group row d-flex">
|
|
30
|
-
<label
|
|
31
|
-
className={`${left ? `${left} align-self-center` : "col-md-4 text-md-end"} form-control-label align-self-center`}
|
|
32
|
-
htmlFor={customID}>
|
|
33
|
-
{label}
|
|
34
|
-
</label>
|
|
35
|
-
<div className={right ? `${right} align-self-center` : "col-md-8 align-self-center"}>
|
|
36
|
-
<Simple {...props} />
|
|
37
|
-
<div className="invalid-feedback">
|
|
38
|
-
{meta.touched && meta.error ? (
|
|
39
|
-
<span>
|
|
40
|
-
{meta.error}
|
|
41
|
-
</span>
|
|
42
|
-
) : null}
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
);
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export default OldCustomSelect;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
type SelectMonthPropTypes = {
|
|
2
|
-
readonly disabled: boolean;
|
|
3
|
-
readonly input: any;
|
|
4
|
-
readonly autoFocus?: boolean;
|
|
5
|
-
readonly valueKey?: string;
|
|
6
|
-
readonly nameKey?: string;
|
|
7
|
-
readonly isImmutable?: boolean;
|
|
8
|
-
readonly showEmptyOption?: boolean;
|
|
9
|
-
readonly tabIndex?: string;
|
|
10
|
-
readonly inputClass?: string;
|
|
11
|
-
readonly id?: string;
|
|
12
|
-
readonly data: any;
|
|
13
|
-
readonly meta: MetaProps;
|
|
14
|
-
};
|
|
15
|
-
import classnames from "classnames";
|
|
16
|
-
import React from "react";
|
|
17
|
-
import { words } from "../../utility";
|
|
18
|
-
import { MetaProps } from "src/types";
|
|
19
|
-
|
|
20
|
-
const OldSimpleCustomSelect = (props: SelectMonthPropTypes) => {
|
|
21
|
-
const
|
|
22
|
-
{
|
|
23
|
-
autoFocus, isImmutable, showEmptyOption, valueKey = "value", nameKey = "name",
|
|
24
|
-
data, tabIndex, input = {}, id, inputClass, disabled,
|
|
25
|
-
meta : { touched, error, submitting } = {},
|
|
26
|
-
} = props,
|
|
27
|
-
theClasses = classnames(`custom-select ${inputClass || ""}`, {
|
|
28
|
-
"is-invalid": touched && error,
|
|
29
|
-
}),
|
|
30
|
-
customID = `custom-select-${input.name}${id || ""}`;
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<select
|
|
34
|
-
{...input}
|
|
35
|
-
autoFocus={autoFocus}
|
|
36
|
-
className={theClasses}
|
|
37
|
-
disabled={submitting || disabled}
|
|
38
|
-
id={customID}
|
|
39
|
-
tabIndex={tabIndex}>
|
|
40
|
-
{showEmptyOption ? <option value="">{words.Select}</option> : null}
|
|
41
|
-
{isImmutable ? data.map((current : any) => {
|
|
42
|
-
const
|
|
43
|
-
value = current.get(valueKey),
|
|
44
|
-
name = current.get(nameKey);
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<option key={value} value={value}>
|
|
48
|
-
{name}
|
|
49
|
-
</option>
|
|
50
|
-
);
|
|
51
|
-
}) : data.map(({
|
|
52
|
-
[valueKey]: value,
|
|
53
|
-
[nameKey]: name,
|
|
54
|
-
} : any) => (
|
|
55
|
-
<option key={value} value={value}>
|
|
56
|
-
{name}
|
|
57
|
-
</option>
|
|
58
|
-
))}
|
|
59
|
-
</select>
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export default OldSimpleCustomSelect;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Field } from "react-final-form";
|
|
3
|
-
import { normalize, words } from "../../";
|
|
4
|
-
import OldCustomSelect from "./Custom";
|
|
5
|
-
import OldSimpleCustomSelect from "./Simple";
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
{ normalizeSelectNumeric } = normalize,
|
|
9
|
-
{ years, months } = words,
|
|
10
|
-
SelectMonth = (props: any) => (
|
|
11
|
-
<Field
|
|
12
|
-
{...props}
|
|
13
|
-
component={props.simple ? OldSimpleCustomSelect : OldCustomSelect}
|
|
14
|
-
data={months} normalize={normalizeSelectNumeric}
|
|
15
|
-
/>
|
|
16
|
-
),
|
|
17
|
-
SelectYear = (props: any) => (
|
|
18
|
-
<Field
|
|
19
|
-
{...props}
|
|
20
|
-
component={props.simple ? OldSimpleCustomSelect : OldCustomSelect}
|
|
21
|
-
data={years}
|
|
22
|
-
normalize={normalizeSelectNumeric} />
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
export { OldCustomSelect as CustomSelect, SelectMonth, SelectYear, OldSimpleCustomSelect as SimpleCustomSelect };
|
|
26
|
-
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import classnames from "classnames";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { MetaProps } from "src/types";
|
|
5
|
-
|
|
6
|
-
export type SimpleInputPropTypes = {
|
|
7
|
-
readonly autoComplete?: string;
|
|
8
|
-
readonly autoFocus?: boolean;
|
|
9
|
-
readonly customClass?: any;
|
|
10
|
-
readonly disabled?: boolean;
|
|
11
|
-
readonly input: any;
|
|
12
|
-
readonly label?: string;
|
|
13
|
-
readonly meta: MetaProps;
|
|
14
|
-
readonly placeholder?: string;
|
|
15
|
-
readonly tabIndex?: string;
|
|
16
|
-
readonly theType?: "input" | "password";
|
|
17
|
-
readonly inputRef?: (callback: (node: any) => void) => void;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const OldSimpleInput = (props : SimpleInputPropTypes) => {
|
|
21
|
-
const {
|
|
22
|
-
customClass, input = {}, label, autoFocus, tabIndex, placeholder, theType, inputRef,
|
|
23
|
-
autoComplete, disabled,
|
|
24
|
-
meta: { submitting, touched, error } = {},
|
|
25
|
-
} = props;
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<input
|
|
29
|
-
{...input}
|
|
30
|
-
aria-label={label}
|
|
31
|
-
autoComplete={autoComplete}
|
|
32
|
-
autoFocus={autoFocus}
|
|
33
|
-
className={classnames(`form-control ${customClass || ""}`, {
|
|
34
|
-
"is-invalid": touched && error,
|
|
35
|
-
})} disabled={submitting || disabled}
|
|
36
|
-
id={input.name}
|
|
37
|
-
placeholder={placeholder || label}
|
|
38
|
-
ref={inputRef ? inputRef : null}
|
|
39
|
-
tabIndex={tabIndex}
|
|
40
|
-
type={theType} />
|
|
41
|
-
);
|
|
42
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { MetaProps } from "src/types";
|
|
4
|
-
|
|
5
|
-
type TextareaPropTypes = {
|
|
6
|
-
readonly autoFocus?: boolean;
|
|
7
|
-
readonly disabled?: boolean;
|
|
8
|
-
readonly input: any;
|
|
9
|
-
readonly inputClass?: string;
|
|
10
|
-
readonly label: string;
|
|
11
|
-
readonly meta: MetaProps;
|
|
12
|
-
readonly placeholder: string;
|
|
13
|
-
readonly rows?: string;
|
|
14
|
-
readonly tabIndex?: string;
|
|
15
|
-
readonly onRegisterRef?: (callback: (node: any) => void) => void;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const OldSimpleTextarea = (props: TextareaPropTypes) => {
|
|
19
|
-
const
|
|
20
|
-
{
|
|
21
|
-
disabled,
|
|
22
|
-
input = {}, label, onRegisterRef, autoFocus, inputClass, placeholder, tabIndex, rows,
|
|
23
|
-
meta: { submitting, touched, error } = {},
|
|
24
|
-
} = props,
|
|
25
|
-
warningClass = `${touched && error ? " is-invalid" : ""}`,
|
|
26
|
-
customClass = `${inputClass ? ` ${inputClass}` : ""}`,
|
|
27
|
-
classForInput = `form-control ${warningClass}${customClass}`;
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<textarea
|
|
31
|
-
{...input}
|
|
32
|
-
aria-label={label}
|
|
33
|
-
autoFocus={autoFocus}
|
|
34
|
-
className={classForInput}
|
|
35
|
-
disabled={disabled || submitting}
|
|
36
|
-
id={input.name}
|
|
37
|
-
placeholder={placeholder}
|
|
38
|
-
ref={onRegisterRef ? onRegisterRef : null}
|
|
39
|
-
rows={rows}
|
|
40
|
-
tabIndex={tabIndex}
|
|
41
|
-
/>
|
|
42
|
-
);
|
|
43
|
-
};
|