intelicoreact 1.6.2 → 1.6.4
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/ArrayElement.d.ts +13 -0
- package/dist/AsyncReturnType.d.ts +17 -0
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.interface.js +4 -1
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.js +69 -14
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.stories.js +30 -7
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.test.js +43 -34
- package/dist/Atomic/FormElements/ActionAlert/index.js +17 -2
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.interface.js +4 -1
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +26 -11
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.stories.js +35 -12
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.test.js +29 -20
- package/dist/Atomic/FormElements/AdvancedStatus/index.js +17 -2
- package/dist/Atomic/FormElements/Calendar/Calendar.js +109 -53
- package/dist/Atomic/FormElements/Calendar/Calendar.props.js +4 -1
- package/dist/Atomic/FormElements/Calendar/Calendar.stories.js +74 -10
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.interface.js +4 -1
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +27 -12
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.stories.js +39 -16
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.test.js +46 -37
- package/dist/Atomic/FormElements/CheckboxInput/index.js +17 -2
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.interface.js +4 -1
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +24 -9
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.stories.js +33 -10
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.test.js +34 -25
- package/dist/Atomic/FormElements/CheckboxesLine/index.js +17 -2
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +160 -104
- package/dist/Atomic/FormElements/Datepicker/Datepicker.stories.js +31 -8
- package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +89 -33
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +154 -98
- package/dist/Atomic/FormElements/Dropdown/Dropdown.stories.js +82 -18
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +25 -10
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +138 -82
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.stories.js +79 -15
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +69 -13
- package/dist/Atomic/FormElements/FileLoader/FileLoader.stories.js +86 -22
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +69 -13
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +71 -15
- package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.js +91 -35
- package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.stories.js +82 -18
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +40 -25
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.stories.js +79 -15
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +78 -22
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.stories.js +33 -10
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +73 -17
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.stories.js +73 -9
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN_old.js +75 -19
- package/dist/Atomic/FormElements/Input/Input.js +100 -45
- package/dist/Atomic/FormElements/Input/Input.stories.js +73 -9
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +85 -29
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.stories.js +78 -14
- package/dist/Atomic/FormElements/InputColor/InputColor.js +30 -15
- package/dist/Atomic/FormElements/InputColor/InputColor.stories.js +73 -9
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.interface.js +4 -1
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +73 -17
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.stories.js +52 -14
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.test.js +45 -36
- package/dist/Atomic/FormElements/InputCurrency/index.js +16 -1
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +128 -72
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.stories.js +75 -11
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +30 -15
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +182 -126
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +98 -42
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +24 -9
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +144 -53
- package/dist/Atomic/FormElements/InputLink/InputLink.js +76 -20
- package/dist/Atomic/FormElements/InputLink/InputLink.stories.js +73 -9
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +20 -2
- package/dist/Atomic/FormElements/InputMask/InputMask.js +158 -103
- package/dist/Atomic/FormElements/InputMask/InputMask.stories.js +81 -17
- package/dist/Atomic/FormElements/InputMask/config.js +1 -0
- package/dist/Atomic/FormElements/InputMask/functions.js +59 -14
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +129 -73
- package/dist/Atomic/FormElements/InputMask2/InputMask2.stories.js +77 -13
- package/dist/Atomic/FormElements/InputMask2/config.js +1 -0
- package/dist/Atomic/FormElements/InputMask2/functions.js +59 -14
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +133 -77
- package/dist/Atomic/FormElements/InputMask3/InputMask3.stories.js +79 -15
- package/dist/Atomic/FormElements/InputMask3/config.js +1 -0
- package/dist/Atomic/FormElements/InputMask3/functions.js +59 -14
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +79 -23
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.stories.js +72 -8
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +81 -25
- package/dist/Atomic/FormElements/InputsRow/InputsRow.stories.js +31 -8
- package/dist/Atomic/FormElements/Label/Label.interface.js +4 -1
- package/dist/Atomic/FormElements/Label/Label.js +31 -16
- package/dist/Atomic/FormElements/Label/Label.stories.js +30 -7
- package/dist/Atomic/FormElements/Label/Label.test.js +46 -37
- package/dist/Atomic/FormElements/Label/index.js +17 -2
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +124 -68
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.stories.js +74 -10
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +67 -11
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.stories.js +73 -9
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +105 -49
- package/dist/Atomic/FormElements/NumericInput/NumericInput.stories.js +75 -11
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +67 -11
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.stories.js +31 -8
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +33 -18
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.stories.js +73 -9
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +27 -12
- package/dist/Atomic/FormElements/RadioInput/RadioInput.stories.js +31 -8
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +25 -10
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.stories.js +73 -9
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +92 -36
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.stories.js +85 -21
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +81 -25
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.stories.js +74 -10
- package/dist/Atomic/FormElements/RangeList/RangeList.js +89 -34
- package/dist/Atomic/FormElements/RangeList/RangeList.stories.js +81 -14
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +37 -14
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +120 -64
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.stories.js +102 -38
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +137 -81
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.stories.js +82 -18
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +26 -11
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.stories.js +85 -21
- package/dist/Atomic/FormElements/Switcher/Switcher.js +31 -16
- package/dist/Atomic/FormElements/Switcher/Switcher.stories.js +74 -10
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +26 -11
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.stories.js +75 -11
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +24 -9
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.stories.js +75 -11
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +68 -13
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.stories.js +74 -10
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +64 -8
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.stories.js +75 -11
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +26 -11
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.stories.js +76 -12
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +81 -25
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.stories.js +78 -14
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +11 -1
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +30 -15
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.stories.js +76 -12
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.js +70 -14
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.stories.js +73 -9
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +208 -152
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.stories.js +80 -16
- package/dist/Atomic/FormElements/Text/Text.js +25 -10
- package/dist/Atomic/FormElements/Text/Text.stories.js +30 -7
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +27 -12
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.stories.js +74 -10
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.test.js +26 -17
- package/dist/Atomic/FormElements/Textarea/Textarea.js +69 -13
- package/dist/Atomic/FormElements/Textarea/Textarea.stories.js +75 -11
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +77 -22
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.stories.js +76 -12
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +27 -12
- package/dist/Atomic/FormElements/TimeRange/TimeRange.interface.js +4 -1
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +79 -23
- package/dist/Atomic/FormElements/TimeRange/TimeRange.stories.js +30 -7
- package/dist/Atomic/FormElements/TimeRange/TimeRange.test.js +59 -50
- package/dist/Atomic/FormElements/TimeRange/index.js +17 -2
- package/dist/Atomic/FormElements/UserContacts/UserContact.test.js +77 -68
- package/dist/Atomic/FormElements/UserContacts/UserContacts.interface.js +4 -1
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +79 -23
- package/dist/Atomic/FormElements/UserContacts/UserContacts.stories.js +31 -8
- package/dist/Atomic/FormElements/UserContacts/index.js +17 -2
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +71 -15
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.stories.js +78 -14
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +39 -24
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +45 -30
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.stories.js +81 -17
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +11 -1
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +45 -30
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.stories.js +82 -18
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +11 -1
- package/dist/Atomic/Layout/Header/Header.js +83 -27
- package/dist/Atomic/Layout/Header/Header.stories.js +31 -8
- package/dist/Atomic/Layout/MainMenu/MainMenu.js +107 -51
- package/dist/Atomic/Layout/MainMenu/MainMenu.stories.js +31 -8
- package/dist/Atomic/Layout/Spinner/Spinner.interface.js +4 -1
- package/dist/Atomic/Layout/Spinner/Spinner.js +28 -13
- package/dist/Atomic/Layout/Spinner/Spinner.stories.js +30 -7
- package/dist/Atomic/Layout/Spinner/Spinner.test.js +22 -13
- package/dist/Atomic/Layout/Spinner/index.js +17 -2
- package/dist/Atomic/UI/Accordion/Accordion.interface.js +4 -1
- package/dist/Atomic/UI/Accordion/Accordion.js +77 -21
- package/dist/Atomic/UI/Accordion/Accordion.stories.js +36 -10
- package/dist/Atomic/UI/Accordion/Accordion.test.js +18 -9
- package/dist/Atomic/UI/Accordion/AccordionItem.js +84 -28
- package/dist/Atomic/UI/Accordion/AccordionItem.test.js +18 -9
- package/dist/Atomic/UI/Accordion/index.js +17 -2
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +99 -43
- package/dist/Atomic/UI/AccordionTable/AccordionTable.stories.js +80 -16
- package/dist/Atomic/UI/AccordionText/AccordionText.js +73 -18
- package/dist/Atomic/UI/AccordionText/AccordionText.stories.js +59 -36
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +94 -38
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +70 -14
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.stories.js +31 -8
- package/dist/Atomic/UI/Alert/Alert.js +78 -22
- package/dist/Atomic/UI/Alert/Alert.stories.js +38 -12
- package/dist/Atomic/UI/Arrow/Arrow.js +78 -22
- package/dist/Atomic/UI/Arrow/Arrow.stories.js +31 -8
- package/dist/Atomic/UI/Box/Box.js +22 -8
- package/dist/Atomic/UI/Box/Box.stories.js +41 -18
- package/dist/Atomic/UI/Button/Button.js +24 -9
- package/dist/Atomic/UI/Button/Button.stories.js +32 -9
- package/dist/Atomic/UI/Button/Button.test.js +51 -42
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +30 -15
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.stories.js +35 -13
- package/dist/Atomic/UI/Chart/Chart.js +105 -49
- package/dist/Atomic/UI/Chart/Chart.stories.js +31 -8
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +44 -8
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +30 -15
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +34 -9
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +41 -16
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +24 -3
- package/dist/Atomic/UI/Chart/partial/utils.js +45 -13
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +76 -20
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.stories.js +32 -9
- package/dist/Atomic/UI/DateTime/DateTime.js +70 -14
- package/dist/Atomic/UI/DateTime/DateTime.stories.js +32 -9
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +65 -14
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +62 -6
- package/dist/Atomic/UI/DoubleString/DoubleString.js +85 -29
- package/dist/Atomic/UI/DoubleString/DoubleString.stories.js +39 -13
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.interface.js +4 -1
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +58 -7
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.stories.js +72 -8
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.test.js +24 -15
- package/dist/Atomic/UI/DynamicIcon/index.js +17 -2
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +101 -46
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.stories.js +72 -8
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +41 -12
- package/dist/Atomic/UI/Hint/Hint.interface.js +4 -1
- package/dist/Atomic/UI/Hint/Hint.js +93 -37
- package/dist/Atomic/UI/Hint/Hint.stories.js +38 -15
- package/dist/Atomic/UI/Hint/Hint.test.js +13 -4
- package/dist/Atomic/UI/Hint/index.js +17 -2
- package/dist/Atomic/UI/Hint/partials/_utils.js +36 -11
- package/dist/Atomic/UI/Modal/Modal.interface.js +4 -1
- package/dist/Atomic/UI/Modal/Modal.js +61 -35
- package/dist/Atomic/UI/Modal/Modal.stories.js +85 -38
- package/dist/Atomic/UI/Modal/ModalHOC.js +68 -12
- package/dist/Atomic/UI/Modal/ModalHOC.stories.js +59 -27
- package/dist/Atomic/UI/Modal/ModalHOC.test.js +47 -38
- package/dist/Atomic/UI/Modal/index.js +26 -4
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +63 -7
- package/dist/Atomic/UI/Modal/partials/ModalFooter.test.js +40 -31
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +71 -15
- package/dist/Atomic/UI/Modal/partials/ModalTitle.test.js +39 -30
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +34 -19
- package/dist/Atomic/UI/Modal/partials/useMobileModal.test.js +28 -19
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion._test.js +34 -25
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.interface.js +4 -1
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +73 -17
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.stories.js +184 -101
- package/dist/Atomic/UI/MonoAccordion/index.js +17 -2
- package/dist/Atomic/UI/NavLine/NavLine.interface.js +4 -1
- package/dist/Atomic/UI/NavLine/NavLine.js +102 -46
- package/dist/Atomic/UI/NavLine/NavLine.stories.js +116 -32
- package/dist/Atomic/UI/NavLine/NavLine.test.js +53 -44
- package/dist/Atomic/UI/NavLine/index.js +17 -2
- package/dist/Atomic/UI/PageTitle/PageTitle.interface.js +4 -1
- package/dist/Atomic/UI/PageTitle/PageTitle.js +34 -19
- package/dist/Atomic/UI/PageTitle/PageTitle.stories.js +33 -10
- package/dist/Atomic/UI/PageTitle/PageTitle.test.js +51 -42
- package/dist/Atomic/UI/PageTitle/index.js +17 -2
- package/dist/Atomic/UI/PieChart/PieChart.js +35 -66
- package/dist/Atomic/UI/PieChart/PieChart.scss +11 -87
- package/dist/Atomic/UI/PieChart/PieChart.stories.js +81 -56
- package/dist/Atomic/UI/Price/Price.interface.js +4 -1
- package/dist/Atomic/UI/Price/Price.js +24 -9
- package/dist/Atomic/UI/Price/Price.stories.js +30 -7
- package/dist/Atomic/UI/Price/Price.test.js +21 -12
- package/dist/Atomic/UI/Price/index.js +17 -2
- package/dist/Atomic/UI/PriceRange/PriceRange.interface.js +4 -1
- package/dist/Atomic/UI/PriceRange/PriceRange.js +26 -11
- package/dist/Atomic/UI/PriceRange/PriceRange.stories.js +30 -7
- package/dist/Atomic/UI/PriceRange/PriceRange.test.js +18 -9
- package/dist/Atomic/UI/PriceRange/index.js +17 -2
- package/dist/Atomic/UI/ProgressLine/ProgressLine.interface.js +4 -1
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +32 -17
- package/dist/Atomic/UI/ProgressLine/ProgressLine.stories.js +30 -7
- package/dist/Atomic/UI/ProgressLine/ProgressLine.test.js +18 -9
- package/dist/Atomic/UI/ProgressLine/index.js +17 -2
- package/dist/Atomic/UI/Status/Status.interface.js +4 -1
- package/dist/Atomic/UI/Status/Status.js +31 -16
- package/dist/Atomic/UI/Status/Status.stories.js +34 -8
- package/dist/Atomic/UI/Status/Status.test.js +32 -23
- package/dist/Atomic/UI/Status/index.js +17 -2
- package/dist/Atomic/UI/Table/Partials/TdCell.js +79 -23
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +32 -17
- package/dist/Atomic/UI/Table/Partials/TdRow.js +81 -25
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +75 -19
- package/dist/Atomic/UI/Table/Table.js +32 -17
- package/dist/Atomic/UI/Table/Table.stories.js +73 -9
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +74 -18
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +28 -13
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +16 -6
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +32 -17
- package/dist/Atomic/UI/Tag/Tag.interface.js +4 -1
- package/dist/Atomic/UI/Tag/Tag.js +80 -24
- package/dist/Atomic/UI/Tag/Tag.stories.js +38 -15
- package/dist/Atomic/UI/Tag/Tag.test.js +30 -21
- package/dist/Atomic/UI/Tag/index.js +17 -2
- package/dist/Atomic/UI/TagList/TagList.js +84 -28
- package/dist/Atomic/UI/TagList/TagList.stories.js +80 -16
- package/dist/Atomic/UI/UserBox/UserBox.interface.js +4 -1
- package/dist/Atomic/UI/UserBox/UserBox.js +37 -22
- package/dist/Atomic/UI/UserBox/UserBox.stories.js +30 -7
- package/dist/Atomic/UI/UserBox/UserBox.test.js +74 -24
- package/dist/Atomic/UI/UserBox/index.js +17 -2
- package/dist/Atomic/UI/WizardStepper/WizardStepper.stories.js +34 -11
- package/dist/Atomic/UI/WizardStepper/constructor.js +34 -11
- package/dist/Atomic/UI/WizardStepper/index.js +17 -2
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/StateIcon.js +31 -16
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/index.js +12 -2
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/StepRow.js +39 -25
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/index.js +17 -2
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/StepWrapper.js +34 -19
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/index.js +17 -2
- package/dist/Atomic/UI/WizardStepper/ui/icons.js +39 -24
- package/dist/Atomic/UI/WizardStepper/ui/index.js +17 -2
- package/dist/Classes/AbortableFetch.js +12 -2
- package/dist/Classes/AnimatedHandler.js +11 -1
- package/dist/Classes/RESTAPI/index.js +24 -9
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +12 -2
- package/dist/Classes/RESTAPI/partials/ApiBase.js +18 -3
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +25 -10
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +22 -7
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +20 -5
- package/dist/Classes/RESTAPI/partials/Utils.js +14 -4
- package/dist/Classes/RESTAPI/partials/_outerDependencies.js +18 -3
- package/dist/Classes/RESTAPI/partials/_utils.js +43 -10
- package/dist/Constants/index.constants.js +40 -7
- package/dist/DeepPartial.d.ts +40 -0
- package/dist/DeepReadonly.d.ts +38 -0
- package/dist/DeepRequired.d.ts +50 -0
- package/dist/Flatten.d.ts +34 -0
- package/dist/FunctionType.d.ts +37 -0
- package/dist/Functions/Portal.js +62 -6
- package/dist/Functions/customEventListener.js +1 -0
- package/dist/Functions/dateTime.js +31 -21
- package/dist/Functions/fieldValueFormatters.js +79 -61
- package/dist/Functions/guards/assertions.js +19 -4
- package/dist/Functions/guards/safeValue.js +21 -6
- package/dist/Functions/guards/typeGuards.js +12 -2
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +55 -4
- package/dist/Functions/locale/createTranslator.js +13 -3
- package/dist/Functions/operations.js +11 -1
- package/dist/Functions/presets/inputMaskPresets.js +12 -2
- package/dist/Functions/presets/inputPresets.js +14 -4
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +24 -32
- package/dist/Functions/schemas.js +77 -15
- package/dist/Functions/useBodyScrollLock.js +13 -3
- package/dist/Functions/useClickOutside.js +13 -3
- package/dist/Functions/useDebounce.js +55 -4
- package/dist/Functions/useFieldFocus.js +17 -7
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +18 -3
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +11 -1
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +18 -3
- package/dist/Functions/useFormTools/functions/General.js +11 -1
- package/dist/Functions/useFormTools/functions/RenderFields.js +16 -6
- package/dist/Functions/useFormTools/functions/usePrevious.js +14 -4
- package/dist/Functions/useFormTools/index.js +50 -35
- package/dist/Functions/useInputHighlightError.js +68 -9
- package/dist/Functions/useIsMobile/index.js +17 -2
- package/dist/Functions/useIsMobile/useIsMobile.js +14 -4
- package/dist/Functions/useIsMobile/useIsMobile.test.js +18 -9
- package/dist/Functions/useKeyPress/useHandleKeyPress.js +21 -6
- package/dist/Functions/useKeyPress/useHandleKeyPress.test.js +20 -11
- package/dist/Functions/useKeyPress/useKeyPress.js +16 -6
- package/dist/Functions/useKeyPress/useKeyPress.test.js +25 -16
- package/dist/Functions/useLocalStorage.js +13 -3
- package/dist/Functions/useLocationParams.js +14 -4
- package/dist/Functions/useMediaQuery.js +13 -3
- package/dist/Functions/useMetaInfo.js +27 -9
- package/dist/Functions/useMouseUpOutside.js +13 -3
- package/dist/Functions/useOnlineStatus.js +14 -4
- package/dist/Functions/usePasswordChecker.js +69 -13
- package/dist/Functions/usePrevious.js +14 -4
- package/dist/Functions/useResize.js +15 -5
- package/dist/Functions/useScrollTo.js +15 -5
- package/dist/Functions/useToggle.js +16 -6
- package/dist/Functions/utils.js +173 -67
- package/dist/If.d.ts +34 -0
- package/dist/KeysType.d.ts +10 -0
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +57 -6
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +57 -6
- package/dist/Molecular/CustomIcons/components/AppStore.js +59 -8
- package/dist/Molecular/CustomIcons/components/Arrow.js +62 -11
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +55 -4
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +56 -5
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +56 -5
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +55 -4
- package/dist/Molecular/CustomIcons/components/Bell.js +55 -4
- package/dist/Molecular/CustomIcons/components/Button.js +55 -4
- package/dist/Molecular/CustomIcons/components/Campaigns.js +55 -4
- package/dist/Molecular/CustomIcons/components/Check.js +55 -4
- package/dist/Molecular/CustomIcons/components/Check2.js +55 -4
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +55 -4
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +55 -4
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +55 -4
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +55 -4
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +55 -4
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +58 -7
- package/dist/Molecular/CustomIcons/components/Close.js +56 -5
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +60 -9
- package/dist/Molecular/CustomIcons/components/Delete.js +55 -4
- package/dist/Molecular/CustomIcons/components/Edit.js +55 -4
- package/dist/Molecular/CustomIcons/components/Email.js +59 -8
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +60 -9
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +59 -8
- package/dist/Molecular/CustomIcons/components/Flows.js +55 -4
- package/dist/Molecular/CustomIcons/components/Gift.js +56 -5
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +59 -8
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +59 -8
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +56 -5
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +56 -5
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +56 -5
- package/dist/Molecular/CustomIcons/components/Home.js +56 -5
- package/dist/Molecular/CustomIcons/components/Home2.js +56 -5
- package/dist/Molecular/CustomIcons/components/Key.js +55 -4
- package/dist/Molecular/CustomIcons/components/Landers.js +56 -5
- package/dist/Molecular/CustomIcons/components/Lock.js +55 -4
- package/dist/Molecular/CustomIcons/components/Mail.js +57 -6
- package/dist/Molecular/CustomIcons/components/Mastercard.js +67 -16
- package/dist/Molecular/CustomIcons/components/Minus.js +58 -7
- package/dist/Molecular/CustomIcons/components/Offers.js +55 -4
- package/dist/Molecular/CustomIcons/components/Pause.js +58 -7
- package/dist/Molecular/CustomIcons/components/PayPal.js +61 -10
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +59 -8
- package/dist/Molecular/CustomIcons/components/Phone.js +58 -7
- package/dist/Molecular/CustomIcons/components/Play.js +58 -7
- package/dist/Molecular/CustomIcons/components/Plus.js +58 -7
- package/dist/Molecular/CustomIcons/components/Profile.js +56 -5
- package/dist/Molecular/CustomIcons/components/QRCode.js +59 -8
- package/dist/Molecular/CustomIcons/components/Rectangle.js +55 -4
- package/dist/Molecular/CustomIcons/components/Revert.js +56 -5
- package/dist/Molecular/CustomIcons/components/Star.js +55 -4
- package/dist/Molecular/CustomIcons/components/Star2.js +55 -4
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +57 -6
- package/dist/Molecular/CustomIcons/components/Trash.js +55 -4
- package/dist/Molecular/CustomIcons/components/TrashRed.js +55 -4
- package/dist/Molecular/CustomIcons/components/Triggers.js +55 -4
- package/dist/Molecular/CustomIcons/components/User.js +56 -5
- package/dist/Molecular/CustomIcons/components/Visa.js +61 -10
- package/dist/Molecular/CustomIcons/components/X.js +55 -4
- package/dist/Molecular/CustomIcons/index.js +78 -61
- package/dist/Molecular/FormElement/FormElement.js +28 -13
- package/dist/Molecular/FormElement/FormElement.stories.js +33 -10
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +74 -19
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.stories.js +81 -17
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +13 -3
- package/dist/Molecular/InputAddress/InputAddress.js +139 -83
- package/dist/Molecular/InputAddress/InputAddress.stories.js +78 -14
- package/dist/Molecular/InputPassword/InputPassword.js +73 -17
- package/dist/Molecular/InputPassword/InputPassword.stories.js +72 -8
- package/dist/NonNullableType.d.ts +13 -0
- package/dist/ObjectType.d.ts +9 -0
- package/dist/OnlyObjectKeys.d.ts +65 -0
- package/dist/PrettyPrint.d.ts +29 -0
- package/dist/RequiredFields.d.ts +21 -0
- package/dist/TupleType.d.ts +10 -0
- package/dist/ValuesType.d.ts +10 -0
- package/dist/lib/src/Atomic/UI/PieChart/PieChart.d.ts +7 -3
- package/dist/lib/src/Atomic/UI/PieChart/PieChart.stories.d.ts +15 -6
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/base.interface.js +4 -1
- package/dist/types/base.types.js +4 -1
- package/package.json +4 -3
- package/dist/Atomic/UI/PieChart/PieChar.interface.js +0 -1
- package/dist/Atomic/UI/PieChart/PieChart.test.js +0 -133
- package/dist/Atomic/UI/PieChart/index.js +0 -5
- package/dist/lib/src/Atomic/UI/PieChart/PieChar.interface.d.ts +0 -36
- package/dist/lib/src/Atomic/UI/PieChart/PieChart.test.d.ts +0 -1
- package/dist/lib/src/Atomic/UI/PieChart/index.d.ts +0 -13
|
@@ -1,31 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
13
|
+
const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
|
|
14
|
+
const _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
|
|
15
|
+
const _utils = require("../../../Functions/utils");
|
|
16
|
+
const _InputDateRange = /*#__PURE__*/ _interop_require_default(require("../../FormElements/InputDateRange/InputDateRange"));
|
|
17
|
+
const _Chart = /*#__PURE__*/ _interop_require_default(require("../Chart/Chart"));
|
|
18
|
+
const _utils1 = require("./partial/utils");
|
|
19
|
+
require("./partial/AnyOuterClass.scss");
|
|
20
|
+
function _interop_require_default(obj) {
|
|
21
|
+
return obj && obj.__esModule ? obj : {
|
|
22
|
+
default: obj
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
26
|
+
if (typeof WeakMap !== "function") return null;
|
|
27
|
+
var cacheBabelInterop = new WeakMap();
|
|
28
|
+
var cacheNodeInterop = new WeakMap();
|
|
29
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
30
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
31
|
+
})(nodeInterop);
|
|
32
|
+
}
|
|
33
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
34
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
35
|
+
return obj;
|
|
36
|
+
}
|
|
37
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
38
|
+
return {
|
|
39
|
+
default: obj
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
43
|
+
if (cache && cache.has(obj)) {
|
|
44
|
+
return cache.get(obj);
|
|
45
|
+
}
|
|
46
|
+
var newObj = {
|
|
47
|
+
__proto__: null
|
|
48
|
+
};
|
|
49
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
50
|
+
for(var key in obj){
|
|
51
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
52
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
53
|
+
if (desc && (desc.get || desc.set)) {
|
|
54
|
+
Object.defineProperty(newObj, key, desc);
|
|
55
|
+
} else {
|
|
56
|
+
newObj[key] = obj[key];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
newObj.default = obj;
|
|
61
|
+
if (cache) {
|
|
62
|
+
cache.set(obj, newObj);
|
|
63
|
+
}
|
|
64
|
+
return newObj;
|
|
65
|
+
}
|
|
11
66
|
const ExampleChartIntegration = (props)=>{
|
|
12
67
|
const { inputDateRangeProps, chartProps } = props || {};
|
|
13
68
|
const { value: outerDateRange, onChange: changeDateRange } = inputDateRangeProps || {};
|
|
14
69
|
const { initialChartType } = chartProps || {};
|
|
15
|
-
const dateRange = useMemo(()=>getSafelyDateRange(outerDateRange), [
|
|
70
|
+
const dateRange = (0, _react.useMemo)(()=>(0, _utils1.getSafelyDateRange)(outerDateRange), [
|
|
16
71
|
outerDateRange
|
|
17
72
|
]);
|
|
18
|
-
const [chartType, setChartType] = useState(initialChartType || "Bar");
|
|
19
|
-
const [tab, setTab] = useState("tab1");
|
|
20
|
-
const [initialModel, setInitialModel] = useState(chartType === "Bar" ? "finturfLoadingModeBar" : "finturfLoadingModeLine");
|
|
21
|
-
const [tab1, setTab1] = useState(null);
|
|
22
|
-
const [tab2, setTab2] = useState(null);
|
|
23
|
-
const [tab3, setTab3] = useState(null);
|
|
24
|
-
const [tab4, setTab4] = useState(null);
|
|
25
|
-
const [dataForRender, setDataForRender] = useState(null);
|
|
73
|
+
const [chartType, setChartType] = (0, _react.useState)(initialChartType || "Bar");
|
|
74
|
+
const [tab, setTab] = (0, _react.useState)("tab1");
|
|
75
|
+
const [initialModel, setInitialModel] = (0, _react.useState)(chartType === "Bar" ? "finturfLoadingModeBar" : "finturfLoadingModeLine");
|
|
76
|
+
const [tab1, setTab1] = (0, _react.useState)(null);
|
|
77
|
+
const [tab2, setTab2] = (0, _react.useState)(null);
|
|
78
|
+
const [tab3, setTab3] = (0, _react.useState)(null);
|
|
79
|
+
const [tab4, setTab4] = (0, _react.useState)(null);
|
|
80
|
+
const [dataForRender, setDataForRender] = (0, _react.useState)(null);
|
|
26
81
|
const getMockData = ()=>{
|
|
27
|
-
const labels = getLabels(dateRange);
|
|
28
|
-
const mock = ()=>labels.map((label)=>getMockValue());
|
|
82
|
+
const labels = (0, _utils1.getLabels)(dateRange);
|
|
83
|
+
const mock = ()=>labels.map((label)=>(0, _utils1.getMockValue)());
|
|
29
84
|
return {
|
|
30
85
|
labels,
|
|
31
86
|
datasets: [
|
|
@@ -38,13 +93,13 @@ const ExampleChartIntegration = (props)=>{
|
|
|
38
93
|
const getTabData = (tabId)=>{
|
|
39
94
|
switch(tabId){
|
|
40
95
|
case "tab1":
|
|
41
|
-
return !tab1 ? null : clone(tab1);
|
|
96
|
+
return !tab1 ? null : (0, _utils.clone)(tab1);
|
|
42
97
|
case "tab2":
|
|
43
|
-
return !tab2 ? null : clone(tab2);
|
|
98
|
+
return !tab2 ? null : (0, _utils.clone)(tab2);
|
|
44
99
|
case "tab3":
|
|
45
|
-
return !tab3 ? null : clone(tab3);
|
|
100
|
+
return !tab3 ? null : (0, _utils.clone)(tab3);
|
|
46
101
|
case "tab4":
|
|
47
|
-
return !tab4 ? null : clone(tab4);
|
|
102
|
+
return !tab4 ? null : (0, _utils.clone)(tab4);
|
|
48
103
|
default:
|
|
49
104
|
return null;
|
|
50
105
|
}
|
|
@@ -64,7 +119,7 @@ const ExampleChartIntegration = (props)=>{
|
|
|
64
119
|
}
|
|
65
120
|
};
|
|
66
121
|
const selectData = ()=>getTabData(tab) ? getTabData(tab) : getMockData();
|
|
67
|
-
const modelsForSwitch = useMemo(()=>getTabData(tab) ? [
|
|
122
|
+
const modelsForSwitch = (0, _react.useMemo)(()=>getTabData(tab) ? [
|
|
68
123
|
"finturfChartBar",
|
|
69
124
|
"finturfChartLine"
|
|
70
125
|
] : [
|
|
@@ -100,7 +155,7 @@ const ExampleChartIntegration = (props)=>{
|
|
|
100
155
|
}
|
|
101
156
|
return res;
|
|
102
157
|
};
|
|
103
|
-
useLayoutEffect(()=>{
|
|
158
|
+
(0, _react.useLayoutEffect)(()=>{
|
|
104
159
|
setTab1(null);
|
|
105
160
|
setTab2(null);
|
|
106
161
|
setTab3(null);
|
|
@@ -109,15 +164,15 @@ const ExampleChartIntegration = (props)=>{
|
|
|
109
164
|
// вся логика происходит в самих входящих промисах
|
|
110
165
|
// Promise.all добавлен для расширения на случай надобности описания эффектов по завершении всех запросов
|
|
111
166
|
Promise.all([
|
|
112
|
-
getTab("tab1", dateRange, processResponse),
|
|
113
|
-
getTab("tab2", dateRange, processResponse),
|
|
114
|
-
getTab("tab3", dateRange, processResponse),
|
|
115
|
-
getTab("tab4", dateRange, processResponse)
|
|
167
|
+
(0, _utils1.getTab)("tab1", dateRange, processResponse),
|
|
168
|
+
(0, _utils1.getTab)("tab2", dateRange, processResponse),
|
|
169
|
+
(0, _utils1.getTab)("tab3", dateRange, processResponse),
|
|
170
|
+
(0, _utils1.getTab)("tab4", dateRange, processResponse)
|
|
116
171
|
]);
|
|
117
172
|
}, [
|
|
118
173
|
dateRange
|
|
119
174
|
]);
|
|
120
|
-
useLayoutEffect(()=>{
|
|
175
|
+
(0, _react.useLayoutEffect)(()=>{
|
|
121
176
|
setInitialModel(getModel());
|
|
122
177
|
setDataForRender(selectData());
|
|
123
178
|
}, [
|
|
@@ -125,40 +180,40 @@ const ExampleChartIntegration = (props)=>{
|
|
|
125
180
|
tab,
|
|
126
181
|
chartType
|
|
127
182
|
]);
|
|
128
|
-
return /*#__PURE__*/
|
|
183
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
129
184
|
className: "example-wrapper",
|
|
130
185
|
children: [
|
|
131
|
-
/*#__PURE__*/
|
|
186
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_InputDateRange.default, {
|
|
132
187
|
...inputDateRangeProps,
|
|
133
188
|
value: outerDateRange,
|
|
134
189
|
onChange: changeDateRange
|
|
135
190
|
}),
|
|
136
|
-
/*#__PURE__*/
|
|
191
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
137
192
|
className: "buttons-block",
|
|
138
193
|
children: [
|
|
139
|
-
/*#__PURE__*/
|
|
140
|
-
className:
|
|
194
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
|
|
195
|
+
className: (0, _classnames.default)("tab-button", {
|
|
141
196
|
"tab-button_active": tab === "tab1"
|
|
142
197
|
}),
|
|
143
198
|
onClick: ()=>setTab("tab1"),
|
|
144
199
|
children: "Tab 1"
|
|
145
200
|
}),
|
|
146
|
-
/*#__PURE__*/
|
|
147
|
-
className:
|
|
201
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
|
|
202
|
+
className: (0, _classnames.default)("tab-button", {
|
|
148
203
|
"tab-button_active": tab === "tab2"
|
|
149
204
|
}),
|
|
150
205
|
onClick: ()=>setTab("tab2"),
|
|
151
206
|
children: "Tab 2"
|
|
152
207
|
}),
|
|
153
|
-
/*#__PURE__*/
|
|
154
|
-
className:
|
|
208
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
|
|
209
|
+
className: (0, _classnames.default)("tab-button", {
|
|
155
210
|
"tab-button_active": tab === "tab3"
|
|
156
211
|
}),
|
|
157
212
|
onClick: ()=>setTab("tab3"),
|
|
158
213
|
children: "Tab 3"
|
|
159
214
|
}),
|
|
160
|
-
/*#__PURE__*/
|
|
161
|
-
className:
|
|
215
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
|
|
216
|
+
className: (0, _classnames.default)("tab-button", {
|
|
162
217
|
"tab-button_active": tab === "tab4"
|
|
163
218
|
}),
|
|
164
219
|
onClick: ()=>setTab("tab4"),
|
|
@@ -166,7 +221,7 @@ const ExampleChartIntegration = (props)=>{
|
|
|
166
221
|
})
|
|
167
222
|
]
|
|
168
223
|
}),
|
|
169
|
-
/*#__PURE__*/
|
|
224
|
+
/*#__PURE__*/ (0, _react.createElement)(_Chart.default, {
|
|
170
225
|
...chartProps,
|
|
171
226
|
key: JSON.stringify(dataForRender),
|
|
172
227
|
data: dataForRender,
|
|
@@ -192,7 +247,7 @@ const ExampleChartIntegration = (props)=>{
|
|
|
192
247
|
callbacks: {
|
|
193
248
|
...options === null || options === void 0 ? void 0 : (_options_options2 = options.options) === null || _options_options2 === void 0 ? void 0 : (_options_options_plugins1 = _options_options2.plugins) === null || _options_options_plugins1 === void 0 ? void 0 : (_options_options_plugins_tooltip = _options_options_plugins1.tooltip) === null || _options_options_plugins_tooltip === void 0 ? void 0 : _options_options_plugins_tooltip.callbacks,
|
|
194
249
|
label: (context)=>{
|
|
195
|
-
return context.dataset.id === "tab3" || context.dataset.id === "tab4" ? formatToPriceWithUSD(context.raw || "0") : context.raw || "0";
|
|
250
|
+
return context.dataset.id === "tab3" || context.dataset.id === "tab4" ? (0, _fieldValueFormatters.formatToPriceWithUSD)(context.raw || "0") : context.raw || "0";
|
|
196
251
|
}
|
|
197
252
|
}
|
|
198
253
|
}
|
|
@@ -204,4 +259,4 @@ const ExampleChartIntegration = (props)=>{
|
|
|
204
259
|
]
|
|
205
260
|
});
|
|
206
261
|
};
|
|
207
|
-
|
|
262
|
+
const _default = ExampleChartIntegration;
|
|
@@ -1,17 +1,81 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
ExampleChartIntegrationTemplate: function() {
|
|
13
|
+
return ExampleChartIntegrationTemplate;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
20
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
21
|
+
const _ExampleChartIntegration = /*#__PURE__*/ _interop_require_default(require("./ExampleChartIntegration"));
|
|
22
|
+
function _interop_require_default(obj) {
|
|
23
|
+
return obj && obj.__esModule ? obj : {
|
|
24
|
+
default: obj
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
28
|
+
if (typeof WeakMap !== "function") return null;
|
|
29
|
+
var cacheBabelInterop = new WeakMap();
|
|
30
|
+
var cacheNodeInterop = new WeakMap();
|
|
31
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
32
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
33
|
+
})(nodeInterop);
|
|
34
|
+
}
|
|
35
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
36
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
37
|
+
return obj;
|
|
38
|
+
}
|
|
39
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
40
|
+
return {
|
|
41
|
+
default: obj
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
45
|
+
if (cache && cache.has(obj)) {
|
|
46
|
+
return cache.get(obj);
|
|
47
|
+
}
|
|
48
|
+
var newObj = {
|
|
49
|
+
__proto__: null
|
|
50
|
+
};
|
|
51
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
52
|
+
for(var key in obj){
|
|
53
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
54
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
55
|
+
if (desc && (desc.get || desc.set)) {
|
|
56
|
+
Object.defineProperty(newObj, key, desc);
|
|
57
|
+
} else {
|
|
58
|
+
newObj[key] = obj[key];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
newObj.default = obj;
|
|
63
|
+
if (cache) {
|
|
64
|
+
cache.set(obj, newObj);
|
|
65
|
+
}
|
|
66
|
+
return newObj;
|
|
67
|
+
}
|
|
4
68
|
global.lng = 'en';
|
|
5
|
-
|
|
69
|
+
const _default = {
|
|
6
70
|
title: 'UI/Chart',
|
|
7
|
-
component:
|
|
71
|
+
component: _ExampleChartIntegration.default
|
|
8
72
|
};
|
|
9
73
|
const Template = (args)=>{
|
|
10
74
|
const { inputDateRangeProps, chartProps } = args;
|
|
11
|
-
const [outerDateRange, setOuterDateRange] = useState({
|
|
75
|
+
const [outerDateRange, setOuterDateRange] = (0, _react.useState)({
|
|
12
76
|
intervalKey: 'last7Days'
|
|
13
77
|
});
|
|
14
|
-
return /*#__PURE__*/
|
|
78
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_ExampleChartIntegration.default, {
|
|
15
79
|
inputDateRangeProps: {
|
|
16
80
|
...inputDateRangeProps,
|
|
17
81
|
value: outerDateRange,
|
|
@@ -20,7 +84,7 @@ const Template = (args)=>{
|
|
|
20
84
|
chartProps: chartProps
|
|
21
85
|
});
|
|
22
86
|
};
|
|
23
|
-
|
|
87
|
+
const ExampleChartIntegrationTemplate = Template.bind({});
|
|
24
88
|
ExampleChartIntegrationTemplate.args = {
|
|
25
89
|
inputDateRangeProps: {
|
|
26
90
|
buttonsTypes: {
|
|
@@ -1,19 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
getLabels: function() {
|
|
13
|
+
return getLabels;
|
|
14
|
+
},
|
|
15
|
+
getMockValue: function() {
|
|
16
|
+
return getMockValue;
|
|
17
|
+
},
|
|
18
|
+
getSafelyDateRange: function() {
|
|
19
|
+
return getSafelyDateRange;
|
|
20
|
+
},
|
|
21
|
+
getTab: function() {
|
|
22
|
+
return getTab;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const _momenttimezone = /*#__PURE__*/ _interop_require_default(require("moment-timezone"));
|
|
26
|
+
const _dependencies = require("../../../FormElements/InputDateRange/dependencies");
|
|
27
|
+
function _interop_require_default(obj) {
|
|
28
|
+
return obj && obj.__esModule ? obj : {
|
|
29
|
+
default: obj
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const getSafelyDateRange = (dateRange)=>(!(dateRange === null || dateRange === void 0 ? void 0 : dateRange.start) || !(dateRange === null || dateRange === void 0 ? void 0 : dateRange.end)) && (!(dateRange === null || dateRange === void 0 ? void 0 : dateRange.intervalKey) || (dateRange === null || dateRange === void 0 ? void 0 : dateRange.intervalKey) === "allTime") ? (0, _dependencies.getActualDateRange)({
|
|
4
33
|
start: "2022-01-01T00:00:00",
|
|
5
|
-
end:
|
|
6
|
-
}) : getActualDateRange(dateRange);
|
|
7
|
-
|
|
34
|
+
end: (0, _momenttimezone.default)().endOf("day").format("YYYY-MM-DDTHH:mm:ss")
|
|
35
|
+
}) : (0, _dependencies.getActualDateRange)(dateRange);
|
|
36
|
+
const getLabels = (range)=>{
|
|
8
37
|
const MINIMUM_INTERVAL = "hour";
|
|
9
38
|
const NO_MORE_THAN_THREE_HOURS = 3; // this is hours
|
|
10
39
|
const NO_MORE_THAN_TWO_DAYS = 48; // this is hours
|
|
11
40
|
const NO_MORE_THAN_TWO_MONTHS = 2; // this is months
|
|
12
41
|
const NO_MORE_THAN_THREE_YEARS = 24; // this is months
|
|
13
42
|
// safely Range must have 'start' and 'end' properties
|
|
14
|
-
const safelyRange = getActualDateRange(range);
|
|
15
|
-
const start =
|
|
16
|
-
const end =
|
|
43
|
+
const safelyRange = (0, _dependencies.getActualDateRange)(range);
|
|
44
|
+
const start = (0, _momenttimezone.default)(safelyRange === null || safelyRange === void 0 ? void 0 : safelyRange.start).startOf(MINIMUM_INTERVAL);
|
|
45
|
+
const end = (0, _momenttimezone.default)(safelyRange === null || safelyRange === void 0 ? void 0 : safelyRange.end).startOf(MINIMUM_INTERVAL);
|
|
17
46
|
const getValues = (intervalStepKey)=>{
|
|
18
47
|
let format;
|
|
19
48
|
switch(intervalStepKey){
|
|
@@ -38,7 +67,7 @@ export const getLabels = (range)=>{
|
|
|
38
67
|
];
|
|
39
68
|
const process = structure.reduce((acc, iteration)=>{
|
|
40
69
|
acc.values.push(acc.point.format(format));
|
|
41
|
-
acc.point =
|
|
70
|
+
acc.point = (0, _momenttimezone.default)(acc.point).add(1, intervalStepKey);
|
|
42
71
|
return acc;
|
|
43
72
|
}, {
|
|
44
73
|
point: start,
|
|
@@ -52,8 +81,8 @@ export const getLabels = (range)=>{
|
|
|
52
81
|
else if (end.diff(start, "months") <= NO_MORE_THAN_THREE_YEARS) return getValues("months");
|
|
53
82
|
else return getValues("years");
|
|
54
83
|
};
|
|
55
|
-
|
|
56
|
-
|
|
84
|
+
const getMockValue = ()=>Math.trunc(Math.random() * 1000000);
|
|
85
|
+
const getTab = async (tabId, range, callback)=>{
|
|
57
86
|
let requestDelay;
|
|
58
87
|
switch(tabId){
|
|
59
88
|
case "tab1":
|
|
@@ -1,28 +1,84 @@
|
|
|
1
|
-
/* eslint-disable react-web-api/no-leaked-event-listener */ /* eslint-disable react-dom/no-missing-button-type */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
/* eslint-disable react-web-api/no-leaked-event-listener */ /* eslint-disable react-dom/no-missing-button-type */ "use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
|
|
13
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
14
|
+
const _reactdom = require("react-dom");
|
|
15
|
+
const _reactfeather = require("react-feather");
|
|
16
|
+
const _utils = require("../../../Functions/utils");
|
|
17
|
+
const _CustomIcons = require("../../../Molecular/CustomIcons");
|
|
18
|
+
const _Spinner = /*#__PURE__*/ _interop_require_default(require("../../Layout/Spinner/Spinner"));
|
|
19
|
+
const _utils1 = require("./partials/_utils");
|
|
20
|
+
require("./Hint.scss");
|
|
21
|
+
function _interop_require_default(obj) {
|
|
22
|
+
return obj && obj.__esModule ? obj : {
|
|
23
|
+
default: obj
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
27
|
+
if (typeof WeakMap !== "function") return null;
|
|
28
|
+
var cacheBabelInterop = new WeakMap();
|
|
29
|
+
var cacheNodeInterop = new WeakMap();
|
|
30
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
31
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
32
|
+
})(nodeInterop);
|
|
33
|
+
}
|
|
34
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
35
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
36
|
+
return obj;
|
|
37
|
+
}
|
|
38
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
39
|
+
return {
|
|
40
|
+
default: obj
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
44
|
+
if (cache && cache.has(obj)) {
|
|
45
|
+
return cache.get(obj);
|
|
46
|
+
}
|
|
47
|
+
var newObj = {
|
|
48
|
+
__proto__: null
|
|
49
|
+
};
|
|
50
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
51
|
+
for(var key in obj){
|
|
52
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
53
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
54
|
+
if (desc && (desc.get || desc.set)) {
|
|
55
|
+
Object.defineProperty(newObj, key, desc);
|
|
56
|
+
} else {
|
|
57
|
+
newObj[key] = obj[key];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
newObj.default = obj;
|
|
62
|
+
if (cache) {
|
|
63
|
+
cache.set(obj, newObj);
|
|
64
|
+
}
|
|
65
|
+
return newObj;
|
|
66
|
+
}
|
|
11
67
|
let isContentHoveredOuter = false;
|
|
12
68
|
const DEFAULT_EMPTY_OBJ = {};
|
|
13
69
|
function DEFAULT_VOID_FN() {}
|
|
14
70
|
const Hint = ({ hint, side = 'right', className, hintContainer = DEFAULT_EMPTY_OBJ, label = '', variant = 'filled', handleOpenType = 'click', onClickCallback, onOpenChange = DEFAULT_VOID_FN, key, id, children, icon, isAccessability = false, testId = 'hint', isHoverableContent = false, isLoading, isCloseOnChildrenClick = false })=>{
|
|
15
71
|
var _label_replace;
|
|
16
|
-
const hintRef = useRef(null);
|
|
17
|
-
const timeoutRef = useRef(null);
|
|
72
|
+
const hintRef = (0, _react.useRef)(null);
|
|
73
|
+
const timeoutRef = (0, _react.useRef)(null);
|
|
18
74
|
var _ref;
|
|
19
|
-
const [hintId] = useState((_ref = key !== null && key !== void 0 ? key : id) !== null && _ref !== void 0 ? _ref : Math.random().toString(16).slice(2));
|
|
20
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
75
|
+
const [hintId] = (0, _react.useState)((_ref = key !== null && key !== void 0 ? key : id) !== null && _ref !== void 0 ? _ref : Math.random().toString(16).slice(2));
|
|
76
|
+
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
21
77
|
// ? Определяем handleScroll-стейт, чтобы никогда не менять ссылку тем самым гарантировать корректную работу removeEventListener.
|
|
22
78
|
// ? Инициализируем стейт вызовом конструктора HandleScrollObj, передаем setIsOpen для записи в объект.
|
|
23
|
-
const [handleScroll] = useState(new HandleScrollObj(setIsOpen));
|
|
79
|
+
const [handleScroll] = (0, _react.useState)(new _utils1.HandleScrollObj(setIsOpen));
|
|
24
80
|
// ? По аналогии определяем handleClickOutside
|
|
25
|
-
const [handleClickOutside] = useState(new HandleClickOutsideObj(hintId, setIsOpen));
|
|
81
|
+
const [handleClickOutside] = (0, _react.useState)(new _utils1.HandleClickOutsideObj(hintId, setIsOpen));
|
|
26
82
|
const isCallbackExist = typeof onClickCallback === 'function';
|
|
27
83
|
const handle = {
|
|
28
84
|
onMouseEnter: ()=>{
|
|
@@ -60,16 +116,16 @@ const Hint = ({ hint, side = 'right', className, hintContainer = DEFAULT_EMPTY_O
|
|
|
60
116
|
onClick: isCloseOnChildrenClick ? ()=>setIsOpen(false) : ()=>{}
|
|
61
117
|
};
|
|
62
118
|
const getHintMarkUp = (className)=>{
|
|
63
|
-
return /*#__PURE__*/
|
|
119
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
64
120
|
"data-testid": "test-hint-text",
|
|
65
|
-
className:
|
|
121
|
+
className: (0, _classnames.default)('hint__text', `hint__text_${side}`, `hint--${className}__text`),
|
|
66
122
|
onMouseEnter: ()=>{
|
|
67
123
|
isContentHoveredOuter = true;
|
|
68
124
|
},
|
|
69
125
|
onMouseLeave: handle.onMouseLeaveHoverableContent,
|
|
70
126
|
onClick: handle.onClick,
|
|
71
127
|
children: [
|
|
72
|
-
isLoading && /*#__PURE__*/
|
|
128
|
+
isLoading && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Spinner.default, {
|
|
73
129
|
size: "small"
|
|
74
130
|
}),
|
|
75
131
|
hint,
|
|
@@ -79,7 +135,7 @@ const Hint = ({ hint, side = 'right', className, hintContainer = DEFAULT_EMPTY_O
|
|
|
79
135
|
};
|
|
80
136
|
const setHintContainerStyles = ()=>{
|
|
81
137
|
var _hintRef_current, _this, _this1, _this2;
|
|
82
|
-
const hc = getHintContainer(hintId);
|
|
138
|
+
const hc = (0, _utils1.getHintContainer)(hintId);
|
|
83
139
|
if (!hc || !isOpen) return false;
|
|
84
140
|
const { width = 0, top = 0, left = 0 } = (hintRef === null || hintRef === void 0 ? void 0 : hintRef.current) !== null ? hintRef === null || hintRef === void 0 ? void 0 : (_hintRef_current = hintRef.current) === null || _hintRef_current === void 0 ? void 0 : _hintRef_current.getBoundingClientRect() : {};
|
|
85
141
|
const { addWidth, addLeft, addTop } = hintContainer !== null && hintContainer !== void 0 ? hintContainer : {};
|
|
@@ -125,17 +181,17 @@ const Hint = ({ hint, side = 'right', className, hintContainer = DEFAULT_EMPTY_O
|
|
|
125
181
|
}
|
|
126
182
|
};
|
|
127
183
|
const renderHintContainer = (className)=>{
|
|
128
|
-
const hc = getHintContainer(hintId);
|
|
184
|
+
const hc = (0, _utils1.getHintContainer)(hintId);
|
|
129
185
|
if (!hc) return null;
|
|
130
|
-
return /*#__PURE__*/ createPortal(getHintMarkUp(className), hc);
|
|
186
|
+
return /*#__PURE__*/ (0, _reactdom.createPortal)(getHintMarkUp(className), hc);
|
|
131
187
|
};
|
|
132
|
-
useEffect(()=>{
|
|
133
|
-
initHintContainer(hintId, hintContainer);
|
|
188
|
+
(0, _react.useEffect)(()=>{
|
|
189
|
+
(0, _utils1.initHintContainer)(hintId, hintContainer);
|
|
134
190
|
return ()=>{
|
|
135
191
|
if (timeoutRef.current !== null) clearTimeout(timeoutRef.current);
|
|
136
192
|
};
|
|
137
193
|
}, []);
|
|
138
|
-
useEffect(()=>{
|
|
194
|
+
(0, _react.useEffect)(()=>{
|
|
139
195
|
setHintContainerStyles();
|
|
140
196
|
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(isOpen);
|
|
141
197
|
if (isOpen) {
|
|
@@ -151,33 +207,33 @@ const Hint = ({ hint, side = 'right', className, hintContainer = DEFAULT_EMPTY_O
|
|
|
151
207
|
}, [
|
|
152
208
|
isOpen
|
|
153
209
|
]);
|
|
154
|
-
return /*#__PURE__*/
|
|
210
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
155
211
|
"data-testid": testId,
|
|
156
|
-
className:
|
|
212
|
+
className: (0, _classnames.default)('hint', className),
|
|
157
213
|
ref: hintRef,
|
|
158
214
|
children: [
|
|
159
|
-
/*#__PURE__*/
|
|
215
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("button", {
|
|
160
216
|
tabIndex: isAccessability ? 0 : -1,
|
|
161
217
|
"data-testid": typeof label === 'string' && label.length ? (_label_replace = label.replace) === null || _label_replace === void 0 ? void 0 : _label_replace.call(label, /\s/g, '-') : `${testId}--button`,
|
|
162
218
|
"aria-label": isAccessability && typeof label === 'string' ? label : '',
|
|
163
219
|
onClick: ()=>handleOpenType === 'click' && (isCallbackExist ? onClickCallback === null || onClickCallback === void 0 ? void 0 : onClickCallback() : setIsOpen(!isOpen)),
|
|
164
220
|
onMouseEnter: handle.onMouseEnter,
|
|
165
221
|
onMouseLeave: handle.onMouseLeave,
|
|
166
|
-
className:
|
|
222
|
+
className: (0, _classnames.default)('hint__button', {
|
|
167
223
|
hint__button_active: isOpen
|
|
168
224
|
}),
|
|
169
225
|
children: [
|
|
170
|
-
icon || /*#__PURE__*/
|
|
226
|
+
icon || /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
171
227
|
children: [
|
|
172
|
-
variant === 'outlined' && /*#__PURE__*/
|
|
228
|
+
variant === 'outlined' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactfeather.HelpCircle, {
|
|
173
229
|
width: 16,
|
|
174
230
|
height: 16,
|
|
175
231
|
className: "hint__icon outlined"
|
|
176
232
|
}),
|
|
177
|
-
variant === 'filled' && /*#__PURE__*/
|
|
233
|
+
variant === 'filled' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_CustomIcons.HelpCircleFilled, {
|
|
178
234
|
className: "hint__icon filled"
|
|
179
235
|
}),
|
|
180
|
-
variant === 'warning' && /*#__PURE__*/
|
|
236
|
+
variant === 'warning' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactfeather.AlertTriangle, {
|
|
181
237
|
className: "hint__icon",
|
|
182
238
|
color: "#F06D8D",
|
|
183
239
|
width: 16,
|
|
@@ -185,11 +241,11 @@ const Hint = ({ hint, side = 'right', className, hintContainer = DEFAULT_EMPTY_O
|
|
|
185
241
|
})
|
|
186
242
|
]
|
|
187
243
|
}),
|
|
188
|
-
label && /*#__PURE__*/
|
|
189
|
-
className:
|
|
244
|
+
label && /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
245
|
+
className: (0, _classnames.default)('hint__label', {
|
|
190
246
|
'color--primary': isOpen
|
|
191
247
|
}),
|
|
192
|
-
children: capitalized(label)
|
|
248
|
+
children: (0, _utils.capitalized)(label)
|
|
193
249
|
})
|
|
194
250
|
]
|
|
195
251
|
}),
|
|
@@ -197,4 +253,4 @@ const Hint = ({ hint, side = 'right', className, hintContainer = DEFAULT_EMPTY_O
|
|
|
197
253
|
]
|
|
198
254
|
});
|
|
199
255
|
};
|
|
200
|
-
|
|
256
|
+
const _default = Hint;
|