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,45 +1,25 @@
|
|
|
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
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
-
|
|
14
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
-
|
|
16
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
17
|
-
|
|
18
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
-
|
|
20
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
|
-
|
|
22
11
|
var _index = require("../../../Constants/index.constants");
|
|
23
|
-
|
|
24
12
|
var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
|
|
25
|
-
|
|
26
13
|
var _utils = require("../../../Functions/utils");
|
|
27
|
-
|
|
28
14
|
var _Spinner = _interopRequireDefault(require("../../Layout/Spinner/Spinner"));
|
|
29
|
-
|
|
30
|
-
require("./Input.scss");
|
|
31
|
-
|
|
32
15
|
var _DynamicIcon = _interopRequireDefault(require("../../UI/DynamicIcon/DynamicIcon"));
|
|
16
|
+
require("./Input.scss");
|
|
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
|
+
// import InputMask from 'react-input-mask';
|
|
33
20
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
|
-
|
|
38
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
39
|
-
|
|
40
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
|
+
const HIDE_SYMBOL = "\u2022";
|
|
41
22
|
|
|
42
|
-
var HIDE_SYMBOL = "\u2022";
|
|
43
23
|
/**
|
|
44
24
|
* Input компонент.
|
|
45
25
|
*
|
|
@@ -75,259 +55,195 @@ var HIDE_SYMBOL = "\u2022";
|
|
|
75
55
|
* @param {boolean} props.isNotValidateASCII - Отключает проверку ASCII для вводимых символов.
|
|
76
56
|
* @param {boolean} props.isNumericMobileKeyboard - Отображает цифровую клавиатуру на мобильных устройствах.
|
|
77
57
|
*/
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
_ref$isReadOnly = _ref.isReadOnly,
|
|
128
|
-
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
|
|
129
|
-
_ref$isLoading = _ref.isLoading,
|
|
130
|
-
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
131
|
-
name = _ref.name,
|
|
132
|
-
fieldKey = _ref.fieldKey,
|
|
133
|
-
id = _ref.id,
|
|
134
|
-
key = _ref.key,
|
|
135
|
-
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
136
|
-
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
|
|
137
|
-
|
|
138
|
-
var _ref2 = blurTrim || {},
|
|
139
|
-
trimStart = _ref2.trimStart,
|
|
140
|
-
trimEnd = _ref2.trimEnd,
|
|
141
|
-
characters = _ref2.characters;
|
|
142
|
-
|
|
143
|
-
var DynamicIconComponent = iconDynamicKey && !icon ? /*#__PURE__*/_react.default.createElement(_DynamicIcon.default, (0, _extends2.default)({
|
|
58
|
+
const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
59
|
+
let {
|
|
60
|
+
blurTrim,
|
|
61
|
+
autocomplete = "off",
|
|
62
|
+
isSelect,
|
|
63
|
+
onChange = () => {},
|
|
64
|
+
onBlur = () => {},
|
|
65
|
+
onFocus = () => {},
|
|
66
|
+
onKeyUp = () => {},
|
|
67
|
+
onKeyDown = () => {},
|
|
68
|
+
isNotBlinkErrors,
|
|
69
|
+
isPriceInput,
|
|
70
|
+
onlyNumbers,
|
|
71
|
+
disabled,
|
|
72
|
+
withDelete,
|
|
73
|
+
value,
|
|
74
|
+
placeholder,
|
|
75
|
+
className,
|
|
76
|
+
type = "text",
|
|
77
|
+
mask,
|
|
78
|
+
maskChar,
|
|
79
|
+
formatChars,
|
|
80
|
+
error,
|
|
81
|
+
icon,
|
|
82
|
+
iconDynamicKey,
|
|
83
|
+
iconDynamicProps = {},
|
|
84
|
+
symbolsLimit,
|
|
85
|
+
blinkTime,
|
|
86
|
+
isFocusDefault = false,
|
|
87
|
+
isNotValidateASCII = false,
|
|
88
|
+
isNumericMobileKeyboard = false,
|
|
89
|
+
isCropFirstNool = false,
|
|
90
|
+
testId = "input",
|
|
91
|
+
action,
|
|
92
|
+
isUseAutoSelect = true,
|
|
93
|
+
isReadOnly = false,
|
|
94
|
+
isLoading = false,
|
|
95
|
+
name,
|
|
96
|
+
fieldKey,
|
|
97
|
+
id,
|
|
98
|
+
key,
|
|
99
|
+
attributesOfNativeInput = {}
|
|
100
|
+
} = _ref;
|
|
101
|
+
const {
|
|
102
|
+
trimStart,
|
|
103
|
+
trimEnd,
|
|
104
|
+
characters
|
|
105
|
+
} = blurTrim || {};
|
|
106
|
+
const DynamicIconComponent = iconDynamicKey && !icon ? /*#__PURE__*/_react.default.createElement(_DynamicIcon.default, (0, _extends2.default)({
|
|
144
107
|
iconKey: iconDynamicKey
|
|
145
108
|
}, iconDynamicProps)) : null;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
var inputInnerRef = (0, _react.useRef)(null);
|
|
159
|
-
var inputRef = (0, _react.useMemo)(function () {
|
|
160
|
-
return ref || inputInnerRef;
|
|
161
|
-
}, [ref]); // const previousValueRef = useRef(value);
|
|
162
|
-
|
|
163
|
-
var _useState5 = (0, _react.useState)(false),
|
|
164
|
-
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
165
|
-
isAttemptToChange = _useState6[0],
|
|
166
|
-
setIsAttemptToChange = _useState6[1];
|
|
167
|
-
|
|
168
|
-
var _useState7 = (0, _react.useState)(false),
|
|
169
|
-
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
170
|
-
isToHighlightError = _useState8[0],
|
|
171
|
-
setIsToHighlightError = _useState8[1];
|
|
172
|
-
|
|
173
|
-
var _useState9 = (0, _react.useState)(false),
|
|
174
|
-
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
175
|
-
onInputHover = _useState10[0],
|
|
176
|
-
setOnInputHover = _useState10[1];
|
|
177
|
-
|
|
178
|
-
var _useState11 = (0, _react.useState)(value),
|
|
179
|
-
_useState12 = (0, _slicedToArray2.default)(_useState11, 2),
|
|
180
|
-
prevValue = _useState12[0],
|
|
181
|
-
setPreviousValue = _useState12[1];
|
|
182
|
-
|
|
183
|
-
var _useState13 = (0, _react.useState)({
|
|
109
|
+
const DEFAULT_BLINK_TIME = 100;
|
|
110
|
+
// STATES
|
|
111
|
+
const [isFocused, setIsFocused] = (0, _react.useState)(false);
|
|
112
|
+
const [isEditing, setEditing] = (0, _react.useState)(false);
|
|
113
|
+
const inputInnerRef = (0, _react.useRef)(null);
|
|
114
|
+
const inputRef = (0, _react.useMemo)(() => ref || inputInnerRef, [ref]);
|
|
115
|
+
// const previousValueRef = useRef(value);
|
|
116
|
+
const [isAttemptToChange, setIsAttemptToChange] = (0, _react.useState)(false);
|
|
117
|
+
const [isToHighlightError, setIsToHighlightError] = (0, _react.useState)(false);
|
|
118
|
+
const [onInputHover, setOnInputHover] = (0, _react.useState)(false);
|
|
119
|
+
const [prevValue, setPreviousValue] = (0, _react.useState)(value);
|
|
120
|
+
const [keyDownData, setKeyDownData] = (0, _react.useState)({
|
|
184
121
|
start: null,
|
|
185
122
|
end: null,
|
|
186
123
|
keyCode: null
|
|
187
|
-
})
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
var handle = {
|
|
198
|
-
correctMinMax: function correctMinMax(value, correctionType) {
|
|
124
|
+
});
|
|
125
|
+
const isUseBitDepthPoints = Boolean(onlyNumbers) && isPriceInput;
|
|
126
|
+
const isUseErrorsBlink = !isNotBlinkErrors && !mask;
|
|
127
|
+
const inputName = name || fieldKey || id || key;
|
|
128
|
+
const isPseudoPasswordMode = type === "pseudoPassword";
|
|
129
|
+
|
|
130
|
+
// HANDLES
|
|
131
|
+
const handle = {
|
|
132
|
+
correctMinMax: (value, correctionType) => {
|
|
199
133
|
if (!onlyNumbers) return value;
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
var checkMin = function checkMin() {
|
|
134
|
+
const {
|
|
135
|
+
min,
|
|
136
|
+
max,
|
|
137
|
+
isOnlyPositive,
|
|
138
|
+
isNoEmptyValues
|
|
139
|
+
} = (0, _utils.getIsOnlyAnObject)(onlyNumbers) ? onlyNumbers : {};
|
|
140
|
+
const minimum = !Number.isNaN(Number(min)) && min !== null && (min >= 0 || !isOnlyPositive) ? min : undefined;
|
|
141
|
+
const maximum = !Number.isNaN(Number(max)) && max !== null && (max >= 0 || !isOnlyPositive) ? max : undefined;
|
|
142
|
+
let minusSymbol;
|
|
143
|
+
let inputValue = (0, _fieldValueFormatters.getSafelyValue)(value);
|
|
144
|
+
const checkMin = () => {
|
|
213
145
|
var _minusSymbol;
|
|
214
|
-
|
|
215
|
-
if (!inputValue && isNoEmptyValues) inputValue = minimum !== undefined ? minimum : '0';else if (inputValue && !Number.isNaN(+minimum) && +minimum > +(((_minusSymbol = minusSymbol) !== null && _minusSymbol !== void 0 ? _minusSymbol : '') + inputValue)) inputValue = minimum;
|
|
146
|
+
if (!inputValue && isNoEmptyValues) inputValue = minimum !== undefined ? minimum : "0";else if (inputValue && !Number.isNaN(Number(minimum)) && Number(minimum) > Number(((_minusSymbol = minusSymbol) !== null && _minusSymbol !== void 0 ? _minusSymbol : "") + inputValue)) inputValue = minimum;
|
|
216
147
|
};
|
|
217
|
-
|
|
218
|
-
var checkMax = function checkMax() {
|
|
148
|
+
const checkMax = () => {
|
|
219
149
|
var _minusSymbol2;
|
|
220
|
-
|
|
221
|
-
if (!Number.isNaN(+maximum) && +maximum < +(((_minusSymbol2 = minusSymbol) !== null && _minusSymbol2 !== void 0 ? _minusSymbol2 : '') + inputValue)) {
|
|
150
|
+
if (!Number.isNaN(Number(maximum)) && Number(maximum) < Number(((_minusSymbol2 = minusSymbol) !== null && _minusSymbol2 !== void 0 ? _minusSymbol2 : "") + inputValue)) {
|
|
222
151
|
inputValue = maximum;
|
|
223
152
|
minusSymbol = null;
|
|
224
153
|
}
|
|
225
154
|
};
|
|
226
|
-
|
|
227
155
|
if (isUseBitDepthPoints) inputValue = (0, _fieldValueFormatters.formatToRemoveComa)(inputValue);
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
minusSymbol = '-';
|
|
156
|
+
if (!isOnlyPositive && inputValue[0] === "-") {
|
|
157
|
+
minusSymbol = "-";
|
|
231
158
|
inputValue = inputValue.slice(1);
|
|
232
159
|
}
|
|
233
|
-
|
|
234
160
|
inputValue = (0, _fieldValueFormatters.filterNumeric)(inputValue, onlyNumbers);
|
|
235
|
-
|
|
236
161
|
switch (correctionType) {
|
|
237
|
-
case
|
|
162
|
+
case "min":
|
|
238
163
|
checkMin();
|
|
239
164
|
break;
|
|
240
|
-
|
|
241
|
-
case 'max':
|
|
165
|
+
case "max":
|
|
242
166
|
checkMax();
|
|
243
167
|
break;
|
|
244
|
-
|
|
245
168
|
default:
|
|
246
169
|
checkMin();
|
|
247
170
|
checkMax();
|
|
248
171
|
break;
|
|
249
172
|
}
|
|
250
|
-
|
|
251
173
|
return inputValue;
|
|
252
174
|
},
|
|
253
|
-
processPseudoValue:
|
|
254
|
-
|
|
255
|
-
//? По договоренности любой копипаст заменяет текущее велью
|
|
175
|
+
processPseudoValue: (newValue, oldValue) => {
|
|
176
|
+
const insertedPart = newValue.replace(new RegExp(HIDE_SYMBOL, "g"), "");
|
|
256
177
|
|
|
178
|
+
//? Если insertedPart.length > 1, то это точно копи-паст
|
|
179
|
+
//? По договоренности любой копипаст заменяет текущее велью
|
|
257
180
|
if (insertedPart.length > 1) return insertedPart;
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
var BACKSPACE_CODE = 8; //? Если позиции не равны, значит была выделена область, значит будем воспринимать как копи-паст
|
|
181
|
+
const isOldValueHasBeenReduced = newValue.replace(new RegExp(/^HIDE_SYMBOL/g), "").length < oldValue.length;
|
|
182
|
+
const oldValueArr = oldValue.split("");
|
|
183
|
+
const getIsInclude = idx => {
|
|
184
|
+
const BACKSPACE_CODE = 8;
|
|
263
185
|
|
|
264
|
-
|
|
186
|
+
//? Если позиции не равны, значит была выделена область, значит будем воспринимать как копи-паст
|
|
187
|
+
if (keyDownData.start !== keyDownData.end) return false;
|
|
265
188
|
|
|
266
|
-
|
|
189
|
+
//? Если позиции равны и есть вставляемое значение - обрезаем "хвост"
|
|
190
|
+
if (insertedPart) return idx < keyDownData.start;
|
|
267
191
|
|
|
192
|
+
//? Если позиции равны и нет вставляемого значения - значит симвовол удалили
|
|
268
193
|
return keyDownData.keyCode === BACKSPACE_CODE ? idx < keyDownData.start - 1 || idx > keyDownData.end - 1 : idx < keyDownData.start || idx > keyDownData.end;
|
|
269
194
|
};
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
return getIsInclude(idx) ? "".concat(acc).concat(sym) : acc;
|
|
273
|
-
}, '');
|
|
274
|
-
var outputStructure = oldValueArr.reduce(function (acc, sym, idx) {
|
|
195
|
+
if (!insertedPart) return oldValueArr.reduce((acc, sym, idx) => getIsInclude(idx) ? "".concat(acc).concat(sym) : acc, "");
|
|
196
|
+
const outputStructure = oldValueArr.reduce((acc, sym, idx) => {
|
|
275
197
|
if (getIsInclude(idx)) acc.result = "".concat(acc.result).concat(sym);else if (!acc.position) acc.position = insertedPart ? idx : idx - 1;
|
|
276
198
|
return acc;
|
|
277
199
|
}, {
|
|
278
|
-
result:
|
|
200
|
+
result: "",
|
|
279
201
|
position: !isOldValueHasBeenReduced ? keyDownData.start : null
|
|
280
202
|
});
|
|
281
|
-
|
|
203
|
+
const output = "".concat(outputStructure.result.slice(0, outputStructure.position)).concat(insertedPart).concat(outputStructure.result.slice(outputStructure.position));
|
|
282
204
|
return output;
|
|
283
205
|
},
|
|
284
|
-
change:
|
|
206
|
+
change: e => {
|
|
285
207
|
var _minusSymbol3;
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
var inputValue = e.target ? e.target.value : e;
|
|
208
|
+
const {
|
|
209
|
+
isOnlyPositive
|
|
210
|
+
} = (0, _utils.getIsOnlyAnObject)(onlyNumbers) ? onlyNumbers : {};
|
|
211
|
+
let minusSymbol;
|
|
212
|
+
let inputValue = e.target ? e.target.value : e;
|
|
292
213
|
if (isPseudoPasswordMode) inputValue = inputValue.includes(HIDE_SYMBOL) ? handle.processPseudoValue(inputValue, value, e) : inputValue;
|
|
293
214
|
if (isUseBitDepthPoints) inputValue = (0, _fieldValueFormatters.formatToRemoveComa)(inputValue);
|
|
294
|
-
if (onlyNumbers) inputValue = inputValue.replace(/,/g,
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
minusSymbol = '-';
|
|
215
|
+
if (onlyNumbers) inputValue = inputValue.replace(/,/g, ".");
|
|
216
|
+
if (onlyNumbers && !isOnlyPositive && inputValue[0] === "-") {
|
|
217
|
+
minusSymbol = "-";
|
|
298
218
|
inputValue = inputValue.slice(1);
|
|
299
219
|
}
|
|
300
|
-
|
|
301
220
|
if (!isNotValidateASCII) inputValue = (0, _fieldValueFormatters.formatToOnlyASCIICodeText)(inputValue);
|
|
302
|
-
if (symbolsLimit && inputValue.length >
|
|
303
|
-
if (isCropFirstNool && inputValue[0] == 0) return
|
|
304
|
-
onChange((((_minusSymbol3 = minusSymbol) !== null && _minusSymbol3 !== void 0 ? _minusSymbol3 :
|
|
221
|
+
if (symbolsLimit && inputValue.length > Number(symbolsLimit)) inputValue = inputValue.substring(0, Number(symbolsLimit));
|
|
222
|
+
if (isCropFirstNool && inputValue[0] == 0) return "";else if (onlyNumbers) inputValue = handle.correctMinMax(inputValue, "max");
|
|
223
|
+
onChange((((_minusSymbol3 = minusSymbol) !== null && _minusSymbol3 !== void 0 ? _minusSymbol3 : "") + inputValue).toString());
|
|
305
224
|
},
|
|
306
|
-
toggleEdit:
|
|
225
|
+
toggleEdit: () => {
|
|
307
226
|
setEditing(!isEditing);
|
|
308
|
-
onChange(
|
|
227
|
+
onChange("");
|
|
309
228
|
},
|
|
310
|
-
focus:
|
|
229
|
+
focus: e => {
|
|
311
230
|
setIsFocused(true);
|
|
312
231
|
onFocus(e);
|
|
313
232
|
},
|
|
314
|
-
blur:
|
|
315
|
-
|
|
316
|
-
if (trimStart) inputValue = inputValue.replace(new RegExp("^[".concat(characters, "]+")),
|
|
317
|
-
if (trimEnd) inputValue = inputValue.replace(new RegExp("[".concat(characters, "]+$")),
|
|
233
|
+
blur: e => {
|
|
234
|
+
let inputValue = handle.correctMinMax((0, _fieldValueFormatters.getSafelyValue)(value), "min");
|
|
235
|
+
if (trimStart) inputValue = inputValue.replace(new RegExp("^[".concat(characters, "]+")), "");
|
|
236
|
+
if (trimEnd) inputValue = inputValue.replace(new RegExp("[".concat(characters, "]+$")), "");
|
|
318
237
|
if (value !== inputValue) onChange(inputValue);
|
|
319
238
|
setIsFocused(false);
|
|
320
|
-
setEditing(false);
|
|
239
|
+
setEditing(false);
|
|
240
|
+
// использую setTimeout для того чтоб прошли переназначения велью, если они есть,
|
|
321
241
|
// для того, чтоб верхний onBlur при обращении к e.target.value получал обновленное велью
|
|
322
|
-
|
|
323
|
-
if (onBlur) setTimeout(function () {
|
|
324
|
-
return onBlur(e);
|
|
325
|
-
}, 0);
|
|
242
|
+
if (onBlur) setTimeout(() => onBlur(e), 0);
|
|
326
243
|
},
|
|
327
|
-
keyDown:
|
|
244
|
+
keyDown: e => {
|
|
328
245
|
var _e$target;
|
|
329
|
-
|
|
330
|
-
setPreviousValue(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
|
|
246
|
+
setPreviousValue(e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
|
|
331
247
|
setKeyDownData({
|
|
332
248
|
start: e.target.selectionStart,
|
|
333
249
|
end: e.target.selectionEnd,
|
|
@@ -335,13 +251,13 @@ var Input = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
|
335
251
|
});
|
|
336
252
|
onKeyDown(e.keyCode, e);
|
|
337
253
|
},
|
|
338
|
-
keyUp:
|
|
254
|
+
keyUp: e => {
|
|
339
255
|
if (isUseErrorsBlink) {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
256
|
+
const changedValue = "".concat(value !== null && value !== void 0 ? value : "");
|
|
257
|
+
const previousValue = "".concat(prevValue);
|
|
258
|
+
const short = previousValue.length <= changedValue.length ? previousValue : changedValue;
|
|
259
|
+
const long = previousValue.length > changedValue.length ? previousValue : changedValue;
|
|
260
|
+
const infoAboutDifferencesSameness = short.split("").reduce((acc, symbol, idx) => {
|
|
345
261
|
if (acc.countOn && symbol === long[idx]) acc.same.push(symbol);else {
|
|
346
262
|
acc.countOn = false;
|
|
347
263
|
acc.differences.push([idx, symbol]);
|
|
@@ -352,96 +268,88 @@ var Input = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
|
352
268
|
countOn: true,
|
|
353
269
|
differences: []
|
|
354
270
|
});
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
271
|
+
const samePart = infoAboutDifferencesSameness.same.join("");
|
|
272
|
+
const differencesLength = infoAboutDifferencesSameness.differences.length;
|
|
273
|
+
const currentSet = changedValue === null || changedValue === void 0 ? void 0 : changedValue.replace(samePart, "");
|
|
358
274
|
if (!_index.KEYBOARD_SERVICE_KEYS.includes(e.key) && changedValue === previousValue) setIsAttemptToChange(!(!differencesLength && e.key === currentSet));
|
|
359
275
|
}
|
|
360
|
-
|
|
361
276
|
onKeyUp(e.keyCode, e);
|
|
362
277
|
}
|
|
363
278
|
};
|
|
364
|
-
(0, _react.useEffect)(
|
|
279
|
+
(0, _react.useEffect)(() => {
|
|
365
280
|
var _inputRef$current, _inputRef$current$foc;
|
|
366
|
-
|
|
367
|
-
if (isEditing) inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : (_inputRef$current$foc = _inputRef$current.focus) === null || _inputRef$current$foc === void 0 ? void 0 : _inputRef$current$foc.call(_inputRef$current);
|
|
281
|
+
if (isEditing) inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || (_inputRef$current$foc = _inputRef$current.focus) === null || _inputRef$current$foc === void 0 || _inputRef$current$foc.call(_inputRef$current);
|
|
368
282
|
}, [isEditing, isFocused]);
|
|
369
|
-
(0, _react.useEffect)(
|
|
283
|
+
(0, _react.useEffect)(() => {
|
|
370
284
|
setEditing(isSelect !== null && isSelect !== void 0 ? isSelect : false);
|
|
371
285
|
}, [isSelect]);
|
|
372
|
-
(0, _react.useEffect)(
|
|
286
|
+
(0, _react.useEffect)(() => {
|
|
373
287
|
if (isUseErrorsBlink && isAttemptToChange) {
|
|
374
288
|
setIsAttemptToChange(null);
|
|
375
289
|
setIsToHighlightError(true);
|
|
376
|
-
setTimeout(
|
|
290
|
+
setTimeout(() => {
|
|
377
291
|
setIsToHighlightError(false);
|
|
378
292
|
}, blinkTime || DEFAULT_BLINK_TIME);
|
|
379
293
|
}
|
|
380
294
|
}, [isAttemptToChange]);
|
|
381
|
-
(0, _react.useEffect)(
|
|
382
|
-
if (inputRef !== null && inputRef !== void 0 && inputRef.current && typeof isFocusDefault ===
|
|
295
|
+
(0, _react.useEffect)(() => {
|
|
296
|
+
if (inputRef !== null && inputRef !== void 0 && inputRef.current && typeof isFocusDefault === "boolean") setIsFocused(isFocusDefault);
|
|
383
297
|
setEditing(isFocusDefault);
|
|
384
298
|
}, [inputRef, isFocusDefault]);
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
if (isPriceInput || isPseudoPasswordMode) return 'text';
|
|
299
|
+
const getInputType = () => {
|
|
300
|
+
if (isPriceInput || isPseudoPasswordMode) return "text";
|
|
388
301
|
return type;
|
|
389
302
|
};
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
var hideSymbols = function hideSymbols() {
|
|
395
|
-
return safelyValue.split('').map(function () {
|
|
396
|
-
return HIDE_SYMBOL;
|
|
397
|
-
}).join('');
|
|
398
|
-
};
|
|
399
|
-
|
|
303
|
+
const formatedValue = (() => {
|
|
304
|
+
let safelyValue = (0, _fieldValueFormatters.getSafelyValue)(value);
|
|
305
|
+
const hideSymbols = () => safelyValue.split("").map(() => HIDE_SYMBOL).join("");
|
|
400
306
|
if (isPseudoPasswordMode) return hideSymbols();
|
|
401
|
-
if (onlyNumbers !== null && onlyNumbers !== void 0 && onlyNumbers.isNoEmptyValues) safelyValue = handle.correctMinMax(safelyValue,
|
|
307
|
+
if (onlyNumbers !== null && onlyNumbers !== void 0 && onlyNumbers.isNoEmptyValues) safelyValue = handle.correctMinMax(safelyValue, "min");
|
|
402
308
|
if (isUseBitDepthPoints) safelyValue = (0, _fieldValueFormatters.formatToAddBitDepthPoints)(safelyValue, onlyNumbers);
|
|
403
309
|
return safelyValue;
|
|
404
|
-
}();
|
|
405
|
-
|
|
406
|
-
var uniProps = _objectSpread(_objectSpread({
|
|
310
|
+
})();
|
|
311
|
+
const uniProps = {
|
|
407
312
|
name: inputName,
|
|
408
|
-
className: (0, _classnames.default)(
|
|
409
|
-
|
|
410
|
-
|
|
313
|
+
className: (0, _classnames.default)("input", className, {
|
|
314
|
+
"input--with-icon": icon,
|
|
315
|
+
"input--with-delete": withDelete
|
|
411
316
|
}),
|
|
412
|
-
placeholder
|
|
317
|
+
placeholder,
|
|
413
318
|
value: formatedValue,
|
|
414
|
-
inputMode: isNumericMobileKeyboard ?
|
|
415
|
-
disabled
|
|
319
|
+
inputMode: isNumericMobileKeyboard ? "numeric" : "text",
|
|
320
|
+
disabled,
|
|
416
321
|
onChange: handle.change,
|
|
417
322
|
onFocus: handle.focus,
|
|
418
323
|
onBlur: handle.blur,
|
|
419
324
|
onKeyUp: handle.keyUp,
|
|
420
|
-
onKeyDown: handle.keyDown
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
formatChars
|
|
425
|
-
|
|
426
|
-
|
|
325
|
+
onKeyDown: handle.keyDown,
|
|
326
|
+
...(maskChar ? {
|
|
327
|
+
maskChar
|
|
328
|
+
} : {}),
|
|
329
|
+
...(formatChars ? {
|
|
330
|
+
formatChars
|
|
331
|
+
} : {})
|
|
332
|
+
};
|
|
427
333
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
428
|
-
className: (0, _classnames.default)("input__wrap",
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
}
|
|
334
|
+
className: (0, _classnames.default)("input__wrap", {
|
|
335
|
+
["input__wrap_focus"]: isFocused
|
|
336
|
+
}, {
|
|
337
|
+
["input__wrap_error"]: error || isToHighlightError
|
|
338
|
+
}, {
|
|
339
|
+
["input__wrap--disabled"]: disabled || isLoading
|
|
340
|
+
}),
|
|
341
|
+
onMouseEnter: () => setOnInputHover(true),
|
|
342
|
+
onMouseLeave: () => setOnInputHover(false)
|
|
435
343
|
}, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
436
344
|
readOnly: isReadOnly,
|
|
437
345
|
"data-testid": "input--key-".concat(testId, "--type-").concat(type)
|
|
438
346
|
}, uniProps, {
|
|
439
347
|
ref: inputRef,
|
|
440
348
|
type: getInputType(),
|
|
441
|
-
autoComplete: isPseudoPasswordMode ?
|
|
442
|
-
onFocus: function
|
|
349
|
+
autoComplete: isPseudoPasswordMode ? "off" : autocomplete,
|
|
350
|
+
onFocus: function () {
|
|
443
351
|
if (isUseAutoSelect) inputRef.current.select();
|
|
444
|
-
if (uniProps.onFocus) uniProps.onFocus
|
|
352
|
+
if (uniProps.onFocus) uniProps.onFocus(...arguments);
|
|
445
353
|
}
|
|
446
354
|
}, attributesOfNativeInput)), DynamicIconComponent !== null && DynamicIconComponent !== void 0 ? DynamicIconComponent : icon, action, withDelete && onInputHover && /*#__PURE__*/_react.default.createElement("span", {
|
|
447
355
|
"data-testid": "icon-close",
|
|
@@ -453,6 +361,4 @@ var Input = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
|
453
361
|
size: "small"
|
|
454
362
|
}));
|
|
455
363
|
});
|
|
456
|
-
|
|
457
|
-
var _default = Input;
|
|
458
|
-
exports.default = _default;
|
|
364
|
+
var _default = exports.default = Input;
|