@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 +0,0 @@
1
- {"version":3,"file":"DisplayCell.js","sources":["../../../../../../../../../../src/components/Table3/components/columns/cell/DisplayCell.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { ColumnMeta, CellContext, TableMeta } from '@tanstack/react-table';\nimport { Table3ColumnAlignment } from '../../../types';\nimport { Highlight } from './Highlight';\n\nexport type DisplayCellProps<TType = unknown> = CellContext<TType, unknown> & {\n highlighted?: boolean;\n highlightedAsCurrent?: boolean;\n children?: string | JSX.Element;\n className?: string;\n value?: any;\n};\n\nexport function DisplayCell<TType = unknown>(props: DisplayCellProps<TType>) {\n const { cell, className, column, value, index, row, table, tableRef, highlighted, highlightedAsCurrent } = props;\n const columnMeta = React.useMemo(() => column.columnDef.meta as ColumnMeta<TType, unknown>, []);\n const tableMeta = table.options.meta as TableMeta<TType>;\n\n // cells are heavily memoized because performance in our table is critical\n // be careful and selective about props that you pass to the cell\n const memoedProps = React.useMemo(() => {\n return {\n align: columnMeta.align,\n children: (props.children ?? columnMeta.renderer?.(value, row.original) ?? value ?? null) as\n | JSX.Element\n | string\n | null,\n className: cn(\n className,\n typeof columnMeta.className === 'function' ? columnMeta.className(row.original) : columnMeta.className\n ),\n data: row.original,\n debug: table.options.debugAll,\n enableTruncate: columnMeta.enableTruncate,\n // @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel\n frozenColumnIndex: tableMeta.columnFreezing.frozenColumnIndex,\n id: cell.id,\n index,\n tableRef,\n };\n // @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel\n }, [row.original, props.children, value, tableMeta.columnFreezing.frozenColumnIndex, className]);\n\n return <MemoedDisplayCell<TType> {...memoedProps} highlighted={highlighted} highlightedAsCurrent={highlightedAsCurrent} />;\n}\n\n// Memoization\nexport type MemoedDisplayCellProps<TType = unknown> = {\n align?: Table3ColumnAlignment;\n children: JSX.Element | string | null;\n className?: string;\n data: TType;\n debug?: boolean;\n enableTruncate?: boolean;\n frozenColumnIndex?: number;\n highlighted?: boolean;\n highlightedAsCurrent?: boolean;\n id: string;\n index: number;\n tableRef: React.RefObject<HTMLDivElement>;\n};\n\nconst MemoedDisplayCell = React.memo(function MemoedDisplayCell<TType = unknown>(props: MemoedDisplayCellProps<TType>) {\n const {\n align = 'left',\n children,\n className: customClassName,\n debug,\n enableTruncate,\n frozenColumnIndex,\n highlighted,\n highlightedAsCurrent = false,\n id,\n index,\n tableRef,\n } = props;\n\n const layoutClassName = cn(\n 'py-[var(--table3-cell-padding-y)] px-[var(--table3-cell-padding-x)] focus:outline-none break-word hyphens-auto',\n customClassName\n );\n\n const className = highlighted ? undefined : layoutClassName;\n const content = enableTruncate ? <span className=\"truncate\">{children}</span> : children;\n\n if (debug) {\n console.log('cell render', id);\n }\n\n return (\n <div\n className={className}\n data-align={align}\n data-column-index={index}\n data-highlighted={highlighted}\n role=\"cell\"\n // cells must be focusable (but not included in tabbing - hence -1)\n tabIndex={-1}>\n {highlighted ? (\n <Highlight\n className={layoutClassName}\n current={highlightedAsCurrent}\n frozenColumnIndex={frozenColumnIndex}\n index={index}\n tableRef={tableRef}>\n {content}\n </Highlight>\n ) : (\n content\n )}\n </div>\n );\n}) as <TType = unknown>(props: MemoedDisplayCellProps<TType>) => JSX.Element;\n"],"names":["DisplayCell","props","cell","className","column","value","index","row","table","tableRef","highlighted","highlightedAsCurrent","columnMeta","React","useMemo","columnDef","meta","tableMeta","options","memoedProps","align","children","_ref","_ref2","_props$children","_columnMeta$renderer","renderer","call","original","cn","data","debug","debugAll","enableTruncate","frozenColumnIndex","columnFreezing","id","MemoedDisplayCell","memo","customClassName","layoutClassName","undefined","content","console","log","role","tabIndex","Highlight","current"],"mappings":";;;;SAcgBA,WAAWA,CAAkBC,KAA8B;EACvE,MAAM;IAAEC,IAAI;IAAEC,SAAS;IAAEC,MAAM;IAAEC,KAAK;IAAEC,KAAK;IAAEC,GAAG;IAAEC,KAAK;IAAEC,QAAQ;IAAEC,WAAW;IAAEC;GAAsB,GAAGV,KAAK;EAChH,MAAMW,UAAU,GAAGC,cAAK,CAACC,OAAO,CAAC,MAAMV,MAAM,CAACW,SAAS,CAACC,IAAkC,EAAE,EAAE,CAAC;EAC/F,MAAMC,SAAS,GAAGT,KAAK,CAACU,OAAO,CAACF,IAAwB;;;EAIxD,MAAMG,WAA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AK,GAAG,MAAM;IACdC,QAAQ;IACRlB,SAAS,EAAEoC,eAAe;IAC1BR,KAAK;IACLE,cAAc;IACdC,iBAAiB;IACjBxB,WAAW;IACXC,oBAAoB,GAAG,KAAK;IAC5ByB,EAAE;IACF9B,KAAK;IACLG;GACH,GAAGR,KAAK;EAET,MAAMuC,eAAe,GAAGX,EAAE,CACtB,gHAAgH,EAChHU,eAAe,CAClB;EAED,MAAMpC,SAAS,GAAGO,WAAW,GAAG+B,SAAS,GAAGD,eAAe;EAC3D,MAAME,OAAO,GAAGT,cAAc,gBAAGpB;IAAMV,SAAS,EAAC;KAAYkB,QAAQ,CAAQ,GAAGA,QAAQ;EAExF,IAAIU,KAAK,EAAE;IACPY,OAAO,CAACC,GAAG,CAAC,aAAa,EAAER,EAAE,CAAC;;EAGlC,oBACIvB;IACIV,SAAS,EAAEA,SAAS;kBACRiB,KAAK;yBACEd,KAAK;wBACNI,WAAW;IAC7BmC,IAAI,EAAC,MAAM;;IAEXC,QAAQ,EAAE,CAAC;KACVpC,WAAW,kBACRG,6BAACkC,SAAS;IACN5C,SAAS,EAAEqC,eAAe;IAC1BQ,OAAO,EAAErC,oBAAoB;IAC7BuB,iBAAiB,EAAEA,iBAAiB;IACpC5B,KAAK,EAAEA,KAAK;IACZG,QAAQ,EAAEA;KACTiC,OAAO,CACA,IAEZA,OACH,CACC;AAEd,CAAC,CAA2E;;;;"}
@@ -1,212 +0,0 @@
1
- import React__default from 'react';
2
- import cn from 'clsx';
3
- import { Field } from '../../../../Field/Field.js';
4
- import { useRowContext, RowContext } from '../../rows/RowContext.js';
5
- import { Highlight } from './Highlight.js';
6
- import { Indicator, IndicatorReason } from './Indicator.js';
7
- import { getCurrentRowCellElement } from '../../../util/columns.js';
8
- import { globalFilterFn, columnFilterFn } from '../../../util/filtering.js';
9
- import { hasChanged, willRowMoveAfterSorting } from '../../../util/editing.js';
10
- import { EDITING_ACTIONS_WIDTH } from '../internal/EditingActions.js';
11
- import { EditingControl } from './EditingControl.js';
12
-
13
- function EditingCell(props) {
14
- const {
15
- cell,
16
- table
17
- } = props;
18
- const {
19
- isHovered
20
- } = useRowContext();
21
- // Need to explicitly pass tableMeta, because just passing the table object will not trigger editing change since table object is not mutatable.
22
- const tableMeta = table.options.meta;
23
- const error = tableMeta.validation.getCellError(cell);
24
- return /*#__PURE__*/React__default.createElement(MemoedEditingCell, Object.assign({}, props, {
25
- error: error,
26
- isHovered: isHovered,
27
- tableMeta: tableMeta
28
- }));
29
- }
30
- const MemoedEditingCell = /*#__PURE__*/React__default.memo(function MemoedEditingCell(props) {
31
- var _tableMeta$editing$ge, _tableMeta$editing$ro, _rows$tableMeta$rowAc, _column$columnDef$met, _column$columnDef$met2;
32
- const {
33
- cell,
34
- column,
35
- index,
36
- getValue,
37
- table,
38
- tableRef,
39
- row,
40
- tableMeta,
41
- error,
42
- highlighted,
43
- highlightedAsCurrent
44
- } = props;
45
- const {
46
- rowIndex
47
- } = React__default.useContext(RowContext);
48
- const columnMeta = column.columnDef.meta;
49
- const cellRef = React__default.useRef(null);
50
- const controlRef = React__default.useRef(null);
51
- const handleChange = value => tableMeta.editing.setCellValue(cell, value);
52
- const value = (_tableMeta$editing$ge = tableMeta.editing.getCellValue(cell)) !== null && _tableMeta$editing$ge !== void 0 ? _tableMeta$editing$ge : getValue();
53
- const handleFocus = event => {
54
- var _event$target;
55
- // Check if cell is hidden behind pinned columns or edititng actions, and scroll to it.
56
- // @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel
57
- const frozenColumnIndex = tableMeta.columnFreezing.frozenColumnIndex;
58
- const tableElement = tableRef.current;
59
- if (tableElement && frozenColumnIndex !== undefined && index > frozenColumnIndex) {
60
- var _cellRef$current;
61
- const lastFrozenColumnElement = getCurrentRowCellElement(frozenColumnIndex, tableElement);
62
- const cellRect = (_cellRef$current = cellRef.current) === null || _cellRef$current === void 0 ? void 0 : _cellRef$current.getBoundingClientRect();
63
- const lastFrozenRect = lastFrozenColumnElement === null || lastFrozenColumnElement === void 0 ? void 0 : lastFrozenColumnElement.getBoundingClientRect();
64
- const tableRect = tableElement.getBoundingClientRect();
65
- // Check for pinned columns overlap
66
- if (cellRect && lastFrozenRect && cellRect.left < lastFrozenRect.left + lastFrozenRect.width) {
67
- const pinnedColumnsWidth = lastFrozenRect.left + lastFrozenRect.width;
68
- tableElement.scrollTo(cellRect.left - pinnedColumnsWidth, tableElement.scrollTop);
69
- // Check for editing actions overlap
70
- } else if (cellRect && tableRect && cellRect.right > tableRect.right - EDITING_ACTIONS_WIDTH) {
71
- const spaceBetweenCellAndEditingActions = 10;
72
- tableElement.scrollTo(
73
- // Need to take into account if table has been already scrolled.
74
- tableElement.scrollLeft + EDITING_ACTIONS_WIDTH + spaceBetweenCellAndEditingActions, tableElement.scrollTop);
75
- }
76
- }
77
- if ((_event$target = event.target) !== null && _event$target !== void 0 && _event$target.select) {
78
- requestAnimationFrame(() => {
79
- event.target.select();
80
- });
81
- }
82
- };
83
- const handleBlur = () => {
84
- var _tableMeta$editing$ch;
85
- tableMeta.editing.setDetailModeEditing(false);
86
- if ((_tableMeta$editing$ch = tableMeta.editing.changes) !== null && _tableMeta$editing$ch !== void 0 && _tableMeta$editing$ch[cell.row.id]) {
87
- tableMeta.validation.validate(cell.row.id, tableMeta.editing.changes[cell.row.id], cell.column.id);
88
- }
89
- };
90
- // row move indicator
91
- const moveReason = ((_tableMeta$editing$ro = tableMeta.editing.rowMoveReason) === null || _tableMeta$editing$ro === void 0 ? void 0 : _tableMeta$editing$ro[cell.column.id]) || null;
92
- const rows = table.getRowModel().rows;
93
- const isActiveRow = tableMeta.rowActive.rowActiveIndex !== undefined && ((_rows$tableMeta$rowAc = rows[tableMeta.rowActive.rowActiveIndex]) === null || _rows$tableMeta$rowAc === void 0 ? void 0 : _rows$tableMeta$rowAc.id) === row.id;
94
- const mountNode = React__default.useMemo(() => {
95
- if (moveReason !== null && isActiveRow && !error) {
96
- var _cellRef$current2, _cellRef$current2$par;
97
- return (_cellRef$current2 = cellRef.current) === null || _cellRef$current2 === void 0 ? void 0 : (_cellRef$current2$par = _cellRef$current2.parentElement) === null || _cellRef$current2$par === void 0 ? void 0 : _cellRef$current2$par.firstChild;
98
- }
99
- return null;
100
- }, [moveReason, isActiveRow, error, cellRef]);
101
- const removeMoveReason = () => {
102
- tableMeta.editing.removeRowMoveReason();
103
- };
104
- React__default.useEffect(() => {
105
- // To avoid reseting move reason on another row hover,
106
- // we need to check for changes only if value got changed in the current row.
107
- if (!isActiveRow) {
108
- return;
109
- }
110
- if (error) {
111
- if (tableMeta.editing.rowMoveReason) {
112
- removeMoveReason();
113
- }
114
- return;
115
- }
116
- if (hasChanged(getValue(), value)) {
117
- const moveReason = getRowMoveReason(table, rowIndex,
118
- // cannot use row.index, as this is not kept in sync once a column is sorted.
119
- row.original, cell, value,
120
- // @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel
121
- tableMeta.search.excludeUnmatchedResults);
122
- if (moveReason) {
123
- tableMeta.editing.setRowMoveReason({
124
- [cell.column.id]: moveReason
125
- });
126
- }
127
- } else {
128
- removeMoveReason();
129
- }
130
- return removeMoveReason;
131
- // @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel
132
- }, [value, tableMeta.rowActive.rowActiveIndex, tableMeta.search.excludeUnmatchedResults, error]);
133
- const controlRenderer = (_column$columnDef$met = column.columnDef.meta) === null || _column$columnDef$met === void 0 ? void 0 : _column$columnDef$met.control;
134
- const className = cn(
135
- // Removing a pixel border width in the padding to avoid a pixel jump when control element is rendered.
136
- 'py-[calc(var(--table3-cell-padding-y)_-_0.06rem_-_1px)]', {
137
- // Textarea control is positioned absolute, when column is in enableTruncate mode, so the cell need to be positioned relative
138
- relative: controlRenderer === 'textarea' && columnMeta.enableTruncate
139
- }, props.className, typeof columnMeta.className === 'function' ? columnMeta.className(row.original) : columnMeta.className);
140
- const fieldClassName = cn('!min-h-0 w-full !pb-0', {
141
- '!pb-3': !!error
142
- });
143
- const content = /*#__PURE__*/React__default.createElement(Field, {
144
- message: error,
145
- invalid: !!error,
146
- className: fieldClassName
147
- }, /*#__PURE__*/React__default.createElement(EditingControl, {
148
- align: columnMeta.align,
149
- column: cell.column,
150
- data: cell.row.original,
151
- initialValue: getValue(),
152
- onBlur: handleBlur,
153
- onFocus: handleFocus,
154
- onChange: handleChange,
155
- ref: controlRef,
156
- table: table,
157
- tableRef: tableRef,
158
- value: value,
159
- cell: cell,
160
- error: error,
161
- tabIndex: isActiveRow ? 0 : -1,
162
- isActiveRow: isActiveRow
163
- }));
164
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, moveReason !== null && mountNode && !error ? ( /*#__PURE__*/React__default.createElement(Indicator, {
165
- reason: moveReason,
166
- columnName: String((_column$columnDef$met2 = column.columnDef.meta) === null || _column$columnDef$met2 === void 0 ? void 0 : _column$columnDef$met2.header),
167
- mountNode: mountNode,
168
- validationErrors: []
169
- })) : null, /*#__PURE__*/React__default.createElement("div", {
170
- className: !highlighted ? className : undefined,
171
- "data-align": columnMeta.align,
172
- "data-column-index": index,
173
- role: "cell",
174
- "data-editable": true,
175
- ref: cellRef,
176
- "data-invalid": !!error,
177
- "data-highlighted": highlighted
178
- }, highlighted ? ( /*#__PURE__*/React__default.createElement(Highlight, {
179
- current: highlightedAsCurrent,
180
- className: className,
181
- // @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel
182
- frozenColumnIndex: tableMeta.columnFreezing.frozenColumnIndex,
183
- index: index,
184
- tableRef: tableRef
185
- }, content)) : content));
186
- });
187
- function getRowMoveReason(table, rowIndex, rowValues, cell, newValue, excludeUnmatchedResults) {
188
- var _table$getState$sorti;
189
- let rowMoveReason = null;
190
- const {
191
- globalFilter
192
- } = table.getState();
193
- const isFilteredByGlobalFilter = excludeUnmatchedResults ? Object.values({
194
- ...rowValues,
195
- [cell.id]: newValue
196
- }).some(() => {
197
- // Global filter can be undefined when there is no text being searched so we pass an empty string to
198
- // globalFilterFn as query in that case.
199
- return globalFilterFn(String(newValue), globalFilter ? String(globalFilter) : '');
200
- }) : true;
201
- if (!isFilteredByGlobalFilter) {
202
- rowMoveReason = IndicatorReason.SEARCH;
203
- } else if (cell.column.getIsFiltered() && !columnFilterFn(newValue, cell.column.getFilterValue())) {
204
- rowMoveReason = IndicatorReason.FILTER;
205
- } else if (!rowMoveReason && cell.column.getIsSorted() && willRowMoveAfterSorting(newValue, cell, rowIndex, table.getRowModel().rows, !!((_table$getState$sorti = table.getState().sorting.find(s => s.id === cell.column.id)) !== null && _table$getState$sorti !== void 0 && _table$getState$sorti.desc))) {
206
- rowMoveReason = IndicatorReason.SORTING;
207
- }
208
- return rowMoveReason;
209
- }
210
-
211
- export { EditingCell };
212
- //# sourceMappingURL=EditingCell.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditingCell.js","sources":["../../../../../../../../../../src/components/Table3/components/columns/cell/EditingCell.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport _ from 'lodash';\nimport { TableMeta, CellContext, ColumnMeta, Cell as RTCell, Table as RTTable } from '@tanstack/react-table';\nimport { Indicator, IndicatorReason } from './Indicator';\nimport { columnFilterFn, globalFilterFn } from '../../../util/filtering';\nimport { Table3ColumnControlRenderer, Table3FilterValue } from '../../../types';\nimport { hasChanged, willRowMoveAfterSorting } from '../../../util/editing';\nimport { getCurrentRowCellElement } from '../../../util/columns';\nimport { EDITING_ACTIONS_WIDTH } from '../internal/EditingActions';\nimport { EditingControl } from './EditingControl';\nimport { RowContext, useRowContext } from '../../rows/RowContext';\nimport { Field } from '../../../../Field/Field';\nimport { Highlight } from './Highlight';\n\nexport type EditingCellProps<TType = unknown> = CellContext<TType, unknown> & {\n highlighted?: boolean;\n highlightedAsCurrent?: boolean;\n children?: string | JSX.Element;\n className?: string;\n};\n\nexport function EditingCell<TType = unknown>(props: EditingCellProps<TType>) {\n const { cell, table } = props;\n const { isHovered } = useRowContext();\n // Need to explicitly pass tableMeta, because just passing the table object will not trigger editing change since table object is not mutatable.\n const tableMeta = table.options.meta as TableMeta<TType>;\n const error = tableMeta.validation.getCellError(cell);\n return <MemoedEditingCell<TType> {...props} error={error} isHovered={isHovered} tableMeta={tableMeta} />;\n}\n\n// Memoization\nexport type MemoedEditingCellProps<TType = unknown> = EditingCellProps<TType> & {\n isHovered: boolean;\n tableMeta: TableMeta<TType>;\n error?: string;\n};\n\nconst MemoedEditingCell = React.memo(function MemoedEditingCell<TType = unknown>(props: MemoedEditingCellProps<TType>) {\n const { cell, column, index, getValue, table, tableRef, row, tableMeta, error, highlighted, highlightedAsCurrent } = props;\n const { rowIndex } = React.useContext(RowContext);\n\n const columnMeta = column.columnDef.meta as ColumnMeta<TType, unknown>;\n\n const cellRef = React.useRef<HTMLDivElement>(null);\n const controlRef = React.useRef<HTMLElement>(null);\n\n const handleChange = (value: unknown) => tableMeta.editing.setCellValue(cell, value);\n const value = tableMeta.editing.getCellValue(cell) ?? getValue();\n\n const handleFocus = event => {\n // Check if cell is hidden behind pinned columns or edititng actions, and scroll to it.\n // @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel\n const frozenColumnIndex = tableMeta.columnFreezing.frozenColumnIndex;\n const tableElement = tableRef.current;\n\n if (tableElement && frozenColumnIndex !== undefined && index > frozenColumnIndex) {\n const lastFrozenColumnElement = getCurrentRowCellElement(frozenColumnIndex, tableElement);\n const cellRect = cellRef.current?.getBoundingClientRect();\n const lastFrozenRect = lastFrozenColumnElement?.getBoundingClientRect();\n const tableRect = tableElement.getBoundingClientRect();\n\n // Check for pinned columns overlap\n if (cellRect && lastFrozenRect && cellRect.left < lastFrozenRect.left + lastFrozenRect.width) {\n const pinnedColumnsWidth = lastFrozenRect.left + lastFrozenRect.width;\n tableElement.scrollTo(cellRect.left - pinnedColumnsWidth, tableElement.scrollTop);\n // Check for editing actions overlap\n } else if (cellRect && tableRect && cellRect.right > tableRect.right - EDITING_ACTIONS_WIDTH) {\n const spaceBetweenCellAndEditingActions = 10;\n tableElement.scrollTo(\n // Need to take into account if table has been already scrolled.\n tableElement.scrollLeft + EDITING_ACTIONS_WIDTH + spaceBetweenCellAndEditingActions,\n tableElement.scrollTop\n );\n }\n }\n\n if (event.target?.select) {\n requestAnimationFrame(() => {\n event.target.select();\n });\n }\n };\n\n const handleBlur = () => {\n tableMeta.editing.setDetailModeEditing(false);\n if (tableMeta.editing.changes?.[cell.row.id]) {\n tableMeta.validation.validate(cell.row.id, tableMeta.editing.changes[cell.row.id] as TType, cell.column.id);\n }\n };\n\n // row move indicator\n const moveReason = tableMeta.editing.rowMoveReason?.[cell.column.id] || null;\n const rows = table.getRowModel().rows;\n const isActiveRow =\n tableMeta.rowActive.rowActiveIndex !== undefined && rows[tableMeta.rowActive.rowActiveIndex]?.id === row.id;\n const mountNode = React.useMemo(() => {\n if (moveReason !== null && isActiveRow && !error) {\n return cellRef.current?.parentElement?.firstChild as Element | null;\n }\n return null;\n }, [moveReason, isActiveRow, error, cellRef]);\n\n const removeMoveReason = () => {\n tableMeta.editing.removeRowMoveReason();\n };\n\n React.useEffect(() => {\n // To avoid reseting move reason on another row hover,\n // we need to check for changes only if value got changed in the current row.\n if (!isActiveRow) {\n return;\n }\n\n if (error) {\n if (tableMeta.editing.rowMoveReason) {\n removeMoveReason();\n }\n return;\n }\n\n if (hasChanged(getValue(), value)) {\n const moveReason = getRowMoveReason(\n table,\n rowIndex, // cannot use row.index, as this is not kept in sync once a column is sorted.\n row.original,\n cell,\n value,\n // @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel\n tableMeta.search.excludeUnmatchedResults\n );\n if (moveReason) {\n tableMeta.editing.setRowMoveReason({ [cell.column.id]: moveReason });\n }\n } else {\n removeMoveReason();\n }\n return removeMoveReason;\n // @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel\n }, [value, tableMeta.rowActive.rowActiveIndex, tableMeta.search.excludeUnmatchedResults, error]);\n\n const controlRenderer = column.columnDef.meta?.control as Table3ColumnControlRenderer;\n\n const className = cn(\n // Removing a pixel border width in the padding to avoid a pixel jump when control element is rendered.\n 'py-[calc(var(--table3-cell-padding-y)_-_0.06rem_-_1px)]',\n {\n // Textarea control is positioned absolute, when column is in enableTruncate mode, so the cell need to be positioned relative\n relative: controlRenderer === 'textarea' && columnMeta.enableTruncate,\n },\n props.className,\n typeof columnMeta.className === 'function' ? columnMeta.className(row.original) : columnMeta.className\n );\n\n const fieldClassName = cn('!min-h-0 w-full !pb-0', {\n '!pb-3': !!error,\n });\n\n const content = (\n <Field message={error} invalid={!!error} className={fieldClassName}>\n <EditingControl\n align={columnMeta.align}\n column={cell.column}\n data={cell.row.original}\n initialValue={getValue()}\n onBlur={handleBlur}\n onFocus={handleFocus}\n onChange={handleChange}\n ref={controlRef}\n table={table}\n tableRef={tableRef}\n value={value}\n cell={cell}\n error={error}\n tabIndex={isActiveRow ? 0 : -1}\n isActiveRow={isActiveRow}\n />\n </Field>\n );\n\n return (\n <>\n {moveReason !== null && mountNode && !error ? (\n <Indicator\n reason={moveReason}\n columnName={String(column.columnDef.meta?.header)}\n mountNode={mountNode}\n validationErrors={[]}\n />\n ) : null}\n <div\n className={!highlighted ? className : undefined}\n data-align={columnMeta.align}\n data-column-index={index}\n role=\"cell\"\n data-editable\n ref={cellRef}\n data-invalid={!!error}\n data-highlighted={highlighted}>\n {highlighted ? (\n <Highlight\n current={highlightedAsCurrent}\n className={className}\n // @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel\n frozenColumnIndex={tableMeta.columnFreezing.frozenColumnIndex}\n index={index}\n tableRef={tableRef}>\n {content}\n </Highlight>\n ) : (\n content\n )}\n </div>\n </>\n );\n}) as <TType = unknown>(props: MemoedEditingCellProps<TType>) => JSX.Element;\n\nfunction getRowMoveReason<TType>(\n table: RTTable<any>,\n rowIndex: number,\n rowValues: TType,\n cell: RTCell<any, unknown>,\n newValue: any,\n excludeUnmatchedResults: boolean\n) {\n let rowMoveReason: IndicatorReason | null = null;\n const { globalFilter } = table.getState();\n\n const isFilteredByGlobalFilter = excludeUnmatchedResults\n ? Object.values<unknown>({ ...rowValues, [cell.id]: newValue }).some(() => {\n // Global filter can be undefined when there is no text being searched so we pass an empty string to\n // globalFilterFn as query in that case.\n return globalFilterFn(String(newValue), globalFilter ? String(globalFilter) : '');\n })\n : true;\n\n if (!isFilteredByGlobalFilter) {\n rowMoveReason = IndicatorReason.SEARCH;\n } else if (cell.column.getIsFiltered() && !columnFilterFn(newValue, cell.column.getFilterValue() as Table3FilterValue)) {\n rowMoveReason = IndicatorReason.FILTER;\n } else if (\n !rowMoveReason &&\n cell.column.getIsSorted() &&\n willRowMoveAfterSorting(\n newValue,\n cell,\n rowIndex,\n table.getRowModel().rows,\n !!table.getState().sorting.find(s => s.id === cell.column.id)?.desc\n )\n ) {\n rowMoveReason = IndicatorReason.SORTING;\n }\n\n return rowMoveReason;\n}\n"],"names":["EditingCell","props","cell","table","isHovered","useRowContext","tableMeta","options","meta","error","validation","getCellError","React","MemoedEditingCell","memo","column","index","getValue","tableRef","row","highlighted","highlightedAsCurrent","rowIndex","useContext","RowContext","columnMeta","columnDef","cellRef","useRef","controlRef","handleChange","value","editing","setCellValue","_tableMeta$editing$ge","getCellValue","handleFocus","event","frozenColumnIndex","columnFreezing","tableElement","current","undefined","_cellRef$current","lastFrozenColumnElement","getCurrentRowCellElement","cellRect","getBoundingClientRect","lastFrozenRect","tableRect","left","width","pinnedColumnsWidth","scrollTo","scrollTop","right","EDITING_ACTIONS_WIDTH","spaceBetweenCellAndEditingActions","scrollLeft","_event$target","target","select","requestAnimationFrame","handleBlur","setDetailModeEditing","_tableMeta$editing$ch","changes","id","validate","moveReason","_tableMeta$editing$ro","rowMoveReason","rows","getRowModel","isActiveRow","rowActive","rowActiveIndex","_rows$tableMeta$rowAc","mountNode","useMemo","_cellRef$current2","_cellRef$current2$par","parentElement","firstChild","removeMoveReason","removeRowMoveReason","useEffect","hasChanged","getRowMoveReason","original","search","excludeUnmatchedResults","setRowMoveReason","controlRenderer","_column$columnDef$met","control","className","cn","relative","enableTruncate","fieldClassName","content","Field","message","invalid","EditingControl","align","data","initialValue","onBlur","onFocus","onChange","ref","tabIndex","Indicator","reason","columnName","String","_column$columnDef$met2","header","validationErrors","role","Highlight","rowValues","newValue","globalFilter","getState","isFilteredByGlobalFilter","Object","values","some","globalFilterFn","IndicatorReason","SEARCH","getIsFiltered","columnFilterFn","getFilterValue","FILTER","getIsSorted","willRowMoveAfterSorting","_table$getState$sorti","sorting","find","s","desc","SORTING"],"mappings":";;;;;;;;;;;;SAsBgBA,WAAWA,CAAkBC,KAA8B;EACvE,MAAM;IAAEC,IAAI;IAAEC;GAAO,GAAGF,KAAK;EAC7B,MAAM;IAAEG;GAAW,GAAGC,aAAa,EAAE;;EAErC,MAAMC,SAAS,GAAGH,KAAK,CAACI,OAAO,CAACC,IAAwB;EACxD,MAAMC,KAAK,GAAGH,SAAS,CAACI,UAAU,CAACC,YAAY,CAACT,IAAI,CAAC;EACrD,oBAAOU,6BAACC,iBAAiB,oBAAYZ,KAAK;IAAEQ,KAAK,EAAEA,KAAK;IAAEL,SAAS,EAAEA,SAAS;IAAEE,SAAS,EAAEA;KAAa;AAC5G;AASA,MAAMO,iBAAiB,gBAAGD,cAAK,CAACE,IAAI,CAAC,SAASD,iBAAiBA,CAAkBZ,KAAoC;;EACjH,MAAM;IAAEC,IAAI;IAAEa,MAAM;IAAEC,KAAK;IAAEC,QAAQ;IAAEd,KAAK;IAAEe,QAAQ;IAAEC,GAAG;IAAEb,SAAS;IAAEG,KAAK;IAAEW,WAAW;IAAEC;GAAsB,GAAGpB,KAAK;EAC1H,MAAM;IAAEqB;GAAU,GAAGV,cAAK,CAACW,UAAU,CAACC,UAAU,CAAC;EAEjD,MAAMC,UAAU,GAAGV,MAAM,CAACW,SAAS,CAAClB,IAAkC;EAEtE,MAAMmB,OAAO,GAAGf,cAAK,CAACgB,MAAM,CAAiB,IAAI,CAAC;EAClD,MAAMC,UAAU,GAAGjB,cAAK,CAACgB,MAAM,CAAc,IAAI,CAA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,CAAC,EAAEC,YAAY,GAAGR,MAAM,CAACQ,YAAY,CAAC,GAAG,EAAE,CAAC;GACpF,CAAC,GACF,IAAI;EAEV,IAAI,CAACE,wBAAwB,EAAE;IAC3BxD,aAAa,GAAG6D,eAAe,CAACC,MAAM;GACzC,MAAM,IAAInI,IAAI,CAACa,MAAM,CAACuH,aAAa,EAAE,IAAI,CAACC,cAAc,CAACX,QAAQ,EAAE1H,IAAI,CAACa,MAAM,CAACyH,cAAc,EAAuB,CAAC,EAAE;IACpHjE,aAAa,GAAG6D,eAAe,CAACK,MAAM;GACzC,MAAM,IACH,CAAClE,aAAa,IACdrE,IAAI,CAACa,MAAM,CAAC2H,WAAW,EAAE,IACzBC,uBAAuB,CACnBf,QAAQ,EACR1H,IAAI,EACJoB,QAAQ,EACRnB,KAAK,CAACsE,WAAW,EAAE,CAACD,IAAI,EACxB,CAAC,GAAAoE,qBAAA,GAACzI,KAAK,CAAC2H,QAAQ,EAAE,CAACe,OAAO,CAACC,IAAI,CAACC,CAAC,IAAIA,CAAC,CAAC5E,EAAE,KAAKjE,IAAI,CAACa,MAAM,CAACoD,EAAE,CAAC,cAAAyE,qBAAA,eAA3DA,qBAAA,CAA6DI,IAAI,EACtE,EACH;IACEzE,aAAa,GAAG6D,eAAe,CAACa,OAAO;;EAG3C,OAAO1E,aAAa;AACxB;;;;"}
@@ -1,194 +0,0 @@
1
- import React__default from 'react';
2
- import cn from 'clsx';
3
- import { mergeRefs } from '../../../../../utils/mergeRefs.js';
4
- import { shouldTriggerShortcut } from '../../../../../utils/keyboard.js';
5
- import { Input } from '../../../../Input/Input.js';
6
- import { deselectInputValue } from '../../../../../utils/input.js';
7
- import { Datepicker } from '../../../../Datepicker/Datepicker.js';
8
- import { Switch } from '../../../../Switch/Switch.js';
9
- import { getTableLeftScrollDistance } from '../../../util/scrolling.js';
10
- import { getInputAppearanceClassnames, getCellAlignmentClasses } from '../styles.js';
11
- import { hasChanged } from '../../../util/editing.js';
12
- import _ from 'lodash-es';
13
- import { TextareaControl } from './controls/TextareaControl.js';
14
-
15
- const EditingControl = /*#__PURE__*/React__default.forwardRef(function Control(props, externalRef) {
16
- var _ref$current;
17
- const {
18
- align,
19
- column,
20
- data,
21
- initialValue,
22
- onChange: handleChange,
23
- table,
24
- tableRef,
25
- value,
26
- cell,
27
- error,
28
- isActiveRow,
29
- ...attributes
30
- } = props;
31
- const tableMeta = table.options.meta;
32
- const ref = React__default.useRef();
33
- const refCallback = mergeRefs([ref, externalRef]);
34
- const columnMeta = column.columnDef.meta;
35
- const controlRenderer = columnMeta === null || columnMeta === void 0 ? void 0 : columnMeta.control;
36
- const isCellInDetailMode = tableMeta.editing.detailModeEditing && (ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.contains(document.activeElement));
37
- const originalRow = cell.row.original;
38
- // Revert to initial value if escape was pressed
39
- const handleKeyDown = event => {
40
- // For some reason keydown event handler is not propogated to the table when input or other control element is
41
- // in focus so we need to check for shortcut that toggles the editing.
42
- if (shouldTriggerShortcut(event, {
43
- key: 'e',
44
- meta: true,
45
- shift: false
46
- })) {
47
- tableMeta.editing.toggleEditing(false);
48
- return;
49
- }
50
- const target = event.target;
51
- if (target.readOnly) {
52
- return;
53
- }
54
- // Prevent row arrow shortcuts triggering when in detail mode
55
- if (tableMeta.editing.detailModeEditing && (event.key === 'ArrowUp' || event.key === 'ArrowDown')) {
56
- event.stopPropagation();
57
- }
58
- // Revert to initial value if escape was pressed
59
- if (event.key === 'Escape') {
60
- event.preventDefault();
61
- if (tableMeta.editing.detailModeEditing) {
62
- tableMeta.editing.setDetailModeEditing(false);
63
- if (value !== initialValue) {
64
- // Before reseting to initial value, we need to check if edited row with cell initial value is the same as original row,
65
- // and in this case we need to completely remove row from editing state to avoid saving the same data as original.
66
- const changedRow = tableMeta.editing.changes ? tableMeta.editing.changes[cell.row.id] : {};
67
- const rowEdtitingDataWithInitialValue = {
68
- ...changedRow,
69
- [cell.column.id]: initialValue
70
- };
71
- if (_.isEqual(cell.row.original, rowEdtitingDataWithInitialValue)) {
72
- tableMeta.editing.resetChange(cell.row.id);
73
- } else {
74
- handleChange(initialValue);
75
- }
76
- }
77
- } else {
78
- var _tableRef$current;
79
- tableMeta.editing.toggleEditing(false);
80
- (_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : _tableRef$current.focus();
81
- }
82
- return;
83
- }
84
- // Should enable/disable editing mode if Enter was clicked
85
- if (event.key === 'Enter') {
86
- event.preventDefault();
87
- if (!tableMeta.editing.detailModeEditing) {
88
- deselectInputValue(target);
89
- } else {
90
- var _target$select;
91
- target === null || target === void 0 ? void 0 : (_target$select = target.select) === null || _target$select === void 0 ? void 0 : _target$select.call(target);
92
- }
93
- // Ketydown "Enter" should toggle edititng mode
94
- tableMeta.editing.setDetailModeEditing(!tableMeta.editing.detailModeEditing);
95
- return;
96
- }
97
- };
98
- const isNumber = (columnMeta === null || columnMeta === void 0 ? void 0 : columnMeta.dataType) === 'number';
99
- const handleInputKeyDown = event => {
100
- handleKeyDown(event);
101
- // Switching to editing mode, when key pressed any alphabetical character or number
102
- if (/^[a-z0-9]$/i.test(event.key)) {
103
- tableMeta.editing.setDetailModeEditing(true);
104
- }
105
- };
106
- const handleFocus = event => {
107
- var _event$target;
108
- // @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel
109
- const {
110
- frozenColumnIndex: externalFrozenColumnIndex = -1,
111
- frozenInternalColumnCount = 0
112
- } = tableMeta.columnFreezing;
113
- const tableElement = tableMeta.tableRef.current;
114
- const frozenColumnIndex = externalFrozenColumnIndex > -1 ? externalFrozenColumnIndex + frozenInternalColumnCount : frozenInternalColumnCount - 1;
115
- const cell = (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.closest('[role="cell"]');
116
- if (!tableElement || !cell) {
117
- return;
118
- }
119
- const isEditing = true;
120
- const leftScrollDistance = getTableLeftScrollDistance(tableElement, cell, frozenColumnIndex, isEditing);
121
- if (leftScrollDistance !== null) {
122
- tableElement.scrollLeft = leftScrollDistance;
123
- }
124
- };
125
- if (typeof controlRenderer === 'function') {
126
- return controlRenderer({
127
- ...attributes,
128
- invalid: !!error,
129
- onFocus: handleFocus,
130
- ref: refCallback,
131
- setValue: nextValue => {
132
- if (nextValue !== value) {
133
- handleChange(nextValue);
134
- }
135
- },
136
- fontSize: tableMeta.fontSize.size,
137
- value
138
- }, data);
139
- } else if (controlRenderer === 'datepicker') {
140
- const handleDatepickerChange = event => {
141
- // When datepicker looses focus, it triggers change event, even if date wasn't changed,
142
- // so adding additional check here to prevent adding change to the edititng state.
143
- const originalDate = originalRow[cell.column.id];
144
- const changedDate = event.detail;
145
- if (hasChanged(originalDate, changedDate)) {
146
- handleChange(changedDate);
147
- }
148
- };
149
- return /*#__PURE__*/React__default.createElement(Datepicker, Object.assign({}, attributes, {
150
- invalid: !!error,
151
- className: cn({
152
- '[&_input]:!yt-focus-dark': isCellInDetailMode
153
- }),
154
- onChange: handleDatepickerChange,
155
- onFocus: handleFocus,
156
- onKeyDown: handleInputKeyDown,
157
- ref: refCallback,
158
- value: value
159
- }));
160
- } else if (controlRenderer === 'switch') {
161
- return /*#__PURE__*/React__default.createElement(Switch, Object.assign({}, attributes, {
162
- checked: Boolean(value),
163
- onChange: handleChange,
164
- onFocus: handleFocus,
165
- ref: refCallback
166
- }));
167
- } else if (controlRenderer === 'textarea') {
168
- return /*#__PURE__*/React__default.createElement(TextareaControl, Object.assign({}, props, {
169
- invalid: !!error,
170
- isCellInDetailMode: isCellInDetailMode,
171
- onFocus: handleFocus,
172
- onKeyDown: handleInputKeyDown,
173
- ref: refCallback,
174
- fontSize: tableMeta.fontSize.size
175
- }));
176
- }
177
- return /*#__PURE__*/React__default.createElement(Input, Object.assign({}, attributes, {
178
- invalid: !!error,
179
- className: cn(getInputAppearanceClassnames(), getCellAlignmentClasses(align), {
180
- '!yt-focus-dark': isCellInDetailMode
181
- }),
182
- onChange: event => {
183
- handleChange(event.target.value);
184
- },
185
- onFocus: handleFocus,
186
- onKeyDown: handleInputKeyDown,
187
- ref: refCallback,
188
- type: isNumber ? 'number' : undefined,
189
- value: isNumber ? value : String(value !== null && value !== void 0 ? value : '')
190
- }));
191
- });
192
-
193
- export { EditingControl };
194
- //# sourceMappingURL=EditingControl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditingControl.js","sources":["../../../../../../../../../../src/components/Table3/components/columns/cell/EditingControl.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { Cell as RTCell, Column as RTColumn, Table as RTTable, TableMeta } from '@tanstack/react-table';\nimport _ from 'lodash';\n\nimport { deselectInputValue } from '../../../../../utils/input';\nimport { hasChanged } from '../../../util/editing';\nimport { Datepicker } from '../../../../Datepicker/Datepicker';\nimport { Switch } from '../../../../Switch/Switch';\nimport { Input } from '../../../../Input/Input';\nimport { getCellAlignmentClasses, getInputAppearanceClassnames } from '../styles';\nimport { mergeRefs } from '../../../../../utils/mergeRefs';\nimport { Table3ColumnAlignment, Table3ColumnDataType } from '../../../types';\nimport { TextareaControl } from './controls/TextareaControl';\nimport { shouldTriggerShortcut } from '../../../../../utils/keyboard';\nimport { getTableLeftScrollDistance } from '../../../util/scrolling';\n\nexport type EditingControlProps<TType = unknown> = {\n align?: Table3ColumnAlignment;\n column: RTColumn<TType, unknown>;\n data: TType;\n initialValue: any;\n value: any;\n onBlur: (event: React.FocusEvent) => void;\n onFocus: (event: React.FocusEvent) => void;\n onChange: (value: any) => void;\n ref: React.Ref<HTMLElement>;\n table: RTTable<TType>;\n tableRef: React.RefObject<HTMLDivElement>;\n cell: RTCell<TType, unknown>;\n error?: string;\n tabIndex?: number;\n isActiveRow?: boolean;\n};\n\nexport const EditingControl = React.forwardRef<HTMLElement, any>(function Control<TType = unknown>(\n props: EditingControlProps<TType>,\n externalRef: React.Ref<HTMLElement>\n) {\n const {\n align,\n column,\n data,\n initialValue,\n onChange: handleChange,\n table,\n tableRef,\n value,\n cell,\n error,\n isActiveRow,\n ...attributes\n } = props;\n\n const tableMeta = table.options.meta as TableMeta<unknown>;\n const ref = React.useRef<HTMLElement>();\n const refCallback = mergeRefs([ref, externalRef]);\n\n const columnMeta = column.columnDef.meta;\n const controlRenderer = columnMeta?.control;\n\n const isCellInDetailMode =\n tableMeta.editing.detailModeEditing && (ref as React.RefObject<HTMLElement>)?.current?.contains(document.activeElement);\n\n const originalRow = cell.row.original as TType;\n\n // Revert to initial value if escape was pressed\n const handleKeyDown = (event: React.KeyboardEvent) => {\n // For some reason keydown event handler is not propogated to the table when input or other control element is\n // in focus so we need to check for shortcut that toggles the editing.\n if (shouldTriggerShortcut(event, { key: 'e', meta: true, shift: false })) {\n tableMeta.editing.toggleEditing(false);\n return;\n }\n\n const target = event.target as HTMLInputElement;\n\n if (target.readOnly) {\n return;\n }\n\n // Prevent row arrow shortcuts triggering when in detail mode\n if (tableMeta.editing.detailModeEditing && (event.key === 'ArrowUp' || event.key === 'ArrowDown')) {\n event.stopPropagation();\n }\n\n // Revert to initial value if escape was pressed\n if (event.key === 'Escape') {\n event.preventDefault();\n\n if (tableMeta.editing.detailModeEditing) {\n tableMeta.editing.setDetailModeEditing(false);\n\n if (value !== initialValue) {\n // Before reseting to initial value, we need to check if edited row with cell initial value is the same as original row,\n // and in this case we need to completely remove row from editing state to avoid saving the same data as original.\n const changedRow: any = tableMeta.editing.changes ? tableMeta.editing.changes[cell.row.id] : {};\n const rowEdtitingDataWithInitialValue = { ...changedRow, [cell.column.id]: initialValue };\n if (_.isEqual(cell.row.original, rowEdtitingDataWithInitialValue)) {\n tableMeta.editing.resetChange(cell.row.id);\n } else {\n handleChange(initialValue);\n }\n }\n } else {\n tableMeta.editing.toggleEditing(false);\n tableRef.current?.focus();\n }\n\n return;\n }\n\n // Should enable/disable editing mode if Enter was clicked\n if (event.key === 'Enter') {\n event.preventDefault();\n\n if (!tableMeta.editing.detailModeEditing) {\n deselectInputValue(target);\n } else {\n target?.select?.();\n }\n\n // Ketydown \"Enter\" should toggle edititng mode\n tableMeta.editing.setDetailModeEditing(!tableMeta.editing.detailModeEditing);\n\n return;\n }\n };\n\n const isNumber = columnMeta?.dataType === ('number' as Table3ColumnDataType);\n const handleInputKeyDown = (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n handleKeyDown(event);\n\n // Switching to editing mode, when key pressed any alphabetical character or number\n if (/^[a-z0-9]$/i.test(event.key)) {\n tableMeta.editing.setDetailModeEditing(true);\n }\n };\n\n const handleFocus = (event: React.FocusEvent) => {\n // @ts-expect-error: fixing type issue while report and table3 TableMeta definitions live in parallel\n const { frozenColumnIndex: externalFrozenColumnIndex = -1, frozenInternalColumnCount = 0 } = tableMeta.columnFreezing;\n const tableElement = tableMeta.tableRef.current;\n const frozenColumnIndex =\n externalFrozenColumnIndex > -1\n ? externalFrozenColumnIndex + frozenInternalColumnCount\n : frozenInternalColumnCount - 1;\n const cell = event.target?.closest('[role=\"cell\"]');\n\n if (!tableElement || !cell) {\n return;\n }\n\n const isEditing = true;\n const leftScrollDistance = getTableLeftScrollDistance(tableElement, cell, frozenColumnIndex, isEditing);\n\n if (leftScrollDistance !== null) {\n tableElement.scrollLeft = leftScrollDistance;\n }\n };\n\n if (typeof controlRenderer === 'function') {\n return controlRenderer(\n {\n ...attributes,\n invalid: !!error,\n onFocus: handleFocus,\n ref: refCallback,\n setValue: nextValue => {\n if (nextValue !== value) {\n handleChange(nextValue);\n }\n },\n fontSize: tableMeta.fontSize.size,\n value,\n },\n data\n );\n } else if (controlRenderer === 'datepicker') {\n const handleDatepickerChange = event => {\n // When datepicker looses focus, it triggers change event, even if date wasn't changed,\n // so adding additional check here to prevent adding change to the edititng state.\n const originalDate = originalRow[cell.column.id];\n const changedDate = (event as any).detail;\n if (hasChanged(originalDate, changedDate)) {\n handleChange(changedDate);\n }\n };\n\n return (\n <Datepicker\n {...attributes}\n invalid={!!error}\n className={cn({\n '[&_input]:!yt-focus-dark': isCellInDetailMode,\n })}\n onChange={handleDatepickerChange}\n onFocus={handleFocus}\n onKeyDown={handleInputKeyDown}\n ref={refCallback}\n value={value as Date}\n />\n );\n } else if (controlRenderer === 'switch') {\n return (\n <Switch {...attributes} checked={Boolean(value)} onChange={handleChange} onFocus={handleFocus} ref={refCallback} />\n );\n } else if (controlRenderer === 'textarea') {\n return (\n <TextareaControl\n {...props}\n invalid={!!error}\n isCellInDetailMode={isCellInDetailMode}\n onFocus={handleFocus}\n onKeyDown={handleInputKeyDown}\n ref={refCallback}\n fontSize={tableMeta.fontSize.size}\n />\n );\n }\n\n return (\n <Input\n {...attributes}\n invalid={!!error}\n className={cn(getInputAppearanceClassnames(), getCellAlignmentClasses(align), {\n '!yt-focus-dark': isCellInDetailMode,\n })}\n onChange={event => {\n handleChange(event.target.value);\n }}\n onFocus={handleFocus}\n onKeyDown={handleInputKeyDown}\n ref={refCallback}\n type={isNumber ? 'number' : undefined}\n value={isNumber ? value : String(value ?? '')}\n />\n );\n});\n"],"names":["EditingControl","React","forwardRef","Control","props","externalRef","align","column","data","initialValue","onChange","handleChange","table","tableRef","value","cell","error","isActiveRow","attributes","tableMeta","options","meta","ref","useRef","refCallback","mergeRefs","columnMeta","columnDef","controlRenderer","control","isCellInDetailMode","editing","detailModeEditing","_ref$current","current","contains","document","activeElement","originalRow","row","original","handleKeyDown","event","shouldTriggerShortcut","key","shift","toggleEditing","target","readOnly","stopPropagation","preventDefault","setDetailModeEditing","changedRow","changes","id","rowEdtitingDataWithInitialValue","_","isEqual","resetChange","_tableRef$current","focus","deselectInputValue","_target$select","select","call","isNumber","dataType","handleInputKeyDown","test","handleFocus","frozenColumnIndex","externalFrozenColumnIndex","frozenInternalColumnCount","columnFreezing","tableElement","_event$target","closest","isEditing","leftScrollDistance","getTableLeftScrollDistance","scrollLeft","invalid","onFocus","setValue","nextValue","fontSize","size","handleDatepickerChange","originalDate","changedDate","detail","hasChanged","Datepicker","className","cn","onKeyDown","Switch","checked","Boolean","TextareaControl","Input","getInputAppearanceClassnames","getCell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U;MAAE+E,OAAO,EAAEC,OAAO,CAACpF,KAAK,CAAC;MAAEJ,QAAQ,EAAEC,YAAY;MAAEuE,OAAO,EAAEb,WAAW;MAAE/C,GAAG,EAAEE;OAAe;GAE1H,MAAM,IAAII,eAAe,KAAK,UAAU,EAAE;IACvC,oBACI3B,6BAACkG,eAAe,oBACR/F,KAAK;MACT6E,OAAO,EAAE,CAAC,CAACjE,KAAK;MAChBc,kBAAkB,EAAEA,kBAAkB;MACtCoD,OAAO,EAAEb,WAAW;MACpB0B,SAAS,EAAE5B,kBAAkB;MAC7B7C,GAAG,EAAEE,WAAW;MAChB6D,QAAQ,EAAElE,SAAS,CAACkE,QAAQ,CAACC;OAC/B;;EAIV,oBACIrF,6BAACmG,KAAK,oBACElF,UAAU;IACd+D,OAAO,EAAE,CAAC,CAACjE,KAAK;IAChB6E,SAAS,EAAEC,EAAE,CAACO,4BAA4B,EAAE,EAAEC,uBAAuB,CAAChG,KAAK,CAAC,EAAE;MAC1E,gBAAgB,EAAEwB;KACrB,CAAC;IACFpB,QAAQ,EAAEgC,KAAK;MACX/B,YAAY,CAAC+B,KAAK,CAACK,MAAM,CAACjC,KAAK,CAAC;KACnC;IACDoE,OAAO,EAAEb,WAAW;IACpB0B,SAAS,EAAE5B,kBAAkB;IAC7B7C,GAAG,EAAEE,WAAW;IAChB+E,IAAI,EAAEtC,QAAQ,GAAG,QAAQ,GAAGuC,SAAS;IACrC1F,KAAK,EAAEmD,QAAQ,GAAGnD,KAAK,GAAG2F,MAAM,CAAC3F,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,EAAE;KAC9C;AAEV,CAAC;;;;"}
@@ -1,41 +0,0 @@
1
- import React__default from 'react';
2
- import cn from 'clsx';
3
- import { useRowContext } from '../../rows/RowContext.js';
4
- import { scrollColumnIntoView } from '../../../util/columns.js';
5
-
6
- const Highlight = props => {
7
- const {
8
- current,
9
- frozenColumnIndex,
10
- index,
11
- tableRef,
12
- ...attributes
13
- } = props;
14
- const {
15
- hasError: rowHasError
16
- } = useRowContext();
17
- const ref = React__default.useRef(null);
18
- const className = cn('h-full flex [justify-content:inherit] [text-align:inherit]', props.className, {
19
- // normal row
20
- 'bg-blue-200/25': !current && !rowHasError,
21
- // current row
22
- 'bg-blue-200/75': current && !rowHasError,
23
- // normal row with error
24
- 'bg-[#eaeaf5]': !current && rowHasError,
25
- // current with error
26
- 'bg-[#dadaf5]': current && rowHasError
27
- });
28
- React__default.useEffect(() => {
29
- if (ref.current && current) {
30
- scrollColumnIntoView(index, frozenColumnIndex, ref.current, tableRef.current);
31
- }
32
- }, [current]);
33
- return /*#__PURE__*/React__default.createElement("div", Object.assign({}, attributes, {
34
- "data-taco": "highlight",
35
- className: className,
36
- ref: ref
37
- }));
38
- };
39
-
40
- export { Highlight };
41
- //# sourceMappingURL=Highlight.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Highlight.js","sources":["../../../../../../../../../../src/components/Table3/components/columns/cell/Highlight.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { scrollColumnIntoView } from '../../../util/columns';\nimport { useRowContext } from '../../rows/RowContext';\n\nexport const Highlight = props => {\n const { current, frozenColumnIndex, index, tableRef, ...attributes } = props;\n const { hasError: rowHasError } = useRowContext();\n\n const ref = React.useRef<HTMLDivElement | null>(null);\n const className = cn('h-full flex [justify-content:inherit] [text-align:inherit]', props.className, {\n // normal row\n 'bg-blue-200/25': !current && !rowHasError,\n // current row\n 'bg-blue-200/75': current && !rowHasError,\n // normal row with error\n 'bg-[#eaeaf5]': !current && rowHasError,\n // current with error\n 'bg-[#dadaf5]': current && rowHasError,\n });\n\n React.useEffect(() => {\n if (ref.current && current) {\n scrollColumnIntoView(index, frozenColumnIndex, ref.current, tableRef.current);\n }\n }, [current]);\n\n return <div {...attributes} data-taco=\"highlight\" className={className} ref={ref} />;\n};\n"],"names":["Highlight","props","current","frozenColumnIndex","index","tableRef","attributes","hasError","rowHasError","useRowContext","ref","React","useRef","className","cn","useEffect","scrollColumnIntoView"],"mappings":";;;;;MAKaA,SAAS,GAAGC,KAAK;EAC1B,MAAM;IAAEC,OAAO;IAAEC,iBAAiB;IAAEC,KAAK;IAAEC,QAAQ;IAAE,GAAGC;GAAY,GAAGL,KAAK;EAC5E,MAAM;IAAEM,QAAQ,EAAEC;GAAa,GAAGC,aAAa,EAAE;EAEjD,MAAMC,GAAG,GAAGC,cAAK,CAACC,MAAM,CAAwB,IAAI,CAAC;EACrD,MAAMC,SAAS,GAAGC,EAAE,CAAC,4DAA4D,EAAEb,KAAK,CAACY,SAAS,EAAE;;IAEhG,gBAAgB,EAAE,CAACX,OAAO,IAAI,CAACM,WAAW;;IAE1C,gBAAgB,EAAEN,OAAO,IAAI,CAACM,WAAW;;IAEzC,cAAc,EAAE,CAACN,OAAO,IAAIM,WAAW;;IAEvC,cAAc,EAAEN,OAAO,IAAIM;GAC9B,CAAC;EAEFG,cAAK,CAACI,SAAS,CAAC;IACZ,IAAIL,GAAG,CAACR,OAAO,IAAIA,OAAO,EAAE;MACxBc,oBAAoB,CAACZ,KAAK,EAAED,iBAAiB,EAAEO,GAAG,CAACR,OAAO,EAAEG,QAAQ,CAACH,OAAO,CAAC;;GAEpF,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,oBAAOS,sDAASL,UAAU;iBAAY,WAAW;IAACO,SAAS,EAAEA,SAAS;IAAEH,GAAG,EAAEA;KAAO;AACxF;;;;"}