@alfadocs/ui-kit 1.114.0 → 1.115.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 (290) hide show
  1. package/dist/_chunks/{actions-cell-renderer-BVn3vDTg.js → actions-cell-renderer-bI27uXXC.js} +2 -2
  2. package/dist/_chunks/{ai-permission-notice-BkgcGmu8.js → ai-permission-notice-C-xR2_iS.js} +2 -2
  3. package/dist/_chunks/{alia-sidebar-CKkg3gc8.js → alia-sidebar-BBxbMRmX.js} +2 -2
  4. package/dist/_chunks/{anamnesis-summary-rows-DaS-j8Jd.js → anamnesis-summary-rows-BZ36ULQk.js} +4 -4
  5. package/dist/_chunks/{antenatal-schedule-timeline-DmlXxevC.js → antenatal-schedule-timeline-va9zx7tJ.js} +11 -11
  6. package/dist/_chunks/{appointment-card-FKOnH1uJ.js → appointment-card-D_-aBrx5.js} +2 -2
  7. package/dist/_chunks/{appointment-timeline-eOi-y8m3.js → appointment-timeline-DxLu3afn.js} +3 -3
  8. package/dist/_chunks/{appointment-tray-C6oBvsG5.js → appointment-tray-BhXOJpIJ.js} +2 -2
  9. package/dist/_chunks/{ar-C4YQVTH6.js → ar-BFvUBJ_g.js} +10 -10
  10. package/dist/_chunks/{balance-badge-cell-BAZynD--.js → balance-badge-cell-CXHihM22.js} +28 -27
  11. package/dist/_chunks/buildMatchPatternFn-jbaE1-W0.js +68 -0
  12. package/dist/_chunks/{calendar-appointment-editor-dialog-iyh9QqNw.js → calendar-appointment-editor-dialog-BVzFi4hH.js} +519 -531
  13. package/dist/_chunks/{care-plan-card-DMjlYlFc.js → care-plan-card-BA3MfdfZ.js} +2 -2
  14. package/dist/_chunks/{care-plan-entry-card-3hguBW45.js → care-plan-entry-card-CUtFZ813.js} +2 -2
  15. package/dist/_chunks/{chart-bddVIElM.js → chart-DebrFZ6L.js} +2 -2
  16. package/dist/_chunks/{chat-container-baxzy8k8.js → chat-container-B83b4hut.js} +2 -2
  17. package/dist/_chunks/checkbox-DV4sNDeB.js +282 -0
  18. package/dist/_chunks/{checkbox-group-eGdv9fZc.js → checkbox-group-EfinQS1h.js} +2 -2
  19. package/dist/_chunks/chevrons-up-down-CgiVAHb7.js +15 -0
  20. package/dist/_chunks/compact-editor-fields-cP6yh7xv.js +21 -0
  21. package/dist/_chunks/{cycle-calculator-Dd-XbKmZ.js → cycle-calculator-C68V9rdH.js} +5 -5
  22. package/dist/_chunks/data-grid-tabs-CsLbIv0h.js +365 -0
  23. package/dist/_chunks/data-table-DXaE2Ret.js +1693 -0
  24. package/dist/_chunks/data-table-tabs-NYLhD8_Z.js +242 -0
  25. package/dist/_chunks/date-locale-OG-MupVD.js +83 -0
  26. package/dist/_chunks/{date-picker-CdhXlgVI.js → date-picker-DBVTj6lO.js} +21 -20
  27. package/dist/_chunks/{date-picker-variants-Dt6UbonG.js → date-picker-variants-J1EeAhIH.js} +601 -678
  28. package/dist/_chunks/date-range-panel-CBFfkgmz.js +62 -0
  29. package/dist/_chunks/{date-range-picker-DCADIR8o.js → date-range-picker-PTRpDkXT.js} +72 -70
  30. package/dist/_chunks/{date-time-picker-CT2bC7-A.js → date-time-picker-CJnqiQoT.js} +22 -21
  31. package/dist/_chunks/{de-B1B3PIgY.js → de-i9wbjGPc.js} +2 -2
  32. package/dist/_chunks/{due-date-calculator-Dl6SyMHO.js → due-date-calculator-C1UA5jpS.js} +6 -6
  33. package/dist/_chunks/{editable-currency-cell-renderer-BUdFMh67.js → editable-currency-cell-renderer-CtlMhLai.js} +3 -3
  34. package/dist/_chunks/{el-iLqGpapg.js → el-Cm-rWthb.js} +20 -20
  35. package/dist/_chunks/{en-GB-CxPRQbD6.js → en-GB-BHn82gW8.js} +11 -10
  36. package/dist/_chunks/en-US-C4QKhzhA.js +46 -0
  37. package/dist/_chunks/{es-Bg1oqwDs.js → es-B_6Z19UA.js} +4 -4
  38. package/dist/_chunks/{face-scheme-DlcQaQVR.js → face-scheme-DkoxiDCh.js} +2 -2
  39. package/dist/_chunks/{file-manager-LG7B_UHB.js → file-manager-DFFExyym.js} +4 -4
  40. package/dist/_chunks/format-ql5WTsYT.js +846 -0
  41. package/dist/_chunks/{fr-DpGxyOGI.js → fr-gTba51QO.js} +7 -7
  42. package/dist/_chunks/funnel-DpPV3Qkd.js +20 -0
  43. package/dist/_chunks/{gestational-age-calculator-DmzYdW5e.js → gestational-age-calculator-60y1RyQL.js} +7 -7
  44. package/dist/_chunks/grid-context-AwsLJRhH.js +46 -0
  45. package/dist/_chunks/{hcg-doubling-Tr72PetS.js → hcg-doubling-CC-dbKE8.js} +6 -5
  46. package/dist/_chunks/{heatmap-CNxCDl0D.js → heatmap-eXdtmEoU.js} +4 -4
  47. package/dist/_chunks/{hi-3Dtsksrw.js → hi-BIHq9ncx.js} +10 -10
  48. package/dist/_chunks/icon-button-group-C9mPK-bX.js +442 -0
  49. package/dist/_chunks/{index-CJE9uQmb.js → index-Bze5jCG_.js} +2 -1
  50. package/dist/_chunks/{isSameWeek-DyVftHWi.js → isSameWeek-CZOtDcsd.js} +2 -2
  51. package/dist/_chunks/{it-Cp0CA13d.js → it-DaCPWJ9Y.js} +11 -11
  52. package/dist/_chunks/{ja-9FOyR1lb.js → ja-BRCpkD95.js} +26 -26
  53. package/dist/_chunks/{kit-extensions-DZJRmDI6.js → kit-extensions-CzG0RmhQ.js} +4 -4
  54. package/dist/_chunks/link-cell-renderer-Ditt5mvT.js +800 -0
  55. package/dist/_chunks/{login-dev-card-D7orCfJT.js → login-dev-card-CPndtWdz.js} +2 -2
  56. package/dist/_chunks/{marketplace-app-shell-CPNVBVLH.js → marketplace-app-shell-CcEHJgDd.js} +2 -2
  57. package/dist/_chunks/match-BATShpSX.js +336 -0
  58. package/dist/_chunks/{nl-sfx-zJgR.js → nl-5tAwYo00.js} +6 -6
  59. package/dist/_chunks/normalizeDates-BBNNIR-v.js +36 -0
  60. package/dist/_chunks/{notes-panel-DXMTObBv.js → notes-panel-BVYG_MJE.js} +2 -2
  61. package/dist/_chunks/{parse-B0s7bY4d.js → parse-BLBWPIgE.js} +63 -61
  62. package/dist/_chunks/{parseISO-DZZ5a-zK.js → parseISO-Dl4T9peU.js} +2 -2
  63. package/dist/_chunks/parts-Wz2LeGnH.js +1113 -0
  64. package/dist/_chunks/{patient-details-DdtXBNjt.js → patient-details-DlT-vpSe.js} +2 -2
  65. package/dist/_chunks/{patient-field-row-D9rb-QJH.js → patient-field-row-B54uzvu-.js} +3 -3
  66. package/dist/_chunks/{patient-summary-card-CGHz-Bvm.js → patient-summary-card-Dy9-CzON.js} +3 -3
  67. package/dist/_chunks/{periodontal-diagnosis-xheWfi4g.js → periodontal-diagnosis-DnZuZD14.js} +2 -2
  68. package/dist/_chunks/{permission-matrix-BJ6sg3Zp.js → permission-matrix-BXmhICzN.js} +3 -3
  69. package/dist/_chunks/{pl-BLh7KO-s.js → pl-mLYbfByR.js} +7 -7
  70. package/dist/_chunks/{pregnancy-dating-BvorzHrd.js → pregnancy-dating-qZpw3zj8.js} +7 -7
  71. package/dist/_chunks/privacy-mask-BlJK51MD.js +78 -0
  72. package/dist/_chunks/privacy-mask-text-B8YfzB7L.js +7 -0
  73. package/dist/_chunks/{pt-CPKOrOLj.js → pt-CgaqtlD9.js} +6 -6
  74. package/dist/_chunks/{radiograph-panel.agent-CXah49KM.js → radiograph-panel.agent-C1LGeX-G.js} +3 -3
  75. package/dist/_chunks/{registration-form-Lw9T7IXr.js → registration-form-DW-0X7S4.js} +2 -2
  76. package/dist/_chunks/{reserved.agent-D2jwJPac.js → reserved.agent-6p3Hm4oH.js} +9 -9
  77. package/dist/_chunks/{rich-text-editor-BLS2cK-u.js → rich-text-editor-efaMWbYz.js} +3 -3
  78. package/dist/_chunks/{ro-Dc-oNqbF.js → ro-CpDg1-8v.js} +2 -2
  79. package/dist/_chunks/{ru-BtNpDZRR.js → ru-B7VMyjud.js} +9 -9
  80. package/dist/_chunks/saved-view-tabs-DLWm88Eq.js +932 -0
  81. package/dist/_chunks/{send-registration-link-form-DfbTjrEK.js → send-registration-link-form-DWxWa_cJ.js} +5 -5
  82. package/dist/_chunks/{sidebar-2VsPlNkZ.js → sidebar-D5DFYN5K.js} +326 -335
  83. package/dist/_chunks/{slot-grid-BhjaLJ0o.js → slot-grid-b4eZXokb.js} +3 -3
  84. package/dist/_chunks/{sq-D4c7olaV.js → sq-B0Ree_9P.js} +2 -2
  85. package/dist/_chunks/subDays-Bsoy023P.js +8 -0
  86. package/dist/_chunks/{sv-Bf_dHPvh.js → sv-D9fP66O7.js} +4 -4
  87. package/dist/_chunks/{tag-DOZGz0fT.js → tag-BNlcEJfE.js} +70 -67
  88. package/dist/_chunks/{task-card-DqVoitRk.js → task-card-BNbkwIYM.js} +2 -2
  89. package/dist/_chunks/{task-editor-D--LwVrg.js → task-editor-CSa6vQ9r.js} +377 -391
  90. package/dist/_chunks/{task-tray-C6j8HVMv.js → task-tray-Bmi9wCHq.js} +2 -2
  91. package/dist/_chunks/{tasks-panel-D6PuF4MQ.js → tasks-panel-CVjY1d7Q.js} +2 -2
  92. package/dist/_chunks/{theme-toggle-Czq3K9jB.js → theme-toggle-CObX2Ffa.js} +2 -2
  93. package/dist/_chunks/toolbar-Bc3pjfG5.js +9907 -0
  94. package/dist/_chunks/{tr-xqQ6cbGY.js → tr-Bcz5LCHZ.js} +2 -2
  95. package/dist/_chunks/{transcript-panel-A781Pkzr.js → transcript-panel-Wr8e4Zgi.js} +2 -2
  96. package/dist/_chunks/{treatment-receipt-pFqWFyD_.js → treatment-receipt-BydbojdD.js} +2 -2
  97. package/dist/_chunks/{use-appointment-details-read-BK_Gw1GG.js → use-appointment-details-read-BMAiQYo6.js} +4 -4
  98. package/dist/_chunks/{voice-control-panel-BGiX4sqB.js → voice-control-panel-Be_c0CQ0.js} +2 -2
  99. package/dist/_chunks/{workflow-webhook-action-CtBn5JvO.js → workflow-webhook-action-DNSe65yd.js} +2 -2
  100. package/dist/_chunks/{zh-CN-C657DBCO.js → zh-CN-B7Ek17US.js} +11 -11
  101. package/dist/agent-catalog.json +717 -6
  102. package/dist/agent-i18n/en.json +50 -2
  103. package/dist/components/_shared/privacy-mask-text.d.ts +4 -0
  104. package/dist/components/_shared/privacy-mask.d.ts +2 -4
  105. package/dist/components/_shared/saved-view-tabs/saved-tab.d.ts +54 -0
  106. package/dist/components/_shared/saved-view-tabs/saved-view-tabs.d.ts +93 -0
  107. package/dist/components/_shared/saved-view-tabs/use-saved-view-tabs.d.ts +59 -0
  108. package/dist/components/_shared/saved-view-tabs/view-adapter.d.ts +69 -0
  109. package/dist/components/_shared/table-filters/calendar-day.d.ts +27 -0
  110. package/dist/components/_shared/table-filters/predicates.d.ts +56 -0
  111. package/dist/components/_shared/table-toolbar/context.d.ts +28 -0
  112. package/dist/components/_shared/table-toolbar/describe-filter.d.ts +42 -0
  113. package/dist/components/_shared/table-toolbar/export-files.d.ts +47 -0
  114. package/dist/components/{data-table/xlsx-export.d.ts → _shared/table-toolbar/export-xlsx.d.ts} +2 -2
  115. package/dist/components/_shared/table-toolbar/parts.d.ts +125 -0
  116. package/dist/components/_shared/table-toolbar/seam.d.ts +261 -0
  117. package/dist/components/ai-permission-notice/index.js +1 -1
  118. package/dist/components/appointment-card/index.js +2 -2
  119. package/dist/components/appointment-details-panel/index.js +1 -1
  120. package/dist/components/appointment-timeline/index.js +1 -1
  121. package/dist/components/booking/index.js +1 -1
  122. package/dist/components/care-plan-card/index.js +1 -1
  123. package/dist/components/care-plan-entry-card/index.js +1 -1
  124. package/dist/components/chart/index.js +1 -1
  125. package/dist/components/chat-container/index.js +1 -1
  126. package/dist/components/checkbox/checkbox.d.ts +66 -6
  127. package/dist/components/checkbox/index.js +1 -1
  128. package/dist/components/checkbox-group/index.js +1 -1
  129. package/dist/components/cycle-calculator/index.js +1 -1
  130. package/dist/components/data-grid/announcer.d.ts +27 -0
  131. package/dist/components/data-grid/body.d.ts +95 -0
  132. package/dist/components/data-grid/columns.d.ts +96 -0
  133. package/dist/components/data-grid/data-grid.agent.d.ts +2 -1
  134. package/dist/components/data-grid/data-grid.d.ts +11 -27
  135. package/dist/components/data-grid/data-grid.variants.d.ts +118 -0
  136. package/dist/components/data-grid/editors.d.ts +8 -0
  137. package/dist/components/data-grid/export-snapshot.d.ts +3 -0
  138. package/dist/components/data-grid/features.d.ts +56 -0
  139. package/dist/components/data-grid/filter-fns.d.ts +23 -0
  140. package/dist/components/data-grid/filters/date-range-panel.d.ts +8 -0
  141. package/dist/components/data-grid/filters/filter-panels.d.ts +27 -0
  142. package/dist/components/data-grid/filters/filter-trigger.d.ts +7 -0
  143. package/dist/components/data-grid/footer.d.ts +10 -0
  144. package/dist/components/data-grid/grid-context.d.ts +18 -0
  145. package/dist/components/data-grid/handle.d.ts +60 -0
  146. package/dist/components/data-grid/header.d.ts +12 -0
  147. package/dist/components/data-grid/index.d.ts +3 -0
  148. package/dist/components/data-grid/index.js +10 -3
  149. package/dist/components/data-grid/keyboard.d.ts +76 -0
  150. package/dist/components/data-grid/pager.d.ts +18 -0
  151. package/dist/components/data-grid/persistence.d.ts +60 -0
  152. package/dist/components/data-grid/print.d.ts +10 -0
  153. package/dist/components/data-grid/responsive.d.ts +36 -0
  154. package/dist/components/data-grid/selection.d.ts +58 -0
  155. package/dist/components/data-grid/state.d.ts +119 -0
  156. package/dist/components/data-grid/states.d.ts +34 -0
  157. package/dist/components/data-grid/toolbar-seam.d.ts +7 -0
  158. package/dist/components/data-grid/toolbar.d.ts +41 -0
  159. package/dist/components/data-grid/types.d.ts +1346 -0
  160. package/dist/components/data-grid/use-data-grid-engine.d.ts +9 -0
  161. package/dist/components/data-grid/virtual-rows.d.ts +43 -0
  162. package/dist/components/data-grid-tabs/data-grid-tabs.agent.d.ts +9 -0
  163. package/dist/components/data-grid-tabs/data-grid-tabs.d.ts +4 -0
  164. package/dist/components/data-grid-tabs/grid-view-adapter.d.ts +15 -0
  165. package/dist/components/data-grid-tabs/index.d.ts +5 -0
  166. package/dist/components/data-grid-tabs/index.js +8 -0
  167. package/dist/components/data-grid-tabs/types.d.ts +220 -0
  168. package/dist/components/data-table/ag-toolbar-seam.d.ts +35 -0
  169. package/dist/components/data-table/calendar-day.d.ts +4 -21
  170. package/dist/components/data-table/data-table.d.ts +10 -6
  171. package/dist/components/data-table/filters/date-range-filter.d.ts +5 -9
  172. package/dist/components/data-table/filters/filter-kind.d.ts +6 -0
  173. package/dist/components/data-table/filters/number-filter.d.ts +6 -10
  174. package/dist/components/data-table/filters/select-filter.d.ts +2 -4
  175. package/dist/components/data-table/filters/text-filter.d.ts +2 -5
  176. package/dist/components/data-table/index.js +4 -4
  177. package/dist/components/data-table/toolbar.d.ts +25 -21
  178. package/dist/components/data-table-tabs/ag-view-adapter.d.ts +17 -0
  179. package/dist/components/data-table-tabs/data-table-tabs.d.ts +34 -33
  180. package/dist/components/data-table-tabs/index.js +1 -1
  181. package/dist/components/data-table-tabs/use-data-table-filter-tabs.d.ts +11 -66
  182. package/dist/components/date-picker/index.js +1 -1
  183. package/dist/components/date-range-picker/index.js +1 -1
  184. package/dist/components/date-time-picker/index.js +1 -1
  185. package/dist/components/due-date-calculator/index.js +2 -2
  186. package/dist/components/face-scheme/index.js +1 -1
  187. package/dist/components/file-manager/index.js +1 -1
  188. package/dist/components/gestational-age-calculator/index.js +1 -1
  189. package/dist/components/hcg-doubling/index.js +1 -1
  190. package/dist/components/heatmap/index.js +1 -1
  191. package/dist/components/icon-button-group/icon-button-group.d.ts +19 -1
  192. package/dist/components/icon-button-group/index.d.ts +1 -1
  193. package/dist/components/icon-button-group/index.js +1 -1
  194. package/dist/components/index.d.ts +1 -0
  195. package/dist/components/notes-panel/index.js +1 -1
  196. package/dist/components/patient-details/index.js +1 -1
  197. package/dist/components/patient-summary-card/index.js +1 -1
  198. package/dist/components/patient-table/index.js +1 -1
  199. package/dist/components/periodontal-diagnosis/index.js +1 -1
  200. package/dist/components/permission-matrix/index.js +1 -1
  201. package/dist/components/pregnancy-dating/index.js +1 -1
  202. package/dist/components/radiograph-panel/index.js +1 -1
  203. package/dist/components/rich-text-editor/index.js +2 -2
  204. package/dist/components/sidebar/index.js +1 -1
  205. package/dist/components/slot-grid/index.js +1 -1
  206. package/dist/components/tag/index.js +1 -1
  207. package/dist/components/task-card/index.js +1 -1
  208. package/dist/components/task-editor/index.js +1 -1
  209. package/dist/components/task-tray/index.js +1 -1
  210. package/dist/components/tasks-panel/index.js +1 -1
  211. package/dist/components/theme-toggle/index.js +1 -1
  212. package/dist/components/transcript-panel/index.js +1 -1
  213. package/dist/components/treatment-receipt/index.js +1 -1
  214. package/dist/components/voice-control-panel/index.js +1 -1
  215. package/dist/core.css +1 -1
  216. package/dist/host-compat.css +33 -2
  217. package/dist/i18n/locales/ar.d.ts +94 -0
  218. package/dist/i18n/locales/ar.js +96 -2
  219. package/dist/i18n/locales/de.d.ts +94 -0
  220. package/dist/i18n/locales/de.js +96 -2
  221. package/dist/i18n/locales/el.d.ts +94 -0
  222. package/dist/i18n/locales/el.js +96 -2
  223. package/dist/i18n/locales/en.d.ts +94 -0
  224. package/dist/i18n/locales/en.js +97 -2
  225. package/dist/i18n/locales/es.d.ts +94 -0
  226. package/dist/i18n/locales/es.js +96 -2
  227. package/dist/i18n/locales/fr.d.ts +94 -0
  228. package/dist/i18n/locales/fr.js +96 -2
  229. package/dist/i18n/locales/hi.d.ts +94 -0
  230. package/dist/i18n/locales/hi.js +96 -2
  231. package/dist/i18n/locales/it.d.ts +94 -0
  232. package/dist/i18n/locales/it.js +96 -2
  233. package/dist/i18n/locales/ja.d.ts +94 -0
  234. package/dist/i18n/locales/ja.js +96 -2
  235. package/dist/i18n/locales/nl.d.ts +94 -0
  236. package/dist/i18n/locales/nl.js +96 -2
  237. package/dist/i18n/locales/pl.d.ts +94 -0
  238. package/dist/i18n/locales/pl.js +96 -2
  239. package/dist/i18n/locales/pt.d.ts +94 -0
  240. package/dist/i18n/locales/pt.js +96 -2
  241. package/dist/i18n/locales/ro.d.ts +94 -0
  242. package/dist/i18n/locales/ro.js +96 -2
  243. package/dist/i18n/locales/ru.d.ts +94 -0
  244. package/dist/i18n/locales/ru.js +96 -2
  245. package/dist/i18n/locales/sq.d.ts +94 -0
  246. package/dist/i18n/locales/sq.js +96 -2
  247. package/dist/i18n/locales/sv.d.ts +94 -0
  248. package/dist/i18n/locales/sv.js +96 -2
  249. package/dist/i18n/locales/tr.d.ts +94 -0
  250. package/dist/i18n/locales/tr.js +96 -2
  251. package/dist/i18n/locales/zh.d.ts +94 -0
  252. package/dist/i18n/locales/zh.js +96 -2
  253. package/dist/index.js +1044 -1032
  254. package/dist/locales/ar.json +96 -2
  255. package/dist/locales/de.json +96 -2
  256. package/dist/locales/el.json +96 -2
  257. package/dist/locales/en.json +96 -2
  258. package/dist/locales/es.json +96 -2
  259. package/dist/locales/fr.json +96 -2
  260. package/dist/locales/hi.json +96 -2
  261. package/dist/locales/it.json +96 -2
  262. package/dist/locales/ja.json +96 -2
  263. package/dist/locales/nl.json +96 -2
  264. package/dist/locales/pl.json +96 -2
  265. package/dist/locales/pt.json +96 -2
  266. package/dist/locales/ro.json +96 -2
  267. package/dist/locales/ru.json +96 -2
  268. package/dist/locales/sq.json +96 -2
  269. package/dist/locales/sv.json +96 -2
  270. package/dist/locales/tr.json +96 -2
  271. package/dist/locales/zh.json +96 -2
  272. package/dist/patterns/alia-assistant/index.js +1 -1
  273. package/dist/patterns/anamnesis/index.js +1 -1
  274. package/dist/patterns/calendar/index.js +1 -1
  275. package/dist/patterns/login-form/index.js +1 -1
  276. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  277. package/dist/patterns/registration-form/index.js +1 -1
  278. package/dist/patterns/send-registration-link-form/index.js +1 -1
  279. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  280. package/dist/tokens.css +1 -1
  281. package/package.json +5 -1
  282. package/dist/_chunks/checkbox-a7Sh-dXb.js +0 -227
  283. package/dist/_chunks/data-grid.agent-CASyEAnb.js +0 -1773
  284. package/dist/_chunks/data-table-C9idMvs0.js +0 -2042
  285. package/dist/_chunks/data-table-tabs-Db7zToFD.js +0 -728
  286. package/dist/_chunks/format--x5jypvH.js +0 -1319
  287. package/dist/_chunks/icon-button-group-mXvYDaba.js +0 -427
  288. package/dist/_chunks/link-cell-renderer-_Fv3WEmb.js +0 -867
  289. package/dist/_chunks/privacy-mask-Dc3kdkCR.js +0 -81
  290. package/dist/_chunks/subDays-DKISP2nE.js +0 -8
