@economic/taco 2.15.0 → 2.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (291) hide show
  1. package/dist/components/Drawer/Drawer.d.ts +5 -1
  2. package/dist/components/Provider/Localization.d.ts +19 -0
  3. package/dist/components/SearchInput2/SearchInput2.d.ts +1 -0
  4. package/dist/components/Table3/Table3.d.ts +0 -2
  5. package/dist/components/Table3/components/alert/ErrorAlert.d.ts +10 -0
  6. package/dist/components/Table3/components/columns/cell/DisplayCell.d.ts +5 -2
  7. package/dist/components/Table3/components/columns/cell/EditingCell.d.ts +3 -0
  8. package/dist/components/Table3/components/columns/cell/EditingControl.d.ts +1 -1
  9. package/dist/components/Table3/components/columns/cell/Highlight.d.ts +2 -0
  10. package/dist/components/Table3/components/columns/header/Header.d.ts +1 -1
  11. package/dist/components/Table3/components/columns/internal/EditingActions.d.ts +1 -1
  12. package/dist/components/Table3/components/columns/styles.d.ts +2 -2
  13. package/dist/components/Table3/components/rows/Row.d.ts +5 -1
  14. package/dist/components/Table3/components/rows/RowContext.d.ts +1 -0
  15. package/dist/components/Table3/hooks/features/useEditing.d.ts +12 -11
  16. package/dist/components/Table3/hooks/features/{usePauseHoverState.d.ts → usePauseShortcuts.d.ts} +1 -2
  17. package/dist/components/Table3/hooks/features/useSearch.d.ts +3 -3
  18. package/dist/components/Table3/hooks/features/useValidation.d.ts +13 -0
  19. package/dist/components/Table3/hooks/useTable.d.ts +25 -20
  20. package/dist/components/Table3/types.d.ts +41 -19
  21. package/dist/components/Table3/util/editing.d.ts +6 -0
  22. package/dist/components/Table3/util/scrolling.d.ts +2 -0
  23. package/dist/esm/index.css +108 -33
  24. package/dist/esm/packages/taco/src/components/Banner/Banner.js +2 -2
  25. package/dist/esm/packages/taco/src/components/Banner/Banner.js.map +1 -1
  26. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +4 -4
  27. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
  28. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +3 -3
  29. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
  30. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +2 -1
  31. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
  32. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +6 -6
  33. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
  34. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +3 -3
  35. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
  36. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js +7 -2
  37. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js.map +1 -1
  38. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +7 -7
  39. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
  40. package/dist/esm/packages/taco/src/components/Field/Field.js +2 -2
  41. package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
  42. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js +2 -2
  43. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js.map +1 -1
  44. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +4 -4
  45. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  46. package/dist/esm/packages/taco/src/components/Header/components/Link.js +2 -2
  47. package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
  48. package/dist/esm/packages/taco/src/components/Icon/Icon.js +2 -2
  49. package/dist/esm/packages/taco/src/components/Icon/Icon.js.map +1 -1
  50. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js +2 -2
  51. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  52. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +6 -6
  53. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
  54. package/dist/esm/packages/taco/src/components/Menu/components/Item.js +4 -4
  55. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  56. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js +2 -2
  57. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
  58. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js +3 -3
  59. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js.map +1 -1
  60. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js +2 -2
  61. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js.map +1 -1
  62. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +1 -1
  63. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  64. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js +2 -2
  65. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js.map +1 -1
  66. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js +5 -5
  67. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js.map +1 -1
  68. package/dist/esm/packages/taco/src/components/Popover/Popover.js +2 -2
  69. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  70. package/dist/esm/packages/taco/src/components/Provider/Localization.js +19 -0
  71. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  72. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js +2 -2
  73. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js.map +1 -1
  74. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +12 -8
  75. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
  76. package/dist/esm/packages/taco/src/components/Select/useSelect.js +2 -2
  77. package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
  78. package/dist/esm/packages/taco/src/components/Select2/Select2.js +7 -7
  79. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  80. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +8 -8
  81. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  82. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +5 -5
  83. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  84. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +10 -10
  85. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  86. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +2 -2
  87. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
  88. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js +3 -3
  89. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
  90. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +2 -2
  91. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  92. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js +10 -10
  93. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  94. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js +2 -2
  95. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js.map +1 -1
  96. package/dist/esm/packages/taco/src/components/Table3/Table3.js +37 -30
  97. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  98. package/dist/esm/packages/taco/src/components/Table3/components/alert/ErrorAlert.js +154 -0
  99. package/dist/esm/packages/taco/src/components/Table3/components/alert/ErrorAlert.js.map +1 -0
  100. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Cell.js +54 -9
  101. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Cell.js.map +1 -1
  102. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js +9 -57
  103. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js.map +1 -1
  104. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js +72 -41
  105. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js.map +1 -1
  106. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js +41 -17
  107. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js.map +1 -1
  108. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Highlight.js +41 -0
  109. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Highlight.js.map +1 -0
  110. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js +23 -14
  111. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js.map +1 -1
  112. package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Footer.js +3 -3
  113. package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Footer.js.map +1 -1
  114. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Group.js +1 -1
  115. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Group.js.map +1 -1
  116. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js +9 -9
  117. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js.map +1 -1
  118. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js +37 -6
  119. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js.map +1 -1
  120. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js +12 -12
  121. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js.map +1 -1
  122. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Drag.js +2 -2
  123. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Drag.js.map +1 -1
  124. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js +63 -23
  125. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js.map +1 -1
  126. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Expansion.js +3 -3
  127. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Expansion.js.map +1 -1
  128. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js +3 -3
  129. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js.map +1 -1
  130. package/dist/esm/packages/taco/src/components/Table3/components/columns/styles.js +2 -13
  131. package/dist/esm/packages/taco/src/components/Table3/components/columns/styles.js.map +1 -1
  132. package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js +67 -57
  133. package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js.map +1 -1
  134. package/dist/esm/packages/taco/src/components/Table3/components/rows/RowContext.js +2 -1
  135. package/dist/esm/packages/taco/src/components/Table3/components/rows/RowContext.js.map +1 -1
  136. package/dist/esm/packages/taco/src/components/Table3/components/rows/SkeletonRow.js +2 -2
  137. package/dist/esm/packages/taco/src/components/Table3/components/rows/SkeletonRow.js.map +1 -1
  138. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/ColumnSettings.js +8 -6
  139. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/ColumnSettings.js.map +1 -1
  140. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js +23 -8
  141. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js.map +1 -1
  142. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.js +2 -2
  143. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.js.map +1 -1
  144. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.js +2 -2
  145. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.js.map +1 -1
  146. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js +16 -16
  147. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js.map +1 -1
  148. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintIFrame.js +1 -0
  149. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintIFrame.js.map +1 -1
  150. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Search.js +53 -4
  151. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Search.js.map +1 -1
  152. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Settings.js +8 -8
  153. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Settings.js.map +1 -1
  154. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useEditing.js +185 -101
  155. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useEditing.js.map +1 -1
  156. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseShortcuts.js +12 -0
  157. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseShortcuts.js.map +1 -0
  158. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSearch.js +4 -2
  159. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSearch.js.map +1 -1
  160. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useValidation.js +178 -0
  161. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useValidation.js.map +1 -0
  162. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useEditingStateListener.js +3 -3
  163. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useEditingStateListener.js.map +1 -1
  164. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js +1 -49
  165. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js.map +1 -1
  166. package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js +1 -2
  167. package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js.map +1 -1
  168. package/dist/esm/packages/taco/src/components/Table3/hooks/useCssVars.js +0 -2
  169. package/dist/esm/packages/taco/src/components/Table3/hooks/useCssVars.js.map +1 -1
  170. package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js +135 -111
  171. package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js.map +1 -1
  172. package/dist/esm/packages/taco/src/components/Table3/strategies/virtualised.js +4 -4
  173. package/dist/esm/packages/taco/src/components/Table3/strategies/virtualised.js.map +1 -1
  174. package/dist/esm/packages/taco/src/components/Table3/types.js.map +1 -1
  175. package/dist/esm/packages/taco/src/components/Table3/util/editing.js +21 -1
  176. package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
  177. package/dist/esm/packages/taco/src/components/Table3/util/scrolling.js +53 -0
  178. package/dist/esm/packages/taco/src/components/Table3/util/scrolling.js.map +1 -0
  179. package/dist/esm/packages/taco/src/components/Tag/Tag.js +4 -4
  180. package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
  181. package/dist/esm/packages/taco/src/components/Toast/Toaster.js +2 -2
  182. package/dist/esm/packages/taco/src/components/Toast/Toaster.js.map +1 -1
  183. package/dist/esm/packages/taco/src/components/Tour/Tour.js +4 -4
  184. package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
  185. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js +2 -2
  186. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js.map +1 -1
  187. package/dist/esm/packages/taco/src/index.js +2 -1
  188. package/dist/esm/packages/taco/src/index.js.map +1 -1
  189. package/dist/esm/packages/taco/src/primitives/Table/types.js +10 -0
  190. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -0
  191. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableColumnOrdering.js +8 -0
  192. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableColumnOrdering.js.map +1 -0
  193. package/dist/esm/packages/taco/src/{components/Table3/hooks/features/useFontSize.js → primitives/Table/useTable/features/useTableFontSize.js} +3 -3
  194. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableFontSize.js.map +1 -0
  195. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTablePrinting.js +14 -0
  196. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTablePrinting.js.map +1 -0
  197. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowActive.js +100 -0
  198. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowActive.js.map +1 -0
  199. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowClick.js +30 -0
  200. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowClick.js.map +1 -0
  201. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowGoto.js +9 -0
  202. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowGoto.js.map +1 -0
  203. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowHeight.js +13 -0
  204. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowHeight.js.map +1 -0
  205. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowSelection.js +32 -0
  206. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowSelection.js.map +1 -0
  207. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableServerLoading.js +11 -0
  208. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableServerLoading.js.map +1 -0
  209. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableDataListener.js +15 -0
  210. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableDataListener.js.map +1 -0
  211. package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useFilteringStateListener.js → primitives/Table/useTable/listeners/useTableFilterListener.js} +3 -3
  212. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableFilterListener.js.map +1 -0
  213. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableFontSizeListener.js +40 -0
  214. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableFontSizeListener.js.map +1 -0
  215. package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useRowSelectionListener.js → primitives/Table/useTable/listeners/useTableRowSelectionListener.js} +5 -6
  216. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableRowSelectionListener.js.map +1 -0
  217. package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useServerLoadingListener.js → primitives/Table/useTable/listeners/useTableServerLoadingListener.js} +3 -3
  218. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableServerLoadingListener.js.map +1 -0
  219. package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useShortcutsListener.js → primitives/Table/useTable/listeners/useTableShortcutsListener.js} +7 -7
  220. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableShortcutsListener.js.map +1 -0
  221. package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useSortingStateListener.js → primitives/Table/useTable/listeners/useTableSortingListener.js} +6 -4
  222. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableSortingListener.js.map +1 -0
  223. package/dist/esm/packages/taco/src/{components/Table3/hooks/features/useColumnOrdering.js → primitives/Table/useTable/util/columns.js} +24 -15
  224. package/dist/esm/packages/taco/src/primitives/Table/useTable/util/columns.js.map +1 -0
  225. package/dist/esm/packages/taco/src/types.js +6 -0
  226. package/dist/esm/packages/taco/src/types.js.map +1 -0
  227. package/dist/esm/packages/taco/src/utils/date.js +0 -1
  228. package/dist/esm/packages/taco/src/utils/date.js.map +1 -1
  229. package/dist/index.css +108 -33
  230. package/dist/primitives/Table/types.d.ts +35 -0
  231. package/dist/primitives/Table/useTable/features/useTableColumnOrdering.d.ts +3 -0
  232. package/dist/primitives/Table/useTable/features/useTableFontSize.d.ts +7 -0
  233. package/dist/primitives/Table/useTable/features/useTablePrinting.d.ts +7 -0
  234. package/dist/primitives/Table/useTable/features/useTableRowActive.d.ts +12 -0
  235. package/dist/primitives/Table/useTable/features/useTableRowClick.d.ts +7 -0
  236. package/dist/primitives/Table/useTable/features/useTableRowGoto.d.ts +5 -0
  237. package/dist/primitives/Table/useTable/features/useTableRowHeight.d.ts +7 -0
  238. package/dist/primitives/Table/useTable/features/useTableRowSelection.d.ts +6 -0
  239. package/dist/primitives/Table/useTable/features/useTableServerLoading.d.ts +6 -0
  240. package/dist/primitives/Table/useTable/listeners/useTableDataListener.d.ts +2 -0
  241. package/dist/primitives/Table/useTable/listeners/useTableFilterListener.d.ts +3 -0
  242. package/dist/primitives/Table/useTable/listeners/useTableFontSizeListener.d.ts +2 -0
  243. package/dist/primitives/Table/useTable/listeners/useTableRowSelectionListener.d.ts +3 -0
  244. package/dist/primitives/Table/useTable/listeners/useTableServerLoadingListener.d.ts +3 -0
  245. package/dist/primitives/Table/useTable/listeners/useTableShortcutsListener.d.ts +3 -0
  246. package/dist/primitives/Table/useTable/listeners/useTableSortingListener.d.ts +3 -0
  247. package/dist/primitives/Table/useTable/util/columns.d.ts +4 -0
  248. package/dist/taco.cjs.development.js +2294 -1543
  249. package/dist/taco.cjs.development.js.map +1 -1
  250. package/dist/taco.cjs.production.min.js +1 -1
  251. package/dist/taco.cjs.production.min.js.map +1 -1
  252. package/dist/types.d.ts +5 -0
  253. package/package.json +3 -3
  254. package/types.json +13547 -12953
  255. package/dist/components/Table3/hooks/features/useColumnOrdering.d.ts +0 -6
  256. package/dist/components/Table3/hooks/features/useCurrentRow.d.ts +0 -11
  257. package/dist/components/Table3/hooks/features/useFontSize.d.ts +0 -7
  258. package/dist/components/Table3/hooks/features/usePrinting.d.ts +0 -8
  259. package/dist/components/Table3/hooks/features/useRowClick.d.ts +0 -6
  260. package/dist/components/Table3/hooks/features/useRowGoto.d.ts +0 -5
  261. package/dist/components/Table3/hooks/features/useRowHeight.d.ts +0 -7
  262. package/dist/components/Table3/hooks/features/useRowSelection.d.ts +0 -6
  263. package/dist/components/Table3/hooks/listeners/useCurrentRowListener.d.ts +0 -2
  264. package/dist/components/Table3/hooks/listeners/useFilteringStateListener.d.ts +0 -3
  265. package/dist/components/Table3/hooks/listeners/useRowSelectionListener.d.ts +0 -3
  266. package/dist/components/Table3/hooks/listeners/useServerLoadingListener.d.ts +0 -3
  267. package/dist/components/Table3/hooks/listeners/useShortcutsListener.d.ts +0 -3
  268. package/dist/components/Table3/hooks/listeners/useSortingStateListener.d.ts +0 -3
  269. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useColumnOrdering.js.map +0 -1
  270. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useCurrentRow.js +0 -93
  271. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useCurrentRow.js.map +0 -1
  272. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useFontSize.js.map +0 -1
  273. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseHoverState.js +0 -22
  274. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseHoverState.js.map +0 -1
  275. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePrinting.js +0 -14
  276. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePrinting.js.map +0 -1
  277. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowClick.js +0 -25
  278. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowClick.js.map +0 -1
  279. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowGoto.js +0 -9
  280. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowGoto.js.map +0 -1
  281. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowHeight.js +0 -27
  282. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowHeight.js.map +0 -1
  283. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowSelection.js +0 -32
  284. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowSelection.js.map +0 -1
  285. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useCurrentRowListener.js +0 -15
  286. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useCurrentRowListener.js.map +0 -1
  287. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useFilteringStateListener.js.map +0 -1
  288. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useRowSelectionListener.js.map +0 -1
  289. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useServerLoadingListener.js.map +0 -1
  290. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useShortcutsListener.js.map +0 -1
  291. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSortingStateListener.js.map +0 -1
