@economic/taco 2.25.1 → 2.26.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (517) hide show
  1. package/dist/components/Provider/Localization.d.ts +47 -55
  2. package/dist/components/Report/Report.d.ts +5 -19
  3. package/dist/components/Report/useReport.d.ts +3 -7
  4. package/dist/components/Select2/hooks/useChildren.d.ts +2 -1
  5. package/dist/components/Table/Table.d.ts +2 -2
  6. package/dist/components/Table3/Table3.d.ts +14 -14
  7. package/dist/components/Table3/components/Columns/Cell/Cell.d.ts +3 -0
  8. package/dist/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.d.ts +9 -0
  9. package/dist/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.d.ts +10 -0
  10. package/dist/components/Table3/components/Columns/Cell/EditingControlCell.d.ts +3 -0
  11. package/dist/components/Table3/components/Columns/Cell/EditingDisplayCell.d.ts +3 -0
  12. package/dist/components/Table3/components/Columns/Cell/util.d.ts +3 -0
  13. package/dist/components/Table3/components/Columns/Internal/EditingActionsMenu.d.ts +10 -0
  14. package/dist/components/Table3/components/Editing/Alert.d.ts +12 -0
  15. package/dist/components/Table3/components/Row/Editing/SaveStatus.d.ts +8 -0
  16. package/dist/components/Table3/components/Row/Row.d.ts +3 -0
  17. package/dist/components/Table3/components/Toolbar/Editing/Editing.d.ts +8 -0
  18. package/dist/components/Table3/features/useTableEditing.d.ts +46 -0
  19. package/dist/components/Table3/listeners/useTableEditingListener.d.ts +2 -0
  20. package/dist/components/Table3/types.d.ts +28 -351
  21. package/dist/components/Table3/useTable3.d.ts +11 -0
  22. package/dist/components/Table3/util/editing.d.ts +2 -10
  23. package/dist/esm/index.css +216 -515
  24. package/dist/esm/packages/taco/src/components/Field/Field.js +1 -0
  25. package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
  26. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js +5 -6
  27. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js.map +1 -1
  28. package/dist/esm/packages/taco/src/components/Provider/Localization.js +48 -59
  29. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  30. package/dist/esm/packages/taco/src/components/Report/Report.js +8 -51
  31. package/dist/esm/packages/taco/src/components/Report/Report.js.map +1 -1
  32. package/dist/esm/packages/taco/src/components/Report/useReport.js +8 -45
  33. package/dist/esm/packages/taco/src/components/Report/useReport.js.map +1 -1
  34. package/dist/esm/packages/taco/src/components/Select2/Select2.js +1 -1
  35. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  36. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
  37. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +1 -1
  38. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  39. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js +10 -10
  40. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  41. package/dist/esm/packages/taco/src/components/Table3/Table3.js +30 -218
  42. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  43. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js +39 -0
  44. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js.map +1 -0
  45. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js +85 -0
  46. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -0
  47. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js +71 -0
  48. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js.map +1 -0
  49. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +216 -0
  50. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -0
  51. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js +14 -0
  52. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js.map +1 -0
  53. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js +45 -0
  54. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js.map +1 -0
  55. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js +62 -0
  56. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -0
  57. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +134 -0
  58. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -0
  59. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js +54 -0
  60. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -0
  61. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +41 -0
  62. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -0
  63. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js +49 -0
  64. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js.map +1 -0
  65. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +349 -0
  66. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -0
  67. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +49 -0
  68. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -0
  69. package/dist/esm/packages/taco/src/components/Table3/useTable3.js +36 -0
  70. package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -0
  71. package/dist/esm/packages/taco/src/components/Table3/util/editing.js +46 -38
  72. package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
  73. package/dist/esm/packages/taco/src/index.js +1 -1
  74. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js +2 -0
  75. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js.map +1 -1
  76. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +52 -0
  77. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -0
  78. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Body/Body.js +21 -12
  79. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js.map +1 -0
  80. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js.map +1 -0
  81. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js.map +1 -0
  82. package/dist/esm/packages/taco/src/{components/Report/components/Cell → primitives/Table/Core/components/Columns/Cell/BuiltIns}/DisplayCell.js +6 -4
  83. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js.map +1 -0
  84. package/dist/esm/packages/taco/src/{components/Report/components/Cell → primitives/Table/Core/components/Columns/Cell/BuiltIns}/GroupedCell.js +8 -6
  85. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js.map +1 -0
  86. package/dist/esm/packages/taco/src/{components/Report/components → primitives/Table/Core/components/Columns}/Cell/Cell.js +6 -5
  87. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js.map +1 -0
  88. package/dist/esm/packages/taco/src/{components/Report/components → primitives/Table/Core/components/Columns}/Cell/util.js +5 -4
  89. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js.map +1 -0
  90. package/dist/esm/packages/taco/src/{components/Report/components → primitives/Table/Core/components/Columns}/Internal/Actions.js +28 -17
  91. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -0
  92. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js +73 -0
  93. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js.map +1 -0
  94. package/dist/esm/packages/taco/src/{components/Report/components → primitives/Table/Core/components/Columns}/Internal/Expansion.js +18 -6
  95. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -0
  96. package/dist/esm/packages/taco/src/{components/Report/components → primitives/Table/Core/components/Columns}/Internal/Selection.js +23 -10
  97. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js.map +1 -0
  98. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -0
  99. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Footer/Summary.js +7 -7
  100. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js.map +1 -0
  101. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Header/Header.js +12 -7
  102. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -0
  103. package/dist/esm/packages/taco/src/{components/Table3/components/columns/header → primitives/Table/Core/components/Header/components}/Goto.js +5 -5
  104. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map +1 -0
  105. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Header/components/Menu.js +15 -16
  106. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -0
  107. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Header/components/Resizer.js +3 -3
  108. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -0
  109. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Header/components/SortIndicator.js +1 -1
  110. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -0
  111. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Header/util.js +4 -4
  112. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js.map +1 -0
  113. package/dist/esm/packages/taco/src/{components/Report/components/Row → primitives/Table/Core/components/Row/BuiltIns}/DisplayRow.js +30 -12
  114. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -0
  115. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js.map +1 -0
  116. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Row/Row.js +13 -7
  117. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js.map +1 -0
  118. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Row/RowContext.js +0 -1
  119. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js.map +1 -0
  120. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js +54 -0
  121. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js.map +1 -0
  122. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/Filters.js +9 -9
  123. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -0
  124. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/ManageFiltersPopover.js +9 -9
  125. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -0
  126. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/components/Filter.js +4 -4
  127. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js.map +1 -0
  128. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/components/FilterColumn.js +7 -7
  129. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js.map +1 -0
  130. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/components/FilterComparator.js +17 -17
  131. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js.map +1 -0
  132. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/components/FilterValue.js +7 -7
  133. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -0
  134. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js.map +1 -0
  135. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Print/Print.js +11 -11
  136. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -0
  137. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js +88 -0
  138. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js.map +1 -0
  139. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Search/Search.js +26 -7
  140. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js.map +1 -0
  141. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Settings/HideOrOrderPopover.js +27 -13
  142. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -0
  143. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Settings/Settings.js +17 -17
  144. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -0
  145. package/dist/esm/packages/taco/src/{components/Report/styles/util.js → primitives/Table/Core/features/useStylesheet.js} +18 -2
  146. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useStylesheet.js.map +1 -0
  147. package/dist/esm/packages/taco/src/{components/Report/styles/useColumnPinningStylesheet.js → primitives/Table/Core/features/useStylesheetColumnFreezing.js} +12 -12
  148. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useStylesheetColumnFreezing.js.map +1 -0
  149. package/dist/esm/packages/taco/src/{components/Report/styles/useCssGridStylesheet.js → primitives/Table/Core/features/useStylesheetCssGrid.js} +9 -9
  150. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useStylesheetCssGrid.js.map +1 -0
  151. package/dist/esm/packages/taco/src/{components/Report/util → primitives/Table/Core/features}/useTableGlobalShortcuts.js +3 -5
  152. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js.map +1 -0
  153. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js.map +1 -0
  154. package/dist/esm/packages/taco/src/{components/Report/util → primitives/Table/Core/features}/useTableRenderer.js +5 -3
  155. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -0
  156. package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/listeners/useTableRowActiveListener.js +1 -1
  157. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js.map +1 -0
  158. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js +50 -0
  159. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js.map +1 -0
  160. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js.map +1 -0
  161. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
  162. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js +5 -15
  163. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js.map +1 -1
  164. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js +14 -0
  165. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js.map +1 -0
  166. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js +9 -0
  167. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js.map +1 -0
  168. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js +1 -3
  169. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js.map +1 -1
  170. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +13 -9
  171. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  172. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js +58 -24
  173. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js.map +1 -1
  174. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js +1 -2
  175. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js.map +1 -1
  176. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +5 -2
  177. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
  178. package/dist/esm/packages/taco/src/utils/dom.js +19 -3
  179. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  180. package/dist/esm/packages/taco/src/utils/input.js +1 -14
  181. package/dist/esm/packages/taco/src/utils/input.js.map +1 -1
  182. package/dist/index.css +216 -515
  183. package/dist/index.d.ts +1 -0
  184. package/dist/primitives/Table/Core/Table.d.ts +19 -0
  185. package/dist/{components/Report → primitives/Table/Core}/components/Body/Body.d.ts +1 -1
  186. package/dist/{components/Report → primitives/Table/Core}/components/Body/EmptyStateBody.d.ts +2 -2
  187. package/dist/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.d.ts +3 -0
  188. package/dist/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.d.ts +3 -0
  189. package/dist/{components/Report/components → primitives/Table/Core/components/Columns}/Cell/Cell.d.ts +4 -2
  190. package/dist/{components/Report/components → primitives/Table/Core/components/Columns}/Cell/util.d.ts +2 -1
  191. package/dist/{components/Report/components → primitives/Table/Core/components/Columns}/Internal/Actions.d.ts +4 -4
  192. package/dist/primitives/Table/Core/components/Columns/Internal/Drag.d.ts +2 -0
  193. package/dist/primitives/Table/Core/components/Columns/Internal/Expansion.d.ts +2 -0
  194. package/dist/primitives/Table/Core/components/Columns/Internal/Selection.d.ts +2 -0
  195. package/dist/{components/Report → primitives/Table/Core}/components/Header/Header.d.ts +7 -2
  196. package/dist/{components/Table3/components/columns/header → primitives/Table/Core/components/Header/components}/Goto.d.ts +1 -1
  197. package/dist/{components/Report → primitives/Table/Core}/components/Header/components/Menu.d.ts +2 -1
  198. package/dist/{components/Report → primitives/Table/Core}/components/Header/components/Resizer.d.ts +1 -1
  199. package/dist/{components/Report → primitives/Table/Core}/components/Header/components/SortIndicator.d.ts +1 -1
  200. package/dist/primitives/Table/Core/components/Header/util.d.ts +4 -0
  201. package/dist/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.d.ts +4 -0
  202. package/dist/primitives/Table/Core/components/Row/Row.d.ts +6 -0
  203. package/dist/{components/Report → primitives/Table/Core}/components/Row/RowContext.d.ts +0 -1
  204. package/dist/primitives/Table/Core/components/Toolbar/Toolbar.d.ts +7 -0
  205. package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/components/Filter.d.ts +1 -1
  206. package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/components/FilterColumn.d.ts +2 -2
  207. package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/components/FilterComparator.d.ts +1 -1
  208. package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/components/FilterValue.d.ts +1 -1
  209. package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/util.d.ts +1 -1
  210. package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Print/Print.d.ts +1 -1
  211. package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Print/PrintDialog.d.ts +2 -2
  212. package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Search/Search.d.ts +3 -1
  213. package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Settings/HideOrOrderPopover.d.ts +1 -1
  214. package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Settings/Settings.d.ts +2 -2
  215. package/dist/primitives/Table/Core/features/useStylesheetColumnFreezing.d.ts +2 -0
  216. package/dist/{components/Report/styles/useCssGridStylesheet.d.ts → primitives/Table/Core/features/useStylesheetCssGrid.d.ts} +2 -2
  217. package/dist/{components/Report/util → primitives/Table/Core/features}/useTableGlobalShortcuts.d.ts +1 -1
  218. package/dist/{components/Report/util → primitives/Table/Core/features}/useTableRenderer.d.ts +3 -2
  219. package/dist/primitives/Table/Core/types.d.ts +21 -0
  220. package/dist/primitives/Table/Core/useTable.d.ts +27 -0
  221. package/dist/primitives/Table/types.d.ts +168 -3
  222. package/dist/primitives/Table/useTableManager/features/useTableRowActive.d.ts +4 -2
  223. package/dist/primitives/Table/useTableManager/features/useTableRowDrag.d.ts +8 -0
  224. package/dist/primitives/Table/useTableManager/features/useTableRowDrop.d.ts +5 -0
  225. package/dist/primitives/Table/useTableManager/types.d.ts +1 -0
  226. package/dist/primitives/Table/useTableManager/useTableManager.d.ts +9 -3
  227. package/dist/primitives/Table/useTableManager/util/settings.d.ts +1 -1
  228. package/dist/taco.cjs.development.js +7134 -11743
  229. package/dist/taco.cjs.development.js.map +1 -1
  230. package/dist/taco.cjs.production.min.js +1 -1
  231. package/dist/taco.cjs.production.min.js.map +1 -1
  232. package/dist/utils/dom.d.ts +2 -1
  233. package/package.json +3 -5
  234. package/dist/components/Report/components/Cell/DisplayCell.d.ts +0 -8
  235. package/dist/components/Report/components/Cell/GroupedCell.d.ts +0 -8
  236. package/dist/components/Report/components/Header/components/Goto.d.ts +0 -6
  237. package/dist/components/Report/components/Header/util.d.ts +0 -4
  238. package/dist/components/Report/components/Internal/Expansion.d.ts +0 -4
  239. package/dist/components/Report/components/Internal/Selection.d.ts +0 -4
  240. package/dist/components/Report/components/Row/DisplayRow.d.ts +0 -9
  241. package/dist/components/Report/components/Row/Row.d.ts +0 -9
  242. package/dist/components/Report/components/Toolbar/Toolbar.d.ts +0 -15
  243. package/dist/components/Report/styles/useColumnPinningStylesheet.d.ts +0 -2
  244. package/dist/components/Report/styles/util.d.ts +0 -3
  245. package/dist/components/Report/types.d.ts +0 -20
  246. package/dist/components/Table3/components/alert/ErrorAlert.d.ts +0 -10
  247. package/dist/components/Table3/components/columns/cell/Cell.d.ts +0 -6
  248. package/dist/components/Table3/components/columns/cell/DisplayCell.d.ts +0 -25
  249. package/dist/components/Table3/components/columns/cell/EditingCell.d.ts +0 -14
  250. package/dist/components/Table3/components/columns/cell/EditingControl.d.ts +0 -21
  251. package/dist/components/Table3/components/columns/cell/Highlight.d.ts +0 -2
  252. package/dist/components/Table3/components/columns/cell/Indicator.d.ts +0 -22
  253. package/dist/components/Table3/components/columns/cell/controls/TextareaControl.d.ts +0 -2
  254. package/dist/components/Table3/components/columns/footer/Footer.d.ts +0 -14
  255. package/dist/components/Table3/components/columns/footer/Summary.d.ts +0 -8
  256. package/dist/components/Table3/components/columns/header/Group.d.ts +0 -15
  257. package/dist/components/Table3/components/columns/header/Header.d.ts +0 -37
  258. package/dist/components/Table3/components/columns/header/Menu.d.ts +0 -20
  259. package/dist/components/Table3/components/columns/header/Resizer.d.ts +0 -7
  260. package/dist/components/Table3/components/columns/header/SortIndicator.d.ts +0 -12
  261. package/dist/components/Table3/components/columns/internal/Actions.d.ts +0 -3
  262. package/dist/components/Table3/components/columns/internal/Drag.d.ts +0 -4
  263. package/dist/components/Table3/components/columns/internal/EditingActions.d.ts +0 -8
  264. package/dist/components/Table3/components/columns/internal/Expansion.d.ts +0 -4
  265. package/dist/components/Table3/components/columns/internal/Selection.d.ts +0 -3
  266. package/dist/components/Table3/components/columns/styles.d.ts +0 -5
  267. package/dist/components/Table3/components/rows/ExpandedRow.d.ts +0 -8
  268. package/dist/components/Table3/components/rows/Row.d.ts +0 -26
  269. package/dist/components/Table3/components/rows/RowContext.d.ts +0 -10
  270. package/dist/components/Table3/components/rows/SkeletonRow.d.ts +0 -10
  271. package/dist/components/Table3/components/rows/styles.d.ts +0 -6
  272. package/dist/components/Table3/components/toolbar/ColumnSettings.d.ts +0 -7
  273. package/dist/components/Table3/components/toolbar/EditButton.d.ts +0 -7
  274. package/dist/components/Table3/components/toolbar/Filter/filters/Filters.d.ts +0 -7
  275. package/dist/components/Table3/components/toolbar/Filter/filters/components/Filter.d.ts +0 -12
  276. package/dist/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.d.ts +0 -12
  277. package/dist/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.d.ts +0 -7
  278. package/dist/components/Table3/components/toolbar/Filter/filters/components/FilterValue.d.ts +0 -10
  279. package/dist/components/Table3/components/toolbar/FontSize.d.ts +0 -7
  280. package/dist/components/Table3/components/toolbar/PrintButton/PrintButton.d.ts +0 -8
  281. package/dist/components/Table3/components/toolbar/PrintButton/PrintIFrame.d.ts +0 -8
  282. package/dist/components/Table3/components/toolbar/PrintButton/WarningDialog.d.ts +0 -9
  283. package/dist/components/Table3/components/toolbar/PrintButton/hooks/useParentStylesheets.d.ts +0 -1
  284. package/dist/components/Table3/components/toolbar/RowHeight.d.ts +0 -7
  285. package/dist/components/Table3/components/toolbar/Search.d.ts +0 -8
  286. package/dist/components/Table3/components/toolbar/Settings.d.ts +0 -8
  287. package/dist/components/Table3/components/toolbar/Toolbar.d.ts +0 -13
  288. package/dist/components/Table3/hooks/features/useColumnFreezing.d.ts +0 -13
  289. package/dist/components/Table3/hooks/features/useEditing.d.ts +0 -31
  290. package/dist/components/Table3/hooks/features/useHeaderOffsetStyle.d.ts +0 -3
  291. package/dist/components/Table3/hooks/features/usePauseShortcuts.d.ts +0 -5
  292. package/dist/components/Table3/hooks/features/usePrinting.d.ts +0 -7
  293. package/dist/components/Table3/hooks/features/useRowActions.d.ts +0 -5
  294. package/dist/components/Table3/hooks/features/useRowDrag.d.ts +0 -6
  295. package/dist/components/Table3/hooks/features/useRowDrop.d.ts +0 -5
  296. package/dist/components/Table3/hooks/features/useSearch.d.ts +0 -16
  297. package/dist/components/Table3/hooks/features/useSettings.d.ts +0 -3
  298. package/dist/components/Table3/hooks/features/useValidation.d.ts +0 -13
  299. package/dist/components/Table3/hooks/listeners/useEditingStateListener.d.ts +0 -2
  300. package/dist/components/Table3/hooks/listeners/useSettingsStateListener.d.ts +0 -3
  301. package/dist/components/Table3/hooks/useConvertChildrenToColumns.d.ts +0 -9
  302. package/dist/components/Table3/hooks/useCssGrid.d.ts +0 -6
  303. package/dist/components/Table3/hooks/useCssVars.d.ts +0 -8
  304. package/dist/components/Table3/hooks/useTable.d.ts +0 -74
  305. package/dist/components/Table3/hooks/useTableDataLoader.d.ts +0 -22
  306. package/dist/components/Table3/hooks/useTablePreset.d.ts +0 -2
  307. package/dist/components/Table3/hooks/useTableRefInstanceSetup.d.ts +0 -4
  308. package/dist/components/Table3/strategies/index.d.ts +0 -4
  309. package/dist/components/Table3/strategies/virtualised.d.ts +0 -4
  310. package/dist/components/Table3/util/columns.d.ts +0 -8
  311. package/dist/components/Table3/util/filtering.d.ts +0 -3
  312. package/dist/components/Table3/util/scrolling.d.ts +0 -2
  313. package/dist/esm/packages/taco/src/components/Report/components/Body/Body.js.map +0 -1
  314. package/dist/esm/packages/taco/src/components/Report/components/Body/EmptyStateBody.js.map +0 -1
  315. package/dist/esm/packages/taco/src/components/Report/components/Body/util.js.map +0 -1
  316. package/dist/esm/packages/taco/src/components/Report/components/Cell/Cell.js.map +0 -1
  317. package/dist/esm/packages/taco/src/components/Report/components/Cell/DisplayCell.js.map +0 -1
  318. package/dist/esm/packages/taco/src/components/Report/components/Cell/GroupedCell.js.map +0 -1
  319. package/dist/esm/packages/taco/src/components/Report/components/Cell/util.js.map +0 -1
  320. package/dist/esm/packages/taco/src/components/Report/components/Footer/Footer.js.map +0 -1
  321. package/dist/esm/packages/taco/src/components/Report/components/Footer/Summary.js.map +0 -1
  322. package/dist/esm/packages/taco/src/components/Report/components/Header/Header.js.map +0 -1
  323. package/dist/esm/packages/taco/src/components/Report/components/Header/components/Goto.js +0 -28
  324. package/dist/esm/packages/taco/src/components/Report/components/Header/components/Goto.js.map +0 -1
  325. package/dist/esm/packages/taco/src/components/Report/components/Header/components/Menu.js.map +0 -1
  326. package/dist/esm/packages/taco/src/components/Report/components/Header/components/Resizer.js.map +0 -1
  327. package/dist/esm/packages/taco/src/components/Report/components/Header/components/SortIndicator.js.map +0 -1
  328. package/dist/esm/packages/taco/src/components/Report/components/Header/util.js.map +0 -1
  329. package/dist/esm/packages/taco/src/components/Report/components/Internal/Actions.js.map +0 -1
  330. package/dist/esm/packages/taco/src/components/Report/components/Internal/Expansion.js.map +0 -1
  331. package/dist/esm/packages/taco/src/components/Report/components/Internal/Selection.js.map +0 -1
  332. package/dist/esm/packages/taco/src/components/Report/components/Row/DisplayRow.js.map +0 -1
  333. package/dist/esm/packages/taco/src/components/Report/components/Row/Row.js.map +0 -1
  334. package/dist/esm/packages/taco/src/components/Report/components/Row/RowContext.js.map +0 -1
  335. package/dist/esm/packages/taco/src/components/Report/components/Row/SkeletonRow.js.map +0 -1
  336. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/Toolbar.js +0 -63
  337. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/Toolbar.js.map +0 -1
  338. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/Filters.js.map +0 -1
  339. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +0 -1
  340. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/components/Filter.js.map +0 -1
  341. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/components/FilterColumn.js.map +0 -1
  342. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/components/FilterComparator.js.map +0 -1
  343. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/components/FilterValue.js.map +0 -1
  344. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Filters/util.js.map +0 -1
  345. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Print/Print.js.map +0 -1
  346. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Print/PrintDialog.js +0 -88
  347. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Print/PrintDialog.js.map +0 -1
  348. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Search/Search.js.map +0 -1
  349. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +0 -1
  350. package/dist/esm/packages/taco/src/components/Report/components/Toolbar/components/Settings/Settings.js.map +0 -1
  351. package/dist/esm/packages/taco/src/components/Report/listeners/useTableRowActiveListener.js.map +0 -1
  352. package/dist/esm/packages/taco/src/components/Report/styles/useColumnPinningStylesheet.js.map +0 -1
  353. package/dist/esm/packages/taco/src/components/Report/styles/useCssGridStylesheet.js.map +0 -1
  354. package/dist/esm/packages/taco/src/components/Report/styles/useStylesheet.js +0 -20
  355. package/dist/esm/packages/taco/src/components/Report/styles/useStylesheet.js.map +0 -1
  356. package/dist/esm/packages/taco/src/components/Report/styles/util.js.map +0 -1
  357. package/dist/esm/packages/taco/src/components/Report/util/rows.js.map +0 -1
  358. package/dist/esm/packages/taco/src/components/Report/util/useTableGlobalShortcuts.js.map +0 -1
  359. package/dist/esm/packages/taco/src/components/Report/util/useTableRenderer.js.map +0 -1
  360. package/dist/esm/packages/taco/src/components/Table3/components/alert/ErrorAlert.js +0 -154
  361. package/dist/esm/packages/taco/src/components/Table3/components/alert/ErrorAlert.js.map +0 -1
  362. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Cell.js +0 -84
  363. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Cell.js.map +0 -1
  364. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js +0 -84
  365. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js.map +0 -1
  366. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js +0 -212
  367. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js.map +0 -1
  368. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js +0 -194
  369. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js.map +0 -1
  370. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Highlight.js +0 -41
  371. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Highlight.js.map +0 -1
  372. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Indicator.js +0 -88
  373. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Indicator.js.map +0 -1
  374. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js +0 -144
  375. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js.map +0 -1
  376. package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Footer.js +0 -50
  377. package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Footer.js.map +0 -1
  378. package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Summary.js +0 -41
  379. package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Summary.js.map +0 -1
  380. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Goto.js.map +0 -1
  381. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Group.js +0 -74
  382. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Group.js.map +0 -1
  383. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js +0 -186
  384. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js.map +0 -1
  385. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js +0 -206
  386. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js.map +0 -1
  387. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Resizer.js +0 -42
  388. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Resizer.js.map +0 -1
  389. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/SortIndicator.js +0 -38
  390. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/SortIndicator.js.map +0 -1
  391. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js +0 -129
  392. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js.map +0 -1
  393. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Drag.js +0 -86
  394. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Drag.js.map +0 -1
  395. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js +0 -174
  396. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js.map +0 -1
  397. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Expansion.js +0 -104
  398. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Expansion.js.map +0 -1
  399. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js +0 -187
  400. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js.map +0 -1
  401. package/dist/esm/packages/taco/src/components/Table3/components/columns/styles.js +0 -19
  402. package/dist/esm/packages/taco/src/components/Table3/components/columns/styles.js.map +0 -1
  403. package/dist/esm/packages/taco/src/components/Table3/components/rows/ExpandedRow.js +0 -27
  404. package/dist/esm/packages/taco/src/components/Table3/components/rows/ExpandedRow.js.map +0 -1
  405. package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js +0 -327
  406. package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js.map +0 -1
  407. package/dist/esm/packages/taco/src/components/Table3/components/rows/RowContext.js +0 -14
  408. package/dist/esm/packages/taco/src/components/Table3/components/rows/RowContext.js.map +0 -1
  409. package/dist/esm/packages/taco/src/components/Table3/components/rows/SkeletonRow.js +0 -43
  410. package/dist/esm/packages/taco/src/components/Table3/components/rows/SkeletonRow.js.map +0 -1
  411. package/dist/esm/packages/taco/src/components/Table3/components/rows/styles.js +0 -9
  412. package/dist/esm/packages/taco/src/components/Table3/components/rows/styles.js.map +0 -1
  413. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/ColumnSettings.js +0 -109
  414. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/ColumnSettings.js.map +0 -1
  415. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/EditButton.js +0 -29
  416. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/EditButton.js.map +0 -1
  417. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js +0 -164
  418. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js.map +0 -1
  419. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/Filter.js +0 -102
  420. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/Filter.js.map +0 -1
  421. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.js +0 -50
  422. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.js.map +0 -1
  423. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.js +0 -111
  424. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.js.map +0 -1
  425. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterValue.js +0 -118
  426. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterValue.js.map +0 -1
  427. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/FontSize.js +0 -26
  428. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/FontSize.js.map +0 -1
  429. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js +0 -211
  430. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js.map +0 -1
  431. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintIFrame.js +0 -224
  432. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintIFrame.js.map +0 -1
  433. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/WarningDialog.js +0 -60
  434. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/WarningDialog.js.map +0 -1
  435. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/hooks/useParentStylesheets.js +0 -97
  436. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/hooks/useParentStylesheets.js.map +0 -1
  437. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/RowHeight.js +0 -33
  438. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/RowHeight.js.map +0 -1
  439. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Search.js +0 -238
  440. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Search.js.map +0 -1
  441. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Settings.js +0 -65
  442. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Settings.js.map +0 -1
  443. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Toolbar.js +0 -64
  444. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Toolbar.js.map +0 -1
  445. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useColumnFreezing.js +0 -95
  446. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useColumnFreezing.js.map +0 -1
  447. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useEditing.js +0 -299
  448. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useEditing.js.map +0 -1
  449. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useHeaderOffsetStyle.js +0 -24
  450. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useHeaderOffsetStyle.js.map +0 -1
  451. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseShortcuts.js +0 -12
  452. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseShortcuts.js.map +0 -1
  453. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePrinting.js +0 -14
  454. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePrinting.js.map +0 -1
  455. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowActions.js +0 -10
  456. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowActions.js.map +0 -1
  457. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowDrag.js +0 -13
  458. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowDrag.js.map +0 -1
  459. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowDrop.js +0 -9
  460. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowDrop.js.map +0 -1
  461. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSearch.js +0 -29
  462. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSearch.js.map +0 -1
  463. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSettings.js +0 -23
  464. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSettings.js.map +0 -1
  465. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useValidation.js +0 -178
  466. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useValidation.js.map +0 -1
  467. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useEditingStateListener.js +0 -28
  468. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useEditingStateListener.js.map +0 -1
  469. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js +0 -24
  470. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js.map +0 -1
  471. package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js +0 -143
  472. package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js.map +0 -1
  473. package/dist/esm/packages/taco/src/components/Table3/hooks/useCssGrid.js +0 -66
  474. package/dist/esm/packages/taco/src/components/Table3/hooks/useCssGrid.js.map +0 -1
  475. package/dist/esm/packages/taco/src/components/Table3/hooks/useCssVars.js +0 -74
  476. package/dist/esm/packages/taco/src/components/Table3/hooks/useCssVars.js.map +0 -1
  477. package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js +0 -234
  478. package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js.map +0 -1
  479. package/dist/esm/packages/taco/src/components/Table3/hooks/useTableDataLoader.js +0 -130
  480. package/dist/esm/packages/taco/src/components/Table3/hooks/useTableDataLoader.js.map +0 -1
  481. package/dist/esm/packages/taco/src/components/Table3/hooks/useTablePreset.js +0 -122
  482. package/dist/esm/packages/taco/src/components/Table3/hooks/useTablePreset.js.map +0 -1
  483. package/dist/esm/packages/taco/src/components/Table3/hooks/useTableRefInstanceSetup.js +0 -19
  484. package/dist/esm/packages/taco/src/components/Table3/hooks/useTableRefInstanceSetup.js.map +0 -1
  485. package/dist/esm/packages/taco/src/components/Table3/strategies/index.js +0 -8
  486. package/dist/esm/packages/taco/src/components/Table3/strategies/index.js.map +0 -1
  487. package/dist/esm/packages/taco/src/components/Table3/strategies/virtualised.js +0 -117
  488. package/dist/esm/packages/taco/src/components/Table3/strategies/virtualised.js.map +0 -1
  489. package/dist/esm/packages/taco/src/components/Table3/types.js +0 -20
  490. package/dist/esm/packages/taco/src/components/Table3/types.js.map +0 -1
  491. package/dist/esm/packages/taco/src/components/Table3/util/columns.js +0 -60
  492. package/dist/esm/packages/taco/src/components/Table3/util/columns.js.map +0 -1
  493. package/dist/esm/packages/taco/src/components/Table3/util/filtering.js +0 -120
  494. package/dist/esm/packages/taco/src/components/Table3/util/filtering.js.map +0 -1
  495. package/dist/esm/packages/taco/src/components/Table3/util/scrolling.js +0 -53
  496. package/dist/esm/packages/taco/src/components/Table3/util/scrolling.js.map +0 -1
  497. package/dist/esm/packages/taco/src/hooks/useDebouncedEffect.js +0 -15
  498. package/dist/esm/packages/taco/src/hooks/useDebouncedEffect.js.map +0 -1
  499. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRef.js.map +0 -1
  500. package/types.json +0 -588211
  501. /package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Body/EmptyStateBody.js +0 -0
  502. /package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Body/util.js +0 -0
  503. /package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Footer/Footer.js +0 -0
  504. /package/dist/esm/packages/taco/src/{components/Report/components/Row → primitives/Table/Core/components/Row/BuiltIns}/SkeletonRow.js +0 -0
  505. /package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/util.js +0 -0
  506. /package/dist/esm/packages/taco/src/primitives/Table/{useTableManager → Core}/features/useTableRef.js +0 -0
  507. /package/dist/esm/packages/taco/src/{components/Report → primitives/Table/Core}/util/rows.js +0 -0
  508. /package/dist/{components/Report → primitives/Table/Core}/components/Body/util.d.ts +0 -0
  509. /package/dist/{components/Report → primitives/Table/Core}/components/Footer/Footer.d.ts +0 -0
  510. /package/dist/{components/Report → primitives/Table/Core}/components/Footer/Summary.d.ts +0 -0
  511. /package/dist/{components/Report/components/Row → primitives/Table/Core/components/Row/BuiltIns}/SkeletonRow.d.ts +0 -0
  512. /package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/Filters.d.ts +0 -0
  513. /package/dist/{components/Report → primitives/Table/Core}/components/Toolbar/components/Filters/ManageFiltersPopover.d.ts +0 -0
  514. /package/dist/{components/Report/styles → primitives/Table/Core/features}/useStylesheet.d.ts +0 -0
  515. /package/dist/primitives/Table/{useTableManager → Core}/features/useTableRef.d.ts +0 -0
  516. /package/dist/{components/Report → primitives/Table/Core}/listeners/useTableRowActiveListener.d.ts +0 -0
  517. /package/dist/{components/Report → primitives/Table/Core}/util/rows.d.ts +0 -0
