@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.
Files changed (434) hide show
  1. package/README.md +20 -0
  2. package/dist/advancedGroupsFilter/advancedGroupsFilter.js +136 -30
  3. package/dist/advancedGroupsFilter/advancedGroupsFilterForm.js +139 -34
  4. package/dist/advancedGroupsFilter/advancedGroupsFilterFormSection.js +352 -87
  5. package/dist/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.d.ts +0 -1
  6. package/dist/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +83 -9
  7. package/dist/alertRaw/alertRaw.js +175 -54
  8. package/dist/banner/bannerMultipLine.js +131 -23
  9. package/dist/banner/bannerSingleLine.js +110 -16
  10. package/dist/betaPill/betaPill.js +111 -20
  11. package/dist/bookmark/bookmark.js +95 -28
  12. package/dist/bulkEditControl/bulkEditControl.js +167 -34
  13. package/dist/calendar/calendar.js +943 -273
  14. package/dist/calendar/calendarUtils.js +157 -85
  15. package/dist/card/card.js +268 -123
  16. package/dist/chart/accessibleChart/accessibleChartNarrative.js +648 -555
  17. package/dist/chart/accessibleChart/accessibleChartTable.js +245 -86
  18. package/dist/chart/chart.js +36 -21
  19. package/dist/chart/chartAxis/chartAxis.js +85 -7
  20. package/dist/checkboxListWithAction/checkboxListWithAction.js +224 -69
  21. package/dist/chip/chip.js +195 -91
  22. package/dist/columnsSelector/columnsSelector.js +97 -12
  23. package/dist/columnsSelector/columnsTab/columnsTab.js +59 -15
  24. package/dist/columnsSelector/columnsTabGroup/columnsTabGroup.js +81 -34
  25. package/dist/comboboxSelected/comboboxSelected.js +1 -3
  26. package/dist/dataFeed/feedExpandControl/feedExpandControl.js +25 -10
  27. package/dist/dataGrid/columns/checkboxColumn/checkboxHeaderCell.js +92 -11
  28. package/dist/dataGrid/dataGrid.js +227 -117
  29. package/dist/dataGrid/emptySearchList/emptySearchList.js +56 -9
  30. package/dist/dataGrid/entitiesListActions/actions/columnsListButton.js +51 -7
  31. package/dist/dataGrid/entitiesListActions/actions/fullscreenButton.js +64 -18
  32. package/dist/dataGrid/withFlexibleColumns/components/columnSettings.js +84 -10
  33. package/dist/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +48 -16
  34. package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +223 -32
  35. package/dist/dataGrid/withSelectableRows/withSelectableRows.js +286 -213
  36. package/dist/dataGrid/withSortableColumns/columns/sortableColumnWrapper.js +178 -95
  37. package/dist/dateInputInner/dateInputInner.js +791 -476
  38. package/dist/dateInputInner/dateInputInnerControlBlock.js +125 -22
  39. package/dist/dateInputRaw/dateInputRaw.js +315 -104
  40. package/dist/dateInputRaw/utils/getLabel.js +38 -7
  41. package/dist/dateRangeInner/dateRangeInner.js +173 -59
  42. package/dist/dateRangeRaw/dateRangeRaw.js +601 -239
  43. package/dist/dateRangeRaw/utils/dateRangeUtils.js +629 -241
  44. package/dist/dateSelectionWrapper/dateSelectionWrapper.js +152 -14
  45. package/dist/dialog/dialogContent.js +123 -40
  46. package/dist/dropdownRaw/dropdownHelper.d.ts +2 -2
  47. package/dist/dropdownRaw/dropdownHelper.js +9 -9
  48. package/dist/dropdownRaw/dropdownList.js +447 -78
  49. package/dist/dropdownRaw/dropdownPopup.js +218 -20
  50. package/dist/dropdownRaw/dropdownRaw.js +866 -506
  51. package/dist/dropdownRaw/dropdownSearchableTrigger.js +223 -46
  52. package/dist/dropdownRaw/stateReducer/stateAction.d.ts +5 -1
  53. package/dist/dropdownRaw/stateReducer/stateActionType.d.ts +2 -1
  54. package/dist/dropdownRaw/stateReducer/stateActionType.js +1 -0
  55. package/dist/dropdownRaw/stateReducer/stateReducer.d.ts +6 -1
  56. package/dist/dropdownRaw/stateReducer/stateReducer.js +24 -12
  57. package/dist/dropdownRaw/stateReducer/stateReducerHelper.d.ts +2 -0
  58. package/dist/dropdownRaw/stateReducer/stateReducerHelper.js +20 -1
  59. package/dist/dropdownRaw/stateReducer/stateReducerTestData.d.ts +39 -0
  60. package/dist/dropdownRaw/stateReducer/stateReducerTestData.js +74 -0
  61. package/dist/dropdownRaw/types.d.ts +1 -0
  62. package/dist/favoriteButton/favoriteButton.js +59 -10
  63. package/dist/filters/components/filtersContainer.js +151 -64
  64. package/dist/filters/components/filtersEmptySelectedList.js +30 -4
  65. package/dist/filters/components/filtersSaveModal.js +140 -42
  66. package/dist/filters/components/filtersSavedChipComponent.js +318 -108
  67. package/dist/filters/components/filtersSearchItemData.js +127 -47
  68. package/dist/filters/components/filtersSearchList.js +381 -179
  69. package/dist/filters/components/filtersSelect.js +128 -61
  70. package/dist/filters/components/filtersSelectListItem.js +125 -13
  71. package/dist/filters/components/filtersSidePanel.js +510 -178
  72. package/dist/filters/components/filtersSidePanelDropdown.js +2 -2
  73. package/dist/filters/filters.js +445 -268
  74. package/dist/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +729 -272
  75. package/dist/filtersBar/components/resetComponentButton.js +45 -5
  76. package/dist/filtersBar/filtersBarActions/filtersBarActions.js +126 -15
  77. package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRadioGroup/filtersBarSidePanelRadioGroup.js +2 -2
  78. package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +155 -49
  79. package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +360 -104
  80. package/dist/filtersBar/filtersContainer/filtersContainer.js +204 -134
  81. package/dist/formField/components/formFieldWithLabel.d.ts +2 -1
  82. package/dist/formField/components/formFieldWithLabel.js +3 -2
  83. package/dist/formField/components/formFieldWithoutLabel.d.ts +2 -1
  84. package/dist/formField/components/formFieldWithoutLabel.js +3 -3
  85. package/dist/formField/components/trailingComponent.d.ts +8 -0
  86. package/dist/formField/components/trailingComponent.js +11 -0
  87. package/dist/formField/formField.js +26 -11
  88. package/dist/formField/hooks/useError.js +100 -36
  89. package/dist/formGroup/components/reviewListToggle/reviewListToggle.js +72 -7
  90. package/dist/formGroup/hooks/useToggle.js +37 -11
  91. package/dist/formGroup/utils/getControls.js +8 -7
  92. package/dist/formLayout/hooks/useError.js +55 -15
  93. package/dist/formLayout/hooks/useFormButtons.js +128 -27
  94. package/dist/formSection/components/formSectionModal.js +1 -1
  95. package/dist/formSection/formSection.js +1 -1
  96. package/dist/formSection/hooks/useError.js +70 -22
  97. package/dist/formStepper/components/formStep.js +65 -10
  98. package/dist/formStepper/formStepper.js +129 -33
  99. package/dist/formStepperButtons/formStepperButtons.js +184 -38
  100. package/dist/groupsFilter/groupsHelper.d.ts +1 -1
  101. package/dist/groupsFilterRaw/groupsFilterAdjustmentState.js +162 -17
  102. package/dist/groupsFilterRaw/groupsFilterBox.js +137 -32
  103. package/dist/groupsFilterRaw/groupsFilterCommon.js +75 -8
  104. package/dist/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +184 -25
  105. package/dist/groupsFilterRaw/groupsFilterHelper.d.ts +2 -1
  106. package/dist/groupsFilterRaw/groupsFilterHelper.js +284 -168
  107. package/dist/groupsFilterRaw/groupsFilterInitialState.js +266 -18
  108. package/dist/groupsFilterRaw/groupsFilterMenu.js +124 -9
  109. package/dist/groupsFilterRaw/groupsFilterRaw.d.ts +1 -0
  110. package/dist/groupsFilterRaw/groupsFilterRaw.js +816 -308
  111. package/dist/groupsFilterRaw/groupsFilterTestData.d.ts +155 -2
  112. package/dist/groupsFilterRaw/groupsFilterTestData.js +153 -58
  113. package/dist/groupsFilterRaw/groupsFilterTrigger.js +139 -35
  114. package/dist/groupsFilterRaw/groupsHelper.js +739 -208
  115. package/dist/groupsFilterRaw/stateReducer/stateReducerHelper.js +3 -1
  116. package/dist/groupsFilterRaw/types.d.ts +1 -0
  117. package/dist/header/components/collapsedItemsControl/collapsedItemsControl.js +107 -52
  118. package/dist/header/components/mobileFilterControl/mobileFilterControl.js +62 -9
  119. package/dist/header/components/mobileSearchControl/mobileSearchControl.js +119 -14
  120. package/dist/header/headerBack.js +64 -20
  121. package/dist/index.css +116 -74
  122. package/dist/index.d.ts +1 -0
  123. package/dist/index.js +4 -1
  124. package/dist/list/itemData/itemDataInternal.js +216 -51
  125. package/dist/list/listItem/listItem.js +168 -55
  126. package/dist/menu/components/menuErrorItem.js +33 -5
  127. package/dist/mobileSheet/mobileSheet.js +195 -69
  128. package/dist/modal/modal.js +300 -142
  129. package/dist/nav/nav.js +1 -1
  130. package/dist/nav/navFooter/navFooter.js +82 -39
  131. package/dist/nav/navFooter/navFooterAction/navFooterAction.js +52 -13
  132. package/dist/nav/navHeader/navHeader.js +86 -36
  133. package/dist/nav/navHeader/navHeaderSearch/navHeaderSearch.js +88 -29
  134. package/dist/nav/navItem/navItem.d.ts +3 -3
  135. package/dist/nav/navItem/navItem.js +35 -33
  136. package/dist/nav/navMobileBar/navMobileBar.js +67 -21
  137. package/dist/notification/notification.js +124 -21
  138. package/dist/pagination/paginationArrow.js +81 -11
  139. package/dist/pagination/paginationText/paginationText.js +45 -11
  140. package/dist/pill/components/pillNonActionable/pillNonActionable.js +93 -24
  141. package/dist/pillBox/components/pillBoxItem.js +52 -9
  142. package/dist/pillBox/pillBox.js +121 -20
  143. package/dist/pillExpandable/pillExpandable.js +333 -139
  144. package/dist/rangeRaw/rangeRaw.js +486 -141
  145. package/dist/rangeRaw/utils/rangeHelper.js +209 -39
  146. package/dist/searchInputRaw/searchInputRaw.js +180 -65
  147. package/dist/skeleton/skeleton.js +51 -6
  148. package/dist/sortControl/sortControl.js +152 -42
  149. package/dist/stepperRaw/stepperRaw.js +116 -42
  150. package/dist/summary/summary.js +94 -8
  151. package/dist/table/actions/actionsMenu.js +171 -78
  152. package/dist/table/flexible/columnSettings.js +80 -10
  153. package/dist/table/flexible/columnsList.js +110 -43
  154. package/dist/table/flexible/columnsPopup.js +77 -20
  155. package/dist/table/nested/useNestedRows.js +167 -77
  156. package/dist/table/selectable/selectableHeader.js +180 -41
  157. package/dist/table/selectable/useSelectableRows.js +270 -191
  158. package/dist/table/sortable/sortableHeader.js +153 -75
  159. package/dist/tabs/tabs.js +227 -118
  160. package/dist/timePickerRaw/timePickerRaw.js +278 -58
  161. package/dist/toastRaw/toastRaw.js +138 -32
  162. package/dist/toggleButton/toggleButton.d.ts +0 -1
  163. package/dist/toggleButtonRaw/toggleButtonRaw.d.ts +1 -0
  164. package/dist/toggleButtonRaw/toggleButtonRaw.js +146 -40
  165. package/dist/utils/formatDate.js +1001 -117
  166. package/{esm/utils/localization/translations/cs-json.js → dist/utils/localization/translations/cs.json} +11 -12
  167. package/{esm/utils/localization/translations/da-DK-json.js → dist/utils/localization/translations/da-DK.json} +31 -23
  168. package/{esm/utils/localization/translations/de-json.js → dist/utils/localization/translations/de.json} +12 -13
  169. package/dist/utils/localization/translations/en.json +308 -0
  170. package/{esm/utils/localization/translations/es-json.js → dist/utils/localization/translations/es.json} +11 -12
  171. package/{esm/utils/localization/translations/fi-FI-json.js → dist/utils/localization/translations/fi-FI.json} +31 -23
  172. package/{esm/utils/localization/translations/fr-FR-json.js → dist/utils/localization/translations/fr-FR.json} +12 -12
  173. package/{esm/utils/localization/translations/fr-json.js → dist/utils/localization/translations/fr.json} +11 -12
  174. package/{esm/utils/localization/translations/hu-HU-json.js → dist/utils/localization/translations/hu-HU.json} +31 -23
  175. package/{esm/utils/localization/translations/id-json.js → dist/utils/localization/translations/id.json} +11 -13
  176. package/{esm/utils/localization/translations/it-json.js → dist/utils/localization/translations/it.json} +11 -12
  177. package/{esm/utils/localization/translations/ja-json.js → dist/utils/localization/translations/ja.json} +11 -12
  178. package/{esm/utils/localization/translations/ko-KR-json.js → dist/utils/localization/translations/ko-KR.json} +24 -23
  179. package/{esm/utils/localization/translations/ms-json.js → dist/utils/localization/translations/ms.json} +11 -12
  180. package/{esm/utils/localization/translations/nb-NO-json.js → dist/utils/localization/translations/nb-NO.json} +31 -23
  181. package/{esm/utils/localization/translations/nl-json.js → dist/utils/localization/translations/nl.json} +11 -12
  182. package/{esm/utils/localization/translations/pl-json.js → dist/utils/localization/translations/pl.json} +11 -12
  183. package/{esm/utils/localization/translations/pt-BR-json.js → dist/utils/localization/translations/pt-BR.json} +11 -12
  184. package/{esm/utils/localization/translations/sk-SK-json.js → dist/utils/localization/translations/sk-SK.json} +31 -23
  185. package/{esm/utils/localization/translations/sv-json.js → dist/utils/localization/translations/sv.json} +11 -12
  186. package/{esm/utils/localization/translations/th-json.js → dist/utils/localization/translations/th.json} +11 -12
  187. package/{esm/utils/localization/translations/tr-json.js → dist/utils/localization/translations/tr.json} +11 -12
  188. package/{esm/utils/localization/translations/zh-Hans-json.js → dist/utils/localization/translations/zh-Hans.json} +11 -12
  189. package/{esm/utils/localization/translations/zh-TW-json.js → dist/utils/localization/translations/zh-TW.json} +11 -23
  190. package/dist/utils/localization/translationsDictionary.d.ts +2 -0
  191. package/dist/utils/localization/translationsDictionary.js +63 -0
  192. package/dist/utils/localization/useLanguage.js +2 -74
  193. package/esm/advancedGroupsFilter/advancedGroupsFilter.js +130 -29
  194. package/esm/advancedGroupsFilter/advancedGroupsFilterForm.js +133 -33
  195. package/esm/advancedGroupsFilter/advancedGroupsFilterFormSection.js +317 -65
  196. package/esm/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.d.ts +0 -1
  197. package/esm/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +77 -8
  198. package/esm/alertRaw/alertRaw.js +165 -51
  199. package/esm/banner/bannerMultipLine.js +121 -20
  200. package/esm/banner/bannerSingleLine.js +100 -13
  201. package/esm/betaPill/betaPill.js +105 -19
  202. package/esm/bookmark/bookmark.js +89 -27
  203. package/esm/bulkEditControl/bulkEditControl.js +161 -33
  204. package/esm/calendar/calendar.js +937 -272
  205. package/esm/calendar/calendarUtils.js +151 -84
  206. package/esm/card/card.js +233 -101
  207. package/esm/chart/accessibleChart/accessibleChartNarrative.js +642 -554
  208. package/esm/chart/accessibleChart/accessibleChartTable.js +239 -85
  209. package/esm/chart/chart.js +30 -20
  210. package/esm/chart/chartAxis/chartAxis.js +79 -6
  211. package/esm/checkboxListWithAction/checkboxListWithAction.js +218 -68
  212. package/esm/chip/chip.js +189 -90
  213. package/esm/columnsSelector/columnsSelector.js +91 -11
  214. package/esm/columnsSelector/columnsTab/columnsTab.js +53 -14
  215. package/esm/columnsSelector/columnsTabGroup/columnsTabGroup.js +75 -33
  216. package/esm/comboboxSelected/comboboxSelected.js +1 -3
  217. package/esm/dataFeed/feedExpandControl/feedExpandControl.js +21 -9
  218. package/esm/dataGrid/columns/checkboxColumn/checkboxHeaderCell.js +86 -10
  219. package/esm/dataGrid/dataGrid.js +221 -116
  220. package/esm/dataGrid/emptySearchList/emptySearchList.js +50 -8
  221. package/esm/dataGrid/entitiesListActions/actions/columnsListButton.js +45 -6
  222. package/esm/dataGrid/entitiesListActions/actions/fullscreenButton.js +58 -17
  223. package/esm/dataGrid/withFlexibleColumns/components/columnSettings.js +78 -9
  224. package/esm/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +44 -15
  225. package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +217 -31
  226. package/esm/dataGrid/withSelectableRows/withSelectableRows.js +280 -212
  227. package/esm/dataGrid/withSortableColumns/columns/sortableColumnWrapper.js +172 -94
  228. package/esm/dateInputInner/dateInputInner.js +785 -475
  229. package/esm/dateInputInner/dateInputInnerControlBlock.js +119 -21
  230. package/esm/dateInputRaw/dateInputRaw.js +309 -103
  231. package/esm/dateInputRaw/utils/getLabel.js +32 -6
  232. package/esm/dateRangeInner/dateRangeInner.js +167 -58
  233. package/esm/dateRangeRaw/dateRangeRaw.js +595 -238
  234. package/esm/dateRangeRaw/utils/dateRangeUtils.js +622 -239
  235. package/esm/dateSelectionWrapper/dateSelectionWrapper.js +146 -13
  236. package/esm/dialog/dialogContent.js +117 -39
  237. package/esm/dropdownRaw/dropdownHelper.d.ts +2 -2
  238. package/esm/dropdownRaw/dropdownHelper.js +10 -10
  239. package/esm/dropdownRaw/dropdownList.js +412 -56
  240. package/esm/dropdownRaw/dropdownPopup.js +212 -19
  241. package/esm/dropdownRaw/dropdownRaw.js +862 -507
  242. package/esm/dropdownRaw/dropdownSearchableTrigger.js +217 -45
  243. package/esm/dropdownRaw/stateReducer/stateAction.d.ts +5 -1
  244. package/esm/dropdownRaw/stateReducer/stateActionType.d.ts +2 -1
  245. package/esm/dropdownRaw/stateReducer/stateActionType.js +1 -0
  246. package/esm/dropdownRaw/stateReducer/stateReducer.d.ts +6 -1
  247. package/esm/dropdownRaw/stateReducer/stateReducer.js +24 -12
  248. package/esm/dropdownRaw/stateReducer/stateReducerHelper.d.ts +2 -0
  249. package/esm/dropdownRaw/stateReducer/stateReducerHelper.js +18 -0
  250. package/esm/dropdownRaw/stateReducer/stateReducerTestData.d.ts +39 -0
  251. package/esm/dropdownRaw/stateReducer/stateReducerTestData.js +71 -0
  252. package/esm/dropdownRaw/types.d.ts +1 -0
  253. package/esm/favoriteButton/favoriteButton.js +53 -9
  254. package/esm/filters/components/filtersContainer.js +141 -61
  255. package/esm/filters/components/filtersEmptySelectedList.js +24 -3
  256. package/esm/filters/components/filtersSaveModal.js +134 -41
  257. package/esm/filters/components/filtersSavedChipComponent.js +312 -107
  258. package/esm/filters/components/filtersSearchItemData.js +121 -46
  259. package/esm/filters/components/filtersSearchList.js +375 -178
  260. package/esm/filters/components/filtersSelect.js +122 -60
  261. package/esm/filters/components/filtersSelectListItem.js +119 -12
  262. package/esm/filters/components/filtersSidePanel.js +504 -177
  263. package/esm/filters/components/filtersSidePanelDropdown.js +2 -2
  264. package/esm/filters/filters.js +435 -265
  265. package/esm/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +722 -270
  266. package/esm/filtersBar/components/resetComponentButton.js +39 -4
  267. package/esm/filtersBar/filtersBarActions/filtersBarActions.js +120 -14
  268. package/esm/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRadioGroup/filtersBarSidePanelRadioGroup.js +2 -2
  269. package/esm/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +149 -48
  270. package/esm/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +354 -103
  271. package/esm/filtersBar/filtersContainer/filtersContainer.js +198 -133
  272. package/esm/formField/components/formFieldWithLabel.d.ts +2 -1
  273. package/esm/formField/components/formFieldWithLabel.js +3 -2
  274. package/esm/formField/components/formFieldWithoutLabel.d.ts +2 -1
  275. package/esm/formField/components/formFieldWithoutLabel.js +3 -3
  276. package/esm/formField/components/trailingComponent.d.ts +8 -0
  277. package/esm/formField/components/trailingComponent.js +7 -0
  278. package/esm/formField/formField.js +27 -12
  279. package/esm/formField/hooks/useError.js +94 -35
  280. package/esm/formGroup/components/reviewListToggle/reviewListToggle.js +66 -6
  281. package/esm/formGroup/hooks/useToggle.js +31 -10
  282. package/esm/formGroup/utils/getControls.js +8 -7
  283. package/esm/formLayout/hooks/useError.js +49 -14
  284. package/esm/formLayout/hooks/useFormButtons.js +122 -26
  285. package/esm/formSection/components/formSectionModal.js +1 -1
  286. package/esm/formSection/formSection.js +1 -1
  287. package/esm/formSection/hooks/useError.js +64 -21
  288. package/esm/formStepper/components/formStep.js +59 -9
  289. package/esm/formStepper/formStepper.js +123 -32
  290. package/esm/formStepperButtons/formStepperButtons.js +178 -37
  291. package/esm/groupsFilter/groupsHelper.d.ts +1 -1
  292. package/esm/groupsFilterRaw/groupsFilterAdjustmentState.js +152 -14
  293. package/esm/groupsFilterRaw/groupsFilterBox.js +131 -31
  294. package/esm/groupsFilterRaw/groupsFilterCommon.js +69 -7
  295. package/esm/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +178 -24
  296. package/esm/groupsFilterRaw/groupsFilterHelper.d.ts +2 -1
  297. package/esm/groupsFilterRaw/groupsFilterHelper.js +279 -168
  298. package/esm/groupsFilterRaw/groupsFilterInitialState.js +260 -17
  299. package/esm/groupsFilterRaw/groupsFilterMenu.js +118 -8
  300. package/esm/groupsFilterRaw/groupsFilterRaw.d.ts +1 -0
  301. package/esm/groupsFilterRaw/groupsFilterRaw.js +811 -308
  302. package/esm/groupsFilterRaw/groupsFilterTestData.d.ts +155 -2
  303. package/esm/groupsFilterRaw/groupsFilterTestData.js +152 -57
  304. package/esm/groupsFilterRaw/groupsFilterTrigger.js +133 -34
  305. package/esm/groupsFilterRaw/groupsHelper.js +733 -207
  306. package/esm/groupsFilterRaw/stateReducer/stateReducerHelper.js +3 -1
  307. package/esm/groupsFilterRaw/types.d.ts +1 -0
  308. package/esm/header/components/collapsedItemsControl/collapsedItemsControl.js +101 -51
  309. package/esm/header/components/mobileFilterControl/mobileFilterControl.js +56 -8
  310. package/esm/header/components/mobileSearchControl/mobileSearchControl.js +113 -13
  311. package/esm/header/headerBack.js +58 -19
  312. package/esm/index.d.ts +1 -0
  313. package/esm/index.js +1 -0
  314. package/esm/list/itemData/itemDataInternal.js +210 -50
  315. package/esm/list/listItem/listItem.js +162 -54
  316. package/esm/menu/components/menuErrorItem.js +27 -4
  317. package/esm/mobileSheet/mobileSheet.js +189 -68
  318. package/esm/modal/modal.js +265 -120
  319. package/esm/nav/nav.js +1 -1
  320. package/esm/nav/navFooter/navFooter.js +76 -38
  321. package/esm/nav/navFooter/navFooterAction/navFooterAction.js +46 -12
  322. package/esm/nav/navHeader/navHeader.js +80 -35
  323. package/esm/nav/navHeader/navHeaderSearch/navHeaderSearch.js +82 -28
  324. package/esm/nav/navItem/navItem.d.ts +3 -3
  325. package/esm/nav/navItem/navItem.js +35 -33
  326. package/esm/nav/navMobileBar/navMobileBar.js +61 -20
  327. package/esm/notification/notification.js +114 -18
  328. package/esm/pagination/paginationArrow.js +75 -10
  329. package/esm/pagination/paginationText/paginationText.js +39 -10
  330. package/esm/pill/components/pillNonActionable/pillNonActionable.js +87 -23
  331. package/esm/pillBox/components/pillBoxItem.js +46 -8
  332. package/esm/pillBox/pillBox.js +115 -19
  333. package/esm/pillExpandable/pillExpandable.js +327 -138
  334. package/esm/rangeRaw/rangeRaw.js +480 -140
  335. package/esm/rangeRaw/utils/rangeHelper.js +203 -38
  336. package/esm/searchInputRaw/searchInputRaw.js +145 -43
  337. package/esm/skeleton/skeleton.js +45 -5
  338. package/esm/sortControl/sortControl.js +146 -41
  339. package/esm/stepperRaw/stepperRaw.js +112 -41
  340. package/esm/storybookHelpers/dataGridWithDifferentCellOptions/components/EntitiesListAction.js +178 -19
  341. package/esm/summary/summary.js +88 -7
  342. package/esm/table/actions/actionsMenu.js +165 -77
  343. package/esm/table/flexible/columnSettings.js +74 -9
  344. package/esm/table/flexible/columnsList.js +104 -42
  345. package/esm/table/flexible/columnsPopup.js +71 -19
  346. package/esm/table/nested/useNestedRows.js +161 -76
  347. package/esm/table/selectable/selectableHeader.js +174 -40
  348. package/esm/table/selectable/useSelectableRows.js +264 -190
  349. package/esm/table/sortable/sortableHeader.js +147 -74
  350. package/esm/tabs/tabs.js +221 -117
  351. package/esm/timePickerRaw/timePickerRaw.js +272 -57
  352. package/esm/toastRaw/toastRaw.js +132 -31
  353. package/esm/toggleButton/toggleButton.d.ts +0 -1
  354. package/esm/toggleButtonRaw/toggleButtonRaw.d.ts +1 -0
  355. package/esm/toggleButtonRaw/toggleButtonRaw.js +111 -18
  356. package/esm/utils/formatDate.js +995 -116
  357. package/{dist/utils/localization/translations/cs-json.js → esm/utils/localization/translations/cs.json} +11 -15
  358. package/{dist/utils/localization/translations/da-DK-json.js → esm/utils/localization/translations/da-DK.json} +31 -26
  359. package/{dist/utils/localization/translations/de-json.js → esm/utils/localization/translations/de.json} +12 -16
  360. package/esm/utils/localization/translations/en.json +308 -0
  361. package/{dist/utils/localization/translations/es-json.js → esm/utils/localization/translations/es.json} +11 -15
  362. package/{dist/utils/localization/translations/fi-FI-json.js → esm/utils/localization/translations/fi-FI.json} +31 -26
  363. package/{dist/utils/localization/translations/fr-FR-json.js → esm/utils/localization/translations/fr-FR.json} +12 -15
  364. package/{dist/utils/localization/translations/fr-json.js → esm/utils/localization/translations/fr.json} +11 -15
  365. package/{dist/utils/localization/translations/hu-HU-json.js → esm/utils/localization/translations/hu-HU.json} +31 -26
  366. package/{dist/utils/localization/translations/id-json.js → esm/utils/localization/translations/id.json} +11 -16
  367. package/{dist/utils/localization/translations/it-json.js → esm/utils/localization/translations/it.json} +11 -15
  368. package/{dist/utils/localization/translations/ja-json.js → esm/utils/localization/translations/ja.json} +11 -15
  369. package/{dist/utils/localization/translations/ko-KR-json.js → esm/utils/localization/translations/ko-KR.json} +24 -26
  370. package/{dist/utils/localization/translations/ms-json.js → esm/utils/localization/translations/ms.json} +11 -15
  371. package/{dist/utils/localization/translations/nb-NO-json.js → esm/utils/localization/translations/nb-NO.json} +31 -26
  372. package/{dist/utils/localization/translations/nl-json.js → esm/utils/localization/translations/nl.json} +11 -15
  373. package/{dist/utils/localization/translations/pl-json.js → esm/utils/localization/translations/pl.json} +11 -15
  374. package/{dist/utils/localization/translations/pt-BR-json.js → esm/utils/localization/translations/pt-BR.json} +11 -15
  375. package/{dist/utils/localization/translations/sk-SK-json.js → esm/utils/localization/translations/sk-SK.json} +31 -26
  376. package/{dist/utils/localization/translations/sv-json.js → esm/utils/localization/translations/sv.json} +11 -15
  377. package/{dist/utils/localization/translations/th-json.js → esm/utils/localization/translations/th.json} +11 -15
  378. package/{dist/utils/localization/translations/tr-json.js → esm/utils/localization/translations/tr.json} +11 -15
  379. package/{dist/utils/localization/translations/zh-Hans-json.js → esm/utils/localization/translations/zh-Hans.json} +11 -15
  380. package/{dist/utils/localization/translations/zh-TW-json.js → esm/utils/localization/translations/zh-TW.json} +11 -26
  381. package/esm/utils/localization/translationsDictionary.d.ts +2 -0
  382. package/esm/utils/localization/translationsDictionary.js +59 -0
  383. package/esm/utils/localization/useLanguage.js +1 -50
  384. package/package.json +19 -12
  385. package/dist/utils/localization/translations/cs-json.d.ts +0 -251
  386. package/dist/utils/localization/translations/da-DK-json.d.ts +0 -252
  387. package/dist/utils/localization/translations/de-json.d.ts +0 -251
  388. package/dist/utils/localization/translations/en-json.d.ts +0 -314
  389. package/dist/utils/localization/translations/en-json.js +0 -317
  390. package/dist/utils/localization/translations/es-json.d.ts +0 -251
  391. package/dist/utils/localization/translations/fi-FI-json.d.ts +0 -252
  392. package/dist/utils/localization/translations/fr-FR-json.d.ts +0 -250
  393. package/dist/utils/localization/translations/fr-json.d.ts +0 -251
  394. package/dist/utils/localization/translations/hu-HU-json.d.ts +0 -252
  395. package/dist/utils/localization/translations/id-json.d.ts +0 -252
  396. package/dist/utils/localization/translations/it-json.d.ts +0 -251
  397. package/dist/utils/localization/translations/ja-json.d.ts +0 -251
  398. package/dist/utils/localization/translations/ko-KR-json.d.ts +0 -258
  399. package/dist/utils/localization/translations/ms-json.d.ts +0 -251
  400. package/dist/utils/localization/translations/nb-NO-json.d.ts +0 -252
  401. package/dist/utils/localization/translations/nl-json.d.ts +0 -251
  402. package/dist/utils/localization/translations/pl-json.d.ts +0 -251
  403. package/dist/utils/localization/translations/pt-BR-json.d.ts +0 -251
  404. package/dist/utils/localization/translations/sk-SK-json.d.ts +0 -251
  405. package/dist/utils/localization/translations/sv-json.d.ts +0 -251
  406. package/dist/utils/localization/translations/th-json.d.ts +0 -251
  407. package/dist/utils/localization/translations/tr-json.d.ts +0 -251
  408. package/dist/utils/localization/translations/zh-Hans-json.d.ts +0 -251
  409. package/dist/utils/localization/translations/zh-TW-json.d.ts +0 -271
  410. package/esm/utils/localization/translations/cs-json.d.ts +0 -251
  411. package/esm/utils/localization/translations/da-DK-json.d.ts +0 -252
  412. package/esm/utils/localization/translations/de-json.d.ts +0 -251
  413. package/esm/utils/localization/translations/en-json.d.ts +0 -314
  414. package/esm/utils/localization/translations/en-json.js +0 -314
  415. package/esm/utils/localization/translations/es-json.d.ts +0 -251
  416. package/esm/utils/localization/translations/fi-FI-json.d.ts +0 -252
  417. package/esm/utils/localization/translations/fr-FR-json.d.ts +0 -250
  418. package/esm/utils/localization/translations/fr-json.d.ts +0 -251
  419. package/esm/utils/localization/translations/hu-HU-json.d.ts +0 -252
  420. package/esm/utils/localization/translations/id-json.d.ts +0 -252
  421. package/esm/utils/localization/translations/it-json.d.ts +0 -251
  422. package/esm/utils/localization/translations/ja-json.d.ts +0 -251
  423. package/esm/utils/localization/translations/ko-KR-json.d.ts +0 -258
  424. package/esm/utils/localization/translations/ms-json.d.ts +0 -251
  425. package/esm/utils/localization/translations/nb-NO-json.d.ts +0 -252
  426. package/esm/utils/localization/translations/nl-json.d.ts +0 -251
  427. package/esm/utils/localization/translations/pl-json.d.ts +0 -251
  428. package/esm/utils/localization/translations/pt-BR-json.d.ts +0 -251
  429. package/esm/utils/localization/translations/sk-SK-json.d.ts +0 -251
  430. package/esm/utils/localization/translations/sv-json.d.ts +0 -251
  431. package/esm/utils/localization/translations/th-json.d.ts +0 -251
  432. package/esm/utils/localization/translations/tr-json.d.ts +0 -251
  433. package/esm/utils/localization/translations/zh-Hans-json.d.ts +0 -251
  434. package/esm/utils/localization/translations/zh-TW-json.d.ts +0 -271
