@alfadocs/ui-kit-debug 1.0.0 → 1.2.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 (231) hide show
  1. package/dist/_chunks/{actions-cell-renderer-DaL80uqL.js → actions-cell-renderer-ClGCSQnA.js} +600 -565
  2. package/dist/_chunks/actions-cell-renderer-ClGCSQnA.js.map +1 -0
  3. package/dist/_chunks/{ai-consent-banner-BXD7W6FI.js → ai-consent-banner-DKgFfSzc.js} +2 -2
  4. package/dist/_chunks/{ai-consent-banner-BXD7W6FI.js.map → ai-consent-banner-DKgFfSzc.js.map} +1 -1
  5. package/dist/_chunks/{alert-Cxaqd-QO.js → alert-DS22ha1n.js} +103 -98
  6. package/dist/_chunks/alert-DS22ha1n.js.map +1 -0
  7. package/dist/_chunks/{annotation-marker-qt5R9WZX.js → annotation-marker-CsUJGZjQ.js} +7 -5
  8. package/dist/_chunks/annotation-marker-CsUJGZjQ.js.map +1 -0
  9. package/dist/_chunks/{audio-recorder-BjnB7V8n.js → audio-recorder-sRsGS-0V.js} +2 -2
  10. package/dist/_chunks/{audio-recorder-BjnB7V8n.js.map → audio-recorder-sRsGS-0V.js.map} +1 -1
  11. package/dist/_chunks/{booking-DSOK-bnR.js → booking-D8fCzcUd.js} +2 -2
  12. package/dist/_chunks/{booking-DSOK-bnR.js.map → booking-D8fCzcUd.js.map} +1 -1
  13. package/dist/_chunks/{care-plan-card-BrwhyIJI.js → care-plan-card-DjjVnBYz.js} +2 -2
  14. package/dist/_chunks/{care-plan-card-BrwhyIJI.js.map → care-plan-card-DjjVnBYz.js.map} +1 -1
  15. package/dist/_chunks/{care-plan-entry-card-DWEdCQM3.js → care-plan-entry-card-BVhpvd-P.js} +2 -2
  16. package/dist/_chunks/{care-plan-entry-card-DWEdCQM3.js.map → care-plan-entry-card-BVhpvd-P.js.map} +1 -1
  17. package/dist/_chunks/{collapsible-BrnRiCC6.js → collapsible-CGL9ontS.js} +65 -61
  18. package/dist/_chunks/collapsible-CGL9ontS.js.map +1 -0
  19. package/dist/_chunks/{document-preview-DXsCEj4U.js → document-preview-DAczwybt.js} +2 -2
  20. package/dist/_chunks/{document-preview-DXsCEj4U.js.map → document-preview-DAczwybt.js.map} +1 -1
  21. package/dist/_chunks/{document-scanner-cS_ispQs.js → document-scanner-BRYIc3A-.js} +2 -2
  22. package/dist/_chunks/{document-scanner-cS_ispQs.js.map → document-scanner-BRYIc3A-.js.map} +1 -1
  23. package/dist/_chunks/{entity-summary-BILN4wEG.js → entity-summary-BS6n7Iah.js} +2 -2
  24. package/dist/_chunks/{entity-summary-BILN4wEG.js.map → entity-summary-BS6n7Iah.js.map} +1 -1
  25. package/dist/_chunks/{face-scheme-CjQAHvSP.js → face-scheme-Cou2efl7.js} +2 -2
  26. package/dist/_chunks/{face-scheme-CjQAHvSP.js.map → face-scheme-Cou2efl7.js.map} +1 -1
  27. package/dist/_chunks/{file-manager-B9LZzT5E.js → file-manager-CNSLiuLo.js} +2 -2
  28. package/dist/_chunks/{file-manager-B9LZzT5E.js.map → file-manager-CNSLiuLo.js.map} +1 -1
  29. package/dist/_chunks/{freemium-paywall-Dr2342_S.js → freemium-paywall-DsT7MaLd.js} +2 -2
  30. package/dist/_chunks/{freemium-paywall-Dr2342_S.js.map → freemium-paywall-DsT7MaLd.js.map} +1 -1
  31. package/dist/_chunks/link-cell-renderer-_DlEZHLI.js +772 -0
  32. package/dist/_chunks/link-cell-renderer-_DlEZHLI.js.map +1 -0
  33. package/dist/_chunks/{marketplace-app-shell-pCHBp8bo.js → marketplace-app-shell-DQC9Gpm0.js} +2 -2
  34. package/dist/_chunks/{marketplace-app-shell-pCHBp8bo.js.map → marketplace-app-shell-DQC9Gpm0.js.map} +1 -1
  35. package/dist/_chunks/{muscle-scheme-kgCX5qfO.js → muscle-scheme-yfzP_xoJ.js} +2 -2
  36. package/dist/_chunks/{muscle-scheme-kgCX5qfO.js.map → muscle-scheme-yfzP_xoJ.js.map} +1 -1
  37. package/dist/_chunks/notes-panel-CCz0J140.js +370 -0
  38. package/dist/_chunks/notes-panel-CCz0J140.js.map +1 -0
  39. package/dist/_chunks/{patient-details-UmNcxL0c.js → patient-details-l7pnsUq9.js} +2 -2
  40. package/dist/_chunks/{patient-details-UmNcxL0c.js.map → patient-details-l7pnsUq9.js.map} +1 -1
  41. package/dist/_chunks/{patient-search-vtRTSdf6.js → patient-search-H54Utav2.js} +2 -2
  42. package/dist/_chunks/{patient-search-vtRTSdf6.js.map → patient-search-H54Utav2.js.map} +1 -1
  43. package/dist/_chunks/{patient-table-QEVsFvwq.js → patient-table-DXk0wW8Q.js} +243 -239
  44. package/dist/_chunks/patient-table-DXk0wW8Q.js.map +1 -0
  45. package/dist/_chunks/payment-automation-upsell-C4LIw1iQ.js +305 -0
  46. package/dist/_chunks/payment-automation-upsell-C4LIw1iQ.js.map +1 -0
  47. package/dist/_chunks/{payment-form-BoGxEmGn.js → payment-form-CyKT20xZ.js} +2 -2
  48. package/dist/_chunks/{payment-form-BoGxEmGn.js.map → payment-form-CyKT20xZ.js.map} +1 -1
  49. package/dist/_chunks/{payment-request-card-CygO1anM.js → payment-request-card-CN30J6yM.js} +107 -138
  50. package/dist/_chunks/payment-request-card-CN30J6yM.js.map +1 -0
  51. package/dist/_chunks/{pdf-viewer-CcOuR2wj.js → pdf-viewer-DHg8SfUI.js} +2 -2
  52. package/dist/_chunks/{pdf-viewer-CcOuR2wj.js.map → pdf-viewer-DHg8SfUI.js.map} +1 -1
  53. package/dist/_chunks/{practice-results-yKbwIxqa.js → practice-results-qvJRkvLn.js} +2 -2
  54. package/dist/_chunks/{practice-results-yKbwIxqa.js.map → practice-results-qvJRkvLn.js.map} +1 -1
  55. package/dist/_chunks/receipt-euro-C6k4Gzhr.js +36 -0
  56. package/dist/_chunks/receipt-euro-C6k4Gzhr.js.map +1 -0
  57. package/dist/_chunks/{reviews-panel-DmOjvmyH.js → reviews-panel-BfUJhx3m.js} +2 -2
  58. package/dist/_chunks/{reviews-panel-DmOjvmyH.js.map → reviews-panel-BfUJhx3m.js.map} +1 -1
  59. package/dist/_chunks/{sign-document-cH9CboWB.js → sign-document-D70TEUw9.js} +2 -2
  60. package/dist/_chunks/{sign-document-cH9CboWB.js.map → sign-document-D70TEUw9.js.map} +1 -1
  61. package/dist/_chunks/{signature-request-BzXTV_RH.js → signature-request-BlNCXpRN.js} +2 -2
  62. package/dist/_chunks/{signature-request-BzXTV_RH.js.map → signature-request-BlNCXpRN.js.map} +1 -1
  63. package/dist/_chunks/sparkline-DJtZBe7O.js +501 -0
  64. package/dist/_chunks/sparkline-DJtZBe7O.js.map +1 -0
  65. package/dist/_chunks/{warning-stack-DKeAfj5M.js → warning-stack-IVf0oxh2.js} +2 -2
  66. package/dist/_chunks/{warning-stack-DKeAfj5M.js.map → warning-stack-IVf0oxh2.js.map} +1 -1
  67. package/dist/_chunks/{workflow-map-SIfAhmWz.js → workflow-map-ByyBYj6Y.js} +2 -2
  68. package/dist/_chunks/{workflow-map-SIfAhmWz.js.map → workflow-map-ByyBYj6Y.js.map} +1 -1
  69. package/dist/agent-catalog.json +237 -7
  70. package/dist/agent-i18n/en.json +17 -5
  71. package/dist/components/ai-consent-banner/index.js +1 -1
  72. package/dist/components/alert/alert.d.ts +20 -0
  73. package/dist/components/alert/alert.d.ts.map +1 -1
  74. package/dist/components/alert/index.d.ts +1 -1
  75. package/dist/components/alert/index.d.ts.map +1 -1
  76. package/dist/components/alert/index.js +1 -1
  77. package/dist/components/annotation-marker/annotation-marker.d.ts.map +1 -1
  78. package/dist/components/annotation-marker/index.js +1 -1
  79. package/dist/components/audio-recorder/index.js +1 -1
  80. package/dist/components/booking/index.js +1 -1
  81. package/dist/components/care-plan-card/index.js +1 -1
  82. package/dist/components/care-plan-entry-card/index.js +1 -1
  83. package/dist/components/collapsible/collapsible.d.ts.map +1 -1
  84. package/dist/components/collapsible/index.js +1 -1
  85. package/dist/components/data-table/data-table.d.ts.map +1 -1
  86. package/dist/components/data-table/filters/select-filter.d.ts +6 -0
  87. package/dist/components/data-table/filters/select-filter.d.ts.map +1 -1
  88. package/dist/components/data-table/hooks/use-presentational-aria-fix.d.ts +19 -0
  89. package/dist/components/data-table/hooks/use-presentational-aria-fix.d.ts.map +1 -0
  90. package/dist/components/data-table/index.js +2 -2
  91. package/dist/components/document-preview/index.js +1 -1
  92. package/dist/components/document-scanner/index.js +1 -1
  93. package/dist/components/entity-summary/index.js +1 -1
  94. package/dist/components/face-scheme/index.js +1 -1
  95. package/dist/components/file-manager/index.js +1 -1
  96. package/dist/components/freemium-paywall/index.js +1 -1
  97. package/dist/components/muscle-scheme/index.js +1 -1
  98. package/dist/components/notes-panel/index.js +1 -1
  99. package/dist/components/notes-panel/notes-panel.agent.d.ts.map +1 -1
  100. package/dist/components/notes-panel/notes-panel.d.ts +45 -2
  101. package/dist/components/notes-panel/notes-panel.d.ts.map +1 -1
  102. package/dist/components/patient-details/index.js +1 -1
  103. package/dist/components/patient-search/index.js +1 -1
  104. package/dist/components/patient-table/columns.d.ts.map +1 -1
  105. package/dist/components/patient-table/index.js +1 -1
  106. package/dist/components/payment-card/index.js +1 -1
  107. package/dist/components/payment-form/index.js +1 -1
  108. package/dist/components/pdf-viewer/index.js +1 -1
  109. package/dist/components/practice-results/index.js +1 -1
  110. package/dist/components/reviews-panel/index.js +1 -1
  111. package/dist/components/sign-document/index.js +1 -1
  112. package/dist/components/skeleton-scheme/index.js +1 -1
  113. package/dist/components/sparkline/index.d.ts +1 -1
  114. package/dist/components/sparkline/index.d.ts.map +1 -1
  115. package/dist/components/sparkline/index.js +1 -1
  116. package/dist/components/sparkline/sparkline.agent.d.ts.map +1 -1
  117. package/dist/components/sparkline/sparkline.d.ts +60 -3
  118. package/dist/components/sparkline/sparkline.d.ts.map +1 -1
  119. package/dist/components/warning-stack/index.js +1 -1
  120. package/dist/components/workflow/index.js +1 -1
  121. package/dist/host-compat.css +13 -1
  122. package/dist/i18n/locales/ar.d.ts +3 -0
  123. package/dist/i18n/locales/ar.d.ts.map +1 -1
  124. package/dist/i18n/locales/ar.js +3 -0
  125. package/dist/i18n/locales/ar.js.map +1 -1
  126. package/dist/i18n/locales/de.d.ts +3 -0
  127. package/dist/i18n/locales/de.d.ts.map +1 -1
  128. package/dist/i18n/locales/de.js +3 -0
  129. package/dist/i18n/locales/de.js.map +1 -1
  130. package/dist/i18n/locales/el.d.ts +3 -0
  131. package/dist/i18n/locales/el.d.ts.map +1 -1
  132. package/dist/i18n/locales/el.js +3 -0
  133. package/dist/i18n/locales/el.js.map +1 -1
  134. package/dist/i18n/locales/en.d.ts +3 -0
  135. package/dist/i18n/locales/en.d.ts.map +1 -1
  136. package/dist/i18n/locales/en.js +3 -0
  137. package/dist/i18n/locales/en.js.map +1 -1
  138. package/dist/i18n/locales/es.d.ts +3 -0
  139. package/dist/i18n/locales/es.d.ts.map +1 -1
  140. package/dist/i18n/locales/es.js +3 -0
  141. package/dist/i18n/locales/es.js.map +1 -1
  142. package/dist/i18n/locales/fr.d.ts +3 -0
  143. package/dist/i18n/locales/fr.d.ts.map +1 -1
  144. package/dist/i18n/locales/fr.js +3 -0
  145. package/dist/i18n/locales/fr.js.map +1 -1
  146. package/dist/i18n/locales/hi.d.ts +3 -0
  147. package/dist/i18n/locales/hi.d.ts.map +1 -1
  148. package/dist/i18n/locales/hi.js +3 -0
  149. package/dist/i18n/locales/hi.js.map +1 -1
  150. package/dist/i18n/locales/it.d.ts +3 -0
  151. package/dist/i18n/locales/it.d.ts.map +1 -1
  152. package/dist/i18n/locales/it.js +3 -0
  153. package/dist/i18n/locales/it.js.map +1 -1
  154. package/dist/i18n/locales/ja.d.ts +3 -0
  155. package/dist/i18n/locales/ja.d.ts.map +1 -1
  156. package/dist/i18n/locales/ja.js +3 -0
  157. package/dist/i18n/locales/ja.js.map +1 -1
  158. package/dist/i18n/locales/nl.d.ts +3 -0
  159. package/dist/i18n/locales/nl.d.ts.map +1 -1
  160. package/dist/i18n/locales/nl.js +3 -0
  161. package/dist/i18n/locales/nl.js.map +1 -1
  162. package/dist/i18n/locales/pl.d.ts +3 -0
  163. package/dist/i18n/locales/pl.d.ts.map +1 -1
  164. package/dist/i18n/locales/pl.js +3 -0
  165. package/dist/i18n/locales/pl.js.map +1 -1
  166. package/dist/i18n/locales/pt.d.ts +3 -0
  167. package/dist/i18n/locales/pt.d.ts.map +1 -1
  168. package/dist/i18n/locales/pt.js +3 -0
  169. package/dist/i18n/locales/pt.js.map +1 -1
  170. package/dist/i18n/locales/ro.d.ts +3 -0
  171. package/dist/i18n/locales/ro.d.ts.map +1 -1
  172. package/dist/i18n/locales/ro.js +3 -0
  173. package/dist/i18n/locales/ro.js.map +1 -1
  174. package/dist/i18n/locales/ru.d.ts +3 -0
  175. package/dist/i18n/locales/ru.d.ts.map +1 -1
  176. package/dist/i18n/locales/ru.js +3 -0
  177. package/dist/i18n/locales/ru.js.map +1 -1
  178. package/dist/i18n/locales/sq.d.ts +3 -0
  179. package/dist/i18n/locales/sq.d.ts.map +1 -1
  180. package/dist/i18n/locales/sq.js +3 -0
  181. package/dist/i18n/locales/sq.js.map +1 -1
  182. package/dist/i18n/locales/sv.d.ts +3 -0
  183. package/dist/i18n/locales/sv.d.ts.map +1 -1
  184. package/dist/i18n/locales/sv.js +3 -0
  185. package/dist/i18n/locales/sv.js.map +1 -1
  186. package/dist/i18n/locales/tr.d.ts +3 -0
  187. package/dist/i18n/locales/tr.d.ts.map +1 -1
  188. package/dist/i18n/locales/tr.js +3 -0
  189. package/dist/i18n/locales/tr.js.map +1 -1
  190. package/dist/i18n/locales/zh.d.ts +3 -0
  191. package/dist/i18n/locales/zh.d.ts.map +1 -1
  192. package/dist/i18n/locales/zh.js +3 -0
  193. package/dist/i18n/locales/zh.js.map +1 -1
  194. package/dist/index.js +974 -1268
  195. package/dist/index.js.map +1 -1
  196. package/dist/locales/ar.json +3 -0
  197. package/dist/locales/de.json +3 -0
  198. package/dist/locales/el.json +3 -0
  199. package/dist/locales/en.json +3 -0
  200. package/dist/locales/es.json +3 -0
  201. package/dist/locales/fr.json +3 -0
  202. package/dist/locales/hi.json +3 -0
  203. package/dist/locales/it.json +3 -0
  204. package/dist/locales/ja.json +3 -0
  205. package/dist/locales/nl.json +3 -0
  206. package/dist/locales/pl.json +3 -0
  207. package/dist/locales/pt.json +3 -0
  208. package/dist/locales/ro.json +3 -0
  209. package/dist/locales/ru.json +3 -0
  210. package/dist/locales/sq.json +3 -0
  211. package/dist/locales/sv.json +3 -0
  212. package/dist/locales/tr.json +3 -0
  213. package/dist/locales/zh.json +3 -0
  214. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  215. package/dist/patterns/payment-automation-upsell/index.js +5 -0
  216. package/dist/patterns/payment-automation-upsell/index.js.map +1 -0
  217. package/dist/patterns/signature-request/index.js +1 -1
  218. package/dist/tokens.css +1 -1
  219. package/package.json +5 -1
  220. package/dist/_chunks/actions-cell-renderer-DaL80uqL.js.map +0 -1
  221. package/dist/_chunks/alert-Cxaqd-QO.js.map +0 -1
  222. package/dist/_chunks/annotation-marker-qt5R9WZX.js.map +0 -1
  223. package/dist/_chunks/collapsible-BrnRiCC6.js.map +0 -1
  224. package/dist/_chunks/link-cell-renderer-Bt-mXeQY.js +0 -728
  225. package/dist/_chunks/link-cell-renderer-Bt-mXeQY.js.map +0 -1
  226. package/dist/_chunks/notes-panel-CTcOLLVo.js +0 -324
  227. package/dist/_chunks/notes-panel-CTcOLLVo.js.map +0 -1
  228. package/dist/_chunks/patient-table-QEVsFvwq.js.map +0 -1
  229. package/dist/_chunks/payment-request-card-CygO1anM.js.map +0 -1
  230. package/dist/_chunks/sparkline-DcXqRZoq.js +0 -283
  231. package/dist/_chunks/sparkline-DcXqRZoq.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { jsxs as O, jsx as g } from "react/jsx-runtime";
