intelicoreact 1.3.19 → 1.3.21
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 +23 -15
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +23 -15
- package/dist/Atomic/FormElements/Calendar/Calendar.js +124 -69
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +36 -27
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +39 -23
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +246 -110
- package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +85 -44
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +414 -246
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +9 -5
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +165 -93
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +64 -39
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +132 -51
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +73 -34
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +75 -54
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +110 -67
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +83 -33
- package/dist/Atomic/FormElements/Input/Input.js +253 -161
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +102 -48
- package/dist/Atomic/FormElements/InputColor/InputColor.js +40 -27
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +58 -28
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +176 -108
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +57 -32
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +302 -184
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +157 -85
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +16 -11
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +193 -76
- package/dist/Atomic/FormElements/InputLink/InputLink.js +58 -34
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +12 -8
- package/dist/Atomic/FormElements/InputMask/InputMask.js +964 -554
- package/dist/Atomic/FormElements/InputMask/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask/functions.js +43 -17
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +404 -268
- package/dist/Atomic/FormElements/InputMask2/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask2/functions.js +43 -17
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +459 -299
- package/dist/Atomic/FormElements/InputMask3/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask3/functions.js +43 -17
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +113 -53
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +118 -64
- package/dist/Atomic/FormElements/Label/Label.js +23 -13
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +349 -217
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +47 -25
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +207 -133
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +61 -29
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +42 -20
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +33 -22
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +43 -20
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +101 -54
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +102 -59
- package/dist/Atomic/FormElements/RangeList/RangeList.js +150 -89
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +29 -23
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +300 -135
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +571 -381
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +24 -14
- package/dist/Atomic/FormElements/Switcher/Switcher.js +29 -24
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +47 -25
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +32 -20
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +55 -32
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +42 -22
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +33 -23
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +120 -51
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +3 -2
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +46 -23
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +417 -253
- package/dist/Atomic/FormElements/Text/Text.js +53 -47
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +31 -21
- package/dist/Atomic/FormElements/Textarea/Textarea.js +27 -16
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +128 -68
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +36 -25
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +70 -33
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +124 -58
- package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +91 -0
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +80 -48
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +42 -32
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +60 -40
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +3 -2
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +69 -50
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +3 -3
- package/dist/Atomic/Layout/Header/Header.js +48 -21
- package/dist/Atomic/Layout/MainMenu/MainMenu.js +79 -36
- package/dist/Atomic/Layout/Spinner/Spinner.js +14 -8
- package/dist/Atomic/UI/Accordion/Accordion.js +48 -18
- package/dist/Atomic/UI/Accordion/AccordionItem.js +60 -35
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +106 -49
- package/dist/Atomic/UI/AccordionText/AccordionText.js +37 -13
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +94 -48
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +50 -22
- package/dist/Atomic/UI/Alert/Alert.js +44 -20
- package/dist/Atomic/UI/Arrow/Arrow.js +35 -15
- package/dist/Atomic/UI/Box/Box.js +21 -14
- package/dist/Atomic/UI/Button/Button.js +35 -26
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +31 -22
- package/dist/Atomic/UI/Chart/Chart.js +86 -45
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +24 -14
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +22 -13
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +113 -68
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +140 -158
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +42 -26
- package/dist/Atomic/UI/Chart/partial/utils.js +48 -20
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +42 -22
- package/dist/Atomic/UI/DateTime/DateTime.js +38 -23
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +36 -12
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +21 -5
- package/dist/Atomic/UI/DoubleString/DoubleString.js +50 -27
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +63 -15
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +157 -62
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +110 -47
- package/dist/Atomic/UI/Hint/Hint.js +94 -49
- package/dist/Atomic/UI/Modal/Modal.js +179 -149
- package/dist/Atomic/UI/Modal/ModalHOC.js +21 -12
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +12 -7
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +21 -17
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +167 -94
- package/dist/Atomic/UI/ModalBackup/Modal.js +90 -65
- package/dist/Atomic/UI/ModalBackup/ModalHOC.js +21 -12
- package/dist/Atomic/UI/ModalBackup/partials/ModalFooter.js +11 -6
- package/dist/Atomic/UI/ModalBackup/partials/ModalTitle.js +19 -15
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +62 -32
- package/dist/Atomic/UI/NavLine/NavLine.js +211 -120
- package/dist/Atomic/UI/NavLine/Tabs.js +3 -2
- package/dist/Atomic/UI/PageTitle/PageTitle.js +17 -13
- package/dist/Atomic/UI/PieChart/PieChart.js +21 -11
- package/dist/Atomic/UI/Price/Price.js +13 -10
- package/dist/Atomic/UI/PriceRange/PriceRange.js +11 -7
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +56 -27
- package/dist/Atomic/UI/Status/Status.js +30 -19
- package/dist/Atomic/UI/Table/Partials/TdCell.js +71 -28
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +16 -7
- package/dist/Atomic/UI/Table/Partials/TdRow.js +65 -29
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +40 -16
- package/dist/Atomic/UI/Table/Table.js +47 -27
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +48 -18
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +19 -9
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +8 -5
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +47 -25
- package/dist/Atomic/UI/Tag/Tag.js +48 -20
- package/dist/Atomic/UI/TagList/TagList.js +150 -80
- package/dist/Atomic/UI/UserBox/UserBox.js +26 -14
- package/dist/Classes/AbortableFetch.js +422 -283
- package/dist/Classes/AnimatedHandler.js +56 -44
- package/dist/Classes/RESTAPI/index.js +433 -154
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +428 -290
- package/dist/Classes/RESTAPI/partials/ApiBase.js +67 -24
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +275 -57
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +377 -146
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +403 -155
- package/dist/Classes/RESTAPI/partials/Utils.js +135 -81
- package/dist/Classes/RESTAPI/partials/_outerDependencies.js +6 -2
- package/dist/Classes/RESTAPI/partials/_utils.js +395 -101
- package/dist/Constants/index.constants.js +15 -8
- package/dist/Functions/Portal.js +33 -14
- package/dist/Functions/customEventListener.js +20 -5
- package/dist/Functions/fieldValueFormatters.js +211 -148
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +137 -75
- package/dist/Functions/locale/createTranslator.js +27 -13
- package/dist/Functions/operations.js +49 -35
- package/dist/Functions/presets/inputMaskPresets.js +27 -25
- package/dist/Functions/presets/inputPresets.js +22 -19
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +9 -7
- package/dist/Functions/schemas.js +15 -6
- package/dist/Functions/useClickOutside.js +7 -3
- package/dist/Functions/useDebounce.js +25 -11
- package/dist/Functions/useFieldFocus.js +67 -42
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +54 -35
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +95 -74
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +91 -55
- package/dist/Functions/useFormTools/functions/General.js +99 -80
- package/dist/Functions/useFormTools/functions/RenderFields.js +72 -45
- package/dist/Functions/useFormTools/functions/usePrevious.js +7 -3
- package/dist/Functions/useFormTools/index.js +598 -382
- package/dist/Functions/useInputHighlightError.js +52 -27
- package/dist/Functions/useIsMobile.js +36 -13
- package/dist/Functions/useLocalStorage.js +22 -7
- package/dist/Functions/useLocationParams.js +27 -16
- package/dist/Functions/useMetaInfo.js +50 -19
- package/dist/Functions/useMouseUpOutside.js +5 -2
- package/dist/Functions/useOnlineStatus.js +26 -7
- package/dist/Functions/usePasswordChecker.js +77 -42
- package/dist/Functions/usePrevious.js +7 -3
- package/dist/Functions/useResize.js +32 -12
- package/dist/Functions/useScrollTo.js +20 -6
- package/dist/Functions/useToggle.js +30 -10
- package/dist/Functions/utils.js +366 -186
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +32 -21
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +32 -21
- package/dist/Molecular/CustomIcons/components/AppStore.js +36 -25
- package/dist/Molecular/CustomIcons/components/Arrow.js +42 -31
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +24 -13
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +27 -16
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +27 -16
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +24 -13
- package/dist/Molecular/CustomIcons/components/Bell.js +22 -11
- package/dist/Molecular/CustomIcons/components/Button.js +22 -11
- package/dist/Molecular/CustomIcons/components/Campaigns.js +23 -12
- package/dist/Molecular/CustomIcons/components/Check.js +23 -12
- package/dist/Molecular/CustomIcons/components/Check2.js +22 -11
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +22 -11
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +22 -11
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +22 -11
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +22 -11
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +22 -11
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +37 -26
- package/dist/Molecular/CustomIcons/components/Close.js +24 -13
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +49 -38
- package/dist/Molecular/CustomIcons/components/Delete.js +23 -12
- package/dist/Molecular/CustomIcons/components/Edit.js +22 -11
- package/dist/Molecular/CustomIcons/components/Email.js +40 -29
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +30 -19
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +38 -27
- package/dist/Molecular/CustomIcons/components/Flows.js +22 -11
- package/dist/Molecular/CustomIcons/components/Gift.js +27 -16
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +36 -25
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +36 -25
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +25 -14
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +26 -15
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +25 -14
- package/dist/Molecular/CustomIcons/components/Home.js +25 -14
- package/dist/Molecular/CustomIcons/components/Home2.js +28 -17
- package/dist/Molecular/CustomIcons/components/Key.js +30 -19
- package/dist/Molecular/CustomIcons/components/Landers.js +26 -15
- package/dist/Molecular/CustomIcons/components/Lock.js +22 -11
- package/dist/Molecular/CustomIcons/components/Mail.js +30 -19
- package/dist/Molecular/CustomIcons/components/Mastercard.js +72 -61
- package/dist/Molecular/CustomIcons/components/Minus.js +35 -24
- package/dist/Molecular/CustomIcons/components/Offers.js +23 -12
- package/dist/Molecular/CustomIcons/components/Pause.js +35 -24
- package/dist/Molecular/CustomIcons/components/PayPal.js +49 -38
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +36 -25
- package/dist/Molecular/CustomIcons/components/Phone.js +37 -26
- package/dist/Molecular/CustomIcons/components/Play.js +35 -24
- package/dist/Molecular/CustomIcons/components/Plus.js +35 -24
- package/dist/Molecular/CustomIcons/components/Profile.js +27 -16
- package/dist/Molecular/CustomIcons/components/QRCode.js +37 -26
- package/dist/Molecular/CustomIcons/components/Rectangle.js +22 -11
- package/dist/Molecular/CustomIcons/components/Revert.js +25 -14
- package/dist/Molecular/CustomIcons/components/Star.js +21 -10
- package/dist/Molecular/CustomIcons/components/Star2.js +23 -12
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +25 -14
- package/dist/Molecular/CustomIcons/components/Trash.js +22 -11
- package/dist/Molecular/CustomIcons/components/TrashRed.js +22 -11
- package/dist/Molecular/CustomIcons/components/Triggers.js +22 -11
- package/dist/Molecular/CustomIcons/components/User.js +27 -16
- package/dist/Molecular/CustomIcons/components/Visa.js +38 -27
- package/dist/Molecular/CustomIcons/components/X.js +22 -11
- package/dist/Molecular/CustomIcons/index.js +183 -61
- package/dist/Molecular/FormElement/FormElement.js +27 -18
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +108 -86
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +34 -29
- package/dist/Molecular/InputAddress/InputAddress.js +312 -176
- package/dist/Molecular/InputPassword/InputPassword.js +39 -15
- package/dist/index.js +3 -1
- package/package.json +1 -1
|
@@ -1,91 +1,137 @@
|
|
|
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
|
+
|
|
4
7
|
Object.defineProperty(exports, "__esModule", {
|
|
5
8
|
value: true
|
|
6
9
|
});
|
|
7
10
|
exports.default = void 0;
|
|
11
|
+
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
|
|
8
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
|
|
9
16
|
var _momentTimezone = _interopRequireDefault(require("moment-timezone"));
|
|
17
|
+
|
|
10
18
|
var _reactInputMask = _interopRequireDefault(require("react-input-mask"));
|
|
19
|
+
|
|
11
20
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
|
+
|
|
12
22
|
var _Calendar = _interopRequireDefault(require("../Calendar/Calendar"));
|
|
23
|
+
|
|
13
24
|
var _useClickOutside = require("../../../Functions/useClickOutside");
|
|
25
|
+
|
|
14
26
|
require("./InputCalendar.scss");
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
27
|
+
|
|
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) {
|
|
46
79
|
if (onChange) onChange(val);
|
|
47
80
|
};
|
|
48
|
-
|
|
81
|
+
|
|
82
|
+
var changeCalendarDay = function changeCalendarDay(val) {
|
|
49
83
|
if (onChange) onChange(val);
|
|
50
84
|
};
|
|
51
|
-
|
|
52
|
-
|
|
85
|
+
|
|
86
|
+
var getCalendarValue = function getCalendarValue(value) {
|
|
87
|
+
var date = (0, _momentTimezone.default)(value).format('L');
|
|
53
88
|
if (date !== 'Invalid date') return date;
|
|
54
89
|
return (0, _momentTimezone.default)(new Date()).format('L');
|
|
55
90
|
};
|
|
56
|
-
|
|
91
|
+
|
|
92
|
+
(0, _react.useEffect)(function () {
|
|
57
93
|
if (typeof isOpened === 'boolean' && !isOpened) {
|
|
58
94
|
handleBlur();
|
|
59
95
|
}
|
|
60
96
|
}, [isOpened]);
|
|
61
|
-
|
|
97
|
+
|
|
98
|
+
var handleBlur = function handleBlur(e) {
|
|
62
99
|
var _inputRef$current;
|
|
63
|
-
|
|
100
|
+
|
|
101
|
+
var value = inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value;
|
|
64
102
|
if ((0, _momentTimezone.default)(value, format).format(format) === 'Invalid date' || value.indexOf('_') > -1) value = '';
|
|
65
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));
|
|
66
104
|
};
|
|
67
|
-
|
|
105
|
+
|
|
106
|
+
var onKeyDown = function onKeyDown(e) {
|
|
68
107
|
if (isOpened && [9, 13].includes(e.keyCode)) {
|
|
69
108
|
setIsOpened(false);
|
|
70
109
|
setOpenedByEnter(true);
|
|
71
110
|
}
|
|
111
|
+
|
|
72
112
|
onKeyDownProp(e);
|
|
73
113
|
};
|
|
74
|
-
|
|
114
|
+
|
|
115
|
+
var onKeyUp = function onKeyUp(e) {
|
|
75
116
|
var _e$target$value;
|
|
76
|
-
|
|
117
|
+
|
|
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;
|
|
119
|
+
|
|
77
120
|
if ([9, 13].includes(e.keyCode)) {
|
|
78
121
|
setIsOpened(true);
|
|
79
122
|
setOpenedByEnter(true);
|
|
80
123
|
}
|
|
124
|
+
|
|
81
125
|
if (isValidLenght) {
|
|
82
126
|
setIsOpened(false);
|
|
83
127
|
handleBlur();
|
|
84
128
|
} else {
|
|
85
129
|
setIsOpened(true);
|
|
86
130
|
}
|
|
131
|
+
|
|
87
132
|
onKeyUpProp(e);
|
|
88
133
|
};
|
|
134
|
+
|
|
89
135
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
90
136
|
"data-testid": "inputCalendar--key-".concat(testId, "--container"),
|
|
91
137
|
className: (0, _classnames.default)('input__wrap calendar-container', className, {
|
|
@@ -96,9 +142,13 @@ const InputCalendar = _ref => {
|
|
|
96
142
|
mask: mask,
|
|
97
143
|
placeholder: placeholder,
|
|
98
144
|
value: value,
|
|
99
|
-
onChange:
|
|
145
|
+
onChange: function onChange(e) {
|
|
146
|
+
return changeInputValue(e.target.value);
|
|
147
|
+
},
|
|
100
148
|
className: "calendar-dropdown",
|
|
101
|
-
onClick: ()
|
|
149
|
+
onClick: function onClick() {
|
|
150
|
+
return setIsOpened(true);
|
|
151
|
+
},
|
|
102
152
|
onKeyUp: onKeyUp,
|
|
103
153
|
onKeyDown: onKeyDown,
|
|
104
154
|
onBlur: onBlurProp,
|
|
@@ -106,17 +156,21 @@ const InputCalendar = _ref => {
|
|
|
106
156
|
}), isOpened ? /*#__PURE__*/_react.default.createElement(_Calendar.default, {
|
|
107
157
|
testId: testId,
|
|
108
158
|
date: getCalendarValue(value),
|
|
109
|
-
setDate:
|
|
159
|
+
setDate: function setDate(newDate) {
|
|
160
|
+
return changeCalendarDay(newDate);
|
|
161
|
+
},
|
|
110
162
|
params: {
|
|
111
|
-
format,
|
|
163
|
+
format: format,
|
|
112
164
|
minDate: formattedMinDate,
|
|
113
165
|
maxDate: formattedMaxDate,
|
|
114
|
-
momentMinDate,
|
|
115
|
-
momentMaxDate,
|
|
116
|
-
isDontLimitFuture
|
|
166
|
+
momentMinDate: momentMinDate,
|
|
167
|
+
momentMaxDate: momentMaxDate,
|
|
168
|
+
isDontLimitFuture: isDontLimitFuture
|
|
117
169
|
},
|
|
118
170
|
isListTop: isListTop,
|
|
119
171
|
setIsOpened: setIsOpened
|
|
120
172
|
}) : null);
|
|
121
173
|
};
|
|
122
|
-
|
|
174
|
+
|
|
175
|
+
var _default = InputCalendar;
|
|
176
|
+
exports.default = _default;
|
|
@@ -1,48 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
9
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
|
|
10
16
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
+
|
|
11
18
|
var _Input = _interopRequireDefault(require("../Input/Input"));
|
|
19
|
+
|
|
12
20
|
var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
|
|
21
|
+
|
|
13
22
|
require("./InputColor.scss");
|
|
14
|
-
/* eslint-disable react/display-name */
|
|
15
23
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
|
46
|
+
|
|
47
|
+
var handle = {
|
|
48
|
+
change: function change(e) {
|
|
49
|
+
var inputValue = e !== null && e !== void 0 && e.target ? e.target.value : e;
|
|
39
50
|
inputValue = (0, _fieldValueFormatters.formatToOnlyASCIICodeText)(inputValue);
|
|
40
51
|
if (isHex) inputValue = (0, _fieldValueFormatters.formatToHex)({
|
|
41
|
-
inputValue,
|
|
52
|
+
inputValue: inputValue,
|
|
42
53
|
withSharp: withSharp
|
|
43
54
|
});
|
|
44
55
|
if (symbolsLimit && inputValue.length > +symbolsLimit) inputValue = inputValue.substring(0, +symbolsLimit);
|
|
45
|
-
onChange === null || onChange === void 0
|
|
56
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(inputValue);
|
|
46
57
|
}
|
|
47
58
|
};
|
|
48
59
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -62,4 +73,6 @@ const InputColor = _ref => {
|
|
|
62
73
|
type: "text"
|
|
63
74
|
})));
|
|
64
75
|
};
|
|
65
|
-
|
|
76
|
+
|
|
77
|
+
var _default = InputColor;
|
|
78
|
+
exports.default = _default;
|
|
@@ -1,76 +1,104 @@
|
|
|
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
|
+
|
|
4
7
|
Object.defineProperty(exports, "__esModule", {
|
|
5
8
|
value: true
|
|
6
9
|
});
|
|
7
10
|
exports.default = void 0;
|
|
11
|
+
|
|
8
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
+
|
|
9
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
10
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
+
|
|
11
20
|
require("./InputCurrency.scss");
|
|
12
|
-
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
var InputCurrency = function InputCurrency(_ref) {
|
|
27
|
+
var currencySymbol = _ref.currencySymbol,
|
|
28
|
+
onChange = _ref.onChange,
|
|
29
|
+
className = _ref.className,
|
|
30
|
+
value = _ref.value,
|
|
31
|
+
disabled = _ref.disabled,
|
|
32
|
+
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
33
|
+
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati,
|
|
34
|
+
_ref$min = _ref.min,
|
|
35
|
+
min = _ref$min === void 0 ? 0 : _ref$min,
|
|
36
|
+
max = _ref.max,
|
|
37
|
+
error = _ref.error;
|
|
38
|
+
|
|
39
|
+
var _useState = (0, _react.useState)(currencySymbol || '$'),
|
|
40
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
41
|
+
inputValue = _useState2[0],
|
|
42
|
+
setInputValue = _useState2[1];
|
|
43
|
+
|
|
44
|
+
var inputRef = (0, _react.useRef)(null);
|
|
45
|
+
|
|
46
|
+
var formatNumberWithCommas = function formatNumberWithCommas(number) {
|
|
29
47
|
return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
30
48
|
};
|
|
31
|
-
|
|
32
|
-
|
|
49
|
+
|
|
50
|
+
var formatCurrencyInput = function formatCurrencyInput(event) {
|
|
51
|
+
var newValue = event.target.value;
|
|
33
52
|
newValue = newValue.replace(/[^0-9]/g, '');
|
|
34
53
|
newValue = formatNumberWithCommas(newValue);
|
|
35
54
|
newValue = "".concat(currencySymbol || '$').concat(newValue);
|
|
36
55
|
setInputValue(newValue);
|
|
37
56
|
onChange(newValue.replace(/[^0-9]/g, ''));
|
|
38
57
|
};
|
|
39
|
-
|
|
58
|
+
|
|
59
|
+
var onInputClick = function onInputClick() {
|
|
40
60
|
if (!inputValue) {
|
|
41
61
|
inputRef.current.selectionStart = inputRef.current.selectionEnd = currencySymbol ? currencySymbol.length : 1;
|
|
42
62
|
}
|
|
43
63
|
};
|
|
44
|
-
|
|
64
|
+
|
|
65
|
+
var onKeyDown = function onKeyDown(event) {
|
|
45
66
|
if (event.key.match(/^[a-zA-Z0-9]$/)) {
|
|
46
67
|
setInputValue(inputValue.slice(0, inputRef.current.selectionStart));
|
|
47
68
|
}
|
|
48
69
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
70
|
+
|
|
71
|
+
var checkMinMax = function checkMinMax(event, value) {
|
|
72
|
+
var _event$target, _event$target$value;
|
|
73
|
+
|
|
74
|
+
var clearValue = value !== null && value !== void 0 ? value : event === null || event === void 0 ? void 0 : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : (_event$target$value = _event$target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.replace(/[^0-9]/g, '');
|
|
52
75
|
if (!clearValue) return false;
|
|
76
|
+
|
|
53
77
|
if (clearValue < min) {
|
|
54
78
|
setInputValue("".concat(currencySymbol || '$').concat(formatNumberWithCommas(min)));
|
|
55
79
|
onChange(min);
|
|
56
80
|
return false;
|
|
57
81
|
}
|
|
82
|
+
|
|
58
83
|
if (max && clearValue > max) {
|
|
59
84
|
setInputValue("".concat(currencySymbol || '$').concat(formatNumberWithCommas(max)));
|
|
60
85
|
onChange(max);
|
|
61
86
|
return false;
|
|
62
87
|
}
|
|
88
|
+
|
|
63
89
|
return true;
|
|
64
90
|
};
|
|
65
|
-
|
|
91
|
+
|
|
92
|
+
(0, _react.useEffect)(function () {
|
|
66
93
|
var _inputValue$toString;
|
|
67
|
-
|
|
94
|
+
|
|
95
|
+
if (value && value.toString() !== (inputValue === null || inputValue === void 0 ? void 0 : (_inputValue$toString = inputValue.toString()) === null || _inputValue$toString === void 0 ? void 0 : _inputValue$toString.replace(/[^0-9]/g, ''))) {
|
|
68
96
|
if (checkMinMax(null, value)) setInputValue("".concat(currencySymbol || '$').concat(formatNumberWithCommas(value)));
|
|
69
97
|
}
|
|
70
98
|
}, [value]);
|
|
71
99
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
72
100
|
className: (0, _classnames.default)('input-currency-box', className, {
|
|
73
|
-
disabled,
|
|
101
|
+
disabled: disabled,
|
|
74
102
|
'input-currency__error': error
|
|
75
103
|
})
|
|
76
104
|
}, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
@@ -84,4 +112,6 @@ const InputCurrency = _ref => {
|
|
|
84
112
|
onBlur: checkMinMax
|
|
85
113
|
}, attributesOfNativeInput)));
|
|
86
114
|
};
|
|
87
|
-
|
|
115
|
+
|
|
116
|
+
var _default = InputCurrency;
|
|
117
|
+
exports.default = _default;
|