@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":"useTableServerLoading.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/features/useTableServerLoading.ts"],"sourcesContent":["import React from 'react';\nimport { TableServerLoadAllHandler, TableServerLoadAllState, TableServerLoadPageHandler } from '../../types';\nimport { DEFAULT_PAGE_SIZE } from '../../useTableDataLoader';\n\nexport function useTableServerLoading(\n loadPage?: TableServerLoadPageHandler,\n loadAll?: TableServerLoadAllHandler,\n pages?: number[],\n pageSize = DEFAULT_PAGE_SIZE,\n _experimentalDataLoader2 = false\n) {\n const isEnabled = !!loadPage && !!loadAll;\n const [isReady, setReady] = React.useState(false);\n const [loadAllStatus, setLoadedStatus] = React.useState<TableServerLoadAllState>(TableServerLoadAllState.Incomplete);\n\n let _loadPage: TableServerLoadPageHandler | undefined;\n let _loadAll: TableServerLoadAllHandler | undefined;\n let _loadAllIfNeeded: TableServerLoadAllHandler | undefined;\n\n if (typeof loadPage === 'function') {\n _loadPage = async (...args) => {\n if (typeof loadPage === 'function') {\n await loadPage(...args);\n setReady(true);\n }\n };\n }\n\n if (typeof loadAll === 'function') {\n _loadAll = async (...args) => {\n if (typeof loadAll === 'function') {\n setLoadedStatus(TableServerLoadAllState.Loading);\n await loadAll(...args);\n setLoadedStatus(TableServerLoadAllState.Completed);\n setReady(true);\n }\n };\n\n _loadAllIfNeeded = async (...args) => {\n if (loadAllStatus === TableServerLoadAllState.Incomplete) {\n await _loadAll?.(...args);\n }\n };\n }\n\n return {\n pages,\n isEnabled,\n isReady,\n loadPage: _loadPage,\n loadAll: _loadAll,\n loadAllIfNeeded: _loadAllIfNeeded,\n loadAllStatus,\n pageSize,\n _experimentalDataLoader2,\n };\n}\n"],"names":["useTableServerLoading","loadPage","loadAll","pages","pageSize","DEFAULT_PAGE_SIZE","_experimentalDataLoader2","isEnabled","isReady","setReady","React","useState","loadAllStatus","setLoadedStatus","TableServerLoadAllState","Incomplete","_loadPage","_loadAll","_loadAllIfNeeded","args","Promise","resolve","then","_temp","e","reject","Loading","Completed","_temp2","_loadAll2","_temp3","loadAllIfNeeded"],"mappings":";;;;SAIgBA,qBAAqBA,CACjCC,QAAqC,EACrCC,OAAmC,EACnCC,KAAgB,EAChBC,QAAQ,GAAGC,iBAAiB,EAC5BC,wBAAwB,GAAG,KAAK;EAEhC,MAAMC,SAAS,GAAG,CAAC,CAACN,QAAQ,IAAI,CAAC,CAACC,OAAO;EACzC,MAAM,CAACM,OAAO,EAAEC,QAAQ,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;EACjD,MAAM,CAACC,aAAa,EAAEC,eAAe,CAAC,GAAGH,cAAK,CAACC,QAAQ,CAA0BG,uBAAuB,CAACC,UAAU,CAAC;EAEpH,IAAIC,SAAiD;EACrD,IAAIC,QAA+C;EACnD,IAAIC,gBAAuD;EAE3D,IAAI,OAAOjB,QAAQ,KAAK,UAAU,EAAE;IAChCe,SAAS,aAAU,GAAGG,IAAI;MAAA;;cAClB,OAAOlB,QAAQ,KAAK,UAAU;YAAA,OAAAmB,OAAA,CAAAC,OAAA,CACxBpB,QAAQ,CAAC,GAAGkB,IAAI,CAAC,EAAAG,IAAA;cACvBb,QAAQ,CAAC,IAAI,CAAC;;;;QAAC,OAAAW,OAAA,CAAAC,OAAA,CAAAE,KAAA,IAAAA,KAAA,CAAAD,IAAA,GAAAC,KAAA,CAAAD,IAAA;OAEtB,QAAAE,CAAA;QAAA,OAAAJ,OAAA,CAAAK,MAAA,CAAAD,CAAA;;;;EAGL,IAAI,OAAOtB,OAAO,KAAK,UAAU,EAAE;IAC/Be,QAAQ,aAAU,GAAGE,IAAI;MAAA;;cACjB,OAAOjB,OAAO,KAAK,UAAU;YAC7BW,eAAe,CAACC,uBAAuB,CAACY,OAAO,CAAC;YAAC,OAAAN,OAAA,CAAAC,OAAA,CAC3CnB,OAAO,CAAC,GAAGiB,IAAI,CAAC,EAAAG,IAAA;cACtBT,eAAe,CAACC,uBAAuB,CAACa,SAAS,CAAC;cAClDlB,QAAQ,CAAC,IAAI,CAAC;;;;QAAC,OAAAW,OAAA,CAAAC,OAAA,CAAAO,MAAA,IAAAA,MAAA,CAAAN,IAAA,GAAAM,MAAA,CAAAN,IAAA;OAEtB,QAAAE,CAAA;QAAA,OAAAJ,OAAA,CAAAK,MAAA,CAAAD,CAAA;;;IAEDN,gBAAgB,aAAU,GAAGC,IAAI;MAAA;;cACzBP,aAAa,KAAKE,uBAAuB,CAACC,UAAU;YAAA,IAAAc,SAAA;YAAA,OAAAT,OAAA,CAAAC,OAAA,EAAAQ,SAAA,GAC9CZ,QAAQ,cAAAY,SAAA,uBAARA,SAAA,CAAW,GAAGV,IAAI,CAAC,EAAAG,IAAA;;;QAAA,OAAAF,OAAA,CAAAC,OAAA,CAAAS,MAAA,IAAAA,MAAA,CAAAR,IAAA,GAAAQ,MAAA,CAAAR,IAAA;OAEhC,QAAAE,CAAA;QAAA,OAAAJ,OAAA,CAAAK,MAAA,CAAAD,CAAA;;;;EAGL,OAAO;IACHrB,KAAK;IACLI,SAAS;IACTC,OAAO;IACPP,QAAQ,EAAEe,SAAS;IACnBd,OAAO,EAAEe,QAAQ;IACjBc,eAAe,EAAEb,gBAAgB;IACjCN,aAAa;IACbR,QAAQ;IACRE;GACH;AACL;;;;"}
1
+ {"version":3,"file":"useTableServerLoading.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/features/useTableServerLoading.ts"],"sourcesContent":["import React from 'react';\nimport { TableServerLoadAllHandler, TableServerLoadAllState, TableServerLoadPageHandler } from '../../types';\nimport { DEFAULT_PAGE_SIZE } from '../../useTableDataLoader';\n\nexport function useTableServerLoading(\n length: number,\n loadPage?: TableServerLoadPageHandler,\n loadAll?: TableServerLoadAllHandler,\n pages?: number[],\n pageSize = DEFAULT_PAGE_SIZE,\n _experimentalDataLoader2 = false\n) {\n const isEnabled = !!loadPage && !!loadAll;\n const [isReady, setReady] = React.useState(false);\n const [loadAllStatus, setLoadedStatus] = React.useState<TableServerLoadAllState>(TableServerLoadAllState.Incomplete);\n\n let _loadPage: TableServerLoadPageHandler | undefined;\n let _loadAll: TableServerLoadAllHandler | undefined;\n let _loadAllIfNeeded: TableServerLoadAllHandler | undefined;\n\n if (typeof loadPage === 'function') {\n _loadPage = async (...args) => {\n if (typeof loadPage === 'function') {\n await loadPage(...args);\n setReady(true);\n }\n };\n }\n\n if (typeof loadAll === 'function') {\n _loadAll = async (...args) => {\n if (typeof loadAll === 'function') {\n setLoadedStatus(TableServerLoadAllState.Loading);\n await loadAll(...args);\n setLoadedStatus(TableServerLoadAllState.Completed);\n setReady(true);\n }\n };\n\n _loadAllIfNeeded = async (...args) => {\n if (loadAllStatus === TableServerLoadAllState.Incomplete) {\n await _loadAll?.(...args);\n }\n };\n }\n\n const pageCount = Math.ceil(length / pageSize);\n\n return {\n pages,\n isEnabled,\n isReady,\n loadPage: _loadPage,\n loadAll: _loadAll,\n loadAllIfNeeded: _loadAllIfNeeded,\n loadAllStatus,\n pageSize,\n pageCount,\n _experimentalDataLoader2,\n };\n}\n"],"names":["useTableServerLoading","length","loadPage","loadAll","pages","pageSize","_experimentalDataLoader2","DEFAULT_PAGE_SIZE","isEnabled","_React$useState","React","useState","isReady","setReady","_React$useState2","TableServerLoadAllState","Incomplete","loadAllStatus","setLoadedStatus","_loadPage","_loadAll","_loadAllIfNeeded","_len","arguments","args","Array","_key","Promise","resolve","apply","then","_temp","e","reject","_len2","_key2","Loading","Completed","_temp2","_len3","_key3","_loadAll2","_temp3","pageCount","Math","ceil","loadAllIfNeeded"],"mappings":";;;;SAIgBA,qBAAqBA,CACjCC,MAAc,EACdC,QAAqC,EACrCC,OAAmC,EACnCC,KAAgB,EAChBC,QAAQ,EACRC,wBAAwB;MADxBD,QAAQ;IAARA,QAAQ,GAAGE,iBAAiB;;EAAA,IAC5BD,wBAAwB;IAAxBA,wBAAwB,GAAG,KAAK;;EAEhC,IAAME,SAAS,GAAG,CAAC,CAACN,QAAQ,IAAI,CAAC,CAACC,OAAO;EACzC,IAAAM,eAAA,GAA4BC,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;IAA1CC,OAAO,GAAAH,eAAA;IAAEI,QAAQ,GAAAJ,eAAA;EACxB,IAAAK,gBAAA,GAAyCJ,cAAK,CAACC,QAAQ,CAA0BI,uBAAuB,CAACC,UAAU,CAAC;IAA7GC,aAAa,GAAAH,gBAAA;IAAEI,eAAe,GAAAJ,gBAAA;EAErC,IAAIK,SAAiD;EACrD,IAAIC,QAA+C;EACnD,IAAIC,gBAAuD;EAE3D,IAAI,OAAOnB,QAAQ,KAAK,UAAU,EAAE;IAChCiB,SAAS,YAAAA;MAAA,SAAAG,IAAA,GAAAC,SAAA,CAAAtB,MAAA,EAAauB,IAAI,OAAAC,KAAA,CAAAH,IAAA,GAAAI,IAAA,MAAAA,IAAA,GAAAJ,IAAA,EAAAI,IAAA;QAAJF,IAAI,CAAAE,IAAA,IAAAH,SAAA,CAAAG,IAAA;;MAAA;;cAClB,OAAOxB,QAAQ,KAAK,UAAU;YAAA,OAAAyB,OAAA,CAAAC,OAAA,CACxB1B,QAAQ,CAAA2B,KAAA,SAAIL,IAAI,CAAC,EAAAM,IAAA;cACvBjB,QAAQ,CAAC,IAAI,CAAC;;;;QAAC,OAAAc,OAAA,CAAAC,OAAA,CAAAG,KAAA,IAAAA,KAAA,CAAAD,IAAA,GAAAC,KAAA,CAAAD,IAAA;OAEtB,QAAAE,CAAA;QAAA,OAAAL,OAAA,CAAAM,MAAA,CAAAD,CAAA;;;;EAGL,IAAI,OAAO7B,OAAO,KAAK,UAAU,EAAE;IAC/BiB,QAAQ,YAAAA;MAAA,SAAAc,KAAA,GAAAX,SAAA,CAAAtB,MAAA,EAAauB,IAAI,OAAAC,KAAA,CAAAS,KAAA,GAAAC,KAAA,MAAAA,KAAA,GAAAD,KAAA,EAAAC,KAAA;QAAJX,IAAI,CAAAW,KAAA,IAAAZ,SAAA,CAAAY,KAAA;;MAAA;;cACjB,OAAOhC,OAAO,KAAK,UAAU;YAC7Be,eAAe,CAACH,uBAAuB,CAACqB,OAAO,CAAC;YAAC,OAAAT,OAAA,CAAAC,OAAA,CAC3CzB,OAAO,CAAA0B,KAAA,SAAIL,IAAI,CAAC,EAAAM,IAAA;cACtBZ,eAAe,CAACH,uBAAuB,CAACsB,SAAS,CAAC;cAClDxB,QAAQ,CAAC,IAAI,CAAC;;;;QAAC,OAAAc,OAAA,CAAAC,OAAA,CAAAU,MAAA,IAAAA,MAAA,CAAAR,IAAA,GAAAQ,MAAA,CAAAR,IAAA;OAEtB,QAAAE,CAAA;QAAA,OAAAL,OAAA,CAAAM,MAAA,CAAAD,CAAA;;;IAEDX,gBAAgB,YAAAA;MAAA,SAAAkB,KAAA,GAAAhB,SAAA,CAAAtB,MAAA,EAAauB,IAAI,OAAAC,KAAA,CAAAc,KAAA,GAAAC,KAAA,MAAAA,KAAA,GAAAD,KAAA,EAAAC,KAAA;QAAJhB,IAAI,CAAAgB,KAAA,IAAAjB,SAAA,CAAAiB,KAAA;;MAAA;;cACzBvB,aAAa,KAAKF,uBAAuB,CAACC,UAAU;YAAA,IAAAyB,SAAA;YAAA,OAAAd,OAAA,CAAAC,OAAA,EAAAa,SAAA,GAC9CrB,QAAQ,cAAAqB,SAAA,uBAARA,SAAA,CAAAZ,KAAA,SAAcL,IAAI,CAAC,EAAAM,IAAA;;;QAAA,OAAAH,OAAA,CAAAC,OAAA,CAAAc,MAAA,IAAAA,MAAA,CAAAZ,IAAA,GAAAY,MAAA,CAAAZ,IAAA;OAEhC,QAAAE,CAAA;QAAA,OAAAL,OAAA,CAAAM,MAAA,CAAAD,CAAA;;;;EAGL,IAAMW,SAAS,GAAGC,IAAI,CAACC,IAAI,CAAC5C,MAAM,GAAGI,QAAQ,CAAC;EAE9C,OAAO;IACHD,KAAK,EAALA,KAAK;IACLI,SAAS,EAATA,SAAS;IACTI,OAAO,EAAPA,OAAO;IACPV,QAAQ,EAAEiB,SAAS;IACnBhB,OAAO,EAAEiB,QAAQ;IACjB0B,eAAe,EAAEzB,gBAAgB;IACjCJ,aAAa,EAAbA,aAAa;IACbZ,QAAQ,EAARA,QAAQ;IACRsC,SAAS,EAATA,SAAS;IACTrC,wBAAwB,EAAxBA;GACH;AACL;;;;"}
@@ -1,8 +1,9 @@
1
1
  import React__default from 'react';
