@geotab/zenith 3.1.1-beta.6 → 3.2.0-beta.0
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/README.md +20 -0
- package/dist/advancedGroupsFilter/advancedGroupsFilter.js +136 -30
- package/dist/advancedGroupsFilter/advancedGroupsFilterForm.js +139 -34
- package/dist/advancedGroupsFilter/advancedGroupsFilterFormSection.js +352 -87
- package/dist/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.d.ts +0 -1
- package/dist/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +83 -9
- package/dist/alertRaw/alertRaw.js +175 -54
- package/dist/banner/bannerMultipLine.js +131 -23
- package/dist/banner/bannerSingleLine.js +110 -16
- package/dist/betaPill/betaPill.js +111 -20
- package/dist/bookmark/bookmark.js +95 -28
- package/dist/bulkEditControl/bulkEditControl.js +167 -34
- package/dist/calendar/calendar.js +943 -273
- package/dist/calendar/calendarUtils.js +157 -85
- package/dist/card/card.js +268 -123
- package/dist/chart/accessibleChart/accessibleChartNarrative.js +648 -555
- package/dist/chart/accessibleChart/accessibleChartTable.js +245 -86
- package/dist/chart/chart.js +36 -21
- package/dist/chart/chartAxis/chartAxis.js +85 -7
- package/dist/checkboxListWithAction/checkboxListWithAction.js +224 -69
- package/dist/chip/chip.js +195 -91
- package/dist/columnsSelector/columnsSelector.js +97 -12
- package/dist/columnsSelector/columnsTab/columnsTab.js +59 -15
- package/dist/columnsSelector/columnsTabGroup/columnsTabGroup.js +81 -34
- package/dist/comboboxSelected/comboboxSelected.js +1 -3
- package/dist/dataFeed/feedExpandControl/feedExpandControl.js +25 -10
- package/dist/dataGrid/columns/checkboxColumn/checkboxHeaderCell.js +92 -11
- package/dist/dataGrid/dataGrid.js +227 -117
- package/dist/dataGrid/emptySearchList/emptySearchList.js +56 -9
- package/dist/dataGrid/entitiesListActions/actions/columnsListButton.js +51 -7
- package/dist/dataGrid/entitiesListActions/actions/fullscreenButton.js +64 -18
- package/dist/dataGrid/withFlexibleColumns/components/columnSettings.js +84 -10
- package/dist/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +48 -16
- package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +223 -32
- package/dist/dataGrid/withSelectableRows/withSelectableRows.js +286 -213
- package/dist/dataGrid/withSortableColumns/columns/sortableColumnWrapper.js +178 -95
- package/dist/dateInputInner/dateInputInner.js +791 -476
- package/dist/dateInputInner/dateInputInnerControlBlock.js +125 -22
- package/dist/dateInputRaw/dateInputRaw.js +315 -104
- package/dist/dateInputRaw/utils/getLabel.js +38 -7
- package/dist/dateRangeInner/dateRangeInner.js +172 -58
- package/dist/dateRangeRaw/dateRangeRaw.js +601 -239
- package/dist/dateRangeRaw/utils/dateRangeUtils.js +629 -241
- package/dist/dateSelectionWrapper/dateSelectionWrapper.js +152 -14
- package/dist/dialog/dialogContent.js +123 -40
- package/dist/dropdownRaw/dropdownHelper.d.ts +2 -2
- package/dist/dropdownRaw/dropdownHelper.js +9 -9
- package/dist/dropdownRaw/dropdownList.js +447 -78
- package/dist/dropdownRaw/dropdownPopup.js +218 -20
- package/dist/dropdownRaw/dropdownRaw.js +866 -506
- package/dist/dropdownRaw/dropdownSearchableTrigger.js +223 -46
- package/dist/dropdownRaw/stateReducer/stateAction.d.ts +5 -1
- package/dist/dropdownRaw/stateReducer/stateActionType.d.ts +2 -1
- package/dist/dropdownRaw/stateReducer/stateActionType.js +1 -0
- package/dist/dropdownRaw/stateReducer/stateReducer.d.ts +6 -1
- package/dist/dropdownRaw/stateReducer/stateReducer.js +24 -12
- package/dist/dropdownRaw/stateReducer/stateReducerHelper.d.ts +2 -0
- package/dist/dropdownRaw/stateReducer/stateReducerHelper.js +20 -1
- package/dist/dropdownRaw/stateReducer/stateReducerTestData.d.ts +39 -0
- package/dist/dropdownRaw/stateReducer/stateReducerTestData.js +74 -0
- package/dist/dropdownRaw/types.d.ts +1 -0
- package/dist/favoriteButton/favoriteButton.js +59 -10
- package/dist/filters/components/filtersContainer.js +151 -64
- package/dist/filters/components/filtersEmptySelectedList.js +30 -4
- package/dist/filters/components/filtersSaveModal.js +140 -42
- package/dist/filters/components/filtersSavedChipComponent.js +318 -108
- package/dist/filters/components/filtersSearchItemData.js +127 -47
- package/dist/filters/components/filtersSearchList.js +381 -179
- package/dist/filters/components/filtersSelect.js +128 -61
- package/dist/filters/components/filtersSelectListItem.js +125 -13
- package/dist/filters/components/filtersSidePanel.js +510 -178
- package/dist/filters/filters.js +445 -268
- package/dist/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +729 -272
- package/dist/filtersBar/components/resetComponentButton.js +45 -5
- package/dist/filtersBar/filtersBarActions/filtersBarActions.js +126 -15
- package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +155 -49
- package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +360 -104
- package/dist/filtersBar/filtersContainer/filtersContainer.js +204 -134
- package/dist/formField/components/formFieldWithLabel.d.ts +2 -1
- package/dist/formField/components/formFieldWithLabel.js +3 -2
- package/dist/formField/components/formFieldWithoutLabel.d.ts +2 -1
- package/dist/formField/components/formFieldWithoutLabel.js +3 -3
- package/dist/formField/components/trailingComponent.d.ts +8 -0
- package/dist/formField/components/trailingComponent.js +11 -0
- package/dist/formField/formField.js +12 -11
- package/dist/formField/hooks/useError.js +100 -36
- package/dist/formGroup/components/reviewListToggle/reviewListToggle.js +72 -7
- package/dist/formGroup/hooks/useToggle.js +37 -11
- package/dist/formGroup/utils/getControls.js +8 -7
- package/dist/formLayout/hooks/useError.js +55 -15
- package/dist/formLayout/hooks/useFormButtons.js +128 -27
- package/dist/formSection/components/formSectionModal.js +1 -1
- package/dist/formSection/formSection.js +1 -1
- package/dist/formSection/hooks/useError.js +70 -22
- package/dist/formStepper/components/formStep.js +65 -10
- package/dist/formStepper/formStepper.js +129 -33
- package/dist/formStepperButtons/formStepperButtons.js +184 -38
- package/dist/groupsFilter/groupsHelper.d.ts +1 -1
- package/dist/groupsFilterRaw/groupsFilterAdjustmentState.js +162 -17
- package/dist/groupsFilterRaw/groupsFilterBox.js +137 -32
- package/dist/groupsFilterRaw/groupsFilterCommon.js +75 -8
- package/dist/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +184 -25
- package/dist/groupsFilterRaw/groupsFilterHelper.d.ts +2 -1
- package/dist/groupsFilterRaw/groupsFilterHelper.js +284 -168
- package/dist/groupsFilterRaw/groupsFilterInitialState.js +266 -18
- package/dist/groupsFilterRaw/groupsFilterMenu.js +124 -9
- package/dist/groupsFilterRaw/groupsFilterRaw.d.ts +1 -0
- package/dist/groupsFilterRaw/groupsFilterRaw.js +816 -308
- package/dist/groupsFilterRaw/groupsFilterTestData.d.ts +155 -2
- package/dist/groupsFilterRaw/groupsFilterTestData.js +153 -58
- package/dist/groupsFilterRaw/groupsFilterTrigger.js +139 -35
- package/dist/groupsFilterRaw/groupsHelper.js +739 -208
- package/dist/groupsFilterRaw/stateReducer/stateReducerHelper.js +3 -1
- package/dist/groupsFilterRaw/types.d.ts +1 -0
- package/dist/header/components/collapsedItemsControl/collapsedItemsControl.js +107 -52
- package/dist/header/components/mobileFilterControl/mobileFilterControl.js +62 -9
- package/dist/header/components/mobileSearchControl/mobileSearchControl.js +119 -14
- package/dist/header/headerBack.js +64 -20
- package/dist/index.css +110 -71
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -1
- package/dist/list/itemData/itemDataInternal.js +216 -51
- package/dist/list/listItem/listItem.js +168 -55
- package/dist/menu/components/menuErrorItem.js +33 -5
- package/dist/mobileSheet/mobileSheet.js +195 -69
- package/dist/modal/modal.js +300 -142
- package/dist/nav/nav.js +1 -1
- package/dist/nav/navFooter/navFooter.js +82 -39
- package/dist/nav/navFooter/navFooterAction/navFooterAction.js +52 -13
- package/dist/nav/navHeader/navHeader.js +86 -36
- package/dist/nav/navHeader/navHeaderSearch/navHeaderSearch.js +88 -29
- package/dist/nav/navItem/navItem.d.ts +3 -3
- package/dist/nav/navItem/navItem.js +35 -33
- package/dist/nav/navMobileBar/navMobileBar.js +67 -21
- package/dist/notification/notification.js +124 -21
- package/dist/pagination/paginationArrow.js +81 -11
- package/dist/pagination/paginationText/paginationText.js +45 -11
- package/dist/pill/components/pillNonActionable/pillNonActionable.js +93 -24
- package/dist/pillBox/components/pillBoxItem.js +52 -9
- package/dist/pillBox/pillBox.js +121 -20
- package/dist/pillExpandable/pillExpandable.js +333 -139
- package/dist/rangeRaw/rangeRaw.js +486 -141
- package/dist/rangeRaw/utils/rangeHelper.js +209 -39
- package/dist/searchInputRaw/searchInputRaw.js +180 -65
- package/dist/skeleton/skeleton.js +51 -6
- package/dist/sortControl/sortControl.js +152 -42
- package/dist/stepperRaw/stepperRaw.js +116 -42
- package/dist/summary/summary.js +94 -8
- package/dist/table/actions/actionsMenu.js +171 -78
- package/dist/table/flexible/columnSettings.js +80 -10
- package/dist/table/flexible/columnsList.js +110 -43
- package/dist/table/flexible/columnsPopup.js +77 -20
- package/dist/table/nested/useNestedRows.js +167 -77
- package/dist/table/selectable/selectableHeader.js +180 -41
- package/dist/table/selectable/useSelectableRows.js +270 -191
- package/dist/table/sortable/sortableHeader.js +153 -75
- package/dist/tabs/tabs.js +227 -118
- package/dist/timePickerRaw/timePickerRaw.js +278 -58
- package/dist/toastRaw/toastRaw.js +138 -32
- package/dist/toggleButton/toggleButton.d.ts +0 -1
- package/dist/toggleButtonRaw/toggleButtonRaw.d.ts +1 -0
- package/dist/toggleButtonRaw/toggleButtonRaw.js +146 -40
- package/dist/utils/formatDate.js +1001 -117
- package/{esm/utils/localization/translations/cs-json.js → dist/utils/localization/translations/cs.json} +11 -12
- package/{esm/utils/localization/translations/da-DK-json.js → dist/utils/localization/translations/da-DK.json} +31 -23
- package/{esm/utils/localization/translations/de-json.js → dist/utils/localization/translations/de.json} +12 -13
- package/dist/utils/localization/translations/en.json +308 -0
- package/{esm/utils/localization/translations/es-json.js → dist/utils/localization/translations/es.json} +11 -12
- package/{esm/utils/localization/translations/fi-FI-json.js → dist/utils/localization/translations/fi-FI.json} +31 -23
- package/{esm/utils/localization/translations/fr-FR-json.js → dist/utils/localization/translations/fr-FR.json} +12 -12
- package/{esm/utils/localization/translations/fr-json.js → dist/utils/localization/translations/fr.json} +11 -12
- package/{esm/utils/localization/translations/hu-HU-json.js → dist/utils/localization/translations/hu-HU.json} +31 -23
- package/{esm/utils/localization/translations/id-json.js → dist/utils/localization/translations/id.json} +11 -13
- package/{esm/utils/localization/translations/it-json.js → dist/utils/localization/translations/it.json} +11 -12
- package/{esm/utils/localization/translations/ja-json.js → dist/utils/localization/translations/ja.json} +11 -12
- package/{esm/utils/localization/translations/ko-KR-json.js → dist/utils/localization/translations/ko-KR.json} +24 -23
- package/{esm/utils/localization/translations/ms-json.js → dist/utils/localization/translations/ms.json} +11 -12
- package/{esm/utils/localization/translations/nb-NO-json.js → dist/utils/localization/translations/nb-NO.json} +31 -23
- package/{esm/utils/localization/translations/nl-json.js → dist/utils/localization/translations/nl.json} +11 -12
- package/{esm/utils/localization/translations/pl-json.js → dist/utils/localization/translations/pl.json} +11 -12
- package/{esm/utils/localization/translations/pt-BR-json.js → dist/utils/localization/translations/pt-BR.json} +11 -12
- package/{esm/utils/localization/translations/sk-SK-json.js → dist/utils/localization/translations/sk-SK.json} +31 -23
- package/{esm/utils/localization/translations/sv-json.js → dist/utils/localization/translations/sv.json} +11 -12
- package/{esm/utils/localization/translations/th-json.js → dist/utils/localization/translations/th.json} +11 -12
- package/{esm/utils/localization/translations/tr-json.js → dist/utils/localization/translations/tr.json} +11 -12
- package/{esm/utils/localization/translations/zh-Hans-json.js → dist/utils/localization/translations/zh-Hans.json} +11 -12
- package/{esm/utils/localization/translations/zh-TW-json.js → dist/utils/localization/translations/zh-TW.json} +11 -23
- package/dist/utils/localization/translationsDictionary.d.ts +2 -0
- package/dist/utils/localization/translationsDictionary.js +63 -0
- package/dist/utils/localization/useLanguage.js +2 -74
- package/esm/advancedGroupsFilter/advancedGroupsFilter.js +130 -29
- package/esm/advancedGroupsFilter/advancedGroupsFilterForm.js +133 -33
- package/esm/advancedGroupsFilter/advancedGroupsFilterFormSection.js +317 -65
- package/esm/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.d.ts +0 -1
- package/esm/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +77 -8
- package/esm/alertRaw/alertRaw.js +165 -51
- package/esm/banner/bannerMultipLine.js +121 -20
- package/esm/banner/bannerSingleLine.js +100 -13
- package/esm/betaPill/betaPill.js +105 -19
- package/esm/bookmark/bookmark.js +89 -27
- package/esm/bulkEditControl/bulkEditControl.js +161 -33
- package/esm/calendar/calendar.js +937 -272
- package/esm/calendar/calendarUtils.js +151 -84
- package/esm/card/card.js +233 -101
- package/esm/chart/accessibleChart/accessibleChartNarrative.js +642 -554
- package/esm/chart/accessibleChart/accessibleChartTable.js +239 -85
- package/esm/chart/chart.js +30 -20
- package/esm/chart/chartAxis/chartAxis.js +79 -6
- package/esm/checkboxListWithAction/checkboxListWithAction.js +218 -68
- package/esm/chip/chip.js +189 -90
- package/esm/columnsSelector/columnsSelector.js +91 -11
- package/esm/columnsSelector/columnsTab/columnsTab.js +53 -14
- package/esm/columnsSelector/columnsTabGroup/columnsTabGroup.js +75 -33
- package/esm/comboboxSelected/comboboxSelected.js +1 -3
- package/esm/dataFeed/feedExpandControl/feedExpandControl.js +21 -9
- package/esm/dataGrid/columns/checkboxColumn/checkboxHeaderCell.js +86 -10
- package/esm/dataGrid/dataGrid.js +221 -116
- package/esm/dataGrid/emptySearchList/emptySearchList.js +50 -8
- package/esm/dataGrid/entitiesListActions/actions/columnsListButton.js +45 -6
- package/esm/dataGrid/entitiesListActions/actions/fullscreenButton.js +58 -17
- package/esm/dataGrid/withFlexibleColumns/components/columnSettings.js +78 -9
- package/esm/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +44 -15
- package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +217 -31
- package/esm/dataGrid/withSelectableRows/withSelectableRows.js +280 -212
- package/esm/dataGrid/withSortableColumns/columns/sortableColumnWrapper.js +172 -94
- package/esm/dateInputInner/dateInputInner.js +785 -475
- package/esm/dateInputInner/dateInputInnerControlBlock.js +119 -21
- package/esm/dateInputRaw/dateInputRaw.js +309 -103
- package/esm/dateInputRaw/utils/getLabel.js +32 -6
- package/esm/dateRangeInner/dateRangeInner.js +166 -57
- package/esm/dateRangeRaw/dateRangeRaw.js +595 -238
- package/esm/dateRangeRaw/utils/dateRangeUtils.js +622 -239
- package/esm/dateSelectionWrapper/dateSelectionWrapper.js +146 -13
- package/esm/dialog/dialogContent.js +117 -39
- package/esm/dropdownRaw/dropdownHelper.d.ts +2 -2
- package/esm/dropdownRaw/dropdownHelper.js +10 -10
- package/esm/dropdownRaw/dropdownList.js +412 -56
- package/esm/dropdownRaw/dropdownPopup.js +212 -19
- package/esm/dropdownRaw/dropdownRaw.js +862 -507
- package/esm/dropdownRaw/dropdownSearchableTrigger.js +217 -45
- package/esm/dropdownRaw/stateReducer/stateAction.d.ts +5 -1
- package/esm/dropdownRaw/stateReducer/stateActionType.d.ts +2 -1
- package/esm/dropdownRaw/stateReducer/stateActionType.js +1 -0
- package/esm/dropdownRaw/stateReducer/stateReducer.d.ts +6 -1
- package/esm/dropdownRaw/stateReducer/stateReducer.js +24 -12
- package/esm/dropdownRaw/stateReducer/stateReducerHelper.d.ts +2 -0
- package/esm/dropdownRaw/stateReducer/stateReducerHelper.js +18 -0
- package/esm/dropdownRaw/stateReducer/stateReducerTestData.d.ts +39 -0
- package/esm/dropdownRaw/stateReducer/stateReducerTestData.js +71 -0
- package/esm/dropdownRaw/types.d.ts +1 -0
- package/esm/favoriteButton/favoriteButton.js +53 -9
- package/esm/filters/components/filtersContainer.js +141 -61
- package/esm/filters/components/filtersEmptySelectedList.js +24 -3
- package/esm/filters/components/filtersSaveModal.js +134 -41
- package/esm/filters/components/filtersSavedChipComponent.js +312 -107
- package/esm/filters/components/filtersSearchItemData.js +121 -46
- package/esm/filters/components/filtersSearchList.js +375 -178
- package/esm/filters/components/filtersSelect.js +122 -60
- package/esm/filters/components/filtersSelectListItem.js +119 -12
- package/esm/filters/components/filtersSidePanel.js +504 -177
- package/esm/filters/filters.js +435 -265
- package/esm/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +722 -270
- package/esm/filtersBar/components/resetComponentButton.js +39 -4
- package/esm/filtersBar/filtersBarActions/filtersBarActions.js +120 -14
- package/esm/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +149 -48
- package/esm/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +354 -103
- package/esm/filtersBar/filtersContainer/filtersContainer.js +198 -133
- package/esm/formField/components/formFieldWithLabel.d.ts +2 -1
- package/esm/formField/components/formFieldWithLabel.js +3 -2
- package/esm/formField/components/formFieldWithoutLabel.d.ts +2 -1
- package/esm/formField/components/formFieldWithoutLabel.js +3 -3
- package/esm/formField/components/trailingComponent.d.ts +8 -0
- package/esm/formField/components/trailingComponent.js +7 -0
- package/esm/formField/formField.js +12 -11
- package/esm/formField/hooks/useError.js +94 -35
- package/esm/formGroup/components/reviewListToggle/reviewListToggle.js +66 -6
- package/esm/formGroup/hooks/useToggle.js +31 -10
- package/esm/formGroup/utils/getControls.js +8 -7
- package/esm/formLayout/hooks/useError.js +49 -14
- package/esm/formLayout/hooks/useFormButtons.js +122 -26
- package/esm/formSection/components/formSectionModal.js +1 -1
- package/esm/formSection/formSection.js +1 -1
- package/esm/formSection/hooks/useError.js +64 -21
- package/esm/formStepper/components/formStep.js +59 -9
- package/esm/formStepper/formStepper.js +123 -32
- package/esm/formStepperButtons/formStepperButtons.js +178 -37
- package/esm/groupsFilter/groupsHelper.d.ts +1 -1
- package/esm/groupsFilterRaw/groupsFilterAdjustmentState.js +152 -14
- package/esm/groupsFilterRaw/groupsFilterBox.js +131 -31
- package/esm/groupsFilterRaw/groupsFilterCommon.js +69 -7
- package/esm/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +178 -24
- package/esm/groupsFilterRaw/groupsFilterHelper.d.ts +2 -1
- package/esm/groupsFilterRaw/groupsFilterHelper.js +279 -168
- package/esm/groupsFilterRaw/groupsFilterInitialState.js +260 -17
- package/esm/groupsFilterRaw/groupsFilterMenu.js +118 -8
- package/esm/groupsFilterRaw/groupsFilterRaw.d.ts +1 -0
- package/esm/groupsFilterRaw/groupsFilterRaw.js +811 -308
- package/esm/groupsFilterRaw/groupsFilterTestData.d.ts +155 -2
- package/esm/groupsFilterRaw/groupsFilterTestData.js +152 -57
- package/esm/groupsFilterRaw/groupsFilterTrigger.js +133 -34
- package/esm/groupsFilterRaw/groupsHelper.js +733 -207
- package/esm/groupsFilterRaw/stateReducer/stateReducerHelper.js +3 -1
- package/esm/groupsFilterRaw/types.d.ts +1 -0
- package/esm/header/components/collapsedItemsControl/collapsedItemsControl.js +101 -51
- package/esm/header/components/mobileFilterControl/mobileFilterControl.js +56 -8
- package/esm/header/components/mobileSearchControl/mobileSearchControl.js +113 -13
- package/esm/header/headerBack.js +58 -19
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/list/itemData/itemDataInternal.js +210 -50
- package/esm/list/listItem/listItem.js +162 -54
- package/esm/menu/components/menuErrorItem.js +27 -4
- package/esm/mobileSheet/mobileSheet.js +189 -68
- package/esm/modal/modal.js +265 -120
- package/esm/nav/nav.js +1 -1
- package/esm/nav/navFooter/navFooter.js +76 -38
- package/esm/nav/navFooter/navFooterAction/navFooterAction.js +46 -12
- package/esm/nav/navHeader/navHeader.js +80 -35
- package/esm/nav/navHeader/navHeaderSearch/navHeaderSearch.js +82 -28
- package/esm/nav/navItem/navItem.d.ts +3 -3
- package/esm/nav/navItem/navItem.js +35 -33
- package/esm/nav/navMobileBar/navMobileBar.js +61 -20
- package/esm/notification/notification.js +114 -18
- package/esm/pagination/paginationArrow.js +75 -10
- package/esm/pagination/paginationText/paginationText.js +39 -10
- package/esm/pill/components/pillNonActionable/pillNonActionable.js +87 -23
- package/esm/pillBox/components/pillBoxItem.js +46 -8
- package/esm/pillBox/pillBox.js +115 -19
- package/esm/pillExpandable/pillExpandable.js +327 -138
- package/esm/rangeRaw/rangeRaw.js +480 -140
- package/esm/rangeRaw/utils/rangeHelper.js +203 -38
- package/esm/searchInputRaw/searchInputRaw.js +145 -43
- package/esm/skeleton/skeleton.js +45 -5
- package/esm/sortControl/sortControl.js +146 -41
- package/esm/stepperRaw/stepperRaw.js +112 -41
- package/esm/storybookHelpers/dataGridWithDifferentCellOptions/components/EntitiesListAction.js +178 -19
- package/esm/summary/summary.js +88 -7
- package/esm/table/actions/actionsMenu.js +165 -77
- package/esm/table/flexible/columnSettings.js +74 -9
- package/esm/table/flexible/columnsList.js +104 -42
- package/esm/table/flexible/columnsPopup.js +71 -19
- package/esm/table/nested/useNestedRows.js +161 -76
- package/esm/table/selectable/selectableHeader.js +174 -40
- package/esm/table/selectable/useSelectableRows.js +264 -190
- package/esm/table/sortable/sortableHeader.js +147 -74
- package/esm/tabs/tabs.js +221 -117
- package/esm/timePickerRaw/timePickerRaw.js +272 -57
- package/esm/toastRaw/toastRaw.js +132 -31
- package/esm/toggleButton/toggleButton.d.ts +0 -1
- package/esm/toggleButtonRaw/toggleButtonRaw.d.ts +1 -0
- package/esm/toggleButtonRaw/toggleButtonRaw.js +111 -18
- package/esm/utils/formatDate.js +995 -116
- package/{dist/utils/localization/translations/cs-json.js → esm/utils/localization/translations/cs.json} +11 -15
- package/{dist/utils/localization/translations/da-DK-json.js → esm/utils/localization/translations/da-DK.json} +31 -26
- package/{dist/utils/localization/translations/de-json.js → esm/utils/localization/translations/de.json} +12 -16
- package/esm/utils/localization/translations/en.json +308 -0
- package/{dist/utils/localization/translations/es-json.js → esm/utils/localization/translations/es.json} +11 -15
- package/{dist/utils/localization/translations/fi-FI-json.js → esm/utils/localization/translations/fi-FI.json} +31 -26
- package/{dist/utils/localization/translations/fr-FR-json.js → esm/utils/localization/translations/fr-FR.json} +12 -15
- package/{dist/utils/localization/translations/fr-json.js → esm/utils/localization/translations/fr.json} +11 -15
- package/{dist/utils/localization/translations/hu-HU-json.js → esm/utils/localization/translations/hu-HU.json} +31 -26
- package/{dist/utils/localization/translations/id-json.js → esm/utils/localization/translations/id.json} +11 -16
- package/{dist/utils/localization/translations/it-json.js → esm/utils/localization/translations/it.json} +11 -15
- package/{dist/utils/localization/translations/ja-json.js → esm/utils/localization/translations/ja.json} +11 -15
- package/{dist/utils/localization/translations/ko-KR-json.js → esm/utils/localization/translations/ko-KR.json} +24 -26
- package/{dist/utils/localization/translations/ms-json.js → esm/utils/localization/translations/ms.json} +11 -15
- package/{dist/utils/localization/translations/nb-NO-json.js → esm/utils/localization/translations/nb-NO.json} +31 -26
- package/{dist/utils/localization/translations/nl-json.js → esm/utils/localization/translations/nl.json} +11 -15
- package/{dist/utils/localization/translations/pl-json.js → esm/utils/localization/translations/pl.json} +11 -15
- package/{dist/utils/localization/translations/pt-BR-json.js → esm/utils/localization/translations/pt-BR.json} +11 -15
- package/{dist/utils/localization/translations/sk-SK-json.js → esm/utils/localization/translations/sk-SK.json} +31 -26
- package/{dist/utils/localization/translations/sv-json.js → esm/utils/localization/translations/sv.json} +11 -15
- package/{dist/utils/localization/translations/th-json.js → esm/utils/localization/translations/th.json} +11 -15
- package/{dist/utils/localization/translations/tr-json.js → esm/utils/localization/translations/tr.json} +11 -15
- package/{dist/utils/localization/translations/zh-Hans-json.js → esm/utils/localization/translations/zh-Hans.json} +11 -15
- package/{dist/utils/localization/translations/zh-TW-json.js → esm/utils/localization/translations/zh-TW.json} +11 -26
- package/esm/utils/localization/translationsDictionary.d.ts +2 -0
- package/esm/utils/localization/translationsDictionary.js +59 -0
- package/esm/utils/localization/useLanguage.js +1 -50
- package/package.json +17 -10
- package/dist/utils/localization/translations/cs-json.d.ts +0 -251
- package/dist/utils/localization/translations/da-DK-json.d.ts +0 -252
- package/dist/utils/localization/translations/de-json.d.ts +0 -251
- package/dist/utils/localization/translations/en-json.d.ts +0 -314
- package/dist/utils/localization/translations/en-json.js +0 -317
- package/dist/utils/localization/translations/es-json.d.ts +0 -251
- package/dist/utils/localization/translations/fi-FI-json.d.ts +0 -252
- package/dist/utils/localization/translations/fr-FR-json.d.ts +0 -250
- package/dist/utils/localization/translations/fr-json.d.ts +0 -251
- package/dist/utils/localization/translations/hu-HU-json.d.ts +0 -252
- package/dist/utils/localization/translations/id-json.d.ts +0 -252
- package/dist/utils/localization/translations/it-json.d.ts +0 -251
- package/dist/utils/localization/translations/ja-json.d.ts +0 -251
- package/dist/utils/localization/translations/ko-KR-json.d.ts +0 -258
- package/dist/utils/localization/translations/ms-json.d.ts +0 -251
- package/dist/utils/localization/translations/nb-NO-json.d.ts +0 -252
- package/dist/utils/localization/translations/nl-json.d.ts +0 -251
- package/dist/utils/localization/translations/pl-json.d.ts +0 -251
- package/dist/utils/localization/translations/pt-BR-json.d.ts +0 -251
- package/dist/utils/localization/translations/sk-SK-json.d.ts +0 -251
- package/dist/utils/localization/translations/sv-json.d.ts +0 -251
- package/dist/utils/localization/translations/th-json.d.ts +0 -251
- package/dist/utils/localization/translations/tr-json.d.ts +0 -251
- package/dist/utils/localization/translations/zh-Hans-json.d.ts +0 -251
- package/dist/utils/localization/translations/zh-TW-json.d.ts +0 -271
- package/esm/utils/localization/translations/cs-json.d.ts +0 -251
- package/esm/utils/localization/translations/da-DK-json.d.ts +0 -252
- package/esm/utils/localization/translations/de-json.d.ts +0 -251
- package/esm/utils/localization/translations/en-json.d.ts +0 -314
- package/esm/utils/localization/translations/en-json.js +0 -314
- package/esm/utils/localization/translations/es-json.d.ts +0 -251
- package/esm/utils/localization/translations/fi-FI-json.d.ts +0 -252
- package/esm/utils/localization/translations/fr-FR-json.d.ts +0 -250
- package/esm/utils/localization/translations/fr-json.d.ts +0 -251
- package/esm/utils/localization/translations/hu-HU-json.d.ts +0 -252
- package/esm/utils/localization/translations/id-json.d.ts +0 -252
- package/esm/utils/localization/translations/it-json.d.ts +0 -251
- package/esm/utils/localization/translations/ja-json.d.ts +0 -251
- package/esm/utils/localization/translations/ko-KR-json.d.ts +0 -258
- package/esm/utils/localization/translations/ms-json.d.ts +0 -251
- package/esm/utils/localization/translations/nb-NO-json.d.ts +0 -252
- package/esm/utils/localization/translations/nl-json.d.ts +0 -251
- package/esm/utils/localization/translations/pl-json.d.ts +0 -251
- package/esm/utils/localization/translations/pt-BR-json.d.ts +0 -251
- package/esm/utils/localization/translations/sk-SK-json.d.ts +0 -251
- package/esm/utils/localization/translations/sv-json.d.ts +0 -251
- package/esm/utils/localization/translations/th-json.d.ts +0 -251
- package/esm/utils/localization/translations/tr-json.d.ts +0 -251
- package/esm/utils/localization/translations/zh-Hans-json.d.ts +0 -251
- package/esm/utils/localization/translations/zh-TW-json.d.ts +0 -271
|
@@ -1,20 +1,119 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
|
|
3
|
+
const {
|
|
4
|
+
injectString
|
|
5
|
+
} = require("../utils/localization/translationsDictionary");
|
|
6
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
7
|
+
var t = {};
|
|
8
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
9
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
10
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
12
13
|
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", {
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
14
17
|
exports.TRANSLATIONS = exports.DropdownSearchableTrigger = void 0;
|
|
15
18
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
19
|
const react_1 = require("react");
|
|
17
20
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
21
|
+
injectString("cs", "Filter by group", "Filtrovat podle skupiny");
|
|
22
|
+
injectString("da-DK", "Filter by group", "Filtrer efter gruppe");
|
|
23
|
+
injectString("de", "Filter by group", "Nach Gruppe filtern");
|
|
24
|
+
injectString("en", "Filter by group", "Filter by group");
|
|
25
|
+
injectString("es", "Filter by group", "Filtrar por grupo");
|
|
26
|
+
injectString("fi-FI", "Filter by group", "Suodata ryhm\xE4n mukaan");
|
|
27
|
+
injectString("fr", "Filter by group", "Filtrer par groupe");
|
|
28
|
+
injectString("fr-FR", "Filter by group", "Filtrer par groupe");
|
|
29
|
+
injectString("hu-HU", "Filter by group", "Sz\u0171rd csoport alapj\xE1n.");
|
|
30
|
+
injectString("id", "Filter by group", "Filter berdasarkan grup");
|
|
31
|
+
injectString("it", "Filter by group", "Filtrare per gruppo");
|
|
32
|
+
injectString("ja", "Filter by group", "\u30B0\u30EB\u30FC\u30D7\u306B\u3088\u308B\u30D5\u30A3\u30EB\u30BF\u30EA\u30F3\u30B0");
|
|
33
|
+
injectString("ko-KR", "Filter by group", "\uADF8\uB8F9\uBCC4 \uD544\uD130\uB9C1");
|
|
34
|
+
injectString("ms", "Filter by group", "Saring mengikut kumpulan");
|
|
35
|
+
injectString("nb-NO", "Filter by group", "Filtrer etter gruppe");
|
|
36
|
+
injectString("nl", "Filter by group", "Filteren op groep");
|
|
37
|
+
injectString("pl", "Filter by group", "Filtruj wed\u0142ug grupy");
|
|
38
|
+
injectString("pt-BR", "Filter by group", "Filtrar por grupo");
|
|
39
|
+
injectString("sk-SK", "Filter by group", "Filtrova\u0165 pod\u013Ea skupiny");
|
|
40
|
+
injectString("sv", "Filter by group", "Filtrera efter grupp");
|
|
41
|
+
injectString("th", "Filter by group", "\u0E01\u0E23\u0E2D\u0E07\u0E15\u0E32\u0E21\u0E01\u0E25\u0E38\u0E48\u0E21");
|
|
42
|
+
injectString("tr", "Filter by group", "Gruba g\xF6re filtrele");
|
|
43
|
+
injectString("zh-Hans", "Filter by group", "\u6309\u7EC4\u8FC7\u6EE4");
|
|
44
|
+
injectString("zh-TW", "Filter by group", "\u4F9D\u7FA4\u7D44\u7BE9\u9078");
|
|
45
|
+
injectString("cs", "Clear search", "Vymazat vyhled\xE1v\xE1n\xED");
|
|
46
|
+
injectString("da-DK", "Clear search", "Ryd s\xF8gning");
|
|
47
|
+
injectString("de", "Clear search", "Suche l\xF6schen");
|
|
48
|
+
injectString("en", "Clear search", "Clear search");
|
|
49
|
+
injectString("es", "Clear search", "Borrar b\xFAsqueda");
|
|
50
|
+
injectString("fi-FI", "Clear search", "Tyhjenn\xE4 haku");
|
|
51
|
+
injectString("fr", "Clear search", "Effacer la recherche");
|
|
52
|
+
injectString("fr-FR", "Clear search", "Effacer la recherche");
|
|
53
|
+
injectString("hu-HU", "Clear search", "T\xF6r\xF6ld a keres\xE9st.");
|
|
54
|
+
injectString("id", "Clear search", "Hapus pencarian");
|
|
55
|
+
injectString("it", "Clear search", "Cancellare ricerca");
|
|
56
|
+
injectString("ja", "Clear search", "\u691C\u7D22\u3092\u30AF\u30EA\u30A2");
|
|
57
|
+
injectString("ko-KR", "Clear search", "\uAC80\uC0C9 \uC9C0\uC6B0\uAE30");
|
|
58
|
+
injectString("ms", "Clear search", "Kosongkan carian");
|
|
59
|
+
injectString("nb-NO", "Clear search", "T\xF8m s\xF8k");
|
|
60
|
+
injectString("nl", "Clear search", "Zoekopdracht wissen");
|
|
61
|
+
injectString("pl", "Clear search", "Wyczy\u015B\u0107 wyszukiwanie");
|
|
62
|
+
injectString("pt-BR", "Clear search", "Limpar pesquisa");
|
|
63
|
+
injectString("sk-SK", "Clear search", "Vyma\u017E vyh\u013Ead\xE1vanie.");
|
|
64
|
+
injectString("sv", "Clear search", "Rensa s\xF6kningen");
|
|
65
|
+
injectString("th", "Clear search", "\u0E25\u0E49\u0E32\u0E07\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32");
|
|
66
|
+
injectString("tr", "Clear search", "Aramay\u0131 temizle");
|
|
67
|
+
injectString("zh-Hans", "Clear search", "\u6E05\u9664\u641C\u7D22");
|
|
68
|
+
injectString("zh-TW", "Clear search", "\u6E05\u9664\u641C\u5C0B");
|
|
69
|
+
injectString("cs", "Close filter", "Zav\u0159\xEDt filtr");
|
|
70
|
+
injectString("da-DK", "Close filter", "Luk filter");
|
|
71
|
+
injectString("de", "Close filter", "Filter schlie\xDFen");
|
|
72
|
+
injectString("en", "Close filter", "Close filter");
|
|
73
|
+
injectString("es", "Close filter", "Cerrar filtro");
|
|
74
|
+
injectString("fi-FI", "Close filter", "Sulje suodatin");
|
|
75
|
+
injectString("fr", "Close filter", "Fermer le filtre");
|
|
76
|
+
injectString("fr-FR", "Close filter", "Fermer le filtre");
|
|
77
|
+
injectString("hu-HU", "Close filter", "Z\xE1rja be a sz\u0171r\u0151t");
|
|
78
|
+
injectString("id", "Close filter", "Tutup filter");
|
|
79
|
+
injectString("it", "Close filter", "Chiudi filtro");
|
|
80
|
+
injectString("ja", "Close filter", "\u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u9589\u3058\u308B");
|
|
81
|
+
injectString("ko-KR", "Close filter", "\uD544\uD130 \uB2EB\uAE30");
|
|
82
|
+
injectString("ms", "Close filter", "Tutup penyaring");
|
|
83
|
+
injectString("nb-NO", "Close filter", "Lukk filter");
|
|
84
|
+
injectString("nl", "Close filter", "Filter sluiten");
|
|
85
|
+
injectString("pl", "Close filter", "Zamknij filtr");
|
|
86
|
+
injectString("pt-BR", "Close filter", "Fechar filtro");
|
|
87
|
+
injectString("sk-SK", "Close filter", "Zatvori\u0165 filter");
|
|
88
|
+
injectString("sv", "Close filter", "St\xE4ng filter");
|
|
89
|
+
injectString("th", "Close filter", "\u0E1B\u0E34\u0E14\u0E15\u0E31\u0E27\u0E01\u0E23\u0E2D\u0E07");
|
|
90
|
+
injectString("tr", "Close filter", "Filtreyi kapat");
|
|
91
|
+
injectString("zh-Hans", "Close filter", "\u5173\u95ED\u7B5B\u9009\u5668");
|
|
92
|
+
injectString("zh-TW", "Close filter", "\u95DC\u9589\u7BE9\u9078\u5668");
|
|
93
|
+
injectString("cs", "Open filter", "Otev\u0159\xEDt filtr");
|
|
94
|
+
injectString("da-DK", "Open filter", "\xC5bn filter");
|
|
95
|
+
injectString("de", "Open filter", "Filter \xF6ffnen");
|
|
96
|
+
injectString("en", "Open filter", "Open filter");
|
|
97
|
+
injectString("es", "Open filter", "Abrir filtro");
|
|
98
|
+
injectString("fi-FI", "Open filter", "Avaa suodatin");
|
|
99
|
+
injectString("fr", "Open filter", "Ouvrir le filtre");
|
|
100
|
+
injectString("fr-FR", "Open filter", "Ouvrir le filtre");
|
|
101
|
+
injectString("hu-HU", "Open filter", "Nyisd meg a sz\u0171r\u0151t.");
|
|
102
|
+
injectString("id", "Open filter", "Buka filter");
|
|
103
|
+
injectString("it", "Open filter", "Aprire filtro");
|
|
104
|
+
injectString("ja", "Open filter", "\u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u958B\u304F");
|
|
105
|
+
injectString("ko-KR", "Open filter", "\uD544\uD130 \uC5F4\uAE30");
|
|
106
|
+
injectString("ms", "Open filter", "Buka penyaring");
|
|
107
|
+
injectString("nb-NO", "Open filter", "\xC5pne filter");
|
|
108
|
+
injectString("nl", "Open filter", "Filter openen");
|
|
109
|
+
injectString("pl", "Open filter", "Otw\xF3rz filtr");
|
|
110
|
+
injectString("pt-BR", "Open filter", "Abrir filtro");
|
|
111
|
+
injectString("sk-SK", "Open filter", "Otvori filter.");
|
|
112
|
+
injectString("sv", "Open filter", "\xD6ppna filter");
|
|
113
|
+
injectString("th", "Open filter", "\u0E40\u0E1B\u0E34\u0E14\u0E15\u0E31\u0E27\u0E01\u0E23\u0E2D\u0E07");
|
|
114
|
+
injectString("tr", "Open filter", "Filtreyi a\xE7");
|
|
115
|
+
injectString("zh-Hans", "Open filter", "\u6253\u5F00\u7B5B\u9009\u5668");
|
|
116
|
+
injectString("zh-TW", "Open filter", "\u958B\u555F\u7BE9\u9078\u689D\u4EF6");
|
|
18
117
|
const textInputRaw_1 = require("../textInputRaw/textInputRaw");
|
|
19
118
|
const iconChevronDownSmall_1 = require("../icons/iconChevronDownSmall");
|
|
20
119
|
const iconCrossThin_1 = require("../icons/deprecated/iconCrossThin");
|
|
@@ -23,41 +122,119 @@ const useDriveClassName_1 = require("../utils/theme/useDriveClassName");
|
|
|
23
122
|
const useDrive_1 = require("../utils/theme/useDrive");
|
|
24
123
|
const formSectionProvider_1 = require("../formSection/utils/formSectionProvider");
|
|
25
124
|
// eslint-disable-next-line complexity
|
|
26
|
-
const DropdownSearchableTrigger =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
125
|
+
const DropdownSearchableTrigger = _a => {
|
|
126
|
+
var {
|
|
127
|
+
value,
|
|
128
|
+
className = "",
|
|
129
|
+
onChange,
|
|
130
|
+
placeholder,
|
|
131
|
+
isOpenPopup,
|
|
132
|
+
inputRef,
|
|
133
|
+
handleClick,
|
|
134
|
+
width,
|
|
135
|
+
title,
|
|
136
|
+
id,
|
|
137
|
+
disabled,
|
|
138
|
+
count,
|
|
139
|
+
currentSelection,
|
|
140
|
+
isError,
|
|
141
|
+
fullWidth,
|
|
142
|
+
ref,
|
|
143
|
+
name,
|
|
144
|
+
onBlur
|
|
145
|
+
} = _a,
|
|
146
|
+
otherProps = __rest(_a, ["value", "className", "onChange", "placeholder", "isOpenPopup", "inputRef", "handleClick", "width", "title", "id", "disabled", "count", "currentSelection", "isError", "fullWidth", "ref", "name", "onBlur"]);
|
|
147
|
+
const {
|
|
148
|
+
isFormSection
|
|
149
|
+
} = (0, react_1.useContext)(formSectionProvider_1.FormSectionContext);
|
|
150
|
+
const {
|
|
151
|
+
translate
|
|
152
|
+
} = (0, useLanguage_1.useLanguage)();
|
|
153
|
+
const triggerId = (0, react_1.useId)();
|
|
154
|
+
const driveComponentClass = (0, useDriveClassName_1.useDriveClassName)("zen-dropdown-searchable-trigger");
|
|
155
|
+
const isDrive = (0, useDrive_1.useDrive)();
|
|
156
|
+
const inputStyle = width ? {
|
|
157
|
+
style: {
|
|
158
|
+
width: `${width}px`
|
|
159
|
+
}
|
|
160
|
+
} : {};
|
|
161
|
+
const isLargeNumber = count && count > 99;
|
|
162
|
+
const clearRef = (0, react_1.useRef)(null);
|
|
163
|
+
const handleKeydown = e => {
|
|
164
|
+
if (e.key === "Enter" && !isOpenPopup) {
|
|
165
|
+
handleClick(true);
|
|
166
|
+
}
|
|
167
|
+
if (e.key === "Escape" && isOpenPopup && e.nativeEvent) {
|
|
168
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
169
|
+
handleClick(false);
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
const clickHandler = e => {
|
|
173
|
+
if (e.target === inputRef.current && isOpenPopup || e.target === clearRef.current && isOpenPopup) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
handleClick(!isOpenPopup);
|
|
177
|
+
};
|
|
178
|
+
const handleClearSearch = () => {
|
|
179
|
+
onChange(undefined);
|
|
180
|
+
};
|
|
181
|
+
return (0, jsx_runtime_1.jsxs)("div", Object.assign({
|
|
182
|
+
className: (0, classNames_1.classNames)(["zen-dropdown-searchable-trigger", isError ? "zen-dropdown-searchable-trigger--error" : "", driveComponentClass || "", isFormSection ? "zen-dropdown-searchable-trigger--form-item" : "", disabled ? "zen-dropdown-searchable-trigger--disabled" : ""])
|
|
183
|
+
}, inputStyle, {
|
|
184
|
+
ref: ref
|
|
185
|
+
}, otherProps, {
|
|
186
|
+
onClick: disabled ? () => {} : clickHandler,
|
|
187
|
+
role: "combobox",
|
|
188
|
+
"aria-label": placeholder,
|
|
189
|
+
children: [(0, jsx_runtime_1.jsxs)("div", {
|
|
190
|
+
onBlur: onBlur,
|
|
191
|
+
className: (0, classNames_1.classNames)(["zen-dropdown-searchable-trigger__search-container", className]),
|
|
192
|
+
children: [(0, jsx_runtime_1.jsx)("div", {
|
|
193
|
+
className: "zen-dropdown-searchable-trigger__input-container",
|
|
194
|
+
onKeyDown: handleKeydown,
|
|
195
|
+
children: (0, jsx_runtime_1.jsx)(textInputRaw_1.TextInputRaw, {
|
|
196
|
+
value: value,
|
|
197
|
+
placeholder: currentSelection ? currentSelection : placeholder || translate("Filter by group"),
|
|
198
|
+
className: (0, classNames_1.classNames)(["zen-dropdown-searchable-trigger__input", "zen-ellipsis", currentSelection ? "zen-dropdown-searchable-trigger__input--selected" : ""]),
|
|
199
|
+
onChange: onChange,
|
|
200
|
+
disabled: disabled,
|
|
201
|
+
type: "text",
|
|
202
|
+
ref: inputRef,
|
|
203
|
+
id: id || triggerId
|
|
204
|
+
})
|
|
205
|
+
}), count ? (0, jsx_runtime_1.jsx)("div", {
|
|
206
|
+
className: "zen-dropdown-searchable-trigger__label-element",
|
|
207
|
+
children: (0, jsx_runtime_1.jsx)("div", {
|
|
208
|
+
className: "zen-dropdown-searchable-trigger__counter",
|
|
209
|
+
children: (0, jsx_runtime_1.jsx)("span", {
|
|
210
|
+
children: isLargeNumber ? "99+" : count
|
|
211
|
+
})
|
|
212
|
+
})
|
|
213
|
+
}) : null, value && (0, jsx_runtime_1.jsx)("button", {
|
|
214
|
+
type: "button",
|
|
215
|
+
className: "zen-dropdown-searchable-trigger__close-button",
|
|
216
|
+
ref: clearRef,
|
|
217
|
+
title: translate("Clear search"),
|
|
218
|
+
onClick: handleClearSearch,
|
|
219
|
+
children: (0, jsx_runtime_1.jsx)(iconCrossThin_1.IconCrossThin, {
|
|
220
|
+
size: isDrive ? "big" : "small"
|
|
221
|
+
})
|
|
222
|
+
})]
|
|
223
|
+
}), (0, jsx_runtime_1.jsx)("button", {
|
|
224
|
+
name: name,
|
|
225
|
+
type: "button",
|
|
226
|
+
onMouseDown: e => e.preventDefault(),
|
|
227
|
+
tabIndex: -1,
|
|
228
|
+
"aria-hidden": "true",
|
|
229
|
+
className: (0, classNames_1.classNames)(["zen-dropdown-searchable-trigger__popup-trigger", isOpenPopup ? "zen-dropdown-searchable-trigger__popup-trigger--active" : ""]),
|
|
230
|
+
title: title || (isOpenPopup ? translate("Close filter") : translate("Open filter")),
|
|
231
|
+
children: (0, jsx_runtime_1.jsx)(iconChevronDownSmall_1.IconChevronDownSmall, {
|
|
232
|
+
className: isOpenPopup ? "zen-dropdown-searchable-trigger__arrow-icon--up" : "zen-dropdown-searchable-trigger__arrow-icon--down",
|
|
233
|
+
size: isDrive ? "huge" : "large"
|
|
234
|
+
})
|
|
235
|
+
})]
|
|
236
|
+
}));
|
|
56
237
|
};
|
|
57
238
|
exports.DropdownSearchableTrigger = DropdownSearchableTrigger;
|
|
58
239
|
exports.DropdownSearchableTrigger.displayName = "DropdownSearchableTrigger";
|
|
59
|
-
exports.TRANSLATIONS = [
|
|
60
|
-
"Filter by group",
|
|
61
|
-
"Open filter",
|
|
62
|
-
"Clear search"
|
|
63
|
-
];
|
|
240
|
+
exports.TRANSLATIONS = ["Filter by group", "Open filter", "Clear search"];
|
|
@@ -137,5 +137,9 @@ interface IUpdateNamelessItemsAction {
|
|
|
137
137
|
type: StateActionType.UpdateNamelessItems;
|
|
138
138
|
payload: undefined;
|
|
139
139
|
}
|
|
140
|
-
|
|
140
|
+
interface ISetFirstParentNodeIsVisibleAction {
|
|
141
|
+
type: StateActionType.SetFirstParentNodeIsVisible;
|
|
142
|
+
payload: boolean | undefined;
|
|
143
|
+
}
|
|
144
|
+
export type TStateAction = ICreateMapAction | ISetStateAction | ISetGlobalStateAction | ISetListDataAction | ISetIsOpenComboAction | IShowAction | IShowWaitingAction | IShowEmptyListAction | IShowListAction | ISetInputValueAction | INothingToShowAction | ISetCurrentIdAction | IChangeSelectionAction | IChangeBulkSelectionAction | IChangeSingleSelectionAction | ISelectAllChildrenAction | IDeselectAllChildrenAction | IResetSelection | IResetStateToGlobal | ISetDataProblemAction | ISetDefaultValueAction | IUpdateSelectedItemsAction | ISetPendingStateAction | IUpdateNamelessItemsAction | IToggleValueForAllSelectedAction | IDeselectItemsFromAllSelectedAction | ISetDefaultAllSelectedAction | ISetIsCheckedAction | ISetIsCheckedAction | ISetDefaultIsCheckedAction | ISetFirstParentNodeIsVisibleAction;
|
|
141
145
|
export {};
|
|
@@ -27,5 +27,6 @@ export declare enum StateActionType {
|
|
|
27
27
|
DeselectItemsFromAllSelected = "DESELECT_ITEMS_FROM_ALL_SELECTED",
|
|
28
28
|
SetDefaultAllSelected = "SET_DEFAULT_ALL_SELECTED",
|
|
29
29
|
SetDefaultIsChecked = "SET_DEFAULT_IS_CHECKED",
|
|
30
|
-
SetIsChecked = "SET_IS_CHECKED"
|
|
30
|
+
SetIsChecked = "SET_IS_CHECKED",
|
|
31
|
+
SetFirstParentNodeIsVisible = "SET_FIRST_PARENT_NODE_IS_VISIBLE"
|
|
31
32
|
}
|
|
@@ -32,4 +32,5 @@ var StateActionType;
|
|
|
32
32
|
StateActionType["SetDefaultAllSelected"] = "SET_DEFAULT_ALL_SELECTED";
|
|
33
33
|
StateActionType["SetDefaultIsChecked"] = "SET_DEFAULT_IS_CHECKED";
|
|
34
34
|
StateActionType["SetIsChecked"] = "SET_IS_CHECKED";
|
|
35
|
+
StateActionType["SetFirstParentNodeIsVisible"] = "SET_FIRST_PARENT_NODE_IS_VISIBLE";
|
|
35
36
|
})(StateActionType || (exports.StateActionType = StateActionType = {}));
|
|
@@ -2,6 +2,7 @@ import { Reducer } from "react";
|
|
|
2
2
|
import { TStateAction } from "./stateAction";
|
|
3
3
|
import { IGroupTree, ITypedHash } from "../../groupsFilterRaw/groupsFilterInterfaces";
|
|
4
4
|
import { IDropdownRawItem } from "../types";
|
|
5
|
+
export declare const ROOT_GROUP_ID = "zen_dropdown_root_group_id";
|
|
5
6
|
export interface IDropdownState {
|
|
6
7
|
groupsMap: ITypedHash<IGroupTree | undefined>;
|
|
7
8
|
selectedIds: string[];
|
|
@@ -9,6 +10,7 @@ export interface IDropdownState {
|
|
|
9
10
|
defaultValue: string[];
|
|
10
11
|
listData: IDropdownRawItem[];
|
|
11
12
|
currentId: string | undefined;
|
|
13
|
+
rootId: string;
|
|
12
14
|
showWaiting: boolean;
|
|
13
15
|
showEmptyList: boolean;
|
|
14
16
|
showList: boolean;
|
|
@@ -28,16 +30,18 @@ export interface IDropdownState {
|
|
|
28
30
|
isChecked?: boolean;
|
|
29
31
|
defaultValueIsChecked?: boolean;
|
|
30
32
|
globalIsChecked?: boolean;
|
|
33
|
+
firstParentNodeIsVisible?: boolean;
|
|
31
34
|
}
|
|
32
35
|
export interface IStateReducer extends Reducer<IDropdownState, TStateAction> {
|
|
33
36
|
}
|
|
34
|
-
export declare const getInitialState: (isFullSelectionMode: boolean, comboItems: IDropdownRawItem[], selection: string[], listLimit: number, defaultValue?: string[], isAllSelected?: boolean, defaultValueIsAllSelected?: boolean, isChecked?: boolean, defaultValueIsChecked?: boolean) => {
|
|
37
|
+
export declare const getInitialState: (isFullSelectionMode: boolean, comboItems: IDropdownRawItem[], selection: string[], listLimit: number, defaultValue?: string[], isAllSelected?: boolean, defaultValueIsAllSelected?: boolean, isChecked?: boolean, defaultValueIsChecked?: boolean, firstParentNodeIsVisible?: boolean) => {
|
|
35
38
|
groupsMap: ITypedHash<IGroupTree>;
|
|
36
39
|
selectedIds: string[];
|
|
37
40
|
globalSelectedIds: string[];
|
|
38
41
|
defaultValue: string[];
|
|
39
42
|
listData: never[];
|
|
40
43
|
currentId: undefined;
|
|
44
|
+
rootId: string;
|
|
41
45
|
showWaiting: boolean;
|
|
42
46
|
showEmptyList: boolean;
|
|
43
47
|
showList: boolean;
|
|
@@ -57,5 +61,6 @@ export declare const getInitialState: (isFullSelectionMode: boolean, comboItems:
|
|
|
57
61
|
globalIsChecked: boolean | undefined;
|
|
58
62
|
listLimit: number;
|
|
59
63
|
resultsExceedListLimit: boolean;
|
|
64
|
+
firstParentNodeIsVisible: boolean | undefined;
|
|
60
65
|
};
|
|
61
66
|
export declare function stateReducer(state: IDropdownState, action: TStateAction): IDropdownState;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stateReducer = exports.getInitialState = void 0;
|
|
3
|
+
exports.stateReducer = exports.getInitialState = exports.ROOT_GROUP_ID = void 0;
|
|
4
4
|
const stateActionType_1 = require("./stateActionType");
|
|
5
5
|
const stateReducerHelper_1 = require("./stateReducerHelper");
|
|
6
6
|
const groupsFilterHelper_1 = require("../../groupsFilterRaw/groupsFilterHelper");
|
|
7
|
-
|
|
8
|
-
const getInitialState = (isFullSelectionMode, comboItems, selection, listLimit, defaultValue, isAllSelected, defaultValueIsAllSelected, isChecked, defaultValueIsChecked) => {
|
|
7
|
+
exports.ROOT_GROUP_ID = "zen_dropdown_root_group_id";
|
|
8
|
+
const getInitialState = (isFullSelectionMode, comboItems, selection, listLimit, defaultValue, isAllSelected, defaultValueIsAllSelected, isChecked, defaultValueIsChecked, firstParentNodeIsVisible) => {
|
|
9
9
|
const updatedGroupsMapSelected = new Map();
|
|
10
|
-
const updatedGroupsMap = comboItems.length ? (0, groupsFilterHelper_1.createGroupsMap)(comboItems,
|
|
10
|
+
const updatedGroupsMap = comboItems.length ? (0, groupsFilterHelper_1.createGroupsMap)(comboItems, exports.ROOT_GROUP_ID) : {};
|
|
11
11
|
const namelessIds = new Set();
|
|
12
12
|
if (selection.length > 0) {
|
|
13
13
|
selection.forEach(id => {
|
|
@@ -22,7 +22,8 @@ const getInitialState = (isFullSelectionMode, comboItems, selection, listLimit,
|
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
const isCurrentListNested = Object.keys(updatedGroupsMap).length > 0 && (updatedGroupsMap[
|
|
25
|
+
const isCurrentListNested = Object.keys(updatedGroupsMap).length > 0 && (updatedGroupsMap[exports.ROOT_GROUP_ID].children || []).some(el => el.children && el.children.length);
|
|
26
|
+
const rootId = (0, stateReducerHelper_1.getRootId)(updatedGroupsMap, exports.ROOT_GROUP_ID, firstParentNodeIsVisible);
|
|
26
27
|
return {
|
|
27
28
|
groupsMap: updatedGroupsMap,
|
|
28
29
|
selectedIds: selection,
|
|
@@ -30,6 +31,7 @@ const getInitialState = (isFullSelectionMode, comboItems, selection, listLimit,
|
|
|
30
31
|
defaultValue: defaultValue || [],
|
|
31
32
|
listData: [],
|
|
32
33
|
currentId: undefined,
|
|
34
|
+
rootId: rootId || exports.ROOT_GROUP_ID,
|
|
33
35
|
showWaiting: false,
|
|
34
36
|
showEmptyList: false,
|
|
35
37
|
showList: false,
|
|
@@ -48,7 +50,8 @@ const getInitialState = (isFullSelectionMode, comboItems, selection, listLimit,
|
|
|
48
50
|
defaultValueIsChecked: isChecked !== undefined ? defaultValueIsChecked || false : undefined,
|
|
49
51
|
globalIsChecked: isChecked,
|
|
50
52
|
listLimit,
|
|
51
|
-
resultsExceedListLimit: false
|
|
53
|
+
resultsExceedListLimit: false,
|
|
54
|
+
firstParentNodeIsVisible: firstParentNodeIsVisible
|
|
52
55
|
};
|
|
53
56
|
};
|
|
54
57
|
exports.getInitialState = getInitialState;
|
|
@@ -58,7 +61,7 @@ function stateReducer(state, action) {
|
|
|
58
61
|
const { type, payload } = action;
|
|
59
62
|
switch (type) {
|
|
60
63
|
case stateActionType_1.StateActionType.CreateMap: {
|
|
61
|
-
const updatedGroupsMap = payload.length ? (0, groupsFilterHelper_1.createGroupsMap)(payload,
|
|
64
|
+
const updatedGroupsMap = payload.length ? (0, groupsFilterHelper_1.createGroupsMap)(payload, exports.ROOT_GROUP_ID) : {};
|
|
62
65
|
const newNamelessIds = new Set(state.namelessIds);
|
|
63
66
|
if (Object.keys(updatedGroupsMap).length && state.selectedIds.length) {
|
|
64
67
|
state.selectedIds.forEach(id => {
|
|
@@ -74,10 +77,11 @@ function stateReducer(state, action) {
|
|
|
74
77
|
}
|
|
75
78
|
});
|
|
76
79
|
}
|
|
77
|
-
const isCurrentListNested = Object.keys(updatedGroupsMap).length > 0 && (updatedGroupsMap[
|
|
80
|
+
const isCurrentListNested = Object.keys(updatedGroupsMap).length > 0 && (updatedGroupsMap[exports.ROOT_GROUP_ID].children || []).some(el => el.children && el.children.length);
|
|
78
81
|
state.groupsMap = updatedGroupsMap;
|
|
79
82
|
const additionalStateUpdates = (0, stateReducerHelper_1.updateAllSelectedStateValueBasedOnTotalSelected)(state, state.selectedIds.length - newNamelessIds.size);
|
|
80
|
-
|
|
83
|
+
const rootId = (0, stateReducerHelper_1.getRootId)(updatedGroupsMap, exports.ROOT_GROUP_ID, state.firstParentNodeIsVisible);
|
|
84
|
+
return Object.assign(Object.assign(Object.assign({}, state), { rootId: rootId || exports.ROOT_GROUP_ID, namelessIds: newNamelessIds, isNestedList: state.isNestedList ? state.isNestedList : isCurrentListNested, resultsExceedListLimit: Object.keys(updatedGroupsMap).length - 1 >= state.listLimit }), additionalStateUpdates);
|
|
81
85
|
}
|
|
82
86
|
case stateActionType_1.StateActionType.SetListData: {
|
|
83
87
|
state.selectedIds.forEach(id => {
|
|
@@ -237,7 +241,8 @@ function stateReducer(state, action) {
|
|
|
237
241
|
}
|
|
238
242
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
239
243
|
const currentChild = (0, stateReducerHelper_1.getChildList)((_e = state.groupsMap[itemId]) === null || _e === void 0 ? void 0 : _e.children);
|
|
240
|
-
|
|
244
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
245
|
+
currentChild.forEach(childId => childId && childrenToProcess.add(childId.id));
|
|
241
246
|
}
|
|
242
247
|
else {
|
|
243
248
|
currentSelectedIds.delete(itemId);
|
|
@@ -291,7 +296,7 @@ function stateReducer(state, action) {
|
|
|
291
296
|
return Object.assign(Object.assign({}, state), { selectedIds: Array.from(newSelected) });
|
|
292
297
|
}
|
|
293
298
|
case stateActionType_1.StateActionType.DeselectItemsFromAllSelected: {
|
|
294
|
-
const currentEl = state.groupsMap[
|
|
299
|
+
const currentEl = state.groupsMap[state.rootId];
|
|
295
300
|
// action not submitted for disabled item, other items, even if disabled, not change their state
|
|
296
301
|
const deselectedItems = payload ? new Set([payload]) : new Set(state.listData.filter(elem => !elem.disabled).map(el => el.id));
|
|
297
302
|
const newSelected = new Set();
|
|
@@ -314,7 +319,7 @@ function stateReducer(state, action) {
|
|
|
314
319
|
return Object.assign(Object.assign({}, state), { selectedIds: Array.from(newSelected), isAllSelected: state.isFullSelectionMode ? false : undefined });
|
|
315
320
|
}
|
|
316
321
|
case stateActionType_1.StateActionType.ToggleValueForAllSelected: {
|
|
317
|
-
const currentEl = state.groupsMap[
|
|
322
|
+
const currentEl = state.groupsMap[state.rootId];
|
|
318
323
|
const newSelected = new Set();
|
|
319
324
|
state.isAllSelected && ((currentEl === null || currentEl === void 0 ? void 0 : currentEl.children) || []).forEach(el => {
|
|
320
325
|
if (!newSelected.has(el.id) && el.disabled) {
|
|
@@ -343,6 +348,13 @@ function stateReducer(state, action) {
|
|
|
343
348
|
childrenForDeselect.forEach(childId => newSelected.delete(childId));
|
|
344
349
|
return Object.assign(Object.assign({}, state), { selectedIds: Array.from(newSelected) });
|
|
345
350
|
}
|
|
351
|
+
case stateActionType_1.StateActionType.SetFirstParentNodeIsVisible: {
|
|
352
|
+
if (state.firstParentNodeIsVisible === payload) {
|
|
353
|
+
return state;
|
|
354
|
+
}
|
|
355
|
+
const newRootId = (0, stateReducerHelper_1.getRootId)(state.groupsMap, exports.ROOT_GROUP_ID, payload) || exports.ROOT_GROUP_ID;
|
|
356
|
+
return Object.assign(Object.assign({}, state), { rootId: newRootId, firstParentNodeIsVisible: payload });
|
|
357
|
+
}
|
|
346
358
|
default: {
|
|
347
359
|
throw Error("Unknown action: " + type);
|
|
348
360
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { IDropdownState } from "./stateReducer";
|
|
2
2
|
import { IDropdownRawItem } from "../types";
|
|
3
|
+
import { IGroupTree, ITypedHash } from "../../groupsFilterRaw/groupsFilterInterfaces";
|
|
3
4
|
export declare function getChildList(childArr: IDropdownRawItem[] | undefined): IDropdownRawItem[];
|
|
4
5
|
export declare const updateAllSelectedStateValueBasedOnTotalSelected: (state: IDropdownState, totalSelected: number) => Partial<Pick<IDropdownState, "isAllSelected">>;
|
|
6
|
+
export declare const getRootId: (groupsMap: ITypedHash<IGroupTree>, rootIdKey: string, firstParentNodeIsVisible?: boolean) => string | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateAllSelectedStateValueBasedOnTotalSelected = exports.getChildList = void 0;
|
|
3
|
+
exports.getRootId = exports.updateAllSelectedStateValueBasedOnTotalSelected = exports.getChildList = void 0;
|
|
4
|
+
const groupsHelper_1 = require("../../groupsFilterRaw/groupsHelper");
|
|
4
5
|
function getChildList(childArr) {
|
|
5
6
|
const list = [];
|
|
6
7
|
if (!childArr) {
|
|
@@ -27,3 +28,21 @@ const updateAllSelectedStateValueBasedOnTotalSelected = (state, totalSelected) =
|
|
|
27
28
|
return additionalStateUpdates;
|
|
28
29
|
};
|
|
29
30
|
exports.updateAllSelectedStateValueBasedOnTotalSelected = updateAllSelectedStateValueBasedOnTotalSelected;
|
|
31
|
+
const getRootId = (groupsMap, rootIdKey, firstParentNodeIsVisible) => {
|
|
32
|
+
var _a;
|
|
33
|
+
if (Object.keys(groupsMap).length === 0) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
const rootGroup = groupsMap[rootIdKey];
|
|
37
|
+
if (((_a = rootGroup === null || rootGroup === void 0 ? void 0 : rootGroup.children) === null || _a === void 0 ? void 0 : _a.length) === 1 && rootGroup.children[0] && groupsMap[rootGroup.children[0].id]) {
|
|
38
|
+
if (firstParentNodeIsVisible) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
if (firstParentNodeIsVisible === undefined && rootGroup.children[0].children && rootGroup.children[0].children.length > 0) {
|
|
42
|
+
return rootGroup.children[0].id === groupsHelper_1.ENTIRE_ORGANIZATION_GROUP_ID ? groupsHelper_1.ENTIRE_ORGANIZATION_GROUP_ID : undefined;
|
|
43
|
+
}
|
|
44
|
+
return rootGroup.children[0].children && rootGroup.children[0].children.length > 0 ? rootGroup.children[0].id : undefined;
|
|
45
|
+
}
|
|
46
|
+
return undefined;
|
|
47
|
+
};
|
|
48
|
+
exports.getRootId = getRootId;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IGroupTree } from "../../groupsFilterRaw/groupsFilterInterfaces";
|
|
2
|
+
export declare const usersArr: {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
firstName: string;
|
|
6
|
+
lastName: string;
|
|
7
|
+
}[];
|
|
8
|
+
export declare const usersMap: {
|
|
9
|
+
b4: {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
firstName: string;
|
|
13
|
+
lastName: string;
|
|
14
|
+
parent: IGroupTree | undefined;
|
|
15
|
+
children: IGroupTree[];
|
|
16
|
+
};
|
|
17
|
+
b6: {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
firstName: string;
|
|
21
|
+
lastName: string;
|
|
22
|
+
parent: IGroupTree | undefined;
|
|
23
|
+
children: IGroupTree[];
|
|
24
|
+
};
|
|
25
|
+
b12: {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
firstName: string;
|
|
29
|
+
lastName: string;
|
|
30
|
+
parent: IGroupTree | undefined;
|
|
31
|
+
children: IGroupTree[];
|
|
32
|
+
};
|
|
33
|
+
zen_dropdown_root_group_id: {
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
parent: IGroupTree | undefined;
|
|
37
|
+
children: IGroupTree[];
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usersMap = exports.usersArr = void 0;
|
|
4
|
+
const stateReducer_1 = require("./stateReducer");
|
|
5
|
+
exports.usersArr = [
|
|
6
|
+
{
|
|
7
|
+
id: "b4",
|
|
8
|
+
name: "atticuspinch@gmail.com",
|
|
9
|
+
firstName: "Atticus",
|
|
10
|
+
lastName: "Pinch"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: "b6",
|
|
14
|
+
name: "jeanlouisepinch@gmail.com",
|
|
15
|
+
firstName: "Jean Louise",
|
|
16
|
+
lastName: "Pinch"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: "b12",
|
|
20
|
+
name: "booadley@gmail.com",
|
|
21
|
+
firstName: "Boo",
|
|
22
|
+
lastName: "Adley"
|
|
23
|
+
}
|
|
24
|
+
];
|
|
25
|
+
const rootNode = {
|
|
26
|
+
id: "root",
|
|
27
|
+
name: "",
|
|
28
|
+
parent: undefined,
|
|
29
|
+
children: []
|
|
30
|
+
};
|
|
31
|
+
const zenDropdownRootGroup = {
|
|
32
|
+
id: stateReducer_1.ROOT_GROUP_ID,
|
|
33
|
+
name: "",
|
|
34
|
+
parent: undefined,
|
|
35
|
+
children: []
|
|
36
|
+
};
|
|
37
|
+
const childB4 = {
|
|
38
|
+
id: "b4",
|
|
39
|
+
name: "atticuspinch@gmail.com",
|
|
40
|
+
firstName: "Atticus",
|
|
41
|
+
lastName: "Pinch",
|
|
42
|
+
parent: undefined,
|
|
43
|
+
children: []
|
|
44
|
+
};
|
|
45
|
+
const childB6 = {
|
|
46
|
+
id: "b6",
|
|
47
|
+
name: "jeanlouisepinch@gmail.com",
|
|
48
|
+
firstName: "Jean Louise",
|
|
49
|
+
lastName: "Pinch",
|
|
50
|
+
parent: undefined,
|
|
51
|
+
children: []
|
|
52
|
+
};
|
|
53
|
+
const childB12 = {
|
|
54
|
+
id: "b12",
|
|
55
|
+
name: "booadley@gmail.com",
|
|
56
|
+
firstName: "Boo",
|
|
57
|
+
lastName: "Adley",
|
|
58
|
+
parent: undefined,
|
|
59
|
+
children: []
|
|
60
|
+
};
|
|
61
|
+
rootNode.children = [zenDropdownRootGroup];
|
|
62
|
+
// Zen Group -> Company
|
|
63
|
+
zenDropdownRootGroup.children = [childB4, childB6, childB12];
|
|
64
|
+
// Setting parents
|
|
65
|
+
zenDropdownRootGroup.parent = rootNode;
|
|
66
|
+
childB4.parent = zenDropdownRootGroup;
|
|
67
|
+
childB6.parent = zenDropdownRootGroup;
|
|
68
|
+
childB12.parent = zenDropdownRootGroup;
|
|
69
|
+
exports.usersMap = {
|
|
70
|
+
b4: childB4,
|
|
71
|
+
b6: childB6,
|
|
72
|
+
b12: childB12,
|
|
73
|
+
[stateReducer_1.ROOT_GROUP_ID]: zenDropdownRootGroup
|
|
74
|
+
};
|
|
@@ -59,6 +59,7 @@ interface IDropdownBase extends IChipsParent {
|
|
|
59
59
|
setChecked?: (value: boolean) => void;
|
|
60
60
|
fetchState?: IFetchDropdownState;
|
|
61
61
|
mobileSheetStackingClassName?: string;
|
|
62
|
+
firstParentNodeIsVisible?: boolean;
|
|
62
63
|
}
|
|
63
64
|
interface IDropdownBaseDefault {
|
|
64
65
|
disabled?: boolean;
|