@@ -36,8 +36,12 @@ export declare type DrawerProps = Omit<DialogProps, 'draggable' | 'size'> & {
36
36
  focusTrap?: boolean;
37
37
  /** When 'true' renders close button in topr right cornenr of drawer content */
38
38
  showCloseButton?: boolean;
39
+ /** Target specific named outlet allowing you to render a drawer to a specific outlet */
40
+ outletName?: string;
41
+ };
42
+ export declare type OutletProps = React.HTMLAttributes<HTMLDivElement> & {
43
+ name?: string;
39
44
  };
40
- export declare type OutletProps = React.HTMLAttributes<HTMLDivElement>;
41
45
  export declare type ForwardedDrawerWithStatics = React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLElement>> & {
42
46
  Trigger: React.ForwardRefExoticComponent<DrawerTriggerProps & React.RefAttributes<HTMLButtonElement>>;
43
47
  Content: React.ForwardRefExoticComponent<DrawerContentProps & React.RefAttributes<HTMLDivElement>>;
@@ -202,6 +202,12 @@ export declare const defaultLocalisationTexts: {
202
202
  progress: string;
203
203
  complete: string;
204
204
  };
205
+ clearChangesConfirmationDialog: {
206
+ title: string;
207
+ description: string;
208
+ cancel: string;
209
+ confirm: string;
210
+ };
205
211
  };
