@economic/taco 2.16.0 → 2.17.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 (261) hide show
  1. package/dist/components/Table3/Table3.d.ts +0 -2
  2. package/dist/components/Table3/components/columns/cell/EditingControl.d.ts +1 -1
  3. package/dist/components/Table3/components/columns/header/Header.d.ts +1 -1
  4. package/dist/components/Table3/components/columns/styles.d.ts +2 -2
  5. package/dist/components/Table3/components/rows/Row.d.ts +3 -1
  6. package/dist/components/Table3/hooks/features/useSearch.d.ts +1 -3
  7. package/dist/components/Table3/hooks/useTable.d.ts +21 -20
  8. package/dist/components/Table3/types.d.ts +15 -18
  9. package/dist/components/Table3/util/scrolling.d.ts +2 -0
  10. package/dist/esm/packages/taco/src/components/Banner/Banner.js +2 -2
  11. package/dist/esm/packages/taco/src/components/Banner/Banner.js.map +1 -1
  12. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +4 -4
  13. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
  14. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +3 -3
  15. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
  16. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +2 -1
  17. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
  18. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +6 -6
  19. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
  20. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +3 -3
  21. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
  22. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +7 -7
  23. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
  24. package/dist/esm/packages/taco/src/components/Field/Field.js +2 -2
  25. package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
  26. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js +2 -2
  27. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js.map +1 -1
  28. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +4 -4
  29. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  30. package/dist/esm/packages/taco/src/components/Header/components/Link.js +2 -2
  31. package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
  32. package/dist/esm/packages/taco/src/components/Icon/Icon.js +2 -2
  33. package/dist/esm/packages/taco/src/components/Icon/Icon.js.map +1 -1
  34. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js +2 -2
  35. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  36. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +6 -6
  37. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
  38. package/dist/esm/packages/taco/src/components/Menu/components/Item.js +4 -4
  39. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  40. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js +2 -2
  41. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
  42. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js +3 -3
  43. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js.map +1 -1
  44. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js +2 -2
  45. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js.map +1 -1
  46. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +1 -1
  47. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  48. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js +2 -2
  49. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js.map +1 -1
  50. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js +5 -5
  51. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js.map +1 -1
  52. package/dist/esm/packages/taco/src/components/Popover/Popover.js +2 -2
  53. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  54. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js +2 -2
  55. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js.map +1 -1
  56. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +8 -8
  57. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
  58. package/dist/esm/packages/taco/src/components/Select/useSelect.js +2 -2
  59. package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
  60. package/dist/esm/packages/taco/src/components/Select2/Select2.js +7 -7
  61. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  62. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +8 -8
  63. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  64. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +5 -5
  65. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  66. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +9 -9
  67. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  68. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +2 -2
  69. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
  70. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js +3 -3
  71. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
  72. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +2 -2
  73. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  74. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js +10 -10
  75. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  76. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js +2 -2
  77. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js.map +1 -1
  78. package/dist/esm/packages/taco/src/components/Table3/Table3.js +32 -30
  79. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  80. package/dist/esm/packages/taco/src/components/Table3/components/alert/ErrorAlert.js +3 -3
  81. package/dist/esm/packages/taco/src/components/Table3/components/alert/ErrorAlert.js.map +1 -1
  82. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Cell.js +6 -6
  83. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Cell.js.map +1 -1
  84. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js +2 -2
  85. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js.map +1 -1
  86. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js +20 -16
  87. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js.map +1 -1
  88. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js +27 -3
  89. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js.map +1 -1
  90. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js +2 -2
  91. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js.map +1 -1
  92. package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Footer.js +2 -2
  93. package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Footer.js.map +1 -1
  94. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Group.js +1 -1
  95. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Group.js.map +1 -1
  96. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js +9 -9
  97. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js.map +1 -1
  98. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js +37 -6
  99. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js.map +1 -1
  100. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js +12 -12
  101. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js.map +1 -1
  102. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Drag.js +2 -2
  103. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Drag.js.map +1 -1
  104. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js +7 -7
  105. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js.map +1 -1
  106. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Expansion.js +3 -3
  107. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Expansion.js.map +1 -1
  108. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js +3 -3
  109. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js.map +1 -1
  110. package/dist/esm/packages/taco/src/components/Table3/components/columns/styles.js +2 -13
  111. package/dist/esm/packages/taco/src/components/Table3/components/columns/styles.js.map +1 -1
  112. package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js +32 -30
  113. package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js.map +1 -1
  114. package/dist/esm/packages/taco/src/components/Table3/components/rows/SkeletonRow.js +2 -2
  115. package/dist/esm/packages/taco/src/components/Table3/components/rows/SkeletonRow.js.map +1 -1
  116. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/ColumnSettings.js +8 -6
  117. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/ColumnSettings.js.map +1 -1
  118. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js +15 -7
  119. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js.map +1 -1
  120. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.js +2 -2
  121. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.js.map +1 -1
  122. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.js +2 -2
  123. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.js.map +1 -1
  124. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js +16 -16
  125. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js.map +1 -1
  126. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintIFrame.js +1 -0
  127. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintIFrame.js.map +1 -1
  128. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Search.js +10 -8
  129. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Search.js.map +1 -1
  130. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Settings.js +8 -8
  131. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Settings.js.map +1 -1
  132. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSearch.js +1 -2
  133. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSearch.js.map +1 -1
  134. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useEditingStateListener.js +3 -3
  135. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useEditingStateListener.js.map +1 -1
  136. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js +1 -49
  137. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js.map +1 -1
  138. package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js +0 -1
  139. package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js.map +1 -1
  140. package/dist/esm/packages/taco/src/components/Table3/hooks/useCssVars.js +0 -2
  141. package/dist/esm/packages/taco/src/components/Table3/hooks/useCssVars.js.map +1 -1
  142. package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js +127 -109
  143. package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js.map +1 -1
  144. package/dist/esm/packages/taco/src/components/Table3/strategies/virtualised.js +3 -3
  145. package/dist/esm/packages/taco/src/components/Table3/strategies/virtualised.js.map +1 -1
  146. package/dist/esm/packages/taco/src/components/Table3/types.js.map +1 -1
  147. package/dist/esm/packages/taco/src/components/Table3/util/scrolling.js +53 -0
  148. package/dist/esm/packages/taco/src/components/Table3/util/scrolling.js.map +1 -0
  149. package/dist/esm/packages/taco/src/components/Tag/Tag.js +4 -4
  150. package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
  151. package/dist/esm/packages/taco/src/components/Toast/Toaster.js +2 -2
  152. package/dist/esm/packages/taco/src/components/Toast/Toaster.js.map +1 -1
  153. package/dist/esm/packages/taco/src/components/Tour/Tour.js +4 -4
  154. package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
  155. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js +2 -2
  156. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js.map +1 -1
  157. package/dist/esm/packages/taco/src/index.js +2 -1
  158. package/dist/esm/packages/taco/src/index.js.map +1 -1
  159. package/dist/esm/packages/taco/src/primitives/Table/types.js +10 -0
  160. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -0
  161. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableColumnOrdering.js +8 -0
  162. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableColumnOrdering.js.map +1 -0
  163. package/dist/esm/packages/taco/src/{components/Table3/hooks/features/useFontSize.js → primitives/Table/useTable/features/useTableFontSize.js} +3 -3
  164. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableFontSize.js.map +1 -0
  165. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTablePrinting.js +14 -0
  166. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTablePrinting.js.map +1 -0
  167. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowActive.js +100 -0
  168. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowActive.js.map +1 -0
  169. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowClick.js +30 -0
  170. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowClick.js.map +1 -0
  171. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowGoto.js +9 -0
  172. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowGoto.js.map +1 -0
  173. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowHeight.js +13 -0
  174. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowHeight.js.map +1 -0
  175. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowSelection.js +32 -0
  176. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowSelection.js.map +1 -0
  177. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableServerLoading.js +11 -0
  178. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableServerLoading.js.map +1 -0
  179. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableDataListener.js +15 -0
  180. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableDataListener.js.map +1 -0
  181. package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useFilteringStateListener.js → primitives/Table/useTable/listeners/useTableFilterListener.js} +3 -3
  182. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableFilterListener.js.map +1 -0
  183. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableFontSizeListener.js +40 -0
  184. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableFontSizeListener.js.map +1 -0
  185. package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useRowSelectionListener.js → primitives/Table/useTable/listeners/useTableRowSelectionListener.js} +5 -6
  186. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableRowSelectionListener.js.map +1 -0
  187. package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useServerLoadingListener.js → primitives/Table/useTable/listeners/useTableServerLoadingListener.js} +3 -3
  188. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableServerLoadingListener.js.map +1 -0
  189. package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useShortcutsListener.js → primitives/Table/useTable/listeners/useTableShortcutsListener.js} +7 -7
  190. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableShortcutsListener.js.map +1 -0
  191. package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useSortingStateListener.js → primitives/Table/useTable/listeners/useTableSortingListener.js} +6 -4
  192. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableSortingListener.js.map +1 -0
  193. package/dist/esm/packages/taco/src/{components/Table3/hooks/features/useColumnOrdering.js → primitives/Table/useTable/util/columns.js} +24 -15
  194. package/dist/esm/packages/taco/src/primitives/Table/useTable/util/columns.js.map +1 -0
  195. package/dist/esm/packages/taco/src/types.js +6 -0
  196. package/dist/esm/packages/taco/src/types.js.map +1 -0
  197. package/dist/esm/packages/taco/src/utils/date.js +0 -1
  198. package/dist/esm/packages/taco/src/utils/date.js.map +1 -1
  199. package/dist/primitives/Table/types.d.ts +35 -0
  200. package/dist/primitives/Table/useTable/features/useTableColumnOrdering.d.ts +3 -0
  201. package/dist/primitives/Table/useTable/features/useTableFontSize.d.ts +7 -0
  202. package/dist/primitives/Table/useTable/features/useTablePrinting.d.ts +7 -0
  203. package/dist/primitives/Table/useTable/features/useTableRowActive.d.ts +12 -0
  204. package/dist/primitives/Table/useTable/features/useTableRowClick.d.ts +7 -0
  205. package/dist/primitives/Table/useTable/features/useTableRowGoto.d.ts +5 -0
  206. package/dist/primitives/Table/useTable/features/useTableRowHeight.d.ts +7 -0
  207. package/dist/primitives/Table/useTable/features/useTableRowSelection.d.ts +6 -0
  208. package/dist/primitives/Table/useTable/features/useTableServerLoading.d.ts +6 -0
  209. package/dist/primitives/Table/useTable/listeners/useTableDataListener.d.ts +2 -0
  210. package/dist/primitives/Table/useTable/listeners/useTableFilterListener.d.ts +3 -0
  211. package/dist/primitives/Table/useTable/listeners/useTableFontSizeListener.d.ts +2 -0
  212. package/dist/primitives/Table/useTable/listeners/useTableRowSelectionListener.d.ts +3 -0
  213. package/dist/primitives/Table/useTable/listeners/useTableServerLoadingListener.d.ts +3 -0
  214. package/dist/primitives/Table/useTable/listeners/useTableShortcutsListener.d.ts +3 -0
  215. package/dist/primitives/Table/useTable/listeners/useTableSortingListener.d.ts +3 -0
  216. package/dist/primitives/Table/useTable/util/columns.d.ts +4 -0
  217. package/dist/taco.cjs.development.js +834 -712
  218. package/dist/taco.cjs.development.js.map +1 -1
  219. package/dist/taco.cjs.production.min.js +1 -1
  220. package/dist/taco.cjs.production.min.js.map +1 -1
  221. package/dist/types.d.ts +5 -0
  222. package/package.json +3 -3
  223. package/types.json +11267 -13766
  224. package/dist/components/Table3/hooks/features/useColumnOrdering.d.ts +0 -6
  225. package/dist/components/Table3/hooks/features/useCurrentRow.d.ts +0 -11
  226. package/dist/components/Table3/hooks/features/useFontSize.d.ts +0 -7
  227. package/dist/components/Table3/hooks/features/usePauseHoverState.d.ts +0 -6
  228. package/dist/components/Table3/hooks/features/usePrinting.d.ts +0 -8
  229. package/dist/components/Table3/hooks/features/useRowClick.d.ts +0 -6
  230. package/dist/components/Table3/hooks/features/useRowGoto.d.ts +0 -5
  231. package/dist/components/Table3/hooks/features/useRowHeight.d.ts +0 -7
  232. package/dist/components/Table3/hooks/features/useRowSelection.d.ts +0 -6
  233. package/dist/components/Table3/hooks/listeners/useCurrentRowListener.d.ts +0 -2
  234. package/dist/components/Table3/hooks/listeners/useFilteringStateListener.d.ts +0 -3
  235. package/dist/components/Table3/hooks/listeners/useRowSelectionListener.d.ts +0 -3
  236. package/dist/components/Table3/hooks/listeners/useServerLoadingListener.d.ts +0 -3
  237. package/dist/components/Table3/hooks/listeners/useShortcutsListener.d.ts +0 -3
  238. package/dist/components/Table3/hooks/listeners/useSortingStateListener.d.ts +0 -3
  239. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useColumnOrdering.js.map +0 -1
  240. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useCurrentRow.js +0 -93
  241. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useCurrentRow.js.map +0 -1
  242. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useFontSize.js.map +0 -1
  243. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseHoverState.js +0 -22
  244. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseHoverState.js.map +0 -1
  245. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePrinting.js +0 -14
  246. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePrinting.js.map +0 -1
  247. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowClick.js +0 -25
  248. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowClick.js.map +0 -1
  249. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowGoto.js +0 -9
  250. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowGoto.js.map +0 -1
  251. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowHeight.js +0 -27
  252. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowHeight.js.map +0 -1
  253. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowSelection.js +0 -32
  254. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowSelection.js.map +0 -1
  255. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useCurrentRowListener.js +0 -15
  256. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useCurrentRowListener.js.map +0 -1
  257. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useFilteringStateListener.js.map +0 -1
  258. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useRowSelectionListener.js.map +0 -1
  259. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useServerLoadingListener.js.map +0 -1
  260. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useShortcutsListener.js.map +0 -1
  261. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSortingStateListener.js.map +0 -1
@@ -36,8 +36,8 @@ var get = _interopDefault(require('lodash/get'));
36
36
  var compact = _interopDefault(require('lodash/compact'));
37
37
  var pullAt = _interopDefault(require('lodash/pullAt'));
38
38
  var reactTable$1 = require('@tanstack/react-table');
39
- var _ = _interopDefault(require('lodash'));
40
39
  var ReactDOM = _interopDefault(require('react-dom'));
40
+ var _ = _interopDefault(require('lodash'));
41
41
  var reactVirtual = require('react-virtual');
42
42
  var core = require('@dnd-kit/core');
43
43
  var SortablePrimitive = require('@dnd-kit/sortable');
@@ -3627,14 +3627,14 @@ const Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
3627
3627
  const className = cn('inline-flex h-[1.715em] w-[1.715em] flex-shrink-0', props.className, {
3628
3628
  'p-[3px]': (_props$className = props.className) === null || _props$className === void 0 ? void 0 : _props$className.includes('rounded-full')
3629
3629
  });
3630
- return Component ? /*#__PURE__*/React__default.createElement(Component, Object.assign({}, otherProps, {
3630
+ return Component ? ( /*#__PURE__*/React__default.createElement(Component, Object.assign({}, otherProps, {
3631
3631
  className: className,
3632
3632
  "data-taco": "icon",
3633
3633
  "data-icon-name": name,
3634
3634
  focusable: "false",
3635
3635
  ref: ref,
3636
3636
  role: "img"
3637
- })) : null;
3637
+ }))) : null;
3638
3638
  });
3639
3639
 
3640
3640
  const BadgeIcon = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
@@ -4571,13 +4571,13 @@ const Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
4571
4571
  className: className,
4572
4572
  "data-taco": "banner",
4573
4573
  ref: ref
4574
- }, getBannerIcon(state), children, onClose ? /*#__PURE__*/React.createElement(IconButton, {
4574
+ }, getBannerIcon(state), children, onClose ? ( /*#__PURE__*/React.createElement(IconButton, {
4575
4575
  "aria-label": texts.banner.close,
4576
4576
  className: "ml-auto -mr-2 self-start",
4577
4577
  icon: "close",
4578
4578
  appearance: "discrete",
4579
4579
  onClick: onClose
4580
- }) : null);
4580
+ })) : null);
4581
4581
  });
4582
4582
 
4583
4583
  const Base$1 = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
@@ -4661,18 +4661,18 @@ const Navbar = /*#__PURE__*/React.memo(({
4661
4661
  name: "month",
4662
4662
  onChange: handleChange,
4663
4663
  value: value.getMonth()
4664
- }, months.map((month, i) => /*#__PURE__*/React.createElement("option", {
4664
+ }, months.map((month, i) => ( /*#__PURE__*/React.createElement("option", {
4665
4665
  key: month,
4666
4666
  value: i
4667
- }, month))), /*#__PURE__*/React.createElement("select", {
4667
+ }, month)))), /*#__PURE__*/React.createElement("select", {
4668
4668
  className: "h-8 px-2",
4669
4669
  name: "year",
4670
4670
  onChange: handleChange,
4671
4671
  value: value.getFullYear()
4672
- }, years.map(year => /*#__PURE__*/React.createElement("option", {
4672
+ }, years.map(year => ( /*#__PURE__*/React.createElement("option", {
4673
4673
  key: year,
4674
4674
  value: year
4675
- }, String(year))))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Tooltip, {
4675
+ }, String(year)))))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Tooltip, {
4676
4676
  title: actions.previousMonth
4677
4677
  }, /*#__PURE__*/React.createElement(IconButton, {
4678
4678
  appearance: "discrete",
@@ -5278,17 +5278,17 @@ const ScrollableList = /*#__PURE__*/React.forwardRef(function ScrollableList(pro
5278
5278
  };
5279
5279
  return /*#__PURE__*/React.createElement("ul", Object.assign({}, list, {
5280
5280
  "data-taco": "scrollable-list"
5281
- }), loading ? /*#__PURE__*/React.createElement("li", {
5281
+ }), loading ? ( /*#__PURE__*/React.createElement("li", {
5282
5282
  className: "yt-list__empty"
5283
5283
  }, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Spinner, {
5284
5284
  delay: 0
5285
- })), /*#__PURE__*/React.createElement("span", null, texts.listbox.loading)) : options.length ? options.map(({
5285
+ })), /*#__PURE__*/React.createElement("span", null, texts.listbox.loading))) : options.length ? options.map(({
5286
5286
  children,
5287
5287
  icon,
5288
5288
  ...optionProps
5289
- }) => /*#__PURE__*/React.createElement("li", Object.assign({}, optionProps), icon, /*#__PURE__*/React.createElement("span", {
5289
+ }) => ( /*#__PURE__*/React.createElement("li", Object.assign({}, optionProps), icon, /*#__PURE__*/React.createElement("span", {
5290
5290
  className: "flex-grow truncate text-left"
5291
- }, children), multiselect && /*#__PURE__*/React.createElement(Checkbox
5291
+ }, children), multiselect && ( /*#__PURE__*/React.createElement(Checkbox
5292
5292
  // In multiselect variant, this checkbox only acts as visual representation of item being selected,
5293
5293
  // so need to be taken out of screen reader scope.
5294
5294
  , {
@@ -5297,9 +5297,9 @@ const ScrollableList = /*#__PURE__*/React.forwardRef(function ScrollableList(pro
5297
5297
  checked: optionProps['aria-selected'],
5298
5298
  onChange: () => null,
5299
5299
  className: "pointer-events-none ml-2 self-center p-px"
5300
- }))) : /*#__PURE__*/React.createElement("li", {
5300
+ }))))) : ( /*#__PURE__*/React.createElement("li", {
5301
5301
  className: "yt-list__empty"
5302
- }, /*#__PURE__*/React.createElement("span", null, texts.listbox.empty)));
5302
+ }, /*#__PURE__*/React.createElement("span", null, texts.listbox.empty))));
5303
5303
  });
5304
5304
 
5305
5305
  // returns a custom event compatible with all browsers
@@ -5577,7 +5577,8 @@ const useCombobox = ({
5577
5577
  event.preventDefault();
5578
5578
  return;
5579
5579
  }
5580
- if (onChange && event.target.value !== value) {
5580
+ // event.target.value is always a string so it is important to cast value to a string before checking the equality
5581
+ if (onChange && event.target.value !== String(value)) {
5581
5582
  const item = findByValue(flattenedData, event.target.value);
5582
5583
  event.detail = sanitizeItem(item);
5583
5584
  const parents = getOptionParents(flattenedData, item === null || item === void 0 ? void 0 : item.path);
@@ -5756,7 +5757,7 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5756
5757
  ref: ref
5757
5758
  }), /*#__PURE__*/React.createElement(Input, Object.assign({}, input, {
5758
5759
  autoComplete: "off",
5759
- button: props.inline ? /*#__PURE__*/React.createElement(IconButton
5760
+ button: props.inline ? ( /*#__PURE__*/React.createElement(IconButton
5760
5761
  // In case of inline combobox, this icon button acts only as visual chevron representation,
5761
5762
  // so should be taken out of screen reader scope.
5762
5763
  , {
@@ -5770,7 +5771,7 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5770
5771
  (_input$ref$current = input.ref.current) === null || _input$ref$current === void 0 ? void 0 : _input$ref$current.focus();
5771
5772
  },
5772
5773
  tabIndex: -1
5773
- }) : dialog ? /*#__PURE__*/React.createElement(IconButton, {
5774
+ })) : dialog ? ( /*#__PURE__*/React.createElement(IconButton, {
5774
5775
  "aria-label": texts.combobox.tooltip,
5775
5776
  icon: "list-search",
5776
5777
  disabled: props.readOnly || props.disabled,
@@ -5784,7 +5785,7 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5784
5785
  ref: button.ref,
5785
5786
  tabIndex: -1,
5786
5787
  tooltip: texts.combobox.tooltip
5787
- }) : undefined
5788
+ })) : undefined
5788
5789
  })))), /*#__PURE__*/React.createElement(PopoverPrimitive.Portal, null, /*#__PURE__*/React.createElement(PopoverPrimitive.Content, {
5789
5790
  align: "start",
5790
5791
  onOpenAutoFocus: event => {
@@ -5854,7 +5855,6 @@ const parseFromCustomString = (date = '', mask = 'dd.mm.yy') => {
5854
5855
  Object.is(day, NaN) ? currentDate.getDate() : day, /* hours */12, /* minutes */0 // set to midday to avoid UTC offset causing dates to be mismatched server side
5855
5856
  );
5856
5857
  };
5857
-
5858
5858
  const parseFromISOString = date => {
5859
5859
  const tempDate = new Date(date);
5860
5860
  return dateFns.isValid(tempDate) ? parseFromCustomString(format(new Date(date))) : undefined;
@@ -6025,10 +6025,10 @@ const Content$3 = /*#__PURE__*/React.forwardRef(function PopoverContent(props, r
6025
6025
  className: "text-white"
6026
6026
  })));
6027
6027
  });
6028
- const Close$1 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(PopoverPrimitive.Close, Object.assign({}, props, {
6028
+ const Close$1 = /*#__PURE__*/React.forwardRef((props, ref) => ( /*#__PURE__*/React.createElement(PopoverPrimitive.Close, Object.assign({}, props, {
6029
6029
  ref: ref,
6030
6030
  asChild: true
6031
- })));
6031
+ }))));
6032
6032
  const Popover = /*#__PURE__*/React.forwardRef(function Popover(props, ref) {
6033
6033
  const {
6034
6034
  anchor,
@@ -6086,20 +6086,20 @@ const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref)
6086
6086
  disabled: input.disabled || input.readOnly,
6087
6087
  icon: "calendar",
6088
6088
  tabIndex: -1,
6089
- popover: props => /*#__PURE__*/React.createElement(Popover, Object.assign({}, props), /*#__PURE__*/React.createElement(Popover.Content, null, ({
6089
+ popover: props => ( /*#__PURE__*/React.createElement(Popover, Object.assign({}, props), /*#__PURE__*/React.createElement(Popover.Content, null, ({
6090
6090
  close
6091
- }) => /*#__PURE__*/React.createElement("div", {
6091
+ }) => ( /*#__PURE__*/React.createElement("div", {
6092
6092
  className: "-m-3 flex"
6093
6093
  }, /*#__PURE__*/React.createElement(Calendar$1, Object.assign({}, calendar, {
6094
6094
  onChange: (date, event) => {
6095
6095
  calendar.onChange(date, event);
6096
6096
  close();
6097
6097
  }
6098
- })), shortcuts && /*#__PURE__*/React.createElement("div", {
6098
+ })), shortcuts && ( /*#__PURE__*/React.createElement("div", {
6099
6099
  className: "border-grey-300 flex flex-col border-l"
6100
6100
  }, /*#__PURE__*/React.createElement("span", {
6101
6101
  className: "m-4 mb-3 flex h-8 w-32 items-center text-xs font-semibold"
6102
- }, shortcutsText !== null && shortcutsText !== void 0 ? shortcutsText : texts.datepicker.shortcuts), /*#__PURE__*/React.createElement("ul", null, shortcuts.map(shortcut => /*#__PURE__*/React.createElement("li", {
6102
+ }, shortcutsText !== null && shortcutsText !== void 0 ? shortcutsText : texts.datepicker.shortcuts), /*#__PURE__*/React.createElement("ul", null, shortcuts.map(shortcut => ( /*#__PURE__*/React.createElement("li", {
6103
6103
  key: shortcut.text
6104
6104
  }, /*#__PURE__*/React.createElement("button", {
6105
6105
  type: "button",
@@ -6109,7 +6109,7 @@ const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref)
6109
6109
  shortcut.onClick(event);
6110
6110
  close();
6111
6111
  }
6112
- }, shortcut.text)))), handleReset && /*#__PURE__*/React.createElement("button", {
6112
+ }, shortcut.text))))), handleReset && ( /*#__PURE__*/React.createElement("button", {
6113
6113
  type: "button",
6114
6114
  className: "mx-auto my-4 mt-auto inline-flex cursor-pointer border-none bg-transparent text-xs text-blue-500 hover:text-blue-300",
6115
6115
  onClick: event => {
@@ -6117,7 +6117,7 @@ const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref)
6117
6117
  handleReset(event);
6118
6118
  close();
6119
6119
  }
6120
- }, texts.datepicker.clear))))),
6120
+ }, texts.datepicker.clear))))))))),
6121
6121
  tooltip: texts.datepicker.calendar
6122
6122
  })
6123
6123
  })));
@@ -6293,13 +6293,13 @@ const Content$4 = /*#__PURE__*/React.forwardRef(function DialogContent(props, re
6293
6293
  }), /*#__PURE__*/React.createElement("div", {
6294
6294
  className: containerClassName,
6295
6295
  "data-taco": "dialog"
6296
- }, output, dialog.draggable && /*#__PURE__*/React.createElement("div", Object.assign({}, dragHandleProps, {
6296
+ }, output, dialog.draggable && ( /*#__PURE__*/React.createElement("div", Object.assign({}, dragHandleProps, {
6297
6297
  role: "button",
6298
6298
  draggable: true,
6299
6299
  "aria-grabbed": dragging,
6300
6300
  "aria-label": texts.dialog.drag,
6301
6301
  className: "yt-dialog__drag absolute-center-x bg-grey-100 top-1.5 h-3 w-24 cursor-move rounded text-center"
6302
- })), dialog.showCloseButton ? /*#__PURE__*/React.createElement(DialogPrimitive.Close, {
6302
+ }))), dialog.showCloseButton ? ( /*#__PURE__*/React.createElement(DialogPrimitive.Close, {
6303
6303
  onClick: dialog.onClose,
6304
6304
  asChild: true
6305
6305
  }, /*#__PURE__*/React.createElement(IconButton, {
@@ -6307,7 +6307,7 @@ const Content$4 = /*#__PURE__*/React.forwardRef(function DialogContent(props, re
6307
6307
  "aria-label": texts.dialog.close,
6308
6308
  className: "absolute top-0 right-0 mt-2 mr-2",
6309
6309
  icon: "close"
6310
- })) : null), dialog.elements.drawer, dialog.elements.extra))));
6310
+ }))) : null), dialog.elements.drawer, dialog.elements.extra))));
6311
6311
  });
6312
6312
 
6313
6313
  const DialogDrawer = /*#__PURE__*/React.forwardRef(function DialogDrawer(props, ref) {
@@ -6633,11 +6633,11 @@ const Portal = props => {
6633
6633
  }
6634
6634
  return /*#__PURE__*/React__default.createElement(DialogPrimitive.Portal, Object.assign({}, otherProps, {
6635
6635
  container: outlet !== null && outlet !== void 0 ? outlet : undefined
6636
- }), variant === 'overlay' ? /*#__PURE__*/React__default.createElement(DialogPrimitive.Overlay, {
6636
+ }), variant === 'overlay' ? ( /*#__PURE__*/React__default.createElement(DialogPrimitive.Overlay, {
6637
6637
  forceMount: true
6638
6638
  }, /*#__PURE__*/React__default.createElement(Backdrop, {
6639
6639
  className: backdropClassNames
6640
- })) : null, children);
6640
+ }))) : null, children);
6641
6641
  };
