@alfadocs/ui-kit 1.9.3 → 1.9.4
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.
- package/dist/_chunks/{actions-cell-renderer-B2pw6iH8.js → actions-cell-renderer-WUTyAes8.js} +374 -363
- package/dist/_chunks/{patient-table-S77TBCEB.js → balance-badge-cell-DHTiSFyD.js} +281 -270
- package/dist/_chunks/editable-currency-cell-renderer-zLf_bXvL.js +412 -0
- package/dist/_chunks/{file-manager-Crg5dKez.js → file-manager-lAeBBfZi.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-x8kS41M7.js → link-cell-renderer-Cp2MSlJl.js} +237 -259
- package/dist/agent-catalog.json +1 -1
- package/dist/components/data-table/index.js +11 -11
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/patient-table/cell-renderers/transaction-chip-cell.d.ts +17 -0
- package/dist/components/patient-table/index.d.ts +2 -0
- package/dist/components/patient-table/index.js +7 -6
- package/dist/index.js +335 -334
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/editable-currency-cell-renderer-DYdzKpjL.js +0 -390
|
@@ -1,57 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createElement as x, useRef as k, useEffect as
|
|
1
|
+
import { jsx as g, jsxs as O } from "react/jsx-runtime";
|
|
2
|
+
import { createElement as x, useRef as k, useEffect as te, useCallback as z, forwardRef as pe, useState as ne, useImperativeHandle as be, useMemo as Y } from "react";
|
|
3
3
|
import { useTranslation as $ } from "react-i18next";
|
|
4
|
-
import { a as p, T as b, A as
|
|
5
|
-
import { S as
|
|
6
|
-
import { u as
|
|
7
|
-
import { I as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { M as Ve } from "./
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
function
|
|
20
|
-
|
|
4
|
+
import { a as p, T as b, A as ge, d as ie, D as y, e as Ce } from "./actions-cell-renderer-WUTyAes8.js";
|
|
5
|
+
import { S as ve } from "./select-BW5ecXlX.js";
|
|
6
|
+
import { u as Ne } from "./registry-DvAUVLHh.js";
|
|
7
|
+
import { I as Te, L as we, b as L, a as _, c as U, N as H, d as F, S as R, T as ae, D as K, g as Fe, f as Re, U as Ie, e as Pe } from "./link-cell-renderer-Cp2MSlJl.js";
|
|
8
|
+
import { T as ye } from "./transaction-chip-DJCstquX.js";
|
|
9
|
+
import { B as le } from "./badge-sTusUqZD.js";
|
|
10
|
+
import { c as We } from "./index-D2ZczOXr.js";
|
|
11
|
+
import { T as Se } from "./timestamp-BV2lC-wV.js";
|
|
12
|
+
import { C as Ae } from "./calendar-clock-hbObjfGY.js";
|
|
13
|
+
import { E as Be } from "./eye-BjhN2nYf.js";
|
|
14
|
+
import { P as De } from "./pencil-B1sKKyuT.js";
|
|
15
|
+
import { M as Ve } from "./mail-BqXVF2zH.js";
|
|
16
|
+
import { M as xe } from "./message-square-Bye4ATvx.js";
|
|
17
|
+
import { U as Ee } from "./users-BjS_Gg1E.js";
|
|
18
|
+
import { T as Oe } from "./trash-2-uumy3fy1.js";
|
|
19
|
+
function J(e) {
|
|
20
|
+
const { value: n, positiveState: d, showLabel: s = !0 } = e, r = typeof n == "number" && Number.isFinite(n) ? n : null;
|
|
21
|
+
if (r === null) return null;
|
|
22
|
+
const l = r > 0 ? d : "settled";
|
|
23
|
+
return /* @__PURE__ */ g(ye, { state: l, amount: r / 100, showLabel: s });
|
|
21
24
|
}
|
|
22
|
-
|
|
23
|
-
if (e == null || e === "") return null;
|
|
24
|
-
const i = typeof e == "number" ? e : Number(e);
|
|
25
|
-
return Number.isFinite(i) ? i : null;
|
|
26
|
-
}
|
|
27
|
-
function Ge(e) {
|
|
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
|
-
style: "currency",
|
|
32
|
-
currency: c,
|
|
33
|
-
...s
|
|
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
|
-
] });
|
|
39
|
-
}
|
|
40
|
-
const Le = {
|
|
25
|
+
const ke = {
|
|
41
26
|
accepted: "success",
|
|
42
27
|
estimate: "info",
|
|
43
28
|
none: "neutral"
|
|
44
29
|
};
|
|
45
|
-
function
|
|
30
|
+
function Me(e) {
|
|
46
31
|
return e === "accepted" || e === "estimate" || e === "none";
|
|
47
32
|
}
|
|
48
|
-
function
|
|
49
|
-
const { t:
|
|
50
|
-
if (!
|
|
51
|
-
const u =
|
|
52
|
-
return /* @__PURE__ */ g(
|
|
33
|
+
function Ge(e) {
|
|
34
|
+
const { t: n } = $("ui"), { data: d, value: s, size: r = "sm" } = e, l = (d == null ? void 0 : d.carePlanStatus) ?? s;
|
|
35
|
+
if (!Me(l)) return null;
|
|
36
|
+
const u = ke[l];
|
|
37
|
+
return /* @__PURE__ */ g(le, { variant: u, withDot: !0, size: r, children: n(`patientTable.carePlanStatus.${l}`) });
|
|
53
38
|
}
|
|
54
|
-
const
|
|
39
|
+
const Z = We(
|
|
55
40
|
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] ds:whitespace-nowrap",
|
|
56
41
|
{
|
|
57
42
|
variants: {
|
|
@@ -66,39 +51,39 @@ const J = Pe(
|
|
|
66
51
|
},
|
|
67
52
|
defaultVariants: { tone: "default" }
|
|
68
53
|
}
|
|
69
|
-
),
|
|
70
|
-
function
|
|
54
|
+
), Le = 1440 * 60 * 1e3, _e = 7;
|
|
55
|
+
function Ue(e) {
|
|
71
56
|
if (e == null || e === "") return null;
|
|
72
|
-
const
|
|
73
|
-
return Number.isNaN(
|
|
57
|
+
const n = e instanceof Date ? e.getTime() : typeof e == "number" ? e : new Date(String(e)).getTime();
|
|
58
|
+
return Number.isNaN(n) ? null : n;
|
|
74
59
|
}
|
|
75
|
-
function
|
|
76
|
-
if (
|
|
77
|
-
const
|
|
78
|
-
return
|
|
60
|
+
function He(e, n) {
|
|
61
|
+
if (n <= 0) return "default";
|
|
62
|
+
const d = e - Date.now();
|
|
63
|
+
return d < 0 ? "default" : d <= n * Le ? "soon" : "default";
|
|
79
64
|
}
|
|
80
|
-
function
|
|
81
|
-
const { t:
|
|
65
|
+
function ze(e) {
|
|
66
|
+
const { t: n } = $("ui"), { data: d, value: s, soonWithinDays: r = _e } = e, l = Ue((d == null ? void 0 : d.nextAppointment) ?? s);
|
|
82
67
|
if (l === null)
|
|
83
|
-
return /* @__PURE__ */ g("span", { className:
|
|
84
|
-
const u =
|
|
85
|
-
return /* @__PURE__ */ O("span", { className:
|
|
86
|
-
u === "soon" ? /* @__PURE__ */ g(
|
|
87
|
-
/* @__PURE__ */ g(
|
|
68
|
+
return /* @__PURE__ */ g("span", { className: Z({ tone: "empty" }), children: n("patientTable.nextAppointment.none") });
|
|
69
|
+
const u = He(l, r);
|
|
70
|
+
return /* @__PURE__ */ O("span", { className: Z({ tone: u }), children: [
|
|
71
|
+
u === "soon" ? /* @__PURE__ */ g(Ae, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }) : null,
|
|
72
|
+
/* @__PURE__ */ g(Se, { value: l, format: "relative", shape: "bare" })
|
|
88
73
|
] });
|
|
89
74
|
}
|
|
90
75
|
function q(e) {
|
|
91
76
|
return e.responsiveTier;
|
|
92
77
|
}
|
|
93
|
-
const
|
|
94
|
-
function
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
}, s = (
|
|
98
|
-
icon:
|
|
99
|
-
label:
|
|
100
|
-
variant:
|
|
101
|
-
onClick:
|
|
78
|
+
const $e = 6;
|
|
79
|
+
function je(e, n) {
|
|
80
|
+
const d = (r) => (l) => {
|
|
81
|
+
n == null || n(r, l);
|
|
82
|
+
}, s = (r, l) => ({
|
|
83
|
+
icon: r.icon,
|
|
84
|
+
label: r.label,
|
|
85
|
+
variant: r.variant,
|
|
86
|
+
onClick: d(r),
|
|
102
87
|
...l
|
|
103
88
|
});
|
|
104
89
|
return [
|
|
@@ -106,7 +91,7 @@ function qe(e, i) {
|
|
|
106
91
|
{
|
|
107
92
|
id: "show",
|
|
108
93
|
label: e("patientTable.actions.show"),
|
|
109
|
-
icon: x(
|
|
94
|
+
icon: x(Be, { "aria-hidden": "true" })
|
|
110
95
|
},
|
|
111
96
|
{}
|
|
112
97
|
),
|
|
@@ -114,7 +99,7 @@ function qe(e, i) {
|
|
|
114
99
|
{
|
|
115
100
|
id: "edit",
|
|
116
101
|
label: e("patientTable.actions.edit"),
|
|
117
|
-
icon: x(
|
|
102
|
+
icon: x(De, { "aria-hidden": "true" })
|
|
118
103
|
},
|
|
119
104
|
{}
|
|
120
105
|
),
|
|
@@ -122,27 +107,27 @@ function qe(e, i) {
|
|
|
122
107
|
{
|
|
123
108
|
id: "sendEmailReminder",
|
|
124
109
|
label: e("patientTable.actions.sendEmailReminder"),
|
|
125
|
-
icon: x(
|
|
110
|
+
icon: x(Ve, { "aria-hidden": "true" })
|
|
126
111
|
},
|
|
127
112
|
// Hidden when the patient has email contact disabled (spec).
|
|
128
|
-
{ hidden: (
|
|
113
|
+
{ hidden: (r) => !r.emailEnabled }
|
|
129
114
|
),
|
|
130
115
|
s(
|
|
131
116
|
{
|
|
132
117
|
id: "sendSmsReminder",
|
|
133
118
|
label: e("patientTable.actions.sendSmsReminder"),
|
|
134
|
-
icon: x(
|
|
119
|
+
icon: x(xe, { "aria-hidden": "true" })
|
|
135
120
|
},
|
|
136
121
|
// Hidden when no phone number is SMS-enabled (spec).
|
|
137
122
|
{
|
|
138
|
-
hidden: (
|
|
123
|
+
hidden: (r) => !(r.phoneNumbers ?? []).some((l) => l.smsEnabled)
|
|
139
124
|
}
|
|
140
125
|
),
|
|
141
126
|
s(
|
|
142
127
|
{
|
|
143
128
|
id: "reassign",
|
|
144
129
|
label: e("patientTable.actions.reassign"),
|
|
145
|
-
icon: x(
|
|
130
|
+
icon: x(Ee, { "aria-hidden": "true" })
|
|
146
131
|
},
|
|
147
132
|
{}
|
|
148
133
|
),
|
|
@@ -150,42 +135,42 @@ function qe(e, i) {
|
|
|
150
135
|
{
|
|
151
136
|
id: "delete",
|
|
152
137
|
label: e("patientTable.actions.delete"),
|
|
153
|
-
icon: x(
|
|
138
|
+
icon: x(Oe, { "aria-hidden": "true" }),
|
|
154
139
|
variant: "destructive"
|
|
155
140
|
},
|
|
156
141
|
// Disabled (with a reason) for archived patients — the row model's
|
|
157
142
|
// closest "cannot delete" signal. Surfaced as the inline tooltip.
|
|
158
143
|
{
|
|
159
|
-
disabled: (
|
|
144
|
+
disabled: (r) => !!r.isArchived,
|
|
160
145
|
disabledReason: e("patientTable.actions.deleteLocked")
|
|
161
146
|
}
|
|
162
147
|
)
|
|
163
148
|
];
|
|
164
149
|
}
|
|
165
|
-
const
|
|
166
|
-
function
|
|
150
|
+
const Ke = () => !1, B = "✓", W = "—";
|
|
151
|
+
function Ye(e) {
|
|
167
152
|
if (!e) return null;
|
|
168
|
-
const
|
|
169
|
-
if (Number.isNaN(
|
|
153
|
+
const n = new Date(e), d = n.getTime();
|
|
154
|
+
if (Number.isNaN(d)) return null;
|
|
170
155
|
const s = /* @__PURE__ */ new Date();
|
|
171
|
-
let
|
|
172
|
-
const l = s.getMonth() -
|
|
173
|
-
return (l < 0 || l === 0 && s.getDate() <
|
|
156
|
+
let r = s.getFullYear() - n.getFullYear();
|
|
157
|
+
const l = s.getMonth() - n.getMonth();
|
|
158
|
+
return (l < 0 || l === 0 && s.getDate() < n.getDate()) && (r -= 1), r >= 0 ? r : null;
|
|
174
159
|
}
|
|
175
|
-
function
|
|
176
|
-
return e.map((
|
|
177
|
-
var
|
|
160
|
+
function qe(e) {
|
|
161
|
+
return e.map((n) => {
|
|
162
|
+
var r;
|
|
178
163
|
const s = {
|
|
179
|
-
colId: `custom:${
|
|
180
|
-
headerName:
|
|
164
|
+
colId: `custom:${n.fieldName}`,
|
|
165
|
+
headerName: n.label,
|
|
181
166
|
hide: !0
|
|
182
167
|
// No tier — custom fields are opt-in via ColumnToggle only.
|
|
183
168
|
};
|
|
184
|
-
return
|
|
169
|
+
return n.type === "checkbox" ? {
|
|
185
170
|
...s,
|
|
186
171
|
valueGetter: (l) => {
|
|
187
172
|
var u, f;
|
|
188
|
-
return ((f = (u = l.data) == null ? void 0 : u.customFields) == null ? void 0 : f[
|
|
173
|
+
return ((f = (u = l.data) == null ? void 0 : u.customFields) == null ? void 0 : f[n.fieldName]) === !0;
|
|
189
174
|
},
|
|
190
175
|
valueFormatter: (l) => l.value === !0 ? B : W,
|
|
191
176
|
filter: R,
|
|
@@ -198,18 +183,18 @@ function Je(e) {
|
|
|
198
183
|
},
|
|
199
184
|
minWidth: 110,
|
|
200
185
|
width: 130
|
|
201
|
-
} :
|
|
186
|
+
} : n.type === "dropdown" ? {
|
|
202
187
|
...s,
|
|
203
188
|
// TagListCellRenderer expects an array; wrap the single value.
|
|
204
189
|
valueGetter: (l) => {
|
|
205
|
-
var f,
|
|
206
|
-
const u = (
|
|
190
|
+
var f, c;
|
|
191
|
+
const u = (c = (f = l.data) == null ? void 0 : f.customFields) == null ? void 0 : c[n.fieldName];
|
|
207
192
|
return typeof u == "string" && u ? [u] : [];
|
|
208
193
|
},
|
|
209
|
-
cellRenderer:
|
|
194
|
+
cellRenderer: ae,
|
|
210
195
|
filterValueGetter: (l) => {
|
|
211
|
-
var f,
|
|
212
|
-
const u = (
|
|
196
|
+
var f, c;
|
|
197
|
+
const u = (c = (f = l.data) == null ? void 0 : f.customFields) == null ? void 0 : c[n.fieldName];
|
|
213
198
|
return typeof u == "string" ? u : "";
|
|
214
199
|
},
|
|
215
200
|
filter: R,
|
|
@@ -218,7 +203,7 @@ function Je(e) {
|
|
|
218
203
|
// Undefined (not []) when the field declares no options, so the
|
|
219
204
|
// filter derives its choices from the rows. An empty array would
|
|
220
205
|
// mean "this column has no facets" and leave the filter unusable.
|
|
221
|
-
options: (
|
|
206
|
+
options: (r = n.options) == null ? void 0 : r.map((l) => ({
|
|
222
207
|
value: l,
|
|
223
208
|
label: l
|
|
224
209
|
}))
|
|
@@ -229,8 +214,8 @@ function Je(e) {
|
|
|
229
214
|
} : {
|
|
230
215
|
...s,
|
|
231
216
|
valueGetter: (l) => {
|
|
232
|
-
var f,
|
|
233
|
-
const u = (
|
|
217
|
+
var f, c;
|
|
218
|
+
const u = (c = (f = l.data) == null ? void 0 : f.customFields) == null ? void 0 : c[n.fieldName];
|
|
234
219
|
return typeof u == "string" ? u : "";
|
|
235
220
|
},
|
|
236
221
|
filter: b,
|
|
@@ -240,14 +225,14 @@ function Je(e) {
|
|
|
240
225
|
};
|
|
241
226
|
});
|
|
242
227
|
}
|
|
243
|
-
function
|
|
228
|
+
function Qe(e, n = {}) {
|
|
244
229
|
const {
|
|
245
|
-
hideDetails:
|
|
246
|
-
getActionsCompact: s =
|
|
247
|
-
onRowAction:
|
|
230
|
+
hideDetails: d = !1,
|
|
231
|
+
getActionsCompact: s = Ke,
|
|
232
|
+
onRowAction: r,
|
|
248
233
|
identityHref: l,
|
|
249
234
|
customFields: u = []
|
|
250
|
-
} =
|
|
235
|
+
} = n, f = je(e, r), c = {
|
|
251
236
|
m: e("patientTable.gender.m"),
|
|
252
237
|
f: e("patientTable.gender.f"),
|
|
253
238
|
x: e("patientTable.gender.x")
|
|
@@ -272,7 +257,7 @@ function Ze(e, i = {}) {
|
|
|
272
257
|
headerName: a("avatar"),
|
|
273
258
|
headerClass: "sr-only-th",
|
|
274
259
|
pinned: "left",
|
|
275
|
-
cellRenderer:
|
|
260
|
+
cellRenderer: Te,
|
|
276
261
|
cellRendererParams: {
|
|
277
262
|
srcField: "avatarUrl",
|
|
278
263
|
fallbackField: "lastName",
|
|
@@ -320,7 +305,7 @@ function Ze(e, i = {}) {
|
|
|
320
305
|
href: l,
|
|
321
306
|
// When no detail href is supplied the cell renders a button; route its
|
|
322
307
|
// click through the same `show` row action.
|
|
323
|
-
onClick:
|
|
308
|
+
onClick: r ? (t) => r(
|
|
324
309
|
{ id: "show", label: e("patientTable.actions.show") },
|
|
325
310
|
t
|
|
326
311
|
) : void 0
|
|
@@ -340,8 +325,8 @@ function Ze(e, i = {}) {
|
|
|
340
325
|
responsiveTier: "P1",
|
|
341
326
|
// The primary phone number string (prefix + number).
|
|
342
327
|
valueGetter: (t) => {
|
|
343
|
-
var
|
|
344
|
-
return ((h = (
|
|
328
|
+
var i, o, h;
|
|
329
|
+
return ((h = (o = (i = t.data) == null ? void 0 : i.phoneNumbers) == null ? void 0 : o[0]) == null ? void 0 : h.number) ?? "";
|
|
345
330
|
},
|
|
346
331
|
filter: b,
|
|
347
332
|
floatingFilterComponent: p,
|
|
@@ -354,7 +339,7 @@ function Ze(e, i = {}) {
|
|
|
354
339
|
headerName: a("nextAppointment"),
|
|
355
340
|
responsiveTier: "P1",
|
|
356
341
|
field: "nextAppointment",
|
|
357
|
-
cellRenderer:
|
|
342
|
+
cellRenderer: ze,
|
|
358
343
|
filter: _,
|
|
359
344
|
floatingFilterComponent: L,
|
|
360
345
|
minWidth: 160,
|
|
@@ -367,7 +352,9 @@ function Ze(e, i = {}) {
|
|
|
367
352
|
responsiveTier: "P1",
|
|
368
353
|
field: "unpaidAmount",
|
|
369
354
|
type: "numericColumn",
|
|
370
|
-
|
|
355
|
+
// The kit's financial-state pill: `debt` while anything is owed, `settled` at zero.
|
|
356
|
+
cellRenderer: J,
|
|
357
|
+
cellRendererParams: { positiveState: "debt" },
|
|
371
358
|
filter: H,
|
|
372
359
|
floatingFilterComponent: U,
|
|
373
360
|
// Money is integer cents; the inRange filter compares cents directly.
|
|
@@ -384,7 +371,7 @@ function Ze(e, i = {}) {
|
|
|
384
371
|
// Emit `hide` ONLY when masking (never a literal `hide: false`). A static
|
|
385
372
|
// `hide: false` is re-applied by AG Grid on every `columnDefs` reconcile,
|
|
386
373
|
// clobbering a runtime hide from the ViewSwitcher / responsive hook.
|
|
387
|
-
hide:
|
|
374
|
+
hide: d || void 0,
|
|
388
375
|
filter: b,
|
|
389
376
|
floatingFilterComponent: p,
|
|
390
377
|
minWidth: 200,
|
|
@@ -396,7 +383,7 @@ function Ze(e, i = {}) {
|
|
|
396
383
|
headerName: a("carePlanStatus"),
|
|
397
384
|
responsiveTier: "P2",
|
|
398
385
|
field: "carePlanStatus",
|
|
399
|
-
cellRenderer:
|
|
386
|
+
cellRenderer: Ge,
|
|
400
387
|
filter: R,
|
|
401
388
|
floatingFilterComponent: F,
|
|
402
389
|
filterParams: {
|
|
@@ -436,8 +423,8 @@ function Ze(e, i = {}) {
|
|
|
436
423
|
// header + cell) is for ledger figures, not a 2-digit age. Sort stays
|
|
437
424
|
// numeric because the valueGetter returns a number.
|
|
438
425
|
valueGetter: (t) => {
|
|
439
|
-
var
|
|
440
|
-
return
|
|
426
|
+
var i;
|
|
427
|
+
return Ye((i = t.data) == null ? void 0 : i.dateOfBirth) ?? void 0;
|
|
441
428
|
},
|
|
442
429
|
filter: H,
|
|
443
430
|
floatingFilterComponent: U,
|
|
@@ -451,16 +438,16 @@ function Ze(e, i = {}) {
|
|
|
451
438
|
responsiveTier: "P3",
|
|
452
439
|
// Map the raw code to a localised label for both cell + set filter.
|
|
453
440
|
valueGetter: (t) => {
|
|
454
|
-
var
|
|
455
|
-
return (
|
|
441
|
+
var i;
|
|
442
|
+
return (i = t.data) != null && i.gender ? c[t.data.gender] : W;
|
|
456
443
|
},
|
|
457
444
|
filter: R,
|
|
458
445
|
floatingFilterComponent: F,
|
|
459
446
|
filterParams: {
|
|
460
447
|
options: [
|
|
461
|
-
{ value:
|
|
462
|
-
{ value:
|
|
463
|
-
{ value:
|
|
448
|
+
{ value: c.m, label: c.m },
|
|
449
|
+
{ value: c.f, label: c.f },
|
|
450
|
+
{ value: c.x, label: c.x }
|
|
464
451
|
]
|
|
465
452
|
},
|
|
466
453
|
minWidth: 110,
|
|
@@ -473,14 +460,14 @@ function Ze(e, i = {}) {
|
|
|
473
460
|
responsiveTier: "P3",
|
|
474
461
|
// TagListCellRenderer expects an array; wrap the resolved source string.
|
|
475
462
|
valueGetter: (t) => {
|
|
476
|
-
var
|
|
477
|
-
const
|
|
478
|
-
return
|
|
463
|
+
var o, h;
|
|
464
|
+
const i = ((o = t.data) == null ? void 0 : o.source) ?? ((h = t.data) == null ? void 0 : h.customSource);
|
|
465
|
+
return i ? [i] : [];
|
|
479
466
|
},
|
|
480
|
-
cellRenderer:
|
|
467
|
+
cellRenderer: ae,
|
|
481
468
|
filterValueGetter: (t) => {
|
|
482
|
-
var
|
|
483
|
-
return ((
|
|
469
|
+
var i, o;
|
|
470
|
+
return ((i = t.data) == null ? void 0 : i.source) ?? ((o = t.data) == null ? void 0 : o.customSource) ?? "";
|
|
484
471
|
},
|
|
485
472
|
filter: R,
|
|
486
473
|
floatingFilterComponent: F,
|
|
@@ -527,8 +514,8 @@ function Ze(e, i = {}) {
|
|
|
527
514
|
headerName: a("smsReminders"),
|
|
528
515
|
hide: !0,
|
|
529
516
|
valueGetter: (t) => {
|
|
530
|
-
var
|
|
531
|
-
return !!((
|
|
517
|
+
var i;
|
|
518
|
+
return !!((i = t.data) != null && i.smsReminderEligible);
|
|
532
519
|
},
|
|
533
520
|
valueFormatter: (t) => t.value === !0 ? B : W,
|
|
534
521
|
filter: R,
|
|
@@ -547,8 +534,8 @@ function Ze(e, i = {}) {
|
|
|
547
534
|
headerName: a("emailReminders"),
|
|
548
535
|
hide: !0,
|
|
549
536
|
valueGetter: (t) => {
|
|
550
|
-
var
|
|
551
|
-
return !!((
|
|
537
|
+
var i;
|
|
538
|
+
return !!((i = t.data) != null && i.emailReminderEligible);
|
|
552
539
|
},
|
|
553
540
|
valueFormatter: (t) => t.value === !0 ? B : W,
|
|
554
541
|
filter: R,
|
|
@@ -591,14 +578,15 @@ function Ze(e, i = {}) {
|
|
|
591
578
|
headerName: a("billableAmount"),
|
|
592
579
|
hide: !0,
|
|
593
580
|
type: "numericColumn",
|
|
594
|
-
|
|
595
|
-
//
|
|
596
|
-
//
|
|
597
|
-
//
|
|
598
|
-
|
|
599
|
-
|
|
581
|
+
field: "billableAmount",
|
|
582
|
+
// "Fatturabile" is the chip's own `to-invoice` state; `settled` at zero.
|
|
583
|
+
// Same shape as unpaidBalance: the cell value stays in cents and the
|
|
584
|
+
// renderer converts, so the inRange filter compares cents directly.
|
|
585
|
+
cellRenderer: J,
|
|
586
|
+
cellRendererParams: { positiveState: "to-invoice" },
|
|
600
587
|
filter: H,
|
|
601
588
|
floatingFilterComponent: U,
|
|
589
|
+
filterParams: { defaultOperator: "inRange", min: 0 },
|
|
602
590
|
minWidth: 140,
|
|
603
591
|
width: 160
|
|
604
592
|
},
|
|
@@ -641,13 +629,13 @@ function Ze(e, i = {}) {
|
|
|
641
629
|
hide: !0,
|
|
642
630
|
cellRenderer: Ie,
|
|
643
631
|
valueGetter: (t) => {
|
|
644
|
-
var
|
|
645
|
-
return (
|
|
632
|
+
var i;
|
|
633
|
+
return (i = t.data) != null && i.personalAssistant ? { name: t.data.personalAssistant } : null;
|
|
646
634
|
},
|
|
647
|
-
comparator: (t,
|
|
635
|
+
comparator: (t, i) => ((t == null ? void 0 : t.name) ?? "").localeCompare((i == null ? void 0 : i.name) ?? ""),
|
|
648
636
|
filterValueGetter: (t) => {
|
|
649
|
-
var
|
|
650
|
-
return ((
|
|
637
|
+
var i;
|
|
638
|
+
return ((i = t.data) == null ? void 0 : i.personalAssistant) ?? "";
|
|
651
639
|
},
|
|
652
640
|
filter: Re,
|
|
653
641
|
floatingFilterComponent: Fe,
|
|
@@ -669,13 +657,13 @@ function Ze(e, i = {}) {
|
|
|
669
657
|
colId: "marketingConsent",
|
|
670
658
|
headerName: a("marketingConsent"),
|
|
671
659
|
hide: !0,
|
|
672
|
-
cellRenderer:
|
|
660
|
+
cellRenderer: Pe,
|
|
673
661
|
cellRendererParams: {
|
|
674
662
|
variantMap: C
|
|
675
663
|
},
|
|
676
664
|
valueGetter: (t) => {
|
|
677
|
-
var
|
|
678
|
-
switch ((
|
|
665
|
+
var i;
|
|
666
|
+
switch ((i = t.data) == null ? void 0 : i.marketingConsent) {
|
|
679
667
|
case 1:
|
|
680
668
|
return m.yes;
|
|
681
669
|
case 0:
|
|
@@ -707,8 +695,8 @@ function Ze(e, i = {}) {
|
|
|
707
695
|
// `YYYY/N` yearly numbering.
|
|
708
696
|
valueGetter: (t) => {
|
|
709
697
|
var h, v;
|
|
710
|
-
const
|
|
711
|
-
return
|
|
698
|
+
const i = (h = t.data) == null ? void 0 : h.yearlyNumberingYear, o = (v = t.data) == null ? void 0 : v.yearlyNumberingNumber;
|
|
699
|
+
return i != null && o != null ? `${i}/${o}` : "";
|
|
712
700
|
},
|
|
713
701
|
filter: b,
|
|
714
702
|
floatingFilterComponent: p,
|
|
@@ -720,8 +708,8 @@ function Ze(e, i = {}) {
|
|
|
720
708
|
headerName: a("portal"),
|
|
721
709
|
hide: !0,
|
|
722
710
|
valueGetter: (t) => {
|
|
723
|
-
var
|
|
724
|
-
return !!((
|
|
711
|
+
var i;
|
|
712
|
+
return !!((i = t.data) != null && i.mydentista);
|
|
725
713
|
},
|
|
726
714
|
valueFormatter: (t) => t.value === !0 ? B : W,
|
|
727
715
|
filter: R,
|
|
@@ -799,7 +787,7 @@ function Ze(e, i = {}) {
|
|
|
799
787
|
width: 220
|
|
800
788
|
},
|
|
801
789
|
/* ── Custom fields (per-practice, dynamic) — appended, hidden ──── */
|
|
802
|
-
...
|
|
790
|
+
...qe(u),
|
|
803
791
|
/* ── Actions (P0, pinned-end) ──────────────────────────────────── */
|
|
804
792
|
{
|
|
805
793
|
colId: "actions",
|
|
@@ -815,7 +803,7 @@ function Ze(e, i = {}) {
|
|
|
815
803
|
// other column — no right-aligned header (the actions still sit at the
|
|
816
804
|
// pinned inline-end edge, the group just starts at the cell's leading edge).
|
|
817
805
|
cellClass: "ds:justify-start ag-cell-graphic",
|
|
818
|
-
cellRenderer:
|
|
806
|
+
cellRenderer: ge,
|
|
819
807
|
cellRendererParams: {
|
|
820
808
|
actions: f,
|
|
821
809
|
intent: "ghost",
|
|
@@ -829,119 +817,119 @@ function Ze(e, i = {}) {
|
|
|
829
817
|
// The renderer collapses to a single overflow trigger via
|
|
830
818
|
// `getActionsCompact`; the expanded width is DERIVED from the action count
|
|
831
819
|
// so a row showing every action can't clip — 88px collapsed → fits-all.
|
|
832
|
-
width:
|
|
820
|
+
width: ie(f.length),
|
|
833
821
|
minWidth: 88
|
|
834
822
|
// Anchor — never auto-hidden (no tier).
|
|
835
823
|
}
|
|
836
824
|
];
|
|
837
825
|
}
|
|
838
|
-
const
|
|
826
|
+
const Xe = [
|
|
839
827
|
{ minWidth: 0, tier: "P0" },
|
|
840
828
|
{ minWidth: 640, tier: "P1" },
|
|
841
829
|
{ minWidth: 900, tier: "P2" },
|
|
842
830
|
{ minWidth: 1200, tier: "P3" }
|
|
843
831
|
];
|
|
844
|
-
function
|
|
845
|
-
const
|
|
846
|
-
for (const s of
|
|
847
|
-
e >= s.minWidth &&
|
|
848
|
-
return
|
|
832
|
+
function ee(e, n) {
|
|
833
|
+
const d = /* @__PURE__ */ new Set();
|
|
834
|
+
for (const s of n)
|
|
835
|
+
e >= s.minWidth && d.add(s.tier);
|
|
836
|
+
return d.add("P0"), d;
|
|
849
837
|
}
|
|
850
|
-
function
|
|
838
|
+
function Je(e, n) {
|
|
851
839
|
const {
|
|
852
|
-
containerRef:
|
|
840
|
+
containerRef: d,
|
|
853
841
|
enabled: s = !0,
|
|
854
|
-
breakpoints:
|
|
855
|
-
} =
|
|
856
|
-
return
|
|
857
|
-
const
|
|
858
|
-
if (!s || !
|
|
842
|
+
breakpoints: r = Xe
|
|
843
|
+
} = n, l = k(/* @__PURE__ */ new Set()), u = k(!1);
|
|
844
|
+
return te(() => {
|
|
845
|
+
const c = d.current;
|
|
846
|
+
if (!s || !c) return;
|
|
859
847
|
const m = () => {
|
|
860
|
-
var
|
|
861
|
-
return (
|
|
862
|
-
}, C = (
|
|
863
|
-
if (u.current ||
|
|
864
|
-
const h =
|
|
848
|
+
var o;
|
|
849
|
+
return (o = e.current) == null ? void 0 : o.getRawApi();
|
|
850
|
+
}, C = (o) => {
|
|
851
|
+
if (u.current || o.source === "api") return;
|
|
852
|
+
const h = o.columns ?? (o.column ? [o.column] : []);
|
|
865
853
|
for (const v of h)
|
|
866
854
|
l.current.add(v.getColId());
|
|
867
855
|
};
|
|
868
856
|
let a = !1;
|
|
869
|
-
const
|
|
857
|
+
const T = (o) => {
|
|
870
858
|
if (a) return;
|
|
871
859
|
a = !0;
|
|
872
|
-
const h =
|
|
860
|
+
const h = o.getColumns(), v = c.getBoundingClientRect().width, D = ee(v, r);
|
|
873
861
|
if (h)
|
|
874
|
-
for (const
|
|
875
|
-
const I = q(
|
|
876
|
-
I && !
|
|
862
|
+
for (const w of h) {
|
|
863
|
+
const I = q(w.getColDef());
|
|
864
|
+
I && !w.isVisible() && D.has(I) && l.current.add(w.getColId());
|
|
877
865
|
}
|
|
878
|
-
|
|
866
|
+
o.addEventListener("columnVisible", C);
|
|
879
867
|
}, t = () => {
|
|
880
|
-
const
|
|
881
|
-
if (!
|
|
882
|
-
|
|
883
|
-
const h =
|
|
868
|
+
const o = m();
|
|
869
|
+
if (!o) return;
|
|
870
|
+
T(o);
|
|
871
|
+
const h = o.getColumns();
|
|
884
872
|
if (!h) return;
|
|
885
|
-
const v =
|
|
873
|
+
const v = c.getBoundingClientRect().width, D = ee(v, r), w = [], I = [];
|
|
886
874
|
for (const S of h) {
|
|
887
875
|
const V = S.getColId();
|
|
888
876
|
if (l.current.has(V)) continue;
|
|
889
877
|
const A = q(S.getColDef());
|
|
890
878
|
if (!A) continue;
|
|
891
879
|
const E = D.has(A);
|
|
892
|
-
E && !S.isVisible() ?
|
|
880
|
+
E && !S.isVisible() ? w.push(S) : !E && S.isVisible() && I.push(S);
|
|
893
881
|
}
|
|
894
|
-
if (!(
|
|
882
|
+
if (!(w.length === 0 && I.length === 0)) {
|
|
895
883
|
u.current = !0;
|
|
896
884
|
try {
|
|
897
|
-
|
|
885
|
+
w.length > 0 && o.setColumnsVisible(w, !0), I.length > 0 && o.setColumnsVisible(I, !1);
|
|
898
886
|
} finally {
|
|
899
887
|
u.current = !1;
|
|
900
888
|
}
|
|
901
889
|
}
|
|
902
|
-
},
|
|
903
|
-
return
|
|
904
|
-
var
|
|
905
|
-
|
|
890
|
+
}, i = new ResizeObserver(() => t());
|
|
891
|
+
return i.observe(c), t(), () => {
|
|
892
|
+
var o;
|
|
893
|
+
i.disconnect(), (o = m()) == null || o.removeEventListener("columnVisible", C);
|
|
906
894
|
};
|
|
907
|
-
}, [
|
|
908
|
-
for (const m of
|
|
895
|
+
}, [d, s, r, e]), { lockColumns: z((c) => {
|
|
896
|
+
for (const m of c) l.current.add(m);
|
|
909
897
|
}, []) };
|
|
910
898
|
}
|
|
911
|
-
function
|
|
912
|
-
var
|
|
913
|
-
return (
|
|
899
|
+
function Ze(e) {
|
|
900
|
+
var n;
|
|
901
|
+
return (n = e.data) != null && n.isArchived ? "data-table-row-archived" : void 0;
|
|
914
902
|
}
|
|
915
|
-
function
|
|
903
|
+
function et(e) {
|
|
916
904
|
return e.data.id;
|
|
917
905
|
}
|
|
918
|
-
function
|
|
906
|
+
function tt({
|
|
919
907
|
views: e,
|
|
920
|
-
handleRef:
|
|
921
|
-
lockColumns:
|
|
908
|
+
handleRef: n,
|
|
909
|
+
lockColumns: d,
|
|
922
910
|
label: s
|
|
923
911
|
}) {
|
|
924
|
-
const [
|
|
912
|
+
const [r, l] = ne(""), u = Y(
|
|
925
913
|
() => e.map((m) => ({ value: m.id, label: m.label })),
|
|
926
914
|
[e]
|
|
927
915
|
), f = z(
|
|
928
916
|
(m) => {
|
|
929
|
-
const C = e.find((t) => t.id === m), a =
|
|
917
|
+
const C = e.find((t) => t.id === m), a = n.current;
|
|
930
918
|
if (!C || !a) return;
|
|
931
|
-
const
|
|
932
|
-
if (
|
|
933
|
-
const t = new Set(C.columns),
|
|
934
|
-
for (const h of
|
|
919
|
+
const T = a.getRawApi();
|
|
920
|
+
if (T) {
|
|
921
|
+
const t = new Set(C.columns), i = [], o = [];
|
|
922
|
+
for (const h of T.getColumns() ?? []) {
|
|
935
923
|
if (q(h.getColDef()) === void 0) continue;
|
|
936
924
|
const v = h.getColId();
|
|
937
|
-
t.has(v) ?
|
|
925
|
+
t.has(v) ? i.push(v) : o.push(v);
|
|
938
926
|
}
|
|
939
|
-
|
|
927
|
+
d([...i, ...o]), i.length > 0 && T.setColumnsVisible(i, !0), o.length > 0 && T.setColumnsVisible(o, !1);
|
|
940
928
|
}
|
|
941
|
-
a.setFilter(C.filterModel), a.setSort(C.sortModel),
|
|
929
|
+
a.setFilter(C.filterModel), a.setSort(C.sortModel), T == null || T.onFilterChanged();
|
|
942
930
|
},
|
|
943
|
-
[e,
|
|
944
|
-
),
|
|
931
|
+
[e, n, d]
|
|
932
|
+
), c = z(
|
|
945
933
|
(m) => {
|
|
946
934
|
l(m), m && f(m);
|
|
947
935
|
},
|
|
@@ -952,63 +940,63 @@ function at({
|
|
|
952
940
|
// the Select's intrinsic `w-full` trigger sizes to a compact, legible width
|
|
953
941
|
// instead of absorbing the whole FilterBar row.
|
|
954
942
|
/* @__PURE__ */ g("div", { className: "ds:w-[12rem] ds:max-w-full ds:min-w-0 ds:shrink-0", children: /* @__PURE__ */ g(
|
|
955
|
-
|
|
943
|
+
ve,
|
|
956
944
|
{
|
|
957
945
|
options: u,
|
|
958
|
-
value:
|
|
959
|
-
onValueChange:
|
|
946
|
+
value: r,
|
|
947
|
+
onValueChange: c,
|
|
960
948
|
size: "sm",
|
|
961
949
|
"aria-label": s
|
|
962
950
|
}
|
|
963
951
|
) })
|
|
964
952
|
);
|
|
965
953
|
}
|
|
966
|
-
const
|
|
954
|
+
const nt = pe(
|
|
967
955
|
function({
|
|
968
|
-
rowData:
|
|
969
|
-
columns:
|
|
956
|
+
rowData: n,
|
|
957
|
+
columns: d,
|
|
970
958
|
gridId: s,
|
|
971
|
-
density:
|
|
959
|
+
density: r,
|
|
972
960
|
actionsCompact: l,
|
|
973
961
|
heightClass: u,
|
|
974
962
|
responsive: f = !0,
|
|
975
|
-
views:
|
|
963
|
+
views: c,
|
|
976
964
|
onRowAction: m,
|
|
977
965
|
bulkActions: C,
|
|
978
966
|
loading: a = !1,
|
|
979
|
-
toolbar:
|
|
967
|
+
toolbar: T,
|
|
980
968
|
hideQuickSearch: t = !1,
|
|
981
|
-
pagination:
|
|
982
|
-
paginationPageSizeSelector:
|
|
969
|
+
pagination: i = !1,
|
|
970
|
+
paginationPageSizeSelector: o,
|
|
983
971
|
hideDetails: h = !1,
|
|
984
972
|
identityHref: v,
|
|
985
973
|
customFields: D,
|
|
986
|
-
"aria-label":
|
|
974
|
+
"aria-label": w,
|
|
987
975
|
className: I
|
|
988
976
|
}, S) {
|
|
989
|
-
const { t: V } = $("ui"), A = k(null), E = k(null), [M,
|
|
990
|
-
|
|
977
|
+
const { t: V } = $("ui"), A = k(null), E = k(null), [M, re] = ne(null);
|
|
978
|
+
be(
|
|
991
979
|
S,
|
|
992
980
|
() => M ?? A.current,
|
|
993
981
|
[M]
|
|
994
982
|
);
|
|
995
|
-
const { lockColumns:
|
|
983
|
+
const { lockColumns: oe } = Je(A, {
|
|
996
984
|
containerRef: E,
|
|
997
985
|
enabled: f
|
|
998
|
-
}), G = l ??
|
|
999
|
-
|
|
1000
|
-
var
|
|
986
|
+
}), G = l ?? r === "compact", Q = k(G), X = z(() => Q.current, []);
|
|
987
|
+
te(() => {
|
|
988
|
+
var P;
|
|
1001
989
|
Q.current = G;
|
|
1002
|
-
const N = (
|
|
990
|
+
const N = (P = A.current) == null ? void 0 : P.getRawApi();
|
|
1003
991
|
N && (N.setColumnWidths([
|
|
1004
992
|
{
|
|
1005
993
|
key: "actions",
|
|
1006
|
-
newWidth: G ? 88 :
|
|
994
|
+
newWidth: G ? 88 : ie($e)
|
|
1007
995
|
}
|
|
1008
996
|
]), N.refreshCells({ force: !0 }));
|
|
1009
997
|
}, [G, M]);
|
|
1010
|
-
const
|
|
1011
|
-
() =>
|
|
998
|
+
const se = Y(
|
|
999
|
+
() => d ?? Qe(V, {
|
|
1012
1000
|
hideDetails: h,
|
|
1013
1001
|
onRowAction: m,
|
|
1014
1002
|
identityHref: v,
|
|
@@ -1016,7 +1004,7 @@ const lt = he(
|
|
|
1016
1004
|
getActionsCompact: X
|
|
1017
1005
|
}),
|
|
1018
1006
|
[
|
|
1019
|
-
|
|
1007
|
+
d,
|
|
1020
1008
|
V,
|
|
1021
1009
|
h,
|
|
1022
1010
|
m,
|
|
@@ -1024,40 +1012,40 @@ const lt = he(
|
|
|
1024
1012
|
D,
|
|
1025
1013
|
X
|
|
1026
1014
|
]
|
|
1027
|
-
),
|
|
1028
|
-
/* @__PURE__ */ O(
|
|
1029
|
-
|
|
1030
|
-
|
|
1015
|
+
), de = ((c == null ? void 0 : c.length) ?? 0) > 0, ce = /* @__PURE__ */ O(y.Toolbar, { children: [
|
|
1016
|
+
/* @__PURE__ */ O(y.Toolbar.FilterBar, { children: [
|
|
1017
|
+
de && c ? /* @__PURE__ */ g(
|
|
1018
|
+
tt,
|
|
1031
1019
|
{
|
|
1032
|
-
views:
|
|
1020
|
+
views: c,
|
|
1033
1021
|
handleRef: A,
|
|
1034
|
-
lockColumns:
|
|
1022
|
+
lockColumns: oe,
|
|
1035
1023
|
label: V("patientTable.views.label")
|
|
1036
1024
|
}
|
|
1037
1025
|
) : null,
|
|
1038
|
-
t ? null : /* @__PURE__ */ g(
|
|
1039
|
-
/* @__PURE__ */ g(
|
|
1026
|
+
t ? null : /* @__PURE__ */ g(y.Toolbar.QuickSearch, {}),
|
|
1027
|
+
/* @__PURE__ */ g(y.Toolbar.FilterChips, {})
|
|
1040
1028
|
] }),
|
|
1041
|
-
/* @__PURE__ */ O(
|
|
1029
|
+
/* @__PURE__ */ O(y.Toolbar.Actions, { children: [
|
|
1042
1030
|
C == null ? void 0 : C.map((N) => /* @__PURE__ */ g(
|
|
1043
|
-
|
|
1031
|
+
y.Toolbar.BulkAction,
|
|
1044
1032
|
{
|
|
1045
1033
|
label: N.label,
|
|
1046
1034
|
icon: N.icon,
|
|
1047
1035
|
variant: N.variant,
|
|
1048
|
-
onClick: (
|
|
1049
|
-
const
|
|
1050
|
-
N.onSelect(
|
|
1036
|
+
onClick: (P) => {
|
|
1037
|
+
const he = (P == null ? void 0 : P.getSelectedNodes().map((j) => j.id).filter((j) => j != null)) ?? [];
|
|
1038
|
+
N.onSelect(he);
|
|
1051
1039
|
}
|
|
1052
1040
|
},
|
|
1053
1041
|
N.id
|
|
1054
1042
|
)),
|
|
1055
|
-
/* @__PURE__ */ g(
|
|
1056
|
-
/* @__PURE__ */ g(
|
|
1043
|
+
/* @__PURE__ */ g(y.Toolbar.ColumnToggle, {}),
|
|
1044
|
+
/* @__PURE__ */ g(y.Toolbar.ExportMenu, {})
|
|
1057
1045
|
] })
|
|
1058
|
-
] }),
|
|
1059
|
-
return
|
|
1060
|
-
|
|
1046
|
+
] }), ue = T ?? ce, me = a ? void 0 : n, fe = Y(() => ({ getRowId: et }), []);
|
|
1047
|
+
return Ne(
|
|
1048
|
+
Ce,
|
|
1061
1049
|
M,
|
|
1062
1050
|
s
|
|
1063
1051
|
), /* @__PURE__ */ g(
|
|
@@ -1065,45 +1053,68 @@ const lt = he(
|
|
|
1065
1053
|
{
|
|
1066
1054
|
ref: E,
|
|
1067
1055
|
role: "region",
|
|
1068
|
-
"aria-label":
|
|
1056
|
+
"aria-label": w ?? V("patientTable.regionLabel"),
|
|
1069
1057
|
"data-component": "patient-table",
|
|
1070
1058
|
"data-component-id": s,
|
|
1071
1059
|
className: "ds:flex ds:w-full ds:min-h-0 ds:flex-1 ds:flex-col",
|
|
1072
1060
|
children: /* @__PURE__ */ g(
|
|
1073
|
-
|
|
1061
|
+
y,
|
|
1074
1062
|
{
|
|
1075
1063
|
ref: (N) => {
|
|
1076
|
-
A.current = N,
|
|
1077
|
-
(
|
|
1064
|
+
A.current = N, re(
|
|
1065
|
+
(P) => P === N ? P : N
|
|
1078
1066
|
);
|
|
1079
1067
|
},
|
|
1080
1068
|
gridId: s,
|
|
1081
|
-
columnDefs:
|
|
1082
|
-
rowData:
|
|
1069
|
+
columnDefs: se,
|
|
1070
|
+
rowData: me,
|
|
1083
1071
|
rowSelection: "multiple",
|
|
1084
|
-
pagination:
|
|
1072
|
+
pagination: i,
|
|
1085
1073
|
...u !== void 0 ? { heightClass: u } : {},
|
|
1086
|
-
...
|
|
1087
|
-
density:
|
|
1088
|
-
getRowClass:
|
|
1089
|
-
gridOptions:
|
|
1074
|
+
...o !== void 0 ? { paginationPageSizeSelector: o } : {},
|
|
1075
|
+
density: r,
|
|
1076
|
+
getRowClass: Ze,
|
|
1077
|
+
gridOptions: fe,
|
|
1090
1078
|
className: I,
|
|
1091
|
-
children:
|
|
1079
|
+
children: ue
|
|
1092
1080
|
}
|
|
1093
1081
|
)
|
|
1094
1082
|
}
|
|
1095
1083
|
);
|
|
1096
1084
|
}
|
|
1097
1085
|
);
|
|
1098
|
-
|
|
1086
|
+
nt.displayName = "PatientTable";
|
|
1087
|
+
const it = 5e4;
|
|
1088
|
+
function at(e) {
|
|
1089
|
+
return e === 0 ? { variant: "success", statusKey: "settled" } : e <= it ? { variant: "warning", statusKey: "pending" } : { variant: "error", statusKey: "overdue" };
|
|
1090
|
+
}
|
|
1091
|
+
function lt(e) {
|
|
1092
|
+
if (e == null || e === "") return null;
|
|
1093
|
+
const n = typeof e == "number" ? e : Number(e);
|
|
1094
|
+
return Number.isFinite(n) ? n : null;
|
|
1095
|
+
}
|
|
1096
|
+
function Rt(e) {
|
|
1097
|
+
const { value: n, currency: d = "EUR", options: s } = e, { t: r, i18n: l } = $("ui"), u = lt(n);
|
|
1098
|
+
if (u === null) return null;
|
|
1099
|
+
const f = l.language || "en", c = new Intl.NumberFormat(f, {
|
|
1100
|
+
style: "currency",
|
|
1101
|
+
currency: d,
|
|
1102
|
+
...s
|
|
1103
|
+
}).format(u / 100), { variant: m, statusKey: C } = at(u), a = r(`patientTable.balance.status.${C}`);
|
|
1104
|
+
return /* @__PURE__ */ O(le, { variant: m, withDot: !0, size: "sm", className: "ds:tabular-nums", children: [
|
|
1105
|
+
/* @__PURE__ */ g("span", { children: c }),
|
|
1106
|
+
/* @__PURE__ */ g("span", { className: "ds:sr-only", children: a })
|
|
1107
|
+
] });
|
|
1108
|
+
}
|
|
1099
1109
|
export {
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1110
|
+
Rt as B,
|
|
1111
|
+
Ge as C,
|
|
1112
|
+
ze as N,
|
|
1113
|
+
$e as P,
|
|
1114
|
+
J as T,
|
|
1115
|
+
nt as a,
|
|
1116
|
+
Qe as b,
|
|
1106
1117
|
q as g,
|
|
1107
|
-
|
|
1118
|
+
Je as u
|
|
1108
1119
|
};
|
|
1109
|
-
//# sourceMappingURL=
|
|
1120
|
+
//# sourceMappingURL=balance-badge-cell-DHTiSFyD.js.map
|