@geotab/zenith 3.16.0-beta.1 → 3.16.0-beta.3

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 (383) hide show
  1. package/README.md +17 -10
  2. package/dist/absolute/absolute.js +1 -1
  3. package/dist/advancedGroupsFilter/advancedGroupsFilter.js +3 -3
  4. package/dist/advancedGroupsFilter/advancedGroupsFilterForm.js +2 -2
  5. package/dist/advancedGroupsFilter/advancedGroupsFilterFormSection.js +7 -7
  6. package/dist/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +1 -1
  7. package/dist/alertRaw/alertRaw.js +1 -1
  8. package/dist/banner/bannerMultipLine.js +1 -1
  9. package/dist/banner/bannerSingleLine.js +1 -1
  10. package/dist/banner/utils/useSummaryBannerProp.js +1 -1
  11. package/dist/betaPill/betaPill.js +4 -4
  12. package/dist/bookmark/bookmark.js +2 -2
  13. package/dist/bulkEditControl/bulkEditControl.js +5 -5
  14. package/dist/calendar/calendar.js +30 -30
  15. package/dist/calendar/calendarUtils.js +6 -6
  16. package/dist/card/card.js +1 -1
  17. package/dist/chart/accessibleChart/accessibleChartNarrative.js +13 -13
  18. package/dist/chart/accessibleChart/accessibleChartTable.js +5 -5
  19. package/dist/chart/accessibleChart/generatePieNarrative.js +6 -6
  20. package/dist/chart/barChart.js +1 -1
  21. package/dist/chart/chart.js +1 -1
  22. package/dist/chart/chartAxis/chartAxis.js +2 -2
  23. package/dist/chart/lineChart.js +1 -1
  24. package/dist/chart/pieChart.js +1 -1
  25. package/dist/chart/plugins/linePlugin/getInterpolatedValue.d.ts +2 -2
  26. package/dist/chart/plugins/linePlugin/getInterpolatedValue.js +3 -2
  27. package/dist/chart/plugins/linePlugin/linePlugin.js +2 -1
  28. package/dist/chart/utils/getFormattedLabel.js +5 -1
  29. package/dist/checkbox/checkbox.d.ts +2 -1
  30. package/dist/checkbox/checkbox.js +2 -2
  31. package/dist/checkboxListWithAction/checkboxListWithAction.js +5 -4
  32. package/dist/chip/chip.js +1 -1
  33. package/dist/columnsSelector/columnsSelector.js +2 -2
  34. package/dist/columnsSelector/columnsTab/columnsTab.js +1 -1
  35. package/dist/columnsSelector/columnsTabGroup/columnsTabGroup.js +1 -1
  36. package/dist/commonHelpers/hooks/useTrapFocus.d.ts +0 -9
  37. package/dist/commonHelpers/hooks/useTrapFocus.js +14 -66
  38. package/dist/controlledPopup/controlledPopup.d.ts +1 -1
  39. package/dist/controlledPopup/controlledPopup.js +17 -3
  40. package/dist/dataFeed/feedExpandControl/feedExpandControl.js +2 -2
  41. package/dist/dataGrid/columns/checkboxColumn/checkboxCell.d.ts +2 -1
  42. package/dist/dataGrid/columns/checkboxColumn/checkboxCell.js +1 -1
  43. package/dist/dataGrid/columns/checkboxColumn/checkboxColumnWrapper.d.ts +4 -2
  44. package/dist/dataGrid/columns/checkboxColumn/checkboxColumnWrapper.js +10 -1
  45. package/dist/dataGrid/columns/checkboxColumn/checkboxHeaderCell.js +1 -1
  46. package/dist/dataGrid/dataGrid.js +1 -1
  47. package/dist/dataGrid/emptySearchList/emptySearchList.js +1 -1
  48. package/dist/dataGrid/entitiesListActions/actions/columnsListButton.js +1 -1
  49. package/dist/dataGrid/entitiesListActions/actions/fullscreenButton.js +2 -2
  50. package/dist/dataGrid/row/row.js +3 -2
  51. package/dist/dataGrid/withFlexibleColumns/components/columnSettings.js +2 -2
  52. package/dist/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +1 -1
  53. package/dist/dataGrid/withFlexibleColumns/withFlexibleColumns.js +1 -1
  54. package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +5 -5
  55. package/dist/dataGrid/withSelectableRows/withSelectableRows.js +77 -16
  56. package/dist/dataGrid/withSortableColumns/columns/sortableColumnWrapper.js +2 -2
  57. package/dist/dateInputInner/dateInputInner.js +7 -7
  58. package/dist/dateInputInner/dateInputInnerControlBlock.js +2 -2
  59. package/dist/dateInputRaw/dateInputRaw.js +3 -3
  60. package/dist/dateInputRaw/utils/getLabel.js +2 -2
  61. package/dist/dateRangeInner/dateRangeInner.js +1 -1
  62. package/dist/dateRangeRaw/dateRangeRaw.js +10 -10
  63. package/dist/dateRangeRaw/utils/dateRangeUtils.js +17 -17
  64. package/dist/dateSelectionWrapper/dateSelectionWrapper.js +4 -4
  65. package/dist/dialog/dialogContent.js +1 -1
  66. package/dist/dropdown/dropdownTrigger.d.ts +1 -1
  67. package/dist/dropdownRaw/dropdownList.js +9 -9
  68. package/dist/dropdownRaw/dropdownPopup.js +3 -3
  69. package/dist/dropdownRaw/dropdownRaw.js +249 -3
  70. package/dist/dropdownRaw/dropdownSearchableTrigger.d.ts +2 -1
  71. package/dist/dropdownRaw/dropdownSearchableTrigger.js +8 -6
  72. package/dist/dropdownRaw/dropdownTrigger.d.ts +2 -1
  73. package/dist/dropdownRaw/dropdownTrigger.js +2 -2
  74. package/dist/dropdownRaw/types.d.ts +7 -0
  75. package/dist/favoriteButton/favoriteButton.js +1 -1
  76. package/dist/fileUpload/components/dropZoneContent.js +4 -4
  77. package/dist/fileUpload/components/templateDownloadSection.js +1 -1
  78. package/dist/fileUpload/components/uploadedFilesSection.js +2 -2
  79. package/dist/fileUpload/fileUpload.js +6 -6
  80. package/dist/filters/components/filtersContainer.js +3 -3
  81. package/dist/filters/components/filtersEmptyState.js +2 -2
  82. package/dist/filters/components/filtersSaveModal.js +5 -5
  83. package/dist/filters/components/filtersSavedChipComponent.js +11 -11
  84. package/dist/filters/components/filtersSearchItemData.js +1 -1
  85. package/dist/filters/components/filtersSearchList.js +9 -9
  86. package/dist/filters/components/filtersSelect.js +1 -1
  87. package/dist/filters/components/filtersSelectListItem.js +2 -2
  88. package/dist/filters/components/filtersSidePanel.js +8 -8
  89. package/dist/filters/filters.js +4 -3
  90. package/dist/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +18 -18
  91. package/dist/filtersBar/components/resetComponentButton.js +1 -1
  92. package/dist/filtersBar/filtersBarActions/filtersBarActions.js +4 -4
  93. package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +2 -2
  94. package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +5 -5
  95. package/dist/filtersBar/filtersContainer/filtersContainer.js +2 -2
  96. package/dist/formField/hooks/useError.js +3 -3
  97. package/dist/formGroup/components/reviewListToggle/reviewListToggle.js +2 -2
  98. package/dist/formGroup/hooks/useToggle.js +1 -1
  99. package/dist/formLayout/hooks/useError.js +3 -3
  100. package/dist/formLayout/hooks/useFormButtons.js +3 -3
  101. package/dist/formSection/hooks/useError.js +3 -3
  102. package/dist/formStepper/components/formStep.js +1 -1
  103. package/dist/formStepper/formStepper.js +2 -2
  104. package/dist/formStepperButtons/formStepperButtons.js +4 -4
  105. package/dist/groupsFilterRaw/groupsFilterAdjustmentState.js +4 -4
  106. package/dist/groupsFilterRaw/groupsFilterBox.js +3 -3
  107. package/dist/groupsFilterRaw/groupsFilterCommon.js +2 -2
  108. package/dist/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +5 -5
  109. package/dist/groupsFilterRaw/groupsFilterHelper.js +2 -2
  110. package/dist/groupsFilterRaw/groupsFilterInitialState.js +8 -8
  111. package/dist/groupsFilterRaw/groupsFilterMenu.js +3 -3
  112. package/dist/groupsFilterRaw/groupsFilterRaw.js +8 -8
  113. package/dist/groupsFilterRaw/groupsFilterTrigger.js +2 -2
  114. package/dist/groupsFilterRaw/groupsHelper.js +22 -22
  115. package/dist/header/components/collapsedItemsControl/collapsedItemsControl.js +1 -1
  116. package/dist/header/components/mobileFilterControl/mobileFilterControl.js +1 -1
  117. package/dist/header/components/mobileSearchControl/mobileSearchControl.js +3 -3
  118. package/dist/header/headerBack.js +1 -1
  119. package/dist/index.css +90 -84
  120. package/dist/index.d.ts +3 -0
  121. package/dist/index.js +8 -3
  122. package/dist/lineChart/lineChart.js +1 -1
  123. package/dist/lineChartMini/lineChartMini.js +1 -1
  124. package/dist/list/itemData/itemDataInternal.js +2 -2
  125. package/dist/list/listItem/listItem.js +2 -2
  126. package/dist/menu/components/menuErrorItem.js +2 -2
  127. package/dist/mobileSheet/mobileSheet.js +2 -2
  128. package/dist/modal/modal.js +1 -1
  129. package/dist/nav/navFooter/navEditFooter/navEditFooter.js +2 -2
  130. package/dist/nav/navFooter/navFooter.js +1 -1
  131. package/dist/nav/navFooter/navFooterAction/navFooterAction.js +1 -1
  132. package/dist/nav/navHeader/navHeader.js +2 -2
  133. package/dist/nav/navHeader/navHeaderSearch/navHeaderSearch.js +2 -2
  134. package/dist/nav/navMobileBar/navMobileBar.js +1 -1
  135. package/dist/notification/notification.js +1 -1
  136. package/dist/pagination/paginationArrow.js +2 -2
  137. package/dist/pagination/paginationText/paginationText.js +1 -1
  138. package/dist/pill/components/pillNonActionable/pillNonActionable.js +1 -1
  139. package/dist/pillBox/components/pillBoxItem.js +1 -1
  140. package/dist/pillBox/pillBox.js +3 -3
  141. package/dist/pillExpandable/pillExpandable.js +1 -1
  142. package/dist/pillExpandable/pillExpandableAlignments.js +65 -48
  143. package/dist/progressIndicator/progressIndicator.d.ts +4 -4
  144. package/dist/progressIndicator/progressIndicator.js +4 -4
  145. package/dist/rangeRaw/rangeRaw.js +7 -7
  146. package/dist/rangeRaw/utils/rangeHelper.js +7 -7
  147. package/dist/searchInputRaw/searchInputRaw.js +2 -2
  148. package/dist/selectList/selectList.js +2 -2
  149. package/dist/skeleton/skeleton.js +1 -1
  150. package/dist/sortControl/sortControl.js +5 -5
  151. package/dist/stepperRaw/stepperRaw.js +2 -2
  152. package/dist/summary/summary.js +2 -2
  153. package/dist/summaryTile/summaryTile.js +1 -1
  154. package/dist/table/actions/actionsMenu.js +2 -2
  155. package/dist/table/detailPanel/detailPanel.js +1 -1
  156. package/dist/table/detailPanel/detailPanelHeader.js +2 -2
  157. package/dist/table/flexible/columnSettings.js +2 -2
  158. package/dist/table/flexible/columnsPopup.js +1 -1
  159. package/dist/table/nested/useNestedRows.js +2 -2
  160. package/dist/table/selectable/interfaces.d.ts +9 -13
  161. package/dist/table/selectable/selectableHeader.js +5 -5
  162. package/dist/table/selectable/useDragSelection.d.ts +10 -0
  163. package/dist/table/selectable/useDragSelection.js +139 -0
  164. package/dist/table/selectable/useSelectableRows.d.ts +2 -2
  165. package/dist/table/selectable/useSelectableRows.js +61 -51
  166. package/dist/table/selectable/utils/calculateSelectionState.js +0 -35
  167. package/dist/table/selectable/utils/getDragSelectionRows.d.ts +15 -0
  168. package/dist/table/selectable/utils/getDragSelectionRows.js +28 -0
  169. package/dist/table/selectable/utils/getRangeIds.d.ts +2 -0
  170. package/dist/table/selectable/utils/getRangeIds.js +21 -0
  171. package/dist/table/selectable/utils/isRowChecked.js +1 -12
  172. package/dist/table/sortable/mobileSortControl.js +3 -3
  173. package/dist/table/sortable/sortableHeader.js +2 -2
  174. package/dist/table/table.d.ts +4 -0
  175. package/dist/table/table.js +11 -7
  176. package/dist/tabs/tabs.js +2 -2
  177. package/dist/tag/tag.d.ts +3 -2
  178. package/dist/tag/tag.js +3 -2
  179. package/dist/timePickerRaw/timePickerRaw.js +7 -7
  180. package/dist/toastRaw/toastRaw.js +1 -1
  181. package/dist/toggleButtonRaw/toggleButtonRaw.js +2 -2
  182. package/dist/tooltip/tooltip.js +5 -2
  183. package/dist/utils/formatDate.js +37 -37
  184. package/dist/utils/localization/flipAlignment.js +5 -1
  185. package/dist/utils/localization/getSupportedLanguage.d.ts +1 -1
  186. package/dist/utils/localization/getSupportedLanguage.js +8 -2
  187. package/dist/utils/localization/getTextDirection.js +1 -1
  188. package/dist/utils/localization/languageContext.d.ts +1 -1
  189. package/dist/utils/localization/translations/{ar.json → ar-001.json} +54 -53
  190. package/dist/utils/localization/translationsDictionary.js +1 -1
  191. package/dist/utils/localization/useRTLAlignment.d.ts +6 -0
  192. package/dist/utils/localization/useRTLAlignment.js +6 -0
  193. package/esm/absolute/absolute.js +1 -1
  194. package/esm/advancedGroupsFilter/advancedGroupsFilter.js +3 -3
  195. package/esm/advancedGroupsFilter/advancedGroupsFilterForm.js +2 -2
  196. package/esm/advancedGroupsFilter/advancedGroupsFilterFormSection.js +7 -7
  197. package/esm/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +1 -1
  198. package/esm/alertRaw/alertRaw.js +1 -1
  199. package/esm/banner/bannerMultipLine.js +1 -1
  200. package/esm/banner/bannerSingleLine.js +1 -1
  201. package/esm/banner/utils/useSummaryBannerProp.js +1 -1
  202. package/esm/betaPill/betaPill.js +4 -4
  203. package/esm/bookmark/bookmark.js +2 -2
  204. package/esm/bulkEditControl/bulkEditControl.js +5 -5
  205. package/esm/calendar/calendar.js +30 -30
  206. package/esm/calendar/calendarUtils.js +6 -6
  207. package/esm/card/card.js +1 -1
  208. package/esm/chart/accessibleChart/accessibleChartNarrative.js +13 -13
  209. package/esm/chart/accessibleChart/accessibleChartTable.js +5 -5
  210. package/esm/chart/accessibleChart/generatePieNarrative.js +6 -6
  211. package/esm/chart/barChart.js +1 -1
  212. package/esm/chart/chart.js +1 -1
  213. package/esm/chart/chartAxis/chartAxis.js +2 -2
  214. package/esm/chart/lineChart.js +1 -1
  215. package/esm/chart/pieChart.js +1 -1
  216. package/esm/chart/plugins/linePlugin/getInterpolatedValue.d.ts +2 -2
  217. package/esm/chart/plugins/linePlugin/getInterpolatedValue.js +3 -2
  218. package/esm/chart/plugins/linePlugin/linePlugin.js +2 -1
  219. package/esm/chart/utils/getFormattedLabel.js +5 -1
  220. package/esm/checkbox/checkbox.d.ts +2 -1
  221. package/esm/checkbox/checkbox.js +2 -2
  222. package/esm/checkboxListWithAction/checkboxListWithAction.js +5 -4
  223. package/esm/chip/chip.js +1 -1
  224. package/esm/columnsSelector/columnsSelector.js +2 -2
  225. package/esm/columnsSelector/columnsTab/columnsTab.js +1 -1
  226. package/esm/columnsSelector/columnsTabGroup/columnsTabGroup.js +1 -1
  227. package/esm/commonHelpers/hooks/useTrapFocus.d.ts +0 -9
  228. package/esm/commonHelpers/hooks/useTrapFocus.js +15 -67
  229. package/esm/controlledPopup/controlledPopup.d.ts +1 -1
  230. package/esm/controlledPopup/controlledPopup.js +17 -3
  231. package/esm/dataFeed/feedExpandControl/feedExpandControl.js +2 -2
  232. package/esm/dataGrid/columns/checkboxColumn/checkboxCell.d.ts +2 -1
  233. package/esm/dataGrid/columns/checkboxColumn/checkboxCell.js +1 -1
  234. package/esm/dataGrid/columns/checkboxColumn/checkboxColumnWrapper.d.ts +4 -2
  235. package/esm/dataGrid/columns/checkboxColumn/checkboxColumnWrapper.js +10 -1
  236. package/esm/dataGrid/columns/checkboxColumn/checkboxHeaderCell.js +1 -1
  237. package/esm/dataGrid/dataGrid.js +1 -1
  238. package/esm/dataGrid/emptySearchList/emptySearchList.js +1 -1
  239. package/esm/dataGrid/entitiesListActions/actions/columnsListButton.js +1 -1
  240. package/esm/dataGrid/entitiesListActions/actions/fullscreenButton.js +2 -2
  241. package/esm/dataGrid/row/row.js +3 -2
  242. package/esm/dataGrid/withFlexibleColumns/components/columnSettings.js +2 -2
  243. package/esm/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +1 -1
  244. package/esm/dataGrid/withFlexibleColumns/withFlexibleColumns.js +1 -1
  245. package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +5 -5
  246. package/esm/dataGrid/withSelectableRows/withSelectableRows.js +77 -16
  247. package/esm/dataGrid/withSortableColumns/columns/sortableColumnWrapper.js +2 -2
  248. package/esm/dateInputInner/dateInputInner.js +7 -7
  249. package/esm/dateInputInner/dateInputInnerControlBlock.js +2 -2
  250. package/esm/dateInputRaw/dateInputRaw.js +3 -3
  251. package/esm/dateInputRaw/utils/getLabel.js +2 -2
  252. package/esm/dateRangeInner/dateRangeInner.js +1 -1
  253. package/esm/dateRangeRaw/dateRangeRaw.js +10 -10
  254. package/esm/dateRangeRaw/utils/dateRangeUtils.js +17 -17
  255. package/esm/dateSelectionWrapper/dateSelectionWrapper.js +4 -4
  256. package/esm/dialog/dialogContent.js +1 -1
  257. package/esm/dropdown/dropdownTrigger.d.ts +1 -1
  258. package/esm/dropdownRaw/dropdownList.js +9 -9
  259. package/esm/dropdownRaw/dropdownPopup.js +3 -3
  260. package/esm/dropdownRaw/dropdownRaw.js +249 -3
  261. package/esm/dropdownRaw/dropdownSearchableTrigger.d.ts +2 -1
  262. package/esm/dropdownRaw/dropdownSearchableTrigger.js +8 -6
  263. package/esm/dropdownRaw/dropdownTrigger.d.ts +2 -1
  264. package/esm/dropdownRaw/dropdownTrigger.js +2 -2
  265. package/esm/dropdownRaw/types.d.ts +7 -0
  266. package/esm/favoriteButton/favoriteButton.js +1 -1
  267. package/esm/fileUpload/components/dropZoneContent.js +4 -4
  268. package/esm/fileUpload/components/templateDownloadSection.js +1 -1
  269. package/esm/fileUpload/components/uploadedFilesSection.js +2 -2
  270. package/esm/fileUpload/fileUpload.js +6 -6
  271. package/esm/filters/components/filtersContainer.js +3 -3
  272. package/esm/filters/components/filtersEmptyState.js +2 -2
  273. package/esm/filters/components/filtersSaveModal.js +5 -5
  274. package/esm/filters/components/filtersSavedChipComponent.js +11 -11
  275. package/esm/filters/components/filtersSearchItemData.js +1 -1
  276. package/esm/filters/components/filtersSearchList.js +9 -9
  277. package/esm/filters/components/filtersSelect.js +1 -1
  278. package/esm/filters/components/filtersSelectListItem.js +2 -2
  279. package/esm/filters/components/filtersSidePanel.js +8 -8
  280. package/esm/filters/filters.js +4 -3
  281. package/esm/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +18 -18
  282. package/esm/filtersBar/components/resetComponentButton.js +1 -1
  283. package/esm/filtersBar/filtersBarActions/filtersBarActions.js +4 -4
  284. package/esm/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +2 -2
  285. package/esm/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +5 -5
  286. package/esm/filtersBar/filtersContainer/filtersContainer.js +2 -2
  287. package/esm/formField/hooks/useError.js +3 -3
  288. package/esm/formGroup/components/reviewListToggle/reviewListToggle.js +2 -2
  289. package/esm/formGroup/hooks/useToggle.js +1 -1
  290. package/esm/formLayout/hooks/useError.js +3 -3
  291. package/esm/formLayout/hooks/useFormButtons.js +3 -3
  292. package/esm/formSection/hooks/useError.js +3 -3
  293. package/esm/formStepper/components/formStep.js +1 -1
  294. package/esm/formStepper/formStepper.js +2 -2
  295. package/esm/formStepperButtons/formStepperButtons.js +4 -4
  296. package/esm/groupsFilterRaw/groupsFilterAdjustmentState.js +4 -4
  297. package/esm/groupsFilterRaw/groupsFilterBox.js +3 -3
  298. package/esm/groupsFilterRaw/groupsFilterCommon.js +2 -2
  299. package/esm/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +5 -5
  300. package/esm/groupsFilterRaw/groupsFilterHelper.js +2 -2
  301. package/esm/groupsFilterRaw/groupsFilterInitialState.js +8 -8
  302. package/esm/groupsFilterRaw/groupsFilterMenu.js +3 -3
  303. package/esm/groupsFilterRaw/groupsFilterRaw.js +8 -8
  304. package/esm/groupsFilterRaw/groupsFilterTrigger.js +2 -2
  305. package/esm/groupsFilterRaw/groupsHelper.js +22 -22
  306. package/esm/header/components/collapsedItemsControl/collapsedItemsControl.js +1 -1
  307. package/esm/header/components/mobileFilterControl/mobileFilterControl.js +1 -1
  308. package/esm/header/components/mobileSearchControl/mobileSearchControl.js +3 -3
  309. package/esm/header/headerBack.js +1 -1
  310. package/esm/index.d.ts +3 -0
  311. package/esm/index.js +2 -0
  312. package/esm/lineChart/lineChart.js +1 -1
  313. package/esm/lineChartMini/lineChartMini.js +1 -1
  314. package/esm/list/itemData/itemDataInternal.js +2 -2
  315. package/esm/list/listItem/listItem.js +2 -2
  316. package/esm/menu/components/menuErrorItem.js +2 -2
  317. package/esm/mobileSheet/mobileSheet.js +2 -2
  318. package/esm/modal/modal.js +1 -1
  319. package/esm/nav/navFooter/navEditFooter/navEditFooter.js +2 -2
  320. package/esm/nav/navFooter/navFooter.js +1 -1
  321. package/esm/nav/navFooter/navFooterAction/navFooterAction.js +1 -1
  322. package/esm/nav/navHeader/navHeader.js +2 -2
  323. package/esm/nav/navHeader/navHeaderSearch/navHeaderSearch.js +2 -2
  324. package/esm/nav/navMobileBar/navMobileBar.js +1 -1
  325. package/esm/notification/notification.js +1 -1
  326. package/esm/pagination/paginationArrow.js +2 -2
  327. package/esm/pagination/paginationText/paginationText.js +1 -1
  328. package/esm/pill/components/pillNonActionable/pillNonActionable.js +1 -1
  329. package/esm/pillBox/components/pillBoxItem.js +1 -1
  330. package/esm/pillBox/pillBox.js +3 -3
  331. package/esm/pillExpandable/pillExpandable.js +1 -1
  332. package/esm/pillExpandable/pillExpandableAlignments.js +65 -48
  333. package/esm/progressIndicator/progressIndicator.d.ts +4 -4
  334. package/esm/progressIndicator/progressIndicator.js +4 -4
  335. package/esm/rangeRaw/rangeRaw.js +7 -7
  336. package/esm/rangeRaw/utils/rangeHelper.js +7 -7
  337. package/esm/searchInputRaw/searchInputRaw.js +2 -2
  338. package/esm/selectList/selectList.js +2 -2
  339. package/esm/skeleton/skeleton.js +1 -1
  340. package/esm/sortControl/sortControl.js +5 -5
  341. package/esm/stepperRaw/stepperRaw.js +2 -2
  342. package/esm/summary/summary.js +2 -2
  343. package/esm/summaryTile/summaryTile.js +1 -1
  344. package/esm/table/actions/actionsMenu.js +2 -2
  345. package/esm/table/detailPanel/detailPanel.js +1 -1
  346. package/esm/table/detailPanel/detailPanelHeader.js +2 -2
  347. package/esm/table/flexible/columnSettings.js +2 -2
  348. package/esm/table/flexible/columnsPopup.js +1 -1
  349. package/esm/table/nested/useNestedRows.js +2 -2
  350. package/esm/table/selectable/interfaces.d.ts +9 -13
  351. package/esm/table/selectable/selectableHeader.js +5 -5
  352. package/esm/table/selectable/useDragSelection.d.ts +10 -0
  353. package/esm/table/selectable/useDragSelection.js +135 -0
  354. package/esm/table/selectable/useSelectableRows.d.ts +2 -2
  355. package/esm/table/selectable/useSelectableRows.js +61 -51
  356. package/esm/table/selectable/utils/calculateSelectionState.js +0 -35
  357. package/esm/table/selectable/utils/getDragSelectionRows.d.ts +15 -0
  358. package/esm/table/selectable/utils/getDragSelectionRows.js +24 -0
  359. package/esm/table/selectable/utils/getRangeIds.d.ts +2 -0
  360. package/esm/table/selectable/utils/getRangeIds.js +17 -0
  361. package/esm/table/selectable/utils/isRowChecked.js +1 -12
  362. package/esm/table/sortable/mobileSortControl.js +3 -3
  363. package/esm/table/sortable/sortableHeader.js +2 -2
  364. package/esm/table/table.d.ts +4 -0
  365. package/esm/table/table.js +10 -6
  366. package/esm/tabs/tabs.js +2 -2
  367. package/esm/tag/tag.d.ts +3 -2
  368. package/esm/tag/tag.js +3 -2
  369. package/esm/timePickerRaw/timePickerRaw.js +7 -7
  370. package/esm/toastRaw/toastRaw.js +1 -1
  371. package/esm/toggleButtonRaw/toggleButtonRaw.js +2 -2
  372. package/esm/tooltip/tooltip.js +5 -2
  373. package/esm/utils/formatDate.js +37 -37
  374. package/esm/utils/localization/flipAlignment.js +5 -1
  375. package/esm/utils/localization/getSupportedLanguage.d.ts +1 -1
  376. package/esm/utils/localization/getSupportedLanguage.js +8 -2
  377. package/esm/utils/localization/getTextDirection.js +1 -1
  378. package/esm/utils/localization/languageContext.d.ts +1 -1
  379. package/esm/utils/localization/translations/{ar.json → ar-001.json} +54 -53
  380. package/esm/utils/localization/translationsDictionary.js +1 -1
  381. package/esm/utils/localization/useRTLAlignment.d.ts +6 -0
  382. package/esm/utils/localization/useRTLAlignment.js +6 -0
  383. package/package.json +1 -1
