@geotab/zenith 3.1.1-beta.6 → 3.2.0-beta.1
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 +173 -59
- 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/components/filtersSidePanelDropdown.js +2 -2
- 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/filtersBarSidePanelRadioGroup/filtersBarSidePanelRadioGroup.js +2 -2
- 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 +26 -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 +116 -74
- 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 +167 -58
- 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/components/filtersSidePanelDropdown.js +2 -2
- 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/filtersBarSidePanelRadioGroup/filtersBarSidePanelRadioGroup.js +2 -2
- 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 +27 -12
- 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 +19 -12
- 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
package/esm/summary/summary.js
CHANGED
|
@@ -1,13 +1,94 @@
|
|
|
1
|
+
import { injectString } from "../utils/localization/translationsDictionary";
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { useMemo } from "react";
|
|
3
4
|
import { Tooltip } from "../tooltip/tooltip";
|
|
4
5
|
import { IconInfoCircle } from "../icons/iconInfoCircle";
|
|
5
6
|
import { classNames } from "../commonHelpers/classNames/classNames";
|
|
6
7
|
import { useLanguage } from "../utils/localization/useLanguage";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
injectString("cs", "Summary color", "Barva souhrnu");
|
|
9
|
+
injectString("da-DK", "Summary color", "Oversigt farve");
|
|
10
|
+
injectString("de", "Summary color", "\xDCbersichtsfarbe");
|
|
11
|
+
injectString("en", "Summary color", "Summary color");
|
|
12
|
+
injectString("es", "Summary color", "Color de resumen");
|
|
13
|
+
injectString("fi-FI", "Summary color", "Yhteenvetov\xE4ri");
|
|
14
|
+
injectString("fr", "Summary color", "Couleur du sommaire");
|
|
15
|
+
injectString("fr-FR", "Summary color", "Couleur du r\xE9sum\xE9");
|
|
16
|
+
injectString("hu-HU", "Summary color", "\xD6sszefoglal\xF3 sz\xEDn");
|
|
17
|
+
injectString("id", "Summary color", "Warna ringkasan");
|
|
18
|
+
injectString("it", "Summary color", "Colore riepilogo");
|
|
19
|
+
injectString("ja", "Summary color", "\u30B5\u30DE\u30EA\u30FC\u306E\u8272");
|
|
20
|
+
injectString("ko-KR", "Summary color", "\uC694\uC57D \uADF8\uB798\uD504 \uC0C9\uC0C1");
|
|
21
|
+
injectString("ms", "Summary color", "Warna ringkasan");
|
|
22
|
+
injectString("nb-NO", "Summary color", "Sammendragsfarge");
|
|
23
|
+
injectString("nl", "Summary color", "Overzichtskleur");
|
|
24
|
+
injectString("pl", "Summary color", "Kolor podsumowania");
|
|
25
|
+
injectString("pt-BR", "Summary color", "Cor do resumo");
|
|
26
|
+
injectString("sk-SK", "Summary color", "S\xFAhrn farieb");
|
|
27
|
+
injectString("sv", "Summary color", "F\xE4rg p\xE5 sammanfattning");
|
|
28
|
+
injectString("th", "Summary color", "\u0E2A\u0E35\u0E02\u0E2D\u0E07\u0E2A\u0E23\u0E38\u0E1B");
|
|
29
|
+
injectString("tr", "Summary color", "\xD6zet rengi");
|
|
30
|
+
injectString("zh-Hans", "Summary color", "\u6458\u8981\u989C\u8272");
|
|
31
|
+
injectString("zh-TW", "Summary color", "\u6458\u8981\u8272\u5F69");
|
|
32
|
+
export const Summary = ({
|
|
33
|
+
color,
|
|
34
|
+
title,
|
|
35
|
+
value,
|
|
36
|
+
unit,
|
|
37
|
+
tooltip,
|
|
38
|
+
more,
|
|
39
|
+
isEnabled,
|
|
40
|
+
onToggle,
|
|
41
|
+
description
|
|
42
|
+
}) => {
|
|
43
|
+
const isClickable = useMemo(() => color && onToggle, [color, onToggle]);
|
|
44
|
+
const {
|
|
45
|
+
translate
|
|
46
|
+
} = useLanguage();
|
|
47
|
+
return _jsxs("div", {
|
|
48
|
+
className: "zen-summary",
|
|
49
|
+
children: [(color || title || tooltip) && _jsxs("div", {
|
|
50
|
+
className: "zen-summary__header",
|
|
51
|
+
children: [color && _jsx("button", {
|
|
52
|
+
"aria-label": translate("Summary color"),
|
|
53
|
+
className: classNames(["zen-summary__color", isClickable ? "zen-summary__clickable" : ""]),
|
|
54
|
+
style: {
|
|
55
|
+
backgroundColor: color
|
|
56
|
+
},
|
|
57
|
+
onClick: onToggle
|
|
58
|
+
}), isClickable ? _jsx("button", {
|
|
59
|
+
className: classNames(["zen-summary__title-text zen-ellipsis heading-05 zen-summary__clickable", isEnabled ? "zen-summary__crossed-out" : ""]),
|
|
60
|
+
onClick: onToggle,
|
|
61
|
+
children: title
|
|
62
|
+
}) : _jsx("div", {
|
|
63
|
+
className: "zen-summary__title-text zen-ellipsis heading-05",
|
|
64
|
+
children: title
|
|
65
|
+
}), tooltip && _jsx(Tooltip, {
|
|
66
|
+
alignment: "top",
|
|
67
|
+
size: "auto",
|
|
68
|
+
trigger: _jsx("div", {
|
|
69
|
+
className: "zen-summary__trigger",
|
|
70
|
+
children: _jsx(IconInfoCircle, {
|
|
71
|
+
size: "large",
|
|
72
|
+
className: "zen-summary__title-icon"
|
|
73
|
+
})
|
|
74
|
+
}),
|
|
75
|
+
children: tooltip
|
|
76
|
+
})]
|
|
77
|
+
}), _jsxs("div", {
|
|
78
|
+
className: "zen-summary__data",
|
|
79
|
+
children: [_jsx("div", {
|
|
80
|
+
className: "zen-summary__value zen-ellipsis",
|
|
81
|
+
children: typeof value === "string" ? value : value.toFixed(2)
|
|
82
|
+
}), unit && _jsx("div", {
|
|
83
|
+
className: "zen-summary__unit",
|
|
84
|
+
children: unit
|
|
85
|
+
}), more && _jsx("div", {
|
|
86
|
+
className: "zen-summary__more zen-ellipsis",
|
|
87
|
+
children: more
|
|
88
|
+
})]
|
|
89
|
+
}), description && _jsx("div", {
|
|
90
|
+
className: "zen-summary__content",
|
|
91
|
+
children: description
|
|
92
|
+
})]
|
|
93
|
+
});
|
|
94
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { injectString } from "../../utils/localization/translationsDictionary";
|
|
1
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { useCallback, useId, useMemo, useRef, useState } from "react";
|
|
3
4
|
import { Button } from "../../button/button";
|
|
@@ -7,85 +8,172 @@ import { Menu } from "../../menu/menu";
|
|
|
7
8
|
import { classNames } from "../../commonHelpers/classNames/classNames";
|
|
8
9
|
import { SkeletonList } from "../../skeletonList/skeletonList";
|
|
9
10
|
import { MenuErrorItem } from "../../menu/components/menuErrorItem";
|
|
11
|
+
injectString("cs", "More", "V\xEDce");
|
|
12
|
+
injectString("da-DK", "More", "Mere");
|
|
13
|
+
injectString("de", "More", "Mehr");
|
|
14
|
+
injectString("en", "More", "More");
|
|
15
|
+
injectString("es", "More", "M\xE1s");
|
|
16
|
+
injectString("fi-FI", "More", "Lis\xE4\xE4");
|
|
17
|
+
injectString("fr", "More", "Plus");
|
|
18
|
+
injectString("fr-FR", "More", "En savoir plus");
|
|
19
|
+
injectString("hu-HU", "More", "M\xE9g t\xF6bb.");
|
|
20
|
+
injectString("id", "More", "Lainnya");
|
|
21
|
+
injectString("it", "More", "Altro");
|
|
22
|
+
injectString("ja", "More", "\u305D\u306E\u4ED6");
|
|
23
|
+
injectString("ko-KR", "More", "\uC790\uC138\uD788");
|
|
24
|
+
injectString("ms", "More", "Lagi");
|
|
25
|
+
injectString("nb-NO", "More", "Mer");
|
|
26
|
+
injectString("nl", "More", "Meer");
|
|
27
|
+
injectString("pl", "More", "Wi\u0119cej");
|
|
28
|
+
injectString("pt-BR", "More", "Mais");
|
|
29
|
+
injectString("sk-SK", "More", "Viac");
|
|
30
|
+
injectString("sv", "More", "Mer");
|
|
31
|
+
injectString("th", "More", "\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21");
|
|
32
|
+
injectString("tr", "More", "Di\u011Fer");
|
|
33
|
+
injectString("zh-Hans", "More", "\u66F4\u591A");
|
|
34
|
+
injectString("zh-TW", "More", "\u66F4\u591A");
|
|
35
|
+
injectString("cs", "Actions", "Akce");
|
|
36
|
+
injectString("da-DK", "Actions", "Handlinger");
|
|
37
|
+
injectString("de", "Actions", "Aktionen");
|
|
38
|
+
injectString("en", "Actions", "Actions");
|
|
39
|
+
injectString("es", "Actions", "Acciones");
|
|
40
|
+
injectString("fi-FI", "Actions", "Toimet");
|
|
41
|
+
injectString("fr", "Actions", "Actions");
|
|
42
|
+
injectString("fr-FR", "Actions", "Actions");
|
|
43
|
+
injectString("hu-HU", "Actions", "M\u0171veletek");
|
|
44
|
+
injectString("id", "Actions", "Tindakan");
|
|
45
|
+
injectString("it", "Actions", "Azioni");
|
|
46
|
+
injectString("ja", "Actions", "\u30A2\u30AF\u30B7\u30E7\u30F3");
|
|
47
|
+
injectString("ko-KR", "Actions", "\uC870\uCE58");
|
|
48
|
+
injectString("ms", "Actions", "Tindakan");
|
|
49
|
+
injectString("nb-NO", "Actions", "Handlinger");
|
|
50
|
+
injectString("nl", "Actions", "Acties");
|
|
51
|
+
injectString("pl", "Actions", "Dzia\u0142ania");
|
|
52
|
+
injectString("pt-BR", "Actions", "A\xE7\xF5es");
|
|
53
|
+
injectString("sk-SK", "Actions", "Akcie");
|
|
54
|
+
injectString("sv", "Actions", "\xC5tg\xE4rder");
|
|
55
|
+
injectString("th", "Actions", "\u0E01\u0E32\u0E23\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23");
|
|
56
|
+
injectString("tr", "Actions", "Eylemler");
|
|
57
|
+
injectString("zh-Hans", "Actions", "\u64CD\u4F5C");
|
|
58
|
+
injectString("zh-TW", "Actions", "\u52D5\u4F5C");
|
|
10
59
|
const getMenuItems = (entity, isNested, render, primaryActions) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
: [result.props.children]) || []);
|
|
27
|
-
return primaryActions ? [...primaryActions.props.children, ...menuItems] : menuItems;
|
|
60
|
+
if (!render && !primaryActions) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
const result = render === null || render === void 0 ? void 0 : render(entity, isNested);
|
|
64
|
+
if (!result) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
if (result.type === Menu.Item) {
|
|
68
|
+
return primaryActions ? [...primaryActions.props.children, result] : [result];
|
|
69
|
+
}
|
|
70
|
+
if (!result.props.children) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
const menuItems = (Array.isArray(result.props.children) ? result.props.children : [result.props.children]) || [];
|
|
74
|
+
return primaryActions ? [...primaryActions.props.children, ...menuItems] : menuItems;
|
|
28
75
|
};
|
|
29
|
-
const getErrorItem = (id, onClick) =>
|
|
30
|
-
|
|
76
|
+
const getErrorItem = (id, onClick) => _jsx(MenuErrorItem, {
|
|
77
|
+
id: id,
|
|
78
|
+
onClick: onClick
|
|
79
|
+
});
|
|
80
|
+
export const ActionsMenu = ({
|
|
81
|
+
entity,
|
|
82
|
+
isNested,
|
|
83
|
+
render,
|
|
84
|
+
renderAsync,
|
|
85
|
+
primaryActions
|
|
86
|
+
}) => {
|
|
87
|
+
var _a;
|
|
88
|
+
const {
|
|
89
|
+
translate
|
|
90
|
+
} = useLanguage();
|
|
91
|
+
const generatedId = useId();
|
|
92
|
+
const buttonId = `ariaLabelBy-${entity.id || generatedId}`;
|
|
93
|
+
const errorId = `errorItem-${useId()}`;
|
|
94
|
+
const ref = useRef(null);
|
|
95
|
+
const menuItems = useMemo(() => getMenuItems(entity, isNested, render, primaryActions), [entity, isNested, render, primaryActions]);
|
|
96
|
+
const [menuItemsAsync, setMenuItemsAsync] = useState(null);
|
|
97
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
98
|
+
const [isError, setIsError] = useState(false);
|
|
99
|
+
const handleClickTrigger = useCallback(async () => {
|
|
31
100
|
var _a;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const buttonId = `ariaLabelBy-${entity.id || generatedId}`;
|
|
35
|
-
const errorId = `errorItem-${useId()}`;
|
|
36
|
-
const ref = useRef(null);
|
|
37
|
-
const menuItems = useMemo(() => getMenuItems(entity, isNested, render, primaryActions), [entity, isNested, render, primaryActions]);
|
|
38
|
-
const [menuItemsAsync, setMenuItemsAsync] = useState(null);
|
|
39
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
40
|
-
const [isError, setIsError] = useState(false);
|
|
41
|
-
const handleClickTrigger = useCallback(async () => {
|
|
42
|
-
var _a;
|
|
43
|
-
if (!renderAsync || isLoading) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
const errorItem = getErrorItem(errorId, handleClickTrigger);
|
|
47
|
-
setIsLoading(true);
|
|
48
|
-
setIsError(false);
|
|
49
|
-
setMenuItemsAsync(null);
|
|
50
|
-
try {
|
|
51
|
-
let resolvedMenuItems = await renderAsync(entity, isNested);
|
|
52
|
-
if (primaryActions) {
|
|
53
|
-
resolvedMenuItems = _jsx(_Fragment, { children: [...primaryActions.props.children, ...resolvedMenuItems.props.children] });
|
|
54
|
-
}
|
|
55
|
-
if (resolvedMenuItems.props.children) {
|
|
56
|
-
setMenuItemsAsync(resolvedMenuItems);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
setMenuItemsAsync(_jsx(_Fragment, { children: errorItem }));
|
|
60
|
-
setIsError(true);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
catch (err) {
|
|
64
|
-
setMenuItemsAsync(_jsx(_Fragment, { children: [((_a = primaryActions === null || primaryActions === void 0 ? void 0 : primaryActions.props) === null || _a === void 0 ? void 0 : _a.children) || null, errorItem] }));
|
|
65
|
-
setIsError(true);
|
|
66
|
-
}
|
|
67
|
-
finally {
|
|
68
|
-
setIsLoading(false);
|
|
69
|
-
}
|
|
70
|
-
}, [entity, isNested, isLoading, primaryActions, errorId, renderAsync]);
|
|
71
|
-
const trigger = useMemo(() => {
|
|
72
|
-
if (renderAsync) {
|
|
73
|
-
return _jsx(Button, { title: translate("More"), disabled: isLoading, id: buttonId, ref: ref, onClick: handleClickTrigger, type: "tertiary-black", className: classNames([
|
|
74
|
-
"zen-caption",
|
|
75
|
-
"zen-actions-column__action",
|
|
76
|
-
isError ? "zen-actions-column__action_error" : ""
|
|
77
|
-
]), children: _jsx(IconDotVertical, { size: "bigger" }) });
|
|
78
|
-
}
|
|
79
|
-
return _jsx(Button, { type: "tertiary-black", title: translate("More"), className: "zen-caption zen-actions-column__action", children: _jsx(IconDotVertical, { size: "bigger" }) });
|
|
80
|
-
}, [buttonId, isLoading, isError, renderAsync, handleClickTrigger, translate]);
|
|
81
|
-
if (renderAsync) {
|
|
82
|
-
const menuItemsToRender = isLoading ?
|
|
83
|
-
_jsx(SkeletonList, { className: "zen-actions-column__waiting" }) :
|
|
84
|
-
((_a = menuItemsAsync === null || menuItemsAsync === void 0 ? void 0 : menuItemsAsync.props) === null || _a === void 0 ? void 0 : _a.children) || null;
|
|
85
|
-
return _jsxs(_Fragment, { children: [trigger, _jsx(Menu, { ariaLabelledBy: buttonId, title: translate("Actions"), triggerRef: ref, alignment: "bottom-right", children: menuItemsToRender })] });
|
|
101
|
+
if (!renderAsync || isLoading) {
|
|
102
|
+
return;
|
|
86
103
|
}
|
|
87
|
-
|
|
88
|
-
|
|
104
|
+
const errorItem = getErrorItem(errorId, handleClickTrigger);
|
|
105
|
+
setIsLoading(true);
|
|
106
|
+
setIsError(false);
|
|
107
|
+
setMenuItemsAsync(null);
|
|
108
|
+
try {
|
|
109
|
+
let resolvedMenuItems = await renderAsync(entity, isNested);
|
|
110
|
+
if (primaryActions) {
|
|
111
|
+
resolvedMenuItems = _jsx(_Fragment, {
|
|
112
|
+
children: [...primaryActions.props.children, ...resolvedMenuItems.props.children]
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
if (resolvedMenuItems.props.children) {
|
|
116
|
+
setMenuItemsAsync(resolvedMenuItems);
|
|
117
|
+
} else {
|
|
118
|
+
setMenuItemsAsync(_jsx(_Fragment, {
|
|
119
|
+
children: errorItem
|
|
120
|
+
}));
|
|
121
|
+
setIsError(true);
|
|
122
|
+
}
|
|
123
|
+
} catch (err) {
|
|
124
|
+
setMenuItemsAsync(_jsx(_Fragment, {
|
|
125
|
+
children: [((_a = primaryActions === null || primaryActions === void 0 ? void 0 : primaryActions.props) === null || _a === void 0 ? void 0 : _a.children) || null, errorItem]
|
|
126
|
+
}));
|
|
127
|
+
setIsError(true);
|
|
128
|
+
} finally {
|
|
129
|
+
setIsLoading(false);
|
|
89
130
|
}
|
|
90
|
-
|
|
91
|
-
|
|
131
|
+
}, [entity, isNested, isLoading, primaryActions, errorId, renderAsync]);
|
|
132
|
+
const trigger = useMemo(() => {
|
|
133
|
+
if (renderAsync) {
|
|
134
|
+
return _jsx(Button, {
|
|
135
|
+
title: translate("More"),
|
|
136
|
+
disabled: isLoading,
|
|
137
|
+
id: buttonId,
|
|
138
|
+
ref: ref,
|
|
139
|
+
onClick: handleClickTrigger,
|
|
140
|
+
type: "tertiary-black",
|
|
141
|
+
className: classNames(["zen-caption", "zen-actions-column__action", isError ? "zen-actions-column__action_error" : ""]),
|
|
142
|
+
children: _jsx(IconDotVertical, {
|
|
143
|
+
size: "bigger"
|
|
144
|
+
})
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
return _jsx(Button, {
|
|
148
|
+
type: "tertiary-black",
|
|
149
|
+
title: translate("More"),
|
|
150
|
+
className: "zen-caption zen-actions-column__action",
|
|
151
|
+
children: _jsx(IconDotVertical, {
|
|
152
|
+
size: "bigger"
|
|
153
|
+
})
|
|
154
|
+
});
|
|
155
|
+
}, [buttonId, isLoading, isError, renderAsync, handleClickTrigger, translate]);
|
|
156
|
+
if (renderAsync) {
|
|
157
|
+
const menuItemsToRender = isLoading ? _jsx(SkeletonList, {
|
|
158
|
+
className: "zen-actions-column__waiting"
|
|
159
|
+
}) : ((_a = menuItemsAsync === null || menuItemsAsync === void 0 ? void 0 : menuItemsAsync.props) === null || _a === void 0 ? void 0 : _a.children) || null;
|
|
160
|
+
return _jsxs(_Fragment, {
|
|
161
|
+
children: [trigger, _jsx(Menu, {
|
|
162
|
+
ariaLabelledBy: buttonId,
|
|
163
|
+
title: translate("Actions"),
|
|
164
|
+
triggerRef: ref,
|
|
165
|
+
alignment: "bottom-right",
|
|
166
|
+
children: menuItemsToRender
|
|
167
|
+
})]
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
if (!menuItems || menuItems.length === 0) {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
return _jsx(Menu, {
|
|
174
|
+
title: translate("Actions"),
|
|
175
|
+
trigger: trigger,
|
|
176
|
+
alignment: "bottom-right",
|
|
177
|
+
children: menuItems
|
|
178
|
+
});
|
|
179
|
+
};
|
|
@@ -1,13 +1,78 @@
|
|
|
1
|
+
import { injectString } from "../../utils/localization/translationsDictionary";
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { useLanguage } from "../../utils/localization/useLanguage";
|
|
3
4
|
import { Button } from "../../button/button";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
injectString("cs", "Reset column settings", "Obnovit nastaven\xED sloupce");
|
|
6
|
+
injectString("da-DK", "Reset column settings", "Nulstil kolonneindstillinger");
|
|
7
|
+
injectString("de", "Reset column settings", "Spalteneinstellungen zur\xFCcksetzen");
|
|
8
|
+
injectString("en", "Reset column settings", "Reset column settings");
|
|
9
|
+
injectString("es", "Reset column settings", "Restablecer configuraci\xF3n de columna");
|
|
10
|
+
injectString("fi-FI", "Reset column settings", "Palauta sarakeasetukset");
|
|
11
|
+
injectString("fr", "Reset column settings", "R\xE9initialiser les param\xE8tres de la colonne");
|
|
12
|
+
injectString("fr-FR", "Reset column settings", "R\xE9initialiser les param\xE8tres des colonnes");
|
|
13
|
+
injectString("hu-HU", "Reset column settings", "Oszlopbe\xE1ll\xEDt\xE1sok alaphelyzetbe \xE1ll\xEDt\xE1sa");
|
|
14
|
+
injectString("id", "Reset column settings", "Reset pengaturan kolom");
|
|
15
|
+
injectString("it", "Reset column settings", "Ripristinare impostazioni colonna");
|
|
16
|
+
injectString("ja", "Reset column settings", "\u5217\u8A2D\u5B9A\u3092\u30EA\u30BB\u30C3\u30C8");
|
|
17
|
+
injectString("ko-KR", "Reset column settings", "\uC5F4 \uC124\uC815 \uC7AC\uC124\uC815");
|
|
18
|
+
injectString("ms", "Reset column settings", "Tetapkan semula tetapan lajur");
|
|
19
|
+
injectString("nb-NO", "Reset column settings", "Tilbakestill kolonneinnstillinger");
|
|
20
|
+
injectString("nl", "Reset column settings", "Reset kolominstellingen");
|
|
21
|
+
injectString("pl", "Reset column settings", "Zresetuj ustawienia kolumny");
|
|
22
|
+
injectString("pt-BR", "Reset column settings", "Redefinir configura\xE7\xF5es de coluna");
|
|
23
|
+
injectString("sk-SK", "Reset column settings", "Obnov nastavenia st\u013Apca.");
|
|
24
|
+
injectString("sv", "Reset column settings", "\xC5terst\xE4ll kolumninst\xE4llningar");
|
|
25
|
+
injectString("th", "Reset column settings", "\u0E23\u0E35\u0E40\u0E0B\u0E47\u0E15\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C");
|
|
26
|
+
injectString("tr", "Reset column settings", "S\xFCtun ayarlar\u0131n\u0131 s\u0131f\u0131rla");
|
|
27
|
+
injectString("zh-Hans", "Reset column settings", "\u91CD\u7F6E\u5217\u8BBE\u7F6E");
|
|
28
|
+
injectString("zh-TW", "Reset column settings", "\u91CD\u8A2D\u6B04\u8A2D\u5B9A");
|
|
29
|
+
injectString("cs", "Reset", "Obnovit");
|
|
30
|
+
injectString("da-DK", "Reset", "Nulstil");
|
|
31
|
+
injectString("de", "Reset", "Zur\xFCcksetzen");
|
|
32
|
+
injectString("en", "Reset", "Reset");
|
|
33
|
+
injectString("es", "Reset", "Restaurar");
|
|
34
|
+
injectString("fi-FI", "Reset", "Palauta");
|
|
35
|
+
injectString("fr", "Reset", "R\xE9initialiser");
|
|
36
|
+
injectString("fr-FR", "Reset", "R\xE9initialiser");
|
|
37
|
+
injectString("hu-HU", "Reset", "\xC1ll\xEDtsd vissza.");
|
|
38
|
+
injectString("id", "Reset", "Atur Ulang");
|
|
39
|
+
injectString("it", "Reset", "Ripristinare");
|
|
40
|
+
injectString("ja", "Reset", "\u30EA\u30BB\u30C3\u30C8");
|
|
41
|
+
injectString("ko-KR", "Reset", "\uC7AC\uC124\uC815");
|
|
42
|
+
injectString("ms", "Reset", "Tetap Semula");
|
|
43
|
+
injectString("nb-NO", "Reset", "Tilbakestill");
|
|
44
|
+
injectString("nl", "Reset", "Herstellen");
|
|
45
|
+
injectString("pl", "Reset", "Resetuj");
|
|
46
|
+
injectString("pt-BR", "Reset", "Redefinir");
|
|
47
|
+
injectString("sk-SK", "Reset", "Obnov");
|
|
48
|
+
injectString("sv", "Reset", "\xC5terst\xE4ll");
|
|
49
|
+
injectString("th", "Reset", "\u0E23\u0E35\u0E40\u0E0B\u0E47\u0E15");
|
|
50
|
+
injectString("tr", "Reset", "S\u0131f\u0131rla");
|
|
51
|
+
injectString("zh-Hans", "Reset", "\u91CD\u7F6E");
|
|
52
|
+
injectString("zh-TW", "Reset", "\u91CD\u8A2D");
|
|
53
|
+
export const ColumnSettings = ({
|
|
54
|
+
onReset,
|
|
55
|
+
showFooter = true,
|
|
56
|
+
children
|
|
57
|
+
}) => {
|
|
58
|
+
const {
|
|
59
|
+
translate
|
|
60
|
+
} = useLanguage();
|
|
61
|
+
return _jsxs("div", {
|
|
62
|
+
className: "zen-columns-list",
|
|
63
|
+
children: [_jsx("div", {
|
|
64
|
+
className: "zen-columns-list__content",
|
|
65
|
+
children: children
|
|
66
|
+
}), showFooter ? _jsx("div", {
|
|
67
|
+
className: "zen-columns-list__footer",
|
|
68
|
+
children: _jsx(Button, {
|
|
69
|
+
"aria-label": translate("Reset column settings"),
|
|
70
|
+
className: "zen-columns-list__reset",
|
|
71
|
+
type: "tertiary",
|
|
72
|
+
onClick: onReset,
|
|
73
|
+
children: translate("Reset")
|
|
74
|
+
})
|
|
75
|
+
}) : null]
|
|
76
|
+
});
|
|
9
77
|
};
|
|
10
|
-
export const TRANSLATIONS = [
|
|
11
|
-
"Reset column settings",
|
|
12
|
-
"Reset"
|
|
13
|
-
];
|
|
78
|
+
export const TRANSLATIONS = ["Reset column settings", "Reset"];
|
|
@@ -1,50 +1,112 @@
|
|
|
1
|
+
import { injectString } from "../../utils/localization/translationsDictionary";
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { useCallback, useId, useMemo } from "react";
|
|
3
4
|
import { CheckboxState } from "../../checkbox/checkboxState";
|
|
4
5
|
import { SelectList } from "../../selectList/selectList";
|
|
5
6
|
import { groupColumns } from "./groupColumns";
|
|
6
7
|
import { useLanguage } from "../../utils/localization/useLanguage";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
8
|
+
injectString("cs", "Select visible columns", "Vyberte viditeln\xE9 sloupce");
|
|
9
|
+
injectString("da-DK", "Select visible columns", "V\xE6lg synlige kolonner");
|
|
10
|
+
injectString("de", "Select visible columns", "Sichtbare Spalten ausw\xE4hlen");
|
|
11
|
+
injectString("en", "Select visible columns", "Select visible columns");
|
|
12
|
+
injectString("es", "Select visible columns", "Seleccionar columnas visibles");
|
|
13
|
+
injectString("fi-FI", "Select visible columns", "Valitse n\xE4kyv\xE4t sarakkeet");
|
|
14
|
+
injectString("fr", "Select visible columns", "S\xE9lectionner les colonnes visibles");
|
|
15
|
+
injectString("fr-FR", "Select visible columns", "S\xE9lectionner les colonnes visibles");
|
|
16
|
+
injectString("hu-HU", "Select visible columns", "L\xE1that\xF3 oszlopok kiv\xE1laszt\xE1sa");
|
|
17
|
+
injectString("id", "Select visible columns", "Pilih kolom yang terlihat");
|
|
18
|
+
injectString("it", "Select visible columns", "Selezionare colonne visibili");
|
|
19
|
+
injectString("ja", "Select visible columns", "\u8868\u793A\u5217\u3092\u9078\u629E");
|
|
20
|
+
injectString("ko-KR", "Select visible columns", "\uD45C\uC2DC\uB418\uB294 \uC5F4 \uC120\uD0DD");
|
|
21
|
+
injectString("ms", "Select visible columns", "Pilih lajur yang boleh dilihat");
|
|
22
|
+
injectString("nb-NO", "Select visible columns", "Velg synlige kolonner");
|
|
23
|
+
injectString("nl", "Select visible columns", "Zichtbare kolommen selecteren");
|
|
24
|
+
injectString("pl", "Select visible columns", "Wybierz widoczne kolumny");
|
|
25
|
+
injectString("pt-BR", "Select visible columns", "Selecionar colunas vis\xEDveis");
|
|
26
|
+
injectString("sk-SK", "Select visible columns", "Vybra\u0165 vidite\u013En\xE9 st\u013Apce");
|
|
27
|
+
injectString("sv", "Select visible columns", "V\xE4lj synbara kolumner");
|
|
28
|
+
injectString("th", "Select visible columns", "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C\u0E17\u0E35\u0E48\u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19\u0E44\u0E14\u0E49");
|
|
29
|
+
injectString("tr", "Select visible columns", "G\xF6r\xFCn\xFCr s\xFCtunlar\u0131 se\xE7");
|
|
30
|
+
injectString("zh-Hans", "Select visible columns", "\u9009\u62E9\u53EF\u89C1\u5217");
|
|
31
|
+
injectString("zh-TW", "Select visible columns", "\u9078\u53D6\u53EF\u898B\u6B04");
|
|
32
|
+
const SubColumnsList = ({
|
|
33
|
+
title,
|
|
34
|
+
columns,
|
|
35
|
+
settings,
|
|
36
|
+
firstColumn,
|
|
37
|
+
onChange,
|
|
38
|
+
sortColumns
|
|
39
|
+
}) => {
|
|
40
|
+
const id = useId();
|
|
41
|
+
const {
|
|
42
|
+
translate
|
|
43
|
+
} = useLanguage();
|
|
44
|
+
const sortColumnsInt = useCallback((a, b) => {
|
|
45
|
+
if (sortColumns) {
|
|
46
|
+
return sortColumns(a.title, b.title);
|
|
38
47
|
}
|
|
39
|
-
return
|
|
48
|
+
return 0;
|
|
49
|
+
}, [sortColumns]);
|
|
50
|
+
const items = useMemo(() => columns.sort(sortColumnsInt).map(c => ({
|
|
51
|
+
id: c.id,
|
|
52
|
+
title: c.title,
|
|
53
|
+
disabled: c.id === firstColumn,
|
|
54
|
+
showCheckbox: true,
|
|
55
|
+
children: c.title
|
|
56
|
+
})), [columns, firstColumn, sortColumnsInt]);
|
|
57
|
+
const state = columns.reduce((res, c) => {
|
|
58
|
+
res.set(c.id, settings.get(c.id) !== false ? CheckboxState.On : CheckboxState.Off);
|
|
59
|
+
return res;
|
|
60
|
+
}, new Map());
|
|
61
|
+
const onChangeItem = useCallback(newState => {
|
|
62
|
+
const newSettings = new Map(settings);
|
|
63
|
+
newState.forEach((stateVal, itemId) => {
|
|
64
|
+
var _a;
|
|
65
|
+
newSettings.set((_a = columns.find(c => c.id === itemId)) === null || _a === void 0 ? void 0 : _a.id, stateVal === CheckboxState.On);
|
|
66
|
+
});
|
|
67
|
+
onChange && onChange(newSettings);
|
|
68
|
+
}, [columns, settings, onChange]);
|
|
69
|
+
const list = useMemo(() => _jsx(SelectList, {
|
|
70
|
+
id: id,
|
|
71
|
+
items: items,
|
|
72
|
+
value: state,
|
|
73
|
+
title: title || translate("Select visible columns"),
|
|
74
|
+
multiselect: true,
|
|
75
|
+
showCheckbox: true,
|
|
76
|
+
onChange: onChangeItem
|
|
77
|
+
}), [id, items, state, title, translate, onChangeItem]);
|
|
78
|
+
if (!title) {
|
|
79
|
+
return list;
|
|
80
|
+
}
|
|
81
|
+
return _jsxs("div", {
|
|
82
|
+
className: "zen-columns-list__sub-section",
|
|
83
|
+
children: [_jsx("div", {
|
|
84
|
+
className: "zen-columns-list__title zen-ellipsis",
|
|
85
|
+
children: title
|
|
86
|
+
}), list]
|
|
87
|
+
});
|
|
40
88
|
};
|
|
41
|
-
export function ColumnSettingsList({
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
89
|
+
export function ColumnSettingsList({
|
|
90
|
+
columns,
|
|
91
|
+
settings,
|
|
92
|
+
firstColumn,
|
|
93
|
+
onChange,
|
|
94
|
+
sortGroups,
|
|
95
|
+
sortColumns
|
|
96
|
+
}) {
|
|
97
|
+
const groupped = groupColumns(columns);
|
|
98
|
+
const sortGroupsInt = useCallback((a, b) => {
|
|
99
|
+
if (sortGroups) {
|
|
100
|
+
return sortGroups(a[0], b[0]);
|
|
101
|
+
}
|
|
102
|
+
return 0;
|
|
103
|
+
}, [sortGroups]);
|
|
104
|
+
return Array.from(groupped.entries()).sort(sortGroupsInt).map(([title, cs]) => _jsx(SubColumnsList, {
|
|
105
|
+
title: title,
|
|
106
|
+
columns: cs,
|
|
107
|
+
settings: settings,
|
|
108
|
+
firstColumn: firstColumn,
|
|
109
|
+
onChange: onChange,
|
|
110
|
+
sortColumns: sortColumns
|
|
111
|
+
}, cs.map(c => c.id).join("-")));
|
|
112
|
+
}
|