@economic/taco 2.16.0 → 2.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. package/dist/components/Table3/Table3.d.ts +0 -2
  2. package/dist/components/Table3/components/columns/cell/EditingControl.d.ts +1 -1
  3. package/dist/components/Table3/components/columns/header/Header.d.ts +1 -1
  4. package/dist/components/Table3/components/columns/styles.d.ts +2 -2
  5. package/dist/components/Table3/components/rows/Row.d.ts +3 -1
  6. package/dist/components/Table3/hooks/features/useSearch.d.ts +1 -3
  7. package/dist/components/Table3/hooks/useTable.d.ts +21 -20
  8. package/dist/components/Table3/types.d.ts +15 -18
  9. package/dist/components/Table3/util/scrolling.d.ts +2 -0
  10. package/dist/esm/packages/taco/src/components/Banner/Banner.js +2 -2
  11. package/dist/esm/packages/taco/src/components/Banner/Banner.js.map +1 -1
  12. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +4 -4
  13. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
  14. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +3 -3
  15. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
  16. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +2 -1
  17. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
  18. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +6 -6
  19. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
  20. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +3 -3
  21. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
  22. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +7 -7
  23. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
  24. package/dist/esm/packages/taco/src/components/Field/Field.js +2 -2
  25. package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
  26. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js +2 -2
  27. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js.map +1 -1
  28. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +4 -4
  29. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  30. package/dist/esm/packages/taco/src/components/Header/components/Link.js +2 -2
  31. package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
  32. package/dist/esm/packages/taco/src/components/Icon/Icon.js +2 -2
  33. package/dist/esm/packages/taco/src/components/Icon/Icon.js.map +1 -1
  34. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js +2 -2
  35. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  36. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +6 -6
  37. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
  38. package/dist/esm/packages/taco/src/components/Menu/components/Item.js +4 -4
  39. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  40. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js +2 -2
  41. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
  42. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js +3 -3
  43. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js.map +1 -1
  44. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js +2 -2
  45. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js.map +1 -1
  46. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +1 -1
  47. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  48. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js +2 -2
  49. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js.map +1 -1
  50. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js +5 -5
  51. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js.map +1 -1
  52. package/dist/esm/packages/taco/src/components/Popover/Popover.js +2 -2
  53. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  54. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js +2 -2
  55. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js.map +1 -1
  56. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +8 -8
  57. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
  58. package/dist/esm/packages/taco/src/components/Select/useSelect.js +2 -2
  59. package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
  60. package/dist/esm/packages/taco/src/components/Select2/Select2.js +7 -7
  61. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  62. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +8 -8
  63. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  64. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +5 -5
  65. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  66. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +10 -10
  67. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  68. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +2 -2
  69. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
  70. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js +3 -3
  71. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
  72. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +2 -2
  73. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  74. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js +10 -10
  75. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  76. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js +2 -2
  77. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js.map +1 -1
  78. package/dist/esm/packages/taco/src/components/Table3/Table3.js +30 -29
  79. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  80. package/dist/esm/packages/taco/src/components/Table3/components/alert/ErrorAlert.js +3 -3
  81. package/dist/esm/packages/taco/src/components/Table3/components/alert/ErrorAlert.js.map +1 -1
  82. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Cell.js +6 -6
  83. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Cell.js.map +1 -1
  84. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js +2 -2
  85. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js.map +1 -1
  86. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js +13 -14
  87. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js.map +1 -1
  88. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js +27 -3
  89. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js.map +1 -1
  90. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js +2 -2
  91. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js.map +1 -1
  92. package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Footer.js +2 -2
  93. package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Footer.js.map +1 -1
  94. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Group.js +1 -1
  95. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Group.js.map +1 -1
  96. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js +9 -9
  97. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js.map +1 -1
  98. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js +37 -6
  99. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js.map +1 -1
  100. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js +12 -12
  101. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js.map +1 -1
  102. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Drag.js +2 -2
  103. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Drag.js.map +1 -1
  104. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js +7 -7
  105. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js.map +1 -1
  106. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Expansion.js +3 -3
  107. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Expansion.js.map +1 -1
  108. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js +3 -3
  109. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js.map +1 -1
  110. package/dist/esm/packages/taco/src/components/Table3/components/columns/styles.js +2 -13
  111. package/dist/esm/packages/taco/src/components/Table3/components/columns/styles.js.map +1 -1
  112. package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js +32 -30
  113. package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js.map +1 -1
  114. package/dist/esm/packages/taco/src/components/Table3/components/rows/SkeletonRow.js +2 -2
  115. package/dist/esm/packages/taco/src/components/Table3/components/rows/SkeletonRow.js.map +1 -1
  116. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/ColumnSettings.js +8 -6
  117. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/ColumnSettings.js.map +1 -1
  118. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js +15 -7
  119. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js.map +1 -1
  120. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.js +2 -2
  121. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterColumn.js.map +1 -1
  122. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.js +2 -2
  123. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.js.map +1 -1
  124. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js +16 -16
  125. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js.map +1 -1
  126. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintIFrame.js +1 -0
  127. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintIFrame.js.map +1 -1
  128. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Search.js +10 -8
  129. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Search.js.map +1 -1
  130. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Settings.js +8 -8
  131. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Settings.js.map +1 -1
  132. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSearch.js +1 -2
  133. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSearch.js.map +1 -1
  134. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useEditingStateListener.js +3 -3
  135. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useEditingStateListener.js.map +1 -1
  136. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js +1 -49
  137. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js.map +1 -1
  138. package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js +0 -1
  139. package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js.map +1 -1
  140. package/dist/esm/packages/taco/src/components/Table3/hooks/useCssVars.js +0 -2
  141. package/dist/esm/packages/taco/src/components/Table3/hooks/useCssVars.js.map +1 -1
  142. package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js +127 -109
  143. package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js.map +1 -1
  144. package/dist/esm/packages/taco/src/components/Table3/strategies/virtualised.js +3 -3
  145. package/dist/esm/packages/taco/src/components/Table3/strategies/virtualised.js.map +1 -1
  146. package/dist/esm/packages/taco/src/components/Table3/types.js.map +1 -1
  147. package/dist/esm/packages/taco/src/components/Table3/util/scrolling.js +53 -0
  148. package/dist/esm/packages/taco/src/components/Table3/util/scrolling.js.map +1 -0
  149. package/dist/esm/packages/taco/src/components/Tag/Tag.js +4 -4
  150. package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
  151. package/dist/esm/packages/taco/src/components/Toast/Toaster.js +2 -2
  152. package/dist/esm/packages/taco/src/components/Toast/Toaster.js.map +1 -1
  153. package/dist/esm/packages/taco/src/components/Tour/Tour.js +4 -4
  154. package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
  155. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js +2 -2
  156. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js.map +1 -1
  157. package/dist/esm/packages/taco/src/index.js +2 -1
  158. package/dist/esm/packages/taco/src/index.js.map +1 -1
  159. package/dist/esm/packages/taco/src/primitives/Table/types.js +10 -0
  160. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -0
  161. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableColumnOrdering.js +8 -0
  162. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableColumnOrdering.js.map +1 -0
  163. package/dist/esm/packages/taco/src/{components/Table3/hooks/features/useFontSize.js → primitives/Table/useTable/features/useTableFontSize.js} +3 -3
  164. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableFontSize.js.map +1 -0
  165. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTablePrinting.js +14 -0
  166. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTablePrinting.js.map +1 -0
  167. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowActive.js +100 -0
  168. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowActive.js.map +1 -0
  169. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowClick.js +30 -0
  170. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowClick.js.map +1 -0
  171. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowGoto.js +9 -0
  172. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowGoto.js.map +1 -0
  173. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowHeight.js +13 -0
  174. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowHeight.js.map +1 -0
  175. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowSelection.js +32 -0
  176. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowSelection.js.map +1 -0
  177. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableServerLoading.js +11 -0
  178. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableServerLoading.js.map +1 -0
  179. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableDataListener.js +15 -0
  180. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableDataListener.js.map +1 -0
  181. package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useFilteringStateListener.js → primitives/Table/useTable/listeners/useTableFilterListener.js} +3 -3
  182. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableFilterListener.js.map +1 -0
  183. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableFontSizeListener.js +40 -0
  184. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableFontSizeListener.js.map +1 -0
  185. package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useRowSelectionListener.js → primitives/Table/useTable/listeners/useTableRowSelectionListener.js} +5 -6
  186. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableRowSelectionListener.js.map +1 -0
  187. package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useServerLoadingListener.js → primitives/Table/useTable/listeners/useTableServerLoadingListener.js} +3 -3
  188. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableServerLoadingListener.js.map +1 -0
  189. package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useShortcutsListener.js → primitives/Table/useTable/listeners/useTableShortcutsListener.js} +7 -7
  190. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableShortcutsListener.js.map +1 -0
  191. package/dist/esm/packages/taco/src/{components/Table3/hooks/listeners/useSortingStateListener.js → primitives/Table/useTable/listeners/useTableSortingListener.js} +6 -4
  192. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableSortingListener.js.map +1 -0
  193. package/dist/esm/packages/taco/src/{components/Table3/hooks/features/useColumnOrdering.js → primitives/Table/useTable/util/columns.js} +24 -15
  194. package/dist/esm/packages/taco/src/primitives/Table/useTable/util/columns.js.map +1 -0
  195. package/dist/esm/packages/taco/src/types.js +6 -0
  196. package/dist/esm/packages/taco/src/types.js.map +1 -0
  197. package/dist/esm/packages/taco/src/utils/date.js +0 -1
  198. package/dist/esm/packages/taco/src/utils/date.js.map +1 -1
  199. package/dist/primitives/Table/types.d.ts +35 -0
  200. package/dist/primitives/Table/useTable/features/useTableColumnOrdering.d.ts +3 -0
  201. package/dist/primitives/Table/useTable/features/useTableFontSize.d.ts +7 -0
  202. package/dist/primitives/Table/useTable/features/useTablePrinting.d.ts +7 -0
  203. package/dist/primitives/Table/useTable/features/useTableRowActive.d.ts +12 -0
  204. package/dist/primitives/Table/useTable/features/useTableRowClick.d.ts +7 -0
  205. package/dist/primitives/Table/useTable/features/useTableRowGoto.d.ts +5 -0
  206. package/dist/primitives/Table/useTable/features/useTableRowHeight.d.ts +7 -0
  207. package/dist/primitives/Table/useTable/features/useTableRowSelection.d.ts +6 -0
  208. package/dist/primitives/Table/useTable/features/useTableServerLoading.d.ts +6 -0
  209. package/dist/primitives/Table/useTable/listeners/useTableDataListener.d.ts +2 -0
  210. package/dist/primitives/Table/useTable/listeners/useTableFilterListener.d.ts +3 -0
  211. package/dist/primitives/Table/useTable/listeners/useTableFontSizeListener.d.ts +2 -0
  212. package/dist/primitives/Table/useTable/listeners/useTableRowSelectionListener.d.ts +3 -0
  213. package/dist/primitives/Table/useTable/listeners/useTableServerLoadingListener.d.ts +3 -0
  214. package/dist/primitives/Table/useTable/listeners/useTableShortcutsListener.d.ts +3 -0
  215. package/dist/primitives/Table/useTable/listeners/useTableSortingListener.d.ts +3 -0
  216. package/dist/primitives/Table/useTable/util/columns.d.ts +4 -0
  217. package/dist/taco.cjs.development.js +827 -711
  218. package/dist/taco.cjs.development.js.map +1 -1
  219. package/dist/taco.cjs.production.min.js +1 -1
  220. package/dist/taco.cjs.production.min.js.map +1 -1
  221. package/dist/types.d.ts +5 -0
  222. package/package.json +3 -3
  223. package/types.json +11267 -13766
  224. package/dist/components/Table3/hooks/features/useColumnOrdering.d.ts +0 -6
  225. package/dist/components/Table3/hooks/features/useCurrentRow.d.ts +0 -11
  226. package/dist/components/Table3/hooks/features/useFontSize.d.ts +0 -7
  227. package/dist/components/Table3/hooks/features/usePauseHoverState.d.ts +0 -6
  228. package/dist/components/Table3/hooks/features/usePrinting.d.ts +0 -8
  229. package/dist/components/Table3/hooks/features/useRowClick.d.ts +0 -6
  230. package/dist/components/Table3/hooks/features/useRowGoto.d.ts +0 -5
  231. package/dist/components/Table3/hooks/features/useRowHeight.d.ts +0 -7
  232. package/dist/components/Table3/hooks/features/useRowSelection.d.ts +0 -6
  233. package/dist/components/Table3/hooks/listeners/useCurrentRowListener.d.ts +0 -2
  234. package/dist/components/Table3/hooks/listeners/useFilteringStateListener.d.ts +0 -3
  235. package/dist/components/Table3/hooks/listeners/useRowSelectionListener.d.ts +0 -3
  236. package/dist/components/Table3/hooks/listeners/useServerLoadingListener.d.ts +0 -3
  237. package/dist/components/Table3/hooks/listeners/useShortcutsListener.d.ts +0 -3
  238. package/dist/components/Table3/hooks/listeners/useSortingStateListener.d.ts +0 -3
  239. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useColumnOrdering.js.map +0 -1
  240. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useCurrentRow.js +0 -93
  241. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useCurrentRow.js.map +0 -1
  242. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useFontSize.js.map +0 -1
  243. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseHoverState.js +0 -22
  244. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePauseHoverState.js.map +0 -1
  245. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePrinting.js +0 -14
  246. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePrinting.js.map +0 -1
  247. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowClick.js +0 -25
  248. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowClick.js.map +0 -1
  249. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowGoto.js +0 -9
  250. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowGoto.js.map +0 -1
  251. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowHeight.js +0 -27
  252. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowHeight.js.map +0 -1
  253. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowSelection.js +0 -32
  254. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowSelection.js.map +0 -1
  255. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useCurrentRowListener.js +0 -15
  256. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useCurrentRowListener.js.map +0 -1
  257. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useFilteringStateListener.js.map +0 -1
  258. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useRowSelectionListener.js.map +0 -1
  259. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useServerLoadingListener.js.map +0 -1
  260. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useShortcutsListener.js.map +0 -1
  261. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSortingStateListener.js.map +0 -1
