@alfadocs/ui-kit 1.16.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/_chunks/{balance-badge-cell-CgkxYO96.js → balance-badge-cell-DNjHODfP.js} +461 -449
  2. package/dist/_chunks/calendar-workspace-Ca0n_r1v.js +7341 -0
  3. package/dist/_chunks/{file-manager-DJMeB3V8.js → file-manager-spc3_khe.js} +152 -136
  4. package/dist/_chunks/{link-cell-renderer-CIASXsVM.js → link-cell-renderer-B-xrUPew.js} +126 -116
  5. package/dist/_chunks/{signature-field-CEiPe-vX.js → signature-field-0rFODJlW.js} +34 -19
  6. package/dist/agent-catalog.json +10 -56
  7. package/dist/agent-i18n/en.json +3 -5
  8. package/dist/components/data-table/calendar-day.d.ts +26 -0
  9. package/dist/components/data-table/filters/date-range-filter.d.ts +2 -20
  10. package/dist/components/data-table/index.js +1 -1
  11. package/dist/components/file-manager/index.js +1 -1
  12. package/dist/components/patient-table/cell-renderers/transaction-chip-cell.d.ts +6 -0
  13. package/dist/components/patient-table/columns.d.ts +6 -0
  14. package/dist/components/patient-table/index.js +1 -1
  15. package/dist/components/patient-table/patient-table.d.ts +6 -0
  16. package/dist/components/signature-field/index.js +1 -1
  17. package/dist/i18n/locales/ar.d.ts +0 -38
  18. package/dist/i18n/locales/ar.js +2 -40
  19. package/dist/i18n/locales/de.d.ts +0 -38
  20. package/dist/i18n/locales/de.js +2 -40
  21. package/dist/i18n/locales/el.d.ts +0 -38
  22. package/dist/i18n/locales/el.js +2 -40
  23. package/dist/i18n/locales/en.d.ts +0 -38
  24. package/dist/i18n/locales/en.js +2 -40
  25. package/dist/i18n/locales/es.d.ts +0 -38
  26. package/dist/i18n/locales/es.js +2 -40
  27. package/dist/i18n/locales/fr.d.ts +0 -38
  28. package/dist/i18n/locales/fr.js +2 -40
  29. package/dist/i18n/locales/hi.d.ts +0 -38
  30. package/dist/i18n/locales/hi.js +2 -40
  31. package/dist/i18n/locales/it.d.ts +0 -38
  32. package/dist/i18n/locales/it.js +2 -40
  33. package/dist/i18n/locales/ja.d.ts +0 -38
  34. package/dist/i18n/locales/ja.js +2 -40
  35. package/dist/i18n/locales/nl.d.ts +0 -38
  36. package/dist/i18n/locales/nl.js +2 -40
  37. package/dist/i18n/locales/pl.d.ts +0 -38
  38. package/dist/i18n/locales/pl.js +2 -40
  39. package/dist/i18n/locales/pt.d.ts +0 -38
  40. package/dist/i18n/locales/pt.js +2 -40
  41. package/dist/i18n/locales/ro.d.ts +0 -38
  42. package/dist/i18n/locales/ro.js +2 -40
  43. package/dist/i18n/locales/ru.d.ts +0 -38
  44. package/dist/i18n/locales/ru.js +2 -40
  45. package/dist/i18n/locales/sq.d.ts +0 -38
  46. package/dist/i18n/locales/sq.js +2 -40
  47. package/dist/i18n/locales/sv.d.ts +0 -38
  48. package/dist/i18n/locales/sv.js +2 -40
  49. package/dist/i18n/locales/tr.d.ts +0 -38
  50. package/dist/i18n/locales/tr.js +2 -40
  51. package/dist/i18n/locales/zh.d.ts +0 -38
  52. package/dist/i18n/locales/zh.js +2 -40
  53. package/dist/index.js +5 -5
  54. package/dist/locales/ar.json +2 -40
  55. package/dist/locales/de.json +2 -40
  56. package/dist/locales/el.json +2 -40
  57. package/dist/locales/en.json +2 -40
  58. package/dist/locales/es.json +2 -40
  59. package/dist/locales/fr.json +2 -40
  60. package/dist/locales/hi.json +2 -40
  61. package/dist/locales/it.json +2 -40
  62. package/dist/locales/ja.json +2 -40
  63. package/dist/locales/nl.json +2 -40
  64. package/dist/locales/pl.json +2 -40
  65. package/dist/locales/pt.json +2 -40
  66. package/dist/locales/ro.json +2 -40
  67. package/dist/locales/ru.json +2 -40
  68. package/dist/locales/sq.json +2 -40
  69. package/dist/locales/sv.json +2 -40
  70. package/dist/locales/tr.json +2 -40
  71. package/dist/locales/zh.json +2 -40
  72. package/dist/patterns/calendar/calendar.sheets.d.ts +4 -8
  73. package/dist/patterns/calendar/index.js +1 -1
  74. package/package.json +1 -1
  75. package/dist/_chunks/calendar-workspace-B87-QI8L.js +0 -7606
  76. package/dist/_chunks/folder-plus-CutOs4DP.js +0 -22
  77. package/dist/_chunks/signature-CpFNpsVK.js +0 -21
