@economic/taco 2.47.0-server.3 → 2.47.0-server.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (670) hide show
  1. package/dist/components/Icon/components/Autopay.d.ts +3 -0
  2. package/dist/components/Icon/components/AutopayPaused.d.ts +3 -0
  3. package/dist/components/Icon/components/Person.d.ts +3 -0
  4. package/dist/components/Icon/components/PersonSolid.d.ts +3 -0
  5. package/dist/components/Icon/components/Wallet.d.ts +3 -0
  6. package/dist/components/Icon/components/index.d.ts +1 -1
  7. package/dist/components/Input/Input.d.ts +1 -1
  8. package/dist/components/Menu/components/Item.d.ts +1 -1
  9. package/dist/components/Menu/components/Link.d.ts +1 -1
  10. package/dist/components/Navigation2/components/Link.d.ts +1 -1
  11. package/dist/components/Select2/components/Option.d.ts +4 -4
  12. package/dist/components/Select2/components/Search.d.ts +1 -1
  13. package/dist/components/Tag/Tag.d.ts +1 -1
  14. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +32 -0
  15. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
  16. package/dist/esm/index.css +11 -2
  17. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js +32 -24
  18. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js.map +1 -1
  19. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js +84 -61
  20. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js.map +1 -1
  21. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js +16 -15
  22. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js.map +1 -1
  23. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js +12 -13
  24. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js.map +1 -1
  25. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js +104 -68
  26. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js.map +1 -1
  27. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js +38 -29
  28. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js.map +1 -1
  29. package/dist/esm/packages/taco/src/charts/components/Donut/util.js +2 -2
  30. package/dist/esm/packages/taco/src/charts/components/Donut/util.js.map +1 -1
  31. package/dist/esm/packages/taco/src/charts/components/Legend.js +45 -37
  32. package/dist/esm/packages/taco/src/charts/components/Legend.js.map +1 -1
  33. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js +32 -24
  34. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js.map +1 -1
  35. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js +5 -3
  36. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js.map +1 -1
  37. package/dist/esm/packages/taco/src/charts/components/Tooltip.js +26 -25
  38. package/dist/esm/packages/taco/src/charts/components/Tooltip.js.map +1 -1
  39. package/dist/esm/packages/taco/src/charts/utils/color.js +13 -12
  40. package/dist/esm/packages/taco/src/charts/utils/color.js.map +1 -1
  41. package/dist/esm/packages/taco/src/charts/utils/common.js +39 -26
  42. package/dist/esm/packages/taco/src/charts/utils/common.js.map +1 -1
  43. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js +30 -31
  44. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
  45. package/dist/esm/packages/taco/src/components/Alert/Alert.js +7 -9
  46. package/dist/esm/packages/taco/src/components/Alert/Alert.js.map +1 -1
  47. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js +14 -13
  48. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js.map +1 -1
  49. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js +2 -2
  50. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js.map +1 -1
  51. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js +10 -9
  52. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js.map +1 -1
  53. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js +4 -4
  54. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js.map +1 -1
  55. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js +5 -6
  56. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js.map +1 -1
  57. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js +2 -2
  58. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js.map +1 -1
  59. package/dist/esm/packages/taco/src/components/Badge/Badge.js +26 -27
  60. package/dist/esm/packages/taco/src/components/Badge/Badge.js.map +1 -1
  61. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js +12 -14
  62. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js.map +1 -1
  63. package/dist/esm/packages/taco/src/components/Banner/Banner.js +7 -10
  64. package/dist/esm/packages/taco/src/components/Banner/Banner.js.map +1 -1
  65. package/dist/esm/packages/taco/src/components/Banner/util.js +3 -3
  66. package/dist/esm/packages/taco/src/components/Banner/util.js.map +1 -1
  67. package/dist/esm/packages/taco/src/components/Button/Button.js +28 -29
  68. package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
  69. package/dist/esm/packages/taco/src/components/Button/util.js +25 -24
  70. package/dist/esm/packages/taco/src/components/Button/util.js.map +1 -1
  71. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +75 -71
  72. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
  73. package/dist/esm/packages/taco/src/components/Card/Card.js +14 -15
  74. package/dist/esm/packages/taco/src/components/Card/Card.js.map +1 -1
  75. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +24 -22
  76. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
  77. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +21 -23
  78. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
  79. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +76 -64
  80. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
  81. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +60 -57
  82. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
  83. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js +27 -28
  84. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
  85. package/dist/esm/packages/taco/src/components/Dialog/Context.js +4 -4
  86. package/dist/esm/packages/taco/src/components/Dialog/Context.js.map +1 -1
  87. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js +54 -39
  88. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
  89. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +36 -38
  90. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
  91. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js +3 -3
  92. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js.map +1 -1
  93. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js +2 -2
  94. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js.map +1 -1
  95. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js +5 -6
  96. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js.map +1 -1
  97. package/dist/esm/packages/taco/src/components/Dialog/util.js +7 -3
  98. package/dist/esm/packages/taco/src/components/Dialog/util.js.map +1 -1
  99. package/dist/esm/packages/taco/src/components/Drawer/Context.js +5 -5
  100. package/dist/esm/packages/taco/src/components/Drawer/Context.js.map +1 -1
  101. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js +61 -51
  102. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js.map +1 -1
  103. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +134 -145
  104. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
  105. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js +1 -1
  106. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js.map +1 -1
  107. package/dist/esm/packages/taco/src/components/Drawer/util.js +5 -5
  108. package/dist/esm/packages/taco/src/components/Drawer/util.js.map +1 -1
  109. package/dist/esm/packages/taco/src/components/Field/Field.js +14 -12
  110. package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
  111. package/dist/esm/packages/taco/src/components/Form/Form.js +7 -6
  112. package/dist/esm/packages/taco/src/components/Form/Form.js.map +1 -1
  113. package/dist/esm/packages/taco/src/components/Group/Group.js +9 -7
  114. package/dist/esm/packages/taco/src/components/Group/Group.js.map +1 -1
  115. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js +37 -36
  116. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js.map +1 -1
  117. package/dist/esm/packages/taco/src/components/Header/Header.js +2 -2
  118. package/dist/esm/packages/taco/src/components/Header/Header.js.map +1 -1
  119. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js +14 -10
  120. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js.map +1 -1
  121. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js +5 -4
  122. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js.map +1 -1
  123. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js +7 -9
  124. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js.map +1 -1
  125. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js +9 -9
  126. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js.map +1 -1
  127. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +66 -46
  128. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  129. package/dist/esm/packages/taco/src/components/Header/components/Button.js +12 -8
  130. package/dist/esm/packages/taco/src/components/Header/components/Button.js.map +1 -1
  131. package/dist/esm/packages/taco/src/components/Header/components/Link.js +22 -18
  132. package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
  133. package/dist/esm/packages/taco/src/components/Header/components/Logo.js +4 -4
  134. package/dist/esm/packages/taco/src/components/Header/components/Logo.js.map +1 -1
  135. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js +2 -2
  136. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js.map +1 -1
  137. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js +10 -9
  138. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js.map +1 -1
  139. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js +2 -2
  140. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js.map +1 -1
  141. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js +5 -7
  142. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js.map +1 -1
  143. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js +1 -1
  144. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js.map +1 -1
  145. package/dist/esm/packages/taco/src/components/Icon/Icon.js +7 -7
  146. package/dist/esm/packages/taco/src/components/Icon/Icon.js.map +1 -1
  147. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js +19 -0
  148. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js.map +1 -0
  149. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js +19 -0
  150. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js.map +1 -0
  151. package/dist/esm/packages/taco/src/components/Icon/components/Person.js +19 -0
  152. package/dist/esm/packages/taco/src/components/Icon/components/Person.js.map +1 -0
  153. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js +19 -0
  154. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js.map +1 -0
  155. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js +19 -0
  156. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js.map +1 -0
  157. package/dist/esm/packages/taco/src/components/Icon/components/index.js +14 -4
  158. package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
  159. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js +22 -23
  160. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js.map +1 -1
  161. package/dist/esm/packages/taco/src/components/Input/Input.js +45 -44
  162. package/dist/esm/packages/taco/src/components/Input/Input.js.map +1 -1
  163. package/dist/esm/packages/taco/src/components/Input/util.js +8 -5
  164. package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
  165. package/dist/esm/packages/taco/src/components/Layout/Layout.js +7 -5
  166. package/dist/esm/packages/taco/src/components/Layout/Layout.js.map +1 -1
  167. package/dist/esm/packages/taco/src/components/Layout/components/Content.js +2 -2
  168. package/dist/esm/packages/taco/src/components/Layout/components/Content.js.map +1 -1
  169. package/dist/esm/packages/taco/src/components/Layout/components/Context.js +4 -2
  170. package/dist/esm/packages/taco/src/components/Layout/components/Context.js.map +1 -1
  171. package/dist/esm/packages/taco/src/components/Layout/components/Page.js +2 -2
  172. package/dist/esm/packages/taco/src/components/Layout/components/Page.js.map +1 -1
  173. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js +34 -27
  174. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  175. package/dist/esm/packages/taco/src/components/Layout/components/Top.js +9 -6
  176. package/dist/esm/packages/taco/src/components/Layout/components/Top.js.map +1 -1
  177. package/dist/esm/packages/taco/src/components/List/components/Button.js +1 -1
  178. package/dist/esm/packages/taco/src/components/List/components/Button.js.map +1 -1
  179. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js +10 -7
  180. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js.map +1 -1
  181. package/dist/esm/packages/taco/src/components/List/components/Group.js +1 -1
  182. package/dist/esm/packages/taco/src/components/List/components/Group.js.map +1 -1
  183. package/dist/esm/packages/taco/src/components/List/components/Item.js +15 -13
  184. package/dist/esm/packages/taco/src/components/List/components/Item.js.map +1 -1
  185. package/dist/esm/packages/taco/src/components/List/components/Link.js +3 -3
  186. package/dist/esm/packages/taco/src/components/List/components/Link.js.map +1 -1
  187. package/dist/esm/packages/taco/src/components/List/components/Toggle.js +29 -27
  188. package/dist/esm/packages/taco/src/components/List/components/Toggle.js.map +1 -1
  189. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js +21 -26
  190. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js.map +1 -1
  191. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +82 -70
  192. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
  193. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js +56 -51
  194. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js.map +1 -1
  195. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js +83 -65
  196. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js.map +1 -1
  197. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js +9 -10
  198. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js.map +1 -1
  199. package/dist/esm/packages/taco/src/components/Listbox/util.js +78 -48
  200. package/dist/esm/packages/taco/src/components/Listbox/util.js.map +1 -1
  201. package/dist/esm/packages/taco/src/components/Menu/Context.js +2 -2
  202. package/dist/esm/packages/taco/src/components/Menu/Context.js.map +1 -1
  203. package/dist/esm/packages/taco/src/components/Menu/Menu.js +42 -26
  204. package/dist/esm/packages/taco/src/components/Menu/Menu.js.map +1 -1
  205. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js +8 -8
  206. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js.map +1 -1
  207. package/dist/esm/packages/taco/src/components/Menu/components/Content.js +27 -21
  208. package/dist/esm/packages/taco/src/components/Menu/components/Content.js.map +1 -1
  209. package/dist/esm/packages/taco/src/components/Menu/components/Header.js +3 -3
  210. package/dist/esm/packages/taco/src/components/Menu/components/Header.js.map +1 -1
  211. package/dist/esm/packages/taco/src/components/Menu/components/Item.js +32 -32
  212. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  213. package/dist/esm/packages/taco/src/components/Menu/components/Link.js +10 -10
  214. package/dist/esm/packages/taco/src/components/Menu/components/Link.js.map +1 -1
  215. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js +15 -16
  216. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js.map +1 -1
  217. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js +1 -1
  218. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js.map +1 -1
  219. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js +7 -7
  220. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js.map +1 -1
  221. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js +5 -5
  222. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js.map +1 -1
  223. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js +6 -6
  224. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js.map +1 -1
  225. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js +41 -36
  226. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
  227. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js +6 -6
  228. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js.map +1 -1
  229. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js +6 -6
  230. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js.map +1 -1
  231. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js +14 -11
  232. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js.map +1 -1
  233. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js +31 -24
  234. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js.map +1 -1
  235. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js +7 -7
  236. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js.map +1 -1
  237. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js +9 -7
  238. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js.map +1 -1
  239. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +48 -51
  240. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  241. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js +26 -23
  242. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js.map +1 -1
  243. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js +53 -39
  244. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js.map +1 -1
  245. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js +17 -7
  246. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js.map +1 -1
  247. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js +8 -9
  248. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js.map +1 -1
  249. package/dist/esm/packages/taco/src/components/Popover/Popover.js +45 -43
  250. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  251. package/dist/esm/packages/taco/src/components/Popover/Primitives.js +1 -1
  252. package/dist/esm/packages/taco/src/components/Popover/Primitives.js.map +1 -1
  253. package/dist/esm/packages/taco/src/components/Popover/util.js +3 -1
  254. package/dist/esm/packages/taco/src/components/Popover/util.js.map +1 -1
  255. package/dist/esm/packages/taco/src/components/Progress/Progress.js +13 -11
  256. package/dist/esm/packages/taco/src/components/Progress/Progress.js.map +1 -1
  257. package/dist/esm/packages/taco/src/components/Provider/Localization.js +13 -12
  258. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  259. package/dist/esm/packages/taco/src/components/Provider/Provider.js +8 -8
  260. package/dist/esm/packages/taco/src/components/Provider/Provider.js.map +1 -1
  261. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js +54 -47
  262. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
  263. package/dist/esm/packages/taco/src/components/RadioGroup/util.js +7 -1
  264. package/dist/esm/packages/taco/src/components/RadioGroup/util.js.map +1 -1
  265. package/dist/esm/packages/taco/src/components/Report/Report.js +7 -5
  266. package/dist/esm/packages/taco/src/components/Report/Report.js.map +1 -1
  267. package/dist/esm/packages/taco/src/components/Report/useReport.js +1 -1
  268. package/dist/esm/packages/taco/src/components/Report/useReport.js.map +1 -1
  269. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js +17 -13
  270. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
  271. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js +11 -11
  272. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js.map +1 -1
  273. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +44 -39
  274. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
  275. package/dist/esm/packages/taco/src/components/Select/Select.js +28 -31
  276. package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
  277. package/dist/esm/packages/taco/src/components/Select/useSelect.js +79 -70
  278. package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
  279. package/dist/esm/packages/taco/src/components/Select2/Select2.js +154 -121
  280. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  281. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js +2 -4
  282. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js.map +1 -1
  283. package/dist/esm/packages/taco/src/components/Select2/components/Context.js +4 -2
  284. package/dist/esm/packages/taco/src/components/Select2/components/Context.js.map +1 -1
  285. package/dist/esm/packages/taco/src/components/Select2/components/Create.js +45 -41
  286. package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
  287. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +145 -129
  288. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  289. package/dist/esm/packages/taco/src/components/Select2/components/Group.js +8 -8
  290. package/dist/esm/packages/taco/src/components/Select2/components/Group.js.map +1 -1
  291. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +36 -35
  292. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  293. package/dist/esm/packages/taco/src/components/Select2/components/Search.js +9 -10
  294. package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
  295. package/dist/esm/packages/taco/src/components/Select2/components/Title.js +2 -2
  296. package/dist/esm/packages/taco/src/components/Select2/components/Title.js.map +1 -1
  297. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +173 -128
  298. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  299. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js +32 -23
  300. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
  301. package/dist/esm/packages/taco/src/components/Select2/utilities.js +13 -6
  302. package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
  303. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +16 -13
  304. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
  305. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js +17 -12
  306. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js.map +1 -1
  307. package/dist/esm/packages/taco/src/components/Switch/Switch.js +14 -14
  308. package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
  309. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js +28 -23
  310. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
  311. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js +7 -3
  312. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js.map +1 -1
  313. package/dist/esm/packages/taco/src/components/Table/components/Table.js +22 -18
  314. package/dist/esm/packages/taco/src/components/Table/components/Table.js.map +1 -1
  315. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +100 -92
  316. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  317. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js +136 -118
  318. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  319. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js +55 -55
  320. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
  321. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js +35 -41
  322. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
  323. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js +77 -71
  324. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  325. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js +56 -30
  326. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js.map +1 -1
  327. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js +151 -142
  328. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js.map +1 -1
  329. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js +22 -20
  330. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
  331. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js +9 -12
  332. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js.map +1 -1
  333. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js +41 -41
  334. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js.map +1 -1
  335. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js +16 -14
  336. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js.map +1 -1
  337. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js +32 -26
  338. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js.map +1 -1
  339. package/dist/esm/packages/taco/src/components/Table/util.js +37 -30
  340. package/dist/esm/packages/taco/src/components/Table/util.js.map +1 -1
  341. package/dist/esm/packages/taco/src/components/Table3/Table3.js +23 -23
  342. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  343. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js +13 -14
  344. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js.map +1 -1
  345. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js +21 -23
  346. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
  347. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js +20 -17
  348. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js.map +1 -1
  349. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +67 -73
  350. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  351. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js +2 -2
  352. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js.map +1 -1
  353. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js +19 -20
  354. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js.map +1 -1
  355. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js +26 -25
  356. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -1
  357. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +45 -40
  358. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
  359. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js +7 -8
  360. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js.map +1 -1
  361. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +18 -19
  362. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -1
  363. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js +7 -10
  364. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -1
  365. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js +38 -36
  366. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -1
  367. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +15 -15
  368. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
  369. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js +8 -11
  370. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js.map +1 -1
  371. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js +164 -201
  372. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js.map +1 -1
  373. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +40 -27
  374. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
  375. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +18 -16
  376. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -1
  377. package/dist/esm/packages/taco/src/components/Table3/useTable3.js +25 -19
  378. package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
  379. package/dist/esm/packages/taco/src/components/Table3/util/editing.js +29 -35
  380. package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
  381. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js +34 -35
  382. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js.map +1 -1
  383. package/dist/esm/packages/taco/src/components/Tag/Tag.js +18 -16
  384. package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
  385. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js +8 -11
  386. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js.map +1 -1
  387. package/dist/esm/packages/taco/src/components/Toast/Toast.js +19 -20
  388. package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
  389. package/dist/esm/packages/taco/src/components/Toast/Toaster.js +117 -96
  390. package/dist/esm/packages/taco/src/components/Toast/Toaster.js.map +1 -1
  391. package/dist/esm/packages/taco/src/components/Toast/util.js +6 -4
  392. package/dist/esm/packages/taco/src/components/Toast/util.js.map +1 -1
  393. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js +10 -9
  394. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
  395. package/dist/esm/packages/taco/src/components/Tour/Tour.js +49 -46
  396. package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
  397. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js +33 -27
  398. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js.map +1 -1
  399. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js +15 -13
  400. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js.map +1 -1
  401. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js +1 -1
  402. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
  403. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js +11 -6
  404. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js.map +1 -1
  405. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js +19 -13
  406. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js.map +1 -1
  407. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js +4 -4
  408. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js.map +1 -1
  409. package/dist/esm/packages/taco/src/hooks/useId.js +4 -2
  410. package/dist/esm/packages/taco/src/hooks/useId.js.map +1 -1
  411. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js +20 -18
  412. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js.map +1 -1
  413. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js +7 -5
  414. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js.map +1 -1
  415. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js +9 -5
  416. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js.map +1 -1
  417. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js +3 -1
  418. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js.map +1 -1
  419. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js +2 -2
  420. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js.map +1 -1
  421. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js +24 -22
  422. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js.map +1 -1
  423. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js +13 -6
  424. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js.map +1 -1
  425. package/dist/esm/packages/taco/src/hooks/useMergedRef.js +3 -3
  426. package/dist/esm/packages/taco/src/hooks/useMergedRef.js.map +1 -1
  427. package/dist/esm/packages/taco/src/hooks/usePrevious.js +2 -2
  428. package/dist/esm/packages/taco/src/hooks/usePrevious.js.map +1 -1
  429. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js +14 -14
  430. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js.map +1 -1
  431. package/dist/esm/packages/taco/src/primitives/Button.js +16 -13
  432. package/dist/esm/packages/taco/src/primitives/Button.js.map +1 -1
  433. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js +50 -44
  434. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js.map +1 -1
  435. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js +4 -2
  436. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js.map +1 -1
  437. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js +9 -5
  438. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js.map +1 -1
  439. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js +16 -18
  440. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js.map +1 -1
  441. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js +47 -40
  442. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js.map +1 -1
  443. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js +9 -10
  444. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js.map +1 -1
  445. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js +22 -20
  446. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js.map +1 -1
  447. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js +24 -27
  448. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js.map +1 -1
  449. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js +11 -10
  450. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js.map +1 -1
  451. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +22 -19
  452. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
  453. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js +25 -22
  454. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js.map +1 -1
  455. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js +6 -6
  456. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js.map +1 -1
  457. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js +30 -14
  458. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js.map +1 -1
  459. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js +18 -19
  460. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js.map +1 -1
  461. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js +34 -34
  462. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js.map +1 -1
  463. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js +10 -12
  464. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js.map +1 -1
  465. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js +19 -18
  466. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js.map +1 -1
  467. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js +42 -40
  468. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
  469. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js +5 -7
  470. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js.map +1 -1
  471. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js +19 -24
  472. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
  473. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js +56 -55
  474. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js.map +1 -1
  475. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js +27 -23
  476. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -1
  477. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js +13 -16
  478. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js.map +1 -1
  479. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js +86 -87
  480. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
  481. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js +14 -11
  482. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map +1 -1
  483. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js +85 -58
  484. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
  485. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js +18 -20
  486. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
  487. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js +3 -3
  488. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -1
  489. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js +11 -6
  490. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js.map +1 -1
  491. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +58 -49
  492. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
  493. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js +28 -32
  494. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js.map +1 -1
  495. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js +44 -37
  496. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js.map +1 -1
  497. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js +1 -1
  498. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js.map +1 -1
  499. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js +11 -11
  500. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js.map +1 -1
  501. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js +6 -0
  502. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js.map +1 -0
  503. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js +23 -22
  504. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -1
  505. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js +59 -42
  506. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
  507. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js +39 -39
  508. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js.map +1 -1
  509. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js +21 -16
  510. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js.map +1 -1
  511. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js +16 -15
  512. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js.map +1 -1
  513. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +51 -40
  514. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
  515. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js +13 -9
  516. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js.map +1 -1
  517. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js +57 -51
  518. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -1
  519. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js +71 -67
  520. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js.map +1 -1
  521. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js +40 -37
  522. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js.map +1 -1
  523. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js +64 -44
  524. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -1
  525. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js +62 -51
  526. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -1
  527. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js +6 -6
  528. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js.map +1 -1
  529. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js +13 -5
  530. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js.map +1 -1
  531. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +93 -77
  532. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
  533. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js +15 -15
  534. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js.map +1 -1
  535. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js +31 -41
  536. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js.map +1 -1
  537. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js +31 -30
  538. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js.map +1 -1
  539. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js +3 -3
  540. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js.map +1 -1
  541. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js +14 -15
  542. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js.map +1 -1
  543. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js +2 -2
  544. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js.map +1 -1
  545. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
  546. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js +42 -36
  547. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -1
  548. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js +67 -74
  549. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js.map +1 -1
  550. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js +11 -6
  551. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js.map +1 -1
  552. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js +5 -2
  553. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js.map +1 -1
  554. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js +15 -5
  555. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js.map +1 -1
  556. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js +5 -2
  557. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js.map +1 -1
  558. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js +26 -16
  559. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js.map +1 -1
  560. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js +9 -3
  561. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js.map +1 -1
  562. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js +42 -23
  563. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js.map +1 -1
  564. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js +9 -6
  565. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js.map +1 -1
  566. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js +9 -4
  567. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js.map +1 -1
  568. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js +5 -2
  569. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js.map +1 -1
  570. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js +9 -3
  571. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js.map +1 -1
  572. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js +5 -2
  573. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js.map +1 -1
  574. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js +1 -1
  575. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js.map +1 -1
  576. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js +15 -5
  577. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js.map +1 -1
  578. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js +14 -9
  579. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js.map +1 -1
  580. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js +25 -13
  581. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js.map +1 -1
  582. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js +43 -22
  583. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js.map +1 -1
  584. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js +34 -24
  585. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js.map +1 -1
  586. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js +4 -4
  587. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js.map +1 -1
  588. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js +3 -3
  589. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js.map +1 -1
  590. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js +18 -16
  591. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js.map +1 -1
  592. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js +2 -2
  593. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js.map +1 -1
  594. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js +6 -4
  595. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js.map +1 -1
  596. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js +8 -8
  597. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js.map +1 -1
  598. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js +6 -6
  599. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js.map +1 -1
  600. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js +8 -6
  601. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js.map +1 -1
  602. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js +17 -17
  603. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js.map +1 -1
  604. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js +2 -2
  605. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js.map +1 -1
  606. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +55 -55
  607. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  608. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js +59 -30
  609. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js.map +1 -1
  610. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js +4 -4
  611. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js.map +1 -1
  612. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js +33 -19
  613. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js.map +1 -1
  614. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js +11 -11
  615. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js.map +1 -1
  616. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js +21 -19
  617. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js.map +1 -1
  618. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js +6 -7
  619. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js.map +1 -1
  620. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +138 -106
  621. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
  622. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js +3 -1
  623. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js.map +1 -1
  624. package/dist/esm/packages/taco/src/types.js +1 -1
  625. package/dist/esm/packages/taco/src/types.js.map +1 -1
  626. package/dist/esm/packages/taco/src/utils/aria.js +2 -2
  627. package/dist/esm/packages/taco/src/utils/aria.js.map +1 -1
  628. package/dist/esm/packages/taco/src/utils/date.js +47 -23
  629. package/dist/esm/packages/taco/src/utils/date.js.map +1 -1
  630. package/dist/esm/packages/taco/src/utils/debounce.js +10 -4
  631. package/dist/esm/packages/taco/src/utils/debounce.js.map +1 -1
  632. package/dist/esm/packages/taco/src/utils/device.js +4 -2
  633. package/dist/esm/packages/taco/src/utils/device.js.map +1 -1
  634. package/dist/esm/packages/taco/src/utils/dom.js +26 -20
  635. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  636. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js +40 -38
  637. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js.map +1 -1
  638. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js +9 -7
  639. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js.map +1 -1
  640. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js +20 -9
  641. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js.map +1 -1
  642. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js +9 -9
  643. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js.map +1 -1
  644. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js +8 -6
  645. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js.map +1 -1
  646. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js +16 -11
  647. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js.map +1 -1
  648. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js +11 -6
  649. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js.map +1 -1
  650. package/dist/esm/packages/taco/src/utils/input.js +10 -7
  651. package/dist/esm/packages/taco/src/utils/input.js.map +1 -1
  652. package/dist/esm/packages/taco/src/utils/keyboard.js +8 -5
  653. package/dist/esm/packages/taco/src/utils/keyboard.js.map +1 -1
  654. package/dist/esm/packages/taco/src/utils/mergeRefs.js +2 -2
  655. package/dist/esm/packages/taco/src/utils/mergeRefs.js.map +1 -1
  656. package/dist/esm/packages/taco/src/utils/tailwind.js +5 -5
  657. package/dist/esm/packages/taco/src/utils/tailwind.js.map +1 -1
  658. package/dist/esm/packages/taco/tailwind.colors.js +1 -1
  659. package/dist/esm/packages/taco/tailwind.colors.js.map +1 -1
  660. package/dist/index.css +11 -2
  661. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.d.ts +3 -0
  662. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.d.ts +0 -1
  663. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.d.ts +0 -3
  664. package/dist/primitives/Table/types.d.ts +1 -1
  665. package/dist/primitives/Table/useTableManager/features/useTableServerLoading.d.ts +2 -1
  666. package/dist/taco.cjs.development.js +7944 -6916
  667. package/dist/taco.cjs.development.js.map +1 -1
  668. package/dist/taco.cjs.production.min.js +1 -1
  669. package/dist/taco.cjs.production.min.js.map +1 -1
  670. package/package.json +1 -2