206
212
  filters: {
207
213
  button: string;
@@ -302,6 +308,19 @@ export declare const defaultLocalisationTexts: {
302
308
  otherOptions: {
303
309
  tooltip: string;
304
310
  };
311
+ validation: {
312
+ index: string;
313
+ alert: {
314
+ unsavedEntries: (count?: number) => "unsaved entry:" | "unsaved entries:";
315
+ incompleteAndHavntBeenSaved: (count?: number) => "is incomplete and haven’t been saved." | "are incomplete and haven’t been saved.";
316
+ };
317
+ resetFiltersDialog: {
318
+ title: string;
319
+ description: string;
320
+ cancel: string;
321
+ confirm: string;
322
+ };
323
+ };
305
324
  };
306
325
  searchInput: {
307
326
  button: string;
@@ -3,6 +3,7 @@ import { KeyDownHandlerOptions } from '../../utils/keyboard';
3
3
  interface CommonSearchInput2Props extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'defaultValue' | 'onChange' | 'value'> {
4
4
  loading?: boolean;
5
5
  onChange: (value: string) => void;
6
+ onClear?: () => void;
6
7
  settingsContent?: JSX.Element;
7
8
  shortcut?: string | KeyDownHandlerOptions;
8
9
  value?: string;
@@ -9,8 +9,6 @@ declare function Group(_: Table3GroupProps): null;
9
9
  declare namespace Group {
10
10
  var displayName: string;
11
11
  }
12
- declare type FixedForwardRef = <T, P = {}>(render: (props: P, ref: React.Ref<T>) => JSX.Element) => (props: P & React.RefAttributes<T>) => JSX.Element;
13
- export declare const fixedForwardRef: FixedForwardRef;
14
12
  declare type Table3WithStatics = (<TType = unknown>(props: Table3Props<TType> & React.RefAttributes<Table3Ref>) => JSX.Element) & {
15
13
  Column: typeof Column;
16
14
  Group: typeof Group;
@@ -0,0 +1,10 @@
1
+ import { Table as RTable } from '@tanstack/react-table';
2
+ import { TableStrategy } from '../../types';
3
+ import React from 'react';
4
+ export declare type ErrorAlertProps<TType = unknown> = {
5
+ table: RTable<TType>;
6
+ tableRef: React.RefObject<HTMLDivElement>;
7
+ scrollToIndex: TableStrategy['scrollToIndex'];
8
+ rowIdentifier?: string;
9
+ };
10
+ export declare function ErrorAlert<TType = unknown>(props: ErrorAlertProps<TType>): JSX.Element;
@@ -2,8 +2,11 @@ import React from 'react';
2
2
  import { CellContext } from '@tanstack/react-table';
3
3
  import { Table3ColumnAlignment } from '../../../types';
4
4
  export declare type DisplayCellProps<TType = unknown> = CellContext<TType, unknown> & {
5
+ highlighted?: boolean;
6
+ highlightedAsCurrent?: boolean;
5
7
  children?: string | JSX.Element;
6
8
  className?: string;
9
+ value?: any;
7
10
  };
8
11
  export declare function DisplayCell<TType = unknown>(props: DisplayCellProps<TType>): JSX.Element;
9
12
  export declare type MemoedDisplayCellProps<TType = unknown> = {
@@ -14,8 +17,8 @@ export declare type MemoedDisplayCellProps<TType = unknown> = {
14
17
  debug?: boolean;
15
18
  enableTruncate?: boolean;
16
19
  frozenColumnIndex?: number;
17
- highlighted: boolean;
18
- highlightedAsCurrent: boolean;
20
+ highlighted?: boolean;
21
+ highlightedAsCurrent?: boolean;
19
22
  id: string;
20
23
  index: number;
21
24
  tableRef: React.RefObject<HTMLDivElement>;
@@ -1,10 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import { TableMeta, CellContext } from '@tanstack/react-table';
3
3
  export declare type EditingCellProps<TType = unknown> = CellContext<TType, unknown> & {
4
+ highlighted?: boolean;
5
+ highlightedAsCurrent?: boolean;
4
6
  children?: string | JSX.Element;
5
7
  };
6
8
  export declare function EditingCell<TType = unknown>(props: EditingCellProps<TType>): JSX.Element;
7
9
  export declare type MemoedEditingCellProps<TType = unknown> = EditingCellProps<TType> & {
8
10
  isHovered: boolean;
9
11
  tableMeta: TableMeta<TType>;
12
+ error?: string;
10
13
  };
@@ -16,6 +16,6 @@ export declare type EditingControlProps<TType = unknown> = {
16
16
  cell: RTCell<TType, unknown>;
17
17
  error?: string;
18
18
  tabIndex?: number;
19
- isCurrentRow?: boolean;
19
+ isActiveRow?: boolean;
20
20
  };
21
21
  export declare const EditingControl: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const Highlight: (props: any) => JSX.Element;
@@ -9,7 +9,7 @@ export declare type HeaderProps<TType = unknown> = HeaderContext<TType, unknown>
9
9
  hasSeparator?: boolean;
10
10
  };
11
11
  export declare function Header<TType = unknown>(props: HeaderProps<TType>): JSX.Element;
12
- export declare type MemoedHeaderProps<TType = unknown> = Omit<HeaderProps<TType>, 'column' | 'header'> & {
12
+ export declare type HeaderContentProps<TType = unknown> = Omit<HeaderProps<TType>, 'column' | 'header'> & {
13
13
  align?: Table3ColumnAlignment;
14
14
  canFreeze: boolean;
15
15
  canHide: boolean;
@@ -5,4 +5,4 @@ export declare type EditingActionsProps<TType = unknown> = CellContext<TType, un
5
5
  };
6
6
  export declare const COLUMN_ID = "__editing_actions";
7
7
  export declare const EDITING_ACTIONS_WIDTH = 60;
8
- export declare function createRowEditingActionsColumn<TType = unknown>(): DisplayColumnDef<TType, unknown>;
8
+ export declare function createRowEditingActionsColumn<TType = unknown>(rowIdentifier?: string): DisplayColumnDef<TType, unknown>;
@@ -1,5 +1,5 @@
1
- import { Table3ColumnAlignment, Table3FontSize } from '../../types';
1
+ import { Table3ColumnAlignment } from '../../types';
2
2
  export declare const PRINT_MIN_COLUMN_SIZE = 20;
3
3
  export declare const getCellAlignmentClasses: (alignment?: Table3ColumnAlignment) => string;
4
- export declare const getFontBasedMinColumnSize: (fontSize: Table3FontSize | undefined) => 57 | 83 | 72;
4
+ export declare const getFontBasedMinColumnSize: (fontSize?: "small" | "medium" | "large") => 57 | 83 | 72;
5
5
  export declare const getInputAppearanceClassnames: () => string;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Row as RTRow, Table as RTable } from '@tanstack/react-table';
3
3
  import { Table3RowClickHandler, Table3RowDropHandler } from '../../types';
4
+ import { LastCellIndex } from '../../util/editing';
4
5
  declare type RowProps<TType = unknown> = Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'onDrop'> & {
5
6
  index: number;
6
7
  isLastRow: boolean;
@@ -12,11 +13,14 @@ declare type RowProps<TType = unknown> = Omit<React.HTMLAttributes<HTMLDivElemen
12
13
  tableRef: React.RefObject<HTMLDivElement>;
13
14
  };
14
15
  export declare function Row<TType = unknown>(props: RowProps<TType>): JSX.Element;
15
- export declare type MemoedRowProps<TType = unknown> = RowProps<TType> & {
16
+ export declare const lastCellIndex: LastCellIndex;
17
+ export declare type MemoedRowProps<TType = unknown> = Omit<RowProps<TType>, 'onClick'> & {
18
+ data: TType;
16
19
  'aria-grabbed'?: boolean;
17
20
  'data-current': boolean;
18
21
  'data-selected': boolean;
19
22
  draggable: boolean;
20
23
  index: number;
24
+ onClick: (event: React.MouseEvent<HTMLDivElement>, data: unknown) => void;
21
25
  };
22
26
  export {};
@@ -3,6 +3,7 @@ declare type RowContextValue = {
3
3
  isHovered: boolean;
4
4
  setIsHovered: (value: boolean) => void;
5
5
  rowIndex: number;
6
+ hasError: boolean;
6
7
  };
7
8
  export declare const RowContext: React.Context<RowContextValue>;
8
9
  export declare const useRowContext: () => RowContextValue;
@@ -1,30 +1,31 @@
1
1
  import React from 'react';
2
2
  import { Cell as RTCell } from '@tanstack/react-table';
3
+ import { Table3SaveHandler } from '../../types';
3
4
  import { IndicatorReason } from '../../components/columns/cell/Indicator';
4
- export declare enum SavingStateValue {
5
+ import { Table3Validation } from './useValidation';
6
+ export declare enum SavingStatusValue {
5
7
  Saving = "saving",
6
8
  Saved = "saved",
7
9
  Error = "error"
8
10
  }
9
- export declare type SavingState = {
10
- state: SavingStateValue;
11
- };
12
- export declare function useEditing<TType = unknown>(isEnabled: boolean, onSave?: (row: TType) => void): {
11
+ export declare function useEditing<TType = unknown>(isEnabled: boolean, validation: Table3Validation<TType>, onSave?: Table3SaveHandler<TType>): {
13
12
  isEnabled: boolean;
14
13
  isEditing: boolean;
15
14
  toggleEditing: React.Dispatch<React.SetStateAction<boolean>>;
16
- changes: Record<string, TType> | null;
15
+ changes: EditingState<TType>;
17
16
  getCellValue: <T extends TType>(cell: RTCell<T, unknown>) => any;
18
17
  setCellValue: <T_1 extends TType>(cell: RTCell<T_1, unknown>, value: unknown) => void;
19
18
  saveChangesIfNeeded: () => Promise<void>;
20
19
  detailModeEditing: boolean;
21
20
  setDetailModeEditing: React.Dispatch<React.SetStateAction<boolean>>;
22
- rowMoveReason: Record<string, IndicatorReason | null>;
23
- setRowMoveReason: React.Dispatch<React.SetStateAction<Record<string, IndicatorReason | null>>>;
24
- removeRowMoveReason: (columnId: string) => void;
21
+ rowMoveReason: Record<string, IndicatorReason | null> | null;
22
+ setRowMoveReason: React.Dispatch<React.SetStateAction<Record<string, IndicatorReason | null> | null>>;
23
+ removeRowMoveReason: () => void;
25
24
  handleKeyDown: (event: KeyboardEvent) => void;
26
25
  handleBlur: (event: React.FocusEvent) => void;
27
26
  resetChange: (rowId: string) => void;
28
- savingStates: Record<string, SavingState> | null;
29
- removeSavingState: (rowId: string) => void;
27
+ getSavingStatus: (rowId: string) => SavingStatusValue | null;
28
+ resetSavingStatus: (rowId: string) => void;
30
29
  };
30
+ declare type EditingState<TType = unknown> = Record<string, TType> | null;
31
+ export {};
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- export declare function usePauseHoverState(): {
2
+ export declare function usePauseShortcuts(): {
3
3
  isPaused: boolean;
4
4
  pause: React.Dispatch<React.SetStateAction<boolean>>;
5
- handleKeyDown: (event: KeyboardEvent) => void;
6
5
  };
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { Table3LoadAllHandler } from '../../types';
3
- export declare function useSearch(isEnabled: boolean, excludeUnmatchedResultsInSearch?: boolean, loadAll?: Table3LoadAllHandler): {
2
+ export declare function useSearch(isEnabled: boolean, excludeUnmatchedResultsInSearch?: boolean): {
4
3
  isEnabled: boolean;
5
4
  isHighlightingEnabled: boolean;
6
5
  toggleHighlighting: React.Dispatch<React.SetStateAction<boolean>>;
@@ -12,5 +11,6 @@ export declare function useSearch(isEnabled: boolean, excludeUnmatchedResultsInS
12
11
  setHighlightedColumnIndexes: React.Dispatch<React.SetStateAction<number[][]>>;
13
12
  currentHighlightColumnIndex: number | undefined;
14
13
  setCurrentHighlightColumnIndex: React.Dispatch<React.SetStateAction<number | undefined>>;
15
- loadAll: Table3LoadAllHandler | undefined;
14
+ isSearching: boolean;
15
+ setIsSearching: React.Dispatch<React.SetStateAction<boolean>>;
16
16
  };
@@ -0,0 +1,13 @@
1
+ import { Cell as RTCell } from '@tanstack/react-table';
2
+ import { RowErrors, Table3CellValidationHandler, Table3RowValidationHandler } from '../../types';
3
+ export declare type Table3Validation<TType = unknown> = {
4
+ validate: (rowId: string, row: TType, cellId?: string) => Promise<void | RowErrors>;
5
+ setCellError: (rowId: string, cellId: string, error: string) => void;
6
+ setRowErrors: (rowId: string, errors: Record<string, string>) => void;
7
+ confirmErrors: (rowId: string) => void;
8
+ getCellError: <T extends TType>(cell: RTCell<T, unknown>) => string | undefined;
9
+ resetErrors: (rowId: string, cellId?: string) => void;
10
+ errors: Record<string, RowErrors> | null;
11
+ draftErrors: Record<string, RowErrors> | null;
12
+ };
13
+ export declare function useValidation<TType = unknown>(onCellValidate?: Table3CellValidationHandler<TType>, onRowValidate?: Table3RowValidationHandler<TType>): Table3Validation<TType>;
@@ -1,42 +1,47 @@
1
1
  import React from 'react';
2
2
  import { RowData } from '@tanstack/react-table';
3
- import { Table3ColumnAlignment, Table3ColumnRenderer, Table3Props, Table3ColumnHeaderMenu, Table3ColumnControlRenderer, Table3ColumnDataType, Table3ColumnClassNameHandler, Table3ColumnFooterRenderer, TableStrategy, Table3FilterComparator, Table3Settings } from '../types';
4
- import { useCurrentRow } from './features/useCurrentRow';
5
- import { usePauseHoverState } from './features/usePauseHoverState';
6
- import { useRowHeight } from './features/useRowHeight';
7
- import { useFontSize } from './features/useFontSize';
3
+ import { Table3ColumnAlignment, Table3ColumnRenderer, Table3Props, Table3ColumnHeaderMenu, Table3ColumnControlRenderer, Table3ColumnDataType, Table3ColumnClassNameHandler, Table3ColumnFooterRenderer, TableStrategy, Table3FilterComparator, Table3Settings, Table3Ref } from '../types';
4
+ import { useTableRowActive } from '../../../primitives/Table/useTable/features/useTableRowActive';
5
+ import { useTableRowHeight } from '../../../primitives/Table/useTable/features/useTableRowHeight';
6
+ import { useTableFontSize } from '../../../primitives/Table/useTable/features/useTableFontSize';
8
7
  import { useRowDrag } from './features/useRowDrag';
9
8
  import { useColumnFreezing } from './features/useColumnFreezing';
10
- import { useRowSelection } from './features/useRowSelection';
11
- import { useRowClick } from './features/useRowClick';
12
- import { useColumnOrdering } from './features/useColumnOrdering';
9
+ import { useTableRowSelection } from '../../../primitives/Table/useTable/features/useTableRowSelection';
10
+ import { useTableServerLoading } from '../../../primitives/Table/useTable/features/useTableServerLoading';
11
+ import { useTableRowClick } from '../../../primitives/Table/useTable/features/useTableRowClick';
12
+ import { useTableColumnOrdering } from '../../../primitives/Table/useTable/features/useTableColumnOrdering';
13
13
  import { useRowDrop } from './features/useRowDrop';
14
14
  import { useEditing } from './features/useEditing';
15
- import { usePrinting } from './features/usePrinting';
16
- import { useRowGoto } from './features/useRowGoto';
15
+ import { useTablePrinting } from '../../../primitives/Table/useTable/features/useTablePrinting';
16
+ import { useTableRowGoto } from '../../../primitives/Table/useTable/features/useTableRowGoto';
17
17
  import { useSearch } from './features/useSearch';
18
18
  import { useRowActions } from './features/useRowActions';
19
+ import { Table3Validation } from './features/useValidation';
20
+ import { usePauseShortcuts } from './features/usePauseShortcuts';
19
21
  declare module '@tanstack/table-core' {
20
22
  interface TableMeta<TData extends RowData> {
21
23
  columnFreezing: ReturnType<typeof useColumnFreezing>;
22
- columnOrdering: ReturnType<typeof useColumnOrdering>;
23
- currentRow: ReturnType<typeof useCurrentRow>;
24
+ columnOrdering: ReturnType<typeof useTableColumnOrdering>;
24
25
  editing: ReturnType<typeof useEditing>;
25
26
  enableFooter: boolean;
26
- fontSize: ReturnType<typeof useFontSize>;
27
+ fontSize: ReturnType<typeof useTableFontSize>;
27
28
  getSettings: () => Table3Settings;
28
- hoverState: ReturnType<typeof usePauseHoverState>;
29
29
  isPrinting: boolean;
30
30
  isUsingServer: boolean;
31
- printing: ReturnType<typeof usePrinting>;
31
+ printing: ReturnType<typeof useTablePrinting>;
32
32
  rowActions: ReturnType<typeof useRowActions>;
33
- rowClick: ReturnType<typeof useRowClick>;
33
+ rowActive: ReturnType<typeof useTableRowActive>;
34
+ rowClick: ReturnType<typeof useTableRowClick>;
34
35
  rowDrag: ReturnType<typeof useRowDrag>;
35
36
  rowDrop: ReturnType<typeof useRowDrop>;
36
- rowGoto: ReturnType<typeof useRowGoto>;
37
- rowHeight: ReturnType<typeof useRowHeight>;
38
- rowSelection: ReturnType<typeof useRowSelection>;
37
+ rowGoto: ReturnType<typeof useTableRowGoto>;
38
+ rowHeight: ReturnType<typeof useTableRowHeight>;
39
+ rowSelection: ReturnType<typeof useTableRowSelection>;
39
40
  search: ReturnType<typeof useSearch>;
41
+ server: ReturnType<typeof useTableServerLoading>;
42
+ shortcutsState: ReturnType<typeof usePauseShortcuts>;
43
+ tableRef: React.RefObject<Table3Ref>;
44
+ validation: Table3Validation<TData>;
40
45
  }
41
46
  interface ColumnMeta<TData extends RowData, TValue> {
42
47
  align?: Table3ColumnAlignment;
@@ -63,7 +68,7 @@ declare module '@tanstack/table-core' {
63
68
  scrollToIndex: TableStrategy['scrollToIndex'];
64
69
  }
65
70
  }
66
- export declare function useTable<TType = unknown>(props: Table3Props<TType>): {
71
+ export declare function useTable<TType = unknown>(props: Table3Props<TType>, ref: React.RefObject<Table3Ref>): {
67
72
  table: any;
68
73
  length: number;
69
74
  };
@@ -1,7 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { ColumnFilter as RTColumnFilter, ColumnOrderState, ColumnSizingState, ColumnSort as RTTableColumnSort, SortingState, VisibilityState, BuiltInSortingFn } from '@tanstack/react-table';
2
+ import { ColumnOrderState, ColumnSizingState, SortingState, VisibilityState, BuiltInSortingFn } from '@tanstack/react-table';
3
3
  import { MenuProps } from '../Menu/Menu';
4
4
  import { MenuItemProps } from '../Menu/components/Item';
5
+ import { TableColumnFilter, TableColumnSort, TableFilterHandler, TableFontSize, TableRef, TableRowClickHandler, TableRowGotoHandler, TableRowHeight, TableRowSelectHandler, TableServerLoadAllHandler, TableServerLoadPageHandler, TableSortHandler } from '../../primitives/Table/types';
6
+ import { ValueOf } from '../../types';
5
7
  export declare type Table3SortDirection = 'asc' | 'desc';
6
8
  export declare type Table3SortFn<TType = unknown> = ((rowA: TType, rowB: TType, columnId: string) => -1 | 0 | 1) | BuiltInSortingFn | 'auto';
7
9
  export declare type Table3ColumnRenderer<TValue = unknown, TType = unknown> = (value: TValue, row: TType) => JSX.Element | string | number | null;
@@ -17,12 +19,11 @@ export declare type Table3ColumnControlProps = {
17
19
  onBlur?: (value: any) => void;
18
20
  onFocus?: React.FocusEventHandler;
19
21
  readOnly?: boolean;
20
- ref: React.RefObject<HTMLElement>;
22
+ ref: React.RefObject<HTMLElement> | ((instance: HTMLElement | null | undefined) => void);
21
23
  setValue: (value: any) => void;
22
24
  value: any;
23
25
  };
24
26
  export declare type Table3ColumnControlRenderer<TType = unknown> = ((props: Table3ColumnControlProps, row?: TType) => JSX.Element) | 'datepicker' | 'input' | 'switch' | 'textarea';
25
- declare type ValueOf<T> = T[keyof T];
26
27
  export declare type Table3ColumnProps<TType = unknown> = ValueOf<{
27
28
  [K in keyof TType]: {
28
29
  accessor: K;
@@ -60,13 +61,13 @@ export declare type Table3GroupProps = {
60
61
  children: (JSX.Element | boolean | null | undefined)[];
61
62
  };
62
63
  export declare type DeprecatedRowDensity = 'compact' | 'normal' | 'comfortable' | 'spacious';
63
- export declare type Table3RowHeight = 'short' | 'medium' | 'tall' | 'extra-tall';
64
- export declare type Table3FontSize = 'small' | 'medium' | 'large';
65
- export declare type Table3RowClickHandler<TType = unknown> = (row: TType) => void;
64
+ export declare type Table3RowHeight = TableRowHeight;
65
+ export declare type Table3FontSize = TableFontSize;
66
+ export declare type Table3RowClickHandler<TType = unknown> = TableRowClickHandler<TType>;
66
67
  export declare type Table3RowDragHandler<TType = unknown> = (rows: TType[], showPlaceholder: (string: any) => void, setDataTransfer: (data: string) => void) => void;
67
68
  export declare type Table3RowDropHandler<TType = any> = (event: React.DragEvent, row: TType) => void;
68
69
  export declare type Table3RowExpansionRenderer<TType = unknown> = (row: TType) => (() => JSX.Element) | null;
69
- export declare type Table3RowSelectionHandler<TType = unknown> = (rows: TType[]) => void;
70
+ export declare type Table3RowSelectionHandler<TType = unknown> = TableRowSelectHandler<TType>;
70
71
  export declare type Table3RowActionRenderer<TType = unknown> = (row: TType) => JSX.Element | null;
71
72
  export declare type Table3Preset = 'display' | 'editable';
72
73
  export declare type Table3Settings = {
@@ -105,13 +106,16 @@ export declare type Table3Filter = {
105
106
  id: string | null;
106
107
  value: Table3FilterValue;
107
108
  };
108
- export declare type ColumnFilter = RTColumnFilter;
109
- export declare type Table3FilterHandler = (filters: ColumnFilter[]) => void;
110
- export declare type Table3LoadPageHandler = (pageIndex: number, sorting: Table3ColumnSort[], filters: ColumnFilter[], search: string | undefined) => Promise<void>;
111
- export declare type Table3LoadAllHandler = (sorting: Table3ColumnSort[], filters: ColumnFilter[], search: string | undefined) => Promise<void>;
112
- export declare type Table3RowGotoHandler = (column: string, query: string, sorting: Table3ColumnSort[], filters: ColumnFilter[], search: string | undefined) => Promise<number>;
113
- export declare type Table3ColumnSort = RTTableColumnSort;
114
- export declare type Table3SortHandler = (sorting: Table3ColumnSort[]) => void;
109
+ export declare type ColumnFilter = TableColumnFilter;
110
+ export declare type Table3FilterHandler = TableFilterHandler;
111
+ export declare type Table3LoadPageHandler = TableServerLoadPageHandler;
112
+ export declare type Table3LoadAllHandler = TableServerLoadAllHandler;
113
+ export declare type Table3RowGotoHandler = TableRowGotoHandler;
114
+ export declare type Table3ColumnSort = TableColumnSort;
115
+ export declare type Table3SortHandler = TableSortHandler;
116
+ export declare type RowErrors = Record<string, string>;
117
+ export declare type Table3CellValidationHandler<TType = unknown> = (cellValue: any, cellId: string, row: TType) => Promise<RowErrors | undefined | void>;
118
+ export declare type Table3RowValidationHandler<TType = unknown> = (row: TType) => Promise<RowErrors | undefined | void>;
115
119
  export declare type TableStrategy = {
116
120
  renderBody: () => JSX.Element | JSX.Element[] | null;
117
121
  scrollToIndex: (index: number, options?: {
@@ -169,10 +173,13 @@ export declare type Table3CommonProps<TType = unknown> = Partial<Table3Options>
169
173
  onFilter?: Table3FilterHandler;
170
174
  onSave?: Table3SaveHandler<TType>;
171
175
  onSort?: Table3SortHandler;
176
+ onCellValidate?: Table3CellValidationHandler<TType>;
177
+ onRowValidate?: Table3RowValidationHandler<TType>;
172
178
  preset?: Table3Preset;
173
179
  shortcuts?: Table3Shortcuts<TType>;
174
180
  toolbarLeft?: JSX.Element;
175
181
  toolbarRight?: JSX.Element;
182
+ rowIdentifier?: string;
176
183
  };
177
184
  interface Table3ClientProps<TType = unknown> extends Table3CommonProps<TType> {
178
185
  length?: never;
@@ -187,12 +194,8 @@ interface Table3ServerProps<TType = unknown> extends Table3CommonProps<TType> {
187
194
  pageSize?: number;
188
195
  }
189
196
  export declare type Table3Props<TType = unknown> = Table3ClientProps<TType> | Table3ServerProps<TType>;
190
- export declare type Table3Ref = HTMLDivElement & {
197
+ export declare type Table3Ref = TableRef & {
191
198
  instance: {
192
- resetFiltering: () => void;
193
- resetRowExpansion: () => void;
194
- resetRowSelection: () => void;
195
- resetSorting: () => void;
196
199
  toggleEditing: (enabled: boolean | undefined) => void;
197
200
  };
198
201
  };
@@ -262,6 +265,12 @@ export declare type Table3Texts = {
262
265
  progress: string;
263
266
  complete: string;
264
267
  };
268
+ clearChangesConfirmationDialog: {
269
+ title: string;
270
+ description: string;
271
+ cancel: string;
272
+ confirm: string;
273
+ };
265
274
  };
266
275
  filters: {
267
276
  button: string;
@@ -344,5 +353,18 @@ export declare type Table3Texts = {
344
353
  otherOptions: {
345
354
  tooltip: string;
346
355
  };
356
+ validation: {
357
+ index: string;
358
+ alert: {
359
+ unsavedEntries: (count?: number) => string;
360
+ incompleteAndHavntBeenSaved: (count?: number) => string;
361
+ };
362
+ resetFiltersDialog: {
363
+ title: string;
364
+ description: string;
365
+ cancel: string;
366
+ confirm: string;
367
+ };
368
+ };
347
369
  };
348
370
  export {};
@@ -2,3 +2,9 @@ export declare const focussableNodeNames: string[];
2
2
  export declare const focusableSelector: string;
3
3
  export declare const hasChanged: (value: any, newValue: any) => boolean;
4
4
  export declare const willRowMoveAfterSorting: (value: any, cell: any, rowIndex: any, rows: any, desc: any) => boolean;
5
+ export declare class LastCellIndex {
6
+ _value: string | null | undefined;
7
+ get value(): string | null | undefined;
8
+ set value(val: string | null | undefined);
9
+ }
10
+ export declare function getColumnIndex(element: Element): string | null | undefined;
@@ -0,0 +1,2 @@
1
+ import { Table3Ref } from '../types';
2
+ export declare function getTableLeftScrollDistance(tableElement: Table3Ref, cell: Element, frozenColumnIndex: number, isEditing?: boolean): number | null;