6642
6642
  const UntrappedFocusDrawerContent = /*#__PURE__*/React__default.forwardRef(function EmbeddedDrawerContent(props, ref) {
6643
6643
  const {
@@ -6758,19 +6758,19 @@ const DrawerContent = /*#__PURE__*/React__default.forwardRef(function Content(pr
6758
6758
  }), dragging ? /*#__PURE__*/React__default.createElement("div", {
6759
6759
  "data-testid": "resize-hit-area",
6760
6760
  className: "fixed bottom-0 left-0 right-0 top-0"
6761
- }) : null), showCloseButton ? /*#__PURE__*/React__default.createElement(Close$3, null, /*#__PURE__*/React__default.createElement(IconButton, {
6761
+ }) : null), showCloseButton ? ( /*#__PURE__*/React__default.createElement(Close$3, null, /*#__PURE__*/React__default.createElement(IconButton, {
6762
6762
  appearance: "discrete",
6763
6763
  "aria-label": texts.drawer.close,
6764
6764
  className: "absolute right-0 top-0 mr-2 mt-4",
6765
6765
  icon: "close"
6766
- })) : null);
6766
+ }))) : null);
6767
6767
  const styleProp = {
6768
6768
  ...style,
6769
6769
  ...{
6770
6770
  width: resizedWidth
6771
6771
  }
6772
6772
  };
6773
- return focusTrap ? /*#__PURE__*/React__default.createElement(DialogPrimitive.Content, Object.assign({
6773
+ return focusTrap ? ( /*#__PURE__*/React__default.createElement(DialogPrimitive.Content, Object.assign({
6774
6774
  forceMount: true
6775
6775
  }, otherProps, {
6776
6776
  className: contentClassName,
@@ -6779,12 +6779,12 @@ const DrawerContent = /*#__PURE__*/React__default.forwardRef(function Content(pr
6779
6779
  onCloseAutoFocus: handleCloseAutoFocus,
6780
6780
  ref: ref,
6781
6781
  style: styleProp
6782
- }), content) : /*#__PURE__*/React__default.createElement(UntrappedFocusDrawerContent, {
6782
+ }), content)) : ( /*#__PURE__*/React__default.createElement(UntrappedFocusDrawerContent, {
6783
6783
  onEscape: handleEscapeKeyDown,
6784
6784
  className: contentClassName,
6785
6785
  style: styleProp,
6786
6786
  ref: ref
6787
- }, content);
6787
+ }, content));
6788
6788
  });
6789
6789
  const Content$5 = /*#__PURE__*/React__default.forwardRef(function Content(props, externalRef) {
6790
6790
  const {
@@ -6947,14 +6947,14 @@ const Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
6947
6947
  className: className,
6948
6948
  "data-taco": "label",
6949
6949
  ref: ref
6950
- }), children, message && /*#__PURE__*/React.createElement(Tooltip, {
6950
+ }), children, message && ( /*#__PURE__*/React.createElement(Tooltip, {
6951
6951
  title: message,
6952
6952
  hide: !isMessageTrucated
6953
6953
  }, /*#__PURE__*/React.createElement("span", {
6954
6954
  className: messageClassName,
6955
6955
  ref: messageRef,
6956
6956
  role: invalid ? 'alert' : undefined
6957
- }, message)));
6957
+ }, message))));
6958
6958
  });
6959
6959
 
6960
6960
  const Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
@@ -7614,20 +7614,20 @@ const Shortcut = ({
7614
7614
  const texts = getShortcutText(keys);
7615
7615
  return /*#__PURE__*/React__default.createElement("span", Object.assign({}, props, {
7616
7616
  className: className
7617
- }), texts.map(key => /*#__PURE__*/React__default.createElement("kbd", {
7617
+ }), texts.map(key => ( /*#__PURE__*/React__default.createElement("kbd", {
7618
7618
  key: key,
7619
7619
  className: "font-display text-grey-700 [[data-taco=tooltip]_&]:bg-grey-300/[0.25] rounded-sm bg-black/[0.09] px-1 text-center font-bold [[data-taco=tooltip]_&]:text-white"
7620
- }, key)));
7620
+ }, key))));
7621
7621
  };
7622
7622
 
7623
7623
  const Icon$1 = ({
7624
7624
  name
7625
- }) => /*#__PURE__*/React.createElement("span", {
7625
+ }) => ( /*#__PURE__*/React.createElement("span", {
7626
7626
  className: "absolute left-0 ml-1"
7627
7627
  }, /*#__PURE__*/React.createElement(Icon, {
7628
7628
  className: "-ml-px -mt-px !h-5 !w-5",
7629
7629
  name: name
7630
- }));
7630
+ })));
7631
7631
  const useItemStyling = ({
7632
7632
  disabled,
7633
7633
  indented,
@@ -7699,12 +7699,12 @@ const Item$1 = /*#__PURE__*/React.forwardRef(function MenuItem(props, ref) {
7699
7699
  ref: ref
7700
7700
  }), icon ? /*#__PURE__*/React.createElement(Icon$1, {
7701
7701
  name: icon
7702
- }) : null, props.children, shortcut ? /*#__PURE__*/React.createElement("span", {
7702
+ }) : null, props.children, shortcut ? ( /*#__PURE__*/React.createElement("span", {
7703
7703
  className: "ml-auto pl-5"
7704
7704
  }, /*#__PURE__*/React.createElement(Shortcut, {
7705
7705
  keys: shortcut,
7706
7706
  className: "text-grey-700"
7707
- })) : null);
7707
+ }))) : null);
7708
7708
  if (typeof dialog === 'function') {
7709
7709
  button = dialog({
7710
7710
  trigger: button,
@@ -8085,12 +8085,12 @@ const TreeviewGroup = /*#__PURE__*/React__default.forwardRef(function TreeviewGr
8085
8085
  }, typeof title === 'function' ? title(expanded) : title), /*#__PURE__*/React__default.createElement("ul", {
8086
8086
  role: "group",
8087
8087
  className: listClassName
8088
- }, React__default.Children.toArray(children).filter(item => !!item).map((item, i) => /*#__PURE__*/React__default.createElement("li", {
8088
+ }, React__default.Children.toArray(children).filter(item => !!item).map((item, i) => ( /*#__PURE__*/React__default.createElement("li", {
8089
8089
  key: i,
8090
8090
  role: "none"
8091
8091
  }, /*#__PURE__*/React__default.cloneElement(item, {
8092
8092
  role: 'treeitem'
8093
- })))));
8093
+ }))))));
8094
8094
  });
8095
8095
  const Treeview = /*#__PURE__*/React__default.forwardRef(function Treeview(props, ref) {
8096
8096
  return /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
@@ -8222,10 +8222,10 @@ const Menu$2 = /*#__PURE__*/React__default.forwardRef(function Menu(props, ref)
8222
8222
  return /*#__PURE__*/React__default.createElement(Treeview, Object.assign({}, props, {
8223
8223
  className: cn('divide-grey-100 flex flex-grow flex-col divide-y-2 overflow-y-auto', props.className),
8224
8224
  ref: ref
8225
- }), scrollableAreas.map((area, i) => Array.isArray(area) ? /*#__PURE__*/React__default.createElement("div", {
8225
+ }), scrollableAreas.map((area, i) => Array.isArray(area) ? ( /*#__PURE__*/React__default.createElement("div", {
8226
8226
  className: "divide-grey-100 flex h-0 flex-auto flex-shrink-0 flex-grow flex-col divide-y-2 overflow-y-auto",
8227
8227
  key: i
8228
- }, area) : area));
8228
+ }, area)) : area));
8229
8229
  });
8230
8230
  Menu$2.Group = MenuGroup;
8231
8231
  const Navigation = /*#__PURE__*/React__default.forwardRef(function Navigation(props, ref) {
@@ -8349,7 +8349,7 @@ const OverflowGroup = /*#__PURE__*/React__default.forwardRef(function OverflowGr
8349
8349
  })), hiddenChildren.length ? /*#__PURE__*/React__default.cloneElement(button, {
8350
8350
  className: cn('sticky right-0 order-[99]', button.props.className),
8351
8351
  'data-observer-ignore': true,
8352
- menu: menuProps => /*#__PURE__*/React__default.createElement(Menu$1, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu$1.Content, null, hiddenChildren.map(sanitizeButtonPropsForMenuItem))),
8352
+ menu: menuProps => ( /*#__PURE__*/React__default.createElement(Menu$1, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu$1.Content, null, hiddenChildren.map(sanitizeButtonPropsForMenuItem)))),
8353
8353
  ref: buttonRefCallback
8354
8354
  }) : null);
8355
8355
  });
@@ -8382,14 +8382,14 @@ const PageNumbers = ({
8382
8382
  const {
8383
8383
  texts
8384
8384
  } = useLocalization();
8385
- return /*#__PURE__*/React.createElement(React.Fragment, null, range.map(pageNumber => /*#__PURE__*/React.createElement(Button$1, {
8385
+ return /*#__PURE__*/React.createElement(React.Fragment, null, range.map(pageNumber => ( /*#__PURE__*/React.createElement(Button$1, {
8386
8386
  appearance: pageNumber === currentPageIndex + 1 ? 'primary' : 'default',
8387
8387
  "aria-current": pageNumber === currentPageIndex + 1 ? 'page' : undefined,
8388
8388
  key: pageNumber,
8389
8389
  onClick: () => handleClick(pageNumber - 1),
8390
8390
  "aria-label": texts.pagination.actions.pageX.replace('[X]', String(pageNumber)),
8391
8391
  tooltip: texts.pagination.actions.pageX.replace('[X]', String(pageNumber))
8392
- }, pageNumber)));
8392
+ }, pageNumber))));
8393
8393
  };
8394
8394
 
8395
8395
  const useSelect = ({
@@ -8500,9 +8500,9 @@ const useSelect = ({
8500
8500
  } else {
8501
8501
  const item = findByValue(flattenedData, value);
8502
8502
  if (item) {
8503
- text = item.icon ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.cloneElement(item.icon, {
8503
+ text = item.icon ? ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.cloneElement(item.icon, {
8504
8504
  className: cn(item.icon.props.className, 'mr-1 -mt-px')
8505
- }), item.text) : item.text;
8505
+ }), item.text)) : item.text;
8506
8506
  }
8507
8507
  }
8508
8508
  }
@@ -8748,7 +8748,7 @@ const Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref)
8748
8748
  className: className,
8749
8749
  "data-taco": "pagination",
8750
8750
  ref: ref
8751
- }), showPageSize && /*#__PURE__*/React.createElement("span", {
8751
+ }), showPageSize && ( /*#__PURE__*/React.createElement("span", {
8752
8752
  className: "mr-4"
8753
8753
  }, getShowingLabel(length, pageIndex, pageSize, texts), /*#__PURE__*/React.createElement(Select, {
8754
8754
  "aria-label": texts.pagination.pageSize,
@@ -8762,7 +8762,7 @@ const Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref)
8762
8762
  setPageSize(Number(event.target.value));
8763
8763
  },
8764
8764
  value: pageSize
8765
- })), showPageControls && /*#__PURE__*/React.createElement(Group, {
8765
+ }))), showPageControls && ( /*#__PURE__*/React.createElement(Group, {
8766
8766
  as: "nav",
8767
8767
  "aria-label": texts.pagination.label
8768
8768
  }, /*#__PURE__*/React.createElement(IconButton, {
@@ -8779,11 +8779,11 @@ const Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref)
8779
8779
  onClick: () => setPageIndex(pageIndex - 1),
8780
8780
  "aria-label": showShortcutTexts ? texts.pagination.actions.previousPageWithShortcut : texts.pagination.actions.previousPage,
8781
8781
  tooltip: showShortcutTexts ? texts.pagination.actions.previousPageWithShortcut : texts.pagination.actions.previousPage
8782
- }), showPageNumbers && pageCount > 0 && /*#__PURE__*/React.createElement(PageNumbers, {
8782
+ }), showPageNumbers && pageCount > 0 && ( /*#__PURE__*/React.createElement(PageNumbers, {
8783
8783
  pageCount: pageCount,
8784
8784
  currentPageIndex: pageIndex,
8785
8785
  onClick: setPageIndex
8786
- }), /*#__PURE__*/React.createElement(IconButton, {
8786
+ })), /*#__PURE__*/React.createElement(IconButton, {
8787
8787
  appearance: "default",
8788
8788
  disabled: !canNextPage,
8789
8789
  icon: "arrow-right",
@@ -8797,7 +8797,7 @@ const Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref)
8797
8797
  onClick: () => setPageIndex(pageCount - 1),
8798
8798
  "aria-label": showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage,
8799
8799
  tooltip: showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage
8800
- })));
8800
+ }))));
8801
8801
  });
8802
8802
 
8803
8803
  const Progress = ({
@@ -9045,7 +9045,7 @@ const ToastProvider = ({
9045
9045
  role: "log"
9046
9046
  }, /*#__PURE__*/React.createElement(framerMotion.AnimatePresence, {
9047
9047
  initial: false
9048
- }, toasts.map(toast => /*#__PURE__*/React.createElement(framerMotion.motion.div, {
9048
+ }, toasts.map(toast => ( /*#__PURE__*/React.createElement(framerMotion.motion.div, {
9049
9049
  key: toast.id,
9050
9050
  transition: {
9051
9051
  type: 'spring',
@@ -9071,7 +9071,7 @@ const ToastProvider = ({
9071
9071
  }
9072
9072
  }, /*#__PURE__*/React.createElement(Toast, Object.assign({}, toast, {
9073
9073
  onClose: () => handleClose(toast.id)
9074
- })))))));
9074
+ }))))))));
9075
9075
  };
9076
9076
  const useToast = () => React.useContext(ToastContext);
9077
9077
 
@@ -9128,7 +9128,7 @@ const SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput({
9128
9128
  placeholder: texts.searchInput.placeholder
9129
9129
  }, props, {
9130
9130
  onKeyDown: handleKeyDown,
9131
- postfix: /*#__PURE__*/React.createElement(React.Fragment, null, props.disabled || props.readOnly || !props.value ? null : /*#__PURE__*/React.createElement(IconButton, {
9131
+ postfix: /*#__PURE__*/React.createElement(React.Fragment, null, props.disabled || props.readOnly || !props.value ? null : ( /*#__PURE__*/React.createElement(IconButton, {
9132
9132
  "aria-hidden": true,
9133
9133
  "aria-label": texts.searchInput.clear,
9134
9134
  className: "group-peer-focus:visible group-peer-hover:visible !text-grey-700 invisible mr-0.5 !h-5 !min-h-[theme(spacing.4)] !w-5 !min-w-[theme(spacing.4)] text-xs hover:visible group-hover:visible",
@@ -9137,7 +9137,7 @@ const SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput({
9137
9137
  rounded: true,
9138
9138
  tabIndex: -1,
9139
9139
  tooltip: texts.searchInput.clear
9140
- }), /*#__PURE__*/React.createElement(IconButton, {
9140
+ })), /*#__PURE__*/React.createElement(IconButton, {
9141
9141
  "aria-label": texts.searchInput.button,
9142
9142
  icon: "search",
9143
9143
  className: "group-peer-focus:!border-transparent group-peer-focus:group-peer-active:!border-transparent -mr-2 !border-transparent !bg-transparent focus:!border-transparent",
@@ -9233,9 +9233,9 @@ const SearchInput2 = /*#__PURE__*/React__default.forwardRef(function SearchInput
9233
9233
  icon: "close",
9234
9234
  onMouseDown: handleClear,
9235
9235
  tabIndex: -1,
9236
- tooltip: focused ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, texts.searchInput.clear, " ", /*#__PURE__*/React__default.createElement(Shortcut, {
9236
+ tooltip: focused ? ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, texts.searchInput.clear, " ", /*#__PURE__*/React__default.createElement(Shortcut, {
9237
9237
  keys: "Escape"
9238
- })) : texts.searchInput.clear
9238
+ }))) : texts.searchInput.clear
9239
9239
  });
9240
9240
  }
9241
9241
  if (hasFind && isActive) {
@@ -9243,28 +9243,28 @@ const SearchInput2 = /*#__PURE__*/React__default.forwardRef(function SearchInput
9243
9243
  className: "text-grey-700 flex h-4 items-center border-r border-black/[0.25] pr-2"
9244
9244
  }, loading ? /*#__PURE__*/React__default.createElement(Spinner, {
9245
9245
  className: "h-4 w-4"
9246
- }) : `${findCurrent !== null && findCurrent !== void 0 ? findCurrent : 0}/${findTotal !== null && findTotal !== void 0 ? findTotal : 0}`), findCurrent ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(IconButton, {
9246
+ }) : `${findCurrent !== null && findCurrent !== void 0 ? findCurrent : 0}/${findTotal !== null && findTotal !== void 0 ? findTotal : 0}`), findCurrent ? ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(IconButton, {
9247
9247
  "aria-label": texts.searchInput.findPrevious,
9248
9248
  className: "scale-75 !bg-transparent hover:!bg-black/[0.08] [&>svg]:scale-125",
9249
9249
  icon: "chevron-up",
9250
9250
  onMouseDown: handleClickFindPrevious,
9251
9251
  tabIndex: -1,
9252
- tooltip: focused ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, texts.searchInput.findPrevious, " ", /*#__PURE__*/React__default.createElement(Shortcut, {
9252
+ tooltip: focused ? ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, texts.searchInput.findPrevious, " ", /*#__PURE__*/React__default.createElement(Shortcut, {
9253
9253
  keys: {
9254
9254
  shift: true,
9255
9255
  key: 'Enter'
9256
9256
  }
9257
- })) : texts.searchInput.findPrevious
9257
+ }))) : texts.searchInput.findPrevious
9258
9258
  }), /*#__PURE__*/React__default.createElement(IconButton, {
9259
9259
  "aria-label": texts.searchInput.findNext,
9260
9260
  className: "scale-75 !bg-transparent hover:!bg-black/[0.08] [&>svg]:scale-125",
9261
9261
  icon: "chevron-down",
9262
9262
  onMouseDown: handleClickFindNext,
9263
9263
  tabIndex: -1,
9264
- tooltip: focused ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, texts.searchInput.findNext, " ", /*#__PURE__*/React__default.createElement(Shortcut, {
9264
+ tooltip: focused ? ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, texts.searchInput.findNext, " ", /*#__PURE__*/React__default.createElement(Shortcut, {
9265
9265
  keys: "Enter"
9266
- })) : texts.searchInput.findNext
9267
- })) : null, postfix);
9266
+ }))) : texts.searchInput.findNext
9267
+ }))) : null, postfix);
9268
9268
  }
9269
9269
  } else if (shortcut && !focused && !value) {
9270
9270
  postfix = /*#__PURE__*/React__default.createElement(Shortcut, {
@@ -9670,16 +9670,16 @@ const Tag$1 = /*#__PURE__*/React__default.forwardRef((props, ref) => {
9670
9670
  }), /*#__PURE__*/React__default.createElement("span", {
9671
9671
  className: "truncate px-2",
9672
9672
  ref: textRef
9673
- }, icon ? typeof icon === 'string' ? /*#__PURE__*/React__default.createElement(Icon, {
9673
+ }, icon ? typeof icon === 'string' ? ( /*#__PURE__*/React__default.createElement(Icon, {
9674
9674
  name: icon,
9675
9675
  className: "mr-1 -ml-1 -mt-0.5 !h-5 !w-5"
9676
- }) : /*#__PURE__*/React__default.cloneElement(icon, {
9676
+ })) : ( /*#__PURE__*/React__default.cloneElement(icon, {
9677
9677
  className: 'mr-1 -ml-1 -mt-0.5 !h-5 !w-5'
9678
- }) : null, children), onDelete ? /*#__PURE__*/React__default.createElement(Icon, {
9678
+ })) : null, children), onDelete ? ( /*#__PURE__*/React__default.createElement(Icon, {
9679
9679
  name: "close",
9680
9680
  onClick: onDelete,
9681
9681
  className: "-ml-1.5 !h-6 !w-5 flex-shrink-0 cursor-pointer rounded-r p-0.5 hover:bg-black/5"
9682
- }) : null);
9682
+ })) : null);
9683
9683
  });
9684
9684
 
9685
9685
  const createOptionClassName = (shouldPauseHoverState = false) => cn('group mb-px flex w-full text-sm flex-shrink-0 font-normal cursor-pointer items-center rounded bg-white px-2 leading-8 text-black aria-hidden:hidden gap-1.5 bg-white aria-current:wcag-grey-200 aria-disabled:text-black/25 aria-disabled:pointer-events-none', {
@@ -9838,9 +9838,9 @@ const EditPopover = props => {
9838
9838
  className: "focus:!shadow-none"
9839
9839
  }, ({
9840
9840
  close
9841
- }) => /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
9841
+ }) => ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
9842
9842
  className: "flex w-32 flex-col space-y-2"
9843
- }, onEdit ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Field, {
9843
+ }, onEdit ? ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Field, {
9844
9844
  className: cn('!min-h-fit', {
9845
9845
  '!pb-0': !validationError
9846
9846
  }),
@@ -9852,23 +9852,23 @@ const EditPopover = props => {
9852
9852
  onKeyDown: handleInputKeyDown(close),
9853
9853
  ref: ref,
9854
9854
  value: name
9855
- })), initialColor ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("h5", null, "Colours"), /*#__PURE__*/React__default.createElement(Colours, {
9855
+ })), initialColor ? ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("h5", null, "Colours"), /*#__PURE__*/React__default.createElement(Colours, {
9856
9856
  color: color,
9857
9857
  onChangeColor: setColor,
9858
9858
  onKeyDown: preventKeyDownPropagation
9859
- })) : null, /*#__PURE__*/React__default.createElement(Group, null, /*#__PURE__*/React__default.createElement(Button$1, {
9859
+ }))) : null, /*#__PURE__*/React__default.createElement(Group, null, /*#__PURE__*/React__default.createElement(Button$1, {
9860
9860
  onClick: close
9861
9861
  }, texts.select2.cancel), /*#__PURE__*/React__default.createElement(Button$1, {
9862
9862
  appearance: "primary",
9863
9863
  onClick: handleSave(close)
9864
- }, texts.select2.save))) : null, onEdit && onDelete ? /*#__PURE__*/React__default.createElement("hr", null) : null, onDelete ? /*#__PURE__*/React__default.createElement("button", {
9864
+ }, texts.select2.save)))) : null, onEdit && onDelete ? /*#__PURE__*/React__default.createElement("hr", null) : null, onDelete ? ( /*#__PURE__*/React__default.createElement("button", {
9865
9865
  className: "hover:text-grey-700 flex items-center justify-start gap-1",
9866
9866
  onClick: handleDelete(close),
9867
9867
  onKeyDown: preventKeyDownPropagation
9868
9868
  }, /*#__PURE__*/React__default.createElement(Icon, {
9869
9869
  className: "!h-5 !w-5",
9870
9870
  name: "delete-permanently"
9871
- }), " ", texts.select2.delete) : null))));
9871
+ }), " ", texts.select2.delete)) : null)))));
9872
9872
  };
9873
9873
  const Colours = props => {
9874
9874
  const {
@@ -9887,7 +9887,7 @@ const Colours = props => {
9887
9887
  onKeyDown: onKeyDown,
9888
9888
  onValueChange: color => onChangeColor(color),
9889
9889
  value: color
9890
- }, AVAILABLE_COLORS.map(availableColor => /*#__PURE__*/React__default.createElement(RadioGroupPrimitive.Item, {
9890
+ }, AVAILABLE_COLORS.map(availableColor => ( /*#__PURE__*/React__default.createElement(RadioGroupPrimitive.Item, {
9891
9891
  "aria-label": color,
9892
9892
  className: cn('flex h-6 w-6 cursor-pointer items-center justify-center rounded', getSubtleColorShadeClasses(availableColor)),
9893
9893
  key: availableColor,
@@ -9898,7 +9898,7 @@ const Colours = props => {
9898
9898
  }, /*#__PURE__*/React__default.createElement(Icon, {
9899
9899
  name: "tick",
9900
9900
  className: "!h-5 !w-5"
9901
- })))));
9901
+ }))))));
9902
9902
  };
9903
9903
 
9904
9904
  const mobiles = /iPhone|iPad|iPod|Android/i;
@@ -9959,14 +9959,14 @@ const Option$1 = /*#__PURE__*/React__default.forwardRef(function Select2Option(p
9959
9959
  onClick: handleClick,
9960
9960
  onKeyDown: handleKeyDown,
9961
9961
  ref: ref
9962
- }), hasValue ? /*#__PURE__*/React__default.createElement(Icon, {
9962
+ }), hasValue ? ( /*#__PURE__*/React__default.createElement(Icon, {
9963
9963
  name: "tick",
9964
9964
  className: "pointer-events-none invisible -mx-0.5 !h-4 !w-4 group-aria-selected:visible"
9965
- }) : null, isTag ? /*#__PURE__*/React__default.createElement(Tag$1, {
9965
+ })) : null, isTag ? ( /*#__PURE__*/React__default.createElement(Tag$1, {
9966
9966
  className: "pointer-events-none my-1",
9967
9967
  color: color,
9968
9968
  icon: prefix
9969
- }, children) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, prefix ? typeof prefix === 'string' ? /*#__PURE__*/React__default.createElement(Icon, {
9969
+ }, children)) : ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, prefix ? typeof prefix === 'string' ? /*#__PURE__*/React__default.createElement(Icon, {
9970
9970
  name: prefix
9971
9971
  }) : prefix : null, /*#__PURE__*/React__default.createElement("span", {
9972
9972
  className: "flex w-full justify-between"
@@ -9978,7 +9978,7 @@ const Option$1 = /*#__PURE__*/React__default.forwardRef(function Select2Option(p
9978
9978
  className: "flex flex-col self-center"
9979
9979
  }, postfix ? typeof postfix === 'string' ? /*#__PURE__*/React__default.createElement(Icon, {
9980
9980
  name: postfix
9981
- }) : postfix : null))), popover ? /*#__PURE__*/React__default.createElement(IconButton, {
9981
+ }) : postfix : null)))), popover ? ( /*#__PURE__*/React__default.createElement(IconButton, {
9982
9982
  icon: "ellipsis-vertical",
9983
9983
  appearance: "discrete",
9984
9984
  className: cn('group-aria-current:visible invisible -mr-1 ml-auto !h-5 min-h-[theme(spacing.6)] !w-5 min-w-[theme(spacing.6)] hover:!bg-black/[.08] focus:!shadow-none group-hover:visible', {
@@ -9991,7 +9991,7 @@ const Option$1 = /*#__PURE__*/React__default.forwardRef(function Select2Option(p
9991
9991
  },
9992
9992
  popover: popover,
9993
9993
  tabIndex: -1
9994
- }) : null);
9994
+ })) : null);
9995
9995
  });
9996
9996
 
9997
9997
  const Group$2 = /*#__PURE__*/React__default.forwardRef(function Select2Group(props, ref) {
@@ -10131,10 +10131,10 @@ const Single = /*#__PURE__*/React__default.forwardRef(function Select2TriggerSin
10131
10131
  readOnly: readOnly
10132
10132
  }, currentValue.props.children);
10133
10133
  } else {
10134
- output = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, currentValue.props.prefix ? typeof currentValue.props.prefix === 'string' ? /*#__PURE__*/React__default.createElement(Icon, {
10134
+ output = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, currentValue.props.prefix ? typeof currentValue.props.prefix === 'string' ? ( /*#__PURE__*/React__default.createElement(Icon, {
10135
10135
  name: currentValue.props.prefix,
10136
10136
  className: "mr-1 !h-5 !w-5"
10137
- }) : currentValue.props.prefix : null, currentValue.props.children);
10137
+ })) : currentValue.props.prefix : null, currentValue.props.children);
10138
10138
  }
10139
10139
  }