@@ -1 +1 @@
1
- {"version":3,"file":"useTableSortingListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/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
+ {"version":3,"file":"useTableSortingListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/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,IAAMC,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,3 +1,4 @@
1
+ import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose, extends as _extends } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
1
2
  import { useLocalization } from '../../../components/Provider/Localization.js';
2
3
  import { useReactTable, getCoreRowModel } from '@tanstack/react-table';
3
4
  import { mapTableChildrenToColumns, useReactTableInitialState, configureReactTableOptions } from './util/setup.js';
@@ -31,82 +32,81 @@ import { useTableServerLoadingListener } from './listeners/useTableServerLoading
31
32
  import { useTableRowDrag } from './features/useTableRowDrag.js';
32
33
  import { useTableRowDrop } from './features/useTableRowDrop.js';
33
34
 
35
+ var _excluded = ["columns"];
34
36
  // Placed this array outside the hook to avoid creating a new array reference on each hook re-render
35
- const DEFAULT_EMPTY_ARRAY = [];
37
+ var DEFAULT_EMPTY_ARRAY = [];
36
38
  function useTableManager(props, meta, internalColumns) {
37
39
  var _props$data, _props$length, _meta$editing, _instance$options$met;
38
- const localization = useLocalization();
40
+ var localization = useLocalization();
39
41
  // CSS.escape would be best here, but it doesn't seem to work very well
40
- const safeId = props.id.replace('.', '_');
42
+ var safeId = props.id.replace('.', '_');
41
43
  // configure table options, merging props with presets
42
- const options = getTableFeaturePreset(props);
44
+ var options = getTableFeaturePreset(props);
43
45
  // load any persisted table settings and merge them with any defaults
44
- const [settings, setSettings] = useTableSettings(options.enableSaveSettings, safeId, props.defaultSettings, props.onChangeSettings);
46
+ var _useTableSettings = useTableSettings(options.enableSaveSettings, safeId, props.defaultSettings, props.onChangeSettings),
47
+ settings = _useTableSettings[0],
48
+ setSettings = _useTableSettings[1];
45
49
  // ensure data is always valid
46
- const data = (_props$data = props.data) !== null && _props$data !== void 0 ? _props$data : DEFAULT_EMPTY_ARRAY;
47
- const length = (_props$length = props.length) !== null && _props$length !== void 0 ? _props$length : data.length;
50
+ var data = (_props$data = props.data) !== null && _props$data !== void 0 ? _props$data : DEFAULT_EMPTY_ARRAY;
51
+ var length = (_props$length = props.length) !== null && _props$length !== void 0 ? _props$length : data.length;
48
52
  // configure common custom features
49
- const columnFreezing = useTableColumnFreezing(options.enableColumnFreezing);
50
- const columnOrdering = useTableColumnOrdering(options.enableColumnOrdering);
51
- const fontSize = useTableFontSize(options.enableFontSize, settings.fontSize);
52
- const footer = useTableFooter(options.enableFooter);
53
- const printing = useTablePrinting(options.enablePrinting, safeId);
54
- const rowActive = useTableRowActive(options.enableRowActive, props.defaultRowActiveIndex);
55
- const rowActions = useTableRowActions(options.enableRowActions, props.rowActions, props.rowActionsLength);
56
- const rowClick = useTableRowClick(options.enableRowClick, props.onRowClick);
57
- const rowDrag = useTableRowDrag(options.enableRowDrag && !(meta !== null && meta !== void 0 && (_meta$editing = meta.editing) !== null && _meta$editing !== void 0 && _meta$editing.isEditing), props.onRowDrag);
58
- const rowDrop = useTableRowDrop(options.enableRowDrop, props.onRowDrop);
59
- const rowExpansion = useTableRowExpansion(options.enableRowExpansion, options.enableRowExpansionAll, props.rowExpansionRenderer);
60
- const rowGoto = useTableRowGoto(options.enableRowGoto, props.onRowGoto);
61
- const rowGroups = useTableRowGroups(props.rowActionsForGroup);
62
- const rowHeight = useTableRowHeight(options.enableRowHeight, settings.rowHeight);
63
- const rowSelection = useTableRowSelection(!!options.enableRowSelection);
64
- const search = useTableSearch(options.enableSearch, props.onChangeSearch, settings.excludeUnmatchedRecordsInSearch);
65
- const server = useTableServerLoading(props.loadPage, props.loadAll, props.pages, props.pageSize, props._experimentalDataLoader2);
53
+ var columnFreezing = useTableColumnFreezing(options.enableColumnFreezing);
54
+ var columnOrdering = useTableColumnOrdering(options.enableColumnOrdering);
55
+ var fontSize = useTableFontSize(options.enableFontSize, settings.fontSize);
56
+ var footer = useTableFooter(options.enableFooter);
57
+ var printing = useTablePrinting(options.enablePrinting, safeId);
58
+ var rowActive = useTableRowActive(options.enableRowActive, props.defaultRowActiveIndex);
59
+ var rowActions = useTableRowActions(options.enableRowActions, props.rowActions, props.rowActionsLength);
60
+ var rowClick = useTableRowClick(options.enableRowClick, props.onRowClick);
61
+ var rowDrag = useTableRowDrag(options.enableRowDrag && !(meta !== null && meta !== void 0 && (_meta$editing = meta.editing) !== null && _meta$editing !== void 0 && _meta$editing.isEditing), props.onRowDrag);
62
+ var rowDrop = useTableRowDrop(options.enableRowDrop, props.onRowDrop);
63
+ var rowExpansion = useTableRowExpansion(options.enableRowExpansion, options.enableRowExpansionAll, props.rowExpansionRenderer);
64
+ var rowGoto = useTableRowGoto(options.enableRowGoto, props.onRowGoto);
65
+ var rowGroups = useTableRowGroups(props.rowActionsForGroup);
66
+ var rowHeight = useTableRowHeight(options.enableRowHeight, settings.rowHeight);
67
+ var rowSelection = useTableRowSelection(!!options.enableRowSelection);
68
+ var search = useTableSearch(options.enableSearch, props.onChangeSearch, settings.excludeUnmatchedRecordsInSearch);
69
+ var server = useTableServerLoading(length, props.loadPage, props.loadAll, props.pages, props.pageSize, props._experimentalDataLoader2);
66
70
  // TODO: memoise
67
71
  // convert jsx column components into valid table columns
68
- const {
69
- columns,
70
- ...defaultState
71
- } = mapTableChildrenToColumns(props, settings, options, internalColumns, localization);
72
+ var _mapTableChildrenToCo = mapTableChildrenToColumns(props, settings, options, internalColumns, localization),
73
+ columns = _mapTableChildrenToCo.columns,
74
+ defaultState = _objectWithoutPropertiesLoose(_mapTableChildrenToCo, _excluded);
72
75
  // configure initial table state
73
- const initialState = useReactTableInitialState(props, columns, settings, defaultState);
76
+ var initialState = useReactTableInitialState(props, columns, settings, defaultState);
74
77
  // create a react-table instance
75
- const instance = useReactTable({
76
- data,
77
- columns,
78
+ var instance = useReactTable(_extends({
79
+ data: data,
80
+ columns: columns,
78
81
  // configure initial table state
79
- initialState,
80
- getCoreRowModel: getCoreRowModel(),
81
- // configure react-table built-in features
82
- ...configureReactTableOptions(options, props, localization),
82
+ initialState: initialState,
83
+ getCoreRowModel: getCoreRowModel()
84
+ }, configureReactTableOptions(options, props, localization), {
83
85
  // settings that can be toggled by the user, and therefore require our own state
84
86
  enableGlobalFilter: search.enableGlobalFilter,
85
87
  // custom context
86
- meta: {
87
- // spread features from specific implementations
88
- ...meta,
89
- columnFreezing,
90
- columnOrdering,
91
- fontSize,
92
- footer,
93
- length,
94
- printing,
88
+ meta: _extends({}, meta, {
89
+ columnFreezing: columnFreezing,
90
+ columnOrdering: columnOrdering,
91
+ fontSize: fontSize,
92
+ footer: footer,
93
+ length: length,
94
+ printing: printing,
95
95
  rowActions: rowActions,
96
- rowActive,
96
+ rowActive: rowActive,
97
97
  rowClick: rowClick,
98
- rowDrag,
98
+ rowDrag: rowDrag,
99
99
  rowDrop: rowDrop,
100
100
  rowExpansion: rowExpansion,
101
101
  rowIdentityAccessor: props.rowIdentityAccessor,
102
- rowGoto,
102
+ rowGoto: rowGoto,
103
103
  rowGroups: rowGroups,
104
- rowHeight,
105
- rowSelection,
106
- search,
107
- server
108
- }
109
- });
104
+ rowHeight: rowHeight,
105
+ rowSelection: rowSelection,
106
+ search: search,
107
+ server: server
108
+ })
109
+ }));
110
110
  // state listeners - we have these so that we don't have to control state outside the table
111
111
  useTableDataListener(instance);
112
112
  useTableFilterListener(instance, props.onChangeFilter);
@@ -120,7 +120,7 @@ function useTableManager(props, meta, internalColumns) {
120
120
  useTableSortingListener(instance, props.onChangeSort);
121
121
  return {
122
122
  id: safeId,
123
- instance,
123
+ instance: instance,
124
124
  meta: (_instance$options$met = instance.options.meta) !== null && _instance$options$met !== void 0 ? _instance$options$met : {},
125
125
  state: instance.getState()
126
126
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useTableManager.js","sources":["../../../../../../../../src/primitives/Table/useTableManager/useTableManager.ts"],"sourcesContent":["import { useReactTable, TableMeta as ReactTableMeta, RowData, getCoreRowModel } from '@tanstack/react-table';\nimport {\n TableColumnAlignment,\n TableColumnClassNameHandler,\n TableColumnDataType,\n TableColumnMenu,\n TableColumnRenderer,\n TableColumnRendererControl,\n TableFilterComparator,\n TableProps,\n} from '../types';\nimport { useReactTableInitialState, configureReactTableOptions, mapTableChildrenToColumns } from './util/setup';\nimport { getTableFeaturePreset } from './util/presets';\nimport { useTableColumnFreezing } from './features/useTableColumnFreezing';\nimport { useTableColumnOrdering } from './features/useTableColumnOrdering';\nimport { useTableFooter } from './features/useTableFooter';\nimport { useTableFontSize } from './features/useTableFontSize';\nimport { useTablePrinting } from './features/useTablePrinting';\nimport { useTableRowActions } from './features/useTableRowActions';\nimport { useTableRowActive } from './features/useTableRowActive';\nimport { useTableRowClick } from './features/useTableRowClick';\nimport { useTableRowExpansion } from './features/useTableRowExpansion';\nimport { useTableRowGoto } from './features/useTableRowGoto';\nimport { useTableRowGroups } from './features/useTableRowGroups';\nimport { useTableRowHeight } from './features/useTableRowHeight';\nimport { useTableRowSelection } from './features/useTableRowSelection';\nimport { useTableSearch } from './features/useTableSearch';\nimport { useTableServerLoading } from './features/useTableServerLoading';\nimport { useTableSettings } from './features/useTableSettings';\nimport { useTableDataListener } from './listeners/useTableDataListener';\nimport { useTableFilterListener } from './listeners/useTableFilterListener';\nimport { useTableFontSizeListener } from './listeners/useTableFontSizeListener';\nimport { useTableRowHeightListener } from './listeners/useTableRowHeightListener';\nimport { useTableRowSelectionListener } from './listeners/useTableRowSelectionListener';\nimport { useTableSearchListener } from './listeners/useTableSearchListener';\nimport { useTableSettingsListener } from './listeners/useTableSettingsListener';\nimport { useTableShortcutsListener } from './listeners/useTableShortcutsListener';\nimport { useTableSortingListener } from './listeners/useTableSortingListener';\nimport { useTableServerLoadingListener } from './listeners/useTableServerLoadingListener';\nimport { useTableManagerInternalColumns } from './types';\nimport { useTableRowDrag } from './features/useTableRowDrag';\nimport { useTableRowDrop } from './features/useTableRowDrop';\nimport { useLocalization } from '../../../components/Provider/Localization';\n\n/*\n EDITING THIS FILE? READ ME FIRST!\n\n This is a shared, common hook for multiple tables. It's feature set is specifically chosen to support features\n common across those tables. If you are adding a new feature or changing an existing one, before writing any code\n in this file ask yourself the question - is this specific to a given table, or is it common to all of them.\n If you are unsure, ask your team first.\n*/\n\ndeclare module '@tanstack/table-core' {\n interface TableMeta<TData extends RowData> {\n columnFreezing: ReturnType<typeof useTableColumnFreezing>;\n columnOrdering: ReturnType<typeof useTableColumnOrdering>;\n fontSize: ReturnType<typeof useTableFontSize>;\n footer: ReturnType<typeof useTableFooter>;\n length: number;\n printing: ReturnType<typeof useTablePrinting>;\n rowActions: ReturnType<typeof useTableRowActions>;\n rowActive: ReturnType<typeof useTableRowActive>;\n rowClick: ReturnType<typeof useTableRowClick>;\n rowDrag: ReturnType<typeof useTableRowDrag>;\n rowDrop: ReturnType<typeof useTableRowDrop>;\n rowExpansion: ReturnType<typeof useTableRowExpansion>;\n rowGoto: ReturnType<typeof useTableRowGoto>;\n rowGroups: ReturnType<typeof useTableRowGroups>;\n rowHeight: ReturnType<typeof useTableRowHeight>;\n rowIdentityAccessor: keyof TData;\n rowSelection: ReturnType<typeof useTableRowSelection>;\n search: ReturnType<typeof useTableSearch>;\n server: ReturnType<typeof useTableServerLoading>;\n }\n\n interface ColumnMeta<TData extends RowData, TValue> {\n align?: TableColumnAlignment;\n className?: TableColumnClassNameHandler<TData>;\n control?: TableColumnRendererControl<TData>;\n dataType?: TableColumnDataType;\n defaultWidth?: number;\n enableEditing?: boolean;\n enableOrdering?: boolean;\n enablePrinting?: boolean;\n enableSearch?: boolean;\n enableTruncate?: boolean;\n filters?: TableFilterComparator[];\n header: string;\n headerClassName?: string;\n menu?: TableColumnMenu;\n renderer?: TableColumnRenderer<TValue, TData>;\n tooltip?: string;\n }\n}\n\n// Placed this array outside the hook to avoid creating a new array reference on each hook re-render\nconst DEFAULT_EMPTY_ARRAY = [];\n\nexport function useTableManager<TType = unknown, TMeta = {}>(\n props: TableProps<TType>,\n meta?: Partial<ReactTableMeta<TType>> & TMeta,\n internalColumns?: useTableManagerInternalColumns<TType>\n) {\n const localization = useLocalization();\n // CSS.escape would be best here, but it doesn't seem to work very well\n const safeId = props.id.replace('.', '_');\n // configure table options, merging props with presets\n const options = getTableFeaturePreset(props);\n\n // load any persisted table settings and merge them with any defaults\n const [settings, setSettings] = useTableSettings(\n options.enableSaveSettings,\n safeId,\n props.defaultSettings,\n props.onChangeSettings\n );\n\n // ensure data is always valid\n const data = props.data ?? DEFAULT_EMPTY_ARRAY;\n const length = props.length ?? data.length;\n\n // configure common custom features\n const columnFreezing = useTableColumnFreezing(options.enableColumnFreezing);\n const columnOrdering = useTableColumnOrdering(options.enableColumnOrdering);\n const fontSize = useTableFontSize(options.enableFontSize, settings.fontSize);\n const footer = useTableFooter(options.enableFooter);\n const printing = useTablePrinting(options.enablePrinting, safeId);\n const rowActive = useTableRowActive(options.enableRowActive, props.defaultRowActiveIndex);\n const rowActions = useTableRowActions<TType>(options.enableRowActions, props.rowActions, props.rowActionsLength);\n const rowClick = useTableRowClick<TType>(options.enableRowClick, props.onRowClick);\n const rowDrag = useTableRowDrag<TType>(options.enableRowDrag && !meta?.editing?.isEditing, props.onRowDrag);\n const rowDrop = useTableRowDrop<TType>(options.enableRowDrop, props.onRowDrop);\n const rowExpansion = useTableRowExpansion<TType>(\n options.enableRowExpansion,\n options.enableRowExpansionAll,\n props.rowExpansionRenderer\n );\n const rowGoto = useTableRowGoto(options.enableRowGoto, props.onRowGoto);\n const rowGroups = useTableRowGroups(props.rowActionsForGroup);\n const rowHeight = useTableRowHeight(options.enableRowHeight, settings.rowHeight);\n const rowSelection = useTableRowSelection(!!options.enableRowSelection);\n const search = useTableSearch(options.enableSearch, props.onChangeSearch, settings.excludeUnmatchedRecordsInSearch);\n const server = useTableServerLoading(\n props.loadPage,\n props.loadAll,\n props.pages,\n props.pageSize,\n props._experimentalDataLoader2\n );\n\n // TODO: memoise\n // convert jsx column components into valid table columns\n const { columns, ...defaultState } = mapTableChildrenToColumns<TType>(\n props,\n settings,\n options,\n internalColumns,\n localization\n );\n\n // configure initial table state\n const initialState = useReactTableInitialState<TType>(props, columns, settings, defaultState);\n\n // create a react-table instance\n const instance = useReactTable<TType>({\n data,\n columns,\n // configure initial table state\n initialState,\n getCoreRowModel: getCoreRowModel<TType>(),\n // configure react-table built-in features\n ...configureReactTableOptions<TType>(options, props, localization),\n // settings that can be toggled by the user, and therefore require our own state\n enableGlobalFilter: search.enableGlobalFilter,\n // custom context\n meta: {\n // spread features from specific implementations\n ...meta,\n columnFreezing,\n columnOrdering,\n fontSize,\n footer,\n length,\n printing,\n rowActions: rowActions as any, // no other way around ReturnType<typeof X> not supporting generics\n rowActive,\n rowClick: rowClick as any, // no other way around ReturnType<typeof X> not supporting generics\n rowDrag,\n rowDrop: rowDrop as any, // no other way around ReturnType<typeof X> not supporting generics\n rowExpansion: rowExpansion as any, // no other way around ReturnType<typeof X> not supporting generics\n rowIdentityAccessor: props.rowIdentityAccessor,\n rowGoto,\n rowGroups: rowGroups as any, // no other way around ReturnType<typeof X> not supporting generics\n rowHeight,\n rowSelection,\n search,\n server,\n } as ReactTableMeta<TType> & TMeta,\n });\n\n // state listeners - we have these so that we don't have to control state outside the table\n useTableDataListener(instance);\n useTableFilterListener(instance, props.onChangeFilter);\n useTableFontSizeListener(instance);\n useTableRowHeightListener(instance);\n useTableRowSelectionListener(instance, props.onRowSelect);\n useTableSearchListener(instance);\n useTableServerLoadingListener(instance, server.loadPage);\n useTableSettingsListener(instance, setSettings);\n useTableShortcutsListener(instance, props.shortcuts);\n useTableSortingListener(instance, props.onChangeSort);\n\n return {\n id: safeId,\n instance,\n meta: (instance.options.meta ?? {}) as ReactTableMeta<TType> & TMeta,\n state: instance.getState(),\n };\n}\n"],"names":["DEFAULT_EMPTY_ARRAY","useTableManager","props","meta","internalColumns","localization","useLocalization","safeId","id","replace","options","getTableFeaturePreset","settings","setSettings","useTableSettings","enableSaveSettings","defaultSettings","onChangeSettings","data","_props$data","length","_props$length","columnFreezing","useTableColumnFreezing","enableColumnFreezing","columnOrdering","useTableColumnOrdering","enableColumnOrdering","fontSize","useTableFontSize","enableFontSize","footer","useTableFooter","enableFooter","printing","useTablePrinting","enablePrinting","rowActive","useTableRowActive","enableRowActive","defaultRowActiveIndex","rowActions","useTableRowActions","enableRowActions","rowActionsLength","rowClick","useTableRowClick","enableRowClick","onRowClick","rowDrag","useTableRowDrag","enableRowDrag","_meta$editing","editing","isEditing","onRowDrag","rowDrop","useTableRowDrop","enableRowDrop","onRowDrop","rowExpansion","useTableRowExpansion","enableRowExpansion","enableRowExpansionAll","rowExpansionRenderer","rowGoto","useTableRowGoto","enableRowGoto","onRowGoto","rowGroups","useTableRowGroups","rowActionsForGroup","rowHeight","useTableRowHeight","enableRowHeight","rowSelection","useTableRowSelection","enableRowSelection","search","useTableSearch","enableSearch","onChangeSearch","excludeUnmatchedRecordsInSearch","server","useTableServerLoading","loadPage","loadAll","pages","pageSize","_experimentalDataLoader2","columns","defaultState","mapTableChildrenToColumns","initialState","useReactTableInitialState","instance","useReactTable","getCoreRowModel","configureReactTableOptions","enableGlobalFilter","rowIdentityAccessor","useTableDataListener","useTableFilterListener","onChangeFilter","useTableFontSizeListener","useTableRowHeightListener","useTableRowSelectionListener","onRowSelect","useTableSearchListener","useTableServerLoadingListener","useTableSettingsListener","useTableShortcutsListener","shortcuts","useTableSortingListener","onChangeSort","_instance$options$met","state","getState"],"mappings":";;;;;;;;;;;;;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EACxDyB,wBAAwB,CAACf,QAAQ,EAAElF,WAAW,CAAC;EAC/CkG,yBAAyB,CAAChB,QAAQ,EAAE7F,KAAK,CAAC8G,SAAS,CAAC;EACpDC,uBAAuB,CAAClB,QAAQ,EAAE7F,KAAK,CAACgH,YAAY,CAAC;EAErD,OAAO;IACH1G,EAAE,EAAED,MAAM;IACVwF,QAAQ;IACR5F,IAAI,GAAAgH,qBAAA,GAAGpB,QAAQ,CAACrF,OAAO,CAACP,IAAI,cAAAgH,qBAAA,cAAAA,qBAAA,GAAI,EAAoC;IACpEC,KAAK,EAAErB,QAAQ,CAACsB,QAAQ;GAC3B;AACL;;;;"}
1
+ {"version":3,"file":"useTableManager.js","sources":["../../../../../../../../src/primitives/Table/useTableManager/useTableManager.ts"],"sourcesContent":["import { useReactTable, TableMeta as ReactTableMeta, RowData, getCoreRowModel } from '@tanstack/react-table';\nimport {\n TableColumnAlignment,\n TableColumnClassNameHandler,\n TableColumnDataType,\n TableColumnMenu,\n TableColumnRenderer,\n TableColumnRendererControl,\n TableFilterComparator,\n TableProps,\n} from '../types';\nimport { useReactTableInitialState, configureReactTableOptions, mapTableChildrenToColumns } from './util/setup';\nimport { getTableFeaturePreset } from './util/presets';\nimport { useTableColumnFreezing } from './features/useTableColumnFreezing';\nimport { useTableColumnOrdering } from './features/useTableColumnOrdering';\nimport { useTableFooter } from './features/useTableFooter';\nimport { useTableFontSize } from './features/useTableFontSize';\nimport { useTablePrinting } from './features/useTablePrinting';\nimport { useTableRowActions } from './features/useTableRowActions';\nimport { useTableRowActive } from './features/useTableRowActive';\nimport { useTableRowClick } from './features/useTableRowClick';\nimport { useTableRowExpansion } from './features/useTableRowExpansion';\nimport { useTableRowGoto } from './features/useTableRowGoto';\nimport { useTableRowGroups } from './features/useTableRowGroups';\nimport { useTableRowHeight } from './features/useTableRowHeight';\nimport { useTableRowSelection } from './features/useTableRowSelection';\nimport { useTableSearch } from './features/useTableSearch';\nimport { useTableServerLoading } from './features/useTableServerLoading';\nimport { useTableSettings } from './features/useTableSettings';\nimport { useTableDataListener } from './listeners/useTableDataListener';\nimport { useTableFilterListener } from './listeners/useTableFilterListener';\nimport { useTableFontSizeListener } from './listeners/useTableFontSizeListener';\nimport { useTableRowHeightListener } from './listeners/useTableRowHeightListener';\nimport { useTableRowSelectionListener } from './listeners/useTableRowSelectionListener';\nimport { useTableSearchListener } from './listeners/useTableSearchListener';\nimport { useTableSettingsListener } from './listeners/useTableSettingsListener';\nimport { useTableShortcutsListener } from './listeners/useTableShortcutsListener';\nimport { useTableSortingListener } from './listeners/useTableSortingListener';\nimport { useTableServerLoadingListener } from './listeners/useTableServerLoadingListener';\nimport { useTableManagerInternalColumns } from './types';\nimport { useTableRowDrag } from './features/useTableRowDrag';\nimport { useTableRowDrop } from './features/useTableRowDrop';\nimport { useLocalization } from '../../../components/Provider/Localization';\n\n/*\n EDITING THIS FILE? READ ME FIRST!\n\n This is a shared, common hook for multiple tables. It's feature set is specifically chosen to support features\n common across those tables. If you are adding a new feature or changing an existing one, before writing any code\n in this file ask yourself the question - is this specific to a given table, or is it common to all of them.\n If you are unsure, ask your team first.\n*/\n\ndeclare module '@tanstack/table-core' {\n interface TableMeta<TData extends RowData> {\n columnFreezing: ReturnType<typeof useTableColumnFreezing>;\n columnOrdering: ReturnType<typeof useTableColumnOrdering>;\n fontSize: ReturnType<typeof useTableFontSize>;\n footer: ReturnType<typeof useTableFooter>;\n length: number;\n printing: ReturnType<typeof useTablePrinting>;\n rowActions: ReturnType<typeof useTableRowActions>;\n rowActive: ReturnType<typeof useTableRowActive>;\n rowClick: ReturnType<typeof useTableRowClick>;\n rowDrag: ReturnType<typeof useTableRowDrag>;\n rowDrop: ReturnType<typeof useTableRowDrop>;\n rowExpansion: ReturnType<typeof useTableRowExpansion>;\n rowGoto: ReturnType<typeof useTableRowGoto>;\n rowGroups: ReturnType<typeof useTableRowGroups>;\n rowHeight: ReturnType<typeof useTableRowHeight>;\n rowIdentityAccessor: keyof TData;\n rowSelection: ReturnType<typeof useTableRowSelection>;\n search: ReturnType<typeof useTableSearch>;\n server: ReturnType<typeof useTableServerLoading>;\n }\n\n interface ColumnMeta<TData extends RowData, TValue> {\n align?: TableColumnAlignment;\n className?: TableColumnClassNameHandler<TData>;\n control?: TableColumnRendererControl<TData>;\n dataType?: TableColumnDataType;\n defaultWidth?: number;\n enableEditing?: boolean;\n enableOrdering?: boolean;\n enablePrinting?: boolean;\n enableSearch?: boolean;\n enableTruncate?: boolean;\n filters?: TableFilterComparator[];\n header: string;\n headerClassName?: string;\n menu?: TableColumnMenu;\n renderer?: TableColumnRenderer<TValue, TData>;\n tooltip?: string;\n }\n}\n\n// Placed this array outside the hook to avoid creating a new array reference on each hook re-render\nconst DEFAULT_EMPTY_ARRAY = [];\n\nexport function useTableManager<TType = unknown, TMeta = {}>(\n props: TableProps<TType>,\n meta?: Partial<ReactTableMeta<TType>> & TMeta,\n internalColumns?: useTableManagerInternalColumns<TType>\n) {\n const localization = useLocalization();\n // CSS.escape would be best here, but it doesn't seem to work very well\n const safeId = props.id.replace('.', '_');\n // configure table options, merging props with presets\n const options = getTableFeaturePreset(props);\n\n // load any persisted table settings and merge them with any defaults\n const [settings, setSettings] = useTableSettings(\n options.enableSaveSettings,\n safeId,\n props.defaultSettings,\n props.onChangeSettings\n );\n\n // ensure data is always valid\n const data = props.data ?? DEFAULT_EMPTY_ARRAY;\n const length = props.length ?? data.length;\n\n // configure common custom features\n const columnFreezing = useTableColumnFreezing(options.enableColumnFreezing);\n const columnOrdering = useTableColumnOrdering(options.enableColumnOrdering);\n const fontSize = useTableFontSize(options.enableFontSize, settings.fontSize);\n const footer = useTableFooter(options.enableFooter);\n const printing = useTablePrinting(options.enablePrinting, safeId);\n const rowActive = useTableRowActive(options.enableRowActive, props.defaultRowActiveIndex);\n const rowActions = useTableRowActions<TType>(options.enableRowActions, props.rowActions, props.rowActionsLength);\n const rowClick = useTableRowClick<TType>(options.enableRowClick, props.onRowClick);\n const rowDrag = useTableRowDrag<TType>(options.enableRowDrag && !meta?.editing?.isEditing, props.onRowDrag);\n const rowDrop = useTableRowDrop<TType>(options.enableRowDrop, props.onRowDrop);\n const rowExpansion = useTableRowExpansion<TType>(\n options.enableRowExpansion,\n options.enableRowExpansionAll,\n props.rowExpansionRenderer\n );\n const rowGoto = useTableRowGoto(options.enableRowGoto, props.onRowGoto);\n const rowGroups = useTableRowGroups(props.rowActionsForGroup);\n const rowHeight = useTableRowHeight(options.enableRowHeight, settings.rowHeight);\n const rowSelection = useTableRowSelection(!!options.enableRowSelection);\n const search = useTableSearch(options.enableSearch, props.onChangeSearch, settings.excludeUnmatchedRecordsInSearch);\n const server = useTableServerLoading(\n length,\n props.loadPage,\n props.loadAll,\n props.pages,\n props.pageSize,\n props._experimentalDataLoader2\n );\n\n // TODO: memoise\n // convert jsx column components into valid table columns\n const { columns, ...defaultState } = mapTableChildrenToColumns<TType>(\n props,\n settings,\n options,\n internalColumns,\n localization\n );\n\n // configure initial table state\n const initialState = useReactTableInitialState<TType>(props, columns, settings, defaultState);\n\n // create a react-table instance\n const instance = useReactTable<TType>({\n data,\n columns,\n // configure initial table state\n initialState,\n getCoreRowModel: getCoreRowModel<TType>(),\n // configure react-table built-in features\n ...configureReactTableOptions<TType>(options, props, localization),\n // settings that can be toggled by the user, and therefore require our own state\n enableGlobalFilter: search.enableGlobalFilter,\n // custom context\n meta: {\n // spread features from specific implementations\n ...meta,\n columnFreezing,\n columnOrdering,\n fontSize,\n footer,\n length,\n printing,\n rowActions: rowActions as any, // no other way around ReturnType<typeof X> not supporting generics\n rowActive,\n rowClick: rowClick as any, // no other way around ReturnType<typeof X> not supporting generics\n rowDrag,\n rowDrop: rowDrop as any, // no other way around ReturnType<typeof X> not supporting generics\n rowExpansion: rowExpansion as any, // no other way around ReturnType<typeof X> not supporting generics\n rowIdentityAccessor: props.rowIdentityAccessor,\n rowGoto,\n rowGroups: rowGroups as any, // no other way around ReturnType<typeof X> not supporting generics\n rowHeight,\n rowSelection,\n search,\n server,\n } as ReactTableMeta<TType> & TMeta,\n });\n\n // state listeners - we have these so that we don't have to control state outside the table\n useTableDataListener(instance);\n useTableFilterListener(instance, props.onChangeFilter);\n useTableFontSizeListener(instance);\n useTableRowHeightListener(instance);\n useTableRowSelectionListener(instance, props.onRowSelect);\n useTableSearchListener(instance);\n useTableServerLoadingListener(instance, server.loadPage);\n useTableSettingsListener(instance, setSettings);\n useTableShortcutsListener(instance, props.shortcuts);\n useTableSortingListener(instance, props.onChangeSort);\n\n return {\n id: safeId,\n instance,\n meta: (instance.options.meta ?? {}) as ReactTableMeta<TType> & TMeta,\n state: instance.getState(),\n };\n}\n"],"names":["DEFAULT_EMPTY_ARRAY","useTableManager","props","meta","internalColumns","localization","useLocalization","safeId","id","replace","options","getTableFeaturePreset","_useTableSettings","useTableSettings","enableSaveSettings","defaultSettings","onChangeSettings","settings","setSettings","data","_props$data","length","_props$length","columnFreezing","useTableColumnFreezing","enableColumnFreezing","columnOrdering","useTableColumnOrdering","enableColumnOrdering","fontSize","useTableFontSize","enableFontSize","footer","useTableFooter","enableFooter","printing","useTablePrinting","enablePrinting","rowActive","useTableRowActive","enableRowActive","defaultRowActiveIndex","rowActions","useTableRowActions","enableRowActions","rowActionsLength","rowClick","useTableRowClick","enableRowClick","onRowClick","rowDrag","useTableRowDrag","enableRowDrag","_meta$editing","editing","isEditing","onRowDrag","rowDrop","useTableRowDrop","enableRowDrop","onRowDrop","rowExpansion","useTableRowExpansion","enableRowExpansion","enableRowExpansionAll","rowExpansionRenderer","rowGoto","useTableRowGoto","enableRowGoto","onRowGoto","rowGroups","useTableRowGroups","rowActionsForGroup","rowHeight","useTableRowHeight","enableRowHeight","rowSelection","useTableRowSelection","enableRowSelection","search","useTableSearch","enableSearch","onChangeSearch","excludeUnmatchedRecordsInSearch","server","useTableServerLoading","loadPage","loadAll","pages","pageSize","_experimentalDataLoader2","_mapTableChildrenToCo","mapTableChildrenToColumns","columns","defaultState","_objectWithoutPropertiesLoose","_excluded","initialState","useReactTableInitialState","instance","useReactTable","_extends","getCoreRowModel","configureReactTableOptions","enableGlobalFilter","rowIdentityAccessor","useTableDataListener","useTableFilterListener","onChangeFilter","useTableFontSizeListener","useTableRowHeightListener","useTableRowSelectionListener","onRowSelect","useTableSearchListener","useTableServerLoadingListener","useTableSettingsListener","useTableShortcutsListener","shortcuts","useTableSortingListener","onChangeSort","_instance$options$met","state","getState"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgGA;AACA,IAAMA,mBAAmB,GAAG,EAAE;SAEdC,eAAeA,CAC3BC,KAAwB,EACxBC,IAA6C,EAC7CC,eAAuD;;EAEvD,IAAMC,YAAY,GAAGC,eAAe,EAAE;;EAEtC,IAAMC,MAAM,GAAGL,KAAK,CAACM,EAAE,CAACC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;;EAEzC,IAAMC,OAAO,GAAGC,qBAAqB,CAACT,KAAK,CAAC;;EAG5C,IAAAU,iBAAA,GAAgCC,gBAAgB,CAC5CH,OAAO,CAACI,kBAAkB,EAC1BP,MAAM,EACNL,KAAK,CAACa,eAAe,EACrBb,KAAK,CAACc,gBAAgB,CACzB;IALMC,QAAQ,GAAAL,iBAAA;IAAEM,WAAW,GAAAN,iBAAA;;EAQ5B,IAAMO,IAAI,IAAAC,WAAA,GAAGlB,KAAK,CAACiB,IAAI,cAAAC,WAAA,cAAAA,WAAA,GAAIpB,mBAAmB;EAC9C,IAAMqB,MAAM,IAAAC,aAAA,GAAGpB,KAAK,CAACmB,MAAM,cAAAC,aAAA,cAAAA,aAAA,GAAIH,IAAI,CAACE,MAAM;;EAG1C,IAAME,cAAc,GAAGC,sBAAsB,CAACd,OAAO,CAACe,oBAAoB,CAAC;EAC3E,IAAMC,cAAc,GAAGC,sBAAsB,CAACjB,OAAO,CAACkB,oBAAoB,CAAC;EAC3E,IAAMC,QAAQ,GAAGC,gBAAgB,CAACpB,OAAO,CAACqB,cAAc,EAAEd,QAAQ,CAACY,QAAQ,C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AAO;MACPO,OAAO,EAAEA,OAAc;MACvBI,YAAY,EAAEA,YAAmB;MACjC4C,mBAAmB,EAAEvG,KAAK,CAACuG,mBAAmB;MAC9CvC,OAAO,EAAPA,OAAO;MACPI,SAAS,EAAEA,SAAgB;MAC3BG,SAAS,EAATA,SAAS;MACTG,YAAY,EAAZA,YAAY;MACZG,MAAM,EAANA,MAAM;MACNK,MAAM,EAANA;;IAEP,CAAC;;EAGFsB,oBAAoB,CAACP,QAAQ,CAAC;EAC9BQ,sBAAsB,CAACR,QAAQ,EAAEjG,KAAK,CAAC0G,cAAc,CAAC;EACtDC,wBAAwB,CAACV,QAAQ,CAAC;EAClCW,yBAAyB,CAACX,QAAQ,CAAC;EACnCY,4BAA4B,CAACZ,QAAQ,EAAEjG,KAAK,CAAC8G,WAAW,CAAC;EACzDC,sBAAsB,CAACd,QAAQ,CAAC;EAChCe,6BAA6B,CAACf,QAAQ,EAAEf,MAAM,CAACE,QAAQ,CAAC;EACxD6B,wBAAwB,CAAChB,QAAQ,EAAEjF,WAAW,CAAC;EAC/CkG,yBAAyB,CAACjB,QAAQ,EAAEjG,KAAK,CAACmH,SAAS,CAAC;EACpDC,uBAAuB,CAACnB,QAAQ,EAAEjG,KAAK,CAACqH,YAAY,CAAC;EAErD,OAAO;IACH/G,EAAE,EAAED,MAAM;IACV4F,QAAQ,EAARA,QAAQ;IACRhG,IAAI,GAAAqH,qBAAA,GAAGrB,QAAQ,CAACzF,OAAO,CAACP,IAAI,cAAAqH,qBAAA,cAAAA,qBAAA,GAAI,EAAoC;IACpEC,KAAK,EAAEtB,QAAQ,CAACuB,QAAQ;GAC3B;AACL;;;;"}
@@ -5,7 +5,10 @@ function isInternalColumn(id) {
5
5
  return id === null || id === void 0 ? void 0 : id.startsWith('__');
6
6
  }
7
7
  // column widths
8
- const getCellMinWidth = (fontSize = 'medium') => {
8
+ var getCellMinWidth = function getCellMinWidth(fontSize) {
9
+ if (fontSize === void 0) {
10
+ fontSize = 'medium';
11
+ }
9
12
  switch (fontSize) {
10
13
  case FontSizes.small:
11
14
  return 57;
@@ -23,16 +26,17 @@ function isCellHighlighted(query, value, dataType, localization) {
23
26
  }
24
27
  return isMatched(query, value, dataType, localization);
25
28
  }
26
- function orderColumn(column, {
27
- orderingDisabled,
28
- orderingEnabled
29
- }) {
30
- const groupedColumn = column;
29
+ function orderColumn(column, _ref) {
30
+ var orderingDisabled = _ref.orderingDisabled,
31
+ orderingEnabled = _ref.orderingEnabled;
32
+ var groupedColumn = column;
31
33
  if (Array.isArray(groupedColumn.columns) && groupedColumn.columns.length > 0) {
32
- groupedColumn.columns.forEach(subcolumn => orderColumn(subcolumn, {
33
- orderingDisabled,
34
- orderingEnabled
35
- }));
34
+ groupedColumn.columns.forEach(function (subcolumn) {
35
+ return orderColumn(subcolumn, {
36
+ orderingDisabled: orderingDisabled,
37
+ orderingEnabled: orderingEnabled
38
+ });
39
+ });
36
40
  } else {
37
41
  var _column$meta;
38
42
  if ((_column$meta = column.meta) !== null && _column$meta !== void 0 && _column$meta.enableOrdering) {
@@ -43,39 +47,53 @@ function orderColumn(column, {
43
47
  }
44
48
  }
45
49
  // ordering
46
- function ensureOrdering(columns, settingsOrder, pinnedOrder = [], internalColumnsPinnedToTheRight = ['__actions']) {
50
+ function ensureOrdering(columns, settingsOrder, pinnedOrder, internalColumnsPinnedToTheRight) {
51
+ if (pinnedOrder === void 0) {
52
+ pinnedOrder = [];
53
+ }
54
+ if (internalColumnsPinnedToTheRight === void 0) {
55
+ internalColumnsPinnedToTheRight = ['__actions'];
56
+ }
47
57
  // internal columns come with a defined order
48
- const internalColumns = columns.filter(column => isInternalColumn(column.id) && !internalColumnsPinnedToTheRight.includes(String(column.id))).map(column => column.id);
58
+ var internalColumns = columns.filter(function (column) {
59
+ return isInternalColumn(column.id) && !internalColumnsPinnedToTheRight.includes(String(column.id));
60
+ }).map(function (column) {
61
+ return column.id;
62
+ });
49
63
  // columns with ordering disabled should be moved to the front
50
- const orderingDisabled = [];
51
- let orderingEnabled = [];
52
- let orderedColumns = columns;
64
+ var orderingDisabled = [];
65
+ var orderingEnabled = [];
66
+ var orderedColumns = columns;
53
67
  // if settings is defined, make sure the columns that are actual children are sorted by it
54
68
  if (Array.isArray(settingsOrder)) {
55
69
  orderedColumns = columns.slice().sort(
56
70
  // the magic >>> 0 here ensures that columns that aren't found in settings, but are children, are pushed to the end
57
- (a, b) => (settingsOrder.indexOf(a.id) >>> 0) - (settingsOrder.indexOf(b.id) >>> 0));
71
+ function (a, b) {
72
+ return (settingsOrder.indexOf(a.id) >>> 0) - (settingsOrder.indexOf(b.id) >>> 0);
73
+ });
58
74
  }
59
- orderedColumns.forEach(column => {
75
+ orderedColumns.forEach(function (column) {
60
76
  if (isInternalColumn(column.id)) {
61
77
  return;
62
78
  }
63
79
  orderColumn(column, {
64
- orderingDisabled,
65
- orderingEnabled
80
+ orderingDisabled: orderingDisabled,
81
+ orderingEnabled: orderingEnabled
66
82
  });
67
83
  });
68
84
  if (settingsOrder && settingsOrder.length > 0) {
69
- const columnsAbsentInSettingsOrder = [];
70
- orderingEnabled = orderingEnabled.reduce((acc, column) => {
71
- const index = settingsOrder.indexOf(column);
85
+ var columnsAbsentInSettingsOrder = [];
86
+ orderingEnabled = orderingEnabled.reduce(function (acc, column) {
87
+ var index = settingsOrder.indexOf(column);
72
88
  if (index > -1) {
73
89
  acc[index] = column;
74
90
  } else {
75
91
  columnsAbsentInSettingsOrder.push(column);
76
92
  }
77
93
  return acc;
78
- }, []).filter(column => !!column)
94
+ }, []).filter(function (column) {
95
+ return !!column;
96
+ })
79
97
  // Append absent columns at the end
80
98
  .concat(columnsAbsentInSettingsOrder);
81
99
  }
@@ -83,12 +101,16 @@ function ensureOrdering(columns, settingsOrder, pinnedOrder = [], internalColumn
83
101
  if (Array.isArray(pinnedOrder)) {
84
102
  orderingEnabled.sort(
85
103
  // the magic >>> 0 here ensures that columns that aren't found in settings, but are children, are pushed to the end
86
- (a, b) => (pinnedOrder.indexOf(a) >>> 0) - (pinnedOrder.indexOf(b) >>> 0));
104
+ function (a, b) {
105
+ return (pinnedOrder.indexOf(a) >>> 0) - (pinnedOrder.indexOf(b) >>> 0);
106
+ });
87
107
  }
88
- const order = [...internalColumns, ...orderingDisabled, ...orderingEnabled];
108
+ var order = [].concat(internalColumns, orderingDisabled, orderingEnabled);
89
109
  // actions should always be last, enforce that
90
- internalColumnsPinnedToTheRight.forEach(id => {
91
- if (columns.findIndex(column => column.id === id) > -1) {
110
+ internalColumnsPinnedToTheRight.forEach(function (id) {
111
+ if (columns.findIndex(function (column) {
112
+ return column.id === id;
113
+ }) > -1) {
92
114
  order.push(id);
93
115
  }
94
116
  });
@@ -97,13 +119,20 @@ function ensureOrdering(columns, settingsOrder, pinnedOrder = [], internalColumn
97
119
  // freezing - we use the react-table pinning state, but that requires some mapping between them
98
120
  function unfreezeAllExternalColumns(leftPinnedState) {
99
121
  var _leftPinnedState$filt;
100
- return (_leftPinnedState$filt = leftPinnedState === null || leftPinnedState === void 0 ? void 0 : leftPinnedState.filter(id => isInternalColumn(id) && id !== '__actions')) !== null && _leftPinnedState$filt !== void 0 ? _leftPinnedState$filt : [];
122
+ return (_leftPinnedState$filt = leftPinnedState === null || leftPinnedState === void 0 ? void 0 : leftPinnedState.filter(function (id) {
123
+ return isInternalColumn(id) && id !== '__actions';
124
+ })) !== null && _leftPinnedState$filt !== void 0 ? _leftPinnedState$filt : [];
101
125
  }
102
126
  function freezeUptoExternalColumn(index, columns) {
103
127
  return columns.slice(0, index + 1);
104
128
  }
105
- function getHiddenColumns(columnVisibility = {}) {
106
- return Object.keys(columnVisibility).filter(c => columnVisibility[c] === false);
129
+ function getHiddenColumns(columnVisibility) {
130
+ if (columnVisibility === void 0) {
131
+ columnVisibility = {};
132
+ }
133
+ return Object.keys(columnVisibility).filter(function (c) {
134
+ return columnVisibility[c] === false;
135
+ });
107
136
  }
108
137
 
109
138
  export { ensureOrdering, freezeUptoExternalColumn, getCellMinWidth, getHiddenColumns, isCellHighlighted, isInternalColumn, unfreezeAllExternalColumns };
@@ -1 +1 @@
1
- {"version":3,"file":"columns.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/util/columns.ts"],"sourcesContent":["import {\n ColumnDef as ReactTableColumnDef,\n GroupColumnDef as ReactTableGroupColumnDef,\n VisibilityState as ReactTableVisibilityState,\n} from '@tanstack/react-table';\nimport { FontSize, FontSizes } from '../../../../types';\nimport { TableColumnDataType } from '../../types';\nimport { isMatched } from './search';\nimport { Localization } from '../../../../components/Provider/Localization';\n\nexport function isInternalColumn(id: string | undefined) {\n return id?.startsWith('__');\n}\n\n// column widths\nexport const getCellMinWidth = (fontSize: FontSize = 'medium') => {\n switch (fontSize) {\n case FontSizes.small:\n return 57;\n\n case FontSizes.large:\n return 83;\n\n default:\n case FontSizes.medium:\n return 72;\n }\n};\n\n// highlighting\nexport function isCellHighlighted(\n query: string,\n value: unknown,\n dataType: TableColumnDataType | undefined,\n localization: Localization\n) {\n if (value === undefined || value === null) {\n return false;\n }\n\n return isMatched(query, value, dataType, localization);\n}\n\nfunction orderColumn<TType = unknown>(\n column: ReactTableColumnDef<TType>,\n { orderingDisabled, orderingEnabled }: { orderingDisabled: string[]; orderingEnabled: string[] }\n) {\n const groupedColumn = column as ReactTableGroupColumnDef<TType>;\n\n if (Array.isArray(groupedColumn.columns) && groupedColumn.columns.length > 0) {\n groupedColumn.columns.forEach((subcolumn: ReactTableColumnDef<TType>) =>\n orderColumn(subcolumn, { orderingDisabled, orderingEnabled })\n );\n } else {\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\n// ordering\nexport function ensureOrdering<TType = unknown>(\n columns: ReactTableColumnDef<TType>[],\n settingsOrder: string[] | undefined,\n pinnedOrder: string[] | undefined = [],\n internalColumnsPinnedToTheRight: string[] = ['__actions']\n): string[] {\n // internal columns come with a defined order\n const internalColumns = columns\n .filter(column => isInternalColumn(column.id) && !internalColumnsPinnedToTheRight.includes(String(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 let 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 (isInternalColumn(column.id)) {\n return;\n }\n\n orderColumn(column, { orderingDisabled, orderingEnabled });\n });\n\n if (settingsOrder && settingsOrder.length > 0) {\n const columnsAbsentInSettingsOrder: string[] = [];\n\n orderingEnabled = orderingEnabled\n .reduce((acc, column) => {\n const index = settingsOrder.indexOf(column);\n if (index > -1) {\n acc[index] = column;\n } else {\n columnsAbsentInSettingsOrder.push(column);\n }\n\n return acc;\n }, [] as string[])\n .filter(column => !!column)\n // Append absent columns at the end\n .concat(columnsAbsentInSettingsOrder);\n }\n\n // if pinned columns are defined, make sure they are sorted first, this ensures state matches the freezing \"upto\" behaviour\n if (Array.isArray(pinnedOrder)) {\n orderingEnabled.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) => (pinnedOrder.indexOf(a as string) >>> 0) - (pinnedOrder.indexOf(b as string) >>> 0)\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\n// freezing - we use the react-table pinning state, but that requires some mapping between them\nexport function unfreezeAllExternalColumns(leftPinnedState?: string[]): string[] {\n return leftPinnedState?.filter(id => isInternalColumn(id) && id !== '__actions') ?? [];\n}\n\nexport function freezeUptoExternalColumn(index: number, columns: string[]): string[] {\n return columns.slice(0, index + 1);\n}\n\nexport function getHiddenColumns(columnVisibility: ReactTableVisibilityState = {}) {\n return Object.keys(columnVisibility).filter(c => columnVisibility[c] === false);\n}\n"],"names":["isInternalColumn","id","startsWith","getCellMinWidth","fontSize","FontSizes","small","large","medium","isCellHighlighted","query","value","dataType","localization","undefined","isMatched","orderColumn","column","orderingDisabled","orderingEnabled","groupedColumn","Array","isArray","columns","length","forEach","subcolumn","_column$meta","meta","enableOrdering","push","ensureOrdering","settingsOrder","pinnedOrder","internalColumnsPinnedToTheRight","internalColumns","filter","includes","String","map","orderedColumns","slice","sort","a","b","indexOf","columnsAbsentInSettingsOrder","reduce","acc","index","concat","order","findIndex","unfreezeAllExternalColumns","leftPinnedState","_leftPinnedState$filt","freezeUptoExternalColumn","getHiddenColumns","columnVisibility","Object","keys","c"],"mappings":";;;SAUgBA,gBAAgBA,CAACC,EAAsB;EACnD,OAAOA,EAAE,aAAFA,EAAE,uBAAFA,EAAE,CAAEC,UAAU,CAAC,IAAI,CAAC;AAC/B;AAEA;MACaC,eAAe,GAAGA,CAACC,WAAqB,QAAQ;EACzD,QAAQA,QAAQ;IACZ,KAAKC,SAAS,CAACC,KAAK;MAChB,OAAO,EAAE;IAEb,KAAKD,SAAS,CAACE,KAAK;MAChB,OAAO,EAAE;IAEb;IACA,KAAKF,SAAS,CAACG,MAAM;MACjB,OAAO,EAAE;;AAErB;AAEA;SACgBC,iBAAiBA,CAC7BC,KAAa,EACbC,KAAc,EACdC,QAAyC,EACzCC,YAA0B;EAE1B,IAAIF,KAAK,KAAKG,SAAS,IAAIH,KAAK,KAAK,IAAI,EAAE;IACvC,OAAO,KAAK;;EAGhB,OAAOI,SAAS,CAACL,KAAK,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,YAAY,CAAC;AAC1D;AAEA,SAASG,WAAWA,CAChBC,MAAkC,EAClC;EAAEC,gBAAgB;EAAEC;CAA4E;EAEhG,MAAMC,aAAa,GAAGH,MAAyC;EAE/D,IAAII,KAAK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,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;MACpDkD,KAAK,CAACrB,IAAI,CAAC7B,EAAE,CAAC;;GAErB,CAAC;EAEF,OAAOkD,KAAK;AAChB;AAEA;SACgBE,0BAA0BA,CAACC,eAA0B;;EACjE,QAAAC,qBAAA,GAAOD,eAAe,aAAfA,eAAe,uBAAfA,eAAe,CAAElB,MAAM,CAACnC,EAAE,IAAID,gBAAgB,CAACC,EAAE,CAAC,IAAIA,EAAE,KAAK,WAAW,CAAC,cAAAsD,qBAAA,cAAAA,qBAAA,GAAI,EAAE;AAC1F;SAEgBC,wBAAwBA,CAACP,KAAa,EAAE1B,OAAiB;EACrE,OAAOA,OAAO,CAACkB,KAAK,CAAC,CAAC,EAAEQ,KAAK,GAAG,CAAC,CAAC;AACtC;SAEgBQ,gBAAgBA,CAACC,mBAA8C,EAAE;EAC7E,OAAOC,MAAM,CAACC,IAAI,CAACF,gBAAgB,CAAC,CAACtB,MAAM,CAACyB,CAAC,IAAIH,gBAAgB,CAACG,CAAC,CAAC,KAAK,KAAK,CAAC;AACnF;;;;"}
1
+ {"version":3,"file":"columns.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/util/columns.ts"],"sourcesContent":["import {\n ColumnDef as ReactTableColumnDef,\n GroupColumnDef as ReactTableGroupColumnDef,\n VisibilityState as ReactTableVisibilityState,\n} from '@tanstack/react-table';\nimport { FontSize, FontSizes } from '../../../../types';\nimport { TableColumnDataType } from '../../types';\nimport { isMatched } from './search';\nimport { Localization } from '../../../../components/Provider/Localization';\n\nexport function isInternalColumn(id: string | undefined) {\n return id?.startsWith('__');\n}\n\n// column widths\nexport const getCellMinWidth = (fontSize: FontSize = 'medium') => {\n switch (fontSize) {\n case FontSizes.small:\n return 57;\n\n case FontSizes.large:\n return 83;\n\n default:\n case FontSizes.medium:\n return 72;\n }\n};\n\n// highlighting\nexport function isCellHighlighted(\n query: string,\n value: unknown,\n dataType: TableColumnDataType | undefined,\n localization: Localization\n) {\n if (value === undefined || value === null) {\n return false;\n }\n\n return isMatched(query, value, dataType, localization);\n}\n\nfunction orderColumn<TType = unknown>(\n column: ReactTableColumnDef<TType>,\n { orderingDisabled, orderingEnabled }: { orderingDisabled: string[]; orderingEnabled: string[] }\n) {\n const groupedColumn = column as ReactTableGroupColumnDef<TType>;\n\n if (Array.isArray(groupedColumn.columns) && groupedColumn.columns.length > 0) {\n groupedColumn.columns.forEach((subcolumn: ReactTableColumnDef<TType>) =>\n orderColumn(subcolumn, { orderingDisabled, orderingEnabled })\n );\n } else {\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\n// ordering\nexport function ensureOrdering<TType = unknown>(\n columns: ReactTableColumnDef<TType>[],\n settingsOrder: string[] | undefined,\n pinnedOrder: string[] | undefined = [],\n internalColumnsPinnedToTheRight: string[] = ['__actions']\n): string[] {\n // internal columns come with a defined order\n const internalColumns = columns\n .filter(column => isInternalColumn(column.id) && !internalColumnsPinnedToTheRight.includes(String(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 let 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 (isInternalColumn(column.id)) {\n return;\n }\n\n orderColumn(column, { orderingDisabled, orderingEnabled });\n });\n\n if (settingsOrder && settingsOrder.length > 0) {\n const columnsAbsentInSettingsOrder: string[] = [];\n\n orderingEnabled = orderingEnabled\n .reduce((acc, column) => {\n const index = settingsOrder.indexOf(column);\n if (index > -1) {\n acc[index] = column;\n } else {\n columnsAbsentInSettingsOrder.push(column);\n }\n\n return acc;\n }, [] as string[])\n .filter(column => !!column)\n // Append absent columns at the end\n .concat(columnsAbsentInSettingsOrder);\n }\n\n // if pinned columns are defined, make sure they are sorted first, this ensures state matches the freezing \"upto\" behaviour\n if (Array.isArray(pinnedOrder)) {\n orderingEnabled.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) => (pinnedOrder.indexOf(a as string) >>> 0) - (pinnedOrder.indexOf(b as string) >>> 0)\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\n// freezing - we use the react-table pinning state, but that requires some mapping between them\nexport function unfreezeAllExternalColumns(leftPinnedState?: string[]): string[] {\n return leftPinnedState?.filter(id => isInternalColumn(id) && id !== '__actions') ?? [];\n}\n\nexport function freezeUptoExternalColumn(index: number, columns: string[]): string[] {\n return columns.slice(0, index + 1);\n}\n\nexport function getHiddenColumns(columnVisibility: ReactTableVisibilityState = {}) {\n return Object.keys(columnVisibility).filter(c => columnVisibility[c] === false);\n}\n"],"names":["isInternalColumn","id","startsWith","getCellMinWidth","fontSize","FontSizes","small","large","medium","isCellHighlighted","query","value","dataType","localization","undefined","isMatched","orderColumn","column","_ref","orderingDisabled","orderingEnabled","groupedColumn","Array","isArray","columns","length","forEach","subcolumn","_column$meta","meta","enableOrdering","push","ensureOrdering","settingsOrder","pinnedOrder","internalColumnsPinnedToTheRight","internalColumns","filter","includes","String","map","orderedColumns","slice","sort","a","b","indexOf","columnsAbsentInSettingsOrder","reduce","acc","index","concat","order","findIndex","unfreezeAllExternalColumns","leftPinnedState","_leftPinnedState$filt","freezeUptoExternalColumn","getHiddenColumns","columnVisibility","Object","keys","c"],"mappings":";;;SAUgBA,gBAAgBA,CAACC,EAAsB;EACnD,OAAOA,EAAE,aAAFA,EAAE,uBAAFA,EAAE,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AuD,qBAAA,cAAAA,qBAAA,GAAI,EAAE;AAC1F;SAEgBC,wBAAwBA,CAACP,KAAa,EAAE1B,OAAiB;EACrE,OAAOA,OAAO,CAACkB,KAAK,CAAC,CAAC,EAAEQ,KAAK,GAAG,CAAC,CAAC;AACtC;SAEgBQ,gBAAgBA,CAACC;MAAAA;IAAAA,mBAA8C,EAAE;;EAC7E,OAAOC,MAAM,CAACC,IAAI,CAACF,gBAAgB,CAAC,CAACtB,MAAM,CAAC,UAAAyB,CAAC;IAAA,OAAIH,gBAAgB,CAACG,CAAC,CAAC,KAAK,KAAK;IAAC;AACnF;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { format } from '../../../../utils/date.js';
2
2
  import { TableFilterComparator } from '../../types.js';
3
3
 
4
- const dataTypes = {
4
+ var dataTypes = {
5
5
  auto: {
6
6
  sortingFn: 'auto',
7
7
  filterComparators: [TableFilterComparator.Contains, TableFilterComparator.DoesNotContain, TableFilterComparator.IsEqualTo, TableFilterComparator.IsNotEqualTo, TableFilterComparator.IsEmpty, TableFilterComparator.IsNotEmpty]
@@ -18,12 +18,12 @@ const dataTypes = {
18
18
  datetime: {
19
19
  sortingFn: 'datetime',
20
20
  filterComparators: [TableFilterComparator.IsEqualTo, TableFilterComparator.IsNotEqualTo, TableFilterComparator.IsGreaterThan, TableFilterComparator.IsLessThan, TableFilterComparator.IsGreaterThanOrEqualTo, TableFilterComparator.IsLessThanOrEqualTo, TableFilterComparator.IsBetween, TableFilterComparator.IsEmpty, TableFilterComparator.IsNotEmpty],
21
- getDisplayValue: (value, options) => {
21
+ getDisplayValue: function getDisplayValue(value, options) {
22
22
  var _date$format, _options$localization;
23
23
  return (_date$format = format(value, options === null || options === void 0 ? void 0 : (_options$localization = options.localization) === null || _options$localization === void 0 ? void 0 : _options$localization.formatting.date)) !== null && _date$format !== void 0 ? _date$format : '';
24
24
  }
25
25
  },
26
- boolean: {
26
+ "boolean": {
27
27
  sortingFn: 'basic',
28
28
  filterComparators: [TableFilterComparator.IsEqualTo, TableFilterComparator.IsNotEqualTo]
29
29
  },
@@ -32,7 +32,7 @@ const dataTypes = {
32
32
  align: 'right',
33
33
  sortingFn: 'basic',
34
34
  filterComparators: [TableFilterComparator.IsEqualTo, TableFilterComparator.IsNotEqualTo, TableFilterComparator.IsGreaterThan, TableFilterComparator.IsLessThan, TableFilterComparator.IsGreaterThanOrEqualTo, TableFilterComparator.IsLessThanOrEqualTo, TableFilterComparator.IsBetween, TableFilterComparator.IsEmpty, TableFilterComparator.IsNotEmpty],
35
- getDisplayValue: (value, options) => {
35
+ getDisplayValue: function getDisplayValue(value, options) {
36
36
  var _options$localization2;
37
37
  if (value === undefined) {
38
38
  return '';
@@ -1 +1 @@
1
- {"version":3,"file":"dataTypes.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/util/dataTypes.ts"],"sourcesContent":["import { SortingFnOption as ReactTableSortingFnOption } from '@tanstack/react-table';\nimport * as date from '../../../../utils/date';\nimport { TableColumnAlignment, TableColumnDataType, TableFilterComparator } from '../../types';\nimport { Localization } from '../../../../components/Provider/Localization';\n\nexport type TableDataType<TType = unknown> = {\n align?: TableColumnAlignment;\n sortingFn: ReactTableSortingFnOption<TType>;\n filterComparators: TableFilterComparator[];\n getDisplayValue?: (value: any, options?: { localization: Localization }) => string;\n};\n\nconst dataTypes: Record<TableColumnDataType | 'auto', TableDataType> = {\n auto: {\n sortingFn: 'auto',\n filterComparators: [\n TableFilterComparator.Contains,\n TableFilterComparator.DoesNotContain,\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n },\n // base\n text: {\n sortingFn: 'alphanumeric',\n filterComparators: [\n TableFilterComparator.Contains,\n TableFilterComparator.DoesNotContain,\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n },\n number: {\n sortingFn: 'basic',\n filterComparators: [\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsGreaterThan,\n TableFilterComparator.IsLessThan,\n TableFilterComparator.IsGreaterThanOrEqualTo,\n TableFilterComparator.IsLessThanOrEqualTo,\n TableFilterComparator.IsBetween,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n },\n datetime: {\n sortingFn: 'datetime',\n filterComparators: [\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsGreaterThan,\n TableFilterComparator.IsLessThan,\n TableFilterComparator.IsGreaterThanOrEqualTo,\n TableFilterComparator.IsLessThanOrEqualTo,\n TableFilterComparator.IsBetween,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n getDisplayValue: (value: string | Date, options) => {\n return date.format(value, options?.localization?.formatting.date) ?? '';\n },\n },\n boolean: {\n sortingFn: 'basic',\n filterComparators: [TableFilterComparator.IsEqualTo, TableFilterComparator.IsNotEqualTo],\n },\n // advanced\n amount: {\n align: 'right',\n sortingFn: 'basic',\n filterComparators: [\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsGreaterThan,\n TableFilterComparator.IsLessThan,\n TableFilterComparator.IsGreaterThanOrEqualTo,\n TableFilterComparator.IsLessThanOrEqualTo,\n TableFilterComparator.IsBetween,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n getDisplayValue: (value: number | bigint | string, options) => {\n if (value === undefined) {\n return '';\n }\n\n return new Intl.NumberFormat(options?.localization?.locale, { minimumFractionDigits: 2 }).format(Number(value));\n },\n },\n};\n\nexport function getDataTypeProperties<TType = unknown>(dataType: TableColumnDataType | undefined): TableDataType<TType> {\n return (dataTypes[dataType ?? 'text'] ?? dataTypes.text) as TableDataType<TType>;\n}\n"],"names":["dataTypes","auto","sortingFn","filterComparators","TableFilterComparator","Contains","DoesNotContain","IsEqualTo","IsNotEqualTo","IsEmpty","IsNotEmpty","text","number","IsGreaterThan","IsLessThan","IsGreaterThanOrEqualTo","IsLessThanOrEqualTo","IsBetween","datetime","getDisplayValue","value","options","_date$format","date","_options$localization","localization","formatting","boolean","amount","align","undefined","Intl","NumberFormat","_options$localization2","locale","minimumFractionDigits","format","Number","getDataTypeProperties","dataType","_dataTypes"],"mappings":";;;AAYA,MAAMA,SAAS,GAAwD;EACnEC,IAAI,EAAE;IACFC,SAAS,EAAE,MAAM;IACjBC,iBAAiB,EAAE,CACfC,qBAAqB,CAACC,QAAQ,EAC9BD,qBAAqB,CAACE,cAAc,EACpCF,qBAAqB,CAACG,SAAS,EAC/BH,qBAAqB,CAACI,YAAY,EAClCJ,qBAAqB,CAACK,OAAO,EAC7BL,qBAAqB,CAACM,UAAU;GAEvC;;EAEDC,IAAI,EAAE;IACFT,SAAS,EAAE,cAAc;IACzBC,iBAAiB,EAAE,CACfC,qBAAqB,CAACC,QAAQ,EAC9BD,qBAAqB,CAACE,cAAc,EACpCF,qBAAqB,CAACG,SAAS,EAC/BH,qBAAqB,CAACI,YAAY,EAClCJ,qBAAqB,CAACK,OAAO,EAC7BL,qBAAqB,CAACM,UAAU;GAEvC;EACDE,MAAM,EAAE;IACJV,SAAS,EAAE,OAAO;IAClBC,iBAAiB,EAAE,CACfC,qBAAqB,CAACG,SAAS,EAC/BH,qBAAqB,CAACI,YAAY,EAClCJ,qBAAqB,CAACS,aAAa,EACnCT,qBAAqB,CAACU,UAAU,EAChCV,qBAAqB,CAACW,sBAAsB,EAC5CX,qBAAqB,CAACY,mBAAmB,EACzCZ,qBAAqB,CAACa,SAAS,EAC/Bb,qBAAqB,CAACK,OAAO,EAC7BL,qBAAqB,CAACM,UAAU;GAEvC;EACDQ,QAAQ,EAAE;IACNhB,SAAS,EAAE,UAAU;IACrBC,iBAAiB,EAAE,CACfC,qBAAqB,CAACG,SAAS,EAC/BH,qBAAqB,CAACI,YAAY,EAClCJ,qBA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,EAAE;OAAG,CAAC,CAACC,MAAM,CAACC,MAAM,CAACjB,KAAK,CAAC,CAAC;;;CAG1H;SAEekB,qBAAqBA,CAAkBC,QAAyC;;EAC5F,QAAAC,UAAA,GAAQxC,SAAS,CAACuC,QAAQ,aAARA,QAAQ,cAARA,QAAQ,GAAI,MAAM,CAAC,cAAAC,UAAA,cAAAA,UAAA,GAAIxC,SAAS,CAACW,IAAI;AAC3D;;;;"}
1
+ {"version":3,"file":"dataTypes.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/util/dataTypes.ts"],"sourcesContent":["import { SortingFnOption as ReactTableSortingFnOption } from '@tanstack/react-table';\nimport * as date from '../../../../utils/date';\nimport { TableColumnAlignment, TableColumnDataType, TableFilterComparator } from '../../types';\nimport { Localization } from '../../../../components/Provider/Localization';\n\nexport type TableDataType<TType = unknown> = {\n align?: TableColumnAlignment;\n sortingFn: ReactTableSortingFnOption<TType>;\n filterComparators: TableFilterComparator[];\n getDisplayValue?: (value: any, options?: { localization: Localization }) => string;\n};\n\nconst dataTypes: Record<TableColumnDataType | 'auto', TableDataType> = {\n auto: {\n sortingFn: 'auto',\n filterComparators: [\n TableFilterComparator.Contains,\n TableFilterComparator.DoesNotContain,\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n },\n // base\n text: {\n sortingFn: 'alphanumeric',\n filterComparators: [\n TableFilterComparator.Contains,\n TableFilterComparator.DoesNotContain,\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n },\n number: {\n sortingFn: 'basic',\n filterComparators: [\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsGreaterThan,\n TableFilterComparator.IsLessThan,\n TableFilterComparator.IsGreaterThanOrEqualTo,\n TableFilterComparator.IsLessThanOrEqualTo,\n TableFilterComparator.IsBetween,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n },\n datetime: {\n sortingFn: 'datetime',\n filterComparators: [\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsGreaterThan,\n TableFilterComparator.IsLessThan,\n TableFilterComparator.IsGreaterThanOrEqualTo,\n TableFilterComparator.IsLessThanOrEqualTo,\n TableFilterComparator.IsBetween,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n getDisplayValue: (value: string | Date, options) => {\n return date.format(value, options?.localization?.formatting.date) ?? '';\n },\n },\n boolean: {\n sortingFn: 'basic',\n filterComparators: [TableFilterComparator.IsEqualTo, TableFilterComparator.IsNotEqualTo],\n },\n // advanced\n amount: {\n align: 'right',\n sortingFn: 'basic',\n filterComparators: [\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsGreaterThan,\n TableFilterComparator.IsLessThan,\n TableFilterComparator.IsGreaterThanOrEqualTo,\n TableFilterComparator.IsLessThanOrEqualTo,\n TableFilterComparator.IsBetween,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n getDisplayValue: (value: number | bigint | string, options) => {\n if (value === undefined) {\n return '';\n }\n\n return new Intl.NumberFormat(options?.localization?.locale, { minimumFractionDigits: 2 }).format(Number(value));\n },\n },\n};\n\nexport function getDataTypeProperties<TType = unknown>(dataType: TableColumnDataType | undefined): TableDataType<TType> {\n return (dataTypes[dataType ?? 'text'] ?? dataTypes.text) as TableDataType<TType>;\n}\n"],"names":["dataTypes","auto","sortingFn","filterComparators","TableFilterComparator","Contains","DoesNotContain","IsEqualTo","IsNotEqualTo","IsEmpty","IsNotEmpty","text","number","IsGreaterThan","IsLessThan","IsGreaterThanOrEqualTo","IsLessThanOrEqualTo","IsBetween","datetime","getDisplayValue","value","options","_date$format","date","_options$localization","localization","formatting","amount","align","undefined","Intl","NumberFormat","_options$localization2","locale","minimumFractionDigits","format","Number","getDataTypeProperties","dataType","_dataTypes"],"mappings":";;;AAYA,IAAMA,SAAS,GAAwD;EACnEC,IAAI,EAAE;IACFC,SAAS,EAAE,MAAM;IACjBC,iBAAiB,EAAE,CACfC,qBAAqB,CAACC,QAAQ,EAC9BD,qBAAqB,CAACE,cAAc,EACpCF,qBAAqB,CAACG,SAAS,EAC/BH,qBAAqB,CAACI,YAAY,EAClCJ,qBAAqB,CAACK,OAAO,EAC7BL,qBAAqB,CAACM,UAAU;GAEvC;;EAEDC,IAAI,EAAE;IACFT,SAAS,EAAE,cAAc;IACzBC,iBAAiB,EAAE,CACfC,qBAAqB,CAACC,QAAQ,EAC9BD,qBAAqB,CAACE,cAAc,EACpCF,qBAAqB,CAACG,SAAS,EAC/BH,qBAAqB,CAACI,YAAY,EAClCJ,qBAAqB,CAACK,OAAO,EAC7BL,qBAAqB,CAACM,UAAU;GAEvC;EACDE,MAAM,EAAE;IACJV,SAAS,EAAE,OAAO;IAClBC,iBAAiB,EAAE,CACfC,qBAAqB,CAACG,SAAS,EAC/BH,qBAAqB,CAACI,YAAY,EAClCJ,qBAAqB,CAACS,aAAa,EACnCT,qBAAqB,CAACU,UAAU,EAChCV,qBAAqB,CAACW,sBAAsB,EAC5CX,qBAAqB,CAACY,mBAAmB,EACzCZ,qBAAqB,CAACa,SAAS,EAC/Bb,qBAAqB,CAACK,OAAO,EAC7BL,qBAAqB,CAACM,UAAU;GAEvC;EACDQ,QAAQ,EAAE;IACNhB,SAAS,EAAE,UAAU;IACrBC,iBAAiB,EAAE,CACfC,qBAAqB,CAACG,SAAS,EAC/BH,qBAAqB,CAACI,YAAY,EAClCJ,qBAAqB,CAACS,aAAa,EACnCT,qBAAqB,CAACU,UAAU,EAChCV,qBAAqB,CAACW,sBAAsB,EAC5CX,qBAAqB,CAACY,mBAAmB,EACzCZ,qBAAqB,CAACa,SAAS,EAC/Bb,qBAAqB,CAACK,OAAO,EAC7BL,qB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