@@ -1,9 +1,9 @@
1
1
  import React__default from 'react';
2
2
  import cn from 'clsx';
3
- import { IconButton } from '../../../../IconButton/IconButton.js';
4
- import { useLocalization } from '../../../../Provider/Localization.js';
5
- import { Menu } from '../../../../Menu/Menu.js';
6
- import { _finallyRethrows, _catch } from '../../../../../../../../node_modules/babel-plugin-transform-async-to-promises/helpers.mjs.js';
3
+ import { IconButton } from '../../../../../../components/IconButton/IconButton.js';
4
+ import { useLocalization } from '../../../../../../components/Provider/Localization.js';
5
+ import { Menu } from '../../../../../../components/Menu/Menu.js';
6
+ import { _finallyRethrows, _catch } from '../../../../../../../../../node_modules/babel-plugin-transform-async-to-promises/helpers.mjs.js';
7
7
  import { GotoPopover } from './Goto.js';
8
8
 
9
9
  function HeaderMenu(props) {
@@ -21,7 +21,7 @@ function HeaderMenu(props) {
21
21
  onHide: handleHide,
22
22
  onPin: handlePin,
23
23
  onSortToggle: handleSortToggle,
24
- // scrollToIndex,
24
+ scrollToIndex,
25
25
  setRowActiveIndex,
26
26
  sortDirection
27
27
  } = props;
@@ -41,9 +41,8 @@ function HeaderMenu(props) {
41
41
  const _temp = _finallyRethrows(function () {
42
42
  return _catch(function () {
43
43
  return Promise.resolve(handleGoto(query)).then(function (index) {
44
- // scroll to first, row active might not be enabled
45
- //scrollToIndex(index + 2, { align: 'center' });
46
44
  setRowActiveIndex(index);
45
+ scrollToIndex(index);
47
46
  });
48
47
  }, function (e) {
49
48
  console.error(e);
@@ -76,7 +75,7 @@ function HeaderMenu(props) {
76
75
  menuItems.push( /*#__PURE__*/React__default.createElement(Menu.Item, {
77
76
  icon: "eye-off",
78
77
  onClick: handleClick
79
- }, texts.table3.columns.menu.hideColumn));
78
+ }, texts.table.columns.menu.hideColumn));
80
79
  }
81
80
  if (canSort) {
82
81
  menuItems.push( /*#__PURE__*/React__default.createElement(Menu.Item, {
@@ -86,35 +85,35 @@ function HeaderMenu(props) {
86
85
  value: sortDirection
87
86
  }, /*#__PURE__*/React__default.createElement(Menu.RadioGroup.Item, {
88
87
  value: "asc"
89
- }, texts.table3.columns.menu.sortingOrder.ascending), /*#__PURE__*/React__default.createElement(Menu.RadioGroup.Item, {
88
+ }, texts.table.columns.menu.sortingOrder.ascending), /*#__PURE__*/React__default.createElement(Menu.RadioGroup.Item, {
90
89
  value: "desc"
91
- }, texts.table3.columns.menu.sortingOrder.descending), /*#__PURE__*/React__default.createElement(Menu.RadioGroup.Item, {
90
+ }, texts.table.columns.menu.sortingOrder.descending), /*#__PURE__*/React__default.createElement(Menu.RadioGroup.Item, {
92
91
  value: false
93
- }, texts.table3.columns.menu.sortingOrder.unsorted))))
94
- }, texts.table3.columns.menu.sorting));
92
+ }, texts.table.columns.menu.sortingOrder.unsorted))))
93
+ }, texts.table.columns.menu.sorting));
95
94
  }
