@economic/taco 2.16.0 → 2.17.1

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -1,6 +0,0 @@
1
- import { ColumnDef } from '@tanstack/react-table';
2
- import { Table3Options } from '../../types';
3
- export declare function useColumnOrdering(options: Table3Options): {
4
- isEnabled: boolean;
5
- };
6
- export declare function ensureOrdering<TType = unknown>(columns: ColumnDef<TType>[], settingsOrder: string[] | undefined): string[];
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { Table3Ref, TableStrategy } from '../../types';
3
- declare type CurrentRowHandlerCallback = TableStrategy['scrollToIndex'];
4
- export declare function useCurrentRow(defaultCurrentRowIndex: number | undefined): {
5
- currentRowIndex: number | undefined;
6
- setCurrentRowIndex: React.Dispatch<React.SetStateAction<number | undefined>>;
7
- handleFocus: (event: React.FocusEvent, length: number, scrollToIndex: CurrentRowHandlerCallback) => void;
8
- handleKeyDown: (event: KeyboardEvent, length: number, scrollToIndex: CurrentRowHandlerCallback, isEditing: boolean, tableRef: React.RefObject<Table3Ref>) => void;
9
- handleMouseCapture: (event: React.MouseEvent, length: number) => void;
10
- };
11
- export {};
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { Table3FontSize } from '../../types';
3
- export declare function useFontSize(isEnabled: boolean, defaultFontSize?: Table3FontSize): {
4
- isEnabled: boolean;
5
- size: Table3FontSize;
6
- setSize: React.Dispatch<React.SetStateAction<Table3FontSize>>;
7
- };
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export declare function usePauseHoverState(): {
3
- isPaused: boolean;
4
- pause: React.Dispatch<React.SetStateAction<boolean>>;
5
- handleKeyDown: (event: KeyboardEvent) => void;
6
- };
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { Table3LoadAllHandler } from '../../types';
3
- export declare function usePrinting(isEnabled: boolean, loadAll?: Table3LoadAllHandler, showWarningWhenPrintingLargeDataset?: boolean): {
4
- isEnabled: boolean;
5
- loadAll: Table3LoadAllHandler | undefined;
6
- printWarningDialogVisibility: boolean;
7
- setPrintWarningDialogVisibility: React.Dispatch<React.SetStateAction<boolean>>;
8
- };
@@ -1,6 +0,0 @@
1
- import { Table3RowClickHandler } from '../../types';
2
- import { Table as RTable } from '@tanstack/react-table';
3
- export declare function useRowClick<TType = unknown>(onRowClick?: Table3RowClickHandler<TType>): {
4
- handleKeyDown: <TType_1 = unknown>(event: KeyboardEvent, table: RTable<TType_1>) => void;
5
- handleClick: Table3RowClickHandler<TType> | undefined;
6
- };
@@ -1,5 +0,0 @@
1
- import { Table3RowGotoHandler } from '../../types';
2
- export declare function useRowGoto(isEnabled: boolean, handler: Table3RowGotoHandler | undefined): {
3
- isEnabled: boolean;
4
- handleGoto: Table3RowGotoHandler | (() => undefined);
5
- };
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { DeprecatedRowDensity, Table3RowHeight } from '../../types';
3
- export declare function useRowHeight(isEnabled: boolean, defaultRowHeight?: Table3RowHeight | DeprecatedRowDensity): {
4
- isEnabled: boolean;
5
- height: Table3RowHeight;
6
- setHeight: React.Dispatch<React.SetStateAction<Table3RowHeight>>;
7
- };
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { Table as RTable } from '@tanstack/react-table';
3
- export declare function useRowSelection(): {
4
- handleKeyDown: <TType = unknown>(event: KeyboardEvent, table: RTable<TType>) => void;
5
- lastSelectedRowIndex: React.MutableRefObject<number | undefined>;
6
- };
@@ -1,2 +0,0 @@
1
- import { Table as RTable } from '@tanstack/react-table';
2
- export declare function useCurrentRowListener<TType = unknown>(table: RTable<TType>): void;
@@ -1,3 +0,0 @@
1
- import { Table as RTable } from '@tanstack/react-table';
2
- import { Table3FilterHandler } from '../../types';
3
- export declare function useFilteringStateListener<TType = unknown>(table: RTable<TType>, onFilter?: Table3FilterHandler): void;
@@ -1,3 +0,0 @@
1
- import { Table as RTable } from '@tanstack/react-table';
2
- import { Table3RowSelectionHandler } from '../../types';
3
- export declare function useRowSelectionListener<TType = unknown>(table: RTable<TType>, onRowSelect?: Table3RowSelectionHandler<TType>): void;
@@ -1,3 +0,0 @@
1
- import { Table as RTable } from '@tanstack/react-table';
2
- import { Table3LoadPageHandler } from '../../types';
3
- export declare function useServerLoadingListener<TType = unknown>(table: RTable<TType>, loadPage?: Table3LoadPageHandler): void;
@@ -1,3 +0,0 @@
1
- import { Table as RTable } from '@tanstack/react-table';
2
- import { Table3Shortcuts } from '../../types';
3
- export declare function useShortcutsListener<TType = unknown>(table: RTable<TType>, shortcuts: Table3Shortcuts<TType> | undefined): void;
@@ -1,3 +0,0 @@
1
- import { Table as RTable } from '@tanstack/react-table';
2
- import { Table3SortHandler } from '../../types';
3
- export declare function useSortingStateListener<TType = unknown>(table: RTable<TType>, onSort?: Table3SortHandler): void;
@@ -1 +0,0 @@
1
- {"version":3,"file":"useColumnOrdering.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/useColumnOrdering.ts"],"sourcesContent":["import { ColumnDef } from '@tanstack/react-table';\nimport { Table3Options } from '../../types';\nimport { COLUMN_ID as ACTIONS_COLUMN_ID } from '../../components/columns/internal/Actions';\nimport { COLUMN_ID as EDITING_ACTIONS_COLUMN_ID } from '../../components/columns/internal/EditingActions';\n\nexport function useColumnOrdering(options: Table3Options) {\n return {\n isEnabled: options.enableColumnOrdering,\n };\n}\nexport function ensureOrdering<TType = unknown>(columns: ColumnDef<TType>[], settingsOrder: string[] | undefined): string[] {\n // internal column come with a defined order\n const internalColumns = columns\n .filter(\n column => column.id?.startsWith('__') && column.id !== ACTIONS_COLUMN_ID && column.id !== EDITING_ACTIONS_COLUMN_ID\n )\n .map(column => column.id) as string[];\n\n // columns with ordering disabled should be moved to the front\n const orderingDisabled: string[] = [];\n const orderingEnabled: string[] = [];\n\n let orderedColumns = columns;\n\n // if settings is defined, make sure the columns that are actual children are sorted by it\n if (Array.isArray(settingsOrder)) {\n orderedColumns = columns.slice().sort(\n // the magic >>> 0 here ensures that columns that aren't found in settings, but are children, are pushed to the end\n (a, b) => (settingsOrder.indexOf(a.id as string) >>> 0) - (settingsOrder.indexOf(b.id as string) >>> 0)\n );\n }\n\n orderedColumns.forEach(column => {\n if (column.id?.startsWith('__')) {\n return;\n }\n\n if (column.meta?.enableOrdering) {\n orderingEnabled.push(column.id as string);\n } else {\n orderingDisabled.push(column.id as string);\n }\n });\n\n const order = [...internalColumns, ...orderingDisabled, ...orderingEnabled];\n\n // actions should always be last, enforce that\n if (columns.findIndex(column => column.id === ACTIONS_COLUMN_ID || column.id === EDITING_ACTIONS_COLUMN_ID) > -1) {\n order.push(ACTIONS_COLUMN_ID);\n }\n\n return order;\n}\n"],"names":["useColumnOrdering","options","isEnabled","enableColumnOrdering","ensureOrdering","columns","settingsOrder","internalColumns","filter","column","_column$id","id","startsWith","ACTIONS_COLUMN_ID","EDITING_ACTIONS_COLUMN_ID","map","orderingDisabled","orderingEnabled","orderedColumns","Array","isArray","slice","sort","a","b","indexOf","forEach","_column$id2","_column$meta","meta","enableOrdering","push","order","findIndex"],"mappings":";;;SAKgBA,iBAAiBA,CAACC,OAAsB;EACpD,OAAO;IACHC,SAAS,EAAED,OAAO,CAACE;GACtB;AACL;SACgBC,cAAcA,CAAkBC,OAA2B,EAAEC,aAAmC;;EAE5G,MAAMC,eAAe,GAAGF,OAAO,CAC1BG,MAAM,CACHC,MAAM;IAAA,IAAAC,UAAA;IAAA,OAAI,EAAAA,UAAA,GAAAD,MAAM,CAACE,EAAE,cAAAD,UAAA,uBAATA,UAAA,CAAWE,UAAU,CAAC,IAAI,CAAC,KAAIH,MAAM,CAACE,EAAE,KAAKE,SAAiB,IAAIJ,MAAM,CAACE,EAAE,KAAKG,WAAyB;IACtH,CACAC,GAAG,CAACN,MAAM,IAAIA,MAAM,CAACE,EAAE,CAAa;;EAGzC,MAAMK,gBAAgB,GAAa,EAAE;EACrC,MAAMC,eAAe,GAAa,EAAE;EAEpC,IAAIC,cAAc,GAAGb,OAAO;;EAG5B,IAAIc,KAAK,CAACC,OAAO,CAACd,aAAa,CAAC,EAAE;IAC9BY,cAAc,GAAGb,OAAO,CAACgB,KAAK,EAAE,CAACC,IAAI;;IAEjC,CAACC,CAAC,EAAEC,CAAC,KAAK,CAAClB,aAAa,CAACmB,OAAO,CAACF,CAAC,CAACZ,EAAY,CAAC,KAAK,CAAC,KAAKL,aAAa,CAACmB,OAAO,CAACD,CAAC,CAACb,EAAY,CAAC,KAAK,CAAC,CAAC,CAC1G;;EAGLO,cAAc,CAACQ,OAAO,CAACjB,MAAM;;IACzB,KAAAkB,WAAA,GAAIlB,MAAM,CAACE,EAAE,cAAAgB,WAAA,eAATA,WAAA,CAAWf,UAAU,CAAC,IAAI,CAAC,EAAE;MAC7B;;IAGJ,KAAAgB,YAAA,GAAInB,MAAM,CAACoB,IAAI,cAAAD,YAAA,eAAXA,YAAA,CAAaE,cAAc,EAAE;MAC7Bb,eAAe,CAACc,IAAI,CAACtB,MAAM,CAACE,EAAY,CAAC;KAC5C,MAAM;MACHK,gBAAgB,CAACe,IAAI,CAACtB,MAAM,CAACE,EAAY,CAAC;;GAEjD,CAAC;EAEF,MAAMqB,KAAK,GAAG,CAAC,GAAGzB,eAAe,EAAE,GAAGS,gBAAgB,EAAE,GAAGC,eAAe,CAAC;;EAG3E,IAAIZ,OAAO,CAAC4B,SAAS,CAACxB,MAAM,IAAIA,MAAM,CAACE,EAAE,KAAKE,SAAiB,IAAIJ,MAAM,CAACE,EAAE,KAAKG,WAAyB,CAAC,GAAG,CAAC,CAAC,EAAE;IAC9GkB,KAAK,CAACD,IAAI,CAAClB,SAAiB,CAAC;;EAGjC,OAAOmB,KAAK;AAChB;;;;"}
@@ -1,93 +0,0 @@
1
- import React__default from 'react';
2
-
3
- function useCurrentRow(defaultCurrentRowIndex) {
4
- const [currentRowIndex, setCurrentRowIndex] = React__default.useState(defaultCurrentRowIndex);
5
- const move = (direction, length, scrollToIndex) => setCurrentRowIndex(currentIndex => {
6
- const nextIndex = currentIndex !== undefined ? getNextIndex(direction, currentIndex, length) : 0;
7
- scrollToIndex(direction === -1 ? nextIndex : nextIndex + 3);
8
- return nextIndex;
9
- });
10
- const moveUp = (length, callback) => move(-1, length, callback);
11
- const moveDown = (length, callback) => move(1, length, callback);
12
- const focusFirstElementInCurrentRow = tableRef => {
13
- setTimeout(() => {
14
- var _tableRef$current, _tableRef$current$que;
15
- (_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();
16
- }, 1);
17
- };
18
- const onKeyDown = React__default.useCallback((event, length, scrollToIndex, isEditing, tableRef) => {
19
- if (event.defaultPrevented) {
20
- return;
21
- }
22
- if (event.key === 'ArrowUp') {
23
- event.preventDefault();
24
- if (event.ctrlKey || event.metaKey) {
25
- const newIndex = 0;
26
- setCurrentRowIndex(newIndex);
27
- scrollToIndex(newIndex);
28
- } else {
29
- moveUp(length, scrollToIndex);
30
- }
31
- if (!isEditing) {
32
- focusFirstElementInCurrentRow(tableRef);
33
- }
34
- return;
35
- } else if (event.key === 'ArrowDown') {
36
- event.preventDefault();
37
- if (event.ctrlKey || event.metaKey) {
38
- const newIndex = length - 1;
39
- setCurrentRowIndex(newIndex);
40
- scrollToIndex(newIndex);
41
- } else {
42
- moveDown(length, scrollToIndex);
43
- }
44
- if (!isEditing) {
45
- focusFirstElementInCurrentRow(tableRef);
46
- }
47
- return;
48
- }
49
- }, []);
50
- const onFocus = React__default.useCallback((event, length, scrollToIndex) => {
51
- if (event.isDefaultPrevented()) {
52
- return;
53
- }
54
- if (currentRowIndex === undefined && length > 0) {
55
- // do it in the next tick, otherwise it prevents internal focus from working
56
- // meaning you have to tab twice to get to the first focusable element
57
- setTimeout(() => {
58
- setCurrentRowIndex(index => {
59
- if (index === undefined) {
60
- scrollToIndex(0);
61
- return 0;
62
- }
63
- return index;
64
- });
65
- }, 1);
66
- }
67
- }, [currentRowIndex, length]);
68
- const onMouseCapture = React__default.useCallback((event, length) => {
69
- if (event.isDefaultPrevented()) {
70
- return;
71
- }
72
- if (currentRowIndex === undefined && length > 0) {
73
- event.preventDefault();
74
- event.stopPropagation();
75
- }
76
- }, [currentRowIndex, length]);
77
- return {
78
- currentRowIndex,
79
- setCurrentRowIndex,
80
- handleFocus: onFocus,
81
- handleKeyDown: onKeyDown,
82
- handleMouseCapture: onMouseCapture
83
- };
84
- }
85
- const getNextIndex = (direction, currentIndex, length) => {
86
- if (direction === -1) {
87
- return currentIndex - 1 > 0 ? currentIndex - 1 : 0;
88
- }
89
- return currentIndex + 1 < length ? currentIndex + 1 : currentIndex;
90
- };
91
-
92
- export { useCurrentRow };
93
- //# sourceMappingURL=useCurrentRow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCurrentRow.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/useCurrentRow.ts"],"sourcesContent":["import React from 'react';\nimport { Table3Ref, TableStrategy } from '../../types';\n\ntype CurrentRowHandlerCallback = TableStrategy['scrollToIndex'];\n\nexport function useCurrentRow(defaultCurrentRowIndex: number | undefined) {\n const [currentRowIndex, setCurrentRowIndex] = React.useState<number | undefined>(defaultCurrentRowIndex);\n\n const move = (direction: -1 | 1, length: number, scrollToIndex: CurrentRowHandlerCallback) =>\n setCurrentRowIndex(currentIndex => {\n const nextIndex = currentIndex !== undefined ? getNextIndex(direction, currentIndex, length) : 0;\n scrollToIndex(direction === -1 ? nextIndex : nextIndex + 3);\n return nextIndex;\n });\n const moveUp = (length: number, callback: CurrentRowHandlerCallback) => move(-1, length, callback);\n const moveDown = (length: number, callback: CurrentRowHandlerCallback) => move(1, length, callback);\n\n const focusFirstElementInCurrentRow = (tableRef: React.RefObject<Table3Ref>) => {\n setTimeout(() => {\n (\n tableRef.current?.querySelector('[data-taco=\"table2-body\"] [role=\"row\"] [role=\"cell\"]:first-child') as HTMLElement\n )?.focus();\n }, 1);\n };\n\n const onKeyDown = React.useCallback(\n (\n event: KeyboardEvent,\n length: number,\n scrollToIndex: CurrentRowHandlerCallback,\n isEditing: boolean,\n tableRef: React.RefObject<Table3Ref>\n ) => {\n if (event.defaultPrevented) {\n return;\n }\n\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n\n if (event.ctrlKey || event.metaKey) {\n const newIndex = 0;\n setCurrentRowIndex(newIndex);\n scrollToIndex(newIndex);\n } else {\n moveUp(length, scrollToIndex);\n }\n\n if (!isEditing) {\n focusFirstElementInCurrentRow(tableRef);\n }\n\n return;\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n\n if (event.ctrlKey || event.metaKey) {\n const newIndex = length - 1;\n setCurrentRowIndex(newIndex);\n scrollToIndex(newIndex);\n } else {\n moveDown(length, scrollToIndex);\n }\n\n if (!isEditing) {\n focusFirstElementInCurrentRow(tableRef);\n }\n\n return;\n }\n },\n []\n );\n\n const onFocus = React.useCallback(\n (event: React.FocusEvent, length: number, scrollToIndex: CurrentRowHandlerCallback) => {\n if (event.isDefaultPrevented()) {\n return;\n }\n\n if (currentRowIndex === undefined && length > 0) {\n // do it in the next tick, otherwise it prevents internal focus from working\n // meaning you have to tab twice to get to the first focusable element\n setTimeout(() => {\n setCurrentRowIndex(index => {\n if (index === undefined) {\n scrollToIndex(0);\n return 0;\n }\n return index;\n });\n }, 1);\n }\n },\n [currentRowIndex, length]\n );\n\n const onMouseCapture = React.useCallback(\n (event: React.MouseEvent, length: number) => {\n if (event.isDefaultPrevented()) {\n return;\n }\n\n if (currentRowIndex === undefined && length > 0) {\n event.preventDefault();\n event.stopPropagation();\n }\n },\n [currentRowIndex, length]\n );\n\n return {\n currentRowIndex,\n setCurrentRowIndex,\n handleFocus: onFocus,\n handleKeyDown: onKeyDown,\n handleMouseCapture: onMouseCapture,\n };\n}\n\nconst getNextIndex = (direction: -1 | 1, currentIndex: number, length: number) => {\n if (direction === -1) {\n return currentIndex - 1 > 0 ? currentIndex - 1 : 0;\n }\n\n return currentIndex + 1 < length ? currentIndex + 1 : currentIndex;\n};\n"],"names":["useCurrentRow","defaultCurrentRowIndex","currentRowIndex","setCurrentRowIndex","React","useState","move","direction","length","scrollToIndex","currentIndex","nextIndex","undefined","getNextIndex","moveUp","callback","moveDown","focusFirstElementInCurrentRow","tableRef","setTimeout","_tableRef$current","current","_tableRef$current$que","querySelector","focus","onKeyDown","useCallback","event","isEditing","defaultPrevented","key","preventDefault","ctrlKey","metaKey","newIndex","onFocus","isDefaultPrevented","index","onMouseCapture","stopPropagation","handleFocus","handleKeyDown","handleMouseCapture"],"mappings":";;SAKgBA,aAAaA,CAACC,sBAA0C;EACpE,MAAM,CAACC,eAAe,EAAEC,kBAAkB,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAqBJ,sBAAsB,CAAC;EAExG,MAAMK,IAAI,GAAGA,CAACC,SAAiB,EAAEC,MAAc,EAAEC,aAAwC,KACrFN,kBAAkB,CAACO,YAAY;IAC3B,MAAMC,SAAS,GAAGD,YAAY,KAAKE,SAAS,GAAGC,YAAY,CAACN,SAAS,EAAEG,YAAY,EAAEF,MAAM,CAAC,GAAG,CAAC;IAChGC,aAAa,CAACF,SAAS,KAAK,CAAC,CAAC,GAAGI,SAAS,GAAGA,SAAS,GAAG,CAAC,CAAC;IAC3D,OAAOA,SAAS;GACnB,CAAC;EACN,MAAMG,MAAM,GAAGA,CAACN,MAAc,EAAEO,QAAmC,KAAKT,IAAI,CAAC,CAAC,CAAC,EAAEE,MAAM,EAAEO,QAAQ,CAAC;EAClG,MAAMC,QAAQ,GAAGA,CAACR,MAAc,EAAEO,QAAmC,KAAKT,IAAI,CAAC,CAAC,EAAEE,MAAM,EAAEO,QAAQ,CAAC;EAEnG,MAAME,6BAA6B,GAAIC,QAAoC;IACvEC,UAAU,CAAC;;MAEH,CAAAC,iBAAA,GAAAF,QAAQ,CAACG,OAAO,cAAAD,iBAAA,wBAAAE,qBAAA,GAAhBF,iBAAA,CAAkBG,aAAa,CAAC,kEAAkE,CACrG,cAAAD,qBAAA,uBADGA,qBAAA,CACDE,KAAK,EAAE;KACb,EAAE,CAAC,CAAC;GACR;EAED,MAAMC,SAAS,GAAGrB,cAAK,CAACsB,WAAW,CAC/B,CACIC,KAAoB,EACpBnB,MAAc,EACdC,aAAwC,EACxCmB,SAAkB,EAClBV,QAAoC;IAEpC,IAAIS,KAAK,CAACE,gBAAgB,EAAE;MACxB;;IAGJ,IAAIF,KAAK,CAACG,GAAG,KAAK,SAAS,EAAE;MACzBH,KAAK,CAACI,cAAc,EAAE;MAEtB,IAAIJ,KAAK,CAACK,OAAO,IAAIL,KAAK,CAACM,OAAO,EAAE;QAChC,MAAMC,QAAQ,GAAG,CAAC;QAClB/B,kBAAkB,CAAC+B,QAAQ,CAAC;QAC5BzB,aAAa,CAACyB,QAAQ,CAAC;OAC1B,MAAM;QACHpB,MAAM,CAACN,MAAM,EAAEC,aAAa,CAAC;;MAGjC,IAAI,CAACmB,SAAS,EAAE;QACZX,6BAA6B,CAACC,QAAQ,CAAC;;MAG3C;KACH,MAAM,IAAIS,KAAK,CAACG,GAAG,KAAK,WAAW,EAAE;MAClCH,KAAK,CAACI,cAAc,EAAE;MAEtB,IAAIJ,KAAK,CAACK,OAAO,IAAIL,KAAK,CAACM,OAAO,EAAE;QAChC,MAAMC,QAAQ,GAAG1B,MAAM,GAAG,CAAC;QAC3BL,kBAAkB,CAAC+B,QAAQ,CAAC;QAC5BzB,aAAa,CAACyB,QAAQ,CAAC;OAC1B,MAAM;QACHlB,QAAQ,CAACR,MAAM,EAAEC,aAAa,CAAC;;MAGnC,IAAI,CAACmB,SAAS,EAAE;QACZX,6BAA6B,CAACC,QAAQ,CAAC;;MAG3C;;GAEP,EACD,EAAE,CACL;EAED,MAAMiB,OAAO,GAAG/B,cAAK,CAACsB,WAAW,CAC7B,CAACC,KAAuB,EAAEnB,MAAc,EAAEC,aAAwC;IAC9E,IAAIkB,KAAK,CAACS,kBAAkB,EAAE,EAAE;MAC5B;;IAGJ,IAAIlC,eAAe,KAAKU,SAAS,IAAIJ,MAAM,GAAG,CAAC,EAAE;;;MAG7CW,UAAU,CAAC;QACPhB,kBAAkB,CAACkC,KAAK;UACpB,IAAIA,KAAK,KAAKzB,SAAS,EAAE;YACrBH,aAAa,CAAC,CAAC,CAAC;YAChB,OAAO,CAAC;;UAEZ,OAAO4B,KAAK;SACf,CAAC;OACL,EAAE,CAAC,CAAC;;GAEZ,EACD,CAACnC,eAAe,EAAEM,MAAM,CAAC,CAC5B;EAED,MAAM8B,cAAc,GAAGlC,cAAK,CAACsB,WAAW,CACpC,CAACC,KAAuB,EAAEnB,MAAc;IACpC,IAAImB,KAAK,CAACS,kBAAkB,EAAE,EAAE;MAC5B;;IAGJ,IAAIlC,eAAe,KAAKU,SAAS,IAAIJ,MAAM,GAAG,CAAC,EAAE;MAC7CmB,KAAK,CAACI,cAAc,EAAE;MACtBJ,KAAK,CAACY,eAAe,EAAE;;GAE9B,EACD,CAACrC,eAAe,EAAEM,MAAM,CAAC,CAC5B;EAED,OAAO;IACHN,eAAe;IACfC,kBAAkB;IAClBqC,WAAW,EAAEL,OAAO;IACpBM,aAAa,EAAEhB,SAAS;IACxBiB,kBAAkB,EAAEJ;GACvB;AACL;AAEA,MAAMzB,YAAY,GAAGA,CAACN,SAAiB,EAAEG,YAAoB,EAAEF,MAAc;EACzE,IAAID,SAAS,KAAK,CAAC,CAAC,EAAE;IAClB,OAAOG,YAAY,GAAG,CAAC,GAAG,CAAC,GAAGA,YAAY,GAAG,CAAC,GAAG,CAAC;;EAGtD,OAAOA,YAAY,GAAG,CAAC,GAAGF,MAAM,GAAGE,YAAY,GAAG,CAAC,GAAGA,YAAY;AACtE,CAAC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFontSize.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/useFontSize.ts"],"sourcesContent":["import React from 'react';\nimport { Table3FontSize } from '../../types';\n\nexport function useFontSize(isEnabled: boolean, defaultFontSize: Table3FontSize = 'medium') {\n const [size, setSize] = React.useState<Table3FontSize>(defaultFontSize);\n\n return {\n isEnabled,\n size,\n setSize: isEnabled ? setSize : () => undefined,\n };\n}\n"],"names":["useFontSize","isEnabled","defaultFontSize","size","setSize","React","useState","undefined"],"mappings":";;SAGgBA,WAAWA,CAACC,SAAkB,EAAEC,kBAAkC,QAAQ;EACtF,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAiBJ,eAAe,CAAC;EAEvE,OAAO;IACHD,SAAS;IACTE,IAAI;IACJC,OAAO,EAAEH,SAAS,GAAGG,OAAO,GAAG,MAAMG;GACxC;AACL;;;;"}
@@ -1,22 +0,0 @@
1
- import React__default from 'react';
2
- import { useIsHoverStatePaused } from '../../../../hooks/useIsHoverStatePaused.js';
3
-
4
- function usePauseHoverState() {
5
- const [isHoverStatePaused, setHoverStatePaused] = useIsHoverStatePaused();
6
- const onKeyDown = React__default.useCallback(event => {
7
- if (event.defaultPrevented) {
8
- return;
9
- }
10
- if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
11
- setHoverStatePaused(true);
12
- }
13
- }, []);
14
- return {
15
- isPaused: isHoverStatePaused,
16
- pause: setHoverStatePaused,
17
- handleKeyDown: onKeyDown
18
- };
19
- }
20
-
21
- export { usePauseHoverState };
22
- //# sourceMappingURL=usePauseHoverState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePauseHoverState.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/usePauseHoverState.ts"],"sourcesContent":["import React from 'react';\nimport { useIsHoverStatePaused } from '../../../../hooks/useIsHoverStatePaused';\n\nexport function usePauseHoverState() {\n const [isHoverStatePaused, setHoverStatePaused] = useIsHoverStatePaused();\n\n const onKeyDown = React.useCallback((event: KeyboardEvent) => {\n if (event.defaultPrevented) {\n return;\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n setHoverStatePaused(true);\n }\n }, []);\n\n return {\n isPaused: isHoverStatePaused,\n pause: setHoverStatePaused,\n handleKeyDown: onKeyDown,\n };\n}\n"],"names":["usePauseHoverState","isHoverStatePaused","setHoverStatePaused","useIsHoverStatePaused","onKeyDown","React","useCallback","event","defaultPrevented","key","isPaused","pause","handleKeyDown"],"mappings":";;;SAGgBA,kBAAkBA;EAC9B,MAAM,CAACC,kBAAkB,EAAEC,mBAAmB,CAAC,GAAGC,qBAAqB,EAAE;EAEzE,MAAMC,SAAS,GAAGC,cAAK,CAACC,WAAW,CAAEC,KAAoB;IACrD,IAAIA,KAAK,CAACC,gBAAgB,EAAE;MACxB;;IAGJ,IAAID,KAAK,CAACE,GAAG,KAAK,SAAS,IAAIF,KAAK,CAACE,GAAG,KAAK,WAAW,EAAE;MACtDP,mBAAmB,CAAC,IAAI,CAAC;;GAEhC,EAAE,EAAE,CAAC;EAEN,OAAO;IACHQ,QAAQ,EAAET,kBAAkB;IAC5BU,KAAK,EAAET,mBAAmB;IAC1BU,aAAa,EAAER;GAClB;AACL;;;;"}
@@ -1,14 +0,0 @@
1
- import React__default from 'react';
2
-
3
- function usePrinting(isEnabled, loadAll, showWarningWhenPrintingLargeDataset = true) {
4
- const [printWarningDialogVisibility, setPrintWarningDialogVisibility] = React__default.useState(showWarningWhenPrintingLargeDataset);
5
- return {
6
- isEnabled,
7
- loadAll,
8
- printWarningDialogVisibility,
9
- setPrintWarningDialogVisibility: isEnabled ? setPrintWarningDialogVisibility : () => undefined
10
- };
11
- }
12
-
13
- export { usePrinting };
14
- //# sourceMappingURL=usePrinting.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePrinting.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/usePrinting.ts"],"sourcesContent":["import React from 'react';\nimport { Table3LoadAllHandler } from '../../types';\n\nexport function usePrinting(isEnabled: boolean, loadAll?: Table3LoadAllHandler, showWarningWhenPrintingLargeDataset = true) {\n const [printWarningDialogVisibility, setPrintWarningDialogVisibility] = React.useState(showWarningWhenPrintingLargeDataset);\n\n return {\n isEnabled,\n loadAll,\n printWarningDialogVisibility,\n setPrintWarningDialogVisibility: isEnabled ? setPrintWarningDialogVisibility : () => undefined,\n };\n}\n"],"names":["usePrinting","isEnabled","loadAll","showWarningWhenPrintingLargeDataset","printWarningDialogVisibility","setPrintWarningDialogVisibility","React","useState","undefined"],"mappings":";;SAGgBA,WAAWA,CAACC,SAAkB,EAAEC,OAA8B,EAAEC,mCAAmC,GAAG,IAAI;EACtH,MAAM,CAACC,4BAA4B,EAAEC,+BAA+B,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAACJ,mCAAmC,CAAC;EAE3H,OAAO;IACHF,SAAS;IACTC,OAAO;IACPE,4BAA4B;IAC5BC,+BAA+B,EAAEJ,SAAS,GAAGI,+BAA+B,GAAG,MAAMG;GACxF;AACL;;;;"}
@@ -1,25 +0,0 @@
1
- import React__default from 'react';
2
-
3
- function useRowClick(onRowClick) {
4
- const onKeyDown = React__default.useCallback((event, table) => {
5
- if (typeof onRowClick !== 'function' || event.defaultPrevented) {
6
- return;
7
- }
8
- const rows = table.getRowModel().rows;
9
- const tableMeta = table.options.meta;
10
- if (event.key === 'Enter') {
11
- event.preventDefault();
12
- if (onRowClick && tableMeta.currentRow.currentRowIndex !== undefined) {
13
- onRowClick(rows[tableMeta.currentRow.currentRowIndex].original);
14
- }
15
- return;
16
- }
17
- }, [onRowClick]);
18
- return {
19
- handleKeyDown: onKeyDown,
20
- handleClick: onRowClick
21
- };
22
- }
23
-
24
- export { useRowClick };
25
- //# sourceMappingURL=useRowClick.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRowClick.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/useRowClick.ts"],"sourcesContent":["import React from 'react';\nimport { Table3RowClickHandler } from '../../types';\nimport { Table as RTable, TableMeta } from '@tanstack/react-table';\n\nexport function useRowClick<TType = unknown>(onRowClick?: Table3RowClickHandler<TType>) {\n const onKeyDown = React.useCallback(\n (event: KeyboardEvent, table: RTable<TType>) => {\n if (typeof onRowClick !== 'function' || event.defaultPrevented) {\n return;\n }\n\n const rows = table.getRowModel().rows;\n const tableMeta = table.options.meta as TableMeta<TType>;\n\n if (event.key === 'Enter') {\n event.preventDefault();\n\n if (onRowClick && tableMeta.currentRow.currentRowIndex !== undefined) {\n onRowClick(rows[tableMeta.currentRow.currentRowIndex].original as TType);\n }\n\n return;\n }\n },\n [onRowClick]\n ) as <TType = unknown>(event: KeyboardEvent, table: RTable<TType>) => void;\n\n return {\n handleKeyDown: onKeyDown,\n handleClick: onRowClick,\n };\n}\n"],"names":["useRowClick","onRowClick","onKeyDown","React","useCallback","event","table","defaultPrevented","rows","getRowModel","tableMeta","options","meta","key","preventDefault","currentRow","currentRowIndex","undefined","original","handleKeyDown","handleClick"],"mappings":";;SAIgBA,WAAWA,CAAkBC,UAAyC;EAClF,MAAMC,SAAS,GAAGC,cAAK,CAACC,WAAW,CAC/B,CAACC,KAAoB,EAAEC,KAAoB;IACvC,IAAI,OAAOL,UAAU,KAAK,UAAU,IAAII,KAAK,CAACE,gBAAgB,EAAE;MAC5D;;IAGJ,MAAMC,IAAI,GAAGF,KAAK,CAACG,WAAW,EAAE,CAACD,IAAI;IACrC,MAAME,SAAS,GAAGJ,KAAK,CAACK,OAAO,CAACC,IAAwB;IAExD,IAAIP,KAAK,CAACQ,GAAG,KAAK,OAAO,EAAE;MACvBR,KAAK,CAACS,cAAc,EAAE;MAEtB,IAAIb,UAAU,IAAIS,SAAS,CAACK,UAAU,CAACC,eAAe,KAAKC,SAAS,EAAE;QAClEhB,UAAU,CAACO,IAAI,CAACE,SAAS,CAACK,UAAU,CAACC,eAAe,CAAC,CAACE,QAAiB,CAAC;;MAG5E;;GAEP,EACD,CAACjB,UAAU,CAAC,CAC0D;EAE1E,OAAO;IACHkB,aAAa,EAAEjB,SAAS;IACxBkB,WAAW,EAAEnB;GAChB;AACL;;;;"}
@@ -1,9 +0,0 @@
1
- function useRowGoto(isEnabled, handler) {
2
- return {
3
- isEnabled,
4
- handleGoto: isEnabled && handler ? handler : () => undefined
5
- };
6
- }
7
-
8
- export { useRowGoto };
9
- //# sourceMappingURL=useRowGoto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRowGoto.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/useRowGoto.ts"],"sourcesContent":["import { Table3RowGotoHandler } from '../../types';\n\nexport function useRowGoto(isEnabled: boolean, handler: Table3RowGotoHandler | undefined) {\n return {\n isEnabled,\n handleGoto: isEnabled && handler ? handler : () => undefined,\n };\n}\n"],"names":["useRowGoto","isEnabled","handler","handleGoto","undefined"],"mappings":"SAEgBA,UAAUA,CAACC,SAAkB,EAAEC,OAAyC;EACpF,OAAO;IACHD,SAAS;IACTE,UAAU,EAAEF,SAAS,IAAIC,OAAO,GAAGA,OAAO,GAAG,MAAME;GACtD;AACL;;;;"}
@@ -1,27 +0,0 @@
1
- import React__default from 'react';
2
-
3
- function convertDeprecatedRowDensityToRowHeight(rowHeight) {
4
- switch (rowHeight) {
5
- case 'compact':
6
- return 'short';
7
- case 'normal':
8
- return 'medium';
9
- case 'comfortable':
10
- return 'tall';
11
- case 'spacious':
12
- return 'extra-tall';
13
- default:
14
- return rowHeight;
15
- }
16
- }
17
- function useRowHeight(isEnabled, defaultRowHeight = 'medium') {
18
- const [height, setHeight] = React__default.useState(convertDeprecatedRowDensityToRowHeight(defaultRowHeight));
19
- return {
20
- isEnabled,
21
- height,
22
- setHeight: isEnabled ? setHeight : () => undefined
23
- };
24
- }
25
-
26
- export { useRowHeight };
27
- //# sourceMappingURL=useRowHeight.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRowHeight.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/useRowHeight.ts"],"sourcesContent":["import React from 'react';\nimport { DeprecatedRowDensity, Table3RowHeight } from '../../types';\n\nfunction convertDeprecatedRowDensityToRowHeight(rowHeight: Table3RowHeight | DeprecatedRowDensity) {\n switch (rowHeight) {\n case 'compact':\n return 'short';\n\n case 'normal':\n return 'medium';\n\n case 'comfortable':\n return 'tall';\n\n case 'spacious':\n return 'extra-tall';\n\n default:\n return rowHeight;\n }\n}\n\nexport function useRowHeight(isEnabled: boolean, defaultRowHeight: Table3RowHeight | DeprecatedRowDensity = 'medium') {\n const [height, setHeight] = React.useState<Table3RowHeight>(convertDeprecatedRowDensityToRowHeight(defaultRowHeight));\n\n return {\n isEnabled,\n height,\n setHeight: isEnabled ? setHeight : () => undefined,\n };\n}\n"],"names":["convertDeprecatedRowDensityToRowHeight","rowHeight","useRowHeight","isEnabled","defaultRowHeight","height","setHeight","React","useState","undefined"],"mappings":";;AAGA,SAASA,sCAAsCA,CAACC,SAAiD;EAC7F,QAAQA,SAAS;IACb,KAAK,SAAS;MACV,OAAO,OAAO;IAElB,KAAK,QAAQ;MACT,OAAO,QAAQ;IAEnB,KAAK,aAAa;MACd,OAAO,MAAM;IAEjB,KAAK,UAAU;MACX,OAAO,YAAY;IAEvB;MACI,OAAOA,SAAS;;AAE5B;SAEgBC,YAAYA,CAACC,SAAkB,EAAEC,mBAA2D,QAAQ;EAChH,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAkBR,sCAAsC,CAACI,gBAAgB,CAAC,CAAC;EAErH,OAAO;IACHD,SAAS;IACTE,MAAM;IACNC,SAAS,EAAEH,SAAS,GAAGG,SAAS,GAAG,MAAMG;GAC5C;AACL;;;;"}
@@ -1,32 +0,0 @@
1
- import React__default from 'react';
2
-
3
- function useRowSelection() {
4
- const lastSelectedRowIndex = React__default.useRef();
5
- const onKeyDown = React__default.useCallback((event, table) => {
6
- if (!table.options.enableRowSelection || event.defaultPrevented) {
7
- return;
8
- }
9
- const rows = table.getRowModel().rows;
10
- const tableMeta = table.options.meta;
11
- if (event.key === ' ') {
12
- event.preventDefault();
13
- const currentRowIndex = tableMeta.currentRow.currentRowIndex;
14
- if (currentRowIndex !== undefined) {
15
- var _rows$currentRowIndex;
16
- (_rows$currentRowIndex = rows[currentRowIndex]) === null || _rows$currentRowIndex === void 0 ? void 0 : _rows$currentRowIndex.toggleSelected();
17
- }
18
- return;
19
- } else if ((event.ctrlKey || event.metaKey) && event.key === 'a') {
20
- event.preventDefault();
21
- table.toggleAllRowsSelected();
22
- return;
23
- }
24
- }, []);
25
- return {
26
- handleKeyDown: onKeyDown,
27
- lastSelectedRowIndex
28
- };
29
- }
30
-
31
- export { useRowSelection };
32
- //# sourceMappingURL=useRowSelection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRowSelection.js","sources":["../../../../../../../../../src/components/Table3/hooks/features/useRowSelection.ts"],"sourcesContent":["import React from 'react';\nimport { Table as RTable, TableMeta } from '@tanstack/react-table';\n\nexport function useRowSelection() {\n const lastSelectedRowIndex = React.useRef<number>();\n\n const onKeyDown = React.useCallback(<TType = unknown>(event: KeyboardEvent, table: RTable<TType>) => {\n if (!table.options.enableRowSelection || event.defaultPrevented) {\n return;\n }\n\n const rows = table.getRowModel().rows;\n const tableMeta = table.options.meta as TableMeta<TType>;\n\n if (event.key === ' ') {\n event.preventDefault();\n const currentRowIndex = tableMeta.currentRow.currentRowIndex;\n if (currentRowIndex !== undefined) {\n rows[currentRowIndex]?.toggleSelected();\n }\n return;\n } else if ((event.ctrlKey || event.metaKey) && event.key === 'a') {\n event.preventDefault();\n table.toggleAllRowsSelected();\n return;\n }\n }, []) as <TType = unknown>(event: KeyboardEvent, table: RTable<TType>) => void;\n\n return {\n handleKeyDown: onKeyDown,\n lastSelectedRowIndex,\n };\n}\n"],"names":["useRowSelection","lastSelectedRowIndex","React","useRef","onKeyDown","useCallback","event","table","options","enableRowSelection","defaultPrevented","rows","getRowModel","tableMeta","meta","key","preventDefault","currentRowIndex","currentRow","undefined","_rows$currentRowIndex","toggleSelected","ctrlKey","metaKey","toggleAllRowsSelected","handleKeyDown"],"mappings":";;SAGgBA,eAAeA;EAC3B,MAAMC,oBAAoB,GAAGC,cAAK,CAACC,MAAM,EAAU;EAEnD,MAAMC,SAAS,GAAGF,cAAK,CAACG,WAAW,CAAC,CAAkBC,KAAoB,EAAEC,KAAoB;IAC5F,IAAI,CAACA,KAAK,CAACC,OAAO,CAACC,kBAAkB,IAAIH,KAAK,CAACI,gBAAgB,EAAE;MAC7D;;IAGJ,MAAMC,IAAI,GAAGJ,KAAK,CAACK,WAAW,EAAE,CAACD,IAAI;IACrC,MAAME,SAAS,GAAGN,KAAK,CAACC,OAAO,CAACM,IAAwB;IAExD,IAAIR,KAAK,CAACS,GAAG,KAAK,GAAG,EAAE;MACnBT,KAAK,CAACU,cAAc,EAAE;MACtB,MAAMC,eAAe,GAAGJ,SAAS,CAACK,UAAU,CAACD,eAAe;MAC5D,IAAIA,eAAe,KAAKE,SAAS,EAAE;QAAA,IAAAC,qBAAA;QAC/B,CAAAA,qBAAA,GAAAT,IAAI,CAACM,eAAe,CAAC,cAAAG,qBAAA,uBAArBA,qBAAA,CAAuBC,cAAc,EAAE;;MAE3C;KACH,MAAM,IAAI,CAACf,KAAK,CAACgB,OAAO,IAAIhB,KAAK,CAACiB,OAAO,KAAKjB,KAAK,CAACS,GAAG,KAAK,GAAG,EAAE;MAC9DT,KAAK,CAACU,cAAc,EAAE;MACtBT,KAAK,CAACiB,qBAAqB,EAAE;MAC7B;;GAEP,EAAE,EAAE,CAA0E;EAE/E,OAAO;IACHC,aAAa,EAAErB,SAAS;IACxBH;GACH;AACL;;;;"}
@@ -1,15 +0,0 @@
1
- import React__default from 'react';
2
-
3
- function useCurrentRowListener(table) {
4
- const meta = table.options.meta;
5
- const rows = table.getRowModel().rows;
6
- React__default.useEffect(() => {
7
- const currentRowIndex = meta.currentRow.currentRowIndex;
8
- if (currentRowIndex !== undefined && currentRowIndex > rows.length) {
9
- meta.currentRow.setCurrentRowIndex(0);
10
- }
11
- }, [rows.length]);
12
- }
13
-
14
- export { useCurrentRowListener };
15
- //# sourceMappingURL=useCurrentRowListener.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCurrentRowListener.js","sources":["../../../../../../../../../src/components/Table3/hooks/listeners/useCurrentRowListener.ts"],"sourcesContent":["import React from 'react';\nimport { Table as RTable, TableMeta } from '@tanstack/react-table';\n\nexport function useCurrentRowListener<TType = unknown>(table: RTable<TType>) {\n const meta = table.options.meta as TableMeta<TType>;\n const rows = table.getRowModel().rows;\n\n React.useEffect(() => {\n const currentRowIndex = meta.currentRow.currentRowIndex;\n if (currentRowIndex !== undefined && currentRowIndex > rows.length) {\n meta.currentRow.setCurrentRowIndex(0);\n }\n }, [rows.length]);\n}\n"],"names":["useCurrentRowListener","table","meta","options","rows","getRowModel","React","useEffect","currentRowIndex","currentRow","undefined","length","setCurrentRowIndex"],"mappings":";;SAGgBA,qBAAqBA,CAAkBC,KAAoB;EACvE,MAAMC,IAAI,GAAGD,KAAK,CAACE,OAAO,CAACD,IAAwB;EACnD,MAAME,IAAI,GAAGH,KAAK,CAACI,WAAW,EAAE,CAACD,IAAI;EAErCE,cAAK,CAACC,SAAS,CAAC;IACZ,MAAMC,eAAe,GAAGN,IAAI,CAACO,UAAU,CAACD,eAAe;IACvD,IAAIA,eAAe,KAAKE,SAAS,IAAIF,eAAe,GAAGJ,IAAI,CAACO,MAAM,EAAE;MAChET,IAAI,CAACO,UAAU,CAACG,kBAAkB,CAAC,CAAC,CAAC;;GAE5C,EAAE,CAACR,IAAI,CAACO,MAAM,CAAC,CAAC;AACrB;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFilteringStateListener.js","sources":["../../../../../../../../../src/components/Table3/hooks/listeners/useFilteringStateListener.ts"],"sourcesContent":["import { Table as RTable } from '@tanstack/react-table';\nimport { Table3FilterHandler } from '../../types';\nimport { useLazyEffect } from '../../../../hooks/useLazyEffect';\n\n// we use a listener, and not the internal \"controlled\" change handlers because we don't actually want consumers\n// to control the state outside the table. this listener is really here to let the consumer make a server request\n// and provide the server with the filtering state, so that it can filter server side\nexport function useFilteringStateListener<TType = unknown>(table: RTable<TType>, onFilter?: Table3FilterHandler) {\n const columnFilters = table.getState().columnFilters;\n\n useLazyEffect(() => {\n if (table.options.enableColumnFilters && typeof onFilter === 'function') {\n onFilter(columnFilters);\n\n if (table.options.enableRowSelection) {\n table.resetRowSelection();\n }\n }\n }, [table.options.enableColumnFilters, columnFilters]);\n}\n"],"names":["useFilteringStateListener","table","onFilter","columnFilters","getState","useLazyEffect","options","enableColumnFilters","enableRowSelection","resetRowSelection"],"mappings":";;AAIA;AACA;AACA;SACgBA,yBAAyBA,CAAkBC,KAAoB,EAAEC,QAA8B;EAC3G,MAAMC,aAAa,GAAGF,KAAK,CAACG,QAAQ,EAAE,CAACD,aAAa;EAEpDE,aAAa,CAAC;IACV,IAAIJ,KAAK,CAACK,OAAO,CAACC,mBAAmB,IAAI,OAAOL,QAAQ,KAAK,UAAU,EAAE;MACrEA,QAAQ,CAACC,aAAa,CAAC;MAEvB,IAAIF,KAAK,CAACK,OAAO,CAACE,kBAAkB,EAAE;QAClCP,KAAK,CAACQ,iBAAiB,EAAE;;;GAGpC,EAAE,CAACR,KAAK,CAACK,OAAO,CAACC,mBAAmB,EAAEJ,aAAa,CAAC,CAAC;AAC1D;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRowSelectionListener.js","sources":["../../../../../../../../../src/components/Table3/hooks/listeners/useRowSelectionListener.ts"],"sourcesContent":["import { Table as RTable } from '@tanstack/react-table';\nimport { Table3RowSelectionHandler } from '../../types';\nimport { useLazyEffect } from '../../../../hooks/useLazyEffect';\n\nexport function useRowSelectionListener<TType = unknown>(table: RTable<TType>, onRowSelect?: Table3RowSelectionHandler<TType>) {\n const rowSelection = table.getState().rowSelection;\n\n useLazyEffect(() => {\n if (table.options.enableRowSelection && typeof onRowSelect === 'function') {\n const selectedRows = table.getSelectedRowModel().rows;\n\n if (table.options.enableMultiRowSelection) {\n onRowSelect(selectedRows.map(row => row.original));\n } else {\n onRowSelect([selectedRows[0]?.original] ?? []);\n }\n }\n }, [table.options.enableRowSelection, rowSelection]);\n}\n"],"names":["useRowSelectionListener","table","onRowSelect","rowSelection","getState","useLazyEffect","options","enableRowSelection","selectedRows","getSelectedRowModel","rows","enableMultiRowSelection","map","row","original","_ref","_selectedRows$"],"mappings":";;SAIgBA,uBAAuBA,CAAkBC,KAAoB,EAAEC,WAA8C;EACzH,MAAMC,YAAY,GAAGF,KAAK,CAACG,QAAQ,EAAE,CAACD,YAAY;EAElDE,aAAa,CAAC;IACV,IAAIJ,KAAK,CAACK,OAAO,CAACC,kBAAkB,IAAI,OAAOL,WAAW,KAAK,UAAU,EAAE;MACvE,MAAMM,YAAY,GAAGP,KAAK,CAACQ,mBAAmB,EAAE,CAACC,IAAI;MAErD,IAAIT,KAAK,CAACK,OAAO,CAACK,uBAAuB,EAAE;QACvCT,WAAW,CAACM,YAAY,CAACI,GAAG,CAACC,GAAG,IAAIA,GAAG,CAACC,QAAQ,CAAC,CAAC;OACrD,MAAM;QAAA,IAAAC,IAAA,EAAAC,cAAA;QACHd,WAAW,EAAAa,IAAA,GAAC,EAAAC,cAAA,GAACR,YAAY,CAAC,CAAC,CAAC,cAAAQ,cAAA,uBAAfA,cAAA,CAAiBF,QAAQ,CAAC,cAAAC,IAAA,cAAAA,IAAA,GAAI,EAAE,CAAC;;;GAGzD,EAAE,CAACd,KAAK,CAACK,OAAO,CAACC,kBAAkB,EAAEJ,YAAY,CAAC,CAAC;AACxD;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useServerLoadingListener.js","sources":["../../../../../../../../../src/components/Table3/hooks/listeners/useServerLoadingListener.ts"],"sourcesContent":["import React from 'react';\nimport { Table as RTable } from '@tanstack/react-table';\nimport { Table3LoadPageHandler } from '../../types';\n\nexport function useServerLoadingListener<TType = unknown>(table: RTable<TType>, loadPage?: Table3LoadPageHandler) {\n const sorting = table.getState().sorting;\n const columnFilters = table.getState().columnFilters;\n const search = table.getState().globalFilter;\n\n // trigger load of the first page on mount\n React.useEffect(() => {\n if (loadPage) {\n loadPage(0, sorting, columnFilters, search);\n }\n }, []);\n}\n"],"names":["useServerLoadingListener","table","loadPage","sorting","getState","columnFilters","search","globalFilter","React","useEffect"],"mappings":";;SAIgBA,wBAAwBA,CAAkBC,KAAoB,EAAEC,QAAgC;EAC5G,MAAMC,OAAO,GAAGF,KAAK,CAACG,QAAQ,EAAE,CAACD,OAAO;EACxC,MAAME,aAAa,GAAGJ,KAAK,CAACG,QAAQ,EAAE,CAACC,aAAa;EACpD,MAAMC,MAAM,GAAGL,KAAK,CAACG,QAAQ,EAAE,CAACG,YAAY;;EAG5CC,cAAK,CAACC,SAAS,CAAC;IACZ,IAAIP,QAAQ,EAAE;MACVA,QAAQ,CAAC,CAAC,EAAEC,OAAO,EAAEE,aAAa,EAAEC,MAAM,CAAC;;GAElD,EAAE,EAAE,CAAC;AACV;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useShortcutsListener.js","sources":["../../../../../../../../../src/components/Table3/hooks/listeners/useShortcutsListener.ts"],"sourcesContent":["import React from 'react';\nimport { TableMeta, Table as RTable } from '@tanstack/react-table';\nimport { KeyDownHandlerOptions, createShortcutKeyDownHandler } from '../../../../utils/keyboard';\nimport { Table3ShortcutHandlerObject, Table3Shortcuts } from '../../types';\n\nexport function useShortcutsListener<TType = unknown>(table: RTable<TType>, shortcuts: Table3Shortcuts<TType> | undefined) {\n const meta = table.options.meta as TableMeta<TType>;\n const rows = table.getRowModel().rows;\n\n React.useEffect(() => {\n const shortcutKeys = Object.keys(shortcuts ?? {});\n const globalHandlers: Array<(event: KeyboardEvent) => void> = [];\n\n // convert the shortcut into the correct format to register it\n if (shortcuts && shortcutKeys.length && meta.currentRow.currentRowIndex !== undefined) {\n const currentRow = rows[meta.currentRow.currentRowIndex];\n\n shortcutKeys.forEach(key => {\n const handler = shortcuts[key];\n\n let keyDownHandler;\n let keyDownHandlerOptions: KeyDownHandlerOptions;\n\n if (typeof handler === 'function') {\n keyDownHandler = handler;\n keyDownHandlerOptions = {\n key,\n };\n } else {\n const handlerObject = handler as Table3ShortcutHandlerObject<TType>;\n keyDownHandler = handlerObject.handler;\n keyDownHandlerOptions = {\n key,\n meta: handlerObject.meta,\n shift: handlerObject.shift,\n };\n }\n\n globalHandlers.push(\n createShortcutKeyDownHandler(keyDownHandlerOptions, event => {\n event.preventDefault();\n keyDownHandler(currentRow?.original);\n })\n );\n });\n }\n\n globalHandlers.forEach(handler => {\n document.addEventListener('keydown', handler);\n });\n\n return () => {\n globalHandlers.forEach(handler => {\n document.removeEventListener('keydown', handler);\n });\n };\n }, [shortcuts, meta.currentRow.currentRowIndex, rows.length]);\n}\n"],"names":["useShortcutsListener","table","shortcuts","meta","options","rows","getRowModel","React","useEffect","shortcutKeys","Object","keys","globalHandlers","length","currentRow","currentRowIndex","undefined","forEach","key","handler","keyDownHandler","keyDownHandlerOptions","handlerObject","shift","push","createShortcutKeyDownHandler","event","preventDefault","original","document","addEventListener","removeEventListener"],"mappings":";;;SAKgBA,oBAAoBA,CAAkBC,KAAoB,EAAEC,SAA6C;EACrH,MAAMC,IAAI,GAAGF,KAAK,CAACG,OAAO,CAACD,IAAwB;EACnD,MAAME,IAAI,GAAGJ,KAAK,CAACK,WAAW,EAAE,CAACD,IAAI;EAErCE,cAAK,CAACC,SAAS,CAAC;IACZ,MAAMC,YAAY,GAAGC,MAAM,CAACC,IAAI,CAACT,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI,EAAE,CAAC;IACjD,MAAMU,cAAc,GAA0C,EAAE;;IAGhE,IAAIV,SAAS,IAAIO,YAAY,CAACI,MAAM,IAAIV,IAAI,CAACW,UAAU,CAACC,eAAe,KAAKC,SAAS,EAAE;MACnF,MAAMF,UAAU,GAAGT,IAAI,CAACF,IAAI,CAACW,UAAU,CAACC,eAAe,CAAC;MAExDN,YAAY,CAACQ,OAAO,CAACC,GAAG;QACpB,MAAMC,OAAO,GAAGjB,SAAS,CAACgB,GAAG,CAAC;QAE9B,IAAIE,cAAc;QAClB,IAAIC,qBAA4C;QAEhD,IAAI,OAAOF,OAAO,KAAK,UAAU,EAAE;UAC/BC,cAAc,GAAGD,OAAO;UACxBE,qBAAqB,GAAG;YACpBH;WACH;SACJ,MAAM;UACH,MAAMI,aAAa,GAAGH,OAA6C;UACnEC,cAAc,GAAGE,aAAa,CAACH,OAAO;UACtCE,qBAAqB,GAAG;YACpBH,GAAG;YACHf,IAAI,EAAEmB,aAAa,CAACnB,IAAI;YACxBoB,KAAK,EAAED,aAAa,CAACC;WACxB;;QAGLX,cAAc,CAACY,IAAI,CACfC,4BAA4B,CAACJ,qBAAqB,EAAEK,KAAK;UACrDA,KAAK,CAACC,cAAc,EAAE;UACtBP,cAAc,CAACN,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEc,QAAQ,CAAC;SACvC,CAAC,CACL;OACJ,CAAC;;IAGNhB,cAAc,CAACK,OAAO,CAACE,OAAO;MAC1BU,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAEX,OAAO,CAAC;KAChD,CAAC;IAEF,OAAO;MACHP,cAAc,CAACK,OAAO,CAACE,OAAO;QAC1BU,QAAQ,CAACE,mBAAmB,CAAC,SAAS,EAAEZ,OAAO,CAAC;OACnD,CAAC;KACL;GACJ,EAAE,CAACjB,SAAS,EAAEC,IAAI,CAACW,UAAU,CAACC,eAAe,EAAEV,IAAI,CAACQ,MAAM,CAAC,CAAC;AACjE;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSortingStateListener.js","sources":["../../../../../../../../../src/components/Table3/hooks/listeners/useSortingStateListener.ts"],"sourcesContent":["import { Table as RTable } from '@tanstack/react-table';\nimport { Table3SortHandler } from '../../types';\nimport { useLazyEffect } from '../../../../hooks/useLazyEffect';\n\n// we use a listener, and not the internal \"controlled\" change handlers because we don't actually want consumers\n// to control the state outside the table. this listener is really here to let the consumer make a server request\n// and provide the server with the sorting state, so that it can sort server side\nexport function useSortingStateListener<TType = unknown>(table: RTable<TType>, onSort?: Table3SortHandler) {\n const sorting = table.getState().sorting;\n\n useLazyEffect(() => {\n table.resetRowSelection();\n\n if (table.options.enableSorting && typeof onSort === 'function') {\n onSort(sorting);\n }\n }, [table.options.enableSorting, sorting]);\n}\n"],"names":["useSortingStateListener","table","onSort","sorting","getState","useLazyEffect","resetRowSelection","options","enableSorting"],"mappings":";;AAIA;AACA;AACA;SACgBA,uBAAuBA,CAAkBC,KAAoB,EAAEC,MAA0B;EACrG,MAAMC,OAAO,GAAGF,KAAK,CAACG,QAAQ,EAAE,CAACD,OAAO;EAExCE,aAAa,CAAC;IACVJ,KAAK,CAACK,iBAAiB,EAAE;IAEzB,IAAIL,KAAK,CAACM,OAAO,CAACC,aAAa,IAAI,OAAON,MAAM,KAAK,UAAU,EAAE;MAC7DA,MAAM,CAACC,OAAO,CAAC;;GAEtB,EAAE,CAACF,KAAK,CAACM,OAAO,CAACC,aAAa,EAAEL,OAAO,CAAC,CAAC;AAC9C;;;;"}