10140
10140
  return /*#__PURE__*/React__default.createElement(Button$2, Object.assign({}, buttonProps, {
@@ -10171,12 +10171,12 @@ const Multiple = /*#__PURE__*/React__default.forwardRef(function Select2TriggerM
10171
10171
  className: "my-1 flex max-h-[5.5rem] flex-col"
10172
10172
  }, /*#__PURE__*/React__default.createElement("div", {
10173
10173
  className: "flex flex-wrap gap-1"
10174
- }, valuesAsChildren.length === 0 ? /*#__PURE__*/React__default.createElement("div", {
10174
+ }, valuesAsChildren.length === 0 ? ( /*#__PURE__*/React__default.createElement("div", {
10175
10175
  className: cn({
10176
10176
  'text-grey-700': disabled,
10177
10177
  'text-grey-500': !disabled
10178
10178
  })
10179
- }, placeholder) : valuesAsChildren.map(child => /*#__PURE__*/React__default.createElement(Tag$1, {
10179
+ }, placeholder)) : valuesAsChildren.map(child => ( /*#__PURE__*/React__default.createElement(Tag$1, {
10180
10180
  key: String(child.props.value),
10181
10181
  className: "truncate",
10182
10182
  color: tags ? child.props.color : undefined,
@@ -10190,7 +10190,7 @@ const Multiple = /*#__PURE__*/React__default.forwardRef(function Select2TriggerM
10190
10190
  }
10191
10191
  },
10192
10192
  readOnly: readOnly
10193
- }, child.props.children))));
10193
+ }, child.props.children)))));
10194
10194
  } else {
10195
10195
  content = /*#__PURE__*/React__default.createElement(MultipleValue, {
10196
10196
  key: String(open),
@@ -10235,12 +10235,12 @@ const MultipleValue = ({
10235
10235
  }, /*#__PURE__*/React__default.createElement("div", {
10236
10236
  className: "flex gap-1 truncate",
10237
10237
  ref: el => setContentRef(el)
10238
- }, valuesAsChildren.length === 0 ? /*#__PURE__*/React__default.createElement("div", {
10238
+ }, valuesAsChildren.length === 0 ? ( /*#__PURE__*/React__default.createElement("div", {
10239
10239
  className: cn({
10240
10240
  'text-grey-700': disabled,
10241
10241
  'text-grey-500': !disabled
10242
10242
  })
10243
- }, placeholder) : valuesAsChildren.map((child, index) => {
10243
+ }, placeholder)) : valuesAsChildren.map((child, index) => {
10244
10244
  const tag = /*#__PURE__*/React__default.createElement(Tag$1, {
10245
10245
  key: String(child.props.value),
10246
10246
  className: cn('cursor-pointer', {
@@ -10260,11 +10260,11 @@ const MultipleValue = ({
10260
10260
  }, tag);
10261
10261
  }
10262
10262
  return tag;
10263
- })), boundaryIndex !== undefined && boundaryIndex !== null && boundaryIndex < valuesAsChildren.length - 1 ? /*#__PURE__*/React__default.createElement(Tooltip, {
10263
+ })), boundaryIndex !== undefined && boundaryIndex !== null && boundaryIndex < valuesAsChildren.length - 1 ? ( /*#__PURE__*/React__default.createElement(Tooltip, {
10264
10264
  title: valuesAsChildren.slice(boundaryIndex + 1).map(child => child ? String(child.props.children) : '').join(', ')
10265
10265
  }, /*#__PURE__*/React__default.createElement(Badge, {
10266
10266
  className: "flex-shrink-0"
10267
- }, "+", valuesAsChildren.length - (boundaryIndex + 1))) : null);
10267
+ }, "+", valuesAsChildren.length - (boundaryIndex + 1)))) : null);
10268
10268
  };
10269
10269
  const matchesValue = value => child => {
10270
10270
  if (Array.isArray(value)) {
@@ -10750,13 +10750,13 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
10750
10750
  style: {
10751
10751
  minWidth: dimensions !== null && dimensions !== void 0 && dimensions.width ? `${dimensions.width}px` : undefined
10752
10752
  }
10753
- }, flattenedChildren.length > 0 || onCreate ? /*#__PURE__*/React__default.createElement(Search$1, {
10753
+ }, flattenedChildren.length > 0 || onCreate ? ( /*#__PURE__*/React__default.createElement(Search$1, {
10754
10754
  placeholder: onCreate ? texts.select2.searchOrCreate : texts.select2.search,
10755
10755
  ref: searchRef
10756
- }) : null, flattenedChildren.length <= 0 ? /*#__PURE__*/React__default.createElement("div", {
10756
+ })) : null, flattenedChildren.length <= 0 ? ( /*#__PURE__*/React__default.createElement("div", {
10757
10757
  className: "text-grey-700 -mt-0.5 flex h-8 items-center px-2",
10758
10758
  role: "presentation"
10759
- }, "No results found...") : /*#__PURE__*/React__default.createElement(Root$1, {
10759
+ }, "No results found...")) : ( /*#__PURE__*/React__default.createElement(Root$1, {
10760
10760
  className: "flex flex-col gap-0.5",
10761
10761
  customSelector: ":scope > button",
10762
10762
  disabled: disabled,
@@ -10767,10 +10767,10 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
10767
10767
  setValue: setValue,
10768
10768
  tabIndex: -1,
10769
10769
  value: value
10770
- }, searchQuery === '' ? /*#__PURE__*/React__default.createElement(Collection$1, null, initialChildren) : /*#__PURE__*/React__default.createElement(Collection$1, null, filteredChildren), onCreate ? /*#__PURE__*/React__default.createElement(Create, {
10770
+ }, searchQuery === '' ? ( /*#__PURE__*/React__default.createElement(Collection$1, null, initialChildren)) : ( /*#__PURE__*/React__default.createElement(Collection$1, null, filteredChildren)), onCreate ? /*#__PURE__*/React__default.createElement(Create, {
10771
10771
  onCreate: onCreate,
10772
10772
  options: flattenedChildren
10773
- }) : null))))));
10773
+ }) : null)))))));
10774
10774
  });
10775
10775
  Select2.Option = Option$1;
10776
10776
  Select2.Group = Group$2;
@@ -10803,10 +10803,10 @@ const ControlledHiddenField = props => {
10803
10803
  value: bubbleValue
10804
10804
  }, emptyValue !== undefined ? /*#__PURE__*/React__default.createElement("option", {
10805
10805
  value: emptyValue
10806
- }) : null, options.map(option => /*#__PURE__*/React__default.createElement("option", {
10806
+ }) : null, options.map(option => ( /*#__PURE__*/React__default.createElement("option", {
10807
10807
  key: String(option),
10808
10808
  value: String(option)
10809
- })));
10809
+ }))));
10810
10810
  }
10811
10811
  return null;
10812
10812
  };
@@ -11213,7 +11213,7 @@ const useRowActions = (inlineEditingUniqueId, handlers, actions, rowExpansionRen
11213
11213
  }
11214
11214
  const sanitizedRow = sanitizeRowProps(row, rowExpansionRenderer);
11215
11215
  const [primaryActions, secondaryActions] = getActions(actions, sanitizedRow);
11216
- const output = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, handlers.onRowCreate && /*#__PURE__*/React__default.createElement(IconButton, {
11216
+ const output = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, handlers.onRowCreate && ( /*#__PURE__*/React__default.createElement(IconButton, {
11217
11217
  appearance: "discrete",
11218
11218
  icon: "circle-plus",
11219
11219
  "aria-label": texts.table.newSubRow,
@@ -11228,7 +11228,7 @@ const useRowActions = (inlineEditingUniqueId, handlers, actions, rowExpansionRen
11228
11228
  }
11229
11229
  handlers.onRowCreate(sanitizedRow, event);
11230
11230
  }
11231
- }), (inlineEditing || handlers.onRowEdit) && /*#__PURE__*/React__default.createElement(IconButton, {
11231
+ })), (inlineEditing || handlers.onRowEdit) && ( /*#__PURE__*/React__default.createElement(IconButton, {
11232
11232
  appearance: "discrete",
11233
11233
  icon: "edit",
11234
11234
  "aria-label": texts.table.edit,
@@ -11244,7 +11244,7 @@ const useRowActions = (inlineEditingUniqueId, handlers, actions, rowExpansionRen
11244
11244
  handlers.onRowEdit(sanitizedRow, event);
11245
11245
  }
11246
11246
  }
11247
- }), handlers.onRowCopy && /*#__PURE__*/React__default.createElement(IconButton, {
11247
+ })), handlers.onRowCopy && ( /*#__PURE__*/React__default.createElement(IconButton, {
11248
11248
  appearance: "discrete",
11249
11249
  icon: "copy",
11250
11250
  "aria-label": texts.table.copy,
@@ -11256,7 +11256,7 @@ const useRowActions = (inlineEditingUniqueId, handlers, actions, rowExpansionRen
11256
11256
  row.setActive();
11257
11257
  handlers.onRowCopy(sanitizedRow, event);
11258
11258
  }
11259
- }), handlers.onRowDelete && /*#__PURE__*/React__default.createElement(IconButton, {
11259
+ })), handlers.onRowDelete && ( /*#__PURE__*/React__default.createElement(IconButton, {
11260
11260
  appearance: "discrete",
11261
11261
  icon: "delete",
11262
11262
  "aria-label": texts.table.del,
@@ -11268,12 +11268,12 @@ const useRowActions = (inlineEditingUniqueId, handlers, actions, rowExpansionRen
11268
11268
  row.setActive();
11269
11269
  handlers.onRowDelete(sanitizedRow, event);
11270
11270
  }
11271
- }), primaryActions.map((action, index) => /*#__PURE__*/React__default.createElement(IconButton, Object.assign({}, getActionProps(action, sanitizedRow), {
11271
+ })), primaryActions.map((action, index) => ( /*#__PURE__*/React__default.createElement(IconButton, Object.assign({}, getActionProps(action, sanitizedRow), {
11272
11272
  key: index,
11273
11273
  appearance: "discrete",
11274
11274
  icon: typeof action.icon === 'function' ? action.icon(sanitizedRow) : action.icon,
11275
11275
  tooltip: typeof action.tooltip === 'function' ? action.tooltip(sanitizedRow) : action.tooltip
11276
- }))), secondaryActions.length ? /*#__PURE__*/React__default.createElement(Menu$1, null, /*#__PURE__*/React__default.createElement(Menu$1.Trigger, null, /*#__PURE__*/React__default.createElement(IconButton, {
11276
+ })))), secondaryActions.length ? ( /*#__PURE__*/React__default.createElement(Menu$1, null, /*#__PURE__*/React__default.createElement(Menu$1.Trigger, null, /*#__PURE__*/React__default.createElement(IconButton, {
11277
11277
  appearance: "discrete",
11278
11278
  icon: "ellipsis-vertical",
11279
11279
  "aria-label": texts.table.actions,
@@ -11283,10 +11283,10 @@ const useRowActions = (inlineEditingUniqueId, handlers, actions, rowExpansionRen
11283
11283
  event.stopPropagation();
11284
11284
  row.setActive();
11285
11285
  }
11286
- })), /*#__PURE__*/React__default.createElement(Menu$1.Content, null, secondaryActions.map((action, index) => /*#__PURE__*/React__default.createElement(Menu$1.Item, Object.assign({
11286
+ })), /*#__PURE__*/React__default.createElement(Menu$1.Content, null, secondaryActions.map((action, index) => ( /*#__PURE__*/React__default.createElement(Menu$1.Item, Object.assign({
11287
11287
  key: index,
11288
11288
  icon: typeof action.icon === 'function' ? action.icon(sanitizedRow) : action.icon
11289
- }, getActionProps(action, sanitizedRow)), typeof action.text === 'function' ? action.text(sanitizedRow) : action.text)))) : null);
11289
+ }, getActionProps(action, sanitizedRow)), typeof action.text === 'function' ? action.text(sanitizedRow) : action.text)))))) : null);
11290
11290
  if (windowed) {
11291
11291
  return /*#__PURE__*/React__default.createElement("div", {
11292
11292
  className: actionGroupClassName
@@ -11297,10 +11297,10 @@ const useRowActions = (inlineEditingUniqueId, handlers, actions, rowExpansionRen
11297
11297
  }, ({
11298
11298
  inView,
11299
11299
  ref
11300
- }) => /*#__PURE__*/React__default.createElement("div", {
11300
+ }) => ( /*#__PURE__*/React__default.createElement("div", {
11301
11301
  className: actionGroupClassName,
11302
11302
  ref: ref
11303
- }, inView ? output : null));
11303
+ }, inView ? output : null)));
11304
11304
  }
11305
11305
  }]);
11306
11306
  }
@@ -11934,10 +11934,10 @@ const Column = ({
11934
11934
  "data-taco": "table-column"
11935
11935
  }), /*#__PURE__*/React__default.createElement("span", {
11936
11936
  className: "truncate"
11937
- }, cell.render('Header')), cell.isSorted ? /*#__PURE__*/React__default.createElement(Icon, {
11937
+ }, cell.render('Header')), cell.isSorted ? ( /*#__PURE__*/React__default.createElement(Icon, {
11938
11938
  name: cell.isSortedDesc ? 'chevron-down-solid' : 'chevron-up-solid',
11939
11939
  className: "-mt-0.5"
11940
- }) : null);
11940
+ })) : null);
11941
11941
  };
11942
11942
 
11943
11943
  const DefaultEmptyState = () => null;
@@ -11966,15 +11966,15 @@ const BaseTable = /*#__PURE__*/React__default.forwardRef(function BaseTable(prop
11966
11966
  role: "rowgroup",
11967
11967
  className: "yt-table__head",
11968
11968
  ref: headerRef
11969
- }, headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map((headerGroup, index) => /*#__PURE__*/React__default.createElement("div", {
11969
+ }, headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map((headerGroup, index) => ( /*#__PURE__*/React__default.createElement("div", {
11970
11970
  key: index,
11971
11971
  role: "row",
11972
11972
  className: "border-grey-300 flex h-auto min-h-[2.5rem] w-full select-none border-t-0 border-b-2 font-bold"
11973
- }, headerGroup.headers.map((cell, index) => /*#__PURE__*/React__default.createElement(Column, {
11973
+ }, headerGroup.headers.map((cell, index) => ( /*#__PURE__*/React__default.createElement(Column, {
11974
11974
  key: index,
11975
11975
  index: index,
11976
11976
  cell: cell
11977
- }))))), /*#__PURE__*/React__default.createElement("div", {
11977
+ }))))))), /*#__PURE__*/React__default.createElement("div", {
11978
11978
  role: "rowgroup",
11979
11979
  className: "yt-table__body",
11980
11980
  ref: bodyRef
@@ -12172,14 +12172,14 @@ const WindowedTable = /*#__PURE__*/React__default.forwardRef(function WindowedTa
12172
12172
  }, ({
12173
12173
  onItemsRendered,
12174
12174
  ref
12175
- }) => /*#__PURE__*/React__default.createElement(reactWindow.VariableSizeList, Object.assign({}, listProps, {
12175
+ }) => ( /*#__PURE__*/React__default.createElement(reactWindow.VariableSizeList, Object.assign({}, listProps, {
12176
12176
  itemCount: length,
12177
12177
  onItemsRendered: onItemsRendered,
12178
12178
  ref: list => {
12179
12179
  ref(list);
12180
12180
  setRowsRef(list);
12181
12181
  }
12182
- }), VariableRow));
12182
+ }), VariableRow)));
12183
12183
  } else {
12184
12184
  list = /*#__PURE__*/React__default.createElement(reactWindow.VariableSizeList, Object.assign({}, listProps, {
12185
12185
  itemCount: rows.length,
@@ -12346,6 +12346,57 @@ function GotoPopover(props) {
12346
12346
  })));
12347
12347
  }
12348
12348
 
12349
+ // Determines the scroll distance required to display a specific cell in the table.
12350
+ // Returns the scroll distance if scrolling is necessary; otherwise, returns null.
12351
+ function getTableLeftScrollDistance(tableElement, cell, frozenColumnIndex, isEditing = false) {
12352
+ var _Array$from;
12353
+ const row = cell === null || cell === void 0 ? void 0 : cell.closest('[role="row"]');
12354
+ // When editing is enabled, the action column overlays other columns.
12355
+ // To account for it, incorporate a 'rightOffset' during table scrolling towards the right.
12356
+ // 60px is the width of the action column and 10px is added to account for the shadow that it has.
12357
+ const rightOffset = isEditing ? 70 : 0;
12358
+ if (!row) {
12359
+ return null;
12360
+ }
12361
+ const rowChildren = (_Array$from = Array.from(row.children)) !== null && _Array$from !== void 0 ? _Array$from : [];
12362
+ const cellIndex = rowChildren.indexOf(cell);
12363
+ if (cellIndex === -1) {
12364
+ return null;
12365
+ }
12366
+ let scrollDistance = 0;
12367
+ const EXTRA_SPACING = 0;
12368
+ const tableRect = tableElement.getBoundingClientRect();
12369
+ const cellRect = cell.getBoundingClientRect();
12370
+ const tableShouldScrollRight = cellRect.right > tableRect.right - rightOffset;
12371
+ const tableShouldScrollLeft = cellRect.left < tableRect.left;
12372
+ // If column header is behind the frozen columns then scroll the parentHeader into view
12373
+ if (frozenColumnIndex !== -1 && cellIndex > frozenColumnIndex) {
12374
+ var _rowChildren$frozenCo;
12375
+ const lastFrozenColumnRect = (_rowChildren$frozenCo = rowChildren[frozenColumnIndex]) === null || _rowChildren$frozenCo === void 0 ? void 0 : _rowChildren$frozenCo.getBoundingClientRect();
12376
+ const isColumnBehindFrozenColumn = lastFrozenColumnRect.right > cellRect.left;
12377
+ if (isColumnBehindFrozenColumn) {
12378
+ scrollDistance = tableElement.scrollLeft - (lastFrozenColumnRect.right - cellRect.left);
12379
+ return scrollDistance;
12380
+ } else if (tableShouldScrollRight) {
12381
+ scrollDistance = tableElement.scrollLeft + (cellRect.right - tableRect.right + EXTRA_SPACING) + rightOffset;
12382
+ return scrollDistance;
12383
+ }
12384
+ // If column is not behind frozen columns and table doesn't have to be scrolled right to show
12385
+ // the column then that means that the column is visible on the screen
12386
+ } else {
12387
+ if (tableShouldScrollLeft) {
12388
+ scrollDistance = tableElement.scrollLeft - (tableRect.left - cellRect.left);
12389
+ return scrollDistance;
12390
+ } else if (tableShouldScrollRight) {
12391
+ scrollDistance = tableElement.scrollLeft + (cellRect.right - tableRect.right + EXTRA_SPACING) + rightOffset;
12392
+ return scrollDistance;
12393
+ }
12394
+ // If table doesn't have to be scrolled right or left to show the column then that means that
12395
+ // the column is visible on the screen
12396
+ }
12397
+ return null;
12398
+ }
12399
+
12349
12400
  function isGotoAvailable(table, header) {
12350
12401
  if (isInternalColumn(header.id)) {
12351
12402
  return false;
@@ -12381,6 +12432,34 @@ function Menu$3(props) {
12381
12432
  } = useLocalization();
12382
12433
  const [popover, setPopover] = React__default.useState(undefined);
12383
12434
  const [sortDirectionState, setSortDirectionState] = React__default.useState(sortDirection);
12435
+ const ref = React__default.useRef(null);
12436
+ const gotoShortcut = 'g';
12437
+ React__default.useEffect(() => {
12438
+ const {
12439
+ frozenColumnIndex: externalFrozenColumnIndex = -1,
12440
+ frozenInternalColumnCount = 0
12441
+ } = tableMeta.columnFreezing;
12442
+ const handler = createShortcutKeyDownHandler(gotoShortcut, () => {
12443
+ // Only execute the below code if the header menu has goto menu item
12444
+ if (handleGoto) {
12445
+ var _ref$current;
12446
+ const tableElement = tableMeta.tableRef.current;
12447
+ const frozenColumnIndex = externalFrozenColumnIndex > -1 ? externalFrozenColumnIndex + frozenInternalColumnCount : frozenInternalColumnCount - 1;
12448
+ const parentHeader = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.closest('[role="columnheader"]');
12449
+ if (!tableElement || !parentHeader) {
12450
+ return;
12451
+ }
12452
+ const leftScrollDistance = getTableLeftScrollDistance(tableElement, parentHeader, frozenColumnIndex);
12453
+ if (leftScrollDistance !== null) {
12454
+ tableElement.scrollLeft = leftScrollDistance;
12455
+ }
12456
+ }
12457
+ },
12458
+ // Prevents the stopping of event propagation
12459
+ false);
12460
+ document.addEventListener('keydown', handler);
12461
+ return () => document.removeEventListener('keydown', handler);
12462
+ }, [tableMeta.columnFreezing.frozenColumnIndex, handleGoto]);
12384
12463
  const handleSortMenuRadioGroupChange = newSortDirection => {
12385
12464
  setSortDirectionState(newSortDirection);
12386
12465
  handleSortToggle(newSortDirection);
@@ -12397,7 +12476,7 @@ function Menu$3(props) {
12397
12476
  const _temp = _finallyRethrows(function () {
12398
12477
  return _catch(function () {
12399
12478
  return Promise.resolve(handleGoto(query)).then(function (index) {
12400
- tableMeta.currentRow.setCurrentRowIndex(index);
12479
+ tableMeta.rowActive.setRowActiveIndex(index);
12401
12480
  scrollToIndex(index + 2, {
12402
12481
  align: 'center'
12403
12482
  });
@@ -12440,7 +12519,7 @@ function Menu$3(props) {
12440
12519
  if (canSort) {
12441
12520
  menuItems.push( /*#__PURE__*/React__default.createElement(Menu$1.Item, {
12442
12521
  icon: "sort-by",
12443
- subMenu: () => /*#__PURE__*/React__default.createElement(Menu$1.SubMenu, null, /*#__PURE__*/React__default.createElement(Menu$1.RadioGroup, {
12522
+ subMenu: () => ( /*#__PURE__*/React__default.createElement(Menu$1.SubMenu, null, /*#__PURE__*/React__default.createElement(Menu$1.RadioGroup, {
12444
12523
  onChange: handleSortMenuRadioGroupChange,
12445
12524
  value: sortDirectionState
12446
12525
  }, /*#__PURE__*/React__default.createElement(Menu$1.RadioGroup.Item, {
@@ -12449,14 +12528,14 @@ function Menu$3(props) {
12449
12528
  value: SORT_DIRECTION.DESC
12450
12529
  }, texts.table3.columns.menu.sortingOrder.descending), /*#__PURE__*/React__default.createElement(Menu$1.RadioGroup.Item, {
12451
12530
  value: false
12452
- }, texts.table3.columns.menu.sortingOrder.unsorted)))
12531
+ }, texts.table3.columns.menu.sortingOrder.unsorted))))
12453
12532
  }, texts.table3.columns.menu.sorting));
12454
12533
  }
12455
12534
  if (handleGoto) {
12456
12535
  menuItems.push( /*#__PURE__*/React__default.createElement(Menu$1.Item, {
12457
12536
  icon: "move",
12458
12537
  onClick: () => setPopover('goto'),
12459
- shortcut: "g"
12538
+ shortcut: gotoShortcut
12460
12539
  }, texts.table3.columns.menu.gotoRow, "..."));
12461
12540
  }
12462
12541
  if (canFreeze) {
@@ -12495,9 +12574,10 @@ function Menu$3(props) {
12495
12574
  return /*#__PURE__*/React__default.createElement(IconButton, {
12496
12575
  className: className,
12497
12576
  icon: "more",
12498
- menu: popoverElement ? undefined : menuProps => /*#__PURE__*/React__default.createElement(Menu$1, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu$1.Content, null, memoedMenuItems)),
12577
+ menu: popoverElement ? undefined : menuProps => ( /*#__PURE__*/React__default.createElement(Menu$1, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu$1.Content, null, memoedMenuItems))),
12499
12578
  popover: popoverElement,
12500
- onClickCapture: event => event.preventDefault()
12579
+ onClickCapture: event => event.preventDefault(),
12580
+ ref: ref
12501
12581
  });
12502
12582
  }
12503
12583
 
@@ -12607,7 +12687,7 @@ function Header$1(props) {
12607
12687
  }
12608
12688
  return undefined;
12609
12689
  }, [hasGoto, JSON.stringify(sorting), JSON.stringify(filters), search]);
12610
- const memoedProps = {
12690
+ const headerContentProps = {
12611
12691
  align: columnMeta.align,
12612
12692
  canFreeze: tableMeta.columnFreezing.isEnabled,
12613
12693
  canHide: column.getCanHide(),
@@ -12621,7 +12701,7 @@ function Header$1(props) {
12621
12701
  index: header.index,
12622
12702
  isFrozen: isFrozenColumn(header, table),
12623
12703
  isPlaceholder: header.isPlaceholder,
12624
- isPrinting: tableMeta.isPrinting,
12704
+ isPrinting: tableMeta.printing.isPrinting,
12625
12705
  isResizing: column.getIsResizing(),
12626
12706
  length: table.getRowModel().rows.length,
12627
12707
  meta: columnMeta,
@@ -12634,9 +12714,9 @@ function Header$1(props) {
12634
12714
  sortDirection: column.getIsSorted(),
12635
12715
  table
12636
12716
  };
12637
- return /*#__PURE__*/React__default.createElement(MemoedHeader, Object.assign({}, memoedProps));
12717
+ return /*#__PURE__*/React__default.createElement(HeaderContent, Object.assign({}, headerContentProps));
12638
12718
  }
12639
- const MemoedHeader = /*#__PURE__*/React__default.memo(function MemoedHeader(props) {
12719
+ function HeaderContent(props) {
12640
12720
  var _meta$tooltip;
12641
12721
  const {
12642
12722
  align,
@@ -12703,16 +12783,16 @@ const MemoedHeader = /*#__PURE__*/React__default.memo(function MemoedHeader(prop
12703
12783
  "data-column-index": index,
12704
12784
  role: "columnheader",
12705
12785
  ref: setInternalRef
12706
- }), isPlaceholder ? null : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, isInternalColumn(id) ? children : /*#__PURE__*/React__default.createElement(Tooltip, {
12786
+ }), isPlaceholder ? null : ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, isInternalColumn(id) ? children : ( /*#__PURE__*/React__default.createElement(Tooltip, {
12707
12787
  title: String((_meta$tooltip = meta === null || meta === void 0 ? void 0 : meta.tooltip) !== null && _meta$tooltip !== void 0 ? _meta$tooltip : children),
12708
12788
  placement: "top"
12709
12789
  }, /*#__PURE__*/React__default.createElement("span", {
12710
12790
  className: cn({
12711
12791
  truncate: !isPrinting
12712
12792
  })
12713
- }, children)), canSort ? /*#__PURE__*/React__default.createElement(SortIndicator, {
12793
+ }, children))), canSort ? /*#__PURE__*/React__default.createElement(SortIndicator, {
12714
12794
  direction: sortDirection
12715
- }) : null, hasMenu ? /*#__PURE__*/React__default.createElement(Menu$3, {
12795
+ }) : null, hasMenu ? ( /*#__PURE__*/React__default.createElement(Menu$3, {
12716
12796
  canFreeze: canFreeze,
12717
12797
  canHide: canHide,
12718
12798
  canSort: canSort,
@@ -12728,11 +12808,11 @@ const MemoedHeader = /*#__PURE__*/React__default.memo(function MemoedHeader(prop
12728
12808
  scrollToIndex: scrollToIndex,
12729
12809
  sortDirection: sortDirection,
12730
12810
  table: table
12731
- }) : null), hasSeparator ? /*#__PURE__*/React__default.createElement(HeaderSeparator, null) : null, !isPlaceholder && canResize ? /*#__PURE__*/React__default.createElement(Resizer, {
12811
+ })) : null)), hasSeparator ? /*#__PURE__*/React__default.createElement(HeaderSeparator, null) : null, !isPlaceholder && canResize ? /*#__PURE__*/React__default.createElement(Resizer, {
12732
12812
  isResizing: isResizing,
12733
12813
  onResize: handleResize
12734
12814
  }) : null);
12735
- });
12815
+ }
12736
12816
  function HeaderSeparator() {
12737
12817
  return /*#__PURE__*/React__default.createElement("div", {
12738
12818
  "data-taco": "header-separator",
@@ -12853,13 +12933,13 @@ const MemoedDisplayCell = /*#__PURE__*/React__default.memo(function MemoedDispla
12853
12933
  role: "cell",
12854
12934
  // cells must be focusable (but not included in tabbing - hence -1)
12855
12935
  tabIndex: -1
12856
- }, highlighted ? /*#__PURE__*/React__default.createElement(Highlight, {
12936
+ }, highlighted ? ( /*#__PURE__*/React__default.createElement(Highlight, {
12857
12937
  className: layoutClassName,
12858
12938
  current: highlightedAsCurrent,
12859
12939
  frozenColumnIndex: frozenColumnIndex,
12860
12940
  index: index,
12861
12941
  tableRef: tableRef
12862
- }, content) : content);
12942
+ }, content)) : content);
12863
12943
  });
12864
12944
 
12865
12945
  function Footer$3(props) {
@@ -12901,9 +12981,9 @@ const MemoedFooter = /*#__PURE__*/React__default.memo(function MemoedFooter(prop
12901
12981
  "data-align": align,
12902
12982
  "data-column-index": index,
12903
12983
  role: "columnheader"
12904
- }, typeof meta.footer === 'function' ? /*#__PURE__*/React__default.createElement("span", {
12984
+ }, typeof meta.footer === 'function' ? ( /*#__PURE__*/React__default.createElement("span", {
12905
12985
  className: "flex-grow truncate"
12906
- }, meta.footer(table.getRowModel().rows.map(row => row.original[id]))) : null);
12986
+ }, meta.footer(table.getRowModel().rows.map(row => row.original[id])))) : null);
12907
12987
  });
12908
12988
 
12909
12989
  const FONT_SIZE = {
@@ -12936,7 +13016,7 @@ const MemoedCell = /*#__PURE__*/React__default.memo(function MemoedCell(props) {
12936
13016
  actions,
12937
13017
  actionsLength,
12938
13018
  fontSize,
12939
- isCurrentRow,
13019
+ isActiveRow,
12940
13020
  isEditing,
12941
13021
  isResizingColumn,
12942
13022
  isHoverStatePaused,
@@ -12966,7 +13046,7 @@ const MemoedCell = /*#__PURE__*/React__default.memo(function MemoedCell(props) {
12966
13046
  let content;
12967
13047
  // We don't want to show actions in edit mode, since we have editing actions,
12968
13048
  // which is shown in edit mode instead.
12969
- if (actions !== null && actions !== void 0 && actions.length && !isEditing && (isCurrentRow || isHovered && !isHoverStatePaused && !isResizingColumn)) {
13049
+ if (actions !== null && actions !== void 0 && actions.length && !isEditing && (isActiveRow || isHovered && !isHoverStatePaused && !isResizingColumn)) {
12970
13050
  const visibleActions = actions.map(action => action(row.original)).filter(action => !!action);
12971
13051
  const actionsOnRow = visibleActions.length === actionsLength ? visibleActions : visibleActions.slice(0, actionsLength - 1);
12972
13052
  const actionsInMenu = visibleActions.slice(visibleActions.length === actionsLength ? actionsLength : actionsLength - 1);
@@ -12984,23 +13064,23 @@ const MemoedCell = /*#__PURE__*/React__default.memo(function MemoedCell(props) {
12984
13064
  return /*#__PURE__*/React__default.cloneElement(button, {
12985
13065
  appearance: 'transparent',
12986
13066
  key: index,
12987
- tabIndex: isCurrentRow ? 0 : -1,
12988
- tooltip: button.props.shortcut ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, tooltip, /*#__PURE__*/React__default.createElement(Shortcut, {
13067
+ tabIndex: isActiveRow ? 0 : -1,
13068
+ tooltip: button.props.shortcut ? ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, tooltip, /*#__PURE__*/React__default.createElement(Shortcut, {
12989
13069
  className: "ml-2",
12990
13070
  keys: button.props.shortcut
12991
- })) : tooltip
13071
+ }))) : tooltip
12992
13072
  });
12993
- }), actionsInMenu.length ? /*#__PURE__*/React__default.createElement(IconButton, {
13073
+ }), actionsInMenu.length ? ( /*#__PURE__*/React__default.createElement(IconButton, {
12994
13074
  appearance: "transparent",
12995
13075
  "aria-label": texts.table3.columns.actions.tooltip,
12996
13076
  icon: "more",
12997
- tabIndex: isCurrentRow ? 0 : -1,
12998
- menu: menuProps => /*#__PURE__*/React__default.createElement(Menu$1, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu$1.Content, null, actionsInMenu.map((action, i) => /*#__PURE__*/React__default.createElement(Menu$1.Item, Object.assign({
13077
+ tabIndex: isActiveRow ? 0 : -1,
13078
+ menu: menuProps => ( /*#__PURE__*/React__default.createElement(Menu$1, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu$1.Content, null, actionsInMenu.map((action, i) => ( /*#__PURE__*/React__default.createElement(Menu$1.Item, Object.assign({
12999
13079
  key: i
13000
13080
  }, action.props, {
13001
13081
  shortcut: action.props.shortcut
13002
- }), action.props['aria-label']))))
13003
- }) : null);
13082
+ }), action.props['aria-label']))))))
13083
+ })) : null);
13004
13084
  }
