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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (662) 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 +2 -2
  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/packages/taco/src/charts/components/Area/AreaChart.js +32 -24
  17. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js.map +1 -1
  18. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js +84 -61
  19. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js.map +1 -1
  20. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js +16 -15
  21. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js.map +1 -1
  22. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js +12 -13
  23. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js.map +1 -1
  24. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js +104 -68
  25. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js.map +1 -1
  26. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js +38 -29
  27. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js.map +1 -1
  28. package/dist/esm/packages/taco/src/charts/components/Donut/util.js +2 -2
  29. package/dist/esm/packages/taco/src/charts/components/Donut/util.js.map +1 -1
  30. package/dist/esm/packages/taco/src/charts/components/Legend.js +45 -37
  31. package/dist/esm/packages/taco/src/charts/components/Legend.js.map +1 -1
  32. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js +32 -24
  33. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js.map +1 -1
  34. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js +5 -3
  35. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js.map +1 -1
  36. package/dist/esm/packages/taco/src/charts/components/Tooltip.js +26 -25
  37. package/dist/esm/packages/taco/src/charts/components/Tooltip.js.map +1 -1
  38. package/dist/esm/packages/taco/src/charts/utils/color.js +13 -12
  39. package/dist/esm/packages/taco/src/charts/utils/color.js.map +1 -1
  40. package/dist/esm/packages/taco/src/charts/utils/common.js +39 -26
  41. package/dist/esm/packages/taco/src/charts/utils/common.js.map +1 -1
  42. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js +30 -31
  43. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
  44. package/dist/esm/packages/taco/src/components/Alert/Alert.js +7 -9
  45. package/dist/esm/packages/taco/src/components/Alert/Alert.js.map +1 -1
  46. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js +14 -13
  47. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js.map +1 -1
  48. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js +2 -2
  49. package/dist/esm/packages/taco/src/components/AlertDialog/Context.js.map +1 -1
  50. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js +10 -9
  51. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js.map +1 -1
  52. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js +4 -4
  53. package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js.map +1 -1
  54. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js +5 -6
  55. package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js.map +1 -1
  56. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js +2 -2
  57. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js.map +1 -1
  58. package/dist/esm/packages/taco/src/components/Badge/Badge.js +21 -25
  59. package/dist/esm/packages/taco/src/components/Badge/Badge.js.map +1 -1
  60. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js +12 -14
  61. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js.map +1 -1
  62. package/dist/esm/packages/taco/src/components/Banner/Banner.js +7 -10
  63. package/dist/esm/packages/taco/src/components/Banner/Banner.js.map +1 -1
  64. package/dist/esm/packages/taco/src/components/Banner/util.js +3 -3
  65. package/dist/esm/packages/taco/src/components/Banner/util.js.map +1 -1
  66. package/dist/esm/packages/taco/src/components/Button/Button.js +28 -29
  67. package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
  68. package/dist/esm/packages/taco/src/components/Button/util.js +25 -24
  69. package/dist/esm/packages/taco/src/components/Button/util.js.map +1 -1
  70. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +75 -71
  71. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
  72. package/dist/esm/packages/taco/src/components/Card/Card.js +14 -15
  73. package/dist/esm/packages/taco/src/components/Card/Card.js.map +1 -1
  74. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +24 -22
  75. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
  76. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +21 -23
  77. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
  78. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +76 -64
  79. package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
  80. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +60 -57
  81. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
  82. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js +27 -28
  83. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
  84. package/dist/esm/packages/taco/src/components/Dialog/Context.js +4 -4
  85. package/dist/esm/packages/taco/src/components/Dialog/Context.js.map +1 -1
  86. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js +54 -39
  87. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
  88. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +36 -38
  89. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
  90. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js +3 -3
  91. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js.map +1 -1
  92. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js +2 -2
  93. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js.map +1 -1
  94. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js +5 -6
  95. package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js.map +1 -1
  96. package/dist/esm/packages/taco/src/components/Dialog/util.js +7 -3
  97. package/dist/esm/packages/taco/src/components/Dialog/util.js.map +1 -1
  98. package/dist/esm/packages/taco/src/components/Drawer/Context.js +5 -5
  99. package/dist/esm/packages/taco/src/components/Drawer/Context.js.map +1 -1
  100. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js +61 -51
  101. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js.map +1 -1
  102. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +134 -145
  103. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
  104. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js +1 -1
  105. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js.map +1 -1
  106. package/dist/esm/packages/taco/src/components/Drawer/util.js +5 -5
  107. package/dist/esm/packages/taco/src/components/Drawer/util.js.map +1 -1
  108. package/dist/esm/packages/taco/src/components/Field/Field.js +14 -12
  109. package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
  110. package/dist/esm/packages/taco/src/components/Form/Form.js +7 -6
  111. package/dist/esm/packages/taco/src/components/Form/Form.js.map +1 -1
  112. package/dist/esm/packages/taco/src/components/Group/Group.js +9 -7
  113. package/dist/esm/packages/taco/src/components/Group/Group.js.map +1 -1
  114. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js +37 -36
  115. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js.map +1 -1
  116. package/dist/esm/packages/taco/src/components/Header/Header.js +2 -2
  117. package/dist/esm/packages/taco/src/components/Header/Header.js.map +1 -1
  118. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js +14 -10
  119. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js.map +1 -1
  120. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js +5 -4
  121. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js.map +1 -1
  122. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js +7 -9
  123. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js.map +1 -1
  124. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js +9 -9
  125. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js.map +1 -1
  126. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +66 -46
  127. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  128. package/dist/esm/packages/taco/src/components/Header/components/Button.js +12 -8
  129. package/dist/esm/packages/taco/src/components/Header/components/Button.js.map +1 -1
  130. package/dist/esm/packages/taco/src/components/Header/components/Link.js +22 -18
  131. package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
  132. package/dist/esm/packages/taco/src/components/Header/components/Logo.js +4 -4
  133. package/dist/esm/packages/taco/src/components/Header/components/Logo.js.map +1 -1
  134. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js +2 -2
  135. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js.map +1 -1
  136. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js +10 -9
  137. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js.map +1 -1
  138. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js +2 -2
  139. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js.map +1 -1
  140. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js +5 -7
  141. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js.map +1 -1
  142. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js +1 -1
  143. package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js.map +1 -1
  144. package/dist/esm/packages/taco/src/components/Icon/Icon.js +7 -7
  145. package/dist/esm/packages/taco/src/components/Icon/Icon.js.map +1 -1
  146. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js +19 -0
  147. package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js.map +1 -0
  148. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js +19 -0
  149. package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js.map +1 -0
  150. package/dist/esm/packages/taco/src/components/Icon/components/Person.js +19 -0
  151. package/dist/esm/packages/taco/src/components/Icon/components/Person.js.map +1 -0
  152. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js +19 -0
  153. package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js.map +1 -0
  154. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js +19 -0
  155. package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js.map +1 -0
  156. package/dist/esm/packages/taco/src/components/Icon/components/index.js +14 -4
  157. package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
  158. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js +22 -23
  159. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js.map +1 -1
  160. package/dist/esm/packages/taco/src/components/Input/Input.js +45 -44
  161. package/dist/esm/packages/taco/src/components/Input/Input.js.map +1 -1
  162. package/dist/esm/packages/taco/src/components/Input/util.js +8 -5
  163. package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
  164. package/dist/esm/packages/taco/src/components/Layout/Layout.js +7 -5
  165. package/dist/esm/packages/taco/src/components/Layout/Layout.js.map +1 -1
  166. package/dist/esm/packages/taco/src/components/Layout/components/Content.js +2 -2
  167. package/dist/esm/packages/taco/src/components/Layout/components/Content.js.map +1 -1
  168. package/dist/esm/packages/taco/src/components/Layout/components/Context.js +4 -2
  169. package/dist/esm/packages/taco/src/components/Layout/components/Context.js.map +1 -1
  170. package/dist/esm/packages/taco/src/components/Layout/components/Page.js +2 -2
  171. package/dist/esm/packages/taco/src/components/Layout/components/Page.js.map +1 -1
  172. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js +34 -27
  173. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  174. package/dist/esm/packages/taco/src/components/Layout/components/Top.js +9 -6
  175. package/dist/esm/packages/taco/src/components/Layout/components/Top.js.map +1 -1
  176. package/dist/esm/packages/taco/src/components/List/components/Button.js +1 -1
  177. package/dist/esm/packages/taco/src/components/List/components/Button.js.map +1 -1
  178. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js +10 -7
  179. package/dist/esm/packages/taco/src/components/List/components/Collapsible.js.map +1 -1
  180. package/dist/esm/packages/taco/src/components/List/components/Group.js +1 -1
  181. package/dist/esm/packages/taco/src/components/List/components/Group.js.map +1 -1
  182. package/dist/esm/packages/taco/src/components/List/components/Item.js +15 -13
  183. package/dist/esm/packages/taco/src/components/List/components/Item.js.map +1 -1
  184. package/dist/esm/packages/taco/src/components/List/components/Link.js +3 -3
  185. package/dist/esm/packages/taco/src/components/List/components/Link.js.map +1 -1
  186. package/dist/esm/packages/taco/src/components/List/components/Toggle.js +29 -27
  187. package/dist/esm/packages/taco/src/components/List/components/Toggle.js.map +1 -1
  188. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js +21 -26
  189. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js.map +1 -1
  190. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +82 -70
  191. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
  192. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js +56 -51
  193. package/dist/esm/packages/taco/src/components/Listbox/useListbox.js.map +1 -1
  194. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js +83 -65
  195. package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js.map +1 -1
  196. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js +9 -10
  197. package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js.map +1 -1
  198. package/dist/esm/packages/taco/src/components/Listbox/util.js +78 -48
  199. package/dist/esm/packages/taco/src/components/Listbox/util.js.map +1 -1
  200. package/dist/esm/packages/taco/src/components/Menu/Context.js +2 -2
  201. package/dist/esm/packages/taco/src/components/Menu/Context.js.map +1 -1
  202. package/dist/esm/packages/taco/src/components/Menu/Menu.js +42 -26
  203. package/dist/esm/packages/taco/src/components/Menu/Menu.js.map +1 -1
  204. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js +8 -8
  205. package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js.map +1 -1
  206. package/dist/esm/packages/taco/src/components/Menu/components/Content.js +27 -21
  207. package/dist/esm/packages/taco/src/components/Menu/components/Content.js.map +1 -1
  208. package/dist/esm/packages/taco/src/components/Menu/components/Header.js +3 -3
  209. package/dist/esm/packages/taco/src/components/Menu/components/Header.js.map +1 -1
  210. package/dist/esm/packages/taco/src/components/Menu/components/Item.js +32 -32
  211. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  212. package/dist/esm/packages/taco/src/components/Menu/components/Link.js +10 -10
  213. package/dist/esm/packages/taco/src/components/Menu/components/Link.js.map +1 -1
  214. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js +15 -16
  215. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js.map +1 -1
  216. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js +1 -1
  217. package/dist/esm/packages/taco/src/components/Menu/components/Separator.js.map +1 -1
  218. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js +7 -7
  219. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js.map +1 -1
  220. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js +5 -5
  221. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js.map +1 -1
  222. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js +6 -6
  223. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js.map +1 -1
  224. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js +41 -36
  225. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
  226. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js +6 -6
  227. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js.map +1 -1
  228. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js +6 -6
  229. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js.map +1 -1
  230. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js +14 -11
  231. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js.map +1 -1
  232. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js +31 -24
  233. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js.map +1 -1
  234. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js +7 -7
  235. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js.map +1 -1
  236. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js +9 -7
  237. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js.map +1 -1
  238. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +48 -51
  239. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  240. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js +26 -23
  241. package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js.map +1 -1
  242. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js +53 -39
  243. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js.map +1 -1
  244. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js +17 -7
  245. package/dist/esm/packages/taco/src/components/Pagination/usePagination.js.map +1 -1
  246. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js +8 -9
  247. package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js.map +1 -1
  248. package/dist/esm/packages/taco/src/components/Popover/Popover.js +45 -43
  249. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  250. package/dist/esm/packages/taco/src/components/Popover/Primitives.js +1 -1
  251. package/dist/esm/packages/taco/src/components/Popover/Primitives.js.map +1 -1
  252. package/dist/esm/packages/taco/src/components/Popover/util.js +3 -1
  253. package/dist/esm/packages/taco/src/components/Popover/util.js.map +1 -1
  254. package/dist/esm/packages/taco/src/components/Progress/Progress.js +13 -11
  255. package/dist/esm/packages/taco/src/components/Progress/Progress.js.map +1 -1
  256. package/dist/esm/packages/taco/src/components/Provider/Localization.js +13 -12
  257. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  258. package/dist/esm/packages/taco/src/components/Provider/Provider.js +8 -8
  259. package/dist/esm/packages/taco/src/components/Provider/Provider.js.map +1 -1
  260. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js +54 -47
  261. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
  262. package/dist/esm/packages/taco/src/components/RadioGroup/util.js +7 -1
  263. package/dist/esm/packages/taco/src/components/RadioGroup/util.js.map +1 -1
  264. package/dist/esm/packages/taco/src/components/Report/Report.js +7 -5
  265. package/dist/esm/packages/taco/src/components/Report/Report.js.map +1 -1
  266. package/dist/esm/packages/taco/src/components/Report/useReport.js +1 -1
  267. package/dist/esm/packages/taco/src/components/Report/useReport.js.map +1 -1
  268. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js +17 -13
  269. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
  270. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js +11 -11
  271. package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js.map +1 -1
  272. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +44 -39
  273. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
  274. package/dist/esm/packages/taco/src/components/Select/Select.js +28 -31
  275. package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
  276. package/dist/esm/packages/taco/src/components/Select/useSelect.js +79 -70
  277. package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
  278. package/dist/esm/packages/taco/src/components/Select2/Select2.js +154 -121
  279. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  280. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js +2 -4
  281. package/dist/esm/packages/taco/src/components/Select2/components/Collection.js.map +1 -1
  282. package/dist/esm/packages/taco/src/components/Select2/components/Context.js +4 -2
  283. package/dist/esm/packages/taco/src/components/Select2/components/Context.js.map +1 -1
  284. package/dist/esm/packages/taco/src/components/Select2/components/Create.js +45 -41
  285. package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
  286. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +145 -129
  287. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  288. package/dist/esm/packages/taco/src/components/Select2/components/Group.js +8 -8
  289. package/dist/esm/packages/taco/src/components/Select2/components/Group.js.map +1 -1
  290. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +29 -30
  291. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  292. package/dist/esm/packages/taco/src/components/Select2/components/Search.js +9 -10
  293. package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
  294. package/dist/esm/packages/taco/src/components/Select2/components/Title.js +2 -2
  295. package/dist/esm/packages/taco/src/components/Select2/components/Title.js.map +1 -1
  296. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +136 -128
  297. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  298. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js +32 -23
  299. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
  300. package/dist/esm/packages/taco/src/components/Select2/utilities.js +13 -6
  301. package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
  302. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +16 -13
  303. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
  304. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js +17 -12
  305. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js.map +1 -1
  306. package/dist/esm/packages/taco/src/components/Switch/Switch.js +14 -14
  307. package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
  308. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js +28 -23
  309. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
  310. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js +7 -3
  311. package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js.map +1 -1
  312. package/dist/esm/packages/taco/src/components/Table/components/Table.js +22 -18
  313. package/dist/esm/packages/taco/src/components/Table/components/Table.js.map +1 -1
  314. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +100 -92
  315. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  316. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js +136 -118
  317. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  318. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js +55 -55
  319. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
  320. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js +35 -41
  321. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
  322. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js +77 -71
  323. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  324. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js +56 -30
  325. package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js.map +1 -1
  326. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js +151 -142
  327. package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js.map +1 -1
  328. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js +22 -20
  329. package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
  330. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js +9 -12
  331. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js.map +1 -1
  332. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js +41 -41
  333. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js.map +1 -1
  334. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js +16 -14
  335. package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js.map +1 -1
  336. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js +32 -26
  337. package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js.map +1 -1
  338. package/dist/esm/packages/taco/src/components/Table/util.js +37 -30
  339. package/dist/esm/packages/taco/src/components/Table/util.js.map +1 -1
  340. package/dist/esm/packages/taco/src/components/Table3/Table3.js +12 -10
  341. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  342. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js +13 -14
  343. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js.map +1 -1
  344. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js +21 -23
  345. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
  346. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js +20 -17
  347. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js.map +1 -1
  348. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +67 -73
  349. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  350. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js +2 -2
  351. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js.map +1 -1
  352. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js +19 -20
  353. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js.map +1 -1
  354. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js +26 -25
  355. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -1
  356. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +45 -40
  357. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
  358. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js +7 -8
  359. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js.map +1 -1
  360. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +18 -19
  361. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -1
  362. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js +7 -10
  363. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -1
  364. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js +38 -36
  365. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -1
  366. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +15 -15
  367. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
  368. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js +8 -11
  369. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js.map +1 -1
  370. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js +164 -201
  371. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js.map +1 -1
  372. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +40 -27
  373. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
  374. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +18 -16
  375. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -1
  376. package/dist/esm/packages/taco/src/components/Table3/useTable3.js +25 -19
  377. package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
  378. package/dist/esm/packages/taco/src/components/Table3/util/editing.js +29 -35
  379. package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
  380. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js +34 -35
  381. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js.map +1 -1
  382. package/dist/esm/packages/taco/src/components/Tag/Tag.js +12 -12
  383. package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
  384. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js +8 -11
  385. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js.map +1 -1
  386. package/dist/esm/packages/taco/src/components/Toast/Toast.js +19 -20
  387. package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
  388. package/dist/esm/packages/taco/src/components/Toast/Toaster.js +117 -96
  389. package/dist/esm/packages/taco/src/components/Toast/Toaster.js.map +1 -1
  390. package/dist/esm/packages/taco/src/components/Toast/util.js +6 -4
  391. package/dist/esm/packages/taco/src/components/Toast/util.js.map +1 -1
  392. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js +10 -9
  393. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
  394. package/dist/esm/packages/taco/src/components/Tour/Tour.js +49 -46
  395. package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
  396. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js +33 -27
  397. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js.map +1 -1
  398. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js +15 -13
  399. package/dist/esm/packages/taco/src/components/Truncate/Truncate.js.map +1 -1
  400. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js +1 -1
  401. package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
  402. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js +11 -6
  403. package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js.map +1 -1
  404. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js +19 -13
  405. package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js.map +1 -1
  406. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js +4 -4
  407. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js.map +1 -1
  408. package/dist/esm/packages/taco/src/hooks/useId.js +4 -2
  409. package/dist/esm/packages/taco/src/hooks/useId.js.map +1 -1
  410. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js +20 -18
  411. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js.map +1 -1
  412. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js +7 -5
  413. package/dist/esm/packages/taco/src/hooks/useIsFormControl.js.map +1 -1
  414. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js +9 -5
  415. package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js.map +1 -1
  416. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js +3 -1
  417. package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js.map +1 -1
  418. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js +2 -2
  419. package/dist/esm/packages/taco/src/hooks/useLazyEffect.js.map +1 -1
  420. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js +24 -22
  421. package/dist/esm/packages/taco/src/hooks/useLocalStorage.js.map +1 -1
  422. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js +13 -6
  423. package/dist/esm/packages/taco/src/hooks/useMatchMedia.js.map +1 -1
  424. package/dist/esm/packages/taco/src/hooks/useMergedRef.js +3 -3
  425. package/dist/esm/packages/taco/src/hooks/useMergedRef.js.map +1 -1
  426. package/dist/esm/packages/taco/src/hooks/usePrevious.js +2 -2
  427. package/dist/esm/packages/taco/src/hooks/usePrevious.js.map +1 -1
  428. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js +14 -14
  429. package/dist/esm/packages/taco/src/primitives/BubbleSelect.js.map +1 -1
  430. package/dist/esm/packages/taco/src/primitives/Button.js +16 -13
  431. package/dist/esm/packages/taco/src/primitives/Button.js.map +1 -1
  432. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js +50 -44
  433. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js.map +1 -1
  434. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js +4 -2
  435. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js.map +1 -1
  436. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js +9 -5
  437. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js.map +1 -1
  438. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js +16 -18
  439. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js.map +1 -1
  440. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js +47 -40
  441. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js.map +1 -1
  442. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js +9 -10
  443. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js.map +1 -1
  444. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js +22 -20
  445. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js.map +1 -1
  446. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js +24 -27
  447. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js.map +1 -1
  448. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js +11 -10
  449. package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js.map +1 -1
  450. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +22 -19
  451. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
  452. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js +25 -22
  453. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js.map +1 -1
  454. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js +6 -6
  455. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js.map +1 -1
  456. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js +30 -14
  457. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js.map +1 -1
  458. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js +18 -19
  459. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js.map +1 -1
  460. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js +34 -34
  461. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js.map +1 -1
  462. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js +10 -12
  463. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js.map +1 -1
  464. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js +19 -18
  465. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js.map +1 -1
  466. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js +42 -40
  467. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
  468. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js +5 -7
  469. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js.map +1 -1
  470. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js +19 -24
  471. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
  472. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js +56 -55
  473. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js.map +1 -1
  474. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js +27 -23
  475. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -1
  476. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js +13 -16
  477. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js.map +1 -1
  478. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js +86 -87
  479. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
  480. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js +14 -11
  481. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map +1 -1
  482. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js +85 -58
  483. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
  484. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js +18 -20
  485. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
  486. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js +3 -3
  487. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -1
  488. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js +11 -6
  489. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js.map +1 -1
  490. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +58 -49
  491. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
  492. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js +28 -32
  493. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js.map +1 -1
  494. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js +34 -29
  495. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js.map +1 -1
  496. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js +1 -1
  497. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js.map +1 -1
  498. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js +11 -11
  499. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js.map +1 -1
  500. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js +1 -1
  501. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js.map +1 -1
  502. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js +23 -22
  503. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -1
  504. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js +54 -39
  505. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
  506. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js +39 -37
  507. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js.map +1 -1
  508. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js +20 -16
  509. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js.map +1 -1
  510. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js +16 -15
  511. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js.map +1 -1
  512. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +50 -41
  513. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
  514. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js +13 -9
  515. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js.map +1 -1
  516. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js +57 -51
  517. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -1
  518. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js +71 -67
  519. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js.map +1 -1
  520. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js +40 -37
  521. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js.map +1 -1
  522. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js +64 -44
  523. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -1
  524. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js +62 -51
  525. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -1
  526. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js +6 -6
  527. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js.map +1 -1
  528. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js +13 -5
  529. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js.map +1 -1
  530. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +93 -77
  531. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
  532. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js +15 -15
  533. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js.map +1 -1
  534. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js +31 -41
  535. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js.map +1 -1
  536. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js +31 -30
  537. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js.map +1 -1
  538. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js +3 -3
  539. package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js.map +1 -1
  540. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js +14 -15
  541. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js.map +1 -1
  542. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js +2 -2
  543. package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js.map +1 -1
  544. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js +42 -36
  545. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -1
  546. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js +67 -74
  547. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js.map +1 -1
  548. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js +11 -6
  549. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js.map +1 -1
  550. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js +5 -2
  551. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js.map +1 -1
  552. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js +15 -5
  553. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js.map +1 -1
  554. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js +5 -2
  555. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js.map +1 -1
  556. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js +26 -16
  557. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js.map +1 -1
  558. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js +9 -3
  559. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js.map +1 -1
  560. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js +42 -23
  561. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js.map +1 -1
  562. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js +9 -6
  563. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js.map +1 -1
  564. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js +9 -4
  565. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js.map +1 -1
  566. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js +5 -2
  567. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js.map +1 -1
  568. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js +9 -3
  569. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js.map +1 -1
  570. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js +5 -2
  571. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js.map +1 -1
  572. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js +1 -1
  573. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js.map +1 -1
  574. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js +15 -5
  575. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js.map +1 -1
  576. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js +14 -9
  577. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js.map +1 -1
  578. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js +25 -13
  579. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js.map +1 -1
  580. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js +43 -24
  581. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js.map +1 -1
  582. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js +34 -24
  583. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js.map +1 -1
  584. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js +4 -4
  585. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js.map +1 -1
  586. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js +3 -3
  587. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js.map +1 -1
  588. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js +18 -16
  589. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js.map +1 -1
  590. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js +2 -2
  591. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js.map +1 -1
  592. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js +6 -4
  593. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js.map +1 -1
  594. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js +8 -8
  595. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js.map +1 -1
  596. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js +6 -6
  597. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js.map +1 -1
  598. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js +8 -6
  599. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js.map +1 -1
  600. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js +17 -17
  601. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js.map +1 -1
  602. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js +2 -2
  603. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js.map +1 -1
  604. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +55 -55
  605. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  606. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js +59 -30
  607. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js.map +1 -1
  608. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js +4 -4
  609. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js.map +1 -1
  610. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js +33 -19
  611. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js.map +1 -1
  612. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js +11 -11
  613. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js.map +1 -1
  614. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js +21 -19
  615. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js.map +1 -1
  616. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js +6 -7
  617. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js.map +1 -1
  618. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +138 -106
  619. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
  620. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js +3 -1
  621. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js.map +1 -1
  622. package/dist/esm/packages/taco/src/types.js +1 -1
  623. package/dist/esm/packages/taco/src/types.js.map +1 -1
  624. package/dist/esm/packages/taco/src/utils/aria.js +2 -2
  625. package/dist/esm/packages/taco/src/utils/aria.js.map +1 -1
  626. package/dist/esm/packages/taco/src/utils/date.js +47 -23
  627. package/dist/esm/packages/taco/src/utils/date.js.map +1 -1
  628. package/dist/esm/packages/taco/src/utils/debounce.js +10 -4
  629. package/dist/esm/packages/taco/src/utils/debounce.js.map +1 -1
  630. package/dist/esm/packages/taco/src/utils/device.js +4 -2
  631. package/dist/esm/packages/taco/src/utils/device.js.map +1 -1
  632. package/dist/esm/packages/taco/src/utils/dom.js +26 -20
  633. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  634. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js +40 -38
  635. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js.map +1 -1
  636. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js +9 -7
  637. package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js.map +1 -1
  638. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js +20 -9
  639. package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js.map +1 -1
  640. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js +9 -9
  641. package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js.map +1 -1
  642. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js +8 -6
  643. package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js.map +1 -1
  644. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js +16 -11
  645. package/dist/esm/packages/taco/src/utils/hooks/useTimer.js.map +1 -1
  646. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js +11 -6
  647. package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js.map +1 -1
  648. package/dist/esm/packages/taco/src/utils/input.js +10 -7
  649. package/dist/esm/packages/taco/src/utils/input.js.map +1 -1
  650. package/dist/esm/packages/taco/src/utils/keyboard.js +8 -5
  651. package/dist/esm/packages/taco/src/utils/keyboard.js.map +1 -1
  652. package/dist/esm/packages/taco/src/utils/mergeRefs.js +2 -2
  653. package/dist/esm/packages/taco/src/utils/mergeRefs.js.map +1 -1
  654. package/dist/esm/packages/taco/src/utils/tailwind.js +5 -5
  655. package/dist/esm/packages/taco/src/utils/tailwind.js.map +1 -1
  656. package/dist/esm/packages/taco/tailwind.colors.js +1 -1
  657. package/dist/esm/packages/taco/tailwind.colors.js.map +1 -1
  658. package/dist/taco.cjs.development.js +7857 -6877
  659. package/dist/taco.cjs.development.js.map +1 -1
  660. package/dist/taco.cjs.production.min.js +1 -1
  661. package/dist/taco.cjs.production.min.js.map +1 -1
  662. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"GroupedCell.js","sources":["../../../../../../../../../../../../src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.tsx"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta, ColumnMeta as ReactTableColumnMeta } from '@tanstack/react-table';\nimport { getCellAttributes } from '../util';\nimport { Actions as RowGroupActions } from '../../Internal/Actions';\nimport { isInternalColumn } from '../../../../../useTableManager/util/columns';\nimport { RowContext } from '../../../Row/RowContext';\nimport { TableRowActionGroupRenderer } from '../../../../../types';\nimport { TableCellRendererProps } from '../../../../types';\n\nexport function GroupedCell<TType = unknown>(props: TableCellRendererProps<TType>) {\n const { cell, cellRef, index, isHighlighted } = props;\n const { table } = cell.getContext();\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n const columnMeta = cell.column.columnDef.meta as ReactTableColumnMeta<TType, unknown>;\n const attributes = getCellAttributes(cell, index, isHighlighted);\n\n const { isHovered, rowIndex } = React.useContext(RowContext);\n const isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;\n const canShowActions = isActiveRow || (isHovered && !tableMeta.rowActive.isHoverStatePaused);\n\n // Set colSpan based on the count of visible cells, including '__actions' and non-internal columns, so that\n // rowGroupActions aligns with rowActions.\n const colSpan =\n cell.row.getVisibleCells().filter(c => c.column.id === '__actions' || !isInternalColumn(c.column.id)).length - 1;\n const content = columnMeta.renderer?.(cell.getValue<TType>(), cell.row.original) ?? cell.getValue() ?? null;\n const subRows = cell.getContext().row.subRows.map(row => row.original);\n\n return (\n <MemoedGroupedCell<TType>\n {...attributes}\n canShowActions={canShowActions}\n cellRef={cellRef}\n colSpan={colSpan}\n rowActions={tableMeta.rowGroups.rowActionsForGroup}\n rowId={cell.row.id}\n subRows={subRows}\n table={table}>\n {content}\n </MemoedGroupedCell>\n );\n}\n\ntype MemoedGroupedCellProps<TType = unknown> = React.TdHTMLAttributes<HTMLTableCellElement> & {\n canShowActions: boolean;\n cellRef: React.RefObject<HTMLTableCellElement>;\n colSpan: number;\n rowActions?: TableRowActionGroupRenderer<TType>[];\n rowId: string;\n subRows: TType[];\n table: ReactTable<TType>;\n};\n\nconst MemoedGroupedCell = React.memo(function MemoedGroupedCell<TType = unknown>(props: MemoedGroupedCellProps<TType>) {\n const { canShowActions, cellRef, children, colSpan, rowActions, rowId, subRows, table, ...attributes } = props;\n\n return (\n // pr-1 is needed to align group row actions with row actions in sibling rows, if present\n <td {...attributes} className=\"!pr-1\" ref={cellRef} style={{ gridColumn: `span ${colSpan} / span ${colSpan}` }}>\n <span className=\"grow\">{children}</span>\n {rowActions?.length && canShowActions ? (\n <RowGroupActions<TType>\n actions={rowActions as any}\n actionsLength={4}\n data={subRows}\n isActiveRow\n rowId={rowId}\n table={table}\n />\n ) : null}\n </td>\n );\n}) as <TType = unknown>(props: MemoedGroupedCellProps<TType>) => JSX.Element;\n"],"names":["GroupedCell","props","cell","cellRef","index","isHighlighted","table","getContext","tableMeta","options","meta","columnMeta","column","columnDef","attributes","getCellAttributes","isHovered","rowIndex","React","useContext","RowContext","isActiveRow","rowActive","rowActiveIndex","canShowActions","isHoverStatePaused","colSpan","row","getVisibleCells","filter","c","id","isInternalColumn","length","content","_ref","_columnMeta$renderer","_columnMeta$renderer2","renderer","call","getValue","original","subRows","map","MemoedGroupedCell","rowActions","rowGroups","rowActionsForGroup","rowId","memo","children","className","ref","style","gridColumn","RowGroupActions","actions","actionsLength","data"],"mappings":";;;;;;SASgBA,WAAWA,CAAkBC,KAAoC;;EAC7E,MAAM;IAAEC,IAAI;IAAEC,OAAO;IAAEC,KAAK;IAAEC;GAAe,GAAGJ,KAAK;EACrD,MAAM;IAAEK;GAAO,GAAGJ,IAAI,CAACK,UAAU,EAAE;EACnC,MAAMC,SAAS,GAAGF,KAAK,CAACG,OAAO,CAACC,IAA6B;EAC7D,MAAMC,UAAU,GAAGT,IAAI,CAACU,MAAM,CAACC,SAAS,CAACH,IAA4C;EACrF,MAAMI,UAAU,GAAGC,iBAAiB,CAACb,IAAI,EAAEE,KAAK,EAAEC,aAAa,CAAC;EAEhE,MAAM;IAAEW,SAAS;IAAEC;GAAU,GAAGC,cAAK,CAACC,UAAU,CAACC,UAAU,CAAC;EAC5D,MAAMC,WAAW,GAAGb,SAAS,CAACc,SAAS,CAACC,cAAc,KAAKN,QAAQ;EACnE,MAAMO,cAAc,GAAGH,WAAW,IAAKL,SAAS,IAAI,CAACR,SAAS,CAACc,SAAS,CAACG,kBAAmB;;;EAI5F,MAAMC,OAAO,GACTxB,IAAI,CAACyB,GAAG,CAACC,eAAe,EAAE,CAACC,MAAM,CAACC,CAAC,IAAIA,CAAC,CAAClB,MAAM,CAACmB,EAAE,KAAK,WAAW,IAAI,CAACC,gBAAgB,CAACF,CAAC,CAAClB,MAAM,CAACmB,EAAE,CAAC,CAAC,CAACE,MAAM,GAAG,CAAC;EACpH,MAAMC,OAAO,IAAAC,IAAA,IAAAC,oBAAA,IAAAC,qBAAA,GAAG1B,UAAU,CAAC2B,QAAQ,cAAAD,qBAAA,uBAAnBA,q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AiB;MAC1BY,aAAa,EAAE,CAAC;MAChBC,IAAI,EAAEhB,OAAO;MACbrB,WAAW;MACX2B,KAAK,EAAEA,KAAK;MACZ1C,KAAK,EAAEA;MACT,IACF,IAAI;;AAGpB,CAAC,CAA2E;;;;"}
1
+ {"version":3,"file":"GroupedCell.js","sources":["../../../../../../../../../../../../src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.tsx"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta, ColumnMeta as ReactTableColumnMeta } from '@tanstack/react-table';\nimport { getCellAttributes } from '../util';\nimport { Actions as RowGroupActions } from '../../Internal/Actions';\nimport { isInternalColumn } from '../../../../../useTableManager/util/columns';\nimport { RowContext } from '../../../Row/RowContext';\nimport { TableRowActionGroupRenderer } from '../../../../../types';\nimport { TableCellRendererProps } from '../../../../types';\n\nexport function GroupedCell<TType = unknown>(props: TableCellRendererProps<TType>) {\n const { cell, cellRef, index, isHighlighted } = props;\n const { table } = cell.getContext();\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n const columnMeta = cell.column.columnDef.meta as ReactTableColumnMeta<TType, unknown>;\n const attributes = getCellAttributes(cell, index, isHighlighted);\n\n const { isHovered, rowIndex } = React.useContext(RowContext);\n const isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;\n const canShowActions = isActiveRow || (isHovered && !tableMeta.rowActive.isHoverStatePaused);\n\n // Set colSpan based on the count of visible cells, including '__actions' and non-internal columns, so that\n // rowGroupActions aligns with rowActions.\n const colSpan =\n cell.row.getVisibleCells().filter(c => c.column.id === '__actions' || !isInternalColumn(c.column.id)).length - 1;\n const content = columnMeta.renderer?.(cell.getValue<TType>(), cell.row.original) ?? cell.getValue() ?? null;\n const subRows = cell.getContext().row.subRows.map(row => row.original);\n\n return (\n <MemoedGroupedCell<TType>\n {...attributes}\n canShowActions={canShowActions}\n cellRef={cellRef}\n colSpan={colSpan}\n rowActions={tableMeta.rowGroups.rowActionsForGroup}\n rowId={cell.row.id}\n subRows={subRows}\n table={table}>\n {content}\n </MemoedGroupedCell>\n );\n}\n\ntype MemoedGroupedCellProps<TType = unknown> = React.TdHTMLAttributes<HTMLTableCellElement> & {\n canShowActions: boolean;\n cellRef: React.RefObject<HTMLTableCellElement>;\n colSpan: number;\n rowActions?: TableRowActionGroupRenderer<TType>[];\n rowId: string;\n subRows: TType[];\n table: ReactTable<TType>;\n};\n\nconst MemoedGroupedCell = React.memo(function MemoedGroupedCell<TType = unknown>(props: MemoedGroupedCellProps<TType>) {\n const { canShowActions, cellRef, children, colSpan, rowActions, rowId, subRows, table, ...attributes } = props;\n\n return (\n // pr-1 is needed to align group row actions with row actions in sibling rows, if present\n <td {...attributes} className=\"!pr-1\" ref={cellRef} style={{ gridColumn: `span ${colSpan} / span ${colSpan}` }}>\n <span className=\"grow\">{children}</span>\n {rowActions?.length && canShowActions ? (\n <RowGroupActions<TType>\n actions={rowActions as any}\n actionsLength={4}\n data={subRows}\n isActiveRow\n rowId={rowId}\n table={table}\n />\n ) : null}\n </td>\n );\n}) as <TType = unknown>(props: MemoedGroupedCellProps<TType>) => JSX.Element;\n"],"names":["GroupedCell","props","cell","cellRef","index","isHighlighted","_cell$getContext","getContext","table","tableMeta","options","meta","columnMeta","column","columnDef","attributes","getCellAttributes","_React$useContext","React","useContext","RowContext","isHovered","rowIndex","isActiveRow","rowActive","rowActiveIndex","canShowActions","isHoverStatePaused","colSpan","row","getVisibleCells","filter","c","id","isInternalColumn","length","content","_ref","_columnMeta$renderer","_columnMeta$renderer2","renderer","call","getValue","original","subRows","map","MemoedGroupedCell","rowActions","rowGroups","rowActionsForGroup","rowId","memo","children","_objectWithoutPropertiesLoose","_excluded","className","ref","style","gridColumn","RowGroupActions","actions","actionsLength","data"],"mappings":";;;;;;;;SASgBA,WAAWA,CAAkBC,KAAoC;;EAC7E,IAAQC,IAAI,GAAoCD,KAAK,CAA7CC,IAAI;IAAEC,OAAO,GAA2BF,KAAK,CAAvCE,OAAO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UAAU,aAAVA,UAAU,eAAVA,UAAU,CAAEZ,MAAM,IAAIT,cAAc,iBACjCR,6BAACyC,OAAe;MACZC,OAAO,EAAEb,UAAiB;MAC1Bc,aAAa,EAAE,CAAC;MAChBC,IAAI,EAAElB,OAAO;MACbrB,WAAW;MACX2B,KAAK,EAAEA,KAAK;MACZ1C,KAAK,EAAEA;MACT,IACF,IAAI;;AAGpB,CAAC,CAA2E;;;;"}
@@ -4,24 +4,22 @@ import { useSearchHighlighting } from './util.js';
4
4
  import { GroupedCell } from './BuiltIns/GroupedCell.js';
5
5
 
6
6
  function Cell(props) {
7
- const {
8
- cell,
9
- index,
10
- renderer: CellRenderer
11
- } = props;
12
- const cellRef = React__default.useRef(null);
13
- const isHighlighted = useSearchHighlighting(cell, index, cellRef);
7
+ var cell = props.cell,
8
+ index = props.index,
9
+ CellRenderer = props.renderer;
10
+ var cellRef = React__default.useRef(null);
11
+ var isHighlighted = useSearchHighlighting(cell, index, cellRef);
14
12
  if ((cell.getIsAggregated() || cell.getIsPlaceholder()) && !isInternalColumn(cell.column.id)) {
15
13
  // we choose not to show aggregated cells in group rows and we don't show
16
14
  // placeholder cells in normal rows (because we don't show the grouped column)
17
15
  // so just straight up abort and return nothing at all - no <td>
18
16
  return null;
19
17
  }
20
- const cellProps = {
21
- cell,
22
- cellRef,
23
- index,
24
- isHighlighted
18
+ var cellProps = {
19
+ cell: cell,
20
+ cellRef: cellRef,
21
+ index: index,
22
+ isHighlighted: isHighlighted
25
23
  };
26
24
  if (cell.getIsGrouped()) {
27
25
  return /*#__PURE__*/React__default.createElement(GroupedCell, Object.assign({}, cellProps));
@@ -1 +1 @@
1
- {"version":3,"file":"Cell.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Columns/Cell/Cell.tsx"],"sourcesContent":["import React from 'react';\nimport { Cell as ReactTableCell } from '@tanstack/react-table';\nimport { isInternalColumn } from '../../../../useTableManager/util/columns';\nimport { GroupedCell } from './BuiltIns/GroupedCell';\nimport { useSearchHighlighting } from './util';\nimport { TableCellRendererProps, TableCellRenderer } from '../../../types';\n\ntype CellProps<TType = unknown> = React.HTMLAttributes<HTMLTableCellElement> & {\n cell: ReactTableCell<TType, unknown>;\n index: number;\n renderer: TableCellRenderer<TType>;\n};\n\nexport function Cell<TType = unknown>(props: CellProps<TType>) {\n const { cell, index, renderer: CellRenderer } = props;\n const cellRef = React.useRef<HTMLTableCellElement>(null);\n const isHighlighted = useSearchHighlighting(cell, index, cellRef);\n\n if ((cell.getIsAggregated() || cell.getIsPlaceholder()) && !isInternalColumn(cell.column.id)) {\n // we choose not to show aggregated cells in group rows and we don't show\n // placeholder cells in normal rows (because we don't show the grouped column)\n // so just straight up abort and return nothing at all - no <td>\n return null;\n }\n\n const cellProps: TableCellRendererProps<TType> = {\n cell,\n cellRef,\n index,\n isHighlighted,\n };\n\n if (cell.getIsGrouped()) {\n return <GroupedCell<TType> {...cellProps} />;\n }\n\n return <CellRenderer<TType> {...cellProps} />;\n}\n"],"names":["Cell","props","cell","index","renderer","CellRenderer","cellRef","React","useRef","isHighlighted","useSearchHighlighting","getIsAggregated","getIsPlaceholder","isInternalColumn","column","id","cellProps","getIsGrouped","GroupedCell"],"mappings":";;;;;SAagBA,IAAIA,CAAkBC,KAAuB;EACzD,MAAM;IAAEC,IAAI;IAAEC,KAAK;IAAEC,QAAQ,EAAEC;GAAc,GAAGJ,KAAK;EACrD,MAAMK,OAAO,GAAGC,cAAK,CAACC,MAAM,CAAuB,IAAI,CAAC;EACxD,MAAMC,aAAa,GAAGC,qBAAqB,CAACR,IAAI,EAAEC,KAAK,EAAEG,OAAO,CAAC;EAEjE,IAAI,CAACJ,IAAI,CAACS,eAAe,EAAE,IAAIT,IAAI,CAACU,gBAAgB,EAAE,KAAK,CAACC,gBAAgB,CAACX,IAAI,CAACY,MAAM,CAACC,EAAE,CAAC,EAAE;;;;IAI1F,OAAO,IAAI;;EAGf,MAAMC,SAAS,GAAkC;IAC7Cd,IAAI;IACJI,OAAO;IACPH,KAAK;IACLM;GACH;EAED,IAAIP,IAAI,CAACe,YAAY,EAAE,EAAE;IACrB,oBAAOV,6BAACW,WAAW,oBAAYF,SAAS,EAAI;;EAGhD,oBAAOT,6BAACF,YAAY,oBAAYW,SAAS,EAAI;AACjD;;;;"}
1
+ {"version":3,"file":"Cell.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Columns/Cell/Cell.tsx"],"sourcesContent":["import React from 'react';\nimport { Cell as ReactTableCell } from '@tanstack/react-table';\nimport { isInternalColumn } from '../../../../useTableManager/util/columns';\nimport { GroupedCell } from './BuiltIns/GroupedCell';\nimport { useSearchHighlighting } from './util';\nimport { TableCellRendererProps, TableCellRenderer } from '../../../types';\n\ntype CellProps<TType = unknown> = React.HTMLAttributes<HTMLTableCellElement> & {\n cell: ReactTableCell<TType, unknown>;\n index: number;\n renderer: TableCellRenderer<TType>;\n};\n\nexport function Cell<TType = unknown>(props: CellProps<TType>) {\n const { cell, index, renderer: CellRenderer } = props;\n const cellRef = React.useRef<HTMLTableCellElement>(null);\n const isHighlighted = useSearchHighlighting(cell, index, cellRef);\n\n if ((cell.getIsAggregated() || cell.getIsPlaceholder()) && !isInternalColumn(cell.column.id)) {\n // we choose not to show aggregated cells in group rows and we don't show\n // placeholder cells in normal rows (because we don't show the grouped column)\n // so just straight up abort and return nothing at all - no <td>\n return null;\n }\n\n const cellProps: TableCellRendererProps<TType> = {\n cell,\n cellRef,\n index,\n isHighlighted,\n };\n\n if (cell.getIsGrouped()) {\n return <GroupedCell<TType> {...cellProps} />;\n }\n\n return <CellRenderer<TType> {...cellProps} />;\n}\n"],"names":["Cell","props","cell","index","CellRenderer","renderer","cellRef","React","useRef","isHighlighted","useSearchHighlighting","getIsAggregated","getIsPlaceholder","isInternalColumn","column","id","cellProps","getIsGrouped","GroupedCell"],"mappings":";;;;;SAagBA,IAAIA,CAAkBC,KAAuB;EACzD,IAAQC,IAAI,GAAoCD,KAAK,CAA7CC,IAAI;IAAEC,KAAK,GAA6BF,KAAK,CAAvCE,KAAK;IAAYC,YAAY,GAAKH,KAAK,CAAhCI,QAAQ;EAC7B,IAAMC,OAAO,GAAGC,cAAK,CAACC,MAAM,CAAuB,IAAI,CAAC;EACxD,IAAMC,aAAa,GAAGC,qBAAqB,CAACR,IAAI,EAAEC,KAAK,EAAEG,OAAO,CAAC;EAEjE,IAAI,CAACJ,IAAI,CAACS,eAAe,EAAE,IAAIT,IAAI,CAACU,gBAAgB,EAAE,KAAK,CAACC,gBAAgB,CAACX,IAAI,CAACY,MAAM,CAACC,EAAE,CAAC,EAAE;;;;IAI1F,OAAO,IAAI;;EAGf,IAAMC,SAAS,GAAkC;IAC7Cd,IAAI,EAAJA,IAAI;IACJI,OAAO,EAAPA,OAAO;IACPH,KAAK,EAALA,KAAK;IACLM,aAAa,EAAbA;GACH;EAED,IAAIP,IAAI,CAACe,YAAY,EAAE,EAAE;IACrB,oBAAOV,6BAACW,WAAW,oBAAYF,SAAS,EAAI;;EAGhD,oBAAOT,6BAACH,YAAY,oBAAYY,SAAS,EAAI;AACjD;;;;"}
@@ -4,8 +4,8 @@ import { isInternalColumn, isCellHighlighted } from '../../../../useTableManager
4
4
  import { RowContext } from '../../Row/RowContext.js';
5
5
 
6
6
  function getCellAttributes(cell, index, isHighlighted) {
7
- const columnMeta = cell.column.columnDef.meta;
8
- const isPinned = cell.column.getIsPinned();
7
+ var columnMeta = cell.column.columnDef.meta;
8
+ var isPinned = cell.column.getIsPinned();
9
9
  // be careful adding new properties here, any objects will break cell memoisation (e.g. the style attribute)
10
10
  return {
11
11
  'data-cell-align': columnMeta === null || columnMeta === void 0 ? void 0 : columnMeta.align,
@@ -18,44 +18,45 @@ function getCellAttributes(cell, index, isHighlighted) {
18
18
  };
19
19
  }
20
20
  function useSearchHighlighting(cell, cellIndex, ref) {
21
- const localization = useLocalization();
22
- const {
23
- rowIndex
24
- } = React__default.useContext(RowContext);
25
- const context = cell.getContext();
26
- const tableMeta = context.table.options.meta;
27
- const columnMeta = cell.column.columnDef.meta;
28
- const isHighlighted = React__default.useMemo(() => {
21
+ var localization = useLocalization();
22
+ var _React$useContext = React__default.useContext(RowContext),
23
+ rowIndex = _React$useContext.rowIndex;
24
+ var context = cell.getContext();
25
+ var tableMeta = context.table.options.meta;
26
+ var columnMeta = cell.column.columnDef.meta;
27
+ var isHighlighted = React__default.useMemo(function () {
29
28
  if (!cell.column.columnDef.enableGlobalFilter || isInternalColumn(cell.column.id) || cell.getIsAggregated() || cell.getIsPlaceholder()) {
30
29
  return undefined;
31
30
  }
32
- let isHighlighted = false;
31
+ var isHighlighted = false;
33
32
  if (context.table.getState().globalFilter) {
34
33
  isHighlighted = isCellHighlighted(context.table.getState().globalFilter, cell.getValue(), columnMeta.dataType, localization);
35
34
  }
36
35
  if (!isHighlighted || tableMeta.search.currentHighlightColumnIndex === undefined) {
37
36
  return undefined;
38
37
  }
39
- const [rowActiveIndex, currentColumnIndex] = tableMeta.search.highlightedColumnIndexes[tableMeta.search.currentHighlightColumnIndex];
38
+ var _tableMeta$search$hig = tableMeta.search.highlightedColumnIndexes[tableMeta.search.currentHighlightColumnIndex],
39
+ rowActiveIndex = _tableMeta$search$hig[0],
40
+ currentColumnIndex = _tableMeta$search$hig[1];
40
41
  if (rowActiveIndex === rowIndex && currentColumnIndex === cellIndex) {
41
42
  return 'current';
42
43
  }
43
44
  return true;
44
45
  }, [cell.getValue(), context.table.getState().globalFilter, tableMeta.search.highlightedColumnIndexes.length, tableMeta.search.currentHighlightColumnIndex]);
45
- React__default.useEffect(() => {
46
+ React__default.useEffect(function () {
46
47
  if (ref.current && isHighlighted === 'current') {
47
48
  ref.current.scrollIntoView({
48
49
  block: 'nearest',
49
50
  inline: 'nearest'
50
51
  });
51
- setTimeout(() => {
52
+ setTimeout(function () {
52
53
  if (ref.current) {
53
- const tableEl = ref.current.closest('table[data-taco^="table"]');
54
- setTimeout(() => {
55
- const pinnedColumns = tableEl === null || tableEl === void 0 ? void 0 : tableEl.querySelectorAll('thead tr:last-child th[data-cell-pinned="left"]');
54
+ var tableEl = ref.current.closest('table[data-taco^="table"]');
55
+ setTimeout(function () {
56
+ var pinnedColumns = tableEl === null || tableEl === void 0 ? void 0 : tableEl.querySelectorAll('thead tr:last-child th[data-cell-pinned="left"]');
56
57
  if (pinnedColumns !== null && pinnedColumns !== void 0 && pinnedColumns.length) {
57
58
  var _pinnedColumns$item;
58
- const lastFrozenRect = (_pinnedColumns$item = pinnedColumns.item(pinnedColumns.length - 1)) === null || _pinnedColumns$item === void 0 ? void 0 : _pinnedColumns$item.getBoundingClientRect();
59
+ var lastFrozenRect = (_pinnedColumns$item = pinnedColumns.item(pinnedColumns.length - 1)) === null || _pinnedColumns$item === void 0 ? void 0 : _pinnedColumns$item.getBoundingClientRect();
59
60
  if (lastFrozenRect && cell.column.getStart() < lastFrozenRect.right) {
60
61
  tableEl === null || tableEl === void 0 ? void 0 : tableEl.scrollTo(cell.column.getStart() - lastFrozenRect.right, tableEl.scrollTop);
61
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Columns/Cell/util.ts"],"sourcesContent":["import React from 'react';\nimport { Cell as ReactTableCell, ColumnMeta as ReactTableColumnMeta, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { isCellHighlighted, isInternalColumn } from '../../../../useTableManager/util/columns';\nimport { RowContext } from '../../Row/RowContext';\nimport { useLocalization } from '../../../../../../components/Provider/Localization';\n\nexport type DisplayCellProps<TType = unknown> = {\n index: number;\n cell: ReactTableCell<TType, unknown>;\n};\n\nexport function getCellAttributes<TType = unknown>(\n cell: ReactTableCell<TType, unknown>,\n index: number,\n isHighlighted: true | 'current' | undefined\n) {\n const columnMeta = cell.column.columnDef.meta as ReactTableColumnMeta<TType, unknown>;\n const isPinned = cell.column.getIsPinned();\n\n // be careful adding new properties here, any objects will break cell memoisation (e.g. the style attribute)\n return {\n 'data-cell-align': columnMeta?.align,\n 'data-cell-highlighted': isHighlighted,\n 'data-cell-id': cell.column.id,\n 'data-cell-index': index,\n 'data-cell-pinned': isPinned ? true : undefined,\n 'data-cell-truncate': columnMeta.enableTruncate ? true : undefined,\n className: typeof columnMeta.className === 'function' ? columnMeta.className(cell.row.original) : columnMeta.className,\n };\n}\n\nexport function useSearchHighlighting<TType = unknown>(\n cell: ReactTableCell<TType, unknown>,\n cellIndex: number,\n ref: React.RefObject<HTMLTableCellElement>\n) {\n const localization = useLocalization();\n const { rowIndex } = React.useContext(RowContext);\n const context = cell.getContext();\n const tableMeta = context.table.options.meta as ReactTableMeta<TType>;\n const columnMeta = cell.column.columnDef.meta as ReactTableColumnMeta<TType, unknown>;\n\n const isHighlighted: 'current' | boolean | undefined = React.useMemo(() => {\n if (\n !cell.column.columnDef.enableGlobalFilter ||\n isInternalColumn(cell.column.id) ||\n cell.getIsAggregated() ||\n cell.getIsPlaceholder()\n ) {\n return undefined;\n }\n\n let isHighlighted = false;\n\n if (context.table.getState().globalFilter) {\n isHighlighted = isCellHighlighted(\n context.table.getState().globalFilter,\n cell.getValue(),\n columnMeta.dataType,\n localization\n );\n }\n\n if (!isHighlighted || tableMeta.search.currentHighlightColumnIndex === undefined) {\n return undefined;\n }\n\n const [rowActiveIndex, currentColumnIndex] =\n tableMeta.search.highlightedColumnIndexes[tableMeta.search.currentHighlightColumnIndex];\n\n if (rowActiveIndex === rowIndex && currentColumnIndex === cellIndex) {\n return 'current';\n }\n\n return true;\n }, [\n cell.getValue(),\n context.table.getState().globalFilter,\n tableMeta.search.highlightedColumnIndexes.length,\n tableMeta.search.currentHighlightColumnIndex,\n ]);\n\n React.useEffect(() => {\n if (ref.current && isHighlighted === 'current') {\n ref.current.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n\n setTimeout(() => {\n if (ref.current) {\n const tableEl = ref.current.closest('table[data-taco^=\"table\"]');\n\n setTimeout(() => {\n const pinnedColumns = tableEl?.querySelectorAll('thead tr:last-child th[data-cell-pinned=\"left\"]');\n\n if (pinnedColumns?.length) {\n const lastFrozenRect = pinnedColumns.item(pinnedColumns.length - 1)?.getBoundingClientRect();\n\n if (lastFrozenRect && cell.column.getStart() < lastFrozenRect.right) {\n tableEl?.scrollTo(cell.column.getStart() - lastFrozenRect.right, tableEl.scrollTop);\n }\n }\n }, 1);\n }\n }, 1);\n }\n }, [isHighlighted]);\n\n return isHighlighted;\n}\n\nexport function getCurrentRowCellElement(index: number, tableEl: HTMLElement) {\n const cellSelector = `[data-current=\"true\"] [data-column-index=\"${index}\"`;\n return tableEl.querySelector(cellSelector);\n}\n\nexport function scrollColumnIntoView(columnIndex: number, frozenColumnIndex: number, column: HTMLElement, tableEl: HTMLElement) {\n if (frozenColumnIndex !== undefined && columnIndex > frozenColumnIndex) {\n const lastFrozenColumnElement = getCurrentRowCellElement(frozenColumnIndex, tableEl);\n const highlightRef = column?.getBoundingClientRect();\n const lastFrozenRect = lastFrozenColumnElement?.getBoundingClientRect();\n\n // offset the width of frozen columns so that the column being scrolled to is not hidden behind them\n if (highlightRef && lastFrozenRect && highlightRef.left < lastFrozenRect.left + lastFrozenRect.width) {\n const pinnedColumnsWidth = lastFrozenRect.left + lastFrozenRect.width;\n tableEl?.scrollTo(highlightRef.left - pinnedColumnsWidth, tableEl.scrollTop);\n }\n } else {\n column.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n }\n}\n"],"names":["getCellAttributes","cell","index","isHighlighted","columnMeta","column","columnDef","meta","isPinned","getIsPinned","align","id","undefined","enableTruncate","className","row","original","useSearchHighlighting","cellIndex","ref","localization","useLocalization","rowIndex","React","useContext","RowContext","context","getContext","tableMeta","table","options","useMemo","enableGlobalFilter","isInternalColumn","getIsAggregated","getIsPlaceholder","getState","globalFilter","isCellHighlighted","getValue","dataType","search","currentHighlightColumnIndex","rowActiveIndex","currentColumnIndex","highlightedColumnIndexes","length","useEffect","current","scrollIntoView","block","inline","setTimeout","tableEl","closest","pinnedColumns","querySelectorAll","_pinnedColumns$item","lastFrozenRect","item","getBoundingClientRect","getStart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CAAC6B,OAAO,CAACM,OAAO,CAAC,2BAA2B,CAAC;UAEhEF,UAAU,CAAC;YACP,MAAMG,aAAa,GAAGF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEG,gBAAgB,CAAC,iDAAiD,CAAC;YAElG,IAAID,aAAa,aAAbA,aAAa,eAAbA,aAAa,CAAET,MAAM,EAAE;cAAA,IAAAW,mBAAA;cACvB,MAAMC,cAAc,IAAAD,mBAAA,GAAGF,aAAa,CAACI,IAAI,CAACJ,aAAa,CAACT,MAAM,GAAG,CAAC,CAAC,cAAAW,mBAAA,uBAA5CA,mBAAA,CAA8CG,qBAAqB,EAAE;cAE5F,IAAIF,cAAc,IAAIzD,IAAI,CAACI,MAAM,CAACwD,QAAQ,EAAE,GAAGH,cAAc,CAACI,KAAK,EAAE;gBACjET,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEU,QAAQ,CAAC9D,IAAI,CAACI,MAAM,CAACwD,QAAQ,EAAE,GAAGH,cAAc,CAACI,KAAK,EAAET,OAAO,CAACW,SAAS,CAAC;;;WAG9F,EAAE,CAAC,CAAC;;OAEZ,EAAE,CAAC,CAAC;;GAEZ,EAAE,CAAC7D,aAAa,CAAC,CAAC;EAEnB,OAAOA,aAAa;AACxB;;;;"}
1
+ {"version":3,"file":"util.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Columns/Cell/util.ts"],"sourcesContent":["import React from 'react';\nimport { Cell as ReactTableCell, ColumnMeta as ReactTableColumnMeta, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { isCellHighlighted, isInternalColumn } from '../../../../useTableManager/util/columns';\nimport { RowContext } from '../../Row/RowContext';\nimport { useLocalization } from '../../../../../../components/Provider/Localization';\n\nexport type DisplayCellProps<TType = unknown> = {\n index: number;\n cell: ReactTableCell<TType, unknown>;\n};\n\nexport function getCellAttributes<TType = unknown>(\n cell: ReactTableCell<TType, unknown>,\n index: number,\n isHighlighted: true | 'current' | undefined\n) {\n const columnMeta = cell.column.columnDef.meta as ReactTableColumnMeta<TType, unknown>;\n const isPinned = cell.column.getIsPinned();\n\n // be careful adding new properties here, any objects will break cell memoisation (e.g. the style attribute)\n return {\n 'data-cell-align': columnMeta?.align,\n 'data-cell-highlighted': isHighlighted,\n 'data-cell-id': cell.column.id,\n 'data-cell-index': index,\n 'data-cell-pinned': isPinned ? true : undefined,\n 'data-cell-truncate': columnMeta.enableTruncate ? true : undefined,\n className: typeof columnMeta.className === 'function' ? columnMeta.className(cell.row.original) : columnMeta.className,\n };\n}\n\nexport function useSearchHighlighting<TType = unknown>(\n cell: ReactTableCell<TType, unknown>,\n cellIndex: number,\n ref: React.RefObject<HTMLTableCellElement>\n) {\n const localization = useLocalization();\n const { rowIndex } = React.useContext(RowContext);\n const context = cell.getContext();\n const tableMeta = context.table.options.meta as ReactTableMeta<TType>;\n const columnMeta = cell.column.columnDef.meta as ReactTableColumnMeta<TType, unknown>;\n\n const isHighlighted: 'current' | boolean | undefined = React.useMemo(() => {\n if (\n !cell.column.columnDef.enableGlobalFilter ||\n isInternalColumn(cell.column.id) ||\n cell.getIsAggregated() ||\n cell.getIsPlaceholder()\n ) {\n return undefined;\n }\n\n let isHighlighted = false;\n\n if (context.table.getState().globalFilter) {\n isHighlighted = isCellHighlighted(\n context.table.getState().globalFilter,\n cell.getValue(),\n columnMeta.dataType,\n localization\n );\n }\n\n if (!isHighlighted || tableMeta.search.currentHighlightColumnIndex === undefined) {\n return undefined;\n }\n\n const [rowActiveIndex, currentColumnIndex] =\n tableMeta.search.highlightedColumnIndexes[tableMeta.search.currentHighlightColumnIndex];\n\n if (rowActiveIndex === rowIndex && currentColumnIndex === cellIndex) {\n return 'current';\n }\n\n return true;\n }, [\n cell.getValue(),\n context.table.getState().globalFilter,\n tableMeta.search.highlightedColumnIndexes.length,\n tableMeta.search.currentHighlightColumnIndex,\n ]);\n\n React.useEffect(() => {\n if (ref.current && isHighlighted === 'current') {\n ref.current.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n\n setTimeout(() => {\n if (ref.current) {\n const tableEl = ref.current.closest('table[data-taco^=\"table\"]');\n\n setTimeout(() => {\n const pinnedColumns = tableEl?.querySelectorAll('thead tr:last-child th[data-cell-pinned=\"left\"]');\n\n if (pinnedColumns?.length) {\n const lastFrozenRect = pinnedColumns.item(pinnedColumns.length - 1)?.getBoundingClientRect();\n\n if (lastFrozenRect && cell.column.getStart() < lastFrozenRect.right) {\n tableEl?.scrollTo(cell.column.getStart() - lastFrozenRect.right, tableEl.scrollTop);\n }\n }\n }, 1);\n }\n }, 1);\n }\n }, [isHighlighted]);\n\n return isHighlighted;\n}\n\nexport function getCurrentRowCellElement(index: number, tableEl: HTMLElement) {\n const cellSelector = `[data-current=\"true\"] [data-column-index=\"${index}\"`;\n return tableEl.querySelector(cellSelector);\n}\n\nexport function scrollColumnIntoView(columnIndex: number, frozenColumnIndex: number, column: HTMLElement, tableEl: HTMLElement) {\n if (frozenColumnIndex !== undefined && columnIndex > frozenColumnIndex) {\n const lastFrozenColumnElement = getCurrentRowCellElement(frozenColumnIndex, tableEl);\n const highlightRef = column?.getBoundingClientRect();\n const lastFrozenRect = lastFrozenColumnElement?.getBoundingClientRect();\n\n // offset the width of frozen columns so that the column being scrolled to is not hidden behind them\n if (highlightRef && lastFrozenRect && highlightRef.left < lastFrozenRect.left + lastFrozenRect.width) {\n const pinnedColumnsWidth = lastFrozenRect.left + lastFrozenRect.width;\n tableEl?.scrollTo(highlightRef.left - pinnedColumnsWidth, tableEl.scrollTop);\n }\n } else {\n column.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n }\n}\n"],"names":["getCellAttributes","cell","index","isHighlighted","columnMeta","column","columnDef","meta","isPinned","getIsPinned","align","id","undefined","enableTruncate","className","row","original","useSearchHighlighting","cellIndex","ref","localization","useLocalization","_React$useContext","React","useContext","RowContext","rowIndex","context","getContext","tableMeta","table","options","useMemo","enableGlobalFilter","isInternalColumn","getIsAggregated","getIsPlaceholder","getState","globalFilter","isCellHighlighted","getValue","dataType","search","currentHighlightColumnIndex","_tableMeta$search$hig","highlightedColumnIndexes","rowActiveIndex","currentColumnIndex","length","useEffect","current","scrollIntoView","block","inline","setTimeout","tableEl","closest","pinnedColumns","querySelectorAll","_pinnedColumns$item","lastFrozenRect","item","getBoundingClientRect","getStart","right","scrollTo","scrollTop"],"mappings":";;;;;SAWgBA,iBAAiBA,CAC7BC,IAAoC,EACpCC,KAAa,EACbC,aAA2C;EAE3C,IAAMC,UAAU,GAAGH,IAAI,CAACI,MAAM,CAACC,SAAS,CAACC,IAA4C;EACrF,IAAMC,QAAQ,GAAGP,IAAI,CAACI,MAAM,CAACI,WAAW,EAAE;;EAG1C,OAAO;IACH,iBAAiB,EAAEL,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEM,KAAK;IACpC,uBAAuB,EAAEP,aAAa;IACtC,cAAc,EAAEF,IAAI,CAACI,MAAM,CAACM,EAAE;IAC9B,iBAAiB,EAAET,KAAK;IACxB,kBAAkB,EAAEM,QAAQ,GAAG,IAAI,GAAGI,SAAS;IAC/C,oBAAoB,EAAER,UAAU,CAACS,cAAc,GAAG,IAAI,GAAGD,SAAS;IAClEE,SAAS,EAAE,OAAOV,UAAU,CAACU,SAAS,KAAK,UAAU,GAAGV,UAAU,CAACU,SAAS,CAACb,IAAI,CAACc,GAAG,CAACC,QAAQ,CAAC,GAAGZ,UAAU,CAACU;GAChH;AACL;SAEgBG,qBAAqBA,CACjChB,IAAoC,EACpCiB,SAAiB,EACjBC,GAA0C;EAE1C,IAAMC,YAAY,GAAGC,eAAe,EAAE;EACtC,IAAAC,iBAAA,GAAqBC,cAAK,CAACC,UAAU,CAACC,UAAU,CAAC;IAAzCC,QAAQ,GAAAJ,iBAAA,CAARI,QAAQ;EAChB,IAAMC,OAAO,GAAG1B,IAAI,CAAC2B,UAAU,EAAE;EACjC,IAAMC,SAAS,GAAGF,OAAO,CAACG,KAAK,CAACC,OAAO,CAACxB,IAA6B;EACrE,IAAMH,UAAU,GAAG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I9B,GAAG,CAAC+B,OAAO,IAAI/C,aAAa,KAAK,SAAS,EAAE;MAC5CgB,GAAG,CAAC+B,OAAO,CAACC,cAAc,CAAC;QAAEC,KAAK,EAAE,SAAS;QAAEC,MAAM,EAAE;OAAW,CAAC;MAEnEC,UAAU,CAAC;QACP,IAAInC,GAAG,CAAC+B,OAAO,EAAE;UACb,IAAMK,OAAO,GAAGpC,GAAG,CAAC+B,OAAO,CAACM,OAAO,CAAC,2BAA2B,CAAC;UAEhEF,UAAU,CAAC;YACP,IAAMG,aAAa,GAAGF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEG,gBAAgB,CAAC,iDAAiD,CAAC;YAElG,IAAID,aAAa,aAAbA,aAAa,eAAbA,aAAa,CAAET,MAAM,EAAE;cAAA,IAAAW,mBAAA;cACvB,IAAMC,cAAc,IAAAD,mBAAA,GAAGF,aAAa,CAACI,IAAI,CAACJ,aAAa,CAACT,MAAM,GAAG,CAAC,CAAC,cAAAW,mBAAA,uBAA5CA,mBAAA,CAA8CG,qBAAqB,EAAE;cAE5F,IAAIF,cAAc,IAAI3D,IAAI,CAACI,MAAM,CAAC0D,QAAQ,EAAE,GAAGH,cAAc,CAACI,KAAK,EAAE;gBACjET,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEU,QAAQ,CAAChE,IAAI,CAACI,MAAM,CAAC0D,QAAQ,EAAE,GAAGH,cAAc,CAACI,KAAK,EAAET,OAAO,CAACW,SAAS,CAAC;;;WAG9F,EAAE,CAAC,CAAC;;OAEZ,EAAE,CAAC,CAAC;;GAEZ,EAAE,CAAC/D,aAAa,CAAC,CAAC;EAEnB,OAAOA,aAAa;AACxB;;;;"}
@@ -7,27 +7,28 @@ import { Menu } from '../../../../../../components/Menu/Menu.js';
7
7
  import { RowContext } from '../../Row/RowContext.js';
8
8
 
9
9
  function Actions(props) {
10
- const {
11
- actions,
12
- actionsLength,
13
- data,
14
- isActiveRow,
15
- rowId,
16
- table
17
- } = props;
18
- const {
19
- texts
20
- } = useLocalization();
10
+ var actions = props.actions,
11
+ actionsLength = props.actionsLength,
12
+ data = props.data,
13
+ isActiveRow = props.isActiveRow,
14
+ rowId = props.rowId,
15
+ table = props.table;
16
+ var _useLocalization = useLocalization(),
17
+ texts = _useLocalization.texts;
21
18
  // we don't want to document passing table, so it isn't on the type
22
- const visibleActions = actions.map(action => action(data, rowId, table)).filter(action => !!action);
23
- const actionsOnRow = visibleActions.length === actionsLength ? visibleActions : visibleActions.slice(0, actionsLength - 1);
24
- const actionsInMenu = visibleActions.slice(visibleActions.length === actionsLength ? actionsLength : actionsLength - 1);
25
- const className = cn('flex justify-end text-right bg-[inherit] shadow-[-6px_0px_6px_var(--table-row-actions-shadow)] print:hidden');
19
+ var visibleActions = actions.map(function (action) {
20
+ return action(data, rowId, table);
21
+ }).filter(function (action) {
22
+ return !!action;
23
+ });
24
+ var actionsOnRow = visibleActions.length === actionsLength ? visibleActions : visibleActions.slice(0, actionsLength - 1);
25
+ var actionsInMenu = visibleActions.slice(visibleActions.length === actionsLength ? actionsLength : actionsLength - 1);
26
+ var className = cn('flex justify-end text-right bg-[inherit] shadow-[-6px_0px_6px_var(--table-row-actions-shadow)] print:hidden');
26
27
  return /*#__PURE__*/React__default.createElement("span", {
27
28
  className: className
28
- }, actionsOnRow.map((button, index) => {
29
+ }, actionsOnRow.map(function (button, index) {
29
30
  var _ref, _button$props$tooltip;
30
- const tooltip = String((_ref = (_button$props$tooltip = button.props.tooltip) !== null && _button$props$tooltip !== void 0 ? _button$props$tooltip : button.props['aria-label']) !== null && _ref !== void 0 ? _ref : '');
31
+ var tooltip = String((_ref = (_button$props$tooltip = button.props.tooltip) !== null && _button$props$tooltip !== void 0 ? _button$props$tooltip : button.props['aria-label']) !== null && _ref !== void 0 ? _ref : '');
31
32
  return /*#__PURE__*/React__default.cloneElement(button, {
32
33
  appearance: 'transparent',
33
34
  key: index,
@@ -42,33 +43,34 @@ function Actions(props) {
42
43
  "aria-label": texts.table.columns.actions.tooltip,
43
44
  icon: "more",
44
45
  tabIndex: isActiveRow ? 0 : -1,
45
- menu: menuProps => (/*#__PURE__*/React__default.createElement(Menu, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu.Content, null, actionsInMenu.map((action, i) => (/*#__PURE__*/React__default.createElement(Menu.Item, Object.assign({
46
- key: i
47
- }, action.props, {
48
- shortcut: action.props.shortcut
49
- }), action.props['aria-label']))))))
46
+ menu: function menu(menuProps) {
47
+ return /*#__PURE__*/React__default.createElement(Menu, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu.Content, null, actionsInMenu.map(function (action, i) {
48
+ return /*#__PURE__*/React__default.createElement(Menu.Item, Object.assign({
49
+ key: i
50
+ }, action.props, {
51
+ shortcut: action.props.shortcut
52
+ }), action.props['aria-label']);
53
+ })));
54
+ }
50
55
  })) : null);
51
56
  }
52
57
  function Header() {
53
58
  return null;
54
59
  }
55
- const Cell = /*#__PURE__*/React__default.memo(function MemoedCell(context) {
56
- const {
57
- row,
58
- table
59
- } = context;
60
- const {
61
- hideRowActions,
62
- isHovered,
63
- rowIndex
64
- } = React__default.useContext(RowContext);
65
- const tableMeta = table.options.meta;
66
- const actions = tableMeta.rowActions.rowActions;
67
- const actionsLength = tableMeta.rowActions.rowActionsLength;
68
- const isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;
69
- const isResizingColumn = !!table.getState().columnSizingInfo.isResizingColumn;
70
- const isHoverStatePaused = tableMeta.rowActive.isHoverStatePaused;
71
- const isRowGrouped = row.getIsGrouped();
60
+ var Cell = /*#__PURE__*/React__default.memo(function MemoedCell(context) {
61
+ var row = context.row,
62
+ table = context.table;
63
+ var _React$useContext = React__default.useContext(RowContext),
64
+ hideRowActions = _React$useContext.hideRowActions,
65
+ isHovered = _React$useContext.isHovered,
66
+ rowIndex = _React$useContext.rowIndex;
67
+ var tableMeta = table.options.meta;
68
+ var actions = tableMeta.rowActions.rowActions;
69
+ var actionsLength = tableMeta.rowActions.rowActionsLength;
70
+ var isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;
71
+ var isResizingColumn = !!table.getState().columnSizingInfo.isResizingColumn;
72
+ var isHoverStatePaused = tableMeta.rowActive.isHoverStatePaused;
73
+ var isRowGrouped = row.getIsGrouped();
72
74
  if (!hideRowActions && !isRowGrouped && actions !== null && actions !== void 0 && actions.length && (isActiveRow || isHovered && !isHoverStatePaused && !isResizingColumn)) {
73
75
  return /*#__PURE__*/React__default.createElement(Actions, {
74
76
  actions: actions,
@@ -81,7 +83,7 @@ const Cell = /*#__PURE__*/React__default.memo(function MemoedCell(context) {
81
83
  }
82
84
  return null;
83
85
  });
84
- const renderer = {
86
+ var renderer = {
85
87
  header: Header,
86
88
  renderer: Cell,
87
89
  meta: {
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Columns/Internal/Actions.tsx"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, CellContext as ReactTableCellContext, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport cn from 'clsx';\nimport { useLocalization } from '../../../../../../components/Provider/Localization';\nimport { IconButton } from '../../../../../../components/IconButton/IconButton';\nimport { Menu } from '../../../../../../components/Menu/Menu';\nimport { Shortcut } from '../../../../../../components/Shortcut/Shortcut';\nimport { RowContext } from '../../Row/RowContext';\nimport { useTableManagerInternalColumn } from '../../../../useTableManager/types';\nimport { TableRowActionRenderer } from '../../../../types';\n\nexport type ActionsProps<TType = unknown> = {\n actions: TableRowActionRenderer<TType>[];\n actionsLength: number;\n data: any;\n isActiveRow: boolean;\n rowId: string;\n table: ReactTable<TType>;\n};\nexport function Actions<TType = unknown>(props: ActionsProps<TType>) {\n const { actions, actionsLength, data, isActiveRow, rowId, table } = props;\n const { texts } = useLocalization();\n // we don't want to document passing table, so it isn't on the type\n const visibleActions = (actions as ((row: TType, internalRowId: string, table: ReactTable<TType>) => JSX.Element | null)[])\n .map(action => action(data, rowId, table))\n .filter(action => !!action) as JSX.Element[];\n\n const actionsOnRow = visibleActions.length === actionsLength ? visibleActions : visibleActions.slice(0, actionsLength - 1);\n const actionsInMenu = visibleActions.slice(visibleActions.length === actionsLength ? actionsLength : actionsLength - 1);\n\n const className = cn(\n 'flex justify-end text-right bg-[inherit] shadow-[-6px_0px_6px_var(--table-row-actions-shadow)] print:hidden'\n );\n\n return (\n <span className={className}>\n {actionsOnRow.map((button, index) => {\n const tooltip = String(button.props.tooltip ?? button.props['aria-label'] ?? '');\n\n return React.cloneElement(button, {\n appearance: 'transparent',\n key: index,\n tabIndex: isActiveRow ? 0 : -1,\n tooltip: button.props.shortcut ? (\n <>\n {tooltip}\n <Shortcut className=\"ml-2\" keys={button.props.shortcut} />\n </>\n ) : (\n tooltip\n ),\n });\n })}\n {actionsInMenu.length ? (\n <IconButton\n appearance=\"transparent\"\n aria-label={texts.table.columns.actions.tooltip}\n icon=\"more\"\n tabIndex={isActiveRow ? 0 : -1}\n menu={menuProps => (\n <Menu {...menuProps}>\n <Menu.Content>\n {actionsInMenu.map((action, i) => (\n <Menu.Item key={i} {...action.props} shortcut={action.props.shortcut}>\n {action.props['aria-label']}\n </Menu.Item>\n ))}\n </Menu.Content>\n </Menu>\n )}\n />\n ) : null}\n </span>\n );\n}\n\nfunction Header() {\n return null;\n}\n\nconst Cell = React.memo(function MemoedCell<TType = unknown>(context: ReactTableCellContext<TType, unknown>) {\n const { row, table } = context;\n const { hideRowActions, isHovered, rowIndex } = React.useContext(RowContext);\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n\n const actions = tableMeta.rowActions.rowActions;\n const actionsLength = tableMeta.rowActions.rowActionsLength;\n\n const isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;\n const isResizingColumn = !!table.getState().columnSizingInfo.isResizingColumn;\n const isHoverStatePaused = tableMeta.rowActive.isHoverStatePaused;\n const isRowGrouped = row.getIsGrouped();\n\n if (\n !hideRowActions &&\n !isRowGrouped &&\n actions?.length &&\n (isActiveRow || (isHovered && !isHoverStatePaused && !isResizingColumn))\n ) {\n return (\n <Actions<TType>\n actions={actions}\n actionsLength={actionsLength}\n data={row.original}\n isActiveRow={isActiveRow}\n rowId={row.id}\n table={table}\n />\n );\n }\n\n return null;\n}) as <TType = unknown>(context: ReactTableCellContext<TType, unknown>) => JSX.Element;\n\nexport const renderer: useTableManagerInternalColumn = {\n header: Header,\n renderer: Cell,\n meta: {\n align: 'right',\n className: cn(\n 'print:opacity-0 !px-0 !pr-1 overflow-hidden [table_&]:group-[[data-row-active=\"true\"]]/row:sticky right-0',\n 'group-[[data-row-active=\"true\"][data-selected=\"false\"]]/row:text-grey-200',\n 'group-[[data-row-selected=\"true\"]]/row:text-blue-100',\n 'group-[[data-row-selected=\"false\"]:hover]/row:text-grey-100'\n ),\n // TODO: remove when table3 is migrated, this satisfies the legacy table3 type\n enableSearch: false,\n header: '',\n },\n};\n"],"names":["Actions","props","actions","actionsLength","data","isActiveRow","rowId","table","texts","useLocalization","visibleActions","map","action","filter","actionsOnRow","length","slice","actionsInMenu","className","cn","React","button","index","tooltip","String","_ref","_button$props$tooltip","cloneElement","appearance","key","tabIndex","shortcut","Shortcut","keys","IconButton","columns","icon","menu","menuProps","Menu","Content","i","Item","Header","Cell","memo","MemoedCell","context","row","hideRowActions","isHovered","rowIndex","useContext","RowContext","tableMeta","options","meta","rowActions","rowActionsLength","rowActive","rowActiveIndex","isResizingColumn","getState","columnSizingInfo","isHoverStatePaused","isRowGrouped","getIsGrouped","original","id","renderer","header","align","enableSearch"],"mappings":";;;;;;;;SAmBgBA,OAAOA,CAAkBC,KAA0B;EAC/D,MAAM;IAAEC,OAAO;IAAEC,aAAa;IAAEC,IAAI;IAAEC,WAAW;IAAEC,KAAK;IAAEC;GAAO,GAAGN,KAAK;EACzE,MAAM;IAAEO;GAAO,GAAGC,eAAe,EAAE;;EAEnC,MAAMC,cAAc,GAAIR,OAAmG,CACtHS,GAAG,CAACC,MAAM,IAAIA,MAAM,CAACR,IAAI,EAA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AE;EAEvC,IACI,CAACjB,cAAc,IACf,CAACgB,YAAY,IACb/D,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEa,MAAM,KACdV,WAAW,IAAK6C,SAAS,IAAI,CAACc,kBAAkB,IAAI,CAACH,gBAAiB,CAAC,EAC1E;IACE,oBACIzC,6BAACpB,OAAO;MACJE,OAAO,EAAEA,OAAO;MAChBC,aAAa,EAAEA,aAAa;MAC5BC,IAAI,EAAE4C,GAAG,CAACmB,QAAQ;MAClB9D,WAAW,EAAEA,WAAW;MACxBC,KAAK,EAAE0C,GAAG,CAACoB,EAAE;MACb7D,KAAK,EAAEA;MACT;;EAIV,OAAO,IAAI;AACf,CAAC,CAAqF;MAEzE8D,QAAQ,GAAkC;EACnDC,MAAM,EAAE3B,MAAM;EACd0B,QAAQ,EAAEzB,IAAI;EACdY,IAAI,EAAE;IACFe,KAAK,EAAE,OAAO;IACdrD,SAAS,eAAEC,EAAE,CACT,2GAA2G,EAC3G,2EAA2E,EAC3E,sDAAsD,EACtD,6DAA6D,CAChE;;IAEDqD,YAAY,EAAE,KAAK;IACnBF,MAAM,EAAE;;;;;;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Columns/Internal/Actions.tsx"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, CellContext as ReactTableCellContext, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport cn from 'clsx';\nimport { useLocalization } from '../../../../../../components/Provider/Localization';\nimport { IconButton } from '../../../../../../components/IconButton/IconButton';\nimport { Menu } from '../../../../../../components/Menu/Menu';\nimport { Shortcut } from '../../../../../../components/Shortcut/Shortcut';\nimport { RowContext } from '../../Row/RowContext';\nimport { useTableManagerInternalColumn } from '../../../../useTableManager/types';\nimport { TableRowActionRenderer } from '../../../../types';\n\nexport type ActionsProps<TType = unknown> = {\n actions: TableRowActionRenderer<TType>[];\n actionsLength: number;\n data: any;\n isActiveRow: boolean;\n rowId: string;\n table: ReactTable<TType>;\n};\nexport function Actions<TType = unknown>(props: ActionsProps<TType>) {\n const { actions, actionsLength, data, isActiveRow, rowId, table } = props;\n const { texts } = useLocalization();\n // we don't want to document passing table, so it isn't on the type\n const visibleActions = (actions as ((row: TType, internalRowId: string, table: ReactTable<TType>) => JSX.Element | null)[])\n .map(action => action(data, rowId, table))\n .filter(action => !!action) as JSX.Element[];\n\n const actionsOnRow = visibleActions.length === actionsLength ? visibleActions : visibleActions.slice(0, actionsLength - 1);\n const actionsInMenu = visibleActions.slice(visibleActions.length === actionsLength ? actionsLength : actionsLength - 1);\n\n const className = cn(\n 'flex justify-end text-right bg-[inherit] shadow-[-6px_0px_6px_var(--table-row-actions-shadow)] print:hidden'\n );\n\n return (\n <span className={className}>\n {actionsOnRow.map((button, index) => {\n const tooltip = String(button.props.tooltip ?? button.props['aria-label'] ?? '');\n\n return React.cloneElement(button, {\n appearance: 'transparent',\n key: index,\n tabIndex: isActiveRow ? 0 : -1,\n tooltip: button.props.shortcut ? (\n <>\n {tooltip}\n <Shortcut className=\"ml-2\" keys={button.props.shortcut} />\n </>\n ) : (\n tooltip\n ),\n });\n })}\n {actionsInMenu.length ? (\n <IconButton\n appearance=\"transparent\"\n aria-label={texts.table.columns.actions.tooltip}\n icon=\"more\"\n tabIndex={isActiveRow ? 0 : -1}\n menu={menuProps => (\n <Menu {...menuProps}>\n <Menu.Content>\n {actionsInMenu.map((action, i) => (\n <Menu.Item key={i} {...action.props} shortcut={action.props.shortcut}>\n {action.props['aria-label']}\n </Menu.Item>\n ))}\n </Menu.Content>\n </Menu>\n )}\n />\n ) : null}\n </span>\n );\n}\n\nfunction Header() {\n return null;\n}\n\nconst Cell = React.memo(function MemoedCell<TType = unknown>(context: ReactTableCellContext<TType, unknown>) {\n const { row, table } = context;\n const { hideRowActions, isHovered, rowIndex } = React.useContext(RowContext);\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n\n const actions = tableMeta.rowActions.rowActions;\n const actionsLength = tableMeta.rowActions.rowActionsLength;\n\n const isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;\n const isResizingColumn = !!table.getState().columnSizingInfo.isResizingColumn;\n const isHoverStatePaused = tableMeta.rowActive.isHoverStatePaused;\n const isRowGrouped = row.getIsGrouped();\n\n if (\n !hideRowActions &&\n !isRowGrouped &&\n actions?.length &&\n (isActiveRow || (isHovered && !isHoverStatePaused && !isResizingColumn))\n ) {\n return (\n <Actions<TType>\n actions={actions}\n actionsLength={actionsLength}\n data={row.original}\n isActiveRow={isActiveRow}\n rowId={row.id}\n table={table}\n />\n );\n }\n\n return null;\n}) as <TType = unknown>(context: ReactTableCellContext<TType, unknown>) => JSX.Element;\n\nexport const renderer: useTableManagerInternalColumn = {\n header: Header,\n renderer: Cell,\n meta: {\n align: 'right',\n className: cn(\n 'print:opacity-0 !px-0 !pr-1 overflow-hidden [table_&]:group-[[data-row-active=\"true\"]]/row:sticky right-0',\n 'group-[[data-row-active=\"true\"][data-selected=\"false\"]]/row:text-grey-200',\n 'group-[[data-row-selected=\"true\"]]/row:text-blue-100',\n 'group-[[data-row-selected=\"false\"]:hover]/row:text-grey-100'\n ),\n // TODO: remove when table3 is migrated, this satisfies the legacy table3 type\n enableSearch: false,\n header: '',\n },\n};\n"],"names":["Actions","props","actions","actionsLength","data","isActiveRow","rowId","table","_useLocalization","useLocalization","texts","visibleActions","map","action","filter","actionsOnRow","length","slice","actionsInMenu","className","cn","React","button","index","tooltip","String","_ref","_button$props$tooltip","cloneElement","appearance","key","tabIndex","shortcut","Shortcut","keys","IconButton","columns","icon","menu","menuProps","Menu","Content","i","Item","Header","Cell","memo","MemoedCell","context","row","_React$useContext","useContext","RowContext","hideRowActions","isHovered","rowIndex","tableMeta","options","meta","rowActions","rowActionsLength","rowActive","rowActiveIndex","isResizingColumn","getState","columnSizingInfo","isHoverStatePaused","isRowGrouped","getIsGrouped","original","id","renderer","header","align","enableSearch"],"mappings":";;;;;;;;SAmBgBA,OAAOA,CAAkBC,KAA0B;EAC/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DAAsD,EACtD,6DAA6D,CAChE;;IAEDsD,YAAY,EAAE,KAAK;IACnBF,MAAM,EAAE;;;;;;"}
@@ -8,12 +8,10 @@ function Header() {
8
8
  return null;
9
9
  }
10
10
  function Cell() {
11
- const {
12
- texts
13
- } = useLocalization();
14
- const {
15
- hideInternalColumns
16
- } = React__default.useContext(RowContext);
11
+ var _useLocalization = useLocalization(),
12
+ texts = _useLocalization.texts;
13
+ var _React$useContext = React__default.useContext(RowContext),
14
+ hideInternalColumns = _React$useContext.hideInternalColumns;
17
15
  if (hideInternalColumns) {
18
16
  return null;
19
17
  }
@@ -23,7 +21,7 @@ function Cell() {
23
21
  className: cn("text-grey-darkest invisible -mt-1 ml-[2px] cursor-grab active:cursor-grabbing group-hover/row:visible group-[[aria-grabbed='true']]/row:text-white", '[[data-table-editing-mode]_&]:!invisible')
24
22
  });
25
23
  }
26
- const renderer = {
24
+ var renderer = {
27
25
  header: Header,
28
26
  renderer: Cell,
29
27
  size: 20,
@@ -1 +1 @@
1
- {"version":3,"file":"Drag.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Columns/Internal/Drag.tsx"],"sourcesContent":["import React from 'react';\nimport clsx from 'clsx';\n\nimport { useLocalization } from '../../../../../../components/Provider/Localization';\nimport { useTableManagerInternalColumn } from '../../../../useTableManager/types';\nimport { Icon } from '../../../../../../components/Icon/Icon';\nimport { RowContext } from '../../Row/RowContext';\n\nfunction Header() {\n return null;\n}\n\nfunction Cell() {\n const { texts } = useLocalization();\n const { hideInternalColumns } = React.useContext(RowContext);\n\n if (hideInternalColumns) {\n return null;\n }\n\n return (\n <Icon\n aria-label={texts.table.columns.drag.tooltip}\n name=\"drag\"\n className={clsx(\n \"text-grey-darkest invisible -mt-1 ml-[2px] cursor-grab active:cursor-grabbing group-hover/row:visible group-[[aria-grabbed='true']]/row:text-white\",\n '[[data-table-editing-mode]_&]:!invisible'\n )}\n />\n );\n}\n\nexport const renderer: useTableManagerInternalColumn = {\n header: Header,\n renderer: Cell,\n size: 20,\n meta: {\n align: 'center',\n className: '!px-0 !pb-0 justify-end',\n // TODO: remove when table3 is migrated, this satisfies the legacy table3 type\n enableSearch: false,\n header: '',\n headerClassName: '!p-0',\n },\n};\n"],"names":["Header","Cell","texts","useLocalization","hideInternalColumns","React","useContext","RowContext","Icon","table","columns","drag","tooltip","name","className","clsx","renderer","header","size","meta","align","enableSearch","headerClassName"],"mappings":";;;;;;AAQA,SAASA,MAAMA;EACX,OAAO,IAAI;AACf;AAEA,SAASC,IAAIA;EACT,MAAM;IAAEC;GAAO,GAAGC,eAAe,EAAE;EACnC,MAAM;IAAEC;GAAqB,GAAGC,cAAK,CAACC,UAAU,CAACC,UAAU,CAAC;EAE5D,IAAIH,mBAAmB,EAAE;IACrB,OAAO,IAAI;;EAGf,oBACIC,6BAACG,IAAI;kBACWN,KAAK,CAACO,KAAK,CAACC,OAAO,CAACC,IAAI,CAACC,OAAO;IAC5CC,IAAI,EAAC,MAAM;IACXC,SAAS,EAAEC,EAAI,CACX,oJAAoJ,EACpJ,0CAA0C;IAEhD;AAEV;MAEaC,QAAQ,GAAkC;EACnDC,MAAM,EAAEjB,MAAM;EACdgB,QAAQ,EAAEf,IAAI;EACdiB,IAAI,EAAE,EAAE;EACRC,IAAI,EAAE;IACFC,KAAK,EAAE,QAAQ;IACfN,SAAS,EAAE,yBAAyB;;IAEpCO,YAAY,EAAE,KAAK;IACnBJ,MAAM,EAAE,EAAE;IACVK,eAAe,EAAE;;;;;;"}
1
+ {"version":3,"file":"Drag.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Columns/Internal/Drag.tsx"],"sourcesContent":["import React from 'react';\nimport clsx from 'clsx';\n\nimport { useLocalization } from '../../../../../../components/Provider/Localization';\nimport { useTableManagerInternalColumn } from '../../../../useTableManager/types';\nimport { Icon } from '../../../../../../components/Icon/Icon';\nimport { RowContext } from '../../Row/RowContext';\n\nfunction Header() {\n return null;\n}\n\nfunction Cell() {\n const { texts } = useLocalization();\n const { hideInternalColumns } = React.useContext(RowContext);\n\n if (hideInternalColumns) {\n return null;\n }\n\n return (\n <Icon\n aria-label={texts.table.columns.drag.tooltip}\n name=\"drag\"\n className={clsx(\n \"text-grey-darkest invisible -mt-1 ml-[2px] cursor-grab active:cursor-grabbing group-hover/row:visible group-[[aria-grabbed='true']]/row:text-white\",\n '[[data-table-editing-mode]_&]:!invisible'\n )}\n />\n );\n}\n\nexport const renderer: useTableManagerInternalColumn = {\n header: Header,\n renderer: Cell,\n size: 20,\n meta: {\n align: 'center',\n className: '!px-0 !pb-0 justify-end',\n // TODO: remove when table3 is migrated, this satisfies the legacy table3 type\n enableSearch: false,\n header: '',\n headerClassName: '!p-0',\n },\n};\n"],"names":["Header","Cell","_useLocalization","useLocalization","texts","_React$useContext","React","useContext","RowContext","hideInternalColumns","Icon","table","columns","drag","tooltip","name","className","clsx","renderer","header","size","meta","align","enableSearch","headerClassName"],"mappings":";;;;;;AAQA,SAASA,MAAMA;EACX,OAAO,IAAI;AACf;AAEA,SAASC,IAAIA;EACT,IAAAC,gBAAA,GAAkBC,eAAe,EAAE;IAA3BC,KAAK,GAAAF,gBAAA,CAALE,KAAK;EACb,IAAAC,iBAAA,GAAgCC,cAAK,CAACC,UAAU,CAACC,UAAU,CAAC;IAApDC,mBAAmB,GAAAJ,iBAAA,CAAnBI,mBAAmB;EAE3B,IAAIA,mBAAmB,EAAE;IACrB,OAAO,IAAI;;EAGf,oBACIH,6BAACI,IAAI;kBACWN,KAAK,CAACO,KAAK,CAACC,OAAO,CAACC,IAAI,CAACC,OAAO;IAC5CC,IAAI,EAAC,MAAM;IACXC,SAAS,EAAEC,EAAI,CACX,oJAAoJ,EACpJ,0CAA0C;IAEhD;AAEV;IAEaC,QAAQ,GAAkC;EACnDC,MAAM,EAAEnB,MAAM;EACdkB,QAAQ,EAAEjB,IAAI;EACdmB,IAAI,EAAE,EAAE;EACRC,IAAI,EAAE;IACFC,KAAK,EAAE,QAAQ;IACfN,SAAS,EAAE,yBAAyB;;IAEpCO,YAAY,EAAE,KAAK;IACnBJ,MAAM,EAAE,EAAE;IACVK,eAAe,EAAE;;;;;;"}
@@ -5,22 +5,19 @@ import { useLocalization } from '../../../../../../components/Provider/Localizat
5
5
  import { RowContext } from '../../Row/RowContext.js';
6
6
 
7
7
  function Header(context) {
8
- const {
9
- texts
10
- } = useLocalization();
11
- const {
12
- table
13
- } = context;
14
- const tableMeta = table.options.meta;
8
+ var _useLocalization = useLocalization(),
9
+ texts = _useLocalization.texts;
10
+ var table = context.table;
11
+ var tableMeta = table.options.meta;
15
12
  if (!tableMeta.rowExpansion.canExpandAll) {
16
13
  return null;
17
14
  }
18
- const isSomeRowsExpanded = table.getIsSomeRowsExpanded();
19
- const handleClick = event => {
15
+ var isSomeRowsExpanded = table.getIsSomeRowsExpanded();
16
+ var handleClick = function handleClick(event) {
20
17
  event.stopPropagation();
21
18
  table.toggleAllRowsExpanded(!isSomeRowsExpanded);
22
19
  };
23
- const title = isSomeRowsExpanded ? texts.table.columns.expansion.collapseAll : texts.table.columns.expansion.expandAll;
20
+ var title = isSomeRowsExpanded ? texts.table.columns.expansion.collapseAll : texts.table.columns.expansion.expandAll;
24
21
  return /*#__PURE__*/React__default.createElement(Tooltip, {
25
22
  title: title
26
23
  }, /*#__PURE__*/React__default.createElement(IconButton, {
@@ -33,26 +30,24 @@ function Header(context) {
33
30
  }
34
31
  function Cell(context) {
35
32
  var _tableMeta$rowExpansi, _tableMeta$rowExpansi2;
36
- const {
37
- texts
38
- } = useLocalization();
39
- const {
40
- hideInternalColumns
41
- } = React__default.useContext(RowContext);
42
- const tableMeta = context.table.options.meta;
33
+ var _useLocalization2 = useLocalization(),
34
+ texts = _useLocalization2.texts;
35
+ var _React$useContext = React__default.useContext(RowContext),
36
+ hideInternalColumns = _React$useContext.hideInternalColumns;
37
+ var tableMeta = context.table.options.meta;
43
38
  if (hideInternalColumns) {
44
39
  return null;
45
40
  }
46
- const hasExpandedRow = (_tableMeta$rowExpansi = (_tableMeta$rowExpansi2 = tableMeta.rowExpansion).rowExpansionRenderer) === null || _tableMeta$rowExpansi === void 0 ? void 0 : _tableMeta$rowExpansi.call(_tableMeta$rowExpansi2, context.row.original);
41
+ var hasExpandedRow = (_tableMeta$rowExpansi = (_tableMeta$rowExpansi2 = tableMeta.rowExpansion).rowExpansionRenderer) === null || _tableMeta$rowExpansi === void 0 ? void 0 : _tableMeta$rowExpansi.call(_tableMeta$rowExpansi2, context.row.original);
47
42
  if (hasExpandedRow) {
48
- const isActiveRow = tableMeta.rowActive.rowActiveIndex === context.row.index;
49
- const isExpanded = context.row.getIsExpanded();
50
- const handleClick = event => {
43
+ var isActiveRow = tableMeta.rowActive.rowActiveIndex === context.row.index;
44
+ var isExpanded = context.row.getIsExpanded();
45
+ var handleClick = function handleClick(event) {
51
46
  event.stopPropagation();
52
47
  context.row.toggleExpanded();
53
48
  };
54
- const title = isExpanded ? texts.table.columns.expansion.collapse : texts.table.columns.expansion.expand;
55
- const tabIndex = isActiveRow ? 0 : -1;
49
+ var title = isExpanded ? texts.table.columns.expansion.collapse : texts.table.columns.expansion.expand;
50
+ var tabIndex = isActiveRow ? 0 : -1;
56
51
  return /*#__PURE__*/React__default.createElement(Tooltip, {
57
52
  title: title
58
53
  }, /*#__PURE__*/React__default.createElement(IconButton, {
@@ -65,7 +60,7 @@ function Cell(context) {
65
60
  }
66
61
  return null;
67
62
  }
68
- const renderer = {
63
+ var renderer = {
69
64
  header: Header,
70
65
  renderer: Cell,
71
66
  size: 40,
@@ -1 +1 @@
1
- {"version":3,"file":"Expansion.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Columns/Internal/Expansion.tsx"],"sourcesContent":["import React from 'react';\nimport {\n HeaderContext as ReactTableHeaderContext,\n CellContext as ReactTableCellContext,\n TableMeta as ReactTableMeta,\n} from '@tanstack/react-table';\nimport { useLocalization } from '../../../../../../components/Provider/Localization';\nimport { Tooltip } from '../../../../../../components/Tooltip/Tooltip';\nimport { IconButton } from '../../../../../../components/IconButton/IconButton';\nimport { useTableManagerInternalColumn } from '../../../../useTableManager/types';\nimport { RowContext } from '../../Row/RowContext';\n\nfunction Header<TType = unknown>(context: ReactTableHeaderContext<TType, unknown>) {\n const { texts } = useLocalization();\n const { table } = context;\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n\n if (!tableMeta.rowExpansion.canExpandAll) {\n return null;\n }\n\n const isSomeRowsExpanded = table.getIsSomeRowsExpanded();\n\n const handleClick = event => {\n event.stopPropagation();\n table.toggleAllRowsExpanded(!isSomeRowsExpanded);\n };\n\n const title = isSomeRowsExpanded ? texts.table.columns.expansion.collapseAll : texts.table.columns.expansion.expandAll;\n\n return (\n <Tooltip title={title}>\n <IconButton\n appearance=\"transparent\"\n icon={isSomeRowsExpanded ? 'chevron-down-double' : 'chevron-right-double'}\n onClick={handleClick}\n tabIndex={-1}\n title={title}\n />\n </Tooltip>\n );\n}\n\nfunction Cell<TType = unknown>(context: ReactTableCellContext<TType, unknown>) {\n const { texts } = useLocalization();\n const { hideInternalColumns } = React.useContext(RowContext);\n const tableMeta = context.table.options.meta as ReactTableMeta<TType>;\n\n if (hideInternalColumns) {\n return null;\n }\n\n const hasExpandedRow = tableMeta.rowExpansion.rowExpansionRenderer?.(context.row.original);\n\n if (hasExpandedRow) {\n const isActiveRow = tableMeta.rowActive.rowActiveIndex === context.row.index;\n const isExpanded = context.row.getIsExpanded();\n\n const handleClick = event => {\n event.stopPropagation();\n context.row.toggleExpanded();\n };\n\n const title = isExpanded ? texts.table.columns.expansion.collapse : texts.table.columns.expansion.expand;\n const tabIndex = isActiveRow ? 0 : -1;\n\n return (\n <Tooltip title={title}>\n <IconButton\n appearance=\"discrete\"\n icon={isExpanded ? 'chevron-down' : 'chevron-right'}\n onClick={handleClick}\n tabIndex={tabIndex}\n title={title}\n />\n </Tooltip>\n );\n }\n\n return null;\n}\n\nexport const renderer: useTableManagerInternalColumn = {\n header: Header,\n renderer: Cell,\n size: 40,\n meta: {\n align: 'center',\n // TODO: remove when table3 is migrated, this satisfies the legacy table3 type\n enableSearch: false,\n header: '',\n headerClassName: '!p-0',\n },\n};\n"],"names":["Header","context","texts","useLocalization","table","tableMeta","options","meta","rowExpansion","canExpandAll","isSomeRowsExpanded","getIsSomeRowsExpanded","handleClick","event","stopPropagation","toggleAllRowsExpanded","title","columns","expansion","collapseAll","expandAll","React","Tooltip","IconButton","appearance","icon","onClick","tabIndex","Cell","hideInternalColumns","useContext","RowContext","hasExpandedRow","_tableMeta$rowExpansi","_tableMeta$rowExpansi2","rowExpansionRenderer","call","row","original","isActiveRow","rowActive","rowActiveIndex","index","isExpanded","getIsExpanded","toggleExpanded","collapse","expand","renderer","header","size","align","enableSearch","headerClassName"],"mappings":";;;;;;AAYA,SAASA,MAAMA,CAAkBC,OAAgD;EAC7E,MAAM;IAAEC;GAAO,GAAGC,eAAe,EAAE;EACnC,MAAM;IAAEC;GAAO,GAAGH,OAAO;EACzB,MAAMI,SAAS,GAAGD,KAAK,CAACE,OAAO,CAACC,IAA6B;EAE7D,IAAI,CAACF,SAAS,CAACG,YAAY,CAACC,YAAY,EAAE;IACtC,OAAO,IAAI;;EAGf,MAAMC,kBAAkB,GAAGN,KAAK,CAACO,qBAAqB,EAAE;EAExD,MAAMC,WAAW,GAAGC,KAAK;IACrBA,KAAK,CAACC,eAAe,EAAE;IACvBV,KAAK,CAACW,qBAAqB,CAAC,CAACL,kBAAkB,CAAC;GACnD;EAED,MAAMM,KAAK,GAAGN,kBAAkB,GAAGR,KAAK,CAACE,KAAK,CAACa,OAAO,CAACC,SAAS,CAACC,WAAW,GAAGjB,KAAK,CAACE,KAAK,CAACa,OAAO,CAACC,SAAS,CAACE,SAAS;EAEtH,oBACIC,6BAACC,OAAO;IAACN,KAAK,EAAEA;kBACZK,6BAACE,UAAU;IACPC,UAAU,EAAC,aAAa;IACxBC,IAAI,EAAEf,kBAAkB,GAAG,qBAAqB,GAAG,sBAAsB;IACzEgB,OAAO,EAAEd,WAAW;IACpBe,QAAQ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AAEd,WAAW;MACpBe,QAAQ,EAAEA,QAAQ;MAClBX,KAAK,EAAEA;MACT,CACI;;EAIlB,OAAO,IAAI;AACf;MAEagC,QAAQ,GAAkC;EACnDC,MAAM,EAAEjD,MAAM;EACdgD,QAAQ,EAAEpB,IAAI;EACdsB,IAAI,EAAE,EAAE;EACR3C,IAAI,EAAE;IACF4C,KAAK,EAAE,QAAQ;;IAEfC,YAAY,EAAE,KAAK;IACnBH,MAAM,EAAE,EAAE;IACVI,eAAe,EAAE;;;;;;"}
1
+ {"version":3,"file":"Expansion.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Columns/Internal/Expansion.tsx"],"sourcesContent":["import React from 'react';\nimport {\n HeaderContext as ReactTableHeaderContext,\n CellContext as ReactTableCellContext,\n TableMeta as ReactTableMeta,\n} from '@tanstack/react-table';\nimport { useLocalization } from '../../../../../../components/Provider/Localization';\nimport { Tooltip } from '../../../../../../components/Tooltip/Tooltip';\nimport { IconButton } from '../../../../../../components/IconButton/IconButton';\nimport { useTableManagerInternalColumn } from '../../../../useTableManager/types';\nimport { RowContext } from '../../Row/RowContext';\n\nfunction Header<TType = unknown>(context: ReactTableHeaderContext<TType, unknown>) {\n const { texts } = useLocalization();\n const { table } = context;\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n\n if (!tableMeta.rowExpansion.canExpandAll) {\n return null;\n }\n\n const isSomeRowsExpanded = table.getIsSomeRowsExpanded();\n\n const handleClick = event => {\n event.stopPropagation();\n table.toggleAllRowsExpanded(!isSomeRowsExpanded);\n };\n\n const title = isSomeRowsExpanded ? texts.table.columns.expansion.collapseAll : texts.table.columns.expansion.expandAll;\n\n return (\n <Tooltip title={title}>\n <IconButton\n appearance=\"transparent\"\n icon={isSomeRowsExpanded ? 'chevron-down-double' : 'chevron-right-double'}\n onClick={handleClick}\n tabIndex={-1}\n title={title}\n />\n </Tooltip>\n );\n}\n\nfunction Cell<TType = unknown>(context: ReactTableCellContext<TType, unknown>) {\n const { texts } = useLocalization();\n const { hideInternalColumns } = React.useContext(RowContext);\n const tableMeta = context.table.options.meta as ReactTableMeta<TType>;\n\n if (hideInternalColumns) {\n return null;\n }\n\n const hasExpandedRow = tableMeta.rowExpansion.rowExpansionRenderer?.(context.row.original);\n\n if (hasExpandedRow) {\n const isActiveRow = tableMeta.rowActive.rowActiveIndex === context.row.index;\n const isExpanded = context.row.getIsExpanded();\n\n const handleClick = event => {\n event.stopPropagation();\n context.row.toggleExpanded();\n };\n\n const title = isExpanded ? texts.table.columns.expansion.collapse : texts.table.columns.expansion.expand;\n const tabIndex = isActiveRow ? 0 : -1;\n\n return (\n <Tooltip title={title}>\n <IconButton\n appearance=\"discrete\"\n icon={isExpanded ? 'chevron-down' : 'chevron-right'}\n onClick={handleClick}\n tabIndex={tabIndex}\n title={title}\n />\n </Tooltip>\n );\n }\n\n return null;\n}\n\nexport const renderer: useTableManagerInternalColumn = {\n header: Header,\n renderer: Cell,\n size: 40,\n meta: {\n align: 'center',\n // TODO: remove when table3 is migrated, this satisfies the legacy table3 type\n enableSearch: false,\n header: '',\n headerClassName: '!p-0',\n },\n};\n"],"names":["Header","context","_useLocalization","useLocalization","texts","table","tableMeta","options","meta","rowExpansion","canExpandAll","isSomeRowsExpanded","getIsSomeRowsExpanded","handleClick","event","stopPropagation","toggleAllRowsExpanded","title","columns","expansion","collapseAll","expandAll","React","Tooltip","IconButton","appearance","icon","onClick","tabIndex","Cell","_useLocalization2","_React$useContext","useContext","RowContext","hideInternalColumns","hasExpandedRow","_tableMeta$rowExpansi","_tableMeta$rowExpansi2","rowExpansionRenderer","call","row","original","isActiveRow","rowActive","rowActiveIndex","index","isExpanded","getIsExpanded","toggleExpanded","collapse","expand","renderer","header","size","align","enableSearch","headerClassName"],"mappings":";;;;;;AAYA,SAASA,MAAMA,CAAkBC,OAAgD;EAC7E,IAAAC,gBAAA,GAAkBC,eAAe,EAAE;IAA3BC,KAAK,GAAAF,gBAAA,CAALE,KAAK;EACb,IAAQC,KAAK,GAA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