@@ -3,15 +3,17 @@ import { useLazyEffect } from '../../../../hooks/useLazyEffect.js';
3
3
  // we use a listener, and not the internal "controlled" change handlers because we don't actually want consumers
4
4
  // to control the state outside the table. this listener is really here to let the consumer make a server request
5
5
  // and provide the server with the sorting state, so that it can sort server side
6
- function useSortingStateListener(table, onSort) {
6
+ function useTableSortingListener(table, onSort) {
7
7
  const sorting = table.getState().sorting;
8
8
  useLazyEffect(() => {
9
- table.resetRowSelection();
10
9
  if (table.options.enableSorting && typeof onSort === 'function') {
11
10
  onSort(sorting);
11
+ if (table.options.enableRowSelection) {
12
+ table.resetRowSelection();
13
+ }
12
14
  }
13
15
  }, [table.options.enableSorting, sorting]);
14
16
  }
15
17
 
16
- export { useSortingStateListener };
17
- //# sourceMappingURL=useSortingStateListener.js.map
18
+ export { useTableSortingListener };
19
+ //# sourceMappingURL=useTableSortingListener.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTableSortingListener.js","sources":["../../../../../../../../../src/primitives/Table/useTable/listeners/useTableSortingListener.ts"],"sourcesContent":["import { Table as ReactTable } from '@tanstack/react-table';\nimport { useLazyEffect } from '../../../../hooks/useLazyEffect';\nimport { TableSortHandler } from '../../types';\n\n// we use a listener, and not the internal \"controlled\" change handlers because we don't actually want consumers\n// to control the state outside the table. this listener is really here to let the consumer make a server request\n// and provide the server with the sorting state, so that it can sort server side\nexport function useTableSortingListener<TType = unknown>(table: ReactTable<TType>, onSort?: TableSortHandler) {\n const sorting = table.getState().sorting;\n\n useLazyEffect(() => {\n if (table.options.enableSorting && typeof onSort === 'function') {\n onSort(sorting);\n\n if (table.options.enableRowSelection) {\n table.resetRowSelection();\n }\n }\n }, [table.options.enableSorting, sorting]);\n}\n"],"names":["useTableSortingListener","table","onSort","sorting","getState","useLazyEffect","options","enableSorting","enableRowSelection","resetRowSelection"],"mappings":";;AAIA;AACA;AACA;SACgBA,uBAAuBA,CAAkBC,KAAwB,EAAEC,MAAyB;EACxG,MAAMC,OAAO,GAAGF,KAAK,CAACG,QAAQ,EAAE,CAACD,OAAO;EAExCE,aAAa,CAAC;IACV,IAAIJ,KAAK,CAACK,OAAO,CAACC,aAAa,IAAI,OAAOL,MAAM,KAAK,UAAU,EAAE;MAC7DA,MAAM,CAACC,OAAO,CAAC;MAEf,IAAIF,KAAK,CAACK,OAAO,CAACE,kBAAkB,EAAE;QAClCP,KAAK,CAACQ,iBAAiB,EAAE;;;GAGpC,EAAE,CAACR,KAAK,CAACK,OAAO,CAACC,aAAa,EAAEJ,OAAO,CAAC,CAAC;AAC9C;;;;"}
@@ -1,16 +1,23 @@
1
- import { COLUMN_ID } from '../../components/columns/internal/Actions.js';
2
- import { COLUMN_ID as COLUMN_ID$1 } from '../../components/columns/internal/EditingActions.js';
1
+ import { TableFontSizes } from '../../types.js';
3
2
 
4
- function useColumnOrdering(options) {
5
- return {
6
- isEnabled: options.enableColumnOrdering
7
- };
8
- }
9
- function ensureOrdering(columns, settingsOrder) {
10
- // internal column come with a defined order
3
+ // column widths
4
+ const getCellMinWidth = (fontSize = 'medium') => {
5
+ switch (fontSize) {
6
+ case TableFontSizes.small:
7
+ return 57;
8
+ case TableFontSizes.large:
9
+ return 83;
10
+ default:
11
+ case TableFontSizes.medium:
12
+ return 72;
13
+ }
14
+ };
15
+ // ordering
16
+ function ensureOrdering(columns, internalColumnsPinnedToTheRight, settingsOrder) {
17
+ // internal columns come with a defined order
11
18
  const internalColumns = columns.filter(column => {
12
19
  var _column$id;
13
- return ((_column$id = column.id) === null || _column$id === void 0 ? void 0 : _column$id.startsWith('__')) && column.id !== COLUMN_ID && column.id !== COLUMN_ID$1;
20
+ return ((_column$id = column.id) === null || _column$id === void 0 ? void 0 : _column$id.startsWith('__')) && !internalColumnsPinnedToTheRight.includes(column.id);
14
21
  }).map(column => column.id);
15
22
  // columns with ordering disabled should be moved to the front
16
23
  const orderingDisabled = [];
@@ -35,11 +42,13 @@ function ensureOrdering(columns, settingsOrder) {
35
42
  });
36
43
  const order = [...internalColumns, ...orderingDisabled, ...orderingEnabled];
37
44
  // actions should always be last, enforce that
38
- if (columns.findIndex(column => column.id === COLUMN_ID || column.id === COLUMN_ID$1) > -1) {
39
- order.push(COLUMN_ID);
40
- }
45
+ internalColumnsPinnedToTheRight.forEach(id => {
46
+ if (columns.findIndex(column => column.id === id) > -1) {
47
+ order.push(id);
48
+ }
49
+ });
41
50
  return order;
42
51
  }
43
52
 
44
- export { ensureOrdering, useColumnOrdering };
45
- //# sourceMappingURL=useColumnOrdering.js.map
53
+ export { ensureOrdering, getCellMinWidth };
54
+ //# sourceMappingURL=columns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"columns.js","sources":["../../../../../../../../../src/primitives/Table/useTable/util/columns.ts"],"sourcesContent":["import { ColumnDef as ReactTableColumnDef } from '@tanstack/react-table';\nimport { TableFontSize, TableFontSizes } from '../../types';\n\n// column widths\nexport const getCellMinWidth = (fontSize: TableFontSize = 'medium') => {\n switch (fontSize) {\n case TableFontSizes.small:\n return 57;\n\n case TableFontSizes.large:\n return 83;\n\n default:\n case TableFontSizes.medium:\n return 72;\n }\n};\n\n// ordering\nexport function ensureOrdering<TType = unknown>(\n columns: ReactTableColumnDef<TType>[],\n internalColumnsPinnedToTheRight: string[],\n settingsOrder: string[] | undefined\n): string[] {\n // internal columns come with a defined order\n const internalColumns = columns\n .filter(column => column.id?.startsWith('__') && !internalColumnsPinnedToTheRight.includes(column.id))\n .map(column => column.id) as string[];\n\n // columns with ordering disabled should be moved to the front\n const orderingDisabled: string[] = [];\n const orderingEnabled: string[] = [];\n\n let orderedColumns = columns;\n\n // if settings is defined, make sure the columns that are actual children are sorted by it\n if (Array.isArray(settingsOrder)) {\n orderedColumns = columns.slice().sort(\n // the magic >>> 0 here ensures that columns that aren't found in settings, but are children, are pushed to the end\n (a, b) => (settingsOrder.indexOf(a.id as string) >>> 0) - (settingsOrder.indexOf(b.id as string) >>> 0)\n );\n }\n\n orderedColumns.forEach(column => {\n if (column.id?.startsWith('__')) {\n return;\n }\n\n if (column.meta?.enableOrdering) {\n orderingEnabled.push(column.id as string);\n } else {\n orderingDisabled.push(column.id as string);\n }\n });\n\n const order = [...internalColumns, ...orderingDisabled, ...orderingEnabled];\n\n // actions should always be last, enforce that\n internalColumnsPinnedToTheRight.forEach(id => {\n if (columns.findIndex(column => column.id === id) > -1) {\n order.push(id);\n }\n });\n\n return order;\n}\n"],"names":["getCellMinWidth","fontSize","TableFontSizes","small","large","medium","ensureOrdering","columns","internalColumnsPinnedToTheRight","settingsOrder","internalColumns","filter","column","_column$id","id","startsWith","includes","map","orderingDisabled","orderingEnabled","orderedColumns","Array","isArray","slice","sort","a","b","indexOf","forEach","_column$id2","_column$meta","meta","enableOrdering","push","order","findIndex"],"mappings":";;AAGA;MACaA,eAAe,GAAGA,CAACC,WAA0B,QAAQ;EAC9D,QAAQA,QAAQ;IACZ,KAAKC,cAAc,CAACC,KAAK;MACrB,OAAO,EAAE;IAEb,KAAKD,cAAc,CAACE,KAAK;MACrB,OAAO,EAAE;IAEb;IACA,KAAKF,cAAc,CAACG,MAAM;MACtB,OAAO,EAAE;;AAErB;AAEA;SACgBC,cAAcA,CAC1BC,OAAqC,EACrCC,+BAAyC,EACzCC,aAAmC;;EAGnC,MAAMC,eAAe,GAAGH,OAAO,CAC1BI,MAAM,CAACC,MAAM;IAAA,IAAAC,UAAA;IAAA,OAAI,EAAAA,UAAA,GAAAD,MAAM,CAACE,EAAE,cAAAD,UAAA,uBAATA,UAAA,CAAWE,UAAU,CAAC,IAAI,CAAC,KAAI,CAACP,+BAA+B,CAACQ,QAAQ,CAACJ,MAAM,CAACE,EAAE,CAAC;IAAC,CACrGG,GAAG,CAACL,MAAM,IAAIA,MAAM,CAACE,EAAE,CAAa;;EAGzC,MAAMI,gBAAgB,GAAa,EAAE;EACrC,MAAMC,eAAe,GAAa,EAAE;EAEpC,IAAIC,cAAc,GAAGb,OAAO;;EAG5B,IAAIc,KAAK,CAACC,OAAO,CAACb,aAAa,CAAC,EAAE;IAC9BW,cAAc,GAAGb,OAAO,CAACgB,KAAK,EAAE,CAACC,IAAI;;IAEjC,CAACC,CAAC,EAAEC,CAAC,KAAK,CAACjB,aAAa,CAACkB,OAAO,CAACF,CAAC,CAACX,EAAY,CAAC,KAAK,CAAC,KAAKL,aAAa,CAACkB,OAAO,CAACD,CAAC,CAACZ,EAAY,CAAC,KAAK,CAAC,CAAC,CAC1G;;EAGLM,cAAc,CAACQ,OAAO,CAAChB,MAAM;;IACzB,KAAAiB,WAAA,GAAIjB,MAAM,CAACE,EAAE,cAAAe,WAAA,eAATA,WAAA,CAAWd,UAAU,CAAC,IAAI,CAAC,EAAE;MAC7B;;IAGJ,KAAAe,YAAA,GAAIlB,MAAM,CAACmB,IAAI,cAAAD,YAAA,eAAXA,YAAA,CAAaE,cAAc,EAAE;MAC7Bb,eAAe,CAACc,IAAI,CAACrB,MAAM,CAACE,EAAY,CAAC;KAC5C,MAAM;MACHI,gBAAgB,CAACe,IAAI,CAACrB,MAAM,CAACE,EAAY,CAAC;;GAEjD,CAAC;EAEF,MAAMoB,KAAK,GAAG,CAAC,GAAGxB,eAAe,EAAE,GAAGQ,gBAAgB,EAAE,GAAGC,eAAe,CAAC;;EAG3EX,+BAA+B,CAACoB,OAAO,CAACd,EAAE;IACtC,IAAIP,OAAO,CAAC4B,SAAS,CAACvB,MAAM,IAAIA,MAAM,CAACE,EAAE,KAAKA,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;MACpDoB,KAAK,CAACD,IAAI,CAACnB,EAAE,CAAC;;GAErB,CAAC;EAEF,OAAOoB,KAAK;AAChB;;;;"}
@@ -0,0 +1,6 @@
1
+ import React__default from 'react';
2
+
3
+ const fixedForwardRef = React__default.forwardRef;
4
+
5
+ export { fixedForwardRef };
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":["../../../../../src/types.ts"],"sourcesContent":["import React from 'react';\nimport { AVAILABLE_COLORS } from './utils/tailwind';\n\nexport type Appearance = 'default' | 'primary' | 'danger' | 'ghost' | 'discrete' | 'transparent';\nexport type State = 'default' | 'success' | 'error' | 'warning' | 'information';\nexport type Locale = 'en-GB' | 'da-DK' | 'sv-SE' | 'no-NO';\nexport type Orientation = 'horizontal' | 'vertical';\nexport type Align = 'start' | 'center' | 'end';\nexport type Placement = 'right' | 'left' | 'top' | 'bottom';\nexport type Color = (typeof AVAILABLE_COLORS)[number];\n\n// helpers\ntype FixedForwardRef = <T, P = {}>(\n render: (props: P, ref: React.Ref<T>) => JSX.Element\n) => (props: P & React.RefAttributes<T>) => JSX.Element;\n\nexport const fixedForwardRef = React.forwardRef as FixedForwardRef;\n\nexport type ValueOf<T> = T[keyof T];\n"],"names":["fixedForwardRef","React","forwardRef"],"mappings":";;MAgBaA,eAAe,GAAGC,cAAK,CAACC;;;;"}
@@ -54,7 +54,6 @@ const parseFromCustomString = (date = '', mask = 'dd.mm.yy') => {
54
54
  Object.is(day, NaN) ? currentDate.getDate() : day, /* hours */12, /* minutes */0 // set to midday to avoid UTC offset causing dates to be mismatched server side
55
55
  );
56
56
  };
