@servicetitan/anvil2 3.16.1 → 3.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (395) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/dist/{AiMark-BfmK30vL.js → AiMark-Ca7WmL-9.js} +114 -33
  3. package/dist/AiMark-Ca7WmL-9.js.map +1 -0
  4. package/dist/AiMark.js +1 -1
  5. package/dist/{Alert-lLo1N7Tj.js → Alert-BOqBFMUV.js} +3 -3
  6. package/dist/{Alert-lLo1N7Tj.js.map → Alert-BOqBFMUV.js.map} +1 -1
  7. package/dist/Alert.js +1 -1
  8. package/dist/{Announcement-PfnsVVz1.js → Announcement-AN9HnhZ-.js} +2 -2
  9. package/dist/{Announcement-PfnsVVz1.js.map → Announcement-AN9HnhZ-.js.map} +1 -1
  10. package/dist/Announcement.js +1 -1
  11. package/dist/{AnvilProvider-DagOuc9c.js → AnvilProvider-BVTxXzoS.js} +3 -3
  12. package/dist/{AnvilProvider-DagOuc9c.js.map → AnvilProvider-BVTxXzoS.js.map} +1 -1
  13. package/dist/AnvilProvider.js +1 -1
  14. package/dist/{Breadcrumbs-RdL4Fvmu.js → Breadcrumbs-1MCqy-gU.js} +2 -2
  15. package/dist/{Breadcrumbs-RdL4Fvmu.js.map → Breadcrumbs-1MCqy-gU.js.map} +1 -1
  16. package/dist/Breadcrumbs.js +1 -1
  17. package/dist/{Button-Dn6-01xl.js → Button-B_E6ybA-.js} +3 -3
  18. package/dist/{Button-Dn6-01xl.js.map → Button-B_E6ybA-.js.map} +1 -1
  19. package/dist/Button.js +1 -1
  20. package/dist/{ButtonToggle-BSU8GBxr.js → ButtonToggle-D0eXySEM.js} +2 -2
  21. package/dist/{ButtonToggle-BSU8GBxr.js.map → ButtonToggle-D0eXySEM.js.map} +1 -1
  22. package/dist/ButtonToggle.js +1 -1
  23. package/dist/{luxon-wpz4A-OQ.js → Calendar-BcsuV4Xv.js} +1761 -3
  24. package/dist/Calendar-BcsuV4Xv.js.map +1 -0
  25. package/dist/{Calendar-DoLRAWLp.js → Calendar-oBRbQqnG.js} +2 -2
  26. package/dist/{Calendar-DoLRAWLp.js.map → Calendar-oBRbQqnG.js.map} +1 -1
  27. package/dist/Calendar.js +2 -2
  28. package/dist/{Checkbox-U-kuWhgc.js → Checkbox-BCaUzwF_.js} +2 -2
  29. package/dist/{Checkbox-U-kuWhgc.js.map → Checkbox-BCaUzwF_.js.map} +1 -1
  30. package/dist/{Checkbox-CVxbe-iN.js → Checkbox-BocPrjKC.js} +4 -4
  31. package/dist/{Checkbox-CVxbe-iN.js.map → Checkbox-BocPrjKC.js.map} +1 -1
  32. package/dist/Checkbox.js +1 -1
  33. package/dist/{Chip-2OydLs66.js → Chip-BWqgUX71.js} +11 -24
  34. package/dist/Chip-BWqgUX71.js.map +1 -0
  35. package/dist/Chip.js +1 -1
  36. package/dist/Combobox.js +1 -1
  37. package/dist/{DataTable-DIXP9-Bx.js → DataTableEditColumnsDrawer-C7OHRsJU.js} +1373 -289
  38. package/dist/DataTableEditColumnsDrawer-C7OHRsJU.js.map +1 -0
  39. package/dist/{DataTable.css → DataTableEditColumnsDrawer.css} +90 -33
  40. package/dist/{DateFieldRange-X2jdOTYY.js → DateFieldRange-BPcsS6TW.js} +6 -7
  41. package/dist/{DateFieldRange-X2jdOTYY.js.map → DateFieldRange-BPcsS6TW.js.map} +1 -1
  42. package/dist/DateFieldRange.js +1 -1
  43. package/dist/{DateFieldSingle-BJ16tpOz.js → DateFieldSingle-BRMhe0OM.js} +6 -7
  44. package/dist/{DateFieldSingle-BJ16tpOz.js.map → DateFieldSingle-BRMhe0OM.js.map} +1 -1
  45. package/dist/DateFieldSingle.js +1 -1
  46. package/dist/{DateFieldYearless-CMm8vtz_.js → DateFieldYearless-NOgDKzrJ.js} +6 -6
  47. package/dist/{DateFieldYearless-CMm8vtz_.js.map → DateFieldYearless-NOgDKzrJ.js.map} +1 -1
  48. package/dist/DateFieldYearless.js +1 -1
  49. package/dist/{DateFieldYearlessRange-BHHs-Z1Q.js → DateFieldYearlessRange-ChvypgXC.js} +5 -5
  50. package/dist/{DateFieldYearlessRange-BHHs-Z1Q.js.map → DateFieldYearlessRange-ChvypgXC.js.map} +1 -1
  51. package/dist/DateFieldYearlessRange.js +1 -1
  52. package/dist/{DaysOfTheWeek-BHXxs0Bo.js → DaysOfTheWeek-nYitIKnQ.js} +4 -4
  53. package/dist/{DaysOfTheWeek-BHXxs0Bo.js.map → DaysOfTheWeek-nYitIKnQ.js.map} +1 -1
  54. package/dist/DaysOfTheWeek.js +1 -1
  55. package/dist/Details-B2F3auTX.js +216 -0
  56. package/dist/Details-B2F3auTX.js.map +1 -0
  57. package/dist/{Details-BxqP-5vp.js → Details-DQ-_Mg4o.js} +3 -3
  58. package/dist/{Details-BxqP-5vp.js.map → Details-DQ-_Mg4o.js.map} +1 -1
  59. package/dist/Details.css +92 -68
  60. package/dist/Details.js +1 -1
  61. package/dist/Details2.css +137 -0
  62. package/dist/{Dialog-_tHqOsbr.js → Dialog-BgWoV2on.js} +10 -7
  63. package/dist/Dialog-BgWoV2on.js.map +1 -0
  64. package/dist/Dialog.js +1 -1
  65. package/dist/{DialogCancelButton-C0r8hJ8Z.js → DialogCancelButton-CplrFu69.js} +2 -2
  66. package/dist/{DialogCancelButton-C0r8hJ8Z.js.map → DialogCancelButton-CplrFu69.js.map} +1 -1
  67. package/dist/Dnd.js +2 -2
  68. package/dist/{DndHandleButton-BRlodkDO.js → DndHandleButton-BJqj2hc0.js} +6 -4
  69. package/dist/DndHandleButton-BJqj2hc0.js.map +1 -0
  70. package/dist/DndSort.js +2 -2
  71. package/dist/{Drawer-D-ThWNp0.js → Drawer-BVBLtGn_.js} +12 -9
  72. package/dist/Drawer-BVBLtGn_.js.map +1 -0
  73. package/dist/Drawer.js +1 -1
  74. package/dist/DrillDown.css +41 -34
  75. package/dist/DrillDown.js +1 -1
  76. package/dist/DrillDown.module-BFE5BcJB.js +28 -0
  77. package/dist/DrillDown.module-BFE5BcJB.js.map +1 -0
  78. package/dist/{EditCard-B6l2vhBS.js → EditCard-hivZDPZh.js} +3 -3
  79. package/dist/{EditCard-B6l2vhBS.js.map → EditCard-hivZDPZh.js.map} +1 -1
  80. package/dist/EditCard.js +1 -1
  81. package/dist/{FieldLabel-ThEmUiAq.js → FieldLabel-Cn559Brf.js} +8 -58
  82. package/dist/FieldLabel-Cn559Brf.js.map +1 -0
  83. package/dist/FieldLabel.css +1 -12
  84. package/dist/FieldLabel.js +1 -1
  85. package/dist/FieldMessage.js +1 -1
  86. package/dist/{FilterBar-CGsDg6Hy.js → FilterBar-COd38Ent.js} +7 -7
  87. package/dist/{FilterBar-CGsDg6Hy.js.map → FilterBar-COd38Ent.js.map} +1 -1
  88. package/dist/FilterBar.js +1 -1
  89. package/dist/InlineMarkdown-CL1tKR01.js +87 -0
  90. package/dist/InlineMarkdown-CL1tKR01.js.map +1 -0
  91. package/dist/InlineMarkdown.css +12 -0
  92. package/dist/{InputMask-BQigi5oW.js → InputMask-DICWdeiF.js} +3 -3
  93. package/dist/{InputMask-BQigi5oW.js.map → InputMask-DICWdeiF.js.map} +1 -1
  94. package/dist/InputMask.js +1 -1
  95. package/dist/{ListView-YJscfG4x.js → ListView-BeGBn5Vk.js} +87 -108
  96. package/dist/ListView-BeGBn5Vk.js.map +1 -0
  97. package/dist/ListView.js +1 -1
  98. package/dist/{Listbox-CD9ZptSZ.js → Listbox-n1CmJ2gh.js} +2 -2
  99. package/dist/{Listbox-CD9ZptSZ.js.map → Listbox-n1CmJ2gh.js.map} +1 -1
  100. package/dist/Listbox.js +1 -1
  101. package/dist/{Menu-Da2OEN0o.js → Menu-DqP7YQgE.js} +2 -2
  102. package/dist/{Menu-Da2OEN0o.js.map → Menu-DqP7YQgE.js.map} +1 -1
  103. package/dist/Menu.js +1 -1
  104. package/dist/{MenuFooter-D__gg92C.js → MenuFooter-Dzhv0EfD.js} +2 -2
  105. package/dist/{MenuFooter-D__gg92C.js.map → MenuFooter-Dzhv0EfD.js.map} +1 -1
  106. package/dist/MultiSelectField.js +1 -1
  107. package/dist/{MultiSelectFieldSync-Cq5sena6.js → MultiSelectFieldSync-CWsOdu-o.js} +45 -63
  108. package/dist/MultiSelectFieldSync-CWsOdu-o.js.map +1 -0
  109. package/dist/MultiSelectFieldSync.css +107 -69
  110. package/dist/MultiSelectMenu.js +1 -1
  111. package/dist/{MultiSelectMenuSync-BhNXsgAN.js → MultiSelectMenuSync-AVcf8ZUZ.js} +17 -30
  112. package/dist/MultiSelectMenuSync-AVcf8ZUZ.js.map +1 -0
  113. package/dist/{useNumberField-CXFYUZ_n.js → NumberField-DjOvcCa1.js} +251 -5
  114. package/dist/NumberField-DjOvcCa1.js.map +1 -0
  115. package/dist/NumberField.js +1 -1
  116. package/dist/{Page-ZSHNJs7z.js → Page-_dh-JesM.js} +134 -85
  117. package/dist/Page-_dh-JesM.js.map +1 -0
  118. package/dist/Page.css +85 -80
  119. package/dist/Page.js +1 -1
  120. package/dist/{Pagination-Bsl99RRI.js → Pagination-CsSpaTCs.js} +5 -5
  121. package/dist/{Pagination-Bsl99RRI.js.map → Pagination-CsSpaTCs.js.map} +1 -1
  122. package/dist/Pagination.js +1 -1
  123. package/dist/{Popover-CIh1CsoJ.js → Popover-CEKl0WY3.js} +4 -4
  124. package/dist/{Popover-CIh1CsoJ.js.map → Popover-CEKl0WY3.js.map} +1 -1
  125. package/dist/Popover.js +1 -1
  126. package/dist/{ProgressBar-zPKYv4Il.js → ProgressBar-ubCKKewC.js} +3 -3
  127. package/dist/{ProgressBar-zPKYv4Il.js.map → ProgressBar-ubCKKewC.js.map} +1 -1
  128. package/dist/ProgressBar.js +1 -1
  129. package/dist/{Radio-C1VnatcL.js → Radio-DkB6zFsS.js} +2 -2
  130. package/dist/{Radio-C1VnatcL.js.map → Radio-DkB6zFsS.js.map} +1 -1
  131. package/dist/{Radio-BYowelK2.js → Radio-q1Vp_ZQG.js} +4 -4
  132. package/dist/{Radio-BYowelK2.js.map → Radio-q1Vp_ZQG.js.map} +1 -1
  133. package/dist/Radio.js +1 -1
  134. package/dist/{RichTextEditor-DcAVqd2d.js → RichTextEditor-BHt6sWMA.js} +11 -11
  135. package/dist/{RichTextEditor-DcAVqd2d.js.map → RichTextEditor-BHt6sWMA.js.map} +1 -1
  136. package/dist/RichTextEditor.js +1 -1
  137. package/dist/{SavedFiltersButton-BLvi8j1T.js → SavedFiltersButton-Cl58iHZe.js} +10 -10
  138. package/dist/{SavedFiltersButton-BLvi8j1T.js.map → SavedFiltersButton-Cl58iHZe.js.map} +1 -1
  139. package/dist/SavedFiltersButton.js +1 -1
  140. package/dist/{SearchField-ChoNtw8w.js → SearchField-Bk-Ltu4v.js} +2 -2
  141. package/dist/{SearchField-ChoNtw8w.js.map → SearchField-Bk-Ltu4v.js.map} +1 -1
  142. package/dist/{SearchField-DX8hZyo2.js → SearchField-INVftpNM.js} +2 -2
  143. package/dist/{SearchField-DX8hZyo2.js.map → SearchField-INVftpNM.js.map} +1 -1
  144. package/dist/SearchField.js +1 -1
  145. package/dist/{SegmentedControl-BHVJmmTH.js → SegmentedControl-BCqWq65N.js} +3 -3
  146. package/dist/{SegmentedControl-BHVJmmTH.js.map → SegmentedControl-BCqWq65N.js.map} +1 -1
  147. package/dist/SegmentedControl.js +1 -1
  148. package/dist/{SelectCard-DrmMU_GD.js → SelectCard-DeAUW1bL.js} +3 -3
  149. package/dist/{SelectCard-DrmMU_GD.js.map → SelectCard-DeAUW1bL.js.map} +1 -1
  150. package/dist/SelectCard.js +1 -1
  151. package/dist/SelectField.js +1 -1
  152. package/dist/{SelectFieldLabel-BxsKvfqo.js → SelectFieldLabel-DaXwIFZj.js} +2 -2
  153. package/dist/{SelectFieldLabel-BxsKvfqo.js.map → SelectFieldLabel-DaXwIFZj.js.map} +1 -1
  154. package/dist/{SelectFieldSync-CeazN-gI.js → SelectFieldSync-DpZL4wDo.js} +48 -69
  155. package/dist/SelectFieldSync-DpZL4wDo.js.map +1 -0
  156. package/dist/SelectMenu.js +1 -1
  157. package/dist/{SelectMenuSync-CPpE6vUG.js → SelectMenuSync-Klna2oqs.js} +17 -36
  158. package/dist/SelectMenuSync-Klna2oqs.js.map +1 -0
  159. package/dist/{SelectOptions-BDAu_9dv.js → SelectOptions-DGYYFU8i.js} +2 -2
  160. package/dist/{SelectOptions-BDAu_9dv.js.map → SelectOptions-DGYYFU8i.js.map} +1 -1
  161. package/dist/{SelectTrigger-B4OUTO9S.js → SelectTrigger-DKY7rpZn.js} +2 -2
  162. package/dist/{SelectTrigger-B4OUTO9S.js.map → SelectTrigger-DKY7rpZn.js.map} +1 -1
  163. package/dist/SelectTrigger.js +1 -1
  164. package/dist/{SelectTriggerBase-BTWSaiQ-.js → SelectTriggerBase-DUYq_L-6.js} +6 -6
  165. package/dist/{SelectTriggerBase-BTWSaiQ-.js.map → SelectTriggerBase-DUYq_L-6.js.map} +1 -1
  166. package/dist/SelectTriggerBase.css +94 -56
  167. package/dist/SelectTriggerBase.module-C-NmZbg4.js +41 -0
  168. package/dist/SelectTriggerBase.module-C-NmZbg4.js.map +1 -0
  169. package/dist/{Stepper-l_P6VPOv.js → Stepper-D3SHXfX1.js} +3 -3
  170. package/dist/{Stepper-l_P6VPOv.js.map → Stepper-D3SHXfX1.js.map} +1 -1
  171. package/dist/Stepper.js +1 -1
  172. package/dist/{Switch-1iNdXTik.js → Switch-C9yQgF4w.js} +2 -2
  173. package/dist/{Switch-1iNdXTik.js.map → Switch-C9yQgF4w.js.map} +1 -1
  174. package/dist/Switch.js +1 -1
  175. package/dist/{Tab-DR5YYXkq.js → Tab-CXwVQ5-G.js} +11 -7
  176. package/dist/Tab-CXwVQ5-G.js.map +1 -0
  177. package/dist/Tab.js +1 -1
  178. package/dist/Table.js +1 -1
  179. package/dist/{Text-rihxXHSe.js → Text-D4SWT4u-.js} +2 -2
  180. package/dist/{Text-rihxXHSe.js.map → Text-D4SWT4u-.js.map} +1 -1
  181. package/dist/Text.js +1 -1
  182. package/dist/{TextField-vuS7xeo-.js → TextField-CKXSxube.js} +5 -5
  183. package/dist/{TextField-vuS7xeo-.js.map → TextField-CKXSxube.js.map} +1 -1
  184. package/dist/{TextField-Bxd-Qzoi.js → TextField-DmdT2k0w.js} +2 -2
  185. package/dist/{TextField-Bxd-Qzoi.js.map → TextField-DmdT2k0w.js.map} +1 -1
  186. package/dist/TextField.css +38 -23
  187. package/dist/TextField.js +1 -1
  188. package/dist/TextField.module-B3y6caP9.js +25 -0
  189. package/dist/TextField.module-B3y6caP9.js.map +1 -0
  190. package/dist/{Textarea-ppapJUwh.js → Textarea-Dv__veBJ.js} +11 -11
  191. package/dist/{Textarea-ppapJUwh.js.map → Textarea-Dv__veBJ.js.map} +1 -1
  192. package/dist/Textarea.css +26 -11
  193. package/dist/Textarea.js +1 -1
  194. package/dist/{ThemeProvider-DW-Mflv6.js → ThemeProvider-DS2aL89d.js} +2 -2
  195. package/dist/{ThemeProvider-DW-Mflv6.js.map → ThemeProvider-DS2aL89d.js.map} +1 -1
  196. package/dist/ThemeProvider.css +6 -4
  197. package/dist/ThemeProvider.js +1 -1
  198. package/dist/ThemeProvider.module-BkKwAw2f.js +8 -0
  199. package/dist/ThemeProvider.module-BkKwAw2f.js.map +1 -0
  200. package/dist/{TimeField-Hwt_oRbg.js → TimeField-De9qBimk.js} +49 -11
  201. package/dist/TimeField-De9qBimk.js.map +1 -0
  202. package/dist/TimeField.js +1 -1
  203. package/dist/{TimezoneMessage-BrKB_psP.js → TimezoneMessage-DEJX87S3.js} +2 -2
  204. package/dist/{TimezoneMessage-BrKB_psP.js.map → TimezoneMessage-DEJX87S3.js.map} +1 -1
  205. package/dist/Toast.js +2 -2
  206. package/dist/{Toaster-dVGVVcat.js → Toaster-BlwTxTLf.js} +2 -2
  207. package/dist/{Toaster-dVGVVcat.js.map → Toaster-BlwTxTLf.js.map} +1 -1
  208. package/dist/{Toaster-SqkX0Kes.js → Toaster-sO16N9b5.js} +26 -14
  209. package/dist/Toaster-sO16N9b5.js.map +1 -0
  210. package/dist/{Toolbar-DGHZpFi9.js → Toolbar-BhrHuIN7.js} +7 -7
  211. package/dist/{Toolbar-DGHZpFi9.js.map → Toolbar-BhrHuIN7.js.map} +1 -1
  212. package/dist/{Toolbar-CMulzswf.js → Toolbar-Buq2zze0.js} +6 -6
  213. package/dist/{Toolbar-CMulzswf.js.map → Toolbar-Buq2zze0.js.map} +1 -1
  214. package/dist/Toolbar.js +2 -2
  215. package/dist/{ToolbarButtonToggle-T8YnSJ5x.js → ToolbarButtonToggle-CNIaqVWl.js} +3 -3
  216. package/dist/{ToolbarButtonToggle-T8YnSJ5x.js.map → ToolbarButtonToggle-CNIaqVWl.js.map} +1 -1
  217. package/dist/{Tooltip-C_VcYS9P.js → Tooltip-CsTkZqMg.js} +3 -3
  218. package/dist/{Tooltip-C_VcYS9P.js.map → Tooltip-CsTkZqMg.js.map} +1 -1
  219. package/dist/Tooltip.js +1 -1
  220. package/dist/TreeSelectField.js +1 -1
  221. package/dist/{TreeSelectFieldSync-DT6uZ3Ca.js → TreeSelectFieldSync-B7w31kbz.js} +23 -23
  222. package/dist/{TreeSelectFieldSync-DT6uZ3Ca.js.map → TreeSelectFieldSync-B7w31kbz.js.map} +1 -1
  223. package/dist/TreeSelectFieldSync.css +57 -34
  224. package/dist/TreeSelectMenu.js +1 -1
  225. package/dist/{TreeSelectMenuSync-D2TvKxP-.js → TreeSelectMenuSync-EjxlvDZp.js} +5 -5
  226. package/dist/{TreeSelectMenuSync-D2TvKxP-.js.map → TreeSelectMenuSync-EjxlvDZp.js.map} +1 -1
  227. package/dist/{TypeaheadTextField-DgazozK7.js → TypeaheadTextField-DTOkaJda.js} +3 -3
  228. package/dist/{TypeaheadTextField-DgazozK7.js.map → TypeaheadTextField-DTOkaJda.js.map} +1 -1
  229. package/dist/TypeaheadTextField.js +1 -1
  230. package/dist/{YearlessDateInputWithPicker-Bc8a33D5.js → YearlessDateInputWithPicker-DJUQypnF.js} +4 -4
  231. package/dist/{YearlessDateInputWithPicker-Bc8a33D5.js.map → YearlessDateInputWithPicker-DJUQypnF.js.map} +1 -1
  232. package/dist/assets/icons/st/gnav_messages_active.svg +1 -0
  233. package/dist/assets/icons/st/gnav_messages_inactive.svg +1 -0
  234. package/dist/assets/icons/st.ts +2 -0
  235. package/dist/beta.js +19 -18
  236. package/dist/beta.js.map +1 -1
  237. package/dist/{bulkActionTypes-SukoplGV.js → bulkActionTypes-bznuvizE.js} +2 -2
  238. package/dist/{bulkActionTypes-SukoplGV.js.map → bulkActionTypes-bznuvizE.js.map} +1 -1
  239. package/dist/{filter-state-D3-SYfuy.js → filter-state-DxwL15y1.js} +25 -25
  240. package/dist/{filter-state-D3-SYfuy.js.map → filter-state-DxwL15y1.js.map} +1 -1
  241. package/dist/{index-C2dOrf4N.js → index-Bn56UnMm.js} +2 -2
  242. package/dist/{index-C2dOrf4N.js.map → index-Bn56UnMm.js.map} +1 -1
  243. package/dist/{index-Bldaza5t.js → index-CyN5oapA.js} +2 -2
  244. package/dist/{index-Bldaza5t.js.map → index-CyN5oapA.js.map} +1 -1
  245. package/dist/index-DfZCfS0S.js +36 -0
  246. package/dist/index-DfZCfS0S.js.map +1 -0
  247. package/dist/{index.esm-C2ZhC_8d.js → index.esm-CQXMoq5w.js} +2 -2
  248. package/dist/{index.esm-C2ZhC_8d.js.map → index.esm-CQXMoq5w.js.map} +1 -1
  249. package/dist/index.js +171 -127
  250. package/dist/index.js.map +1 -1
  251. package/dist/index2.css +78 -73
  252. package/dist/{portalScopeClassNames-DA28LrXe.js → portalScopeClassNames-CMdDYHE0.js} +2 -2
  253. package/dist/{portalScopeClassNames-DA28LrXe.js.map → portalScopeClassNames-CMdDYHE0.js.map} +1 -1
  254. package/dist/{react-ORV84FjM.js → react-CG1BUt2y.js} +5 -38
  255. package/dist/react-CG1BUt2y.js.map +1 -0
  256. package/dist/src/beta/components/Details/Details.d.ts +25 -0
  257. package/dist/src/beta/components/Details/DetailsSummary.d.ts +121 -0
  258. package/dist/src/beta/components/Details/index.d.ts +4 -0
  259. package/dist/src/beta/components/Details/internal/DetailsArrow.d.ts +11 -0
  260. package/dist/src/beta/components/Details/internal/DetailsSummaryCells.d.ts +5 -0
  261. package/dist/src/beta/components/Page/Page.d.ts +1 -0
  262. package/dist/src/beta/components/Page/PageSidebar.d.ts +12 -0
  263. package/dist/src/beta/components/Table/DataTable/DataTable.d.ts +31 -4
  264. package/dist/src/beta/components/Table/DataTable/DataTableEditColumnsDrawer.d.ts +18 -0
  265. package/dist/src/beta/components/Table/DataTable/index.d.ts +1 -0
  266. package/dist/src/beta/components/Table/DataTable/internal/DataTableAddRow.d.ts +11 -0
  267. package/dist/src/beta/components/Table/DataTable/internal/DataTableBulkActionBar.d.ts +23 -0
  268. package/dist/src/beta/components/Table/DataTable/internal/DataTableFilterToolbar.d.ts +12 -0
  269. package/dist/src/beta/components/Table/DataTable/internal/DataTablePagination.d.ts +3 -3
  270. package/dist/src/beta/components/Table/DataTable/internal/columnEditing/EditColumnsDrawer.d.ts +29 -0
  271. package/dist/src/beta/components/Table/DataTable/internal/columnEditing/columnLayout.d.ts +43 -0
  272. package/dist/src/beta/components/Table/DataTable/internal/columnEditing/toEditColumnsSection.d.ts +7 -0
  273. package/dist/src/beta/components/Table/DataTable/internal/context/tabbables/CellTabbablesQueue.d.ts +23 -0
  274. package/dist/src/beta/components/Table/DataTable/parts.d.ts +17 -0
  275. package/dist/src/beta/components/Table/DataTable/types.d.ts +256 -2
  276. package/dist/src/beta/components/Table/types.d.ts +6 -0
  277. package/dist/src/beta/components/deprecatedReexports/MultiSelectField.d.ts +4 -4
  278. package/dist/src/beta/components/deprecatedReexports/MultiSelectMenu.d.ts +4 -4
  279. package/dist/src/beta/components/deprecatedReexports/SelectField.d.ts +4 -4
  280. package/dist/src/beta/components/deprecatedReexports/SelectMenu.d.ts +4 -4
  281. package/dist/src/beta/components/index.d.ts +1 -0
  282. package/dist/src/components/DrillDown/DrillDownHeader.d.ts +11 -2
  283. package/dist/src/components/DrillDown/index.d.ts +1 -1
  284. package/dist/src/components/DrillDown/internal/DrillDownContext.d.ts +7 -2
  285. package/dist/src/components/DrillDown/internal/useDrillDownContextState.d.ts +6 -3
  286. package/dist/src/components/MultiSelectField/internal/MultiSelectFieldComboboxMode.d.ts +1 -1
  287. package/dist/src/components/MultiSelectField/internal/MultiSelectFieldSelectMode.d.ts +1 -1
  288. package/dist/src/components/MultiSelectField/internal/types.d.ts +0 -1
  289. package/dist/src/components/Page/Page.d.ts +1 -0
  290. package/dist/src/components/Page/PageSidebar.d.ts +12 -0
  291. package/dist/src/components/SelectField/internal/SelectFieldComboboxMode.d.ts +1 -1
  292. package/dist/src/components/SelectField/internal/SelectFieldSelectMode.d.ts +1 -1
  293. package/dist/src/hooks/usePrefersReducedMotion/index.d.ts +2 -0
  294. package/dist/src/hooks/usePrefersReducedMotion/prefersReducedMotion.d.ts +6 -0
  295. package/dist/src/hooks/usePrefersReducedMotion/useReducedMotion.d.ts +5 -0
  296. package/dist/src/internal/components/InlineMarkdown/InlineMarkdown.d.ts +8 -1
  297. package/dist/src/internal/components/InlineMarkdown/index.d.ts +1 -1
  298. package/dist/src/internal/components/Popover/Popover.d.ts +10 -5
  299. package/dist/src/internal/components/Popover/internal/verticalPlacement.d.ts +9 -0
  300. package/dist/src/internal/contexts/DisableConditionalUnmountWarningContext.d.ts +6 -0
  301. package/dist/src/internal/contexts/SuppressPanelSwapWarningContext.d.ts +13 -0
  302. package/dist/src/internal/functions/inlineMarkdown.d.ts +5 -2
  303. package/dist/src/internal/functions/stripInlineMarkdown.d.ts +4 -2
  304. package/dist/src/internal/hooks/index.d.ts +1 -0
  305. package/dist/src/internal/hooks/useSelectFieldLoading/useSelectFieldLoading.d.ts +9 -1
  306. package/dist/src/internal/hooks/useSelectOrchestration.d.ts +0 -1
  307. package/dist/src/internal/hooks/useWarnOnConditionalUnmount/index.d.ts +1 -0
  308. package/dist/src/internal/hooks/useWarnOnConditionalUnmount/useWarnOnConditionalUnmount.d.ts +1 -0
  309. package/dist/src/internal/testing/keepMutationObserversAlive.d.ts +9 -0
  310. package/dist/src/internal/types/selectFieldInternalTypes.d.ts +0 -1
  311. package/dist/src/internal/utils/inlineMarkdownRegex.d.ts +5 -0
  312. package/dist/stripInlineMarkdown-BV12XXzl.js +35 -0
  313. package/dist/stripInlineMarkdown-BV12XXzl.js.map +1 -0
  314. package/dist/{syncFilterUtils-SMop8ckR.js → syncFilterUtils-BNbAB0jz.js} +110 -39
  315. package/dist/syncFilterUtils-BNbAB0jz.js.map +1 -0
  316. package/dist/token/core/component-variables.scss +52 -49
  317. package/dist/token/core/component.d.ts +2 -0
  318. package/dist/token/core/component.js +66 -49
  319. package/dist/token/core/component.scss +42 -40
  320. package/dist/token/core/semantic-variables.scss +2 -0
  321. package/dist/token/core/semantic.d.ts +1 -0
  322. package/dist/token/core/semantic.js +13 -0
  323. package/dist/token/core/semantic.scss +1 -0
  324. package/dist/token.js +82 -49
  325. package/dist/token.js.map +1 -1
  326. package/dist/{treeSync-B38r1dRQ.js → treeSync-BELsX1gY.js} +3 -3
  327. package/dist/{treeSync-B38r1dRQ.js.map → treeSync-BELsX1gY.js.map} +1 -1
  328. package/dist/{use-reduced-motion-yYB9Tb0D.js → use-reduced-motion-CUshwaEW.js} +2 -2
  329. package/dist/{use-reduced-motion-yYB9Tb0D.js.map → use-reduced-motion-CUshwaEW.js.map} +1 -1
  330. package/dist/{useDrillDownContext-D5_NjqY4.js → useDrillDownContext-BLDjyNEt.js} +2 -2
  331. package/dist/{useDrillDownContext-D5_NjqY4.js.map → useDrillDownContext-BLDjyNEt.js.map} +1 -1
  332. package/dist/{useDrilldown-BOeeNUsy.js → useDrilldown-B8pIhfWa.js} +55 -22
  333. package/dist/{useDrilldown-BOeeNUsy.js.map → useDrilldown-B8pIhfWa.js.map} +1 -1
  334. package/dist/{useInfiniteCombobox-ynkeFngn.js → useInfiniteCombobox-ZZalag0-.js} +4 -4
  335. package/dist/{useInfiniteCombobox-ynkeFngn.js.map → useInfiniteCombobox-ZZalag0-.js.map} +1 -1
  336. package/dist/{useInitialFocus-CGybEc6x.js → useInitialFocus-KdirjHEb.js} +51 -16
  337. package/dist/useInitialFocus-KdirjHEb.js.map +1 -0
  338. package/dist/{useInvalidateOnOptionsChange-BD2VBpbK.js → useInvalidateOnOptionsChange-ChrPmbtS.js} +6 -6
  339. package/dist/{useInvalidateOnOptionsChange-BD2VBpbK.js.map → useInvalidateOnOptionsChange-ChrPmbtS.js.map} +1 -1
  340. package/dist/{usePopoverTransitionStates-CDXCdyKa.js → usePopoverTransitionStates-B1opfxxn.js} +1 -2
  341. package/dist/{usePopoverTransitionStates-CDXCdyKa.js.map → usePopoverTransitionStates-B1opfxxn.js.map} +1 -1
  342. package/dist/{usePrefersReducedMotion-DR9B_D6w.js → usePrefersReducedMotion-BLoVFiJL.js} +11 -3
  343. package/dist/usePrefersReducedMotion-BLoVFiJL.js.map +1 -0
  344. package/dist/usePrefersReducedMotion.js +2 -1
  345. package/dist/usePrefersReducedMotion.js.map +1 -1
  346. package/dist/{utils-CM48ODEJ.js → utils-DwLrXpmt.js} +2 -2
  347. package/dist/{utils-CM48ODEJ.js.map → utils-DwLrXpmt.js.map} +1 -1
  348. package/package.json +4 -4
  349. package/dist/AiMark-BfmK30vL.js.map +0 -1
  350. package/dist/Calendar-IzXG1aJw.js +0 -1761
  351. package/dist/Calendar-IzXG1aJw.js.map +0 -1
  352. package/dist/Chip-2OydLs66.js.map +0 -1
  353. package/dist/DataTable-DIXP9-Bx.js.map +0 -1
  354. package/dist/Dialog-_tHqOsbr.js.map +0 -1
  355. package/dist/DndHandleButton-BRlodkDO.js.map +0 -1
  356. package/dist/Drawer-D-ThWNp0.js.map +0 -1
  357. package/dist/DrillDown.module-1VBKDZRA.js +0 -27
  358. package/dist/DrillDown.module-1VBKDZRA.js.map +0 -1
  359. package/dist/FieldLabel-ThEmUiAq.js.map +0 -1
  360. package/dist/Lato.css +0 -24
  361. package/dist/ListView-YJscfG4x.js.map +0 -1
  362. package/dist/MultiSelectFieldSync-Cq5sena6.js.map +0 -1
  363. package/dist/MultiSelectMenuSync-BhNXsgAN.js.map +0 -1
  364. package/dist/NumberField-CxmJx4gs.js +0 -252
  365. package/dist/NumberField-CxmJx4gs.js.map +0 -1
  366. package/dist/Page-ZSHNJs7z.js.map +0 -1
  367. package/dist/SelectFieldSync-CeazN-gI.js.map +0 -1
  368. package/dist/SelectMenuSync-CPpE6vUG.js.map +0 -1
  369. package/dist/SelectTriggerBase.module-Dt4-6YvC.js +0 -40
  370. package/dist/SelectTriggerBase.module-Dt4-6YvC.js.map +0 -1
  371. package/dist/Tab-DR5YYXkq.js.map +0 -1
  372. package/dist/TextField.module-DklyLNKz.js +0 -25
  373. package/dist/TextField.module-DklyLNKz.js.map +0 -1
  374. package/dist/ThemeProvider.module-B9qgsQ8S.js +0 -8
  375. package/dist/ThemeProvider.module-B9qgsQ8S.js.map +0 -1
  376. package/dist/TimeField-Hwt_oRbg.js.map +0 -1
  377. package/dist/Toaster-SqkX0Kes.js.map +0 -1
  378. package/dist/app-css.379821199ec8105f2efd.bundle.css +0 -57579
  379. package/dist/bugfix-71.1orion.css +0 -491
  380. package/dist/design-system.859a127fc3b66175f0f0.bundle.css +0 -34599
  381. package/dist/drag_indicator-BRHAPLSJ.js +0 -6
  382. package/dist/drag_indicator-BRHAPLSJ.js.map +0 -1
  383. package/dist/favicon.ico +0 -0
  384. package/dist/kendo-css.ed976099efbbcc8b0639.bundle.css +0 -20601
  385. package/dist/luxon-wpz4A-OQ.js.map +0 -1
  386. package/dist/main.e26f249642be9a4bd747.bundle.css +0 -50386
  387. package/dist/react-ORV84FjM.js.map +0 -1
  388. package/dist/stripInlineMarkdown-BhYLEiXu.js +0 -25
  389. package/dist/stripInlineMarkdown-BhYLEiXu.js.map +0 -1
  390. package/dist/sui.a9dc22e36a27b7ea1ee8.bundle.css +0 -41149
  391. package/dist/syncFilterUtils-SMop8ckR.js.map +0 -1
  392. package/dist/useInitialFocus-CGybEc6x.js.map +0 -1
  393. package/dist/useNumberField-CXFYUZ_n.js.map +0 -1
  394. package/dist/usePrefersReducedMotion-DR9B_D6w.js.map +0 -1
  395. package/dist/vite.svg +0 -1