2
2
  import { createElement as x, useRef as k, useEffect as ee, useCallback as z, forwardRef as he, useState as te, useImperativeHandle as pe, useMemo as Y } from "react";
3
3
  import { useTranslation as $ } from "react-i18next";
4
- import { a as p, T as b, A as be, d as ne, D as P, e as ge } from "./actions-cell-renderer-DaL80uqL.js";
4
+ import { a as p, T as b, A as be, d as ne, D as P, e as ge } from "./actions-cell-renderer-ClGCSQnA.js";
5
5
  import { S as Ce } from "./select-BW5ecXlX.js";
6
6
  import { u as ve } from "./registry-DvAUVLHh.js";
7
- import { I as Ne, L as we, b as L, a as _, c as U, N as H, d as F, S as R, T as ie, D as K, C as Te, g as Fe, f as Re, U as Ie, e as ye } from "./link-cell-renderer-Bt-mXeQY.js";
7
+ import { I as Ne, L as we, b as L, a as _, c as U, N as H, d as F, S as R, T as ie, D as K, C as Te, g as Fe, f as Re, U as Ie, e as ye } from "./link-cell-renderer-_DlEZHLI.js";
8
8
  import { B as ae } from "./badge-DCOqV9mI.js";
9
9
  import { c as Pe } from "./index-D2ZczOXr.js";