@@ -0,0 +1,1346 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ import type { ButtonProps } from '../button/button';
3
+ import type { IconButtonProps } from '../button/icon-button';
4
+ import type { EmptyStateHeadingLevel } from '../empty-state';
5
+ import type { NumberInputMode } from '../number-input';
6
+ import type { DateRangeFilterModel, NumberFilterModel, NumberFilterOperator, SelectFilterModel, TableExportSnapshot, TableToolbarSeam, TextFilterModel, TextFilterOperator, ToolbarActionContext } from '../_shared/table-toolbar/seam';
7
+ /**
8
+ * Rows are virtualised when more than this many body items (rows plus open
9
+ * detail panels, after filters, sorting, expansion and paging) would render.
10
+ * 100 = the largest offered page size, so a paged grid always keeps every row
11
+ * in the DOM (find in page, print, screen-reader table navigation); also the
12
+ * kit's existing number (`transcript-panel.tsx:81`, `08-third-party.mdx:25`)
13
+ * and well inside the PRS ceiling of 500 (`19-performance.mdx:30`).
14
+ */
15
+ export declare const DATA_GRID_VIRTUALIZE_ABOVE = 100;
16
+ /** Default rows per page when `pagination` is on. */
17
+ export declare const DATA_GRID_DEFAULT_PAGE_SIZE = 25;
18
+ /** Default page-size choices. The largest equals `DATA_GRID_VIRTUALIZE_ABOVE`. */
19
+ export declare const DATA_GRID_PAGE_SIZE_OPTIONS: readonly number[];
20
+ /** Default cap on sort levels (v9 `maxMultiSortColCount`,
21
+ * `features/row-sorting/rowSortingFeature.types.d.ts:193`). */
22
+ export declare const DATA_GRID_MAX_SORT_LEVELS = 3;
23
+ /**
24
+ * Container inline sizes (px) at which `responsiveTier` 1, 2 and 3 columns
25
+ * appear: PatientTable's tiers (`patient-table/use-responsive-columns.ts:88-93`).
26
+ * Measured on the grid's own root with a ResizeObserver, not the viewport.
27
+ */
28
+ export declare const DATA_GRID_RESPONSIVE_BREAKPOINTS: readonly [640, 900, 1200];
29
+ /** localStorage key prefix for saved column state: `<prefix><gridId>`.
30
+ * Distinct from DataTable's `data-table-col-state:` (`data-table.tsx:293`). */
31
+ export declare const DATA_GRID_COLUMN_STATE_PREFIX = "data-grid-col-state:";
32
+ /** Keyboard resize step on the separator (Arrow keys); Shift multiplies by 4. */
33
+ export declare const DATA_GRID_RESIZE_STEP_PX = 16;
34
+ export type DataGridTextFilterModel = TextFilterModel;
35
+ export type DataGridNumberFilterModel = NumberFilterModel;
36
+ export type DataGridSelectFilterModel = SelectFilterModel;
37
+ export type DataGridDateRangeFilterModel = DateRangeFilterModel;
38
+ export type DataGridTextFilterOperator = TextFilterOperator;
39
+ export type DataGridNumberFilterOperator = NumberFilterOperator;
40
+ /** A model DataGrid evaluates on a column in client mode. */
41
+ export type DataGridColumnFilterModel = TextFilterModel | NumberFilterModel | SelectFilterModel | DateRangeFilterModel;
42
+ /**
43
+ * Every active filter, keyed by column id: the same shape as
44
+ * `DataTableHandle.getFilter()`, so DataGridTabs, DataTableTabs and agents
45
+ * read one model.
46
+ *
47
+ * A key that names no column is a **host key**: a filter the host applies on
48
+ * its server (HTP-7312 keeps the platform's advanced filters). DataGrid
49
+ * carries it, reports it in `onFiltersChange` and `onQueryChange`, saves it in
50
+ * tabs, shows it as a chip (label from `filterLabels`) and never evaluates it.
51
+ * v9 sees only column keys (`columnFilters: { id, value }[]`,
52
+ * `features/column-filtering/columnFilteringFeature.types.d.ts:21-28`).
53
+ */
54
+ export type DataGridFilterModel = Record<string, unknown>;
55
+ /** A plain value the grid can sort, filter, search and export. Dates are
56
+ * `Date` objects or ISO `YYYY-MM-DD` strings (calendar days). */
57
+ export type DataGridCellValue = string | number | boolean | Date | null | undefined;
58
+ /** Second argument of `cell`. Optional for callers: `cell(row)` still fits. */
59
+ export interface DataGridCellContext {
60
+ /** `getRowId(row)`: the only row datum allowed in a DOM attribute. */
61
+ rowId: string;
62
+ /** 0-based position in display order (after filters and sorting, before
63
+ * paging; expanded sub-rows included, detail panels not). v9
64
+ * `row.getDisplayIndex()` (`core/rows/coreRowsFeature.types.d.ts:62`). */
65
+ displayIndex: number;
66
+ /** Sub-row depth; 0 for top-level rows. */
67
+ depth: number;
68
+ isSelected: boolean;
69
+ /** `isRowReadOnly(row)` or the column's `edit.isEditable(row) === false`. */
70
+ isReadOnly: boolean;
71
+ /** Plain row name for visible text ("Nitrile gloves M"); "Row 3" under
72
+ * privacy mode (see `getRowLabel`). Never put it in an attribute
73
+ * (`aria-label`, `title`, `data-*`): name controls with
74
+ * `inputLabelledBy`. */
75
+ rowLabel: string;
76
+ /** Plain column name (`headerLabel`, or `header` when it is a string). */
77
+ columnLabel: string;
78
+ /** Id of a `hidden` element the grid renders in this cell, holding the
79
+ * translated "{{column}}, {{row}}" (`ui.dataGrid.cell.inputLabel`). Pass
80
+ * it as `aria-labelledby` on a control in the cell, so the row name stays
81
+ * text and never becomes an attribute. Built from `useId` and indexes,
82
+ * never from row data. */
83
+ inputLabelledBy: string;
84
+ }
85
+ /** Context for a function `footer` (the pinned totals row). */
86
+ export interface DataGridFooterContext<TData> {
87
+ /** Client mode: every top-level row after filters, all pages (v9
88
+ * `getFilteredRowModel().rows`, never `flatRows`), so a footer that sums
89
+ * `rows` never counts a sub-row twice. Server mode: the current page's
90
+ * top-level rows only. */
91
+ rows: readonly TData[];
92
+ /** Selected row ids (all pages), for "selected total" footers. */
93
+ selectedRowIds: readonly string[];
94
+ /** Which rows `rows` covers. */
95
+ scope: 'all-filtered' | 'current-page';
96
+ }
97
+ /** An option for a `select` filter or editor. Values, never labels, are
98
+ * stored in models and saved tabs. */
99
+ export interface DataGridOption {
100
+ value: string | number;
101
+ label: string;
102
+ }
103
+ /**
104
+ * A column's filter. Declarative: the panel for each kind is a kit input set
105
+ * the grid owns (text: Select + TextInput; number: Select + NumberInput;
106
+ * select: Checkbox list; dateRange: DateRangePicker, loaded lazily). Backed by
107
+ * v9 `enableColumnFilter` + a kit `filterFn` built with `constructFilterFn`
108
+ * (`features/column-filtering/columnFilteringFeature.types.d.ts:111,115`,
109
+ * `features/column-filtering/filterFns.d.ts:35`). Needs `value` on the column.
110
+ */
111
+ export type DataGridColumnFilter = {
112
+ kind: 'text';
113
+ /** Default: all five operators. */
114
+ operators?: readonly TextFilterOperator[];
115
+ /** Default `'contains'`. */
116
+ defaultOperator?: TextFilterOperator;
117
+ placeholder?: string;
118
+ } | {
119
+ kind: 'number';
120
+ /** Default: all nine operators. */
121
+ operators?: readonly NumberFilterOperator[];
122
+ /** Default `'equals'`. */
123
+ defaultOperator?: NumberFilterOperator;
124
+ /** NumberInput mode for the bounds. Default `'decimal'`. */
125
+ mode?: NumberInputMode;
126
+ /** ISO 4217 code for `mode: 'currency'` (the bounds' NumberInputs).
127
+ * Bounds are typed and stored in major units, as shown. */
128
+ currency?: string;
129
+ min?: number;
130
+ max?: number;
131
+ step?: number;
132
+ } | {
133
+ kind: 'select';
134
+ /** Required in server mode (a page cannot derive them; DEV warning).
135
+ * Client mode default: distinct `value`s of every row
136
+ * (v9 `getCoreRowModel()`, so other filters do not shrink the list). */
137
+ options?: readonly DataGridOption[];
138
+ } | {
139
+ kind: 'dateRange';
140
+ /** `'apply'` commits on an Apply button. Default `'auto'` in client
141
+ * mode, `'apply'` in server mode (one request per range). */
142
+ commitMode?: 'auto' | 'apply';
143
+ };
144
+ /** Shared fields of the built-in editors. Values stay with the host: the
145
+ * grid never mutates `rows`. */
146
+ interface DataGridEditBase<TData, TValue> {
147
+ /** The current value, read from the host's state. */
148
+ getValue: (row: TData) => TValue;
149
+ /** Fires with the kit input's own change event. */
150
+ onChange: (row: TData, next: TValue) => void;
151
+ /** `false` renders `cell` instead of the editor for this row. Default:
152
+ * editable unless `isRowReadOnly(row)`. */
153
+ isEditable?: (row: TData) => boolean;
154
+ /** A translated message marks the input invalid (`aria-invalid`) and is
155
+ * linked with `aria-describedby`. Under privacy mode, on a row with a
156
+ * masked cell, the kit's neutral message replaces it, since it may name
157
+ * a person. */
158
+ error?: (row: TData) => string | undefined;
159
+ }
160
+ /** Kit `NumberInput`, `variant="plain"`, `size="sm"`. */
161
+ export interface DataGridNumberEdit<TData> extends DataGridEditBase<TData, number | null> {
162
+ kind: 'number';
163
+ /** Default `'decimal'`. */
164
+ mode?: NumberInputMode;
165
+ /** ISO 4217 code for `mode: 'currency'`. */
166
+ currency?: string;
167
+ min?: number;
168
+ max?: number;
169
+ step?: number;
170
+ /** Unit shown after the value (e.g. "pcs"). Translated by the host. A
171
+ * function gives a per-row unit (FatturaPA `UnitaMisura`); `undefined`
172
+ * shows none for that row. Data, never a translation key. */
173
+ unit?: string | ((row: TData) => string | undefined);
174
+ }
175
+ /** Kit `TextInput`; commits on every change (controlled). */
176
+ export interface DataGridTextEdit<TData> extends DataGridEditBase<TData, string> {
177
+ kind: 'text';
178
+ maxLength?: number;
179
+ placeholder?: string;
180
+ }
181
+ /** Kit `Select`. `null` = nothing chosen. */
182
+ export interface DataGridSelectEdit<TData> extends DataGridEditBase<TData, string | null> {
183
+ kind: 'select';
184
+ options: readonly {
185
+ value: string;
186
+ label: string;
187
+ }[];
188
+ placeholder?: string;
189
+ }
190
+ /** Context for a custom editor. Pass `labelledBy` as the control's
191
+ * `aria-labelledby`; never put `rowLabel` in an attribute. A control that
192
+ * takes `aria-label` only (the kit Combobox in 1.113) goes inside
193
+ * `<div role="group" aria-labelledby={labelledBy}>` with
194
+ * `aria-label={columnLabel}`: the group carries the row name, the input
195
+ * the column alone. */
196
+ export interface DataGridEditContext {
197
+ rowId: string;
198
+ columnId: string;
199
+ /** Id of a `hidden` element holding "{{column}}, {{row}}": the control's
200
+ * accessible name, by reference (same as `DataGridCellContext.inputLabelledBy`). */
201
+ labelledBy: string;
202
+ /** Plain row name for visible text only (privacy rules as `getRowLabel`). */
203
+ rowLabel: string;
204
+ /** Plain column name. */
205
+ columnLabel: string;
206
+ /** Id of the cell's error text for `aria-describedby`, or `undefined`. */
207
+ errorId: string | undefined;
208
+ invalid: boolean;
209
+ }
210
+ /**
211
+ * Any kit control the host renders (BillLineTable's Combobox with "create new
212
+ * item"). Keeps Combobox out of every grid that does not use it. The control
213
+ * must be a single Tab stop or a composite that manages its own arrows.
214
+ */
215
+ export interface DataGridCustomEdit<TData> {
216
+ kind: 'custom';
217
+ render: (row: TData, context: DataGridEditContext) => ReactNode;
218
+ isEditable?: (row: TData) => boolean;
219
+ /** As on the built-in editors, including the privacy rule. */
220
+ error?: (row: TData) => string | undefined;
221
+ }
222
+ /** Always-on editors (not click-to-edit), so Tab order is DOM order. */
223
+ export type DataGridColumnEdit<TData> = DataGridNumberEdit<TData> | DataGridTextEdit<TData> | DataGridSelectEdit<TData> | DataGridCustomEdit<TData>;
224
+ /**
225
+ * Privacy under `privacyMode`.
226
+ * - `'mask'`: the cell shows `privacyMask()` (`_shared/privacy-mask.tsx:20`)
227
+ * with the visually hidden "Hidden in privacy mode" (the existing
228
+ * `calendarWorkspace.privacy.hidden` key the shared privacy module uses);
229
+ * `cell()` is not called; export writes the mask.
230
+ * - `'hide'`: the column is hidden and cannot be shown.
231
+ * - Object form masks only the cells where `appliesTo(row)` is true (a
232
+ * patient counterparty, not a supplier) and can supply the mask text.
233
+ *
234
+ * Whole-column rule, every form: while `privacyMode` is on, a column with
235
+ * any `privacy` leaves sorting (its sort entries drop from the effective
236
+ * sort), client filtering (its filter key stays in the slice but is not
237
+ * evaluated, and its chip shows the column label only), quick search and
238
+ * facets, for every row, including rows `appliesTo` leaves unmasked.
239
+ * Otherwise sorting by counterparty would still order patient rows by name.
240
+ * Handle and agent writes that sort or filter a masked column are refused
241
+ * (DEV warning; agent error `COLUMN_MASKED`).
242
+ */
243
+ export type DataGridColumnPrivacy<TData> = 'mask' | 'hide' | {
244
+ mode: 'mask';
245
+ /** Default: every row. */
246
+ appliesTo?: (row: TData) => boolean;
247
+ /** Host mask such as initials. Empty or absent gives bullets. */
248
+ mask?: (row: TData) => string;
249
+ };
250
+ /**
251
+ * One column. The first seven fields are today's (`data-grid.tsx:95-111`)
252
+ * with the same meaning; every other field is optional.
253
+ */
254
+ export interface DataGridColumn<TData> {
255
+ /** Unique within the grid. A developer constant; never shown, never in the
256
+ * DOM. Must not start with `__` (reserved for utility columns). */
257
+ id: string;
258
+ header: ReactNode;
259
+ /** Plain name when `header` holds more than text. Also names the column in
260
+ * ColumnToggle, chips, export, every control's accessible name and the
261
+ * agent. Required when `header` is not a string and the column sorts,
262
+ * filters, hides, resizes or exports (DEV warning). */
263
+ headerLabel?: string;
264
+ /** What this column shows for a row. The context argument is new and
265
+ * optional for callers. */
266
+ cell: (row: TData, context: DataGridCellContext) => ReactNode;
267
+ /** Totals-row cell. The row appears when any column has a footer. The
268
+ * function form is new. */
269
+ footer?: ReactNode | ((context: DataGridFooterContext<TData>) => ReactNode);
270
+ /** Amounts go `end`. */
271
+ align?: 'start' | 'end';
272
+ /** Initial pin, logical so it holds in RTL. A controlled or saved
273
+ * `columnPinning` wins. v9 `columnPinning { start, end }`
274
+ * (`features/column-pinning/columnPinningFeature.types.d.ts:15-18`). */
275
+ pin?: 'start' | 'end';
276
+ /** The plain value behind sorting, filtering, quick search and export.
277
+ * Without it the column cannot sort, filter or join quick search (DEV
278
+ * warning if it declares one). v9 `accessorFn`. */
279
+ value?: (row: TData) => DataGridCellValue;
280
+ /** Export text or number (CSV, XLSX, PDF), also matched by quick search.
281
+ * Default: `value`, with dates and numbers formatted for the locale. */
282
+ exportValue?: (row: TData) => string | number | null;
283
+ /** Interactive header content (an InfoTip) rendered beside, not inside,
284
+ * the sort button. */
285
+ headerTip?: ReactNode;
286
+ /** This column's body cells are `<th scope="row">` and name the row.
287
+ * Default: the first visible data column (today's rule). */
288
+ rowHeader?: boolean;
289
+ /** `true` picks the sort from the value type (Intl.Collator for text,
290
+ * numeric, date). A function compares two rows. v9 `enableSorting`,
291
+ * `sortFn` (`features/row-sorting/rowSortingFeature.types.d.ts:74,88`). */
292
+ sort?: boolean | 'text' | 'number' | 'date' | ((a: TData, b: TData) => number);
293
+ /** First activation sorts descending. Default `false` (AG parity).
294
+ * v9 `sortDescFirst` (`rowSortingFeature.types.d.ts:82`). */
295
+ sortDescFirst?: boolean;
296
+ filter?: DataGridColumnFilter;
297
+ /** Joins quick search. Default `true` when `value` is set. v9
298
+ * `enableGlobalFilter` (`features/global-filtering/globalFilteringFeature.types.d.ts:16`). */
299
+ search?: boolean;
300
+ /** Initial width in px. Declaring any size switches the table to fixed
301
+ * layout. v9 `size` (`features/column-sizing/columnSizingFeature.types.d.ts:99`).
302
+ * A column without `size` in fixed layout takes its kind's rem token
303
+ * (`--data-grid-col-size-text` etc.) through CVA, never a JS px literal;
304
+ * `--dg-col-size` is set only for host sizes and user resizes. */
305
+ size?: number;
306
+ /** Default 64. v9 `minSize` (`columnSizingFeature.types.d.ts:95`). */
307
+ minSize?: number;
308
+ /** Default 960 (finite, so the separator has an `aria-valuemax`). */
309
+ maxSize?: number;
310
+ /** User resizing. Default: the grid's `columnResizing`. v9
311
+ * `enableResizing` (`features/column-resizing/columnResizingFeature.types.d.ts:55`). */
312
+ resizable?: boolean;
313
+ /** Can the user hide it? Default `true`, `false` for the row-header
314
+ * column. v9 `enableHiding`
315
+ * (`features/column-visibility/columnVisibilityFeature.types.d.ts:64`). */
316
+ hideable?: boolean;
317
+ /** Hidden until shown. A saved or controlled visibility wins. */
318
+ defaultHidden?: boolean;
319
+ /** Can it be pinned or unpinned? Default `true`. v9 `enablePinning`
320
+ * (`columnPinningFeature.types.d.ts:52`). */
321
+ pinnable?: boolean;
322
+ /** Can the user move it? Default `true`, `false` for the row header. */
323
+ reorderable?: boolean;
324
+ /** Responsive tier: 1 shows from 640 px, 2 from 900 px, 3 from 1,200 px of
325
+ * grid width (`DATA_GRID_RESPONSIVE_BREAKPOINTS`). No tier: always shown.
326
+ * A user's own show or hide always wins and is never overridden. */
327
+ responsiveTier?: 1 | 2 | 3;
328
+ /** Wrap long text instead of truncating; virtualised rows then measure
329
+ * their height. */
330
+ wrap?: boolean;
331
+ edit?: DataGridColumnEdit<TData>;
332
+ privacy?: DataGridColumnPrivacy<TData>;
333
+ /** Included in CSV, XLSX and PDF. Default `true` when `value` or
334
+ * `exportValue` is set. */
335
+ exportable?: boolean;
336
+ /** Printed. Default `true`. */
337
+ printable?: boolean;
338
+ }
339
+ /**
340
+ * A header that spans adjacent columns (grouped headers, one level). Kept
341
+ * beside `columns` so today's `columns` array type does not change. The
342
+ * engine builds v9 group column defs from it; v9 `getHeaderGroups()` gives
343
+ * `colSpan`, `rowSpan`, `isPlaceholder`
344
+ * (`core/headers/coreHeadersFeature.types.d.ts:13,46,74,90`).
345
+ */
346
+ export interface DataGridColumnGroup {
347
+ id: string;
348
+ header: ReactNode;
349
+ headerLabel?: string;
350
+ /** Leaf column ids. They must be adjacent in the declared order and share
351
+ * one pin side; a column moves only within its group. */
352
+ columns: readonly string[];
353
+ }
354
+ /** One sort level: DataTable's `DataTableSortEntry` (`data-table.tsx:103-106`).
355
+ * v9 `ColumnSort { id, desc }` (`rowSortingFeature.types.d.ts:8-11`). */
356
+ export interface DataGridSortEntry {
357
+ colId: string;
358
+ sort: 'asc' | 'desc';
359
+ }
360
+ /** Zero-based, as `DataTableHandle.getCurrentPage()`. v9 `PaginationState`
361
+ * (`features/row-pagination/rowPaginationFeature.types.d.ts:5-12`). */
362
+ export interface DataGridPagination {
363
+ pageIndex: number;
364
+ pageSize: number;
365
+ }
366
+ /** Logical pins. v9 `ColumnPinningState`
367
+ * (`columnPinningFeature.types.d.ts:15-18`). */
368
+ export interface DataGridColumnPinning {
369
+ start: readonly string[];
370
+ end: readonly string[];
371
+ }
372
+ /**
373
+ * Per-row tri-state.
374
+ * - `'selectable'`: a Checkbox.
375
+ * - `'locked'`: checked and disabled; always in the selection, cannot be
376
+ * cleared by the user, a range or select-all. Kept out of v9's
377
+ * `rowSelection` (v9 `enableRowSelection(row) === false`,
378
+ * `features/row-selection/rowSelectionFeature.types.d.ts:48`) and added back
379
+ * in every value DataGrid reports.
380
+ * - `'none'`: no Checkbox; a muted dash with a visually hidden reason
381
+ * (`fatturapa-import.tsx:573-602` precedent). Never selected.
382
+ * The object form adds a translated reason (Checkbox `disabledReason`).
383
+ */
384
+ export type DataGridRowSelectability = 'selectable' | 'locked' | 'none' | {
385
+ state: 'locked' | 'none';
386
+ reason: string;
387
+ };
388
+ /** Everything a server needs for one request (server mode). */
389
+ export interface DataGridQuery {
390
+ sorting: DataGridSortEntry[];
391
+ /** Column models and host keys. */
392
+ filters: DataGridFilterModel;
393
+ quickFilter: string;
394
+ pagination: DataGridPagination;
395
+ /** Present only while privacy mode masks columns: their ids. Their sort
396
+ * entries and filter keys are already left out of `sorting` and
397
+ * `filters`; leave them out of quick search too, so no row is ordered
398
+ * or matched by a hidden value. */
399
+ maskedColumnIds?: string[];
400
+ }
401
+ export interface DataGridPaginationConfig {
402
+ /** Default `DATA_GRID_PAGE_SIZE_OPTIONS`. */
403
+ pageSizeOptions?: readonly number[];
404
+ /** First and last page buttons (kit Pagination `showEndpoints`). */
405
+ showEndpoints?: boolean;
406
+ }
407
+ /**
408
+ * DataGrid props. Every slice is controlled (value + `on…Change`) or
409
+ * uncontrolled (`default…`), as the kit's `useControllableState`. Every slice
410
+ * reaches v9 as `state.<slice>` plus `on<Slice>Change`
411
+ * (`core/table/coreTablesFeature.types.d.ts:114`), so v9 never owns state.
412
+ * A controlled slice is never written to storage (DEV warning on overlap).
413
+ */
414
+ export interface DataGridProps<TData> extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'dir'> {
415
+ columns: readonly DataGridColumn<TData>[];
416
+ rows: readonly TData[];
417
+ /** Opaque, stable id. The only row datum that reaches the DOM
418
+ * (`data-row-id`). */
419
+ getRowId: (row: TData) => string;
420
+ /** Names the table for screen readers. Pass a translated string. */
421
+ caption: string;
422
+ /** `data-component-id`, agent instance id and the column-state storage key
423
+ * (`DATA_GRID_COLUMN_STATE_PREFIX + gridId`). */
424
+ gridId?: string;
425
+ /** Save order, sizing, pinning and user-set visibility under `gridId`.
426
+ * Default `true` when `gridId` is set. Sorting is never saved. */
427
+ persistColumnState?: boolean;
428
+ /** Register `dataGridAgent` under `gridId` and write `data-component-id`.
429
+ * Default `true`. A component built on DataGrid that has its own agent
430
+ * surface passes `false`, so one table exposes one agent: no
431
+ * registration and no `data-component-id`, while `gridId` still keys
432
+ * the saved column state. */
433
+ registerAgent?: boolean;
434
+ /** `'server'`: sorting, filters, quick search and paging are manual (v9
435
+ * `manualSorting`, `manualFiltering`, `manualPagination`:
436
+ * `rowSortingFeature.types.d.ts:189`,
437
+ * `columnFilteringFeature.types.d.ts:178`,
438
+ * `rowPaginationFeature.types.d.ts:24`); `rows` is the current page.
439
+ * Default `'client'`. */
440
+ dataMode?: 'client' | 'server';
441
+ /** Server mode: total rows matching the query (v9 `rowCount`,
442
+ * `rowPaginationFeature.types.d.ts:38`). Required in server mode (DEV
443
+ * warning).
444
+ *
445
+ * `-1` = unknown. The engine then passes v9 `{ rowCount: undefined,
446
+ * pageCount: -1 }` (`rowPaginationFeature.types.d.ts:31-34`), never
447
+ * `rowCount: -1`: v9 would compute `Math.ceil(-1 / pageSize)` = `-0`, and
448
+ * `getCanNextPage()` returns `false` for a page count of 0
449
+ * (`rowPaginationFeature.utils.js:189-195, 282-289`), so the grid could
450
+ * never page forward. With `-1`: `getRowCount()` and `getPageCount()`
451
+ * return `-1`; Next stays enabled while the page is full
452
+ * (`rows.length === pageSize`) and is disabled on a short page; there is
453
+ * no last-page button. */
454
+ rowCount?: number;
455
+ /** Fires once per change of sorting, filters, quick filter or page, with
456
+ * the whole query, after the per-slice callback. A sort, filter or quick
457
+ * filter change resets `pageIndex` to 0 in the same call (v9 does not in
458
+ * manual mode: `autoResetPageIndex`, `rowPaginationFeature.types.d.ts:20`).
459
+ * The single fetch trigger for server grids; also fires in client mode.
460
+ *
461
+ * Never fires on mount: the host fetches its first page from its own
462
+ * initial query. It does fire for every later change whatever the source,
463
+ * including a DataGridTabs restore on mount (one extra request; a host
464
+ * that wants none seeds its initial query from the active tab). It also
465
+ * fires when the grid clamps `pageIndex` (below). */
466
+ onQueryChange?: (query: DataGridQuery) => void;
467
+ sorting?: readonly DataGridSortEntry[];
468
+ defaultSorting?: readonly DataGridSortEntry[];
469
+ onSortingChange?: (next: DataGridSortEntry[]) => void;
470
+ /** Shift + activation adds a level. Default `true`. v9 `enableMultiSort`,
471
+ * `isMultiSortEvent` (`rowSortingFeature.types.d.ts:171,185`). */
472
+ multiSort?: boolean;
473
+ /** Default `DATA_GRID_MAX_SORT_LEVELS`. v9 `maxMultiSortColCount`. */
474
+ maxSortLevels?: number;
475
+ filters?: DataGridFilterModel;
476
+ defaultFilters?: DataGridFilterModel;
477
+ onFiltersChange?: (next: DataGridFilterModel) => void;
478
+ /** Quick search text. v9 `globalFilter` with a kit accent-insensitive
479
+ * `globalFilterFn` (`globalFilteringFeature.types.d.ts:40`). */
480
+ quickFilter?: string;
481
+ defaultQuickFilter?: string;
482
+ onQuickFilterChange?: (next: string) => void;
483
+ /** Chip labels for host keys (filters with no column). Translated. */
484
+ filterLabels?: Record<string, string>;
485
+ /** Off by default (today: every row). `true` = 25 per page.
486
+ *
487
+ * Clamping: v9 auto-reset is off (`autoResetPageIndex: false`), so the
488
+ * store clamps `pageIndex` to `pageCount - 1` (or 0) whenever the page
489
+ * count shrinks (client rows or filters change; server `rowCount`
490
+ * changes), and reports it with source `'host'`. Not clamped while the
491
+ * server total is unknown (`rowCount: -1`). */
492
+ pagination?: boolean | DataGridPaginationConfig;
493
+ page?: DataGridPagination;
494
+ defaultPage?: DataGridPagination;
495
+ onPageChange?: (next: DataGridPagination) => void;
496
+ /** Default `'none'`. `'single'` = v9 `enableMultiRowSelection: false`
497
+ * (`rowSelectionFeature.types.d.ts:42`), no select-all. */
498
+ selectionMode?: 'none' | 'single' | 'multiple';
499
+ /** Selected row ids, all pages. Includes locked rows.
500
+ *
501
+ * Lifetime, per mode:
502
+ * - Client: ids are pruned when `rows` no longer holds them (any depth;
503
+ * reported with source `'host'`). Sorting, filtering, quick search and
504
+ * paging keep the selection, including rows a filter hides (AG parity).
505
+ * - Server: the grid sees one page, so ids on other pages are never
506
+ * pruned or dropped; sort, filter, quick-filter and page changes keep
507
+ * them. The host clears the selection when its query makes it stale
508
+ * (`setSelection([])` or the controlled prop).
509
+ * - Either mode, with `clearSelectionOnFilterChange`: a filter or
510
+ * quick-filter change clears it (see that prop).
511
+ * Sub-rows are selectable on their own (per `getRowSelectability`);
512
+ * selecting a parent never selects its children
513
+ * (`enableSubRowSelection: false`). */
514
+ rowSelection?: readonly string[];
515
+ defaultRowSelection?: readonly string[];
516
+ /** Always includes the locked rows present in `rows`. */
517
+ onRowSelectionChange?: (ids: string[]) => void;
518
+ /** Per-row tri-state. Default: every row `'selectable'`. Under
519
+ * `privacyMode`, a `reason` on a row where any masked column applies is
520
+ * replaced by neutral kit copy (it may name a person). */
521
+ getRowSelectability?: (row: TData) => DataGridRowSelectability;
522
+ /** What the header box acts on. Default `'page'` when paginated or in
523
+ * server mode, else `'all'`. `'none'` hides it. v9
524
+ * `getToggleAllPageRowsSelectedHandler` / `getToggleAllRowsSelectedHandler`
525
+ * (`rowSelectionFeature.types.d.ts:157,161`). `'all'` in server mode is
526
+ * treated as `'page'` with a DEV warning: v9's select-all sees loaded
527
+ * rows only (`rowSelectionFeature.utils.js:62-79`). The header cell keeps
528
+ * a visually hidden column name in every mode (no empty `<th>`). */
529
+ selectAllScope?: 'all' | 'page' | 'none';
530
+ /** Shift + click or Shift + Space selects the inclusive range in display
531
+ * order, skipping rows that cannot be selected. Default `true` in
532
+ * multiple mode. v9 `enableRowRangeSelection`, `isRowRangeSelectionEvent`
533
+ * (`rowSelectionFeature.types.d.ts:36,64`). */
534
+ rangeSelection?: boolean;
535
+ /**
536
+ * When `true`, any change to the filters (column models or host keys) or
537
+ * to the quick filter clears the selection, in both modes and whatever
538
+ * the source (`'user'`, `'api'`, `'restore'`, `'host'`). Paging and
539
+ * sorting never clear it. Default `false`: the lifetime rules on
540
+ * `rowSelection` apply. Product decision for server-mode bulk actions
541
+ * (BillTable, HTP-7312): a selection survives paging, but a new filter
542
+ * means a new result set.
543
+ *
544
+ * Rules:
545
+ * - Locked rows stay selected; selectable ids are dropped from every page.
546
+ * - Only a real change clears: a write whose filters and quick filter
547
+ * equal the current ones (stable JSON compare) clears nothing.
548
+ * - Same store write as the filter change: after the `'filter'` or
549
+ * `'quickFilter'` change (with its page reset), the grid emits one
550
+ * `'selection'` change with the same source, and calls
551
+ * `onRowSelectionChange` with the locked ids only, before
552
+ * `onQueryChange`. With controlled `rowSelection` the host applies it.
553
+ * - An empty selection emits nothing.
554
+ * - Privacy mode pausing or resuming a masked column's filter, or
555
+ * narrowing the quick-search scope while there is search text, is a
556
+ * new result set too: the selection is cleared (source `'host'`)
557
+ * before that `onQueryChange`. A paused sort alone keeps it.
558
+ */
559
+ clearSelectionOnFilterChange?: boolean;
560
+ columnGroups?: readonly DataGridColumnGroup[];
561
+ /** User resizing (pointer and keyboard separator). Default `false`
562
+ * (today's layout). v9 `enableColumnResizing`, `columnResizeMode: 'onEnd'`,
563
+ * `columnResizeDirection` from `useDirection`
564
+ * (`columnResizingFeature.types.d.ts:22,26,30`). */
565
+ columnResizing?: boolean;
566
+ /** Explicit visibility (user or host). Responsive hiding is derived on top
567
+ * and never reported here. v9 `columnVisibility`. */
568
+ columnVisibility?: Record<string, boolean>;
569
+ defaultColumnVisibility?: Record<string, boolean>;
570
+ onColumnVisibilityChange?: (next: Record<string, boolean>) => void;
571
+ columnPinning?: DataGridColumnPinning;
572
+ defaultColumnPinning?: DataGridColumnPinning;
573
+ onColumnPinningChange?: (next: DataGridColumnPinning) => void;
574
+ /** Widths in px for resized columns. v9 `columnSizing`
575
+ * (`columnSizingFeature.types.d.ts:7`). */
576
+ columnSizing?: Record<string, number>;
577
+ defaultColumnSizing?: Record<string, number>;
578
+ onColumnSizingChange?: (next: Record<string, number>) => void;
579
+ /** Leaf column ids in display order. v9 `columnOrder`
580
+ * (`features/column-ordering/columnOrderingFeature.types.d.ts:6`). */
581
+ columnOrder?: readonly string[];
582
+ defaultColumnOrder?: readonly string[];
583
+ onColumnOrderChange?: (next: string[]) => void;
584
+ /** Hide `responsiveTier` columns by grid width. Default `true` when any
585
+ * column has a tier. */
586
+ responsiveColumns?: boolean;
587
+ /** Tree rows. v9 `getSubRows` (`core/rows/coreRowsFeature.types.d.ts:106`),
588
+ * `paginateExpandedRows: false` so children stay on their parent's page.
589
+ *
590
+ * Sub-row rules:
591
+ * - Selection: each sub-row has its own box per `getRowSelectability`;
592
+ * no cascade (`enableSubRowSelection: false`).
593
+ * - Filters and quick search: evaluated at every depth, from leaf rows up
594
+ * (v9 `filterFromLeafRows: true`, `maxLeafRowFilterDepth` default 100,
595
+ * `columnFilteringFeature.types.d.ts:174,183`): a parent stays when a
596
+ * child matches, so a match is never hidden under a filtered-out parent.
597
+ * - Paging and clamping count top-level rows only.
598
+ * - Export flattens depth-first: every filtered descendant follows its
599
+ * parent, expanded or not. Footers see top-level rows only. */
600
+ getSubRows?: (row: TData) => readonly TData[] | undefined;
601
+ /** Detail panel: one extra full-width row under an expanded row. */
602
+ renderDetail?: (row: TData) => ReactNode;
603
+ /** Default: has sub-rows, or `renderDetail` is set. v9 `getRowCanExpand`
604
+ * (`features/row-expanding/rowExpandingFeature.types.d.ts:49`). */
605
+ getRowCanExpand?: (row: TData) => boolean;
606
+ /** Expanded row ids. A new `rows` array never collapses rows: v9's
607
+ * auto-reset is off (`autoResetExpanded: false`; v9 otherwise resets on
608
+ * every data change, `core/row-models/createCoreRowModel.js:17-24`,
609
+ * `rowExpandingFeature.utils.js:30-33`). Ids no longer in `rows` are
610
+ * pruned, reported with source `'host'` (client mode; server mode prunes
611
+ * to the current page). */
612
+ expanded?: readonly string[];
613
+ defaultExpanded?: readonly string[];
614
+ onExpandedChange?: (ids: string[]) => void;
615
+ /** `'single'` closes the open row when another opens. Default `'multiple'`. */
616
+ expandMode?: 'single' | 'multiple';
617
+ /** Rows that render `cell` instead of every editor (already-loaded lines). */
618
+ isRowReadOnly?: (row: TData) => boolean;
619
+ /**
620
+ * The whole grid is read-only for a while ("a request is running"):
621
+ * - every row renders `cell` instead of its editors (as `isRowReadOnly`);
622
+ * - every row checkbox and the select-all box are disabled with `reason`
623
+ * (default `ui.dataGrid.readOnly.reason`) as their `disabledReason`, so
624
+ * they stay focusable and the reason is reachable by keyboard (Tooltip
625
+ * on focus) and by screen reader (`aria-describedby`);
626
+ * - checked state is kept: nothing is cleared or added, and handle and
627
+ * agent writes still work. Only the person's toggles are blocked.
628
+ * A locked row keeps its own reason. Under `privacyMode`, `reason` is
629
+ * replaced by the default kit copy (it may name a person, as a
630
+ * selectability reason may). Default `false`.
631
+ */
632
+ readOnly?: boolean | {
633
+ reason: string;
634
+ };
635
+ /** Plain row name for row-scoped names ("Select {{row}}"), rendered as
636
+ * text inside `hidden` elements that controls reference with
637
+ * `aria-labelledby`; never written into an attribute.
638
+ * Default: the row-header cell's `exportValue`/`value` text, else
639
+ * "Row {{n}}". Under `privacyMode`, every row where any masked column
640
+ * applies gets "Row {{n}}" (default label or this function alike), unless
641
+ * `rowLabelPrivacySafe` is set. */
642
+ getRowLabel?: (row: TData) => string;
643
+ /** The host promises `getRowLabel` never returns masked data (a bill
644
+ * number, a product description), so it is used under privacy mode too.
645
+ * Default `false`. */
646
+ rowLabelPrivacySafe?: boolean;
647
+ /** `'loading'` with no rows: skeleton rows. With rows: rows stay at full
648
+ * contrast and focusable (no fading), `aria-busy` on the table, a kit
649
+ * `Spinner` in the frame. `'error'`: EmptyState `variant="error"` in the
650
+ * body. Default `'ready'`. */
651
+ status?: 'ready' | 'loading' | 'error';
652
+ /** Error copy and retry. Defaults from `ui.dataGrid.error.*`.
653
+ * `headingLevel` default 3 (EmptyState's default). */
654
+ error?: {
655
+ title?: string;
656
+ description?: string;
657
+ onRetry?: () => void;
658
+ headingLevel?: EmptyStateHeadingLevel;
659
+ };
660
+ /** Empty copy. Variant is automatic: `no-results` (with "Clear filters")
661
+ * when a filter or quick search is active, else `first-use`. The
662
+ * no-results EmptyState is its own polite status, so the grid skips its
663
+ * row-count announcement at 0. `headingLevel` default 3. */
664
+ empty?: {
665
+ title?: string;
666
+ description?: string;
667
+ action?: {
668
+ label: string;
669
+ onClick: () => void;
670
+ };
671
+ headingLevel?: EmptyStateHeadingLevel;
672
+ /** Overrides `ui.dataGrid.empty.noResultsTitle` (translated). */
673
+ noResultsTitle?: string;
674
+ /** Overrides `ui.dataGrid.empty.noResultsDescription` (translated). */
675
+ noResultsDescription?: string;
676
+ };
677
+ /** `<DataGridToolbar>` parts. Rendered above the scroll region and wired
678
+ * to this grid through context. Setting it (or `pagination`) switches the
679
+ * root to the frame shape (design section 3.1). */
680
+ toolbar?: ReactNode;
681
+ /** Row block size: `--min-target-size` (default) or
682
+ * `--data-grid-row-size-compact`, both resolved in all four themes; the
683
+ * accessible themes point compact at `--min-target-size` too. The row
684
+ * checkbox's hit area is clamped to the row, so compact rows never
685
+ * overlap. Default `'default'`. */
686
+ density?: 'default' | 'compact';
687
+ /** `'fill'` adds `flex: 1 1 auto; min-block-size: 0` so the grid becomes
688
+ * the bounded scroll container of a flex column parent. Inside the kit
689
+ * Dialog, use exactly one of:
690
+ * - `<Dialog.Content scroll="body">` with
691
+ * `<Dialog.Body className="ds:flex ds:flex-col">` (Dialog.Body scrolls
692
+ * but is not itself a flex container, `src/styles.css:807-815`);
693
+ * - `<Dialog.Content flush>` with the grid as the column child
694
+ * (`dialog.tsx:192-198`, `src/styles.css:786-791`).
695
+ * Known limit: at a viewport height of 480 px or less the Dialog falls
696
+ * back to block layout and the whole surface scrolls
697
+ * (`src/styles.css:823-832`), so the header scrolls away (WCAG 1.4.10
698
+ * wins). Default `'auto'`. */
699
+ height?: 'auto' | 'fill';
700
+ /** `'auto'` virtualises above `DATA_GRID_VIRTUALIZE_ABOVE` rendered items.
701
+ * `'off'` never (DEV warning above 500). Default `'auto'`. */
702
+ virtualization?: 'auto' | 'off';
703
+ /** Applies each column's `privacy` (Heatmap and Calendar name it the same,
704
+ * `heatmap.tsx:276`, `calendar.tsx:661`). Default `false`.
705
+ *
706
+ * While a column is masked, its sort entries and filter keys are paused:
707
+ * the state keeps them (`getSort()`, `getFilter()`), but they leave the
708
+ * effective query, so `getQuery()` and `onQueryChange` never order or
709
+ * match rows by a hidden value, and `maskedColumnIds` lists the masked
710
+ * columns for the host's quick search. Turning privacy off brings them
711
+ * back. When turning it on or off changes the effective query, the page
712
+ * resets to 0 and `onQueryChange` fires exactly once. A `'restore'`
713
+ * write (a saved view) keeps a masked column's filter as written,
714
+ * paused; new api and agent sort or filter writes on it are refused.
715
+ * Toggling it emits one `'columns'` change (source `'host'`) so toolbar
716
+ * parts re-read `masked` and `hiddenByPrivacy`. A host
717
+ * `getRowSelectability` reason is replaced by neutral kit copy on any
718
+ * row where a masked column applies. */
719
+ privacyMode?: boolean;
720
+ }
721
+ /** Who caused a change. Carried by `subscribe`; v9 atoms carry none. */
722
+ export type DataGridChangeSource =
723
+ /** A person, through the grid's own UI or the toolbar. */
724
+ 'user'
725
+ /** A handle method or agent action. */
726
+ | 'api'
727
+ /** DataGridTabs re-applying a saved tab. */
728
+ | 'restore'
729
+ /** Responsive hiding by width. */
730
+ | 'responsive'
731
+ /** Column state loaded from storage. */
732
+ | 'storage'
733
+ /** A prop changed by the host outside the grid: a controlled slice, new
734
+ * `rows` or `rowCount`, or the pruning and clamping they cause. */
735
+ | 'host';
736
+ export type DataGridChangeEvent = 'sort' | 'filter' | 'quickFilter' | 'pagination' | 'selection' | 'expanded' | 'columns' | 'rows';
737
+ export interface DataGridChange {
738
+ event: DataGridChangeEvent;
739
+ source: DataGridChangeSource;
740
+ }
741
+ /** Options for a programmatic write. `'restore'` is for DataGridTabs. */
742
+ export interface DataGridWriteOptions {
743
+ source?: 'api' | 'restore';
744
+ }
745
+ /** One leaf data column, for `getColumns()` (utility columns excluded). */
746
+ export interface DataGridColumnInfo {
747
+ id: string;
748
+ /** Plain, translated name. */
749
+ label: string;
750
+ /** Effective visibility (explicit, then responsive, then default). */
751
+ visible: boolean;
752
+ canHide: boolean;
753
+ canMove: boolean;
754
+ canPin: boolean;
755
+ pinned: 'start' | 'end' | false;
756
+ /** px in fixed layout; `null` in auto layout. */
757
+ width: number | null;
758
+ /** Display order index (start-pinned first). */
759
+ index: number;
760
+ groupId: string | null;
761
+ filterKind: DataGridColumnFilter['kind'] | null;
762
+ sortable: boolean;
763
+ /** The user (or `markColumnsUserTouched`) set its visibility. */
764
+ userTouched: boolean;
765
+ /** True while `privacyMode` is on and the column declares `privacy` (any
766
+ * form, whole-column rule); `false` otherwise. The agent adapter treats a
767
+ * missing value as masked while `privacyMode` is on. */
768
+ masked?: boolean;
769
+ }
770
+ /** Which features this instance has on, so an agent or a toolbar knows what
771
+ * will work before it calls (the adapter's capabilities are static). */
772
+ export interface DataGridFeatureInfo {
773
+ dataMode: 'client' | 'server';
774
+ selectionMode: 'none' | 'single' | 'multiple';
775
+ /** Any column sorts. */
776
+ sorting: boolean;
777
+ /** Any column filters. */
778
+ filtering: boolean;
779
+ /** Any column joins quick search. */
780
+ quickFilter: boolean;
781
+ pagination: boolean;
782
+ /** Sub-rows or a detail panel. */
783
+ expansion: boolean;
784
+ columnResizing: boolean;
785
+ privacyMode: boolean;
786
+ }
787
+ /**
788
+ * The curated imperative handle (`ref`). No TanStack instance, no row
789
+ * objects, no DOM nodes, no escape hatch. Method names match
790
+ * `DataTableHandle` (`data-table.tsx:113-137`) where the job is the same.
791
+ *
792
+ * Stable identity; every read goes to the live store, so a read straight
793
+ * after a write is fresh, for controlled slices too: after a write to a
794
+ * controlled slice, `get…()` returns the value last written until the next
795
+ * prop value arrives; then the prop wins, and any difference from what was
796
+ * written is emitted with source `'host'` (`DataGridStore.syncFromProps`).
797
+ * So two writes in one tick compose (two chip clears both survive), and a
798
+ * DataGridTabs capture straight after a restore reads the restored view.
799
+ * Structurally satisfies `DataGridTabsSeam` and DataTableTabs' filter half
800
+ * (`getFilter`, `setFilter`).
801
+ */
802
+ export interface DataGridHandle {
803
+ getFeatures(): DataGridFeatureInfo;
804
+ /** All pages; includes locked rows. */
805
+ getSelection(): string[];
806
+ /** Replaces the selection. Locked ids are kept whatever is passed; ids of
807
+ * rows whose selectability is `'none'` are dropped. Unknown ids: in
808
+ * client mode, an id not in the core row model (any depth) is dropped; in
809
+ * server mode no id is unknown (other pages' ids are kept). */
810
+ setSelection(ids: readonly string[]): void;
811
+ /** Inclusive range in display order (`getRowsInDisplayOrder()`,
812
+ * `core/rows/coreRowsFeature.types.d.ts:120`), skipping rows that cannot
813
+ * be selected. Does not use v9's internal range anchor. */
814
+ selectRange(fromId: string, toId: string): void;
815
+ /** Clears every selectable row; locked rows stay. */
816
+ clearSelection(): void;
817
+ getSort(): DataGridSortEntry[];
818
+ setSort(model: readonly DataGridSortEntry[]): void;
819
+ /** Column models and host keys. */
820
+ getFilter(): DataGridFilterModel;
821
+ setFilter(model: DataGridFilterModel, options?: DataGridWriteOptions): void;
822
+ getQuickFilter(): string;
823
+ setQuickFilter(text: string, options?: DataGridWriteOptions): void;
824
+ /** Column filters, host keys and quick search. */
825
+ clearFilters(): void;
826
+ /**
827
+ * Applies a saved view in ONE write: the filters (column models and host
828
+ * keys) and the quick search change together, so subscribers see one
829
+ * `'filter'` change and a server host gets one `onQueryChange` with the
830
+ * whole new query (never the new filters with the old search). The page
831
+ * resets to 0 once. `filters` replaces the whole model, as `setFilter`:
832
+ * a filter key missing from it is removed. Leave `filters` or
833
+ * `quickFilter` out of `view` to keep that part as it is.
834
+ * DataGridTabs restores through this.
835
+ * When the search text changes too, the same write also emits one
836
+ * `'quickFilter'` change, so a search box re-reads. Without
837
+ * `source: 'restore'`, a view that writes a masked column's filter
838
+ * under privacy mode is refused whole (DEV warning), as `setFilter`.
839
+ * Removing a masked column's filter is not refused (as `setFilter`): it
840
+ * reveals nothing, and the paused filter simply goes.
841
+ */
842
+ applyView(view: {
843
+ filters?: DataGridFilterModel;
844
+ quickFilter?: string;
845
+ }, options?: DataGridWriteOptions): void;
846
+ /** `true` while `privacyMode` is on. Saved-view tabs read it so they never
847
+ * store quick-search text or masked columns' filter values while names
848
+ * are hidden (Michael, 4 Nov 2026). */
849
+ isPrivacyMode(): boolean;
850
+ getCurrentPage(): number;
851
+ goToPage(pageIndex: number): void;
852
+ getPageSize(): number;
853
+ setPageSize(size: number): void;
854
+ /** 1 when pagination is off; `-1` when the server total is unknown. */
855
+ getPageCount(): number;
856
+ /** Client: top-level rows after filters. Server: `rowCount` (`-1` when
857
+ * unknown). */
858
+ getRowCount(): number;
859
+ /** Display order. Client: every filtered row (all pages). Server: the page. */
860
+ getRowIds(): string[];
861
+ getExpandedRowIds(): string[];
862
+ setRowExpanded(id: string, expanded: boolean): void;
863
+ getColumns(): DataGridColumnInfo[];
864
+ /** Counts as a user choice: saved, and exempt from responsive hiding. */
865
+ setColumnVisible(id: string, visible: boolean): void;
866
+ /** `false` unpins. The agent's `pin_column` takes `side: null` (JSON) and
867
+ * the adapter maps it to `false`. No-op (DEV warning) on a column with
868
+ * `pinnable: false`, or when the pin would split its group. */
869
+ pinColumn(id: string, side: 'start' | 'end' | false): void;
870
+ /**
871
+ * `toIndex` is the column's final index in `getColumns()` after the move
872
+ * (remove, then insert). The column takes the pin side of the column that
873
+ * sat at `toIndex` before the move (today's AG rule, the drop target's
874
+ * pin, `data-table/toolbar.tsx:1068-1071`). A no-op (DEV warning) when the
875
+ * column is not reorderable, would change pin side but is not pinnable,
876
+ * or would leave or split its group (columns move only within their
877
+ * group; a group moves as a block only through `columnOrder`).
878
+ */
879
+ moveColumn(id: string, toIndex: number): void;
880
+ /** Clamped to `minSize`..`maxSize`. */
881
+ setColumnWidth(id: string, px: number): void;
882
+ /** Back to declared defaults; removes the saved state for `gridId`. */
883
+ resetColumnState(): void;
884
+ getUserTouchedColumns(): string[];
885
+ /** Marks columns user-set (a saved view standing in for the user). */
886
+ markColumnsUserTouched(ids: readonly string[]): void;
887
+ /** Scrolls the row into view (virtualiser `scrollToIndex` first). */
888
+ scrollToRow(id: string): void;
889
+ /** Scrolls, then focuses the first control in `columnId`'s cell, else the
890
+ * row's selection box, else its row header. */
891
+ focusRow(id: string, columnId?: string): void;
892
+ /** Renders every filtered row (client) or the page (server), unvirtualised
893
+ * and unpaginated, prints, then restores. */
894
+ print(): Promise<void>;
895
+ /** Synchronous with the write. Used by DataGridTabs, the toolbar seam and
896
+ * the agent. Returns unsubscribe. */
897
+ subscribe(listener: (change: DataGridChange) => void): () => void;
898
+ }
899
+ /**
900
+ * For a toolbar lifted out of the grid's `toolbar` slot (a page header).
901
+ * Inside the slot the parts find the grid through context.
902
+ *
903
+ * How it learns the grid has mounted (no polling): `grid-context.ts` holds a
904
+ * module-level mount signal (`DataGridMountSignal`). Every DataGrid calls
905
+ * `notify()` after it mounts and after it unmounts. The provider calls
906
+ * `getGrid()` once after its own mount and again on every signal, and
907
+ * rebinds when the handle it gets changes. So a grid that mounts later (lazy
908
+ * route, conditional render, a Dialog) wakes the toolbar. The parts render
909
+ * disabled until a grid is bound (seam `isReady()` false).
910
+ */
911
+ export interface DataGridToolbarProviderProps {
912
+ /** Resolve the grid at call time; `null` until mounted. */
913
+ getGrid: () => DataGridHandle | null | undefined;
914
+ children: ReactNode;
915
+ }
916
+ /** `DataGridToolbar.BulkAction` callback. */
917
+ export type DataGridBulkActionHandler = (context: ToolbarActionContext) => void;
918
+ /** `DataGridToolbar.ExportMenu.Item` with `format: 'custom'` callback. */
919
+ export type DataGridCustomExportHandler = (context: ToolbarActionContext) => void;
920
+ /** Icon-button parts: the label is the tooltip and the accessible name. */
921
+ type DataGridToolbarIconButtonProps = Omit<IconButtonProps, 'icon' | 'aria-label' | 'tooltip' | 'onClick' | 'children'> & {
922
+ /** Default: the part's `ui.dataTable.*` string. */
923
+ label?: string;
924
+ };
925
+ /** `DataGridToolbar` root, `FilterBar` and `Actions`: layout only. */
926
+ export type DataGridToolbarRootProps = HTMLAttributes<HTMLDivElement>;
927
+ /** `DataGridToolbar.QuickSearch`. Follows external changes (tabs, chips,
928
+ * agents) because the DataGrid seam sets `syncsFilterInputs`. */
929
+ export interface DataGridToolbarQuickSearchProps {
930
+ /** Default `t('dataTable.quickSearch.placeholder')`. */
931
+ placeholder?: string;
932
+ /** Default 150. */
933
+ debounceMs?: number;
934
+ }
935
+ /** One FacetFilter pill. `value: null` is the "All" pill that clears. */
936
+ export interface DataGridToolbarFacetOption {
937
+ value: string | number | null;
938
+ /** Translated. */
939
+ label: string;
940
+ }
941
+ /**
942
+ * `DataGridToolbar.FacetFilter`: one-value pills that write
943
+ * `{ type: 'set', values: [value] }` under `field` and read the active pill
944
+ * back from the filter state.
945
+ *
946
+ * Rule for `field`: in client mode it must name a column with
947
+ * `filter: { kind: 'select' }` (so v9 evaluates the set model with the kit
948
+ * set fn); any other field renders nothing and logs a DEV warning, because
949
+ * a text or number column would evaluate a set model with the wrong fn and
950
+ * a column with no filter has filtering off. In server mode it may also be a
951
+ * host key (not evaluated by the grid; the host's server applies it).
952
+ */
953
+ export interface DataGridToolbarFacetFilterProps {
954
+ field: string;
955
+ options: readonly DataGridToolbarFacetOption[];
956
+ /** Name of the pill group. Default `t('dataTable.facetFilter.label')`. */
957
+ label?: string;
958
+ }
959
+ /** `DataGridToolbar.ColumnToggle`: hide or show, drag and Move up / Move
960
+ * down, Reset columns. No pin control in this round: pinning is declared
961
+ * (`pin`), set by the handle or agent, or adopted by moving into an
962
+ * existing pinned zone. */
963
+ export interface DataGridToolbarColumnToggleProps extends DataGridToolbarIconButtonProps {
964
+ /** Override the trigger glyph (default Columns3Cog). */
965
+ icon?: ReactNode;
966
+ /** Extra content above the list, under the title. */
967
+ header?: ReactNode;
968
+ /** Extra content below the list. */
969
+ footer?: ReactNode;
970
+ }
971
+ /** Built-in formats or `custom`. */
972
+ export type DataGridExportFormat = 'csv' | 'xlsx' | 'pdf' | 'custom';
973
+ /** `DataGridToolbar.ExportMenu.Item`. In server mode the built-in formats
974
+ * render disabled with the reason `t('dataGrid.toolbar.exportPageOnly')`
975
+ * ("Not available: only one page is loaded"), because the grid holds one
976
+ * page; `custom` items always run. */
977
+ export type DataGridToolbarExportMenuItemProps = {
978
+ format: 'csv' | 'xlsx' | 'pdf';
979
+ /** Default `t('dataTable.export.{format}')`. */
980
+ label?: string;
981
+ /** Default: the grid caption, sanitised. */
982
+ fileName?: string;
983
+ } | {
984
+ format: 'custom';
985
+ label: string;
986
+ onExport: DataGridCustomExportHandler;
987
+ };
988
+ /** `DataGridToolbar.ExportMenu`. Without children: CSV, Excel and PDF. */
989
+ export interface DataGridToolbarExportMenuProps extends DataGridToolbarIconButtonProps {
990
+ children?: ReactNode;
991
+ }
992
+ /** `DataGridToolbar.Print`: prints every filtered row (client) or the
993
+ * current page (server). */
994
+ export type DataGridToolbarPrintProps = DataGridToolbarIconButtonProps;
995
+ /** `DataGridToolbar.Refresh`. */
996
+ export interface DataGridToolbarRefreshProps extends DataGridToolbarIconButtonProps {
997
+ onRefresh: () => void;
998
+ }
999
+ /** `DataGridToolbar.BulkAction`. Renders nothing while the selection is
1000
+ * empty (locked rows count as selected); otherwise shows the label and the
1001
+ * count. */
1002
+ export interface DataGridToolbarBulkActionProps extends Omit<ButtonProps, 'onClick' | 'children' | 'startIcon' | 'intent'> {
1003
+ label: string;
1004
+ icon?: ReactNode;
1005
+ onAction: DataGridBulkActionHandler;
1006
+ variant?: 'default' | 'destructive';
1007
+ }
1008
+ /** `DataGridToolbar.FilterChips`: one chip per column filter (operator and
1009
+ * value; masked columns show the label only), one per host key (label from
1010
+ * `filterLabels` only, never the value, so a host filter on a patient name
1011
+ * cannot leak), one for the quick search, and Clear all. No props. */
1012
+ export type DataGridToolbarFilterChipsProps = Record<string, never>;
1013
+ /**
1014
+ * `localStorage[DATA_GRID_COLUMN_STATE_PREFIX + gridId]`, version 1 from day
1015
+ * one (DataGrid has never saved state, so nothing to migrate). Each field is
1016
+ * validated on its own; a bad field is dropped and the others kept. Pins are
1017
+ * logical, so no text direction is stored. Utility column ids never appear.
1018
+ */
1019
+ export interface DataGridColumnStateEnvelopeV1 {
1020
+ v: 1;
1021
+ /** Full leaf order at save time. New columns since then keep their
1022
+ * declared position; unknown ids are dropped. */
1023
+ order?: string[];
1024
+ /** px, user-resized columns only; clamped on load. */
1025
+ sizing?: Record<string, number>;
1026
+ pinning?: {
1027
+ start: string[];
1028
+ end: string[];
1029
+ };
1030
+ /** User-touched columns only: its keys are the user-touched set. */
1031
+ visibility?: Record<string, boolean>;
1032
+ }
1033
+ /** @internal Every slice the grid owns, in kit shapes. */
1034
+ export interface DataGridSlices {
1035
+ sorting: DataGridSortEntry[];
1036
+ filters: DataGridFilterModel;
1037
+ quickFilter: string;
1038
+ page: DataGridPagination;
1039
+ /** Selectable ids only; locked ids are added on output. */
1040
+ rowSelection: string[];
1041
+ expanded: string[];
1042
+ /** Explicit visibility only (user, host, storage). */
1043
+ columnVisibility: Record<string, boolean>;
1044
+ columnPinning: DataGridColumnPinning;
1045
+ columnSizing: Record<string, number>;
1046
+ columnOrder: string[];
1047
+ }
1048
+ /** @internal */
1049
+ export type DataGridSliceName = keyof DataGridSlices;
1050
+ /** @internal Which change event each slice emits. */
1051
+ export declare const DATA_GRID_SLICE_EVENT: Readonly<Record<DataGridSliceName, DataGridChangeEvent>>;
1052
+ /**
1053
+ * @internal The single owner of grid state (`state.ts`). Each slice is held
1054
+ * internally or mirrored from its controlled prop. v9 receives every slice
1055
+ * as `state` and writes back through `on<Slice>Change(updater)`, which calls
1056
+ * `write(slice, …, 'user')`. Handle, seams, storage and responsive code call
1057
+ * `write` with their own source.
1058
+ */
1059
+ export interface DataGridStore {
1060
+ /** Uncontrolled: the held value. Controlled: the last value written
1061
+ * through `write` until the next prop value arrives through
1062
+ * `syncFromProps`, then the prop. */
1063
+ get<K extends DataGridSliceName>(slice: K): DataGridSlices[K];
1064
+ /** Resolves an updater against `get(slice)` (two writes in one tick
1065
+ * compose, controlled or not), records the result (a pending value for a
1066
+ * controlled slice, the held value otherwise), calls the host's
1067
+ * `on…Change` with a kit value, then notifies subscribers synchronously.
1068
+ * A sort, filter or quick-filter write also resets `page.pageIndex` to 0
1069
+ * in the same notification. With `clearSelectionOnFilterChange`, a
1070
+ * filter or quick-filter write (or `syncFromProps` change) that changes
1071
+ * the value also clears `rowSelection` and emits `'selection'` with the
1072
+ * same source straight after (rules on that prop). */
1073
+ write<K extends DataGridSliceName>(slice: K, next: DataGridSlices[K] | ((previous: DataGridSlices[K]) => DataGridSlices[K]), source: DataGridChangeSource): void;
1074
+ /** Called on every render with the controlled slices' current prop values
1075
+ * (absent key = uncontrolled). For each slice, the prop replaces any
1076
+ * pending value; when it differs (stable JSON compare) from what `get`
1077
+ * returned, emits the slice's event with source `'host'`, or `'restore'`
1078
+ * when it equals a pending restore write. Also prunes selection and
1079
+ * expanded ids and clamps `pageIndex` (see `DataGridProps`). */
1080
+ syncFromProps(controlled: Partial<DataGridSlices>): void;
1081
+ /** Emits a change no slice write carries: `'rows'` when `rows` or
1082
+ * `rowCount` change (source `'host'`). In client mode the engine also
1083
+ * emits `'rows'` (source `'host'`) after the commit in which a filter or
1084
+ * quick-search write changed the filtered row set, because
1085
+ * `getRowCount()` and `getRowIds()` read inside the synchronous
1086
+ * `'filter'` event still see the old v9 row model. */
1087
+ notify(change: DataGridChange): void;
1088
+ isControlled(slice: DataGridSliceName): boolean;
1089
+ subscribe(listener: (change: DataGridChange) => void): () => void;
1090
+ }
1091
+ /** @internal Module-level mount signal in `grid-context.ts`: wakes lifted
1092
+ * toolbars (`DataGridToolbarProvider`) when any DataGrid mounts or
1093
+ * unmounts. */
1094
+ export interface DataGridMountSignal {
1095
+ subscribe(listener: () => void): () => void;
1096
+ notify(): void;
1097
+ }
1098
+ /** @internal Resolved per-row selection state. */
1099
+ export interface DataGridResolvedSelectability {
1100
+ state: 'selectable' | 'locked' | 'none';
1101
+ /** Translated reason, or `null` (the grid's default copy then applies). */
1102
+ reason: string | null;
1103
+ }
1104
+ /**
1105
+ * @internal v9 `columnMeta` slot, set with `metaHelper`
1106
+ * (`helpers/metaHelper.d.ts:23`). TData-free on purpose: v9 meta slots are
1107
+ * static types with no row parameter (`helpers/tableFeatures.d.ts:15-17`,
1108
+ * `types/ColumnDef.d.ts:21-27`), and `DataGridColumn<TData>` is
1109
+ * contravariant in TData, so a typed kit column cannot be stored in a
1110
+ * `DataGridColumnMeta<unknown>` without a cast. The kit column and group are
1111
+ * read by id from the engine's typed maps (`DataGridEngine.kitColumns`,
1112
+ * `kitGroups`), never from `columns[index]` (today's index mapping breaks
1113
+ * with order, visibility and groups).
1114
+ */
1115
+ export interface DataGridColumnMeta {
1116
+ /** `'select'` and `'expand'` are utility columns (`__select`,
1117
+ * `__expand`): pinned start, never hideable, exported or listed. */
1118
+ kind: 'data' | 'group' | 'select' | 'expand';
1119
+ /** Plain label (headerLabel, string header, or id with a DEV warning). */
1120
+ label: string;
1121
+ isRowHeader: boolean;
1122
+ /** The group a leaf belongs to, or `null`. */
1123
+ groupId: string | null;
1124
+ }
1125
+ /** @internal v9 `tableMeta` slot. TData-free for the same reason; every
1126
+ * per-row member takes the row id and the engine resolves the row. */
1127
+ export interface DataGridTableMeta {
1128
+ privacyMode: boolean;
1129
+ /** Plain or privacy-safe row name (see `DataGridProps.getRowLabel`). */
1130
+ getRowLabel: (rowId: string) => string;
1131
+ getSelectability: (rowId: string) => DataGridResolvedSelectability;
1132
+ isRowReadOnly: (rowId: string) => boolean;
1133
+ /** Is this cell masked under privacy mode? */
1134
+ isMasked: (rowId: string, columnId: string) => boolean;
1135
+ /** Does privacy mode mask any cell of this row? Host text shown on such a
1136
+ * row (reasons, editor errors) gives way to kit copy. */
1137
+ isRowMasked: (rowId: string) => boolean;
1138
+ /** BCP 47 locale (`i18n.language`). The registered kit sort fns read it
1139
+ * through `row.table.options.meta` for their `Intl.Collator`, since a
1140
+ * registry entry is module-scoped and cannot close over the grid's
1141
+ * locale. */
1142
+ locale: string;
1143
+ /** What quick search matches in one cell: the column's `exportValue`,
1144
+ * else its `value` (`kitQuick` reads it through
1145
+ * `row.table.options.meta`). Absent: v9's accessor value. */
1146
+ getSearchValue?: (rowId: string, columnId: string) => unknown;
1147
+ }
1148
+ /** @internal What `data-grid.tsx` hands the engine hook: every prop that
1149
+ * affects state or the row model, plus measured context. */
1150
+ export type DataGridEngineOptions<TData> = Omit<DataGridProps<TData>, keyof HTMLAttributes<HTMLDivElement> | 'caption' | 'toolbar' | 'density' | 'height' | 'error' | 'empty'> & {
1151
+ /** From `useDirection(rootRef)` (`src/hooks/use-direction.ts:21`); feeds
1152
+ * v9 `columnResizeDirection`. */
1153
+ direction: 'ltr' | 'rtl';
1154
+ /** Grid root inline size from a ResizeObserver; `null` before layout. */
1155
+ containerInlineSize: number | null;
1156
+ /** `print.ts` is rendering for print (design § 5.5): the engine then turns
1157
+ * virtualisation off and, in client mode, paging off. Default `false`. */
1158
+ printing?: boolean;
1159
+ /** The data column holding keyboard focus, if any. Responsive hiding never
1160
+ * hides it (design § 12.1, `responsive.test.ts`). Default `null`. */
1161
+ focusedColumnId?: string | null;
1162
+ /** The grid `caption`, read by the toolbar seam's `getCaption` for the
1163
+ * default export file name (design § 7.4). Optional so a missing caption
1164
+ * falls back to `table-export`. */
1165
+ caption?: string;
1166
+ };
1167
+ /** @internal Selection helpers for the header box and row boxes. */
1168
+ export interface DataGridSelectionApi {
1169
+ mode: 'none' | 'single' | 'multiple';
1170
+ scope: 'all' | 'page' | 'none';
1171
+ /** Over selectable rows in scope only. */
1172
+ headerState: boolean | 'indeterminate';
1173
+ toggleAll(checked: boolean): void;
1174
+ /** Radix Checkbox reports only `onCheckedChange` (`checkbox.tsx:111`), so
1175
+ * the cell captures Shift on keydown and pointerdown and passes it here;
1176
+ * the engine calls v9 `row.getToggleSelectedHandler()({ target:
1177
+ * { checked }, shiftKey })` (`rowSelectionFeature.types.d.ts:103`). */
1178
+ toggleRow(rowId: string, checked: boolean, modifiers: {
1179
+ shiftKey: boolean;
1180
+ }): void;
1181
+ isSelected(rowId: string): boolean;
1182
+ getSelectability(rowId: string): DataGridResolvedSelectability;
1183
+ }
1184
+ /** @internal Facts the renderer needs beyond the v9 row model. */
1185
+ export interface DataGridStatusInfo {
1186
+ dataMode: 'client' | 'server';
1187
+ status: 'ready' | 'loading' | 'error';
1188
+ /** No rows to show (before the status overlay is chosen). */
1189
+ isEmpty: boolean;
1190
+ /** A column filter, host key or quick search is active. */
1191
+ anyFilterActive: boolean;
1192
+ rowCount: number;
1193
+ pageCount: number;
1194
+ /** Body items the current model renders (rows + open detail panels). The
1195
+ * renderer builds one flattened item list (rows, expanded sub-rows, open
1196
+ * detail panels) over the whole pre-paginated order and derives
1197
+ * `aria-rowindex` from it, never from `row.getDisplayIndex()`, which
1198
+ * ignores detail panels (`core/rows/coreRowsFeature.utils.js:10-28`). */
1199
+ renderedItemCount: number;
1200
+ /** `renderedItemCount > DATA_GRID_VIRTUALIZE_ABOVE` and not `'off'`, and
1201
+ * not printing. */
1202
+ virtualised: boolean;
1203
+ /** Header rows (group rows + leaf row), for `aria-rowindex`. */
1204
+ headerRowCount: number;
1205
+ }
1206
+ /** @internal Layout facts for CVA variants and custom-property setters. */
1207
+ export interface DataGridLayoutInfo {
1208
+ /** Any column declares a size, resizing is on, or the grid virtualises. */
1209
+ fixed: boolean;
1210
+ hasFooter: boolean;
1211
+ hasPinned: boolean;
1212
+ /** v9 `getStartTotalSize()` / `getEndTotalSize()`
1213
+ * (`columnSizingFeature.types.d.ts:68,72`) in fixed layout; `null` in
1214
+ * auto layout, where the renderer measures pinned cells instead. */
1215
+ startPinnedTotalPx: number | null;
1216
+ endPinnedTotalPx: number | null;
1217
+ }
1218
+ /** @internal What the renderer gives the engine so handle methods that need
1219
+ * the DOM or the virtualiser can work. */
1220
+ export interface DataGridRendererBindings {
1221
+ print(): Promise<void>;
1222
+ scrollToRow(id: string): void;
1223
+ focusRow(id: string, columnId?: string): void;
1224
+ }
1225
+ /**
1226
+ * @internal What `useDataGridEngine` returns. `TTable` is the v9 table
1227
+ * (`ReactTable<typeof dataGridFeatures, TData>` from
1228
+ * `@tanstack/react-table`'s `useTable.d.ts:6`), bound in the engine file so
1229
+ * this contract stays TanStack-free. Never leaves the data-grid folder.
1230
+ * The implementation sites keep `TData extends object` (the public
1231
+ * `forwardRef` cast, `useDataGridEngine`, `DataGridTable`), because v9
1232
+ * requires `RowData` (`types/type-utils.d.ts:4`).
1233
+ */
1234
+ export interface DataGridEngine<TData, TTable> {
1235
+ table: TTable;
1236
+ store: DataGridStore;
1237
+ /** Kit columns by id (typed; the v9 meta holds no kit column). */
1238
+ kitColumns: ReadonlyMap<string, DataGridColumn<TData>>;
1239
+ /** Kit groups by id. */
1240
+ kitGroups: ReadonlyMap<string, DataGridColumnGroup>;
1241
+ /** Stable for the grid's lifetime. */
1242
+ handle: DataGridHandle;
1243
+ /** Stable; the DataGrid implementation of the toolbar seam. */
1244
+ toolbarSeam: TableToolbarSeam;
1245
+ selection: DataGridSelectionApi;
1246
+ status: DataGridStatusInfo;
1247
+ layout: DataGridLayoutInfo;
1248
+ getFooterContext(): DataGridFooterContext<TData>;
1249
+ /** Every filtered, sorted row (client) or the page (server), formatted,
1250
+ * privacy-masked. v9 `getPrePaginatedRowModel()`
1251
+ * (`rowPaginationFeature.types.d.ts:134`), flattened depth-first by hand:
1252
+ * with `paginateExpandedRows: false` that model holds top-level rows only
1253
+ * (`features/row-expanding/createExpandedRowModel.js:27-33`). Built by
1254
+ * `buildDataGridExportSnapshot`, which the lead stubs in step 0. */
1255
+ getExportSnapshot(): TableExportSnapshot;
1256
+ /** Called once by the renderer on mount; returns an unbind. */
1257
+ bindRenderer(bindings: DataGridRendererBindings): () => void;
1258
+ }
1259
+ /**
1260
+ * @internal Input of `createDataGridToolbarSeam` (`toolbar-seam.ts`). The
1261
+ * seam is built from the handle alone plus three extras, so the toolbar
1262
+ * owner codes against this file, not against the engine.
1263
+ */
1264
+ export interface DataGridToolbarSeamDeps {
1265
+ /** A second handle over the same store whose writes are tagged `'user'`
1266
+ * (the public handle tags `'api'`). */
1267
+ userHandle: DataGridHandle;
1268
+ getExportSnapshot(): TableExportSnapshot;
1269
+ /** `filterLabels[key]`, for host-key chips. */
1270
+ getFilterLabel(key: string): string | undefined;
1271
+ /** The grid `caption`, for the default export file name (CSV, XLSX,
1272
+ * PDF). Absent: `table-export`. */
1273
+ getCaption?(): string;
1274
+ /** Toolbar-only facts about one column that the public handle does not
1275
+ * carry: a select filter's option labels, so a chip says "To load" and
1276
+ * not `toLoad` (left out while the column is masked), and whether
1277
+ * privacy mode removes the column (`privacy: 'hide'`), so ColumnToggle
1278
+ * leaves it out. Absent: chips show raw values, nothing counts as
1279
+ * hidden by privacy. */
1280
+ getColumnToolbarInfo?(id: string): {
1281
+ filterOptions?: ReadonlyArray<{
1282
+ value: string | number;
1283
+ label: string;
1284
+ }>;
1285
+ hiddenByPrivacy: boolean;
1286
+ };
1287
+ }
1288
+ /** @internal Signature of `createDataGridToolbarSeam` (`toolbar-seam.ts`). */
1289
+ export type CreateDataGridToolbarSeam = (deps: DataGridToolbarSeamDeps) => TableToolbarSeam;
1290
+ /** @internal Props of the header filter trigger (`filters/filter-trigger.tsx`),
1291
+ * rendered by `header.tsx`. Opens a Popover with the kind's panel. Not
1292
+ * checked by `check-prop-runtime-coverage`: step 0 scopes that script to
1293
+ * the folder's own `<PascalName>Props` (`DataGridProps`). */
1294
+ export interface DataGridFilterTriggerProps {
1295
+ columnId: string;
1296
+ /** Plain column name, for "Filter {{column}}". */
1297
+ columnLabel: string;
1298
+ config: DataGridColumnFilter;
1299
+ /** This column's current model, if any. */
1300
+ value: DataGridColumnFilterModel | undefined;
1301
+ /** `null` clears. The header writes it with source `'user'`. */
1302
+ onChange: (model: DataGridColumnFilterModel | null) => void;
1303
+ /** `config.options`, or (client mode) the distinct values of every row. */
1304
+ options: readonly DataGridOption[];
1305
+ dataMode: 'client' | 'server';
1306
+ }
1307
+ /** @internal Input of `buildDataGridExportSnapshot` (`export-snapshot.ts`). */
1308
+ export interface DataGridExportInput<TData> {
1309
+ scope: 'all-filtered' | 'current-page';
1310
+ /** Visible, exportable leaf columns in display order. */
1311
+ columns: ReadonlyArray<{
1312
+ id: string;
1313
+ label: string;
1314
+ align: 'start' | 'end';
1315
+ column: DataGridColumn<TData>;
1316
+ }>;
1317
+ /** v9 `getPrePaginatedRowModel().rows` (client) or the page (server),
1318
+ * flattened depth-first (each filtered sub-row after its parent, expanded
1319
+ * or not, via `row.subRows`); detail panels are not rows. */
1320
+ rows: ReadonlyArray<{
1321
+ id: string;
1322
+ original: TData;
1323
+ }>;
1324
+ /** Masked cells export `maskFor(...)`, never the value. */
1325
+ isMasked: (row: TData, columnId: string) => boolean;
1326
+ maskFor: (row: TData, columnId: string) => string;
1327
+ /** Totals: a footer that is (or returns) a string or number is exported;
1328
+ * any other node exports `null`. `null` when there is no footer. */
1329
+ footer: DataGridFooterContext<TData> | null;
1330
+ /** BCP 47 locale for number and date text (`i18n.language`). */
1331
+ locale: string;
1332
+ }
1333
+ /** @internal Signature of `buildDataGridExportSnapshot` (`export-snapshot.ts`). */
1334
+ export type BuildDataGridExportSnapshot = <TData>(input: DataGridExportInput<TData>) => TableExportSnapshot;
1335
+ /** @internal Context the `toolbar` slot and DataGridToolbar parts read. */
1336
+ export interface DataGridContextValue {
1337
+ handle: DataGridHandle;
1338
+ toolbarSeam: TableToolbarSeam;
1339
+ }
1340
+ /** @internal Context DataGridTabs provides so a descendant DataGrid
1341
+ * registers itself (no `getTable` needed). */
1342
+ export interface DataGridRegistry {
1343
+ register(handle: DataGridHandle): () => void;
1344
+ }
1345
+ export {};
1346
+ //# sourceMappingURL=types.d.ts.map