57
-
58
57
  const parseFromISOString = date => {
59
58
  const tempDate = new Date(date);
60
59
  return isValid(tempDate) ? parseFromCustomString(format(new Date(date))) : undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"date.js","sources":["../../../../../../src/utils/date.ts"],"sourcesContent":["import { isDate, toDate, isValid } from 'date-fns';\n\nexport const isWeakEqual = (leftDate: Date, rightDate: Date) => {\n return (\n leftDate.getFullYear() === rightDate.getFullYear() &&\n leftDate.getMonth() === rightDate.getMonth() &&\n leftDate.getDay() === rightDate.getDay()\n );\n};\n\nexport const format = (date: Date | undefined, mask = 'dd.mm.yy'): string | undefined => {\n if (!date) {\n return undefined;\n }\n\n const value = isDate(date) ? date : toDate(date);\n\n if (!isValid(value)) {\n return undefined;\n }\n\n const pad = (v: number): string => (String(v).length === 1 ? `0${v}` : v.toString());\n\n return mask\n .replace('dd', pad(value.getDate()))\n .replace('mm', pad(value.getMonth() + 1))\n .replace('yy', String(value.getFullYear()).slice(2));\n};\n\nexport const parseFromCustomString = (date = '', mask = 'dd.mm.yy'): Date | undefined => {\n if (!date || !date.length) {\n return undefined;\n }\n\n const sanitizedMask = mask.split(/[^dmy]/);\n const dd = sanitizedMask.findIndex(x => x === 'dd');\n const mm = sanitizedMask.findIndex(x => x === 'mm');\n const yy = sanitizedMask.findIndex(x => x === 'yy' || x === 'yyyy');\n\n let day;\n let month;\n let year;\n\n const getFullYear = (y: string): string => {\n if (y && y.length === 2) {\n const z = Number.parseInt(y, 10);\n\n return z > 50 ? `19${y}` : `20${y}`;\n }\n\n return y;\n };\n\n const inputParts = date.split(/\\D/);\n\n if (inputParts.length === 1) {\n const fullDate = inputParts[0];\n const unseparatedMask = mask.replace(/[^dmy]/g, '');\n\n day = fullDate.slice(unseparatedMask.indexOf('d'), unseparatedMask.lastIndexOf('d') + 1);\n month = fullDate.slice(unseparatedMask.indexOf('m'), unseparatedMask.lastIndexOf('m') + 1);\n year = getFullYear(fullDate.slice(unseparatedMask.indexOf('y'), unseparatedMask.lastIndexOf('y') + 3)); // account for full years\n } else {\n day = inputParts[dd];\n month = inputParts[mm];\n year = getFullYear(inputParts[yy]);\n }\n\n day = Number.parseInt(day, 10);\n month = Number.parseInt(month, 10);\n year = Number.parseInt(year, 10);\n\n const currentDate = new Date();\n\n return new Date(\n /* year */ Object.is(year, NaN) ? currentDate.getFullYear() : year,\n /* month */ Object.is(month, NaN) ? currentDate.getMonth() : month - 1, // months are zero based in javascript, so subtract a day\n /* day */ Object.is(day, NaN) ? currentDate.getDate() : day,\n /* hours */ 12,\n /* minutes */ 0 // set to midday to avoid UTC offset causing dates to be mismatched server side\n );\n};\n\nexport const parseFromISOString = (date: string): Date | undefined => {\n const tempDate = new Date(date);\n return isValid(tempDate) ? parseFromCustomString(format(new Date(date))) : undefined;\n};\n"],"names":["isWeakEqual","leftDate","rightDate","getFullYear","getMonth","getDay","format","date","mask","undefined","value","isDate","toDate","isValid","pad","v","String","length","toString","replace","getDate","slice","parseFromCustomString","sanitizedMask","split","dd","findIndex","x","mm","yy","day","month","year","y","z","Number","parseInt","inputParts","fullDate","unseparatedMask","indexOf","lastIndexOf","currentDate","Date","Object","is","NaN","parseFromISOString","tempDate"],"mappings":";;MAEaA,WAAW,GAAGA,CAACC,QAAc,EAAEC,SAAe;EACvD,OACID,QAAQ,CAACE,WAAW,EAAE,KAAKD,SAAS,CAACC,WAAW,EAAE,IAClDF,QAAQ,CAACG,QAAQ,EAAE,KAAKF,SAAS,CAACE,QAAQ,EAAE,IAC5CH,QAAQ,CAACI,MAAM,EAAE,KAAKH,SAAS,CAACG,MAAM,EAAE;AAEhD;MAEaC,MAAM,GAAGA,CAACC,IAAsB,EAAEC,IAAI,GAAG,UAAU;EAC5D,IAAI,CAACD,IAAI,EAAE;IACP,OAAOE,SAAS;;EAGpB,MAAMC,KAAK,GAAGC,MAAM,CAACJ,IAAI,CAAC,GAAGA,IAAI,GAAGK,MAAM,CAACL,IAAI,CAAC;EAEhD,IAAI,CAACM,OAAO,CAACH,KAAK,CAAC,EAAE;IACjB,OAAOD,SAAS;;EAGpB,MAAMK,GAAG,GAAIC,CAAS,IAAcC,MAAM,CAACD,CAAC,CAAC,CAACE,MAAM,KAAK,CAAC,OAAOF,GAAG,GAAGA,CAAC,CAACG,QAAQ,EAAG;EAEpF,OAAOV,IAAI,CACNW,OAAO,CAAC,IAAI,EAAEL,GAAG,CAACJ,KAAK,CAACU,OAAO,EAAE,CAAC,CAAC,CACnCD,OAAO,CAAC,IAAI,EAAEL,GAAG,CAACJ,KAAK,CAACN,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,CACxCe,OAAO,CAAC,IAAI,EAAEH,MAAM,CAACN,KAAK,CAACP,WAAW,EAAE,CAAC,CAACkB,KAAK,CAAC,CAAC,CAAC,CAAC;AAC5D;MAEaC,qBAAqB,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,CAAC,GAAG1B,qBAAqB,CAAChB,MAAM,CAAC,IAAIqC,IAAI,CAACpC,IAAI,CAAC,CAAC,CAAC,GAAGE,SAAS;AACxF;;;;"}