@@ -0,0 +1,10 @@
1
+ import { MouseEvent as ReactMouseEvent, RefObject } from "react";
2
+ import { IDragSelectionRow } from "./interfaces";
3
+ /**
4
+ * @param rows every checkbox row in render order, expanded nested rows included, so ranges can
5
+ * span nesting levels.
6
+ */
7
+ export declare const useDragSelection: (rows: IDragSelectionRow[], gridRef: RefObject<HTMLElement | null> | undefined, onBatchSelect: (rangeIds: string[], select: boolean, base: Set<string>) => void, getBaseSelection: () => Set<string>, isSelectable: (row: IDragSelectionRow) => boolean, isEnabled: boolean) => {
8
+ onCheckboxMouseDown: (id: string, checked: boolean, e: ReactMouseEvent) => void;
9
+ suppressNextChangeRef: RefObject<boolean>;
10
+ };
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useDragSelection = void 0;
4
+ const react_1 = require("react");
5
+ const zen_1 = require("../../utils/zen");
6
+ const getRangeIds_1 = require("./utils/getRangeIds");
7
+ const DRAG_CLASS = "zen-not-selectable";
8
+ /**
9
+ * @param rows every checkbox row in render order, expanded nested rows included, so ranges can
10
+ * span nesting levels.
11
+ */
12
+ const useDragSelection = (rows, gridRef, onBatchSelect, getBaseSelection, isSelectable, isEnabled) => {
13
+ const rowsRef = (0, react_1.useRef)(rows);
14
+ rowsRef.current = rows;
15
+ const getBaseSelectionRef = (0, react_1.useRef)(getBaseSelection);
16
+ getBaseSelectionRef.current = getBaseSelection;
17
+ const onBatchSelectRef = (0, react_1.useRef)(onBatchSelect);
18
+ onBatchSelectRef.current = onBatchSelect;
19
+ const isSelectableRef = (0, react_1.useRef)(isSelectable);
20
+ isSelectableRef.current = isSelectable;
21
+ const isEnabledRef = (0, react_1.useRef)(isEnabled);
22
+ isEnabledRef.current = isEnabled;
23
+ const anchorIdRef = (0, react_1.useRef)(null);
24
+ const anchorSelectRef = (0, react_1.useRef)(true);
25
+ const baseSelectedRef = (0, react_1.useRef)(new Set());
26
+ const isDraggingRef = (0, react_1.useRef)(false);
27
+ const movedRef = (0, react_1.useRef)(false);
28
+ const lastResultKeyRef = (0, react_1.useRef)("");
29
+ const lastPointRef = (0, react_1.useRef)(null);
30
+ const suppressNextChangeRef = (0, react_1.useRef)(false);
31
+ const attachedGridElementRef = (0, react_1.useRef)(null);
32
+ const emitRange = (0, react_1.useCallback)((currentId) => {
33
+ const anchorId = anchorIdRef.current;
34
+ if (anchorId === null) {
35
+ return;
36
+ }
37
+ const range = (0, getRangeIds_1.getRangeIds)(rowsRef.current, anchorId, currentId, isSelectableRef.current);
38
+ if (range.length === 0) {
39
+ return;
40
+ }
41
+ const select = anchorSelectRef.current;
42
+ const key = `${select}|${range.join(",")}`;
43
+ if (key === lastResultKeyRef.current) {
44
+ return;
45
+ }
46
+ lastResultKeyRef.current = key;
47
+ onBatchSelectRef.current(range, select, baseSelectedRef.current);
48
+ }, []);
49
+ const extend = (0, react_1.useCallback)((x, y) => {
50
+ var _a, _b;
51
+ lastPointRef.current = { x, y };
52
+ const row = (_b = (_a = zen_1.zen.document) === null || _a === void 0 ? void 0 : _a.elementFromPoint(x, y)) === null || _b === void 0 ? void 0 : _b.closest("[data-row-id]");
53
+ const currentId = row === null || row === void 0 ? void 0 : row.getAttribute("data-row-id");
54
+ if (!currentId) {
55
+ return;
56
+ }
57
+ if (currentId !== anchorIdRef.current) {
58
+ movedRef.current = true;
59
+ }
60
+ if (!movedRef.current) {
61
+ return;
62
+ }
63
+ emitRange(currentId);
64
+ }, [emitRange]);
65
+ const onMouseMove = (0, react_1.useCallback)((e) => {
66
+ extend(e.clientX, e.clientY);
67
+ }, [extend]);
68
+ const onScroll = (0, react_1.useCallback)(() => {
69
+ const point = lastPointRef.current;
70
+ if (point) {
71
+ extend(point.x, point.y);
72
+ }
73
+ }, [extend]);
74
+ const endDrag = (0, react_1.useCallback)(() => {
75
+ var _a, _b, _c, _d;
76
+ if (!isDraggingRef.current) {
77
+ return;
78
+ }
79
+ isDraggingRef.current = false;
80
+ if (movedRef.current) {
81
+ suppressNextChangeRef.current = true;
82
+ }
83
+ (_a = zen_1.zen.document) === null || _a === void 0 ? void 0 : _a.removeEventListener("mousemove", onMouseMove);
84
+ (_b = zen_1.zen.document) === null || _b === void 0 ? void 0 : _b.removeEventListener("mouseup", endDrag);
85
+ (_c = attachedGridElementRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener("scroll", onScroll);
86
+ (_d = attachedGridElementRef.current) === null || _d === void 0 ? void 0 : _d.classList.remove(DRAG_CLASS);
87
+ attachedGridElementRef.current = null;
88
+ }, [onMouseMove, onScroll]); // eslint-disable-line react-hooks/exhaustive-deps
89
+ const onCheckboxMouseDown = (0, react_1.useCallback)((id, checked, e) => {
90
+ var _a, _b, _c, _d, _e;
91
+ // Right-click between drag-end and the trailing click must not clear suppression.
92
+ if (e.button === 0) {
93
+ suppressNextChangeRef.current = false;
94
+ }
95
+ if (!isEnabledRef.current || e.button !== 0) {
96
+ return;
97
+ }
98
+ if (e.shiftKey && anchorIdRef.current !== null) {
99
+ e.preventDefault();
100
+ const anchorId = anchorIdRef.current;
101
+ const anchorInList = rowsRef.current.some(row => row.id === anchorId);
102
+ if (!anchorInList) {
103
+ // The anchor is no longer rendered (e.g. its parent was collapsed, or the list was
104
+ // re-filtered/paginated since). Drop the stale anchor and let the target row's own
105
+ // onChange fire normally, rather than swallowing it as a silent no-op.
106
+ anchorIdRef.current = null;
107
+ return;
108
+ }
109
+ // Gmail-style: every shift-click re-applies the range to the selection captured when
110
+ // the anchor was clicked, so moving the target closer to the anchor deselects the rows
111
+ // that dropped out of the range. Shift-clicking the anchor itself collapses the range
112
+ // to nothing, restoring that captured selection — the anchor included.
113
+ const range = id === anchorId ? [] : (0, getRangeIds_1.getRangeIds)(rowsRef.current, anchorId, id, isSelectableRef.current);
114
+ // Suppress even when the range is empty to prevent the anchor from double-toggling
115
+ // on a same-row shift-click.
116
+ suppressNextChangeRef.current = true;
117
+ onBatchSelectRef.current(range, anchorSelectRef.current, baseSelectedRef.current);
118
+ return;
119
+ }
120
+ anchorIdRef.current = id;
121
+ anchorSelectRef.current = !checked;
122
+ baseSelectedRef.current = getBaseSelectionRef.current();
123
+ isDraggingRef.current = true;
124
+ movedRef.current = false;
125
+ lastResultKeyRef.current = "";
126
+ lastPointRef.current = { x: e.clientX, y: e.clientY };
127
+ attachedGridElementRef.current = (_a = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) !== null && _a !== void 0 ? _a : null;
128
+ (_b = attachedGridElementRef.current) === null || _b === void 0 ? void 0 : _b.classList.add(DRAG_CLASS);
129
+ (_c = zen_1.zen.document) === null || _c === void 0 ? void 0 : _c.addEventListener("mousemove", onMouseMove);
130
+ (_d = zen_1.zen.document) === null || _d === void 0 ? void 0 : _d.addEventListener("mouseup", endDrag);
131
+ (_e = attachedGridElementRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener("scroll", onScroll);
132
+ }, [gridRef, onMouseMove, onScroll, endDrag]);
133
+ (0, react_1.useEffect)(() => {
134
+ anchorIdRef.current = null;
135
+ }, [rows]);
136
+ (0, react_1.useEffect)(() => endDrag, [endDrag]);
137
+ return { onCheckboxMouseDown, suppressNextChangeRef };
138
+ };
139
+ exports.useDragSelection = useDragSelection;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import { ReactNode, RefObject } from "react";
2
2
  import { IListColumn } from "../table";
3
3
  import { ISelectionValue, SelectionState } from "./interfaces";
4
4
  import "./selectableColumn.less";
@@ -33,7 +33,7 @@ export declare const getEmptySelection: () => {
33
33
  selected: string[];
34
34
  };
35
35
  export declare const SelectableWrapperName = "Selectable";
36
- export declare const useSelectableRows: <T extends IRowEntity<N>, N extends IEntityWithId>(columns: IListColumn<T, N>[], entities: T[], isMobile: boolean, selectMode: boolean, setSelectMode: (value: boolean) => void, selectable?: ISelectableRowsOptions<T, N>, isInfinite?: boolean) => {
36
+ export declare const useSelectableRows: <T extends IRowEntity<N>, N extends IEntityWithId>(columns: IListColumn<T, N>[], entities: T[], isMobile: boolean, selectMode: boolean, setSelectMode: (value: boolean) => void, selectable?: ISelectableRowsOptions<T, N>, isInfinite?: boolean, gridRef?: RefObject<HTMLElement | null>, expandedRows?: string[]) => {
37
37
  selectableColumns: IListColumn<T, N>[];
38
38
  selectableFeedWrapper: (primaryData: ReactNode, secondaryData: ReactNode, entity: T | N, isNested: boolean) => [ReactNode, ReactNode];
39
39
  };
@@ -38,7 +38,7 @@ injectString("tr", "Select all", "T\xFCm\xFCn\xFC se\xE7");
38
38
  injectString("zh-Hans", "Select all", "\u5168\u9009");
39
39
  injectString("zh-TW", "Select all", "\u5168\u9078");
40
40
  injectString("ro-RO", "Select all", "Selecta\u021Bi tot");
41
- injectString("ar", "Select all", "\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644");
41
+ injectString("ar-001", "Select all", "\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644");
42
42
  injectString("lt-LT", "Select all", "Pasirinkti visus");
43
43
  injectString("lv-LV", "Select all", "Atlas\u012Bt visus");
44
44
  injectString("ka-GE", "Select all", "\u10E7\u10D5\u10D4\u10DA\u10D0\u10E1 \u10D0\u10E0\u10E9\u10D4\u10D5\u10D0");
@@ -71,7 +71,7 @@ injectString("tr", "Deselect all", "T\xFCm\xFCn\xFCn se\xE7imini iptal et");
71
71
  injectString("zh-Hans", "Deselect all", "\u53D6\u6D88\u5168\u9009");
72
72
  injectString("zh-TW", "Deselect all", "\u53D6\u6D88\u5168\u9078");
73
73
  injectString("ro-RO", "Deselect all", "Deselecta\u021Bi tot");
74
- injectString("ar", "Deselect all", "\u0625\u0644\u063A\u0627\u0621 \u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644");
74
+ injectString("ar-001", "Deselect all", "\u0625\u0644\u063A\u0627\u0621 \u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644");
75
75
  injectString("lt-LT", "Deselect all", "At\u017Eym\u0117ti visus");
76
76
  injectString("lv-LV", "Deselect all", "Atcelt visas atlases");
77
77
  injectString("ka-GE", "Deselect all", "\u10E7\u10D5\u10D4\u10DA\u10D0\u10E1 \u10DB\u10DD\u10EE\u10E1\u10DC\u10D0");
@@ -84,6 +84,8 @@ const useLanguage_1 = require("../../utils/localization/useLanguage");
84
84
  const checkRow_1 = require("./utils/checkRow");
85
85
  const isRowChecked_1 = require("./utils/isRowChecked");
86
86
  const getCurrentPageSelection_1 = require("./utils/getCurrentPageSelection");
87
+ const useDragSelection_1 = require("./useDragSelection");
88
+ const getDragSelectionRows_1 = require("./utils/getDragSelectionRows");
87
89
  const getEmptySelection = () => ({
88
90
  all: false,
89
91
  selected: []
@@ -92,7 +94,7 @@ exports.getEmptySelection = getEmptySelection;
92
94
  exports.SelectableWrapperName = "Selectable";
93
95
  // Infinite scroll has no pages, so the header checkbox always means "select all" (never current page).
94
96
  const resolveCheckboxEmitsCurrentPage = (isInfinite, checkboxSelectsCurrentPage, turnOffSelectAll) => isInfinite ? false : checkboxSelectsCurrentPage !== null && checkboxSelectsCurrentPage !== void 0 ? checkboxSelectsCurrentPage : turnOffSelectAll;
95
- const useSelectableRows = (columns, entities, isMobile, selectMode, setSelectMode, selectable, isInfinite = false) => {
97
+ const useSelectableRows = (columns, entities, isMobile, selectMode, setSelectMode, selectable, isInfinite = false, gridRef, expandedRows) => {
96
98
  var _a;
97
99
  const {
98
100
  translate
@@ -142,30 +144,19 @@ const useSelectableRows = (columns, entities, isMobile, selectMode, setSelectMod
142
144
  }
143
145
  }, [checkboxDisabled, checkboxVisible, entities, selectable, setSelectMode, selectable === null || selectable === void 0 ? void 0 : selectable.strategy]);
144
146
  const getNewSelection = (0, react_1.useCallback)((id, checked) => {
145
- var _a;
146
- if ((_a = selectable === null || selectable === void 0 ? void 0 : selectable.selection) === null || _a === void 0 ? void 0 : _a.all) {
147
- // MYG-142234: `selections` holds the ids excluded from the "all" selection.
148
- // Toggling a row here must only ever add/remove that single id from the
149
- // exclusion set - it must never be rebuilt from `entities` (the current page),
150
- // otherwise every other page's rows would silently fall out of the selection.
151
- const excluded = new Set(selections);
152
- (0, checkRow_1.checkRow)(excluded, selectable, entities, id, !checked);
153
- return excluded;
147
+ if (state === interfaces_1.SelectionState.All) {
148
+ const newSelection = (0, getCurrentPageSelection_1.getCurrentPageSelection)(entities, selectable);
149
+ (0, checkRow_1.checkRow)(newSelection, selectable, entities, id, false);
150
+ return newSelection;
154
151
  }
155
152
  (0, checkRow_1.checkRow)(selections, selectable, entities, id, checked);
156
153
  return selections;
157
- }, [entities, selectable, selections]);
154
+ }, [state, entities, selectable, selections]);
158
155
  const onSelectListener = (0, react_1.useCallback)((id, checked) => {
159
156
  var _a;
160
- const wasAllSelected = ((_a = selectable === null || selectable === void 0 ? void 0 : selectable.selection) === null || _a === void 0 ? void 0 : _a.all) || false;
161
157
  const newSelection = getNewSelection(id, checked);
162
- const newState = (0, calculateSelectionState_1.calculateSelectionState)(entities, newSelection, wasAllSelected, checkboxVisible, checkboxDisabled, selectable === null || selectable === void 0 ? void 0 : selectable.strategy);
163
- // MYG-142234: once selection spans "all" pages, unchecking a row must keep `all: true`
164
- // and only record the exclusion - it must not collapse to the current page's ids.
165
- const newValue = wasAllSelected ? {
166
- selected: [...newSelection],
167
- all: true
168
- } : {
158
+ const newState = (0, calculateSelectionState_1.calculateSelectionState)(entities, newSelection, ((_a = selectable === null || selectable === void 0 ? void 0 : selectable.selection) === null || _a === void 0 ? void 0 : _a.all) || false, checkboxVisible, checkboxDisabled, selectable === null || selectable === void 0 ? void 0 : selectable.strategy);
159
+ const newValue = {
169
160
  selected: [...newSelection],
170
161
  all: newState === interfaces_1.SelectionState.All
171
162
  };
@@ -173,8 +164,49 @@ const useSelectableRows = (columns, entities, isMobile, selectMode, setSelectMod
173
164
  selectable === null || selectable === void 0 ? void 0 : selectable.onSelect(newValue);
174
165
  setSelectMode(newValue.all || newValue.selected.length > 0);
175
166
  }, [checkboxDisabled, checkboxVisible, entities, selectable, setSelectMode, setState, getNewSelection]);
167
+ const onBatchSelect = (0, react_1.useCallback)((rangeIds, select, base) => {
168
+ var _a;
169
+ const result = new Set(base);
170
+ const limit = selectable === null || selectable === void 0 ? void 0 : selectable.selectionLimit;
171
+ for (const id of rangeIds) {
172
+ if (select && limit !== undefined && result.size >= limit) {
173
+ break;
174
+ }
175
+ (0, checkRow_1.checkRow)(result, selectable, entities, id, select);
176
+ }
177
+ const newState = (0, calculateSelectionState_1.calculateSelectionState)(entities, result, ((_a = selectable === null || selectable === void 0 ? void 0 : selectable.selection) === null || _a === void 0 ? void 0 : _a.all) || false, checkboxVisible, checkboxDisabled, selectable === null || selectable === void 0 ? void 0 : selectable.strategy);
178
+ const newValue = {
179
+ selected: [...result],
180
+ all: newState === interfaces_1.SelectionState.All
181
+ };
182
+ setState(newState);
183
+ selectable === null || selectable === void 0 ? void 0 : selectable.onSelect(newValue);
184
+ setSelectMode(newValue.all || newValue.selected.length > 0);
185
+ }, [entities, selectable, checkboxVisible, checkboxDisabled, setSelectMode]);
186
+ // Deliberately independent of the current selection, so the drag anchor survives the
187
+ // selection changes a drag itself produces.
188
+ const {
189
+ rows: dragRows,
190
+ entityById
191
+ } = (0, react_1.useMemo)(() => (0, getDragSelectionRows_1.getDragSelectionRows)(entities, expandedRows), [entities, expandedRows]);
192
+ const isSelectable = (0, react_1.useCallback)(row => {
193
+ const entity = entityById.get(row.id);
194
+ return !!entity && checkboxVisible(entity, row.isNested) && !checkboxDisabled(entity, row.isNested);
195
+ }, [entityById, checkboxVisible, checkboxDisabled]);
196
+ const getBaseSelection = (0, react_1.useCallback)(() => state === interfaces_1.SelectionState.All ? (0, getCurrentPageSelection_1.getCurrentPageSelection)(entities, selectable) : new Set(selections), [state, entities, selectable, selections]);
197
+ const {
198
+ onCheckboxMouseDown,
199
+ suppressNextChangeRef
200
+ } = (0, useDragSelection_1.useDragSelection)(dragRows, gridRef, onBatchSelect, getBaseSelection, isSelectable, !!selectable);
201
+ const onCheckboxChange = (0, react_1.useCallback)((id, checked) => {
202
+ if (suppressNextChangeRef.current) {
203
+ suppressNextChangeRef.current = false;
204
+ return;
205
+ }
206
+ onSelectListener(id, checked);
207
+ }, [onSelectListener, suppressNextChangeRef]);
176
208
  const onChangeSelectionState = (0, react_1.useCallback)(newState => {
177
- var _a, _b, _c;
209
+ var _a, _b;
178
210
  if (newState === interfaces_1.SelectionState.All) {
179
211
  (selectable === null || selectable === void 0 ? void 0 : selectable.onSelect) && selectable.onSelect({
180
212
  selected: [],
@@ -193,11 +225,7 @@ const useSelectableRows = (columns, entities, isMobile, selectMode, setSelectMod
193
225
  }
194
226
  const newSelections = (0, getCurrentPageSelection_1.getCurrentPageSelection)(entities, selectable);
195
227
  setState(newState);
196
- // MYG-142234: previous `selected` ids mean something different depending on `all` -
197
- // included ids when `all` is false, excluded ids when `all` is true. Switching to an
198
- // explicit "select current page" here always leaves `all: false`, so a previous
199
- // exclusion list must not be reinterpreted as an inclusion list.
200
- const previousSelections = ((_a = selectable === null || selectable === void 0 ? void 0 : selectable.selection) === null || _a === void 0 ? void 0 : _a.all) ? [] : (_c = (_b = selectable === null || selectable === void 0 ? void 0 : selectable.selection) === null || _b === void 0 ? void 0 : _b.selected) !== null && _c !== void 0 ? _c : [];
228
+ const previousSelections = (_b = (_a = selectable === null || selectable === void 0 ? void 0 : selectable.selection) === null || _a === void 0 ? void 0 : _a.selected) !== null && _b !== void 0 ? _b : [];
201
229
  const mergedSelections = new Set([...previousSelections, ...newSelections]);
202
230
  const newValue = {
203
231
  selected: [...mergedSelections],
@@ -216,12 +244,7 @@ const useSelectableRows = (columns, entities, isMobile, selectMode, setSelectMod
216
244
  }
217
245
  return translate("Deselect all");
218
246
  }, [selectable, selectableState, state, translate]);
219
- const isEntityChecked = (0, react_1.useCallback)(
220
- // MYG-142234: while `selection.all` is true, `selections` holds excluded ids, and every
221
- // row must be evaluated through the SelectionState.All (exclusion-aware) branch of
222
- // isRowChecked - not the per-page `state`, which can be Partial/None for a page that
223
- // contains some of those exclusions.
224
- (entity, isNested) => (0, isRowChecked_1.isRowChecked)(selections, isAllSelected ? interfaces_1.SelectionState.All : state, selectable === null || selectable === void 0 ? void 0 : selectable.strategy, entity, isNested), [selections, isAllSelected, state, selectable === null || selectable === void 0 ? void 0 : selectable.strategy]);
247
+ const isEntityChecked = (0, react_1.useCallback)((entity, isNested) => (0, isRowChecked_1.isRowChecked)(selections, state, selectable === null || selectable === void 0 ? void 0 : selectable.strategy, entity, isNested), [selections, state, selectable === null || selectable === void 0 ? void 0 : selectable.strategy]);
225
248
  const hasSelectable = !!selectable;
226
249
  const selectableCheckboxSelectsCurrentPage = selectable === null || selectable === void 0 ? void 0 : selectable.checkboxSelectsCurrentPage;
227
250
  const selectableTurnOffSelectAll = selectable === null || selectable === void 0 ? void 0 : selectable.turnOffSelectAll;
@@ -259,7 +282,8 @@ const useSelectableRows = (columns, entities, isMobile, selectMode, setSelectMod
259
282
  indeterminate: checked.indeterminate,
260
283
  disabled: isDisable,
261
284
  label: checkboxTitle(entity),
262
- onChange: onSelectListener,
285
+ onChange: onCheckboxChange,
286
+ onMouseDown: isDisable ? undefined : onCheckboxMouseDown,
263
287
  children: (0, jsx_runtime_1.jsx)(checkboxCell_1.CheckboxCell.Content, {
264
288
  children: value
265
289
  })
@@ -273,30 +297,16 @@ const useSelectableRows = (columns, entities, isMobile, selectMode, setSelectMod
273
297
  checked: state === interfaces_1.SelectionState.CurrentPage || state === interfaces_1.SelectionState.All,
274
298
  indeterminate: state === interfaces_1.SelectionState.Partial,
275
299
  onChange: newValue => {
276
- var _a, _b, _c;
300
+ var _a, _b;
277
301
  if (newValue) {
278
302
  const newState = checkboxEmitsCurrentPage ? interfaces_1.SelectionState.CurrentPage : interfaces_1.SelectionState.All;
279
303
  setState(newState);
280
304
  onChangeSelectionState(newState);
281
- } else if ((_a = selectable.selection) === null || _a === void 0 ? void 0 : _a.all) {
282
- // MYG-142234: in exclusion mode, `selected` holds excluded ids. Unchecking
283
- // the header must add the current page's ids to that exclusion set and
284
- // keep `all: true` - it must never be treated as an inclusion list, or
285
- // every other page's selection would be silently wiped out.
286
- const currentPageIds = (0, getCurrentPageSelection_1.getCurrentPageSelection)(entities, selectable);
287
- const newExcluded = new Set([...selectable.selection.selected, ...currentPageIds]);
288
- const newState = (0, calculateSelectionState_1.calculateSelectionState)(entities, newExcluded, true, checkboxVisible, checkboxDisabled, selectable.strategy);
289
- setState(newState);
290
- selectable.onSelect({
291
- selected: [...newExcluded],
292
- all: true
293
- });
294
- setSelectMode(true);
295
305
  } else {
296
306
  // Intentionally different from onSelect(None) ("Deselect all" menu item, which clears everything).
297
307
  // Unchecking the header checkbox only removes the current page from the selection, preserving other pages.
298
308
  const currentPageIds = (0, getCurrentPageSelection_1.getCurrentPageSelection)(entities, selectable);
299
- const remaining = ((_c = (_b = selectable.selection) === null || _b === void 0 ? void 0 : _b.selected) !== null && _c !== void 0 ? _c : []).filter(id => !currentPageIds.has(id));
309
+ const remaining = ((_b = (_a = selectable.selection) === null || _a === void 0 ? void 0 : _a.selected) !== null && _b !== void 0 ? _b : []).filter(id => !currentPageIds.has(id));
300
310
  const newState = remaining.length > 0 ? interfaces_1.SelectionState.Partial : interfaces_1.SelectionState.None;
301
311
  setState(newState);
302
312
  selectable.onSelect({
@@ -319,7 +329,7 @@ const useSelectableRows = (columns, entities, isMobile, selectMode, setSelectMod
319
329
  return cell;
320
330
  }
321
331
  };
322
- }, [checkboxDisabled, checkboxTitle, checkboxVisible, headerTitle, onChangeSelectionState, onSelectListener, hasSelectable, checkboxEmitsCurrentPage, checkboxInHeaderValue, selectableHeader, selectableTurnOffSelectAll, isInfinite, selectable, selectableState, state, isMobile, checkboxPlaceholder, isEntityChecked, entities, setSelectMode]);
332
+ }, [checkboxDisabled, checkboxTitle, checkboxVisible, headerTitle, onChangeSelectionState, onCheckboxChange, onCheckboxMouseDown, hasSelectable, checkboxEmitsCurrentPage, checkboxInHeaderValue, selectableHeader, selectableTurnOffSelectAll, isInfinite, selectable, selectableState, state, isMobile, checkboxPlaceholder, isEntityChecked, entities, setSelectMode]);
323
333
  const selectableFeedWrapper = (0, react_1.useCallback)((primaryData, secondaryData, entity, isNested) => {
324
334
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
325
335
  if (!entity) {
@@ -6,41 +6,6 @@ const calculateSelectionState = (entities, selections, all, checkboxVisible, che
6
6
  if (selections.size === 0) {
7
7
  return all ? interfaces_1.SelectionState.All : interfaces_1.SelectionState.None;
8
8
  }
9
- if (all) {
10
- // When `all` is true, `selections` holds the ids explicitly excluded from the
11
- // otherwise-fully-selected set (see ISelectionValue), rather than included ids.
12
- const isExcluded = (entity) => {
13
- if (strategy === "nested" && entity.children) {
14
- if (entity.children.length === 0) {
15
- return false;
16
- }
17
- return entity.children.every(child => {
18
- if (!checkboxVisible(child)) {
19
- return true;
20
- }
21
- if (checkboxDisabled(child)) {
22
- return true;
23
- }
24
- return selections.has(child.id);
25
- });
26
- }
27
- return selections.has(entity.id);
28
- };
29
- const isPartiallyExcluded = (entity) => {
30
- if (strategy === "nested" && entity.children) {
31
- return entity.children.some(child => selections.has(child.id));
32
- }
33
- return selections.has(entity.id);
34
- };
35
- const relevantEntities = entities.filter(entity => checkboxVisible(entity) && !checkboxDisabled(entity));
36
- if (relevantEntities.length === 0) {
37
- return interfaces_1.SelectionState.All;
38
- }
39
- if (relevantEntities.every(entity => !isPartiallyExcluded(entity))) {
40
- return interfaces_1.SelectionState.All;
41
- }
42
- return relevantEntities.every(entity => isExcluded(entity)) ? interfaces_1.SelectionState.None : interfaces_1.SelectionState.Partial;
43
- }
44
9
  return entities.every(entity => {
45
10
  if (!checkboxVisible(entity)) {
46
11
  return true;
@@ -0,0 +1,15 @@
1
+ import { IEntityWithId } from "../../../commonHelpers/entity";
2
+ import { IRowEntity } from "../../../dataGrid/row/row";
3
+ import { IDragSelectionRow } from "../interfaces";
4
+ export interface IDragSelection<T> {
5
+ /** The rows in render order. */
6
+ rows: IDragSelectionRow[];
7
+ /** Every entity a row can point at, parents and children alike. */
8
+ entityById: Map<string, T>;
9
+ }
10
+ /**
11
+ * Flattens the entities into the rows the grid actually renders: each entity followed by its
12
+ * children while it is expanded. Drag and shift-click ranges walk this list, so they cross
13
+ * nesting levels the way the user sees them on screen.
14
+ */
15
+ export declare const getDragSelectionRows: <T extends IRowEntity<N>, N extends IEntityWithId>(entities: T[], expandedRows?: string[]) => IDragSelection<T | N>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDragSelectionRows = void 0;
4
+ /**
5
+ * Flattens the entities into the rows the grid actually renders: each entity followed by its
6
+ * children while it is expanded. Drag and shift-click ranges walk this list, so they cross
7
+ * nesting levels the way the user sees them on screen.
8
+ */
9
+ const getDragSelectionRows = (entities, expandedRows) => {
10
+ const expanded = new Set(expandedRows);
11
+ const rows = [];
12
+ const entityById = new Map();
13
+ entities.forEach(entity => {
14
+ rows.push({ id: entity.id, isNested: false });
15
+ entityById.set(entity.id, entity);
16
+ // Children are always indexed — a collapsed row's children still need to resolve for
17
+ // the selection predicates — but only an expanded row contributes them to the range.
18
+ const isExpanded = expanded.has(entity.id);
19
+ (entity.children || []).forEach(child => {
20
+ entityById.set(child.id, child);
21
+ if (isExpanded) {
22
+ rows.push({ id: child.id, isNested: true });
23
+ }
24
+ });
25
+ });
26
+ return { rows, entityById };
27
+ };
28
+ exports.getDragSelectionRows = getDragSelectionRows;
@@ -0,0 +1,2 @@
1
+ import { IDragSelectionRow } from "../interfaces";
2
+ export declare const getRangeIds: (rows: IDragSelectionRow[], fromId: string, toId: string, isSelectable: (row: IDragSelectionRow) => boolean) => string[];
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRangeIds = void 0;
4
+ const getRangeIds = (rows, fromId, toId, isSelectable) => {
5
+ const fromIdx = rows.findIndex(row => row.id === fromId);
6
+ const toIdx = rows.findIndex(row => row.id === toId);
7
+ if (fromIdx === -1 || toIdx === -1) {
8
+ return [];
9
+ }
10
+ const start = Math.min(fromIdx, toIdx);
11
+ const end = Math.max(fromIdx, toIdx);
12
+ const ids = [];
13
+ for (let i = start; i <= end; i++) {
14
+ const row = rows[i];
15
+ if (isSelectable(row)) {
16
+ ids.push(row.id);
17
+ }
18
+ }
19
+ return ids;
20
+ };
21
+ exports.getRangeIds = getRangeIds;
@@ -4,18 +4,7 @@ exports.isRowChecked = void 0;
4
4
  const interfaces_1 = require("../interfaces");
5
5
  const isRowChecked = (selections, state, strategy, entity, isNested) => {
6
6
  if (state === interfaces_1.SelectionState.All) {
7
- // When the overall selection is "all", `selections` holds the ids that have been
8
- // explicitly excluded from that selection (see ISelectionValue), not included ids.
9
- if (isNested) {
10
- return { indeterminate: false, checked: !selections.has(entity.id) };
11
- }
12
- const mainEntity = entity;
13
- if (strategy === "nested" && mainEntity.children && mainEntity.children.length > 0) {
14
- const allChildrenChecked = mainEntity.children.every(child => !selections.has(child.id));
15
- const someChildrenChecked = mainEntity.children.some(child => !selections.has(child.id));
16
- return { indeterminate: someChildrenChecked && !allChildrenChecked, checked: allChildrenChecked };
17
- }
18
- return { indeterminate: false, checked: !selections.has(entity.id) };
7
+ return { indeterminate: false, checked: true };
19
8
  }
20
9
  if (isNested) {
21
10
  return { indeterminate: false, checked: selections.has(entity.id) };
@@ -39,7 +39,7 @@ injectString("tr", "Sort by Ascending", "Artan s\u0131rada s\u0131rala");
39
39
  injectString("zh-Hans", "Sort by Ascending", "\u5347\u5E8F\u6392\u5E8F");
40
40
  injectString("zh-TW", "Sort by Ascending", "\u5347\u5E8F\u6392\u5E8F");
41
41
  injectString("ro-RO", "Sort by Ascending", "Sortare cresc\u0103toare");
42
- injectString("ar", "Sort by Ascending", "\u062A\u0631\u062A\u064A\u0628 \u062A\u0635\u0627\u0639\u062F\u064A");
42
+ injectString("ar-001", "Sort by Ascending", "\u062A\u0631\u062A\u064A\u0628 \u062A\u0635\u0627\u0639\u062F\u064A");
43
43
  injectString("lt-LT", "Sort by Ascending", "R\u016B\u0161iuoti did\u0117jan\u010Dia tvarka");
44
44
  injectString("lv-LV", "Sort by Ascending", "K\u0101rtot augo\u0161\u0101 sec\u012Bb\u0101");
45
45
  injectString("ka-GE", "Sort by Ascending", "\u10DB\u10D6\u10D0\u10E0\u10D3\u10D8 \u10D3\u10D0\u10EE\u10D0\u10E0\u10D8\u10E1\u10EE\u10D4\u10D1\u10D0");
@@ -72,7 +72,7 @@ injectString("tr", "Selected", "Se\xE7ildi");
72
72
  injectString("zh-Hans", "Selected", "\u9009\u4E2D\u7684");
73
73
  injectString("zh-TW", "Selected", "\u5DF2\u9078\u53D6");
74
74
  injectString("ro-RO", "Selected", "Selec\u021Bie");
75
- injectString("ar", "Selected", "\u0627\u0644\u0645\u062D\u062F\u062F");
75
+ injectString("ar-001", "Selected", "\u0627\u0644\u0645\u062D\u062F\u062F");
76
76
  injectString("lt-LT", "Selected", "Pasirinkta");
77
77
  injectString("lv-LV", "Selected", "Atlas\u012Bts");
78
78
  injectString("ka-GE", "Selected", "\u10D0\u10E0\u10E9\u10D4\u10E3\u10DA\u10D8");
@@ -105,7 +105,7 @@ injectString("tr", "Sort by Descending", "Azalan s\u0131rada s\u0131rala");
105
105
  injectString("zh-Hans", "Sort by Descending", "\u964D\u5E8F\u6392\u5E8F");
106
106
  injectString("zh-TW", "Sort by Descending", "\u964D\u5E8F\u6392\u5E8F");
107
107
  injectString("ro-RO", "Sort by Descending", "Sortare descresc\u0103toare");
108
- injectString("ar", "Sort by Descending", "\u062A\u0631\u062A\u064A\u0628 \u062A\u0646\u0627\u0632\u0644\u064A");
108
+ injectString("ar-001", "Sort by Descending", "\u062A\u0631\u062A\u064A\u0628 \u062A\u0646\u0627\u0632\u0644\u064A");
109
109
  injectString("lt-LT", "Sort by Descending", "R\u016B\u0161iuoti ma\u017E\u0117jan\u010Dia tvarka");
110
110
  injectString("lv-LV", "Sort by Descending", "K\u0101rtot dilsto\u0161\u0101 sec\u012Bb\u0101");
111
111
  injectString("ka-GE", "Sort by Descending", "\u10D9\u10DA\u10D4\u10D1\u10D0\u10D3\u10D8 \u10D3\u10D0\u10EE\u10D0\u10E0\u10D8\u10E1\u10EE\u10D4\u10D1\u10D0");
@@ -41,7 +41,7 @@ injectString("tr", "Sort by {COLUMN_NAME} descending", "{COLUMN_NAME} s\xFCtunun
41
41
  injectString("zh-Hans", "Sort by {COLUMN_NAME} descending", "\u6309 {COLUMN_NAME} \u964D\u5E8F\u6392\u5E8F");
42
42
  injectString("zh-TW", "Sort by {COLUMN_NAME} descending", "\u4F9D\u300C{COLUMN_NAME}\u300D\u905E\u6E1B\u6392\u5E8F");
43
43
  injectString("ro-RO", "Sort by {COLUMN_NAME} descending", "Sorta\u021Bi descendent dup\u0103 {COLUMN_NAME}");
44
- injectString("ar", "Sort by {COLUMN_NAME} descending", "\u0641\u0631\u0632 \u062D\u0633\u0628 {COLUMN_NAME} \u062A\u0646\u0627\u0632\u0644\u064A\u064B\u0627");
44
+ injectString("ar-001", "Sort by {COLUMN_NAME} descending", "\u0641\u0631\u0632 \u062D\u0633\u0628 {COLUMN_NAME} \u062A\u0646\u0627\u0632\u0644\u064A\u064B\u0627");
45
45
  injectString("lt-LT", "Sort by {COLUMN_NAME} descending", "R\u016B\u0161iuoti pagal {COLUMN_NAME} ma\u017E\u0117jan\u010Dia tvarka");
46
46
  injectString("lv-LV", "Sort by {COLUMN_NAME} descending", "K\u0101rtot p\u0113c {COLUMN_NAME} dilsto\u0161\u0101 sec\u012Bb\u0101");
47
47
  injectString("ka-GE", "Sort by {COLUMN_NAME} descending", "{COLUMN_NAME}-\u10D8\u10D7 \u10D9\u10DA\u10D4\u10D1\u10D0\u10D3\u10D8 \u10D3\u10D0\u10EE\u10D0\u10E0\u10D8\u10E1\u10EE\u10D4\u10D1\u10D0");
@@ -74,7 +74,7 @@ injectString("tr", "Sort by {COLUMN_NAME} ascending", "{COLUMN_NAME} s\xFCtununa
74
74
  injectString("zh-Hans", "Sort by {COLUMN_NAME} ascending", "\u6309 {COLUMN_NAME} \u5347\u5E8F\u6392\u5E8F");
75
75
  injectString("zh-TW", "Sort by {COLUMN_NAME} ascending", "\u4F9D\u300C{COLUMN_NAME}\u300D\u905E\u589E\u6392\u5E8F");
76
76
  injectString("ro-RO", "Sort by {COLUMN_NAME} ascending", "Sorta\u021Bi ascendent dup\u0103 {COLUMN_NAME}");
77
- injectString("ar", "Sort by {COLUMN_NAME} ascending", "\u0641\u0631\u0632 \u062D\u0633\u0628 {COLUMN_NAME} \u062A\u0635\u0627\u0639\u062F\u064A\u064B\u0627");
77
+ injectString("ar-001", "Sort by {COLUMN_NAME} ascending", "\u0641\u0631\u0632 \u062D\u0633\u0628 {COLUMN_NAME} \u062A\u0635\u0627\u0639\u062F\u064A\u064B\u0627");
78
78
  injectString("lt-LT", "Sort by {COLUMN_NAME} ascending", "R\u016B\u0161iuoti pagal {COLUMN_NAME} did\u0117jan\u010Dia tvarka");
79
79
  injectString("lv-LV", "Sort by {COLUMN_NAME} ascending", "K\u0101rtot p\u0113c {COLUMN_NAME} augo\u0161\u0101 sec\u012Bb\u0101");
80
80
  injectString("ka-GE", "Sort by {COLUMN_NAME} ascending", "{COLUMN_NAME}-\u10D8\u10D7 \u10DB\u10D6\u10D0\u10E0\u10D3\u10D8 \u10D3\u10D0\u10EE\u10D0\u10E0\u10D8\u10E1\u10EE\u10D4\u10D1\u10D0");
@@ -26,6 +26,8 @@ import { IEntityWithId } from "../commonHelpers/entity";
26
26
  import "../cardContainer/cardContainer.less";
27
27
  import { ITableDetailPanel } from "./children/tableDetailPanel";
28
28
  import { ITrendIndicator } from "../trendIndicator/trendIndicator";
29
+ import { ITag } from "../tag/tag";
30
+ import { IProgressIndicator } from "../progressIndicator/progressIndicator";
29
31
  export interface IListColumn<T extends IRowEntity<N>, N extends IEntityWithId = T> {
30
32
  readonly id: string;
31
33
  readonly title: string;
@@ -94,6 +96,8 @@ interface ITableComponents {
94
96
  BulkLink: React.FC<IBulkActionLink>;
95
97
  DetailPanel: React.FC<ITableDetailPanel>;
96
98
  TrendIndicator: React.FC<ITrendIndicator>;
99
+ Tag: React.FC<ITag>;
100
+ ProgressIndicator: React.FC<IProgressIndicator>;
97
101
  }
98
102
  declare const TableInner: <T extends IRowEntity<N>, N extends IEntityWithId = T>({ entities, columns, selectable, sortable, flexible, isLoading, loading, children, className, height, onFeedEnd, onScrollEnd, rowClassName, feedExpandable, expandedRows, onExpand, active, onClick }: ITable<T, N>) => import("react/jsx-runtime").JSX.Element;
99
103
  declare const Table: typeof TableInner & ITableComponents;