intelicoreact 1.3.21 → 1.3.23
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/dist/Atomic/FormElements/ActionAlert/ActionAlert.js +17 -28
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.scss +9 -9
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +19 -30
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.scss +8 -10
- package/dist/Atomic/FormElements/Calendar/Calendar.js +87 -144
- package/dist/Atomic/FormElements/Calendar/Calendar.scss +23 -27
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +28 -37
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.scss +16 -19
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +23 -39
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.scss +2 -2
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +154 -290
- package/dist/Atomic/FormElements/Datepicker/Datepicker.scss +0 -8
- package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +55 -96
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +294 -464
- package/dist/Atomic/FormElements/Dropdown/Dropdown.scss +141 -95
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +6 -10
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.scss +3 -3
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +113 -183
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.scss +54 -18
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +41 -66
- package/dist/Atomic/FormElements/FileLoader/FileLoader.scss +31 -30
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +51 -132
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +36 -75
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +59 -80
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.scss +44 -29
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +81 -122
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +38 -88
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.scss +24 -21
- package/dist/Atomic/FormElements/Input/Input.js +185 -279
- package/dist/Atomic/FormElements/Input/Input.scss +18 -18
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +57 -111
- package/dist/Atomic/FormElements/InputColor/InputColor.js +31 -46
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +37 -67
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.scss +9 -6
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +135 -203
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.scss +95 -95
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +36 -61
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +232 -350
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +95 -167
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +15 -20
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +94 -211
- package/dist/Atomic/FormElements/InputLink/InputLink.js +42 -68
- package/dist/Atomic/FormElements/InputLink/InputLink.scss +5 -5
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +10 -14
- package/dist/Atomic/FormElements/InputMask/InputMask.js +598 -1009
- package/dist/Atomic/FormElements/InputMask/InputMask.scss +10 -10
- package/dist/Atomic/FormElements/InputMask/config.js +9 -9
- package/dist/Atomic/FormElements/InputMask/functions.js +23 -48
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +296 -432
- package/dist/Atomic/FormElements/InputMask2/InputMask2.scss +13 -12
- package/dist/Atomic/FormElements/InputMask2/config.js +9 -9
- package/dist/Atomic/FormElements/InputMask2/functions.js +23 -48
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +333 -493
- package/dist/Atomic/FormElements/InputMask3/InputMask3.scss +13 -12
- package/dist/Atomic/FormElements/InputMask3/config.js +9 -9
- package/dist/Atomic/FormElements/InputMask3/functions.js +23 -48
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +53 -115
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.scss +34 -31
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +77 -131
- package/dist/Atomic/FormElements/InputsRow/InputsRow.scss +4 -5
- package/dist/Atomic/FormElements/Label/Label.js +14 -24
- package/dist/Atomic/FormElements/Label/Label.scss +2 -2
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +227 -359
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.scss +8 -9
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +26 -48
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.scss +2 -2
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +149 -223
- package/dist/Atomic/FormElements/NumericInput/NumericInput.scss +18 -18
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +31 -63
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.scss +1 -0
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +25 -47
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.scss +1 -0
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +22 -33
- package/dist/Atomic/FormElements/RadioInput/RadioInput.scss +4 -8
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +21 -44
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.scss +26 -25
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +68 -115
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.scss +17 -19
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +71 -114
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.scss +5 -5
- package/dist/Atomic/FormElements/RangeList/RangeList.js +102 -163
- package/dist/Atomic/FormElements/RangeList/RangeList.scss +23 -23
- package/dist/Atomic/FormElements/RangeList/partial/AnyOuterClass.scss +5 -4
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +23 -29
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +153 -318
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.scss +19 -24
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.stories.scss +7 -7
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider.stories.scss +8 -8
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +395 -585
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.scss +165 -91
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +14 -24
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.scss +2 -2
- package/dist/Atomic/FormElements/Switcher/Switcher.js +24 -29
- package/dist/Atomic/FormElements/Switcher/Switcher.scss +10 -12
- package/dist/Atomic/FormElements/Switcher/partial/AnyOuterClass.scss +2 -2
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +26 -50
- package/dist/Atomic/FormElements/SwitcherCheckbox/partial/AnyOuterClass.scss +2 -2
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +20 -32
- package/dist/Atomic/FormElements/SwitcherHide/partial/AnyOuterClass.scss +2 -2
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +33 -56
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.scss +1 -1
- package/dist/Atomic/FormElements/SwitcherRadio/partial/AnyOuterClass.scss +2 -2
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +25 -45
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +24 -34
- package/dist/Atomic/FormElements/SwitcherRangeList/partial/AnyOuterClass.scss +6 -6
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +56 -125
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.scss +2 -3
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/AnyOuterClass.scss +2 -2
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +102 -103
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +23 -46
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.scss +2 -3
- package/dist/Atomic/FormElements/SwitcherTextarea/partial/AnyOuterClass.scss +4 -4
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +299 -453
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.scss +103 -64
- package/dist/Atomic/FormElements/Text/Text.js +50 -56
- package/dist/Atomic/FormElements/Text/Text.scss +0 -1
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +21 -31
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.scss +15 -15
- package/dist/Atomic/FormElements/Textarea/Textarea.js +16 -27
- package/dist/Atomic/FormElements/Textarea/Textarea.scss +7 -8
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +69 -129
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.scss +5 -6
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +25 -36
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +39 -76
- package/dist/Atomic/FormElements/TimeRange/TimeRange.scss +1 -1
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +82 -149
- package/dist/Atomic/FormElements/UserContacts/partial/AnyOuterClass.scss +5 -6
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +48 -80
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.scss +77 -59
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +32 -42
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +42 -62
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.scss +9 -10
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/AnyOuterClass.scss +16 -14
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +20 -21
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +54 -73
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.scss +9 -10
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/AnyOuterClass.scss +16 -14
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +17 -17
- package/dist/Atomic/Layout/Header/Header.js +26 -53
- package/dist/Atomic/Layout/Header/Header.scss +9 -10
- package/dist/Atomic/Layout/MainMenu/MainMenu.js +48 -92
- package/dist/Atomic/Layout/MainMenu/MainMenu.scss +14 -17
- package/dist/Atomic/Layout/Spinner/Spinner.js +11 -17
- package/dist/Atomic/Layout/Spinner/Spinner.scss +3 -3
- package/dist/Atomic/UI/Accordion/Accordion.js +23 -53
- package/dist/Atomic/UI/Accordion/Accordion.scss +11 -11
- package/dist/Atomic/UI/Accordion/AccordionItem.js +45 -70
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +63 -121
- package/dist/Atomic/UI/AccordionTable/AccordionTable.scss +33 -38
- package/dist/Atomic/UI/AccordionText/AccordionText.js +15 -39
- package/dist/Atomic/UI/AccordionText/AccordionText.scss +18 -10
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +67 -114
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +26 -54
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.scss +19 -18
- package/dist/Atomic/UI/Alert/Alert.js +24 -48
- package/dist/Atomic/UI/Alert/Alert.scss +21 -21
- package/dist/Atomic/UI/Arrow/Arrow.js +19 -39
- package/dist/Atomic/UI/Box/Box.js +24 -31
- package/dist/Atomic/UI/Box/Box.scss +2 -4
- package/dist/Atomic/UI/Button/Button.js +29 -38
- package/dist/Atomic/UI/Button/Button.scss +34 -34
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +24 -33
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.scss +1 -1
- package/dist/Atomic/UI/Chart/Chart.js +55 -96
- package/dist/Atomic/UI/Chart/Chart.scss +4 -4
- package/dist/Atomic/UI/Chart/partial/AnyOuterClass.scss +10 -14
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +37 -47
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +15 -24
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.scss +1 -1
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +80 -125
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +173 -155
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +28 -44
- package/dist/Atomic/UI/Chart/partial/utils.js +22 -50
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +31 -51
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.scss +7 -9
- package/dist/Atomic/UI/DateTime/DateTime.js +26 -41
- package/dist/Atomic/UI/DateTime/DateTime.scss +1 -1
- package/dist/Atomic/UI/DateTime/partial/AnyOuterClass.scss +2 -2
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +15 -39
- package/dist/Atomic/UI/DebugContainer/DebugContainer.scss +15 -9
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +5 -21
- package/dist/Atomic/UI/DoubleString/DoubleString.js +29 -52
- package/dist/Atomic/UI/DoubleString/DoubleString.scss +11 -5
- package/dist/Atomic/UI/DoubleString/partial/AnyOuterClass.scss +4 -4
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +15 -63
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +99 -194
- package/dist/Atomic/UI/ExampleChartIntegration/partial/AnyOuterClass.scss +10 -15
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +57 -120
- package/dist/Atomic/UI/Hint/Hint.js +74 -120
- package/dist/Atomic/UI/Hint/Hint.scss +12 -11
- package/dist/Atomic/UI/Modal/Modal.js +152 -190
- package/dist/Atomic/UI/Modal/Modal.scss +42 -43
- package/dist/Atomic/UI/Modal/ModalHOC.js +14 -26
- package/dist/Atomic/UI/Modal/ModalMobile.scss +18 -11
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +8 -13
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +20 -24
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +102 -164
- package/dist/Atomic/UI/ModalBackup/Modal.js +65 -90
- package/dist/Atomic/UI/ModalBackup/ModalHOC.js +12 -21
- package/dist/Atomic/UI/ModalBackup/partials/ModalFooter.js +6 -11
- package/dist/Atomic/UI/ModalBackup/partials/ModalTitle.js +15 -19
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +32 -62
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.scss +5 -5
- package/dist/Atomic/UI/MonoAccordion/partial/AnyOuterClass.scss +4 -5
- package/dist/Atomic/UI/NavLine/NavLine.js +140 -231
- package/dist/Atomic/UI/NavLine/NavLine.scss +34 -36
- package/dist/Atomic/UI/NavLine/Tabs.js +40 -41
- package/dist/Atomic/UI/PageTitle/PageTitle.js +13 -17
- package/dist/Atomic/UI/PageTitle/PageTitle.scss +7 -7
- package/dist/Atomic/UI/PieChart/PieChart.js +14 -24
- package/dist/Atomic/UI/PieChart/PieChart.scss +21 -10
- package/dist/Atomic/UI/Price/Price.js +12 -15
- package/dist/Atomic/UI/PriceRange/PriceRange.js +9 -13
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +29 -58
- package/dist/Atomic/UI/ProgressLine/ProgressLine.scss +36 -40
- package/dist/Atomic/UI/Status/Status.js +24 -35
- package/dist/Atomic/UI/Status/Status.scss +19 -19
- package/dist/Atomic/UI/Table/Partials/TdCell.js +38 -81
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +9 -18
- package/dist/Atomic/UI/Table/Partials/TdRow.js +34 -70
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +17 -41
- package/dist/Atomic/UI/Table/Table.js +27 -47
- package/dist/Atomic/UI/Table/Table.scss +11 -13
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +23 -53
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +11 -21
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +6 -11
- package/dist/Atomic/UI/Table/TdTypes/TdTypes.scss +9 -8
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +30 -55
- package/dist/Atomic/UI/Tag/Tag.js +24 -52
- package/dist/Atomic/UI/Tag/Tag.scss +12 -11
- package/dist/Atomic/UI/TagList/TagList.js +83 -153
- package/dist/Atomic/UI/TagList/TagList.scss +1 -1
- package/dist/Atomic/UI/UserBox/UserBox.js +17 -29
- package/dist/Atomic/UI/UserBox/UserBox.scss +9 -9
- package/dist/Classes/AbortableFetch.js +283 -422
- package/dist/Classes/AnimatedHandler.js +44 -56
- package/dist/Classes/RESTAPI/index.js +154 -433
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +290 -428
- package/dist/Classes/RESTAPI/partials/ApiBase.js +26 -69
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +57 -275
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +146 -377
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +173 -421
- package/dist/Classes/RESTAPI/partials/Utils.js +81 -135
- package/dist/Classes/RESTAPI/partials/_outerDependencies.js +2 -6
- package/dist/Classes/RESTAPI/partials/_utils.js +101 -395
- package/dist/Constants/index.constants.js +15 -22
- package/dist/Functions/Portal.js +14 -33
- package/dist/Functions/customEventListener.js +9 -24
- package/dist/Functions/fieldValueFormatters.js +181 -260
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +75 -137
- package/dist/Functions/locale/createTranslator.js +14 -39
- package/dist/Functions/operations.js +44 -58
- package/dist/Functions/presets/inputMaskPresets.js +59 -61
- package/dist/Functions/presets/inputPresets.js +21 -24
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +9 -11
- package/dist/Functions/schemas.js +14 -23
- package/dist/Functions/useBodyScrollLock.js +20 -0
- package/dist/Functions/useClickOutside.js +5 -9
- package/dist/Functions/useDebounce.js +11 -25
- package/dist/Functions/useFieldFocus.js +42 -71
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +35 -54
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +78 -99
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +55 -91
- package/dist/Functions/useFormTools/functions/General.js +82 -101
- package/dist/Functions/useFormTools/functions/RenderFields.js +49 -76
- package/dist/Functions/useFormTools/functions/usePrevious.js +3 -7
- package/dist/Functions/useFormTools/index.js +386 -604
- package/dist/Functions/useInputHighlightError.js +27 -52
- package/dist/Functions/useIsMobile.js +13 -36
- package/dist/Functions/useKeyPress/useHandleKeyPress.js +44 -0
- package/dist/Functions/useKeyPress/useKeyPress.js +38 -0
- package/dist/Functions/useLocalStorage.js +9 -35
- package/dist/Functions/useLocationParams.js +16 -27
- package/dist/Functions/useMetaInfo.js +23 -54
- package/dist/Functions/useMouseUpOutside.js +4 -7
- package/dist/Functions/useOnlineStatus.js +12 -40
- package/dist/Functions/usePasswordChecker.js +56 -91
- package/dist/Functions/usePrevious.js +3 -19
- package/dist/Functions/useResize.js +15 -53
- package/dist/Functions/useScrollTo.js +7 -21
- package/dist/Functions/useToggle.js +10 -30
- package/dist/Functions/utils.js +199 -458
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +21 -32
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +21 -32
- package/dist/Molecular/CustomIcons/components/AppStore.js +25 -36
- package/dist/Molecular/CustomIcons/components/Arrow.js +31 -42
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +13 -24
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +16 -27
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +16 -27
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +13 -24
- package/dist/Molecular/CustomIcons/components/Bell.js +11 -22
- package/dist/Molecular/CustomIcons/components/Button.js +11 -22
- package/dist/Molecular/CustomIcons/components/Campaigns.js +12 -23
- package/dist/Molecular/CustomIcons/components/Check.js +12 -23
- package/dist/Molecular/CustomIcons/components/Check2.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +26 -37
- package/dist/Molecular/CustomIcons/components/Close.js +13 -24
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +38 -49
- package/dist/Molecular/CustomIcons/components/Delete.js +12 -23
- package/dist/Molecular/CustomIcons/components/Edit.js +11 -22
- package/dist/Molecular/CustomIcons/components/Email.js +29 -40
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +19 -30
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +27 -38
- package/dist/Molecular/CustomIcons/components/Flows.js +11 -22
- package/dist/Molecular/CustomIcons/components/Gift.js +16 -27
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +25 -36
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +25 -36
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +14 -25
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +15 -26
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +14 -25
- package/dist/Molecular/CustomIcons/components/Home.js +14 -25
- package/dist/Molecular/CustomIcons/components/Home2.js +17 -28
- package/dist/Molecular/CustomIcons/components/Key.js +19 -30
- package/dist/Molecular/CustomIcons/components/Landers.js +15 -26
- package/dist/Molecular/CustomIcons/components/Lock.js +11 -22
- package/dist/Molecular/CustomIcons/components/Mail.js +19 -30
- package/dist/Molecular/CustomIcons/components/Mastercard.js +61 -72
- package/dist/Molecular/CustomIcons/components/Minus.js +24 -35
- package/dist/Molecular/CustomIcons/components/Offers.js +12 -23
- package/dist/Molecular/CustomIcons/components/Pause.js +24 -35
- package/dist/Molecular/CustomIcons/components/PayPal.js +38 -49
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +25 -36
- package/dist/Molecular/CustomIcons/components/Phone.js +26 -37
- package/dist/Molecular/CustomIcons/components/Play.js +24 -35
- package/dist/Molecular/CustomIcons/components/Plus.js +24 -35
- package/dist/Molecular/CustomIcons/components/Profile.js +16 -27
- package/dist/Molecular/CustomIcons/components/QRCode.js +26 -37
- package/dist/Molecular/CustomIcons/components/Rectangle.js +11 -22
- package/dist/Molecular/CustomIcons/components/Revert.js +14 -25
- package/dist/Molecular/CustomIcons/components/Star.js +10 -21
- package/dist/Molecular/CustomIcons/components/Star2.js +12 -23
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +14 -25
- package/dist/Molecular/CustomIcons/components/Trash.js +11 -22
- package/dist/Molecular/CustomIcons/components/TrashRed.js +11 -22
- package/dist/Molecular/CustomIcons/components/Triggers.js +11 -22
- package/dist/Molecular/CustomIcons/components/User.js +16 -27
- package/dist/Molecular/CustomIcons/components/Visa.js +27 -38
- package/dist/Molecular/CustomIcons/components/X.js +11 -22
- package/dist/Molecular/CustomIcons/index.js +61 -183
- package/dist/Molecular/FormElement/FormElement.js +18 -27
- package/dist/Molecular/FormElement/FormElement.scss +4 -3
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +99 -116
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +35 -34
- package/dist/Molecular/InputAddress/InputAddress.js +207 -342
- package/dist/Molecular/InputAddress/InputAddress.scss +176 -112
- package/dist/Molecular/InputPassword/InputPassword.js +22 -50
- package/dist/Molecular/InputPassword/InputPassword.scss +8 -7
- package/dist/index.js +1 -3
- package/dist/scss/_fonts.scss +60 -36
- package/dist/scss/_vars.scss +18 -18
- package/dist/scss/main.scss +4 -4
- package/package.json +1 -1
- package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +0 -91
|
@@ -1,178 +1,112 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
4
|
Object.defineProperty(exports, "__esModule", {
|
|
8
5
|
value: true
|
|
9
6
|
});
|
|
10
7
|
exports.default = void 0;
|
|
11
|
-
|
|
12
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
-
|
|
16
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
|
-
|
|
18
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
-
|
|
20
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
|
-
|
|
22
11
|
var _reactFeather = require("react-feather");
|
|
23
|
-
|
|
24
12
|
var _index = require("../../../Constants/index.constants");
|
|
25
|
-
|
|
26
13
|
var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
|
|
27
|
-
|
|
14
|
+
var _utils = require("../../../Functions/utils");
|
|
28
15
|
var _Spinner = _interopRequireDefault(require("../../Layout/Spinner/Spinner"));
|
|
29
|
-
|
|
30
16
|
require("./NumericInput.scss");
|
|
31
|
-
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
} : _ref$onlyNumbers,
|
|
88
|
-
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
89
|
-
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
|
|
90
|
-
var DEFAULT_BLINK_TIME = 200; //REFS
|
|
91
|
-
|
|
92
|
-
var inputRef = (0, _react.useRef)(null);
|
|
93
|
-
var decRef = (0, _react.useRef)(null);
|
|
94
|
-
var incRef = (0, _react.useRef)(null);
|
|
95
|
-
var wrapRef = (0, _react.useRef)(null); // STATES
|
|
96
|
-
|
|
97
|
-
var initialMin = isAllowNullValue ? '' : min;
|
|
98
|
-
|
|
99
|
-
var _useState = (0, _react.useState)(value || initialMin),
|
|
100
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
101
|
-
inputValue = _useState2[0],
|
|
102
|
-
setInputValue = _useState2[1];
|
|
103
|
-
|
|
104
|
-
var _useState3 = (0, _react.useState)(inputValue),
|
|
105
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
106
|
-
inputValueFormated = _useState4[0],
|
|
107
|
-
setInputValueFormated = _useState4[1];
|
|
108
|
-
|
|
109
|
-
var _useState5 = (0, _react.useState)(0),
|
|
110
|
-
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
111
|
-
intMemoVal = _useState6[0],
|
|
112
|
-
setIntMemoVal = _useState6[1];
|
|
113
|
-
|
|
114
|
-
var _useState7 = (0, _react.useState)(false),
|
|
115
|
-
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
116
|
-
isFocused = _useState8[0],
|
|
117
|
-
setIsFocused = _useState8[1];
|
|
118
|
-
|
|
119
|
-
var _useState9 = (0, _react.useState)(false),
|
|
120
|
-
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
121
|
-
isAttemptToChange = _useState10[0],
|
|
122
|
-
setIsAttemptToChange = _useState10[1];
|
|
123
|
-
|
|
124
|
-
var _useState11 = (0, _react.useState)(false),
|
|
125
|
-
_useState12 = (0, _slicedToArray2.default)(_useState11, 2),
|
|
126
|
-
isToHighlightError = _useState12[0],
|
|
127
|
-
setIsToHighlightError = _useState12[1];
|
|
128
|
-
|
|
129
|
-
var _useState13 = (0, _react.useState)(value || initialMin),
|
|
130
|
-
_useState14 = (0, _slicedToArray2.default)(_useState13, 2),
|
|
131
|
-
prevValue = _useState14[0],
|
|
132
|
-
setPreviousValue = _useState14[1];
|
|
133
|
-
|
|
134
|
-
var setCursorToEnd = function setCursorToEnd() {
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
+
const NumericInput = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
disabled,
|
|
22
|
+
withDelete,
|
|
23
|
+
numStep = 1,
|
|
24
|
+
min = 0,
|
|
25
|
+
max,
|
|
26
|
+
value,
|
|
27
|
+
placeholder,
|
|
28
|
+
className,
|
|
29
|
+
testId,
|
|
30
|
+
name,
|
|
31
|
+
fieldKey,
|
|
32
|
+
id,
|
|
33
|
+
onChange = () => {},
|
|
34
|
+
onBlur = () => {},
|
|
35
|
+
onFocus = () => {},
|
|
36
|
+
onKeyUp = () => {},
|
|
37
|
+
onKeyDown = () => {},
|
|
38
|
+
maskChar,
|
|
39
|
+
formatChars,
|
|
40
|
+
error,
|
|
41
|
+
icon,
|
|
42
|
+
isNotBlinkErrors,
|
|
43
|
+
blinkTime,
|
|
44
|
+
isPriceInput,
|
|
45
|
+
isFocusDefault = false,
|
|
46
|
+
isNotRenderButtons = false,
|
|
47
|
+
isUseAutoSelect = true,
|
|
48
|
+
isLoading = false,
|
|
49
|
+
isAllowNullValue = false,
|
|
50
|
+
onlyNumbers = {
|
|
51
|
+
type: "int"
|
|
52
|
+
},
|
|
53
|
+
attributesOfNativeInput = {}
|
|
54
|
+
} = _ref;
|
|
55
|
+
const DEFAULT_BLINK_TIME = 200;
|
|
56
|
+
|
|
57
|
+
//REFS
|
|
58
|
+
const inputRef = (0, _react.useRef)(null);
|
|
59
|
+
const decRef = (0, _react.useRef)(null);
|
|
60
|
+
const incRef = (0, _react.useRef)(null);
|
|
61
|
+
const wrapRef = (0, _react.useRef)(null);
|
|
62
|
+
|
|
63
|
+
// STATES
|
|
64
|
+
const initialMin = isAllowNullValue ? "" : min;
|
|
65
|
+
const [inputValue, setInputValue] = (0, _react.useState)(value || initialMin);
|
|
66
|
+
const [inputValueFormated, setInputValueFormated] = (0, _react.useState)(inputValue);
|
|
67
|
+
const [intMemoVal, setIntMemoVal] = (0, _react.useState)(0);
|
|
68
|
+
const [isFocused, setIsFocused] = (0, _react.useState)(false);
|
|
69
|
+
const [isAttemptToChange, setIsAttemptToChange] = (0, _react.useState)(false);
|
|
70
|
+
const [isToHighlightError, setIsToHighlightError] = (0, _react.useState)(false);
|
|
71
|
+
const [prevValue, setPreviousValue] = (0, _react.useState)(value || initialMin);
|
|
72
|
+
const setCursorToEnd = () => {
|
|
135
73
|
var _input$value;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
var handle = {
|
|
146
|
-
change: function change(e) {
|
|
147
|
-
var inputValue = e.target ? (0, _fieldValueFormatters.filterNumeric)(e.target.value, onlyNumbers) : (0, _fieldValueFormatters.filterNumeric)(e, onlyNumbers);
|
|
74
|
+
const input = inputRef.current;
|
|
75
|
+
const cursor = input === null || input === void 0 || (_input$value = input.value) === null || _input$value === void 0 ? void 0 : _input$value.length;
|
|
76
|
+
if (input) setTimeout(() => input.setSelectionRange(cursor, cursor), 10);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// HANDLES
|
|
80
|
+
const handle = {
|
|
81
|
+
change: e => {
|
|
82
|
+
const inputValue = e.target ? (0, _fieldValueFormatters.filterNumeric)(e.target.value, onlyNumbers) : (0, _fieldValueFormatters.filterNumeric)(e, onlyNumbers);
|
|
148
83
|
setInputValue(inputValue.toString());
|
|
149
84
|
},
|
|
150
|
-
clear:
|
|
151
|
-
handle.change(initialMin ||
|
|
85
|
+
clear: () => {
|
|
86
|
+
handle.change(initialMin || "");
|
|
152
87
|
},
|
|
153
|
-
focus:
|
|
88
|
+
focus: e => {
|
|
154
89
|
setIsFocused(true);
|
|
155
90
|
if (onFocus) onFocus(e);
|
|
156
91
|
},
|
|
157
|
-
blur:
|
|
92
|
+
blur: e => {
|
|
158
93
|
setIsFocused(false);
|
|
159
94
|
if (Number.isNaN(inputValue) || inputValue < min) setInputValue(initialMin);
|
|
160
|
-
if (max &&
|
|
95
|
+
if (max && Number(max) < inputValue) setInputValue(max);
|
|
161
96
|
if (onBlur) onBlur(e);
|
|
162
97
|
},
|
|
163
|
-
keyDown:
|
|
98
|
+
keyDown: e => {
|
|
164
99
|
var _e$target;
|
|
165
|
-
|
|
166
|
-
setPreviousValue(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
|
|
100
|
+
setPreviousValue(e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
|
|
167
101
|
onKeyDown(e.keyCode, e);
|
|
168
102
|
},
|
|
169
|
-
keyUp:
|
|
103
|
+
keyUp: e => {
|
|
170
104
|
if (!isNotBlinkErrors) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
105
|
+
const changedValue = String(value !== null && value !== void 0 ? value : "");
|
|
106
|
+
const previousValue = String(prevValue);
|
|
107
|
+
const short = previousValue.length <= changedValue.length ? previousValue : changedValue;
|
|
108
|
+
const long = previousValue.length > changedValue.length ? previousValue : changedValue;
|
|
109
|
+
const infoAboutDifferencesSameness = short.split("").reduce((acc, symbol, idx) => {
|
|
176
110
|
if (acc.countOn && symbol === long[idx]) acc.same.push(symbol);else {
|
|
177
111
|
acc.countOn = false;
|
|
178
112
|
acc.differences.push([idx, symbol]);
|
|
@@ -183,117 +117,112 @@ var NumericInput = function NumericInput(_ref) {
|
|
|
183
117
|
countOn: true,
|
|
184
118
|
differences: []
|
|
185
119
|
});
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
120
|
+
const samePart = infoAboutDifferencesSameness.same.join("");
|
|
121
|
+
const differencesLength = infoAboutDifferencesSameness.differences.length;
|
|
122
|
+
const currentSet = changedValue === null || changedValue === void 0 ? void 0 : changedValue.replace(samePart, "");
|
|
189
123
|
if (!_index.KEYBOARD_SERVICE_KEYS.includes(e.key) && changedValue === previousValue) setIsAttemptToChange(!(!differencesLength && e.key === currentSet));
|
|
190
124
|
}
|
|
191
|
-
|
|
192
125
|
if (onKeyUp) onKeyUp(e.keyCode, e.target.value);
|
|
193
126
|
},
|
|
194
|
-
decrement:
|
|
195
|
-
|
|
127
|
+
decrement: e => {
|
|
128
|
+
let newValue = Number(intMemoVal) - Number(numStep);
|
|
196
129
|
if (newValue < min) newValue = min;else if (newValue > max) newValue = max;
|
|
197
130
|
handle.change(newValue);
|
|
198
|
-
setTimeout(
|
|
131
|
+
setTimeout(() => {
|
|
199
132
|
var _inputRef$current;
|
|
200
|
-
|
|
201
|
-
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
133
|
+
inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();
|
|
202
134
|
setCursorToEnd();
|
|
203
135
|
}, 100);
|
|
204
136
|
},
|
|
205
|
-
increment:
|
|
206
|
-
|
|
137
|
+
increment: e => {
|
|
138
|
+
let newValue = Number(intMemoVal) + Number(numStep);
|
|
207
139
|
if (newValue < min) newValue = min;else if (newValue > max) newValue = max;
|
|
208
140
|
handle.change(newValue);
|
|
209
|
-
setTimeout(
|
|
141
|
+
setTimeout(() => {
|
|
210
142
|
var _inputRef$current2;
|
|
211
|
-
|
|
212
|
-
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
|
|
143
|
+
inputRef === null || inputRef === void 0 || (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.focus();
|
|
213
144
|
setCursorToEnd();
|
|
214
145
|
}, 100);
|
|
215
146
|
}
|
|
216
|
-
};
|
|
147
|
+
};
|
|
217
148
|
|
|
218
|
-
|
|
219
|
-
|
|
149
|
+
//Check Outside Click
|
|
150
|
+
(0, _react.useEffect)(() => {
|
|
151
|
+
const handleClickOutside = event => {
|
|
220
152
|
if (!wrapRef.current.contains(event.target)) setIsFocused(false);
|
|
221
153
|
};
|
|
222
|
-
|
|
223
|
-
document.
|
|
224
|
-
return function () {
|
|
225
|
-
return document.removeEventListener('mousedown', handleClickOutside, true);
|
|
226
|
-
};
|
|
154
|
+
document.addEventListener("mousedown", handleClickOutside, true);
|
|
155
|
+
return () => document.removeEventListener("mousedown", handleClickOutside, true);
|
|
227
156
|
}, []);
|
|
228
|
-
(0, _react.useEffect)(
|
|
157
|
+
(0, _react.useEffect)(() => {
|
|
229
158
|
if (!isNotBlinkErrors && isAttemptToChange) {
|
|
230
159
|
setIsAttemptToChange(false);
|
|
231
160
|
setIsToHighlightError(true);
|
|
232
|
-
setTimeout(
|
|
161
|
+
setTimeout(() => {
|
|
233
162
|
setIsToHighlightError(false);
|
|
234
163
|
}, blinkTime || DEFAULT_BLINK_TIME);
|
|
235
164
|
}
|
|
236
165
|
}, [isAttemptToChange]);
|
|
237
|
-
(0, _react.useEffect)(
|
|
166
|
+
(0, _react.useEffect)(() => {
|
|
238
167
|
if (value && value !== inputValue) setInputValue(value);
|
|
239
|
-
}, [value]);
|
|
168
|
+
}, [value]);
|
|
240
169
|
|
|
241
|
-
|
|
170
|
+
//On Input Value Change
|
|
171
|
+
(0, _react.useEffect)(() => {
|
|
242
172
|
if (inputValue !== value) setIsFocused(true);
|
|
243
173
|
setInputValueFormated(isPriceInput && (inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) > 0 ? isFocused ? (0, _fieldValueFormatters.formatToRemoveComa)(inputValue) : (0, _fieldValueFormatters.formatToAddBitDepthPoints)(inputValue) : inputValue);
|
|
244
174
|
setIntMemoVal((0, _fieldValueFormatters.formatToRemoveComa)(inputValue));
|
|
245
|
-
if (typeof onChange ===
|
|
246
|
-
}, [inputValue]);
|
|
175
|
+
if (typeof onChange === "function") onChange(inputValue === null || inputValue === void 0 ? void 0 : inputValue.toString());
|
|
176
|
+
}, [inputValue]);
|
|
247
177
|
|
|
248
|
-
|
|
178
|
+
//On Integer Value Change
|
|
179
|
+
(0, _react.useEffect)(() => {
|
|
249
180
|
if (isNaN(intMemoVal)) setIntMemoVal(min || 0);
|
|
250
|
-
}, [intMemoVal]);
|
|
181
|
+
}, [intMemoVal]);
|
|
251
182
|
|
|
252
|
-
|
|
253
|
-
|
|
183
|
+
//On Focuse Change
|
|
184
|
+
(0, _react.useEffect)(() => {
|
|
185
|
+
let formatedValue = inputValue;
|
|
254
186
|
if (isPriceInput) formatedValue = isFocused ? (0, _fieldValueFormatters.formatToRemoveComa)(inputValue) : (0, _fieldValueFormatters.formatToAddBitDepthPoints)(inputValue);
|
|
255
187
|
setInputValueFormated(formatedValue);
|
|
256
|
-
|
|
257
188
|
if (isFocused) {
|
|
258
189
|
var _inputRef$current3;
|
|
259
|
-
|
|
260
|
-
if (typeof onFocus === 'function') onFocus({
|
|
190
|
+
if (typeof onFocus === "function") onFocus({
|
|
261
191
|
target: inputRef === null || inputRef === void 0 ? void 0 : inputRef.current
|
|
262
192
|
});
|
|
263
|
-
inputRef === null || inputRef === void 0
|
|
193
|
+
inputRef === null || inputRef === void 0 || (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || _inputRef$current3.focus();
|
|
264
194
|
} else {
|
|
265
195
|
var _inputRef$current4;
|
|
266
|
-
|
|
267
|
-
if (typeof onBlur === 'function') onBlur({
|
|
196
|
+
if (typeof onBlur === "function") onBlur({
|
|
268
197
|
target: inputRef === null || inputRef === void 0 ? void 0 : inputRef.current
|
|
269
198
|
});
|
|
270
|
-
inputRef === null || inputRef === void 0
|
|
199
|
+
inputRef === null || inputRef === void 0 || (_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 || _inputRef$current4.blur();
|
|
271
200
|
}
|
|
272
201
|
}, [isFocused]);
|
|
273
|
-
(0, _react.useEffect)(
|
|
274
|
-
if (inputRef !== null && inputRef !== void 0 && inputRef.current && typeof isFocusDefault ===
|
|
202
|
+
(0, _react.useEffect)(() => {
|
|
203
|
+
if (inputRef !== null && inputRef !== void 0 && inputRef.current && typeof isFocusDefault === "boolean") setIsFocused(isFocusDefault);
|
|
275
204
|
}, [inputRef, isFocusDefault]);
|
|
276
|
-
|
|
277
205
|
function renderInput() {
|
|
278
|
-
|
|
279
|
-
name: name || fieldKey || id || testId ||
|
|
280
|
-
className: "input ".concat(className ||
|
|
281
|
-
placeholder
|
|
206
|
+
const uniProps = {
|
|
207
|
+
name: name || fieldKey || id || testId || "",
|
|
208
|
+
className: "input ".concat(className || ""),
|
|
209
|
+
placeholder,
|
|
282
210
|
value: inputValueFormated,
|
|
283
|
-
disabled
|
|
211
|
+
disabled,
|
|
284
212
|
onChange: handle.change,
|
|
285
213
|
onFocus: handle.focus,
|
|
286
214
|
onBlur: handle.blur,
|
|
287
215
|
onKeyDown: handle.keyDown,
|
|
288
216
|
onKeyUp: handle.keyUp,
|
|
289
|
-
min
|
|
290
|
-
max
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
formatChars
|
|
295
|
-
|
|
296
|
-
|
|
217
|
+
min,
|
|
218
|
+
max,
|
|
219
|
+
...(maskChar ? {
|
|
220
|
+
maskChar
|
|
221
|
+
} : {}),
|
|
222
|
+
...(formatChars ? {
|
|
223
|
+
formatChars
|
|
224
|
+
} : {})
|
|
225
|
+
};
|
|
297
226
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({}, uniProps, {
|
|
298
227
|
"data-testid": "input-".concat((0, _utils.getCorrectTestId)({
|
|
299
228
|
testId: testId || name || fieldKey || id
|
|
@@ -301,55 +230,52 @@ var NumericInput = function NumericInput(_ref) {
|
|
|
301
230
|
value: (value === null || value === void 0 ? void 0 : value.length) > 0 ? (0, _fieldValueFormatters.formatToAddBitDepthPoints)((0, _fieldValueFormatters.formatToRemoveComa)(value)) : value,
|
|
302
231
|
ref: inputRef,
|
|
303
232
|
type: "text",
|
|
304
|
-
onFocus: function
|
|
233
|
+
onFocus: function () {
|
|
305
234
|
if (isUseAutoSelect) inputRef.current.select();
|
|
306
|
-
if (uniProps.onFocus) uniProps.onFocus
|
|
235
|
+
if (uniProps.onFocus) uniProps.onFocus(...arguments);
|
|
307
236
|
}
|
|
308
237
|
}, attributesOfNativeInput)), !isNotRenderButtons ? /*#__PURE__*/_react.default.createElement("div", {
|
|
309
238
|
className: "input__nums"
|
|
310
239
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
311
240
|
"data-testid": "input--button--".concat(testId, "--minus"),
|
|
312
241
|
ref: decRef,
|
|
313
|
-
className: (0, _classnames.default)(
|
|
314
|
-
|
|
242
|
+
className: (0, _classnames.default)("input__num-btn", {
|
|
243
|
+
"events-none": Number(value) <= min
|
|
315
244
|
}),
|
|
316
|
-
onMouseDown:
|
|
317
|
-
return handle.decrement(e);
|
|
318
|
-
}
|
|
245
|
+
onMouseDown: e => handle.decrement(e)
|
|
319
246
|
}, /*#__PURE__*/_react.default.createElement(_reactFeather.Minus, {
|
|
320
247
|
className: (0, _classnames.default)({
|
|
321
|
-
disabled:
|
|
248
|
+
disabled: Number(value) <= min
|
|
322
249
|
})
|
|
323
250
|
})), /*#__PURE__*/_react.default.createElement("button", {
|
|
324
251
|
"data-testid": "input--button--".concat(testId, "--plus"),
|
|
325
252
|
ref: incRef,
|
|
326
|
-
className: (0, _classnames.default)(
|
|
327
|
-
|
|
253
|
+
className: (0, _classnames.default)("input__num-btn", {
|
|
254
|
+
"events-none": Number(value) >= max
|
|
328
255
|
}),
|
|
329
|
-
onMouseDown:
|
|
330
|
-
return handle.increment(e);
|
|
331
|
-
}
|
|
256
|
+
onMouseDown: e => handle.increment(e)
|
|
332
257
|
}, /*#__PURE__*/_react.default.createElement(_reactFeather.Plus, {
|
|
333
258
|
className: (0, _classnames.default)({
|
|
334
|
-
disabled:
|
|
259
|
+
disabled: Number(value) >= max
|
|
335
260
|
})
|
|
336
261
|
}))) : null);
|
|
337
262
|
}
|
|
338
|
-
|
|
339
263
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
340
264
|
ref: wrapRef,
|
|
341
|
-
className: (0, _classnames.default)("input__wrap",
|
|
265
|
+
className: (0, _classnames.default)("input__wrap", {
|
|
266
|
+
["input__wrap_focus"]: isFocused
|
|
267
|
+
}, {
|
|
268
|
+
["input__wrap_error"]: error || isToHighlightError
|
|
269
|
+
}, {
|
|
270
|
+
["input__wrap--disabled"]: disabled || isLoading
|
|
271
|
+
})
|
|
342
272
|
}, renderInput(), icon, withDelete && /*#__PURE__*/_react.default.createElement("span", {
|
|
343
273
|
className: (0, _classnames.default)("input__close", {
|
|
344
274
|
hidden: !inputValue
|
|
345
275
|
}),
|
|
346
|
-
onClick:
|
|
347
|
-
return handle.clear();
|
|
348
|
-
}
|
|
276
|
+
onClick: () => handle.clear()
|
|
349
277
|
}), isLoading && /*#__PURE__*/_react.default.createElement(_Spinner.default, {
|
|
350
278
|
size: "small"
|
|
351
279
|
}));
|
|
352
280
|
};
|
|
353
|
-
|
|
354
|
-
var _default = NumericInput;
|
|
355
|
-
exports.default = _default;
|
|
281
|
+
var _default = exports.default = NumericInput;
|
|
@@ -16,18 +16,19 @@
|
|
|
16
16
|
|
|
17
17
|
&__wrap {
|
|
18
18
|
position: relative;
|
|
19
|
+
|
|
19
20
|
display: flex;
|
|
20
21
|
align-items: center;
|
|
21
22
|
|
|
22
23
|
box-sizing: border-box;
|
|
23
24
|
height: 28px;
|
|
24
25
|
|
|
25
|
-
border: 1px solid #
|
|
26
|
+
border: 1px solid #e2e5ec;
|
|
26
27
|
border-radius: 4px;
|
|
27
|
-
background-color: #
|
|
28
|
+
background-color: #fff;
|
|
28
29
|
|
|
29
30
|
&_focus {
|
|
30
|
-
border-color: #
|
|
31
|
+
border-color: #6b81dd;
|
|
31
32
|
filter: drop-shadow(0 0 4px rgb(93 120 255 / 50%));
|
|
32
33
|
}
|
|
33
34
|
|
|
@@ -35,12 +36,12 @@
|
|
|
35
36
|
pointer-events: none;
|
|
36
37
|
|
|
37
38
|
opacity: 0.5;
|
|
38
|
-
border-color: #
|
|
39
|
-
background: #
|
|
39
|
+
border-color: #a6acb1;
|
|
40
|
+
background: #f7f8fa;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
&_error {
|
|
43
|
-
border-color: #
|
|
44
|
+
border-color: #f06d8d;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
.lds-ring.lds-ring_small {
|
|
@@ -52,12 +53,12 @@
|
|
|
52
53
|
pointer-events: none;
|
|
53
54
|
|
|
54
55
|
opacity: 0.5;
|
|
55
|
-
border-color: #
|
|
56
|
-
background: #
|
|
56
|
+
border-color: #a6acb1;
|
|
57
|
+
background: #f7f8fa;
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
&_error {
|
|
60
|
-
border-color: #
|
|
61
|
+
border-color: #f06d8d;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
svg {
|
|
@@ -70,12 +71,12 @@
|
|
|
70
71
|
height: 100%;
|
|
71
72
|
padding: 0 5px;
|
|
72
73
|
|
|
73
|
-
color: #1E1E2D;
|
|
74
|
-
border: none;
|
|
75
|
-
border-radius: 4px;
|
|
76
|
-
|
|
77
74
|
font-size: 13px;
|
|
78
75
|
font-weight: 400;
|
|
76
|
+
|
|
77
|
+
color: #1e1e2d;
|
|
78
|
+
border: none;
|
|
79
|
+
border-radius: 4px;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
&__close {
|
|
@@ -110,7 +111,7 @@
|
|
|
110
111
|
|
|
111
112
|
content: "";
|
|
112
113
|
|
|
113
|
-
background-color: #
|
|
114
|
+
background-color: #9aa0b9;
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
&::before {
|
|
@@ -131,20 +132,19 @@
|
|
|
131
132
|
|
|
132
133
|
&__num-btn {
|
|
133
134
|
display: flex;
|
|
134
|
-
align-items: center;
|
|
135
135
|
justify-content: center;
|
|
136
|
+
align-items: center;
|
|
136
137
|
|
|
137
138
|
width: 24px;
|
|
138
139
|
height: 100%;
|
|
139
140
|
|
|
141
|
+
font-size: 20px;
|
|
140
142
|
cursor: pointer;
|
|
141
143
|
user-select: none;
|
|
142
144
|
|
|
143
|
-
border-left: 1px solid #
|
|
145
|
+
border-left: 1px solid #e2e5ec;
|
|
144
146
|
background: none;
|
|
145
147
|
|
|
146
|
-
font-size: 20px;
|
|
147
|
-
|
|
148
148
|
&.disabled {
|
|
149
149
|
opacity: 0.3;
|
|
150
150
|
}
|