intelicoreact 1.4.81 → 1.4.83
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 +13 -13
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +12 -13
- package/dist/Atomic/FormElements/Calendar/Calendar.js +103 -68
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +26 -26
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +27 -23
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +201 -114
- package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +69 -46
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +301 -230
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +2 -4
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +201 -145
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +54 -41
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +112 -45
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +63 -34
- package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.js +153 -81
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +59 -57
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +98 -66
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +48 -27
- package/dist/Atomic/FormElements/Input/Input.js +209 -148
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +77 -50
- package/dist/Atomic/FormElements/InputColor/InputColor.js +28 -23
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +53 -38
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +139 -106
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +38 -31
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +230 -135
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +122 -85
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +8 -10
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +159 -72
- package/dist/Atomic/FormElements/InputLink/InputLink.js +39 -30
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +8 -8
- package/dist/Atomic/FormElements/InputMask/InputMask.js +800 -521
- package/dist/Atomic/FormElements/InputMask/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask/functions.js +15 -15
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +294 -234
- package/dist/Atomic/FormElements/InputMask2/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask2/functions.js +15 -15
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +332 -265
- package/dist/Atomic/FormElements/InputMask3/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask3/functions.js +15 -15
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +101 -53
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +99 -64
- package/dist/Atomic/FormElements/Label/Label.js +15 -13
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +284 -190
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +34 -24
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +170 -117
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +50 -28
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +29 -18
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +24 -22
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +31 -19
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +83 -56
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +75 -49
- package/dist/Atomic/FormElements/RangeList/RangeList.js +129 -87
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +18 -22
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +250 -143
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +477 -367
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +15 -14
- package/dist/Atomic/FormElements/Switcher/Switcher.js +20 -24
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +30 -24
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +23 -20
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +40 -32
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +31 -25
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +22 -22
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +98 -52
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +34 -22
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.js +81 -47
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +525 -415
- package/dist/Atomic/FormElements/Text/Text.js +39 -39
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +23 -21
- package/dist/Atomic/FormElements/Textarea/Textarea.js +33 -28
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +98 -67
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +24 -22
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +57 -34
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +94 -56
- package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +102 -74
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +69 -50
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +33 -30
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +50 -38
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +1 -1
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +59 -47
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +1 -1
- package/dist/Atomic/Layout/Header/Header.js +37 -22
- package/dist/Atomic/Layout/MainMenu/MainMenu.js +59 -34
- package/dist/Atomic/Layout/Spinner/Spinner.js +6 -7
- package/dist/Atomic/UI/Accordion/Accordion.js +31 -17
- package/dist/Atomic/UI/Accordion/AccordionItem.js +41 -30
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +81 -50
- package/dist/Atomic/UI/AccordionText/AccordionText.js +39 -20
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +74 -46
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +37 -21
- package/dist/Atomic/UI/Alert/Alert.js +36 -23
- package/dist/Atomic/UI/Arrow/Arrow.js +21 -14
- package/dist/Atomic/UI/Box/Box.js +12 -11
- package/dist/Atomic/UI/Button/Button.js +26 -26
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +21 -21
- package/dist/Atomic/UI/Chart/Chart.js +60 -44
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +13 -11
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +10 -12
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +82 -60
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +124 -116
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +30 -18
- package/dist/Atomic/UI/Chart/partial/utils.js +30 -16
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +31 -21
- package/dist/Atomic/UI/DateTime/DateTime.js +29 -25
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +23 -11
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +12 -4
- package/dist/Atomic/UI/DoubleString/DoubleString.js +53 -36
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +55 -14
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +114 -54
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +88 -53
- package/dist/Atomic/UI/Hint/Hint.js +87 -58
- package/dist/Atomic/UI/Hint/partials/_utils.js +10 -10
- package/dist/Atomic/UI/Modal/Modal.js +159 -144
- package/dist/Atomic/UI/Modal/ModalHOC.js +17 -14
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +5 -6
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +13 -16
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +118 -73
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +48 -33
- package/dist/Atomic/UI/NavLine/NavLine.js +166 -104
- package/dist/Atomic/UI/PageTitle/PageTitle.js +8 -12
- package/dist/Atomic/UI/PieChart/PieChart.js +11 -10
- package/dist/Atomic/UI/Price/Price.js +5 -7
- package/dist/Atomic/UI/PriceRange/PriceRange.js +4 -6
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +42 -27
- package/dist/Atomic/UI/Status/Status.js +22 -18
- package/dist/Atomic/UI/Table/Partials/TdCell.js +47 -28
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +5 -6
- package/dist/Atomic/UI/Table/Partials/TdRow.js +53 -29
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +28 -15
- package/dist/Atomic/UI/Table/Table.js +36 -27
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +32 -18
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +10 -8
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +2 -4
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +26 -21
- package/dist/Atomic/UI/Tag/Tag.js +72 -52
- package/dist/Atomic/UI/TagList/TagList.js +102 -65
- package/dist/Atomic/UI/UserBox/UserBox.js +13 -13
- package/dist/Atomic/UI/WizardStepper/constructor.js +6 -6
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/StateIcon.js +16 -20
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/StepRow.js +25 -27
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/StepWrapper.js +27 -22
- package/dist/Atomic/UI/WizardStepper/ui/icons.js +41 -39
- package/dist/Classes/AbortableFetch.js +393 -311
- package/dist/Classes/AnimatedHandler.js +53 -45
- package/dist/Classes/RESTAPI/index.js +431 -152
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +400 -320
- package/dist/Classes/RESTAPI/partials/ApiBase.js +59 -24
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +338 -76
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +378 -143
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +375 -159
- package/dist/Classes/RESTAPI/partials/Utils.js +128 -87
- package/dist/Classes/RESTAPI/partials/_utils.js +388 -116
- package/dist/Constants/index.constants.js +7 -7
- package/dist/Functions/Portal.js +19 -11
- package/dist/Functions/customEventListener.js +7 -5
- package/dist/Functions/fieldValueFormatters.js +131 -109
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +128 -69
- package/dist/Functions/locale/createTranslator.js +21 -11
- package/dist/Functions/operations.js +27 -23
- package/dist/Functions/presets/inputMaskPreset.js +176 -0
- package/dist/Functions/presets/inputMaskPresets.js +17 -17
- package/dist/Functions/presets/inputPresets.js +15 -15
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +3 -3
- package/dist/Functions/schemas.js +7 -5
- package/dist/Functions/useBodyScrollLock.js +3 -3
- package/dist/Functions/useClickOutside.js +3 -3
- package/dist/Functions/useDebounce.js +20 -11
- package/dist/Functions/useFieldFocus.js +51 -38
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +46 -36
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +78 -68
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +81 -54
- package/dist/Functions/useFormTools/functions/General.js +80 -71
- package/dist/Functions/useFormTools/functions/RenderFields.js +63 -45
- package/dist/Functions/useFormTools/functions/usePrevious.js +2 -2
- package/dist/Functions/useFormTools/index.js +467 -314
- package/dist/Functions/useInputHighlightError.js +42 -26
- package/dist/Functions/useIsMobile.js +29 -11
- package/dist/Functions/useKeyPress/useHandleKeyPress.js +8 -9
- package/dist/Functions/useKeyPress/useKeyPress.js +26 -17
- package/dist/Functions/useLocalStorage.js +13 -6
- package/dist/Functions/useLocationParams.js +24 -14
- package/dist/Functions/useMediaQuery.js +18 -7
- package/dist/Functions/useMetaInfo.js +40 -16
- package/dist/Functions/useMouseUpOutside.js +2 -2
- package/dist/Functions/useOnlineStatus.js +17 -6
- package/dist/Functions/usePasswordChecker.js +61 -42
- package/dist/Functions/usePrevious.js +2 -2
- package/dist/Functions/useResize.js +24 -12
- package/dist/Functions/useScrollTo.js +13 -4
- package/dist/Functions/useToggle.js +25 -9
- package/dist/Functions/utils.js +272 -147
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +27 -23
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +27 -23
- package/dist/Molecular/CustomIcons/components/AppStore.js +31 -27
- package/dist/Molecular/CustomIcons/components/Arrow.js +37 -33
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +19 -15
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +22 -18
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +22 -18
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +19 -15
- package/dist/Molecular/CustomIcons/components/Bell.js +17 -13
- package/dist/Molecular/CustomIcons/components/Button.js +17 -13
- package/dist/Molecular/CustomIcons/components/Campaigns.js +18 -14
- package/dist/Molecular/CustomIcons/components/Check.js +18 -14
- package/dist/Molecular/CustomIcons/components/Check2.js +17 -13
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +17 -13
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +17 -13
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +17 -13
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +17 -13
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +17 -13
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +32 -28
- package/dist/Molecular/CustomIcons/components/Close.js +19 -15
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +44 -40
- package/dist/Molecular/CustomIcons/components/Delete.js +18 -14
- package/dist/Molecular/CustomIcons/components/Edit.js +17 -13
- package/dist/Molecular/CustomIcons/components/Email.js +35 -31
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +25 -21
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +33 -29
- package/dist/Molecular/CustomIcons/components/Flows.js +17 -13
- package/dist/Molecular/CustomIcons/components/Gift.js +22 -18
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +31 -27
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +31 -27
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +20 -16
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +21 -17
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +20 -16
- package/dist/Molecular/CustomIcons/components/Home.js +20 -16
- package/dist/Molecular/CustomIcons/components/Home2.js +23 -19
- package/dist/Molecular/CustomIcons/components/Key.js +25 -21
- package/dist/Molecular/CustomIcons/components/Landers.js +21 -17
- package/dist/Molecular/CustomIcons/components/Lock.js +17 -13
- package/dist/Molecular/CustomIcons/components/Mail.js +25 -21
- package/dist/Molecular/CustomIcons/components/Mastercard.js +65 -61
- package/dist/Molecular/CustomIcons/components/Minus.js +30 -26
- package/dist/Molecular/CustomIcons/components/Offers.js +18 -14
- package/dist/Molecular/CustomIcons/components/Pause.js +30 -26
- package/dist/Molecular/CustomIcons/components/PayPal.js +44 -40
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +31 -27
- package/dist/Molecular/CustomIcons/components/Phone.js +32 -28
- package/dist/Molecular/CustomIcons/components/Play.js +30 -26
- package/dist/Molecular/CustomIcons/components/Plus.js +30 -26
- package/dist/Molecular/CustomIcons/components/Profile.js +22 -18
- package/dist/Molecular/CustomIcons/components/QRCode.js +32 -28
- package/dist/Molecular/CustomIcons/components/Rectangle.js +17 -13
- package/dist/Molecular/CustomIcons/components/Revert.js +20 -16
- package/dist/Molecular/CustomIcons/components/Star.js +14 -10
- package/dist/Molecular/CustomIcons/components/Star2.js +18 -14
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +20 -16
- package/dist/Molecular/CustomIcons/components/Trash.js +17 -13
- package/dist/Molecular/CustomIcons/components/TrashRed.js +17 -13
- package/dist/Molecular/CustomIcons/components/Triggers.js +17 -13
- package/dist/Molecular/CustomIcons/components/User.js +22 -18
- package/dist/Molecular/CustomIcons/components/Visa.js +33 -29
- package/dist/Molecular/CustomIcons/components/X.js +17 -13
- package/dist/Molecular/CustomIcons/index.js +61 -61
- package/dist/Molecular/FormElement/FormElement.js +17 -19
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +93 -73
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +27 -28
- package/dist/Molecular/InputAddress/InputAddress.js +213 -126
- package/dist/Molecular/InputPassword/InputPassword.js +23 -13
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
5
7
|
Object.defineProperty(exports, "__esModule", {
|
|
6
8
|
value: true
|
|
7
9
|
});
|
|
8
10
|
exports.default = void 0;
|
|
9
11
|
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
+
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
+
|
|
10
16
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
17
|
|
|
12
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -25,12 +31,15 @@ var _DynamicIcon = _interopRequireDefault(require("../../UI/DynamicIcon/DynamicI
|
|
|
25
31
|
|
|
26
32
|
require("./Input.scss");
|
|
27
33
|
|
|
28
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
34
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
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; }
|
|
29
37
|
|
|
30
|
-
function
|
|
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; }
|
|
31
39
|
|
|
32
|
-
|
|
33
|
-
|
|
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; }
|
|
41
|
+
|
|
42
|
+
var HIDE_SYMBOL = "\u2022";
|
|
34
43
|
/**
|
|
35
44
|
* Input компонент.
|
|
36
45
|
*
|
|
@@ -67,98 +76,145 @@ const HIDE_SYMBOL = "\u2022";
|
|
|
67
76
|
* @param {boolean} props.isNumericMobileKeyboard - Отображает цифровую клавиатуру на мобильных устройствах.
|
|
68
77
|
*/
|
|
69
78
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
|
|
79
|
+
var Input = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
80
|
+
var blurTrim = _ref.blurTrim,
|
|
81
|
+
_ref$autocomplete = _ref.autocomplete,
|
|
82
|
+
autocomplete = _ref$autocomplete === void 0 ? "off" : _ref$autocomplete,
|
|
83
|
+
isSelect = _ref.isSelect,
|
|
84
|
+
_ref$onChange = _ref.onChange,
|
|
85
|
+
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
86
|
+
_ref$onBlur = _ref.onBlur,
|
|
87
|
+
onBlur = _ref$onBlur === void 0 ? function () {} : _ref$onBlur,
|
|
88
|
+
_ref$onFocus = _ref.onFocus,
|
|
89
|
+
onFocus = _ref$onFocus === void 0 ? function () {} : _ref$onFocus,
|
|
90
|
+
_ref$onKeyUp = _ref.onKeyUp,
|
|
91
|
+
onKeyUp = _ref$onKeyUp === void 0 ? function () {} : _ref$onKeyUp,
|
|
92
|
+
_ref$onKeyDown = _ref.onKeyDown,
|
|
93
|
+
onKeyDown = _ref$onKeyDown === void 0 ? function () {} : _ref$onKeyDown,
|
|
94
|
+
isNotBlinkErrors = _ref.isNotBlinkErrors,
|
|
95
|
+
isPriceInput = _ref.isPriceInput,
|
|
96
|
+
onlyNumbers = _ref.onlyNumbers,
|
|
97
|
+
disabled = _ref.disabled,
|
|
98
|
+
withDelete = _ref.withDelete,
|
|
99
|
+
value = _ref.value,
|
|
100
|
+
placeholder = _ref.placeholder,
|
|
101
|
+
className = _ref.className,
|
|
102
|
+
_ref$type = _ref.type,
|
|
103
|
+
type = _ref$type === void 0 ? "text" : _ref$type,
|
|
104
|
+
mask = _ref.mask,
|
|
105
|
+
maskChar = _ref.maskChar,
|
|
106
|
+
formatChars = _ref.formatChars,
|
|
107
|
+
error = _ref.error,
|
|
108
|
+
icon = _ref.icon,
|
|
109
|
+
iconDynamicKey = _ref.iconDynamicKey,
|
|
110
|
+
_ref$iconDynamicProps = _ref.iconDynamicProps,
|
|
111
|
+
iconDynamicProps = _ref$iconDynamicProps === void 0 ? {} : _ref$iconDynamicProps,
|
|
112
|
+
symbolsLimit = _ref.symbolsLimit,
|
|
113
|
+
blinkTime = _ref.blinkTime,
|
|
114
|
+
_ref$isFocusDefault = _ref.isFocusDefault,
|
|
115
|
+
isFocusDefault = _ref$isFocusDefault === void 0 ? false : _ref$isFocusDefault,
|
|
116
|
+
_ref$isNotValidateASC = _ref.isNotValidateASCII,
|
|
117
|
+
isNotValidateASCII = _ref$isNotValidateASC === void 0 ? false : _ref$isNotValidateASC,
|
|
118
|
+
_ref$isNumericMobileK = _ref.isNumericMobileKeyboard,
|
|
119
|
+
isNumericMobileKeyboard = _ref$isNumericMobileK === void 0 ? false : _ref$isNumericMobileK,
|
|
120
|
+
_ref$isCropFirstNool = _ref.isCropFirstNool,
|
|
121
|
+
isCropFirstNool = _ref$isCropFirstNool === void 0 ? false : _ref$isCropFirstNool,
|
|
122
|
+
_ref$testId = _ref.testId,
|
|
123
|
+
testId = _ref$testId === void 0 ? "input" : _ref$testId,
|
|
124
|
+
action = _ref.action,
|
|
125
|
+
_ref$isUseAutoSelect = _ref.isUseAutoSelect,
|
|
126
|
+
isUseAutoSelect = _ref$isUseAutoSelect === void 0 ? true : _ref$isUseAutoSelect,
|
|
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
|
+
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
135
|
+
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
|
|
136
|
+
|
|
137
|
+
var _ref2 = blurTrim || {},
|
|
138
|
+
trimStart = _ref2.trimStart,
|
|
139
|
+
trimEnd = _ref2.trimEnd,
|
|
140
|
+
characters = _ref2.characters;
|
|
141
|
+
|
|
142
|
+
var DynamicIconComponent = iconDynamicKey && !icon ? /*#__PURE__*/_react.default.createElement(_DynamicIcon.default, (0, _extends2.default)({
|
|
118
143
|
iconKey: iconDynamicKey
|
|
119
144
|
}, iconDynamicProps)) : null;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
145
|
+
var DEFAULT_BLINK_TIME = 100; // STATES
|
|
146
|
+
|
|
147
|
+
var _useState = (0, _react.useState)(false),
|
|
148
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
149
|
+
isFocused = _useState2[0],
|
|
150
|
+
setIsFocused = _useState2[1];
|
|
151
|
+
|
|
152
|
+
var _useState3 = (0, _react.useState)(false),
|
|
153
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
154
|
+
isEditing = _useState4[0],
|
|
155
|
+
setEditing = _useState4[1];
|
|
156
|
+
|
|
157
|
+
var inputInnerRef = (0, _react.useRef)(null);
|
|
158
|
+
var inputRef = (0, _react.useMemo)(function () {
|
|
159
|
+
return ref || inputInnerRef;
|
|
160
|
+
}, [ref]); // const previousValueRef = useRef(value);
|
|
161
|
+
|
|
162
|
+
var _useState5 = (0, _react.useState)(false),
|
|
163
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
164
|
+
isAttemptToChange = _useState6[0],
|
|
165
|
+
setIsAttemptToChange = _useState6[1];
|
|
166
|
+
|
|
167
|
+
var _useState7 = (0, _react.useState)(false),
|
|
168
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
169
|
+
isToHighlightError = _useState8[0],
|
|
170
|
+
setIsToHighlightError = _useState8[1];
|
|
171
|
+
|
|
172
|
+
var _useState9 = (0, _react.useState)(false),
|
|
173
|
+
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
174
|
+
onInputHover = _useState10[0],
|
|
175
|
+
setOnInputHover = _useState10[1];
|
|
176
|
+
|
|
177
|
+
var _useState11 = (0, _react.useState)(value),
|
|
178
|
+
_useState12 = (0, _slicedToArray2.default)(_useState11, 2),
|
|
179
|
+
prevValue = _useState12[0],
|
|
180
|
+
setPreviousValue = _useState12[1];
|
|
181
|
+
|
|
182
|
+
var _useState13 = (0, _react.useState)({
|
|
132
183
|
start: null,
|
|
133
184
|
end: null,
|
|
134
185
|
keyCode: null
|
|
135
|
-
})
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
186
|
+
}),
|
|
187
|
+
_useState14 = (0, _slicedToArray2.default)(_useState13, 2),
|
|
188
|
+
keyDownData = _useState14[0],
|
|
189
|
+
setKeyDownData = _useState14[1];
|
|
190
|
+
|
|
191
|
+
var isUseBitDepthPoints = Boolean(onlyNumbers) && isPriceInput;
|
|
192
|
+
var isUseErrorsBlink = !isNotBlinkErrors && !mask;
|
|
193
|
+
var inputName = name || fieldKey || id;
|
|
194
|
+
var isPseudoPasswordMode = type === "pseudoPassword"; // HANDLES
|
|
195
|
+
|
|
196
|
+
var handle = {
|
|
197
|
+
correctMinMax: function correctMinMax(value, correctionType) {
|
|
143
198
|
if (!onlyNumbers) return value;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
199
|
+
|
|
200
|
+
var _ref3 = (0, _utils.getIsOnlyAnObject)(onlyNumbers) ? onlyNumbers : {},
|
|
201
|
+
min = _ref3.min,
|
|
202
|
+
max = _ref3.max,
|
|
203
|
+
isOnlyPositive = _ref3.isOnlyPositive,
|
|
204
|
+
isNoEmptyValues = _ref3.isNoEmptyValues;
|
|
205
|
+
|
|
206
|
+
var minimum = !Number.isNaN(Number(min)) && min !== null && (min >= 0 || !isOnlyPositive) ? min : undefined;
|
|
207
|
+
var maximum = !Number.isNaN(Number(max)) && max !== null && (max >= 0 || !isOnlyPositive) ? max : undefined;
|
|
208
|
+
var minusSymbol;
|
|
209
|
+
var inputValue = (0, _fieldValueFormatters.getSafelyValue)(value);
|
|
210
|
+
|
|
211
|
+
var checkMin = function checkMin() {
|
|
156
212
|
var _minusSymbol;
|
|
157
213
|
|
|
158
214
|
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;
|
|
159
215
|
};
|
|
160
216
|
|
|
161
|
-
|
|
217
|
+
var checkMax = function checkMax() {
|
|
162
218
|
var _minusSymbol2;
|
|
163
219
|
|
|
164
220
|
if (!Number.isNaN(Number(maximum)) && Number(maximum) < Number(((_minusSymbol2 = minusSymbol) !== null && _minusSymbol2 !== void 0 ? _minusSymbol2 : "") + inputValue)) {
|
|
@@ -193,16 +249,16 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
193
249
|
|
|
194
250
|
return inputValue;
|
|
195
251
|
},
|
|
196
|
-
processPseudoValue: (newValue, oldValue)
|
|
197
|
-
|
|
252
|
+
processPseudoValue: function processPseudoValue(newValue, oldValue) {
|
|
253
|
+
var insertedPart = newValue.replace(new RegExp(HIDE_SYMBOL, "g"), ""); //? Если insertedPart.length > 1, то это точно копи-паст
|
|
198
254
|
//? По договоренности любой копипаст заменяет текущее велью
|
|
199
255
|
|
|
200
256
|
if (insertedPart.length > 1) return insertedPart;
|
|
201
|
-
|
|
202
|
-
|
|
257
|
+
var isOldValueHasBeenReduced = newValue.replace(new RegExp(/^HIDE_SYMBOL/g), "").length < oldValue.length;
|
|
258
|
+
var oldValueArr = oldValue.split("");
|
|
203
259
|
|
|
204
|
-
|
|
205
|
-
|
|
260
|
+
var getIsInclude = function getIsInclude(idx) {
|
|
261
|
+
var BACKSPACE_CODE = 8; //? Если позиции не равны, значит была выделена область, значит будем воспринимать как копи-паст
|
|
206
262
|
|
|
207
263
|
if (keyDownData.start !== keyDownData.end) return false; //? Если позиции равны и есть вставляемое значение - обрезаем "хвост"
|
|
208
264
|
|
|
@@ -211,25 +267,27 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
211
267
|
return keyDownData.keyCode === BACKSPACE_CODE ? idx < keyDownData.start - 1 || idx > keyDownData.end - 1 : idx < keyDownData.start || idx > keyDownData.end;
|
|
212
268
|
};
|
|
213
269
|
|
|
214
|
-
if (!insertedPart) return oldValueArr.reduce((acc, sym, idx)
|
|
215
|
-
|
|
270
|
+
if (!insertedPart) return oldValueArr.reduce(function (acc, sym, idx) {
|
|
271
|
+
return getIsInclude(idx) ? "".concat(acc).concat(sym) : acc;
|
|
272
|
+
}, "");
|
|
273
|
+
var outputStructure = oldValueArr.reduce(function (acc, sym, idx) {
|
|
216
274
|
if (getIsInclude(idx)) acc.result = "".concat(acc.result).concat(sym);else if (!acc.position) acc.position = insertedPart ? idx : idx - 1;
|
|
217
275
|
return acc;
|
|
218
276
|
}, {
|
|
219
277
|
result: "",
|
|
220
278
|
position: !isOldValueHasBeenReduced ? keyDownData.start : null
|
|
221
279
|
});
|
|
222
|
-
|
|
280
|
+
var output = "".concat(outputStructure.result.slice(0, outputStructure.position)).concat(insertedPart).concat(outputStructure.result.slice(outputStructure.position));
|
|
223
281
|
return output;
|
|
224
282
|
},
|
|
225
|
-
change: e
|
|
283
|
+
change: function change(e) {
|
|
226
284
|
var _minusSymbol3;
|
|
227
285
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
286
|
+
var _ref4 = (0, _utils.getIsOnlyAnObject)(onlyNumbers) ? onlyNumbers : {},
|
|
287
|
+
isOnlyPositive = _ref4.isOnlyPositive;
|
|
288
|
+
|
|
289
|
+
var minusSymbol;
|
|
290
|
+
var inputValue = e.target ? e.target.value : e;
|
|
233
291
|
if (isPseudoPasswordMode) inputValue = inputValue.includes(HIDE_SYMBOL) ? handle.processPseudoValue(inputValue, value, e) : inputValue;
|
|
234
292
|
if (isUseBitDepthPoints) inputValue = (0, _fieldValueFormatters.formatToRemoveComa)(inputValue);
|
|
235
293
|
if (onlyNumbers) inputValue = inputValue.replace(/,/g, ".");
|
|
@@ -244,16 +302,16 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
244
302
|
if (isCropFirstNool && inputValue[0] == 0) return "";else if (onlyNumbers) inputValue = handle.correctMinMax(inputValue, "max");
|
|
245
303
|
onChange((((_minusSymbol3 = minusSymbol) !== null && _minusSymbol3 !== void 0 ? _minusSymbol3 : "") + inputValue).toString());
|
|
246
304
|
},
|
|
247
|
-
toggleEdit: ()
|
|
305
|
+
toggleEdit: function toggleEdit() {
|
|
248
306
|
setEditing(!isEditing);
|
|
249
307
|
onChange("");
|
|
250
308
|
},
|
|
251
|
-
focus: e
|
|
309
|
+
focus: function focus(e) {
|
|
252
310
|
setIsFocused(true);
|
|
253
311
|
onFocus(e);
|
|
254
312
|
},
|
|
255
|
-
blur: e
|
|
256
|
-
|
|
313
|
+
blur: function blur(e) {
|
|
314
|
+
var inputValue = handle.correctMinMax((0, _fieldValueFormatters.getSafelyValue)(value), "min");
|
|
257
315
|
if (trimStart) inputValue = inputValue.replace(new RegExp("^[".concat(characters, "]+")), "");
|
|
258
316
|
if (trimEnd) inputValue = inputValue.replace(new RegExp("[".concat(characters, "]+$")), "");
|
|
259
317
|
if (value !== inputValue) onChange(inputValue);
|
|
@@ -261,9 +319,11 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
261
319
|
setEditing(false); // использую setTimeout для того чтоб прошли переназначения велью, если они есть,
|
|
262
320
|
// для того, чтоб верхний onBlur при обращении к e.target.value получал обновленное велью
|
|
263
321
|
|
|
264
|
-
if (onBlur) setTimeout(
|
|
322
|
+
if (onBlur) setTimeout(function () {
|
|
323
|
+
return onBlur(e);
|
|
324
|
+
}, 0);
|
|
265
325
|
},
|
|
266
|
-
keyDown: e
|
|
326
|
+
keyDown: function keyDown(e) {
|
|
267
327
|
var _e$target;
|
|
268
328
|
|
|
269
329
|
setPreviousValue(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
|
|
@@ -274,13 +334,13 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
274
334
|
});
|
|
275
335
|
onKeyDown(e.keyCode, e);
|
|
276
336
|
},
|
|
277
|
-
keyUp: e
|
|
337
|
+
keyUp: function keyUp(e) {
|
|
278
338
|
if (isUseErrorsBlink) {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
339
|
+
var changedValue = "".concat(value !== null && value !== void 0 ? value : "");
|
|
340
|
+
var previousValue = "".concat(prevValue);
|
|
341
|
+
var short = previousValue.length <= changedValue.length ? previousValue : changedValue;
|
|
342
|
+
var long = previousValue.length > changedValue.length ? previousValue : changedValue;
|
|
343
|
+
var infoAboutDifferencesSameness = short.split("").reduce(function (acc, symbol, idx) {
|
|
284
344
|
if (acc.countOn && symbol === long[idx]) acc.same.push(symbol);else {
|
|
285
345
|
acc.countOn = false;
|
|
286
346
|
acc.differences.push([idx, symbol]);
|
|
@@ -291,85 +351,86 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
291
351
|
countOn: true,
|
|
292
352
|
differences: []
|
|
293
353
|
});
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
354
|
+
var samePart = infoAboutDifferencesSameness.same.join("");
|
|
355
|
+
var differencesLength = infoAboutDifferencesSameness.differences.length;
|
|
356
|
+
var currentSet = changedValue === null || changedValue === void 0 ? void 0 : changedValue.replace(samePart, "");
|
|
297
357
|
if (!_index.KEYBOARD_SERVICE_KEYS.includes(e.key) && changedValue === previousValue) setIsAttemptToChange(!(!differencesLength && e.key === currentSet));
|
|
298
358
|
}
|
|
299
359
|
|
|
300
360
|
onKeyUp(e.keyCode, e);
|
|
301
361
|
}
|
|
302
362
|
};
|
|
303
|
-
(0, _react.useEffect)(()
|
|
363
|
+
(0, _react.useEffect)(function () {
|
|
304
364
|
var _inputRef$current, _inputRef$current$foc;
|
|
305
365
|
|
|
306
366
|
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);
|
|
307
367
|
}, [isEditing, isFocused]);
|
|
308
|
-
(0, _react.useEffect)(()
|
|
368
|
+
(0, _react.useEffect)(function () {
|
|
309
369
|
setEditing(isSelect !== null && isSelect !== void 0 ? isSelect : false);
|
|
310
370
|
}, [isSelect]);
|
|
311
|
-
(0, _react.useEffect)(()
|
|
371
|
+
(0, _react.useEffect)(function () {
|
|
312
372
|
if (isUseErrorsBlink && isAttemptToChange) {
|
|
313
373
|
setIsAttemptToChange(null);
|
|
314
374
|
setIsToHighlightError(true);
|
|
315
|
-
setTimeout(()
|
|
375
|
+
setTimeout(function () {
|
|
316
376
|
setIsToHighlightError(false);
|
|
317
377
|
}, blinkTime || DEFAULT_BLINK_TIME);
|
|
318
378
|
}
|
|
319
379
|
}, [isAttemptToChange]);
|
|
320
|
-
(0, _react.useEffect)(()
|
|
380
|
+
(0, _react.useEffect)(function () {
|
|
321
381
|
if (inputRef !== null && inputRef !== void 0 && inputRef.current && typeof isFocusDefault === "boolean") setIsFocused(isFocusDefault);
|
|
322
382
|
setEditing(isFocusDefault);
|
|
323
383
|
}, [inputRef, isFocusDefault]);
|
|
324
384
|
|
|
325
|
-
|
|
385
|
+
var getInputType = function getInputType() {
|
|
326
386
|
if (isPriceInput || isPseudoPasswordMode) return "text";
|
|
327
387
|
return type;
|
|
328
388
|
};
|
|
329
389
|
|
|
330
|
-
|
|
331
|
-
|
|
390
|
+
var formatedValue = function () {
|
|
391
|
+
var safelyValue = (0, _fieldValueFormatters.getSafelyValue)(value);
|
|
332
392
|
|
|
333
|
-
|
|
393
|
+
var hideSymbols = function hideSymbols() {
|
|
394
|
+
return safelyValue.split("").map(function () {
|
|
395
|
+
return HIDE_SYMBOL;
|
|
396
|
+
}).join("");
|
|
397
|
+
};
|
|
334
398
|
|
|
335
399
|
if (isPseudoPasswordMode) return hideSymbols();
|
|
336
400
|
if (onlyNumbers !== null && onlyNumbers !== void 0 && onlyNumbers.isNoEmptyValues) safelyValue = handle.correctMinMax(safelyValue, "min");
|
|
337
401
|
if (isUseBitDepthPoints) safelyValue = (0, _fieldValueFormatters.formatToAddBitDepthPoints)(safelyValue, onlyNumbers);
|
|
338
402
|
return safelyValue;
|
|
339
|
-
}
|
|
403
|
+
}();
|
|
340
404
|
|
|
341
|
-
|
|
405
|
+
var uniProps = _objectSpread(_objectSpread({
|
|
342
406
|
name: inputName,
|
|
343
407
|
className: (0, _classnames.default)("input", className, {
|
|
344
408
|
"input--with-icon": icon,
|
|
345
409
|
"input--with-delete": withDelete
|
|
346
410
|
}),
|
|
347
|
-
placeholder,
|
|
411
|
+
placeholder: placeholder,
|
|
348
412
|
value: formatedValue,
|
|
349
413
|
inputMode: isNumericMobileKeyboard ? "numeric" : "text",
|
|
350
|
-
disabled,
|
|
414
|
+
disabled: disabled,
|
|
351
415
|
onChange: handle.change,
|
|
352
416
|
onFocus: handle.focus,
|
|
353
417
|
onBlur: handle.blur,
|
|
354
418
|
onKeyUp: handle.keyUp,
|
|
355
|
-
onKeyDown: handle.keyDown
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
};
|
|
419
|
+
onKeyDown: handle.keyDown
|
|
420
|
+
}, maskChar ? {
|
|
421
|
+
maskChar: maskChar
|
|
422
|
+
} : {}), formatChars ? {
|
|
423
|
+
formatChars: formatChars
|
|
424
|
+
} : {});
|
|
425
|
+
|
|
363
426
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
364
|
-
className: (0, _classnames.default)("input__wrap", {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
}
|
|
371
|
-
onMouseEnter: () => setOnInputHover(true),
|
|
372
|
-
onMouseLeave: () => setOnInputHover(false)
|
|
427
|
+
className: (0, _classnames.default)("input__wrap", (0, _defineProperty2.default)({}, "input__wrap_focus", isFocused), (0, _defineProperty2.default)({}, "input__wrap_error", error || isToHighlightError), (0, _defineProperty2.default)({}, "input__wrap--disabled", disabled || isLoading)),
|
|
428
|
+
onMouseEnter: function onMouseEnter() {
|
|
429
|
+
return setOnInputHover(true);
|
|
430
|
+
},
|
|
431
|
+
onMouseLeave: function onMouseLeave() {
|
|
432
|
+
return setOnInputHover(false);
|
|
433
|
+
}
|
|
373
434
|
}, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
374
435
|
readOnly: isReadOnly,
|
|
375
436
|
"data-testid": "input--key-".concat(testId, "--type-").concat(type)
|
|
@@ -378,16 +439,16 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
378
439
|
type: getInputType(),
|
|
379
440
|
autoComplete: isPseudoPasswordMode ? "off" : autocomplete
|
|
380
441
|
}, attributesOfNativeInput, {
|
|
381
|
-
onFocus: function () {
|
|
442
|
+
onFocus: function onFocus() {
|
|
382
443
|
var _attributesOfNativeIn;
|
|
383
444
|
|
|
384
445
|
for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
385
446
|
params[_key] = arguments[_key];
|
|
386
447
|
}
|
|
387
448
|
|
|
388
|
-
attributesOfNativeInput === null || attributesOfNativeInput === void 0 ? void 0 : (_attributesOfNativeIn = attributesOfNativeInput.onFocus) === null || _attributesOfNativeIn === void 0 ? void 0 : _attributesOfNativeIn.call(
|
|
449
|
+
attributesOfNativeInput === null || attributesOfNativeInput === void 0 ? void 0 : (_attributesOfNativeIn = attributesOfNativeInput.onFocus) === null || _attributesOfNativeIn === void 0 ? void 0 : _attributesOfNativeIn.call.apply(_attributesOfNativeIn, [attributesOfNativeInput].concat(params));
|
|
389
450
|
if (isUseAutoSelect) inputRef.current.select();
|
|
390
|
-
if (uniProps.onFocus) uniProps.onFocus(
|
|
451
|
+
if (uniProps.onFocus) uniProps.onFocus.apply(uniProps, params);
|
|
391
452
|
}
|
|
392
453
|
})), DynamicIconComponent !== null && DynamicIconComponent !== void 0 ? DynamicIconComponent : icon, action, withDelete && onInputHover && /*#__PURE__*/_react.default.createElement("span", {
|
|
393
454
|
"data-testid": "icon-close",
|