intelicoreact 1.4.82 → 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 -82
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +56 -54
- 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,15 @@
|
|
|
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
|
|
10
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
15
|
|
|
12
16
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -21,68 +25,85 @@ var _Calendar = _interopRequireDefault(require("../Calendar/Calendar"));
|
|
|
21
25
|
|
|
22
26
|
require("./InputCalendar.scss");
|
|
23
27
|
|
|
24
|
-
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); }
|
|
25
|
-
|
|
26
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
var InputCalendar = function InputCalendar(_ref) {
|
|
33
|
+
var value = _ref.value,
|
|
34
|
+
minDate = _ref.minDate,
|
|
35
|
+
maxDate = _ref.maxDate,
|
|
36
|
+
_ref$format = _ref.format,
|
|
37
|
+
format = _ref$format === void 0 ? "MM/DD/YYYY" : _ref$format,
|
|
38
|
+
isDontLimitFuture = _ref.isDontLimitFuture,
|
|
39
|
+
onChange = _ref.onChange,
|
|
40
|
+
_ref$className = _ref.className,
|
|
41
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
42
|
+
_ref$placeholder = _ref.placeholder,
|
|
43
|
+
placeholder = _ref$placeholder === void 0 ? "mm/dd/yyyy" : _ref$placeholder,
|
|
44
|
+
_ref$mask = _ref.mask,
|
|
45
|
+
mask = _ref$mask === void 0 ? "99/99/9999" : _ref$mask,
|
|
46
|
+
isListTop = _ref.isListTop,
|
|
47
|
+
disabled = _ref.disabled,
|
|
48
|
+
_ref$disabledFormatte = _ref.disabledFormattedMaxDate,
|
|
49
|
+
disabledFormattedMaxDate = _ref$disabledFormatte === void 0 ? false : _ref$disabledFormatte,
|
|
50
|
+
testId = _ref.testId,
|
|
51
|
+
_ref$onKeyDown = _ref.onKeyDown,
|
|
52
|
+
onKeyDownProp = _ref$onKeyDown === void 0 ? function (e) {} : _ref$onKeyDown,
|
|
53
|
+
_ref$onKeyUp = _ref.onKeyUp,
|
|
54
|
+
onKeyUpProp = _ref$onKeyUp === void 0 ? function (e) {} : _ref$onKeyUp,
|
|
55
|
+
_ref$onBlur = _ref.onBlur,
|
|
56
|
+
onBlurProp = _ref$onBlur === void 0 ? function (e) {} : _ref$onBlur;
|
|
57
|
+
|
|
58
|
+
var _useState = (0, _react.useState)(null),
|
|
59
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
60
|
+
isOpened = _useState2[0],
|
|
61
|
+
setIsOpened = _useState2[1];
|
|
62
|
+
|
|
63
|
+
var _useState3 = (0, _react.useState)(false),
|
|
64
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
65
|
+
isOpenedByEnter = _useState4[0],
|
|
66
|
+
setOpenedByEnter = _useState4[1];
|
|
67
|
+
|
|
68
|
+
var calendarRef = (0, _react.useRef)(null);
|
|
69
|
+
var inputRef = (0, _react.useRef)(null);
|
|
70
|
+
var formattedMinDate = (0, _momentTimezone.default)(minDate, format).format(format) !== "Invalid date" ? (0, _momentTimezone.default)(minDate, format).format(format) : null;
|
|
71
|
+
var formattedMaxDate = (0, _momentTimezone.default)(maxDate, format).format(format) !== "Invalid date" ? (0, _momentTimezone.default)(maxDate, format).format(format) : null;
|
|
72
|
+
var momentMinDate = (0, _momentTimezone.default)(formattedMinDate, format).startOf("day");
|
|
73
|
+
var momentMaxDate = (0, _momentTimezone.default)(formattedMaxDate, format).startOf("day");
|
|
74
|
+
(0, _useClickOutside.useClickOutside)(calendarRef, function () {
|
|
75
|
+
return setIsOpened(false);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
var changeInputValue = function changeInputValue(val) {
|
|
58
79
|
if (onChange) onChange(val);
|
|
59
80
|
};
|
|
60
81
|
|
|
61
|
-
|
|
82
|
+
var changeCalendarDay = function changeCalendarDay(val) {
|
|
62
83
|
if (onChange) onChange(val);
|
|
63
84
|
};
|
|
64
85
|
|
|
65
|
-
|
|
66
|
-
|
|
86
|
+
var getCalendarValue = function getCalendarValue(value) {
|
|
87
|
+
var date = (0, _momentTimezone.default)(value).format("L");
|
|
67
88
|
if (date !== "Invalid date") return date;
|
|
68
89
|
return (0, _momentTimezone.default)(new Date()).format("L");
|
|
69
90
|
};
|
|
70
91
|
|
|
71
|
-
(0, _react.useEffect)(()
|
|
92
|
+
(0, _react.useEffect)(function () {
|
|
72
93
|
if (typeof isOpened === "boolean" && !isOpened) {
|
|
73
94
|
handleBlur();
|
|
74
95
|
}
|
|
75
96
|
}, [isOpened]);
|
|
76
97
|
|
|
77
|
-
|
|
98
|
+
var handleBlur = function handleBlur(e) {
|
|
78
99
|
var _inputRef$current;
|
|
79
100
|
|
|
80
|
-
|
|
101
|
+
var value = inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value;
|
|
81
102
|
if ((0, _momentTimezone.default)(value, format).format(format) === "Invalid date" || value.indexOf("_") > -1) value = "";
|
|
82
103
|
if (value && typeof isOpened === "boolean" && (0, _momentTimezone.default)(value, format).startOf("day").isBefore(momentMinDate, "days")) onChange(formattedMinDate);else if (value && typeof isOpened === "boolean" && (0, _momentTimezone.default)(value, format).endOf("day").isAfter(momentMaxDate, "days")) onChange(formattedMaxDate);else if (value) onChange((0, _momentTimezone.default)(value, format).format(format));
|
|
83
104
|
};
|
|
84
105
|
|
|
85
|
-
|
|
106
|
+
var onKeyDown = function onKeyDown(e) {
|
|
86
107
|
if (isOpened && [9, 13].includes(e.keyCode)) {
|
|
87
108
|
setIsOpened(false);
|
|
88
109
|
setOpenedByEnter(true);
|
|
@@ -91,10 +112,10 @@ const InputCalendar = _ref => {
|
|
|
91
112
|
onKeyDownProp(e);
|
|
92
113
|
};
|
|
93
114
|
|
|
94
|
-
|
|
115
|
+
var onKeyUp = function onKeyUp(e) {
|
|
95
116
|
var _e$target$value;
|
|
96
117
|
|
|
97
|
-
|
|
118
|
+
var isValidLenght = ((_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.replace(/[^0-9]/g, "").length) === 8;
|
|
98
119
|
|
|
99
120
|
if ([9, 13].includes(e.keyCode)) {
|
|
100
121
|
setIsOpened(true);
|
|
@@ -121,9 +142,13 @@ const InputCalendar = _ref => {
|
|
|
121
142
|
mask: mask,
|
|
122
143
|
placeholder: placeholder,
|
|
123
144
|
value: value,
|
|
124
|
-
onChange:
|
|
145
|
+
onChange: function onChange(e) {
|
|
146
|
+
return changeInputValue(e.target.value);
|
|
147
|
+
},
|
|
125
148
|
className: "calendar-dropdown",
|
|
126
|
-
onClick: ()
|
|
149
|
+
onClick: function onClick() {
|
|
150
|
+
return setIsOpened(true);
|
|
151
|
+
},
|
|
127
152
|
onKeyUp: onKeyUp,
|
|
128
153
|
onKeyDown: onKeyDown,
|
|
129
154
|
onBlur: onBlurProp,
|
|
@@ -131,14 +156,16 @@ const InputCalendar = _ref => {
|
|
|
131
156
|
}), isOpened ? /*#__PURE__*/_react.default.createElement(_Calendar.default, {
|
|
132
157
|
testId: testId,
|
|
133
158
|
date: getCalendarValue(value),
|
|
134
|
-
setDate:
|
|
159
|
+
setDate: function setDate(newDate) {
|
|
160
|
+
return changeCalendarDay(newDate);
|
|
161
|
+
},
|
|
135
162
|
params: {
|
|
136
|
-
format,
|
|
163
|
+
format: format,
|
|
137
164
|
minDate: formattedMinDate,
|
|
138
165
|
maxDate: formattedMaxDate,
|
|
139
|
-
momentMinDate,
|
|
140
|
-
momentMaxDate,
|
|
141
|
-
isDontLimitFuture
|
|
166
|
+
momentMinDate: momentMinDate,
|
|
167
|
+
momentMaxDate: momentMaxDate,
|
|
168
|
+
isDontLimitFuture: isDontLimitFuture
|
|
142
169
|
},
|
|
143
170
|
isListTop: isListTop,
|
|
144
171
|
setIsOpened: setIsOpened
|
|
@@ -9,6 +9,8 @@ exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
12
14
|
var _react = _interopRequireDefault(require("react"));
|
|
13
15
|
|
|
14
16
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -19,32 +21,35 @@ var _Input = _interopRequireDefault(require("../Input/Input"));
|
|
|
19
21
|
|
|
20
22
|
require("./InputColor.scss");
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
24
|
+
var _excluded = ["value", "className", "symbolsLimit", "onChange", "withHexFormat", "initialHexOfColorBlock", "testId", "withDelete"];
|
|
25
|
+
|
|
26
|
+
var InputColor = function InputColor(_ref) {
|
|
27
|
+
var value = _ref.value,
|
|
28
|
+
className = _ref.className,
|
|
29
|
+
_ref$symbolsLimit = _ref.symbolsLimit,
|
|
30
|
+
symbolsLimit = _ref$symbolsLimit === void 0 ? 7 : _ref$symbolsLimit,
|
|
31
|
+
onChange = _ref.onChange,
|
|
32
|
+
_ref$withHexFormat = _ref.withHexFormat,
|
|
33
|
+
withHexFormat = _ref$withHexFormat === void 0 ? {
|
|
34
|
+
withSharp: false,
|
|
35
|
+
isTurnOn: true
|
|
36
|
+
} : _ref$withHexFormat,
|
|
37
|
+
_ref$initialHexOfColo = _ref.initialHexOfColorBlock,
|
|
38
|
+
initialHexOfColorBlock = _ref$initialHexOfColo === void 0 ? "#9AA0B9" : _ref$initialHexOfColo,
|
|
39
|
+
_ref$testId = _ref.testId,
|
|
40
|
+
testId = _ref$testId === void 0 ? "" : _ref$testId,
|
|
41
|
+
_ref$withDelete = _ref.withDelete,
|
|
42
|
+
withDelete = _ref$withDelete === void 0 ? true : _ref$withDelete,
|
|
43
|
+
args = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
44
|
+
var withSharp = withHexFormat.withSharp,
|
|
45
|
+
isHex = withHexFormat.isTurnOn; // HANDLES
|
|
41
46
|
|
|
42
|
-
|
|
43
|
-
change: e
|
|
44
|
-
|
|
47
|
+
var handle = {
|
|
48
|
+
change: function change(e) {
|
|
49
|
+
var inputValue = e !== null && e !== void 0 && e.target ? e.target.value : e;
|
|
45
50
|
inputValue = (0, _fieldValueFormatters.formatToOnlyASCIICodeText)(inputValue);
|
|
46
51
|
if (isHex) inputValue = (0, _fieldValueFormatters.formatToHex)({
|
|
47
|
-
inputValue,
|
|
52
|
+
inputValue: inputValue,
|
|
48
53
|
withSharp: withSharp
|
|
49
54
|
});
|
|
50
55
|
if (symbolsLimit && inputValue.length > Number(symbolsLimit)) inputValue = inputValue.substring(0, Number(symbolsLimit));
|
|
@@ -2,6 +2,8 @@
|
|
|
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
|
});
|
|
@@ -9,6 +11,8 @@ exports.default = void 0;
|
|
|
9
11
|
|
|
10
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
13
|
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
+
|
|
12
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
17
|
|
|
14
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -17,62 +21,73 @@ var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
|
|
|
17
21
|
|
|
18
22
|
require("./InputCurrency.scss");
|
|
19
23
|
|
|
20
|
-
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); }
|
|
21
|
-
|
|
22
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
24
|
+
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); }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
var InputCurrency = function InputCurrency(_ref) {
|
|
29
|
+
var _ref$currencySymbol = _ref.currencySymbol,
|
|
30
|
+
currencySymbol = _ref$currencySymbol === void 0 ? "$" : _ref$currencySymbol,
|
|
31
|
+
onChange = _ref.onChange,
|
|
32
|
+
className = _ref.className,
|
|
33
|
+
value = _ref.value,
|
|
34
|
+
disabled = _ref.disabled,
|
|
35
|
+
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
36
|
+
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati,
|
|
37
|
+
_ref$min = _ref.min,
|
|
38
|
+
min = _ref$min === void 0 ? 0 : _ref$min,
|
|
39
|
+
max = _ref.max,
|
|
40
|
+
error = _ref.error,
|
|
41
|
+
isNoCheckMinMax = _ref.isNoCheckMinMax,
|
|
42
|
+
_ref$onlyNumbers = _ref.onlyNumbers,
|
|
43
|
+
onlyNumbers = _ref$onlyNumbers === void 0 ? {
|
|
44
|
+
// type: "int",
|
|
45
|
+
type: "float",
|
|
46
|
+
decimalPlaces: 2
|
|
47
|
+
} : _ref$onlyNumbers;
|
|
48
|
+
|
|
49
|
+
var _useState = (0, _react.useState)(currencySymbol),
|
|
50
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
51
|
+
inputValue = _useState2[0],
|
|
52
|
+
setInputValue = _useState2[1];
|
|
53
|
+
|
|
54
|
+
var _useState3 = (0, _react.useState)(false),
|
|
55
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
56
|
+
isFocused = _useState4[0],
|
|
57
|
+
setIsFocused = _useState4[1];
|
|
58
|
+
|
|
59
|
+
var inputRef = (0, _react.useRef)(null);
|
|
60
|
+
|
|
61
|
+
var formatNumberWithCommas = function formatNumberWithCommas(number) {
|
|
47
62
|
return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
48
63
|
};
|
|
49
64
|
|
|
50
|
-
|
|
51
|
-
|
|
65
|
+
var formatCurrencyInput = function formatCurrencyInput(event) {
|
|
66
|
+
var newValue = event.target.value;
|
|
52
67
|
newValue = newValue.replace(currencySymbol, "");
|
|
53
|
-
|
|
68
|
+
var preparedValue = (0, _fieldValueFormatters.filterNumeric)(newValue, onlyNumbers);
|
|
54
69
|
newValue = formatNumberWithCommas(preparedValue);
|
|
55
70
|
newValue = "".concat(currencySymbol).concat(newValue);
|
|
56
71
|
setInputValue(newValue);
|
|
57
72
|
if (value !== parseFloat(preparedValue)) onChange(!isNaN(parseFloat(preparedValue)) ? parseFloat(preparedValue) : "");
|
|
58
73
|
};
|
|
59
74
|
|
|
60
|
-
|
|
75
|
+
var onInputClick = function onInputClick() {
|
|
61
76
|
if (!inputValue) {
|
|
62
77
|
inputRef.current.selectionStart = inputRef.current.selectionEnd = currencySymbol ? currencySymbol.length : 1;
|
|
63
78
|
}
|
|
64
79
|
};
|
|
65
80
|
|
|
66
|
-
|
|
81
|
+
var onKeyDown = function onKeyDown(event) {
|
|
67
82
|
if (event.key.match(/^[a-zA-Z0-9]$/)) {
|
|
68
83
|
setInputValue(inputValue.slice(0, inputRef.current.selectionStart));
|
|
69
84
|
}
|
|
70
85
|
};
|
|
71
86
|
|
|
72
|
-
|
|
87
|
+
var checkMinMax = function checkMinMax(event, value) {
|
|
73
88
|
var _event$target;
|
|
74
89
|
|
|
75
|
-
|
|
90
|
+
var clearValue = value !== null && value !== void 0 ? value : (0, _fieldValueFormatters.filterNumeric)(event === null || event === void 0 ? void 0 : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.value, onlyNumbers);
|
|
76
91
|
if (!clearValue) return false;
|
|
77
92
|
|
|
78
93
|
if (clearValue < min) {
|
|
@@ -90,14 +105,14 @@ const InputCurrency = _ref => {
|
|
|
90
105
|
return true;
|
|
91
106
|
};
|
|
92
107
|
|
|
93
|
-
(0, _react.useEffect)(()
|
|
108
|
+
(0, _react.useEffect)(function () {
|
|
94
109
|
if (value && parseFloat(value) !== parseFloat((0, _fieldValueFormatters.filterNumeric)(inputValue, onlyNumbers))) {
|
|
95
110
|
if (checkMinMax(null, value)) setInputValue("".concat(currencySymbol).concat(formatNumberWithCommas(value)));
|
|
96
111
|
}
|
|
97
112
|
}, [value]);
|
|
98
113
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
99
114
|
className: (0, _classnames.default)("input-currency-box", className, {
|
|
100
|
-
disabled,
|
|
115
|
+
disabled: disabled,
|
|
101
116
|
"input-currency__error": error,
|
|
102
117
|
"input-currency__focused": isFocused
|
|
103
118
|
})
|
|
@@ -110,13 +125,13 @@ const InputCurrency = _ref => {
|
|
|
110
125
|
onClick: onInputClick,
|
|
111
126
|
onKeyDown: onKeyDown
|
|
112
127
|
}, attributesOfNativeInput, {
|
|
113
|
-
onFocus: e
|
|
128
|
+
onFocus: function onFocus(e) {
|
|
114
129
|
var _attributesOfNativeIn;
|
|
115
130
|
|
|
116
131
|
attributesOfNativeInput === null || attributesOfNativeInput === void 0 ? void 0 : (_attributesOfNativeIn = attributesOfNativeInput.onFocus) === null || _attributesOfNativeIn === void 0 ? void 0 : _attributesOfNativeIn.call(attributesOfNativeInput, e);
|
|
117
132
|
setIsFocused(true);
|
|
118
133
|
},
|
|
119
|
-
onBlur: (e, value)
|
|
134
|
+
onBlur: function onBlur(e, value) {
|
|
120
135
|
var _attributesOfNativeIn2;
|
|
121
136
|
|
|
122
137
|
attributesOfNativeInput === null || attributesOfNativeInput === void 0 ? void 0 : (_attributesOfNativeIn2 = attributesOfNativeInput.onBlur) === null || _attributesOfNativeIn2 === void 0 ? void 0 : _attributesOfNativeIn2.call(attributesOfNativeInput, e);
|