@@ -1,42 +1,53 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { C as Chip } from './Chip-2OydLs66.js';
2
+ import { C as Chip } from './Chip-BWqgUX71.js';
3
3
  import { F as Flex } from './Flex-CRF7gj0_.js';
4
4
  import * as React from 'react';
5
5
  import { useId, useRef, useCallback, useMemo, createContext, forwardRef, useState, useEffect, useContext, useLayoutEffect, useImperativeHandle, memo as memo$1, Fragment as Fragment$1, isValidElement } from 'react';
6
- import { T as Tooltip } from './Tooltip-C_VcYS9P.js';
6
+ import { T as Tooltip } from './Tooltip-CsTkZqMg.js';
7
7
  import { c as cx } from './index-De1g9FRV.js';
8
- import { D as DateTime } from './luxon-wpz4A-OQ.js';
8
+ import { D as DateTime } from './Calendar-BcsuV4Xv.js';
9
9
  import { A as ANV_PART_ATTR } from './anvParts-DFVq7-Cm.js';
10
- import { C as Checkbox } from './Checkbox-U-kuWhgc.js';
11
- import { B as Button } from './Button-Dn6-01xl.js';
10
+ import { C as Checkbox } from './Checkbox-BCaUzwF_.js';
11
+ import { B as Button } from './Button-B_E6ybA-.js';
12
12
  import { S as SvgChevronRight } from './chevron_right-BdpsxX7x.js';
13
13
  import { S as SvgEdit } from './edit-DQOiktcu.js';
14
14
  import { I as Icon } from './Icon-B5zwN7GD.js';
15
15
  import { S as SrOnly } from './SrOnly-pnf8ajnh.js';
16
- import { u as useNumberField } from './useNumberField-CXFYUZ_n.js';
16
+ import { u as useNumberField } from './NumberField-DjOvcCa1.js';
17
17
  import { u as useMergeRefs, m as mergeRefs } from './useMergeRefs-Dfmtq9cI.js';
18
- import { a as SelectMenuSync, S as SelectMenu } from './SelectMenuSync-CPpE6vUG.js';
19
- import { a as MultiSelectMenuSync, M as MultiSelectMenu } from './MultiSelectMenuSync-BhNXsgAN.js';
18
+ import { a as SelectMenuSync, S as SelectMenu } from './SelectMenuSync-Klna2oqs.js';
19
+ import { a as MultiSelectMenuSync, M as MultiSelectMenu } from './MultiSelectMenuSync-AVcf8ZUZ.js';
20
20
  import { S as SvgClose } from './close-DZj38AEh.js';
21
- import { S as SvgDragIndicator } from './drag_indicator-BRHAPLSJ.js';
22
- import { u as usePortalScopeStyle, p as portalScopeClassNames } from './portalScopeClassNames-DA28LrXe.js';
21
+ import { S as SvgDragIndicator } from './DndHandleButton-BJqj2hc0.js';
22
+ import { u as usePortalScopeStyle, p as portalScopeClassNames } from './portalScopeClassNames-CMdDYHE0.js';
23
23
  import { a as useOnClickOutside, r as registerLayer, u as unregisterLayer } from './useOnClickOutside-Zw5vzxSq.js';
24
24
  import { u as useBreakpoint } from './useBreakpoint-BBNRlMGZ.js';
25
25
  import { c as computePosition, o as offset, h as autoPlacement, d as shift, g as size, a as autoUpdate, s as safeShowPopover, b as safeHidePopover } from './floating-ui.react-dom-BIKT960u.js';