@@ -1,7 +1,37 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ const {
4
+ injectString
5
+ } = require("../utils/localization/translationsDictionary");
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
3
9
  exports.TRANSLATIONS = exports.DataGrid = exports.Footer = exports.EmptyList = exports.MIN_CELL_WIDTH = exports.VERTICAL_SCROLL_MODIFIER = exports.HORIZONTAL_SCROLL_MODIFIER = exports.DRAGGING_MODIFIER = exports.NOT_INTERACTIVE_MODIFIER = void 0;
4
10
  const jsx_runtime_1 = require("react/jsx-runtime");
11
+ injectString("cs", "Action", "Akce");
12
+ injectString("da-DK", "Action", "Handling");
13
+ injectString("de", "Action", "Aktion");
14
+ injectString("en", "Action", "Action");
15
+ injectString("es", "Action", "Acci\xF3n");
16
+ injectString("fi-FI", "Action", "Toiminto");
17
+ injectString("fr", "Action", "Action");
18
+ injectString("fr-FR", "Action", "Action");
19
+ injectString("hu-HU", "Action", "M\u0171velet");
20
+ injectString("id", "Action", "Tindakan");
21
+ injectString("it", "Action", "Azione");
22
+ injectString("ja", "Action", "\u30A2\u30AF\u30B7\u30E7\u30F3");
23
+ injectString("ko-KR", "Action", "\uC870\uCE58");
24
+ injectString("ms", "Action", "Tindakan");
25
+ injectString("nb-NO", "Action", "Handling");
26
+ injectString("nl", "Action", "Actie");
27
+ injectString("pl", "Action", "Dzia\u0142anie");
28
+ injectString("pt-BR", "Action", "A\xE7\xE3o");
29
+ injectString("sk-SK", "Action", "Akcia");
30
+ injectString("sv", "Action", "\xC5tg\xE4rd");
31
+ injectString("th", "Action", "\u0E01\u0E32\u0E23\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23");
32
+ injectString("tr", "Action", "Eylem");
33
+ injectString("zh-Hans", "Action", "\u64CD\u4F5C");
34
+ injectString("zh-TW", "Action", "\u52D5\u4F5C");
5
35
  const react_1 = require("react");