96
95
  if (canGoto) {
97
96
  menuItems.push( /*#__PURE__*/React__default.createElement(Menu.Item, {
98
97
  icon: "move",
99
98
  onClick: () => setPopover('goto'),
100
99
  shortcut: "g"
101
- }, texts.table3.columns.menu.gotoRow, "..."));
100
+ }, texts.table.columns.menu.gotoRow, "..."));
102
101
  }
103
102
  if (canPin && handlePin) {
104
103
  menuItems.push( /*#__PURE__*/React__default.createElement(Menu.Item, {
105
104
  icon: "column-freeze",
106
105
  onClick: () => handlePin(index)
107
- }, index === 0 ? texts.table3.columns.menu.freezeFirstColumn : texts.table3.columns.menu.freezeUptoColumn.replace('[TOTAL]', String(index + 1))));
106
+ }, index === 0 ? texts.table.columns.menu.freezeFirstColumn : texts.table.columns.menu.freezeUptoColumn.replace('[TOTAL]', String(index + 1))));
108
107
  menuItems.push( /*#__PURE__*/React__default.createElement(Menu.Item, {
109
108
  icon: "column-unfreeze",
110
109
  onClick: () => handlePin(undefined)
111
- }, texts.table3.columns.menu.unfreezeColumns));
110
+ }, texts.table.columns.menu.unfreezeColumns));
112
111
  }
113
112
  if (canFilter && handleFilter) {
114
113
  menuItems.push( /*#__PURE__*/React__default.createElement(Menu.Item, {
115
114
  icon: isFiltered ? 'filter-solid' : 'filter',
116
115
  onClick: () => handleFilter()
117
- }, isFiltered ? texts.table3.columns.menu.editFilter : texts.table3.columns.menu.filter));
116
+ }, isFiltered ? texts.table.columns.menu.editFilter : texts.table.columns.menu.filter));
118
117
  }