26
- import { F as FieldLabel } from './FieldLabel-ThEmUiAq.js';
26
+ import { F as FieldLabel } from './FieldLabel-Cn559Brf.js';
27
27
  import { S as StatusIcon } from './StatusIcon-BqorkNJf.js';
28
28
  import { flushSync } from 'react-dom';
29
29
  import { u as useLayoutPropsUtil } from './useLayoutPropsUtil-DjqeAJZ9.js';
30
30
  import { S as SvgKeyboardArrowLeft } from './keyboard_arrow_left-CiE1n99w.js';
31
31
  import { S as SvgKeyboardArrowRight } from './keyboard_arrow_right-DMloHg_F.js';
32
- import { a as PARTS$1, b as Pagination, P as Pagination$1 } from './Pagination-Bsl99RRI.js';
32
+ import { a as PARTS$1, b as Pagination, P as Pagination$1 } from './Pagination-CsSpaTCs.js';
33
33
  import { useTrackingId } from './useTrackingId.js';
34
34
  import { T as ThemeProviderContext } from './ThemeProviderContext-l52GohYT.js';
35
35
  import { u as useVirtualizer } from './index-DXeGMe23.js';
36
+ import { M as Menu } from './Menu-DqP7YQgE.js';
37
+ import { F as FilterBar } from './FilterBar-COd38Ent.js';
38
+ import { T as Toolbar, a as ToolbarButton } from './Toolbar-BhrHuIN7.js';
39
+ import { S as SvgAdd } from './add-BcQkAUip.js';
36
40
  import { u as useOptionallyControlledState } from './useOptionallyControlledState-DbDuos5L.js';
37
41
  import { S as Spinner } from './Spinner-B7tTWcP6.js';
42
+ import { C as Card } from './Card-Bt0F6RTq.js';
43
+ import { D as Dialog } from './Dialog-BgWoV2on.js';
44
+ import { D as Divider } from './Divider-C7fp5Xb6.js';
45
+ import { DndSort } from './DndSort.js';
46
+ import { D as Drawer } from './Drawer-BVBLtGn_.js';
47
+ import { G as Grid } from './Grid-BPCDtqoT.js';
48
+ import { T as Text } from './Text-D4SWT4u-.js';
38
49
 
39
- import './DataTable.css';const SvgResizeWindowAlt = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M4.4 21 21 4.425 19.575 3 3 19.575zm10.025 0L21 14.425 19.575 13 13 19.575z" }));
50
+ import './DataTableEditColumnsDrawer.css';const SvgResizeWindowAlt = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M4.4 21 21 4.425 19.575 3 3 19.575zm10.025 0L21 14.425 19.575 13 13 19.575z" }));
40
51
 
41
52
  const SURFACE_VIEWPORT_PADDING = 8;
42
53
  const SURFACE_MIN_WIDTH = 240;
@@ -232,7 +243,7 @@ const surface = "_surface_9apry_1";
232
243
  const header = "_header_9apry_55";
233
244
  const title = "_title_9apry_83";
234
245
  const content = "_content_9apry_110";