@@ -1,43 +1,51 @@
1
- import { jsx as v, jsxs as M } from "react/jsx-runtime";
2
- import { createElement as O, useRef as k, useEffect as ne, useCallback as j, forwardRef as pe, useState as ae, useImperativeHandle as be, useMemo as Q } from "react";
3
- import { useTranslation as K } from "react-i18next";
4
- import { a as g, T as C, D as S, d as ge } from "./data-table-DC5rO3Ty.js";
5
- import { A as Ce, a as ie } from "./actions-cell-renderer-yy03OgRL.js";
6
- import { S as ve } from "./select-Bi8zril7.js";
7
- import { u as Te } from "./registry-DvAUVLHh.js";
8
- import { I as we, L as Ne, b as _, a as z, c as H, N as $, d as R, S as I, T as re, D as q, g as Fe, f as Re, U as Ie, e as ye } from "./link-cell-renderer-CIASXsVM.js";
9
- import { T as Pe } from "./transaction-chip-DJCstquX.js";
10
- import { B as le } from "./badge-sTusUqZD.js";
11
- import { c as Se } from "./index-D2ZczOXr.js";
12
- import { T as We } from "./timestamp-BV2lC-wV.js";
13
- import { C as Ae } from "./calendar-clock-hbObjfGY.js";
14
- import { E as De } from "./eye-BjhN2nYf.js";
15
- import { P as Be } from "./pencil-B1sKKyuT.js";
16
- import { M as Ve } from "./mail-BqXVF2zH.js";
17
- import { M as xe } from "./message-square-Bye4ATvx.js";
18
- import { U as Ee } from "./users-BjS_Gg1E.js";
19
- import { T as Oe } from "./trash-2-uumy3fy1.js";
20
- function Z(e) {
21
- const { value: a, positiveState: o, showLabel: s = !0 } = e, l = typeof a == "number" && Number.isFinite(a) ? a : null;
22
- if (l === null) return null;
23
- const r = l > 0 ? o : "settled";
24
- return /* @__PURE__ */ v(Pe, { state: r, amount: l / 100, showLabel: s });
1
+ import { jsx as C, jsxs as M } from "react/jsx-runtime";
2
+ import { createElement as G, useRef as k, useEffect as ae, useCallback as K, forwardRef as be, useState as ie, useImperativeHandle as ge, useMemo as X } from "react";
3
+ import { useTranslation as Y } from "react-i18next";
4
+ import { a as b, T as g, D as S, d as Ce } from "./data-table-DC5rO3Ty.js";
5
+ import { A as ve, a as re } from "./actions-cell-renderer-yy03OgRL.js";
6
+ import { S as Te } from "./select-Bi8zril7.js";
7
+ import { u as we } from "./registry-DvAUVLHh.js";
8
+ import { I as Ne, L as Fe, b as z, a as H, c as $, N as j, d as w, S as N, T as le, D as Q, g as Re, f as Ie, U as ye, e as Pe, h as Se } from "./link-cell-renderer-B-xrUPew.js";
9
+ import { T as We } from "./transaction-chip-DJCstquX.js";
10
+ import { B as oe } from "./badge-sTusUqZD.js";
11
+ import { c as Ae } from "./index-D2ZczOXr.js";
12
+ import { T as De } from "./timestamp-BV2lC-wV.js";
13
+ import { C as Be } from "./calendar-clock-hbObjfGY.js";
14
+ import { E as Ve } from "./eye-BjhN2nYf.js";
15
+ import { P as xe } from "./pencil-B1sKKyuT.js";
16
+ import { M as Ee } from "./mail-BqXVF2zH.js";
17
+ import { M as Oe } from "./message-square-Bye4ATvx.js";
18
+ import { U as Ge } from "./users-BjS_Gg1E.js";
19
+ import { T as Me } from "./trash-2-uumy3fy1.js";
20
+ function ee(e) {
21
+ const { value: a, positiveState: l, showLabel: s = !0, currency: o } = e, r = typeof a == "number" && Number.isFinite(a) ? a : null;
22
+ if (r === null) return null;
23
+ const d = r > 0 ? l : "settled";
24
+ return /* @__PURE__ */ C(
25
+ We,
26
+ {
27
+ state: d,
28
+ amount: r / 100,
29
+ showLabel: s,
30
+ currency: o
31
+ }
32
+ );
25
33
  }
26
- const Ge = {
34
+ const ke = {
27
35
  accepted: "success",
28
36
  estimate: "info",
29
37
  none: "neutral"
30
38
  };
31
- function Me(e) {
39
+ function Ue(e) {
32
40
  return e === "accepted" || e === "estimate" || e === "none";
33
41
  }
34
- function ke(e) {
35
- const { t: a } = K("ui"), { data: o, value: s, size: l = "sm" } = e, r = (o == null ? void 0 : o.carePlanStatus) ?? s;
36
- if (!Me(r)) return null;
37
- const c = Ge[r];
38
- return /* @__PURE__ */ v(le, { variant: c, withDot: !0, size: l, children: a(`patientTable.carePlanStatus.${r}`) });
42
+ function Le(e) {
43
+ const { t: a } = Y("ui"), { data: l, value: s, size: o = "sm" } = e, r = (l == null ? void 0 : l.carePlanStatus) ?? s;
44
+ if (!Ue(r)) return null;
45
+ const d = ke[r];
46
+ return /* @__PURE__ */ C(oe, { variant: d, withDot: !0, size: o, children: a(`patientTable.carePlanStatus.${r}`) });
39
47
  }
40
- const ee = Se(
48
+ const te = Ae(
41
49
  "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] ds:whitespace-nowrap",
42
50
  {
43
51
  variants: {
@@ -52,39 +60,39 @@ const ee = Se(
52
60
  },
53
61
  defaultVariants: { tone: "default" }
54
62
  }
55
- ), Ue = 1440 * 60 * 1e3, Le = 7;
56
- function _e(e) {
63
+ ), _e = 1440 * 60 * 1e3, ze = 7;
64
+ function He(e) {
57
65
  if (e == null || e === "") return null;
58
66
  const a = e instanceof Date ? e.getTime() : typeof e == "number" ? e : new Date(String(e)).getTime();
59
67
  return Number.isNaN(a) ? null : a;
60
68
  }
61
- function ze(e, a) {
69
+ function $e(e, a) {
62
70
  if (a <= 0) return "default";
63
- const o = e - Date.now();
64
- return o < 0 ? "default" : o <= a * Ue ? "soon" : "default";
71
+ const l = e - Date.now();
72
+ return l < 0 ? "default" : l <= a * _e ? "soon" : "default";
65
73
  }
66
- function He(e) {
67
- const { t: a } = K("ui"), { data: o, value: s, soonWithinDays: l = Le } = e, r = _e((o == null ? void 0 : o.nextAppointment) ?? s);
74
+ function je(e) {
75
+ const { t: a } = Y("ui"), { data: l, value: s, soonWithinDays: o = ze } = e, r = He((l == null ? void 0 : l.nextAppointment) ?? s);
68
76
  if (r === null)
69
- return /* @__PURE__ */ v("span", { className: ee({ tone: "empty" }), children: a("patientTable.nextAppointment.none") });
70
- const c = ze(r, l);
71
- return /* @__PURE__ */ M("span", { className: ee({ tone: c }), children: [
72
- c === "soon" ? /* @__PURE__ */ v(Ae, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }) : null,
73
- /* @__PURE__ */ v(We, { value: r, format: "relative", shape: "bare" })
77
+ return /* @__PURE__ */ C("span", { className: te({ tone: "empty" }), children: a("patientTable.nextAppointment.none") });
78
+ const d = $e(r, o);
79
+ return /* @__PURE__ */ M("span", { className: te({ tone: d }), children: [
80
+ d === "soon" ? /* @__PURE__ */ C(Be, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }) : null,
81
+ /* @__PURE__ */ C(De, { value: r, format: "relative", shape: "bare" })
74
82
  ] });
75
83
  }
76
- function oe(e) {
84
+ function se(e) {
77
85
  return e.responsiveTier;
78
86
  }
79
- const $e = 6;
80
- function je(e, a) {
81
- const o = (l) => (r) => {
82
- a == null || a(l, r);
83
- }, s = (l, r) => ({
84
- icon: l.icon,
85
- label: l.label,
86
- variant: l.variant,
87
- onClick: o(l),
87
+ const Ke = 6;
88
+ function Ye(e, a) {
89
+ const l = (o) => (r) => {
90
+ a == null || a(o, r);
91
+ }, s = (o, r) => ({
92
+ icon: o.icon,
93
+ label: o.label,
94
+ variant: o.variant,
95
+ onClick: l(o),
88
96
  ...r
89
97
  });
90
98
  return [
@@ -92,7 +100,7 @@ function je(e, a) {
92
100
  {
93
101
  id: "show",
94
102
  label: e("patientTable.actions.show"),
95
- icon: O(De, { "aria-hidden": "true" })
103
+ icon: G(Ve, { "aria-hidden": "true" })
96
104
  },
97
105
  {}
98
106
  ),
@@ -100,7 +108,7 @@ function je(e, a) {
100
108
  {
101
109
  id: "edit",
102
110
  label: e("patientTable.actions.edit"),
103
- icon: O(Be, { "aria-hidden": "true" })
111
+ icon: G(xe, { "aria-hidden": "true" })
104
112
  },
105
113
  {}
106
114
  ),
@@ -108,27 +116,27 @@ function je(e, a) {
108
116
  {
109
117
  id: "sendEmailReminder",
110
118
  label: e("patientTable.actions.sendEmailReminder"),
111
- icon: O(Ve, { "aria-hidden": "true" })
119
+ icon: G(Ee, { "aria-hidden": "true" })
112
120
  },
113
121
  // Hidden when the patient has email contact disabled (spec).
114
- { hidden: (l) => !l.emailEnabled }
122
+ { hidden: (o) => !o.emailEnabled }
115
123
  ),
116
124
  s(
117
125
  {
118
126
  id: "sendSmsReminder",
119
127
  label: e("patientTable.actions.sendSmsReminder"),
120
- icon: O(xe, { "aria-hidden": "true" })
128
+ icon: G(Oe, { "aria-hidden": "true" })
121
129
  },
122
130
  // Hidden when no phone number is SMS-enabled (spec).
123
131
  {
124
- hidden: (l) => !(l.phoneNumbers ?? []).some((r) => r.smsEnabled)
132
+ hidden: (o) => !(o.phoneNumbers ?? []).some((r) => r.smsEnabled)
125
133
  }
126
134
  ),
127
135
  s(
128
136
  {
129
137
  id: "reassign",
130
138
  label: e("patientTable.actions.reassign"),
131
- icon: O(Ee, { "aria-hidden": "true" })
139
+ icon: G(Ge, { "aria-hidden": "true" })
132
140
  },
133
141
  {}
134
142
  ),
@@ -136,41 +144,41 @@ function je(e, a) {
136
144
  {
137
145
  id: "delete",
138
146
  label: e("patientTable.actions.delete"),
139
- icon: O(Oe, { "aria-hidden": "true" }),
147
+ icon: G(Me, { "aria-hidden": "true" }),
140
148
  variant: "destructive"
141
149
  },
142
150
  // Disabled (with a reason) for archived patients — the row model's
143
151
  // closest "cannot delete" signal. Surfaced as the inline tooltip.
144
152
  {
145
- disabled: (l) => !!l.isArchived,
153
+ disabled: (o) => !!o.isArchived,
146
154
  disabledReason: e("patientTable.actions.deleteLocked")
147
155
  }
148
156
  )
149
157
  ];
150
158
  }
151
- const Ke = () => !1, A = "✓", W = "—";
152
- function te(e) {
159
+ const qe = () => !1, D = "✓", W = "—";
160
+ function ne(e) {
153
161
  if (!e) return "";
154
162
  const a = e.toUpperCase();
155
163
  try {
156
- const o = typeof document < "u" && document.documentElement.lang || "en";
157
- return new Intl.DisplayNames([o], { type: "region" }).of(a) ?? a;
164
+ const l = typeof document < "u" && document.documentElement.lang || "en";
165
+ return new Intl.DisplayNames([l], { type: "region" }).of(a) ?? a;
158
166
  } catch {
159
167
  return a;
160
168
  }
161
169
  }
162
- function Ye(e) {
170
+ function Qe(e) {
163
171
  if (!e) return null;
164
- const a = new Date(e), o = a.getTime();
165
- if (Number.isNaN(o)) return null;
166
- const s = /* @__PURE__ */ new Date();
167
- let l = s.getFullYear() - a.getFullYear();
168
- const r = s.getMonth() - a.getMonth();
169
- return (r < 0 || r === 0 && s.getDate() < a.getDate()) && (l -= 1), l >= 0 ? l : null;
172
+ const a = Se(e);
173
+ if (!a) return null;
174
+ const l = /* @__PURE__ */ new Date();
175
+ let s = l.getFullYear() - a.getFullYear();
176
+ const o = l.getMonth() - a.getMonth();
177
+ return (o < 0 || o === 0 && l.getDate() < a.getDate()) && (s -= 1), s >= 0 ? s : null;
170
178
  }
171
- function qe(e) {
179
+ function Xe(e) {
172
180
  return e.map((a) => {
173
- var l;
181
+ var o;
174
182
  const s = {
175
183
  colId: `custom:${a.fieldName}`,
176
184
  headerName: a.label,
@@ -180,15 +188,15 @@ function qe(e) {
180
188
  return a.type === "checkbox" ? {
181
189
  ...s,
182
190
  valueGetter: (r) => {
183
- var c, h;
184
- return ((h = (c = r.data) == null ? void 0 : c.customFields) == null ? void 0 : h[a.fieldName]) === !0;
191
+ var d, h;
192
+ return ((h = (d = r.data) == null ? void 0 : d.customFields) == null ? void 0 : h[a.fieldName]) === !0;
185
193
  },
186
- valueFormatter: (r) => r.value === !0 ? A : W,
187
- filter: I,
188
- floatingFilterComponent: R,
194
+ valueFormatter: (r) => r.value === !0 ? D : W,
195
+ filter: N,
196
+ floatingFilterComponent: w,
189
197
  filterParams: {
190
198
  options: [
191
- { value: !0, label: A },
199
+ { value: !0, label: D },
192
200
  { value: !1, label: W }
193
201
  ]
194
202
  },
@@ -198,23 +206,23 @@ function qe(e) {
198
206
  ...s,
199
207
  // TagListCellRenderer expects an array; wrap the single value.
200
208
  valueGetter: (r) => {
201
- var h, d;
202
- const c = (d = (h = r.data) == null ? void 0 : h.customFields) == null ? void 0 : d[a.fieldName];
203
- return typeof c == "string" && c ? [c] : [];
209
+ var h, m;
210
+ const d = (m = (h = r.data) == null ? void 0 : h.customFields) == null ? void 0 : m[a.fieldName];
211
+ return typeof d == "string" && d ? [d] : [];
204
212
  },
205
- cellRenderer: re,
213
+ cellRenderer: le,
206
214
  filterValueGetter: (r) => {
207
- var h, d;
208
- const c = (d = (h = r.data) == null ? void 0 : h.customFields) == null ? void 0 : d[a.fieldName];
209
- return typeof c == "string" ? c : "";
215
+ var h, m;
216
+ const d = (m = (h = r.data) == null ? void 0 : h.customFields) == null ? void 0 : m[a.fieldName];
217
+ return typeof d == "string" ? d : "";
210
218
  },
211
- filter: I,
212
- floatingFilterComponent: R,
219
+ filter: N,
220
+ floatingFilterComponent: w,
213
221
  filterParams: {
214
222
  // Undefined (not []) when the field declares no options, so the
215
223
  // filter derives its choices from the rows. An empty array would
216
224
  // mean "this column has no facets" and leave the filter unusable.
217
- options: (l = a.options) == null ? void 0 : l.map((r) => ({
225
+ options: (o = a.options) == null ? void 0 : o.map((r) => ({
218
226
  value: r,
219
227
  label: r
220
228
  }))
@@ -225,25 +233,26 @@ function qe(e) {
225
233
  } : {
226
234
  ...s,
227
235
  valueGetter: (r) => {
228
- var h, d;
229
- const c = (d = (h = r.data) == null ? void 0 : h.customFields) == null ? void 0 : d[a.fieldName];
230
- return typeof c == "string" ? c : "";
236
+ var h, m;
237
+ const d = (m = (h = r.data) == null ? void 0 : h.customFields) == null ? void 0 : m[a.fieldName];
238
+ return typeof d == "string" ? d : "";
231
239
  },
232
- filter: C,
233
- floatingFilterComponent: g,
240
+ filter: g,
241
+ floatingFilterComponent: b,
234
242
  minWidth: 140,
235
243
  width: 170
236
244
  };
237
245
  });
238
246
  }
239
- function Qe(e, a = {}) {
247
+ function Je(e, a = {}) {
240
248
  const {
241
- hideDetails: o = !1,
242
- getActionsCompact: s = Ke,
243
- onRowAction: l,
249
+ hideDetails: l = !1,
250
+ getActionsCompact: s = qe,
251
+ onRowAction: o,
244
252
  identityHref: r,
245
- customFields: c = []
246
- } = a, h = je(e, l), d = {
253
+ customFields: d = [],
254
+ currency: h
255
+ } = a, m = Ye(e, o), f = {
247
256
  m: e("patientTable.gender.m"),
248
257
  f: e("patientTable.gender.f"),
249
258
  x: e("patientTable.gender.x")
@@ -251,11 +260,11 @@ function Qe(e, a = {}) {
251
260
  yes: e("patientTable.consent.yes"),
252
261
  no: e("patientTable.consent.no"),
253
262
  notSpecified: e("patientTable.consent.notSpecified")
254
- }, p = {
263
+ }, T = {
255
264
  [u.yes]: "success",
256
265
  [u.no]: "error",
257
266
  [u.notSpecified]: "neutral"
258
- }, i = (t) => e(`patientTable.column.${t}`);
267
+ }, i = (n) => e(`patientTable.column.${n}`);
259
268
  return [
260
269
  /* ── Avatar (P0, pinned-start) ─────────────────────────────────── */
261
270
  {
@@ -268,7 +277,7 @@ function Qe(e, a = {}) {
268
277
  headerName: i("avatar"),
269
278
  headerClass: "sr-only-th",
270
279
  pinned: "left",
271
- cellRenderer: we,
280
+ cellRenderer: Ne,
272
281
  cellRendererParams: {
273
282
  srcField: "avatarUrl",
274
283
  fallbackField: "lastName",
@@ -297,8 +306,8 @@ function Qe(e, a = {}) {
297
306
  headerName: i("firstName"),
298
307
  pinned: "left",
299
308
  field: "firstName",
300
- filter: C,
301
- floatingFilterComponent: g,
309
+ filter: g,
310
+ floatingFilterComponent: b,
302
311
  // Size to content: width === minWidth so the pinned column sits tight with
303
312
  // no dead space before the next pinned column (pinned columns can't flex).
304
313
  width: 140,
@@ -311,18 +320,18 @@ function Qe(e, a = {}) {
311
320
  headerName: i("lastName"),
312
321
  pinned: "left",
313
322
  field: "lastName",
314
- cellRenderer: Ne,
323
+ cellRenderer: Fe,
315
324
  cellRendererParams: {
316
325
  href: r,
317
326
  // When no detail href is supplied the cell renders a button; route its
318
327
  // click through the same `show` row action.
319
- onClick: l ? (t) => l(
328
+ onClick: o ? (n) => o(
320
329
  { id: "show", label: e("patientTable.actions.show") },
321
- t
330
+ n
322
331
  ) : void 0
323
332
  },
324
- filter: C,
325
- floatingFilterComponent: g,
333
+ filter: g,
334
+ floatingFilterComponent: b,
326
335
  // Size to content: a modest pinned width with no stretched default, so the
327
336
  // avatar + first + last group ends tight against the scrollable columns.
328
337
  width: 150,
@@ -335,12 +344,12 @@ function Qe(e, a = {}) {
335
344
  headerName: i("phone"),
336
345
  responsiveTier: "P1",
337
346
  // The primary phone number string (prefix + number).
338
- valueGetter: (t) => {
339
- var n, f, b;
340
- return ((b = (f = (n = t.data) == null ? void 0 : n.phoneNumbers) == null ? void 0 : f[0]) == null ? void 0 : b.number) ?? "";
347
+ valueGetter: (n) => {
348
+ var t, p, c;
349
+ return ((c = (p = (t = n.data) == null ? void 0 : t.phoneNumbers) == null ? void 0 : p[0]) == null ? void 0 : c.number) ?? "";
341
350
  },
342
- filter: C,
343
- floatingFilterComponent: g,
351
+ filter: g,
352
+ floatingFilterComponent: b,
344
353
  minWidth: 160,
345
354
  width: 180
346
355
  },
@@ -350,9 +359,9 @@ function Qe(e, a = {}) {
350
359
  headerName: i("nextAppointment"),
351
360
  responsiveTier: "P1",
352
361
  field: "nextAppointment",
353
- cellRenderer: He,
354
- filter: z,
355
- floatingFilterComponent: _,
362
+ cellRenderer: je,
363
+ filter: H,
364
+ floatingFilterComponent: z,
356
365
  minWidth: 160,
357
366
  width: 180
358
367
  },
@@ -364,15 +373,15 @@ function Qe(e, a = {}) {
364
373
  field: "unpaidAmount",
365
374
  type: "numericColumn",
366
375
  // The kit's financial-state pill: `debt` while anything is owed, `settled` at zero.
367
- cellRenderer: Z,
368
- cellRendererParams: { positiveState: "debt" },
376
+ cellRenderer: ee,
377
+ cellRendererParams: { positiveState: "debt", currency: h },
369
378
  // The row carries integer cents; the filter reads euros, as typed.
370
- filterValueGetter: (t) => {
371
- var n;
372
- return (((n = t.data) == null ? void 0 : n.unpaidAmount) ?? 0) / 100;
379
+ filterValueGetter: (n) => {
380
+ var t;
381
+ return (((t = n.data) == null ? void 0 : t.unpaidAmount) ?? 0) / 100;
373
382
  },
374
- filter: $,
375
- floatingFilterComponent: H,
383
+ filter: j,
384
+ floatingFilterComponent: $,
376
385
  // Money is integer cents; the inRange filter compares cents directly.
377
386
  filterParams: { defaultOperator: "inRange", min: 0 },
378
387
  minWidth: 150,
@@ -387,9 +396,9 @@ function Qe(e, a = {}) {
387
396
  // Emit `hide` ONLY when masking (never a literal `hide: false`). A static
388
397
  // `hide: false` is re-applied by AG Grid on every `columnDefs` reconcile,
389
398
  // clobbering a runtime hide from the ViewSwitcher / responsive hook.
390
- hide: o || void 0,
391
- filter: C,
392
- floatingFilterComponent: g,
399
+ hide: l || void 0,
400
+ filter: g,
401
+ floatingFilterComponent: b,
393
402
  minWidth: 200,
394
403
  width: 240
395
404
  },
@@ -399,9 +408,9 @@ function Qe(e, a = {}) {
399
408
  headerName: i("carePlanStatus"),
400
409
  responsiveTier: "P2",
401
410
  field: "carePlanStatus",
402
- cellRenderer: ke,
403
- filter: I,
404
- floatingFilterComponent: R,
411
+ cellRenderer: Le,
412
+ filter: N,
413
+ floatingFilterComponent: w,
405
414
  filterParams: {
406
415
  options: [
407
416
  {
@@ -425,8 +434,8 @@ function Qe(e, a = {}) {
425
434
  headerName: i("fiscalCode"),
426
435
  responsiveTier: "P3",
427
436
  field: "italianFiscalCode",
428
- filter: C,
429
- floatingFilterComponent: g,
437
+ filter: g,
438
+ floatingFilterComponent: b,
430
439
  minWidth: 160,
431
440
  width: 180
432
441
  },
@@ -438,12 +447,12 @@ function Qe(e, a = {}) {
438
447
  // Left-aligned like the text columns — `numericColumn` (which right-aligns
439
448
  // header + cell) is for ledger figures, not a 2-digit age. Sort stays
440
449
  // numeric because the valueGetter returns a number.
441
- valueGetter: (t) => {
442
- var n;
443
- return Ye((n = t.data) == null ? void 0 : n.dateOfBirth) ?? void 0;
450
+ valueGetter: (n) => {
451
+ var t;
452
+ return Qe((t = n.data) == null ? void 0 : t.dateOfBirth) ?? void 0;
444
453
  },
445
- filter: $,
446
- floatingFilterComponent: H,
454
+ filter: j,
455
+ floatingFilterComponent: $,
447
456
  minWidth: 90,
448
457
  width: 110
449
458
  },
@@ -453,17 +462,17 @@ function Qe(e, a = {}) {
453
462
  headerName: i("gender"),
454
463
  responsiveTier: "P3",
455
464
  // Map the raw code to a localised label for both cell + set filter.
456
- valueGetter: (t) => {
457
- var n;
458
- return (n = t.data) != null && n.gender ? d[t.data.gender] : W;
465
+ valueGetter: (n) => {
466
+ var t;
467
+ return (t = n.data) != null && t.gender ? f[n.data.gender] : W;
459
468
  },
460
- filter: I,
461
- floatingFilterComponent: R,
469
+ filter: N,
470
+ floatingFilterComponent: w,
462
471
  filterParams: {
463
472
  options: [
464
- { value: d.m, label: d.m },
465
- { value: d.f, label: d.f },
466
- { value: d.x, label: d.x }
473
+ { value: f.m, label: f.m },
474
+ { value: f.f, label: f.f },
475
+ { value: f.x, label: f.x }
467
476
  ]
468
477
  },
469
478
  minWidth: 110,
@@ -475,18 +484,18 @@ function Qe(e, a = {}) {
475
484
  headerName: i("source"),
476
485
  responsiveTier: "P3",
477
486
  // TagListCellRenderer expects an array; wrap the resolved source string.
478
- valueGetter: (t) => {
479
- var f, b;
480
- const n = ((f = t.data) == null ? void 0 : f.source) ?? ((b = t.data) == null ? void 0 : b.customSource);
481
- return n ? [n] : [];
487
+ valueGetter: (n) => {
488
+ var p, c;
489
+ const t = ((p = n.data) == null ? void 0 : p.source) ?? ((c = n.data) == null ? void 0 : c.customSource);
490
+ return t ? [t] : [];
482
491
  },
483
- cellRenderer: re,
484
- filterValueGetter: (t) => {
485
- var n, f;
486
- return ((n = t.data) == null ? void 0 : n.source) ?? ((f = t.data) == null ? void 0 : f.customSource) ?? "";
492
+ cellRenderer: le,
493
+ filterValueGetter: (n) => {
494
+ var t, p;
495
+ return ((t = n.data) == null ? void 0 : t.source) ?? ((p = n.data) == null ? void 0 : p.customSource) ?? "";
487
496
  },
488
- filter: I,
489
- floatingFilterComponent: R,
497
+ filter: N,
498
+ floatingFilterComponent: w,
490
499
  sortable: !1,
491
500
  minWidth: 120,
492
501
  width: 150
@@ -497,10 +506,10 @@ function Qe(e, a = {}) {
497
506
  headerName: i("dateOfBirth"),
498
507
  hide: !0,
499
508
  field: "dateOfBirth",
500
- cellRenderer: q,
509
+ cellRenderer: Q,
501
510
  cellRendererParams: { format: "date" },
502
- filter: z,
503
- floatingFilterComponent: _,
511
+ filter: H,
512
+ floatingFilterComponent: z,
504
513
  minWidth: 140,
505
514
  width: 160
506
515
  },
@@ -509,8 +518,8 @@ function Qe(e, a = {}) {
509
518
  headerName: i("placeOfBirth"),
510
519
  hide: !0,
511
520
  field: "placeOfBirth",
512
- filter: C,
513
- floatingFilterComponent: g,
521
+ filter: g,
522
+ floatingFilterComponent: b,
514
523
  minWidth: 140,
515
524
  width: 160
516
525
  },
@@ -519,12 +528,12 @@ function Qe(e, a = {}) {
519
528
  headerName: i("countryOfBirth"),
520
529
  hide: !0,
521
530
  // ISO code in the row, the name in the cell — and in the text filter.
522
- valueGetter: (t) => {
523
- var n;
524
- return te((n = t.data) == null ? void 0 : n.countryOfBirth);
531
+ valueGetter: (n) => {
532
+ var t;
533
+ return ne((t = n.data) == null ? void 0 : t.countryOfBirth);
525
534
  },
526
- filter: C,
527
- floatingFilterComponent: g,
535
+ filter: g,
536
+ floatingFilterComponent: b,
528
537
  minWidth: 130,
529
538
  width: 150
530
539
  },
@@ -533,16 +542,16 @@ function Qe(e, a = {}) {
533
542
  colId: "smsReminders",
534
543
  headerName: i("smsReminders"),
535
544
  hide: !0,
536
- valueGetter: (t) => {
537
- var n;
538
- return !!((n = t.data) != null && n.smsReminderEligible);
545
+ valueGetter: (n) => {
546
+ var t;
547
+ return !!((t = n.data) != null && t.smsReminderEligible);
539
548
  },
540
- valueFormatter: (t) => t.value === !0 ? A : W,
541
- filter: I,
542
- floatingFilterComponent: R,
549
+ valueFormatter: (n) => n.value === !0 ? D : W,
550
+ filter: N,
551
+ floatingFilterComponent: w,
543
552
  filterParams: {
544
553
  options: [
545
- { value: !0, label: A },
554
+ { value: !0, label: D },
546
555
  { value: !1, label: W }
547
556
  ]
548
557
  },
@@ -553,16 +562,16 @@ function Qe(e, a = {}) {
553
562
  colId: "emailReminders",
554
563
  headerName: i("emailReminders"),
555
564
  hide: !0,
556
- valueGetter: (t) => {
557
- var n;
558
- return !!((n = t.data) != null && n.emailReminderEligible);
565
+ valueGetter: (n) => {
566
+ var t;
567
+ return !!((t = n.data) != null && t.emailReminderEligible);
559
568
  },
560
- valueFormatter: (t) => t.value === !0 ? A : W,
561
- filter: I,
562
- floatingFilterComponent: R,
569
+ valueFormatter: (n) => n.value === !0 ? D : W,
570
+ filter: N,
571
+ floatingFilterComponent: w,
563
572
  filterParams: {
564
573
  options: [
565
- { value: !0, label: A },
574
+ { value: !0, label: D },
566
575
  { value: !1, label: W }
567
576
  ]
568
577
  },
@@ -574,8 +583,8 @@ function Qe(e, a = {}) {
574
583
  headerName: i("pec"),
575
584
  hide: !0,
576
585
  field: "pecAddress",
577
- filter: C,
578
- floatingFilterComponent: g,
586
+ filter: g,
587
+ floatingFilterComponent: b,
579
588
  minWidth: 200,
580
589
  width: 240
581
590
  },
@@ -585,10 +594,10 @@ function Qe(e, a = {}) {
585
594
  headerName: i("lastVisit"),
586
595
  hide: !0,
587
596
  field: "lastAppointment",
588
- cellRenderer: q,
597
+ cellRenderer: Q,
589
598
  cellRendererParams: { format: "relative" },
590
- filter: z,
591
- floatingFilterComponent: _,
599
+ filter: H,
600
+ floatingFilterComponent: z,
592
601
  minWidth: 140,
593
602
  width: 160
594
603
  },
@@ -602,15 +611,15 @@ function Qe(e, a = {}) {
602
611
  // "Fatturabile" is the chip's own `to-invoice` state; `settled` at zero.
603
612
  // Same shape as unpaidBalance: the cell value stays in cents and the
604
613
  // renderer converts, so the inRange filter compares cents directly.
605
- cellRenderer: Z,
606
- cellRendererParams: { positiveState: "to-invoice" },
614
+ cellRenderer: ee,
615
+ cellRendererParams: { positiveState: "to-invoice", currency: h },
607
616
  // The row carries integer cents; the filter reads euros, as typed.
608
- filterValueGetter: (t) => {
609
- var n;
610
- return (((n = t.data) == null ? void 0 : n.billableAmount) ?? 0) / 100;
617
+ filterValueGetter: (n) => {
618
+ var t;
619
+ return (((t = n.data) == null ? void 0 : t.billableAmount) ?? 0) / 100;
611
620
  },
612
- filter: $,
613
- floatingFilterComponent: H,
621
+ filter: j,
622
+ floatingFilterComponent: $,
614
623
  filterParams: { defaultOperator: "inRange", min: 0 },
615
624
  minWidth: 140,
616
625
  width: 160
@@ -621,9 +630,9 @@ function Qe(e, a = {}) {
621
630
  hide: !0,
622
631
  field: "defaultDiscount",
623
632
  type: "numericColumn",
624
- valueFormatter: (t) => t.value == null ? "" : `${t.value}%`,
625
- filter: $,
626
- floatingFilterComponent: H,
633
+ valueFormatter: (n) => n.value == null ? "" : `${n.value}%`,
634
+ filter: j,
635
+ floatingFilterComponent: $,
627
636
  minWidth: 110,
628
637
  width: 130
629
638
  },
@@ -633,8 +642,8 @@ function Qe(e, a = {}) {
633
642
  headerName: i("diagnosis"),
634
643
  hide: !0,
635
644
  field: "diagnosis",
636
- filter: C,
637
- floatingFilterComponent: g,
645
+ filter: g,
646
+ floatingFilterComponent: b,
638
647
  minWidth: 180,
639
648
  width: 220
640
649
  },
@@ -643,8 +652,8 @@ function Qe(e, a = {}) {
643
652
  headerName: i("insurance"),
644
653
  hide: !0,
645
654
  field: "defaultInsurance",
646
- filter: I,
647
- floatingFilterComponent: R,
655
+ filter: N,
656
+ floatingFilterComponent: w,
648
657
  minWidth: 140,
649
658
  width: 160
650
659
  },
@@ -652,18 +661,18 @@ function Qe(e, a = {}) {
652
661
  colId: "assignedTo",
653
662
  headerName: i("assignedTo"),
654
663
  hide: !0,
655
- cellRenderer: Ie,
656
- valueGetter: (t) => {
657
- var n;
658
- return (n = t.data) != null && n.personalAssistant ? { name: t.data.personalAssistant } : null;
664
+ cellRenderer: ye,
665
+ valueGetter: (n) => {
666
+ var t;
667
+ return (t = n.data) != null && t.personalAssistant ? { name: n.data.personalAssistant } : null;
659
668
  },
660
- comparator: (t, n) => ((t == null ? void 0 : t.name) ?? "").localeCompare((n == null ? void 0 : n.name) ?? ""),
661
- filterValueGetter: (t) => {
662
- var n;
663
- return ((n = t.data) == null ? void 0 : n.personalAssistant) ?? "";
669
+ comparator: (n, t) => ((n == null ? void 0 : n.name) ?? "").localeCompare((t == null ? void 0 : t.name) ?? ""),
670
+ filterValueGetter: (n) => {
671
+ var t;
672
+ return ((t = n.data) == null ? void 0 : t.personalAssistant) ?? "";
664
673
  },
665
- filter: Re,
666
- floatingFilterComponent: Fe,
674
+ filter: Ie,
675
+ floatingFilterComponent: Re,
667
676
  minWidth: 160,
668
677
  width: 180
669
678
  },
@@ -672,8 +681,8 @@ function Qe(e, a = {}) {
672
681
  headerName: i("job"),
673
682
  hide: !0,
674
683
  field: "job",
675
- filter: C,
676
- floatingFilterComponent: g,
684
+ filter: g,
685
+ floatingFilterComponent: b,
677
686
  minWidth: 140,
678
687
  width: 160
679
688
  },
@@ -682,13 +691,13 @@ function Qe(e, a = {}) {
682
691
  colId: "marketingConsent",
683
692
  headerName: i("marketingConsent"),
684
693
  hide: !0,
685
- cellRenderer: ye,
694
+ cellRenderer: Pe,
686
695
  cellRendererParams: {
687
- variantMap: p
696
+ variantMap: T
688
697
  },
689
- valueGetter: (t) => {
690
- var n;
691
- switch ((n = t.data) == null ? void 0 : n.marketingConsent) {
698
+ valueGetter: (n) => {
699
+ var t;
700
+ switch ((t = n.data) == null ? void 0 : t.marketingConsent) {
692
701
  case 1:
693
702
  return u.yes;
694
703
  case 0:
@@ -697,8 +706,8 @@ function Qe(e, a = {}) {
697
706
  return u.notSpecified;
698
707
  }
699
708
  },
700
- filter: I,
701
- floatingFilterComponent: R,
709
+ filter: N,
710
+ floatingFilterComponent: w,
702
711
  filterParams: {
703
712
  options: [
704
713
  { value: u.yes, label: u.yes },
@@ -718,13 +727,13 @@ function Qe(e, a = {}) {
718
727
  headerName: i("patientNumber"),
719
728
  hide: !0,
720
729
  // `YYYY/N` yearly numbering.
721
- valueGetter: (t) => {
722
- var b, m;
723
- const n = (b = t.data) == null ? void 0 : b.yearlyNumberingYear, f = (m = t.data) == null ? void 0 : m.yearlyNumberingNumber;
724
- return n != null && f != null ? `${n}/${f}` : "";
730
+ valueGetter: (n) => {
731
+ var c, R;
732
+ const t = (c = n.data) == null ? void 0 : c.yearlyNumberingYear, p = (R = n.data) == null ? void 0 : R.yearlyNumberingNumber;
733
+ return t != null && p != null ? `${t}/${p}` : "";
725
734
  },
726
- filter: C,
727
- floatingFilterComponent: g,
735
+ filter: g,
736
+ floatingFilterComponent: b,
728
737
  minWidth: 120,
729
738
  width: 140
730
739
  },
@@ -732,16 +741,16 @@ function Qe(e, a = {}) {
732
741
  colId: "portal",
733
742
  headerName: i("portal"),
734
743
  hide: !0,
735
- valueGetter: (t) => {
736
- var n;
737
- return !!((n = t.data) != null && n.mydentista);
744
+ valueGetter: (n) => {
745
+ var t;
746
+ return !!((t = n.data) != null && t.mydentista);
738
747
  },
739
- valueFormatter: (t) => t.value === !0 ? A : W,
740
- filter: I,
741
- floatingFilterComponent: R,
748
+ valueFormatter: (n) => n.value === !0 ? D : W,
749
+ filter: N,
750
+ floatingFilterComponent: w,
742
751
  filterParams: {
743
752
  options: [
744
- { value: !0, label: A },
753
+ { value: !0, label: D },
745
754
  { value: !1, label: W }
746
755
  ]
747
756
  },
@@ -753,10 +762,10 @@ function Qe(e, a = {}) {
753
762
  headerName: i("createdAt"),
754
763
  hide: !0,
755
764
  field: "createdAt",
756
- cellRenderer: q,
765
+ cellRenderer: Q,
757
766
  cellRendererParams: { format: "date" },
758
- filter: z,
759
- floatingFilterComponent: _,
767
+ filter: H,
768
+ floatingFilterComponent: z,
760
769
  minWidth: 140,
761
770
  width: 160
762
771
  },
@@ -766,8 +775,8 @@ function Qe(e, a = {}) {
766
775
  headerName: i("city"),
767
776
  hide: !0,
768
777
  field: "city",
769
- filter: C,
770
- floatingFilterComponent: g,
778
+ filter: g,
779
+ floatingFilterComponent: b,
771
780
  minWidth: 120,
772
781
  width: 150
773
782
  },
@@ -776,8 +785,8 @@ function Qe(e, a = {}) {
776
785
  headerName: i("province"),
777
786
  hide: !0,
778
787
  field: "province",
779
- filter: C,
780
- floatingFilterComponent: g,
788
+ filter: g,
789
+ floatingFilterComponent: b,
781
790
  minWidth: 100,
782
791
  width: 120
783
792
  },
@@ -786,8 +795,8 @@ function Qe(e, a = {}) {
786
795
  headerName: i("postcode"),
787
796
  hide: !0,
788
797
  field: "postcode",
789
- filter: C,
790
- floatingFilterComponent: g,
798
+ filter: g,
799
+ floatingFilterComponent: b,
791
800
  minWidth: 110,
792
801
  width: 130
793
802
  },
@@ -795,12 +804,12 @@ function Qe(e, a = {}) {
795
804
  colId: "country",
796
805
  headerName: i("country"),
797
806
  hide: !0,
798
- valueGetter: (t) => {
799
- var n;
800
- return te((n = t.data) == null ? void 0 : n.countryCode);
807
+ valueGetter: (n) => {
808
+ var t;
809
+ return ne((t = n.data) == null ? void 0 : t.countryCode);
801
810
  },
802
- filter: C,
803
- floatingFilterComponent: g,
811
+ filter: g,
812
+ floatingFilterComponent: b,
804
813
  minWidth: 110,
805
814
  width: 130
806
815
  },
@@ -809,13 +818,13 @@ function Qe(e, a = {}) {
809
818
  headerName: i("street"),
810
819
  hide: !0,
811
820
  field: "street",
812
- filter: C,
813
- floatingFilterComponent: g,
821
+ filter: g,
822
+ floatingFilterComponent: b,
814
823
  minWidth: 180,
815
824
  width: 220
816
825
  },
817
826
  /* ── Custom fields (per-practice, dynamic) — appended, hidden ──── */
818
- ...qe(c),
827
+ ...Xe(d),
819
828
  /* ── Actions (P0, pinned-end) ──────────────────────────────────── */
820
829
  {
821
830
  colId: "actions",
@@ -831,9 +840,9 @@ function Qe(e, a = {}) {
831
840
  // other column — no right-aligned header (the actions still sit at the
832
841
  // pinned inline-end edge, the group just starts at the cell's leading edge).
833
842
  cellClass: "ds:justify-start ag-cell-graphic",
834
- cellRenderer: Ce,
843
+ cellRenderer: ve,
835
844
  cellRendererParams: {
836
- actions: h,
845
+ actions: m,
837
846
  intent: "ghost",
838
847
  group: !0,
839
848
  label: e("patientTable.actions.group"),
@@ -845,13 +854,13 @@ function Qe(e, a = {}) {
845
854
  // The renderer collapses to a single overflow trigger via
846
855
  // `getActionsCompact`; the expanded width is DERIVED from the action count
847
856
  // so a row showing every action can't clip — 88px collapsed → fits-all.
848
- width: ie(h.length),
857
+ width: re(m.length),
849
858
  minWidth: 88
850
859
  // Anchor — never auto-hidden (no tier).
851
860
  }
852
861
  ];
853
862
  }
854
- const Xe = /* @__PURE__ */ new Set([
863
+ const Ze = /* @__PURE__ */ new Set([
855
864
  "api",
856
865
  "flex",
857
866
  "gridInitializing",
@@ -860,127 +869,127 @@ const Xe = /* @__PURE__ */ new Set([
860
869
  "sizeColumnsToFit",
861
870
  "rowDataUpdated",
862
871
  "rowModelUpdated"
863
- ]), Je = [
872
+ ]), et = [
864
873
  { minWidth: 0, tier: "P0" },
865
874
  { minWidth: 640, tier: "P1" },
866
875
  { minWidth: 900, tier: "P2" },
867
876
  { minWidth: 1200, tier: "P3" }
868
877
  ];
869
- function Ze(e, a) {
870
- const o = /* @__PURE__ */ new Set();
878
+ function tt(e, a) {
879
+ const l = /* @__PURE__ */ new Set();
871
880
  for (const s of a)
872
- e >= s.minWidth && o.add(s.tier);
873
- return o.add("P0"), o;
881
+ e >= s.minWidth && l.add(s.tier);
882
+ return l.add("P0"), l;
874
883
  }
875
- function et(e, a) {
884
+ function nt(e, a) {
876
885
  const {
877
- containerRef: o,
886
+ containerRef: l,
878
887
  enabled: s = !0,
879
- breakpoints: l = Je
880
- } = a, r = k(/* @__PURE__ */ new Set()), c = k(!1);
881
- return ne(() => {
882
- const d = o.current;
883
- if (!s || !d) return;
884
- const u = () => {
885
- var m;
886
- return (m = e.current) == null ? void 0 : m.getRawApi();
888
+ breakpoints: o = et
889
+ } = a, r = k(/* @__PURE__ */ new Set()), d = k(!1);
890
+ return ae(() => {
891
+ const m = l.current;
892
+ if (!s || !m) return;
893
+ const f = () => {
894
+ var c;
895
+ return (c = e.current) == null ? void 0 : c.getRawApi();
887
896
  };
888
- let p;
889
- const i = () => {
890
- p === void 0 && (p = window.setTimeout(() => {
891
- p = void 0, f();
897
+ let u;
898
+ const T = () => {
899
+ u === void 0 && (u = window.setTimeout(() => {
900
+ u = void 0, t();
892
901
  }, 0));
893
- }, T = (m) => {
902
+ }, i = (c) => {
894
903
  var E;
895
- if (c.current) return;
896
- if (Xe.has(m.source)) {
897
- i();
904
+ if (d.current) return;
905
+ if (Ze.has(c.source)) {
906
+ T();
898
907
  return;
899
908
  }
900
- const x = (m.columns ?? (m.column ? [m.column] : [])).map((D) => D.getColId());
901
- for (const D of x) r.current.add(D);
902
- (E = e.current) == null || E.markColumnsUserTouched(x);
909
+ const B = (c.columns ?? (c.column ? [c.column] : [])).map((V) => V.getColId());
910
+ for (const V of B) r.current.add(V);
911
+ (E = e.current) == null || E.markColumnsUserTouched(B);
903
912
  };
904
- let t = !1;
905
- const n = (m) => {
906
- t || (t = !0, m.addEventListener("columnVisible", T));
907
- }, f = () => {
908
- var G;
909
- const m = u();
910
- if (!m) return;
911
- n(m);
912
- const V = m.getColumns();
913
- if (!V) return;
914
- const x = d.getBoundingClientRect().width, E = Ze(x, l), D = new Set(
915
- ((G = e.current) == null ? void 0 : G.getUserTouchedColumns()) ?? []
916
- ), y = [], F = [];
917
- for (const N of V) {
918
- const U = N.getColId();
919
- if (r.current.has(U) || D.has(U))
913
+ let F = !1;
914
+ const n = (c) => {
915
+ F || (F = !0, c.addEventListener("columnVisible", i));
916
+ }, t = () => {
917
+ var A;
918
+ const c = f();
919
+ if (!c) return;
920
+ n(c);
921
+ const R = c.getColumns();
922
+ if (!R) return;
923
+ const B = m.getBoundingClientRect().width, E = tt(B, o), V = new Set(
924
+ ((A = e.current) == null ? void 0 : A.getUserTouchedColumns()) ?? []
925
+ ), O = [], I = [];
926
+ for (const y of R) {
927
+ const x = y.getColId();
928
+ if (r.current.has(x) || V.has(x))
920
929
  continue;
921
- const L = oe(N.getColDef());
922
- if (!L) continue;
923
- const B = E.has(L);
924
- B && !N.isVisible() ? y.push(N) : !B && N.isVisible() && F.push(N);
930
+ const U = se(y.getColDef());
931
+ if (!U) continue;
932
+ const L = E.has(U);
933
+ L && !y.isVisible() ? O.push(y) : !L && y.isVisible() && I.push(y);
925
934
  }
926
- if (!(y.length === 0 && F.length === 0)) {
927
- c.current = !0;
935
+ if (!(O.length === 0 && I.length === 0)) {
936
+ d.current = !0;
928
937
  try {
929
- y.length > 0 && m.setColumnsVisible(y, !0), F.length > 0 && m.setColumnsVisible(F, !1);
938
+ O.length > 0 && c.setColumnsVisible(O, !0), I.length > 0 && c.setColumnsVisible(I, !1);
930
939
  } finally {
931
- c.current = !1;
940
+ d.current = !1;
932
941
  }
933
942
  }
934
- }, b = new ResizeObserver(() => f());
935
- return b.observe(d), f(), () => {
936
- var m;
937
- b.disconnect(), p !== void 0 && window.clearTimeout(p), (m = u()) == null || m.removeEventListener("columnVisible", T);
943
+ }, p = new ResizeObserver(() => t());
944
+ return p.observe(m), t(), () => {
945
+ var c;
946
+ p.disconnect(), u !== void 0 && window.clearTimeout(u), (c = f()) == null || c.removeEventListener("columnVisible", i);
938
947
  };
939
- }, [o, s, l, e]), { lockColumns: j(
940
- (d) => {
941
- var u;
942
- for (const p of d) r.current.add(p);
943
- (u = e.current) == null || u.markColumnsUserTouched(d);
948
+ }, [l, s, o, e]), { lockColumns: K(
949
+ (m) => {
950
+ var f;
951
+ for (const u of m) r.current.add(u);
952
+ (f = e.current) == null || f.markColumnsUserTouched(m);
944
953
  },
945
954
  [e]
946
955
  ) };
947
956
  }
948
- function tt(e) {
957
+ function at(e) {
949
958
  var a;
950
959
  return (a = e.data) != null && a.isArchived ? "data-table-row-archived" : void 0;
951
960
  }
952
- function nt(e) {
961
+ function it(e) {
953
962
  return e.data.id;
954
963
  }
955
- function at({
964
+ function rt({
956
965
  views: e,
957
966
  handleRef: a,
958
- lockColumns: o,
967
+ lockColumns: l,
959
968
  label: s
960
969
  }) {
961
- const [l, r] = ae(""), c = Q(
962
- () => e.map((u) => ({ value: u.id, label: u.label })),
970
+ const [o, r] = ie(""), d = X(
971
+ () => e.map((f) => ({ value: f.id, label: f.label })),
963
972
  [e]
964
- ), h = j(
965
- (u) => {
966
- const p = e.find((t) => t.id === u), i = a.current;
967
- if (!p || !i) return;
968
- const T = i.getRawApi();
969
- if (T) {
970
- const t = new Set(p.columns), n = [], f = [];
971
- for (const b of T.getColumns() ?? []) {
972
- if (oe(b.getColDef()) === void 0) continue;
973
- const m = b.getColId();
974
- t.has(m) ? n.push(m) : f.push(m);
973
+ ), h = K(
974
+ (f) => {
975
+ const u = e.find((F) => F.id === f), T = a.current;
976
+ if (!u || !T) return;
977
+ const i = T.getRawApi();
978
+ if (i) {
979
+ const F = new Set(u.columns), n = [], t = [];
980
+ for (const p of i.getColumns() ?? []) {
981
+ if (se(p.getColDef()) === void 0) continue;
982
+ const c = p.getColId();
983
+ F.has(c) ? n.push(c) : t.push(c);
975
984
  }
976
- o([...n, ...f]), n.length > 0 && T.setColumnsVisible(n, !0), f.length > 0 && T.setColumnsVisible(f, !1);
985
+ l([...n, ...t]), n.length > 0 && i.setColumnsVisible(n, !0), t.length > 0 && i.setColumnsVisible(t, !1);
977
986
  }
978
- i.setFilter(p.filterModel), i.setSort(p.sortModel), T == null || T.onFilterChanged();
987
+ T.setFilter(u.filterModel), T.setSort(u.sortModel), i == null || i.onFilterChanged();
979
988
  },
980
- [e, a, o]
981
- ), d = j(
982
- (u) => {
983
- r(u), u && h(u);
989
+ [e, a, l]
990
+ ), m = K(
991
+ (f) => {
992
+ r(f), f && h(f);
984
993
  },
985
994
  [h]
986
995
  );
@@ -988,182 +997,185 @@ function at({
988
997
  // Width-constraining wrapper (same pattern as the toolbar's QuickSearch) so
989
998
  // the Select's intrinsic `w-full` trigger sizes to a compact, legible width
990
999
  // instead of absorbing the whole FilterBar row.
991
- /* @__PURE__ */ v("div", { className: "ds:w-[12rem] ds:max-w-full ds:min-w-0 ds:shrink-0", children: /* @__PURE__ */ v(
992
- ve,
1000
+ /* @__PURE__ */ C("div", { className: "ds:w-[12rem] ds:max-w-full ds:min-w-0 ds:shrink-0", children: /* @__PURE__ */ C(
1001
+ Te,
993
1002
  {
994
- options: c,
995
- value: l,
996
- onValueChange: d,
1003
+ options: d,
1004
+ value: o,
1005
+ onValueChange: m,
997
1006
  size: "sm",
998
1007
  "aria-label": s
999
1008
  }
1000
1009
  ) })
1001
1010
  );
1002
1011
  }
1003
- const it = pe(
1012
+ const lt = be(
1004
1013
  function({
1005
1014
  rowData: a,
1006
- columns: o,
1015
+ columns: l,
1007
1016
  gridId: s,
1008
- density: l,
1017
+ density: o,
1009
1018
  actionsCompact: r,
1010
- heightClass: c,
1019
+ heightClass: d,
1011
1020
  responsive: h = !0,
1012
- views: d,
1013
- onRowAction: u,
1014
- bulkActions: p,
1015
- loading: i = !1,
1016
- toolbar: T,
1017
- hideQuickSearch: t = !1,
1021
+ views: m,
1022
+ onRowAction: f,
1023
+ bulkActions: u,
1024
+ loading: T = !1,
1025
+ toolbar: i,
1026
+ hideQuickSearch: F = !1,
1018
1027
  pagination: n = !1,
1019
- paginationPageSizeSelector: f,
1020
- hideDetails: b = !1,
1021
- identityHref: m,
1022
- customFields: V,
1023
- "aria-label": x,
1024
- className: E
1025
- }, D) {
1026
- const { t: y } = K("ui"), F = k(null), G = k(null), [N, U] = ae(null);
1027
- be(
1028
- D,
1029
- () => N ?? F.current,
1030
- [N]
1028
+ paginationPageSizeSelector: t,
1029
+ hideDetails: p = !1,
1030
+ identityHref: c,
1031
+ customFields: R,
1032
+ currency: B,
1033
+ "aria-label": E,
1034
+ className: V
1035
+ }, O) {
1036
+ const { t: I } = Y("ui"), A = k(null), y = k(null), [x, U] = ie(null);
1037
+ ge(
1038
+ O,
1039
+ () => x ?? A.current,
1040
+ [x]
1031
1041
  );
1032
- const { lockColumns: L } = et(F, {
1033
- containerRef: G,
1042
+ const { lockColumns: L } = nt(A, {
1043
+ containerRef: y,
1034
1044
  enabled: h
1035
- }), B = r ?? l === "compact", X = k(B), J = j(() => X.current, []);
1036
- ne(() => {
1045
+ }), _ = r ?? o === "compact", J = k(_), Z = K(() => J.current, []);
1046
+ ae(() => {
1037
1047
  var P;
1038
- X.current = B;
1039
- const w = (P = F.current) == null ? void 0 : P.getRawApi();
1040
- w && (w.setColumnWidths([
1048
+ J.current = _;
1049
+ const v = (P = A.current) == null ? void 0 : P.getRawApi();
1050
+ v && (v.setColumnWidths([
1041
1051
  {
1042
1052
  key: "actions",
1043
- newWidth: B ? 88 : ie($e)
1053
+ newWidth: _ ? 88 : re(Ke)
1044
1054
  }
1045
- ]), w.refreshCells({ force: !0 }));
1046
- }, [B, N]);
1047
- const se = Q(
1048
- () => o ?? Qe(y, {
1049
- hideDetails: b,
1050
- onRowAction: u,
1051
- identityHref: m,
1052
- customFields: V,
1053
- getActionsCompact: J
1055
+ ]), v.refreshCells({ force: !0 }));
1056
+ }, [_, x]);
1057
+ const de = X(
1058
+ () => l ?? Je(I, {
1059
+ hideDetails: p,
1060
+ onRowAction: f,
1061
+ identityHref: c,
1062
+ customFields: R,
1063
+ currency: B,
1064
+ getActionsCompact: Z
1054
1065
  }),
1055
1066
  [
1056
- o,
1057
- y,
1058
- b,
1059
- u,
1060
- m,
1061
- V,
1062
- J
1067
+ l,
1068
+ I,
1069
+ p,
1070
+ f,
1071
+ c,
1072
+ R,
1073
+ B,
1074
+ Z
1063
1075
  ]
1064
- ), de = ((d == null ? void 0 : d.length) ?? 0) > 0, ce = /* @__PURE__ */ M(S.Toolbar, { children: [
1076
+ ), ce = ((m == null ? void 0 : m.length) ?? 0) > 0, ue = /* @__PURE__ */ M(S.Toolbar, { children: [
1065
1077
  /* @__PURE__ */ M(S.Toolbar.FilterBar, { children: [
1066
- de && d ? /* @__PURE__ */ v(
1067
- at,
1078
+ ce && m ? /* @__PURE__ */ C(
1079
+ rt,
1068
1080
  {
1069
- views: d,
1070
- handleRef: F,
1081
+ views: m,
1082
+ handleRef: A,
1071
1083
  lockColumns: L,
1072
- label: y("patientTable.views.label")
1084
+ label: I("patientTable.views.label")
1073
1085
  }
1074
1086
  ) : null,
1075
- t ? null : /* @__PURE__ */ v(S.Toolbar.QuickSearch, {}),
1076
- /* @__PURE__ */ v(S.Toolbar.FilterChips, {})
1087
+ F ? null : /* @__PURE__ */ C(S.Toolbar.QuickSearch, {}),
1088
+ /* @__PURE__ */ C(S.Toolbar.FilterChips, {})
1077
1089
  ] }),
1078
1090
  /* @__PURE__ */ M(S.Toolbar.Actions, { children: [
1079
- p == null ? void 0 : p.map((w) => /* @__PURE__ */ v(
1091
+ u == null ? void 0 : u.map((v) => /* @__PURE__ */ C(
1080
1092
  S.Toolbar.BulkAction,
1081
1093
  {
1082
- label: w.label,
1083
- icon: w.icon,
1084
- variant: w.variant,
1094
+ label: v.label,
1095
+ icon: v.icon,
1096
+ variant: v.variant,
1085
1097
  onClick: (P) => {
1086
- const he = (P == null ? void 0 : P.getSelectedNodes().map((Y) => Y.id).filter((Y) => Y != null)) ?? [];
1087
- w.onSelect(he);
1098
+ const pe = (P == null ? void 0 : P.getSelectedNodes().map((q) => q.id).filter((q) => q != null)) ?? [];
1099
+ v.onSelect(pe);
1088
1100
  }
1089
1101
  },
1090
- w.id
1102
+ v.id
1091
1103
  )),
1092
- /* @__PURE__ */ v(S.Toolbar.ColumnToggle, {}),
1093
- /* @__PURE__ */ v(S.Toolbar.ExportMenu, {})
1104
+ /* @__PURE__ */ C(S.Toolbar.ColumnToggle, {}),
1105
+ /* @__PURE__ */ C(S.Toolbar.ExportMenu, {})
1094
1106
  ] })
1095
- ] }), ue = T ?? ce, me = i ? void 0 : a, fe = Q(() => ({ getRowId: nt }), []);
1096
- return Te(
1097
- ge,
1098
- N,
1107
+ ] }), me = i ?? ue, fe = T ? void 0 : a, he = X(() => ({ getRowId: it }), []);
1108
+ return we(
1109
+ Ce,
1110
+ x,
1099
1111
  s
1100
- ), /* @__PURE__ */ v(
1112
+ ), /* @__PURE__ */ C(
1101
1113
  "div",
1102
1114
  {
1103
- ref: G,
1115
+ ref: y,
1104
1116
  role: "region",
1105
- "aria-label": x ?? y("patientTable.regionLabel"),
1117
+ "aria-label": E ?? I("patientTable.regionLabel"),
1106
1118
  "data-component": "patient-table",
1107
1119
  "data-component-id": s,
1108
1120
  className: "ds:flex ds:w-full ds:min-h-0 ds:flex-1 ds:flex-col",
1109
- children: /* @__PURE__ */ v(
1121
+ children: /* @__PURE__ */ C(
1110
1122
  S,
1111
1123
  {
1112
- ref: (w) => {
1113
- F.current = w, U(
1114
- (P) => P === w ? P : w
1124
+ ref: (v) => {
1125
+ A.current = v, U(
1126
+ (P) => P === v ? P : v
1115
1127
  );
1116
1128
  },
1117
1129
  gridId: s,
1118
- columnDefs: se,
1119
- rowData: me,
1130
+ columnDefs: de,
1131
+ rowData: fe,
1120
1132
  rowSelection: "multiple",
1121
1133
  pagination: n,
1122
- ...c !== void 0 ? { heightClass: c } : {},
1123
- ...f !== void 0 ? { paginationPageSizeSelector: f } : {},
1124
- density: l,
1125
- getRowClass: tt,
1126
- gridOptions: fe,
1127
- className: E,
1128
- children: ue
1134
+ ...d !== void 0 ? { heightClass: d } : {},
1135
+ ...t !== void 0 ? { paginationPageSizeSelector: t } : {},
1136
+ density: o,
1137
+ getRowClass: at,
1138
+ gridOptions: he,
1139
+ className: V,
1140
+ children: me
1129
1141
  }
1130
1142
  )
1131
1143
  }
1132
1144
  );
1133
1145
  }
1134
1146
  );
1135
- it.displayName = "PatientTable";
1136
- const rt = 5e4;
1137
- function lt(e) {
1138
- return e === 0 ? { variant: "success", statusKey: "settled" } : e <= rt ? { variant: "warning", statusKey: "pending" } : { variant: "error", statusKey: "overdue" };
1147
+ lt.displayName = "PatientTable";
1148
+ const ot = 5e4;
1149
+ function st(e) {
1150
+ return e === 0 ? { variant: "success", statusKey: "settled" } : e <= ot ? { variant: "warning", statusKey: "pending" } : { variant: "error", statusKey: "overdue" };
1139
1151
  }
1140
- function ot(e) {
1152
+ function dt(e) {
1141
1153
  if (e == null || e === "") return null;
1142
1154
  const a = typeof e == "number" ? e : Number(e);
1143
1155
  return Number.isFinite(a) ? a : null;
1144
1156
  }
1145
- function Pt(e) {
1146
- const { value: a, currency: o = "EUR", options: s } = e, { t: l, i18n: r } = K("ui"), c = ot(a);
1147
- if (c === null) return null;
1148
- const h = r.language || "en", d = new Intl.NumberFormat(h, {
1157
+ function Wt(e) {
1158
+ const { value: a, currency: l = "EUR", options: s } = e, { t: o, i18n: r } = Y("ui"), d = dt(a);
1159
+ if (d === null) return null;
1160
+ const h = r.language || "en", m = new Intl.NumberFormat(h, {
1149
1161
  style: "currency",
1150
- currency: o,
1162
+ currency: l,
1151
1163
  ...s
1152
- }).format(c / 100), { variant: u, statusKey: p } = lt(c), i = l(`patientTable.balance.status.${p}`);
1153
- return /* @__PURE__ */ M(le, { variant: u, withDot: !0, size: "sm", className: "ds:tabular-nums", children: [
1154
- /* @__PURE__ */ v("span", { children: d }),
1155
- /* @__PURE__ */ v("span", { className: "ds:sr-only", children: i })
1164
+ }).format(d / 100), { variant: f, statusKey: u } = st(d), T = o(`patientTable.balance.status.${u}`);
1165
+ return /* @__PURE__ */ M(oe, { variant: f, withDot: !0, size: "sm", className: "ds:tabular-nums", children: [
1166
+ /* @__PURE__ */ C("span", { children: m }),
1167
+ /* @__PURE__ */ C("span", { className: "ds:sr-only", children: T })
1156
1168
  ] });
1157
1169
  }
1158
1170
  export {
1159
- Pt as B,
1160
- ke as C,
1161
- He as N,
1162
- $e as P,
1163
- Z as T,
1164
- it as a,
1165
- Qe as b,
1166
- oe as g,
1167
- et as u
1171
+ Wt as B,
1172
+ Le as C,
1173
+ je as N,
1174
+ Ke as P,
1175
+ ee as T,
1176
+ lt as a,
1177
+ Je as b,
1178
+ se as g,
1179
+ nt as u
1168
1180
  };
1169
- //# sourceMappingURL=balance-badge-cell-CgkxYO96.js.map
1181
+ //# sourceMappingURL=balance-badge-cell-DNjHODfP.js.map