intelicoreact 1.3.22 → 1.3.24
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 +5 -8
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.scss +9 -9
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +6 -9
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.scss +8 -10
- package/dist/Atomic/FormElements/Calendar/Calendar.js +31 -33
- package/dist/Atomic/FormElements/Calendar/Calendar.scss +23 -27
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +4 -4
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.scss +16 -19
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +1 -1
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.scss +2 -2
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +53 -53
- package/dist/Atomic/FormElements/Datepicker/Datepicker.scss +0 -8
- package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +20 -20
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +81 -83
- package/dist/Atomic/FormElements/Dropdown/Dropdown.scss +141 -95
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +1 -1
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.scss +3 -3
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +30 -28
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.scss +54 -18
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +4 -4
- package/dist/Atomic/FormElements/FileLoader/FileLoader.scss +31 -30
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +12 -12
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +3 -3
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +8 -8
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.scss +44 -29
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +17 -15
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +15 -15
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.scss +24 -21
- package/dist/Atomic/FormElements/Input/Input.js +43 -45
- package/dist/Atomic/FormElements/Input/Input.scss +18 -18
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +19 -19
- package/dist/Atomic/FormElements/InputColor/InputColor.js +7 -9
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +12 -12
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.scss +9 -6
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +42 -42
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.scss +95 -95
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +10 -10
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +81 -81
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +14 -14
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +4 -4
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +54 -54
- package/dist/Atomic/FormElements/InputLink/InputLink.js +11 -13
- package/dist/Atomic/FormElements/InputLink/InputLink.scss +5 -5
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +2 -2
- package/dist/Atomic/FormElements/InputMask/InputMask.js +66 -67
- package/dist/Atomic/FormElements/InputMask/InputMask.scss +10 -10
- package/dist/Atomic/FormElements/InputMask/config.js +9 -9
- package/dist/Atomic/FormElements/InputMask/functions.js +8 -7
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +42 -42
- package/dist/Atomic/FormElements/InputMask2/InputMask2.scss +13 -12
- package/dist/Atomic/FormElements/InputMask2/config.js +9 -9
- package/dist/Atomic/FormElements/InputMask2/functions.js +8 -7
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +50 -50
- package/dist/Atomic/FormElements/InputMask3/InputMask3.scss +13 -12
- package/dist/Atomic/FormElements/InputMask3/config.js +9 -9
- package/dist/Atomic/FormElements/InputMask3/functions.js +8 -7
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +7 -9
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.scss +34 -31
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +23 -23
- package/dist/Atomic/FormElements/InputsRow/InputsRow.scss +4 -5
- package/dist/Atomic/FormElements/Label/Label.js +2 -2
- package/dist/Atomic/FormElements/Label/Label.scss +2 -2
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +69 -69
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.scss +8 -9
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +2 -2
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.scss +2 -2
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +27 -27
- package/dist/Atomic/FormElements/NumericInput/NumericInput.scss +18 -18
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +3 -3
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.scss +1 -0
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +6 -6
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.scss +1 -0
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +2 -2
- package/dist/Atomic/FormElements/RadioInput/RadioInput.scss +4 -8
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +7 -7
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.scss +26 -25
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +24 -24
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.scss +17 -19
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +30 -30
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.scss +5 -5
- package/dist/Atomic/FormElements/RangeList/RangeList.js +27 -27
- package/dist/Atomic/FormElements/RangeList/RangeList.scss +23 -23
- package/dist/Atomic/FormElements/RangeList/partial/AnyOuterClass.scss +5 -4
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +1 -1
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +31 -31
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.scss +19 -24
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.stories.scss +7 -7
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider.stories.scss +8 -8
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +22 -22
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.scss +165 -91
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +1 -1
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.scss +2 -2
- package/dist/Atomic/FormElements/Switcher/Switcher.js +1 -1
- package/dist/Atomic/FormElements/Switcher/Switcher.scss +10 -12
- package/dist/Atomic/FormElements/Switcher/partial/AnyOuterClass.scss +2 -2
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +4 -6
- package/dist/Atomic/FormElements/SwitcherCheckbox/partial/AnyOuterClass.scss +2 -2
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +2 -2
- package/dist/Atomic/FormElements/SwitcherHide/partial/AnyOuterClass.scss +2 -2
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +4 -4
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.scss +1 -1
- package/dist/Atomic/FormElements/SwitcherRadio/partial/AnyOuterClass.scss +2 -2
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +5 -5
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +2 -2
- package/dist/Atomic/FormElements/SwitcherRangeList/partial/AnyOuterClass.scss +6 -6
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +9 -9
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.scss +2 -3
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/AnyOuterClass.scss +2 -2
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +100 -100
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +5 -5
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.scss +2 -3
- package/dist/Atomic/FormElements/SwitcherTextarea/partial/AnyOuterClass.scss +4 -4
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +67 -68
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.scss +103 -64
- package/dist/Atomic/FormElements/Text/Text.js +13 -13
- package/dist/Atomic/FormElements/Text/Text.scss +0 -1
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +4 -4
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.scss +15 -15
- package/dist/Atomic/FormElements/Textarea/Textarea.js +2 -2
- package/dist/Atomic/FormElements/Textarea/Textarea.scss +7 -8
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +3 -3
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.scss +5 -6
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +9 -9
- package/dist/Atomic/FormElements/TimeRange/TimeRange.scss +1 -1
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +36 -37
- package/dist/Atomic/FormElements/UserContacts/partial/AnyOuterClass.scss +5 -6
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +3 -3
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.scss +77 -59
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +3 -3
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.scss +9 -10
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/AnyOuterClass.scss +16 -14
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +18 -18
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +6 -6
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.scss +9 -10
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/AnyOuterClass.scss +16 -14
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +14 -14
- package/dist/Atomic/Layout/Header/Header.js +11 -11
- package/dist/Atomic/Layout/Header/Header.scss +9 -10
- package/dist/Atomic/Layout/MainMenu/MainMenu.js +17 -18
- package/dist/Atomic/Layout/MainMenu/MainMenu.scss +14 -17
- package/dist/Atomic/Layout/Spinner/Spinner.js +4 -4
- package/dist/Atomic/Layout/Spinner/Spinner.scss +3 -3
- package/dist/Atomic/UI/Accordion/Accordion.js +7 -7
- package/dist/Atomic/UI/Accordion/Accordion.scss +11 -11
- package/dist/Atomic/UI/Accordion/AccordionItem.js +12 -12
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +22 -23
- package/dist/Atomic/UI/AccordionTable/AccordionTable.scss +33 -38
- package/dist/Atomic/UI/AccordionText/AccordionText.js +3 -3
- package/dist/Atomic/UI/AccordionText/AccordionText.scss +18 -10
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +31 -32
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +5 -5
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.scss +19 -18
- package/dist/Atomic/UI/Alert/Alert.js +5 -5
- package/dist/Atomic/UI/Alert/Alert.scss +21 -21
- package/dist/Atomic/UI/Arrow/Arrow.js +5 -5
- package/dist/Atomic/UI/Box/Box.js +10 -10
- package/dist/Atomic/UI/Box/Box.scss +2 -4
- package/dist/Atomic/UI/Button/Button.js +9 -9
- package/dist/Atomic/UI/Button/Button.scss +34 -34
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +4 -4
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.scss +1 -1
- package/dist/Atomic/UI/Chart/Chart.js +16 -16
- package/dist/Atomic/UI/Chart/Chart.scss +4 -4
- package/dist/Atomic/UI/Chart/partial/AnyOuterClass.scss +10 -14
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +30 -30
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +3 -3
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.scss +1 -1
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +15 -15
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +28 -28
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +2 -2
- package/dist/Atomic/UI/Chart/partial/utils.js +4 -4
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +9 -9
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.scss +7 -9
- package/dist/Atomic/UI/DateTime/DateTime.js +6 -6
- package/dist/Atomic/UI/DateTime/DateTime.scss +1 -1
- package/dist/Atomic/UI/DateTime/partial/AnyOuterClass.scss +2 -2
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +4 -4
- package/dist/Atomic/UI/DebugContainer/DebugContainer.scss +15 -9
- package/dist/Atomic/UI/DoubleString/DoubleString.js +6 -6
- package/dist/Atomic/UI/DoubleString/DoubleString.scss +11 -5
- package/dist/Atomic/UI/DoubleString/partial/AnyOuterClass.scss +4 -4
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +1 -1
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +48 -48
- package/dist/Atomic/UI/ExampleChartIntegration/partial/AnyOuterClass.scss +10 -15
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +18 -18
- package/dist/Atomic/UI/Hint/Hint.js +40 -41
- package/dist/Atomic/UI/Hint/Hint.scss +12 -11
- package/dist/Atomic/UI/Modal/Modal.js +28 -36
- package/dist/Atomic/UI/Modal/Modal.scss +42 -43
- package/dist/Atomic/UI/Modal/ModalHOC.js +2 -5
- package/dist/Atomic/UI/Modal/ModalMobile.scss +18 -11
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +2 -2
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +6 -6
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +8 -8
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +1 -1
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.scss +5 -5
- package/dist/Atomic/UI/MonoAccordion/partial/AnyOuterClass.scss +4 -5
- package/dist/Atomic/UI/NavLine/NavLine.js +26 -26
- package/dist/Atomic/UI/NavLine/NavLine.scss +34 -36
- package/dist/Atomic/UI/NavLine/Tabs.js +38 -38
- package/dist/Atomic/UI/PageTitle/PageTitle.js +1 -1
- package/dist/Atomic/UI/PageTitle/PageTitle.scss +7 -7
- package/dist/Atomic/UI/PieChart/PieChart.js +4 -4
- package/dist/Atomic/UI/PieChart/PieChart.scss +21 -10
- package/dist/Atomic/UI/Price/Price.js +2 -2
- package/dist/Atomic/UI/PriceRange/PriceRange.js +2 -2
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +10 -10
- package/dist/Atomic/UI/ProgressLine/ProgressLine.scss +36 -40
- package/dist/Atomic/UI/Status/Status.js +6 -6
- package/dist/Atomic/UI/Status/Status.scss +19 -19
- package/dist/Atomic/UI/Table/Partials/TdCell.js +11 -11
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +3 -3
- package/dist/Atomic/UI/Table/Partials/TdRow.js +6 -6
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +1 -1
- package/dist/Atomic/UI/Table/Table.js +3 -3
- package/dist/Atomic/UI/Table/Table.scss +11 -13
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +8 -8
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +2 -2
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +1 -3
- package/dist/Atomic/UI/Table/TdTypes/TdTypes.scss +9 -8
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +10 -13
- package/dist/Atomic/UI/Tag/Tag.js +6 -6
- package/dist/Atomic/UI/Tag/Tag.scss +12 -11
- package/dist/Atomic/UI/TagList/TagList.js +8 -8
- package/dist/Atomic/UI/TagList/TagList.scss +1 -1
- package/dist/Atomic/UI/UserBox/UserBox.js +5 -5
- package/dist/Atomic/UI/UserBox/UserBox.scss +9 -9
- package/dist/Classes/AbortableFetch.js +35 -35
- package/dist/Classes/AnimatedHandler.js +3 -3
- package/dist/Classes/RESTAPI/index.js +9 -9
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +37 -37
- package/dist/Classes/RESTAPI/partials/ApiBase.js +7 -7
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +4 -4
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +4 -4
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +31 -31
- package/dist/Classes/RESTAPI/partials/Utils.js +15 -15
- package/dist/Classes/RESTAPI/partials/_utils.js +14 -14
- package/dist/Constants/index.constants.js +10 -10
- package/dist/Functions/Portal.js +1 -1
- package/dist/Functions/customEventListener.js +5 -5
- package/dist/Functions/fieldValueFormatters.js +66 -82
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +4 -4
- package/dist/Functions/locale/createTranslator.js +4 -15
- package/dist/Functions/operations.js +14 -14
- package/dist/Functions/presets/inputMaskPresets.js +34 -34
- package/dist/Functions/presets/inputPresets.js +3 -3
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +2 -2
- package/dist/Functions/schemas.js +8 -8
- package/dist/Functions/useBodyScrollLock.js +20 -0
- package/dist/Functions/useClickOutside.js +2 -2
- package/dist/Functions/useFieldFocus.js +3 -7
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +1 -1
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +11 -11
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +1 -1
- package/dist/Functions/useFormTools/functions/General.js +9 -9
- package/dist/Functions/useFormTools/functions/RenderFields.js +6 -6
- package/dist/Functions/useFormTools/index.js +18 -20
- package/dist/Functions/useInputHighlightError.js +5 -5
- package/dist/Functions/useKeyPress/useHandleKeyPress.js +44 -0
- package/dist/Functions/useKeyPress/useKeyPress.js +38 -0
- package/dist/Functions/useLocalStorage.js +2 -13
- package/dist/Functions/useLocationParams.js +2 -2
- package/dist/Functions/useMetaInfo.js +7 -7
- package/dist/Functions/useMouseUpOutside.js +2 -2
- package/dist/Functions/useOnlineStatus.js +5 -14
- package/dist/Functions/usePasswordChecker.js +26 -26
- package/dist/Functions/usePrevious.js +0 -12
- package/dist/Functions/useResize.js +6 -24
- package/dist/Functions/useScrollTo.js +1 -1
- package/dist/Functions/useToggle.js +1 -1
- package/dist/Functions/utils.js +64 -143
- package/dist/Molecular/FormElement/FormElement.js +1 -1
- package/dist/Molecular/FormElement/FormElement.scss +4 -3
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +14 -14
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +2 -2
- package/dist/Molecular/InputAddress/InputAddress.js +47 -46
- package/dist/Molecular/InputAddress/InputAddress.scss +176 -112
- package/dist/Molecular/InputPassword/InputPassword.js +11 -15
- package/dist/Molecular/InputPassword/InputPassword.scss +8 -7
- package/dist/scss/_fonts.scss +60 -36
- package/dist/scss/_vars.scss +18 -18
- package/dist/scss/main.scss +4 -4
- package/package.json +1 -1
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
10
|
var _momentTimezone = _interopRequireDefault(require("moment-timezone"));
|
|
10
11
|
var _reactInputMask = _interopRequireDefault(require("react-input-mask"));
|
|
11
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
-
var _Calendar = _interopRequireDefault(require("../Calendar/Calendar"));
|
|
13
12
|
var _useClickOutside = require("../../../Functions/useClickOutside");
|
|
13
|
+
var _Calendar = _interopRequireDefault(require("../Calendar/Calendar"));
|
|
14
14
|
require("./InputCalendar.scss");
|
|
15
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -19,12 +19,12 @@ const InputCalendar = _ref => {
|
|
|
19
19
|
value,
|
|
20
20
|
minDate,
|
|
21
21
|
maxDate,
|
|
22
|
-
format =
|
|
22
|
+
format = "MM/DD/YYYY",
|
|
23
23
|
isDontLimitFuture,
|
|
24
24
|
onChange,
|
|
25
|
-
className =
|
|
26
|
-
placeholder =
|
|
27
|
-
mask =
|
|
25
|
+
className = "",
|
|
26
|
+
placeholder = "mm/dd/yyyy",
|
|
27
|
+
mask = "99/99/9999",
|
|
28
28
|
isListTop,
|
|
29
29
|
disabled,
|
|
30
30
|
disabledFormattedMaxDate = false,
|
|
@@ -37,10 +37,10 @@ const InputCalendar = _ref => {
|
|
|
37
37
|
const [isOpenedByEnter, setOpenedByEnter] = (0, _react.useState)(false);
|
|
38
38
|
const calendarRef = (0, _react.useRef)(null);
|
|
39
39
|
const inputRef = (0, _react.useRef)(null);
|
|
40
|
-
const formattedMinDate = (0, _momentTimezone.default)(minDate, format).format(format) !==
|
|
41
|
-
const formattedMaxDate = (0, _momentTimezone.default)(maxDate, format).format(format) !==
|
|
42
|
-
const momentMinDate = (0, _momentTimezone.default)(formattedMinDate, format).startOf(
|
|
43
|
-
const momentMaxDate = (0, _momentTimezone.default)(formattedMaxDate, format).startOf(
|
|
40
|
+
const formattedMinDate = (0, _momentTimezone.default)(minDate, format).format(format) !== "Invalid date" ? (0, _momentTimezone.default)(minDate, format).format(format) : null;
|
|
41
|
+
const formattedMaxDate = (0, _momentTimezone.default)(maxDate, format).format(format) !== "Invalid date" ? (0, _momentTimezone.default)(maxDate, format).format(format) : null;
|
|
42
|
+
const momentMinDate = (0, _momentTimezone.default)(formattedMinDate, format).startOf("day");
|
|
43
|
+
const momentMaxDate = (0, _momentTimezone.default)(formattedMaxDate, format).startOf("day");
|
|
44
44
|
(0, _useClickOutside.useClickOutside)(calendarRef, () => setIsOpened(false));
|
|
45
45
|
const changeInputValue = val => {
|
|
46
46
|
if (onChange) onChange(val);
|
|
@@ -49,20 +49,20 @@ const InputCalendar = _ref => {
|
|
|
49
49
|
if (onChange) onChange(val);
|
|
50
50
|
};
|
|
51
51
|
const getCalendarValue = value => {
|
|
52
|
-
const date = (0, _momentTimezone.default)(value).format(
|
|
53
|
-
if (date !==
|
|
54
|
-
return (0, _momentTimezone.default)(new Date()).format(
|
|
52
|
+
const date = (0, _momentTimezone.default)(value).format("L");
|
|
53
|
+
if (date !== "Invalid date") return date;
|
|
54
|
+
return (0, _momentTimezone.default)(new Date()).format("L");
|
|
55
55
|
};
|
|
56
56
|
(0, _react.useEffect)(() => {
|
|
57
|
-
if (typeof isOpened ===
|
|
57
|
+
if (typeof isOpened === "boolean" && !isOpened) {
|
|
58
58
|
handleBlur();
|
|
59
59
|
}
|
|
60
60
|
}, [isOpened]);
|
|
61
61
|
const handleBlur = e => {
|
|
62
62
|
var _inputRef$current;
|
|
63
63
|
let value = inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value;
|
|
64
|
-
if ((0, _momentTimezone.default)(value, format).format(format) ===
|
|
65
|
-
if (value && typeof isOpened ===
|
|
64
|
+
if ((0, _momentTimezone.default)(value, format).format(format) === "Invalid date" || value.indexOf("_") > -1) value = "";
|
|
65
|
+
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
66
|
};
|
|
67
67
|
const onKeyDown = e => {
|
|
68
68
|
if (isOpened && [9, 13].includes(e.keyCode)) {
|
|
@@ -73,7 +73,7 @@ const InputCalendar = _ref => {
|
|
|
73
73
|
};
|
|
74
74
|
const onKeyUp = e => {
|
|
75
75
|
var _e$target$value;
|
|
76
|
-
const isValidLenght = ((_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.replace(/[^0-9]/g,
|
|
76
|
+
const isValidLenght = ((_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.replace(/[^0-9]/g, "").length) === 8;
|
|
77
77
|
if ([9, 13].includes(e.keyCode)) {
|
|
78
78
|
setIsOpened(true);
|
|
79
79
|
setOpenedByEnter(true);
|
|
@@ -88,8 +88,8 @@ const InputCalendar = _ref => {
|
|
|
88
88
|
};
|
|
89
89
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
90
90
|
"data-testid": "inputCalendar--key-".concat(testId, "--container"),
|
|
91
|
-
className: (0, _classnames.default)(
|
|
92
|
-
|
|
91
|
+
className: (0, _classnames.default)("input__wrap calendar-container", className, {
|
|
92
|
+
"calendar-container_disabled": disabled
|
|
93
93
|
}),
|
|
94
94
|
ref: calendarRef
|
|
95
95
|
}, /*#__PURE__*/_react.default.createElement(_reactInputMask.default, {
|
|
@@ -8,11 +8,9 @@ exports.default = void 0;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
var _Input = _interopRequireDefault(require("../Input/Input"));
|
|
12
11
|
var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
|
|
12
|
+
var _Input = _interopRequireDefault(require("../Input/Input"));
|
|
13
13
|
require("./InputColor.scss");
|
|
14
|
-
/* eslint-disable react/display-name */
|
|
15
|
-
|
|
16
14
|
const InputColor = _ref => {
|
|
17
15
|
let {
|
|
18
16
|
value,
|
|
@@ -23,8 +21,8 @@ const InputColor = _ref => {
|
|
|
23
21
|
withSharp: false,
|
|
24
22
|
isTurnOn: true
|
|
25
23
|
},
|
|
26
|
-
initialHexOfColorBlock =
|
|
27
|
-
testId =
|
|
24
|
+
initialHexOfColorBlock = "#9AA0B9",
|
|
25
|
+
testId = "",
|
|
28
26
|
withDelete = true,
|
|
29
27
|
...args
|
|
30
28
|
} = _ref;
|
|
@@ -41,14 +39,14 @@ const InputColor = _ref => {
|
|
|
41
39
|
inputValue,
|
|
42
40
|
withSharp: withSharp
|
|
43
41
|
});
|
|
44
|
-
if (symbolsLimit && inputValue.length >
|
|
42
|
+
if (symbolsLimit && inputValue.length > Number(symbolsLimit)) inputValue = inputValue.substring(0, Number(symbolsLimit));
|
|
45
43
|
onChange === null || onChange === void 0 || onChange(inputValue);
|
|
46
44
|
}
|
|
47
45
|
};
|
|
48
46
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
49
|
-
className: (0, _classnames.default)(
|
|
47
|
+
className: (0, _classnames.default)("inputColor", className)
|
|
50
48
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
51
|
-
className: (0, _classnames.default)(
|
|
49
|
+
className: (0, _classnames.default)("inputColor__color-block"),
|
|
52
50
|
style: {
|
|
53
51
|
backgroundColor: value && value.length === 7 ? value : initialHexOfColorBlock
|
|
54
52
|
}
|
|
@@ -58,7 +56,7 @@ const InputColor = _ref => {
|
|
|
58
56
|
onChange: handle.change,
|
|
59
57
|
symbolsLimit: symbolsLimit || 7,
|
|
60
58
|
testId: "inputColor--key-".concat(testId),
|
|
61
|
-
className: (0, _classnames.default)(
|
|
59
|
+
className: (0, _classnames.default)("input inputColor__input"),
|
|
62
60
|
type: "text"
|
|
63
61
|
})));
|
|
64
62
|
};
|
|
@@ -23,18 +23,18 @@ const InputCurrency = _ref => {
|
|
|
23
23
|
max,
|
|
24
24
|
error
|
|
25
25
|
} = _ref;
|
|
26
|
-
const [inputValue, setInputValue] = (0, _react.useState)(currencySymbol ||
|
|
26
|
+
const [inputValue, setInputValue] = (0, _react.useState)(currencySymbol || "$");
|
|
27
27
|
const inputRef = (0, _react.useRef)(null);
|
|
28
28
|
const formatNumberWithCommas = number => {
|
|
29
|
-
return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g,
|
|
29
|
+
return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
30
30
|
};
|
|
31
31
|
const formatCurrencyInput = event => {
|
|
32
32
|
let newValue = event.target.value;
|
|
33
|
-
newValue = newValue.replace(/[^0-9]/g,
|
|
33
|
+
newValue = newValue.replace(/[^0-9]/g, "");
|
|
34
34
|
newValue = formatNumberWithCommas(newValue);
|
|
35
|
-
newValue = "".concat(currencySymbol ||
|
|
35
|
+
newValue = "".concat(currencySymbol || "$").concat(newValue);
|
|
36
36
|
setInputValue(newValue);
|
|
37
|
-
onChange(newValue.replace(/[^0-9]/g,
|
|
37
|
+
onChange(newValue.replace(/[^0-9]/g, ""));
|
|
38
38
|
};
|
|
39
39
|
const onInputClick = () => {
|
|
40
40
|
if (!inputValue) {
|
|
@@ -48,15 +48,15 @@ const InputCurrency = _ref => {
|
|
|
48
48
|
};
|
|
49
49
|
const checkMinMax = (event, value) => {
|
|
50
50
|
var _event$target;
|
|
51
|
-
const clearValue = value !== null && value !== void 0 ? value : event === null || event === void 0 || (_event$target = event.target) === null || _event$target === void 0 || (_event$target = _event$target.value) === null || _event$target === void 0 ? void 0 : _event$target.replace(/[^0-9]/g,
|
|
51
|
+
const clearValue = value !== null && value !== void 0 ? value : event === null || event === void 0 || (_event$target = event.target) === null || _event$target === void 0 || (_event$target = _event$target.value) === null || _event$target === void 0 ? void 0 : _event$target.replace(/[^0-9]/g, "");
|
|
52
52
|
if (!clearValue) return false;
|
|
53
53
|
if (clearValue < min) {
|
|
54
|
-
setInputValue("".concat(currencySymbol ||
|
|
54
|
+
setInputValue("".concat(currencySymbol || "$").concat(formatNumberWithCommas(min)));
|
|
55
55
|
onChange(min);
|
|
56
56
|
return false;
|
|
57
57
|
}
|
|
58
58
|
if (max && clearValue > max) {
|
|
59
|
-
setInputValue("".concat(currencySymbol ||
|
|
59
|
+
setInputValue("".concat(currencySymbol || "$").concat(formatNumberWithCommas(max)));
|
|
60
60
|
onChange(max);
|
|
61
61
|
return false;
|
|
62
62
|
}
|
|
@@ -64,14 +64,14 @@ const InputCurrency = _ref => {
|
|
|
64
64
|
};
|
|
65
65
|
(0, _react.useEffect)(() => {
|
|
66
66
|
var _inputValue$toString;
|
|
67
|
-
if (value && value.toString() !== (inputValue === null || inputValue === void 0 || (_inputValue$toString = inputValue.toString()) === null || _inputValue$toString === void 0 ? void 0 : _inputValue$toString.replace(/[^0-9]/g,
|
|
68
|
-
if (checkMinMax(null, value)) setInputValue("".concat(currencySymbol ||
|
|
67
|
+
if (value && value.toString() !== (inputValue === null || inputValue === void 0 || (_inputValue$toString = inputValue.toString()) === null || _inputValue$toString === void 0 ? void 0 : _inputValue$toString.replace(/[^0-9]/g, ""))) {
|
|
68
|
+
if (checkMinMax(null, value)) setInputValue("".concat(currencySymbol || "$").concat(formatNumberWithCommas(value)));
|
|
69
69
|
}
|
|
70
70
|
}, [value]);
|
|
71
71
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
72
|
-
className: (0, _classnames.default)(
|
|
72
|
+
className: (0, _classnames.default)("input-currency-box", className, {
|
|
73
73
|
disabled,
|
|
74
|
-
|
|
74
|
+
"input-currency__error": error
|
|
75
75
|
})
|
|
76
76
|
}, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
77
77
|
className: "input-currency",
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
.input-currency-box {
|
|
1
|
+
.input-currency-box {
|
|
2
|
+
}
|
|
2
3
|
|
|
3
4
|
.input-currency {
|
|
4
|
-
|
|
5
|
+
box-sizing: border-box;
|
|
5
6
|
height: 40px;
|
|
6
7
|
max-height: 40px;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
background: #F8FBFF;
|
|
8
|
+
padding: 0 16px;
|
|
9
|
+
|
|
10
10
|
font-size: 16px;
|
|
11
11
|
font-weight: 400;
|
|
12
12
|
line-height: 24px;
|
|
13
13
|
letter-spacing: 0.2px;
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
border: 1px solid #e1e8f1;
|
|
16
|
+
border-radius: 6px;
|
|
17
|
+
background: #f8fbff;
|
|
15
18
|
}
|
|
@@ -9,10 +9,10 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _momentTimezone = _interopRequireDefault(require("moment-timezone"));
|
|
12
|
-
var _dependencies = require("./dependencies");
|
|
13
12
|
var _useIsMobile = _interopRequireDefault(require("../../../Functions/useIsMobile"));
|
|
14
|
-
var _OpenedPart = _interopRequireDefault(require("./components/OpenedPart"));
|
|
15
13
|
var _Arrow = _interopRequireDefault(require("../../UI/Arrow/Arrow"));
|
|
14
|
+
var _OpenedPart = _interopRequireDefault(require("./components/OpenedPart"));
|
|
15
|
+
var _dependencies = require("./dependencies");
|
|
16
16
|
require("./InputDateRange.scss");
|
|
17
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -40,7 +40,7 @@ const InputDateRange = props => {
|
|
|
40
40
|
testId,
|
|
41
41
|
minDate = null,
|
|
42
42
|
maxDate = null,
|
|
43
|
-
minMaxDateParseFormat =
|
|
43
|
+
minMaxDateParseFormat = "MM/DD/YYYY",
|
|
44
44
|
isDontLimitFuture,
|
|
45
45
|
isListTop,
|
|
46
46
|
isAltArrows
|
|
@@ -50,8 +50,8 @@ const InputDateRange = props => {
|
|
|
50
50
|
} = (0, _useIsMobile.default)();
|
|
51
51
|
const formatedMinDate = checkFormat(minDate, minMaxDateParseFormat);
|
|
52
52
|
const formatedMaxDate = checkFormat(maxDate, minMaxDateParseFormat);
|
|
53
|
-
const momentMinDate = (0, _momentTimezone.default)(formatedMinDate, minMaxDateParseFormat).startOf(
|
|
54
|
-
const momentMaxDate = (0, _momentTimezone.default)(formatedMaxDate, minMaxDateParseFormat).startOf(
|
|
53
|
+
const momentMinDate = (0, _momentTimezone.default)(formatedMinDate, minMaxDateParseFormat).startOf("day");
|
|
54
|
+
const momentMaxDate = (0, _momentTimezone.default)(formatedMaxDate, minMaxDateParseFormat).startOf("day");
|
|
55
55
|
const actualValues = (0, _dependencies.getActualDateRange)(value);
|
|
56
56
|
const {
|
|
57
57
|
isToggled,
|
|
@@ -61,7 +61,7 @@ const InputDateRange = props => {
|
|
|
61
61
|
} = (0, _dependencies.useToggle)(false);
|
|
62
62
|
const [current, setCurrent] = (0, _react.useState)(actualValues === null || actualValues === void 0 ? void 0 : actualValues.intervalKey);
|
|
63
63
|
const [isCompare, setIsCompare] = (0, _react.useState)(actualValues === null || actualValues === void 0 ? void 0 : actualValues.compare);
|
|
64
|
-
const dropdownContainers = document.getElementsByClassName(
|
|
64
|
+
const dropdownContainers = document.getElementsByClassName("dropdown__container");
|
|
65
65
|
const ref = !isUseAbs && !isMobile ? (0, _dependencies.useClickOutside)(toggleOff, dropdownContainers) : (0, _react.useRef)(null);
|
|
66
66
|
const internalContainerRef = (0, _react.useRef)(null);
|
|
67
67
|
const [dateRangeContainerId, setDateRangeContainerId] = (0, _react.useState)(Math.random().toString(16).slice(2));
|
|
@@ -88,7 +88,7 @@ const InputDateRange = props => {
|
|
|
88
88
|
const SYMBOLS_QUANTITY_IF_TIME_ADDED = 13;
|
|
89
89
|
if (!actualValues.start && value.start) {
|
|
90
90
|
actualValues.start = value.start;
|
|
91
|
-
actualValues.end = value.end ||
|
|
91
|
+
actualValues.end = value.end || "";
|
|
92
92
|
}
|
|
93
93
|
const {
|
|
94
94
|
start,
|
|
@@ -97,38 +97,38 @@ const InputDateRange = props => {
|
|
|
97
97
|
if (!start || !end) return null;
|
|
98
98
|
const startTime = (0, _momentTimezone.default)(start).format(_dependencies.MAIN_TIME_FORMAT);
|
|
99
99
|
const endTime = (0, _momentTimezone.default)(end).format(_dependencies.MAIN_TIME_FORMAT);
|
|
100
|
-
const firstPart = "".concat((0, _momentTimezone.default)(start).format(
|
|
101
|
-
const secondPart = "".concat((endTime !==
|
|
102
|
-
const getClasses = base => (0, _classnames.default)(
|
|
103
|
-
|
|
100
|
+
const firstPart = "".concat((0, _momentTimezone.default)(start).format("ll"), " ").concat(startTime !== "00:00" ? "(".concat(startTime, ")") : "");
|
|
101
|
+
const secondPart = "".concat((endTime !== "00:00" ? (0, _momentTimezone.default)(end) : (0, _momentTimezone.default)(end).subtract(1, "days")).format("ll"), " ").concat(endTime !== "00:00" ? "(".concat(endTime, ")") : "");
|
|
102
|
+
const getClasses = base => (0, _classnames.default)("date-range-input__range-text", {
|
|
103
|
+
"date-range-input__range-text_little": base.length > SYMBOLS_QUANTITY_IF_TIME_ADDED
|
|
104
104
|
});
|
|
105
105
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
106
106
|
className: getClasses(firstPart)
|
|
107
|
-
}, firstPart, endTime ===
|
|
107
|
+
}, firstPart, endTime === "00:00" && (0, _momentTimezone.default)(end).isSame((0, _momentTimezone.default)(start).add(1, "days"), "day") ? "" : " - "), endTime === "00:00" && (0, _momentTimezone.default)(end).isSame((0, _momentTimezone.default)(start).add(1, "days"), "day") ? null : /*#__PURE__*/_react.default.createElement("span", {
|
|
108
108
|
className: getClasses(secondPart)
|
|
109
109
|
}, secondPart));
|
|
110
110
|
};
|
|
111
111
|
const slideInterval = function () {
|
|
112
112
|
var _getActualDateRange;
|
|
113
|
-
let direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
113
|
+
let direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "forward";
|
|
114
114
|
const {
|
|
115
115
|
start,
|
|
116
116
|
end
|
|
117
117
|
} = actualValues;
|
|
118
|
-
const intervalHoursCount = (0, _momentTimezone.default)(end).diff(start,
|
|
118
|
+
const intervalHoursCount = (0, _momentTimezone.default)(end).diff(start, "hours");
|
|
119
119
|
let newEnd;
|
|
120
120
|
let newStart;
|
|
121
121
|
const endHours = (0, _momentTimezone.default)(end).hours();
|
|
122
122
|
const startHours = (0, _momentTimezone.default)(start).hours();
|
|
123
|
-
if (direction ===
|
|
124
|
-
newStart = (0, _momentTimezone.default)(end).add(endHours === 0 ? 0 : 1,
|
|
125
|
-
newEnd = (0, _momentTimezone.default)(newStart).add(intervalHoursCount,
|
|
123
|
+
if (direction === "forward") {
|
|
124
|
+
newStart = (0, _momentTimezone.default)(end).add(endHours === 0 ? 0 : 1, "day").hours(startHours).toDate();
|
|
125
|
+
newEnd = (0, _momentTimezone.default)(newStart).add(intervalHoursCount, "hours");
|
|
126
126
|
} else {
|
|
127
|
-
newEnd = (0, _momentTimezone.default)(start).subtract(endHours === 0 ? 0 : 1,
|
|
128
|
-
newStart = (0, _momentTimezone.default)(newEnd).subtract(intervalHoursCount,
|
|
127
|
+
newEnd = (0, _momentTimezone.default)(start).subtract(endHours === 0 ? 0 : 1, "day").hours(endHours).toDate();
|
|
128
|
+
newStart = (0, _momentTimezone.default)(newEnd).subtract(intervalHoursCount, "hours");
|
|
129
129
|
}
|
|
130
|
-
const startPrevDate = (0, _momentTimezone.default)(newStart).subtract(intervalHoursCount,
|
|
131
|
-
const endPrevDate = (0, _momentTimezone.default)(newEnd).subtract(1,
|
|
130
|
+
const startPrevDate = (0, _momentTimezone.default)(newStart).subtract(intervalHoursCount, "hours").subtract(1, "seconds");
|
|
131
|
+
const endPrevDate = (0, _momentTimezone.default)(newEnd).subtract(1, "seconds");
|
|
132
132
|
handleChange({
|
|
133
133
|
...value,
|
|
134
134
|
intervalKey: (_getActualDateRange = (0, _dependencies.getActualDateRange)({
|
|
@@ -142,19 +142,19 @@ const InputDateRange = props => {
|
|
|
142
142
|
});
|
|
143
143
|
};
|
|
144
144
|
const handleArrowClick = type => {
|
|
145
|
-
slideInterval(type ===
|
|
145
|
+
slideInterval(type === "right" ? "forward" : "back");
|
|
146
146
|
toggleOff();
|
|
147
147
|
};
|
|
148
148
|
const getParentNode = () => {
|
|
149
149
|
var _document$querySelect;
|
|
150
|
-
return (_document$querySelect = document.querySelector(
|
|
150
|
+
return (_document$querySelect = document.querySelector("div#root")) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector("div#app");
|
|
151
151
|
};
|
|
152
152
|
const initDateRangeContainer = () => {
|
|
153
153
|
var _document$getElementB;
|
|
154
154
|
(_document$getElementB = document.getElementById(dateRangeContainerId)) === null || _document$getElementB === void 0 || _document$getElementB.remove();
|
|
155
|
-
const dateRangeContainer = document.createElement(
|
|
156
|
-
dateRangeContainer.setAttribute(
|
|
157
|
-
dateRangeContainer.classList.add(
|
|
155
|
+
const dateRangeContainer = document.createElement("div");
|
|
156
|
+
dateRangeContainer.setAttribute("id", dateRangeContainerId);
|
|
157
|
+
dateRangeContainer.classList.add("input-date-range__mobile-container");
|
|
158
158
|
getParentNode().append(dateRangeContainer);
|
|
159
159
|
};
|
|
160
160
|
const getDateRangeContainer = () => {
|
|
@@ -169,12 +169,12 @@ const InputDateRange = props => {
|
|
|
169
169
|
}, []);
|
|
170
170
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
171
171
|
ref: internalContainerRef,
|
|
172
|
-
className: (0, _classnames.default)(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
172
|
+
className: (0, _classnames.default)("date-range-input", className, {
|
|
173
|
+
"date-range-input_compact": isCompact,
|
|
174
|
+
"date-range-input_hide-arrows": hideArrows,
|
|
175
|
+
"date-range-input_focused": isToggled,
|
|
176
|
+
"date-range-input_error": error,
|
|
177
|
+
"date-range-input_disabled": disabled
|
|
178
178
|
})
|
|
179
179
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
180
180
|
className: "date-range-input__label"
|
|
@@ -184,15 +184,15 @@ const InputDateRange = props => {
|
|
|
184
184
|
onMouseEnter: isHoverable ? toggleOn : () => null,
|
|
185
185
|
onMouseLeave: isHoverable ? toggleOff : () => null
|
|
186
186
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
187
|
-
className: (0, _classnames.default)(
|
|
188
|
-
|
|
187
|
+
className: (0, _classnames.default)("date-range-input__absolut-wraper", {
|
|
188
|
+
"date-range-input__absolut-wraper_right-position": isOptionsRight
|
|
189
189
|
})
|
|
190
190
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
191
|
-
className: (0, _classnames.default)(
|
|
191
|
+
className: (0, _classnames.default)("date-range-input__static-part")
|
|
192
192
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
193
193
|
id: id,
|
|
194
194
|
"data-testid": "inputDateRange--button-".concat(testId, "--toggleContainer"),
|
|
195
|
-
className: (0, _classnames.default)(
|
|
195
|
+
className: (0, _classnames.default)("date-range-input__toggle-button"),
|
|
196
196
|
disabled: disabled,
|
|
197
197
|
onClick: !disabled && !isHoverable ? toggle : undefined
|
|
198
198
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -200,22 +200,22 @@ const InputDateRange = props => {
|
|
|
200
200
|
}, subLabel && /*#__PURE__*/_react.default.createElement("span", {
|
|
201
201
|
className: "date-range-input__label"
|
|
202
202
|
}, subLabel, ": "), /*#__PURE__*/_react.default.createElement("span", null, (_ref = (txt === null || txt === void 0 ? void 0 : txt.labels) && txt.labels[actualValues === null || actualValues === void 0 ? void 0 : actualValues.intervalKey]) !== null && _ref !== void 0 ? _ref : ((_INTERVALS$actualValu = _dependencies.INTERVALS[actualValues === null || actualValues === void 0 ? void 0 : actualValues.intervalKey]) === null || _INTERVALS$actualValu === void 0 ? void 0 : _INTERVALS$actualValu.label) || _dependencies.CUSTOM_INTERVAL_KEY_TEXT), current !== _dependencies.ALL_TIME_KEY && /*#__PURE__*/_react.default.createElement("span", null, ":")), !isCompact && /*#__PURE__*/_react.default.createElement("div", {
|
|
203
|
-
className: (0, _classnames.default)(
|
|
203
|
+
className: (0, _classnames.default)("date-range-input__range", {})
|
|
204
204
|
}, /*#__PURE__*/_react.default.createElement(Range, null))), !isCompact && !hideArrows && /*#__PURE__*/_react.default.createElement("div", {
|
|
205
|
-
className: (0, _classnames.default)(
|
|
205
|
+
className: (0, _classnames.default)("date-range-input__arrows-block")
|
|
206
206
|
}, /*#__PURE__*/_react.default.createElement(_Arrow.default, {
|
|
207
207
|
testId: testId,
|
|
208
208
|
type: "left",
|
|
209
209
|
className: "date-range-input__arrow",
|
|
210
|
-
onClick: () => handleArrowClick(
|
|
211
|
-
disabled: disabled || (actualValues === null || actualValues === void 0 ? void 0 : actualValues.intervalKey) === _dependencies.ALL_TIME_KEY || formatedMinDate && (0, _momentTimezone.default)(actualValues === null || actualValues === void 0 ? void 0 : actualValues.start).subtract((0, _momentTimezone.default)(actualValues === null || actualValues === void 0 ? void 0 : actualValues.end).diff(actualValues === null || actualValues === void 0 ? void 0 : actualValues.start,
|
|
210
|
+
onClick: () => handleArrowClick("left"),
|
|
211
|
+
disabled: disabled || (actualValues === null || actualValues === void 0 ? void 0 : actualValues.intervalKey) === _dependencies.ALL_TIME_KEY || formatedMinDate && (0, _momentTimezone.default)(actualValues === null || actualValues === void 0 ? void 0 : actualValues.start).subtract((0, _momentTimezone.default)(actualValues === null || actualValues === void 0 ? void 0 : actualValues.end).diff(actualValues === null || actualValues === void 0 ? void 0 : actualValues.start, "hours"), "hours").isBefore(momentMinDate),
|
|
212
212
|
isAlt: isAltArrows
|
|
213
213
|
}), /*#__PURE__*/_react.default.createElement(_Arrow.default, {
|
|
214
214
|
testId: testId,
|
|
215
215
|
type: "right",
|
|
216
216
|
className: "date-range-input__arrow",
|
|
217
|
-
onClick: () => handleArrowClick(
|
|
218
|
-
disabled: disabled || (actualValues === null || actualValues === void 0 ? void 0 : actualValues.intervalKey) === _dependencies.ALL_TIME_KEY || !isDontLimitFuture && (formatedMaxDate ? (0, _momentTimezone.default)(actualValues === null || actualValues === void 0 ? void 0 : actualValues.end).endOf(
|
|
217
|
+
onClick: () => handleArrowClick("right"),
|
|
218
|
+
disabled: disabled || (actualValues === null || actualValues === void 0 ? void 0 : actualValues.intervalKey) === _dependencies.ALL_TIME_KEY || !isDontLimitFuture && (formatedMaxDate ? (0, _momentTimezone.default)(actualValues === null || actualValues === void 0 ? void 0 : actualValues.end).endOf("day").subtract((0, _momentTimezone.default)(actualValues === null || actualValues === void 0 ? void 0 : actualValues.end).diff(actualValues === null || actualValues === void 0 ? void 0 : actualValues.start, "hours"), "hours").isAfter(momentMaxDate.startOf("day")) : (0, _momentTimezone.default)(actualValues === null || actualValues === void 0 ? void 0 : actualValues.end).add((0, _momentTimezone.default)(actualValues === null || actualValues === void 0 ? void 0 : actualValues.end).diff(actualValues === null || actualValues === void 0 ? void 0 : actualValues.start, "hours"), "hours").isAfter((0, _momentTimezone.default)().add(1, "day").startOf("day"))),
|
|
219
219
|
isAlt: isAltArrows
|
|
220
220
|
}))), isToggled && !isUseAbs && /*#__PURE__*/_react.default.createElement(_OpenedPart.default, (0, _extends2.default)({}, props, {
|
|
221
221
|
dateRangeContainerId: dateRangeContainerId,
|