1
+ {"version":3,"file":"date.js","sources":["../../../../../../src/utils/date.ts"],"sourcesContent":["import { isDate, toDate, isValid } from 'date-fns';\n\nexport const isWeakEqual = (leftDate: Date, rightDate: Date) => {\n return (\n leftDate.getFullYear() === rightDate.getFullYear() &&\n leftDate.getMonth() === rightDate.getMonth() &&\n leftDate.getDay() === rightDate.getDay()\n );\n};\n\nexport const format = (date: Date | undefined, mask = 'dd.mm.yy'): string | undefined => {\n if (!date) {\n return undefined;\n }\n\n const value = isDate(date) ? date : toDate(date);\n\n if (!isValid(value)) {\n return undefined;\n }\n\n const pad = (v: number): string => (String(v).length === 1 ? `0${v}` : v.toString());\n\n return mask\n .replace('dd', pad(value.getDate()))\n .replace('mm', pad(value.getMonth() + 1))\n .replace('yy', String(value.getFullYear()).slice(2));\n};\n\nexport const parseFromCustomString = (date = '', mask = 'dd.mm.yy'): Date | undefined => {\n if (!date || !date.length) {\n return undefined;\n }\n\n const sanitizedMask = mask.split(/[^dmy]/);\n const dd = sanitizedMask.findIndex(x => x === 'dd');\n const mm = sanitizedMask.findIndex(x => x === 'mm');\n const yy = sanitizedMask.findIndex(x => x === 'yy' || x === 'yyyy');\n\n let day;\n let month;\n let year;\n\n const getFullYear = (y: string): string => {\n if (y && y.length === 2) {\n const z = Number.parseInt(y, 10);\n\n return z > 50 ? `19${y}` : `20${y}`;\n }\n\n return y;\n };\n\n const inputParts = date.split(/\\D/);\n\n if (inputParts.length === 1) {\n const fullDate = inputParts[0];\n const unseparatedMask = mask.replace(/[^dmy]/g, '');\n\n day = fullDate.slice(unseparatedMask.indexOf('d'), unseparatedMask.lastIndexOf('d') + 1);\n month = fullDate.slice(unseparatedMask.indexOf('m'), unseparatedMask.lastIndexOf('m') + 1);\n year = getFullYear(fullDate.slice(unseparatedMask.indexOf('y'), unseparatedMask.lastIndexOf('y') + 3)); // account for full years\n } else {\n day = inputParts[dd];\n month = inputParts[mm];\n year = getFullYear(inputParts[yy]);\n }\n\n day = Number.parseInt(day, 10);\n month = Number.parseInt(month, 10);\n year = Number.parseInt(year, 10);\n\n const currentDate = new Date();\n\n return new Date(\n /* year */ Object.is(year, NaN) ? currentDate.getFullYear() : year,\n /* month */ Object.is(month, NaN) ? currentDate.getMonth() : month - 1, // months are zero based in javascript, so subtract a day\n /* day */ Object.is(day, NaN) ? currentDate.getDate() : day,\n /* hours */ 12,\n /* minutes */ 0 // set to midday to avoid UTC offset causing dates to be mismatched server side\n );\n};\n\nexport const parseFromISOString = (date: string): Date | undefined => {\n const tempDate = new Date(date);\n return isValid(tempDate) ? parseFromCustomString(format(new Date(date))) : undefined;\n};\n"],"names":["isWeakEqual","leftDate","rightDate","getFullYear","getMonth","getDay","format","date","mask","undefined","value","isDate","toDate","isValid","pad","v","String","length","toString","replace","getDate","slice","parseFromCustomString","sanitizedMask","split","dd","findIndex","x","mm","yy","day","month","year","y","z","Number","parseInt","inputParts","fullDate","unseparatedMask","indexOf","lastIndexOf","currentDate","Date","Object","is","NaN","parseFromISOString","tempDate"],"mappings":";;MAEaA,WAAW,GAAGA,CAACC,QAAc,EAAEC,SAAe;EACvD,OACID,QAAQ,CAACE,WAAW,EAAE,KAAKD,SAAS,CAACC,WAAW,EAAE,IAClDF,QAAQ,CAACG,QAAQ,EAAE,KAAKF,SAAS,CAACE,QAAQ,EAAE,IAC5CH,QAAQ,CAACI,MAAM,EAAE,KAAKH,SAAS,CAACG,MAAM,EAAE;AAEhD;MAEaC,MAAM,GAAGA,CAACC,IAAsB,EAAEC,IAAI,GAAG,UAAU;EAC5D,IAAI,CAACD,IAAI,EAAE;IACP,OAAOE,SAAS;;EAGpB,MAAMC,KAAK,GAAGC,MAAM,CAACJ,IAAI,CAAC,GAAGA,IAAI,GAAGK,MAAM,CAACL,IAAI,CAAC;EAEhD,IAAI,CAACM,OAAO,CAACH,KA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IA,IAAI,YACAC,MAAM,CAACC,EAAE,CAACb,IAAI,EAAEc,GAAG,CAAC,GAAGJ,WAAW,CAACvC,WAAW,EAAE,GAAG6B,IAAI,aACtDY,MAAM,CAACC,EAAE,CAACd,KAAK,EAAEe,GAAG,CAAC,GAAGJ,WAAW,CAACtC,QAAQ,EAAE,GAAG2B,KAAK,GAAG,CAAC;;;EAC5Da,MAAM,CAACC,EAAE,CAACf,GAAG,EAAEgB,GAAG,CAAC,GAAGJ,WAAW,CAACtB,OAAO,EAAE,GAAGU,GAAG,aAC/C,EAAE,eACA,CAAC;GAClB;AACL;MAEaiB,kBAAkB,GAAIxC,IAAY;EAC3C,MAAMyC,QAAQ,GAAG,IAAIL,IAAI,CAACpC,IAAI,CAAC;EAC/B,OAAOM,OAAO,CAACmC,QAAQ,CAAC,GAAG1B,qBAAqB,CAAChB,MAAM,CAAC,IAAIqC,IAAI,CAACpC,IAAI,CAAC,CAAC,CAAC,GAAGE,SAAS;AACxF;;;;"}
@@ -0,0 +1,35 @@
1
+ import { ColumnFilter as ReactTableColumnFilter, ColumnSort as ReactTableColumnSort } from '@tanstack/react-table';
2
+ export declare type TableRef = HTMLDivElement & {
3
+ instance: {
4
+ resetFiltering: () => void;
5
+ resetRowExpansion: () => void;
6
+ resetRowSelection: () => void;
7
+ resetSorting: () => void;
8
+ };
9
+ };
10
+ export declare enum TableFontSizes {
11
+ small = "small",
12
+ medium = "medium",
13
+ large = "large"
14
+ }
15
+ export declare type TableFontSize = keyof typeof TableFontSizes;
16
+ export declare type TableColumnFilter = ReactTableColumnFilter;
17
+ export declare type TableColumnSort = ReactTableColumnSort;
18
+ export declare type TableRowClickHandler<TType = unknown> = (row: TType) => void;
19
+ export declare type TableRowGotoHandler = (column: string, query: string, sorting: TableColumnSort[], filters: TableColumnFilter[], search: string | undefined) => Promise<number>;
20
+ export declare type TableRowHeight = 'short' | 'medium' | 'tall' | 'extra-tall';
21
+ export declare type TableRowSelectHandler<TType = unknown> = (rows: TType[]) => void;
22
+ export declare type TableShortcutHandlerFn<TType = unknown> = (row: TType) => void;
23
+ export declare type TableShortcutHandlerObject<TType = unknown> = {
24
+ handler: TableShortcutHandlerFn<TType>;
25
+ meta?: boolean;
26
+ shift?: boolean;
27
+ };
28
+ export declare type TableFilterHandler = (filters: TableColumnFilter[]) => void;
29
+ export declare type TableScrollToIndexHandler = (index: number, options?: {
30
+ align: 'start' | 'center' | 'end' | 'auto';
31
+ }) => void;
32
+ export declare type TableServerLoadPageHandler = (pageIndex: number, sorting: TableColumnSort[], filters: TableColumnFilter[], search: string | undefined) => Promise<void>;
33
+ export declare type TableServerLoadAllHandler = (sorting: TableColumnSort[], filters: TableColumnFilter[], search: string | undefined) => Promise<void>;
34
+ export declare type TableShortcuts<TType = unknown> = Record<string, TableShortcutHandlerFn<TType> | TableShortcutHandlerObject<TType>>;
35
+ export declare type TableSortHandler = (sorting: TableColumnSort[]) => void;
@@ -0,0 +1,3 @@
1
+ export declare function useTableColumnOrdering(isEnabled?: boolean): {
2
+ isEnabled: boolean;
3
+ };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { TableFontSize } from '../../types';
3
+ export declare function useTableFontSize(isEnabled?: boolean, defaultFontSize?: TableFontSize): {
4
+ isEnabled: boolean;
5
+ size: "small" | "medium" | "large";
6
+ setSize: React.Dispatch<React.SetStateAction<"small" | "medium" | "large">>;
7
+ };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare function useTablePrinting(isEnabled: boolean | undefined, defaultIsWarningVisible: boolean | undefined, id: string): {
3
+ isEnabled: boolean;
4
+ isPrinting: boolean;
5
+ isWarningVisibleForLargeDatasets: boolean;
6
+ setIsWarningVisibleForLargeDatasets: React.Dispatch<React.SetStateAction<boolean>>;
7
+ };
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { TableRef, TableScrollToIndexHandler } from '../../types';
3
+ export declare function useTableRowActive(isEnabled?: boolean, initialRowActiveIndex?: number): {
4
+ isEnabled: boolean;
5
+ rowActiveIndex: number | undefined;
6
+ setRowActiveIndex: React.Dispatch<React.SetStateAction<number | undefined>>;
7
+ isHoverStatePaused: boolean;
8
+ setHoverStatePaused: React.Dispatch<React.SetStateAction<boolean>>;
9
+ handleFocus: (event: React.FocusEvent, length: number, scrollToIndex: TableScrollToIndexHandler) => void;
10
+ handleKeyDown: (event: KeyboardEvent, length: number, scrollToIndex: TableScrollToIndexHandler, tableRef?: React.RefObject<TableRef> | undefined) => void;
11
+ handleMouseCapture: (event: React.MouseEvent, length: number) => void;
12
+ };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { TableRowClickHandler } from '../../types';
3
+ export declare function useTableRowClick<TType = unknown>(isEnabled?: boolean, onRowClick?: TableRowClickHandler<TType>): {
4
+ isEnabled: boolean;
5
+ handleClick: (event: React.MouseEvent<HTMLDivElement>, data: TType) => void;
6
+ handleKeyDown: <TType_1 = unknown>(event: KeyboardEvent, data: TType_1) => void;
7
+ };
@@ -0,0 +1,5 @@
1
+ import { TableRowGotoHandler } from '../../types';
2
+ export declare function useTableRowGoto(isEnabled?: boolean, handler?: TableRowGotoHandler): {
3
+ isEnabled: boolean;
4
+ handleGoto: TableRowGotoHandler | (() => undefined);
5
+ };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { TableRowHeight } from '../../types';
3
+ export declare function useTableRowHeight(isEnabled?: boolean, defaultRowHeight?: TableRowHeight): {
4
+ isEnabled: boolean;
5
+ height: TableRowHeight;
6
+ setHeight: React.Dispatch<React.SetStateAction<TableRowHeight>>;
7
+ };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { Table as ReactTable } from '@tanstack/react-table';
3
+ export declare function useTableRowSelection(isEnabled?: boolean): {
4
+ handleKeyDown: <TType = unknown>(event: KeyboardEvent, table: ReactTable<TType>) => void;
5
+ lastSelectedRowIndex: React.MutableRefObject<number | undefined>;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { TableServerLoadAllHandler, TableServerLoadPageHandler } from '../../types';
2
+ export declare function useTableServerLoading(loadPage?: TableServerLoadPageHandler, loadAll?: TableServerLoadAllHandler): {
3
+ isEnabled: boolean;
4
+ loadPage: TableServerLoadPageHandler | undefined;
5
+ loadAll: TableServerLoadAllHandler | undefined;
6
+ };
@@ -0,0 +1,2 @@
1
+ import { Table as ReactTable } from '@tanstack/react-table';
2
+ export declare function useTableDataListener<TType = unknown>(table: ReactTable<TType>): void;
@@ -0,0 +1,3 @@
1
+ import { Table as ReactTable } from '@tanstack/react-table';
2
+ import { TableFilterHandler } from '../../types';
3
+ export declare function useTableFilterListener<TType = unknown>(table: ReactTable<TType>, onFilter?: TableFilterHandler): void;
@@ -0,0 +1,2 @@
1
+ import { Table as ReactTable } from '@tanstack/react-table';
2
+ export declare function useTableFontSizeListener<TType = unknown>(table: ReactTable<TType>): void;
@@ -0,0 +1,3 @@
1
+ import { Table as ReactTable } from '@tanstack/react-table';
2
+ import { TableRowSelectHandler } from '../../types';
3
+ export declare function useTableRowSelectionListener<TType = unknown>(table: ReactTable<TType>, onRowSelect?: TableRowSelectHandler<TType>): void;
@@ -0,0 +1,3 @@
1
+ import { Table as ReactTable } from '@tanstack/react-table';
2
+ import { TableServerLoadPageHandler } from '../../types';
3
+ export declare function useTableServerLoadingListener<TType = unknown>(table: ReactTable<TType>, loadPage?: TableServerLoadPageHandler): void;
@@ -0,0 +1,3 @@
1
+ import { Table as ReactTable } from '@tanstack/react-table';
2
+ import { TableShortcuts } from '../../types';
3
+ export declare function useTableShortcutsListener<TType = unknown>(table: ReactTable<TType>, shortcuts: TableShortcuts<TType> | undefined): void;
@@ -0,0 +1,3 @@
1
+ import { Table as ReactTable } from '@tanstack/react-table';
2
+ import { TableSortHandler } from '../../types';
3
+ export declare function useTableSortingListener<TType = unknown>(table: ReactTable<TType>, onSort?: TableSortHandler): void;
@@ -0,0 +1,4 @@
1
+ import { ColumnDef as ReactTableColumnDef } from '@tanstack/react-table';
2
+ import { TableFontSize } from '../../types';
3
+ export declare const getCellMinWidth: (fontSize?: TableFontSize) => 57 | 83 | 72;
4
+ export declare function ensureOrdering<TType = unknown>(columns: ReactTableColumnDef<TType>[], internalColumnsPinnedToTheRight: string[], settingsOrder: string[] | undefined): string[];