235
- const styles$i = {
246
+ const styles$j = {
236
247
  surface: surface,
237
248
  header: header,
238
249
  "header-bottom-border": "_header-bottom-border_9apry_71",
@@ -822,7 +833,7 @@ const SurfaceContent = forwardRef(
822
833
  popover: "manual",
823
834
  ...dialogProps,
824
835
  tabIndex: -1,
825
- className: cx(className, styles$i["surface"], portalScopeClassNames),
836
+ className: cx(className, styles$j["surface"], portalScopeClassNames),
826
837
  style: portalSurfaceStyle,
827
838
  onKeyDown: handleSurfaceKeyDown,
828
839
  "data-anv": "surface-content",
@@ -832,19 +843,19 @@ const SurfaceContent = forwardRef(
832
843
  /* @__PURE__ */ jsxs(
833
844
  "div",
834
845
  {
835
- className: cx(styles$i["header"], {
836
- [styles$i["header-bottom-border"]]: title
846
+ className: cx(styles$j["header"], {
847
+ [styles$j["header-bottom-border"]]: title
837
848
  }),
838
849
  children: [
839
- /* @__PURE__ */ jsx("div", { className: styles$i["header-copy"], children: title ? /* @__PURE__ */ jsx("div", { id: titleId, className: styles$i["title"], children: title }) : null }),
840
- /* @__PURE__ */ jsxs("div", { className: styles$i["header-actions"], children: [
850
+ /* @__PURE__ */ jsx("div", { className: styles$j["header-copy"], children: title ? /* @__PURE__ */ jsx("div", { id: titleId, className: styles$j["title"], children: title }) : null }),
851
+ /* @__PURE__ */ jsxs("div", { className: styles$j["header-actions"], children: [
841
852
  headerContent,
842
853
  !isDrawerMode ? /* @__PURE__ */ jsx(
843
854
  Button,
844
855
  {
845
856
  appearance: "ghost",
846
857
  "aria-label": "Move surface",
847
- className: styles$i["drag-handle"],
858
+ className: styles$j["drag-handle"],
848
859
  "data-anv": "surface-drag-handle",
849
860
  icon: SvgDragIndicator,
850
861
  onBlur: handleDragKeyboardInteractionBlur,
@@ -863,7 +874,7 @@ const SurfaceContent = forwardRef(
863
874
  {
864
875
  appearance: "ghost",
865
876
  "aria-label": closeButtonLabel,
866
- className: styles$i["close-button"],
877
+ className: styles$j["close-button"],
867
878
  "data-anv": "surface-close-button",
868
879
  icon: SvgClose,
869
880
  onClick: onClose,
@@ -878,8 +889,8 @@ const SurfaceContent = forwardRef(
878
889
  /* @__PURE__ */ jsx(
879
890
  "div",
880
891
  {
881
- className: cx(styles$i["content"], {
882
- [styles$i["content-title-spacing"]]: title
892
+ className: cx(styles$j["content"], {
893
+ [styles$j["content-title-spacing"]]: title
883
894
  }),
884
895
  children
885
896
  }
@@ -888,7 +899,7 @@ const SurfaceContent = forwardRef(
888
899
  "button",
889
900
  {
890
901
  "aria-label": "Resize surface",
891
- className: styles$i["resize-handle"],
902
+ className: styles$j["resize-handle"],
892
903
  "data-anv": "surface-resize-handle",
893
904
  onBlur: handleResizeKeyboardInteractionBlur,
894
905
  onKeyDown: handleResizeKeyDown,
@@ -945,25 +956,25 @@ const booleanFormatter = (value, { trueLabel = "True", falseLabel = "False" } =
945
956
  return value ? trueLabel : falseLabel;
946
957
  };
947
958
 
948
- const styles$h = {
949
- "table-header-cell": "_table-header-cell_185r9_4",
950
- "table-body-cell": "_table-body-cell_185r9_5",
951
- "table-footer-cell": "_table-footer-cell_185r9_6",
952
- "last-pinned-left-column": "_last-pinned-left-column_185r9_30",
953
- "first-pinned-right-column": "_first-pinned-right-column_185r9_30",
954
- "empty-cell": "_empty-cell_185r9_63",
955
- "table-cell-internal-select": "_table-cell-internal-select_185r9_80",
956
- "table-cell-internal-expand": "_table-cell-internal-expand_185r9_84",
957
- "table-header-cell-sortable": "_table-header-cell-sortable_185r9_89",
958
- "table-header-cell-interactive": "_table-header-cell-interactive_185r9_90",
959
- "table-header-cell-group": "_table-header-cell-group_185r9_94"
959
+ const styles$i = {
960
+ "table-header-cell": "_table-header-cell_inf26_4",
961
+ "table-body-cell": "_table-body-cell_inf26_5",
962
+ "table-footer-cell": "_table-footer-cell_inf26_6",
963
+ "last-pinned-left-column": "_last-pinned-left-column_inf26_30",
964
+ "first-pinned-right-column": "_first-pinned-right-column_inf26_30",
965
+ "empty-cell": "_empty-cell_inf26_64",
966
+ "table-cell-internal-select": "_table-cell-internal-select_inf26_81",
967
+ "table-cell-internal-expand": "_table-cell-internal-expand_inf26_85",
968
+ "table-header-cell-sortable": "_table-header-cell-sortable_inf26_90",
969
+ "table-header-cell-interactive": "_table-header-cell-interactive_inf26_91",
970
+ "table-header-cell-group": "_table-header-cell-group_inf26_95"
960
971
  };
961
972
 
962
973
  const TableEmptyCellContent = () => {
963
- return /* @__PURE__ */ jsx("span", { "aria-label": "empty table cell", className: styles$h["empty-cell"], children: "—" });
974
+ return /* @__PURE__ */ jsx("span", { "aria-label": "empty table cell", className: styles$i["empty-cell"], children: "—" });
964
975
  };
965
976
 
966
- const styles$g = {
977
+ const styles$h = {
967
978
  "truncate-chips": "_truncate-chips_16wxd_4",
968
979
  "truncate-chips-measurement": "_truncate-chips-measurement_16wxd_17"
969
980
  };
@@ -1046,7 +1057,7 @@ const TruncateChips = ({
1046
1057
  {
1047
1058
  ref: containerRef,
1048
1059
  "data-anv": "truncate-chips",
1049
- className: cx(styles$g["truncate-chips"], className),
1060
+ className: cx(styles$h["truncate-chips"], className),
1050
1061
  style: { visibility: visibleCount === null ? "hidden" : void 0 },
1051
1062
  ...rest,
1052
1063
  children: [
@@ -1055,7 +1066,7 @@ const TruncateChips = ({
1055
1066
  {
1056
1067
  ref: measurementRef,
1057
1068
  "data-anv": "truncate-chips-measurement",
1058
- className: styles$g["truncate-chips-measurement"],
1069
+ className: styles$h["truncate-chips-measurement"],
1059
1070
  "aria-hidden": true,
1060
1071
  children: [
1061
1072
  items.map((chip, index) => /* @__PURE__ */ jsx(Chip, { ...chip }, index)),
@@ -1375,7 +1386,7 @@ const container = "_container_16fej_23";
1375
1386
  const heading1 = "_heading1_16fej_29";
1376
1387
  const heading2 = "_heading2_16fej_30";
1377
1388
  const heading3 = "_heading3_16fej_31";
1378
- const styles$f = {
1389
+ const styles$g = {
1379
1390
  highlight: highlight,
1380
1391
  code: code,
1381
1392
  list: list,
@@ -1410,11 +1421,11 @@ function parseInline(text) {
1410
1421
  parts.push(/* @__PURE__ */ jsx("em", { children: parseInline(match[3]) }, key));
1411
1422
  } else if (match[4]) {
1412
1423
  parts.push(
1413
- /* @__PURE__ */ jsx("mark", { className: styles$f.highlight, children: parseInline(match[4]) }, key)
1424
+ /* @__PURE__ */ jsx("mark", { className: styles$g.highlight, children: parseInline(match[4]) }, key)
1414
1425
  );
1415
1426
  } else if (match[5]) {
1416
1427
  parts.push(
1417
- /* @__PURE__ */ jsx("code", { className: styles$f.code, children: match[5] }, key)
1428
+ /* @__PURE__ */ jsx("code", { className: styles$g.code, children: match[5] }, key)
1418
1429
  );
1419
1430
  } else if (match[6]) {
1420
1431
  parts.push(/* @__PURE__ */ jsx("s", { children: parseInline(match[6]) }, key));
@@ -1478,11 +1489,11 @@ function renderBlocks(blocks) {
1478
1489
  case "text":
1479
1490
  return /* @__PURE__ */ jsx("span", { children: parseInline(block.content) }, index);
1480
1491
  case "heading":
1481
- return /* @__PURE__ */ jsx("span", { className: styles$f[`heading${block.level}`], children: parseInline(block.content) }, index);
1492
+ return /* @__PURE__ */ jsx("span", { className: styles$g[`heading${block.level}`], children: parseInline(block.content) }, index);
1482
1493
  case "ul":
1483
- return /* @__PURE__ */ jsx("ul", { className: styles$f.list, children: block.items.map((item, i) => /* @__PURE__ */ jsx("li", { children: parseInline(item) }, i)) }, index);
1494
+ return /* @__PURE__ */ jsx("ul", { className: styles$g.list, children: block.items.map((item, i) => /* @__PURE__ */ jsx("li", { children: parseInline(item) }, i)) }, index);
1484
1495
  case "ol":
1485
- return /* @__PURE__ */ jsx("ol", { className: styles$f.list, children: block.items.map((item, i) => /* @__PURE__ */ jsx("li", { children: parseInline(item) }, i)) }, index);
1496
+ return /* @__PURE__ */ jsx("ol", { className: styles$g.list, children: block.items.map((item, i) => /* @__PURE__ */ jsx("li", { children: parseInline(item) }, i)) }, index);
1486
1497
  }
1487
1498
  });
1488
1499
  }
@@ -1494,7 +1505,7 @@ const markdownFormatter = (value) => {
1494
1505
  if (blocks.length === 1 && blocks[0].type === "text") {
1495
1506
  return /* @__PURE__ */ jsx(Fragment, { children: parseInline(blocks[0].content) });
1496
1507
  }
1497
- return /* @__PURE__ */ jsx("div", { className: styles$f.container, children: renderBlocks(blocks) });
1508
+ return /* @__PURE__ */ jsx("div", { className: styles$g.container, children: renderBlocks(blocks) });
1498
1509
  };
1499
1510
 
1500
1511
  const htmlFormatter = (value) => {
@@ -2567,7 +2578,7 @@ const unique = (columnId, leafRows) => {
2567
2578
  const uniqueCount = (columnId, leafRows) => {
2568
2579
  return new Set(leafRows.map(d => d.getValue(columnId))).size;
2569
2580
  };
2570
- const count = (_columnId, leafRows) => {
2581
+ const count$1 = (_columnId, leafRows) => {
2571
2582
  return leafRows.length;
2572
2583
  };
2573
2584
  const aggregationFns = {
@@ -2579,7 +2590,7 @@ const aggregationFns = {
2579
2590
  median,
2580
2591
  unique,
2581
2592
  uniqueCount,
2582
- count
2593
+ count: count$1
2583
2594
  };
2584
2595
 
2585
2596
  //
@@ -4886,7 +4897,24 @@ const PARTS = {
4886
4897
  expandButton: "expand-button",
4887
4898
  expandAllButton: "expand-all-button",
4888
4899
  resizeHandle: "resize-handle",
4889
- editableInput: "editable-input"
4900
+ editableInput: "editable-input",
4901
+ bulkActionBar: "bulk-action-bar",
4902
+ bulkSelectAllButton: "bulk-select-all-button",
4903
+ bulkCancelButton: "bulk-cancel-button",
4904
+ bulkActionsMenuButton: "bulk-actions-menu-button",
4905
+ bulkActionButton: "bulk-action-button",
4906
+ bulkActionMenuItem: "bulk-action-menu-item",
4907
+ rowAddButton: "row-add-button",
4908
+ editColumnsButton: "edit-columns-button",
4909
+ editColumnsDrawer: "edit-columns-drawer",
4910
+ columnsSection: "columns-section",
4911
+ columnCard: "column-card",
4912
+ pinColumnButton: "pin-column-button",
4913
+ hideColumnButton: "hide-column-button",
4914
+ resetColumnsButton: "reset-columns-button",
4915
+ applyButton: "apply-button",
4916
+ cancelButton: "cancel-button",
4917
+ confirmButton: "confirm-button"
4890
4918
  };
4891
4919
 
4892
4920
  const DTFocusStateContext = createContext({
@@ -4944,7 +4972,7 @@ function useDTFocusDispatchContext() {
4944
4972
  };
4945
4973
  }
4946
4974
 
4947
- const styles$e = {
4975
+ const styles$f = {
4948
4976
  "table-base": "_table-base_1tsp8_4",
4949
4977
  "data-table-base": "_data-table-base_1tsp8_21"
4950
4978
  };
@@ -4954,7 +4982,7 @@ const SimpleTableBase = ({
4954
4982
  className,
4955
4983
  ...rest
4956
4984
  }) => {
4957
- const tableBaseClassNames = cx(className, styles$e["table-base"]);
4985
+ const tableBaseClassNames = cx(className, styles$f["table-base"]);
4958
4986
  return /* @__PURE__ */ jsx(
4959
4987
  "table",
4960
4988
  {
@@ -4973,7 +5001,7 @@ const DataTableBase = ({
4973
5001
  hasSubRows,
4974
5002
  ...rest
4975
5003
  }) => {
4976
- const tableBaseClassNames = cx(className, styles$e["data-table-base"]);
5004
+ const tableBaseClassNames = cx(className, styles$f["data-table-base"]);
4977
5005
  const { focusTableGenerally, blur, moveFocusToCell } = useDTFocusDispatchContext();
4978
5006
  const handleBlur = (event) => {
4979
5007
  if (!event.currentTarget.contains(event.relatedTarget)) {
@@ -5027,12 +5055,12 @@ const TableBase = ({ type, ...rest }) => {
5027
5055
  }
5028
5056
  };
5029
5057
 
5030
- const styles$d = {
5058
+ const styles$e = {
5031
5059
  "table-body": "_table-body_z02xk_4"
5032
5060
  };
5033
5061
 
5034
5062
  function TableBody({ type, children, ...rest }) {
5035
- const classes = cx(styles$d["table-body"], rest.className);
5063
+ const classes = cx(styles$e["table-body"], rest.className);
5036
5064
  const Element = type === "simple" ? "tbody" : "div";
5037
5065
  return /* @__PURE__ */ jsx(
5038
5066
  Element,
@@ -5046,24 +5074,46 @@ function TableBody({ type, children, ...rest }) {
5046
5074
  );
5047
5075
  }
5048
5076
 
5077
+ function createCellTabbablesQueue() {
5078
+ const pending = /* @__PURE__ */ new Set();
5079
+ const flush = () => {
5080
+ const sweeps = Array.from(pending);
5081
+ pending.clear();
5082
+ for (const sweep of sweeps) sweep();
5083
+ };
5084
+ return {
5085
+ enqueue(sweep) {
5086
+ if (pending.size === 0) queueMicrotask(flush);
5087
+ pending.add(sweep);
5088
+ },
5089
+ cancel(sweep) {
5090
+ pending.delete(sweep);
5091
+ },
5092
+ flush
5093
+ };
5094
+ }
5095
+ const CellTabbablesQueueContext = createContext(
5096
+ createCellTabbablesQueue()
5097
+ );
5098
+
5049
5099
  const getCommonPinningClasses = (column) => {
5050
5100
  const isPinned = column.getIsPinned();
5051
5101
  if (!isPinned) return void 0;
5052
5102
  return cx({
5053
- [styles$h["first-pinned-left-column"]]: isPinned === "left" && column.getIsFirstColumn("left"),
5054
- [styles$h["last-pinned-left-column"]]: isPinned === "left" && column.getIsLastColumn("left"),
5055
- [styles$h["first-pinned-right-column"]]: isPinned === "right" && column.getIsFirstColumn("right"),
5056
- [styles$h["last-pinned-right-column"]]: isPinned === "right" && column.getIsLastColumn("right")
5103
+ [styles$i["first-pinned-left-column"]]: isPinned === "left" && column.getIsFirstColumn("left"),
5104
+ [styles$i["last-pinned-left-column"]]: isPinned === "left" && column.getIsLastColumn("left"),
5105
+ [styles$i["first-pinned-right-column"]]: isPinned === "right" && column.getIsFirstColumn("right"),
5106
+ [styles$i["last-pinned-right-column"]]: isPinned === "right" && column.getIsLastColumn("right")
5057
5107
  });
5058
5108
  };
5059
5109
 
5060
- const styles$c = {
5110
+ const styles$d = {
5061
5111
  "data-table-body-cell-affordance-container": "_data-table-body-cell-affordance-container_1eir6_1",
5062
5112
  "data-table-body-cell-affordance-host": "_data-table-body-cell-affordance-host_1eir6_6",
5063
5113
  "data-table-body-cell-affordance-container-interactive": "_data-table-body-cell-affordance-container-interactive_1eir6_21"
5064
5114
  };
5065
5115
 
5066
- const dataTableCellAffordanceHostClassName = styles$c["data-table-body-cell-affordance-host"];
5116
+ const dataTableCellAffordanceHostClassName = styles$d["data-table-body-cell-affordance-host"];
5067
5117
 
5068
5118
  function DataTableCellAffordance({
5069
5119
  children,
@@ -5072,8 +5122,8 @@ function DataTableCellAffordance({
5072
5122
  return /* @__PURE__ */ jsx(
5073
5123
  "span",
5074
5124
  {
5075
- className: cx(styles$c["data-table-body-cell-affordance-container"], {
5076
- [styles$c["data-table-body-cell-affordance-container-interactive"]]: interactive
5125
+ className: cx(styles$d["data-table-body-cell-affordance-container"], {
5126
+ [styles$d["data-table-body-cell-affordance-container-interactive"]]: interactive
5077
5127
  }),
5078
5128
  "aria-hidden": true,
5079
5129
  children
@@ -5086,9 +5136,9 @@ const DataTableEditableCellEditIcon = () => {
5086
5136
  };
5087
5137
 
5088
5138
  const TableBodyCell = forwardRef(({ type, children, className, isExpandCell, isSelectCell, ...rest }, ref) => {
5089
- const classes = cx(styles$h["table-body-cell"], className, {
5090
- [styles$h["table-cell-internal-expand"]]: isExpandCell,
5091
- [styles$h["table-cell-internal-select"]]: isSelectCell
5139
+ const classes = cx(styles$i["table-body-cell"], className, {
5140
+ [styles$i["table-cell-internal-expand"]]: isExpandCell,
5141
+ [styles$i["table-cell-internal-select"]]: isSelectCell
5092
5142
  });
5093
5143
  const CellElement = type === "simple" ? "td" : "div";
5094
5144
  return /* @__PURE__ */ jsx(
@@ -5105,10 +5155,10 @@ const TableBodyCell = forwardRef(({ type, children, className, isExpandCell, isS
5105
5155
  });
5106
5156
  TableBodyCell.displayName = "TableBodyCell";
5107
5157
 
5108
- const styles$b = {
5109
- "data-table-body-cell-input": "_data-table-body-cell-input_1t30b_4"};
5158
+ const styles$c = {
5159
+ "data-table-body-cell-input": "_data-table-body-cell-input_101bf_4"};
5110
5160
 
5111
- const styles$a = {
5161
+ const styles$b = {
5112
5162
  "data-table-body-cell": "_data-table-body-cell_1gi7u_4",
5113
5163
  "data-table-body-cell-input": "_data-table-body-cell-input_1gi7u_5",
5114
5164
  "table-body-cell": "_table-body-cell_1gi7u_10",
@@ -5244,28 +5294,47 @@ function DataTableBodyImmutableCell(props) {
5244
5294
  const meta = cell.row.original.meta;
5245
5295
  const cellError = meta?.errors?.[column.id];
5246
5296
  const cellWarning = meta?.warnings?.[column.id];
5247
- const classes = cx(styles$a["data-table-body-cell"], rest.className, {
5248
- [styles$a["data-table-body-cell-error"]]: !!cellError,
5249
- [styles$a["data-table-body-cell-warning"]]: !cellError && !!cellWarning,
5250
- [styles$h["table-cell-internal-expand"]]: isExpandCell,
5251
- [styles$h["table-cell-internal-select"]]: isSelectCell
5297
+ const classes = cx(styles$b["data-table-body-cell"], rest.className, {
5298
+ [styles$b["data-table-body-cell-error"]]: !!cellError,
5299
+ [styles$b["data-table-body-cell-warning"]]: !cellError && !!cellWarning,
5300
+ [styles$i["table-cell-internal-expand"]]: isExpandCell,
5301
+ [styles$i["table-cell-internal-select"]]: isSelectCell
5252
5302
  });
5253
5303
  const commonPinningStyles = useCommonPinningStyles(column);
5254
5304
  const { jumpFocus, moveFocus } = useDTFocusDispatchContext();
5255
5305
  const { isRowClickEnabled, clickRow } = useDataTableRowClick();
5256
5306
  const [isInteractionMode, setIsInteractionMode] = useState(false);
5307
+ const interactionModeRef = useRef(false);
5308
+ const tabbablesQueue = useContext(CellTabbablesQueueContext);
5257
5309
  useLayoutEffect(() => {
5258
- if (!cellRef.current) return;
5259
- const newOnes = getUnmanagedTabbables(cellRef.current);
5260
- newOnes.forEach((el) => {
5261
- el.setAttribute(CELL_MANAGED_ATTR, "");
5262
- if (!isInteractionMode) {
5263
- el.tabIndex = -1;
5264
- }
5310
+ const cellEl = cellRef.current;
5311
+ if (!cellEl) return;
5312
+ const observer = new MutationObserver(() => sweep());
5313
+ const sweep = () => {
5314
+ const inInteractionMode = interactionModeRef.current;
5315
+ getUnmanagedTabbables(cellEl).forEach((el) => {
5316
+ el.setAttribute(CELL_MANAGED_ATTR, "");
5317
+ if (!inInteractionMode) {
5318
+ el.tabIndex = -1;
5319
+ }
5320
+ });
5321
+ observer.takeRecords();
5322
+ };
5323
+ observer.observe(cellEl, {
5324
+ childList: true,
5325
+ subtree: true,
5326
+ attributes: true,
5327
+ attributeFilter: ["disabled", "tabindex", "href", "type"]
5265
5328
  });
5266
- });
5329
+ tabbablesQueue.enqueue(sweep);
5330
+ return () => {
5331
+ tabbablesQueue.cancel(sweep);
5332
+ observer.disconnect();
5333
+ };
5334
+ }, [tabbablesQueue]);
5267
5335
  const exitInteractionMode = useCallback(() => {
5268
5336
  if (!cellRef.current) return;
5337
+ interactionModeRef.current = false;
5269
5338
  getManagedInteractives(cellRef.current).forEach((el) => {
5270
5339
  el.tabIndex = -1;
5271
5340
  });
@@ -5357,6 +5426,7 @@ function DataTableBodyImmutableCell(props) {
5357
5426
  interactives[0].click();
5358
5427
  return;
5359
5428
  }
5429
+ interactionModeRef.current = true;
5360
5430
  interactives.forEach((el) => {
5361
5431
  el.tabIndex = 0;
5362
5432
  });
@@ -5488,10 +5558,10 @@ function DataTableEditableTextCellInner(props, ref) {
5488
5558
  }, [commitValue]);
5489
5559
  const classes = cx(
5490
5560
  dataTableCellAffordanceHostClassName,
5491
- styles$b["data-table-body-cell-editable"],
5561
+ styles$c["data-table-body-cell-editable"],
5492
5562
  cellProps.className,
5493
5563
  {
5494
- [styles$a["data-table-body-cell-editing"]]: isEditing
5564
+ [styles$b["data-table-body-cell-editing"]]: isEditing
5495
5565
  }
5496
5566
  );
5497
5567
  const handleCellKeyDown = useCallback(
@@ -5524,12 +5594,16 @@ function DataTableEditableTextCellInner(props, ref) {
5524
5594
  );
5525
5595
  const handleCellMouseDown = useCallback(
5526
5596
  (e) => {
5597
+ if (isEditing && e.target instanceof Node && inputRef.current?.contains(e.target)) {
5598
+ e.stopPropagation();
5599
+ return;
5600
+ }
5527
5601
  e.preventDefault();
5528
5602
  e.stopPropagation();
5529
5603
  beginEditing();
5530
5604
  moveFocusToCell(cellPosition);
5531
5605
  },
5532
- [beginEditing, cellPosition, moveFocusToCell]
5606
+ [beginEditing, cellPosition, isEditing, moveFocusToCell]
5533
5607
  );
5534
5608
  useEffect(() => {
5535
5609
  if (isEditing) {
@@ -5562,7 +5636,7 @@ function DataTableEditableTextCellInner(props, ref) {
5562
5636
  type: "text",
5563
5637
  name: `${cell.column.id}-row-${cellPosition.rowIndex}`,
5564
5638
  value: draftValue,
5565
- className: styles$b["data-table-body-cell-input"],
5639
+ className: styles$c["data-table-body-cell-input"],
5566
5640
  onChange: handleInputChange,
5567
5641
  onBlur: handleInputBlur,
5568
5642
  onKeyDown: handleInputKeyDown,
@@ -5684,10 +5758,10 @@ function DataTableEditableNumberCellInner(props, ref) {
5684
5758
  commitValue();
5685
5759
  }, [commitValue]);
5686
5760
  const classes = cx(
5687
- styles$b["data-table-body-cell-editable"],
5761
+ styles$c["data-table-body-cell-editable"],
5688
5762
  cellProps.className,
5689
5763
  {
5690
- [styles$a["data-table-body-cell-editing"]]: isEditing
5764
+ [styles$b["data-table-body-cell-editing"]]: isEditing
5691
5765
  }
5692
5766
  );
5693
5767
  const handleCellKeyDown = useCallback(
@@ -5720,12 +5794,16 @@ function DataTableEditableNumberCellInner(props, ref) {
5720
5794
  );
5721
5795
  const handleCellMouseDown = useCallback(
5722
5796
  (e) => {
5797
+ if (isEditing && e.target instanceof Node && localInputRef.current?.contains(e.target)) {
5798
+ e.stopPropagation();
5799
+ return;
5800
+ }
5723
5801
  e.preventDefault();
5724
5802
  e.stopPropagation();
5725
5803
  beginEditing();
5726
5804
  moveFocusToCell(cellPosition);
5727
5805
  },
5728
- [beginEditing, cellPosition, moveFocusToCell]
5806
+ [beginEditing, cellPosition, isEditing, moveFocusToCell]
5729
5807
  );
5730
5808
  useEffect(() => {
5731
5809
  if (isEditing) {
@@ -5759,7 +5837,7 @@ function DataTableEditableNumberCellInner(props, ref) {
5759
5837
  name: `${cell.column.id}-row-${cellPosition.rowIndex}`,
5760
5838
  "aria-label": inputAriaLabel,
5761
5839
  "aria-describedby": instructionsId,
5762
- className: styles$b["data-table-body-cell-input"],
5840
+ className: styles$c["data-table-body-cell-input"],
5763
5841
  onBlur: handleInputBlur,
5764
5842
  onKeyDown: handleInputKeyDown,
5765
5843
  ...{ [ANV_PART_ATTR]: PARTS.editableInput }
@@ -5925,7 +6003,7 @@ function DataTableEditableSelectCellInner(props, ref) {
5925
6003
  ...restCellProps,
5926
6004
  className: cx(
5927
6005
  dataTableCellAffordanceHostClassName,
5928
- styles$b["data-table-body-cell-editable"],
6006
+ styles$c["data-table-body-cell-editable"],
5929
6007
  className
5930
6008
  ),
5931
6009
  onMouseDown: handleCellMouseDown(onClick),
@@ -6074,7 +6152,7 @@ function DataTableEditableSelectAsyncCellInner(props, ref) {
6074
6152
  tabIndex,
6075
6153
  type: "data-table",
6076
6154
  ...restCellProps,
6077
- className: cx(styles$b["data-table-body-cell-editable"], className),
6155
+ className: cx(styles$c["data-table-body-cell-editable"], className),
6078
6156
  onMouseDown: handleCellMouseDown(onClick),
6079
6157
  onBlur: handleCellBlur,
6080
6158
  onFocus: handleCellFocus,
@@ -6186,7 +6264,7 @@ function DataTableEditableMultiselectCellInner(props, ref) {
6186
6264
  tabIndex,
6187
6265
  type: "data-table",
6188
6266
  ...restCellProps,
6189
- className: cx(styles$b["data-table-body-cell-editable"], className),
6267
+ className: cx(styles$c["data-table-body-cell-editable"], className),
6190
6268
  onMouseDown: handleCellMouseDown(onClick),
6191
6269
  onBlur: handleCellBlur,
6192
6270
  onFocus: handleCellFocus,
@@ -6333,7 +6411,7 @@ function DataTableEditableMultiselectAsyncCellInner(props, ref) {
6333
6411
  tabIndex,
6334
6412
  type: "data-table",
6335
6413
  ...restCellProps,
6336
- className: cx(styles$b["data-table-body-cell-editable"], className),
6414
+ className: cx(styles$c["data-table-body-cell-editable"], className),
6337
6415
  onMouseDown: handleCellMouseDown(onClick),
6338
6416
  onBlur: handleCellBlur,
6339
6417
  onFocus: handleCellFocus,
@@ -6471,7 +6549,7 @@ function DataTableEditableBooleanCellInner(props, ref) {
6471
6549
  tabIndex,
6472
6550
  type: "data-table",
6473
6551
  ...restCellProps,
6474
- className: cx(styles$b["data-table-body-cell-editable"], className),
6552
+ className: cx(styles$c["data-table-body-cell-editable"], className),
6475
6553
  onMouseDown: handleCellMouseDown(onClick),
6476
6554
  onBlur: handleCellBlur,
6477
6555
  onFocus: handleCellFocus,
@@ -6948,10 +7026,10 @@ function DataTableEditableCustomCellInner(props, ref) {
6948
7026
  );
6949
7027
  const classes = cx(
6950
7028
  dataTableCellAffordanceHostClassName,
6951
- styles$b["data-table-body-cell-editable"],
7029
+ styles$c["data-table-body-cell-editable"],
6952
7030
  cellProps.className,
6953
7031
  {
6954
- [styles$a["data-table-body-cell-editing"]]: isOpen
7032
+ [styles$b["data-table-body-cell-editing"]]: isOpen
6955
7033
  }
6956
7034
  );
6957
7035
  const handleCellKeyDown = useCallback(
@@ -7079,12 +7157,12 @@ function DataTableBodyMutableCell(props) {
7079
7157
  const cellError = meta?.errors?.[column.id];
7080
7158
  const cellWarning = meta?.warnings?.[column.id];
7081
7159
  const classes = cx(
7082
- styles$a["data-table-body-cell"],
7160
+ styles$b["data-table-body-cell"],
7083
7161
  dataTableCellAffordanceHostClassName,
7084
7162
  rest.className,
7085
7163
  {
7086
- [styles$a["data-table-body-cell-error"]]: !!cellError,
7087
- [styles$a["data-table-body-cell-warning"]]: !cellError && !!cellWarning
7164
+ [styles$b["data-table-body-cell-error"]]: !!cellError,
7165
+ [styles$b["data-table-body-cell-warning"]]: !cellError && !!cellWarning
7088
7166
  }
7089
7167
  );
7090
7168
  const commonPinningStyles = useCommonPinningStyles(column);
@@ -7186,7 +7264,7 @@ function DataTableBodyMutableCell(props) {
7186
7264
 
7187
7265
  const SvgOpenInFull = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M21 8.59V4c0-.55-.45-1-1-1h-4.59c-.89 0-1.34 1.08-.71 1.71l1.59 1.59-10 10-1.59-1.59c-.62-.63-1.7-.19-1.7.7V20c0 .55.45 1 1 1h4.59c.89 0 1.34-1.08.71-1.71L7.71 17.7l10-10 1.59 1.59c.62.63 1.7.19 1.7-.7z" }));
7188
7266
 
7189
- const styles$9 = {
7267
+ const styles$a = {
7190
7268
  "data-table-body-cell-overflow": "_data-table-body-cell-overflow_1xy0x_1",
7191
7269
  "data-table-body-cell-overflow-viewport": "_data-table-body-cell-overflow-viewport_1xy0x_5",
7192
7270
  "data-table-body-cell-overflow-content": "_data-table-body-cell-overflow-content_1xy0x_11",
@@ -7419,21 +7497,21 @@ function DataTableOverflowCell(props) {
7419
7497
  const hasSurfaceTrigger = isClipped || isOpen;
7420
7498
  const hasCellInstructions = isClipped || isOpen;
7421
7499
  const classes = cx(
7422
- styles$a["data-table-body-cell"],
7500
+ styles$b["data-table-body-cell"],
7423
7501
  {
7424
7502
  [dataTableCellAffordanceHostClassName]: isClipped,
7425
- [styles$a["data-table-body-cell-error"]]: !!cellError,
7426
- [styles$a["data-table-body-cell-warning"]]: !cellError && !!cellWarning
7503
+ [styles$b["data-table-body-cell-error"]]: !!cellError,
7504
+ [styles$b["data-table-body-cell-warning"]]: !cellError && !!cellWarning
7427
7505
  },
7428
- styles$9["data-table-body-cell-overflow"],
7506
+ styles$a["data-table-body-cell-overflow"],
7429
7507
  rest.className
7430
7508
  );
7431
7509
  const content = /* @__PURE__ */ jsx(
7432
7510
  "div",
7433
7511
  {
7434
7512
  ref: viewportRef,
7435
- className: styles$9["data-table-body-cell-overflow-viewport"],
7436
- children: /* @__PURE__ */ jsx("div", { className: styles$9["data-table-body-cell-overflow-content"], children })
7513
+ className: styles$a["data-table-body-cell-overflow-viewport"],
7514
+ children: /* @__PURE__ */ jsx("div", { className: styles$a["data-table-body-cell-overflow-content"], children })
7437
7515
  }
7438
7516
  );
7439
7517
  return /* @__PURE__ */ jsxs(Surface, { id: surfaceId, open: isOpen, children: [
@@ -7486,7 +7564,7 @@ function DataTableOverflowCell(props) {
7486
7564
  {
7487
7565
  ref: surfaceContentRef,
7488
7566
  tabIndex: -1,
7489
- className: styles$9["data-table-body-cell-overflow-surface-content"],
7567
+ className: styles$a["data-table-body-cell-overflow-surface-content"],
7490
7568
  children
7491
7569
  }
7492
7570
  )
@@ -7514,7 +7592,7 @@ function DataTableBodyCell(props) {
7514
7592
  );
7515
7593
  }
7516
7594
 
7517
- const styles$8 = {
7595
+ const styles$9 = {
7518
7596
  "data-table-body-row": "_data-table-body-row_1sv3s_4",
7519
7597
  "data-table-body-row-read-only": "_data-table-body-row-read-only_1sv3s_28",
7520
7598
  "data-table-body-sub-component-row": "_data-table-body-sub-component-row_1sv3s_35",
@@ -7660,8 +7738,8 @@ function DataTableBodyRowInner({
7660
7738
  onMouseLeave: handleMouseLeave,
7661
7739
  onClick: isRowClickable ? handleRowClick : void 0,
7662
7740
  ...isRowClickable ? { "data-anv-row-clickable": "true" } : {},
7663
- className: cx(styles$8["data-table-body-row"], {
7664
- [styles$8["data-table-body-row-read-only"]]: isReadOnly
7741
+ className: cx(styles$9["data-table-body-row"], {
7742
+ [styles$9["data-table-body-row-read-only"]]: isReadOnly
7665
7743
  }),
7666
7744
  style: depth > 0 ? { "--a2-row-depth": depth } : void 0,
7667
7745
  children: (() => {
@@ -7676,9 +7754,9 @@ function DataTableBodyRowInner({
7676
7754
  firstDataCellClaimed = true;
7677
7755
  }
7678
7756
  const cellClasses = cx(getCommonPinningClasses(cell.column), {
7679
- [styles$8["data-table-body-cell-group"]]: "columns" in cell.column.columnDef || cell.column.parent && isLastInParentGroup,
7680
- [styles$8["data-table-body-cell-depth-indent"]]: isFirstDataCell,
7681
- [styles$8["data-table-body-cell-action-depth-indent"]]: isExpandColumn
7757
+ [styles$9["data-table-body-cell-group"]]: "columns" in cell.column.columnDef || cell.column.parent && isLastInParentGroup,
7758
+ [styles$9["data-table-body-cell-depth-indent"]]: isFirstDataCell,
7759
+ [styles$9["data-table-body-cell-action-depth-indent"]]: isExpandColumn
7682
7760
  });
7683
7761
  const columnIndex = columnIndexMap.get(cell.column.getIndex()) ?? -1;
7684
7762
  return /* @__PURE__ */ jsx(
@@ -7705,10 +7783,10 @@ function DataTableBodyRowInner({
7705
7783
  "aria-hidden": !isExpanded,
7706
7784
  ...{ [HAS_SUB_COMPONENT_ATTR]: "true" },
7707
7785
  ...isSelectedRow ? { [SELECTED_ATTR]: "true" } : {},
7708
- className: styles$8["data-table-body-sub-component-row"],
7786
+ className: styles$9["data-table-body-sub-component-row"],
7709
7787
  onMouseEnter: handleSubComponentMouseEnter,
7710
7788
  onMouseLeave: handleSubComponentMouseLeave,
7711
- children: /* @__PURE__ */ jsx("div", { className: styles$8["data-table-body-sub-component-container"], children: /* @__PURE__ */ jsx(Flex, { className: styles$8["data-table-body-sub-component-content"], children: original.subComponent }) })
7789
+ children: /* @__PURE__ */ jsx("div", { className: styles$9["data-table-body-sub-component-container"], children: /* @__PURE__ */ jsx(Flex, { className: styles$9["data-table-body-sub-component-content"], children: original.subComponent }) })
7712
7790
  }
7713
7791
  )
7714
7792
  ] }, row.id);
@@ -7813,7 +7891,7 @@ function VirtualizedContent({
7813
7891
  return /* @__PURE__ */ jsx(
7814
7892
  "div",
7815
7893
  {
7816
- className: styles$8["data-table-body-virtualized"],
7894
+ className: styles$9["data-table-body-virtualized"],
7817
7895
  "data-virtualized-body": "true",
7818
7896
  style: { height: `${totalSize}px` },
7819
7897
  children: virtualItems.map((virtualRow) => {
@@ -7824,7 +7902,7 @@ function VirtualizedContent({
7824
7902
  {
7825
7903
  ref: measureRef,
7826
7904
  "data-index": virtualRow.index,
7827
- className: styles$8["data-table-body-row-virtualized"],
7905
+ className: styles$9["data-table-body-row-virtualized"],
7828
7906
  style: { transform: `translateY(${virtualRow.start}px)` },
7829
7907
  children: /* @__PURE__ */ jsx(
7830
7908
  DataTableBodyRow,
@@ -7861,7 +7939,11 @@ function DataTableBody(props) {
7861
7939
  readOnlyRowMap,
7862
7940
  ...rest
7863
7941
  } = props;
7864
- return /* @__PURE__ */ jsx(TableBody, { type: "data-table", ...rest, children: virtualizer ? /* @__PURE__ */ jsx(
7942
+ const [tabbablesQueue] = useState(createCellTabbablesQueue);
7943
+ useLayoutEffect(() => {
7944
+ tabbablesQueue.flush();
7945
+ });
7946
+ return /* @__PURE__ */ jsx(CellTabbablesQueueContext.Provider, { value: tabbablesQueue, children: /* @__PURE__ */ jsx(TableBody, { type: "data-table", ...rest, children: virtualizer ? /* @__PURE__ */ jsx(
7865
7947
  VirtualizedContent,
7866
7948
  {
7867
7949
  table,
@@ -7878,14 +7960,14 @@ function DataTableBody(props) {
7878
7960
  getRowVersion,
7879
7961
  readOnlyRowMap
7880
7962
  }
7881
- ) });
7963
+ ) }) });
7882
7964
  }
7883
7965
 
7884
- const styles$7 = {
7966
+ const styles$8 = {
7885
7967
  "table-footer": "_table-footer_1olw1_4"};
7886
7968
 
7887
7969
  function TableFooter({ type, children, ...rest }) {
7888
- const classes = cx(styles$7["table-footer"], rest.className);
7970
+ const classes = cx(styles$8["table-footer"], rest.className);
7889
7971
  const Element = type === "simple" ? "tfoot" : "div";
7890
7972
  return /* @__PURE__ */ jsx(
7891
7973
  Element,
@@ -7900,7 +7982,7 @@ function TableFooter({ type, children, ...rest }) {
7900
7982
 
7901
7983
  const TableFooterCell = forwardRef((props, ref) => {
7902
7984
  const { type, children, className, ...rest } = props;
7903
- const classes = cx(styles$h["table-footer-cell"], className);
7985
+ const classes = cx(styles$i["table-footer-cell"], className);
7904
7986
  const CellElement = type === "simple" ? "td" : "div";
7905
7987
  return /* @__PURE__ */ jsx(
7906
7988
  CellElement,
@@ -7961,14 +8043,14 @@ function DataTableFooterCell(props) {
7961
8043
  ref: footerCellRef,
7962
8044
  tabIndex: -1,
7963
8045
  onKeyDown: handleKeyDown,
7964
- className: cx(styles$a["data-table-footer-cell"], className),
8046
+ className: cx(styles$b["data-table-footer-cell"], className),
7965
8047
  "data-cell-pos": formatCellPositionString(cellPosition),
7966
8048
  children
7967
8049
  }
7968
8050
  );
7969
8051
  }
7970
8052
 
7971
- const styles$6 = {
8053
+ const styles$7 = {
7972
8054
  "data-table-footer": "_data-table-footer_e7sq6_4",
7973
8055
  "data-table-footer-row": "_data-table-footer-row_e7sq6_8"
7974
8056
  };
@@ -8019,7 +8101,7 @@ function DefaultTableFooterRows({
8019
8101
  {
8020
8102
  role: "row",
8021
8103
  "data-anv": "table-footer-row",
8022
- className: styles$6["data-table-footer-row"],
8104
+ className: styles$7["data-table-footer-row"],
8023
8105
  "aria-rowindex": rowIndex + 1,
8024
8106
  children: table.getFlatHeaders().filter((header) => {
8025
8107
  const column = findColumnById(columns, header.column.id);
@@ -8061,7 +8143,7 @@ function CustomTableFooterRows({
8061
8143
  {
8062
8144
  role: "row",
8063
8145
  "data-anv": "table-footer-row",
8064
- className: styles$6["data-table-footer-row"],
8146
+ className: styles$7["data-table-footer-row"],
8065
8147
  "aria-rowindex": rowIndex + 1,
8066
8148
  children: (() => {
8067
8149
  let columnIndex = 0;
@@ -8099,7 +8181,7 @@ function DataTableFooter({
8099
8181
  ...rest
8100
8182
  }) {
8101
8183
  const columnCount = table.getFlatHeaders().length;
8102
- const classes = cx(styles$6["data-table-footer"], rest.className);
8184
+ const classes = cx(styles$7["data-table-footer"], rest.className);
8103
8185
  return /* @__PURE__ */ jsx(TableFooter, { type: "data-table", ...rest, className: classes, children: customFooter ? /* @__PURE__ */ jsx(
8104
8186
  CustomTableFooterRows,
8105
8187
  {
@@ -8152,14 +8234,14 @@ function CellStatus({ status, variant }) {
8152
8234
  {
8153
8235
  variant,
8154
8236
  size: "small",
8155
- className: styles$a[config.className],
8237
+ className: styles$b[config.className],
8156
8238
  rootProps: {
8157
8239
  "aria-label": message ? `${config.label}: ${message}` : `${config.label}.`
8158
8240
  }
8159
8241
  }
8160
8242
  );
8161
8243
  if (!message) {
8162
- return /* @__PURE__ */ jsx("span", { ref, className: styles$a["cell-status"], children: icon });
8244
+ return /* @__PURE__ */ jsx("span", { ref, className: styles$b["cell-status"], children: icon });
8163
8245
  }
8164
8246
  const isTooltipOpen = isCellFocused || isHovered;
8165
8247
  return /* @__PURE__ */ jsxs(Tooltip, { open: isTooltipOpen, children: [
@@ -8167,7 +8249,7 @@ function CellStatus({ status, variant }) {
8167
8249
  Tooltip.Trigger,
8168
8250
  {
8169
8251
  ref,
8170
- className: styles$a["cell-status"],
8252
+ className: styles$b["cell-status"],
8171
8253
  onMouseEnter: () => setIsHovered(true),
8172
8254
  onMouseLeave: () => setIsHovered(false),
8173
8255
  children: icon
@@ -8362,8 +8444,8 @@ function getTanStackColumnDef({
8362
8444
  return /* @__PURE__ */ jsxs(
8363
8445
  "div",
8364
8446
  {
8365
- className: cx(styles$a["data-table-cell-content"], {
8366
- [styles$a["data-table-cell-overflow-content"]]: leafColumnDef.overflow
8447
+ className: cx(styles$b["data-table-cell-content"], {
8448
+ [styles$b["data-table-cell-overflow-content"]]: leafColumnDef.overflow
8367
8449
  }),
8368
8450
  "data-align": resolvedAlign ?? "start",
8369
8451
  children: [
@@ -8443,12 +8525,12 @@ const SvgArrowUpward = (props) => /* @__PURE__ */ React.createElement("svg", { x
8443
8525
 
8444
8526
  const SvgArrowDownward = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M11 5v11.17l-4.88-4.88c-.39-.39-1.03-.39-1.42 0a.996.996 0 0 0 0 1.41l6.59 6.59c.39.39 1.02.39 1.41 0l6.59-6.59a.996.996 0 1 0-1.41-1.41L13 16.17V5c0-.55-.45-1-1-1s-1 .45-1 1z" }));
8445
8527
 
8446
- const styles$5 = {
8528
+ const styles$6 = {
8447
8529
  "table-header": "_table-header_1sk5h_4"
8448
8530
  };
8449
8531
 
8450
8532
  function TableHeader({ type, children, ...rest }) {
8451
- const classes = cx(styles$5["table-header"], rest.className);
8533
+ const classes = cx(styles$6["table-header"], rest.className);
8452
8534
  const Element = type === "simple" ? "thead" : "div";
8453
8535
  return /* @__PURE__ */ jsx(
8454
8536
  Element,
@@ -8473,12 +8555,12 @@ const TableHeaderCell = forwardRef(
8473
8555
  isExpandCell,
8474
8556
  ...rest
8475
8557
  }, ref) => {
8476
- const classes = cx(styles$h["table-header-cell"], className, {
8477
- [styles$h["table-header-cell-group"]]: isGroup,
8478
- [styles$h["table-header-cell-sortable"]]: isSortable,
8479
- [styles$h["table-header-cell-interactive"]]: isInteractiveHeaderCell,
8480
- [styles$h["table-cell-internal-expand"]]: isExpandCell,
8481
- [styles$h["table-cell-internal-select"]]: isSelectCell
8558
+ const classes = cx(styles$i["table-header-cell"], className, {
8559
+ [styles$i["table-header-cell-group"]]: isGroup,
8560
+ [styles$i["table-header-cell-sortable"]]: isSortable,
8561
+ [styles$i["table-header-cell-interactive"]]: isInteractiveHeaderCell,
8562
+ [styles$i["table-cell-internal-expand"]]: isExpandCell,
8563
+ [styles$i["table-cell-internal-select"]]: isSelectCell
8482
8564
  });
8483
8565
  const CellElement = type === "simple" ? "th" : "div";
8484
8566
  return /* @__PURE__ */ jsx(
@@ -8634,7 +8716,7 @@ function DataTableHeaderCellInner(props, forwardedRef) {
8634
8716
  onPointerDownCapture: handlePointerDownCapture,
8635
8717
  onClick: handleClick,
8636
8718
  onKeyDown: handleKeyDown,
8637
- className: cx(styles$a["data-table-header-cell"], className),
8719
+ className: cx(styles$b["data-table-header-cell"], className),
8638
8720
  "data-cell-pos": formatCellPositionString(cellPosition),
8639
8721
  ...isSortingCell ? { [ANV_PART_ATTR]: PARTS.sortToggle } : {},
8640
8722
  "aria-sort": header.column.getIsSorted() === "asc" ? "ascending" : header.column.getIsSorted() === "desc" ? "descending" : void 0,
@@ -8652,7 +8734,7 @@ function DataTableHeaderCellInner(props, forwardedRef) {
8652
8734
  const DataTableHeaderCell = forwardRef(DataTableHeaderCellInner);
8653
8735
 
8654
8736
  const resizing = "_resizing_18cik_35";
8655
- const styles$4 = {
8737
+ const styles$5 = {
8656
8738
  "resize-handle": "_resize-handle_18cik_4",
8657
8739
  resizing: resizing
8658
8740
  };
@@ -8664,8 +8746,8 @@ function ResizeHandle({
8664
8746
  className,
8665
8747
  ...rest
8666
8748
  }) {
8667
- const classes = cx(styles$4["resize-handle"], className, {
8668
- [styles$4["resizing"]]: header.column.getIsResizing()
8749
+ const classes = cx(styles$5["resize-handle"], className, {
8750
+ [styles$5["resizing"]]: header.column.getIsResizing()
8669
8751
  });
8670
8752
  const handleResizeStart = (e) => {
8671
8753
  onResizeStart?.();
@@ -8690,7 +8772,7 @@ function ResizeHandle({
8690
8772
  );
8691
8773
  }
8692
8774
 
8693
- const styles$3 = {
8775
+ const styles$4 = {
8694
8776
  "data-table-header-row": "_data-table-header-row_1n8uq_4"
8695
8777
  };
8696
8778
 
@@ -8754,7 +8836,7 @@ function DataTableHeader({
8754
8836
  return /* @__PURE__ */ jsx(TableHeader, { type: "data-table", children: table.getHeaderGroups().map((headerGroup, index) => /* @__PURE__ */ jsx(
8755
8837
  "div",
8756
8838
  {
8757
- className: styles$3["data-table-header-row"],
8839
+ className: styles$4["data-table-header-row"],
8758
8840
  role: "row",
8759
8841
  "aria-rowindex": index + 1,
8760
8842
  children: headerGroup.headers.map((header) => {
@@ -8864,7 +8946,7 @@ function DataTableHeader({
8864
8946
  )) });
8865
8947
  }
8866
8948
 
8867
- const styles$2 = {
8949
+ const styles$3 = {
8868
8950
  "table-container": "_table-container_pfo9z_4",
8869
8951
  "table-scroll-container": "_table-scroll-container_pfo9z_55"
8870
8952
  };
@@ -8873,7 +8955,7 @@ const TableContainer = forwardRef(
8873
8955
  (props, ref) => {
8874
8956
  const { layoutStyles, componentProps } = useLayoutPropsUtil(props);
8875
8957
  const { children, className, style, ...rest } = componentProps;
8876
- const tableContainerClassNames = cx(className, styles$2["table-container"]);
8958
+ const tableContainerClassNames = cx(className, styles$3["table-container"]);
8877
8959
  const styleCombined = {
8878
8960
  ...style,
8879
8961
  ...layoutStyles
@@ -8889,7 +8971,7 @@ const TableContainer = forwardRef(
8889
8971
  children: /* @__PURE__ */ jsx(
8890
8972
  "div",
8891
8973
  {
8892
- className: styles$2["table-scroll-container"],
8974
+ className: styles$3["table-scroll-container"],
8893
8975
  "data-anv": "table-scroll-container",
8894
8976
  children
8895
8977
  }
@@ -8901,7 +8983,7 @@ const TableContainer = forwardRef(
8901
8983
  TableContainer.displayName = "TableContainer";
8902
8984
 
8903
8985
  const pagination = "_pagination_rmbrh_4";
8904
- const styles$1 = {
8986
+ const styles$2 = {
8905
8987
  "cursor-pagination-list": "_cursor-pagination-list_rmbrh_30",
8906
8988
  "cursor-pagination-item": "_cursor-pagination-item_rmbrh_47",
8907
8989
  pagination: pagination
@@ -8914,7 +8996,7 @@ const DataTablePagination = ({
8914
8996
  return /* @__PURE__ */ jsx(
8915
8997
  Pagination$1,
8916
8998
  {
8917
- className: styles$1["pagination"],
8999
+ className: styles$2["pagination"],
8918
9000
  ...props,
8919
9001
  showCount
8920
9002
  }
@@ -8924,6 +9006,7 @@ const DataTableCursorPagination = ({
8924
9006
  page,
8925
9007
  itemsPerPage,
8926
9008
  itemsPerPageOptions,
9009
+ itemsPerPageLabel,
8927
9010
  hasNextPage,
8928
9011
  hasPrevPage,
8929
9012
  onPageChange,
@@ -8942,12 +9025,12 @@ const DataTableCursorPagination = ({
8942
9025
  return /* @__PURE__ */ jsxs(
8943
9026
  "nav",
8944
9027
  {
8945
- className: styles$1["pagination"],
9028
+ className: styles$2["pagination"],
8946
9029
  "aria-label": "Pagination navigation",
8947
9030
  "data-tracking-id": trackingId,
8948
9031
  children: [
8949
- /* @__PURE__ */ jsxs("ul", { className: styles$1["cursor-pagination-list"], children: [
8950
- /* @__PURE__ */ jsx("li", { className: styles$1["cursor-pagination-item"], children: /* @__PURE__ */ jsx(
9032
+ /* @__PURE__ */ jsxs("ul", { className: styles$2["cursor-pagination-list"], children: [
9033
+ /* @__PURE__ */ jsx("li", { className: styles$2["cursor-pagination-item"], children: /* @__PURE__ */ jsx(
8951
9034
  Button,
8952
9035
  {
8953
9036
  appearance: "ghost",
@@ -8963,7 +9046,7 @@ const DataTableCursorPagination = ({
8963
9046
  ...{ [ANV_PART_ATTR]: PARTS$1.prevPageButton }
8964
9047
  }
8965
9048
  ) }),
8966
- /* @__PURE__ */ jsx("li", { className: styles$1["cursor-pagination-item"], children: /* @__PURE__ */ jsx(
9049
+ /* @__PURE__ */ jsx("li", { className: styles$2["cursor-pagination-item"], children: /* @__PURE__ */ jsx(
8967
9050
  Button,
8968
9051
  {
8969
9052
  appearance: "ghost",
@@ -8985,6 +9068,7 @@ const DataTableCursorPagination = ({
8985
9068
  {
8986
9069
  itemsPerPage,
8987
9070
  itemsPerPageOptions,
9071
+ itemsPerPageLabel,
8988
9072
  onItemsPerPageChange: (itemsPerPage2) => {
8989
9073
  onItemsPerPageChange?.(itemsPerPage2);
8990
9074
  }
@@ -9006,7 +9090,7 @@ const DataTableCursorPagination = ({
9006
9090
  };
9007
9091
 
9008
9092
  const expanded = "_expanded_1elu6_34";
9009
- const styles = {
9093
+ const styles$1 = {
9010
9094
  "data-table-container": "_data-table-container_1elu6_4",
9011
9095
  "container-with-pagination": "_container-with-pagination_1elu6_11",
9012
9096
  "footer-with-pagination": "_footer-with-pagination_1elu6_15",
@@ -9470,6 +9554,822 @@ function useDataTableVirtualizer({
9470
9554
  );
9471
9555
  }
9472
9556
 
9557
+ const selection = "_selection_1enoc_26";
9558
+ const actions = "_actions_1enoc_27";
9559
+ const count = "_count_1enoc_42";
9560
+ const styles = {
9561
+ "bulk-action-bar": "_bulk-action-bar_1enoc_4",
9562
+ selection: selection,
9563
+ actions: actions,
9564
+ count: count
9565
+ };
9566
+
9567
+ const isThenable = (value) => typeof value === "object" && value !== null && typeof value.then === "function";
9568
+ const formatCount = (count) => count.toLocaleString();
9569
+ const getSelectionKey = (selection) => selection.mode === "all" ? `all:${selection.selectedRowCount}` : `rows:${[...selection.rowIds].map(String).sort().join(",")}`;
9570
+ function DataTableBulkActionBar({
9571
+ actions,
9572
+ selectedCount,
9573
+ selectAllCount,
9574
+ hasUnselectableRows,
9575
+ onSelectAll,
9576
+ onCancel,
9577
+ getSelection,
9578
+ onActionComplete,
9579
+ tableRef
9580
+ }) {
9581
+ const { moveFocusToCell } = useDTFocusDispatchContext();
9582
+ const [pendingKey, setPendingKey] = useState(null);
9583
+ const isPending = pendingKey !== null;
9584
+ const getSelectionRef = useRef(getSelection);
9585
+ getSelectionRef.current = getSelection;
9586
+ const selectionRunRef = useRef(0);
9587
+ const isVisible = selectedCount > 0;
9588
+ useEffect(() => {
9589
+ if (!isVisible) {
9590
+ selectionRunRef.current += 1;
9591
+ setPendingKey(null);
9592
+ }
9593
+ }, [isVisible]);
9594
+ const focusSelectAllCell = () => {
9595
+ const checkboxCell = tableRef.current?.querySelector(`[${ANV_PART_ATTR}="${PARTS.selectAllCheckbox}"]`)?.closest("[data-cell-pos]");
9596
+ const [rowIndex = 0, columnIndex = 0] = (checkboxCell?.dataset.cellPos ?? "0,0").split(",").map(Number);
9597
+ moveFocusToCell({ rowIndex, columnIndex });
9598
+ const target = checkboxCell ?? tableRef.current?.querySelector(
9599
+ `[data-cell-pos="${rowIndex},${columnIndex}"]`
9600
+ );
9601
+ if (target && !target.contains(document.activeElement)) {
9602
+ target.focus();
9603
+ }
9604
+ };
9605
+ const completeAction = () => {
9606
+ onActionComplete();
9607
+ requestAnimationFrame(() => {
9608
+ const active = document.activeElement;
9609
+ if (!active || active === document.body) focusSelectAllCell();
9610
+ });
9611
+ };
9612
+ const runAction = (key, action) => {
9613
+ const selection = getSelection();
9614
+ const run = selectionRunRef.current;
9615
+ const result = action.onClick(selection);
9616
+ if (!isThenable(result)) {
9617
+ if (result !== false) completeAction();
9618
+ return;
9619
+ }
9620
+ setPendingKey(key);
9621
+ Promise.resolve(result).then(
9622
+ (resolved) => {
9623
+ if (run !== selectionRunRef.current) return;
9624
+ setPendingKey(null);
9625
+ const isSameSelection = getSelectionKey(getSelectionRef.current()) === getSelectionKey(selection);
9626
+ if (resolved !== false && isSameSelection) completeAction();
9627
+ },
9628
+ // A rejected action keeps the selection; the consumer reports the error.
9629
+ () => {
9630
+ if (run === selectionRunRef.current) setPendingKey(null);
9631
+ }
9632
+ );
9633
+ };
9634
+ const handleCancel = () => {
9635
+ onCancel();
9636
+ focusSelectAllCell();
9637
+ };
9638
+ const getLabel = (label) => typeof label === "function" ? label(selectedCount) : label;
9639
+ const secondaryAction = actions.secondary;
9640
+ const primaryAction = actions.primary;
9641
+ const renderMenuItems = (items) => items.map((item, index) => {
9642
+ const { label, onClick: _onClick, disabled, ...itemProps } = item;
9643
+ return /* @__PURE__ */ jsx(
9644
+ Menu.Item,
9645
+ {
9646
+ ...itemProps,
9647
+ label: getLabel(label),
9648
+ disabled: disabled || isPending,
9649
+ onClick: () => runAction(`primary-${index}`, item),
9650
+ ...{ [ANV_PART_ATTR]: PARTS.bulkActionMenuItem }
9651
+ },
9652
+ index
9653
+ );
9654
+ });
9655
+ const renderPrimaryMenuTrigger = (primary) => ({ ref, ...triggerProps }) => {
9656
+ const {
9657
+ items: _items,
9658
+ label,
9659
+ appearance = "primary",
9660
+ ...buttonProps
9661
+ } = primary;
9662
+ return /* @__PURE__ */ jsx(
9663
+ Button,
9664
+ {
9665
+ size: "small",
9666
+ appearance,
9667
+ ...buttonProps,
9668
+ disabled: buttonProps.disabled || isPending,
9669
+ loading: pendingKey?.startsWith("primary-") ?? false,
9670
+ ...triggerProps,
9671
+ ref,
9672
+ ...{ [ANV_PART_ATTR]: PARTS.bulkActionsMenuButton },
9673
+ children: getLabel(label)
9674
+ }
9675
+ );
9676
+ };
9677
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
9678
+ /* @__PURE__ */ jsx(SrOnly, { "aria-live": "polite", "aria-atomic": "true", children: isVisible ? `${formatCount(selectedCount)} ${selectedCount === 1 ? "item" : "items"} selected` : "" }),
9679
+ isVisible && /* @__PURE__ */ jsxs(
9680
+ "div",
9681
+ {
9682
+ role: "group",
9683
+ "aria-label": "Bulk actions",
9684
+ className: styles["bulk-action-bar"],
9685
+ ...{ [ANV_PART_ATTR]: PARTS.bulkActionBar },
9686
+ children: [
9687
+ /* @__PURE__ */ jsxs("div", { className: styles["selection"], children: [
9688
+ /* @__PURE__ */ jsxs("span", { className: styles["count"], "aria-hidden": "true", children: [
9689
+ formatCount(selectedCount),
9690
+ " selected"
9691
+ ] }),
9692
+ selectAllCount !== void 0 && /* @__PURE__ */ jsxs(
9693
+ Button,
9694
+ {
9695
+ size: "small",
9696
+ appearance: "ghost",
9697
+ onClick: onSelectAll,
9698
+ disabled: isPending,
9699
+ ...{ [ANV_PART_ATTR]: PARTS.bulkSelectAllButton },
9700
+ children: [
9701
+ "Select all ",
9702
+ formatCount(selectAllCount),
9703
+ " items",
9704
+ hasUnselectableRows && ` of ${formatCount(selectAllCount)}`
9705
+ ]
9706
+ }
9707
+ )
9708
+ ] }),
9709
+ /* @__PURE__ */ jsxs("div", { className: styles["actions"], children: [
9710
+ /* @__PURE__ */ jsx(
9711
+ Button,
9712
+ {
9713
+ size: "small",
9714
+ appearance: "ghost",
9715
+ onClick: handleCancel,
9716
+ ...{ [ANV_PART_ATTR]: PARTS.bulkCancelButton },
9717
+ children: "Cancel"
9718
+ }
9719
+ ),
9720
+ secondaryAction && (() => {
9721
+ const {
9722
+ label,
9723
+ onClick: _onClick,
9724
+ appearance = "secondary",
9725
+ ...buttonProps
9726
+ } = secondaryAction;
9727
+ return /* @__PURE__ */ jsx(
9728
+ Button,
9729
+ {
9730
+ size: "small",
9731
+ appearance,
9732
+ ...buttonProps,
9733
+ disabled: buttonProps.disabled || isPending,
9734
+ loading: pendingKey === "secondary",
9735
+ onClick: () => runAction("secondary", secondaryAction),
9736
+ ...{ [ANV_PART_ATTR]: PARTS.bulkActionButton },
9737
+ children: getLabel(label)
9738
+ }
9739
+ );
9740
+ })(),
9741
+ primaryAction && ("items" in primaryAction ? /* @__PURE__ */ jsx(
9742
+ Menu,
9743
+ {
9744
+ label: getLabel(primaryAction.label),
9745
+ trigger: renderPrimaryMenuTrigger(primaryAction),
9746
+ children: renderMenuItems(primaryAction.items)
9747
+ }
9748
+ ) : (() => {
9749
+ const {
9750
+ label,
9751
+ onClick: _onClick,
9752
+ appearance = "primary",
9753
+ ...buttonProps
9754
+ } = primaryAction;
9755
+ return /* @__PURE__ */ jsx(
9756
+ Button,
9757
+ {
9758
+ size: "small",
9759
+ appearance,
9760
+ ...buttonProps,
9761
+ disabled: buttonProps.disabled || isPending,
9762
+ loading: pendingKey === "primary",
9763
+ onClick: () => runAction("primary", primaryAction),
9764
+ ...{ [ANV_PART_ATTR]: PARTS.bulkActionButton },
9765
+ children: getLabel(label)
9766
+ }
9767
+ );
9768
+ })())
9769
+ ] })
9770
+ ]
9771
+ }
9772
+ )
9773
+ ] });
9774
+ }
9775
+
9776
+ const SvgViewColumn = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M14.67 6v12c0 .55-.45 1-1 1h-3.33c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h3.33c.55 0 1 .45 1 1zm2 13H20c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1h-3.33c-.55 0-1 .45-1 1v12c0 .55.44 1 1 1zm-8.34-1V6c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3.33c.56 0 1-.45 1-1z" }));
9777
+
9778
+ const SvgLock = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM9 8V6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9z" }));
9779
+
9780
+ const SvgLockOpen = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M12 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6-5h-1V6c0-2.76-2.24-5-5-5-2.28 0-4.27 1.54-4.84 3.75-.14.54.18 1.08.72 1.22a1 1 0 0 0 1.22-.72A2.996 2.996 0 0 1 12 3c1.65 0 3 1.35 3 3v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 11c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-8c0-.55.45-1 1-1h10c.55 0 1 .45 1 1v8z" }));
9781
+
9782
+ const SvgVisibility = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z" }));
9783
+
9784
+ const SvgVisibilityOff = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24zM2.71 3.16a.996.996 0 0 0 0 1.41l1.97 1.97A11.892 11.892 0 0 0 1 11.5C2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l2.72 2.72a.996.996 0 1 0 1.41-1.41L4.13 3.16c-.39-.39-1.03-.39-1.42 0zM12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5zm2.97-5.33a2.97 2.97 0 0 0-2.64-2.64l2.64 2.64z" }));
9785
+
9786
+ function isEditableColumn(column) {
9787
+ return column.pinned !== "right";
9788
+ }
9789
+ function getColumnLabel(column) {
9790
+ return column.header?.label ?? column.headerLabel ?? String(column.id);
9791
+ }
9792
+ function getLeafColumnIds(columns) {
9793
+ const ids = /* @__PURE__ */ new Set();
9794
+ const visit = (list) => {
9795
+ for (const column of list) {
9796
+ if (column.columns) {
9797
+ visit(column.columns);
9798
+ } else {
9799
+ ids.add(String(column.id));
9800
+ }
9801
+ }
9802
+ };
9803
+ visit(columns);
9804
+ return ids;
9805
+ }
9806
+ function getDefaultLayout(columns) {
9807
+ return columns.filter(isEditableColumn).map((column) => ({
9808
+ id: String(column.id),
9809
+ visible: true,
9810
+ pinned: column.pinned === "left"
9811
+ }));
9812
+ }
9813
+ function mergeLayout(layout, editable) {
9814
+ const byId = new Map(editable.map((column) => [String(column.id), column]));
9815
+ const seen = /* @__PURE__ */ new Set();
9816
+ const merged = [];
9817
+ for (const pref of layout) {
9818
+ const column = byId.get(pref.id);
9819
+ if (column && !seen.has(pref.id)) {
9820
+ seen.add(pref.id);
9821
+ const visible = pref.visible || !!column.alwaysVisible;
9822
+ merged.push({ id: pref.id, visible, pinned: pref.pinned && visible });
9823
+ }
9824
+ }
9825
+ for (const column of editable) {
9826
+ const id = String(column.id);
9827
+ if (!seen.has(id)) {
9828
+ merged.push({ id, visible: true, pinned: column.pinned === "left" });
9829
+ }
9830
+ }
9831
+ return merged;
9832
+ }
9833
+ function applyColumnLayout(columns, layout) {
9834
+ const editable = columns.filter(isEditableColumn);
9835
+ const byId = new Map(editable.map((c) => [String(c.id), c]));
9836
+ let merged = mergeLayout(layout, editable).filter((pref) => pref.visible);
9837
+ if (merged.length === 0 && editable.length === columns.length) {
9838
+ merged = getDefaultLayout(editable);
9839
+ }
9840
+ const ordered = [
9841
+ ...merged.filter((p) => p.pinned),
9842
+ ...merged.filter((p) => !p.pinned)
9843
+ ].map((pref) => ({
9844
+ ...byId.get(pref.id),
9845
+ pinned: pref.pinned ? "left" : void 0
9846
+ }));
9847
+ const shown = new Set(merged.map((pref) => pref.id));
9848
+ const next = [];
9849
+ let cursor = 0;
9850
+ for (const column of columns) {
9851
+ if (!isEditableColumn(column)) {
9852
+ next.push(column);
9853
+ } else if (shown.has(String(column.id))) {
9854
+ next.push(ordered[cursor++]);
9855
+ }
9856
+ }
9857
+ return next;
9858
+ }
9859
+ const PINNED = "pinned";
9860
+ const VISIBLE = "visible";
9861
+ const HIDDEN = "hidden";
9862
+ function toBuckets(layout) {
9863
+ const buckets = { [PINNED]: [], [VISIBLE]: [], [HIDDEN]: [] };
9864
+ for (const pref of layout) {
9865
+ const zone = !pref.visible ? HIDDEN : pref.pinned ? PINNED : VISIBLE;
9866
+ buckets[zone].push(pref.id);
9867
+ }
9868
+ return buckets;
9869
+ }
9870
+ function toLayout(buckets) {
9871
+ return [
9872
+ ...buckets[PINNED].map((id) => ({ id, visible: true, pinned: true })),
9873
+ ...buckets[VISIBLE].map((id) => ({ id, visible: true, pinned: false })),
9874
+ ...buckets[HIDDEN].map((id) => ({ id, visible: false, pinned: false }))
9875
+ ];
9876
+ }
9877
+ function reorderBucket(prev, bucket, event) {
9878
+ if (!event.valid || event.zoneSort === null) {
9879
+ return prev;
9880
+ }
9881
+ return { ...prev, [bucket]: event.zoneSort.map(String) };
9882
+ }
9883
+ function togglePinnedIn(prev, id) {
9884
+ if (prev[PINNED].includes(id)) {
9885
+ return {
9886
+ ...prev,
9887
+ [PINNED]: prev[PINNED].filter((f) => f !== id),
9888
+ [VISIBLE]: [id, ...prev[VISIBLE]]
9889
+ };
9890
+ }
9891
+ if (prev[VISIBLE].includes(id)) {
9892
+ return {
9893
+ ...prev,
9894
+ [PINNED]: [...prev[PINNED], id],
9895
+ [VISIBLE]: prev[VISIBLE].filter((f) => f !== id)
9896
+ };
9897
+ }
9898
+ return prev;
9899
+ }
9900
+ function isLastShown(buckets, hasFixedColumns = false) {
9901
+ return !hasFixedColumns && buckets[VISIBLE].length <= 1 && buckets[PINNED].length === 0;
9902
+ }
9903
+ function toggleVisibleIn(prev, id, hasFixedColumns = false) {
9904
+ if (prev[VISIBLE].includes(id)) {
9905
+ if (isLastShown(prev, hasFixedColumns)) {
9906
+ return prev;
9907
+ }
9908
+ return {
9909
+ ...prev,
9910
+ [VISIBLE]: prev[VISIBLE].filter((f) => f !== id),
9911
+ [HIDDEN]: [...prev[HIDDEN], id]
9912
+ };
9913
+ }
9914
+ if (prev[HIDDEN].includes(id)) {
9915
+ return {
9916
+ ...prev,
9917
+ [VISIBLE]: [...prev[VISIBLE], id],
9918
+ [HIDDEN]: prev[HIDDEN].filter((f) => f !== id)
9919
+ };
9920
+ }
9921
+ return prev;
9922
+ }
9923
+
9924
+ const draftsOf = (sections) => sections.map((section) => toBuckets(section.layout));
9925
+ const bucketsEqual = (a, b) => ["pinned", "visible", "hidden"].every(
9926
+ (name) => a[name].length === b[name].length && a[name].every((id, i) => id === b[name][i])
9927
+ );
9928
+ function EditColumnsDrawer({
9929
+ open,
9930
+ onClose,
9931
+ sections
9932
+ }) {
9933
+ const [drafts, setDrafts] = useState(
9934
+ () => draftsOf(sections)
9935
+ );
9936
+ const [initial, setInitial] = useState(drafts);
9937
+ const [confirm, setConfirm] = useState(null);
9938
+ const wasOpen = useRef(false);
9939
+ useEffect(() => {
9940
+ if (open && !wasOpen.current) {
9941
+ const opening = draftsOf(sections);
9942
+ setDrafts(opening);
9943
+ setInitial(opening);
9944
+ }
9945
+ wasOpen.current = open;
9946
+ }, [open, sections]);
9947
+ const edit = (index, update) => {
9948
+ setDrafts((prev) => prev.map((b, i) => i === index ? update(b) : b));
9949
+ };
9950
+ const dirty = sections.map((_, i) => {
9951
+ const draft = drafts[i];
9952
+ const start = initial[i];
9953
+ return !!draft && !!start && !bucketsEqual(draft, start);
9954
+ });
9955
+ const anyDirty = dirty.some(Boolean);
9956
+ const handleClose = () => anyDirty ? setConfirm("discard") : onClose();
9957
+ const handleApply = () => {
9958
+ sections.forEach((section, i) => {
9959
+ if (dirty[i] && drafts[i]) {
9960
+ section.onApply(toLayout(drafts[i]));
9961
+ }
9962
+ });
9963
+ onClose();
9964
+ };
9965
+ const multiple = sections.length > 1;
9966
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
9967
+ /* @__PURE__ */ jsxs(
9968
+ Drawer,
9969
+ {
9970
+ open,
9971
+ onClose: handleClose,
9972
+ size: "medium",
9973
+ ...{ [ANV_PART_ATTR]: PARTS.editColumnsDrawer },
9974
+ children: [
9975
+ /* @__PURE__ */ jsx(Drawer.Header, { children: "Edit Columns" }),
9976
+ /* @__PURE__ */ jsx(Drawer.Content, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "6", children: [
9977
+ /* @__PURE__ */ jsx(Text, { children: "Pinned columns stay at the left of the table. Drag columns to reorder them, and use the eye icon to hide or show them." }),
9978
+ sections.map((section, i) => {
9979
+ const buckets = drafts[i];
9980
+ if (!buckets) {
9981
+ return null;
9982
+ }
9983
+ const editor = /* @__PURE__ */ jsx(
9984
+ SectionEditor,
9985
+ {
9986
+ buckets,
9987
+ alwaysVisibleIds: section.alwaysVisibleIds,
9988
+ hasFixedColumns: section.hasFixedColumns,
9989
+ labels: section.labels,
9990
+ onEdit: (update) => edit(i, update),
9991
+ zonePrefix: section.id
9992
+ },
9993
+ section.id
9994
+ );
9995
+ return multiple ? /* @__PURE__ */ jsx(
9996
+ Card,
9997
+ {
9998
+ padding: "medium",
9999
+ ...{ [ANV_PART_ATTR]: PARTS.columnsSection },
10000
+ children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "4", grow: 1, children: [
10001
+ /* @__PURE__ */ jsx(Text, { variant: "headline", el: "h3", size: "small", children: section.title ?? section.id }),
10002
+ editor
10003
+ ] })
10004
+ },
10005
+ section.id
10006
+ ) : /* @__PURE__ */ jsx(Flex, { direction: "column", children: editor }, section.id);
10007
+ })
10008
+ ] }) }),
10009
+ /* @__PURE__ */ jsxs(Drawer.Footer, { children: [
10010
+ /* @__PURE__ */ jsx(
10011
+ Button,
10012
+ {
10013
+ appearance: "secondary",
10014
+ onClick: () => setConfirm("reset"),
10015
+ ...{ [ANV_PART_ATTR]: PARTS.resetColumnsButton },
10016
+ children: "Reset Defaults"
10017
+ }
10018
+ ),
10019
+ /* @__PURE__ */ jsx(Flex, { grow: 1 }),
10020
+ /* @__PURE__ */ jsx(
10021
+ Button,
10022
+ {
10023
+ appearance: "secondary",
10024
+ onClick: handleClose,
10025
+ ...{ [ANV_PART_ATTR]: PARTS.cancelButton },
10026
+ children: "Cancel"
10027
+ }
10028
+ ),
10029
+ /* @__PURE__ */ jsx(
10030
+ Button,
10031
+ {
10032
+ appearance: "primary",
10033
+ onClick: handleApply,
10034
+ disabled: !anyDirty,
10035
+ ...{ [ANV_PART_ATTR]: PARTS.applyButton },
10036
+ children: "Apply"
10037
+ }
10038
+ )
10039
+ ] })
10040
+ ]
10041
+ }
10042
+ ),
10043
+ /* @__PURE__ */ jsx(
10044
+ ConfirmDialog,
10045
+ {
10046
+ open: confirm === "discard",
10047
+ header: "You have unsaved changes",
10048
+ confirmLabel: "Discard",
10049
+ onConfirm: () => {
10050
+ setConfirm(null);
10051
+ onClose();
10052
+ },
10053
+ onClose: () => setConfirm(null),
10054
+ children: "Are you sure you want to close? Your changes will be lost."
10055
+ }
10056
+ ),
10057
+ /* @__PURE__ */ jsx(
10058
+ ConfirmDialog,
10059
+ {
10060
+ open: confirm === "reset",
10061
+ header: "Reset columns",
10062
+ confirmLabel: "Reset Defaults",
10063
+ danger: true,
10064
+ onConfirm: () => {
10065
+ setConfirm(null);
10066
+ for (const section of sections) {
10067
+ section.onReset();
10068
+ }
10069
+ onClose();
10070
+ },
10071
+ onClose: () => setConfirm(null),
10072
+ children: multiple ? "Reset every table to its default columns? Your changes will be reverted." : "Reset the table to its default columns? Your changes will be reverted."
10073
+ }
10074
+ )
10075
+ ] });
10076
+ }
10077
+ function SectionEditor({
10078
+ alwaysVisibleIds = [],
10079
+ buckets,
10080
+ hasFixedColumns,
10081
+ labels,
10082
+ onEdit,
10083
+ zonePrefix
10084
+ }) {
10085
+ const labelOf = (id) => labels[id] ?? id;
10086
+ const lastShown = isLastShown(buckets, hasFixedColumns);
10087
+ const controls = {
10088
+ labelOf,
10089
+ onTogglePinned: (id) => onEdit((prev) => togglePinnedIn(prev, id)),
10090
+ onToggleVisible: (id) => onEdit((prev) => toggleVisibleIn(prev, id, hasFixedColumns))
10091
+ };
10092
+ const sortableZone = (bucket) => (
10093
+ // A DndSort per zone keeps drags inside it; pinning is the lock button's job.
10094
+ /* @__PURE__ */ jsx(
10095
+ DndSort,
10096
+ {
10097
+ onDrop: (event) => onEdit((prev) => reorderBucket(prev, bucket, event)),
10098
+ children: /* @__PURE__ */ jsx(
10099
+ DndSort.Zone,
10100
+ {
10101
+ id: `${zonePrefix}-${bucket}`,
10102
+ label: bucket === "pinned" ? "Pinned columns" : "Visible columns",
10103
+ orientation: "vertical",
10104
+ sortable: true,
10105
+ sortedIds: buckets[bucket],
10106
+ gap: "2",
10107
+ children: buckets[bucket].map((id) => /* @__PURE__ */ jsx(
10108
+ DndSort.Card,
10109
+ {
10110
+ id,
10111
+ label: labelOf(id),
10112
+ dragOnlyWithHandle: true,
10113
+ padding: "xsmall",
10114
+ ...{ [ANV_PART_ATTR]: PARTS.columnCard },
10115
+ children: /* @__PURE__ */ jsx(
10116
+ CardControls,
10117
+ {
10118
+ id,
10119
+ visible: true,
10120
+ pinned: bucket === "pinned",
10121
+ disableHide: bucket === "visible" && lastShown,
10122
+ alwaysVisible: alwaysVisibleIds.includes(id),
10123
+ ...controls
10124
+ }
10125
+ )
10126
+ },
10127
+ id
10128
+ ))
10129
+ }
10130
+ )
10131
+ }
10132
+ )
10133
+ );
10134
+ return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "6", children: [
10135
+ buckets.pinned.length > 0 && /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "2", children: [
10136
+ /* @__PURE__ */ jsx(ZoneHeading, { children: "Pinned Columns" }),
10137
+ sortableZone("pinned")
10138
+ ] }),
10139
+ /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "2", children: [
10140
+ /* @__PURE__ */ jsx(ZoneHeading, { children: "Visible Columns" }),
10141
+ sortableZone("visible")
10142
+ ] }),
10143
+ buckets.hidden.length > 0 && /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "2", children: [
10144
+ /* @__PURE__ */ jsx(ZoneHeading, { children: "Hidden Columns" }),
10145
+ /* @__PURE__ */ jsx(Grid, { templateColumns: "1fr", gap: "2", children: buckets.hidden.map((id) => /* @__PURE__ */ jsx(
10146
+ Card,
10147
+ {
10148
+ padding: "xsmall",
10149
+ ...{ [ANV_PART_ATTR]: PARTS.columnCard },
10150
+ children: /* @__PURE__ */ jsxs(Flex, { alignItems: "center", gap: "2", grow: 1, children: [
10151
+ /* @__PURE__ */ jsx(
10152
+ Icon,
10153
+ {
10154
+ svg: SvgDragIndicator,
10155
+ "aria-hidden": "true",
10156
+ style: { opacity: 0.4 }
10157
+ }
10158
+ ),
10159
+ /* @__PURE__ */ jsx(
10160
+ CardControls,
10161
+ {
10162
+ id,
10163
+ visible: false,
10164
+ pinned: false,
10165
+ ...controls
10166
+ }
10167
+ )
10168
+ ] })
10169
+ },
10170
+ id
10171
+ )) })
10172
+ ] })
10173
+ ] });
10174
+ }
10175
+ function ConfirmDialog({
10176
+ open,
10177
+ header,
10178
+ confirmLabel,
10179
+ danger,
10180
+ onConfirm,
10181
+ onClose,
10182
+ children
10183
+ }) {
10184
+ return /* @__PURE__ */ jsxs(Dialog, { open, onClose, children: [
10185
+ /* @__PURE__ */ jsx(Dialog.Header, { children: header }),
10186
+ /* @__PURE__ */ jsx(Dialog.Content, { children }),
10187
+ /* @__PURE__ */ jsxs(Dialog.Footer, { children: [
10188
+ /* @__PURE__ */ jsx(Dialog.CancelButton, { children: "Cancel" }),
10189
+ /* @__PURE__ */ jsx(
10190
+ Button,
10191
+ {
10192
+ appearance: danger ? "danger" : "primary",
10193
+ onClick: onConfirm,
10194
+ ...{ [ANV_PART_ATTR]: PARTS.confirmButton },
10195
+ children: confirmLabel
10196
+ }
10197
+ )
10198
+ ] })
10199
+ ] });
10200
+ }
10201
+ function ZoneHeading({ children }) {
10202
+ return /* @__PURE__ */ jsxs(Flex, { direction: "row", gap: "1", alignItems: "center", children: [
10203
+ /* @__PURE__ */ jsx(Text, { variant: "eyebrow", size: "large", style: { whiteSpace: "nowrap" }, children }),
10204
+ /* @__PURE__ */ jsx(Divider, {})
10205
+ ] });
10206
+ }
10207
+ function CardControls({
10208
+ id,
10209
+ visible,
10210
+ pinned,
10211
+ labelOf,
10212
+ onTogglePinned,
10213
+ onToggleVisible,
10214
+ disableHide,
10215
+ alwaysVisible
10216
+ }) {
10217
+ const label = labelOf(id);
10218
+ const pinBlocked = !visible;
10219
+ const hideBlocked = !!alwaysVisible || pinned || visible && !!disableHide;
10220
+ const pinTip = !visible ? "Hidden columns can't be pinned" : pinned ? "Unpin column" : "Pin column";
10221
+ const visibilityTip = alwaysVisible ? "This column is always visible" : pinned ? "Unpin this column to hide it" : visible && disableHide ? "Show another column before hiding this one" : visible ? "Hide column" : "Show column";
10222
+ return /* @__PURE__ */ jsxs(
10223
+ Grid,
10224
+ {
10225
+ templateColumns: "1fr auto auto",
10226
+ alignItems: "center",
10227
+ gap: "1",
10228
+ style: { flex: 1 },
10229
+ children: [
10230
+ /* @__PURE__ */ jsx(Text, { children: label }),
10231
+ /* @__PURE__ */ jsxs(Tooltip, { children: [
10232
+ /* @__PURE__ */ jsx(Tooltip.Trigger, { children: /* @__PURE__ */ jsx(
10233
+ Button,
10234
+ {
10235
+ appearance: "ghost",
10236
+ size: "xsmall",
10237
+ icon: pinned ? SvgLock : SvgLockOpen,
10238
+ "aria-label": `${pinTip}: ${label}`,
10239
+ "aria-disabled": pinBlocked,
10240
+ onClick: () => {
10241
+ if (!pinBlocked) onTogglePinned(id);
10242
+ },
10243
+ ...{ [ANV_PART_ATTR]: PARTS.pinColumnButton }
10244
+ }
10245
+ ) }),
10246
+ /* @__PURE__ */ jsx(Tooltip.Content, { children: pinTip })
10247
+ ] }),
10248
+ /* @__PURE__ */ jsxs(Tooltip, { children: [
10249
+ /* @__PURE__ */ jsx(Tooltip.Trigger, { children: /* @__PURE__ */ jsx(
10250
+ Button,
10251
+ {
10252
+ appearance: "ghost",
10253
+ size: "xsmall",
10254
+ icon: visible ? SvgVisibility : SvgVisibilityOff,
10255
+ "aria-label": `${visibilityTip}: ${label}`,
10256
+ "aria-disabled": hideBlocked,
10257
+ onClick: () => {
10258
+ if (!hideBlocked) onToggleVisible(id);
10259
+ },
10260
+ ...{ [ANV_PART_ATTR]: PARTS.hideColumnButton }
10261
+ }
10262
+ ) }),
10263
+ /* @__PURE__ */ jsx(Tooltip.Content, { children: visibilityTip })
10264
+ ] })
10265
+ ]
10266
+ }
10267
+ );
10268
+ }
10269
+
10270
+ const DEFAULT_FILTER_BAR_SIZE = "small";
10271
+ function DataTableFilterToolbar({
10272
+ filters,
10273
+ tools,
10274
+ onFilterChange,
10275
+ columnEditing
10276
+ }) {
10277
+ const [columnsOpen, setColumnsOpen] = useState(false);
10278
+ const hasFilters = (filters?.items.length ?? 0) > 0;
10279
+ const hasActions = (tools?.actions.length ?? 0) > 0;
10280
+ return /* @__PURE__ */ jsxs(Flex, { direction: "row", gap: "2", alignItems: "center", justifyContent: "flex-end", children: [
10281
+ filters && hasFilters && /* @__PURE__ */ jsx(
10282
+ FilterBar,
10283
+ {
10284
+ size: filters.size ?? DEFAULT_FILTER_BAR_SIZE,
10285
+ associatedContent: "table filters",
10286
+ filters: filters.items,
10287
+ onFilterChange,
10288
+ controlledFiltering: filters.controlled,
10289
+ style: { flex: "1 1 auto" }
10290
+ }
10291
+ ),
10292
+ (hasActions || columnEditing) && /* @__PURE__ */ jsxs(
10293
+ Toolbar,
10294
+ {
10295
+ size: tools?.size ?? DEFAULT_FILTER_BAR_SIZE,
10296
+ associatedContent: "table actions",
10297
+ style: { flex: "0 0 auto", width: "fit-content" },
10298
+ children: [
10299
+ tools?.actions.map(({ id, ...buttonProps }) => /* @__PURE__ */ jsx(ToolbarButton, { ...buttonProps }, id)),
10300
+ columnEditing && /* @__PURE__ */ jsx(
10301
+ ToolbarButton,
10302
+ {
10303
+ icon: { after: SvgViewColumn },
10304
+ onClick: () => setColumnsOpen(true),
10305
+ ...{ [ANV_PART_ATTR]: PARTS.editColumnsButton },
10306
+ children: "Edit Columns"
10307
+ }
10308
+ )
10309
+ ]
10310
+ }
10311
+ ),
10312
+ columnEditing && /* @__PURE__ */ jsx(
10313
+ EditColumnsDrawer,
10314
+ {
10315
+ open: columnsOpen,
10316
+ onClose: () => setColumnsOpen(false),
10317
+ sections: [columnEditing]
10318
+ }
10319
+ )
10320
+ ] });
10321
+ }
10322
+
10323
+ function toEditColumnsSection({ title, columns, layout, onLayoutChange }, id) {
10324
+ const editable = columns.filter(isEditableColumn);
10325
+ return {
10326
+ id,
10327
+ title,
10328
+ hasFixedColumns: editable.length < columns.length || editable.some((c) => c.alwaysVisible),
10329
+ alwaysVisibleIds: editable.filter((column) => column.alwaysVisible).map((column) => String(column.id)),
10330
+ labels: Object.fromEntries(
10331
+ editable.map((column) => [String(column.id), getColumnLabel(column)])
10332
+ ),
10333
+ layout: mergeLayout(layout, editable),
10334
+ onApply: (next) => onLayoutChange(next),
10335
+ onReset: () => onLayoutChange(getDefaultLayout(columns))
10336
+ };
10337
+ }
10338
+
10339
+ function DataTableEmptyAddRow({ rowAdd }) {
10340
+ return /* @__PURE__ */ jsx(Flex, { justifyContent: "center", style: { padding: "var(--spacing-2)" }, children: /* @__PURE__ */ jsx(
10341
+ Button,
10342
+ {
10343
+ icon: SvgAdd,
10344
+ ...{ [ANV_PART_ATTR]: PARTS.rowAddButton },
10345
+ disabled: rowAdd.disabled,
10346
+ loading: rowAdd.loading,
10347
+ onClick: rowAdd.onAddRow,
10348
+ children: rowAdd.addRowLabel ?? "Add row"
10349
+ }
10350
+ ) });
10351
+ }
10352
+ function DataTableAddRow({ rowAdd }) {
10353
+ return /* @__PURE__ */ jsx(
10354
+ Toolbar,
10355
+ {
10356
+ size: rowAdd.size ?? "medium",
10357
+ associatedContent: "table add row",
10358
+ style: { width: "fit-content" },
10359
+ children: /* @__PURE__ */ jsx(
10360
+ ToolbarButton,
10361
+ {
10362
+ icon: SvgAdd,
10363
+ disabled: rowAdd.disabled,
10364
+ loading: rowAdd.loading,
10365
+ onClick: rowAdd.onAddRow,
10366
+ children: rowAdd.addRowLabel ?? "Add row"
10367
+ }
10368
+ )
10369
+ }
10370
+ );
10371
+ }
10372
+
9473
10373
  const EMPTY_DATA = [];
9474
10374
  const REACT_FORWARD_REF = Symbol.for("react.forward_ref");
9475
10375
  const REACT_MEMO = Symbol.for("react.memo");
@@ -9482,11 +10382,29 @@ function isEmptyStateSvgComponent(value) {
9482
10382
  }
9483
10383
  return type === REACT_MEMO;
9484
10384
  }
10385
+ const PARENT_PLACEMENT_KEYS = /* @__PURE__ */ new Set([
10386
+ "flex",
10387
+ "flexGrow",
10388
+ "flexShrink",
10389
+ "flexBasis",
10390
+ "order",
10391
+ "gridArea",
10392
+ "gridColumn",
10393
+ "gridRow",
10394
+ "gridColumnStart",
10395
+ "gridColumnEnd",
10396
+ "gridRowStart",
10397
+ "gridRowEnd",
10398
+ "alignSelf",
10399
+ "justifySelf",
10400
+ "placeSelf"
10401
+ ]);
9485
10402
  function DataTableInner(props, ref) {
9486
10403
  const { layoutStyles, componentProps } = useLayoutPropsUtil(props);
9487
10404
  const {
9488
10405
  data: dataProp,
9489
- columns: columnsProp,
10406
+ columns: columnsInput,
10407
+ columnEditing,
9490
10408
  customFooter,
9491
10409
  defaultExpandedRowIds,
9492
10410
  defaultSelectedRowIds,
@@ -9508,14 +10426,26 @@ function DataTableInner(props, ref) {
9508
10426
  disableVirtualization,
9509
10427
  forceVirtualization,
9510
10428
  getRowVersion,
10429
+ filters,
10430
+ tools,
10431
+ bulkActions,
10432
+ rowAdd,
9511
10433
  className,
9512
10434
  style,
9513
10435
  ...rest
9514
10436
  } = componentProps;
9515
- const styleCombined = {
9516
- ...style,
9517
- ...layoutStyles
9518
- };
10437
+ const columnEditingLayout = columnEditing?.layout;
10438
+ const columnsProp = useMemo(
10439
+ () => columnEditingLayout ? applyColumnLayout(columnsInput, columnEditingLayout) : columnsInput,
10440
+ [columnsInput, columnEditingLayout]
10441
+ );
10442
+ const columnEditingSection = useMemo(
10443
+ () => columnEditing && !columnEditing.hideButton ? toEditColumnsSection(
10444
+ { columns: columnsInput, ...columnEditing },
10445
+ "table"
10446
+ ) : void 0,
10447
+ [columnEditing, columnsInput]
10448
+ );
9519
10449
  const tableRef = useRef(null);
9520
10450
  const lastBodyHeightRef = useRef(null);
9521
10451
  const [rowSelection, setRowSelection] = useOptionallyControlledState({
@@ -9525,6 +10455,14 @@ function DataTableInner(props, ref) {
9525
10455
  onSelectRow?.(Object.keys(newRowSelection));
9526
10456
  }
9527
10457
  });
10458
+ const [isAllRowsSelected, setIsAllRowsSelected] = useState(false);
10459
+ const selectedRowCount = Object.keys(rowSelection ?? {}).filter(
10460
+ (id) => rowSelection[id]
10461
+ ).length;
10462
+ const clearSelection = useCallback(() => {
10463
+ setIsAllRowsSelected(false);
10464
+ setRowSelection({});
10465
+ }, [setRowSelection]);
9528
10466
  const readOnlyRowMap = useMemo(
9529
10467
  () => readOnlyRowIds ? Object.fromEntries(readOnlyRowIds.map((id) => [String(id), true])) : {},
9530
10468
  [readOnlyRowIds]
@@ -9535,13 +10473,19 @@ function DataTableInner(props, ref) {
9535
10473
  () => sortedColumnId !== void 0 ? [{ id: sortedColumnId, desc: sortedColumnDesc ?? false }] : void 0,
9536
10474
  [sortedColumnId, sortedColumnDesc]
9537
10475
  );
9538
- const [sorting, setSorting] = useOptionallyControlledState({
10476
+ const [rawSorting, setSorting] = useOptionallyControlledState({
9539
10477
  controlledValue: controlledSorting,
9540
10478
  defaultValue: defaultSortedColumn ? [defaultSortedColumn] : void 0,
9541
10479
  onChange: (newSorting) => {
9542
10480
  onSort?.(newSorting[0]);
9543
10481
  }
9544
10482
  });
10483
+ const sorting = useMemo(() => {
10484
+ const sortedId = rawSorting?.[0]?.id;
10485
+ if (!columnEditing || sortedId === void 0) return rawSorting ?? [];
10486
+ return getLeafColumnIds(columnsProp).has(sortedId) ? rawSorting : [];
10487
+ }, [rawSorting, columnEditing, columnsProp]);
10488
+ const sortHidden = rawSorting?.[0] !== void 0 && sorting.length === 0;
9545
10489
  const isPaginated = !!pagination;
9546
10490
  const paginationObject = typeof pagination === "object" ? pagination : void 0;
9547
10491
  const rowsPerPage = paginationObject?.rowsPerPage ?? 25;
@@ -9554,6 +10498,15 @@ function DataTableInner(props, ref) {
9554
10498
  paginationObject?.onPageChange?.(newPageIndex);
9555
10499
  }
9556
10500
  });
10501
+ const effectivePageIndex = sortHidden && isPaginated ? 0 : currentPageIndex ?? 0;
10502
+ useEffect(() => {
10503
+ if (sortHidden) {
10504
+ setSorting([]);
10505
+ if (isPaginated) {
10506
+ setCurrentPageIndex(0);
10507
+ }
10508
+ }
10509
+ }, [sortHidden]);
9557
10510
  const [refreshCounter, setRefreshCounter] = useState(0);
9558
10511
  const pageLoader = paginationObject?.loadPageData;
9559
10512
  const isAsyncPaginated = !!pageLoader && typeof pageLoader === "function";
@@ -9578,9 +10531,10 @@ function DataTableInner(props, ref) {
9578
10531
  setRefreshCounter((c) => c + 1);
9579
10532
  setCurrentPageIndex(0);
9580
10533
  },
9581
- clearCache
10534
+ clearCache,
10535
+ clearSelection
9582
10536
  }),
9583
- [setCurrentPageIndex, clearCache]
10537
+ [setCurrentPageIndex, clearCache, clearSelection]
9584
10538
  );
9585
10539
  const isFirstRender = useRef(true);
9586
10540
  useEffect(() => {
@@ -9596,10 +10550,10 @@ function DataTableInner(props, ref) {
9596
10550
  if (!isAsyncPaginated) {
9597
10551
  return dataProp;
9598
10552
  }
9599
- return getOrLoad(currentPageIndex ?? 0, rowsPerPage, sorting?.[0]);
10553
+ return getOrLoad(effectivePageIndex, rowsPerPage, sorting?.[0]);
9600
10554
  }, [
9601
10555
  isAsyncPaginated,
9602
- currentPageIndex,
10556
+ effectivePageIndex,
9603
10557
  rowsPerPage,
9604
10558
  dataProp,
9605
10559
  refreshKey,
@@ -9718,8 +10672,8 @@ function DataTableInner(props, ref) {
9718
10672
  tabIndex: -1,
9719
10673
  onClick: table2.getToggleAllRowsExpandedHandler(),
9720
10674
  appearance: "ghost",
9721
- className: cx(styles["expand-button"], {
9722
- [styles["expanded"]]: table2.getIsAllRowsExpanded()
10675
+ className: cx(styles$1["expand-button"], {
10676
+ [styles$1["expanded"]]: table2.getIsAllRowsExpanded()
9723
10677
  }),
9724
10678
  size: "small",
9725
10679
  icon: SvgChevronRight,
@@ -9739,8 +10693,8 @@ function DataTableInner(props, ref) {
9739
10693
  appearance: "ghost",
9740
10694
  size: "small",
9741
10695
  icon: SvgChevronRight,
9742
- className: cx(styles["expand-button"], {
9743
- [styles["expanded"]]: row.getIsExpanded()
10696
+ className: cx(styles$1["expand-button"], {
10697
+ [styles$1["expanded"]]: row.getIsExpanded()
9744
10698
  }),
9745
10699
  "aria-label": row.getIsExpanded() ? "Collapse row" : "Expand row",
9746
10700
  "aria-expanded": hasSubComponent && row.getCanExpand() ? row.getIsExpanded() : void 0,
@@ -9830,7 +10784,7 @@ function DataTableInner(props, ref) {
9830
10784
  sorting,
9831
10785
  ...isPaginated && {
9832
10786
  pagination: {
9833
- pageIndex: currentPageIndex ?? 0,
10787
+ pageIndex: effectivePageIndex,
9834
10788
  pageSize: rowsPerPage
9835
10789
  }
9836
10790
  }
@@ -9863,6 +10817,36 @@ function DataTableInner(props, ref) {
9863
10817
  }
9864
10818
  }
9865
10819
  });
10820
+ const previousRowSelectionRef = useRef(rowSelection);
10821
+ const hasLostSelectedRow = Object.keys(previousRowSelectionRef.current).some(
10822
+ (id) => previousRowSelectionRef.current[id] && !rowSelection[id]
10823
+ );
10824
+ previousRowSelectionRef.current = rowSelection;
10825
+ if (isAllRowsSelected && (hasLostSelectedRow || selectedRowCount === 0)) {
10826
+ setIsAllRowsSelected(false);
10827
+ }
10828
+ const hasUnselectedLoadedRow = isAllRowsSelected && table.getCoreRowModel().flatRows.some((row) => row.getCanSelect() && !row.getIsSelected());
10829
+ useLayoutEffect(() => {
10830
+ if (hasUnselectedLoadedRow) {
10831
+ table.toggleAllRowsSelected(true);
10832
+ }
10833
+ }, [hasUnselectedLoadedRow, table]);
10834
+ const isBulkActionBarEnabled = !!bulkActions && !!isSelectable;
10835
+ const isBulkActionBarVisible = isBulkActionBarEnabled && selectedRowCount > 0;
10836
+ const canSelectAllRows = !!bulkActions?.selectAll && isPaginated && !isCursorPagination && totalItemCount !== void 0 && totalItemCount > rowsPerPage && !isAllRowsSelected;
10837
+ let allRowCount = totalItemCount;
10838
+ let selectableRowCount = bulkActions?.selectableRowCount ?? totalItemCount;
10839
+ if (bulkActions?.selectAll && !isAsyncPaginated && !isCursorPagination) {
10840
+ const flatRows = table.getCoreRowModel().flatRows;
10841
+ allRowCount = flatRows.length;
10842
+ selectableRowCount = bulkActions.selectableRowCount ?? flatRows.filter((row) => row.getCanSelect()).length;
10843
+ }
10844
+ const getBulkSelection = () => isAllRowsSelected && selectableRowCount !== void 0 ? { mode: "all", selectedRowCount: selectableRowCount } : {
10845
+ mode: "rows",
10846
+ rowIds: Object.keys(rowSelection).filter(
10847
+ (id) => rowSelection[id]
10848
+ )
10849
+ };
9866
10850
  const rowVirtualizer = useDataTableVirtualizer({
9867
10851
  rowCount: table.getRowModel().rows.length,
9868
10852
  scrollRef: tableRef,
@@ -9947,10 +10931,41 @@ function DataTableInner(props, ref) {
9947
10931
  const columnCount = useMemo(() => {
9948
10932
  return headers.filter((header) => header.subHeaders?.length === 0).length;
9949
10933
  }, [headers]);
9950
- const containerClassName = cx(styles["data-table-container"], className, {
9951
- [styles["container-with-pagination"]]: pagination && !isTrulyEmpty
10934
+ const containerClassName = cx(styles$1["data-table-container"], className, {
10935
+ [styles$1["container-with-pagination"]]: pagination && !isTrulyEmpty
9952
10936
  });
9953
- return /* @__PURE__ */ jsx(
10937
+ const handleFilterChange = useCallback(
10938
+ (next) => {
10939
+ if (isPaginated) {
10940
+ setCurrentPageIndex(0);
10941
+ }
10942
+ if (isAsyncPaginated) {
10943
+ setRefreshCounter((c) => c + 1);
10944
+ }
10945
+ filters?.onChange(next);
10946
+ },
10947
+ [isAsyncPaginated, isPaginated, filters, setCurrentPageIndex]
10948
+ );
10949
+ const hasToolbar = (filters?.items.length ?? 0) > 0 || (tools?.actions.length ?? 0) > 0 || !!columnEditingSection;
10950
+ const hasWrapper = hasToolbar || isBulkActionBarEnabled || !!rowAdd;
10951
+ const { wrapperLayoutStyles, containerLayoutStyles } = (() => {
10952
+ if (!hasWrapper) {
10953
+ return { wrapperLayoutStyles: {}, containerLayoutStyles: layoutStyles };
10954
+ }
10955
+ const wrapper = {};
10956
+ const container = {};
10957
+ for (const [key, value] of Object.entries(layoutStyles ?? {})) {
10958
+ (PARENT_PLACEMENT_KEYS.has(key) ? wrapper : container)[key] = value;
10959
+ }
10960
+ if ("flex" in wrapper || "flexGrow" in wrapper) {
10961
+ container.flex = "1 1 auto";
10962
+ if (style?.minHeight === void 0) {
10963
+ container.minHeight = 0;
10964
+ }
10965
+ }
10966
+ return { wrapperLayoutStyles: wrapper, containerLayoutStyles: container };
10967
+ })();
10968
+ const tableElement = /* @__PURE__ */ jsx(
9954
10969
  DTFocusProvider,
9955
10970
  {
9956
10971
  rowCount,
@@ -9961,139 +10976,208 @@ function DataTableInner(props, ref) {
9961
10976
  virtualizer: rowVirtualizer,
9962
10977
  headerRowCount,
9963
10978
  children: /* @__PURE__ */ jsx(DataTableSurfaceCoordinatorProvider, { intersectionBoundaryRef: tableRef, children: /* @__PURE__ */ jsxs(
9964
- TableContainer,
10979
+ Flex,
9965
10980
  {
9966
- ...rest,
9967
- ref: tableRef,
9968
- style: {
9969
- ...styleCombined,
9970
- width: cssVars["--a2-table-width"]
9971
- },
9972
- className: containerClassName,
10981
+ direction: "column",
10982
+ gap: "2",
10983
+ style: hasWrapper ? {
10984
+ maxHeight: "100%",
10985
+ maxWidth: "100%",
10986
+ minHeight: 0,
10987
+ minWidth: 0,
10988
+ ...wrapperLayoutStyles
10989
+ } : { display: "contents" },
9973
10990
  children: [
10991
+ hasToolbar && // Hidden rather than unmounted: FilterBar holds uncommitted input.
10992
+ /* @__PURE__ */ jsx("div", { hidden: isBulkActionBarVisible, children: /* @__PURE__ */ jsx(
10993
+ DataTableFilterToolbar,
10994
+ {
10995
+ filters,
10996
+ tools,
10997
+ onFilterChange: handleFilterChange,
10998
+ columnEditing: columnEditingSection
10999
+ }
11000
+ ) }),
11001
+ isBulkActionBarEnabled && bulkActions && /* @__PURE__ */ jsx(
11002
+ DataTableBulkActionBar,
11003
+ {
11004
+ actions: bulkActions,
11005
+ selectedCount: isAllRowsSelected && selectableRowCount !== void 0 ? selectableRowCount : selectedRowCount,
11006
+ selectAllCount: canSelectAllRows ? selectableRowCount : void 0,
11007
+ hasUnselectableRows: selectableRowCount !== void 0 && allRowCount !== void 0 && selectableRowCount < allRowCount,
11008
+ onSelectAll: () => {
11009
+ setIsAllRowsSelected(true);
11010
+ table.toggleAllRowsSelected(true);
11011
+ },
11012
+ onCancel: clearSelection,
11013
+ getSelection: getBulkSelection,
11014
+ onActionComplete: clearSelection,
11015
+ tableRef
11016
+ }
11017
+ ),
9974
11018
  /* @__PURE__ */ jsxs(
9975
- TableBase,
11019
+ TableContainer,
9976
11020
  {
9977
- type: "data-table",
9978
- style: cssVars,
9979
- rowCount,
9980
- colCount: columnCount,
9981
- hasSubRows,
11021
+ ...rest,
11022
+ ref: tableRef,
11023
+ style: {
11024
+ ...style,
11025
+ ...containerLayoutStyles,
11026
+ width: cssVars["--a2-table-width"]
11027
+ },
11028
+ className: containerClassName,
9982
11029
  children: [
9983
- /* @__PURE__ */ jsx(DataTableHeader, { table, tableRef }),
9984
- /* @__PURE__ */ jsx(
9985
- DataTableRowClickProvider,
11030
+ /* @__PURE__ */ jsxs(
11031
+ TableBase,
9986
11032
  {
9987
- onClickRow,
9988
- readOnlyRowMap,
9989
- children: /* @__PURE__ */ jsx(
9990
- DataTableBody,
9991
- {
9992
- table,
9993
- hasSubRows,
9994
- virtualizer: rowVirtualizer,
9995
- getRowVersion,
9996
- readOnlyRowMap
9997
- }
9998
- )
9999
- }
10000
- ),
10001
- isEmpty && emptyState && /* @__PURE__ */ jsxs(Fragment, { children: [
10002
- /* @__PURE__ */ jsx(SrOnly, { children: "No data to display." }),
10003
- /* @__PURE__ */ jsx("div", { className: styles["empty-state-container"], children: /* @__PURE__ */ jsxs(
10004
- Flex,
10005
- {
10006
- justifyContent: "center",
10007
- alignItems: "center",
10008
- direction: "column",
10009
- gap: 2,
10010
- children: [
10011
- EmptyStateSvg && /* @__PURE__ */ jsx(EmptyStateSvg, { "aria-hidden": "true" }),
10012
- emptyState.content
10013
- ]
10014
- }
10015
- ) })
10016
- ] }),
10017
- isLoading && /* @__PURE__ */ jsxs(Fragment, { children: [
10018
- /* @__PURE__ */ jsx(SrOnly, { children: "Loading data. Please wait." }),
10019
- /* @__PURE__ */ jsx(
10020
- "div",
10021
- {
10022
- style: {
10023
- height: `${loadingSpacerHeight}px`
10024
- },
10025
- role: "presentation",
10026
- "aria-hidden": "true",
10027
- children: /* @__PURE__ */ jsx(
10028
- Flex,
11033
+ type: "data-table",
11034
+ style: cssVars,
11035
+ rowCount,
11036
+ colCount: columnCount,
11037
+ hasSubRows,
11038
+ children: [
11039
+ /* @__PURE__ */ jsx(DataTableHeader, { table, tableRef }),
11040
+ /* @__PURE__ */ jsx(
11041
+ DataTableRowClickProvider,
10029
11042
  {
10030
- justifyContent: "center",
10031
- alignItems: "center",
10032
- style: {
10033
- position: "absolute",
10034
- top: 0,
10035
- bottom: 0,
10036
- left: 0,
10037
- right: 0,
10038
- margin: "auto",
10039
- zIndex: 3
10040
- },
10041
- children: /* @__PURE__ */ jsx(Spinner, {})
11043
+ onClickRow,
11044
+ readOnlyRowMap,
11045
+ children: /* @__PURE__ */ jsx(
11046
+ DataTableBody,
11047
+ {
11048
+ table,
11049
+ hasSubRows,
11050
+ virtualizer: rowVirtualizer,
11051
+ getRowVersion,
11052
+ readOnlyRowMap
11053
+ }
11054
+ )
11055
+ }
11056
+ ),
11057
+ isEmpty && emptyState && /* @__PURE__ */ jsxs(Fragment, { children: [
11058
+ /* @__PURE__ */ jsx(SrOnly, { children: "No data to display." }),
11059
+ /* @__PURE__ */ jsx("div", { className: styles$1["empty-state-container"], children: /* @__PURE__ */ jsxs(
11060
+ Flex,
11061
+ {
11062
+ justifyContent: "center",
11063
+ alignItems: "center",
11064
+ direction: "column",
11065
+ gap: 2,
11066
+ children: [
11067
+ EmptyStateSvg && /* @__PURE__ */ jsx(EmptyStateSvg, { "aria-hidden": "true" }),
11068
+ emptyState.content
11069
+ ]
11070
+ }
11071
+ ) })
11072
+ ] }),
11073
+ isLoading && /* @__PURE__ */ jsxs(Fragment, { children: [
11074
+ /* @__PURE__ */ jsx(SrOnly, { children: "Loading data. Please wait." }),
11075
+ /* @__PURE__ */ jsx(
11076
+ "div",
11077
+ {
11078
+ style: {
11079
+ height: `${loadingSpacerHeight}px`
11080
+ },
11081
+ role: "presentation",
11082
+ "aria-hidden": "true",
11083
+ children: /* @__PURE__ */ jsx(
11084
+ Flex,
11085
+ {
11086
+ justifyContent: "center",
11087
+ alignItems: "center",
11088
+ style: {
11089
+ position: "absolute",
11090
+ top: 0,
11091
+ bottom: 0,
11092
+ left: 0,
11093
+ right: 0,
11094
+ margin: "auto",
11095
+ zIndex: 3
11096
+ },
11097
+ children: /* @__PURE__ */ jsx(Spinner, {})
11098
+ }
11099
+ )
11100
+ }
11101
+ )
11102
+ ] }),
11103
+ hasFooters && !isTrulyEmpty && /* @__PURE__ */ jsx(
11104
+ DataTableFooter,
11105
+ {
11106
+ className: pagination ? styles$1["footer-with-pagination"] : void 0,
11107
+ table,
11108
+ columns: columnsProp,
11109
+ customFooter
10042
11110
  }
10043
11111
  )
10044
- }
10045
- )
10046
- ] }),
10047
- hasFooters && !isTrulyEmpty && /* @__PURE__ */ jsx(
10048
- DataTableFooter,
11112
+ ]
11113
+ }
11114
+ ),
11115
+ isEmpty && emptyState?.includeAddRow && rowAdd && /* @__PURE__ */ jsx(DataTableEmptyAddRow, { rowAdd }),
11116
+ pagination && !isTrulyEmpty && (isCursorPagination ? /* @__PURE__ */ jsx(
11117
+ DataTableCursorPagination,
10049
11118
  {
10050
- className: pagination ? styles["footer-with-pagination"] : void 0,
10051
- table,
10052
- columns: columnsProp,
10053
- customFooter
11119
+ itemsPerPage: rowsPerPage,
11120
+ page: effectivePageIndex + 1,
11121
+ hasNextPage: paginationObject?.hasNextPage,
11122
+ hasPrevPage: paginationObject?.hasPrevPage,
11123
+ onPageChange: (page) => {
11124
+ setCurrentPageIndex(page - 1);
11125
+ },
11126
+ onItemsPerPageChange: (itemsPerPage) => {
11127
+ paginationObject?.onRowsPerPageChange?.(itemsPerPage);
11128
+ },
11129
+ itemsPerPageOptions: paginationObject?.onRowsPerPageChange ? paginationObject.rowsPerPageOptions : void 0,
11130
+ itemsPerPageLabel: paginationObject?.itemsPerPageLabel
10054
11131
  }
10055
- )
11132
+ ) : /* @__PURE__ */ jsx(
11133
+ DataTablePagination,
11134
+ {
11135
+ itemsPerPage: rowsPerPage,
11136
+ showCount: paginationObject?.showCount ?? true,
11137
+ page: effectivePageIndex + 1,
11138
+ totalItemCount,
11139
+ onPageChange: (page) => {
11140
+ setCurrentPageIndex(page - 1);
11141
+ },
11142
+ onItemsPerPageChange: (itemsPerPage) => {
11143
+ paginationObject?.onRowsPerPageChange?.(itemsPerPage);
11144
+ },
11145
+ itemsPerPageOptions: paginationObject?.rowsPerPageOptions,
11146
+ itemsPerPageLabel: paginationObject?.itemsPerPageLabel,
11147
+ itemRangeFormatter: paginationObject?.itemRangeFormatter
11148
+ }
11149
+ ))
10056
11150
  ]
10057
11151
  }
10058
11152
  ),
10059
- pagination && !isTrulyEmpty && (isCursorPagination ? /* @__PURE__ */ jsx(
10060
- DataTableCursorPagination,
10061
- {
10062
- itemsPerPage: rowsPerPage,
10063
- page: (currentPageIndex ?? 0) + 1,
10064
- hasNextPage: paginationObject?.hasNextPage,
10065
- hasPrevPage: paginationObject?.hasPrevPage,
10066
- onPageChange: (page) => {
10067
- setCurrentPageIndex(page - 1);
10068
- },
10069
- onItemsPerPageChange: (itemsPerPage) => {
10070
- paginationObject?.onRowsPerPageChange?.(itemsPerPage);
10071
- },
10072
- itemsPerPageOptions: paginationObject?.onRowsPerPageChange ? paginationObject.rowsPerPageOptions : void 0
10073
- }
10074
- ) : /* @__PURE__ */ jsx(
10075
- DataTablePagination,
10076
- {
10077
- itemsPerPage: rowsPerPage,
10078
- showCount: paginationObject?.showCount ?? true,
10079
- page: (currentPageIndex ?? 0) + 1,
10080
- totalItemCount,
10081
- onPageChange: (page) => {
10082
- setCurrentPageIndex(page - 1);
10083
- },
10084
- onItemsPerPageChange: (itemsPerPage) => {
10085
- paginationObject?.onRowsPerPageChange?.(itemsPerPage);
10086
- },
10087
- itemsPerPageOptions: paginationObject?.rowsPerPageOptions
10088
- }
10089
- ))
11153
+ rowAdd && /* @__PURE__ */ jsx(DataTableAddRow, { rowAdd })
10090
11154
  ]
10091
11155
  }
10092
11156
  ) })
10093
11157
  }
10094
11158
  );
11159
+ return tableElement;
10095
11160
  }
10096
11161
  const DataTable = forwardRef(DataTableInner);
10097
11162
 
10098
- export { COLUMN_TYPE_DEFAULTS as C, DataTable as D, chipsFormatter as a, booleanFormatter as b, createColumnHelper$1 as c, currencyFormatter as d, dateFormatter as e, dateTimeFormatter as f, getColumnTypeDefaults as g, htmlFormatter as h, dateFormatPresets as i, timeFormatter as j, markdownFormatter as m, numberFormatter as n, percentFormatter as p, resolveColumnTypeConfig as r, timeFormatPresets as t, yearlessDateFormatter as y };
10099
- //# sourceMappingURL=DataTable-DIXP9-Bx.js.map
11163
+ function DataTableEditColumnsDrawer({
11164
+ open,
11165
+ onClose,
11166
+ sections
11167
+ }) {
11168
+ const drawerSections = useMemo(
11169
+ () => sections.map((section, i) => toEditColumnsSection(section, `${i}`)),
11170
+ [sections]
11171
+ );
11172
+ return /* @__PURE__ */ jsx(
11173
+ EditColumnsDrawer,
11174
+ {
11175
+ open,
11176
+ onClose,
11177
+ sections: drawerSections
11178
+ }
11179
+ );
11180
+ }
11181
+
11182
+ export { COLUMN_TYPE_DEFAULTS as C, DataTable as D, chipsFormatter as a, booleanFormatter as b, createColumnHelper$1 as c, currencyFormatter as d, dateFormatter as e, dateTimeFormatter as f, getColumnTypeDefaults as g, htmlFormatter as h, dateFormatPresets as i, timeFormatter as j, DataTableEditColumnsDrawer as k, markdownFormatter as m, numberFormatter as n, percentFormatter as p, resolveColumnTypeConfig as r, timeFormatPresets as t, yearlessDateFormatter as y };
11183
+ //# sourceMappingURL=DataTableEditColumnsDrawer-C7OHRsJU.js.map