@geotab/zenith 3.1.1-beta.5 → 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.d.ts +0 -1
- package/dist/formField/formField.js +15 -16
- 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/groupsFilterTestData.d.ts +37 -0
- package/dist/groupsFilter/groupsFilterTestData.js +7 -0
- package/dist/groupsFilter/groupsHelper.d.ts +24 -1
- package/dist/groupsFilter/groupsHelper.js +25 -15
- 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 +2 -1
- package/dist/index.js +5 -2
- 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.d.ts +0 -1
- package/esm/formField/formField.js +15 -16
- 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/groupsFilterTestData.d.ts +37 -0
- package/esm/groupsFilter/groupsFilterTestData.js +4 -0
- package/esm/groupsFilter/groupsHelper.d.ts +24 -1
- package/esm/groupsFilter/groupsHelper.js +24 -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 +2 -1
- package/esm/index.js +2 -1
- 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/formField/hooks/useClasses.d.ts +0 -8
- package/dist/formField/hooks/useClasses.js +0 -25
- 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/formField/hooks/useClasses.d.ts +0 -8
- package/esm/formField/hooks/useClasses.js +0 -21
- 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/dataGrid/dataGrid.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { injectString } from "../utils/localization/translationsDictionary";
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { Children, forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
3
4
|
import { classNames } from "../commonHelpers/classNames/classNames";
|
|
@@ -9,132 +10,236 @@ import { useResize } from "../commonHelpers/hooks/useResize";
|
|
|
9
10
|
import { useResizeObserver } from "../commonHelpers/hooks/useResizeObserver";
|
|
10
11
|
import { useLanguage } from "../utils/localization/useLanguage";
|
|
11
12
|
import { getRowClassName } from "./getRowClassName";
|
|
13
|
+
injectString("cs", "Action", "Akce");
|
|
14
|
+
injectString("da-DK", "Action", "Handling");
|
|
15
|
+
injectString("de", "Action", "Aktion");
|
|
16
|
+
injectString("en", "Action", "Action");
|
|
17
|
+
injectString("es", "Action", "Acci\xF3n");
|
|
18
|
+
injectString("fi-FI", "Action", "Toiminto");
|
|
19
|
+
injectString("fr", "Action", "Action");
|
|
20
|
+
injectString("fr-FR", "Action", "Action");
|
|
21
|
+
injectString("hu-HU", "Action", "M\u0171velet");
|
|
22
|
+
injectString("id", "Action", "Tindakan");
|
|
23
|
+
injectString("it", "Action", "Azione");
|
|
24
|
+
injectString("ja", "Action", "\u30A2\u30AF\u30B7\u30E7\u30F3");
|
|
25
|
+
injectString("ko-KR", "Action", "\uC870\uCE58");
|
|
26
|
+
injectString("ms", "Action", "Tindakan");
|
|
27
|
+
injectString("nb-NO", "Action", "Handling");
|
|
28
|
+
injectString("nl", "Action", "Actie");
|
|
29
|
+
injectString("pl", "Action", "Dzia\u0142anie");
|
|
30
|
+
injectString("pt-BR", "Action", "A\xE7\xE3o");
|
|
31
|
+
injectString("sk-SK", "Action", "Akcia");
|
|
32
|
+
injectString("sv", "Action", "\xC5tg\xE4rd");
|
|
33
|
+
injectString("th", "Action", "\u0E01\u0E32\u0E23\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23");
|
|
34
|
+
injectString("tr", "Action", "Eylem");
|
|
35
|
+
injectString("zh-Hans", "Action", "\u64CD\u4F5C");
|
|
36
|
+
injectString("zh-TW", "Action", "\u52D5\u4F5C");
|
|
12
37
|
export const NOT_INTERACTIVE_MODIFIER = "zen-data-grid--not-interactive";
|
|
13
38
|
export const DRAGGING_MODIFIER = "zen-data-grid--dragging";
|
|
14
39
|
export const HORIZONTAL_SCROLL_MODIFIER = "zen-data-grid--horizontal-scroll";
|
|
15
40
|
export const VERTICAL_SCROLL_MODIFIER = "zen-data-grid--vertical-scroll";
|
|
16
41
|
export const MIN_CELL_WIDTH = 100;
|
|
17
42
|
const renderHeaderWrappers = (wrappers, value) => wrappers.reduce((result, wrapper) => wrapper.renderHeader(result), value);
|
|
18
|
-
const getColumnWidth =
|
|
19
|
-
export const EmptyList = ({
|
|
20
|
-
|
|
43
|
+
const getColumnWidth = defaultWidth => Math.floor(Math.max(defaultWidth, MIN_CELL_WIDTH));
|
|
44
|
+
export const EmptyList = ({
|
|
45
|
+
children
|
|
46
|
+
}) => _jsx("div", {
|
|
47
|
+
className: "zen-data-grid__empty",
|
|
48
|
+
children: children
|
|
49
|
+
});
|
|
50
|
+
export const Footer = ({
|
|
51
|
+
children
|
|
52
|
+
}) => _jsx("div", {
|
|
53
|
+
className: "zen-data-grid__footer",
|
|
54
|
+
children: children
|
|
55
|
+
});
|
|
21
56
|
const FIRST_RENDERED_ROWS = 100;
|
|
22
|
-
const DataGridInner = ({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
57
|
+
const DataGridInner = ({
|
|
58
|
+
entities,
|
|
59
|
+
columns,
|
|
60
|
+
className = "",
|
|
61
|
+
description,
|
|
62
|
+
emptyCellTitle,
|
|
63
|
+
children,
|
|
64
|
+
rowClassName,
|
|
65
|
+
expandedRows,
|
|
66
|
+
onExpandedChange
|
|
67
|
+
}, ref) => {
|
|
68
|
+
const {
|
|
69
|
+
translate
|
|
70
|
+
} = useLanguage();
|
|
71
|
+
const emptyCellTitleValue = emptyCellTitle || translate("Action");
|
|
72
|
+
// States
|
|
73
|
+
const columnsList = useMemo(() => columns.map(toBasicColumn), [columns]);
|
|
74
|
+
const initialVisibleRows = useMemo(() => entities.slice(0, FIRST_RENDERED_ROWS).map(r => r.id), [entities]);
|
|
75
|
+
const [visibleRows, setVisibleRows] = useState(new Set(initialVisibleRows));
|
|
76
|
+
const [horizontalScrollApplied, setHorizontalScrollApplied] = useState(false);
|
|
77
|
+
const [verticalScrollApplied, setVerticalScrollApplied] = useState(false);
|
|
78
|
+
// Refs
|
|
79
|
+
const gridRef = useRef(null);
|
|
80
|
+
const bodyRef = useRef(null);
|
|
81
|
+
const lazyRenderTimerRef = useRef(0);
|
|
82
|
+
const rowsMap = useMemo(() => new Map(entities.map(entity => [entity.id, entity])), [entities]);
|
|
83
|
+
const emptyList = useMemo(() => Children.toArray(children).find(child => child.type === EmptyList), [children]);
|
|
84
|
+
const footer = useMemo(() => Children.toArray(children).find(child => child.type === Footer), [children]);
|
|
85
|
+
useImperativeHandle(ref, () => gridRef.current, []);
|
|
86
|
+
const getVisibleRows = () => {
|
|
87
|
+
if (!gridRef.current || !bodyRef.current) {
|
|
88
|
+
return [];
|
|
89
|
+
}
|
|
90
|
+
const {
|
|
91
|
+
top,
|
|
92
|
+
bottom
|
|
93
|
+
} = gridRef.current.getBoundingClientRect();
|
|
94
|
+
return findVisibleRows([...bodyRef.current.children], top, bottom);
|
|
95
|
+
};
|
|
96
|
+
const scheduleVisibleChanges = useCallback(() => requestAnimationFrame(() => {
|
|
97
|
+
const visible = getVisibleRows();
|
|
98
|
+
const newVisibleRows = visible.filter(row => {
|
|
99
|
+
const id = row.dataset.rowId;
|
|
100
|
+
if (id === undefined) {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
const entity = rowsMap.get(id);
|
|
104
|
+
if (entity === undefined) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
return row;
|
|
108
|
+
}).map(row => row.dataset.rowId);
|
|
109
|
+
const hasNewRows = newVisibleRows.some(id => !visibleRows.has(id));
|
|
110
|
+
if (hasNewRows) {
|
|
111
|
+
const newRowsSet = new Set(visibleRows);
|
|
112
|
+
newVisibleRows.forEach(row => newRowsSet.add(row));
|
|
113
|
+
setVisibleRows(newRowsSet);
|
|
114
|
+
}
|
|
115
|
+
}), [rowsMap, setVisibleRows, visibleRows]);
|
|
116
|
+
const scheduleLazyRender = useCallback(() => {
|
|
117
|
+
cancelAnimationFrame(lazyRenderTimerRef.current);
|
|
118
|
+
lazyRenderTimerRef.current = scheduleVisibleChanges();
|
|
119
|
+
}, [scheduleVisibleChanges]);
|
|
120
|
+
useEffect(() => {
|
|
121
|
+
const visible = new Set(entities.slice(0, FIRST_RENDERED_ROWS).map(r => r.id));
|
|
122
|
+
const currentlyVisibleRows = getVisibleRows();
|
|
123
|
+
currentlyVisibleRows.forEach(row => {
|
|
124
|
+
const id = row.dataset.rowId;
|
|
125
|
+
if (id) {
|
|
126
|
+
visible.add(id);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
setVisibleRows(visible);
|
|
130
|
+
}, [entities]);
|
|
131
|
+
const listOfDefaultWidthColumns = useMemo(() => columnsList.map(column => column.meta.defaultWidth), [columnsList]);
|
|
132
|
+
const {
|
|
133
|
+
result: observerResult
|
|
134
|
+
} = useResizeObserver({
|
|
135
|
+
target: gridRef.current
|
|
136
|
+
});
|
|
137
|
+
const allocatedSpace = listOfDefaultWidthColumns.reduce((acc, width) => acc + (width === undefined ? 0 : getColumnWidth(width)), 0);
|
|
138
|
+
const unallocatedSpace = observerResult && observerResult.contentRect.width - allocatedSpace || 0;
|
|
139
|
+
const flexibleColumnsQty = listOfDefaultWidthColumns.filter(width => width === undefined).length;
|
|
140
|
+
const flexibleColumnWidth = getColumnWidth(unallocatedSpace / flexibleColumnsQty);
|
|
141
|
+
const updateScroll = useCallback(() => {
|
|
142
|
+
if (!gridRef.current) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const scrollLeft = gridRef.current.scrollLeft;
|
|
146
|
+
const scrollTop = gridRef.current.scrollTop;
|
|
147
|
+
if (horizontalScrollApplied !== scrollLeft > 0) {
|
|
148
|
+
setHorizontalScrollApplied(scrollLeft > 0);
|
|
149
|
+
}
|
|
150
|
+
if (verticalScrollApplied !== scrollTop > 0) {
|
|
151
|
+
setVerticalScrollApplied(scrollTop > 0);
|
|
152
|
+
}
|
|
153
|
+
}, [horizontalScrollApplied, setHorizontalScrollApplied, verticalScrollApplied, setVerticalScrollApplied]);
|
|
154
|
+
const handleScroll = useCallback(() => {
|
|
155
|
+
updateScroll();
|
|
156
|
+
scheduleLazyRender();
|
|
157
|
+
}, [updateScroll, scheduleLazyRender]);
|
|
158
|
+
const getCellParams = useCallback(columnIndex => {
|
|
159
|
+
const defaultWidth = listOfDefaultWidthColumns[columnIndex];
|
|
160
|
+
const limited = !!defaultWidth && defaultWidth > 0;
|
|
161
|
+
const isFirst = columnIndex === 0;
|
|
162
|
+
const isLast = columnIndex === listOfDefaultWidthColumns.length - 1;
|
|
163
|
+
// If the column is the last one or doesn't have a default width, it should be limited to the remaining space
|
|
164
|
+
const width = getColumnWidth(defaultWidth || flexibleColumnWidth);
|
|
165
|
+
return {
|
|
166
|
+
limited,
|
|
167
|
+
isFirst,
|
|
168
|
+
isLast,
|
|
169
|
+
width
|
|
45
170
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const { isFirst, isLast, width } = getCellParams(columnIndex);
|
|
116
|
-
const text = ((_a = column.columnComponent.renderHeader) === null || _a === void 0 ? void 0 : _a.bind(column.columnComponent)) ? column.columnComponent.renderHeader(column.title) : column.title;
|
|
117
|
-
return _jsx(DataGridHeaderCell, { id: column.id, isFirst: isFirst, isLast: isLast, name: column.name, width: width, hidden: !text, children: _jsx("div", { className: "zen-data-grid__header-cell-content", children: renderHeaderWrappers(column.wrappers, _jsx("div", { className: classNames(["zen-data-grid-header", column.title ? "" : "zen-visually-hidden"]), children: column.title ? text : emptyCellTitleValue })) }) }, `header_${column.name}`);
|
|
118
|
-
}, [getCellParams, emptyCellTitleValue]);
|
|
119
|
-
const isTreeGrid = useMemo(() => !!entities.find(e => e.children && e.children.length > 0), [entities]);
|
|
120
|
-
const renderRow = useCallback((entity, entityIndex, total) => _jsx(DataGridRow, { id: entity.id, isLastRow: entityIndex === total - 1, columns: columnsList, entity: entity, visibleRows: visibleRows, flexibleColumnWidth: flexibleColumnWidth, className: getRowClassName(rowClassName, entity), expanded: expandedRows && expandedRows.indexOf(entity.id) > -1, onExpandedChange: entity.children && entity.children.length > 0 ? (isExpanded) => onExpandedChange && onExpandedChange(entity.id, isExpanded) : undefined, isTreeGrid: isTreeGrid, ariaPosinset: entityIndex + 1, ariaSetsize: total }, entity.id), [columnsList, expandedRows, flexibleColumnWidth, onExpandedChange, rowClassName, visibleRows, isTreeGrid]);
|
|
121
|
-
const body = useMemo(() => entities.map((entity, entityIndex) => renderRow(entity, entityIndex, entities.length)), [entities, renderRow]);
|
|
122
|
-
const headerContent = useMemo(() => columnsList.map((column, index) => renderHeaderCell(column, index)), [columnsList, renderHeaderCell]);
|
|
123
|
-
useResize(() => {
|
|
124
|
-
handleScroll();
|
|
125
|
-
}, true);
|
|
126
|
-
const gridClasses = classNames([
|
|
127
|
-
"zen-data-grid",
|
|
128
|
-
className,
|
|
129
|
-
horizontalScrollApplied ? HORIZONTAL_SCROLL_MODIFIER : "",
|
|
130
|
-
verticalScrollApplied ? VERTICAL_SCROLL_MODIFIER : ""
|
|
131
|
-
]);
|
|
132
|
-
return _jsx("div", { className: "zen-data-grid-wrapper", children: _jsxs("div", { className: gridClasses, ref: gridRef, onScroll: handleScroll, children: [_jsxs("table", { className: "zen-data-grid__table", "aria-label": description, role: isTreeGrid ? "treegrid" : undefined, children: [_jsx("thead", { className: "zen-data-grid__header", children: _jsx("tr", { className: "zen-data-grid__header-row", children: headerContent }) }), _jsx("tbody", { ref: bodyRef, children: body })] }), emptyList && entities.length === 0 ? emptyList : null, footer] }) });
|
|
171
|
+
}, [listOfDefaultWidthColumns, flexibleColumnWidth]);
|
|
172
|
+
const renderHeaderCell = useCallback((column, columnIndex) => {
|
|
173
|
+
var _a;
|
|
174
|
+
const {
|
|
175
|
+
isFirst,
|
|
176
|
+
isLast,
|
|
177
|
+
width
|
|
178
|
+
} = getCellParams(columnIndex);
|
|
179
|
+
const text = ((_a = column.columnComponent.renderHeader) === null || _a === void 0 ? void 0 : _a.bind(column.columnComponent)) ? column.columnComponent.renderHeader(column.title) : column.title;
|
|
180
|
+
return _jsx(DataGridHeaderCell, {
|
|
181
|
+
id: column.id,
|
|
182
|
+
isFirst: isFirst,
|
|
183
|
+
isLast: isLast,
|
|
184
|
+
name: column.name,
|
|
185
|
+
width: width,
|
|
186
|
+
hidden: !text,
|
|
187
|
+
children: _jsx("div", {
|
|
188
|
+
className: "zen-data-grid__header-cell-content",
|
|
189
|
+
children: renderHeaderWrappers(column.wrappers, _jsx("div", {
|
|
190
|
+
className: classNames(["zen-data-grid-header", column.title ? "" : "zen-visually-hidden"]),
|
|
191
|
+
children: column.title ? text : emptyCellTitleValue
|
|
192
|
+
}))
|
|
193
|
+
})
|
|
194
|
+
}, `header_${column.name}`);
|
|
195
|
+
}, [getCellParams, emptyCellTitleValue]);
|
|
196
|
+
const isTreeGrid = useMemo(() => !!entities.find(e => e.children && e.children.length > 0), [entities]);
|
|
197
|
+
const renderRow = useCallback((entity, entityIndex, total) => _jsx(DataGridRow, {
|
|
198
|
+
id: entity.id,
|
|
199
|
+
isLastRow: entityIndex === total - 1,
|
|
200
|
+
columns: columnsList,
|
|
201
|
+
entity: entity,
|
|
202
|
+
visibleRows: visibleRows,
|
|
203
|
+
flexibleColumnWidth: flexibleColumnWidth,
|
|
204
|
+
className: getRowClassName(rowClassName, entity),
|
|
205
|
+
expanded: expandedRows && expandedRows.indexOf(entity.id) > -1,
|
|
206
|
+
onExpandedChange: entity.children && entity.children.length > 0 ? isExpanded => onExpandedChange && onExpandedChange(entity.id, isExpanded) : undefined,
|
|
207
|
+
isTreeGrid: isTreeGrid,
|
|
208
|
+
ariaPosinset: entityIndex + 1,
|
|
209
|
+
ariaSetsize: total
|
|
210
|
+
}, entity.id), [columnsList, expandedRows, flexibleColumnWidth, onExpandedChange, rowClassName, visibleRows, isTreeGrid]);
|
|
211
|
+
const body = useMemo(() => entities.map((entity, entityIndex) => renderRow(entity, entityIndex, entities.length)), [entities, renderRow]);
|
|
212
|
+
const headerContent = useMemo(() => columnsList.map((column, index) => renderHeaderCell(column, index)), [columnsList, renderHeaderCell]);
|
|
213
|
+
useResize(() => {
|
|
214
|
+
handleScroll();
|
|
215
|
+
}, true);
|
|
216
|
+
const gridClasses = classNames(["zen-data-grid", className, horizontalScrollApplied ? HORIZONTAL_SCROLL_MODIFIER : "", verticalScrollApplied ? VERTICAL_SCROLL_MODIFIER : ""]);
|
|
217
|
+
return _jsx("div", {
|
|
218
|
+
className: "zen-data-grid-wrapper",
|
|
219
|
+
children: _jsxs("div", {
|
|
220
|
+
className: gridClasses,
|
|
221
|
+
ref: gridRef,
|
|
222
|
+
onScroll: handleScroll,
|
|
223
|
+
children: [_jsxs("table", {
|
|
224
|
+
className: "zen-data-grid__table",
|
|
225
|
+
"aria-label": description,
|
|
226
|
+
role: isTreeGrid ? "treegrid" : undefined,
|
|
227
|
+
children: [_jsx("thead", {
|
|
228
|
+
className: "zen-data-grid__header",
|
|
229
|
+
children: _jsx("tr", {
|
|
230
|
+
className: "zen-data-grid__header-row",
|
|
231
|
+
children: headerContent
|
|
232
|
+
})
|
|
233
|
+
}), _jsx("tbody", {
|
|
234
|
+
ref: bodyRef,
|
|
235
|
+
children: body
|
|
236
|
+
})]
|
|
237
|
+
}), emptyList && entities.length === 0 ? emptyList : null, footer]
|
|
238
|
+
})
|
|
239
|
+
});
|
|
133
240
|
};
|
|
134
241
|
const DataGrid = forwardRef(DataGridInner);
|
|
135
242
|
DataGrid.EmptyList = EmptyList;
|
|
136
243
|
DataGrid.Footer = Footer;
|
|
137
244
|
export { DataGrid };
|
|
138
|
-
export const TRANSLATIONS = [
|
|
139
|
-
"Action"
|
|
140
|
-
];
|
|
245
|
+
export const TRANSLATIONS = ["Action"];
|
|
@@ -1,13 +1,55 @@
|
|
|
1
|
+
import { injectString } from "../../utils/localization/translationsDictionary";
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { classNames } from "../../commonHelpers/classNames/classNames";
|
|
3
4
|
import { ImageNothingFound } from "../../images/imageNothingFound";
|
|
4
5
|
import { useLanguage } from "../../utils/localization/useLanguage";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
injectString("cs", "Try adjusting your search or filter.", "Zkuste upravit sv\xE9 vyhled\xE1v\xE1n\xED nebo filtr.");
|
|
7
|
+
injectString("da-DK", "Try adjusting your search or filter.", "Pr\xF8v at justere din s\xF8gning eller dit filter.");
|
|
8
|
+
injectString("de", "Try adjusting your search or filter.", "Versuchen Sie, die Suche oder Filter anzupassen.");
|
|
9
|
+
injectString("en", "Try adjusting your search or filter.", "Try adjusting your search or filter.");
|
|
10
|
+
injectString("es", "Try adjusting your search or filter.", "Pruebe ajustar la b\xFAsqueda o el filtro.");
|
|
11
|
+
injectString("fi-FI", "Try adjusting your search or filter.", "Yrit\xE4 s\xE4\xE4t\xE4\xE4 hakua tai suodatinta.");
|
|
12
|
+
injectString("fr", "Try adjusting your search or filter.", "Essayez d\u2019ajuster votre recherche ou votre filtre.");
|
|
13
|
+
injectString("fr-FR", "Try adjusting your search or filter.", "Essayez d\u2019ajuster votre recherche ou votre filtre.");
|
|
14
|
+
injectString("hu-HU", "Try adjusting your search or filter.", "Pr\xF3b\xE1ld meg m\xF3dos\xEDtani a keres\xE9st vagy a sz\u0171r\u0151t.");
|
|
15
|
+
injectString("id", "Try adjusting your search or filter.", "Coba sesuaikan pencarian atau filter Anda.");
|
|
16
|
+
injectString("it", "Try adjusting your search or filter.", "Provare a modificare la ricerca o a regolare i filtri.");
|
|
17
|
+
injectString("ja", "Try adjusting your search or filter.", "\u691C\u7D22\u307E\u305F\u306F\u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u8ABF\u6574\u3057\u3066\u307F\u3066\u304F\u3060\u3055\u3044\u3002");
|
|
18
|
+
injectString("ko-KR", "Try adjusting your search or filter.", "\uAC80\uC0C9 \uB610\uB294 \uD544\uD130\uB97C \uC870\uC815\uD574 \uBCF4\uC2ED\uC2DC\uC624.");
|
|
19
|
+
injectString("ms", "Try adjusting your search or filter.", "Cuba laraskan carian atau penyaring anda.");
|
|
20
|
+
injectString("nb-NO", "Try adjusting your search or filter.", "Pr\xF8v \xE5 justere s\xF8ket eller filteret.");
|
|
21
|
+
injectString("nl", "Try adjusting your search or filter.", "Probeer uw zoekopdracht of filter aan te passen.");
|
|
22
|
+
injectString("pl", "Try adjusting your search or filter.", "Spr\xF3buj dostosowa\u0107 wyszukiwanie lub filtr.");
|
|
23
|
+
injectString("pt-BR", "Try adjusting your search or filter.", "Tente ajustar sua pesquisa ou filtro.");
|
|
24
|
+
injectString("sk-SK", "Try adjusting your search or filter.", "Sk\xFAs upravi\u0165 svoje vyh\u013Ead\xE1vanie alebo filter.");
|
|
25
|
+
injectString("sv", "Try adjusting your search or filter.", "Prova att justera s\xF6kningen eller filtret.");
|
|
26
|
+
injectString("th", "Try adjusting your search or filter.", "\u0E25\u0E2D\u0E07\u0E1B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E2B\u0E23\u0E37\u0E2D\u0E15\u0E31\u0E27\u0E01\u0E23\u0E2D\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13");
|
|
27
|
+
injectString("tr", "Try adjusting your search or filter.", "Araman\u0131z\u0131 veya filtrenizi ayarlamay\u0131 deneyin.");
|
|
28
|
+
injectString("zh-Hans", "Try adjusting your search or filter.", "\u5C1D\u8BD5\u8C03\u6574\u60A8\u7684\u641C\u7D22\u6216\u7B5B\u9009\u6761\u4EF6\u3002");
|
|
29
|
+
injectString("zh-TW", "Try adjusting your search or filter.", "\u8ACB\u5617\u8A66\u8ABF\u6574\u60A8\u7684\u641C\u5C0B\u6216\u7BE9\u9078\u689D\u4EF6\u3002");
|
|
30
|
+
export const EmptySearchList = ({
|
|
31
|
+
className,
|
|
32
|
+
children,
|
|
33
|
+
description,
|
|
34
|
+
image
|
|
35
|
+
}) => {
|
|
36
|
+
const {
|
|
37
|
+
translate
|
|
38
|
+
} = useLanguage();
|
|
39
|
+
return _jsxs("div", {
|
|
40
|
+
className: classNames(["zen-empty-list-search", className || ""]),
|
|
41
|
+
children: [image ? _jsx("div", {
|
|
42
|
+
className: "zen-empty-list-search__image",
|
|
43
|
+
children: image
|
|
44
|
+
}) : _jsx(ImageNothingFound, {
|
|
45
|
+
className: "zen-empty-list-search__image"
|
|
46
|
+
}), _jsx("h2", {
|
|
47
|
+
className: "zen-empty-list-search__header",
|
|
48
|
+
children: children
|
|
49
|
+
}), _jsx("div", {
|
|
50
|
+
className: "zen-empty-list-search__description",
|
|
51
|
+
children: description || translate("Try adjusting your search or filter.")
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
10
54
|
};
|
|
11
|
-
EmptySearchList.translations = [
|
|
12
|
-
"Try adjusting your search or filter."
|
|
13
|
-
];
|
|
55
|
+
EmptySearchList.translations = ["Try adjusting your search or filter."];
|
|
@@ -1,13 +1,52 @@
|
|
|
1
|
+
import { injectString } from "../../../utils/localization/translationsDictionary";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { SvgIconSize } from "../../../svgIcon/svgIconSize";
|
|
3
4
|
import { ButtonIconPosition, TextIconButton } from "../../../textIconButton/textIconButton";
|
|
4
5
|
import { ButtonType } from "../../../button/buttonType";
|
|
5
6
|
import { IconSettings3 } from "../../../icons/iconSettings3";
|
|
6
7
|
import { useLanguage } from "../../../utils/localization/useLanguage";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
injectString("cs", "Column Settings", "Nastaven\xED sloupc\u016F");
|
|
9
|
+
injectString("da-DK", "Column Settings", "Kolonneindstillinger");
|
|
10
|
+
injectString("de", "Column Settings", "Spalteneinstellungen");
|
|
11
|
+
injectString("en", "Column Settings", "Column Settings");
|
|
12
|
+
injectString("es", "Column Settings", "Configuraci\xF3n de columnas");
|
|
13
|
+
injectString("fi-FI", "Column Settings", "Sarakkeiden asetukset");
|
|
14
|
+
injectString("fr", "Column Settings", "Param\xE8tres des colonnes");
|
|
15
|
+
injectString("fr-FR", "Column Settings", "Param\xE8tres des colonnes");
|
|
16
|
+
injectString("hu-HU", "Column Settings", "Oszlopbe\xE1ll\xEDt\xE1sok");
|
|
17
|
+
injectString("id", "Column Settings", "Pengaturan Kolom");
|
|
18
|
+
injectString("it", "Column Settings", "Impostazioni colonna");
|
|
19
|
+
injectString("ja", "Column Settings", "\u5217\u306E\u8A2D\u5B9A");
|
|
20
|
+
injectString("ko-KR", "Column Settings", "\uC5F4 \uC124\uC815");
|
|
21
|
+
injectString("ms", "Column Settings", "Tetapan Lajur");
|
|
22
|
+
injectString("nb-NO", "Column Settings", "Kolonneinnstillinger");
|
|
23
|
+
injectString("nl", "Column Settings", "Kolominstellingen");
|
|
24
|
+
injectString("pl", "Column Settings", "Ustawienia kolumn");
|
|
25
|
+
injectString("pt-BR", "Column Settings", "Configura\xE7\xF5es da coluna");
|
|
26
|
+
injectString("sk-SK", "Column Settings", "Nastavenia st\u013Apcov");
|
|
27
|
+
injectString("sv", "Column Settings", "Kolumninst\xE4llningar");
|
|
28
|
+
injectString("th", "Column Settings", "\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C");
|
|
29
|
+
injectString("tr", "Column Settings", "S\xFCtun Ayarlar\u0131");
|
|
30
|
+
injectString("zh-Hans", "Column Settings", "\u5217\u8BBE\u7F6E");
|
|
31
|
+
injectString("zh-TW", "Column Settings", "\u6B04\u8A2D\u5B9A");
|
|
32
|
+
const ColumnsListButtonInner = ({
|
|
33
|
+
onClick,
|
|
34
|
+
ref
|
|
35
|
+
}) => {
|
|
36
|
+
const {
|
|
37
|
+
translate
|
|
38
|
+
} = useLanguage();
|
|
39
|
+
return _jsx(TextIconButton, {
|
|
40
|
+
ref: ref,
|
|
41
|
+
icon: IconSettings3,
|
|
42
|
+
iconSize: SvgIconSize.Large,
|
|
43
|
+
iconPosition: ButtonIconPosition.Start,
|
|
44
|
+
"aria-label": translate("Column Settings"),
|
|
45
|
+
title: translate("Column Settings"),
|
|
46
|
+
onClick: onClick,
|
|
47
|
+
type: ButtonType.TertiaryBlack
|
|
48
|
+
});
|
|
10
49
|
};
|
|
11
|
-
export const ColumnsListButton = Object.assign(ColumnsListButtonInner, {
|
|
12
|
-
|
|
13
|
-
|
|
50
|
+
export const ColumnsListButton = Object.assign(ColumnsListButtonInner, {
|
|
51
|
+
translations: ["Column Settings"]
|
|
52
|
+
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { injectString } from "../../../utils/localization/translationsDictionary";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { ButtonIconPosition, TextIconButton } from "../../../textIconButton/textIconButton";
|
|
3
4
|
import { SvgIconSize } from "../../../svgIcon/svgIconSize";
|
|
@@ -8,21 +9,61 @@ import { IconMinimize } from "../../../icons/iconMinimize";
|
|
|
8
9
|
import { useLayoutFullScreenElement } from "../../../layout/layoutFullScreenElementProvider";
|
|
9
10
|
import { useLayoutFullScreen } from "../../../layout/layoutFullScreenProvider";
|
|
10
11
|
import { useCallback } from "react";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
injectString("cs", "Convert table to full screen", "Konvertovat tabulku do re\u017Eimu pln\xE9ho zobrazen\xED");
|
|
13
|
+
injectString("da-DK", "Convert table to full screen", "Konverter tabel til fuld sk\xE6rm");
|
|
14
|
+
injectString("de", "Convert table to full screen", "Tabelle in Vollbild umwandeln");
|
|
15
|
+
injectString("en", "Convert table to full screen", "Convert table to full screen");
|
|
16
|
+
injectString("es", "Convert table to full screen", "Convertir la tabla en pantalla completa");
|
|
17
|
+
injectString("fi-FI", "Convert table to full screen", "Muunna taulukko t\xE4yteen ruutuun");
|
|
18
|
+
injectString("fr", "Convert table to full screen", "Convertir le tableau en plein \xE9cran");
|
|
19
|
+
injectString("fr-FR", "Convert table to full screen", "Afficher le tableau en plein \xE9cran");
|
|
20
|
+
injectString("hu-HU", "Convert table to full screen", "Kapcsold teljes k\xE9perny\u0151re a t\xE1bl\xE1zatot.");
|
|
21
|
+
injectString("id", "Convert table to full screen", "Konversi tabel ke layar penuh");
|
|
22
|
+
injectString("it", "Convert table to full screen", "Convertire la tabella a schermo intero");
|
|
23
|
+
injectString("ja", "Convert table to full screen", "\u8868\u3092\u5168\u753B\u9762\u8868\u793A\u306B\u5909\u63DB");
|
|
24
|
+
injectString("ko-KR", "Convert table to full screen", "\uD45C\uB97C \uC804\uCCB4 \uD654\uBA74\uC73C\uB85C \uBCC0\uD658");
|
|
25
|
+
injectString("ms", "Convert table to full screen", "Tukarkan jadual kepada skrin penuh");
|
|
26
|
+
injectString("nb-NO", "Convert table to full screen", "Konverter tabellen til full skjerm");
|
|
27
|
+
injectString("nl", "Convert table to full screen", "Tabel converteren naar volledig scherm");
|
|
28
|
+
injectString("pl", "Convert table to full screen", "Konwertuj tabel\u0119 na pe\u0142ny ekran");
|
|
29
|
+
injectString("pt-BR", "Convert table to full screen", "Converter tabela para tela cheia");
|
|
30
|
+
injectString("sk-SK", "Convert table to full screen", "Previes\u0165 tabu\u013Eku na cel\xFA obrazovku");
|
|
31
|
+
injectString("sv", "Convert table to full screen", "Konvertera tabell till helsk\xE4rm");
|
|
32
|
+
injectString("th", "Convert table to full screen", "\u0E41\u0E1B\u0E25\u0E07\u0E15\u0E32\u0E23\u0E32\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E41\u0E1A\u0E1A\u0E40\u0E15\u0E47\u0E21\u0E2B\u0E19\u0E49\u0E32\u0E08\u0E2D");
|
|
33
|
+
injectString("tr", "Convert table to full screen", "Tabloyu tam ekrana d\xF6n\xFC\u015Ft\xFCr");
|
|
34
|
+
injectString("zh-Hans", "Convert table to full screen", "\u5C06\u8868\u683C\u8F6C\u6362\u4E3A\u5168\u5C4F");
|
|
35
|
+
injectString("zh-TW", "Convert table to full screen", "\u5C07\u8868\u683C\u8F49\u63DB\u70BA\u5168\u87A2\u5E55\u986F\u793A");
|
|
36
|
+
export const FullScreenButton = ({
|
|
37
|
+
fullScreen,
|
|
38
|
+
title,
|
|
39
|
+
onClick
|
|
40
|
+
}) => {
|
|
41
|
+
const {
|
|
42
|
+
translate
|
|
43
|
+
} = useLanguage();
|
|
44
|
+
const {
|
|
45
|
+
fullScreenElement
|
|
46
|
+
} = useLayoutFullScreen();
|
|
47
|
+
const {
|
|
48
|
+
elementId,
|
|
49
|
+
setFullScreenElement
|
|
50
|
+
} = useLayoutFullScreenElement();
|
|
51
|
+
const getFullScreen = useCallback(() => fullScreen !== undefined ? fullScreen : fullScreenElement === elementId, [fullScreen, fullScreenElement, elementId]);
|
|
52
|
+
const handleClick = useCallback(() => {
|
|
53
|
+
const currentFullScreenValue = getFullScreen();
|
|
54
|
+
if (onClick) {
|
|
55
|
+
onClick(!currentFullScreenValue);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
setFullScreenElement(currentFullScreenValue ? undefined : elementId);
|
|
59
|
+
}, [getFullScreen, onClick, setFullScreenElement, elementId]);
|
|
60
|
+
return _jsx(TextIconButton, {
|
|
61
|
+
icon: getFullScreen() ? IconMinimize : IconExpand,
|
|
62
|
+
iconPosition: ButtonIconPosition.Start,
|
|
63
|
+
iconSize: SvgIconSize.Large,
|
|
64
|
+
title: title ? title : translate("Convert table to full screen"),
|
|
65
|
+
type: ButtonType.TertiaryBlack,
|
|
66
|
+
onClick: handleClick
|
|
67
|
+
});
|
|
25
68
|
};
|
|
26
|
-
FullScreenButton.translations = [
|
|
27
|
-
"Convert table to full screen"
|
|
28
|
-
];
|
|
69
|
+
FullScreenButton.translations = ["Convert table to full screen"];
|