6
36
  const classNames_1 = require("../commonHelpers/classNames/classNames");
7
37
  const row_1 = require("./row/row");
@@ -18,128 +48,208 @@ exports.HORIZONTAL_SCROLL_MODIFIER = "zen-data-grid--horizontal-scroll";
18
48
  exports.VERTICAL_SCROLL_MODIFIER = "zen-data-grid--vertical-scroll";
19
49
  exports.MIN_CELL_WIDTH = 100;
20
50
  const renderHeaderWrappers = (wrappers, value) => wrappers.reduce((result, wrapper) => wrapper.renderHeader(result), value);
21
- const getColumnWidth = (defaultWidth) => Math.floor(Math.max(defaultWidth, exports.MIN_CELL_WIDTH));
22
- const EmptyList = ({ children }) => (0, jsx_runtime_1.jsx)("div", { className: "zen-data-grid__empty", children: children });
51
+ const getColumnWidth = defaultWidth => Math.floor(Math.max(defaultWidth, exports.MIN_CELL_WIDTH));
52
+ const EmptyList = ({
53
+ children
54
+ }) => (0, jsx_runtime_1.jsx)("div", {
55
+ className: "zen-data-grid__empty",
56
+ children: children
57
+ });
23
58
  exports.EmptyList = EmptyList;