10
10
  import { T as We } from "./timestamp-BV2lC-wV.js";
@@ -21,20 +21,20 @@ function ke(e) {
21
21
  }
22
22
  function Me(e) {
23
23
  if (e == null || e === "") return null;
24
- const a = typeof e == "number" ? e : Number(e);
25
- return Number.isFinite(a) ? a : null;
24
+ const i = typeof e == "number" ? e : Number(e);
25
+ return Number.isFinite(i) ? i : null;
26
26
  }
27
27
  function Ge(e) {
28
- const { value: a, currency: d = "EUR", options: s } = e, { t: i, i18n: r } = $("ui"), c = Me(a);
29
- if (c === null) return null;
30
- const h = r.language || "en", m = new Intl.NumberFormat(h, {
28
+ const { value: i, currency: c = "EUR", options: s } = e, { t: o, i18n: l } = $("ui"), u = Me(i);
29
+ if (u === null) return null;
30
+ const f = l.language || "en", d = new Intl.NumberFormat(f, {
31
31
  style: "currency",
32
- currency: d,
32
+ currency: c,
33
33
  ...s
34
- }).format(c / 100), { variant: u, statusKey: C } = ke(c), l = i(`patientTable.balance.status.${C}`);
35
- return /* @__PURE__ */ O(ae, { variant: u, withDot: !0, size: "sm", className: "ds:tabular-nums", children: [
36
- /* @__PURE__ */ g("span", { children: m }),
37
- /* @__PURE__ */ g("span", { className: "ds:sr-only", children: l })
34
+ }).format(u / 100), { variant: m, statusKey: C } = ke(u), a = o(`patientTable.balance.status.${C}`);
35
+ return /* @__PURE__ */ O(ae, { variant: m, withDot: !0, size: "sm", className: "ds:tabular-nums", children: [
36
+ /* @__PURE__ */ g("span", { children: d }),
37
+ /* @__PURE__ */ g("span", { className: "ds:sr-only", children: a })
38
38
  ] });
39
39
  }
40
40
  const Le = {
@@ -46,10 +46,10 @@ function _e(e) {
46
46
  return e === "accepted" || e === "estimate" || e === "none";
47
47
  }
48
48
  function Ue(e) {
49
- const { t: a } = $("ui"), { data: d, value: s, size: i = "sm" } = e, r = (d == null ? void 0 : d.carePlanStatus) ?? s;
50
- if (!_e(r)) return null;
51
- const c = Le[r];
52
- return /* @__PURE__ */ g(ae, { variant: c, withDot: !0, size: i, children: a(`patientTable.carePlanStatus.${r}`) });
49
+ const { t: i } = $("ui"), { data: c, value: s, size: o = "sm" } = e, l = (c == null ? void 0 : c.carePlanStatus) ?? s;
50
+ if (!_e(l)) return null;
51
+ const u = Le[l];
52
+ return /* @__PURE__ */ g(ae, { variant: u, withDot: !0, size: o, children: i(`patientTable.carePlanStatus.${l}`) });
53
53
  }
54
54
  const J = Pe(
55
55
  "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] ds:whitespace-nowrap",
@@ -69,37 +69,37 @@ const J = Pe(
69
69
  ), He = 1440 * 60 * 1e3, ze = 7;
70
70
  function $e(e) {
71
71
  if (e == null || e === "") return null;
72
- const a = e instanceof Date ? e.getTime() : typeof e == "number" ? e : new Date(String(e)).getTime();
73
- return Number.isNaN(a) ? null : a;
72
+ const i = e instanceof Date ? e.getTime() : typeof e == "number" ? e : new Date(String(e)).getTime();
73
+ return Number.isNaN(i) ? null : i;
74
74
  }
75
- function je(e, a) {
76
- if (a <= 0) return "default";
77
- const d = e - Date.now();
78
- return d < 0 ? "default" : d <= a * He ? "soon" : "default";
75
+ function je(e, i) {
76
+ if (i <= 0) return "default";
77
+ const c = e - Date.now();
78
+ return c < 0 ? "default" : c <= i * He ? "soon" : "default";
79
79
  }
80
80
  function Ke(e) {
81
- const { t: a } = $("ui"), { data: d, value: s, soonWithinDays: i = ze } = e, r = $e((d == null ? void 0 : d.nextAppointment) ?? s);
82
- if (r === null)
83
- return /* @__PURE__ */ g("span", { className: J({ tone: "empty" }), children: a("patientTable.nextAppointment.none") });
84
- const c = je(r, i);
85
- return /* @__PURE__ */ O("span", { className: J({ tone: c }), children: [
86
- c === "soon" ? /* @__PURE__ */ g(Se, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }) : null,
87
- /* @__PURE__ */ g(We, { value: r, format: "relative", shape: "bare" })
81
+ const { t: i } = $("ui"), { data: c, value: s, soonWithinDays: o = ze } = e, l = $e((c == null ? void 0 : c.nextAppointment) ?? s);
82
+ if (l === null)
83
+ return /* @__PURE__ */ g("span", { className: J({ tone: "empty" }), children: i("patientTable.nextAppointment.none") });
84
+ const u = je(l, o);
85
+ return /* @__PURE__ */ O("span", { className: J({ tone: u }), children: [
86
+ u === "soon" ? /* @__PURE__ */ g(Se, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }) : null,
87
+ /* @__PURE__ */ g(We, { value: l, format: "relative", shape: "bare" })
88
88
  ] });
89
89
  }
90
90
  function q(e) {
91
91
  return e.responsiveTier;
92
92
  }
93
93
  const Ye = 6;
94
- function qe(e, a) {
95
- const d = (i) => (r) => {
96
- a == null || a(i, r);
97
- }, s = (i, r) => ({
98
- icon: i.icon,
99
- label: i.label,
100
- variant: i.variant,
101
- onClick: d(i),
102
- ...r
94
+ function qe(e, i) {
95
+ const c = (o) => (l) => {
96
+ i == null || i(o, l);
97
+ }, s = (o, l) => ({
98
+ icon: o.icon,
99
+ label: o.label,
100
+ variant: o.variant,
101
+ onClick: c(o),
102
+ ...l
103
103
  });
104
104
  return [
105
105
  s(
@@ -125,7 +125,7 @@ function qe(e, a) {
125
125
  icon: x(De, { "aria-hidden": "true" })
126
126
  },
127
127
  // Hidden when the patient has email contact disabled (spec).
128
- { hidden: (i) => !i.emailEnabled }
128
+ { hidden: (o) => !o.emailEnabled }
129
129
  ),
130
130
  s(
131
131
  {
@@ -135,7 +135,7 @@ function qe(e, a) {
135
135
  },
136
136
  // Hidden when no phone number is SMS-enabled (spec).
137
137
  {
138
- hidden: (i) => !(i.phoneNumbers ?? []).some((r) => r.smsEnabled)
138
+ hidden: (o) => !(o.phoneNumbers ?? []).some((l) => l.smsEnabled)
139
139
  }
140
140
  ),
141
141
  s(
@@ -156,7 +156,7 @@ function qe(e, a) {
156
156
  // Disabled (with a reason) for archived patients — the row model's
157
157
  // closest "cannot delete" signal. Surfaced as the inline tooltip.
158
158
  {
159
- disabled: (i) => !!i.isArchived,
159
+ disabled: (o) => !!o.isArchived,
160
160
  disabledReason: e("patientTable.actions.deleteLocked")
161
161
  }
162
162
  )
@@ -165,28 +165,29 @@ function qe(e, a) {
165
165
  const Qe = () => !1, B = "✓", W = "—";
166
166
  function Xe(e) {
167
167
  if (!e) return null;
168
- const a = new Date(e), d = a.getTime();
169
- if (Number.isNaN(d)) return null;
168
+ const i = new Date(e), c = i.getTime();
169
+ if (Number.isNaN(c)) return null;
170
170
  const s = /* @__PURE__ */ new Date();
171
- let i = s.getFullYear() - a.getFullYear();
172
- const r = s.getMonth() - a.getMonth();
173
- return (r < 0 || r === 0 && s.getDate() < a.getDate()) && (i -= 1), i >= 0 ? i : null;
171
+ let o = s.getFullYear() - i.getFullYear();
172
+ const l = s.getMonth() - i.getMonth();
173
+ return (l < 0 || l === 0 && s.getDate() < i.getDate()) && (o -= 1), o >= 0 ? o : null;
174
174
  }
175
175
  function Je(e) {
176
- return e.map((a) => {
176
+ return e.map((i) => {
177
+ var o;
177
178
  const s = {
178
- colId: `custom:${a.fieldName}`,
179
- headerName: a.label,
179
+ colId: `custom:${i.fieldName}`,
180
+ headerName: i.label,
180
181
  hide: !0
181
182
  // No tier — custom fields are opt-in via ColumnToggle only.
182
183
  };
183
- return a.type === "checkbox" ? {
184
+ return i.type === "checkbox" ? {
184
185
  ...s,
185
- valueGetter: (i) => {
186
- var r, c;
187
- return ((c = (r = i.data) == null ? void 0 : r.customFields) == null ? void 0 : c[a.fieldName]) === !0;
186
+ valueGetter: (l) => {
187
+ var u, f;
188
+ return ((f = (u = l.data) == null ? void 0 : u.customFields) == null ? void 0 : f[i.fieldName]) === !0;
188
189
  },
189
- valueFormatter: (i) => i.value === !0 ? B : W,
190
+ valueFormatter: (l) => l.value === !0 ? B : W,
190
191
  filter: R,
191
192
  floatingFilterComponent: F,
192
193
  filterParams: {
@@ -197,26 +198,29 @@ function Je(e) {
197
198
  },
198
199
  minWidth: 110,
199
200
  width: 130
200
- } : a.type === "dropdown" ? {
201
+ } : i.type === "dropdown" ? {
201
202
  ...s,
202
203
  // TagListCellRenderer expects an array; wrap the single value.
203
- valueGetter: (i) => {
204
- var c, h;
205
- const r = (h = (c = i.data) == null ? void 0 : c.customFields) == null ? void 0 : h[a.fieldName];
206
- return typeof r == "string" && r ? [r] : [];
204
+ valueGetter: (l) => {
205
+ var f, d;
206
+ const u = (d = (f = l.data) == null ? void 0 : f.customFields) == null ? void 0 : d[i.fieldName];
207
+ return typeof u == "string" && u ? [u] : [];
207
208
  },
208
209
  cellRenderer: ie,
209
- filterValueGetter: (i) => {
210
- var c, h;
211
- const r = (h = (c = i.data) == null ? void 0 : c.customFields) == null ? void 0 : h[a.fieldName];
212
- return typeof r == "string" ? r : "";
210
+ filterValueGetter: (l) => {
211
+ var f, d;
212
+ const u = (d = (f = l.data) == null ? void 0 : f.customFields) == null ? void 0 : d[i.fieldName];
213
+ return typeof u == "string" ? u : "";
213
214
  },
214
215
  filter: R,
215
216
  floatingFilterComponent: F,
216
217
  filterParams: {
217
- options: (a.options ?? []).map((i) => ({
218
- value: i,
219
- label: i
218
+ // Undefined (not []) when the field declares no options, so the
219
+ // filter derives its choices from the rows. An empty array would
220
+ // mean "this column has no facets" and leave the filter unusable.
221
+ options: (o = i.options) == null ? void 0 : o.map((l) => ({
222
+ value: l,
223
+ label: l
220
224
  }))
221
225
  },
222
226
  sortable: !1,
@@ -224,10 +228,10 @@ function Je(e) {
224
228
  width: 160
225
229
  } : {
226
230
  ...s,
227
- valueGetter: (i) => {
228
- var c, h;
229
- const r = (h = (c = i.data) == null ? void 0 : c.customFields) == null ? void 0 : h[a.fieldName];
230
- return typeof r == "string" ? r : "";
231
+ valueGetter: (l) => {
232
+ var f, d;
233
+ const u = (d = (f = l.data) == null ? void 0 : f.customFields) == null ? void 0 : d[i.fieldName];
234
+ return typeof u == "string" ? u : "";
231
235
  },
232
236
  filter: b,
233
237
  floatingFilterComponent: p,
@@ -236,26 +240,26 @@ function Je(e) {
236
240
  };
237
241
  });
238
242
  }
239
- function Ze(e, a = {}) {
243
+ function Ze(e, i = {}) {
240
244
  const {
241
- hideDetails: d = !1,
245
+ hideDetails: c = !1,
242
246
  getActionsCompact: s = Qe,
243
- onRowAction: i,
244
- identityHref: r,
245
- customFields: c = []
246
- } = a, h = qe(e, i), m = {
247
+ onRowAction: o,
248
+ identityHref: l,
249
+ customFields: u = []
250
+ } = i, f = qe(e, o), d = {
247
251
  m: e("patientTable.gender.m"),
248
252
  f: e("patientTable.gender.f"),
249
253
  x: e("patientTable.gender.x")
250
- }, u = {
254
+ }, m = {
251
255
  yes: e("patientTable.consent.yes"),
252
256
  no: e("patientTable.consent.no"),
253
257
  notSpecified: e("patientTable.consent.notSpecified")
254
258
  }, C = {
255
- [u.yes]: "success",
256
- [u.no]: "error",
257
- [u.notSpecified]: "neutral"
258
- }, l = (t) => e(`patientTable.column.${t}`);
259
+ [m.yes]: "success",
260
+ [m.no]: "error",
261
+ [m.notSpecified]: "neutral"
262
+ }, a = (t) => e(`patientTable.column.${t}`);
259
263
  return [
260
264
  /* ── Avatar (P0, pinned-start) ─────────────────────────────────── */
261
265
  {
@@ -265,7 +269,7 @@ function Ze(e, a = {}) {
265
269
  // TEXT is clipped via the kit's `sr-only-th` convention (clips only
266
270
  // `.ag-header-cell-text`, keeping the header-cell box in the grid chrome
267
271
  // and the name in the a11y tree — see ag-grid-theme.css).
268
- headerName: l("avatar"),
272
+ headerName: a("avatar"),
269
273
  headerClass: "sr-only-th",
270
274
  pinned: "left",
271
275
  cellRenderer: Ne,
@@ -289,7 +293,7 @@ function Ze(e, a = {}) {
289
293
  /* ── First name (P0, pinned-start) — plain text ────────────────── */
290
294
  {
291
295
  colId: "firstName",
292
- headerName: l("firstName"),
296
+ headerName: a("firstName"),
293
297
  pinned: "left",
294
298
  field: "firstName",
295
299
  filter: b,
@@ -303,15 +307,15 @@ function Ze(e, a = {}) {
303
307
  /* ── Last name (P0, pinned-start) — the patient-detail link ────── */
304
308
  {
305
309
  colId: "lastName",
306
- headerName: l("lastName"),
310
+ headerName: a("lastName"),
307
311
  pinned: "left",
308
312
  field: "lastName",
309
313
  cellRenderer: we,
310
314
  cellRendererParams: {
311
- href: r,
315
+ href: l,
312
316
  // When no detail href is supplied the cell renders a button; route its
313
317
  // click through the same `show` row action.
314
- onClick: i ? (t) => i(
318
+ onClick: o ? (t) => o(
315
319
  { id: "show", label: e("patientTable.actions.show") },
316
320
  t
317
321
  ) : void 0
@@ -327,12 +331,12 @@ function Ze(e, a = {}) {
327
331
  /* ── Phone (P1) ────────────────────────────────────────────────── */
328
332
  {
329
333
  colId: "phone",
330
- headerName: l("phone"),
334
+ headerName: a("phone"),
331
335
  responsiveTier: "P1",
332
336
  // The primary phone number string (prefix + number).
333
337
  valueGetter: (t) => {
334
- var n, o, f;
335
- return ((f = (o = (n = t.data) == null ? void 0 : n.phoneNumbers) == null ? void 0 : o[0]) == null ? void 0 : f.number) ?? "";
338
+ var n, r, h;
339
+ return ((h = (r = (n = t.data) == null ? void 0 : n.phoneNumbers) == null ? void 0 : r[0]) == null ? void 0 : h.number) ?? "";
336
340
  },
337
341
  filter: b,
338
342
  floatingFilterComponent: p,
@@ -342,7 +346,7 @@ function Ze(e, a = {}) {
342
346
  /* ── Next appointment (P1) ─────────────────────────────────────── */
343
347
  {
344
348
  colId: "nextAppointment",
345
- headerName: l("nextAppointment"),
349
+ headerName: a("nextAppointment"),
346
350
  responsiveTier: "P1",
347
351
  field: "nextAppointment",
348
352
  cellRenderer: Ke,
@@ -354,7 +358,7 @@ function Ze(e, a = {}) {
354
358
  /* ── Unpaid balance (P1) ───────────────────────────────────────── */
355
359
  {
356
360
  colId: "unpaidBalance",
357
- headerName: l("unpaidBalance"),
361
+ headerName: a("unpaidBalance"),
358
362
  responsiveTier: "P1",
359
363
  field: "unpaidAmount",
360
364
  type: "numericColumn",
@@ -369,13 +373,13 @@ function Ze(e, a = {}) {
369
373
  /* ── Email (P2) — hidden when masking ──────────────────────────── */
370
374
  {
371
375
  colId: "email",
372
- headerName: l("email"),
376
+ headerName: a("email"),
373
377
  responsiveTier: "P2",
374
378
  field: "email",
375
379
  // Emit `hide` ONLY when masking (never a literal `hide: false`). A static
376
380
  // `hide: false` is re-applied by AG Grid on every `columnDefs` reconcile,
377
381
  // clobbering a runtime hide from the ViewSwitcher / responsive hook.
378
- hide: d || void 0,
382
+ hide: c || void 0,
379
383
  filter: b,
380
384
  floatingFilterComponent: p,
381
385
  minWidth: 200,
@@ -384,7 +388,7 @@ function Ze(e, a = {}) {
384
388
  /* ── Care-plan status (P2) ─────────────────────────────────────── */
385
389
  {
386
390
  colId: "carePlanStatus",
387
- headerName: l("carePlanStatus"),
391
+ headerName: a("carePlanStatus"),
388
392
  responsiveTier: "P2",
389
393
  field: "carePlanStatus",
390
394
  cellRenderer: Ue,
@@ -410,7 +414,7 @@ function Ze(e, a = {}) {
410
414
  /* ── Fiscal code (P3, text) ────────────────────────────────────── */
411
415
  {
412
416
  colId: "fiscalCode",
413
- headerName: l("fiscalCode"),
417
+ headerName: a("fiscalCode"),
414
418
  responsiveTier: "P3",
415
419
  field: "italianFiscalCode",
416
420
  filter: b,
@@ -421,7 +425,7 @@ function Ze(e, a = {}) {
421
425
  /* ── Age (P3, derived numeric) ─────────────────────────────────── */
422
426
  {
423
427
  colId: "age",
424
- headerName: l("age"),
428
+ headerName: a("age"),
425
429
  responsiveTier: "P3",
426
430
  // Left-aligned like the text columns — `numericColumn` (which right-aligns
427
431
  // header + cell) is for ledger figures, not a 2-digit age. Sort stays
@@ -438,20 +442,20 @@ function Ze(e, a = {}) {
438
442
  /* ── Gender (P3) ───────────────────────────────────────────────── */
439
443
  {
440
444
  colId: "gender",
441
- headerName: l("gender"),
445
+ headerName: a("gender"),
442
446
  responsiveTier: "P3",
443
447
  // Map the raw code to a localised label for both cell + set filter.
444
448
  valueGetter: (t) => {
445
449
  var n;
446
- return (n = t.data) != null && n.gender ? m[t.data.gender] : W;
450
+ return (n = t.data) != null && n.gender ? d[t.data.gender] : W;
447
451
  },
448
452
  filter: R,
449
453
  floatingFilterComponent: F,
450
454
  filterParams: {
451
455
  options: [
452
- { value: m.m, label: m.m },
453
- { value: m.f, label: m.f },
454
- { value: m.x, label: m.x }
456
+ { value: d.m, label: d.m },
457
+ { value: d.f, label: d.f },
458
+ { value: d.x, label: d.x }
455
459
  ]
456
460
  },
457
461
  minWidth: 110,
@@ -460,18 +464,18 @@ function Ze(e, a = {}) {
460
464
  /* ── Source (P3) ───────────────────────────────────────────────── */
461
465
  {
462
466
  colId: "source",
463
- headerName: l("source"),
467
+ headerName: a("source"),
464
468
  responsiveTier: "P3",
465
469
  // TagListCellRenderer expects an array; wrap the resolved source string.
466
470
  valueGetter: (t) => {
467
- var o, f;
468
- const n = ((o = t.data) == null ? void 0 : o.source) ?? ((f = t.data) == null ? void 0 : f.customSource);
471
+ var r, h;
472
+ const n = ((r = t.data) == null ? void 0 : r.source) ?? ((h = t.data) == null ? void 0 : h.customSource);
469
473
  return n ? [n] : [];
470
474
  },
471
475
  cellRenderer: ie,
472
476
  filterValueGetter: (t) => {
473
- var n, o;
474
- return ((n = t.data) == null ? void 0 : n.source) ?? ((o = t.data) == null ? void 0 : o.customSource) ?? "";
477
+ var n, r;
478
+ return ((n = t.data) == null ? void 0 : n.source) ?? ((r = t.data) == null ? void 0 : r.customSource) ?? "";
475
479
  },
476
480
  filter: R,
477
481
  floatingFilterComponent: F,
@@ -482,7 +486,7 @@ function Ze(e, a = {}) {
482
486
  /* ── Grouped: Identity — hidden by default ─────────────────────── */
483
487
  {
484
488
  colId: "dateOfBirth",
485
- headerName: l("dateOfBirth"),
489
+ headerName: a("dateOfBirth"),
486
490
  hide: !0,
487
491
  field: "dateOfBirth",
488
492
  cellRenderer: K,
@@ -494,7 +498,7 @@ function Ze(e, a = {}) {
494
498
  },
495
499
  {
496
500
  colId: "placeOfBirth",
497
- headerName: l("placeOfBirth"),
501
+ headerName: a("placeOfBirth"),
498
502
  hide: !0,
499
503
  field: "placeOfBirth",
500
504
  filter: b,
@@ -504,7 +508,7 @@ function Ze(e, a = {}) {
504
508
  },
505
509
  {
506
510
  colId: "countryOfBirth",
507
- headerName: l("countryOfBirth"),
511
+ headerName: a("countryOfBirth"),
508
512
  hide: !0,
509
513
  field: "countryOfBirth",
510
514
  filter: b,
@@ -515,7 +519,7 @@ function Ze(e, a = {}) {
515
519
  /* ── Grouped: Contact — hidden by default ──────────────────────── */
516
520
  {
517
521
  colId: "smsReminders",
518
- headerName: l("smsReminders"),
522
+ headerName: a("smsReminders"),
519
523
  hide: !0,
520
524
  valueGetter: (t) => {
521
525
  var n;
@@ -535,7 +539,7 @@ function Ze(e, a = {}) {
535
539
  },
536
540
  {
537
541
  colId: "emailReminders",
538
- headerName: l("emailReminders"),
542
+ headerName: a("emailReminders"),
539
543
  hide: !0,
540
544
  valueGetter: (t) => {
541
545
  var n;
@@ -555,7 +559,7 @@ function Ze(e, a = {}) {
555
559
  },
556
560
  {
557
561
  colId: "pec",
558
- headerName: l("pec"),
562
+ headerName: a("pec"),
559
563
  hide: !0,
560
564
  field: "pecAddress",
561
565
  filter: b,
@@ -566,7 +570,7 @@ function Ze(e, a = {}) {
566
570
  /* ── Grouped: Appointments — hidden by default ─────────────────── */
567
571
  {
568
572
  colId: "lastVisit",
569
- headerName: l("lastVisit"),
573
+ headerName: a("lastVisit"),
570
574
  hide: !0,
571
575
  field: "lastAppointment",
572
576
  cellRenderer: K,
@@ -579,7 +583,7 @@ function Ze(e, a = {}) {
579
583
  /* ── Grouped: Financial — hidden by default ────────────────────── */
580
584
  {
581
585
  colId: "billableAmount",
582
- headerName: l("billableAmount"),
586
+ headerName: a("billableAmount"),
583
587
  hide: !0,
584
588
  type: "numericColumn",
585
589
  cellRenderer: Te,
@@ -595,7 +599,7 @@ function Ze(e, a = {}) {
595
599
  },
596
600
  {
597
601
  colId: "discount",
598
- headerName: l("discount"),
602
+ headerName: a("discount"),
599
603
  hide: !0,
600
604
  field: "defaultDiscount",
601
605
  type: "numericColumn",
@@ -608,7 +612,7 @@ function Ze(e, a = {}) {
608
612
  /* ── Grouped: Clinical — hidden by default ─────────────────────── */
609
613
  {
610
614
  colId: "diagnosis",
611
- headerName: l("diagnosis"),
615
+ headerName: a("diagnosis"),
612
616
  hide: !0,
613
617
  field: "diagnosis",
614
618
  filter: b,
@@ -618,7 +622,7 @@ function Ze(e, a = {}) {
618
622
  },
619
623
  {
620
624
  colId: "insurance",
621
- headerName: l("insurance"),
625
+ headerName: a("insurance"),
622
626
  hide: !0,
623
627
  field: "defaultInsurance",
624
628
  filter: R,
@@ -628,7 +632,7 @@ function Ze(e, a = {}) {
628
632
  },
629
633
  {
630
634
  colId: "assignedTo",
631
- headerName: l("assignedTo"),
635
+ headerName: a("assignedTo"),
632
636
  hide: !0,
633
637
  cellRenderer: Ie,
634
638
  valueGetter: (t) => {
@@ -647,7 +651,7 @@ function Ze(e, a = {}) {
647
651
  },
648
652
  {
649
653
  colId: "job",
650
- headerName: l("job"),
654
+ headerName: a("job"),
651
655
  hide: !0,
652
656
  field: "job",
653
657
  filter: b,
@@ -658,7 +662,7 @@ function Ze(e, a = {}) {
658
662
  /* ── Grouped: Admin — hidden by default ────────────────────────── */
659
663
  {
660
664
  colId: "marketingConsent",
661
- headerName: l("marketingConsent"),
665
+ headerName: a("marketingConsent"),
662
666
  hide: !0,
663
667
  cellRenderer: ye,
664
668
  cellRendererParams: {
@@ -668,22 +672,22 @@ function Ze(e, a = {}) {
668
672
  var n;
669
673
  switch ((n = t.data) == null ? void 0 : n.marketingConsent) {
670
674
  case 1:
671
- return u.yes;
675
+ return m.yes;
672
676
  case 0:
673
- return u.no;
677
+ return m.no;
674
678
  default:
675
- return u.notSpecified;
679
+ return m.notSpecified;
676
680
  }
677
681
  },
678
682
  filter: R,
679
683
  floatingFilterComponent: F,
680
684
  filterParams: {
681
685
  options: [
682
- { value: u.yes, label: u.yes },
683
- { value: u.no, label: u.no },
686
+ { value: m.yes, label: m.yes },
687
+ { value: m.no, label: m.no },
684
688
  {
685
- value: u.notSpecified,
686
- label: u.notSpecified
689
+ value: m.notSpecified,
690
+ label: m.notSpecified
687
691
  }
688
692
  ]
689
693
  },
@@ -693,13 +697,13 @@ function Ze(e, a = {}) {
693
697
  },
694
698
  {
695
699
  colId: "patientNumber",
696
- headerName: l("patientNumber"),
700
+ headerName: a("patientNumber"),
697
701
  hide: !0,
698
702
  // `YYYY/N` yearly numbering.
699
703
  valueGetter: (t) => {
700
- var f, v;
701
- const n = (f = t.data) == null ? void 0 : f.yearlyNumberingYear, o = (v = t.data) == null ? void 0 : v.yearlyNumberingNumber;
702
- return n != null && o != null ? `${n}/${o}` : "";
704
+ var h, v;
705
+ const n = (h = t.data) == null ? void 0 : h.yearlyNumberingYear, r = (v = t.data) == null ? void 0 : v.yearlyNumberingNumber;
706
+ return n != null && r != null ? `${n}/${r}` : "";
703
707
  },
704
708
  filter: b,
705
709
  floatingFilterComponent: p,
@@ -708,7 +712,7 @@ function Ze(e, a = {}) {
708
712
  },
709
713
  {
710
714
  colId: "portal",
711
- headerName: l("portal"),
715
+ headerName: a("portal"),
712
716
  hide: !0,
713
717
  valueGetter: (t) => {
714
718
  var n;
@@ -728,7 +732,7 @@ function Ze(e, a = {}) {
728
732
  },
729
733
  {
730
734
  colId: "createdAt",
731
- headerName: l("createdAt"),
735
+ headerName: a("createdAt"),
732
736
  hide: !0,
733
737
  field: "createdAt",
734
738
  cellRenderer: K,
@@ -741,7 +745,7 @@ function Ze(e, a = {}) {
741
745
  /* ── Grouped: Address — hidden by default ──────────────────────── */
742
746
  {
743
747
  colId: "city",
744
- headerName: l("city"),
748
+ headerName: a("city"),
745
749
  hide: !0,
746
750
  field: "city",
747
751
  filter: b,
@@ -751,7 +755,7 @@ function Ze(e, a = {}) {
751
755
  },
752
756
  {
753
757
  colId: "province",
754
- headerName: l("province"),
758
+ headerName: a("province"),
755
759
  hide: !0,
756
760
  field: "province",
757
761
  filter: b,
@@ -761,7 +765,7 @@ function Ze(e, a = {}) {
761
765
  },
762
766
  {
763
767
  colId: "postcode",
764
- headerName: l("postcode"),
768
+ headerName: a("postcode"),
765
769
  hide: !0,
766
770
  field: "postcode",
767
771
  filter: b,
@@ -771,7 +775,7 @@ function Ze(e, a = {}) {
771
775
  },
772
776
  {
773
777
  colId: "country",
774
- headerName: l("country"),
778
+ headerName: a("country"),
775
779
  hide: !0,
776
780
  field: "countryCode",
777
781
  filter: b,
@@ -781,7 +785,7 @@ function Ze(e, a = {}) {
781
785
  },
782
786
  {
783
787
  colId: "street",
784
- headerName: l("street"),
788
+ headerName: a("street"),
785
789
  hide: !0,
786
790
  field: "street",
787
791
  filter: b,
@@ -790,11 +794,11 @@ function Ze(e, a = {}) {
790
794
  width: 220
791
795
  },
792
796
  /* ── Custom fields (per-practice, dynamic) — appended, hidden ──── */
793
- ...Je(c),
797
+ ...Je(u),
794
798
  /* ── Actions (P0, pinned-end) ──────────────────────────────────── */
795
799
  {
796
800
  colId: "actions",
797
- headerName: l("actions"),
801
+ headerName: a("actions"),
798
802
  // Pinned to the inline-end edge so actions stay reachable while the field
799
803
  // columns scroll. AG Grid `pinned` is physical — the grid's `enableRtl`
800
804
  // flips this to the start edge under RTL. Locked: neither a header drag
@@ -808,7 +812,7 @@ function Ze(e, a = {}) {
808
812
  cellClass: "ds:justify-start",
809
813
  cellRenderer: be,
810
814
  cellRendererParams: {
811
- actions: h,
815
+ actions: f,
812
816
  intent: "ghost",
813
817
  group: !0,
814
818
  label: e("patientTable.actions.group"),
@@ -820,7 +824,7 @@ function Ze(e, a = {}) {
820
824
  // The renderer collapses to a single overflow trigger via
821
825
  // `getActionsCompact`; the expanded width is DERIVED from the action count
822
826
  // so a row showing every action can't clip — 88px collapsed → fits-all.
823
- width: ne(h.length),
827
+ width: ne(f.length),
824
828
  minWidth: 88
825
829
  // Anchor — never auto-hidden (no tier).
826
830
  }
@@ -832,111 +836,111 @@ const et = [
832
836
  { minWidth: 900, tier: "P2" },
833
837
  { minWidth: 1200, tier: "P3" }
834
838
  ];
835
- function Z(e, a) {
836
- const d = /* @__PURE__ */ new Set();
837
- for (const s of a)
838
- e >= s.minWidth && d.add(s.tier);
839
- return d.add("P0"), d;
839
+ function Z(e, i) {
840
+ const c = /* @__PURE__ */ new Set();
841
+ for (const s of i)
842
+ e >= s.minWidth && c.add(s.tier);
843
+ return c.add("P0"), c;
840
844
  }
841
- function tt(e, a) {
845
+ function tt(e, i) {
842
846
  const {
843
- containerRef: d,
847
+ containerRef: c,
844
848
  enabled: s = !0,
845
- breakpoints: i = et
846
- } = a, r = k(/* @__PURE__ */ new Set()), c = k(!1);
849
+ breakpoints: o = et
850
+ } = i, l = k(/* @__PURE__ */ new Set()), u = k(!1);
847
851
  return ee(() => {
848
- const m = d.current;
849
- if (!s || !m) return;
850
- const u = () => {
851
- var o;
852
- return (o = e.current) == null ? void 0 : o.getRawApi();
853
- }, C = (o) => {
854
- if (c.current || o.source === "api") return;
855
- const f = o.columns ?? (o.column ? [o.column] : []);
856
- for (const v of f)
857
- r.current.add(v.getColId());
852
+ const d = c.current;
853
+ if (!s || !d) return;
854
+ const m = () => {
855
+ var r;
856
+ return (r = e.current) == null ? void 0 : r.getRawApi();
857
+ }, C = (r) => {
858
+ if (u.current || r.source === "api") return;
859
+ const h = r.columns ?? (r.column ? [r.column] : []);
860
+ for (const v of h)
861
+ l.current.add(v.getColId());
858
862
  };
859
- let l = !1;
860
- const w = (o) => {
861
- if (l) return;
862
- l = !0;
863
- const f = o.getColumns(), v = m.getBoundingClientRect().width, D = Z(v, i);
864
- if (f)
865
- for (const T of f) {
863
+ let a = !1;
864
+ const w = (r) => {
865
+ if (a) return;
866
+ a = !0;
867
+ const h = r.getColumns(), v = d.getBoundingClientRect().width, D = Z(v, o);
868
+ if (h)
869
+ for (const T of h) {
866
870
  const I = q(T.getColDef());
867
- I && !T.isVisible() && D.has(I) && r.current.add(T.getColId());
871
+ I && !T.isVisible() && D.has(I) && l.current.add(T.getColId());
868
872
  }
869
- o.addEventListener("columnVisible", C);
873
+ r.addEventListener("columnVisible", C);
870
874
  }, t = () => {
871
- const o = u();
872
- if (!o) return;
873
- w(o);
874
- const f = o.getColumns();
875
- if (!f) return;
876
- const v = m.getBoundingClientRect().width, D = Z(v, i), T = [], I = [];
877
- for (const S of f) {
875
+ const r = m();
876
+ if (!r) return;
877
+ w(r);
878
+ const h = r.getColumns();
879
+ if (!h) return;
880
+ const v = d.getBoundingClientRect().width, D = Z(v, o), T = [], I = [];
881
+ for (const S of h) {
878
882
  const V = S.getColId();
879
- if (r.current.has(V)) continue;
883
+ if (l.current.has(V)) continue;
880
884
  const A = q(S.getColDef());
881
885
  if (!A) continue;
882
886
  const E = D.has(A);
883
887
  E && !S.isVisible() ? T.push(S) : !E && S.isVisible() && I.push(S);
884
888
  }
885
889
  if (!(T.length === 0 && I.length === 0)) {
886
- c.current = !0;
890
+ u.current = !0;
887
891
  try {
888
- T.length > 0 && o.setColumnsVisible(T, !0), I.length > 0 && o.setColumnsVisible(I, !1);
892
+ T.length > 0 && r.setColumnsVisible(T, !0), I.length > 0 && r.setColumnsVisible(I, !1);
889
893
  } finally {
890
- c.current = !1;
894
+ u.current = !1;
891
895
  }
892
896
  }
893
897
  }, n = new ResizeObserver(() => t());
894
- return n.observe(m), t(), () => {
895
- var o;
896
- n.disconnect(), (o = u()) == null || o.removeEventListener("columnVisible", C);
898
+ return n.observe(d), t(), () => {
899
+ var r;
900
+ n.disconnect(), (r = m()) == null || r.removeEventListener("columnVisible", C);
897
901
  };
898
- }, [d, s, i, e]), { lockColumns: z((m) => {
899
- for (const u of m) r.current.add(u);
902
+ }, [c, s, o, e]), { lockColumns: z((d) => {
903
+ for (const m of d) l.current.add(m);
900
904
  }, []) };
901
905
  }
902
906
  function nt(e) {
903
- var a;
904
- return (a = e.data) != null && a.isArchived ? "data-table-row-archived" : void 0;
907
+ var i;
908
+ return (i = e.data) != null && i.isArchived ? "data-table-row-archived" : void 0;
905
909
  }
906
910
  function it(e) {
907
911
  return e.data.id;
908
912
  }
909
913
  function at({
910
914
  views: e,
911
- handleRef: a,
912
- lockColumns: d,
915
+ handleRef: i,
916
+ lockColumns: c,
913
917
  label: s
914
918
  }) {
915
- const [i, r] = te(""), c = Y(
916
- () => e.map((u) => ({ value: u.id, label: u.label })),
919
+ const [o, l] = te(""), u = Y(
920
+ () => e.map((m) => ({ value: m.id, label: m.label })),
917
921
  [e]
918
- ), h = z(
919
- (u) => {
920
- const C = e.find((t) => t.id === u), l = a.current;
921
- if (!C || !l) return;
922
- const w = l.getRawApi();
922
+ ), f = z(
923
+ (m) => {
924
+ const C = e.find((t) => t.id === m), a = i.current;
925
+ if (!C || !a) return;
926
+ const w = a.getRawApi();
923
927
  if (w) {
924
- const t = new Set(C.columns), n = [], o = [];
925
- for (const f of w.getColumns() ?? []) {
926
- if (q(f.getColDef()) === void 0) continue;
927
- const v = f.getColId();
928
- t.has(v) ? n.push(v) : o.push(v);
928
+ const t = new Set(C.columns), n = [], r = [];
929
+ for (const h of w.getColumns() ?? []) {
930
+ if (q(h.getColDef()) === void 0) continue;
931
+ const v = h.getColId();
932
+ t.has(v) ? n.push(v) : r.push(v);
929
933
  }
930
- d([...n, ...o]), n.length > 0 && w.setColumnsVisible(n, !0), o.length > 0 && w.setColumnsVisible(o, !1);
934
+ c([...n, ...r]), n.length > 0 && w.setColumnsVisible(n, !0), r.length > 0 && w.setColumnsVisible(r, !1);
931
935
  }
932
- l.setFilter(C.filterModel), l.setSort(C.sortModel), w == null || w.onFilterChanged();
936
+ a.setFilter(C.filterModel), a.setSort(C.sortModel), w == null || w.onFilterChanged();
933
937
  },
934
- [e, a, d]
935
- ), m = z(
936
- (u) => {
937
- r(u), u && h(u);
938
+ [e, i, c]
939
+ ), d = z(
940
+ (m) => {
941
+ l(m), m && f(m);
938
942
  },
939
- [h]
943
+ [f]
940
944
  );
941
945
  return (
942
946
  // Width-constraining wrapper (same pattern as the toolbar's QuickSearch) so
@@ -945,9 +949,9 @@ function at({
945
949
  /* @__PURE__ */ g("div", { className: "ds:w-[12rem] ds:max-w-full ds:min-w-0 ds:shrink-0", children: /* @__PURE__ */ g(
946
950
  Ce,
947
951
  {
948
- options: c,
949
- value: i,
950
- onValueChange: m,
952
+ options: u,
953
+ value: o,
954
+ onValueChange: d,
951
955
  size: "sm",
952
956
  "aria-label": s
953
957
  }
@@ -956,22 +960,22 @@ function at({
956
960
  }
957
961
  const lt = he(
958
962
  function({
959
- rowData: a,
960
- columns: d,
963
+ rowData: i,
964
+ columns: c,
961
965
  gridId: s,
962
- density: i,
963
- actionsCompact: r,
964
- heightClass: c,
965
- responsive: h = !0,
966
- views: m,
967
- onRowAction: u,
966
+ density: o,
967
+ actionsCompact: l,
968
+ heightClass: u,
969
+ responsive: f = !0,
970
+ views: d,
971
+ onRowAction: m,
968
972
  bulkActions: C,
969
- loading: l = !1,
973
+ loading: a = !1,
970
974
  toolbar: w,
971
975
  hideQuickSearch: t = !1,
972
976
  pagination: n = !0,
973
- paginationPageSizeSelector: o,
974
- hideDetails: f = !1,
977
+ paginationPageSizeSelector: r,
978
+ hideDetails: h = !1,
975
979
  identityHref: v,
976
980
  customFields: D,
977
981
  "aria-label": T,
@@ -985,8 +989,8 @@ const lt = he(
985
989
  );
986
990
  const { lockColumns: re } = tt(A, {
987
991
  containerRef: E,
988
- enabled: h
989
- }), G = r ?? i === "compact", Q = k(G), X = z(() => Q.current, []);
992
+ enabled: f
993
+ }), G = l ?? o === "compact", Q = k(G), X = z(() => Q.current, []);
990
994
  ee(() => {
991
995
  var y;
992
996
  Q.current = G;
@@ -999,28 +1003,28 @@ const lt = he(
999
1003
  ]), N.refreshCells({ force: !0 }));
1000
1004
  }, [G, M]);
1001
1005
  const oe = Y(
1002
- () => d ?? Ze(V, {
1003
- hideDetails: f,
1004
- onRowAction: u,
1006
+ () => c ?? Ze(V, {
1007
+ hideDetails: h,
1008
+ onRowAction: m,
1005
1009
  identityHref: v,
1006
1010
  customFields: D,
1007
1011
  getActionsCompact: X
1008
1012
  }),
1009
1013
  [
1010
- d,
1014
+ c,
1011
1015
  V,
1012
- f,
1013
- u,
1016
+ h,
1017
+ m,
1014
1018
  v,
1015
1019
  D,
1016
1020
  X
1017
1021
  ]
1018
- ), se = ((m == null ? void 0 : m.length) ?? 0) > 0, de = /* @__PURE__ */ O(P.Toolbar, { children: [
1022
+ ), se = ((d == null ? void 0 : d.length) ?? 0) > 0, de = /* @__PURE__ */ O(P.Toolbar, { children: [
1019
1023
  /* @__PURE__ */ O(P.Toolbar.FilterBar, { children: [
1020
- se && m ? /* @__PURE__ */ g(
1024
+ se && d ? /* @__PURE__ */ g(
1021
1025
  at,
1022
1026
  {
1023
- views: m,
1027
+ views: d,
1024
1028
  handleRef: A,
1025
1029
  lockColumns: re,
1026
1030
  label: V("patientTable.views.label")
@@ -1046,7 +1050,7 @@ const lt = he(
1046
1050
  /* @__PURE__ */ g(P.Toolbar.ColumnToggle, {}),
1047
1051
  /* @__PURE__ */ g(P.Toolbar.ExportMenu, {})
1048
1052
  ] })
1049
- ] }), ce = w ?? de, ue = l ? void 0 : a, me = Y(() => ({ getRowId: it }), []);
1053
+ ] }), ce = w ?? de, ue = a ? void 0 : i, me = Y(() => ({ getRowId: it }), []);
1050
1054
  return ve(
1051
1055
  ge,
1052
1056
  M,
@@ -1073,9 +1077,9 @@ const lt = he(
1073
1077
  rowData: ue,
1074
1078
  rowSelection: "multiple",
1075
1079
  pagination: n,
1076
- ...c !== void 0 ? { heightClass: c } : {},
1077
- ...o !== void 0 ? { paginationPageSizeSelector: o } : {},
1078
- density: i,
1080
+ ...u !== void 0 ? { heightClass: u } : {},
1081
+ ...r !== void 0 ? { paginationPageSizeSelector: r } : {},
1082
+ density: o,
1079
1083
  getRowClass: nt,
1080
1084
  gridOptions: me,
1081
1085
  className: I,
@@ -1097,4 +1101,4 @@ export {
1097
1101
  q as g,
1098
1102
  tt as u
1099
1103
  };
1100
- //# sourceMappingURL=patient-table-QEVsFvwq.js.map
1104
+ //# sourceMappingURL=patient-table-DXk0wW8Q.js.map