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