119
118
  if (customMenu) {
120
119
  const menu = customMenu({
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menu.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Header/components/Menu.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { IconButton } from '../../../../../../components/IconButton/IconButton';\nimport { Menu as MenuPrimitive } from '../../../../../../components/Menu/Menu';\nimport { useLocalization } from '../../../../../../components/Provider/Localization';\nimport { GotoPopover } from './Goto';\nimport { TableColumnMenu, TableColumnSortDirection } from '../../../../types';\n\nexport type HeaderMenuProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {\n canFilter: boolean;\n canGoto: boolean;\n canHide: boolean;\n canPin: boolean;\n canSort: boolean;\n customMenu?: TableColumnMenu;\n index: number;\n isFiltered: boolean;\n onFilter?: () => void;\n onGoto?: (query: string) => Promise<number>;\n onHide?: (event: unknown) => void;\n onPin?: (index: number | undefined) => void;\n onSortToggle?: (sortDirection: TableColumnSortDirection | false) => void;\n scrollToIndex: (index: number) => void;\n setRowActiveIndex: (index: number) => void;\n sortDirection?: TableColumnSortDirection | false;\n};\n\nexport function HeaderMenu(props: HeaderMenuProps) {\n const {\n canFilter,\n canGoto,\n canHide,\n canPin,\n canSort,\n customMenu,\n index,\n isFiltered,\n onFilter: handleFilter,\n onGoto: handleGoto,\n onHide: handleHide,\n onPin: handlePin,\n onSortToggle: handleSortToggle,\n scrollToIndex,\n setRowActiveIndex,\n sortDirection,\n } = props;\n const { texts } = useLocalization();\n const [popover, setPopover] = React.useState<string | undefined>(undefined);\n\n let popoverElement;\n\n if (popover) {\n const handleClosePopover = () => setPopover(undefined);\n\n switch (popover) {\n case 'goto': {\n if (handleGoto) {\n const goto = async (query: string) => {\n try {\n const index = await handleGoto(query);\n setRowActiveIndex(index);\n scrollToIndex(index);\n } catch (e) {\n console.error(e);\n //\n } finally {\n handleClosePopover();\n }\n };\n popoverElement = props => <GotoPopover {...props} open onChange={handleClosePopover} onGoto={goto} />;\n }\n }\n }\n }\n\n const memoedMenuItems = React.useMemo(() => {\n const menuItems: JSX.Element[] = [];\n\n if (canHide && handleHide) {\n // we do this in the next tick, otherwise the menu closes and react throws a \"state update on unmounted component\" error\n const handleClick = event => setTimeout(() => handleHide(event), 1);\n\n menuItems.push(\n <MenuPrimitive.Item icon=\"eye-off\" onClick={handleClick}>\n {texts.table.columns.menu.hideColumn}\n </MenuPrimitive.Item>\n );\n }\n\n if (canSort) {\n menuItems.push(\n <MenuPrimitive.Item\n icon=\"sort-by\"\n subMenu={() => (\n <MenuPrimitive.SubMenu>\n <MenuPrimitive.RadioGroup onChange={handleSortToggle as any} value={sortDirection}>\n <MenuPrimitive.RadioGroup.Item value=\"asc\">\n {texts.table.columns.menu.sortingOrder.ascending}\n </MenuPrimitive.RadioGroup.Item>\n <MenuPrimitive.RadioGroup.Item value=\"desc\">\n {texts.table.columns.menu.sortingOrder.descending}\n </MenuPrimitive.RadioGroup.Item>\n <MenuPrimitive.RadioGroup.Item value={false}>\n {texts.table.columns.menu.sortingOrder.unsorted}\n </MenuPrimitive.RadioGroup.Item>\n </MenuPrimitive.RadioGroup>\n </MenuPrimitive.SubMenu>\n )}>\n {texts.table.columns.menu.sorting}\n </MenuPrimitive.Item>\n );\n }\n\n if (canGoto) {\n menuItems.push(\n <MenuPrimitive.Item icon=\"move\" onClick={() => setPopover('goto')} shortcut=\"g\">\n {texts.table.columns.menu.gotoRow}...\n </MenuPrimitive.Item>\n );\n }\n\n if (canPin && handlePin) {\n menuItems.push(\n <MenuPrimitive.Item icon=\"column-freeze\" onClick={() => handlePin(index)}>\n {index === 0\n ? texts.table.columns.menu.freezeFirstColumn\n : texts.table.columns.menu.freezeUptoColumn.replace('[TOTAL]', String(index + 1))}\n </MenuPrimitive.Item>\n );\n\n menuItems.push(\n <MenuPrimitive.Item icon=\"column-unfreeze\" onClick={() => handlePin(undefined)}>\n {texts.table.columns.menu.unfreezeColumns}\n </MenuPrimitive.Item>\n );\n }\n if (canFilter && handleFilter) {\n menuItems.push(\n <MenuPrimitive.Item icon={isFiltered ? 'filter-solid' : 'filter'} onClick={() => handleFilter()}>\n {isFiltered ? texts.table.columns.menu.editFilter : texts.table.columns.menu.filter}\n </MenuPrimitive.Item>\n );\n }\n\n if (customMenu) {\n const menu = customMenu({ trigger: undefined });\n const customItems = React.Children.toArray(menu.props.children.props.children) as JSX.Element[];\n\n if (customItems.length) {\n if (menuItems.length) {\n menuItems.push(<MenuPrimitive.Separator />);\n }\n\n menuItems.push(...customItems);\n }\n }\n\n return menuItems.map((item, key) => React.cloneElement(item, { key }));\n }, [\n canFilter,\n canGoto,\n canHide,\n canPin,\n canSort,\n customMenu,\n handleGoto,\n handleSortToggle,\n index,\n isFiltered,\n sortDirection,\n ]);\n\n // can't use display: none because the button needs to be focusable\n const className = cn(\n // positioning\n 'justify-end -mr-1 overflow-hidden',\n // sizing\n '!h-6 !w-0 !min-h-[theme(spacing.6)] !min-w-0',\n // visible - hover\n 'group-hover/header:!w-6 group-hover/header:!min-w-[theme(spacing.6)]',\n // visible - expanded\n 'aria-expanded:!w-6 aria-expanded:!min-w-[theme(spacing.6)]',\n // visible - focus\n 'focus:!w-6 focus:!min-w-[theme(spacing.6)]',\n {\n '!w-6 !min-w-[theme(spacing.6)]': !!popoverElement,\n },\n props.className\n );\n\n return (\n <IconButton\n className={className}\n icon=\"more\"\n menu={\n popoverElement\n ? undefined\n : menuProps => (\n <MenuPrimitive {...menuProps}>\n <MenuPrimitive.Content>{memoedMenuItems}</MenuPrimitive.Content>\n </MenuPrimitive>\n )\n }\n popover={popoverElement}\n onClickCapture={event => event.preventDefault()}\n />\n );\n}\n"],"names":["HeaderMenu","props","canFilter","canGoto","canHide","canPin","canSort","customMenu","index","isFiltered","onFilter","handleFilter","onGoto","handleGoto","onHide","handleHide","onPin","handlePin","onSortToggle","handleSortToggle","scrollToIndex","setRowActiveIndex","sortDirection","texts","useLocalization","popover","setPopover","React","useState","undefined","popoverElement","handleClosePopover","goto","query","Promise","resolve","then","e","console","error","_wasThrown","_result","_temp","reject","GotoPopover","open","onChange","memoedMenuItems","useMemo","menuItems","handleClick","event","setTimeout","push","MenuPrimitive","Item","icon","onClick","table","columns","menu","hideColumn","subMenu","SubMenu","RadioGroup","value","sortingOrder","ascending","descending","unsorted","sorting","shortcut","gotoRow","freezeFirstColumn","freezeUptoColumn","replace","String","unfreezeColumns","editFilter","filter","trigger","customItems","Children","toArray","children","length","Separator","map","item","key","cloneElement","className","cn","IconButton","menuProps","Content","onClickCapture","preventDefault"],"mappings":";;;;;;;;SA2BgBA,UAAUA,CAACC,KAAsB;EAC7C,MAAM;IACFC,SAAS;IACTC,OAAO;IACPC,OAAO;IACPC,MAAM;IACNC,OAAO;IACPC,UAAU;IACVC,KAAK;IACLC,UAAU;IACVC,QAAQ,EAAEC,YAAY;IACtBC,MAAM,EAAEC,UAAU;IAClBC,MAAM,EAAEC,UAAU;IAClBC,KAAK,EAAEC,SAAS;IAChBC,YAAY,EAAEC,gBAAgB;IAC9BC,aAAa;IACbC,iBAAiB;IACjBC;GACH,GAAGrB,KAAK;EACT,MAAM;IAAEsB;GAAO,GAAGC,eAAe,EAAE;EACnC,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAqBC,SAAS,CAAC;EAE3E,IAAIC,cAAc;EAElB,IAAIL,OAAO,EAAE;IACT,MAAMM,kBAAkB,GAAGA,MAAML,UAAU,CAACG,SAAS,CAAC;IAEtD,QAAQJ,OAAO;MACX,KAAK,MAAM;QAAE;UACT,IAAIZ,UAAU,EAAE;YACZ,MAAMmB,IAAI,aAAUC,KAAa;cAAA;;4CACzB;oBAAA,OAAAC,OAAA,CAAAC,OAAA,CACoBtB,UAAU,CAACoB,KAAK,CAAC,EAAAG,IAAA,WAA/B5B,KAAK;sBACXa,iBAAiB,CAACb,KAAK,CAAC;sBACxBY,aAAa,CAACZ,KAAK,CAAC;;mBACvB,YAAQ6B,CAAC,EAAE;oBACRC,OAAO,CAACC,KAAK,CAACF,CAAC,CAAC;;mBAE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;EAEtE,4DAA4D;;EAE5D,4CAA4C,EAC5C;IACI,gCAAgC,EAAE,CAAC,CAAC9D;GACvC,EACD7B,KAAK,CAAC0F,SAAS,CAClB;EAED,oBACIhE,6BAACkE,UAAU;IACPF,SAAS,EAAEA,SAAS;IACpBnC,IAAI,EAAC,MAAM;IACXI,IAAI,EACA9B,cAAc,GACRD,SAAS,GACTiE,SAAS,mBACLnE,6BAAC2B,IAAa,oBAAKwC,SAAS,gBACxBnE,6BAAC2B,IAAa,CAACyC,OAAO,QAAEhD,eAAe,CAAyB,CACpD,CACnB;IAEXtB,OAAO,EAAEK,cAAc;IACvBkE,cAAc,EAAE7C,KAAK,IAAIA,KAAK,CAAC8C,cAAc;IAC/C;AAEV;;;;"}
@@ -1,7 +1,7 @@
1
1
  import React__default from 'react';
2
2
  import cn from 'clsx';
3
- import { Tooltip } from '../../../../Tooltip/Tooltip.js';
4
- import { useLocalization } from '../../../../Provider/Localization.js';
3
+ import { Tooltip } from '../../../../../../components/Tooltip/Tooltip.js';
4
+ import { useLocalization } from '../../../../../../components/Provider/Localization.js';
5
5
 
6
6
  function Resizer(props) {
7
7
  const {
@@ -52,7 +52,7 @@ function Resizer(props) {
52
52
  }
53
53
  return /*#__PURE__*/React__default.createElement(Tooltip, {
54
54
  placement: "top",
55
- title: texts.table3.columns.resize.tooltip
55
+ title: texts.table.columns.resize.tooltip
56
56
  }, handle);
57
57
  }
58
58
 
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Resizer.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Header/components/Resizer.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { Tooltip } from '../../../../../../components/Tooltip/Tooltip';\nimport { useLocalization } from '../../../../../../components/Provider/Localization';\nimport { TableColumnWidth } from '../../../../types';\n\ntype ResizerProps = {\n headerRef: HTMLTableCellElement | null;\n id: string;\n isResizing: boolean;\n onResize: (event: unknown) => void;\n setColumnSizing: any;\n width?: TableColumnWidth;\n};\n\nexport function Resizer(props: ResizerProps) {\n const { headerRef, id, isResizing, onResize, setColumnSizing, width } = props;\n const { texts } = useLocalization();\n\n // this prevents sort handlers being activated\n const handleClick = event => {\n event.stopPropagation();\n event.preventDefault();\n };\n\n // columns set to \"grow\" don't set a width, so if resize is being triggered on a grow column make sure to set a size first\n const handleResize = event => {\n if (!Number.isInteger(width) && headerRef) {\n setColumnSizing(sizes => ({\n ...sizes,\n [id]: headerRef.getBoundingClientRect().width,\n }));\n setTimeout(() => {\n onResize?.(event);\n }, 1);\n } else {\n onResize?.(event);\n }\n };\n\n const handle = (\n <div\n className={cn(\n 'invisible absolute right-0 top-0 z-10 -mr-2 flex h-full w-4 cursor-col-resize touch-none select-none justify-center rounded py-0.5',\n 'group-hover/header:visible',\n '[th:last-child>&]:!mr-0 [th:last-child>&]:w-2',\n {\n '!visible': isResizing,\n }\n )}\n onClick={handleClick}\n onMouseDown={handleResize}\n onTouchStart={handleResize}>\n <div\n className={cn('h-full w-1 rounded', {\n '!bg-blue-500': isResizing,\n 'bg-grey-500 hover:bg-grey-700': !isResizing,\n })}\n />\n </div>\n );\n\n if (isResizing) {\n return handle;\n }\n\n return (\n <Tooltip placement=\"top\" title={texts.table.columns.resize.tooltip}>\n {handle}\n </Tooltip>\n );\n}\n"],"names":["Resizer","props","headerRef","id","isResizing","onResize","setColumnSizing","width","texts","useLocalization","handleClick","event","stopPropagation","preventDefault","handleResize","Number","isInteger","sizes","getBoundingClientRect","setTimeout","handle","React","className","cn","onClick","onMouseDown","onTouchStart","Tooltip","placement","title","table","columns","resize","tooltip"],"mappings":";;;;;SAegBA,OAAOA,CAACC,KAAmB;EACvC,MAAM;IAAEC,SAAS;IAAEC,EAAE;IAAEC,UAAU;IAAEC,QAAQ;IAAEC,eAAe;IAAEC;GAAO,GAAGN,KAAK;EAC7E,MAAM;IAAEO;GAAO,GAAGC,eAAe,EAAE;;EAGnC,MAAMC,WAAW,GAAGC,KAAK;IACrBA,KAAK,CAACC,eAAe,EAAE;IACvBD,KAAK,CAACE,cAAc,EAAE;GACzB;;EAGD,MAAMC,YAAY,GAAGH,KAAK;IACtB,IAAI,CAACI,MAAM,CAACC,SAAS,CAACT,KAAK,CAAC,IAAIL,SAAS,EAAE;MACvCI,eAAe,CAACW,KAAK,KAAK;QACtB,GAAGA,KAAK;QACR,CAACd,EAAE,GAAGD,SAAS,CAACgB,qBAAqB,EAAE,CAACX;OAC3C,CAAC,CAAC;MACHY,UAAU,CAAC;QACPd,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAGM,KAAK,CAAC;OACpB,EAAE,CAAC,CAAC;KACR,MAAM;MACHN,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAGM,KAAK,CAAC;;GAExB;EAED,MAAMS,MAAM,gBACRC;IACIC,SAAS,EAAEC,EAAE,CACT,oIAAoI,EACpI,4BAA4B,EAC5B,+CAA+C,EAC/C;MACI,UAAU,EAAEnB;KACf,CACJ;IACDoB,OAAO,EAAEd,WAAW;IACpBe,WAAW,EAAEX,YAAY;IACzBY,YAAY,EAAEZ;kBACdO;IACIC,SAAS,EAAEC,EAAE,CAAC,oBAAoB,EAAE;MAChC,cAAc,EAAEnB,UAAU;MAC1B,+BAA+B,EAAE,CAACA;KACrC;IACH,CAET;EAED,IAAIA,UAAU,EAAE;IACZ,OAAOgB,MAAM;;EAGjB,oBACIC,6BAACM,OAAO;IAACC,SAAS,EAAC,KAAK;IAACC,KAAK,EAAErB,KAAK,CAACsB,KAAK,CAACC,OAAO,CAACC,MAAM,CAACC;KACtDb,MAAM,CACD;AAElB;;;;"}
@@ -1,5 +1,5 @@
1
1
  import React__default from 'react';
2
- import { Icon } from '../../../../Icon/Icon.js';
2
+ import { Icon } from '../../../../../../components/Icon/Icon.js';
3
3
 
4
4
  const indicators = {
5
5
  asc: /*#__PURE__*/React__default.createElement(Icon, {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SortIndicator.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Header/components/SortIndicator.tsx"],"sourcesContent":["import React from 'react';\nimport { TableColumnSortDirection } from '../../../../types';\nimport { Icon } from '../../../../../../components/Icon/Icon';\n\ntype SortIndicatorProps = {\n direction: false | TableColumnSortDirection;\n};\n\nconst indicators = {\n asc: <Icon name=\"chevron-up-solid\" className=\"pointer-events-none -my-0.5\" />,\n desc: <Icon name=\"chevron-down-solid\" className=\"pointer-events-none -my-0.5\" />,\n};\n\nexport function SortIndicator(props: SortIndicatorProps) {\n return indicators[props.direction as string] ?? null;\n}\n\nconst ariaSort = {\n asc: 'ascending',\n desc: 'descending',\n};\n\nexport const getAriaSort = direction => ariaSort[direction] ?? 'none';\n\nexport function getSortAttributes(\n canSort: boolean,\n toggleSorting?: (event: unknown) => void,\n sortDirection?: false | TableColumnSortDirection\n) {\n if (!canSort) {\n return {};\n }\n\n const handleClick = (event: React.MouseEvent) => {\n if (event.isDefaultPrevented() || !event.currentTarget.contains(event.target as any)) {\n return;\n }\n\n event.preventDefault();\n toggleSorting?.(event);\n };\n\n return {\n 'aria-sort': ariaSort[sortDirection as any] ?? 'none',\n onClick: handleClick,\n };\n}\n"],"names":["indicators","asc","React","Icon","name","className","desc","SortIndicator","props","_indicators$props$dir","direction","ariaSort","getSortAttributes","canSort","toggleSorting","sortDirection","handleClick","event","isDefaultPrevented","currentTarget","contains","target","preventDefault","_ariaSort$sortDirecti","onClick"],"mappings":";;;AAQA,MAAMA,UAAU,GAAG;EACfC,GAAG,eAAEC,6BAACC,IAAI;IAACC,IAAI,EAAC,kBAAkB;IAACC,SAAS,EAAC;IAAgC;EAC7EC,IAAI,eAAEJ,6BAACC,IAAI;IAACC,IAAI,EAAC,oBAAoB;IAACC,SAAS,EAAC;;CACnD;SAEeE,aAAaA,CAACC,KAAyB;;EACnD,QAAAC,qBAAA,GAAOT,UAAU,CAACQ,KAAK,CAACE,SAAmB,CAAC,cAAAD,qBAAA,cAAAA,qBAAA,GAAI,IAAI;AACxD;AAEA,MAAME,QAAQ,GAAG;EACbV,GAAG,EAAE,WAAW;EAChBK,IAAI,EAAE;CACT;SAIeM,iBAAiBA,CAC7BC,OAAgB,EAChBC,aAAwC,EACxCC,aAAgD;;EAEhD,IAAI,CAACF,OAAO,EAAE;IACV,OAAO,EAAE;;EAGb,MAAMG,WAAW,GAAIC,KAAuB;IACxC,IAAIA,KAAK,CAACC,kBAAkB,EAAE,IAAI,CAACD,KAAK,CAACE,aAAa,CAACC,QAAQ,CAACH,KAAK,CAACI,MAAa,CAAC,EAAE;MAClF;;IAGJJ,KAAK,CAACK,cAAc,EAAE;IACtBR,aAAa,aAAbA,aAAa,uBAAbA,aAAa,CAAGG,KAAK,CAAC;GACzB;EAED,OAAO;IACH,WAAW,GAAAM,qBAAA,GAAEZ,QAAQ,CAACI,aAAoB,CAAC,cAAAQ,qBAAA,cAAAA,qBAAA,GAAI,MAAM;IACrDC,OAAO,EAAER;GACZ;AACL;;;;"}
@@ -1,12 +1,12 @@
1
1
  import React__default from 'react';
2
- import { isInternalColumn } from '../../../../primitives/Table/useTableManager/util/columns.js';
2
+ import { isInternalColumn } from '../../../useTableManager/util/columns.js';
3
3
 
4
- function useSetInitialColumnSizing(id, defaultWidth, width, element, canMeasureSize, setColumnSizing) {
4
+ function useSetInitialColumnSizing(id, width, element, canMeasureSize, setColumnSizing) {
5
5
  React__default.useEffect(() => {
6
- // columns that aren't set to grow must set a pixel width...
6
+ // columns must set a pixel width...
7
7
  // otherwise when scrolling through the table, the column widths adjust based on the content
8
8
  // of the column, this is because to the virtualisation mounting new rows and unmounting old ones
9
- if (canMeasureSize && element && !Number.isInteger(width) && !isInternalColumn(id) && defaultWidth !== 'grow') {
9
+ if (canMeasureSize && element && !Number.isInteger(width) && !isInternalColumn(id)) {
10
10
  setColumnSizing(sizes => ({
11
11
  ...sizes,
12
12
  [id]: element.getBoundingClientRect().width
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sources":["../../../../../../../../../../src/primitives/Table/Core/components/Header/util.ts"],"sourcesContent":["import React from 'react';\nimport { Header as ReactTableHeader, ColumnPinningPosition as ReactTableColumnPinningPosition } from '@tanstack/react-table';\nimport { TableColumnWidth } from '../../../types';\nimport { isInternalColumn } from '../../../useTableManager/util/columns';\n\nexport function useSetInitialColumnSizing(\n id: string,\n width: TableColumnWidth | undefined,\n element: HTMLTableCellElement | null,\n canMeasureSize: boolean,\n setColumnSizing: any\n) {\n React.useEffect(() => {\n // columns must set a pixel width...\n // otherwise when scrolling through the table, the column widths adjust based on the content\n // of the column, this is because to the virtualisation mounting new rows and unmounting old ones\n if (canMeasureSize && element && !Number.isInteger(width) && !isInternalColumn(id)) {\n setColumnSizing(sizes => ({\n ...sizes,\n [id]: element.getBoundingClientRect().width,\n }));\n }\n }, [element, canMeasureSize, width]);\n}\n\nexport function getIsPinned<TType = unknown>(\n header: ReactTableHeader<TType, unknown>\n): ReactTableColumnPinningPosition | undefined {\n // TODO: Is there a native function that does this check for groups?\n return header.subHeaders?.length\n ? header.subHeaders.find(x => x.column.getIsPinned())?.column.getIsPinned()\n : header.column.getIsPinned();\n}\n"],"names":["useSetInitialColumnSizing","id","width","element","canMeasureSize","setColumnSizing","React","useEffect","Number","isInteger","isInternalColumn","sizes","getBoundingClientRect","getIsPinned","header","_header$subHeaders","subHeaders","length","_header$subHeaders$fi","find","x","column"],"mappings":";;;SAKgBA,yBAAyBA,CACrCC,EAAU,EACVC,KAAmC,EACnCC,OAAoC,EACpCC,cAAuB,EACvBC,eAAoB;EAEpBC,cAAK,CAACC,SAAS,CAAC;;;;IAIZ,IAAIH,cAAc,IAAID,OAAO,IAAI,CAACK,MAAM,CAACC,SAAS,CAACP,KAAK,CAAC,IAAI,CAACQ,gBAAgB,CAACT,EAAE,CAAC,EAAE;MAChFI,eAAe,CAACM,KAAK,KAAK;QACtB,GAAGA,KAAK;QACR,CAACV,EAAE,GAAGE,OAAO,CAACS,qBAAqB,EAAE,CAACV;OACzC,CAAC,CAAC;;GAEV,EAAE,CAACC,OAAO,EAAEC,cAAc,EAAEF,KAAK,CAAC,CAAC;AACxC;SAEgBW,WAAWA,CACvBC,MAAwC;;;EAGxC,OAAO,CAAAC,kBAAA,GAAAD,MAAM,CAACE,UAAU,cAAAD,kBAAA,eAAjBA,kBAAA,CAAmBE,MAAM,IAAAC,qBAAA,GAC1BJ,MAAM,CAACE,UAAU,CAACG,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACC,MAAM,CAACR,WAAW,EAAE,CAAC,cAAAK,qBAAA,uBAAnDA,qBAAA,CAAqDG,MAAM,CAACR,WAAW,EAAE,GACzEC,MAAM,CAACO,MAAM,CAACR,WAAW,EAAE;AACrC;;;;"}
@@ -1,30 +1,30 @@
1
1
  import React__default from 'react';
2
2
  import cn from 'clsx';
3
- import { RowContext } from './RowContext.js';
4
- import { Cell } from '../Cell/Cell.js';
3
+ import { isElementInteractive } from '../../../../../../utils/dom.js';
4
+ import { useDropTarget } from '../../../../../../utils/hooks/useDropTarget.js';
5
+ import { Cell } from '../../Columns/Cell/Cell.js';
5
6
 
6
7
  const DisplayRow = /*#__PURE__*/React__default.memo(function DisplayRow(props) {
7
8
  const {
9
+ children,
10
+ cellRenderer: CellRenderer,
8
11
  index,
9
12
  measureRow,
10
13
  row,
11
- table
14
+ table,
15
+ ...otherAttributes
12
16
  } = props;
13
- const {
14
- setIsHovered
15
- } = React__default.useContext(RowContext);
16
17
  const tableMeta = table.options.meta;
17
18
  const attributes = {
19
+ ...otherAttributes,
18
20
  'data-row-id': row.id,
19
21
  'data-row-index': index,
20
- onMouseEnter: React__default.useCallback(() => setIsHovered(true), []),
21
- onMouseLeave: React__default.useCallback(() => setIsHovered(false), []),
22
22
  tabIndex: -1
23
23
  };
24
24
  const handleClick = React__default.useCallback(event => {
25
25
  var _event$currentTarget;
26
26
  const clickedElement = event.target;
27
- if (!((_event$currentTarget = event.currentTarget) !== null && _event$currentTarget !== void 0 && _event$currentTarget.contains(event.target)) || clickableElements.includes(clickedElement.tagName.toLowerCase()) || clickedElement.closest(clickableElements.map(tag => `tr ${tag}`).join(','))) {
27
+ if (!((_event$currentTarget = event.currentTarget) !== null && _event$currentTarget !== void 0 && _event$currentTarget.contains(event.target)) || isElementInteractive(clickedElement)) {
28
28
  return;
29
29
  }
30
30
  tableMeta.rowClick.handleClick(event, row.original);
@@ -43,6 +43,23 @@ const DisplayRow = /*#__PURE__*/React__default.memo(function DisplayRow(props) {
43
43
  if (tableMeta.rowClick.isEnabled) {
44
44
  attributes.onClick = handleClick;
45
45
  }
46
+ // row drag
47
+ if (tableMeta.rowDrag.isEnabled) {
48
+ attributes.draggable = true;
49
+ attributes['aria-grabbed'] = !!tableMeta.rowDrag.dragging[row.id];
50
+ }
51
+ // row drop
52
+ const [isDraggedOver, dropTargetProps] = useDropTarget(event => {
53
+ var _tableMeta$rowDrop$ha, _tableMeta$rowDrop;
54
+ return (_tableMeta$rowDrop$ha = (_tableMeta$rowDrop = tableMeta.rowDrop).handleDrop) === null || _tableMeta$rowDrop$ha === void 0 ? void 0 : _tableMeta$rowDrop$ha.call(_tableMeta$rowDrop, event, row.original);
55
+ });
56
+ if (tableMeta.rowDrop.isEnabled) {
57
+ attributes.onDragEnter = dropTargetProps === null || dropTargetProps === void 0 ? void 0 : dropTargetProps.onDragEnter;
58
+ attributes.onDragLeave = dropTargetProps === null || dropTargetProps === void 0 ? void 0 : dropTargetProps.onDragLeave;
59
+ attributes.onDragOver = dropTargetProps === null || dropTargetProps === void 0 ? void 0 : dropTargetProps.onDragOver;
60
+ attributes.onDrop = dropTargetProps === null || dropTargetProps === void 0 ? void 0 : dropTargetProps.onDrop;
61
+ attributes['data-row-dragged-over'] = isDraggedOver;
62
+ }
46
63
  // row grouping
47
64
  if (table.options.enableGrouping) {
48
65
  attributes['data-row-group'] = row.getIsGrouped() ? true : undefined;
@@ -51,6 +68,7 @@ const DisplayRow = /*#__PURE__*/React__default.memo(function DisplayRow(props) {
51
68
  if (table.options.enableRowSelection) {
52
69
  attributes['data-row-selected'] = row.getIsSelected() || row.getIsAllSubRowsSelected() ? true : undefined;
53
70
  }
71
+ // row expansion
54
72
  let expandedRow;
55
73
  if (tableMeta.rowExpansion.isEnabled && row.getIsExpanded()) {
56
74
  var _tableMeta$rowExpansi, _tableMeta$rowExpansi2, _tableMeta$rowExpansi3;
@@ -73,10 +91,11 @@ const DisplayRow = /*#__PURE__*/React__default.memo(function DisplayRow(props) {
73
91
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("tr", Object.assign({}, attributes, {
74
92
  className: className,
75
93
  ref: ref
76
- }), row.getVisibleCells().map((cell, cellIndex) => ( /*#__PURE__*/React__default.createElement(Cell, {
94
+ }), children, row.getVisibleCells().map((cell, cellIndex) => ( /*#__PURE__*/React__default.createElement(Cell, {
77
95
  key: cell.id,
78
96
  cell: cell,
79
- index: cellIndex
97
+ index: cellIndex,
98
+ renderer: CellRenderer
80
99
  })))), expandedRow ? ( /*#__PURE__*/React__default.createElement("tr", {
81
100
  "data-row-parent-id": row.id,
82
101
  ref: expansionRef
@@ -84,7 +103,6 @@ const DisplayRow = /*#__PURE__*/React__default.memo(function DisplayRow(props) {
84
103
  className: "col-span-full"
85
104
  }, expandedRow))) : null);
86
105
  });
87
- const clickableElements = ['input', 'button', 'a', 'select', 'option', 'label', 'textarea'];
88
106
  function useSetVirtualisedRowHeight(measureRow, rowEl, expansionEl, isExpanded) {
89
107
  React__default.useEffect(() => {
90
108
  if (rowEl) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DisplayRow.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.tsx"],"sourcesContent":["import React from 'react';\nimport { TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport cn from 'clsx';\nimport { Cell } from '../../Columns/Cell/Cell';\nimport { TableRowRendererProps } from '../../../types';\nimport { TableRowWithMetaData } from '../../../../types';\nimport { isElementInteractive } from '../../../../../../utils/dom';\nimport { useDropTarget } from '../../../../../../utils/hooks/useDropTarget';\n\nexport type DisplayRowProps<TType = unknown> = React.HTMLAttributes<HTMLTableRowElement> & TableRowRendererProps<TType>;\n\nexport const DisplayRow = React.memo(function DisplayRow<TType = unknown>(props: DisplayRowProps<TType>) {\n const { children, cellRenderer: CellRenderer, index, measureRow, row, table, ...otherAttributes } = props;\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n\n const attributes: any = {\n ...otherAttributes,\n 'data-row-id': row.id,\n 'data-row-index': index,\n tabIndex: -1,\n };\n\n const handleClick = React.useCallback(\n (event: React.MouseEvent<HTMLTableRowElement>) => {\n const clickedElement = event.target as HTMLElement;\n\n if (!event.currentTarget?.contains(event.target as HTMLElement) || isElementInteractive(clickedElement)) {\n return;\n }\n\n tableMeta.rowClick.handleClick(event, row.original);\n },\n [row.original]\n );\n const handleClickCapture = React.useCallback(() => {\n // do this in the next frame, otherwise it remounts the row and prevents row actions on hover from being clickable\n requestAnimationFrame(() => tableMeta.rowActive.setRowActiveIndex(index));\n }, []);\n\n // row active\n if (tableMeta.rowActive.isEnabled) {\n attributes['data-row-active'] = tableMeta.rowActive.rowActiveIndex === index ? true : undefined;\n // we use capture because it let's us picks up clicks on components inside the row, e.g. checkboxes\n attributes.onClickCapture = handleClickCapture;\n }\n\n // row click\n if (tableMeta.rowClick.isEnabled) {\n attributes.onClick = handleClick;\n }\n\n // row drag\n if (tableMeta.rowDrag.isEnabled) {\n attributes.draggable = true;\n attributes['aria-grabbed'] = !!tableMeta.rowDrag.dragging[row.id];\n }\n\n // row drop\n const [isDraggedOver, dropTargetProps] = useDropTarget(event => tableMeta.rowDrop.handleDrop?.(event, row.original));\n\n if (tableMeta.rowDrop.isEnabled) {\n attributes.onDragEnter = dropTargetProps?.onDragEnter;\n attributes.onDragLeave = dropTargetProps?.onDragLeave;\n attributes.onDragOver = dropTargetProps?.onDragOver;\n attributes.onDrop = dropTargetProps?.onDrop;\n attributes['data-row-dragged-over'] = isDraggedOver;\n }\n\n // row grouping\n if (table.options.enableGrouping) {\n attributes['data-row-group'] = row.getIsGrouped() ? true : undefined;\n }\n\n // row selection\n if (table.options.enableRowSelection) {\n attributes['data-row-selected'] = row.getIsSelected() || row.getIsAllSubRowsSelected() ? true : undefined;\n }\n\n // row expansion\n let expandedRow;\n\n if (tableMeta.rowExpansion.isEnabled && row.getIsExpanded()) {\n attributes['data-row-expanded'] = true;\n expandedRow = tableMeta.rowExpansion.rowExpansionRenderer?.(row.original)?.();\n }\n\n const rowMeta = (row.original as TableRowWithMetaData<TType>)._meta;\n\n if (rowMeta) {\n if (rowMeta.layout) {\n attributes['data-row-meta-layout'] = rowMeta.layout;\n }\n }\n\n const ref = React.useRef<HTMLTableRowElement>(null);\n const expansionRef = React.useRef<HTMLTableRowElement>(null);\n const isExpanded = !!attributes['data-row-expanded'];\n\n useSetVirtualisedRowHeight(measureRow, ref.current, expansionRef.current, isExpanded);\n\n const className = cn('group/row', {\n 'hover:cursor-pointer': typeof attributes.onClick === 'function',\n });\n\n return (\n <>\n <tr {...attributes} className={className} ref={ref}>\n {children}\n {row.getVisibleCells().map((cell, cellIndex) => (\n <Cell key={cell.id} cell={cell} index={cellIndex} renderer={CellRenderer} />\n ))}\n </tr>\n {expandedRow ? (\n <tr data-row-parent-id={row.id} ref={expansionRef}>\n <td className=\"col-span-full\">{expandedRow}</td>\n </tr>\n ) : null}\n </>\n );\n}) as <TType = unknown>(props: TableRowRendererProps<TType>) => JSX.Element;\n\nfunction useSetVirtualisedRowHeight(\n measureRow: (size: number, expansionHeight?: number) => void,\n rowEl: HTMLTableRowElement | null,\n expansionEl: HTMLTableRowElement | null,\n isExpanded: boolean\n) {\n React.useEffect(() => {\n if (rowEl) {\n const height = rowEl.getBoundingClientRect().height;\n\n if (isExpanded && expansionEl) {\n measureRow(height, expansionEl.getBoundingClientRect().height);\n } else {\n measureRow(height);\n }\n }\n }, [isExpanded, rowEl, expansionEl]);\n}\n"],"names":["DisplayRow","React","memo","props","children","cellRenderer","CellRenderer","index","measureRow","row","table","otherAttributes","tableMeta","options","meta","attributes","id","tabIndex","handleClick","useCallback","event","clickedElement","target","_event$currentTarget","currentTarget","contains","isElementInteractive","rowClick","original","handleClickCapture","requestAnimationFrame","rowActive","setRowActiveIndex","isEnabled","rowActiveIndex","undefined","onClickCapture","onClick","rowDrag","draggable","dragging","isDraggedOver","dropTargetProps","useDropTarget","_tableMeta$rowDrop$ha","_tableMeta$rowDrop","rowDrop","handleDrop","call","onDragEnter","onDragLeave","onDragOver","onDrop","enableGrouping","getIsGrouped","enableRowSelection","getIsSelected","getIsAllSubRowsSelected","expandedRow","rowExpansion","getIsExpanded","_tableMeta$rowExpansi","_tableMeta$rowExpansi2","_tableMeta$rowExpansi3","rowExpansionRenderer","rowMeta","_meta","layout","ref","useRef","expansionRef","isExpanded","useSetVirtualisedRowHeight","current","className","cn","getVisibleCells","map","cell","cellIndex","Cell","key","renderer","rowEl","expansionEl","useEffect","height","getBoundingClientRect"],"mappings":";;;;;;MAWaA,UAAU,gBAAGC,cAAK,CAACC,IAAI,CAAC,SAASF,UAAUA,CAAkBG,KAA6B;EACnG,MAAM;IAAEC,QAAQ;IAAEC,YAAY,EAAEC,YAAY;IAAEC,KAAK;IAAEC,UAAU;IAAEC,GAAG;IAAEC,KAAK;IAAE,GAAGC;GAAiB,GAAGR,KAAK;EACzG,MAAMS,SAAS,GAAGF,KAAK,CAACG,OAAO,CAACC,IAA6B;EAE7D,MAAMC,UAAU,GAAQ;IACpB,GAAGJ,eAAe;IAClB,aAAa,EAAEF,GAAG,CAACO,EAAE;IACrB,gBAAgB,EAAET,KAAK;IACvBU,QAAQ,EAAE,CAAC;GACd;EAED,MAAMC,WAAW,GAAGjB,cAAK,CAACkB,WAAW,CAChCC,KAA4C;;IACzC,MAAMC,cAAc,GAAGD,KAAK,CAACE,MAAqB;IAElD,IAAI,GAAAC,oBAAA,GAACH,KAAK,CAACI,aAAa,cAAAD,oBAAA,eAAnBA,oBAAA,CAAqBE,QAAQ,CAACL,KAAK,CAACE,MAAqB,CAAC,KAA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BAAqB,EAAE,CAACD,MAAM;MAEnD,IAAIf,UAAU,IAAIa,WAAW,EAAE;QAC3B5E,UAAU,CAAC8E,MAAM,EAAEF,WAAW,CAACG,qBAAqB,EAAE,CAACD,MAAM,CAAC;OACjE,MAAM;QACH9E,UAAU,CAAC8E,MAAM,CAAC;;;GAG7B,EAAE,CAACf,UAAU,EAAEY,KAAK,EAAEC,WAAW,CAAC,CAAC;AACxC;;;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SkeletonRow.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.tsx"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta, Row as ReactTableRow } from '@tanstack/react-table';\nimport { useInView } from 'react-intersection-observer';\n\nexport type RowProps<TType = unknown> = {\n index: number;\n row: ReactTableRow<TType>;\n table: ReactTable<TType>;\n};\n\nexport function SkeletonRow<TType = unknown>(props: RowProps<TType>) {\n const { index, row, table } = props;\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n\n if (tableMeta.server.isEnabled) {\n return <RowWithServerLoading {...props} index={index} />;\n }\n\n return <Skeleton id={row.id} cells={row.getVisibleCells()} />;\n}\n\nexport function RowWithServerLoading<TType = unknown>(props: RowProps<TType>) {\n const { index, row, table } = props;\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n\n const pageIndex = (Math.floor(index / tableMeta.server.pageSize) * tableMeta.server.pageSize) / tableMeta.server.pageSize;\n\n const { ref, inView } = useInView({\n threshold: 0,\n triggerOnce: true,\n initialInView: pageIndex === 0,\n });\n\n React.useEffect(() => {\n if (inView) {\n tableMeta.server.loadPage?.(\n pageIndex,\n table.getState().sorting,\n table.getState().columnFilters,\n table.getState().globalFilter\n );\n }\n }, [inView]);\n\n return <Skeleton cells={row.getVisibleCells()} ref={ref} />;\n}\n\nexport const Skeleton = React.forwardRef(function Skeleton(props: any, ref: React.Ref<HTMLTableRowElement>) {\n const { cells } = props;\n\n return (\n <>\n <tr ref={ref}>\n {cells.map(cell => (\n <td key={cell.id}>\n <span className=\"bg-grey-100 text-grey-700 h-4 w-full text-center text-xs\" />\n </td>\n ))}\n </tr>\n </>\n );\n});\n"],"names":["SkeletonRow","props","index","row","table","tableMeta","options","meta","server","isEnabled","React","RowWithServerLoading","Skeleton","id","cells","getVisibleCells","pageIndex","Math","floor","pageSize","ref","inView","useInView","threshold","triggerOnce","initialInView","useEffect","_tableMeta$server$loa","_tableMeta$server","loadPage","call","getState","sorting","columnFilters","globalFilter","forwardRef","map","cell","key","className"],"mappings":";;;SAUgBA,WAAWA,CAAkBC,KAAsB;EAC/D,MAAM;IAAEC,KAAK;IAAEC,GAAG;IAAEC;GAAO,GAAGH,KAAK;EACnC,MAAMI,SAAS,GAAGD,KAAK,CAACE,OAAO,CAACC,IAA6B;EAE7D,IAAIF,SAAS,CAACG,MAAM,CAACC,SAAS,EAAE;IAC5B,oBAAOC,6BAACC,oBAAoB,oBAAKV,KAAK;MAAEC,KAAK,EAAEA;OAAS;;EAG5D,oBAAOQ,6BAACE,QAAQ;IAACC,EAAE,EAAEV,GAAG,CAACU,EAAE;IAAEC,KAAK,EAAEX,GAAG,CAACY,eAAe;IAAM;AACjE;SAEgBJ,oBAAoBA,CAAkBV,KAAsB;EACxE,MAAM;IAAEC,KAAK;IAAEC,GAAG;IAAEC;GAAO,GAAGH,KAAK;EACnC,MAAMI,SAAS,GAAGD,KAAK,CAACE,OAAO,CAACC,IAA6B;EAE7D,MAAMS,SAAS,GAAIC,IAAI,CAACC,KAAK,CAAChB,KAAK,GAAGG,SAAS,CAACG,MAAM,CAACW,QAAQ,CAAC,GAAGd,SAAS,CAACG,MAAM,CAACW,QAAQ,GAAId,SAAS,CAACG,MAAM,CAACW,QAAQ;EAEzH,MAAM;IAAEC,GAAG;IAAEC;GAAQ,GAAGC,SAAS,CAAC;IAC9BC,SAAS,EAAE,CAAC;IACZC,WAAW,EAAE,IAAI;IACjBC,aAAa,EAAET,SAAS,KAAK;GAChC,CAAC;EAEFN,cAAK,CAACgB,SAAS,CAAC;IACZ,IAAIL,MAAM,EAAE;MAAA,IAAAM,qBAAA,EAAAC,iBAAA;MACR,CAAAD,qBAAA,IAAAC,iBAAA,GAAAvB,SAAS,CAACG,MAAM,EAACqB,QAAQ,cAAAF,qBAAA,uBAAzBA,qBAAA,CAAAG,IAAA,CAAAF,iBAAA,EACIZ,SAAS,EACTZ,KAAK,CAAC2B,QAAQ,EAAE,CAACC,OAAO,EACxB5B,KAAK,CAAC2B,QAAQ,EAAE,CAACE,aAAa,EAC9B7B,KAAK,CAAC2B,QAAQ,EAAE,CAACG,YAAY,CAChC;;GAER,EAAE,CAACb,MAAM,CAAC,CAAC;EAEZ,oBAAOX,6BAACE,QAAQ;IAACE,KAAK,EAAEX,GAAG,CAACY,eAAe,EAAE;IAAEK,GAAG,EAAEA;IAAO;AAC/D;MAEaR,QAAQ,gBAAGF,cAAK,CAACyB,UAAU,CAAC,SAASvB,QAAQA,CAACX,KAAU,EAAEmB,GAAmC;EACtG,MAAM;IAAEN;GAAO,GAAGb,KAAK;EAEvB,oBACIS,yEACIA;IAAIU,GAAG,EAAEA;KACJN,KAAK,CAACsB,GAAG,CAACC,IAAI,mBACX3B;IAAI4B,GAAG,EAAED,IAAI,CAACxB;kBACVH;IAAM6B,SAAS,EAAC;IAA6D,CAC5E,CACR,CAAC,CACD,CACN;AAEX,CAAC;;;;"}
@@ -1,23 +1,29 @@
1
1
  import React__default from 'react';
2
+ import { SkeletonRow } from './BuiltIns/SkeletonRow.js';
2
3
  import { RowContext } from './RowContext.js';
3
- import { SkeletonRow } from './SkeletonRow.js';
4
- import { DisplayRow } from './DisplayRow.js';
5
4
 
6
5
  /* anonymous functions will break the memoisation on each render, wrap handlers in callbacks */
7
6
  function Row(props) {
8
- // context - it must be here for cells to read it, since they render alongside the row
9
- const [isHovered, setIsHovered] = React__default.useState(false);
7
+ const {
8
+ renderer: RowRenderer,
9
+ cellRenderer: CellRenderer,
10
+ ...displayRowProps
11
+ } = props;
12
+ const tableMeta = props.table.options.meta;
13
+ const isHovered = tableMeta.rowActive.rowHoverIndex === props.index;
14
+ // context - it must be here for cells to read it, since they render alongside the row inside DisplayRow
10
15
  const contextValue = React__default.useMemo(() => ({
11
16
  isHovered,
12
- setIsHovered,
13
17
  rowIndex: props.index
14
- }), [isHovered]);
18
+ }), [isHovered, props.index]);
15
19
  if (props.row.original === undefined) {
16
20
  return /*#__PURE__*/React__default.createElement(SkeletonRow, Object.assign({}, props));
17
21
  }
18
22
  return /*#__PURE__*/React__default.createElement(RowContext.Provider, {
19
23
  value: contextValue
20
- }, /*#__PURE__*/React__default.createElement(DisplayRow, Object.assign({}, props)));
24
+ }, /*#__PURE__*/React__default.createElement(RowRenderer, Object.assign({}, displayRowProps, {
25
+ cellRenderer: CellRenderer
26
+ })));
21
27
  }
22
28
 
23
29
  export { Row };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Row.js","sources":["../../../../../../../../../../src/primitives/Table/Core/components/Row/Row.tsx"],"sourcesContent":["import React from 'react';\nimport { TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { SkeletonRow } from './BuiltIns/SkeletonRow';\nimport { RowContext } from './RowContext';\nimport { TableRowRenderer, TableRowRendererProps } from '../../types';\n\nexport type RowProps<TType = unknown> = React.HTMLAttributes<HTMLTableRowElement> &\n TableRowRendererProps<TType> & {\n renderer: TableRowRenderer<TType>;\n };\n\n/* anonymous functions will break the memoisation on each render, wrap handlers in callbacks */\nexport function Row<TType = unknown>(props: RowProps<TType>) {\n const { renderer: RowRenderer, cellRenderer: CellRenderer, ...displayRowProps } = props;\n\n const tableMeta = props.table.options.meta as ReactTableMeta<TType>;\n const isHovered = tableMeta.rowActive.rowHoverIndex === props.index;\n // context - it must be here for cells to read it, since they render alongside the row inside DisplayRow\n const contextValue = React.useMemo(() => ({ isHovered, rowIndex: props.index }), [isHovered, props.index]);\n\n if (props.row.original === undefined) {\n return <SkeletonRow {...props} />;\n }\n\n return (\n <RowContext.Provider value={contextValue}>\n <RowRenderer<TType> {...displayRowProps} cellRenderer={CellRenderer} />\n </RowContext.Provider>\n );\n}\n"],"names":["Row","props","renderer","RowRenderer","cellRenderer","CellRenderer","displayRowProps","tableMeta","table","options","meta","isHovered","rowActive","rowHoverIndex","index","contextValue","React","useMemo","rowIndex","row","original","undefined","SkeletonRow","RowContext","Provider","value"],"mappings":";;;;AAWA;SACgBA,GAAGA,CAAkBC,KAAsB;EACvD,MAAM;IAAEC,QAAQ,EAAEC,WAAW;IAAEC,YAAY,EAAEC,YAAY;IAAE,GAAGC;GAAiB,GAAGL,KAAK;EAEvF,MAAMM,SAAS,GAAGN,KAAK,CAACO,KAAK,CAACC,OAAO,CAACC,IAA6B;EACnE,MAAMC,SAAS,GAAGJ,SAAS,CAACK,SAAS,CAACC,aAAa,KAAKZ,KAAK,CAACa,KAAK;;EAEnE,MAAMC,YAAY,GAAGC,cAAK,CAACC,OAAO,CAAC,OAAO;IAAEN,SAAS;IAAEO,QAAQ,EAAEjB,KAAK,CAACa;GAAO,CAAC,EAAE,CAACH,SAAS,EAAEV,KAAK,CAACa,KAAK,CAAC,CAAC;EAE1G,IAAIb,KAAK,CAACkB,GAAG,CAACC,QAAQ,KAAKC,SAAS,EAAE;IAClC,oBAAOL,6BAACM,WAAW,oBAAKrB,KAAK,EAAI;;EAGrC,oBACIe,6BAACO,UAAU,CAACC,QAAQ;IAACC,KAAK,EAAEV;kBACxBC,6BAACb,WAAW,oBAAYG,eAAe;IAAEF,YAAY,EAAEC;KAAgB,CACrD;AAE9B;;;;"}
@@ -2,7 +2,6 @@ import React__default from 'react';
2
2
 
3
3
  const RowContext = /*#__PURE__*/React__default.createContext({
4
4
  isHovered: false,
5
- setIsHovered: () => undefined,
6
5
  rowIndex: -1
7
6
  });
8
7
 
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RowContext.js","sources":["../../../../../../../../../../src/primitives/Table/Core/components/Row/RowContext.tsx"],"sourcesContent":["import React from 'react';\n\ntype RowContextValue = {\n isHovered: boolean;\n rowIndex: number;\n};\n\nexport const RowContext = React.createContext<RowContextValue>({\n isHovered: false,\n rowIndex: -1,\n});\n"],"names":["RowContext","React","createContext","isHovered","rowIndex"],"mappings":";;MAOaA,UAAU,gBAAGC,cAAK,CAACC,aAAa,CAAkB;EAC3DC,SAAS,EAAE,KAAK;EAChBC,QAAQ,EAAE,CAAC;CACd;;;;"}
@@ -0,0 +1,54 @@
1
+ import React__default from 'react';
2
+ import { Group } from '../../../../../components/Group/Group.js';
3
+ import { Search } from './components/Search/Search.js';
4
+ import { Settings } from './components/Settings/Settings.js';
5
+ import { Print } from './components/Print/Print.js';
6
+ import { Filters } from './components/Filters/Filters.js';
7
+
8
+ function TableToolbar(props) {
9
+ const {
10
+ children: customTools,
11
+ table,
12
+ ...attributes
13
+ } = props;
14
+ if (!isToolbarVisible(table, !!customTools)) {
15
+ return null;
16
+ }
17
+ const canFilter = table.instance.options.enableColumnFilters;
18
+ const canPrint = table.meta.printing.isEnabled;
19
+ const canSettings = canChangeSettings(table.instance, table.props.customSettings);
20
+ const canSearch = table.meta.search.isEnabled;
21
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", Object.assign({}, attributes, {
22
+ className: "mb-4 flex flex-shrink flex-grow-0 flex-wrap gap-2 print:hidden",
23
+ "data-taco": "table-toolbar"
24
+ }), table.props.toolbarLeft, /*#__PURE__*/React__default.createElement(Group, {
25
+ className: "ml-auto flex-shrink-0 items-center print:hidden"
26
+ }, customTools, canFilter ? /*#__PURE__*/React__default.createElement(Filters, {
27
+ length: table.meta.length,
28
+ table: table.instance
29
+ }) : null, table.props.toolbarRight, canPrint ? /*#__PURE__*/React__default.createElement(Print, {
30
+ table: table.instance,
31
+ tableId: table.id,
32
+ tableRef: table.ref
33
+ }) : null, canSettings ? /*#__PURE__*/React__default.createElement(Settings, {
34
+ customSettings: table.props.customSettings,
35
+ table: table.instance
36
+ }) : null, canSearch ? ( /*#__PURE__*/React__default.createElement(Search, {
37
+ scrollToIndex: table.renderer.scrollToIndex,
38
+ table: table.instance,
39
+ tableRef: table.ref
40
+ })) : null)), table.props.toolbarPanel ? /*#__PURE__*/React__default.createElement("div", {
41
+ className: "mb-4"
42
+ }, table.props.toolbarPanel) : undefined);
43
+ }
44
+ function canChangeSettings(table, customSettings) {
45
+ const tableMeta = table.options.meta;
46
+ return table.options.enableHiding || tableMeta.columnOrdering.isEnabled || tableMeta.fontSize.isEnabled || tableMeta.rowHeight.isEnabled || typeof customSettings === 'function';
47
+ }
48
+ function isToolbarVisible(table, customTools) {
49
+ const hasInternalToolbar = customTools || table.instance.options.enableColumnFilters || table.meta.printing.isEnabled || canChangeSettings(table.instance, table.props.customSettings) || table.meta.search.isEnabled;
50
+ return hasInternalToolbar || !!table.props.toolbarLeft || !!table.props.toolbarRight;
51
+ }
52
+
53
+ export { TableToolbar };
54
+ //# sourceMappingURL=Toolbar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toolbar.js","sources":["../../../../../../../../../../src/primitives/Table/Core/components/Toolbar/Toolbar.tsx"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { Group } from '../../../../../components/Group/Group';\nimport { Search } from './components/Search/Search';\nimport { Settings } from './components/Settings/Settings';\nimport { Print } from './components/Print/Print';\nimport { Filters } from './components/Filters/Filters';\nimport { TableCustomSettingsRenderer } from '../../../types';\nimport { useTableReturnValue } from '../../useTable';\n\nexport type TableToolbarProps<TType = unknown> = React.HTMLAttributes<HTMLDivElement> & {\n children?: JSX.Element | null;\n table: useTableReturnValue<TType>;\n};\n\nexport function TableToolbar<TType = unknown>(props: TableToolbarProps<TType>) {\n const { children: customTools, table, ...attributes } = props;\n\n if (!isToolbarVisible<TType>(table, !!customTools)) {\n return null;\n }\n\n const canFilter = table.instance.options.enableColumnFilters;\n const canPrint = table.meta.printing.isEnabled;\n const canSettings = canChangeSettings(table.instance, table.props.customSettings);\n const canSearch = table.meta.search.isEnabled;\n\n return (\n <>\n <div\n {...attributes}\n className=\"mb-4 flex flex-shrink flex-grow-0 flex-wrap gap-2 print:hidden\"\n data-taco=\"table-toolbar\">\n {table.props.toolbarLeft}\n <Group className=\"ml-auto flex-shrink-0 items-center print:hidden\">\n {customTools}\n {canFilter ? <Filters length={table.meta.length} table={table.instance} /> : null}\n {table.props.toolbarRight}\n {canPrint ? <Print table={table.instance} tableId={table.id} tableRef={table.ref} /> : null}\n {canSettings ? <Settings customSettings={table.props.customSettings} table={table.instance} /> : null}\n {canSearch ? (\n <Search scrollToIndex={table.renderer.scrollToIndex} table={table.instance} tableRef={table.ref} />\n ) : null}\n </Group>\n </div>\n {table.props.toolbarPanel ? <div className=\"mb-4\">{table.props.toolbarPanel}</div> : undefined}\n </>\n );\n}\n\nfunction canChangeSettings<TType = unknown>(table: ReactTable<TType>, customSettings?: TableCustomSettingsRenderer) {\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n\n return (\n table.options.enableHiding ||\n tableMeta.columnOrdering.isEnabled ||\n tableMeta.fontSize.isEnabled ||\n tableMeta.rowHeight.isEnabled ||\n typeof customSettings === 'function'\n );\n}\n\nfunction isToolbarVisible<TType = unknown>(table: useTableReturnValue<TType>, customTools: boolean) {\n const hasInternalToolbar =\n customTools ||\n table.instance.options.enableColumnFilters ||\n table.meta.printing.isEnabled ||\n canChangeSettings(table.instance, table.props.customSettings) ||\n table.meta.search.isEnabled;\n\n return hasInternalToolbar || !!table.props.toolbarLeft || !!table.props.toolbarRight;\n}\n"],"names":["TableToolbar","props","children","customTools","table","attributes","isToolbarVisible","canFilter","instance","options","enableColumnFilters","canPrint","meta","printing","isEnabled","canSettings","canChangeSettings","customSettings","canSearch","search","React","className","toolbarLeft","Group","Filters","length","toolbarRight","Print","tableId","id","tableRef","ref","Settings","Search","scrollToIndex","renderer","toolbarPanel","undefined","tableMeta","enableHiding","columnOrdering","fontSize","rowHeight","has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ACa,MAAM;IAACC,aAAa,EAAE9B,KAAK,CAAC+B,QAAQ,CAACD,aAAa;IAAE9B,KAAK,EAAEA,KAAK,CAACI,QAAQ;IAAEsB,QAAQ,EAAE1B,KAAK,CAAC2B;IAAO,IACnG,IAAI,CACJ,CACN,EACL3B,KAAK,CAACH,KAAK,CAACmC,YAAY,gBAAGhB;IAAKC,SAAS,EAAC;KAAQjB,KAAK,CAACH,KAAK,CAACmC,YAAY,CAAO,GAAGC,SAAS,CAC/F;AAEX;AAEA,SAASrB,iBAAiBA,CAAkBZ,KAAwB,EAAEa,cAA4C;EAC9G,MAAMqB,SAAS,GAAGlC,KAAK,CAACK,OAAO,CAACG,IAA6B;EAE7D,OACIR,KAAK,CAACK,OAAO,CAAC8B,YAAY,IAC1BD,SAAS,CAACE,cAAc,CAAC1B,SAAS,IAClCwB,SAAS,CAACG,QAAQ,CAAC3B,SAAS,IAC5BwB,SAAS,CAACI,SAAS,CAAC5B,SAAS,IAC7B,OAAOG,cAAc,KAAK,UAAU;AAE5C;AAEA,SAASX,gBAAgBA,CAAkBF,KAAiC,EAAED,WAAoB;EAC9F,MAAMwC,kBAAkB,GACpBxC,WAAW,IACXC,KAAK,CAACI,QAAQ,CAACC,OAAO,CAACC,mBAAmB,IAC1CN,KAAK,CAACQ,IAAI,CAACC,QAAQ,CAACC,SAAS,IAC7BE,iBAAiB,CAACZ,KAAK,CAACI,QAAQ,EAAEJ,KAAK,CAACH,KAAK,CAACgB,cAAc,CAAC,IAC7Db,KAAK,CAACQ,IAAI,CAACO,MAAM,CAACL,SAAS;EAE/B,OAAO6B,kBAAkB,IAAI,CAAC,CAACvC,KAAK,CAACH,KAAK,CAACqB,WAAW,IAAI,CAAC,CAAClB,KAAK,CAACH,KAAK,CAACyB,YAAY;AACxF;;;;"}
@@ -1,10 +1,10 @@
1
1
  import React__default from 'react';
2
- import { Icon } from '../../../../../Icon/Icon.js';
3
- import { IconButton } from '../../../../../IconButton/IconButton.js';
4
- import { useLocalization } from '../../../../../Provider/Localization.js';
5
- import { Button } from '../../../../../Button/Button.js';
6
- import { Shortcut } from '../../../../../Shortcut/Shortcut.js';
7
- import { useIsLargeScreen } from '../../../../../../hooks/useIsLargeScreen.js';
2
+ import { Icon } from '../../../../../../../components/Icon/Icon.js';
3
+ import { IconButton } from '../../../../../../../components/IconButton/IconButton.js';
4
+ import { useLocalization } from '../../../../../../../components/Provider/Localization.js';
5
+ import { Button } from '../../../../../../../components/Button/Button.js';
6
+ import { Shortcut } from '../../../../../../../components/Shortcut/Shortcut.js';
7
+ import { useIsLargeScreen } from '../../../../../../../hooks/useIsLargeScreen.js';
8
8
  import { isEmptyFilter } from './util.js';
9
9
  import { ManageFiltersPopover } from './ManageFiltersPopover.js';
10
10
 
@@ -26,7 +26,7 @@ function Filters(props) {
26
26
  shift: true
27
27
  };
28
28
  const buttonProps = {
29
- 'aria-label': texts.table3.filters.tooltip,
29
+ 'aria-label': texts.table.filters.tooltip,
30
30
  className: appliedFilters.length ? '!wcag-blue-100' : undefined,
31
31
  popover: popoverProps => /*#__PURE__*/React__default.createElement(ManageFiltersPopover, Object.assign({}, popoverProps, {
32
32
  length: length,
@@ -34,7 +34,7 @@ function Filters(props) {
34
34
  })),
35
35
  shortcut,
36
36
  ref,
37
- tooltip: ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, texts.table3.filters.tooltip, /*#__PURE__*/React__default.createElement(Shortcut, {
37
+ tooltip: ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, texts.table.filters.tooltip, /*#__PURE__*/React__default.createElement(Shortcut, {
38
38
  className: "ml-2",
39
39
  keys: shortcut
40
40
  })))
@@ -55,7 +55,7 @@ function Filters(props) {
55
55
  return /*#__PURE__*/React__default.createElement(Button, Object.assign({}, buttonProps), /*#__PURE__*/React__default.createElement(Icon, {
56
56
  className: !isLargeScreen ? '-mr-1.5' : undefined,
57
57
  name: appliedFilters.length ? 'filter-solid' : 'filter'
58
- }), isLargeScreen ? texts.table3.filters.button : '', appliedFilters.length ? `(${appliedFilters.length})` : '');
58
+ }), isLargeScreen ? texts.table.filters.button : '', appliedFilters.length ? `(${appliedFilters.length})` : '');
59
59
  }
60
60
 
61
61
  export { Filters };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Filters.js","sources":["../../../../../../../../../../../../src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.tsx"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable } from '@tanstack/react-table';\nimport { useIsLargeScreen } from '../../../../../../../hooks/useIsLargeScreen';\nimport { useLocalization } from '../../../../../../../components/Provider/Localization';\nimport { IconButton } from '../../../../../../../components/IconButton/IconButton';\nimport { Button } from '../../../../../../../components/Button/Button';\nimport { Icon } from '../../../../../../../components/Icon/Icon';\nimport { Shortcut } from '../../../../../../../components/Shortcut/Shortcut';\nimport { ManageFiltersPopover } from './ManageFiltersPopover';\nimport { TableFilter } from '../../../../../types';\nimport { isEmptyFilter } from './util';\n\nexport type FiltersProps<TType = unknown> = {\n length: number;\n table: ReactTable<TType>;\n};\n\nexport function Filters<TType = unknown>(props: FiltersProps<TType>) {\n const { length, table } = props;\n const { texts } = useLocalization();\n const isLargeScreen = useIsLargeScreen();\n const columnFilters = table.getState().columnFilters as TableFilter[];\n const appliedFilters = columnFilters.filter(f => !isEmptyFilter(f));\n const ref = React.useRef<HTMLButtonElement>(null);\n\n const shortcut = { key: 'f', meta: true, shift: true };\n\n const buttonProps = {\n 'aria-label': texts.table.filters.tooltip,\n className: appliedFilters.length ? '!wcag-blue-100' : undefined,\n popover: popoverProps => <ManageFiltersPopover {...popoverProps} length={length} table={table} />,\n shortcut,\n ref,\n tooltip: (\n <>\n {texts.table.filters.tooltip}\n <Shortcut className=\"ml-2\" keys={shortcut} />\n </>\n ),\n };\n\n React.useEffect(() => {\n const emptyFilter = columnFilters.find(isEmptyFilter);\n\n // we set an empty filter when adding a filter through a column header.\n if (emptyFilter) {\n ref.current?.click();\n }\n }, [columnFilters]);\n\n if (!isLargeScreen && !appliedFilters.length) {\n return <IconButton {...buttonProps} icon=\"filter\" />;\n }\n\n return (\n <Button {...buttonProps}>\n <Icon className={!isLargeScreen ? '-mr-1.5' : undefined} name={appliedFilters.length ? 'filter-solid' : 'filter'} />\n {isLargeScreen ? texts.table.filters.button : ''}\n {appliedFilters.length ? `(${appliedFilters.length})` : ''}\n </Button>\n );\n}\n"],"names":["Filters","props","length","table","texts","useLocalization","isLargeScreen","useIsLargeScreen","columnFilters","getState","appliedFilters","filter","f","isEmptyFilter","ref","React","useRef","shortcut","key","meta","shift","buttonProps","filters","tooltip","className","undefined","popover","popoverProps","ManageFiltersPopover","Shortcut","keys","useEffect","emptyFilter","find","_ref$current","current","click","IconButton","icon","Button","Icon","name","button"],"mappings":";;;;;;;;;;SAiBgBA,OAAOA,CAAkBC,KAA0B;EAC/D,MAAM;IAAEC,MAAM;IAAEC;GAAO,GAAGF,KAAK;EAC/B,MAAM;IAAEG;GAAO,GAAGC,eAAe,EAAE;EACnC,MAAMC,aAAa,GAAGC,gBAAgB,EAAE;EACxC,MAAMC,aAAa,GAAGL,KAAK,CAACM,QAAQ,EAAE,CAACD,aAA8B;EACrE,MAAME,cAAc,GAAGF,aAAa,CAACG,MAAM,CAACC,CAAC,IAAI,CAACC,aAAa,CAACD,CAAC,CAAC,CAAC;EACnE,MAAME,GAAG,GAAGC,cAAK,CAACC,MAAM,CAAoB,IAAI,CAAC;EAEjD,MAAMC,QAAQ,GAAG;IAAEC,GAAG,EAAE,GAAG;IAAEC,IAAI,EAAE,IAAI;IAAEC,KAAK,EAAE;GAAM;EAEtD,MAAMC,WAAW,GAAG;IAChB,YAAY,EAAEjB,KAAK,CAACD,KAAK,CAACmB,OAAO,CAACC,OAAO;IACzCC,SAAS,EAAEd,cAAc,CAACR,MAAM,GAAG,gBAAgB,GAAGuB,SAAS;IAC/DC,OAAO,EAAEC,YAAY,iBAAIZ,6BAACa,oBAAoB,oBAAKD,YAAY;MAAEzB,MAAM,EAAEA,MAAM;MAAEC,KAAK,EAAEA;OAAS;IACjGc,QAAQ;IACRH,GAAG;IACHS,OAAO,iBACHR,4DACKX,KAAK,CAACD,KAAK,CAACmB,OAAO,CAACC,OAAO,eAC5BR,6BAACc,QAAQ;MAACL,SAAS,EAAC,MAAM;MAACM,IAAI,EAAEb;MAAY,CAC9C;GAEV;EAEDF,cAAK,CAACgB,SAAS,CAAC;IACZ,MAAMC,WAAW,GAAGxB,aAAa,CAACyB,IAAI,CAACpB,aAAa,CAAC;;IAGrD,IAAImB,WAAW,EAAE;MAAA,IAAAE,YAAA;MACb,CAAAA,YAAA,GAAApB,GAAG,CAACqB,OAAO,cAAAD,YAAA,uBAAXA,YAAA,CAAaE,KAAK,EAAE;;GAE3B,EAAE,CAAC5B,aAAa,CAAC,CAAC;EAEnB,IAAI,CAACF,aAAa,IAAI,CAACI,cAAc,CAACR,MAAM,EAAE;IAC1C,oBAAOa,6BAACsB,UAAU,oBAAKhB,WAAW;MAAEiB,IAAI,EAAC;OAAW;;EAGxD,oBACIvB,6BAACwB,MAAM,oBAAKlB,WAAW,gBACnBN,6BAACyB,IAAI;IAAChB,SAAS,EAAE,CAAClB,aAAa,GAAG,SAAS,GAAGmB,SAAS;IAAEgB,IAAI,EAAE/B,cAAc,CAACR,MAAM,GAAG,cAAc,GAAG;IAAY,EACnHI,aAAa,GAAGF,KAAK,CAACD,KAAK,CAACmB,OAAO,CAACoB,MAAM,GAAG,EAAE,EAC/ChC,cAAc,CAACR,MAAM,OAAOQ,cAAc,CAACR,SAAS,GAAG,EAAE,CACrD;AAEjB;;;;"}
@@ -1,10 +1,10 @@
1
1
  import React__default from 'react';
2
- import { useLocalization } from '../../../../../Provider/Localization.js';
3
- import { Button } from '../../../../../Button/Button.js';
4
- import { Popover } from '../../../../../Popover/Popover.js';
5
- import { Group } from '../../../../../Group/Group.js';
6
- import { isInternalColumn } from '../../../../../../primitives/Table/useTableManager/util/columns.js';
7
- import { TableFilterComparator } from '../../../../../../primitives/Table/types.js';
2
+ import { useLocalization } from '../../../../../../../components/Provider/Localization.js';
3
+ import { Button } from '../../../../../../../components/Button/Button.js';
4
+ import { Popover } from '../../../../../../../components/Popover/Popover.js';
5
+ import { Group } from '../../../../../../../components/Group/Group.js';
6
+ import { isInternalColumn } from '../../../../../useTableManager/util/columns.js';
7
+ import { TableFilterComparator } from '../../../../../types.js';
8
8
  import { sortByHeader, isEmptyFilter } from './util.js';
9
9
  import { Filter } from './components/Filter.js';
10
10
 
@@ -98,9 +98,9 @@ function ManageFiltersPopover(props) {
98
98
  className: "flex w-full items-center gap-2"
99
99
  }, /*#__PURE__*/React__default.createElement("h4", {
100
100
  className: "mb-0 inline-flex"
101
- }, texts.table3.filters.button), /*#__PURE__*/React__default.createElement("p", {
101
+ }, texts.table.filters.button), /*#__PURE__*/React__default.createElement("p", {
102
102
  className: "text-grey-700 mb-0 mr-auto mt-px inline-flex"
103
- }, texts.table3.filters.total.replace('[CURRENT]', new Intl.NumberFormat(locale).format(table.getFilteredRowModel().rows.length)).replace('[TOTAL]', new Intl.NumberFormat(locale).format(length))))), /*#__PURE__*/React__default.createElement("div", {
103
+ }, texts.table.filters.total.replace('[CURRENT]', new Intl.NumberFormat(locale).format(table.getFilteredRowModel().rows.length)).replace('[TOTAL]', new Intl.NumberFormat(locale).format(length))))), /*#__PURE__*/React__default.createElement("div", {
104
104
  className: "flex flex-col gap-2"
105
105
  }, filters.map((filter, index) => ( /*#__PURE__*/React__default.createElement(Filter, {
106
106
  key: `filter_${index}`,
@@ -115,7 +115,7 @@ function ManageFiltersPopover(props) {
115
115
  }, /*#__PURE__*/React__default.createElement(Button, {
116
116
  appearance: "discrete",
117
117
  onClick: handleCreate
118
- }, "+ ", texts.table3.filters.buttons.addFilter))), /*#__PURE__*/React__default.createElement(Group, {
118
+ }, "+ ", texts.table.filters.buttons.addFilter))), /*#__PURE__*/React__default.createElement(Group, {
119
119
  className: "ml-auto"
120
120
  }, /*#__PURE__*/React__default.createElement(Popover.Close, null, /*#__PURE__*/React__default.createElement(Button, null, "Cancel")), /*#__PURE__*/React__default.createElement(Button, {
121
121
  onClick: handleClear
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManageFiltersPopover.js","sources":["../../../../../../../../../../../../src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.tsx"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable } from '@tanstack/react-table';\nimport { Popover } from '../../../../../../../components/Popover/Popover';\nimport { useLocalization } from '../../../../../../../components/Provider/Localization';\nimport { Button } from '../../../../../../../components/Button/Button';\nimport { Group } from '../../../../../../../components/Group/Group';\nimport { isEmptyFilter, sortByHeader } from './util';\nimport { isInternalColumn } from '../../../../../useTableManager/util/columns';\nimport { TableFilter, TableFilterComparator, TableFilterValue } from '../../../../../types';\nimport { Filter } from './components/Filter';\n\nexport type ManageFiltersPopoverProps<TType = unknown> = {\n length: number;\n table: ReactTable<TType>;\n};\n\nconst placeholderFilter: TableFilter = { id: '', value: { comparator: TableFilterComparator.Contains, value: undefined } };\n\nexport function ManageFiltersPopover<TType = unknown>(props: ManageFiltersPopoverProps<TType>) {\n const { length, table, ...popoverProps } = props;\n const { locale, texts } = useLocalization();\n\n const allColumns = table\n .getAllLeafColumns()\n .filter(column => !isInternalColumn(column.id))\n .sort(sortByHeader);\n\n const columnFilters = table.getState().columnFilters as TableFilter[];\n\n // state, since we \"apply\" filters - our filter values have a special shape, so we force to our type\n const [filters, setFilters] = React.useState<TableFilter[]>(columnFilters.length ? columnFilters : [placeholderFilter]);\n\n // this runs if filters are set outside (e.g. through column header)\n React.useEffect(() => {\n setFilters(columnFilters.length === 0 ? [placeholderFilter] : columnFilters);\n\n // focus the filter value, as we preset the column/comparator.\n requestAnimationFrame(() => {\n const filterValues = document.querySelectorAll('[data-query-selector=\"filter-value\"]');\n const lastFilter = filterValues.length ? filterValues[filterValues.length - 1] : undefined;\n\n (lastFilter as HTMLElement)?.focus();\n });\n }, [columnFilters]);\n\n // filters\n const handleChangeFilter = (position: number, filter: { id: string; value: TableFilterValue }) => {\n setFilters(currentFilters => {\n return currentFilters.map((current, index) => {\n if (index === position) {\n return filter;\n }\n return current;\n });\n });\n };\n\n const handleRemoveFilter = position => {\n if (filters.length === 1) {\n setFilters([placeholderFilter]);\n return;\n }\n\n setFilters(currentFilters => currentFilters.filter((_, index) => index !== position));\n };\n\n const handleCreate = () => {\n setFilters(filters.concat(placeholderFilter));\n };\n\n //\n const handleApply = () => {\n table.setColumnFilters(() => {\n const newFilters = filters.filter(f => {\n if (f.id === null || f.id === '') {\n return false;\n }\n\n const controlRenderer = allColumns.find(c => c.id === f.id)?.columnDef.meta?.control;\n\n if (\n f.value.comparator === TableFilterComparator.IsEmpty ||\n f.value.comparator === TableFilterComparator.IsNotEmpty ||\n controlRenderer === 'switch'\n ) {\n return true;\n }\n\n return !!f.value.value;\n });\n\n return newFilters;\n });\n };\n\n const handleClear = () => {\n table.resetColumnFilters();\n setFilters([placeholderFilter]);\n };\n\n const handleClose = (open: boolean) => {\n if (!open) {\n const nonEmptyFilters = columnFilters.filter(f => !isEmptyFilter(f));\n table.setColumnFilters(nonEmptyFilters);\n setFilters(nonEmptyFilters.length === 0 ? [placeholderFilter] : nonEmptyFilters);\n }\n };\n\n return (\n <Popover {...popoverProps} onChange={handleClose}>\n <Popover.Content>\n <div className=\"flex w-[40rem] flex-col gap-4\">\n <div className=\"flex h-8\">\n <div className=\"flex w-full items-center gap-2\">\n <h4 className=\"mb-0 inline-flex\">{texts.table.filters.button}</h4>\n <p className=\"text-grey-700 mb-0 mr-auto mt-px inline-flex\">\n {texts.table.filters.total\n .replace(\n '[CURRENT]',\n new Intl.NumberFormat(locale).format(table.getFilteredRowModel().rows.length)\n )\n .replace('[TOTAL]', new Intl.NumberFormat(locale).format(length))}\n </p>\n </div>\n </div>\n <div className=\"flex flex-col gap-2\">\n {filters.map((filter, index) => (\n <Filter\n key={`filter_${index}`}\n allColumns={allColumns}\n filter={filter}\n filters={filters}\n position={index}\n onChange={handleChangeFilter}\n onRemove={\n (filters.length > 0 && filters.some(f => f.id)) || filters.length > 1\n ? handleRemoveFilter\n : undefined\n }\n />\n ))}\n <div className=\"justify-start\">\n <Button appearance=\"discrete\" onClick={handleCreate}>\n + {texts.table.filters.buttons.addFilter}\n </Button>\n </div>\n </div>\n <Group className=\"ml-auto\">\n <Popover.Close>\n <Button>Cancel</Button>\n </Popover.Close>\n <Button onClick={handleClear}>Clear</Button>\n <Button appearance=\"primary\" onClick={handleApply}>\n Apply\n </Button>\n </Group>\n </div>\n </Popover.Content>\n </Popover>\n );\n}\n"],"names":["placeholderFilter","id","value","comparator","TableFilterComparator","Contains","undefined","ManageFiltersPopover","props","length","table","popoverProps","locale","texts","useLocalization","allColumns","getAllLeafColumns","filter","column","isInternalColumn","sort","sortByHeader","columnFilters","getState","filters","setFilters","React","useState","useEffect","requestAnimationFrame","filterValues","document","querySelectorAll","lastFilter","focus","handleChangeFilter","position","currentFilters","map","current","index","handleRemoveFilter","_","handleCreate","concat","handleApply","setColumnFilters","newFilters","f","controlRenderer","_allColumns$find","find","c","_allColumns$find$colu","columnDef","meta","control","IsEmpty","IsNotEmpty","handleClear","resetColumnFilters","handleClose","open","nonEmptyFilters","isEmptyFilter","Popover","onChange","Content","className","button","total","replace","Intl","NumberFormat","format","getFilteredRowModel","rows","Filter","key","onRemove","some","Button","appearance","onClick","buttons","addFilter","Group","Close"],"mappings":";;;;;;;;;;AAgBA,MAAMA,iBAAiB,GAAgB;EAAEC,EAAE,EAAE,EAAE;EAAEC,KAAK,EAAE;IAAEC,UAAU,EAAEC,qBAAqB,CAACC,QAAQ;IAAEH,KAAK,EAAEI;;CAAa;SAE1GC,oBAAoBA,CAAkBC,KAAuC;EACzF,MAAM;IAAEC,MAAM;IAAEC,KAAK;IAAE,GAAGC;GAAc,GAAGH,KAAK;EAChD,MAAM;IAAEI,MAAM;IAAEC;GAAO,GAAGC,eAAe,EAAE;EAE3C,MAAMC,UAAU,GAAGL,KAAK,CACnBM,iBAAiB,EAAE,CACnBC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