24
- const Footer = ({ children }) => (0, jsx_runtime_1.jsx)("div", { className: "zen-data-grid__footer", children: children });
59
+ const Footer = ({
60
+ children
61
+ }) => (0, jsx_runtime_1.jsx)("div", {
62
+ className: "zen-data-grid__footer",
63
+ children: children
64
+ });
25
65
  exports.Footer = Footer;
26
66
  const FIRST_RENDERED_ROWS = 100;
27
- const DataGridInner = ({ entities, columns, className = "", description, emptyCellTitle, children, rowClassName, expandedRows, onExpandedChange }, ref) => {
28
- const { translate } = (0, useLanguage_1.useLanguage)();
29
- const emptyCellTitleValue = emptyCellTitle || translate("Action");
30
- // States
31
- const columnsList = (0, react_1.useMemo)(() => columns.map(toBasicColumn_1.toBasicColumn), [columns]);
32
- const initialVisibleRows = (0, react_1.useMemo)(() => entities.slice(0, FIRST_RENDERED_ROWS).map(r => r.id), [entities]);
33
- const [visibleRows, setVisibleRows] = (0, react_1.useState)(new Set(initialVisibleRows));
34
- const [horizontalScrollApplied, setHorizontalScrollApplied] = (0, react_1.useState)(false);
35
- const [verticalScrollApplied, setVerticalScrollApplied] = (0, react_1.useState)(false);
36
- // Refs
37
- const gridRef = (0, react_1.useRef)(null);
38
- const bodyRef = (0, react_1.useRef)(null);
39
- const lazyRenderTimerRef = (0, react_1.useRef)(0);
40
- const rowsMap = (0, react_1.useMemo)(() => new Map(entities.map(entity => [entity.id, entity])), [entities]);
41
- const emptyList = (0, react_1.useMemo)(() => react_1.Children.toArray(children).find(child => child.type === exports.EmptyList), [children]);
42
- const footer = (0, react_1.useMemo)(() => react_1.Children.toArray(children).find(child => child.type === exports.Footer), [children]);
43
- (0, react_1.useImperativeHandle)(ref, () => gridRef.current, []);
44
- const getVisibleRows = () => {
45
- if (!gridRef.current || !bodyRef.current) {
46
- return [];
47
- }
48
- const { top, bottom } = gridRef.current.getBoundingClientRect();
49
- return (0, findVisible_1.findVisibleRows)([...bodyRef.current.children], top, bottom);
67
+ const DataGridInner = ({
68
+ entities,
69
+ columns,
70
+ className = "",
71
+ description,
72
+ emptyCellTitle,
73
+ children,
74
+ rowClassName,
75
+ expandedRows,
76
+ onExpandedChange
77
+ }, ref) => {
78
+ const {
79
+ translate
80
+ } = (0, useLanguage_1.useLanguage)();
81
+ const emptyCellTitleValue = emptyCellTitle || translate("Action");
82
+ // States
83
+ const columnsList = (0, react_1.useMemo)(() => columns.map(toBasicColumn_1.toBasicColumn), [columns]);
84
+ const initialVisibleRows = (0, react_1.useMemo)(() => entities.slice(0, FIRST_RENDERED_ROWS).map(r => r.id), [entities]);
85
+ const [visibleRows, setVisibleRows] = (0, react_1.useState)(new Set(initialVisibleRows));
86
+ const [horizontalScrollApplied, setHorizontalScrollApplied] = (0, react_1.useState)(false);
87
+ const [verticalScrollApplied, setVerticalScrollApplied] = (0, react_1.useState)(false);
88
+ // Refs
89
+ const gridRef = (0, react_1.useRef)(null);
90
+ const bodyRef = (0, react_1.useRef)(null);
91
+ const lazyRenderTimerRef = (0, react_1.useRef)(0);
92
+ const rowsMap = (0, react_1.useMemo)(() => new Map(entities.map(entity => [entity.id, entity])), [entities]);
93
+ const emptyList = (0, react_1.useMemo)(() => react_1.Children.toArray(children).find(child => child.type === exports.EmptyList), [children]);
94
+ const footer = (0, react_1.useMemo)(() => react_1.Children.toArray(children).find(child => child.type === exports.Footer), [children]);
95
+ (0, react_1.useImperativeHandle)(ref, () => gridRef.current, []);
96
+ const getVisibleRows = () => {
97
+ if (!gridRef.current || !bodyRef.current) {
98
+ return [];
99
+ }
100
+ const {
101
+ top,
102
+ bottom
103
+ } = gridRef.current.getBoundingClientRect();
104
+ return (0, findVisible_1.findVisibleRows)([...bodyRef.current.children], top, bottom);
105
+ };
106
+ const scheduleVisibleChanges = (0, react_1.useCallback)(() => requestAnimationFrame(() => {
107
+ const visible = getVisibleRows();
108
+ const newVisibleRows = visible.filter(row => {
109
+ const id = row.dataset.rowId;
110
+ if (id === undefined) {
111
+ return false;
112
+ }
113
+ const entity = rowsMap.get(id);
114
+ if (entity === undefined) {
115
+ return false;
116
+ }
117
+ return row;
118
+ }).map(row => row.dataset.rowId);
119
+ const hasNewRows = newVisibleRows.some(id => !visibleRows.has(id));
120
+ if (hasNewRows) {
121
+ const newRowsSet = new Set(visibleRows);
122
+ newVisibleRows.forEach(row => newRowsSet.add(row));
123
+ setVisibleRows(newRowsSet);
124
+ }
125
+ }), [rowsMap, setVisibleRows, visibleRows]);
126
+ const scheduleLazyRender = (0, react_1.useCallback)(() => {
127
+ cancelAnimationFrame(lazyRenderTimerRef.current);
128
+ lazyRenderTimerRef.current = scheduleVisibleChanges();
129
+ }, [scheduleVisibleChanges]);
130
+ (0, react_1.useEffect)(() => {
131
+ const visible = new Set(entities.slice(0, FIRST_RENDERED_ROWS).map(r => r.id));
132
+ const currentlyVisibleRows = getVisibleRows();
133
+ currentlyVisibleRows.forEach(row => {
134
+ const id = row.dataset.rowId;
135
+ if (id) {
136
+ visible.add(id);
137
+ }
138
+ });
139
+ setVisibleRows(visible);
140
+ }, [entities]);
141
+ const listOfDefaultWidthColumns = (0, react_1.useMemo)(() => columnsList.map(column => column.meta.defaultWidth), [columnsList]);
142
+ const {
143
+ result: observerResult
144
+ } = (0, useResizeObserver_1.useResizeObserver)({
145
+ target: gridRef.current
146
+ });
147
+ const allocatedSpace = listOfDefaultWidthColumns.reduce((acc, width) => acc + (width === undefined ? 0 : getColumnWidth(width)), 0);
148
+ const unallocatedSpace = observerResult && observerResult.contentRect.width - allocatedSpace || 0;
149
+ const flexibleColumnsQty = listOfDefaultWidthColumns.filter(width => width === undefined).length;
150
+ const flexibleColumnWidth = getColumnWidth(unallocatedSpace / flexibleColumnsQty);
151
+ const updateScroll = (0, react_1.useCallback)(() => {
152
+ if (!gridRef.current) {
153
+ return;
154
+ }
155
+ const scrollLeft = gridRef.current.scrollLeft;
156
+ const scrollTop = gridRef.current.scrollTop;
157
+ if (horizontalScrollApplied !== scrollLeft > 0) {
158
+ setHorizontalScrollApplied(scrollLeft > 0);
159
+ }
160
+ if (verticalScrollApplied !== scrollTop > 0) {
161
+ setVerticalScrollApplied(scrollTop > 0);
162
+ }
163
+ }, [horizontalScrollApplied, setHorizontalScrollApplied, verticalScrollApplied, setVerticalScrollApplied]);
164
+ const handleScroll = (0, react_1.useCallback)(() => {
165
+ updateScroll();
166
+ scheduleLazyRender();
167
+ }, [updateScroll, scheduleLazyRender]);
168
+ const getCellParams = (0, react_1.useCallback)(columnIndex => {
169
+ const defaultWidth = listOfDefaultWidthColumns[columnIndex];
170
+ const limited = !!defaultWidth && defaultWidth > 0;
171
+ const isFirst = columnIndex === 0;
172
+ const isLast = columnIndex === listOfDefaultWidthColumns.length - 1;
173
+ // If the column is the last one or doesn't have a default width, it should be limited to the remaining space
174
+ const width = getColumnWidth(defaultWidth || flexibleColumnWidth);
175
+ return {
176
+ limited,
177
+ isFirst,
178
+ isLast,
179
+ width
50
180
  };
51
- const scheduleVisibleChanges = (0, react_1.useCallback)(() => requestAnimationFrame(() => {
52
- const visible = getVisibleRows();
53
- const newVisibleRows = visible.filter(row => {
54
- const id = row.dataset.rowId;
55
- if (id === undefined) {
56
- return false;
57
- }
58
- const entity = rowsMap.get(id);
59
- if (entity === undefined) {
60
- return false;
61
- }
62
- return row;
63
- }).map(row => row.dataset.rowId);
64
- const hasNewRows = newVisibleRows.some(id => !visibleRows.has(id));
65
- if (hasNewRows) {
66
- const newRowsSet = new Set(visibleRows);
67
- newVisibleRows.forEach(row => newRowsSet.add(row));
68
- setVisibleRows(newRowsSet);
69
- }
70
- }), [rowsMap, setVisibleRows, visibleRows]);
71
- const scheduleLazyRender = (0, react_1.useCallback)(() => {
72
- cancelAnimationFrame(lazyRenderTimerRef.current);
73
- lazyRenderTimerRef.current = scheduleVisibleChanges();
74
- }, [scheduleVisibleChanges]);
75
- (0, react_1.useEffect)(() => {
76
- const visible = new Set(entities.slice(0, FIRST_RENDERED_ROWS).map(r => r.id));
77
- const currentlyVisibleRows = getVisibleRows();
78
- currentlyVisibleRows.forEach(row => {
79
- const id = row.dataset.rowId;
80
- if (id) {
81
- visible.add(id);
82
- }
83
- });
84
- setVisibleRows(visible);
85
- }, [entities]);
86
- const listOfDefaultWidthColumns = (0, react_1.useMemo)(() => columnsList.map(column => column.meta.defaultWidth), [columnsList]);
87
- const { result: observerResult } = (0, useResizeObserver_1.useResizeObserver)({ target: gridRef.current });
88
- const allocatedSpace = listOfDefaultWidthColumns.reduce((acc, width) => acc + (width === undefined ? 0 : getColumnWidth(width)), 0);
89
- const unallocatedSpace = observerResult && (observerResult.contentRect.width - allocatedSpace) || 0;
90
- const flexibleColumnsQty = listOfDefaultWidthColumns.filter(width => width === undefined).length;
91
- const flexibleColumnWidth = getColumnWidth(unallocatedSpace / flexibleColumnsQty);
92
- const updateScroll = (0, react_1.useCallback)(() => {
93
- if (!gridRef.current) {
94
- return;
95
- }
96
- const scrollLeft = gridRef.current.scrollLeft;
97
- const scrollTop = gridRef.current.scrollTop;
98
- if (horizontalScrollApplied !== scrollLeft > 0) {
99
- setHorizontalScrollApplied(scrollLeft > 0);
100
- }
101
- if (verticalScrollApplied !== scrollTop > 0) {
102
- setVerticalScrollApplied(scrollTop > 0);
103
- }
104
- }, [horizontalScrollApplied, setHorizontalScrollApplied, verticalScrollApplied, setVerticalScrollApplied]);
105
- const handleScroll = (0, react_1.useCallback)(() => {
106
- updateScroll();
107
- scheduleLazyRender();
108
- }, [updateScroll, scheduleLazyRender]);
109
- const getCellParams = (0, react_1.useCallback)((columnIndex) => {
110
- const defaultWidth = listOfDefaultWidthColumns[columnIndex];
111
- const limited = !!defaultWidth && defaultWidth > 0;
112
- const isFirst = columnIndex === 0;
113
- const isLast = columnIndex === listOfDefaultWidthColumns.length - 1;
114
- // If the column is the last one or doesn't have a default width, it should be limited to the remaining space
115
- const width = getColumnWidth(defaultWidth || flexibleColumnWidth);
116
- return { limited, isFirst, isLast, width };
117
- }, [listOfDefaultWidthColumns, flexibleColumnWidth]);
118
- const renderHeaderCell = (0, react_1.useCallback)((column, columnIndex) => {
119
- var _a;
120
- const { isFirst, isLast, width } = getCellParams(columnIndex);
121
- const text = ((_a = column.columnComponent.renderHeader) === null || _a === void 0 ? void 0 : _a.bind(column.columnComponent)) ? column.columnComponent.renderHeader(column.title) : column.title;
122
- return (0, jsx_runtime_1.jsx)(headerCell_1.DataGridHeaderCell, { id: column.id, isFirst: isFirst, isLast: isLast, name: column.name, width: width, hidden: !text, children: (0, jsx_runtime_1.jsx)("div", { className: "zen-data-grid__header-cell-content", children: renderHeaderWrappers(column.wrappers, (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-data-grid-header", column.title ? "" : "zen-visually-hidden"]), children: column.title ? text : emptyCellTitleValue })) }) }, `header_${column.name}`);
123
- }, [getCellParams, emptyCellTitleValue]);
124
- const isTreeGrid = (0, react_1.useMemo)(() => !!entities.find(e => e.children && e.children.length > 0), [entities]);
125
- const renderRow = (0, react_1.useCallback)((entity, entityIndex, total) => (0, jsx_runtime_1.jsx)(row_1.DataGridRow, { id: entity.id, isLastRow: entityIndex === total - 1, columns: columnsList, entity: entity, visibleRows: visibleRows, flexibleColumnWidth: flexibleColumnWidth, className: (0, getRowClassName_1.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]);
126
- const body = (0, react_1.useMemo)(() => entities.map((entity, entityIndex) => renderRow(entity, entityIndex, entities.length)), [entities, renderRow]);
127
- const headerContent = (0, react_1.useMemo)(() => columnsList.map((column, index) => renderHeaderCell(column, index)), [columnsList, renderHeaderCell]);
128
- (0, useResize_1.useResize)(() => {
129
- handleScroll();
130
- }, true);
131
- const gridClasses = (0, classNames_1.classNames)([
132
- "zen-data-grid",
133
- className,
134
- horizontalScrollApplied ? exports.HORIZONTAL_SCROLL_MODIFIER : "",
135
- verticalScrollApplied ? exports.VERTICAL_SCROLL_MODIFIER : ""
136
- ]);
137
- return (0, jsx_runtime_1.jsx)("div", { className: "zen-data-grid-wrapper", children: (0, jsx_runtime_1.jsxs)("div", { className: gridClasses, ref: gridRef, onScroll: handleScroll, children: [(0, jsx_runtime_1.jsxs)("table", { className: "zen-data-grid__table", "aria-label": description, role: isTreeGrid ? "treegrid" : undefined, children: [(0, jsx_runtime_1.jsx)("thead", { className: "zen-data-grid__header", children: (0, jsx_runtime_1.jsx)("tr", { className: "zen-data-grid__header-row", children: headerContent }) }), (0, jsx_runtime_1.jsx)("tbody", { ref: bodyRef, children: body })] }), emptyList && entities.length === 0 ? emptyList : null, footer] }) });
181
+ }, [listOfDefaultWidthColumns, flexibleColumnWidth]);
182
+ const renderHeaderCell = (0, react_1.useCallback)((column, columnIndex) => {
183
+ var _a;
184
+ const {
185
+ isFirst,
186
+ isLast,
187
+ width
188
+ } = getCellParams(columnIndex);
189
+ const text = ((_a = column.columnComponent.renderHeader) === null || _a === void 0 ? void 0 : _a.bind(column.columnComponent)) ? column.columnComponent.renderHeader(column.title) : column.title;
190
+ return (0, jsx_runtime_1.jsx)(headerCell_1.DataGridHeaderCell, {
191
+ id: column.id,
192
+ isFirst: isFirst,
193
+ isLast: isLast,
194
+ name: column.name,
195
+ width: width,
196
+ hidden: !text,
197
+ children: (0, jsx_runtime_1.jsx)("div", {
198
+ className: "zen-data-grid__header-cell-content",
199
+ children: renderHeaderWrappers(column.wrappers, (0, jsx_runtime_1.jsx)("div", {
200
+ className: (0, classNames_1.classNames)(["zen-data-grid-header", column.title ? "" : "zen-visually-hidden"]),
201
+ children: column.title ? text : emptyCellTitleValue
202
+ }))
203
+ })
204
+ }, `header_${column.name}`);
205
+ }, [getCellParams, emptyCellTitleValue]);
206
+ const isTreeGrid = (0, react_1.useMemo)(() => !!entities.find(e => e.children && e.children.length > 0), [entities]);
207
+ const renderRow = (0, react_1.useCallback)((entity, entityIndex, total) => (0, jsx_runtime_1.jsx)(row_1.DataGridRow, {
208
+ id: entity.id,
209
+ isLastRow: entityIndex === total - 1,
210
+ columns: columnsList,
211
+ entity: entity,
212
+ visibleRows: visibleRows,
213
+ flexibleColumnWidth: flexibleColumnWidth,
214
+ className: (0, getRowClassName_1.getRowClassName)(rowClassName, entity),
215
+ expanded: expandedRows && expandedRows.indexOf(entity.id) > -1,
216
+ onExpandedChange: entity.children && entity.children.length > 0 ? isExpanded => onExpandedChange && onExpandedChange(entity.id, isExpanded) : undefined,
217
+ isTreeGrid: isTreeGrid,
218
+ ariaPosinset: entityIndex + 1,
219
+ ariaSetsize: total
220
+ }, entity.id), [columnsList, expandedRows, flexibleColumnWidth, onExpandedChange, rowClassName, visibleRows, isTreeGrid]);
221
+ const body = (0, react_1.useMemo)(() => entities.map((entity, entityIndex) => renderRow(entity, entityIndex, entities.length)), [entities, renderRow]);
222
+ const headerContent = (0, react_1.useMemo)(() => columnsList.map((column, index) => renderHeaderCell(column, index)), [columnsList, renderHeaderCell]);
223
+ (0, useResize_1.useResize)(() => {
224
+ handleScroll();
225
+ }, true);
226
+ const gridClasses = (0, classNames_1.classNames)(["zen-data-grid", className, horizontalScrollApplied ? exports.HORIZONTAL_SCROLL_MODIFIER : "", verticalScrollApplied ? exports.VERTICAL_SCROLL_MODIFIER : ""]);
227
+ return (0, jsx_runtime_1.jsx)("div", {
228
+ className: "zen-data-grid-wrapper",
229
+ children: (0, jsx_runtime_1.jsxs)("div", {
230
+ className: gridClasses,
231
+ ref: gridRef,
232
+ onScroll: handleScroll,
233
+ children: [(0, jsx_runtime_1.jsxs)("table", {
234
+ className: "zen-data-grid__table",
235
+ "aria-label": description,
236
+ role: isTreeGrid ? "treegrid" : undefined,
237
+ children: [(0, jsx_runtime_1.jsx)("thead", {
238
+ className: "zen-data-grid__header",
239
+ children: (0, jsx_runtime_1.jsx)("tr", {
240
+ className: "zen-data-grid__header-row",
241
+ children: headerContent
242
+ })
243
+ }), (0, jsx_runtime_1.jsx)("tbody", {
244
+ ref: bodyRef,
245
+ children: body
246
+ })]
247
+ }), emptyList && entities.length === 0 ? emptyList : null, footer]
248
+ })
249
+ });
138
250
  };
139
251
  const DataGrid = (0, react_1.forwardRef)(DataGridInner);
140
252
  exports.DataGrid = DataGrid;
141
253
  DataGrid.EmptyList = exports.EmptyList;
142
254
  DataGrid.Footer = exports.Footer;
143
- exports.TRANSLATIONS = [
144
- "Action"
145
- ];
255
+ exports.TRANSLATIONS = ["Action"];
@@ -1,17 +1,64 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ const {
4
+ injectString
5
+ } = require("../../utils/localization/translationsDictionary");
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
3
9
  exports.EmptySearchList = void 0;
4
10
  const jsx_runtime_1 = require("react/jsx-runtime");
5
11
  const classNames_1 = require("../../commonHelpers/classNames/classNames");
6
12
  const imageNothingFound_1 = require("../../images/imageNothingFound");
7
13
  const useLanguage_1 = require("../../utils/localization/useLanguage");
8
- const EmptySearchList = ({ className, children, description, image }) => {
9
- const { translate } = (0, useLanguage_1.useLanguage)();
10
- return (0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-empty-list-search", className || ""]), children: [image
11
- ? (0, jsx_runtime_1.jsx)("div", { className: "zen-empty-list-search__image", children: image })
12
- : (0, jsx_runtime_1.jsx)(imageNothingFound_1.ImageNothingFound, { className: "zen-empty-list-search__image" }), (0, jsx_runtime_1.jsx)("h2", { className: "zen-empty-list-search__header", children: children }), (0, jsx_runtime_1.jsx)("div", { className: "zen-empty-list-search__description", children: description || translate("Try adjusting your search or filter.") })] });
14
+ injectString("cs", "Try adjusting your search or filter.", "Zkuste upravit sv\xE9 vyhled\xE1v\xE1n\xED nebo filtr.");
15
+ injectString("da-DK", "Try adjusting your search or filter.", "Pr\xF8v at justere din s\xF8gning eller dit filter.");
16
+ injectString("de", "Try adjusting your search or filter.", "Versuchen Sie, die Suche oder Filter anzupassen.");
17
+ injectString("en", "Try adjusting your search or filter.", "Try adjusting your search or filter.");
18
+ injectString("es", "Try adjusting your search or filter.", "Pruebe ajustar la b\xFAsqueda o el filtro.");
19
+ injectString("fi-FI", "Try adjusting your search or filter.", "Yrit\xE4 s\xE4\xE4t\xE4\xE4 hakua tai suodatinta.");
20
+ injectString("fr", "Try adjusting your search or filter.", "Essayez d\u2019ajuster votre recherche ou votre filtre.");
21
+ injectString("fr-FR", "Try adjusting your search or filter.", "Essayez d\u2019ajuster votre recherche ou votre filtre.");
22
+ injectString("hu-HU", "Try adjusting your search or filter.", "Pr\xF3b\xE1ld meg m\xF3dos\xEDtani a keres\xE9st vagy a sz\u0171r\u0151t.");
23
+ injectString("id", "Try adjusting your search or filter.", "Coba sesuaikan pencarian atau filter Anda.");
24
+ injectString("it", "Try adjusting your search or filter.", "Provare a modificare la ricerca o a regolare i filtri.");
25
+ 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");
26
+ injectString("ko-KR", "Try adjusting your search or filter.", "\uAC80\uC0C9 \uB610\uB294 \uD544\uD130\uB97C \uC870\uC815\uD574 \uBCF4\uC2ED\uC2DC\uC624.");
27
+ injectString("ms", "Try adjusting your search or filter.", "Cuba laraskan carian atau penyaring anda.");
28
+ injectString("nb-NO", "Try adjusting your search or filter.", "Pr\xF8v \xE5 justere s\xF8ket eller filteret.");
29
+ injectString("nl", "Try adjusting your search or filter.", "Probeer uw zoekopdracht of filter aan te passen.");
30
+ injectString("pl", "Try adjusting your search or filter.", "Spr\xF3buj dostosowa\u0107 wyszukiwanie lub filtr.");
31
+ injectString("pt-BR", "Try adjusting your search or filter.", "Tente ajustar sua pesquisa ou filtro.");
32
+ injectString("sk-SK", "Try adjusting your search or filter.", "Sk\xFAs upravi\u0165 svoje vyh\u013Ead\xE1vanie alebo filter.");
33
+ injectString("sv", "Try adjusting your search or filter.", "Prova att justera s\xF6kningen eller filtret.");
34
+ 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");
35
+ injectString("tr", "Try adjusting your search or filter.", "Araman\u0131z\u0131 veya filtrenizi ayarlamay\u0131 deneyin.");
36
+ injectString("zh-Hans", "Try adjusting your search or filter.", "\u5C1D\u8BD5\u8C03\u6574\u60A8\u7684\u641C\u7D22\u6216\u7B5B\u9009\u6761\u4EF6\u3002");
37
+ injectString("zh-TW", "Try adjusting your search or filter.", "\u8ACB\u5617\u8A66\u8ABF\u6574\u60A8\u7684\u641C\u5C0B\u6216\u7BE9\u9078\u689D\u4EF6\u3002");
38
+ const EmptySearchList = ({
39
+ className,
40
+ children,
41
+ description,
42
+ image
43
+ }) => {
44
+ const {
45
+ translate
46
+ } = (0, useLanguage_1.useLanguage)();
47
+ return (0, jsx_runtime_1.jsxs)("div", {
48
+ className: (0, classNames_1.classNames)(["zen-empty-list-search", className || ""]),
49
+ children: [image ? (0, jsx_runtime_1.jsx)("div", {
50
+ className: "zen-empty-list-search__image",
51
+ children: image
52
+ }) : (0, jsx_runtime_1.jsx)(imageNothingFound_1.ImageNothingFound, {
53
+ className: "zen-empty-list-search__image"
54
+ }), (0, jsx_runtime_1.jsx)("h2", {
55
+ className: "zen-empty-list-search__header",
56
+ children: children
57
+ }), (0, jsx_runtime_1.jsx)("div", {
58
+ className: "zen-empty-list-search__description",
59
+ children: description || translate("Try adjusting your search or filter.")
60
+ })]
61
+ });
13
62
  };
14
63
  exports.EmptySearchList = EmptySearchList;
15
- exports.EmptySearchList.translations = [
16
- "Try adjusting your search or filter."
17
- ];
64
+ exports.EmptySearchList.translations = ["Try adjusting your search or filter."];
@@ -1,5 +1,11 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ const {
4
+ injectString
5
+ } = require("../../../utils/localization/translationsDictionary");
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
3
9
  exports.ColumnsListButton = void 0;
4
10
  const jsx_runtime_1 = require("react/jsx-runtime");
5
11
  const svgIconSize_1 = require("../../../svgIcon/svgIconSize");
@@ -7,10 +13,48 @@ const textIconButton_1 = require("../../../textIconButton/textIconButton");
7
13
  const buttonType_1 = require("../../../button/buttonType");
8
14
  const iconSettings3_1 = require("../../../icons/iconSettings3");
9
15
  const useLanguage_1 = require("../../../utils/localization/useLanguage");
10
- const ColumnsListButtonInner = ({ onClick, ref }) => {
11
- const { translate } = (0, useLanguage_1.useLanguage)();
12
- return (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, { ref: ref, icon: iconSettings3_1.IconSettings3, iconSize: svgIconSize_1.SvgIconSize.Large, iconPosition: textIconButton_1.ButtonIconPosition.Start, "aria-label": translate("Column Settings"), title: translate("Column Settings"), onClick: onClick, type: buttonType_1.ButtonType.TertiaryBlack });
16
+ injectString("cs", "Column Settings", "Nastaven\xED sloupc\u016F");
17
+ injectString("da-DK", "Column Settings", "Kolonneindstillinger");
18
+ injectString("de", "Column Settings", "Spalteneinstellungen");
19
+ injectString("en", "Column Settings", "Column Settings");
20
+ injectString("es", "Column Settings", "Configuraci\xF3n de columnas");
21
+ injectString("fi-FI", "Column Settings", "Sarakkeiden asetukset");
22
+ injectString("fr", "Column Settings", "Param\xE8tres des colonnes");
23
+ injectString("fr-FR", "Column Settings", "Param\xE8tres des colonnes");
24
+ injectString("hu-HU", "Column Settings", "Oszlopbe\xE1ll\xEDt\xE1sok");
25
+ injectString("id", "Column Settings", "Pengaturan Kolom");
26
+ injectString("it", "Column Settings", "Impostazioni colonna");
27
+ injectString("ja", "Column Settings", "\u5217\u306E\u8A2D\u5B9A");
28
+ injectString("ko-KR", "Column Settings", "\uC5F4 \uC124\uC815");
29
+ injectString("ms", "Column Settings", "Tetapan Lajur");
30
+ injectString("nb-NO", "Column Settings", "Kolonneinnstillinger");
31
+ injectString("nl", "Column Settings", "Kolominstellingen");
32
+ injectString("pl", "Column Settings", "Ustawienia kolumn");
33
+ injectString("pt-BR", "Column Settings", "Configura\xE7\xF5es da coluna");
34
+ injectString("sk-SK", "Column Settings", "Nastavenia st\u013Apcov");
35
+ injectString("sv", "Column Settings", "Kolumninst\xE4llningar");
36
+ injectString("th", "Column Settings", "\u0E01\u0E32\u0E23\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C");
37
+ injectString("tr", "Column Settings", "S\xFCtun Ayarlar\u0131");
38
+ injectString("zh-Hans", "Column Settings", "\u5217\u8BBE\u7F6E");
39
+ injectString("zh-TW", "Column Settings", "\u6B04\u8A2D\u5B9A");
40
+ const ColumnsListButtonInner = ({
41
+ onClick,
42
+ ref
43
+ }) => {
44
+ const {
45
+ translate
46
+ } = (0, useLanguage_1.useLanguage)();
47
+ return (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, {
48
+ ref: ref,
49
+ icon: iconSettings3_1.IconSettings3,
50
+ iconSize: svgIconSize_1.SvgIconSize.Large,
51
+ iconPosition: textIconButton_1.ButtonIconPosition.Start,
52
+ "aria-label": translate("Column Settings"),
53
+ title: translate("Column Settings"),
54
+ onClick: onClick,
55
+ type: buttonType_1.ButtonType.TertiaryBlack
56
+ });
13
57
  };
14
- exports.ColumnsListButton = Object.assign(ColumnsListButtonInner, { translations: [
15
- "Column Settings"
16
- ] });
58
+ exports.ColumnsListButton = Object.assign(ColumnsListButtonInner, {
59
+ translations: ["Column Settings"]
60
+ });
@@ -1,5 +1,11 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ const {
4
+ injectString
5
+ } = require("../../../utils/localization/translationsDictionary");
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
3
9
  exports.FullScreenButton = void 0;
4
10
  const jsx_runtime_1 = require("react/jsx-runtime");
5
11
  const textIconButton_1 = require("../../../textIconButton/textIconButton");
@@ -11,22 +17,62 @@ const iconMinimize_1 = require("../../../icons/iconMinimize");
11
17
  const layoutFullScreenElementProvider_1 = require("../../../layout/layoutFullScreenElementProvider");
12
18
  const layoutFullScreenProvider_1 = require("../../../layout/layoutFullScreenProvider");
13
19
  const react_1 = require("react");
14
- const FullScreenButton = ({ fullScreen, title, onClick }) => {
15
- const { translate } = (0, useLanguage_1.useLanguage)();
16
- const { fullScreenElement } = (0, layoutFullScreenProvider_1.useLayoutFullScreen)();
17
- const { elementId, setFullScreenElement } = (0, layoutFullScreenElementProvider_1.useLayoutFullScreenElement)();
18
- const getFullScreen = (0, react_1.useCallback)(() => fullScreen !== undefined ? fullScreen : fullScreenElement === elementId, [fullScreen, fullScreenElement, elementId]);
19
- const handleClick = (0, react_1.useCallback)(() => {
20
- const currentFullScreenValue = getFullScreen();
21
- if (onClick) {
22
- onClick(!currentFullScreenValue);
23
- return;
24
- }
25
- setFullScreenElement(currentFullScreenValue ? undefined : elementId);
26
- }, [getFullScreen, onClick, setFullScreenElement, elementId]);
27
- return (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, { icon: getFullScreen() ? iconMinimize_1.IconMinimize : iconExpand_1.IconExpand, iconPosition: textIconButton_1.ButtonIconPosition.Start, iconSize: svgIconSize_1.SvgIconSize.Large, title: title ? title : translate("Convert table to full screen"), type: buttonType_1.ButtonType.TertiaryBlack, onClick: handleClick });
20
+ injectString("cs", "Convert table to full screen", "Konvertovat tabulku do re\u017Eimu pln\xE9ho zobrazen\xED");
21
+ injectString("da-DK", "Convert table to full screen", "Konverter tabel til fuld sk\xE6rm");
22
+ injectString("de", "Convert table to full screen", "Tabelle in Vollbild umwandeln");
23
+ injectString("en", "Convert table to full screen", "Convert table to full screen");
24
+ injectString("es", "Convert table to full screen", "Convertir la tabla en pantalla completa");
25
+ injectString("fi-FI", "Convert table to full screen", "Muunna taulukko t\xE4yteen ruutuun");
26
+ injectString("fr", "Convert table to full screen", "Convertir le tableau en plein \xE9cran");
27
+ injectString("fr-FR", "Convert table to full screen", "Afficher le tableau en plein \xE9cran");
28
+ injectString("hu-HU", "Convert table to full screen", "Kapcsold teljes k\xE9perny\u0151re a t\xE1bl\xE1zatot.");
29
+ injectString("id", "Convert table to full screen", "Konversi tabel ke layar penuh");
30
+ injectString("it", "Convert table to full screen", "Convertire la tabella a schermo intero");
31
+ injectString("ja", "Convert table to full screen", "\u8868\u3092\u5168\u753B\u9762\u8868\u793A\u306B\u5909\u63DB");
32
+ injectString("ko-KR", "Convert table to full screen", "\uD45C\uB97C \uC804\uCCB4 \uD654\uBA74\uC73C\uB85C \uBCC0\uD658");
33
+ injectString("ms", "Convert table to full screen", "Tukarkan jadual kepada skrin penuh");
34
+ injectString("nb-NO", "Convert table to full screen", "Konverter tabellen til full skjerm");
35
+ injectString("nl", "Convert table to full screen", "Tabel converteren naar volledig scherm");
36
+ injectString("pl", "Convert table to full screen", "Konwertuj tabel\u0119 na pe\u0142ny ekran");
37
+ injectString("pt-BR", "Convert table to full screen", "Converter tabela para tela cheia");
38
+ injectString("sk-SK", "Convert table to full screen", "Previes\u0165 tabu\u013Eku na cel\xFA obrazovku");
39
+ injectString("sv", "Convert table to full screen", "Konvertera tabell till helsk\xE4rm");
40
+ 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");
41
+ injectString("tr", "Convert table to full screen", "Tabloyu tam ekrana d\xF6n\xFC\u015Ft\xFCr");
42
+ injectString("zh-Hans", "Convert table to full screen", "\u5C06\u8868\u683C\u8F6C\u6362\u4E3A\u5168\u5C4F");
43
+ injectString("zh-TW", "Convert table to full screen", "\u5C07\u8868\u683C\u8F49\u63DB\u70BA\u5168\u87A2\u5E55\u986F\u793A");
44
+ const FullScreenButton = ({
45
+ fullScreen,
46
+ title,
47
+ onClick
48
+ }) => {
49
+ const {
50
+ translate
51
+ } = (0, useLanguage_1.useLanguage)();
52
+ const {
53
+ fullScreenElement
54
+ } = (0, layoutFullScreenProvider_1.useLayoutFullScreen)();
55
+ const {
56
+ elementId,
57
+ setFullScreenElement
58
+ } = (0, layoutFullScreenElementProvider_1.useLayoutFullScreenElement)();
59
+ const getFullScreen = (0, react_1.useCallback)(() => fullScreen !== undefined ? fullScreen : fullScreenElement === elementId, [fullScreen, fullScreenElement, elementId]);
60
+ const handleClick = (0, react_1.useCallback)(() => {
61
+ const currentFullScreenValue = getFullScreen();
62
+ if (onClick) {
63
+ onClick(!currentFullScreenValue);
64
+ return;
65
+ }
66
+ setFullScreenElement(currentFullScreenValue ? undefined : elementId);
67
+ }, [getFullScreen, onClick, setFullScreenElement, elementId]);
68
+ return (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, {
69
+ icon: getFullScreen() ? iconMinimize_1.IconMinimize : iconExpand_1.IconExpand,
70
+ iconPosition: textIconButton_1.ButtonIconPosition.Start,
71
+ iconSize: svgIconSize_1.SvgIconSize.Large,
72
+ title: title ? title : translate("Convert table to full screen"),
73
+ type: buttonType_1.ButtonType.TertiaryBlack,
74
+ onClick: handleClick
75
+ });
28
76
  };
29
77
  exports.FullScreenButton = FullScreenButton;
30
- exports.FullScreenButton.translations = [
31
- "Convert table to full screen"
32
- ];
78
+ exports.FullScreenButton.translations = ["Convert table to full screen"];