2
+ import { extends as _extends } from '../../../../../../../_virtual/_rollupPluginBabelHelpers.js';
2
3
  import { useTacoSettings } from '../../../../hooks/useTacoSettings.js';
3
4
  import { useLocalStorage } from '../../../../hooks/useLocalStorage.js';
4
5
 
5
- const DEFAULT_ENABLED_OPTIONS = {
6
+ var DEFAULT_ENABLED_OPTIONS = {
6
7
  columnOrder: true,
7
8
  columnPinning: true,
8
9
  columnSizing: true,
@@ -14,50 +15,59 @@ const DEFAULT_ENABLED_OPTIONS = {
14
15
  sorting: true
15
16
  };
16
17
  function useUniqueTableId(tableId) {
17
- const tacoSettings = useTacoSettings();
18
- return `taco.${tacoSettings.uniqueUserIdentifier}.table.${tableId}.settings`;
18
+ var tacoSettings = useTacoSettings();
19
+ return "taco." + tacoSettings.uniqueUserIdentifier + ".table." + tableId + ".settings";
19
20
  }
20
21
  function useEnabledSettings(isEnabled) {
21
- return React__default.useMemo(() => {
22
+ return React__default.useMemo(function () {
22
23
  if (isEnabled === false) {
23
- return [Object.keys(DEFAULT_ENABLED_OPTIONS).reduce((o, key) => ({
24
- ...o,
25
- [key]: false
26
- }), {}), false];
24
+ return [Object.keys(DEFAULT_ENABLED_OPTIONS).reduce(function (o, key) {
25
+ var _extends2;
26
+ return _extends({}, o, (_extends2 = {}, _extends2[key] = false, _extends2));
27
+ }, {}), false];
27
28
  } else if (isEnabled === true) {
28
29
  return [DEFAULT_ENABLED_OPTIONS, true];
29
30
  }
30
- const options = {
31
- ...DEFAULT_ENABLED_OPTIONS,
32
- ...isEnabled
33
- };
34
- return [options, Object.values(options).some(o => o === true)];
31
+ var options = _extends({}, DEFAULT_ENABLED_OPTIONS, isEnabled);
32
+ return [options, Object.values(options).some(function (o) {
33
+ return o === true;
34
+ })];
35
35
  }, [isEnabled]);
36
36
  }
37
- function useTableSettings(isEnabled = false, id, defaultSettings = {}, onChangeSettings) {
38
- const uniqueId = useUniqueTableId(id);
39
- const [enabledSettings, hasSomeEnabledSettings] = useEnabledSettings(isEnabled);
40
- const [persistedSettings, _setPersistedSettings] = useLocalStorage(hasSomeEnabledSettings ? uniqueId : undefined, removeDisabledSettings(defaultSettings, enabledSettings));
41
- const setPersistedSettings = React__default.useCallback(value => {
37
+ function useTableSettings(isEnabled, id, defaultSettings, onChangeSettings) {
38
+ if (isEnabled === void 0) {
39
+ isEnabled = false;
40
+ }
41
+ if (defaultSettings === void 0) {
42
+ defaultSettings = {};
43
+ }
44
+ var uniqueId = useUniqueTableId(id);
45
+ var _useEnabledSettings = useEnabledSettings(isEnabled),
46
+ enabledSettings = _useEnabledSettings[0],
47
+ hasSomeEnabledSettings = _useEnabledSettings[1];
48
+ var _useLocalStorage = useLocalStorage(hasSomeEnabledSettings ? uniqueId : undefined, removeDisabledSettings(defaultSettings, enabledSettings)),
49
+ persistedSettings = _useLocalStorage[0],
50
+ _setPersistedSettings = _useLocalStorage[1];
51
+ var setPersistedSettings = React__default.useCallback(function (value) {
42
52
  if (!hasSomeEnabledSettings) {
43
53
  return;
44
54
  }
45
- const sanitizedSettings = removeDisabledSettings(value, enabledSettings);
55
+ var sanitizedSettings = removeDisabledSettings(value, enabledSettings);
46
56
  _setPersistedSettings(sanitizedSettings);
47
57
  if (typeof onChangeSettings === 'function') {
48
58
  onChangeSettings(sanitizedSettings);
49
59
  }
50
60
  }, [hasSomeEnabledSettings, onChangeSettings, JSON.stringify(enabledSettings)]);
51
61
  if (!hasSomeEnabledSettings) {
52
- return [defaultSettings, () => undefined];
62
+ return [defaultSettings, function () {
63
+ return undefined;
64
+ }];
53
65
  }
54
66
  return [persistedSettings, setPersistedSettings];
55
67
  }
56
68
  function removeDisabledSettings(settings, enabledSettings) {
57
- const sanitizedSettings = {
58
- ...settings
59
- };
60
- Object.keys(enabledSettings).forEach(setting => {
69
+ var sanitizedSettings = _extends({}, settings);
70
+ Object.keys(enabledSettings).forEach(function (setting) {
61
71
  if (!enabledSettings[setting]) {
62
72
  delete sanitizedSettings[setting];
63
73
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useTableSettings.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/features/useTableSettings.ts"],"sourcesContent":["import React from 'react';\nimport { useLocalStorage } from '../../../../hooks/useLocalStorage';\nimport { useTacoSettings } from '../../../../hooks/useTacoSettings';\nimport { TableEnableSettingsOptions, TableSettings, TableSettingsHandler } from '../../types';\n\nconst DEFAULT_ENABLED_OPTIONS = {\n columnOrder: true,\n columnPinning: true,\n columnSizing: true,\n columnVisibility: true,\n excludeUnmatchedRecordsInSearch: true,\n fontSize: true,\n grouping: true,\n rowHeight: true,\n sorting: true,\n};\n\nexport function useUniqueTableId(tableId: string) {\n const tacoSettings = useTacoSettings();\n return `taco.${tacoSettings.uniqueUserIdentifier}.table.${tableId}.settings`;\n}\n\nfunction useEnabledSettings(isEnabled: boolean | Partial<TableEnableSettingsOptions>): [TableEnableSettingsOptions, boolean] {\n return React.useMemo(() => {\n if (isEnabled === false) {\n return [\n Object.keys(DEFAULT_ENABLED_OPTIONS).reduce(\n (o, key) => ({ ...o, [key]: false }),\n {}\n ) as TableEnableSettingsOptions,\n false,\n ];\n } else if (isEnabled === true) {\n return [DEFAULT_ENABLED_OPTIONS, true];\n }\n\n const options = { ...DEFAULT_ENABLED_OPTIONS, ...isEnabled };\n return [options, Object.values(options).some(o => o === true)];\n }, [isEnabled]);\n}\n\nexport function useTableSettings(\n isEnabled: boolean | Partial<TableEnableSettingsOptions> = false,\n id: string,\n defaultSettings: TableSettings | undefined = {},\n onChangeSettings: TableSettingsHandler | undefined\n): [TableSettings, TableSettingsHandler] {\n const uniqueId = useUniqueTableId(id);\n const [enabledSettings, hasSomeEnabledSettings] = useEnabledSettings(isEnabled);\n\n const [persistedSettings, _setPersistedSettings] = useLocalStorage<TableSettings>(\n hasSomeEnabledSettings ? uniqueId : undefined,\n removeDisabledSettings(defaultSettings, enabledSettings)\n );\n\n const setPersistedSettings = React.useCallback(\n (value: TableSettings) => {\n if (!hasSomeEnabledSettings) {\n return;\n }\n\n const sanitizedSettings = removeDisabledSettings(value, enabledSettings);\n _setPersistedSettings(sanitizedSettings);\n\n if (typeof onChangeSettings === 'function') {\n onChangeSettings(sanitizedSettings);\n }\n },\n [hasSomeEnabledSettings, onChangeSettings, JSON.stringify(enabledSettings)]\n );\n\n if (!hasSomeEnabledSettings) {\n return [defaultSettings, () => undefined];\n }\n\n return [persistedSettings, setPersistedSettings];\n}\n\nfunction removeDisabledSettings(settings: TableSettings, enabledSettings: TableEnableSettingsOptions) {\n const sanitizedSettings: TableSettings = { ...settings };\n\n Object.keys(enabledSettings).forEach(setting => {\n if (!enabledSettings[setting]) {\n delete sanitizedSettings[setting];\n }\n });\n\n return sanitizedSettings;\n}\n"],"names":["DEFAULT_ENABLED_OPTIONS","columnOrder","columnPinning","columnSizing","columnVisibility","excludeUnmatchedRecordsInSearch","fontSize","grouping","rowHeight","sorting","useUniqueTableId","tableId","tacoSettings","useTacoSettings","uniqueUserIdentifier","useEnabledSettings","isEnabled","React","useMemo","Object","keys","reduce","o","key","options","values","some","useTableSettings","id","defaultSettings","onChangeSettings","uniqueId","enabledSettings","hasSomeEnabledSettings","persistedSettings","_setPersistedSettings","useLocalStorage","undefined","removeDisabledSettings","setPersistedSettings","useCallback","value","sanitizedSettings","JSON","stringify","settings","forEach","setting"],"mappings":";;;;AAKA,MAAMA,uBAAuB,GAAG;EAC5BC,WAAW,EAAE,IAAI;EACjBC,aAAa,EAAE,IAAI;EACnBC,YAAY,EAAE,IAAI;EAClBC,gBAAgB,EAAE,IAAI;EACtBC,+BAA+B,EAAE,IAAI;EACrCC,QAAQ,EAAE,IAAI;EACdC,QAAQ,EAAE,IAAI;EACdC,SAAS,EAAE,IAAI;EACfC,OAAO,EAAE;CACZ;SAEeC,gBAAgBA,CAACC,OAAe;EAC5C,MAAMC,YAAY,GAAGC,eAAe,EAAE;EACtC,OAAO,QAAQD,YAAY,CAACE,oBAAoB,UAAUH,OAAO,WAAW;AAChF;AAEA,SAASI,kBAAkBA,CAACC,SAAwD;EAChF,OAAOC,cAAK,CAACC,OAAO,CAAC;IACjB,IAAIF,SAAS,KAAK,KAAK,EAAE;MACrB,OAAO,CACHG,MAAM,CAACC,IAAI,CAACpB,uBAAuB,CAAC,CAACqB,MAAM,CACvC,CAACC,CAAC,EAAEC,GAAG,MAAM;QAAE,GAAGD,CAAC;QAAE,CAACC,GAAG,GAAG;OAAO,CAAC,EACpC,EAAE,CACyB,EAC/B,KAAK,CACR;KACJ,MAAM,IAAIP,SAAS,KAAK,IAAI,EAAE;MAC3B,OAAO,CAAChB,uBAAuB,EAAE,IAAI,CAAC;;IAG1C,MAAMwB,OAAO,GAAG;MAAE,GAAGxB,uBAAuB;MAAE,GAAGgB;KAAW;IAC5D,OAAO,CAACQ,OAAO,EAAEL,MAAM,CAACM,MAAM,CAACD,OAAO,CAAC,CAACE,IAAI,CAACJ,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CAAC;GACjE,EAAE,CAACN,SAAS,CAAC,CAAC;AACnB;SAEgBW,gBAAgBA,CAC5BX,YAA2D,KAAK,EAChEY,EAAU,EACVC,kBAA6C,EAAE,EAC/CC,gBAAkD;EAElD,MAAMC,QAAQ,GAAGrB,gBAAgB,CAACkB,EAAE,CAAC;EACrC,MAAM,CAACI,eAAe,EAAEC,sBAAsB,CAAC,GAAGlB,kBAAkB,CAACC,SAAS,CAAC;EAE/E,MAAM,CAACkB,iBAAiB,EAAEC,qBAAqB,CAAC,GAAGC,eAAe,CAC9DH,sBAAsB,GAAGF,QAAQ,GAAGM,SAAS,EAC7CC,sBAAsB,CAACT,eAAe,EAAEG,eAAe,CAAC,CAC3D;EAED,MAAMO,oBAAoB,GAAGtB,cAAK,CAACuB,WAAW,CACzCC,KAAoB;IACjB,IAAI,CAACR,sBAAsB,EAAE;MACzB;;IAGJ,MAAMS,iBAAiB,GAAGJ,sBAAsB,CAACG,KAAK,EAAET,eAAe,CAAC;IACxEG,qBAAqB,CAACO,iBAAiB,CAAC;IAExC,IAAI,OAAOZ,gBAAgB,KAAK,UAAU,EAAE;MACxCA,gBAAgB,CAACY,iBAAiB,CAAC;;GAE1C,EACD,CAACT,sBAAsB,EAAEH,gBAAgB,EAAEa,IAAI,CAACC,SAAS,CAACZ,eAAe,CAAC,CAAC,CAC9E;EAED,IAAI,CAACC,sBAAsB,EAAE;IACzB,OAAO,CAACJ,eAAe,EAAE,MAAMQ,SAAS,CAAC;;EAG7C,OAAO,CAACH,iBAAiB,EAAEK,oBAAoB,CAAC;AACpD;AAEA,SAASD,sBAAsBA,CAACO,QAAuB,EAAEb,eAA2C;EAChG,MAAMU,iBAAiB,GAAkB;IAAE,GAAGG;GAAU;EAExD1B,MAAM,CAACC,IAAI,CAACY,eAAe,CAAC,CAACc,OAAO,CAACC,OAAO;IACxC,IAAI,CAACf,eAAe,CAACe,OAAO,CAAC,EAAE;MAC3B,OAAOL,iBAAiB,CAACK,OAAO,CAAC;;GAExC,CAAC;EAEF,OAAOL,iBAAiB;AAC5B;;;;"}
1
+ {"version":3,"file":"useTableSettings.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/features/useTableSettings.ts"],"sourcesContent":["import React from 'react';\nimport { useLocalStorage } from '../../../../hooks/useLocalStorage';\nimport { useTacoSettings } from '../../../../hooks/useTacoSettings';\nimport { TableEnableSettingsOptions, TableSettings, TableSettingsHandler } from '../../types';\n\nconst DEFAULT_ENABLED_OPTIONS = {\n columnOrder: true,\n columnPinning: true,\n columnSizing: true,\n columnVisibility: true,\n excludeUnmatchedRecordsInSearch: true,\n fontSize: true,\n grouping: true,\n rowHeight: true,\n sorting: true,\n};\n\nexport function useUniqueTableId(tableId: string) {\n const tacoSettings = useTacoSettings();\n return `taco.${tacoSettings.uniqueUserIdentifier}.table.${tableId}.settings`;\n}\n\nfunction useEnabledSettings(isEnabled: boolean | Partial<TableEnableSettingsOptions>): [TableEnableSettingsOptions, boolean] {\n return React.useMemo(() => {\n if (isEnabled === false) {\n return [\n Object.keys(DEFAULT_ENABLED_OPTIONS).reduce(\n (o, key) => ({ ...o, [key]: false }),\n {}\n ) as TableEnableSettingsOptions,\n false,\n ];\n } else if (isEnabled === true) {\n return [DEFAULT_ENABLED_OPTIONS, true];\n }\n\n const options = { ...DEFAULT_ENABLED_OPTIONS, ...isEnabled };\n return [options, Object.values(options).some(o => o === true)];\n }, [isEnabled]);\n}\n\nexport function useTableSettings(\n isEnabled: boolean | Partial<TableEnableSettingsOptions> = false,\n id: string,\n defaultSettings: TableSettings | undefined = {},\n onChangeSettings: TableSettingsHandler | undefined\n): [TableSettings, TableSettingsHandler] {\n const uniqueId = useUniqueTableId(id);\n const [enabledSettings, hasSomeEnabledSettings] = useEnabledSettings(isEnabled);\n\n const [persistedSettings, _setPersistedSettings] = useLocalStorage<TableSettings>(\n hasSomeEnabledSettings ? uniqueId : undefined,\n removeDisabledSettings(defaultSettings, enabledSettings)\n );\n\n const setPersistedSettings = React.useCallback(\n (value: TableSettings) => {\n if (!hasSomeEnabledSettings) {\n return;\n }\n\n const sanitizedSettings = removeDisabledSettings(value, enabledSettings);\n _setPersistedSettings(sanitizedSettings);\n\n if (typeof onChangeSettings === 'function') {\n onChangeSettings(sanitizedSettings);\n }\n },\n [hasSomeEnabledSettings, onChangeSettings, JSON.stringify(enabledSettings)]\n );\n\n if (!hasSomeEnabledSettings) {\n return [defaultSettings, () => undefined];\n }\n\n return [persistedSettings, setPersistedSettings];\n}\n\nfunction removeDisabledSettings(settings: TableSettings, enabledSettings: TableEnableSettingsOptions) {\n const sanitizedSettings: TableSettings = { ...settings };\n\n Object.keys(enabledSettings).forEach(setting => {\n if (!enabledSettings[setting]) {\n delete sanitizedSettings[setting];\n }\n });\n\n return sanitizedSettings;\n}\n"],"names":["DEFAULT_ENABLED_OPTIONS","columnOrder","columnPinning","columnSizing","columnVisibility","excludeUnmatchedRecordsInSearch","fontSize","grouping","rowHeight","sorting","useUniqueTableId","tableId","tacoSettings","useTacoSettings","uniqueUserIdentifier","useEnabledSettings","isEnabled","React","useMemo","Object","keys","reduce","o","key","_extends2","_extends","options","values","some","useTableSettings","id","defaultSettings","onChangeSettings","uniqueId","_useEnabledSettings","enabledSettings","hasSomeEnabledSettings","_useLocalStorage","useLocalStorage","undefined","removeDisabledSettings","persistedSettings","_setPersistedSettings","setPersistedSettings","useCallback","value","sanitizedSettings","JSON","stringify","settings","forEach","setting"],"mappings":";;;;;AAKA,IAAMA,uBAAuB,GAAG;EAC5BC,WAAW,EAAE,IAAI;EACjBC,aAAa,EAAE,IAAI;EACnBC,YAAY,EAAE,IAAI;EAClBC,gBAAgB,EAAE,IAAI;EACtBC,+BAA+B,EAAE,IAAI;EACrCC,QAAQ,EAAE,IAAI;EACdC,QAAQ,EAAE,IAAI;EACdC,SAAS,EAAE,IAAI;EACfC,OAAO,EAAE;CACZ;SAEeC,gBAAgBA,CAACC,OAAe;EAC5C,IAAMC,YAAY,GAAGC,eAAe,EAAE;EACtC,iBAAeD,YAAY,CAACE,oBAAoB,eAAUH,OAAO;AACrE;AAEA,SAASI,kBAAkBA,CAACC,SAAwD;EAChF,OAAOC,cAAK,CAACC,OAAO,CAAC;IACjB,IAAIF,SAAS,KAAK,KAAK,EAAE;MACrB,OAAO,CACHG,MAAM,CAACC,IAAI,CAACpB,uBAAuB,CAAC,CAACqB,MAAM,CACvC,UAACC,CAAC,EAAEC,GAAG;QAAA,IAAAC,SAAA;QAAA,OAAAC,QAAA,KAAWH,CAAC,GAAAE,SAAA,OAAAA,SAAA,CAAGD,GAAG,IAAG,KAAK,EAAAC,SAAA;OAAG,EACpC,EAAE,CACyB,EAC/B,KAAK,CACR;KACJ,MAAM,IAAIR,SAAS,KAAK,IAAI,EAAE;MAC3B,OAAO,CAAChB,uBAAuB,EAAE,IAAI,CAAC;;IAG1C,IAAM0B,OAAO,GAAAD,QAAA,KAAQzB,uBAAuB,EAAKgB,SAAS,CAAE;IAC5D,OAAO,CAACU,OAAO,EAAEP,MAAM,CAACQ,MAAM,CAACD,OAAO,CAAC,CAACE,IAAI,CAAC,UAAAN,CAAC;MAAA,OAAIA,CAAC,KAAK,IAAI;MAAC,CAAC;GACjE,EAAE,CAACN,SAAS,CAAC,CAAC;AACnB;SAEgBa,gBAAgBA,CAC5Bb,WACAc,EAAU,EACVC,iBACAC,gBAAkD;MAHlDhB;IAAAA,YAA2D,KAAK;;EAAA,IAEhEe;IAAAA,kBAA6C,EAAE;;EAG/C,IAAME,QAAQ,GAAGvB,gBAAgB,CAACoB,EAAE,CAAC;EACrC,IAAAI,mBAAA,GAAkDnB,kBAAkB,CAACC,SAAS,CAAC;IAAxEmB,eAAe,GAAAD,mBAAA;IAAEE,sBAAsB,GAAAF,mBAAA;EAE9C,IAAAG,gBAAA,GAAmDC,eAAe,CAC9DF,sBAAsB,GAAGH,QAAQ,GAAGM,SAAS,EAC7CC,sBAAsB,CAACT,eAAe,EAAEI,eAAe,CAAC,CAC3D;IAHMM,iBAAiB,GAAAJ,gBAAA;IAAEK,qBAAqB,GAAAL,gBAAA;EAK/C,IAAMM,oBAAoB,GAAG1B,cAAK,CAAC2B,WAAW,CAC1C,UAACC,KAAoB;IACjB,IAAI,CAACT,sBAAsB,EAAE;MACzB;;IAGJ,IAAMU,iBAAiB,GAAGN,sBAAsB,CAACK,KAAK,EAAEV,eAAe,CAAC;IACxEO,qBAAqB,CAACI,iBAAiB,CAAC;IAExC,IAAI,OAAOd,gBAAgB,KAAK,UAAU,EAAE;MACxCA,gBAAgB,CAACc,iBAAiB,CAAC;;GAE1C,EACD,CAACV,sBAAsB,EAAEJ,gBAAgB,EAAEe,IAAI,CAACC,SAAS,CAACb,eAAe,CAAC,CAAC,CAC9E;EAED,IAAI,CAACC,sBAAsB,EAAE;IACzB,OAAO,CAACL,eAAe,EAAE;MAAA,OAAMQ,SAAS;MAAC;;EAG7C,OAAO,CAACE,iBAAiB,EAAEE,oBAAoB,CAAC;AACpD;AAEA,SAASH,sBAAsBA,CAACS,QAAuB,EAAEd,eAA2C;EAChG,IAAMW,iBAAiB,GAAArB,QAAA,KAAuBwB,QAAQ,CAAE;EAExD9B,MAAM,CAACC,IAAI,CAACe,eAAe,CAAC,CAACe,OAAO,CAAC,UAAAC,OAAO;IACxC,IAAI,CAAChB,eAAe,CAACgB,OAAO,CAAC,EAAE;MAC3B,OAAOL,iBAAiB,CAACK,OAAO,CAAC;;GAExC,CAAC;EAEF,OAAOL,iBAAiB;AAC5B;;;;"}
@@ -1,10 +1,10 @@
1
1
  import { useLazyEffect } from '../../../../hooks/useLazyEffect.js';
2
2
 
3
3
  function useTableDataListener(table) {
4
- const meta = table.options.meta;
5
- const rows = table.getRowModel().rows;
6
- useLazyEffect(() => {
7
- const rowActiveIndex = meta.rowActive.rowActiveIndex;
4
+ var meta = table.options.meta;
5
+ var rows = table.getRowModel().rows;
6
+ useLazyEffect(function () {
7
+ var rowActiveIndex = meta.rowActive.rowActiveIndex;
8
8
  if (rowActiveIndex !== undefined && rowActiveIndex > rows.length) {
9
9
  meta.rowActive.setRowActiveIndex(0);
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useTableDataListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableDataListener.ts"],"sourcesContent":["import { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { useLazyEffect } from '../../../../hooks/useLazyEffect';\n\nexport function useTableDataListener<TType = unknown>(table: ReactTable<TType>) {\n const meta = table.options.meta as ReactTableMeta<TType>;\n const rows = table.getRowModel().rows;\n\n useLazyEffect(() => {\n const rowActiveIndex = meta.rowActive.rowActiveIndex;\n\n if (rowActiveIndex !== undefined && rowActiveIndex > rows.length) {\n meta.rowActive.setRowActiveIndex(0);\n }\n }, [rows.length]);\n}\n"],"names":["useTableDataListener","table","meta","options","rows","getRowModel","useLazyEffect","rowActiveIndex","rowActive","undefined","length","setRowActiveIndex"],"mappings":";;SAGgBA,oBAAoBA,CAAkBC,KAAwB;EAC1E,MAAMC,IAAI,GAAGD,KAAK,CAACE,OAAO,CAACD,IAA6B;EACxD,MAAME,IAAI,GAAGH,KAAK,CAACI,WAAW,EAAE,CAACD,IAAI;EAErCE,aAAa,CAAC;IACV,MAAMC,cAAc,GAAGL,IAAI,CAACM,SAAS,CAACD,cAAc;IAEpD,IAAIA,cAAc,KAAKE,SAAS,IAAIF,cAAc,GAAGH,IAAI,CAACM,MAAM,EAAE;MAC9DR,IAAI,CAACM,SAAS,CAACG,iBAAiB,CAAC,CAAC,CAAC;;GAE1C,EAAE,CAACP,IAAI,CAACM,MAAM,CAAC,CAAC;AACrB;;;;"}
1
+ {"version":3,"file":"useTableDataListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableDataListener.ts"],"sourcesContent":["import { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { useLazyEffect } from '../../../../hooks/useLazyEffect';\n\nexport function useTableDataListener<TType = unknown>(table: ReactTable<TType>) {\n const meta = table.options.meta as ReactTableMeta<TType>;\n const rows = table.getRowModel().rows;\n\n useLazyEffect(() => {\n const rowActiveIndex = meta.rowActive.rowActiveIndex;\n\n if (rowActiveIndex !== undefined && rowActiveIndex > rows.length) {\n meta.rowActive.setRowActiveIndex(0);\n }\n }, [rows.length]);\n}\n"],"names":["useTableDataListener","table","meta","options","rows","getRowModel","useLazyEffect","rowActiveIndex","rowActive","undefined","length","setRowActiveIndex"],"mappings":";;SAGgBA,oBAAoBA,CAAkBC,KAAwB;EAC1E,IAAMC,IAAI,GAAGD,KAAK,CAACE,OAAO,CAACD,IAA6B;EACxD,IAAME,IAAI,GAAGH,KAAK,CAACI,WAAW,EAAE,CAACD,IAAI;EAErCE,aAAa,CAAC;IACV,IAAMC,cAAc,GAAGL,IAAI,CAACM,SAAS,CAACD,cAAc;IAEpD,IAAIA,cAAc,KAAKE,SAAS,IAAIF,cAAc,GAAGH,IAAI,CAACM,MAAM,EAAE;MAC9DR,IAAI,CAACM,SAAS,CAACG,iBAAiB,CAAC,CAAC,CAAC;;GAE1C,EAAE,CAACP,IAAI,CAACM,MAAM,CAAC,CAAC;AACrB;;;;"}
@@ -5,10 +5,10 @@ import { useLazyEffect } from '../../../../hooks/useLazyEffect.js';
5
5
  // to control the state outside the table. this listener is really here to let the consumer make a server request
6
6
  // and provide the server with the filtering state, so that it can filter server side
7
7
  function useTableFilterListener(table, onFilter) {
8
- const columnFilters = table.getState().columnFilters;
9
- useLazyEffect(() => {
8
+ var columnFilters = table.getState().columnFilters;
9
+ useLazyEffect(function () {
10
10
  if (table.options.enableColumnFilters && typeof onFilter === 'function') {
11
- const hiddenColumns = getHiddenColumns(table.getState().columnVisibility);
11
+ var hiddenColumns = getHiddenColumns(table.getState().columnVisibility);
12
12
  onFilter(columnFilters, hiddenColumns);
13
13
  if (table.options.enableRowSelection) {
14
14
  table.resetRowSelection();
@@ -1 +1 @@
1
- {"version":3,"file":"useTableFilterListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableFilterListener.ts"],"sourcesContent":["import { Table as ReactTable } from '@tanstack/react-table';\nimport { useLazyEffect } from '../../../../hooks/useLazyEffect';\nimport { TableFilterHandler } from '../../types';\nimport { getHiddenColumns } from '../util/columns';\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 filtering state, so that it can filter server side\nexport function useTableFilterListener<TType = unknown>(table: ReactTable<TType>, onFilter?: TableFilterHandler) {\n const columnFilters = table.getState().columnFilters;\n\n useLazyEffect(() => {\n if (table.options.enableColumnFilters && typeof onFilter === 'function') {\n const hiddenColumns = getHiddenColumns(table.getState().columnVisibility);\n onFilter(columnFilters, hiddenColumns);\n\n if (table.options.enableRowSelection) {\n table.resetRowSelection();\n }\n }\n }, [table.options.enableColumnFilters, columnFilters]);\n}\n"],"names":["useTableFilterListener","table","onFilter","columnFilters","getState","useLazyEffect","options","enableColumnFilters","hiddenColumns","getHiddenColumns","columnVisibility","enableRowSelection","resetRowSelection"],"mappings":";;;AAKA;AACA;AACA;SACgBA,sBAAsBA,CAAkBC,KAAwB,EAAEC,QAA6B;EAC3G,MAAMC,aAAa,GAAGF,KAAK,CAACG,QAAQ,EAAE,CAACD,aAAa;EAEpDE,aAAa,CAAC;IACV,IAAIJ,KAAK,CAACK,OAAO,CAACC,mBAAmB,IAAI,OAAOL,QAAQ,KAAK,UAAU,EAAE;MACrE,MAAMM,aAAa,GAAGC,gBAAgB,CAACR,KAAK,CAACG,QAAQ,EAAE,CAACM,gBAAgB,CAAC;MACzER,QAAQ,CAACC,aAAa,EAAEK,aAAa,CAAC;MAEtC,IAAIP,KAAK,CAACK,OAAO,CAACK,kBAAkB,EAAE;QAClCV,KAAK,CAACW,iBAAiB,EAAE;;;GAGpC,EAAE,CAACX,KAAK,CAACK,OAAO,CAACC,mBAAmB,EAAEJ,aAAa,CAAC,CAAC;AAC1D;;;;"}
1
+ {"version":3,"file":"useTableFilterListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableFilterListener.ts"],"sourcesContent":["import { Table as ReactTable } from '@tanstack/react-table';\nimport { useLazyEffect } from '../../../../hooks/useLazyEffect';\nimport { TableFilterHandler } from '../../types';\nimport { getHiddenColumns } from '../util/columns';\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 filtering state, so that it can filter server side\nexport function useTableFilterListener<TType = unknown>(table: ReactTable<TType>, onFilter?: TableFilterHandler) {\n const columnFilters = table.getState().columnFilters;\n\n useLazyEffect(() => {\n if (table.options.enableColumnFilters && typeof onFilter === 'function') {\n const hiddenColumns = getHiddenColumns(table.getState().columnVisibility);\n onFilter(columnFilters, hiddenColumns);\n\n if (table.options.enableRowSelection) {\n table.resetRowSelection();\n }\n }\n }, [table.options.enableColumnFilters, columnFilters]);\n}\n"],"names":["useTableFilterListener","table","onFilter","columnFilters","getState","useLazyEffect","options","enableColumnFilters","hiddenColumns","getHiddenColumns","columnVisibility","enableRowSelection","resetRowSelection"],"mappings":";;;AAKA;AACA;AACA;SACgBA,sBAAsBA,CAAkBC,KAAwB,EAAEC,QAA6B;EAC3G,IAAMC,aAAa,GAAGF,KAAK,CAACG,QAAQ,EAAE,CAACD,aAAa;EAEpDE,aAAa,CAAC;IACV,IAAIJ,KAAK,CAACK,OAAO,CAACC,mBAAmB,IAAI,OAAOL,QAAQ,KAAK,UAAU,EAAE;MACrE,IAAMM,aAAa,GAAGC,gBAAgB,CAACR,KAAK,CAACG,QAAQ,EAAE,CAACM,gBAAgB,CAAC;MACzER,QAAQ,CAACC,aAAa,EAAEK,aAAa,CAAC;MAEtC,IAAIP,KAAK,CAACK,OAAO,CAACK,kBAAkB,EAAE;QAClCV,KAAK,CAACW,iBAAiB,EAAE;;;GAGpC,EAAE,CAACX,KAAK,CAACK,OAAO,CAACC,mBAAmB,EAAEJ,aAAa,CAAC,CAAC;AAC1D;;;;"}
@@ -4,22 +4,24 @@ import { isInternalColumn, getCellMinWidth } from '../util/columns.js';
4
4
  import { useLazyEffect } from '../../../../hooks/useLazyEffect.js';
5
5
 
6
6
  function useTableFontSizeListener(table) {
7
- const meta = table.options.meta;
8
- const previousFontSizeRef = React__default.useRef(meta.fontSize.size);
9
- useLazyEffect(() => {
10
- const cellWidthDifference = getCellWidthDifference(`${previousFontSizeRef.current}-${meta.fontSize.size}`);
11
- const globalMinSize = getCellMinWidth(meta.fontSize.size);
12
- table.setColumnSizing(sizes => {
13
- return Object.fromEntries(Object.entries(sizes).map(([columnName, prevColumnSize]) => {
7
+ var meta = table.options.meta;
8
+ var previousFontSizeRef = React__default.useRef(meta.fontSize.size);
9
+ useLazyEffect(function () {
10
+ var cellWidthDifference = getCellWidthDifference(previousFontSizeRef.current + "-" + meta.fontSize.size);
11
+ var globalMinSize = getCellMinWidth(meta.fontSize.size);
12
+ table.setColumnSizing(function (sizes) {
13
+ return Object.fromEntries(Object.entries(sizes).map(function (_ref) {
14
14
  var _column$columnDef$min;
15
- const column = table.getColumn(columnName);
15
+ var columnName = _ref[0],
16
+ prevColumnSize = _ref[1];
17
+ var column = table.getColumn(columnName);
16
18
  if (isInternalColumn(columnName)) {
17
19
  var _column$getSize;
18
20
  return [columnName, (_column$getSize = column === null || column === void 0 ? void 0 : column.getSize()) !== null && _column$getSize !== void 0 ? _column$getSize : prevColumnSize];
19
21
  }
20
22
  // Prevents width value in the setting to go below the minColumnSize
21
- const minColumnSize = (_column$columnDef$min = column === null || column === void 0 ? void 0 : column.columnDef.minSize) !== null && _column$columnDef$min !== void 0 ? _column$columnDef$min : globalMinSize;
22
- const newSize = Math.max(minColumnSize, prevColumnSize + cellWidthDifference);
23
+ var minColumnSize = (_column$columnDef$min = column === null || column === void 0 ? void 0 : column.columnDef.minSize) !== null && _column$columnDef$min !== void 0 ? _column$columnDef$min : globalMinSize;
24
+ var newSize = Math.max(minColumnSize, prevColumnSize + cellWidthDifference);
23
25
  return [columnName, newSize];
24
26
  }));
25
27
  });
@@ -28,15 +30,15 @@ function useTableFontSizeListener(table) {
28
30
  }
29
31
  function getCellWidthDifference(fontSizeKey) {
30
32
  switch (fontSizeKey) {
31
- case `${FontSizes.small}-${FontSizes.medium}`:
32
- case `${FontSizes.medium}-${FontSizes.large}`:
33
+ case FontSizes.small + "-" + FontSizes.medium:
34
+ case FontSizes.medium + "-" + FontSizes.large:
33
35
  return 8;
34
- case `${FontSizes.medium}-${FontSizes.small}`:
35
- case `${FontSizes.large}-${FontSizes.medium}`:
36
+ case FontSizes.medium + "-" + FontSizes.small:
37
+ case FontSizes.large + "-" + FontSizes.medium:
36
38
  return -8;
37
- case `${FontSizes.small}-${FontSizes.large}`:
39
+ case FontSizes.small + "-" + FontSizes.large:
38
40
  return 16;
39
- case `${FontSizes.large}-${FontSizes.small}`:
41
+ case FontSizes.large + "-" + FontSizes.small:
40
42
  return -16;
41
43
  default:
42
44
  return 0;
@@ -1 +1 @@
1
- {"version":3,"file":"useTableFontSizeListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.ts"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { useLazyEffect } from '../../../../hooks/useLazyEffect';\nimport { FontSizes } from '../../../../types';\nimport { getCellMinWidth, isInternalColumn } from '../util/columns';\n\nexport function useTableFontSizeListener<TType = unknown>(table: ReactTable<TType>) {\n const meta = table.options.meta as ReactTableMeta<TType>;\n const previousFontSizeRef = React.useRef(meta.fontSize.size);\n\n useLazyEffect(() => {\n const cellWidthDifference = getCellWidthDifference(`${previousFontSizeRef.current}-${meta.fontSize.size}`);\n const globalMinSize = getCellMinWidth(meta.fontSize.size);\n\n table.setColumnSizing(sizes => {\n return Object.fromEntries(\n Object.entries(sizes).map(([columnName, prevColumnSize]) => {\n const column = table.getColumn(columnName);\n\n if (isInternalColumn(columnName)) {\n return [columnName, column?.getSize() ?? prevColumnSize];\n }\n\n // Prevents width value in the setting to go below the minColumnSize\n const minColumnSize = column?.columnDef.minSize ?? globalMinSize;\n const newSize = Math.max(minColumnSize, prevColumnSize + cellWidthDifference);\n return [columnName, newSize];\n })\n );\n });\n previousFontSizeRef.current = meta.fontSize.size;\n }, [meta.fontSize.size]);\n}\n\nfunction getCellWidthDifference(fontSizeKey: string) {\n switch (fontSizeKey) {\n case `${FontSizes.small}-${FontSizes.medium}`:\n case `${FontSizes.medium}-${FontSizes.large}`:\n return 8;\n\n case `${FontSizes.medium}-${FontSizes.small}`:\n case `${FontSizes.large}-${FontSizes.medium}`:\n return -8;\n\n case `${FontSizes.small}-${FontSizes.large}`:\n return 16;\n\n case `${FontSizes.large}-${FontSizes.small}`:\n return -16;\n\n default:\n return 0;\n }\n}\n"],"names":["useTableFontSizeListener","table","meta","options","previousFontSizeRef","React","useRef","fontSize","size","useLazyEffect","cellWidthDifference","getCellWidthDifference","current","globalMinSize","getCellMinWidth","setColumnSizing","sizes","Object","fromEntries","entries","map","columnName","prevColumnSize","column","getColumn","isInternalColumn","_column$getSize","getSize","minColumnSize","_column$columnDef$min","columnDef","minSize","newSize","Math","max","fontSizeKey","FontSizes","small","medium","large"],"mappings":";;;;;SAMgBA,wBAAwBA,CAAkBC,KAAwB;EAC9E,MAAMC,IAAI,GAAGD,KAAK,CAACE,OAAO,CAACD,IAA6B;EACxD,MAAME,mBAAmB,GAAGC,cAAK,CAACC,MAAM,CAACJ,IAAI,CAACK,QAAQ,CAACC,IAAI,CAAC;EAE5DC,aAAa,CAAC;IACV,MAAMC,mBAAmB,GAAGC,sBAAsB,CAAC,GAAGP,mBAAmB,CAACQ,OAAO,IAAIV,IAAI,CAACK,QAAQ,CAACC,IAAI,EAAE,CAAC;IAC1G,MAAMK,aAAa,GAAGC,eAAe,CAACZ,IAAI,CAACK,QAAQ,CAACC,IAAI,CAAC;IAEzDP,KAAK,CAACc,eAAe,CAACC,KAAK;MACvB,OAAOC,MAAM,CAACC,WAAW,CACrBD,MAAM,CAACE,OAAO,CAACH,KAAK,CAAC,CAACI,GAAG,CAAC,CAAC,CAACC,UAAU,EAAEC,cAAc,CAAC;;QACnD,MAAMC,MAAM,GAAGtB,KAAK,CAACuB,SAAS,CAACH,UAAU,CAAC;QAE1C,IAAII,gBAAgB,CAACJ,UAAU,CAAC,EAAE;UAAA,IAAAK,eAAA;UAC9B,OAAO,CAACL,UAAU,GAAAK,eAAA,GAAEH,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEI,OAAO,EAAE,cAAAD,eAAA,cAAAA,eAAA,GAAIJ,cAAc,CAAC;;;QAI5D,MAAMM,aAAa,IAAAC,qBAAA,GAAGN,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEO,SAAS,CAACC,OAAO,cAAAF,qBAAA,cAAAA,qBAAA,GAAIhB,aAAa;QAChE,MAAMmB,OAAO,GAAGC,IAAI,CAACC,GAAG,CAACN,aAAa,EAAEN,cAAc,GAAGZ,mBAAmB,CAAC;QAC7E,OAAO,CAACW,UAAU,EAAEW,OAAO,CAAC;OAC/B,CAAC,CACL;KACJ,CAAC;IACF5B,mBAAmB,CAACQ,OAAO,GAAGV,IAAI,CAACK,QAAQ,CAACC,IAAI;GACnD,EAAE,CAACN,IAAI,CAACK,QAAQ,CAACC,IAAI,CAAC,CAAC;AAC5B;AAEA,SAASG,sBAAsBA,CAACwB,WAAmB;EAC/C,QAAQA,WAAW;IACf,KAAK,GAAGC,SAAS,CAACC,KAAK,IAAID,SAAS,CAACE,MAAM,EAAE;IAC7C,KAAK,GAAGF,SAAS,CAACE,MAAM,IAAIF,SAAS,CAACG,KAAK,EAAE;MACzC,OAAO,CAAC;IAEZ,KAAK,GAAGH,SAAS,CAACE,MAAM,IAAIF,SAAS,CAACC,KAAK,EAAE;IAC7C,KAAK,GAAGD,SAAS,CAACG,KAAK,IAAIH,SAAS,CAACE,MAAM,EAAE;MACzC,OAAO,CAAC,CAAC;IAEb,KAAK,GAAGF,SAAS,CAACC,KAAK,IAAID,SAAS,CAACG,KAAK,EAAE;MACxC,OAAO,EAAE;IAEb,KAAK,GAAGH,SAAS,CAACG,KAAK,IAAIH,SAAS,CAACC,KAAK,EAAE;MACxC,OAAO,CAAC,EAAE;IAEd;MACI,OAAO,CAAC;;AAEpB;;;;"}
1
+ {"version":3,"file":"useTableFontSizeListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.ts"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { useLazyEffect } from '../../../../hooks/useLazyEffect';\nimport { FontSizes } from '../../../../types';\nimport { getCellMinWidth, isInternalColumn } from '../util/columns';\n\nexport function useTableFontSizeListener<TType = unknown>(table: ReactTable<TType>) {\n const meta = table.options.meta as ReactTableMeta<TType>;\n const previousFontSizeRef = React.useRef(meta.fontSize.size);\n\n useLazyEffect(() => {\n const cellWidthDifference = getCellWidthDifference(`${previousFontSizeRef.current}-${meta.fontSize.size}`);\n const globalMinSize = getCellMinWidth(meta.fontSize.size);\n\n table.setColumnSizing(sizes => {\n return Object.fromEntries(\n Object.entries(sizes).map(([columnName, prevColumnSize]) => {\n const column = table.getColumn(columnName);\n\n if (isInternalColumn(columnName)) {\n return [columnName, column?.getSize() ?? prevColumnSize];\n }\n\n // Prevents width value in the setting to go below the minColumnSize\n const minColumnSize = column?.columnDef.minSize ?? globalMinSize;\n const newSize = Math.max(minColumnSize, prevColumnSize + cellWidthDifference);\n return [columnName, newSize];\n })\n );\n });\n previousFontSizeRef.current = meta.fontSize.size;\n }, [meta.fontSize.size]);\n}\n\nfunction getCellWidthDifference(fontSizeKey: string) {\n switch (fontSizeKey) {\n case `${FontSizes.small}-${FontSizes.medium}`:\n case `${FontSizes.medium}-${FontSizes.large}`:\n return 8;\n\n case `${FontSizes.medium}-${FontSizes.small}`:\n case `${FontSizes.large}-${FontSizes.medium}`:\n return -8;\n\n case `${FontSizes.small}-${FontSizes.large}`:\n return 16;\n\n case `${FontSizes.large}-${FontSizes.small}`:\n return -16;\n\n default:\n return 0;\n }\n}\n"],"names":["useTableFontSizeListener","table","meta","options","previousFontSizeRef","React","useRef","fontSize","size","useLazyEffect","cellWidthDifference","getCellWidthDifference","current","globalMinSize","getCellMinWidth","setColumnSizing","sizes","Object","fromEntries","entries","map","_ref","columnName","prevColumnSize","column","getColumn","isInternalColumn","_column$getSize","getSize","minColumnSize","_column$columnDef$min","columnDef","minSize","newSize","Math","max","fontSizeKey","FontSizes","small","medium","large"],"mappings":";;;;;SAMgBA,wBAAwBA,CAAkBC,KAAwB;EAC9E,IAAMC,IAAI,GAAGD,KAAK,CAACE,OAAO,CAACD,IAA6B;EACxD,IAAME,mBAAmB,GAAGC,cAAK,CAACC,MAAM,CAACJ,IAAI,CAACK,QAAQ,CAACC,IAAI,CAAC;EAE5DC,aAAa,CAAC;IACV,IAAMC,mBAAmB,GAAGC,sBAAsB,CAAIP,mBAAmB,CAACQ,OAAO,SAAIV,IAAI,CAACK,QAAQ,CAACC,IAAM,CAAC;IAC1G,IAAMK,aAAa,GAAGC,eAAe,CAACZ,IAAI,CAACK,QAAQ,CAACC,IAAI,CAAC;IAEzDP,KAAK,CAACc,eAAe,CAAC,UAAAC,KAAK;MACvB,OAAOC,MAAM,CAACC,WAAW,CACrBD,MAAM,CAACE,OAAO,CAACH,KAAK,CAAC,CAACI,GAAG,CAAC,UAAAC,IAAA;;YAAEC,UAAU,GAAAD,IAAA;UAAEE,cAAc,GAAAF,IAAA;QAClD,IAAMG,MAAM,GAAGvB,KAAK,CAACwB,SAAS,CAACH,UAAU,CAAC;QAE1C,IAAII,gBAAgB,CAACJ,UAAU,CAAC,EAAE;UAAA,IAAAK,eAAA;UAC9B,OAAO,CAACL,UAAU,GAAAK,eAAA,GAAEH,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEI,OAAO,EAAE,cAAAD,eAAA,cAAAA,eAAA,GAAIJ,cAAc,CAAC;;;QAI5D,IAAMM,aAAa,IAAAC,qBAAA,GAAGN,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEO,SAAS,CAACC,OAAO,cAAAF,qBAAA,cAAAA,qBAAA,GAAIjB,aAAa;QAChE,IAAMoB,OAAO,GAAGC,IAAI,CAACC,GAAG,CAACN,aAAa,EAAEN,cAAc,GAAGb,mBAAmB,CAAC;QAC7E,OAAO,CAACY,UAAU,EAAEW,OAAO,CAAC;OAC/B,CAAC,CACL;KACJ,CAAC;IACF7B,mBAAmB,CAACQ,OAAO,GAAGV,IAAI,CAACK,QAAQ,CAACC,IAAI;GACnD,EAAE,CAACN,IAAI,CAACK,QAAQ,CAACC,IAAI,CAAC,CAAC;AAC5B;AAEA,SAASG,sBAAsBA,CAACyB,WAAmB;EAC/C,QAAQA,WAAW;IACf,KAAQC,SAAS,CAACC,KAAK,SAAID,SAAS,CAACE,MAAM;IAC3C,KAAQF,SAAS,CAACE,MAAM,SAAIF,SAAS,CAACG,KAAK;MACvC,OAAO,CAAC;IAEZ,KAAQH,SAAS,CAACE,MAAM,SAAIF,SAAS,CAACC,KAAK;IAC3C,KAAQD,SAAS,CAACG,KAAK,SAAIH,SAAS,CAACE,MAAM;MACvC,OAAO,CAAC,CAAC;IAEb,KAAQF,SAAS,CAACC,KAAK,SAAID,SAAS,CAACG,KAAK;MACtC,OAAO,EAAE;IAEb,KAAQH,SAAS,CAACG,KAAK,SAAIH,SAAS,CAACC,KAAK;MACtC,OAAO,CAAC,EAAE;IAEd;MACI,OAAO,CAAC;;AAEpB;;;;"}
@@ -2,8 +2,8 @@ import { FontSizes } from '../../../../types.js';
2
2
  import { useLazyEffect } from '../../../../hooks/useLazyEffect.js';
3
3
 
4
4
  function useTableRowHeightListener(table) {
5
- const meta = table.options.meta;
6
- useLazyEffect(() => {
5
+ var meta = table.options.meta;
6
+ useLazyEffect(function () {
7
7
  if (meta.rowHeight.height === 'short' && meta.fontSize.size === FontSizes.large) {
8
8
  meta.fontSize.setSize(FontSizes.medium);
9
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useTableRowHeightListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.ts"],"sourcesContent":["import { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { useLazyEffect } from '../../../../hooks/useLazyEffect';\nimport { FontSizes } from '../../../../types';\n\nexport function useTableRowHeightListener<TType = unknown>(table: ReactTable<TType>) {\n const meta = table.options.meta as ReactTableMeta<TType>;\n\n useLazyEffect(() => {\n if (meta.rowHeight.height === 'short' && meta.fontSize.size === FontSizes.large) {\n meta.fontSize.setSize(FontSizes.medium);\n }\n }, [meta.rowHeight.height]);\n}\n"],"names":["useTableRowHeightListener","table","meta","options","useLazyEffect","rowHeight","height","fontSize","size","FontSizes","large","setSize","medium"],"mappings":";;;SAIgBA,yBAAyBA,CAAkBC,KAAwB;EAC/E,MAAMC,IAAI,GAAGD,KAAK,CAACE,OAAO,CAACD,IAA6B;EAExDE,aAAa,CAAC;IACV,IAAIF,IAAI,CAACG,SAAS,CAACC,MAAM,KAAK,OAAO,IAAIJ,IAAI,CAACK,QAAQ,CAACC,IAAI,KAAKC,SAAS,CAACC,KAAK,EAAE;MAC7ER,IAAI,CAACK,QAAQ,CAACI,OAAO,CAACF,SAAS,CAACG,MAAM,CAAC;;GAE9C,EAAE,CAACV,IAAI,CAACG,SAAS,CAACC,MAAM,CAAC,CAAC;AAC/B;;;;"}
1
+ {"version":3,"file":"useTableRowHeightListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.ts"],"sourcesContent":["import { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { useLazyEffect } from '../../../../hooks/useLazyEffect';\nimport { FontSizes } from '../../../../types';\n\nexport function useTableRowHeightListener<TType = unknown>(table: ReactTable<TType>) {\n const meta = table.options.meta as ReactTableMeta<TType>;\n\n useLazyEffect(() => {\n if (meta.rowHeight.height === 'short' && meta.fontSize.size === FontSizes.large) {\n meta.fontSize.setSize(FontSizes.medium);\n }\n }, [meta.rowHeight.height]);\n}\n"],"names":["useTableRowHeightListener","table","meta","options","useLazyEffect","rowHeight","height","fontSize","size","FontSizes","large","setSize","medium"],"mappings":";;;SAIgBA,yBAAyBA,CAAkBC,KAAwB;EAC/E,IAAMC,IAAI,GAAGD,KAAK,CAACE,OAAO,CAACD,IAA6B;EAExDE,aAAa,CAAC;IACV,IAAIF,IAAI,CAACG,SAAS,CAACC,MAAM,KAAK,OAAO,IAAIJ,IAAI,CAACK,QAAQ,CAACC,IAAI,KAAKC,SAAS,CAACC,KAAK,EAAE;MAC7ER,IAAI,CAACK,QAAQ,CAACI,OAAO,CAACF,SAAS,CAACG,MAAM,CAAC;;GAE9C,EAAE,CAACV,IAAI,CAACG,SAAS,CAACC,MAAM,CAAC,CAAC;AAC/B;;;;"}
@@ -2,11 +2,13 @@ import { useLazyEffect } from '../../../../hooks/useLazyEffect.js';
2
2
 
3
3
  function useTableRowSelectionListener(table, onRowSelect) {
4
4
  // note that the selected row model may not contain all rows in state when using server loading
5
- const rows = table.getSelectedRowModel().flatRows;
6
- const state = table.getState().rowSelection;
7
- useLazyEffect(() => {
5
+ var rows = table.getSelectedRowModel().flatRows;
6
+ var state = table.getState().rowSelection;
7
+ useLazyEffect(function () {
8
8
  if (table.options.enableRowSelection && typeof onRowSelect === 'function') {
9
- onRowSelect(rows.map(row => row.original), Object.keys(state));
9
+ onRowSelect(rows.map(function (row) {
10
+ return row.original;
11
+ }), Object.keys(state));
10
12
  }
11
13
  /**
12
14
  * Casting to a boolean, since enableRowSelection can be a function,
@@ -1 +1 @@
1
- {"version":3,"file":"useTableRowSelectionListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.ts"],"sourcesContent":["import { Table as ReactTable } from '@tanstack/react-table';\nimport { useLazyEffect } from '../../../../hooks/useLazyEffect';\nimport { TableRowSelectHandler } from '../../types';\n\nexport function useTableRowSelectionListener<TType = unknown>(\n table: ReactTable<TType>,\n onRowSelect?: TableRowSelectHandler<TType>\n) {\n // note that the selected row model may not contain all rows in state when using server loading\n const rows = table.getSelectedRowModel().flatRows;\n const state = table.getState().rowSelection;\n\n useLazyEffect(() => {\n if (table.options.enableRowSelection && typeof onRowSelect === 'function') {\n onRowSelect(\n rows.map(row => row.original),\n Object.keys(state)\n );\n }\n /**\n * Casting to a boolean, since enableRowSelection can be a function,\n * and setting a function as depoendency will lead to infinity loop. And in case of row selection useEffect,\n * we only need to know if selection was enabled or disabled, because enableRowSelection function\n * will be applied directly to particular rows.\n */\n }, [!!table.options.enableRowSelection, state]);\n}\n"],"names":["useTableRowSelectionListener","table","onRowSelect","rows","getSelectedRowModel","flatRows","state","getState","rowSelection","useLazyEffect","options","enableRowSelection","map","row","original","Object","keys"],"mappings":";;SAIgBA,4BAA4BA,CACxCC,KAAwB,EACxBC,WAA0C;;EAG1C,MAAMC,IAAI,GAAGF,KAAK,CAACG,mBAAmB,EAAE,CAACC,QAAQ;EACjD,MAAMC,KAAK,GAAGL,KAAK,CAACM,QAAQ,EAAE,CAACC,YAAY;EAE3CC,aAAa,CAAC;IACV,IAAIR,KAAK,CAACS,OAAO,CAACC,kBAAkB,IAAI,OAAOT,WAAW,KAAK,UAAU,EAAE;MACvEA,WAAW,CACPC,IAAI,CAACS,GAAG,CAACC,GAAG,IAAIA,GAAG,CAACC,QAAQ,CAAC,EAC7BC,MAAM,CAACC,IAAI,CAACV,KAAK,CAAC,CACrB;;;;;;;;GAQR,EAAE,CAAC,CAAC,CAACL,KAAK,CAACS,OAAO,CAACC,kBAAkB,EAAEL,KAAK,CAAC,CAAC;AACnD;;;;"}
1
+ {"version":3,"file":"useTableRowSelectionListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.ts"],"sourcesContent":["import { Table as ReactTable } from '@tanstack/react-table';\nimport { useLazyEffect } from '../../../../hooks/useLazyEffect';\nimport { TableRowSelectHandler } from '../../types';\n\nexport function useTableRowSelectionListener<TType = unknown>(\n table: ReactTable<TType>,\n onRowSelect?: TableRowSelectHandler<TType>\n) {\n // note that the selected row model may not contain all rows in state when using server loading\n const rows = table.getSelectedRowModel().flatRows;\n const state = table.getState().rowSelection;\n\n useLazyEffect(() => {\n if (table.options.enableRowSelection && typeof onRowSelect === 'function') {\n onRowSelect(\n rows.map(row => row.original),\n Object.keys(state)\n );\n }\n /**\n * Casting to a boolean, since enableRowSelection can be a function,\n * and setting a function as depoendency will lead to infinity loop. And in case of row selection useEffect,\n * we only need to know if selection was enabled or disabled, because enableRowSelection function\n * will be applied directly to particular rows.\n */\n }, [!!table.options.enableRowSelection, state]);\n}\n"],"names":["useTableRowSelectionListener","table","onRowSelect","rows","getSelectedRowModel","flatRows","state","getState","rowSelection","useLazyEffect","options","enableRowSelection","map","row","original","Object","keys"],"mappings":";;SAIgBA,4BAA4BA,CACxCC,KAAwB,EACxBC,WAA0C;;EAG1C,IAAMC,IAAI,GAAGF,KAAK,CAACG,mBAAmB,EAAE,CAACC,QAAQ;EACjD,IAAMC,KAAK,GAAGL,KAAK,CAACM,QAAQ,EAAE,CAACC,YAAY;EAE3CC,aAAa,CAAC;IACV,IAAIR,KAAK,CAACS,OAAO,CAACC,kBAAkB,IAAI,OAAOT,WAAW,KAAK,UAAU,EAAE;MACvEA,WAAW,CACPC,IAAI,CAACS,GAAG,CAAC,UAAAC,GAAG;QAAA,OAAIA,GAAG,CAACC,QAAQ;QAAC,EAC7BC,MAAM,CAACC,IAAI,CAACV,KAAK,CAAC,CACrB;;;;;;;;GAQR,EAAE,CAAC,CAAC,CAACL,KAAK,CAACS,OAAO,CAACC,kBAAkB,EAAEL,KAAK,CAAC,CAAC;AACnD;;;;"}
@@ -4,15 +4,15 @@ import { getHiddenColumns } from '../util/columns.js';
4
4
  import { useLazyEffect } from '../../../../hooks/useLazyEffect.js';
5
5
 
6
6
  function useTableSearchListener(table) {
7
- const meta = table.options.meta;
8
- const localization = useLocalization();
9
- const hiddenColumns = getHiddenColumns(table.getState().columnVisibility);
10
- const query = table.getState().globalFilter;
7
+ var meta = table.options.meta;
8
+ var localization = useLocalization();
9
+ var hiddenColumns = getHiddenColumns(table.getState().columnVisibility);
10
+ var query = table.getState().globalFilter;
11
11
  // Need to re-run search when columns are getting shown/hidden.
12
- useLazyEffect(() => {
12
+ useLazyEffect(function () {
13
13
  if (meta.search.isEnabled) {
14
- const currentFilter = query;
15
- requestAnimationFrame(() => {
14
+ var currentFilter = query;
15
+ requestAnimationFrame(function () {
16
16
  table.resetGlobalFilter();
17
17
  table.setGlobalFilter(currentFilter);
18
18
  });
@@ -22,7 +22,7 @@ function useTableSearchListener(table) {
22
22
  }
23
23
  }, [hiddenColumns.length]);
24
24
  // recalculates highlighted indexes whenever something important changes
25
- useLazyEffect(() => {
25
+ useLazyEffect(function () {
26
26
  if (meta.search.isEnabled) {
27
27
  resetHighlightedColumnIndexes(query, table, localization);
28
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useTableSearchListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableSearchListener.ts"],"sourcesContent":["import { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { resetHighlightedColumnIndexes } from '../util/search';\nimport { useLocalization } from '../../../../components/Provider/Localization';\nimport { useLazyEffect } from '../../../../hooks/useLazyEffect';\nimport { getHiddenColumns } from '../util/columns';\n\nexport function useTableSearchListener<TType = unknown>(table: ReactTable<TType>) {\n const meta = table.options.meta as ReactTableMeta<TType>;\n const localization = useLocalization();\n const hiddenColumns = getHiddenColumns(table.getState().columnVisibility);\n const query = table.getState().globalFilter;\n\n // Need to re-run search when columns are getting shown/hidden.\n useLazyEffect(() => {\n if (meta.search.isEnabled) {\n const currentFilter = query;\n requestAnimationFrame(() => {\n table.resetGlobalFilter();\n table.setGlobalFilter(currentFilter);\n });\n\n if (meta.search.handleSearch && meta.search.enableGlobalFilter && query) {\n meta.search.handleSearch(query, hiddenColumns);\n }\n }\n }, [hiddenColumns.length]);\n\n // recalculates highlighted indexes whenever something important changes\n useLazyEffect(() => {\n if (meta.search.isEnabled) {\n resetHighlightedColumnIndexes(query, table, localization);\n }\n }, [\n meta.server.loadAllStatus,\n meta.search.isEnabled,\n meta.search.enableGlobalFilter,\n table.getRowModel().rows.length,\n query,\n JSON.stringify(table.getState().sorting),\n ]);\n}\n"],"names":["useTableSearchListener","table","meta","options","localization","useLocalization","hiddenColumns","getHiddenColumns","getState","columnVisibility","query","globalFilter","useLazyEffect","search","isEnabled","currentFilter","requestAnimationFrame","resetGlobalFilter","setGlobalFilter","handleSearch","enableGlobalFilter","length","resetHighlightedColumnIndexes","server","loadAllStatus","getRowModel","rows","JSON","stringify","sorting"],"mappings":";;;;;SAMgBA,sBAAsBA,CAAkBC,KAAwB;EAC5E,MAAMC,IAAI,GAAGD,KAAK,CAACE,OAAO,CAACD,IAA6B;EACxD,MAAME,YAAY,GAAGC,eAAe,EAAE;EACtC,MAAMC,aAAa,GAAGC,gBAAgB,CAACN,KAAK,CAACO,QAAQ,EAAE,CAACC,gBAAgB,CAAC;EACzE,MAAMC,KAAK,GAAGT,KAAK,CAACO,QAAQ,EAAE,CAACG,YAAY;;EAG3CC,aAAa,CAAC;IACV,IAAIV,IAAI,CAACW,MAAM,CAACC,SAAS,EAAE;MACvB,MAAMC,aAAa,GAAGL,KAAK;MAC3BM,qBAAqB,CAAC;QAClBf,KAAK,CAACgB,iBAAiB,EAAE;QACzBhB,KAAK,CAACiB,eAAe,CAACH,aAAa,CAAC;OACvC,CAAC;MAEF,IAAIb,IAAI,CAACW,MAAM,CAACM,YAAY,IAAIjB,IAAI,CAACW,MAAM,CAACO,kBAAkB,IAAIV,KAAK,EAAE;QACrER,IAAI,CAACW,MAAM,CAACM,YAAY,CAACT,KAAK,EAAEJ,aAAa,CAAC;;;GAGzD,EAAE,CAACA,aAAa,CAACe,MAAM,CAAC,CAAC;;EAG1BT,aAAa,CAAC;IACV,IAAIV,IAAI,CAACW,MAAM,CAACC,SAAS,EAAE;MACvBQ,6BAA6B,CAACZ,KAAK,EAAET,KAAK,EAAEG,YAAY,CAAC;;GAEhE,EAAE,CACCF,IAAI,CAACqB,MAAM,CAACC,aAAa,EACzBtB,IAAI,CAACW,MAAM,CAACC,SAAS,EACrBZ,IAAI,CAACW,MAAM,CAACO,kBAAkB,EAC9BnB,KAAK,CAACwB,WAAW,EAAE,CAACC,IAAI,CAACL,MAAM,EAC/BX,KAAK,EACLiB,IAAI,CAACC,SAAS,CAAC3B,KAAK,CAACO,QAAQ,EAAE,CAACqB,OAAO,CAAC,CAC3C,CAAC;AACN;;;;"}
1
+ {"version":3,"file":"useTableSearchListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableSearchListener.ts"],"sourcesContent":["import { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { resetHighlightedColumnIndexes } from '../util/search';\nimport { useLocalization } from '../../../../components/Provider/Localization';\nimport { useLazyEffect } from '../../../../hooks/useLazyEffect';\nimport { getHiddenColumns } from '../util/columns';\n\nexport function useTableSearchListener<TType = unknown>(table: ReactTable<TType>) {\n const meta = table.options.meta as ReactTableMeta<TType>;\n const localization = useLocalization();\n const hiddenColumns = getHiddenColumns(table.getState().columnVisibility);\n const query = table.getState().globalFilter;\n\n // Need to re-run search when columns are getting shown/hidden.\n useLazyEffect(() => {\n if (meta.search.isEnabled) {\n const currentFilter = query;\n requestAnimationFrame(() => {\n table.resetGlobalFilter();\n table.setGlobalFilter(currentFilter);\n });\n\n if (meta.search.handleSearch && meta.search.enableGlobalFilter && query) {\n meta.search.handleSearch(query, hiddenColumns);\n }\n }\n }, [hiddenColumns.length]);\n\n // recalculates highlighted indexes whenever something important changes\n useLazyEffect(() => {\n if (meta.search.isEnabled) {\n resetHighlightedColumnIndexes(query, table, localization);\n }\n }, [\n meta.server.loadAllStatus,\n meta.search.isEnabled,\n meta.search.enableGlobalFilter,\n table.getRowModel().rows.length,\n query,\n JSON.stringify(table.getState().sorting),\n ]);\n}\n"],"names":["useTableSearchListener","table","meta","options","localization","useLocalization","hiddenColumns","getHiddenColumns","getState","columnVisibility","query","globalFilter","useLazyEffect","search","isEnabled","currentFilter","requestAnimationFrame","resetGlobalFilter","setGlobalFilter","handleSearch","enableGlobalFilter","length","resetHighlightedColumnIndexes","server","loadAllStatus","getRowModel","rows","JSON","stringify","sorting"],"mappings":";;;;;SAMgBA,sBAAsBA,CAAkBC,KAAwB;EAC5E,IAAMC,IAAI,GAAGD,KAAK,CAACE,OAAO,CAACD,IAA6B;EACxD,IAAME,YAAY,GAAGC,eAAe,EAAE;EACtC,IAAMC,aAAa,GAAGC,gBAAgB,CAACN,KAAK,CAACO,QAAQ,EAAE,CAACC,gBAAgB,CAAC;EACzE,IAAMC,KAAK,GAAGT,KAAK,CAACO,QAAQ,EAAE,CAACG,YAAY;;EAG3CC,aAAa,CAAC;IACV,IAAIV,IAAI,CAACW,MAAM,CAACC,SAAS,EAAE;MACvB,IAAMC,aAAa,GAAGL,KAAK;MAC3BM,qBAAqB,CAAC;QAClBf,KAAK,CAACgB,iBAAiB,EAAE;QACzBhB,KAAK,CAACiB,eAAe,CAACH,aAAa,CAAC;OACvC,CAAC;MAEF,IAAIb,IAAI,CAACW,MAAM,CAACM,YAAY,IAAIjB,IAAI,CAACW,MAAM,CAACO,kBAAkB,IAAIV,KAAK,EAAE;QACrER,IAAI,CAACW,MAAM,CAACM,YAAY,CAACT,KAAK,EAAEJ,aAAa,CAAC;;;GAGzD,EAAE,CAACA,aAAa,CAACe,MAAM,CAAC,CAAC;;EAG1BT,aAAa,CAAC;IACV,IAAIV,IAAI,CAACW,MAAM,CAACC,SAAS,EAAE;MACvBQ,6BAA6B,CAACZ,KAAK,EAAET,KAAK,EAAEG,YAAY,CAAC;;GAEhE,EAAE,CACCF,IAAI,CAACqB,MAAM,CAACC,aAAa,EACzBtB,IAAI,CAACW,MAAM,CAACC,SAAS,EACrBZ,IAAI,CAACW,MAAM,CAACO,kBAAkB,EAC9BnB,KAAK,CAACwB,WAAW,EAAE,CAACC,IAAI,CAACL,MAAM,EAC/BX,KAAK,EACLiB,IAAI,CAACC,SAAS,CAAC3B,KAAK,CAACO,QAAQ,EAAE,CAACqB,OAAO,CAAC,CAC3C,CAAC;AACN;;;;"}
@@ -2,14 +2,14 @@ import React__default from 'react';
2
2
  import { getHiddenColumns } from '../util/columns.js';
3
3
 
4
4
  function useTableServerLoadingListener(table, loadPage) {
5
- const meta = table.options.meta;
5
+ var meta = table.options.meta;
6
6
  // trigger load of the first page on mount
7
- React__default.useEffect(() => {
7
+ React__default.useEffect(function () {
8
8
  if (loadPage) {
9
- const sorting = table.getState().sorting;
10
- const columnFilters = table.getState().columnFilters;
11
- const search = meta.search.enableGlobalFilter ? table.getState().globalFilter : undefined;
12
- const hiddenColumns = getHiddenColumns(table.getState().columnVisibility);
9
+ var sorting = table.getState().sorting;
10
+ var columnFilters = table.getState().columnFilters;
11
+ var search = meta.search.enableGlobalFilter ? table.getState().globalFilter : undefined;
12
+ var hiddenColumns = getHiddenColumns(table.getState().columnVisibility);
13
13
  loadPage(0, sorting, columnFilters, search, hiddenColumns);
14
14
  }
15
15
  }, []);
@@ -1 +1 @@
1
- {"version":3,"file":"useTableServerLoadingListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.ts"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { TableServerLoadPageHandler } from '../../types';\nimport { getHiddenColumns } from '../util/columns';\n\nexport function useTableServerLoadingListener<TType = unknown>(table: ReactTable<TType>, loadPage?: TableServerLoadPageHandler) {\n const meta = table.options.meta as ReactTableMeta<TType>;\n\n // trigger load of the first page on mount\n React.useEffect(() => {\n if (loadPage) {\n const sorting = table.getState().sorting;\n const columnFilters = table.getState().columnFilters;\n const search = meta.search.enableGlobalFilter ? table.getState().globalFilter : undefined;\n const hiddenColumns = getHiddenColumns(table.getState().columnVisibility);\n\n loadPage(0, sorting, columnFilters, search, hiddenColumns);\n }\n }, []);\n}\n"],"names":["useTableServerLoadingListener","table","loadPage","meta","options","React","useEffect","sorting","getState","columnFilters","search","enableGlobalFilter","globalFilter","undefined","hiddenColumns","getHiddenColumns","columnVisibility"],"mappings":";;;SAKgBA,6BAA6BA,CAAkBC,KAAwB,EAAEC,QAAqC;EAC1H,MAAMC,IAAI,GAAGF,KAAK,CAACG,OAAO,CAACD,IAA6B;;EAGxDE,cAAK,CAACC,SAAS,CAAC;IACZ,IAAIJ,QAAQ,EAAE;MACV,MAAMK,OAAO,GAAGN,KAAK,CAACO,QAAQ,EAAE,CAACD,OAAO;MACxC,MAAME,aAAa,GAAGR,KAAK,CAACO,QAAQ,EAAE,CAACC,aAAa;MACpD,MAAMC,MAAM,GAAGP,IAAI,CAACO,MAAM,CAACC,kBAAkB,GAAGV,KAAK,CAACO,QAAQ,EAAE,CAACI,YAAY,GAAGC,SAAS;MACzF,MAAMC,aAAa,GAAGC,gBAAgB,CAACd,KAAK,CAACO,QAAQ,EAAE,CAACQ,gBAAgB,CAAC;MAEzEd,QAAQ,CAAC,CAAC,EAAEK,OAAO,EAAEE,aAAa,EAAEC,MAAM,EAAEI,aAAa,CAAC;;GAEjE,EAAE,EAAE,CAAC;AACV;;;;"}
1
+ {"version":3,"file":"useTableServerLoadingListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.ts"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { TableServerLoadPageHandler } from '../../types';\nimport { getHiddenColumns } from '../util/columns';\n\nexport function useTableServerLoadingListener<TType = unknown>(table: ReactTable<TType>, loadPage?: TableServerLoadPageHandler) {\n const meta = table.options.meta as ReactTableMeta<TType>;\n\n // trigger load of the first page on mount\n React.useEffect(() => {\n if (loadPage) {\n const sorting = table.getState().sorting;\n const columnFilters = table.getState().columnFilters;\n const search = meta.search.enableGlobalFilter ? table.getState().globalFilter : undefined;\n const hiddenColumns = getHiddenColumns(table.getState().columnVisibility);\n\n loadPage(0, sorting, columnFilters, search, hiddenColumns);\n }\n }, []);\n}\n"],"names":["useTableServerLoadingListener","table","loadPage","meta","options","React","useEffect","sorting","getState","columnFilters","search","enableGlobalFilter","globalFilter","undefined","hiddenColumns","getHiddenColumns","columnVisibility"],"mappings":";;;SAKgBA,6BAA6BA,CAAkBC,KAAwB,EAAEC,QAAqC;EAC1H,IAAMC,IAAI,GAAGF,KAAK,CAACG,OAAO,CAACD,IAA6B;;EAGxDE,cAAK,CAACC,SAAS,CAAC;IACZ,IAAIJ,QAAQ,EAAE;MACV,IAAMK,OAAO,GAAGN,KAAK,CAACO,QAAQ,EAAE,CAACD,OAAO;MACxC,IAAME,aAAa,GAAGR,KAAK,CAACO,QAAQ,EAAE,CAACC,aAAa;MACpD,IAAMC,MAAM,GAAGP,IAAI,CAACO,MAAM,CAACC,kBAAkB,GAAGV,KAAK,CAACO,QAAQ,EAAE,CAACI,YAAY,GAAGC,SAAS;MACzF,IAAMC,aAAa,GAAGC,gBAAgB,CAACd,KAAK,CAACO,QAAQ,EAAE,CAACQ,gBAAgB,CAAC;MAEzEd,QAAQ,CAAC,CAAC,EAAEK,OAAO,EAAEE,aAAa,EAAEC,MAAM,EAAEI,aAAa,CAAC;;GAEjE,EAAE,EAAE,CAAC;AACV;;;;"}
@@ -2,17 +2,19 @@ import React__default from 'react';
2
2
  import { getSettings } from '../util/settings.js';
3
3
 
4
4
  function useTableSettingsListener(table, onChangeSettings) {
5
- const meta = table.options.meta;
6
- const state = table.getState();
7
- React__default.useEffect(() => {
8
- let handler;
5
+ var meta = table.options.meta;
6
+ var state = table.getState();
7
+ React__default.useEffect(function () {
8
+ var handler;
9
9
  if (typeof onChangeSettings === 'function') {
10
- handler = setTimeout(() => {
10
+ handler = setTimeout(function () {
11
11
  // some settings shouldn't be persisted, but we comment them out here to highlight the intention
12
12
  onChangeSettings(getSettings(table));
13
13
  }, 250);
14
14
  }
15
- return () => clearTimeout(handler);
15
+ return function () {
16
+ return clearTimeout(handler);
17
+ };
16
18
  }, [
17
19
  //state.columnFilters,
18
20
  state.columnOrder, state.columnPinning, state.columnSizing, state.columnVisibility, table.options.enableGlobalFilter, meta.fontSize.size,
@@ -1 +1 @@
1
- {"version":3,"file":"useTableSettingsListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableSettingsListener.ts"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { TableSettingsHandler } from '../../types';\nimport { getSettings } from '../util/settings';\n\nexport function useTableSettingsListener<TType = unknown>(\n table: ReactTable<TType>,\n onChangeSettings: TableSettingsHandler | undefined\n) {\n const meta = table.options.meta as ReactTableMeta<TType>;\n const state = table.getState();\n\n React.useEffect(() => {\n let handler;\n\n if (typeof onChangeSettings === 'function') {\n handler = setTimeout(() => {\n // some settings shouldn't be persisted, but we comment them out here to highlight the intention\n onChangeSettings(getSettings(table));\n }, 250);\n }\n\n return () => clearTimeout(handler);\n }, [\n //state.columnFilters,\n state.columnOrder,\n state.columnPinning,\n state.columnSizing,\n state.columnVisibility,\n table.options.enableGlobalFilter,\n meta.fontSize.size,\n //state.grouping,\n meta.rowHeight.height,\n //state.globalFilter,\n state.sorting,\n ]);\n}\n"],"names":["useTableSettingsListener","table","onChangeSettings","meta","options","state","getState","React","useEffect","handler","setTimeout","getSettings","clearTimeout","columnOrder","columnPinning","columnSizing","columnVisibility","enableGlobalFilter","fontSize","size","rowHeight","height","sorting"],"mappings":";;;SAKgBA,wBAAwBA,CACpCC,KAAwB,EACxBC,gBAAkD;EAElD,MAAMC,IAAI,GAAGF,KAAK,CAACG,OAAO,CAACD,IAA6B;EACxD,MAAME,KAAK,GAAGJ,KAAK,CAACK,QAAQ,EAAE;EAE9BC,cAAK,CAACC,SAAS,CAAC;IACZ,IAAIC,OAAO;IAEX,IAAI,OAAOP,gBAAgB,KAAK,UAAU,EAAE;MACxCO,OAAO,GAAGC,UAAU,CAAC;;QAEjBR,gBAAgB,CAACS,WAAW,CAACV,KAAK,CAAC,CAAC;OACvC,EAAE,GAAG,CAAC;;IAGX,OAAO,MAAMW,YAAY,CAACH,OAAO,CAAC;GACrC,EAAE;;EAECJ,KAAK,CAACQ,WAAW,EACjBR,KAAK,CAACS,aAAa,EACnBT,KAAK,CAACU,YAAY,EAClBV,KAAK,CAACW,gBAAgB,EACtBf,KAAK,CAACG,OAAO,CAACa,kBAAkB,EAChCd,IAAI,CAACe,QAAQ,CAACC,IAAI;;EAElBhB,IAAI,CAACiB,SAAS,CAACC,MAAM;;EAErBhB,KAAK,CAACiB,OAAO,CAChB,CAAC;AACN;;;;"}
1
+ {"version":3,"file":"useTableSettingsListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableSettingsListener.ts"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { TableSettingsHandler } from '../../types';\nimport { getSettings } from '../util/settings';\n\nexport function useTableSettingsListener<TType = unknown>(\n table: ReactTable<TType>,\n onChangeSettings: TableSettingsHandler | undefined\n) {\n const meta = table.options.meta as ReactTableMeta<TType>;\n const state = table.getState();\n\n React.useEffect(() => {\n let handler;\n\n if (typeof onChangeSettings === 'function') {\n handler = setTimeout(() => {\n // some settings shouldn't be persisted, but we comment them out here to highlight the intention\n onChangeSettings(getSettings(table));\n }, 250);\n }\n\n return () => clearTimeout(handler);\n }, [\n //state.columnFilters,\n state.columnOrder,\n state.columnPinning,\n state.columnSizing,\n state.columnVisibility,\n table.options.enableGlobalFilter,\n meta.fontSize.size,\n //state.grouping,\n meta.rowHeight.height,\n //state.globalFilter,\n state.sorting,\n ]);\n}\n"],"names":["useTableSettingsListener","table","onChangeSettings","meta","options","state","getState","React","useEffect","handler","setTimeout","getSettings","clearTimeout","columnOrder","columnPinning","columnSizing","columnVisibility","enableGlobalFilter","fontSize","size","rowHeight","height","sorting"],"mappings":";;;SAKgBA,wBAAwBA,CACpCC,KAAwB,EACxBC,gBAAkD;EAElD,IAAMC,IAAI,GAAGF,KAAK,CAACG,OAAO,CAACD,IAA6B;EACxD,IAAME,KAAK,GAAGJ,KAAK,CAACK,QAAQ,EAAE;EAE9BC,cAAK,CAACC,SAAS,CAAC;IACZ,IAAIC,OAAO;IAEX,IAAI,OAAOP,gBAAgB,KAAK,UAAU,EAAE;MACxCO,OAAO,GAAGC,UAAU,CAAC;;QAEjBR,gBAAgB,CAACS,WAAW,CAACV,KAAK,CAAC,CAAC;OACvC,EAAE,GAAG,CAAC;;IAGX,OAAO;MAAA,OAAMW,YAAY,CAACH,OAAO,CAAC;;GACrC,EAAE;;EAECJ,KAAK,CAACQ,WAAW,EACjBR,KAAK,CAACS,aAAa,EACnBT,KAAK,CAACU,YAAY,EAClBV,KAAK,CAACW,gBAAgB,EACtBf,KAAK,CAACG,OAAO,CAACa,kBAAkB,EAChCd,IAAI,CAACe,QAAQ,CAACC,IAAI;;EAElBhB,IAAI,CAACiB,SAAS,CAACC,MAAM;;EAErBhB,KAAK,CAACiB,OAAO,CAChB,CAAC;AACN;;;;"}
@@ -2,43 +2,43 @@ import React__default from 'react';
2
2
  import { createShortcutKeyDownHandler } from '../../../../utils/keyboard.js';
3
3
 
4
4
  function useTableShortcutsListener(table, shortcuts) {
5
- const meta = table.options.meta;
6
- const rows = table.getRowModel().rows;
7
- React__default.useEffect(() => {
8
- const shortcutKeys = Object.keys(shortcuts !== null && shortcuts !== void 0 ? shortcuts : {});
9
- const globalHandlers = [];
5
+ var meta = table.options.meta;
6
+ var rows = table.getRowModel().rows;
7
+ React__default.useEffect(function () {
8
+ var shortcutKeys = Object.keys(shortcuts !== null && shortcuts !== void 0 ? shortcuts : {});
9
+ var globalHandlers = [];
10
10
  // convert the shortcut into the correct format to register it
11
11
  if (shortcuts && shortcutKeys.length && meta.rowActive.rowActiveIndex !== undefined) {
12
- const rowActive = rows[meta.rowActive.rowActiveIndex];
13
- shortcutKeys.forEach(key => {
14
- const handler = shortcuts[key];
15
- let keyDownHandler;
16
- let keyDownHandlerOptions;
12
+ var rowActive = rows[meta.rowActive.rowActiveIndex];
13
+ shortcutKeys.forEach(function (key) {
14
+ var handler = shortcuts[key];
15
+ var keyDownHandler;
16
+ var keyDownHandlerOptions;
17
17
  if (typeof handler === 'function') {
18
18
  keyDownHandler = handler;
19
19
  keyDownHandlerOptions = {
20
- key
20
+ key: key
21
21
  };
22
22
  } else {
23
- const handlerObject = handler;
23
+ var handlerObject = handler;
24
24
  keyDownHandler = handlerObject.handler;
25
25
  keyDownHandlerOptions = {
26
- key,
26
+ key: key,
27
27
  meta: handlerObject.meta,
28
28
  shift: handlerObject.shift
29
29
  };
30
30
  }
31
- globalHandlers.push(createShortcutKeyDownHandler(keyDownHandlerOptions, event => {
31
+ globalHandlers.push(createShortcutKeyDownHandler(keyDownHandlerOptions, function (event) {
32
32
  event.preventDefault();
33
33
  keyDownHandler(rowActive === null || rowActive === void 0 ? void 0 : rowActive.original);
34
34
  }));
35
35
  });
36
36
  }
37
- globalHandlers.forEach(handler => {
37
+ globalHandlers.forEach(function (handler) {
38
38
  document.addEventListener('keydown', handler);
39
39
  });
40
- return () => {
41
- globalHandlers.forEach(handler => {
40
+ return function () {
41
+ globalHandlers.forEach(function (handler) {
42
42
  document.removeEventListener('keydown', handler);
43
43
  });
44
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useTableShortcutsListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.ts"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { KeyDownHandlerOptions, createShortcutKeyDownHandler } from '../../../../utils/keyboard';\nimport { TableShortcutHandlerObject, TableShortcuts } from '../../types';\n\nexport function useTableShortcutsListener<TType = unknown>(\n table: ReactTable<TType>,\n shortcuts: TableShortcuts<TType> | undefined\n) {\n const meta = table.options.meta as ReactTableMeta<TType>;\n const rows = table.getRowModel().rows;\n\n React.useEffect(() => {\n const shortcutKeys = Object.keys(shortcuts ?? {});\n const globalHandlers: Array<(event: KeyboardEvent) => void> = [];\n\n // convert the shortcut into the correct format to register it\n if (shortcuts && shortcutKeys.length && meta.rowActive.rowActiveIndex !== undefined) {\n const rowActive = rows[meta.rowActive.rowActiveIndex];\n\n shortcutKeys.forEach(key => {\n const handler = shortcuts[key];\n\n let keyDownHandler;\n let keyDownHandlerOptions: KeyDownHandlerOptions;\n\n if (typeof handler === 'function') {\n keyDownHandler = handler;\n keyDownHandlerOptions = {\n key,\n };\n } else {\n const handlerObject = handler as TableShortcutHandlerObject<TType>;\n keyDownHandler = handlerObject.handler;\n keyDownHandlerOptions = {\n key,\n meta: handlerObject.meta,\n shift: handlerObject.shift,\n };\n }\n\n globalHandlers.push(\n createShortcutKeyDownHandler(keyDownHandlerOptions, event => {\n event.preventDefault();\n keyDownHandler(rowActive?.original);\n })\n );\n });\n }\n\n globalHandlers.forEach(handler => {\n document.addEventListener('keydown', handler);\n });\n\n return () => {\n globalHandlers.forEach(handler => {\n document.removeEventListener('keydown', handler);\n });\n };\n }, [shortcuts, meta.rowActive.rowActiveIndex, rows.length]);\n}\n"],"names":["useTableShortcutsListener","table","shortcuts","meta","options","rows","getRowModel","React","useEffect","shortcutKeys","Object","keys","globalHandlers","length","rowActive","rowActiveIndex","undefined","forEach","key","handler","keyDownHandler","keyDownHandlerOptions","handlerObject","shift","push","createShortcutKeyDownHandler","event","preventDefault","original","document","addEventListener","removeEventListener"],"mappings":";;;SAKgBA,yBAAyBA,CACrCC,KAAwB,EACxBC,SAA4C;EAE5C,MAAMC,IAAI,GAAGF,KAAK,CAACG,OAAO,CAACD,IAA6B;EACxD,MAAME,IAAI,GAAGJ,KAAK,CAACK,WAAW,EAAE,CAACD,IAAI;EAErCE,cAAK,CAACC,SAAS,CAAC;IACZ,MAAMC,YAAY,GAAGC,MAAM,CAACC,IAAI,CAACT,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI,EAAE,CAAC;IACjD,MAAMU,cAAc,GAA0C,EAAE;;IAGhE,IAAIV,SAAS,IAAIO,YAAY,CAACI,MAAM,IAAIV,IAAI,CAACW,SAAS,CAACC,cAAc,KAAKC,SAAS,EAAE;MACjF,MAAMF,SAAS,GAAGT,IAAI,CAACF,IAAI,CAACW,SAAS,CAACC,cAAc,CAAC;MAErDN,YAAY,CAACQ,OAAO,CAACC,GAAG;QACpB,MAAMC,OAAO,GAAGjB,SAAS,CAACgB,GAAG,CAAC;QAE9B,IAAIE,cAAc;QAClB,IAAIC,qBAA4C;QAEhD,IAAI,OAAOF,OAAO,KAAK,UAAU,EAAE;UAC/BC,cAAc,GAAGD,OAAO;UACxBE,qBAAqB,GAAG;YACpBH;WACH;SACJ,MAAM;UACH,MAAMI,aAAa,GAAGH,OAA4C;UAClEC,cAAc,GAAGE,aAAa,CAACH,OAAO;UACtCE,qBAAqB,GAAG;YACpBH,GAAG;YACHf,IAAI,EAAEmB,aAAa,CAACnB,IAAI;YACxBoB,KAAK,EAAED,aAAa,CAACC;WACxB;;QAGLX,cAAc,CAACY,IAAI,CACfC,4BAA4B,CAACJ,qBAAqB,EAAEK,KAAK;UACrDA,KAAK,CAACC,cAAc,EAAE;UACtBP,cAAc,CAACN,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEc,QAAQ,CAAC;SACtC,CAAC,CACL;OACJ,CAAC;;IAGNhB,cAAc,CAACK,OAAO,CAACE,OAAO;MAC1BU,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAEX,OAAO,CAAC;KAChD,CAAC;IAEF,OAAO;MACHP,cAAc,CAACK,OAAO,CAACE,OAAO;QAC1BU,QAAQ,CAACE,mBAAmB,CAAC,SAAS,EAAEZ,OAAO,CAAC;OACnD,CAAC;KACL;GACJ,EAAE,CAACjB,SAAS,EAAEC,IAAI,CAACW,SAAS,CAACC,cAAc,EAAEV,IAAI,CAACQ,MAAM,CAAC,CAAC;AAC/D;;;;"}
1
+ {"version":3,"file":"useTableShortcutsListener.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.ts"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { KeyDownHandlerOptions, createShortcutKeyDownHandler } from '../../../../utils/keyboard';\nimport { TableShortcutHandlerObject, TableShortcuts } from '../../types';\n\nexport function useTableShortcutsListener<TType = unknown>(\n table: ReactTable<TType>,\n shortcuts: TableShortcuts<TType> | undefined\n) {\n const meta = table.options.meta as ReactTableMeta<TType>;\n const rows = table.getRowModel().rows;\n\n React.useEffect(() => {\n const shortcutKeys = Object.keys(shortcuts ?? {});\n const globalHandlers: Array<(event: KeyboardEvent) => void> = [];\n\n // convert the shortcut into the correct format to register it\n if (shortcuts && shortcutKeys.length && meta.rowActive.rowActiveIndex !== undefined) {\n const rowActive = rows[meta.rowActive.rowActiveIndex];\n\n shortcutKeys.forEach(key => {\n const handler = shortcuts[key];\n\n let keyDownHandler;\n let keyDownHandlerOptions: KeyDownHandlerOptions;\n\n if (typeof handler === 'function') {\n keyDownHandler = handler;\n keyDownHandlerOptions = {\n key,\n };\n } else {\n const handlerObject = handler as TableShortcutHandlerObject<TType>;\n keyDownHandler = handlerObject.handler;\n keyDownHandlerOptions = {\n key,\n meta: handlerObject.meta,\n shift: handlerObject.shift,\n };\n }\n\n globalHandlers.push(\n createShortcutKeyDownHandler(keyDownHandlerOptions, event => {\n event.preventDefault();\n keyDownHandler(rowActive?.original);\n })\n );\n });\n }\n\n globalHandlers.forEach(handler => {\n document.addEventListener('keydown', handler);\n });\n\n return () => {\n globalHandlers.forEach(handler => {\n document.removeEventListener('keydown', handler);\n });\n };\n }, [shortcuts, meta.rowActive.rowActiveIndex, rows.length]);\n}\n"],"names":["useTableShortcutsListener","table","shortcuts","meta","options","rows","getRowModel","React","useEffect","shortcutKeys","Object","keys","globalHandlers","length","rowActive","rowActiveIndex","undefined","forEach","key","handler","keyDownHandler","keyDownHandlerOptions","handlerObject","shift","push","createShortcutKeyDownHandler","event","preventDefault","original","document","addEventListener","removeEventListener"],"mappings":";;;SAKgBA,yBAAyBA,CACrCC,KAAwB,EACxBC,SAA4C;EAE5C,IAAMC,IAAI,GAAGF,KAAK,CAACG,OAAO,CAACD,IAA6B;EACxD,IAAME,IAAI,GAAGJ,KAAK,CAACK,WAAW,EAAE,CAACD,IAAI;EAErCE,cAAK,CAACC,SAAS,CAAC;IACZ,IAAMC,YAAY,GAAGC,MAAM,CAACC,IAAI,CAACT,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI,EAAE,CAAC;IACjD,IAAMU,cAAc,GAA0C,EAAE;;IAGhE,IAAIV,SAAS,IAAIO,YAAY,CAACI,MAAM,IAAIV,IAAI,CAACW,SAAS,CAACC,cAAc,KAAKC,SAAS,EAAE;MACjF,IAAMF,SAAS,GAAGT,IAAI,CAACF,IAAI,CAACW,SAAS,CAACC,cAAc,CAAC;MAErDN,YAAY,CAACQ,OAAO,CAAC,UAAAC,GAAG;QACpB,IAAMC,OAAO,GAAGjB,SAAS,CAACgB,GAAG,CAAC;QAE9B,IAAIE,cAAc;QAClB,IAAIC,qBAA4C;QAEhD,IAAI,OAAOF,OAAO,KAAK,UAAU,EAAE;UAC/BC,cAAc,GAAGD,OAAO;UACxBE,qBAAqB,GAAG;YACpBH,GAAG,EAAHA;WACH;SACJ,MAAM;UACH,IAAMI,aAAa,GAAGH,OAA4C;UAClEC,cAAc,GAAGE,aAAa,CAACH,OAAO;UACtCE,qBAAqB,GAAG;YACpBH,GAAG,EAAHA,GAAG;YACHf,IAAI,EAAEmB,aAAa,CAACnB,IAAI;YACxBoB,KAAK,EAAED,aAAa,CAACC;WACxB;;QAGLX,cAAc,CAACY,IAAI,CACfC,4BAA4B,CAACJ,qBAAqB,EAAE,UAAAK,KAAK;UACrDA,KAAK,CAACC,cAAc,EAAE;UACtBP,cAAc,CAACN,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEc,QAAQ,CAAC;SACtC,CAAC,CACL;OACJ,CAAC;;IAGNhB,cAAc,CAACK,OAAO,CAAC,UAAAE,OAAO;MAC1BU,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAEX,OAAO,CAAC;KAChD,CAAC;IAEF,OAAO;MACHP,cAAc,CAACK,OAAO,CAAC,UAAAE,OAAO;QAC1BU,QAAQ,CAACE,mBAAmB,CAAC,SAAS,EAAEZ,OAAO,CAAC;OACnD,CAAC;KACL;GACJ,EAAE,CAACjB,SAAS,EAAEC,IAAI,CAACW,SAAS,CAACC,cAAc,EAAEV,IAAI,CAACQ,MAAM,CAAC,CAAC;AAC/D;;;;"}
@@ -4,8 +4,8 @@ import { useLazyEffect } from '../../../../hooks/useLazyEffect.js';
4
4
  // to control the state outside the table. this listener is really here to let the consumer make a server request
5
5
  // and provide the server with the sorting state, so that it can sort server side
6
6
  function useTableSortingListener(table, onSort) {
7
- const sorting = table.getState().sorting;
8
- useLazyEffect(() => {
7
+ var sorting = table.getState().sorting;
8
+ useLazyEffect(function () {
9
9
  if (table.options.enableSorting && typeof onSort === 'function') {
10
10
  onSort(sorting);
11
11
  if (table.options.enableRowSelection) {