13005
13085
  return /*#__PURE__*/React__default.createElement(DisplayCell, Object.assign({}, props), content);
13006
13086
  });
@@ -13013,10 +13093,10 @@ function Cell(context) {
13013
13093
  actions: tableMeta.rowActions.actionsForRow,
13014
13094
  actionsLength: tableMeta.rowActions.actionsForRowLength,
13015
13095
  fontSize: tableMeta.fontSize.size,
13016
- isCurrentRow: tableMeta.currentRow.currentRowIndex === rowIndex,
13096
+ isActiveRow: tableMeta.rowActive.rowActiveIndex === rowIndex,
13017
13097
  isEditing: tableMeta.editing.isEditing,
13018
13098
  isResizingColumn: !!context.table.getState().columnSizingInfo.isResizingColumn,
13019
- isHoverStatePaused: !!tableMeta.hoverState.isPaused
13099
+ isHoverStatePaused: !!tableMeta.rowActive.isHoverStatePaused
13020
13100
  }));
13021
13101
  }
13022
13102
  function createRowActionsColumn() {
@@ -13091,6 +13171,64 @@ function getCellValueAsString(value, dataType) {
13091
13171
  return String(value);
13092
13172
  }
13093
13173
 
13174
+ // settings
13175
+ var TableFontSizes;
13176
+ (function (TableFontSizes) {
13177
+ TableFontSizes["small"] = "small";
13178
+ TableFontSizes["medium"] = "medium";
13179
+ TableFontSizes["large"] = "large";
13180
+ })(TableFontSizes || (TableFontSizes = {}));
13181
+
13182
+ // column widths
13183
+ const getCellMinWidth = (fontSize = 'medium') => {
13184
+ switch (fontSize) {
13185
+ case TableFontSizes.small:
13186
+ return 57;
13187
+ case TableFontSizes.large:
13188
+ return 83;
13189
+ default:
13190
+ case TableFontSizes.medium:
13191
+ return 72;
13192
+ }
13193
+ };
13194
+ // ordering
13195
+ function ensureOrdering(columns, internalColumnsPinnedToTheRight, settingsOrder) {
13196
+ // internal columns come with a defined order
13197
+ const internalColumns = columns.filter(column => {
13198
+ var _column$id;
13199
+ return ((_column$id = column.id) === null || _column$id === void 0 ? void 0 : _column$id.startsWith('__')) && !internalColumnsPinnedToTheRight.includes(column.id);
13200
+ }).map(column => column.id);
13201
+ // columns with ordering disabled should be moved to the front
13202
+ const orderingDisabled = [];
13203
+ const orderingEnabled = [];
13204
+ let orderedColumns = columns;
13205
+ // if settings is defined, make sure the columns that are actual children are sorted by it
13206
+ if (Array.isArray(settingsOrder)) {
13207
+ orderedColumns = columns.slice().sort(
13208
+ // the magic >>> 0 here ensures that columns that aren't found in settings, but are children, are pushed to the end
13209
+ (a, b) => (settingsOrder.indexOf(a.id) >>> 0) - (settingsOrder.indexOf(b.id) >>> 0));
13210
+ }
13211
+ orderedColumns.forEach(column => {
13212
+ var _column$id2, _column$meta;
13213
+ if ((_column$id2 = column.id) !== null && _column$id2 !== void 0 && _column$id2.startsWith('__')) {
13214
+ return;
13215
+ }
13216
+ if ((_column$meta = column.meta) !== null && _column$meta !== void 0 && _column$meta.enableOrdering) {
13217
+ orderingEnabled.push(column.id);
13218
+ } else {
13219
+ orderingDisabled.push(column.id);
13220
+ }
13221
+ });
13222
+ const order = [...internalColumns, ...orderingDisabled, ...orderingEnabled];
13223
+ // actions should always be last, enforce that
13224
+ internalColumnsPinnedToTheRight.forEach(id => {
13225
+ if (columns.findIndex(column => column.id === id) > -1) {
13226
+ order.push(id);
13227
+ }
13228
+ });
13229
+ return order;
13230
+ }
13231
+
13094
13232
  const PRINT_MIN_COLUMN_SIZE = 20; // while printing, it accounts for minimum width each column can take
13095
13233
  const getCellAlignmentClasses = (alignment = 'left') => {
13096
13234
  return cn({
@@ -13099,18 +13237,7 @@ const getCellAlignmentClasses = (alignment = 'left') => {
13099
13237
  'justify-center text-center': alignment === 'center'
13100
13238
  });
13101
13239
  };
13102
- const getFontBasedMinColumnSize = fontSize => {
13103
- // The minimum column size are based on the minimum usuable width of Datepicker
13104
- switch (fontSize) {
13105
- case FONT_SIZE.small:
13106
- return 57;
13107
- case FONT_SIZE.large:
13108
- return 83;
13109
- default:
13110
- case FONT_SIZE.medium:
13111
- return 72;
13112
- }
13113
- };
13240
+ const getFontBasedMinColumnSize = getCellMinWidth;
13114
13241
  // Hiding input number spin buttons
13115
13242
  const getInputAppearanceClassnames = () => {
13116
13243
  return cn('[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none');
@@ -13175,62 +13302,65 @@ const useCssGrid = (table, isPrintTable = false, actionsForRowLength = 0, fontSi
13175
13302
  };
13176
13303
  };
13177
13304
 
13178
- function useCurrentRow(defaultCurrentRowIndex) {
13179
- const [currentRowIndex, setCurrentRowIndex] = React__default.useState(defaultCurrentRowIndex);
13180
- const move = (direction, length, scrollToIndex) => setCurrentRowIndex(currentIndex => {
13305
+ function focusFirstElementInActiveRow(tableRef) {
13306
+ const selector = '[data-taco="table2-body"] [role="row"] [role="cell"]:first-child';
13307
+ setTimeout(() => {
13308
+ var _tableRef$current, _tableRef$current$que;
13309
+ (_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : (_tableRef$current$que = _tableRef$current.querySelector(selector)) === null || _tableRef$current$que === void 0 ? void 0 : _tableRef$current$que.focus();
13310
+ }, 1);
13311
+ }
13312
+ function useTableRowActive$1(isEnabled = false, initialRowActiveIndex) {
13313
+ const [rowActiveIndex, setRowActiveIndex] = React__default.useState(initialRowActiveIndex);
13314
+ const [isHoverStatePaused, setHoverStatePaused] = useIsHoverStatePaused();
13315
+ const move = (direction, length, scrollToIndex) => setRowActiveIndex(currentIndex => {
13181
13316
  const nextIndex = currentIndex !== undefined ? getNextIndex(direction, currentIndex, length) : 0;
13182
13317
  scrollToIndex(direction === -1 ? nextIndex : nextIndex + 3);
13183
13318
  return nextIndex;
13184
13319
  });
13185
- const moveUp = (length, callback) => move(-1, length, callback);
13186
- const moveDown = (length, callback) => move(1, length, callback);
13187
- const focusFirstElementInCurrentRow = tableRef => {
13188
- setTimeout(() => {
13189
- var _tableRef$current, _tableRef$current$que;
13190
- (_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : (_tableRef$current$que = _tableRef$current.querySelector('[data-taco="table2-body"] [role="row"] [role="cell"]:first-child')) === null || _tableRef$current$que === void 0 ? void 0 : _tableRef$current$que.focus();
13191
- }, 1);
13192
- };
13193
- const onKeyDown = React__default.useCallback((event, length, scrollToIndex, isEditing, tableRef) => {
13194
- if (event.defaultPrevented) {
13320
+ const onKeyDown = React__default.useCallback((event, length, scrollToIndex, tableRef) => {
13321
+ if (!isEnabled || event.defaultPrevented) {
13195
13322
  return;
13196
13323
  }
13324
+ if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
13325
+ setHoverStatePaused(true);
13326
+ }
13197
13327
  if (event.key === 'ArrowUp') {
13198
13328
  event.preventDefault();
13199
13329
  if (event.ctrlKey || event.metaKey) {
13200
13330
  const newIndex = 0;
13201
- setCurrentRowIndex(newIndex);
13331
+ setRowActiveIndex(newIndex);
13202
13332
  scrollToIndex(newIndex);
13203
13333
  } else {
13204
- moveUp(length, scrollToIndex);
13334
+ move(-1, length, scrollToIndex);
13205
13335
  }
13206
- if (!isEditing) {
13207
- focusFirstElementInCurrentRow(tableRef);
13336
+ if (tableRef) {
13337
+ focusFirstElementInActiveRow(tableRef);
13208
13338
  }
13209
13339
  return;
13210
13340
  } else if (event.key === 'ArrowDown') {
13211
13341
  event.preventDefault();
13212
13342
  if (event.ctrlKey || event.metaKey) {
13213
13343
  const newIndex = length - 1;
13214
- setCurrentRowIndex(newIndex);
13344
+ setRowActiveIndex(newIndex);
13215
13345
  scrollToIndex(newIndex);
13216
13346
  } else {
13217
- moveDown(length, scrollToIndex);
13347
+ move(+1, length, scrollToIndex);
13218
13348
  }
13219
- if (!isEditing) {
13220
- focusFirstElementInCurrentRow(tableRef);
13349
+ if (tableRef) {
13350
+ focusFirstElementInActiveRow(tableRef);
13221
13351
  }
13222
13352
  return;
13223
13353
  }
13224
- }, []);
13354
+ }, [isEnabled]);
13225
13355
  const onFocus = React__default.useCallback((event, length, scrollToIndex) => {
13226
- if (event.isDefaultPrevented()) {
13356
+ if (!isEnabled || event.isDefaultPrevented()) {
13227
13357
  return;
13228
13358
  }
13229
- if (currentRowIndex === undefined && length > 0) {
13359
+ if (rowActiveIndex === undefined && length > 0) {
13230
13360
  // do it in the next tick, otherwise it prevents internal focus from working
13231
13361
  // meaning you have to tab twice to get to the first focusable element
13232
13362
  setTimeout(() => {
13233
- setCurrentRowIndex(index => {
13363
+ setRowActiveIndex(index => {
13234
13364
  if (index === undefined) {
13235
13365
  scrollToIndex(0);
13236
13366
  return 0;
@@ -13239,46 +13369,32 @@ function useCurrentRow(defaultCurrentRowIndex) {
13239
13369
  });
13240
13370
  }, 1);
13241
13371
  }
13242
- }, [currentRowIndex, length]);
13372
+ }, [rowActiveIndex, length, isEnabled]);
13243
13373
  const onMouseCapture = React__default.useCallback((event, length) => {
13244
- if (event.isDefaultPrevented()) {
13374
+ if (!isEnabled || event.isDefaultPrevented()) {
13245
13375
  return;
13246
13376
  }
13247
- if (currentRowIndex === undefined && length > 0) {
13377
+ if (rowActiveIndex === undefined && length > 0) {
13248
13378
  event.preventDefault();
13249
13379
  event.stopPropagation();
13250
13380
  }
13251
- }, [currentRowIndex, length]);
13381
+ }, [rowActiveIndex, length, isEnabled]);
13252
13382
  return {
13253
- currentRowIndex,
13254
- setCurrentRowIndex,
13255
- handleFocus: onFocus,
13256
- handleKeyDown: onKeyDown,
13257
- handleMouseCapture: onMouseCapture
13383
+ isEnabled,
13384
+ rowActiveIndex,
13385
+ setRowActiveIndex: isEnabled ? setRowActiveIndex : () => undefined,
13386
+ isHoverStatePaused,
13387
+ setHoverStatePaused: isEnabled ? setHoverStatePaused : () => undefined,
13388
+ handleFocus: isEnabled ? onFocus : () => undefined,
13389
+ handleKeyDown: isEnabled ? onKeyDown : () => undefined,
13390
+ handleMouseCapture: isEnabled ? onMouseCapture : () => undefined
13258
13391
  };
13259
13392
  }
13260
- const getNextIndex = (direction, currentIndex, length) => {
13393
+ function getNextIndex(direction, currentIndex, length) {
13261
13394
  if (direction === -1) {
13262
13395
  return currentIndex - 1 > 0 ? currentIndex - 1 : 0;
13263
13396
  }
13264
13397
  return currentIndex + 1 < length ? currentIndex + 1 : currentIndex;
13265
- };
13266
-
13267
- function usePauseHoverState() {
13268
- const [isHoverStatePaused, setHoverStatePaused] = useIsHoverStatePaused();
13269
- const onKeyDown = React__default.useCallback(event => {
13270
- if (event.defaultPrevented) {
13271
- return;
13272
- }
13273
- if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
13274
- setHoverStatePaused(true);
13275
- }
13276
- }, []);
13277
- return {
13278
- isPaused: isHoverStatePaused,
13279
- pause: setHoverStatePaused,
13280
- handleKeyDown: onKeyDown
13281
- };
13282
13398
  }
13283
13399
 
13284
13400
  const DEFAULT_ALL_DISABLED = {
@@ -13379,22 +13495,8 @@ function useTablePreset(props) {
13379
13495
  };
13380
13496
  }
13381
13497
 
13382
- function convertDeprecatedRowDensityToRowHeight(rowHeight) {
13383
- switch (rowHeight) {
13384
- case 'compact':
13385
- return 'short';
13386
- case 'normal':
13387
- return 'medium';
13388
- case 'comfortable':
13389
- return 'tall';
13390
- case 'spacious':
13391
- return 'extra-tall';
13392
- default:
13393
- return rowHeight;
13394
- }
13395
- }
13396
- function useRowHeight(isEnabled, defaultRowHeight = 'medium') {
13397
- const [height, setHeight] = React__default.useState(convertDeprecatedRowDensityToRowHeight(defaultRowHeight));
13498
+ function useTableRowHeight(isEnabled = false, defaultRowHeight = 'medium') {
13499
+ const [height, setHeight] = React__default.useState(defaultRowHeight);
13398
13500
  return {
13399
13501
  isEnabled,
13400
13502
  height,
@@ -13402,7 +13504,7 @@ function useRowHeight(isEnabled, defaultRowHeight = 'medium') {
13402
13504
  };
13403
13505
  }
13404
13506
 
13405
- function useFontSize(isEnabled, defaultFontSize = 'medium') {
13507
+ function useTableFontSize(isEnabled = false, defaultFontSize = 'medium') {
13406
13508
  const [size, setSize] = React__default.useState(defaultFontSize);
13407
13509
  return {
13408
13510
  isEnabled,
@@ -13423,11 +13525,10 @@ function useLazyEffect(effect, deps) {
13423
13525
  }, deps);
13424
13526
  }
13425
13527
 
13426
- function useRowSelectionListener(table, onRowSelect) {
13427
- const rowSelection = table.getState().rowSelection;
13528
+ function useTableRowSelectionListener(table, onRowSelect) {
13529
+ const selectedRows = table.getSelectedRowModel().rows;
13428
13530
  useLazyEffect(() => {
13429
13531
  if (table.options.enableRowSelection && typeof onRowSelect === 'function') {
13430
- const selectedRows = table.getSelectedRowModel().rows;
13431
13532
  if (table.options.enableMultiRowSelection) {
13432
13533
  onRowSelect(selectedRows.map(row => row.original));
13433
13534
  } else {
@@ -13435,7 +13536,7 @@ function useRowSelectionListener(table, onRowSelect) {
13435
13536
  onRowSelect((_ref = [(_selectedRows$ = selectedRows[0]) === null || _selectedRows$ === void 0 ? void 0 : _selectedRows$.original]) !== null && _ref !== void 0 ? _ref : []);
13436
13537
  }
13437
13538
  }
13438
- }, [table.options.enableRowSelection, rowSelection]);
13539
+ }, [table.options.enableRowSelection, table.options.enableMultiRowSelection, selectedRows]);
13439
13540
  }
13440
13541
 
13441
13542
  function useRowDrag(isEnabled) {
@@ -13450,52 +13551,6 @@ function useRowDrag(isEnabled) {
13450
13551
  function useSettingsStateListener(table, onChangeSettings) {
13451
13552
  const meta = table.options.meta;
13452
13553
  const state = table.getState();
13453
- const prevFontSize = React__default.useRef(meta.fontSize.size);
13454
- React__default.useEffect(() => {
13455
- const newFontSize = meta.fontSize.size;
13456
- const oldFontSize = prevFontSize.current;
13457
- const {
13458
- small,
13459
- medium,
13460
- large
13461
- } = FONT_SIZE;
13462
- let columnSizeChange = 0;
13463
- switch (`${oldFontSize}-${newFontSize}`) {
13464
- case `${small}-${medium}`:
13465
- columnSizeChange = 8;
13466
- break;
13467
- case `${small}-${large}`:
13468
- columnSizeChange = 16;
13469
- break;
13470
- case `${medium}-${small}`:
13471
- columnSizeChange = -8;
13472
- break;
13473
- case `${medium}-${large}`:
13474
- columnSizeChange = 8;
13475
- break;
13476
- case `${large}-${small}`:
13477
- columnSizeChange = -16;
13478
- break;
13479
- case `${large}-${medium}`:
13480
- columnSizeChange = -8;
13481
- break;
13482
- default:
13483
- columnSizeChange = 0;
13484
- break;
13485
- }
13486
- prevFontSize.current = newFontSize;
13487
- if (columnSizeChange === 0) {
13488
- return;
13489
- }
13490
- table.setColumnSizing(sizes => {
13491
- const minColumnSize = getFontBasedMinColumnSize(newFontSize);
13492
- return Object.fromEntries(Object.entries(sizes).map(([columnName, prevColumnSize]) => {
13493
- // Prevents width value in the setting to go below the minColumnSize
13494
- const newSize = Math.max(minColumnSize, prevColumnSize + columnSizeChange);
13495
- return [columnName, newSize];
13496
- }));
13497
- });
13498
- }, [meta.fontSize.size]);
13499
13554
  React__default.useEffect(() => {
13500
13555
  let handler;
13501
13556
  if (typeof onChangeSettings === 'function') {
@@ -13504,7 +13559,7 @@ function useSettingsStateListener(table, onChangeSettings) {
13504
13559
  }, 250);
13505
13560
  }
13506
13561
  return () => clearTimeout(handler);
13507
- }, [meta.columnFreezing.frozenColumnIndex, state.columnOrder, state.columnSizing, state.columnVisibility, meta.search.excludeUnmatchedResults, meta.fontSize.size, meta.rowHeight.height, meta.printing.printWarningDialogVisibility, state.sorting]);
13562
+ }, [meta.columnFreezing.frozenColumnIndex, state.columnOrder, state.columnSizing, state.columnVisibility, meta.search.excludeUnmatchedResults, meta.fontSize.size, meta.rowHeight.height, meta.printing.isWarningVisibleForLargeDatasets, state.sorting]);
13508
13563
  }
13509
13564
 
13510
13565
  var Table3FilterComparator;
@@ -13642,12 +13697,14 @@ function columnFilterFn(value, filter) {
13642
13697
  // we use a listener, and not the internal "controlled" change handlers because we don't actually want consumers
13643
13698
  // to control the state outside the table. this listener is really here to let the consumer make a server request
13644
13699
  // and provide the server with the sorting state, so that it can sort server side
13645
- function useSortingStateListener(table, onSort) {
13700
+ function useTableSortingListener$1(table, onSort) {
13646
13701
  const sorting = table.getState().sorting;
13647
13702
  useLazyEffect(() => {
13648
- table.resetRowSelection();
13649
13703
  if (table.options.enableSorting && typeof onSort === 'function') {
13650
13704
  onSort(sorting);
13705
+ if (table.options.enableRowSelection) {
13706
+ table.resetRowSelection();
13707
+ }
13651
13708
  }
13652
13709
  }, [table.options.enableSorting, sorting]);
13653
13710
  }
@@ -13655,7 +13712,7 @@ function useSortingStateListener(table, onSort) {
13655
13712
  // we use a listener, and not the internal "controlled" change handlers because we don't actually want consumers
13656
13713
  // to control the state outside the table. this listener is really here to let the consumer make a server request
13657
13714
  // and provide the server with the filtering state, so that it can filter server side
13658
- function useFilteringStateListener(table, onFilter) {
13715
+ function useTableFilterListener(table, onFilter) {
13659
13716
  const columnFilters = table.getState().columnFilters;
13660
13717
  useLazyEffect(() => {
13661
13718
  if (table.options.enableColumnFilters && typeof onFilter === 'function') {
@@ -13667,13 +13724,13 @@ function useFilteringStateListener(table, onFilter) {
13667
13724
  }, [table.options.enableColumnFilters, columnFilters]);
13668
13725
  }
13669
13726
 
13670
- function useCurrentRowListener(table) {
13727
+ function useTableDataListener(table) {
13671
13728
  const meta = table.options.meta;
13672
13729
  const rows = table.getRowModel().rows;
13673
- React__default.useEffect(() => {
13674
- const currentRowIndex = meta.currentRow.currentRowIndex;
13675
- if (currentRowIndex !== undefined && currentRowIndex > rows.length) {
13676
- meta.currentRow.setCurrentRowIndex(0);
13730
+ useLazyEffect(() => {
13731
+ const rowActiveIndex = meta.rowActive.rowActiveIndex;
13732
+ if (rowActiveIndex !== undefined && rowActiveIndex > rows.length) {
13733
+ meta.rowActive.setRowActiveIndex(0);
13677
13734
  }
13678
13735
  }, [rows.length]);
13679
13736
  }
@@ -13774,20 +13831,20 @@ function useColumnFreezingStyle(tableId, table) {
13774
13831
  return style;
13775
13832
  }
13776
13833
 
13777
- function useRowSelection() {
13834
+ function useTableRowSelection(isEnabled = false) {
13778
13835
  const lastSelectedRowIndex = React__default.useRef();
13779
13836
  const onKeyDown = React__default.useCallback((event, table) => {
13780
- if (!table.options.enableRowSelection || event.defaultPrevented) {
13837
+ if (!isEnabled || !table.options.enableRowSelection || event.defaultPrevented) {
13781
13838
  return;
13782
13839
  }
13783
13840
  const rows = table.getRowModel().rows;
13784
13841
  const tableMeta = table.options.meta;
13785
13842
  if (event.key === ' ') {
13786
13843
  event.preventDefault();
13787
- const currentRowIndex = tableMeta.currentRow.currentRowIndex;
13788
- if (currentRowIndex !== undefined) {
13789
- var _rows$currentRowIndex;
13790
- (_rows$currentRowIndex = rows[currentRowIndex]) === null || _rows$currentRowIndex === void 0 ? void 0 : _rows$currentRowIndex.toggleSelected();
13844
+ const rowActiveIndex = tableMeta.rowActive.rowActiveIndex;
13845
+ if (rowActiveIndex !== undefined) {
13846
+ var _rows$rowActiveIndex;
13847
+ (_rows$rowActiveIndex = rows[rowActiveIndex]) === null || _rows$rowActiveIndex === void 0 ? void 0 : _rows$rowActiveIndex.toggleSelected();
13791
13848
  }
13792
13849
  return;
13793
13850
  } else if ((event.ctrlKey || event.metaKey) && event.key === 'a') {
@@ -13795,34 +13852,127 @@ function useRowSelection() {
13795
13852
  table.toggleAllRowsSelected();
13796
13853
  return;
13797
13854
  }
13798
- }, []);
13855
+ }, [isEnabled]);
13799
13856
  return {
13800
- handleKeyDown: onKeyDown,
13857
+ handleKeyDown: isEnabled ? onKeyDown : () => undefined,
13801
13858
  lastSelectedRowIndex
13802
13859
  };
13803
13860
  }
13804
13861
 
13805
- function useRowClick(onRowClick) {
13806
- const onKeyDown = React__default.useCallback((event, table) => {
13807
- if (typeof onRowClick !== 'function' || event.defaultPrevented) {
13862
+ function useTableServerLoading(loadPage, loadAll) {
13863
+ const isEnabled = !!loadPage && !!loadAll;
13864
+ return {
13865
+ isEnabled,
13866
+ loadPage,
13867
+ loadAll
13868
+ };
13869
+ }
13870
+
13871
+ function useTableRowClick(isEnabled = false, onRowClick) {
13872
+ const handleKeyDown = React__default.useCallback(function (event, data) {
13873
+ if (!isEnabled || typeof onRowClick !== 'function' || event.defaultPrevented) {
13808
13874
  return;
13809
13875
  }
13810
- const rows = table.getRowModel().rows;
13811
- const tableMeta = table.options.meta;
13812
- if (event.key === 'Enter') {
13876
+ if (data && event.key === 'Enter') {
13813
13877
  event.preventDefault();
13814
- if (onRowClick && tableMeta.currentRow.currentRowIndex !== undefined) {
13815
- onRowClick(rows[tableMeta.currentRow.currentRowIndex].original);
13816
- }
13878
+ onRowClick(data);
13879
+ return;
13880
+ }
13881
+ }, [isEnabled, onRowClick]);
13882
+ const handleClick = React__default.useCallback(function (event, data) {
13883
+ if (!isEnabled || typeof onRowClick !== 'function' || event.defaultPrevented) {
13817
13884
  return;
13818
13885
  }
13819
- }, [onRowClick]);
13886
+ event.preventDefault();
13887
+ onRowClick(data);
13888
+ return;
13889
+ }, [isEnabled, onRowClick]);
13890
+ return {
13891
+ isEnabled,
13892
+ handleClick,
13893
+ handleKeyDown
13894
+ };
13895
+ }
13896
+
13897
+ function useTableColumnOrdering(isEnabled = true) {
13898
+ return {
13899
+ isEnabled
13900
+ };
13901
+ }
13902
+
13903
+ function useRowDrop(isEnabled, handler) {
13820
13904
  return {
13821
- handleKeyDown: onKeyDown,
13822
- handleClick: onRowClick
13905
+ isEnabled,
13906
+ handleDrop: isEnabled && handler ? handler : () => undefined
13823
13907
  };
13824
13908
  }
13825
13909
 
13910
+ var IndicatorReason;
13911
+ (function (IndicatorReason) {
13912
+ IndicatorReason["SEARCH"] = "SEARCH";
13913
+ IndicatorReason["SORTING"] = "SORTING";
13914
+ IndicatorReason["FILTER"] = "FILTER";
13915
+ })(IndicatorReason || (IndicatorReason = {}));
13916
+ const useIndicatorText = reason => {
13917
+ let title = '';
13918
+ let description = '';
13919
+ const {
13920
+ texts
13921
+ } = useLocalization();
13922
+ switch (reason) {
13923
+ case IndicatorReason.FILTER:
13924
+ title = texts.table3.editing.rowIndicator.rowWillBeHidden;
13925
+ description = texts.table3.editing.rowIndicator.rowWillMoveReasonFilter;
13926
+ break;
13927
+ case IndicatorReason.SEARCH:
13928
+ title = texts.table3.editing.rowIndicator.rowWillBeHidden;
13929
+ description = texts.table3.editing.rowIndicator.rowWillMoveReasonSearch;
13930
+ break;
13931
+ case IndicatorReason.SORTING:
13932
+ title = texts.table3.editing.rowIndicator.rowWillMove;
13933
+ description = texts.table3.editing.rowIndicator.rowWillMoveReasonSorting;
13934
+ break;
13935
+ }
13936
+ return {
13937
+ title,
13938
+ description
13939
+ };
13940
+ };
13941
+ const Indicator = ({
13942
+ reason,
13943
+ columnName,
13944
+ mountNode,
13945
+ validationErrors
13946
+ }) => {
13947
+ const container = React__default.useMemo(() => {
13948
+ const element = document.createElement('div');
13949
+ element.className += 'rounded-b-md items-center wcag-blue-500 absolute left-0 top-full ml-1 whitespace-nowrap px-1 py-0.5 text-xs font-bold shadow-sm';
13950
+ return element;
13951
+ }, []);
13952
+ const indicatorText = useIndicatorText(reason);
13953
+ const hasValidationErrorsInRow = !!validationErrors;
13954
+ React__default.useEffect(() => {
13955
+ // mountNode could be null when rows are filtered
13956
+ // Pinned columns has z-20 class assigned, which overlaps indicator element, need to add z-21 to overlap pinned columns.
13957
+ mountNode === null || mountNode === void 0 ? void 0 : mountNode.classList.add('!z-[21]', 'relative');
13958
+ mountNode === null || mountNode === void 0 ? void 0 : mountNode.appendChild(container);
13959
+ return () => {
13960
+ mountNode === null || mountNode === void 0 ? void 0 : mountNode.classList.remove('!z-[21]', 'relative');
13961
+ mountNode === null || mountNode === void 0 ? void 0 : mountNode.removeChild(container);
13962
+ };
13963
+ }, [hasValidationErrorsInRow, mountNode]);
13964
+ // Using react portal inside a react tree component is an unorthodox way, but in order to avoid much code refactoring
13965
+ // and being able to use Taco Tooltip component in side the visual indicator, portal is used.
13966
+ return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React__default.createElement(Tooltip, {
13967
+ title: indicatorText.description.replace('[COLUMN]', columnName)
13968
+ }, /*#__PURE__*/React__default.createElement("span", {
13969
+ className: "flex gap-1 hover:cursor-pointer"
13970
+ }, /*#__PURE__*/React__default.createElement(Icon, {
13971
+ name: "info",
13972
+ className: "!h-4 !w-4 rounded-full bg-white !p-0 text-blue-500"
13973
+ }), indicatorText.title)), container);
13974
+ };
13975
+
13826
13976
  const focussableNodeNames = ['A', 'BUTTON', 'INPUT', 'TEXTAREA', 'SELECT', 'DETAILS'];
13827
13977
  const focusableSelector = /*#__PURE__*/focussableNodeNames.join(', ');
13828
13978
  const hasChanged = (value, newValue) => {
@@ -13888,7 +14038,7 @@ function Row$1(props) {
13888
14038
  var _tableMeta$validation, _tableMeta$validation2;
13889
14039
  const focusManager = focus.useFocusManager();
13890
14040
  const tableMeta = props.table.options.meta;
13891
- const isCurrentRow = tableMeta.currentRow.currentRowIndex === props.index;
14041
+ const isActiveRow = tableMeta.rowActive.rowActiveIndex === props.index;
13892
14042
  const isDraggingRow = tableMeta.rowDrag.dragging[props.row.id];
13893
14043
  const isFirstRow = props.index === 0;
13894
14044
  // we use non-css hovered state to determine whether to render actions or not, for performance
@@ -13899,7 +14049,7 @@ function Row$1(props) {
13899
14049
  return;
13900
14050
  }
13901
14051
  if (event.key === 'Tab') {
13902
- tableMeta.hoverState.pause(true);
14052
+ tableMeta.rowActive.setHoverStatePaused(true);
13903
14053
  let focusedElement;
13904
14054
  if (event.shiftKey) {
13905
14055
  // looping backwards
@@ -13911,7 +14061,7 @@ function Row$1(props) {
13911
14061
  // there are no previous elements to focus, go up a row or go outside the table
13912
14062
  if (!isFirstRow) {
13913
14063
  event.preventDefault();
13914
- tableMeta.currentRow.setCurrentRowIndex(props.index - 1);
14064
+ tableMeta.rowActive.setRowActiveIndex(props.index - 1);
13915
14065
  setTimeout(() => focusManager.focusLast(FOCUS_MANAGER_OPTIONS), 1);
13916
14066
  }
13917
14067
  }
@@ -13925,7 +14075,7 @@ function Row$1(props) {
13925
14075
  // there are no next elements to focus, go down a row or go outside the table
13926
14076
  if (!props.isLastRow) {
13927
14077
  event.preventDefault();
13928
- tableMeta.currentRow.setCurrentRowIndex(props.index + 1);
14078
+ tableMeta.rowActive.setRowActiveIndex(props.index + 1);
13929
14079
  setTimeout(() => focusManager.focusFirst(FOCUS_MANAGER_OPTIONS), 1);
13930
14080
  }
13931
14081
  }
@@ -13936,22 +14086,24 @@ function Row$1(props) {
13936
14086
  // rows are heavily memoized because performance in our table is critical
13937
14087
  // be careful and selective about props that you pass to the row
13938
14088
  const memoedProps = {
14089
+ data: props.row.original,
13939
14090
  // aria-grabbed is being deprecated but there is no current alternative api, we use it until there is
13940
14091
  'aria-grabbed': isDraggingRow ? true : tableMeta.rowDrag.isEnabled ? false : undefined,
13941
- 'data-current': isCurrentRow,
14092
+ 'data-current': isActiveRow,
13942
14093
  'data-selected': props.row.getIsSelected(),
13943
14094
  'data-invalid': hasError,
13944
14095
  draggable: tableMeta.rowDrag.isEnabled,
13945
14096
  index: props.index,
13946
14097
  onClick: tableMeta.rowClick.handleClick,
13947
- onDrop: tableMeta.rowDrop.isEnabled ? tableMeta.rowDrop.handleDrop : undefined,
13948
- onKeyDown: handleKeyDown
14098
+ onDrop: tableMeta.rowDrop.isEnabled ? tableMeta.rowDrop.handleDrop : undefined
13949
14099
  };
13950
- let output = /*#__PURE__*/React__default.createElement(MemoedRow, Object.assign({}, props, memoedProps));
13951
- if (tableMeta.editing.isEditing && (isCurrentRow || isHovered && !tableMeta.hoverState.isPaused)) {
14100
+ let output = /*#__PURE__*/React__default.createElement(MemoedRow, Object.assign({}, props, memoedProps, {
14101
+ onKeyDown: handleKeyDown
14102
+ }));
14103
+ if (tableMeta.editing.isEditing && (isActiveRow || isHovered && !tableMeta.rowActive.isHoverStatePaused)) {
13952
14104
  output = /*#__PURE__*/React__default.createElement(EditingRow, Object.assign({}, props, memoedProps, {
13953
14105
  isFirstRow: isFirstRow,
13954
- setCurrentRowIndex: tableMeta.currentRow.setCurrentRowIndex
14106
+ setActiveRowIndex: tableMeta.rowActive.setRowActiveIndex
13955
14107
  }));
13956
14108
  }
13957
14109
  // we store the row index in context because in a virtualised table the row index and the
@@ -13987,7 +14139,7 @@ function EditingRow(props) {
13987
14139
  isFirstRow,
13988
14140
  isLastRow,
13989
14141
  onKeyDown,
13990
- setCurrentRowIndex,
14142
+ setActiveRowIndex,
13991
14143
  virtualiser,
13992
14144
  ...attributes
13993
14145
  } = props;
@@ -13996,14 +14148,14 @@ function EditingRow(props) {
13996
14148
  const handleClickCapture = event => {
13997
14149
  lastCellIndex.value = getColumnIndex(event.target);
13998
14150
  };
13999
- const handleArrowLeftKey = event => {
14151
+ const handleNavigationBackwards = event => {
14000
14152
  let focusedElement;
14001
- if (event.key === 'ArrowLeft') {
14153
+ if (event.key === 'ArrowLeft' || event.key === 'Tab' && event.shiftKey) {
14002
14154
  // We need to perform special behaviour when focus reaches the end of the row,
14003
14155
  // so we don't need default browser behaviour.
14004
14156
  event.stopPropagation();
14005
14157
  event.preventDefault();
14006
- tableMeta.hoverState.pause(true);
14158
+ tableMeta.rowActive.setHoverStatePaused(true);
14007
14159
  // "CTRL + ArrowLeft" or "META + ArrowLeft" should focus first focusable element of the row
14008
14160
  if (event.ctrlKey || event.metaKey) {
14009
14161
  event.target.blur();
@@ -14018,8 +14170,8 @@ function EditingRow(props) {
14018
14170
  // there are no previous elements to focus, go up a row (if there are rows above)
14019
14171
  if (!isFirstRow || !event.currentTarget.contains(focusedElement)) {
14020
14172
  event.preventDefault();
14021
- tableMeta.hoverState.pause(true);
14022
- tableMeta.currentRow.setCurrentRowIndex(props.index - 1);
14173
+ tableMeta.rowActive.setHoverStatePaused(true);
14174
+ tableMeta.rowActive.setRowActiveIndex(props.index - 1);
14023
14175
  setTimeout(() => {
14024
14176
  focusedElement = focusManager.focusLast(FOCUS_MANAGER_OPTIONS);
14025
14177
  // Need to update lastIndex when row got changed and last element got selected.
@@ -14030,14 +14182,14 @@ function EditingRow(props) {
14030
14182
  }
14031
14183
  }
14032
14184
  };
14033
- const handleArrowRightKey = event => {
14185
+ const handleNavigationForward = event => {
14034
14186
  let focusedElement;
14035
- if (event.key === 'ArrowRight') {
14187
+ if (event.key === 'ArrowRight' || event.key === 'Tab' && !event.shiftKey) {
14036
14188
  // We need to perform special behaviour when focus reaches the end of the row,
14037
14189
  // so we don't need default browser behaviour.
14038
14190
  event.stopPropagation();
14039
14191
  event.preventDefault();
14040
- tableMeta.hoverState.pause(true);
14192
+ tableMeta.rowActive.setHoverStatePaused(true);
14041
14193
  // "CTRL + ArrowRight" or "META + ArrowRight" should focus last focusable element of the row
14042
14194
  if (event.ctrlKey || event.metaKey) {
14043
14195
  event.target.blur();
@@ -14052,8 +14204,8 @@ function EditingRow(props) {
14052
14204
  // there are no next elements to focus, go down a row or go outside the table
14053
14205
  if (!props.isLastRow && !event.currentTarget.contains(focusedElement)) {
14054
14206
  event.preventDefault();
14055
- tableMeta.hoverState.pause(true);
14056
- tableMeta.currentRow.setCurrentRowIndex(props.index + 1);
14207
+ tableMeta.rowActive.setHoverStatePaused(true);
14208
+ tableMeta.rowActive.setRowActiveIndex(props.index + 1);
14057
14209
  setTimeout(() => {
14058
14210
  focusedElement = focusManager.focusFirst(FOCUS_MANAGER_OPTIONS);
14059
14211
  // Need to update lastIndex when row got changed and last element got selected.
@@ -14066,22 +14218,21 @@ function EditingRow(props) {
14066
14218
  };
14067
14219
  React__default.useEffect(() => {
14068
14220
  // if some row stuck in hovered state, we heed to unhover it when hover state is paused
14069
- if (tableMeta.hoverState.isPaused) {
14221
+ if (tableMeta.rowActive.isHoverStatePaused) {
14070
14222
  unhoverPreviousRow(props.tableRef);
14071
14223
  }
14072
- }, [tableMeta.hoverState.isPaused]);
14224
+ }, [tableMeta.rowActive.isHoverStatePaused]);
14073
14225
  const handleKeyDown = event => {
14074
14226
  if (event.isDefaultPrevented() || event.isPropagationStopped() || tableMeta.editing.detailModeEditing || tableMeta.shortcutsState.isPaused) {
14075
14227
  return;
14076
14228
  }
14077
- onKeyDown(event); // handles tab behaviour
14078
- handleArrowLeftKey(event);
14079
- handleArrowRightKey(event);
14229
+ handleNavigationBackwards(event);
14230
+ handleNavigationForward(event);
14080
14231
  };
14081
14232
  // this ensures we focus either on a field or on the same column when keyboard navigating up/down
14082
14233
  React__default.useEffect(() => {
14083
14234
  // When table in searching state, whe should prevent editing control to be focused, because it will cause search field to loose focus.
14084
- if (tableMeta.currentRow.currentRowIndex === props.index && !tableMeta.search.isSearching) {
14235
+ if (tableMeta.rowActive.rowActiveIndex === props.index && !tableMeta.search.isSearching) {
14085
14236
  if (lastCellIndex.value !== null) {
14086
14237
  var _props$tableRef$curre;
14087
14238
  const lastCellElement = (_props$tableRef$curre = props.tableRef.current) === null || _props$tableRef$curre === void 0 ? void 0 : _props$tableRef$curre.querySelector(`[role="row"][data-current="true"] [data-column-index="${lastCellIndex.value}"]`);
@@ -14101,7 +14252,7 @@ function EditingRow(props) {
14101
14252
  // Need to subscribe to current row index and check is it a current row,
14102
14253
  // for a situation where hovered row is the next row after current row...
14103
14254
  // In this case row will not be re-rendered if user switch to next row, because hovered row also renders EditingRow.
14104
- }, [tableMeta.currentRow.currentRowIndex, tableMeta.search.isSearching]);
14255
+ }, [tableMeta.rowActive.rowActiveIndex, tableMeta.search.isSearching]);
14105
14256
  return /*#__PURE__*/React__default.createElement(MemoedRow, Object.assign({}, attributes, {
14106
14257
  onClickCapture: handleClickCapture,
14107
14258
  onKeyDown: handleKeyDown
@@ -14110,6 +14261,7 @@ function EditingRow(props) {
14110
14261
  const clickableElements = ['input', 'button', 'a', 'select', 'option', 'label', 'textarea'];
14111
14262
  const MemoedRow = /*#__PURE__*/React__default.memo(function MemoedRow(props) {
14112
14263
  const {
14264
+ data,
14113
14265
  index,
14114
14266
  isLastRow: _1,
14115
14267
  measureRef,
@@ -14140,7 +14292,7 @@ const MemoedRow = /*#__PURE__*/React__default.memo(function MemoedRow(props) {
14140
14292
  onClickCapture(event);
14141
14293
  }
14142
14294
  // do this in the next frame, otherwise it remounts the row and prevents row actions on hover from being clickable
14143
- requestAnimationFrame(() => tableMeta.currentRow.setCurrentRowIndex(index));
14295
+ requestAnimationFrame(() => tableMeta.rowActive.setRowActiveIndex(index));
14144
14296
  };
14145
14297
  const handleClick = event => {
14146
14298
  if (typeof onClick === 'function') {
@@ -14149,7 +14301,7 @@ const MemoedRow = /*#__PURE__*/React__default.memo(function MemoedRow(props) {
14149
14301
  if (!((_ref$current2 = ref.current) !== null && _ref$current2 !== void 0 && _ref$current2.contains(event.target)) || clickableElements.includes(clickedElement.tagName.toLowerCase()) || clickedElement.closest(clickableElements.map(tag => `[role=row] ${tag}`).join(','))) {
14150
14302
  return;
14151
14303
  }
14152
- onClick(row.original);
14304
+ onClick(event, data);
14153
14305
  }
14154
14306
  };
14155
14307
  const handleMouseEnter = () => {
@@ -14476,7 +14628,7 @@ const MemoedCell$1 = /*#__PURE__*/React__default.memo(function MemoedCell(props)
14476
14628
  var _column$columnDef$met;
14477
14629
  const {
14478
14630
  hasChanges,
14479
- isCurrentRow,
14631
+ isActiveRow,
14480
14632
  row,
14481
14633
  editing,
14482
14634
  rowIdentifier,
@@ -14525,13 +14677,13 @@ const MemoedCell$1 = /*#__PURE__*/React__default.memo(function MemoedCell(props)
14525
14677
  }));
14526
14678
  }
14527
14679
  }
14528
- if (editing.isEditing && isCurrentRow) {
14680
+ if (editing.isEditing && isActiveRow) {
14529
14681
  content = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, content, /*#__PURE__*/React__default.createElement(IconButton, {
14530
14682
  ref: edititngActionsRef,
14531
14683
  appearance: "transparent",
14532
14684
  "aria-label": texts.table3.editing.actions.tooltip,
14533
14685
  icon: "more",
14534
- menu: menuProps => /*#__PURE__*/React__default.createElement(Menu$1, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu$1.Content, null, /*#__PURE__*/React__default.createElement(Menu$1.Item, {
14686
+ menu: menuProps => ( /*#__PURE__*/React__default.createElement(Menu$1, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu$1.Content, null, /*#__PURE__*/React__default.createElement(Menu$1.Item, {
14535
14687
  icon: "tick",
14536
14688
  disabled: !hasChanges,
14537
14689
  onClick: () => editing.saveChangesIfNeeded()
@@ -14542,8 +14694,8 @@ const MemoedCell$1 = /*#__PURE__*/React__default.memo(function MemoedCell(props)
14542
14694
  }, texts.table3.editing.actions.clear), /*#__PURE__*/React__default.createElement(Menu$1.Item, {
14543
14695
  icon: "undo",
14544
14696
  onClick: () => editing.toggleEditing(false)
14545
- }, texts.table3.editing.actions.exit))),
14546
- tabIndex: isCurrentRow ? 0 : -1
14697
+ }, texts.table3.editing.actions.exit)))),
14698
+ tabIndex: isActiveRow ? 0 : -1
14547
14699
  }), /*#__PURE__*/React__default.createElement(Dialog, {
14548
14700
  size: "xs",
14549
14701
  open: clearConfirmationOpen,
@@ -14569,7 +14721,7 @@ const MemoedCell$1 = /*#__PURE__*/React__default.memo(function MemoedCell(props)
14569
14721
  }, texts.table3.editing.clearChangesConfirmationDialog.confirm)))))));
14570
14722
  }
14571
14723
  const contentClassName = cn('flex items-center justify-end text-right', {
14572
- '-mb-2 -mt-2': isCurrentRow
14724
+ '-mb-2 -mt-2': isActiveRow
14573
14725
  });
14574
14726
  return /*#__PURE__*/React__default.createElement(DisplayCell, Object.assign({}, props, {
14575
14727
  className: cn({
@@ -14587,7 +14739,7 @@ function Cell$1(props) {
14587
14739
  const changeset = tableMeta.editing.changes ? Object.keys(tableMeta.editing.changes) : [];
14588
14740
  return /*#__PURE__*/React__default.createElement(MemoedCell$1, Object.assign({}, props, {
14589
14741
  hasChanges: changeset.indexOf(props.row.id) >= 0,
14590
- isCurrentRow: tableMeta.currentRow.currentRowIndex === rowIndex,
14742
+ isActiveRow: tableMeta.rowActive.rowActiveIndex === rowIndex,
14591
14743
  editing: tableMeta.editing
14592
14744
  }));
14593
14745
  }
@@ -14616,119 +14768,6 @@ function createRowEditingActionsColumn(rowIdentifier) {
14616
14768
  };
14617
14769
  }
14618
14770
 
14619
- function useColumnOrdering(options) {
14620
- return {
14621
- isEnabled: options.enableColumnOrdering
14622
- };
14623
- }
14624
- function ensureOrdering(columns, settingsOrder) {
14625
- // internal column come with a defined order
14626
- const internalColumns = columns.filter(column => {
14627
- var _column$id;
14628
- return ((_column$id = column.id) === null || _column$id === void 0 ? void 0 : _column$id.startsWith('__')) && column.id !== COLUMN_ID && column.id !== COLUMN_ID$1;
14629
- }).map(column => column.id);
14630
- // columns with ordering disabled should be moved to the front
14631
- const orderingDisabled = [];
14632
- const orderingEnabled = [];
14633
- let orderedColumns = columns;
14634
- // if settings is defined, make sure the columns that are actual children are sorted by it
14635
- if (Array.isArray(settingsOrder)) {
14636
- orderedColumns = columns.slice().sort(
14637
- // the magic >>> 0 here ensures that columns that aren't found in settings, but are children, are pushed to the end
14638
- (a, b) => (settingsOrder.indexOf(a.id) >>> 0) - (settingsOrder.indexOf(b.id) >>> 0));
14639
- }
14640
- orderedColumns.forEach(column => {
14641
- var _column$id2, _column$meta;
14642
- if ((_column$id2 = column.id) !== null && _column$id2 !== void 0 && _column$id2.startsWith('__')) {
14643
- return;
14644
- }
14645
- if ((_column$meta = column.meta) !== null && _column$meta !== void 0 && _column$meta.enableOrdering) {
14646
- orderingEnabled.push(column.id);
14647
- } else {
14648
- orderingDisabled.push(column.id);
14649
- }
14650
- });
14651
- const order = [...internalColumns, ...orderingDisabled, ...orderingEnabled];
14652
- // actions should always be last, enforce that
14653
- if (columns.findIndex(column => column.id === COLUMN_ID || column.id === COLUMN_ID$1) > -1) {
14654
- order.push(COLUMN_ID);
14655
- }
14656
- return order;
14657
- }
14658
-
14659
- function useRowDrop(isEnabled, handler) {
14660
- return {
14661
- isEnabled,
14662
- handleDrop: isEnabled && handler ? handler : () => undefined
14663
- };
14664
- }
14665
-
14666
- var IndicatorReason;
14667
- (function (IndicatorReason) {
14668
- IndicatorReason["SEARCH"] = "SEARCH";
14669
- IndicatorReason["SORTING"] = "SORTING";
14670
- IndicatorReason["FILTER"] = "FILTER";
14671
- })(IndicatorReason || (IndicatorReason = {}));
14672
- const useIndicatorText = reason => {
14673
- let title = '';
14674
- let description = '';
14675
- const {
14676
- texts
14677
- } = useLocalization();
14678
- switch (reason) {
14679
- case IndicatorReason.FILTER:
14680
- title = texts.table3.editing.rowIndicator.rowWillBeHidden;
14681
- description = texts.table3.editing.rowIndicator.rowWillMoveReasonFilter;
14682
- break;
14683
- case IndicatorReason.SEARCH:
14684
- title = texts.table3.editing.rowIndicator.rowWillBeHidden;
14685
- description = texts.table3.editing.rowIndicator.rowWillMoveReasonSearch;
14686
- break;
14687
- case IndicatorReason.SORTING:
14688
- title = texts.table3.editing.rowIndicator.rowWillMove;
14689
- description = texts.table3.editing.rowIndicator.rowWillMoveReasonSorting;
14690
- break;
14691
- }
14692
- return {
14693
- title,
14694
- description
14695
- };
14696
- };
14697
- const Indicator = ({
14698
- reason,
14699
- columnName,
14700
- mountNode,
14701
- validationErrors
14702
- }) => {
14703
- const container = React__default.useMemo(() => {
14704
- const element = document.createElement('div');
14705
- element.className += 'rounded-b-md items-center wcag-blue-500 absolute left-0 top-full ml-1 whitespace-nowrap px-1 py-0.5 text-xs font-bold shadow-sm';
14706
- return element;
14707
- }, []);
14708
- const indicatorText = useIndicatorText(reason);
14709
- const hasValidationErrorsInRow = !!validationErrors;
14710
- React__default.useEffect(() => {
14711
- // mountNode could be null when rows are filtered
14712
- // Pinned columns has z-20 class assigned, which overlaps indicator element, need to add z-21 to overlap pinned columns.
14713
- mountNode === null || mountNode === void 0 ? void 0 : mountNode.classList.add('!z-[21]', 'relative');
14714
- mountNode === null || mountNode === void 0 ? void 0 : mountNode.appendChild(container);
14715
- return () => {
14716
- mountNode === null || mountNode === void 0 ? void 0 : mountNode.classList.remove('!z-[21]', 'relative');
14717
- mountNode === null || mountNode === void 0 ? void 0 : mountNode.removeChild(container);
14718
- };
14719
- }, [hasValidationErrorsInRow, mountNode]);
14720
- // Using react portal inside a react tree component is an unorthodox way, but in order to avoid much code refactoring
14721
- // and being able to use Taco Tooltip component in side the visual indicator, portal is used.
14722
- return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React__default.createElement(Tooltip, {
14723
- title: indicatorText.description.replace('[COLUMN]', columnName)
14724
- }, /*#__PURE__*/React__default.createElement("span", {
14725
- className: "flex gap-1 hover:cursor-pointer"
14726
- }, /*#__PURE__*/React__default.createElement(Icon, {
14727
- name: "info",
14728
- className: "!h-4 !w-4 rounded-full bg-white !p-0 text-blue-500"
14729
- }), indicatorText.title)), container);
14730
- };
14731
-
14732
14771
  const Textarea = /*#__PURE__*/React.forwardRef(function Textarea(props, ref) {
14733
14772
  const {
14734
14773
  defaultValue: _,
@@ -14788,7 +14827,7 @@ const TextareaControl = /*#__PURE__*/React__default.forwardRef(function Textarea
14788
14827
  column,
14789
14828
  isCellInDetailMode,
14790
14829
  align,
14791
- isCurrentRow,
14830
+ isActiveRow,
14792
14831
  value,
14793
14832
  fontSize,
14794
14833
  ...attributes
@@ -14882,7 +14921,7 @@ const TextareaControl = /*#__PURE__*/React__default.forwardRef(function Textarea
14882
14921
  '!yt-focus-dark': isCellInDetailMode,
14883
14922
  [`h-[${minMaxHeight.min}px]`]: !isCellInDetailMode && (columnMeta === null || columnMeta === void 0 ? void 0 : columnMeta.enableTruncate),
14884
14923
  // Only allow resizing when focused and truncation enabled
14885
- 'focus:resize-y': isCurrentRow && (columnMeta === null || columnMeta === void 0 ? void 0 : columnMeta.enableTruncate)
14924
+ 'focus:resize-y': isActiveRow && (columnMeta === null || columnMeta === void 0 ? void 0 : columnMeta.enableTruncate)
14886
14925
  }),
14887
14926
  ref: ref,
14888
14927
  value: String(value !== null && value !== void 0 ? value : '')
@@ -14902,7 +14941,7 @@ const EditingControl = /*#__PURE__*/React__default.forwardRef(function Control(p
14902
14941
  value,
14903
14942
  cell,
14904
14943
  error,
14905
- isCurrentRow,
14944
+ isActiveRow,
14906
14945
  ...attributes
14907
14946
  } = props;
14908
14947
  const tableMeta = table.options.meta;
@@ -14980,11 +15019,30 @@ const EditingControl = /*#__PURE__*/React__default.forwardRef(function Control(p
14980
15019
  tableMeta.editing.setDetailModeEditing(true);
14981
15020
  }
14982
15021
  };
15022
+ const handleFocus = event => {
15023
+ var _event$target;
15024
+ const {
15025
+ frozenColumnIndex: externalFrozenColumnIndex = -1,
15026
+ frozenInternalColumnCount = 0
15027
+ } = tableMeta.columnFreezing;
15028
+ const tableElement = tableMeta.tableRef.current;
15029
+ const frozenColumnIndex = externalFrozenColumnIndex > -1 ? externalFrozenColumnIndex + frozenInternalColumnCount : frozenInternalColumnCount - 1;
15030
+ const cell = (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.closest('[role="cell"]');
15031
+ if (!tableElement || !cell) {
15032
+ return;
15033
+ }
15034
+ const isEditing = true;
15035
+ const leftScrollDistance = getTableLeftScrollDistance(tableElement, cell, frozenColumnIndex, isEditing);
15036
+ if (leftScrollDistance !== null) {
15037
+ tableElement.scrollLeft = leftScrollDistance;
15038
+ }
15039
+ };
14983
15040
  if (typeof controlRenderer === 'function') {
14984
15041
  return controlRenderer({
14985
15042
  ...attributes,
14986
- ref: refCallback,
14987
15043
  invalid: !!error,
15044
+ onFocus: handleFocus,
15045
+ ref: refCallback,
14988
15046
  setValue: nextValue => {
14989
15047
  if (nextValue !== value) {
14990
15048
  handleChange(nextValue);
@@ -15008,6 +15066,7 @@ const EditingControl = /*#__PURE__*/React__default.forwardRef(function Control(p
15008
15066
  '[&_input]:!yt-focus-dark': isCellInDetailMode
15009
15067
  }),
15010
15068
  onChange: handleDatepickerChange,
15069
+ onFocus: handleFocus,
15011
15070
  onKeyDown: handleInputKeyDown,
15012
15071
  ref: refCallback,
15013
15072
  value: value
@@ -15016,12 +15075,14 @@ const EditingControl = /*#__PURE__*/React__default.forwardRef(function Control(p
15016
15075
  return /*#__PURE__*/React__default.createElement(Switch, Object.assign({}, attributes, {
15017
15076
  checked: Boolean(value),
15018
15077
  onChange: handleChange,
15078
+ onFocus: handleFocus,
15019
15079
  ref: refCallback
15020
15080
  }));
15021
15081
  } else if (controlRenderer === 'textarea') {
15022
15082
  return /*#__PURE__*/React__default.createElement(TextareaControl, Object.assign({}, props, {
15023
15083
  invalid: !!error,
15024
15084
  isCellInDetailMode: isCellInDetailMode,
15085
+ onFocus: handleFocus,
15025
15086
  onKeyDown: handleInputKeyDown,
15026
15087
  ref: refCallback,
15027
15088
  fontSize: tableMeta.fontSize.size
@@ -15035,6 +15096,7 @@ const EditingControl = /*#__PURE__*/React__default.forwardRef(function Control(p
15035
15096
  onChange: event => {
15036
15097
  handleChange(event.target.value);
15037
15098
  },
15099
+ onFocus: handleFocus,
15038
15100
  onKeyDown: handleInputKeyDown,
15039
15101
  ref: refCallback,
15040
15102
  type: isNumber ? 'number' : undefined,
@@ -15060,7 +15122,7 @@ function EditingCell(props) {
15060
15122
  }));
15061
15123
  }
15062
15124
  const MemoedEditingCell = /*#__PURE__*/React__default.memo(function MemoedEditingCell(props) {
15063
- var _tableMeta$editing$ge, _tableMeta$editing$ro, _rows$currentRowIndex, _column$columnDef$met;
15125
+ var _tableMeta$editing$ge, _tableMeta$editing$ro, _rows$tableMeta$rowAc, _column$columnDef$met;
15064
15126
  const {
15065
15127
  cell,
15066
15128
  column,
@@ -15074,6 +15136,9 @@ const MemoedEditingCell = /*#__PURE__*/React__default.memo(function MemoedEditin
15074
15136
  highlighted,
15075
15137
  highlightedAsCurrent
15076
15138
  } = props;
15139
+ const {
15140
+ rowIndex
15141
+ } = React__default.useContext(RowContext);
15077
15142
  const columnMeta = column.columnDef.meta;
15078
15143
  const cellRef = React__default.useRef(null);
15079
15144
  const controlRef = React__default.useRef(null);
@@ -15118,29 +15183,30 @@ const MemoedEditingCell = /*#__PURE__*/React__default.memo(function MemoedEditin
15118
15183
  // row move indicator
15119
15184
  const moveReason = ((_tableMeta$editing$ro = tableMeta.editing.rowMoveReason) === null || _tableMeta$editing$ro === void 0 ? void 0 : _tableMeta$editing$ro[cell.column.id]) || null;
15120
15185
  const rows = table.getRowModel().rows;
15121
- const currentRowIndex = tableMeta.currentRow.currentRowIndex;
15122
- const isCurrentRow = currentRowIndex !== undefined && ((_rows$currentRowIndex = rows[currentRowIndex]) === null || _rows$currentRowIndex === void 0 ? void 0 : _rows$currentRowIndex.id) === row.id;
15186
+ const isActiveRow = tableMeta.rowActive.rowActiveIndex !== undefined && ((_rows$tableMeta$rowAc = rows[tableMeta.rowActive.rowActiveIndex]) === null || _rows$tableMeta$rowAc === void 0 ? void 0 : _rows$tableMeta$rowAc.id) === row.id;
15123
15187
  const mountNode = React__default.useMemo(() => {
15124
- if (moveReason !== null && isCurrentRow && !error) {
15188
+ if (moveReason !== null && isActiveRow && !error) {
15125
15189
  var _cellRef$current2, _cellRef$current2$par;
15126
15190
  return (_cellRef$current2 = cellRef.current) === null || _cellRef$current2 === void 0 ? void 0 : (_cellRef$current2$par = _cellRef$current2.parentElement) === null || _cellRef$current2$par === void 0 ? void 0 : _cellRef$current2$par.firstChild;
15127
15191
  }
15128
15192
  return null;
15129
- }, [moveReason, isCurrentRow, error, cellRef]);
15193
+ }, [moveReason, isActiveRow, error, cellRef]);
15130
15194
  const removeMoveReason = () => {
15131
15195
  tableMeta.editing.removeRowMoveReason();
15132
15196
  };
15133
15197
  React__default.useEffect(() => {
15134
15198
  // To avoid reseting move reason on another row hover,
15135
15199
  // we need to check for changes only if value got changed in the current row.
15136
- if (!isCurrentRow || error) {
15200
+ if (!isActiveRow || error) {
15137
15201
  if (tableMeta.editing.rowMoveReason) {
15138
15202
  removeMoveReason();
15139
15203
  }
15140
15204
  return;
15141
15205
  }
15142
15206
  if (hasChanged(getValue(), value)) {
15143
- const moveReason = getRowMoveReason(table, row.index, row.original, cell, value, tableMeta.search.excludeUnmatchedResults);
15207
+ const moveReason = getRowMoveReason(table, rowIndex,
15208
+ // cannot use row.index, as this is not kept in sync once a column is sorted.
15209
+ row.original, cell, value, tableMeta.search.excludeUnmatchedResults);
15144
15210
  tableMeta.editing.setRowMoveReason({
15145
15211
  [cell.column.id]: moveReason
15146
15212
  });
@@ -15148,7 +15214,7 @@ const MemoedEditingCell = /*#__PURE__*/React__default.memo(function MemoedEditin
15148
15214
  removeMoveReason();
15149
15215
  }
15150
15216
  return removeMoveReason;
15151
- }, [value, tableMeta.currentRow.currentRowIndex, tableMeta.search.excludeUnmatchedResults, error]);
15217
+ }, [value, tableMeta.rowActive.rowActiveIndex, tableMeta.search.excludeUnmatchedResults, error]);
15152
15218
  const controlRenderer = (_column$columnDef$met = column.columnDef.meta) === null || _column$columnDef$met === void 0 ? void 0 : _column$columnDef$met.control;
15153
15219
  const className = cn('py-[calc(var(--table3-cell-padding-y)_-_0.06rem)]', {
15154
15220
  // Textarea control is positioned absolute, when column is in enableTruncate mode, so the cell need to be positioned relative
@@ -15175,15 +15241,15 @@ const MemoedEditingCell = /*#__PURE__*/React__default.memo(function MemoedEditin
15175
15241
  value: value,
15176
15242
  cell: cell,
15177
15243
  error: error,
15178
- tabIndex: isCurrentRow ? 0 : -1,
15179
- isCurrentRow: isCurrentRow
15244
+ tabIndex: isActiveRow ? 0 : -1,
15245
+ isActiveRow: isActiveRow
15180
15246
  }));
15181
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, moveReason !== null && mountNode && !error ? /*#__PURE__*/React__default.createElement(Indicator, {
15247
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, moveReason !== null && mountNode && !error ? ( /*#__PURE__*/React__default.createElement(Indicator, {
15182
15248
  reason: moveReason,
15183
15249
  columnName: String(cell.column.columnDef.header),
15184
15250
  mountNode: mountNode,
15185
15251
  validationErrors: []
15186
- }) : null, /*#__PURE__*/React__default.createElement("div", {
15252
+ })) : null, /*#__PURE__*/React__default.createElement("div", {
15187
15253
  className: !highlighted ? className : undefined,
15188
15254
  "data-align": columnMeta.align,
15189
15255
  "data-column-index": index,
@@ -15192,13 +15258,13 @@ const MemoedEditingCell = /*#__PURE__*/React__default.memo(function MemoedEditin
15192
15258
  ref: cellRef,
15193
15259
  "data-invalid": !!error,
15194
15260
  "data-highlighted": highlighted
15195
- }, highlighted ? /*#__PURE__*/React__default.createElement(Highlight, {
15261
+ }, highlighted ? ( /*#__PURE__*/React__default.createElement(Highlight, {
15196
15262
  current: highlightedAsCurrent,
15197
15263
  className: className,
15198
15264
  frozenColumnIndex: tableMeta.columnFreezing.frozenColumnIndex,
15199
15265
  index: index,
15200
15266
  tableRef: tableRef
15201
- }, content) : content));
15267
+ }, content)) : content));
15202
15268
  });
15203
15269
  function getRowMoveReason(table, rowIndex, rowValues, cell, newValue, excludeUnmatchedResults) {
15204
15270
  var _table$getState$sorti;
@@ -15225,7 +15291,7 @@ function getRowMoveReason(table, rowIndex, rowValues, cell, newValue, excludeUnm
15225
15291
  }
15226
15292
 
15227
15293
  function Cell$2(props) {
15228
- var _rows$currentRowIndex;
15294
+ var _rows$rowActiveIndex;
15229
15295
  const {
15230
15296
  column,
15231
15297
  row,
@@ -15243,8 +15309,8 @@ function Cell$2(props) {
15243
15309
  const columnMeta = column.columnDef.meta;
15244
15310
  const rowErrors = tableMeta.validation.errors ? tableMeta.validation.errors[row.id] : null;
15245
15311
  const isColumnError = hasError && rowErrors && !!rowErrors[column.id];
15246
- const currentRowIndex = tableMeta.currentRow.currentRowIndex;
15247
- const isCurrentRow = currentRowIndex !== undefined && ((_rows$currentRowIndex = rows[currentRowIndex]) === null || _rows$currentRowIndex === void 0 ? void 0 : _rows$currentRowIndex.id) === row.id;
15312
+ const rowActiveIndex = tableMeta.rowActive.rowActiveIndex;
15313
+ const isActiveRow = rowActiveIndex !== undefined && ((_rows$rowActiveIndex = rows[rowActiveIndex]) === null || _rows$rowActiveIndex === void 0 ? void 0 : _rows$rowActiveIndex.id) === row.id;
15248
15314
  let value = getValue();
15249
15315
  // When row has changes we always need to show the editing state value, end revert it to original value only when row got saved successfully.
15250
15316
  // Otherwise it might confuse user because it will look like display value is getting reverted everytime user leaves the row.
@@ -15269,8 +15335,8 @@ function Cell$2(props) {
15269
15335
  if (!tableMeta.search.isHighlightingEnabled || !memoedHighlight || tableMeta.search.currentHighlightColumnIndex === undefined) {
15270
15336
  return false;
15271
15337
  }
15272
- const [currentRowIndex, currentColumnIndex] = tableMeta.search.highlightedColumnIndexes[tableMeta.search.currentHighlightColumnIndex];
15273
- if (currentRowIndex === rowIndex && currentColumnIndex === index) {
15338
+ const [rowActiveIndex, currentColumnIndex] = tableMeta.search.highlightedColumnIndexes[tableMeta.search.currentHighlightColumnIndex];
15339
+ if (rowActiveIndex === rowIndex && currentColumnIndex === index) {
15274
15340
  return true;
15275
15341
  }
15276
15342
  return false;
@@ -15279,7 +15345,7 @@ function Cell$2(props) {
15279
15345
  highlighted: memoedHighlight,
15280
15346
  highlightedAsCurrent: memoedHighlightCurrent
15281
15347
  };
15282
- if (tableMeta.editing.isEditing && columnMeta.control && (isCurrentRow || isHoveredRow && !tableMeta.hoverState.isPaused ||
15348
+ if (tableMeta.editing.isEditing && columnMeta.control && (isActiveRow || isHoveredRow && !tableMeta.rowActive.isHoverStatePaused ||
15283
15349
  // When cell has error, we renderimg it in edit mode (UX reqirement)
15284
15350
  isColumnError)) {
15285
15351
  return /*#__PURE__*/React__default.createElement(EditingCell, Object.assign({}, props, highlightProps));
@@ -15326,7 +15392,7 @@ const Cell$3 = /*#__PURE__*/React__default.memo(function MemoedCell(context) {
15326
15392
  rowIndex
15327
15393
  } = React__default.useContext(RowContext);
15328
15394
  const tableMeta = context.table.options.meta;
15329
- const isCurrentRow = tableMeta.currentRow.currentRowIndex === rowIndex;
15395
+ const isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;
15330
15396
  const isSelected = context.row.getIsSelected();
15331
15397
  const title = isSelected ? texts.table3.columns.select.deselect : texts.table3.columns.select.select;
15332
15398
  if (context.table.options.enableMultiRowSelection) {
@@ -15353,7 +15419,7 @@ const Cell$3 = /*#__PURE__*/React__default.memo(function MemoedCell(context) {
15353
15419
  onClick: handleClick,
15354
15420
  // this is necessary to remove console spam from eslint
15355
15421
  onChange: () => false,
15356
- tabIndex: isCurrentRow ? 0 : -1
15422
+ tabIndex: isActiveRow ? 0 : -1
15357
15423
  })));
15358
15424
  } else {
15359
15425
  const className = cn('!mt-0', getRadioClassnames());
@@ -15379,7 +15445,7 @@ const Cell$3 = /*#__PURE__*/React__default.memo(function MemoedCell(context) {
15379
15445
  // we memo because we don't want the row re-rendering and removing focus from the checkbox
15380
15446
  // we can't default to the standard comparison because we need currentRow off the table meta
15381
15447
  // and we don't really care about re-rendering in any other scenario
15382
- return newTableMeta.currentRow.currentRowIndex === oldTableMeta.currentRow.currentRowIndex && newProps.row.getIsSelected() !== oldProps.row.getIsSelected();
15448
+ return newTableMeta.rowActive.rowActiveIndex === oldTableMeta.rowActive.rowActiveIndex && newProps.row.getIsSelected() !== oldProps.row.getIsSelected();
15383
15449
  });
15384
15450
  function createRowSelectionColumn(hasDrag, hasExpansion) {
15385
15451
  const size = hasDrag && hasExpansion ? 22 : 40;
@@ -15434,7 +15500,7 @@ function Header$3(context) {
15434
15500
  const MemoedCell$2 = /*#__PURE__*/React__default.memo(function MemoedCell(props) {
15435
15501
  const {
15436
15502
  expandedRowRenderer,
15437
- isCurrentRow,
15503
+ isActiveRow,
15438
15504
  isExpanded,
15439
15505
  row,
15440
15506
  table
@@ -15451,7 +15517,7 @@ const MemoedCell$2 = /*#__PURE__*/React__default.memo(function MemoedCell(props)
15451
15517
  row.toggleExpanded();
15452
15518
  };
15453
15519
  const title = isExpanded ? texts.table3.columns.expansion.collapse : texts.table3.columns.expansion.expand;
15454
- const tabIndex = isCurrentRow && !tableMeta.editing.isEditing ? 0 : -1;
15520
+ const tabIndex = isActiveRow && !tableMeta.editing.isEditing ? 0 : -1;
15455
15521
  content = /*#__PURE__*/React__default.createElement(Tooltip, {
15456
15522
  title: title
15457
15523
  }, /*#__PURE__*/React__default.createElement(IconButton, {
@@ -15476,7 +15542,7 @@ function Cell$4(props) {
15476
15542
  const tableMeta = context.table.options.meta;
15477
15543
  return /*#__PURE__*/React__default.createElement(MemoedCell$2, Object.assign({}, context, {
15478
15544
  expandedRowRenderer: expandedRowRenderer,
15479
- isCurrentRow: tableMeta.currentRow.currentRowIndex === rowIndex,
15545
+ isActiveRow: tableMeta.rowActive.rowActiveIndex === rowIndex,
15480
15546
  isExpanded: context.row.getIsExpanded()
15481
15547
  }));
15482
15548
  }
@@ -15559,10 +15625,10 @@ function createRowDragColumn(onRowDrag) {
15559
15625
  return {
15560
15626
  id: COLUMN_ID$4,
15561
15627
  header: Header$1,
15562
- cell: context => /*#__PURE__*/React__default.createElement(Cell$5, Object.assign({}, context, {
15628
+ cell: context => ( /*#__PURE__*/React__default.createElement(Cell$5, Object.assign({}, context, {
15563
15629
  isSelected: context.row.getIsSelected(),
15564
15630
  onRowDrag: onRowDrag
15565
- })),
15631
+ }))),
15566
15632
  footer: Footer$3,
15567
15633
  meta: {
15568
15634
  align: 'center',
@@ -15597,7 +15663,7 @@ function Group$3(props) {
15597
15663
  hasSeparator,
15598
15664
  id: header.id,
15599
15665
  index: header.index,
15600
- isPrinting: tableMeta.isPrinting,
15666
+ isPrinting: tableMeta.printing.isPrinting,
15601
15667
  length: table.getRowModel().rows.length,
15602
15668
  meta: columnMeta,
15603
15669
  table
@@ -15747,7 +15813,6 @@ function useConvertChildrenToColumns(props, options, editing) {
15747
15813
  // compiler cannot get filtering out undefined items, so using the type casting here
15748
15814
  .filter(child => !!child); // need to remove undefined array items after processing the children
15749
15815
  }
15750
-
15751
15816
  const columns = processChildren(props.children);
15752
15817
  if (options.enableRowExpansion && props.expandedRowRenderer) {
15753
15818
  columns.unshift(columnHelper.display(createRowExpansionColumn(props.expandedRowRenderer)));
@@ -15773,25 +15838,25 @@ function useConvertChildrenToColumns(props, options, editing) {
15773
15838
  }, [editing.isEditing]);
15774
15839
  }
15775
15840
 
15776
- function usePrinting(isEnabled, loadAll, showWarningWhenPrintingLargeDataset = true) {
15777
- const [printWarningDialogVisibility, setPrintWarningDialogVisibility] = React__default.useState(showWarningWhenPrintingLargeDataset);
15841
+ function useTablePrinting(isEnabled = false, defaultIsWarningVisible = true, id) {
15842
+ const [isWarningVisibleForLargeDatasets, setIsWarningVisibleForLargeDatasets] = React__default.useState(defaultIsWarningVisible);
15778
15843
  return {
15779
15844
  isEnabled,
15780
- loadAll,
15781
- printWarningDialogVisibility,
15782
- setPrintWarningDialogVisibility: isEnabled ? setPrintWarningDialogVisibility : () => undefined
15845
+ isPrinting: id.endsWith('_print'),
15846
+ isWarningVisibleForLargeDatasets,
15847
+ setIsWarningVisibleForLargeDatasets: isEnabled ? setIsWarningVisibleForLargeDatasets : () => undefined
15783
15848
  };
15784
15849
  }
15785
15850
 
15786
- function useShortcutsListener(table, shortcuts) {
15851
+ function useTableShortcutsListener(table, shortcuts) {
15787
15852
  const meta = table.options.meta;
15788
15853
  const rows = table.getRowModel().rows;
15789
15854
  React__default.useEffect(() => {
15790
15855
  const shortcutKeys = Object.keys(shortcuts !== null && shortcuts !== void 0 ? shortcuts : {});
15791
15856
  const globalHandlers = [];
15792
15857
  // convert the shortcut into the correct format to register it
15793
- if (shortcuts && shortcutKeys.length && meta.currentRow.currentRowIndex !== undefined) {
15794
- const currentRow = rows[meta.currentRow.currentRowIndex];
15858
+ if (shortcuts && shortcutKeys.length && meta.rowActive.rowActiveIndex !== undefined) {
15859
+ const rowActive = rows[meta.rowActive.rowActiveIndex];
15795
15860
  shortcutKeys.forEach(key => {
15796
15861
  const handler = shortcuts[key];
15797
15862
  let keyDownHandler;
@@ -15812,7 +15877,7 @@ function useShortcutsListener(table, shortcuts) {
15812
15877
  }
15813
15878
  globalHandlers.push(createShortcutKeyDownHandler(keyDownHandlerOptions, event => {
15814
15879
  event.preventDefault();
15815
- keyDownHandler(currentRow === null || currentRow === void 0 ? void 0 : currentRow.original);
15880
+ keyDownHandler(rowActive === null || rowActive === void 0 ? void 0 : rowActive.original);
15816
15881
  }));
15817
15882
  });
15818
15883
  }
@@ -15824,17 +15889,17 @@ function useShortcutsListener(table, shortcuts) {
15824
15889
  document.removeEventListener('keydown', handler);
15825
15890
  });
15826
15891
  };
15827
- }, [shortcuts, meta.currentRow.currentRowIndex, rows.length]);
15892
+ }, [shortcuts, meta.rowActive.rowActiveIndex, rows.length]);
15828
15893
  }
15829
15894
 
15830
- function useRowGoto(isEnabled, handler) {
15895
+ function useTableRowGoto(isEnabled = false, handler) {
15831
15896
  return {
15832
15897
  isEnabled,
15833
15898
  handleGoto: isEnabled && handler ? handler : () => undefined
15834
15899
  };
15835
15900
  }
15836
15901
 
15837
- function useServerLoadingListener(table, loadPage) {
15902
+ function useTableServerLoadingListener(table, loadPage) {
15838
15903
  const sorting = table.getState().sorting;
15839
15904
  const columnFilters = table.getState().columnFilters;
15840
15905
  const search = table.getState().globalFilter;
@@ -15855,7 +15920,7 @@ function useEditingStateListener(table) {
15855
15920
  meta.editing.saveChangesIfNeeded();
15856
15921
  });
15857
15922
  }
15858
- }, [meta.currentRow.currentRowIndex]);
15923
+ }, [meta.rowActive.rowActiveIndex]);
15859
15924
  // save if editing gets toggled off
15860
15925
  React__default.useEffect(() => {
15861
15926
  if (meta.editing.isEnabled) {
@@ -15863,14 +15928,14 @@ function useEditingStateListener(table) {
15863
15928
  requestAnimationFrame(() => {
15864
15929
  meta.editing.saveChangesIfNeeded();
15865
15930
  });
15866
- } else if (meta.currentRow.currentRowIndex === undefined) {
15867
- meta.currentRow.setCurrentRowIndex(0);
15931
+ } else if (meta.rowActive.rowActiveIndex === undefined) {
15932
+ meta.rowActive.setRowActiveIndex(0);
15868
15933
  }
15869
15934
  }
15870
15935
  }, [meta.editing.isEditing]);
15871
15936
  }
15872
15937
 
15873
- function useSearch(isEnabled, excludeUnmatchedResultsInSearch = false, loadAll) {
15938
+ function useSearch(isEnabled, excludeUnmatchedResultsInSearch = false) {
15874
15939
  const [isSearching, setIsSearching] = React__default.useState(false);
15875
15940
  const [query, setQuery] = React__default.useState();
15876
15941
  const [enableHighlighting, setEnableHighlighting] = React__default.useState(true);
@@ -15890,7 +15955,6 @@ function useSearch(isEnabled, excludeUnmatchedResultsInSearch = false, loadAll)
15890
15955
  setHighlightedColumnIndexes,
15891
15956
  currentHighlightColumnIndex,
15892
15957
  setCurrentHighlightColumnIndex,
15893
- loadAll,
15894
15958
  isSearching,
15895
15959
  setIsSearching
15896
15960
  };
@@ -16147,91 +16211,72 @@ function usePauseShortcuts() {
16147
16211
  };
16148
16212
  }
16149
16213
 
16150
- function useTable$1(props) {
16151
- var _ref, _defaultSettings$colu, _defaultSettings$rowH, _props$length;
16152
- // options
16153
- const options = useTablePreset(props);
16154
- const tableOptions = {
16155
- enableColumnFilters: options.enableFiltering,
16156
- enableColumnResizing: options.enableColumnResizing,
16157
- enableExpanding: options.enableRowExpansion,
16158
- enableGlobalFilter: options.enableSearch,
16159
- enableHiding: options.enableColumnHiding,
16160
- enableRowSelection: options.enableRowSelection,
16161
- enableMultiRowSelection: !options.enableRowSelectionSingle,
16162
- enableSorting: options.enableSorting
16163
- };
16164
- // resizing
16165
- if (tableOptions.enableColumnResizing) {
16166
- tableOptions.columnResizeMode = 'onChange';
16167
- }
16168
- // filtering
16169
- if (tableOptions.enableColumnFilters) {
16170
- if (!props.onFilter) {
16171
- tableOptions.filterFns = {
16172
- tacoFilter: (row, columnId, filter) => columnFilterFn(row.getValue(columnId), filter)
16173
- };
16174
- tableOptions.getFilteredRowModel = reactTable$1.getFilteredRowModel();
16175
- }
16176
- // we don't tableOptions.manualFiltering = true; because it breaks global filtering, server filtering still works :shrug:
16177
- }
16178
- // search
16179
- if (tableOptions.enableGlobalFilter) {
16180
- // search is always client side, since we call loadAll when searching
16181
- tableOptions.globalFilterFn = (row, columnId, searchQuery) => {
16182
- try {
16183
- if (row.original) {
16184
- const cell = row.getAllCells().find(cell => cell.column.id === columnId);
16185
- const columnMeta = cell === null || cell === void 0 ? void 0 : cell.column.columnDef.meta;
16186
- if (cell && cell.column.getIsVisible() && columnMeta !== null && columnMeta !== void 0 && columnMeta.enableSearch) {
16187
- const cellValue = getCellValueAsString(row.original[columnId], columnMeta === null || columnMeta === void 0 ? void 0 : columnMeta.dataType);
16188
- if (cellValue !== undefined) {
16189
- return globalFilterFn(cellValue, searchQuery);
16190
- }
16191
- }
16192
- return false;
16193
- }
16194
- } catch {
16195
- //
16196
- }
16197
- return false;
16198
- };
16199
- tableOptions.getFilteredRowModel = reactTable$1.getFilteredRowModel();
16200
- tableOptions.getColumnCanGlobalFilter = column => {
16201
- var _column$columnDef$met;
16202
- return (_column$columnDef$met = column.columnDef.meta.enableSearch) !== null && _column$columnDef$met !== void 0 ? _column$columnDef$met : true;
16203
- };
16204
- }
16205
- // sorting
16206
- if (options.enableSorting) {
16207
- if (props.onSort) {
16208
- tableOptions.manualSorting = true;
16209
- // onSort is called as a listener to let the consumer update their data, so we don't use onSortingChange
16210
- } else {
16211
- tableOptions.getSortedRowModel = reactTable$1.getSortedRowModel();
16212
- }
16214
+ function useTableFontSizeListener(table) {
16215
+ const meta = table.options.meta;
16216
+ const previousFontSizeRef = React__default.useRef(meta.fontSize.size);
16217
+ useLazyEffect(() => {
16218
+ const cellWidthDifference = getCellWidthDifference(`${previousFontSizeRef.current}-${meta.fontSize.size}`);
16219
+ table.setColumnSizing(sizes => {
16220
+ const minColumnSize = getCellMinWidth(meta.fontSize.size);
16221
+ return Object.fromEntries(Object.entries(sizes).map(([columnName, prevColumnSize]) => {
16222
+ // Prevents width value in the setting to go below the minColumnSize
16223
+ const newSize = Math.max(minColumnSize, prevColumnSize + cellWidthDifference);
16224
+ return [columnName, newSize];
16225
+ }));
16226
+ });
16227
+ previousFontSizeRef.current = meta.fontSize.size;
16228
+ }, [meta.fontSize.size]);
16229
+ }
16230
+ function getCellWidthDifference(fontSizeKey) {
16231
+ switch (fontSizeKey) {
16232
+ case `${TableFontSizes.small}-${TableFontSizes.medium}`:
16233
+ case `${TableFontSizes.medium}-${TableFontSizes.large}`:
16234
+ return 8;
16235
+ case `${TableFontSizes.medium}-${TableFontSizes.small}`:
16236
+ case `${TableFontSizes.large}-${TableFontSizes.medium}`:
16237
+ return -8;
16238
+ case `${TableFontSizes.small}-${TableFontSizes.large}`:
16239
+ return 16;
16240
+ case `${TableFontSizes.large}-${TableFontSizes.small}`:
16241
+ return -16;
16242
+ default:
16243
+ return 0;
16213
16244
  }
16214
- const [defaultSettings, setSettings] = useSettings(props.id, props.defaultSettings, props.onChangeSettings);
16215
- // custom features
16216
- const columnFreezing = useColumnFreezing( // temporarily see if deprecated frozenColumnCount is there
16217
- (_ref = (_defaultSettings$colu = defaultSettings.columnFreezingIndex) !== null && _defaultSettings$colu !== void 0 ? _defaultSettings$colu : defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.frozenColumnCount) !== null && _ref !== void 0 ? _ref : props.defaultColumnFreezingIndex, options);
16218
- const columnOrdering = useColumnOrdering(options);
16219
- const currentRow = useCurrentRow(props.defaultCurrentRowIndex);
16245
+ }
16246
+
16247
+ function useTable$1(props, ref) {
16248
+ var _settings$columnFreez, _props$length;
16249
+ // load any persisted table settings and merge them with any defaults
16250
+ const [settings, setSettings] = useSettings(props.id, props.defaultSettings, props.onChangeSettings);
16251
+ // configure table3 options
16252
+ const options = useTablePreset(props);
16253
+ // configure react-table built-in features
16254
+ const tableOptions = configureReactTableOptions(props, options);
16255
+ // configure custom features
16256
+ const columnFreezing = useColumnFreezing((_settings$columnFreez = settings.columnFreezingIndex) !== null && _settings$columnFreez !== void 0 ? _settings$columnFreez : props.defaultColumnFreezingIndex, options);
16257
+ // can't change due to rename to "active row"
16220
16258
  const validation = useValidation(props.onCellValidate, props.onRowValidate);
16259
+ // not relevant to common table
16221
16260
  const editing = useEditing(options.enableEditing, validation, props.onSave);
16222
- const fontSize = useFontSize(options.enableFontSize, defaultSettings.fontSize);
16223
- const hoverState = usePauseHoverState();
16224
- const printing = usePrinting(options.enablePrinting, props.loadAll, defaultSettings.showWarningWhenPrintingLargeDataset);
16261
+ // needs to be moved
16225
16262
  const rowActions = useRowActions$1(props.actionsForRow, props.actionsForRowLength);
16226
- const rowClick = useRowClick(props.onRowClick);
16263
+ // not relevant to common table
16227
16264
  const rowDrag = useRowDrag(options.enableRowDrag);
16265
+ // not relevant to common table
16228
16266
  const rowDrop = useRowDrop(options.enableRowDrop, props.onRowDrop);
16229
- const rowGoto = useRowGoto(options.enableRowGoto, props.onRowGoto);
16230
- const rowHeight = useRowHeight(options.enableRowHeight, // temporarily see if deprecated rowDensity is there
16231
- (_defaultSettings$rowH = defaultSettings.rowHeight) !== null && _defaultSettings$rowH !== void 0 ? _defaultSettings$rowH : defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.rowDensity);
16232
- const rowSelection = useRowSelection();
16233
- const search = useSearch(options.enableSearch, defaultSettings.excludeUnmatchedRecordsInSearch, props.loadAll);
16267
+ // haven't migrated load all/server loading yet
16268
+ const search = useSearch(options.enableSearch, settings.excludeUnmatchedRecordsInSearch);
16234
16269
  const shortcutsState = usePauseShortcuts();
16270
+ // custom features - shared/migrated
16271
+ const columnOrdering = useTableColumnOrdering(options.enableColumnOrdering);
16272
+ const fontSize = useTableFontSize(options.enableFontSize, settings.fontSize);
16273
+ const printing = useTablePrinting(options.enablePrinting, settings.showWarningWhenPrintingLargeDataset, props.id);
16274
+ const rowActive = useTableRowActive$1(true, props.defaultCurrentRowIndex);
16275
+ const rowClick = useTableRowClick(true, props.onRowClick);
16276
+ const rowGoto = useTableRowGoto(options.enableRowGoto, props.onRowGoto);
16277
+ const rowHeight = useTableRowHeight(options.enableRowHeight, settings.rowHeight);
16278
+ const rowSelection = useTableRowSelection(options.enableRowSelection);
16279
+ const server = useTableServerLoading(props.loadPage, props.loadAll);
16235
16280
  // columns
16236
16281
  const {
16237
16282
  columns,
@@ -16241,13 +16286,13 @@ function useTable$1(props) {
16241
16286
  } = useConvertChildrenToColumns(props, options, editing);
16242
16287
  // built-in features
16243
16288
  const initialState = React__default.useMemo(() => {
16244
- var _defaultSettings$colu2, _defaultSettings$colu3, _props$defaultSetting, _props$defaultSetting3;
16289
+ var _settings$columnSizin, _settings$columnVisib, _props$defaultSetting, _props$defaultSetting3;
16245
16290
  const sanitizeSortedColumns = column => columns.find(definedColumn => definedColumn.id === column.id);
16246
16291
  const state = {
16247
- columnOrder: ensureOrdering(columns, defaultSettings.columnOrder),
16248
- columnSizing: (_defaultSettings$colu2 = defaultSettings.columnSizing) !== null && _defaultSettings$colu2 !== void 0 ? _defaultSettings$colu2 : defaultColumnSizing,
16249
- columnVisibility: (_defaultSettings$colu3 = defaultSettings.columnVisibility) !== null && _defaultSettings$colu3 !== void 0 ? _defaultSettings$colu3 : defaultColumnVisibility,
16250
- sorting: defaultSettings.sorting ? defaultSettings.sorting.filter(sanitizeSortedColumns) : defaultSorting
16292
+ columnOrder: ensureOrdering(columns, [COLUMN_ID, COLUMN_ID$1], settings.columnOrder),
16293
+ columnSizing: (_settings$columnSizin = settings.columnSizing) !== null && _settings$columnSizin !== void 0 ? _settings$columnSizin : defaultColumnSizing,
16294
+ columnVisibility: (_settings$columnVisib = settings.columnVisibility) !== null && _settings$columnVisib !== void 0 ? _settings$columnVisib : defaultColumnVisibility,
16295
+ sorting: settings.sorting ? settings.sorting.filter(sanitizeSortedColumns) : defaultSorting
16251
16296
  };
16252
16297
  // we don't save these outside the table, but they need to be here for print to inherit them - see PrintButton.tsx
16253
16298
  if ((_props$defaultSetting = props.defaultSettings) !== null && _props$defaultSetting !== void 0 && _props$defaultSetting.columnFilters) {
@@ -16270,7 +16315,7 @@ function useTable$1(props) {
16270
16315
  excludeUnmatchedRecordsInSearch: search.excludeUnmatchedResults,
16271
16316
  fontSize: fontSize.isEnabled ? fontSize.size : undefined,
16272
16317
  rowHeight: rowHeight.isEnabled ? rowHeight.height : undefined,
16273
- showWarningWhenPrintingLargeDataset: printing.printWarningDialogVisibility,
16318
+ showWarningWhenPrintingLargeDataset: printing.isWarningVisibleForLargeDatasets,
16274
16319
  sorting: state.sorting
16275
16320
  };
16276
16321
  };
@@ -16284,16 +16329,15 @@ function useTable$1(props) {
16284
16329
  meta: {
16285
16330
  columnFreezing,
16286
16331
  columnOrdering,
16287
- currentRow,
16288
16332
  editing,
16289
16333
  enableFooter: options.enableFooter,
16290
16334
  fontSize,
16291
16335
  getSettings,
16292
- hoverState,
16293
16336
  isPrinting: props.id.endsWith('_print'),
16294
16337
  isUsingServer: !!props.loadPage,
16295
16338
  printing,
16296
16339
  rowActions: rowActions,
16340
+ rowActive,
16297
16341
  rowClick: rowClick,
16298
16342
  rowDrag,
16299
16343
  rowDrop,
@@ -16301,24 +16345,91 @@ function useTable$1(props) {
16301
16345
  rowHeight,
16302
16346
  rowSelection,
16303
16347
  search,
16348
+ server,
16304
16349
  shortcutsState,
16350
+ tableRef: ref,
16305
16351
  validation
16306
16352
  }
16307
16353
  });
16308
16354
  // listeners
16309
- useCurrentRowListener(table);
16310
16355
  useEditingStateListener(table);
16311
- useFilteringStateListener(table, props.onFilter);
16312
- useRowSelectionListener(table, props.onRowSelect);
16313
16356
  useSettingsStateListener(table, setSettings);
16314
- useShortcutsListener(table, props.shortcuts);
16315
- useServerLoadingListener(table, props.loadPage);
16316
- useSortingStateListener(table, props.onSort);
16357
+ // listeners - shared/migrated
16358
+ useTableDataListener(table);
16359
+ useTableFilterListener(table, props.onFilter);
16360
+ useTableFontSizeListener(table);
16361
+ useTableRowSelectionListener(table, props.onRowSelect);
16362
+ useTableServerLoadingListener(table, props.loadPage);
16363
+ useTableShortcutsListener(table, props.shortcuts);
16364
+ useTableSortingListener$1(table, props.onSort);
16317
16365
  return {
16318
16366
  table,
16319
16367
  length: (_props$length = props.length) !== null && _props$length !== void 0 ? _props$length : props.data.length
16320
16368
  };
16321
16369
  }
16370
+ function configureReactTableOptions(props, options) {
16371
+ const tableOptions = {
16372
+ enableColumnFilters: options.enableFiltering,
16373
+ enableColumnResizing: options.enableColumnResizing,
16374
+ enableExpanding: options.enableRowExpansion,
16375
+ enableGlobalFilter: options.enableSearch,
16376
+ enableHiding: options.enableColumnHiding,
16377
+ enableRowSelection: options.enableRowSelection,
16378
+ enableMultiRowSelection: !options.enableRowSelectionSingle,
16379
+ enableSorting: options.enableSorting
16380
+ };
16381
+ // resizing
16382
+ if (tableOptions.enableColumnResizing) {
16383
+ tableOptions.columnResizeMode = 'onChange';
16384
+ }
16385
+ // filtering
16386
+ if (tableOptions.enableColumnFilters) {
16387
+ if (!props.onFilter) {
16388
+ tableOptions.filterFns = {
16389
+ tacoFilter: (row, columnId, filter) => columnFilterFn(row.getValue(columnId), filter)
16390
+ };
16391
+ tableOptions.getFilteredRowModel = reactTable$1.getFilteredRowModel();
16392
+ }
16393
+ // we don't tableOptions.manualFiltering = true; because it breaks global filtering, server filtering still works :shrug:
16394
+ }
16395
+ // search
16396
+ if (tableOptions.enableGlobalFilter) {
16397
+ // search is always client side, since we call loadAll when searching
16398
+ tableOptions.globalFilterFn = (row, columnId, searchQuery) => {
16399
+ try {
16400
+ if (row.original) {
16401
+ const cell = row.getAllCells().find(cell => cell.column.id === columnId);
16402
+ const columnMeta = cell === null || cell === void 0 ? void 0 : cell.column.columnDef.meta;
16403
+ if (cell && cell.column.getIsVisible() && columnMeta !== null && columnMeta !== void 0 && columnMeta.enableSearch) {
16404
+ const cellValue = getCellValueAsString(row.original[columnId], columnMeta === null || columnMeta === void 0 ? void 0 : columnMeta.dataType);
16405
+ if (cellValue !== undefined) {
16406
+ return globalFilterFn(cellValue, searchQuery);
16407
+ }
16408
+ }
16409
+ return false;
16410
+ }
16411
+ } catch {
16412
+ //
16413
+ }
16414
+ return false;
16415
+ };
16416
+ tableOptions.getFilteredRowModel = reactTable$1.getFilteredRowModel();
16417
+ tableOptions.getColumnCanGlobalFilter = column => {
16418
+ var _column$columnDef$met;
16419
+ return (_column$columnDef$met = column.columnDef.meta.enableSearch) !== null && _column$columnDef$met !== void 0 ? _column$columnDef$met : true;
16420
+ };
16421
+ }
16422
+ // sorting
16423
+ if (options.enableSorting) {
16424
+ if (props.onSort) {
16425
+ tableOptions.manualSorting = true;
16426
+ // onSort is called as a listener to let the consumer update their data, so we don't use onSortingChange
16427
+ } else {
16428
+ tableOptions.getSortedRowModel = reactTable$1.getSortedRowModel();
16429
+ }
16430
+ }
16431
+ return tableOptions;
16432
+ }
16322
16433
 
16323
16434
  const ExpandedRow = /*#__PURE__*/React__default.memo(function ExpandedRow(props) {
16324
16435
  var _renderer;
@@ -16383,9 +16494,9 @@ function SkeletonRow(props) {
16383
16494
  } = props;
16384
16495
  return /*#__PURE__*/React__default.createElement("div", {
16385
16496
  className: "contents"
16386
- }, columns.map(column => /*#__PURE__*/React__default.createElement(SkeletonCell, Object.assign({
16497
+ }, columns.map(column => ( /*#__PURE__*/React__default.createElement(SkeletonCell, Object.assign({
16387
16498
  key: column.id
16388
- }, otherProps))));
16499
+ }, otherProps)))));
16389
16500
  }
16390
16501
 
16391
16502
  // Note - latest react-virtual requires an inner container, and that doesn't work with css grid,
@@ -16434,17 +16545,17 @@ function createBodyRenderer(props, rows, table, tableRef, virtualiser, setExpand
16434
16545
  row: row,
16435
16546
  table: table,
16436
16547
  tableRef: tableRef
16437
- }, row.getVisibleCells().map((cell, index) => /*#__PURE__*/React__default.createElement(React__default.Fragment, {
16548
+ }, row.getVisibleCells().map((cell, index) => ( /*#__PURE__*/React__default.createElement(React__default.Fragment, {
16438
16549
  key: cell.id
16439
16550
  }, reactTable$1.flexRender(cell.column.columnDef.cell, {
16440
16551
  ...cell.getContext(),
16441
16552
  index,
16442
16553
  tableRef
16443
- })))), row.getIsExpanded() ? /*#__PURE__*/React__default.createElement(ExpandedRow, {
16554
+ }))))), row.getIsExpanded() ? ( /*#__PURE__*/React__default.createElement(ExpandedRow, {
16444
16555
  data: row.original,
16445
16556
  renderer: props.expandedRowRenderer,
16446
16557
  registerSize: createSetSizeHandler(virtualRow.index)
16447
- }) : null);
16558
+ })) : null);
16448
16559
  }), paddingBottom ? /*#__PURE__*/React__default.createElement("div", {
16449
16560
  style: {
16450
16561
  height: paddingBottom
@@ -16563,10 +16674,10 @@ function Search$2(props) {
16563
16674
  tableMeta.search.setIsSearching(true);
16564
16675
  // load all data if that is possible
16565
16676
  const _temp = function () {
16566
- if (tableMeta.search.loadAll && loading === LoadingState.Incomplete) {
16677
+ if (tableMeta.server.loadAll && loading === LoadingState.Incomplete) {
16567
16678
  setLoading(LoadingState.Loading);
16568
16679
  // don't pass the search query because we need all data - not filtered data
16569
- return Promise.resolve(tableMeta.search.loadAll(table.getState().sorting, table.getState().columnFilters, undefined)).then(function () {
16680
+ return Promise.resolve(tableMeta.server.loadAll(table.getState().sorting, table.getState().columnFilters, undefined)).then(function () {
16570
16681
  setLoading(LoadingState.Completed);
16571
16682
  });
16572
16683
  }
@@ -16584,14 +16695,16 @@ function Search$2(props) {
16584
16695
  setQuery(String(query !== null && query !== void 0 ? query : ''));
16585
16696
  };
16586
16697
  const handleClear = () => {
16587
- var _rows$rowIndex;
16588
- const [rowIndex, cellIndex] = tableMeta.search.highlightedColumnIndexes[tableMeta.search.currentHighlightColumnIndex || 0];
16698
+ const [rowIndex = null, cellIndex = null] = tableMeta.search.highlightedColumnIndexes[tableMeta.search.currentHighlightColumnIndex || 0];
16589
16699
  const rows = table.getRowModel().rows;
16590
- const rowId = ((_rows$rowIndex = rows[rowIndex]) === null || _rows$rowIndex === void 0 ? void 0 : _rows$rowIndex.id) || null;
16591
16700
  tableMeta.search.setQuery('');
16592
16701
  // Need to save row id and cell index, to be able to find the row in the table with updated indexes, after global filter will be reset.
16593
16702
  lastCellIndex.value = String(cellIndex);
16594
- setRowIdToNavigate(rowId);
16703
+ if (rowIndex !== null) {
16704
+ var _rows$rowIndex;
16705
+ const rowId = ((_rows$rowIndex = rows[rowIndex]) === null || _rows$rowIndex === void 0 ? void 0 : _rows$rowIndex.id) || null;
16706
+ setRowIdToNavigate(rowId);
16707
+ }
16595
16708
  };
16596
16709
  const handleKeyDown = event => {
16597
16710
  if (event.key === 'Escape') {
@@ -16608,7 +16721,7 @@ function Search$2(props) {
16608
16721
  const rows = table.getRowModel().rows;
16609
16722
  const rowIndex = rows.findIndex(row => row.id === rowIdToNavigate);
16610
16723
  tableMeta.search.setIsSearching(false);
16611
- tableMeta.currentRow.setCurrentRowIndex(rowIndex);
16724
+ tableMeta.rowActive.setRowActiveIndex(rowIndex);
16612
16725
  scrollTo(rowIndex);
16613
16726
  setRowIdToNavigate(null);
16614
16727
  }
@@ -16710,7 +16823,7 @@ function resetHighlightedColumnIndexes(enabled, value, table) {
16710
16823
  tableMeta.search.setCurrentHighlightColumnIndex(undefined);
16711
16824
  }
16712
16825
  if (firstRowIndex !== undefined) {
16713
- tableMeta.currentRow.setCurrentRowIndex(firstRowIndex);
16826
+ tableMeta.rowActive.setRowActiveIndex(firstRowIndex);
16714
16827
  }
16715
16828
  return firstRowIndex;
16716
16829
  }
@@ -16744,12 +16857,12 @@ function FilterColumn(props) {
16744
16857
  return /*#__PURE__*/React__default.createElement(Select2.Option, {
16745
16858
  key: column.id,
16746
16859
  value: column.id,
16747
- postfix: !column.getIsVisible() ? /*#__PURE__*/React__default.createElement(Tooltip, {
16860
+ postfix: !column.getIsVisible() ? ( /*#__PURE__*/React__default.createElement(Tooltip, {
16748
16861
  title: texts.table3.filters.hiddenColumn
16749
16862
  }, /*#__PURE__*/React__default.createElement(Icon, {
16750
16863
  name: "eye-off",
16751
16864
  className: "text-grey-500 !h-5 !w-5"
16752
- })) : undefined,
16865
+ }))) : undefined,
16753
16866
  disabled: column.id !== value && (!column.getCanFilter() || !!filters.find(f => f.id === column.id))
16754
16867
  }, ((_column$columnDef$met = column.columnDef.meta) === null || _column$columnDef$met === void 0 ? void 0 : _column$columnDef$met.header) + (column.parent ? ` (${(_column$parent = column.parent) === null || _column$parent === void 0 ? void 0 : (_column$parent$column = _column$parent.columnDef.meta) === null || _column$parent$column === void 0 ? void 0 : _column$parent$column.header})` : ''));
16755
16868
  }))));
@@ -16776,10 +16889,10 @@ function FilterComparator(props) {
16776
16889
  disabled: !column,
16777
16890
  onChange: handleChange,
16778
16891
  value: value
16779
- }), validComparators.map(comparator => /*#__PURE__*/React__default.createElement(Select2.Option, {
16892
+ }), validComparators.map(comparator => ( /*#__PURE__*/React__default.createElement(Select2.Option, {
16780
16893
  key: comparator,
16781
16894
  value: comparator
16782
- }, getComparatorText(comparator, texts, column))));
16895
+ }, getComparatorText(comparator, texts, column)))));
16783
16896
  }
16784
16897
  function guessComparatorsBasedOnControl(column) {
16785
16898
  var _column$columnDef$met;
@@ -17174,6 +17287,12 @@ function FiltersButton(props) {
17174
17287
  setFilters([]);
17175
17288
  setPlaceholderCount(1);
17176
17289
  };
17290
+ const handleClose = React__default.useCallback(open => {
17291
+ if (!open) {
17292
+ setFilters(appliedFilters);
17293
+ setPlaceholderCount(appliedFilters.length === 0 ? 1 : 0);
17294
+ }
17295
+ }, [appliedFilters]);
17177
17296
  // Because filters can be reset from outside
17178
17297
  React__default.useEffect(() => {
17179
17298
  if (appliedFilters.length === 0) {
@@ -17186,7 +17305,9 @@ function FiltersButton(props) {
17186
17305
  className: cn({
17187
17306
  '!wcag-blue-100': appliedFilters.length
17188
17307
  }),
17189
- popover: popoverProps => /*#__PURE__*/React__default.createElement(Popover, Object.assign({}, popoverProps), /*#__PURE__*/React__default.createElement(Popover.Content, null, /*#__PURE__*/React__default.createElement("div", {
17308
+ popover: popoverProps => ( /*#__PURE__*/React__default.createElement(Popover, Object.assign({}, popoverProps, {
17309
+ onChange: handleClose
17310
+ }), /*#__PURE__*/React__default.createElement(Popover.Content, null, /*#__PURE__*/React__default.createElement("div", {
17190
17311
  className: "flex w-[40rem] flex-col gap-4"
17191
17312
  }, /*#__PURE__*/React__default.createElement("div", {
17192
17313
  className: "flex h-8"
@@ -17198,7 +17319,7 @@ function FiltersButton(props) {
17198
17319
  className: "text-grey-700 mb-0 mr-auto mt-px inline-flex"
17199
17320
  }, texts.table3.filters.total.replace('[CURRENT]', new Intl.NumberFormat(locale).format(table.getFilteredRowModel().rows.length)).replace('[TOTAL]', new Intl.NumberFormat(locale).format(total))))), /*#__PURE__*/React__default.createElement("div", {
17200
17321
  className: "flex flex-col gap-2"
17201
- }, filters.map((filter, index) => /*#__PURE__*/React__default.createElement(Filter$1, {
17322
+ }, filters.map((filter, index) => ( /*#__PURE__*/React__default.createElement(Filter$1, {
17202
17323
  key: `filter_${index}`,
17203
17324
  allColumns: allColumns,
17204
17325
  filter: filter,
@@ -17206,14 +17327,14 @@ function FiltersButton(props) {
17206
17327
  position: index,
17207
17328
  onChange: handleChangeFilter,
17208
17329
  onRemove: handleRemoveFilter
17209
- })), [...Array(placeholderCount)].map((_, index) => /*#__PURE__*/React__default.createElement(Placeholder, {
17330
+ }))), [...Array(placeholderCount)].map((_, index) => ( /*#__PURE__*/React__default.createElement(Placeholder, {
17210
17331
  key: `placeholder_${index}`,
17211
17332
  allColumns: allColumns,
17212
17333
  filters: filters,
17213
17334
  position: filters.length + index,
17214
17335
  onCreate: handleCreateFilterFromPlaceholder,
17215
17336
  onRemove: placeholderCount > 1 || filters.length > 0 ? handleRemovePlaceholder : undefined
17216
- })), /*#__PURE__*/React__default.createElement("div", {
17337
+ }))), /*#__PURE__*/React__default.createElement("div", {
17217
17338
  className: "justify-start"
17218
17339
  }, /*#__PURE__*/React__default.createElement(Button$1, {
17219
17340
  appearance: "discrete",
@@ -17225,16 +17346,16 @@ function FiltersButton(props) {
17225
17346
  }, "Clear"), /*#__PURE__*/React__default.createElement(Button$1, {
17226
17347
  appearance: "primary",
17227
17348
  onClick: handleApply
17228
- }, "Apply"))))),
17349
+ }, "Apply")))))),
17229
17350
  ref,
17230
- tooltip: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, texts.table3.filters.tooltip, /*#__PURE__*/React__default.createElement(Shortcut, {
17351
+ tooltip: ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, texts.table3.filters.tooltip, /*#__PURE__*/React__default.createElement(Shortcut, {
17231
17352
  className: "ml-2",
17232
17353
  keys: {
17233
17354
  key: 'f',
17234
17355
  meta: true,
17235
17356
  shift: true
17236
17357
  }
17237
- }))
17358
+ })))
17238
17359
  };
17239
17360
  if (!isLargeScreen && !appliedFilters.length) {
17240
17361
  return /*#__PURE__*/React__default.createElement(IconButton, Object.assign({}, buttonProps, {
@@ -17561,14 +17682,14 @@ function PrintButton(props) {
17561
17682
  texts
17562
17683
  } = useLocalization();
17563
17684
  const toast = useToast();
17564
- const [isPrinting, setIsPrinting] = React__default.useState(false);
17685
+ const [isCurrentlyPrinting, setIsCurrentlyPrinting] = React__default.useState(false);
17565
17686
  const [showWarningDialog, setShowWarningDialog] = React__default.useState(false);
17566
17687
  const loadingToastRef = React__default.useRef(null);
17567
17688
  const buttonRef = React__default.useRef(null);
17568
17689
  const tableMeta = table.options.meta;
17569
17690
  const state = table.getState();
17570
17691
  const {
17571
- printWarningDialogVisibility
17692
+ isWarningVisibleForLargeDatasets
17572
17693
  } = tableMeta.printing;
17573
17694
  // When changing printTableId, update packages/taco/src/components/Table3/Table3.tsx file and other usages where
17574
17695
  // printTableId is used to figure out whether the table is a print table or not.
@@ -17621,8 +17742,8 @@ function PrintButton(props) {
17621
17742
  const restoreTableDataWithoutSearch = function () {
17622
17743
  try {
17623
17744
  const _temp = _catch(function () {
17624
- var _tableMeta$printing$l, _tableMeta$printing;
17625
- return Promise.resolve((_tableMeta$printing$l = (_tableMeta$printing = tableMeta.printing).loadAll) === null || _tableMeta$printing$l === void 0 ? void 0 : _tableMeta$printing$l.call(_tableMeta$printing, table.getState().sorting, table.getState().columnFilters, undefined)).then(function () {});
17745
+ var _tableMeta$server$loa, _tableMeta$server;
17746
+ return Promise.resolve((_tableMeta$server$loa = (_tableMeta$server = tableMeta.server).loadAll) === null || _tableMeta$server$loa === void 0 ? void 0 : _tableMeta$server$loa.call(_tableMeta$server, table.getState().sorting, table.getState().columnFilters, undefined)).then(function () {});
17626
17747
  }, function (error) {
17627
17748
  handleLoadingError(error);
17628
17749
  });
@@ -17635,11 +17756,11 @@ function PrintButton(props) {
17635
17756
  try {
17636
17757
  function _temp3() {
17637
17758
  var _loadingToastRef$curr2;
17638
- setIsPrinting(false);
17759
+ setIsCurrentlyPrinting(false);
17639
17760
  (_loadingToastRef$curr2 = loadingToastRef.current) === null || _loadingToastRef$curr2 === void 0 ? void 0 : _loadingToastRef$curr2.close();
17640
17761
  }
17641
17762
  const _temp2 = function () {
17642
- if (tableMeta.printing.loadAll && excludeUnmatchedResults) {
17763
+ if (tableMeta.server.loadAll && excludeUnmatchedResults) {
17643
17764
  return Promise.resolve(restoreTableDataWithoutSearch()).then(function () {});
17644
17765
  }
17645
17766
  }();
@@ -17657,11 +17778,11 @@ function PrintButton(props) {
17657
17778
  let _exit = false;
17658
17779
  function _temp6(_result3) {
17659
17780
  if (_exit) return _result3;
17660
- if (hasNonSafeCellCount && printWarningDialogVisibility) {
17781
+ if (hasNonSafeCellCount && isWarningVisibleForLargeDatasets) {
17661
17782
  setShowWarningDialog(true);
17662
17783
  } else {
17663
17784
  // only set printing (mount the iframe) when the data has loaded, it prevents repaint performance slow downs
17664
- setIsPrinting(true);
17785
+ setIsCurrentlyPrinting(true);
17665
17786
  }
17666
17787
  }
17667
17788
  loadingToastRef.current = toast.loading(texts.table3.print.loading);
@@ -17670,7 +17791,7 @@ function PrintButton(props) {
17670
17791
  // if loadAll is not defined, just print with what we've got
17671
17792
  // don't compare length to data.length because the api might be choosing not to return all for performance
17672
17793
  const _temp5 = function () {
17673
- if (!tableMeta.printing.loadAll) {
17794
+ if (!tableMeta.server.loadAll) {
17674
17795
  const {
17675
17796
  data
17676
17797
  } = tableProps;
@@ -17678,7 +17799,7 @@ function PrintButton(props) {
17678
17799
  hasNonSafeCellCount = cellCount > SAFE_PRINT_CELL_COUNT;
17679
17800
  } else {
17680
17801
  const _temp4 = _catch(function () {
17681
- return Promise.resolve(tableMeta.printing.loadAll(table.getState().sorting, table.getState().columnFilters,
17802
+ return Promise.resolve(tableMeta.server.loadAll(table.getState().sorting, table.getState().columnFilters,
17682
17803
  // We need to pass search query to the server when printing, to be able to render correct data set in iFrame,
17683
17804
  // But in "display" table, search is performed only on client side, so we'll need to request data again without search query,
17684
17805
  // when printing will be finished.
@@ -17705,12 +17826,12 @@ function PrintButton(props) {
17705
17826
  }
17706
17827
  };
17707
17828
  const handleWarningDialogAccept = () => {
17708
- setIsPrinting(true);
17829
+ setIsCurrentlyPrinting(true);
17709
17830
  };
17710
17831
  const handleWarningDialogCancel = function () {
17711
17832
  try {
17712
17833
  const _temp7 = function () {
17713
- if (tableMeta.printing.loadAll && excludeUnmatchedResults) {
17834
+ if (tableMeta.server.loadAll && excludeUnmatchedResults) {
17714
17835
  return Promise.resolve(restoreTableDataWithoutSearch()).then(function () {});
17715
17836
  }
17716
17837
  }();
@@ -17725,22 +17846,22 @@ function PrintButton(props) {
17725
17846
  setShowWarningDialog(false);
17726
17847
  };
17727
17848
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(IconButton, {
17728
- disabled: isPrinting,
17849
+ disabled: isCurrentlyPrinting,
17729
17850
  icon: "print",
17730
17851
  onClick: handlePrint,
17731
17852
  "aria-label": texts.table3.print.tooltip,
17732
17853
  tooltip: texts.table3.print.tooltip,
17733
17854
  ref: buttonRef
17734
- }), isPrinting && iframeTableProps.data !== null && /*#__PURE__*/React__default.createElement(PrintIFrame, {
17855
+ }), isCurrentlyPrinting && iframeTableProps.data !== null && ( /*#__PURE__*/React__default.createElement(PrintIFrame, {
17735
17856
  onAfterPrint: handleAfterPrint,
17736
17857
  onBeforePrint: handleBeforePrint,
17737
17858
  tableProps: iframeTableProps
17738
- }), /*#__PURE__*/React__default.createElement(WarningDialog, {
17859
+ })), /*#__PURE__*/React__default.createElement(WarningDialog, {
17739
17860
  open: showWarningDialog,
17740
17861
  onAccept: handleWarningDialogAccept,
17741
17862
  onClose: handleWarningDialogClose,
17742
17863
  onCancel: handleWarningDialogCancel,
17743
- onVisibilityChange: tableMeta.printing.setPrintWarningDialogVisibility
17864
+ onVisibilityChange: tableMeta.printing.setIsWarningVisibleForLargeDatasets
17744
17865
  }));
17745
17866
  }
17746
17867
 
@@ -17948,17 +18069,17 @@ function ColumnSettingsPopover(props) {
17948
18069
  })) {
17949
18070
  return;
17950
18071
  }
17951
- table.setColumnOrder(currentOrder => ensureOrdering(allColumns, SortablePrimitive.arrayMove(currentOrder, currentOrder.findIndex(c => c === activeId), currentOrder.findIndex(c => c === overId))));
18072
+ table.setColumnOrder(currentOrder => ensureOrdering(allColumns, [COLUMN_ID, COLUMN_ID$1], SortablePrimitive.arrayMove(currentOrder, currentOrder.findIndex(c => c === activeId), currentOrder.findIndex(c => c === overId))));
17952
18073
  };
17953
18074
  return /*#__PURE__*/React__default.createElement(Popover, Object.assign({}, popoverProps, {
17954
18075
  anchor: trigger
17955
18076
  }), /*#__PURE__*/React__default.createElement(Popover.Content, null, /*#__PURE__*/React__default.createElement("div", {
17956
18077
  className: "flex max-w-sm flex-col gap-2"
17957
- }, table.options.enableHiding ? /*#__PURE__*/React__default.createElement(Input, {
18078
+ }, table.options.enableHiding ? ( /*#__PURE__*/React__default.createElement(Input, {
17958
18079
  onChange: event => setQuery(event.target.value),
17959
18080
  placeholder: texts.table3.columnSettings.search,
17960
18081
  value: query
17961
- }) : null, tableMeta.columnOrdering.isEnabled && columns.length && !(query !== null && query !== void 0 && query.length) ? /*#__PURE__*/React__default.createElement(Container, {
18082
+ })) : null, tableMeta.columnOrdering.isEnabled && columns.length && !(query !== null && query !== void 0 && query.length) ? ( /*#__PURE__*/React__default.createElement(Container, {
17962
18083
  reorder: handleReorder
17963
18084
  }, /*#__PURE__*/React__default.createElement(List$1, {
17964
18085
  id: "columns",
@@ -17974,12 +18095,12 @@ function ColumnSettingsPopover(props) {
17974
18095
  column: column,
17975
18096
  draggable: (_column$columnDef$met5 = column.columnDef.meta) === null || _column$columnDef$met5 === void 0 ? void 0 : _column$columnDef$met5.enableOrdering
17976
18097
  }));
17977
- }))) : /*#__PURE__*/React__default.createElement("div", {
18098
+ })))) : ( /*#__PURE__*/React__default.createElement("div", {
17978
18099
  className: listClassName
17979
18100
  }, columns.length ? columns.map(column => /*#__PURE__*/React__default.createElement(Column$1, {
17980
18101
  column: column,
17981
18102
  key: column.id
17982
- })) : texts.table3.columnSettings.noResults))));
18103
+ })) : texts.table3.columnSettings.noResults)))));
17983
18104
  }
17984
18105
 
17985
18106
  function SettingsButton(props) {
@@ -18000,11 +18121,11 @@ function SettingsButton(props) {
18000
18121
  case 'columnSettings':
18001
18122
  {
18002
18123
  if (hasColumnSettings) {
18003
- popoverElement = props => /*#__PURE__*/React__default.createElement(ColumnSettingsPopover, Object.assign({}, props, {
18124
+ popoverElement = props => ( /*#__PURE__*/React__default.createElement(ColumnSettingsPopover, Object.assign({}, props, {
18004
18125
  open: true,
18005
18126
  onChange: handleClosePopover,
18006
18127
  table: table
18007
- }));
18128
+ })));
18008
18129
  }
18009
18130
  }
18010
18131
  }
@@ -18012,25 +18133,25 @@ function SettingsButton(props) {
18012
18133
  return /*#__PURE__*/React__default.createElement(IconButton, {
18013
18134
  "aria-label": texts.table3.otherOptions.tooltip,
18014
18135
  icon: "sliders",
18015
- menu: popoverElement ? undefined : menuProps => /*#__PURE__*/React__default.createElement(Menu$1, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu$1.Content, {
18136
+ menu: popoverElement ? undefined : menuProps => ( /*#__PURE__*/React__default.createElement(Menu$1, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu$1.Content, {
18016
18137
  align: "end"
18017
- }, table.options.enableHiding || tableMeta.columnOrdering.isEnabled ? /*#__PURE__*/React__default.createElement(Menu$1.Item, {
18138
+ }, table.options.enableHiding || tableMeta.columnOrdering.isEnabled ? ( /*#__PURE__*/React__default.createElement(Menu$1.Item, {
18018
18139
  icon: "columns",
18019
18140
  onClick: () => setPopover('columnSettings')
18020
- }, texts.table3.columnSettings.button) : null, tableMeta.rowHeight.isEnabled || tableMeta.fontSize.isEnabled ? /*#__PURE__*/React__default.createElement(Menu$1.Separator, null) : null, tableMeta.rowHeight.isEnabled ? /*#__PURE__*/React__default.createElement(Menu$1.Item, {
18141
+ }, texts.table3.columnSettings.button)) : null, tableMeta.rowHeight.isEnabled || tableMeta.fontSize.isEnabled ? /*#__PURE__*/React__default.createElement(Menu$1.Separator, null) : null, tableMeta.rowHeight.isEnabled ? ( /*#__PURE__*/React__default.createElement(Menu$1.Item, {
18021
18142
  icon: `height-${tableMeta.rowHeight.height}`,
18022
18143
  subMenu: () => /*#__PURE__*/React__default.createElement(RowHeight, {
18023
18144
  table: table
18024
18145
  })
18025
- }, texts.table3.rowHeight.tooltip) : null, tableMeta.fontSize.isEnabled ? /*#__PURE__*/React__default.createElement(Menu$1.Item, {
18146
+ }, texts.table3.rowHeight.tooltip)) : null, tableMeta.fontSize.isEnabled ? ( /*#__PURE__*/React__default.createElement(Menu$1.Item, {
18026
18147
  icon: "font-size",
18027
18148
  subMenu: () => /*#__PURE__*/React__default.createElement(FontSize$1, {
18028
18149
  table: table
18029
18150
  })
18030
- }, texts.table3.fontSize.tooltip) : null, customSettings ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Menu$1.Separator, null), customSettings.map(customSetting => {
18151
+ }, texts.table3.fontSize.tooltip)) : null, customSettings ? ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Menu$1.Separator, null), customSettings.map(customSetting => {
18031
18152
  const props = tableMeta.getSettings();
18032
18153
  return customSetting(props);
18033
- })) : null)),
18154
+ }))) : null))),
18034
18155
  popover: popoverElement,
18035
18156
  onClickCapture: event => event.preventDefault(),
18036
18157
  tooltip: texts.table3.otherOptions.tooltip
@@ -18155,7 +18276,6 @@ const getCellHeightPadding = (height, fontSize) => {
18155
18276
  // py-1.5
18156
18277
  }
18157
18278
  }
18158
-
18159
18279
  case 'tall':
18160
18280
  {
18161
18281
  switch (fontSize) {
@@ -18202,7 +18322,6 @@ const getCellWidthPadding = fontSize => {
18202
18322
  // py-1.5
18203
18323
  }
18204
18324
  };
18205
-
18206
18325
  const useCssVars = (height, fontSize) => {
18207
18326
  const style = {
18208
18327
  '--table3-cell-padding-x': getCellWidthPadding(fontSize),
@@ -18268,7 +18387,7 @@ function ErrorAlert(props) {
18268
18387
  };
18269
18388
  // Navigate to row and focus first invalid cell
18270
18389
  const navigateToRow = rowIndex => {
18271
- tableMeta.currentRow.setCurrentRowIndex(rowIndex);
18390
+ tableMeta.rowActive.setRowActiveIndex(rowIndex);
18272
18391
  scrollToIndex(rowIndex, {
18273
18392
  align: 'center'
18274
18393
  });
@@ -18319,7 +18438,7 @@ function ErrorAlert(props) {
18319
18438
  const getCoreRow = React__default.useCallback(rowId => coreRows.find(coreRow => coreRow.id === rowId), [coreRows]);
18320
18439
  return /*#__PURE__*/React__default.createElement("div", {
18321
18440
  className: "mb-4"
18322
- }, errorsRowIds.length ? /*#__PURE__*/React__default.createElement(Alert, {
18441
+ }, errorsRowIds.length ? ( /*#__PURE__*/React__default.createElement(Alert, {
18323
18442
  state: "error",
18324
18443
  className: "mb-1"
18325
18444
  }, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("b", null, errorsRowIds.length, " ", texts.table3.validation.alert.unsavedEntries(errorsRowIds.length)), ' '), rowIdentifierHeader || texts.table3.validation.index, ' ', errorsRowIds.map((rowId, index) => {
@@ -18334,7 +18453,7 @@ function ErrorAlert(props) {
18334
18453
  }, rowIdentifier ? coreRow === null || coreRow === void 0 ? void 0 : coreRow.original[rowIdentifier] : coreRow === null || coreRow === void 0 ? void 0 : coreRow.index), /*#__PURE__*/React__default.createElement("span", {
18335
18454
  key: `${rowId}_comma`
18336
18455
  }, index < errorsRowIds.length - 1 ? ',' : ''));
18337
- }), texts.table3.validation.alert.incompleteAndHavntBeenSaved(errorsRowIds.length)) : null, /*#__PURE__*/React__default.createElement(FilterResetDialog, {
18456
+ }), texts.table3.validation.alert.incompleteAndHavntBeenSaved(errorsRowIds.length))) : null, /*#__PURE__*/React__default.createElement(FilterResetDialog, {
18338
18457
  open: resetFiltersConfirmationOpen,
18339
18458
  onClose: () => {
18340
18459
  setResetFiltersConfirmationOpen(false);
@@ -18376,6 +18495,8 @@ function FilterResetDialog(props) {
18376
18495
  }, texts.table3.validation.resetFiltersDialog.confirm)))));
18377
18496
  }
18378
18497
 
18498
+ const fixedForwardRef = React__default.forwardRef;
18499
+
18379
18500
  function useTable3DataLoader(fetch, fetchAll, options = {
18380
18501
  pageSize: 100
18381
18502
  }) {
@@ -18509,21 +18630,19 @@ function Group$4(_) {
18509
18630
  return null;
18510
18631
  }
18511
18632
  Group$4.displayName = 'Table3Group';
18512
- // Cast the old forwardRef to the new one
18513
- const fixedForwardRef = React__default.forwardRef;
18514
18633
  const Table$1 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
18515
18634
  const {
18516
18635
  emptyState: EmptyState,
18517
18636
  customSettings,
18518
18637
  toolbarLeft,
18519
18638
  toolbarRight,
18520
- defaultCurrentRowIndex
18639
+ defaultCurrentRowIndex: defaultRowActiveIndex
18521
18640
  } = props;
18522
18641
  const internalRef = useMergedRef(ref);
18523
18642
  const {
18524
18643
  table,
18525
18644
  length
18526
- } = useTable$1(props);
18645
+ } = useTable$1(props, internalRef);
18527
18646
  useTableRefInstanceSetup(table, internalRef);
18528
18647
  React__default.useEffect(() => {
18529
18648
  if (props.autoFocus) {
@@ -18542,8 +18661,8 @@ const Table$1 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
18542
18661
  // On a very first render, the tanstack table rendered without any rows,
18543
18662
  // so we delaying default row scrolling logic with using of requestAnimation frame
18544
18663
  const animationFrameId = requestAnimationFrame(() => {
18545
- if (defaultCurrentRowIndex) {
18546
- scrollToIndex(defaultCurrentRowIndex, {
18664
+ if (defaultRowActiveIndex) {
18665
+ scrollToIndex(defaultRowActiveIndex, {
18547
18666
  align: 'center'
18548
18667
  });
18549
18668
  }
@@ -18556,15 +18675,19 @@ const Table$1 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
18556
18675
  const handleKeyDown = event => {
18557
18676
  const target = event.target;
18558
18677
  const dialog = target.closest('[role="dialog"]');
18559
- const eventOriginatedFromCombobox = !!target.closest('[role="combobox"]');
18678
+ // Select2 also have combobox role to align with W3C guidelines
18679
+ const eventOriginatedFromCombobox = !!target.closest('[role="combobox"]:not([data-taco="Select2"])');
18560
18680
  // Don't trigger global shortcuts on the table if event originated from a combobox or if table is
18561
18681
  // outside the dialog
18562
18682
  if (eventOriginatedFromCombobox || dialog && !(dialog !== null && dialog !== void 0 && dialog.contains(internalRef.current)) || tableMeta.shortcutsState.isPaused) {
18563
18683
  return;
18564
18684
  }
18565
- tableMeta.hoverState.handleKeyDown(event);
18566
- tableMeta.currentRow.handleKeyDown(event, table.getRowModel().rows.length, scrollToIndex, tableMeta.editing.isEditing, internalRef);
18567
- tableMeta.rowClick.handleKeyDown(event, table);
18685
+ const rows = table.getRowModel().rows;
18686
+ tableMeta.rowActive.handleKeyDown(event, rows.length, scrollToIndex, tableMeta.editing.isEditing ? undefined : internalRef);
18687
+ if (tableMeta.rowActive.rowActiveIndex !== undefined) {
18688
+ var _rows$tableMeta$rowAc;
18689
+ tableMeta.rowClick.handleKeyDown(event, (_rows$tableMeta$rowAc = rows[tableMeta.rowActive.rowActiveIndex]) === null || _rows$tableMeta$rowAc === void 0 ? void 0 : _rows$tableMeta$rowAc.original);
18690
+ }
18568
18691
  tableMeta.rowSelection.handleKeyDown(event, table);
18569
18692
  tableMeta.editing.handleKeyDown(event);
18570
18693
  };
@@ -18576,16 +18699,16 @@ const Table$1 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
18576
18699
  // See https://github.com/e-conomic/taco/blob/dev/packages/taco/src/components/Table3/strategies/virtualised.tsx#L143
18577
18700
  // scrollToIndex function changes when row count changes, so it is important to update handlers with new
18578
18701
  // scrollToIndex function.
18579
- [scrollToIndex, tableMeta.editing.isEditing, internalRef.current]);
18702
+ [scrollToIndex, tableMeta.editing.isEditing, internalRef.current, tableMeta.rowActive.rowActiveIndex]);
18580
18703
  const handleBlur = tableMeta.editing.isEnabled ? event => {
18581
18704
  tableMeta.editing.handleBlur(event);
18582
18705
  } : undefined;
18583
- const handleFocus = tableMeta.currentRow.currentRowIndex === undefined ? event => {
18584
- tableMeta.currentRow.handleFocus(event, table.getRowModel().rows.length, scrollToIndex);
18706
+ const handleFocus = tableMeta.rowActive.rowActiveIndex === undefined ? event => {
18707
+ tableMeta.rowActive.handleFocus(event, table.getRowModel().rows.length, scrollToIndex);
18585
18708
  } : undefined;
18586
18709
  // mouse capture fires before focus, so we can prevent propagation and stop double setting of the active row
18587
- const handleMouseCapture = tableMeta.currentRow.currentRowIndex === undefined ? event => {
18588
- tableMeta.currentRow.handleMouseCapture(event, table.getRowModel().rows.length);
18710
+ const handleMouseCapture = tableMeta.rowActive.rowActiveIndex === undefined ? event => {
18711
+ tableMeta.rowActive.handleMouseCapture(event, table.getRowModel().rows.length);
18589
18712
  } : undefined;
18590
18713
  const handleScroll = function (event) {
18591
18714
  try {
@@ -18604,7 +18727,7 @@ const Table$1 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
18604
18727
  // if the table is a print table or not.
18605
18728
  const {
18606
18729
  style: cssGridStyle
18607
- } = useCssGrid(table, tableMeta.isPrinting, tableMeta.rowActions.actionsForRowLength, tableMeta.fontSize.size);
18730
+ } = useCssGrid(table, tableMeta.printing.isPrinting, tableMeta.rowActions.actionsForRowLength, tableMeta.fontSize.size);
18608
18731
  const {
18609
18732
  style: cssVars
18610
18733
  } = useCssVars(tableMeta.rowHeight.height, tableMeta.fontSize.size);
@@ -18618,12 +18741,11 @@ const Table$1 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
18618
18741
  const columnFreezingStyle = useColumnFreezingStyle(props.id, table);
18619
18742
  const headerOffsetStyle = useHeaderOffsetStyle(props.id, table);
18620
18743
  const isServerLoadingAndNotReady = tableMeta.isUsingServer && props.length === undefined;
18621
- const isPrinting = tableMeta.isPrinting;
18622
18744
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, columnFreezingStyle ? /*#__PURE__*/React__default.createElement("style", {
18623
18745
  "data-taco": "table3-column-freezing-styles"
18624
- }, columnFreezingStyle) : null, headerOffsetStyle && !isPrinting ? /*#__PURE__*/React__default.createElement("style", {
18746
+ }, columnFreezingStyle) : null, headerOffsetStyle && !tableMeta.printing.isPrinting ? ( /*#__PURE__*/React__default.createElement("style", {
18625
18747
  "data-taco": "table3-column-header-offset-styles"
18626
- }, headerOffsetStyle) : null, /*#__PURE__*/React__default.createElement(Toolbar, {
18748
+ }, headerOffsetStyle)) : null, /*#__PURE__*/React__default.createElement(Toolbar, {
18627
18749
  table: table,
18628
18750
  tableProps: props,
18629
18751
  total: length,
@@ -18642,7 +18764,7 @@ const Table$1 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
18642
18764
  "data-font-size": tableMeta.fontSize.size,
18643
18765
  "data-editing": tableMeta.editing.isEditing,
18644
18766
  "data-horizontally-scrolled": tableMeta.columnFreezing.horizontallyScrolled,
18645
- "data-pause-hover": tableMeta === null || tableMeta === void 0 ? void 0 : tableMeta.hoverState.isPaused,
18767
+ "data-pause-hover": tableMeta === null || tableMeta === void 0 ? void 0 : tableMeta.rowActive.isHoverStatePaused,
18646
18768
  "data-resizing": !!state.columnSizingInfo.isResizingColumn,
18647
18769
  "data-taco": "table2",
18648
18770
  onBlur: handleBlur,
@@ -18652,11 +18774,11 @@ const Table$1 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
18652
18774
  role: "table",
18653
18775
  style: style,
18654
18776
  tabIndex: -1
18655
- }, isServerLoadingAndNotReady ? null : /*#__PURE__*/React__default.createElement("div", {
18777
+ }, isServerLoadingAndNotReady ? null : ( /*#__PURE__*/React__default.createElement("div", {
18656
18778
  className: "group/header contents",
18657
18779
  "data-taco": "table2-header",
18658
18780
  role: "rowgroup"
18659
- }, table.getHeaderGroups().map(headerGroup => /*#__PURE__*/React__default.createElement("div", {
18781
+ }, table.getHeaderGroups().map(headerGroup => ( /*#__PURE__*/React__default.createElement("div", {
18660
18782
  className: "contents",
18661
18783
  key: headerGroup.id,
18662
18784
  role: "row"
@@ -18672,7 +18794,7 @@ const Table$1 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
18672
18794
  scrollToIndex,
18673
18795
  hasSeparator
18674
18796
  }));
18675
- })))), table.getRowModel().rows.length ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(focus.FocusScope, {
18797
+ })))))), table.getRowModel().rows.length ? ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(focus.FocusScope, {
18676
18798
  autoFocus: tableMeta.editing.isEditing
18677
18799
  }, /*#__PURE__*/React__default.createElement("div", {
18678
18800
  onMouseDownCapture: handleMouseCapture,
@@ -18682,25 +18804,25 @@ const Table$1 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
18682
18804
  ref: bodyRef
18683
18805
  }, renderBody())), /*#__PURE__*/React__default.createElement("div", {
18684
18806
  className: "border-grey-300 col-span-full translate-y-px border-t"
18685
- }), tableMeta.enableFooter ? /*#__PURE__*/React__default.createElement("div", {
18807
+ }), tableMeta.enableFooter ? ( /*#__PURE__*/React__default.createElement("div", {
18686
18808
  className: "group/footer contents",
18687
18809
  "data-taco": "table2-footer",
18688
18810
  role: "rowgroup"
18689
18811
  },
18690
18812
  // Render the footer cell only for individual columns, excluding column groups.
18691
- table.getFooterGroups().slice(0, 1).map(footerGroup => /*#__PURE__*/React__default.createElement("div", {
18813
+ table.getFooterGroups().slice(0, 1).map(footerGroup => ( /*#__PURE__*/React__default.createElement("div", {
18692
18814
  className: "contents",
18693
18815
  key: footerGroup.id,
18694
18816
  role: "row"
18695
- }, footerGroup.headers.map(footer => /*#__PURE__*/React__default.createElement(React__default.Fragment, {
18817
+ }, footerGroup.headers.map(footer => ( /*#__PURE__*/React__default.createElement(React__default.Fragment, {
18696
18818
  key: footer.id
18697
- }, reactTable$1.flexRender(footer.column.columnDef.footer, footer.getContext()))))), length ? /*#__PURE__*/React__default.createElement(Summary, {
18819
+ }, reactTable$1.flexRender(footer.column.columnDef.footer, footer.getContext()))))))), length ? ( /*#__PURE__*/React__default.createElement(Summary, {
18698
18820
  currentLength: table.getRowModel().rows.length,
18699
18821
  length: length,
18700
18822
  table: table
18701
- }) : null) : null) : /*#__PURE__*/React__default.createElement("div", {
18823
+ })) : null)) : null)) : ( /*#__PURE__*/React__default.createElement("div", {
18702
18824
  className: "col-span-full min-h-[theme(spacing.8)]"
18703
- }, EmptyState ? /*#__PURE__*/React__default.createElement(EmptyState, null) : null)));
18825
+ }, EmptyState ? /*#__PURE__*/React__default.createElement(EmptyState, null) : null))));
18704
18826
  });
18705
18827
  const Table3 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
18706
18828
  const stringifiedChildren = String(props.children);
@@ -18837,9 +18959,9 @@ const Tooltip$1 = ({
18837
18959
  className: "absolute top-0 right-0 mt-1 mr-1"
18838
18960
  })), step.title && /*#__PURE__*/React.createElement("h5", null, step.title), step.content, /*#__PURE__*/React.createElement(Group, {
18839
18961
  className: "mt-4 justify-end"
18840
- }, index > 0 && /*#__PURE__*/React.createElement(Button$1, Object.assign({}, backProps, {
18962
+ }, index > 0 && ( /*#__PURE__*/React.createElement(Button$1, Object.assign({}, backProps, {
18841
18963
  appearance: "discrete"
18842
- }), locale.back), /*#__PURE__*/React.createElement(Button$1, Object.assign({}, primaryProps, {
18964
+ }), locale.back)), /*#__PURE__*/React.createElement(Button$1, Object.assign({}, primaryProps, {
18843
18965
  appearance: "primary"
18844
18966
  }), continuous ? isLastStep ? `${locale.last} (${index + 1}/${size})` : `${locale.next} (${index + 1}/${size})` : locale.close)));
18845
18967
  };
@@ -18902,10 +19024,10 @@ const Tour = props => {
18902
19024
  floaterProps: {
18903
19025
  disableAnimation: true
18904
19026
  },
18905
- tooltipComponent: tooltipProps => /*#__PURE__*/React.createElement(Tooltip$1, Object.assign({}, tooltipProps, {
19027
+ tooltipComponent: tooltipProps => ( /*#__PURE__*/React.createElement(Tooltip$1, Object.assign({}, tooltipProps, {
18906
19028
  locale: tour,
18907
19029
  disableTourSkipOnEsc: disableTourSkipOnEsc
18908
- })),
19030
+ }))),
18909
19031
  locale: tour,
18910
19032
  spotlightPadding: 8,
18911
19033
  spotlightClicks: spotlightClicks,
@@ -18959,11 +19081,11 @@ const Link$1 = /*#__PURE__*/React__default.forwardRef(function Link(props, ref)
18959
19081
  tabIndex: 0
18960
19082
  }), icon ? /*#__PURE__*/React__default.createElement(Icon, {
18961
19083
  name: icon
18962
- }) : null, children, isNew ? /*#__PURE__*/React__default.createElement(Badge, {
19084
+ }) : null, children, isNew ? ( /*#__PURE__*/React__default.createElement(Badge, {
18963
19085
  color: "blue",
18964
19086
  small: true,
18965
19087
  className: "absolute right-0 top-0 -mr-2.5 -mt-1.5 !h-3 !px-0.5 text-[0.55rem] font-normal"
18966
- }, texts.header.new) : null);
19088
+ }, texts.header.new)) : null);
18967
19089
  if (tooltip) {
18968
19090
  return /*#__PURE__*/React__default.createElement(Tooltip, {
18969
19091
  title: tooltip
@@ -19159,10 +19281,10 @@ const AgreementItem = props => {
19159
19281
  title: agreement.name
19160
19282
  }, /*#__PURE__*/React__default.createElement("span", {
19161
19283
  className: "truncate"
19162
- }, agreement.name), ' ', agreement.secure ? /*#__PURE__*/React__default.createElement(Icon, {
19284
+ }, agreement.name), ' ', agreement.secure ? ( /*#__PURE__*/React__default.createElement(Icon, {
19163
19285
  name: "secure-tick",
19164
19286
  className: "ml-1 mt-0.5 mb-0.5 !h-4 !w-4 flex-shrink-0 flex-grow-0"
19165
- }) : null), /*#__PURE__*/React__default.createElement("span", {
19287
+ })) : null), /*#__PURE__*/React__default.createElement("span", {
19166
19288
  className: "text-grey-100 whitespace-nowrap text-xs"
19167
19289
  }, agreement.number, " ", agreement.userId, " ", /*#__PURE__*/React__default.createElement(AgreementBadge, {
19168
19290
  agreement: agreement
@@ -19248,10 +19370,10 @@ function AgreementSelector(props) {
19248
19370
  }, /*#__PURE__*/React__default.createElement(AgreementDisplay, {
19249
19371
  currentAgreement: currentAgreement,
19250
19372
  fallbackImageSrc: fallbackImageSrc
19251
- }, agreements ? /*#__PURE__*/React__default.createElement(Icon, {
19373
+ }, agreements ? ( /*#__PURE__*/React__default.createElement(Icon, {
19252
19374
  className: "ml-auto hidden flex-shrink-0 flex-grow-0 text-white xl:flex",
19253
19375
  name: open ? 'chevron-up' : 'chevron-down'
19254
- }) : null)), /*#__PURE__*/React__default.createElement(PopoverPrimitive.Content, {
19376
+ })) : null)), /*#__PURE__*/React__default.createElement(PopoverPrimitive.Content, {
19255
19377
  className: "z-[996] mt-2 flex h-[calc(100vh_-_theme(spacing.16))] w-64 flex-col gap-1 bg-blue-900"
19256
19378
  }, /*#__PURE__*/React__default.createElement(SearchInput, {
19257
19379
  autoFocus: true,
@@ -19273,10 +19395,10 @@ function AgreementSelector(props) {
19273
19395
  }, filterBySearchValue(search)(agreement) ? button : null, agreement.clients.filter(agreement => filterClientAgreement(agreement, search, filterBySearchValue(search))).map(clientAgreement => createAgreementButton(clientAgreement, fallbackImageSrc, handleChangeAgreement, isCurrentAgreement(clientAgreement, currentAgreement))));
19274
19396
  }
19275
19397
  return button;
19276
- })), handleAddAgreement ? /*#__PURE__*/React__default.createElement(Button$1, {
19398
+ })), handleAddAgreement ? ( /*#__PURE__*/React__default.createElement(Button$1, {
19277
19399
  className: "focus-visible:!yt-focus-dark my-1 mx-2 !h-9 shrink-0 !bg-white/[0.08] !text-white hover:!bg-white/[0.16]",
19278
19400
  onClick: handleAddAgreement
19279
- }, texts.header.addAgreement) : null, /*#__PURE__*/React__default.createElement("hr", {
19401
+ }, texts.header.addAgreement)) : null, /*#__PURE__*/React__default.createElement("hr", {
19280
19402
  className: "my-0 h-px w-full bg-white/[0.08]"
19281
19403
  }), /*#__PURE__*/React__default.createElement("a", {
19282
19404
  className: "focus-visible:yt-focus-dark mx-2 mb-2 flex h-8 shrink-0 items-center justify-center rounded text-white hover:cursor-pointer hover:text-white hover:underline focus-visible:outline-none",
@@ -19420,7 +19542,7 @@ const Sidebar = /*#__PURE__*/React__default.forwardRef(function LayoutSidebar(pr
19420
19542
  "aria-hidden": !isVisible,
19421
19543
  className: className,
19422
19544
  ref: ref
19423
- }), content), /*#__PURE__*/React__default.createElement(framerMotion.AnimatePresence, null, showBackdrop && /*#__PURE__*/React__default.createElement(SidebarBackdrop, {
19545
+ }), content), /*#__PURE__*/React__default.createElement(framerMotion.AnimatePresence, null, showBackdrop && ( /*#__PURE__*/React__default.createElement(SidebarBackdrop, {
19424
19546
  initial: {
19425
19547
  opacity: 0
19426
19548
  },
@@ -19432,7 +19554,7 @@ const Sidebar = /*#__PURE__*/React__default.forwardRef(function LayoutSidebar(pr
19432
19554
  },
19433
19555
  className: "z-[1]",
19434
19556
  onClick: () => setSidebarOpen(false)
19435
- })));
19557
+ }))));
19436
19558
  });
19437
19559
 
19438
19560
  const Top = props => {
@@ -19560,7 +19682,7 @@ const Link$2 = /*#__PURE__*/React__default.forwardRef(function Link(props, ref)
19560
19682
  name: icon
19561
19683
  }) : null, /*#__PURE__*/React__default.createElement("span", {
19562
19684
  className: "flex flex-grow items-center truncate"
19563
- }, children), menu ? /*#__PURE__*/React__default.createElement(IconButton, {
19685
+ }, children), menu ? ( /*#__PURE__*/React__default.createElement(IconButton, {
19564
19686
  appearance: "discrete",
19565
19687
  icon: "more",
19566
19688
  "aria-label": "More",
@@ -19573,12 +19695,12 @@ const Link$2 = /*#__PURE__*/React__default.forwardRef(function Link(props, ref)
19573
19695
  event.preventDefault();
19574
19696
  event.stopPropagation();
19575
19697
  }
19576
- }) : null, total !== undefined ? /*#__PURE__*/React__default.createElement(Badge, {
19698
+ })) : null, total !== undefined ? ( /*#__PURE__*/React__default.createElement(Badge, {
19577
19699
  className: cn('flex-shrink-0 flex-grow-0 !font-normal', {
19578
19700
  'group-hover:hidden [[aria-expanded="true"]+&]:hidden ': menu
19579
19701
  }),
19580
19702
  color: "transparent"
19581
- }, total) : null));
19703
+ }, total)) : null));
19582
19704
  });
19583
19705
 
19584
19706
  const Section = /*#__PURE__*/React__default.forwardRef(function Navigation2(props, ref) {
@@ -19593,9 +19715,9 @@ const Section = /*#__PURE__*/React__default.forwardRef(function Navigation2(prop
19593
19715
  "data-taco": "navigation2-section",
19594
19716
  ref: ref,
19595
19717
  role: "none"
19596
- }), heading ? /*#__PURE__*/React__default.createElement("span", {
19718
+ }), heading ? ( /*#__PURE__*/React__default.createElement("span", {
19597
19719
  className: "text-grey-500 mb-px truncate pl-5 text-xs font-bold uppercase leading-8 lg:hidden"
19598
- }, heading) : null, /*#__PURE__*/React__default.createElement("ul", {
19720
+ }, heading)) : null, /*#__PURE__*/React__default.createElement("ul", {
19599
19721
  className: "mb-0 flex flex-col gap-y-px"
19600
19722
  }, children));
19601
19723
  });