@alfadocs/ui-kit 1.9.2 → 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-6XnaWimB.js → balance-badge-cell-DHTiSFyD.js} +283 -271
- 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-BqO66pIA.js → link-cell-renderer-Cp2MSlJl.js} +235 -257
- 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 +2 -2
- 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",
|
|
@@ -282,6 +267,7 @@ function Ze(e, i = {}) {
|
|
|
282
267
|
sortable: !1,
|
|
283
268
|
filter: !1,
|
|
284
269
|
resizable: !1,
|
|
270
|
+
cellClass: "ag-cell-graphic",
|
|
285
271
|
// Hug the 32px (size="sm") avatar + cell padding — a tight fixed column,
|
|
286
272
|
// not a wide empty one. width === minWidth === maxWidth pins it to size so
|
|
287
273
|
// the pinned group can't stretch it (pinned columns never flex).
|
|
@@ -319,7 +305,7 @@ function Ze(e, i = {}) {
|
|
|
319
305
|
href: l,
|
|
320
306
|
// When no detail href is supplied the cell renders a button; route its
|
|
321
307
|
// click through the same `show` row action.
|
|
322
|
-
onClick:
|
|
308
|
+
onClick: r ? (t) => r(
|
|
323
309
|
{ id: "show", label: e("patientTable.actions.show") },
|
|
324
310
|
t
|
|
325
311
|
) : void 0
|
|
@@ -339,8 +325,8 @@ function Ze(e, i = {}) {
|
|
|
339
325
|
responsiveTier: "P1",
|
|
340
326
|
// The primary phone number string (prefix + number).
|
|
341
327
|
valueGetter: (t) => {
|
|
342
|
-
var
|
|
343
|
-
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) ?? "";
|
|
344
330
|
},
|
|
345
331
|
filter: b,
|
|
346
332
|
floatingFilterComponent: p,
|
|
@@ -353,7 +339,7 @@ function Ze(e, i = {}) {
|
|
|
353
339
|
headerName: a("nextAppointment"),
|
|
354
340
|
responsiveTier: "P1",
|
|
355
341
|
field: "nextAppointment",
|
|
356
|
-
cellRenderer:
|
|
342
|
+
cellRenderer: ze,
|
|
357
343
|
filter: _,
|
|
358
344
|
floatingFilterComponent: L,
|
|
359
345
|
minWidth: 160,
|
|
@@ -366,7 +352,9 @@ function Ze(e, i = {}) {
|
|
|
366
352
|
responsiveTier: "P1",
|
|
367
353
|
field: "unpaidAmount",
|
|
368
354
|
type: "numericColumn",
|
|
369
|
-
|
|
355
|
+
// The kit's financial-state pill: `debt` while anything is owed, `settled` at zero.
|
|
356
|
+
cellRenderer: J,
|
|
357
|
+
cellRendererParams: { positiveState: "debt" },
|
|
370
358
|
filter: H,
|
|
371
359
|
floatingFilterComponent: U,
|
|
372
360
|
// Money is integer cents; the inRange filter compares cents directly.
|
|
@@ -383,7 +371,7 @@ function Ze(e, i = {}) {
|
|
|
383
371
|
// Emit `hide` ONLY when masking (never a literal `hide: false`). A static
|
|
384
372
|
// `hide: false` is re-applied by AG Grid on every `columnDefs` reconcile,
|
|
385
373
|
// clobbering a runtime hide from the ViewSwitcher / responsive hook.
|
|
386
|
-
hide:
|
|
374
|
+
hide: d || void 0,
|
|
387
375
|
filter: b,
|
|
388
376
|
floatingFilterComponent: p,
|
|
389
377
|
minWidth: 200,
|
|
@@ -395,7 +383,7 @@ function Ze(e, i = {}) {
|
|
|
395
383
|
headerName: a("carePlanStatus"),
|
|
396
384
|
responsiveTier: "P2",
|
|
397
385
|
field: "carePlanStatus",
|
|
398
|
-
cellRenderer:
|
|
386
|
+
cellRenderer: Ge,
|
|
399
387
|
filter: R,
|
|
400
388
|
floatingFilterComponent: F,
|
|
401
389
|
filterParams: {
|
|
@@ -435,8 +423,8 @@ function Ze(e, i = {}) {
|
|
|
435
423
|
// header + cell) is for ledger figures, not a 2-digit age. Sort stays
|
|
436
424
|
// numeric because the valueGetter returns a number.
|
|
437
425
|
valueGetter: (t) => {
|
|
438
|
-
var
|
|
439
|
-
return
|
|
426
|
+
var i;
|
|
427
|
+
return Ye((i = t.data) == null ? void 0 : i.dateOfBirth) ?? void 0;
|
|
440
428
|
},
|
|
441
429
|
filter: H,
|
|
442
430
|
floatingFilterComponent: U,
|
|
@@ -450,16 +438,16 @@ function Ze(e, i = {}) {
|
|
|
450
438
|
responsiveTier: "P3",
|
|
451
439
|
// Map the raw code to a localised label for both cell + set filter.
|
|
452
440
|
valueGetter: (t) => {
|
|
453
|
-
var
|
|
454
|
-
return (
|
|
441
|
+
var i;
|
|
442
|
+
return (i = t.data) != null && i.gender ? c[t.data.gender] : W;
|
|
455
443
|
},
|
|
456
444
|
filter: R,
|
|
457
445
|
floatingFilterComponent: F,
|
|
458
446
|
filterParams: {
|
|
459
447
|
options: [
|
|
460
|
-
{ value:
|
|
461
|
-
{ value:
|
|
462
|
-
{ value:
|
|
448
|
+
{ value: c.m, label: c.m },
|
|
449
|
+
{ value: c.f, label: c.f },
|
|
450
|
+
{ value: c.x, label: c.x }
|
|
463
451
|
]
|
|
464
452
|
},
|
|
465
453
|
minWidth: 110,
|
|
@@ -472,14 +460,14 @@ function Ze(e, i = {}) {
|
|
|
472
460
|
responsiveTier: "P3",
|
|
473
461
|
// TagListCellRenderer expects an array; wrap the resolved source string.
|
|
474
462
|
valueGetter: (t) => {
|
|
475
|
-
var
|
|
476
|
-
const
|
|
477
|
-
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] : [];
|
|
478
466
|
},
|
|
479
|
-
cellRenderer:
|
|
467
|
+
cellRenderer: ae,
|
|
480
468
|
filterValueGetter: (t) => {
|
|
481
|
-
var
|
|
482
|
-
return ((
|
|
469
|
+
var i, o;
|
|
470
|
+
return ((i = t.data) == null ? void 0 : i.source) ?? ((o = t.data) == null ? void 0 : o.customSource) ?? "";
|
|
483
471
|
},
|
|
484
472
|
filter: R,
|
|
485
473
|
floatingFilterComponent: F,
|
|
@@ -526,8 +514,8 @@ function Ze(e, i = {}) {
|
|
|
526
514
|
headerName: a("smsReminders"),
|
|
527
515
|
hide: !0,
|
|
528
516
|
valueGetter: (t) => {
|
|
529
|
-
var
|
|
530
|
-
return !!((
|
|
517
|
+
var i;
|
|
518
|
+
return !!((i = t.data) != null && i.smsReminderEligible);
|
|
531
519
|
},
|
|
532
520
|
valueFormatter: (t) => t.value === !0 ? B : W,
|
|
533
521
|
filter: R,
|
|
@@ -546,8 +534,8 @@ function Ze(e, i = {}) {
|
|
|
546
534
|
headerName: a("emailReminders"),
|
|
547
535
|
hide: !0,
|
|
548
536
|
valueGetter: (t) => {
|
|
549
|
-
var
|
|
550
|
-
return !!((
|
|
537
|
+
var i;
|
|
538
|
+
return !!((i = t.data) != null && i.emailReminderEligible);
|
|
551
539
|
},
|
|
552
540
|
valueFormatter: (t) => t.value === !0 ? B : W,
|
|
553
541
|
filter: R,
|
|
@@ -590,14 +578,15 @@ function Ze(e, i = {}) {
|
|
|
590
578
|
headerName: a("billableAmount"),
|
|
591
579
|
hide: !0,
|
|
592
580
|
type: "numericColumn",
|
|
593
|
-
|
|
594
|
-
//
|
|
595
|
-
//
|
|
596
|
-
//
|
|
597
|
-
|
|
598
|
-
|
|
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" },
|
|
599
587
|
filter: H,
|
|
600
588
|
floatingFilterComponent: U,
|
|
589
|
+
filterParams: { defaultOperator: "inRange", min: 0 },
|
|
601
590
|
minWidth: 140,
|
|
602
591
|
width: 160
|
|
603
592
|
},
|
|
@@ -640,13 +629,13 @@ function Ze(e, i = {}) {
|
|
|
640
629
|
hide: !0,
|
|
641
630
|
cellRenderer: Ie,
|
|
642
631
|
valueGetter: (t) => {
|
|
643
|
-
var
|
|
644
|
-
return (
|
|
632
|
+
var i;
|
|
633
|
+
return (i = t.data) != null && i.personalAssistant ? { name: t.data.personalAssistant } : null;
|
|
645
634
|
},
|
|
646
|
-
comparator: (t,
|
|
635
|
+
comparator: (t, i) => ((t == null ? void 0 : t.name) ?? "").localeCompare((i == null ? void 0 : i.name) ?? ""),
|
|
647
636
|
filterValueGetter: (t) => {
|
|
648
|
-
var
|
|
649
|
-
return ((
|
|
637
|
+
var i;
|
|
638
|
+
return ((i = t.data) == null ? void 0 : i.personalAssistant) ?? "";
|
|
650
639
|
},
|
|
651
640
|
filter: Re,
|
|
652
641
|
floatingFilterComponent: Fe,
|
|
@@ -668,13 +657,13 @@ function Ze(e, i = {}) {
|
|
|
668
657
|
colId: "marketingConsent",
|
|
669
658
|
headerName: a("marketingConsent"),
|
|
670
659
|
hide: !0,
|
|
671
|
-
cellRenderer:
|
|
660
|
+
cellRenderer: Pe,
|
|
672
661
|
cellRendererParams: {
|
|
673
662
|
variantMap: C
|
|
674
663
|
},
|
|
675
664
|
valueGetter: (t) => {
|
|
676
|
-
var
|
|
677
|
-
switch ((
|
|
665
|
+
var i;
|
|
666
|
+
switch ((i = t.data) == null ? void 0 : i.marketingConsent) {
|
|
678
667
|
case 1:
|
|
679
668
|
return m.yes;
|
|
680
669
|
case 0:
|
|
@@ -706,8 +695,8 @@ function Ze(e, i = {}) {
|
|
|
706
695
|
// `YYYY/N` yearly numbering.
|
|
707
696
|
valueGetter: (t) => {
|
|
708
697
|
var h, v;
|
|
709
|
-
const
|
|
710
|
-
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}` : "";
|
|
711
700
|
},
|
|
712
701
|
filter: b,
|
|
713
702
|
floatingFilterComponent: p,
|
|
@@ -719,8 +708,8 @@ function Ze(e, i = {}) {
|
|
|
719
708
|
headerName: a("portal"),
|
|
720
709
|
hide: !0,
|
|
721
710
|
valueGetter: (t) => {
|
|
722
|
-
var
|
|
723
|
-
return !!((
|
|
711
|
+
var i;
|
|
712
|
+
return !!((i = t.data) != null && i.mydentista);
|
|
724
713
|
},
|
|
725
714
|
valueFormatter: (t) => t.value === !0 ? B : W,
|
|
726
715
|
filter: R,
|
|
@@ -798,7 +787,7 @@ function Ze(e, i = {}) {
|
|
|
798
787
|
width: 220
|
|
799
788
|
},
|
|
800
789
|
/* ── Custom fields (per-practice, dynamic) — appended, hidden ──── */
|
|
801
|
-
...
|
|
790
|
+
...qe(u),
|
|
802
791
|
/* ── Actions (P0, pinned-end) ──────────────────────────────────── */
|
|
803
792
|
{
|
|
804
793
|
colId: "actions",
|
|
@@ -813,8 +802,8 @@ function Ze(e, i = {}) {
|
|
|
813
802
|
// Header + action group left-aligned (justify-start), consistent with every
|
|
814
803
|
// other column — no right-aligned header (the actions still sit at the
|
|
815
804
|
// pinned inline-end edge, the group just starts at the cell's leading edge).
|
|
816
|
-
cellClass: "ds:justify-start",
|
|
817
|
-
cellRenderer:
|
|
805
|
+
cellClass: "ds:justify-start ag-cell-graphic",
|
|
806
|
+
cellRenderer: ge,
|
|
818
807
|
cellRendererParams: {
|
|
819
808
|
actions: f,
|
|
820
809
|
intent: "ghost",
|
|
@@ -828,119 +817,119 @@ function Ze(e, i = {}) {
|
|
|
828
817
|
// The renderer collapses to a single overflow trigger via
|
|
829
818
|
// `getActionsCompact`; the expanded width is DERIVED from the action count
|
|
830
819
|
// so a row showing every action can't clip — 88px collapsed → fits-all.
|
|
831
|
-
width:
|
|
820
|
+
width: ie(f.length),
|
|
832
821
|
minWidth: 88
|
|
833
822
|
// Anchor — never auto-hidden (no tier).
|
|
834
823
|
}
|
|
835
824
|
];
|
|
836
825
|
}
|
|
837
|
-
const
|
|
826
|
+
const Xe = [
|
|
838
827
|
{ minWidth: 0, tier: "P0" },
|
|
839
828
|
{ minWidth: 640, tier: "P1" },
|
|
840
829
|
{ minWidth: 900, tier: "P2" },
|
|
841
830
|
{ minWidth: 1200, tier: "P3" }
|
|
842
831
|
];
|
|
843
|
-
function
|
|
844
|
-
const
|
|
845
|
-
for (const s of
|
|
846
|
-
e >= s.minWidth &&
|
|
847
|
-
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;
|
|
848
837
|
}
|
|
849
|
-
function
|
|
838
|
+
function Je(e, n) {
|
|
850
839
|
const {
|
|
851
|
-
containerRef:
|
|
840
|
+
containerRef: d,
|
|
852
841
|
enabled: s = !0,
|
|
853
|
-
breakpoints:
|
|
854
|
-
} =
|
|
855
|
-
return
|
|
856
|
-
const
|
|
857
|
-
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;
|
|
858
847
|
const m = () => {
|
|
859
|
-
var
|
|
860
|
-
return (
|
|
861
|
-
}, C = (
|
|
862
|
-
if (u.current ||
|
|
863
|
-
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] : []);
|
|
864
853
|
for (const v of h)
|
|
865
854
|
l.current.add(v.getColId());
|
|
866
855
|
};
|
|
867
856
|
let a = !1;
|
|
868
|
-
const
|
|
857
|
+
const T = (o) => {
|
|
869
858
|
if (a) return;
|
|
870
859
|
a = !0;
|
|
871
|
-
const h =
|
|
860
|
+
const h = o.getColumns(), v = c.getBoundingClientRect().width, D = ee(v, r);
|
|
872
861
|
if (h)
|
|
873
|
-
for (const
|
|
874
|
-
const I = q(
|
|
875
|
-
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());
|
|
876
865
|
}
|
|
877
|
-
|
|
866
|
+
o.addEventListener("columnVisible", C);
|
|
878
867
|
}, t = () => {
|
|
879
|
-
const
|
|
880
|
-
if (!
|
|
881
|
-
|
|
882
|
-
const h =
|
|
868
|
+
const o = m();
|
|
869
|
+
if (!o) return;
|
|
870
|
+
T(o);
|
|
871
|
+
const h = o.getColumns();
|
|
883
872
|
if (!h) return;
|
|
884
|
-
const v =
|
|
873
|
+
const v = c.getBoundingClientRect().width, D = ee(v, r), w = [], I = [];
|
|
885
874
|
for (const S of h) {
|
|
886
875
|
const V = S.getColId();
|
|
887
876
|
if (l.current.has(V)) continue;
|
|
888
877
|
const A = q(S.getColDef());
|
|
889
878
|
if (!A) continue;
|
|
890
879
|
const E = D.has(A);
|
|
891
|
-
E && !S.isVisible() ?
|
|
880
|
+
E && !S.isVisible() ? w.push(S) : !E && S.isVisible() && I.push(S);
|
|
892
881
|
}
|
|
893
|
-
if (!(
|
|
882
|
+
if (!(w.length === 0 && I.length === 0)) {
|
|
894
883
|
u.current = !0;
|
|
895
884
|
try {
|
|
896
|
-
|
|
885
|
+
w.length > 0 && o.setColumnsVisible(w, !0), I.length > 0 && o.setColumnsVisible(I, !1);
|
|
897
886
|
} finally {
|
|
898
887
|
u.current = !1;
|
|
899
888
|
}
|
|
900
889
|
}
|
|
901
|
-
},
|
|
902
|
-
return
|
|
903
|
-
var
|
|
904
|
-
|
|
890
|
+
}, i = new ResizeObserver(() => t());
|
|
891
|
+
return i.observe(c), t(), () => {
|
|
892
|
+
var o;
|
|
893
|
+
i.disconnect(), (o = m()) == null || o.removeEventListener("columnVisible", C);
|
|
905
894
|
};
|
|
906
|
-
}, [
|
|
907
|
-
for (const m of
|
|
895
|
+
}, [d, s, r, e]), { lockColumns: z((c) => {
|
|
896
|
+
for (const m of c) l.current.add(m);
|
|
908
897
|
}, []) };
|
|
909
898
|
}
|
|
910
|
-
function
|
|
911
|
-
var
|
|
912
|
-
return (
|
|
899
|
+
function Ze(e) {
|
|
900
|
+
var n;
|
|
901
|
+
return (n = e.data) != null && n.isArchived ? "data-table-row-archived" : void 0;
|
|
913
902
|
}
|
|
914
|
-
function
|
|
903
|
+
function et(e) {
|
|
915
904
|
return e.data.id;
|
|
916
905
|
}
|
|
917
|
-
function
|
|
906
|
+
function tt({
|
|
918
907
|
views: e,
|
|
919
|
-
handleRef:
|
|
920
|
-
lockColumns:
|
|
908
|
+
handleRef: n,
|
|
909
|
+
lockColumns: d,
|
|
921
910
|
label: s
|
|
922
911
|
}) {
|
|
923
|
-
const [
|
|
912
|
+
const [r, l] = ne(""), u = Y(
|
|
924
913
|
() => e.map((m) => ({ value: m.id, label: m.label })),
|
|
925
914
|
[e]
|
|
926
915
|
), f = z(
|
|
927
916
|
(m) => {
|
|
928
|
-
const C = e.find((t) => t.id === m), a =
|
|
917
|
+
const C = e.find((t) => t.id === m), a = n.current;
|
|
929
918
|
if (!C || !a) return;
|
|
930
|
-
const
|
|
931
|
-
if (
|
|
932
|
-
const t = new Set(C.columns),
|
|
933
|
-
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() ?? []) {
|
|
934
923
|
if (q(h.getColDef()) === void 0) continue;
|
|
935
924
|
const v = h.getColId();
|
|
936
|
-
t.has(v) ?
|
|
925
|
+
t.has(v) ? i.push(v) : o.push(v);
|
|
937
926
|
}
|
|
938
|
-
|
|
927
|
+
d([...i, ...o]), i.length > 0 && T.setColumnsVisible(i, !0), o.length > 0 && T.setColumnsVisible(o, !1);
|
|
939
928
|
}
|
|
940
|
-
a.setFilter(C.filterModel), a.setSort(C.sortModel),
|
|
929
|
+
a.setFilter(C.filterModel), a.setSort(C.sortModel), T == null || T.onFilterChanged();
|
|
941
930
|
},
|
|
942
|
-
[e,
|
|
943
|
-
),
|
|
931
|
+
[e, n, d]
|
|
932
|
+
), c = z(
|
|
944
933
|
(m) => {
|
|
945
934
|
l(m), m && f(m);
|
|
946
935
|
},
|
|
@@ -951,63 +940,63 @@ function at({
|
|
|
951
940
|
// the Select's intrinsic `w-full` trigger sizes to a compact, legible width
|
|
952
941
|
// instead of absorbing the whole FilterBar row.
|
|
953
942
|
/* @__PURE__ */ g("div", { className: "ds:w-[12rem] ds:max-w-full ds:min-w-0 ds:shrink-0", children: /* @__PURE__ */ g(
|
|
954
|
-
|
|
943
|
+
ve,
|
|
955
944
|
{
|
|
956
945
|
options: u,
|
|
957
|
-
value:
|
|
958
|
-
onValueChange:
|
|
946
|
+
value: r,
|
|
947
|
+
onValueChange: c,
|
|
959
948
|
size: "sm",
|
|
960
949
|
"aria-label": s
|
|
961
950
|
}
|
|
962
951
|
) })
|
|
963
952
|
);
|
|
964
953
|
}
|
|
965
|
-
const
|
|
954
|
+
const nt = pe(
|
|
966
955
|
function({
|
|
967
|
-
rowData:
|
|
968
|
-
columns:
|
|
956
|
+
rowData: n,
|
|
957
|
+
columns: d,
|
|
969
958
|
gridId: s,
|
|
970
|
-
density:
|
|
959
|
+
density: r,
|
|
971
960
|
actionsCompact: l,
|
|
972
961
|
heightClass: u,
|
|
973
962
|
responsive: f = !0,
|
|
974
|
-
views:
|
|
963
|
+
views: c,
|
|
975
964
|
onRowAction: m,
|
|
976
965
|
bulkActions: C,
|
|
977
966
|
loading: a = !1,
|
|
978
|
-
toolbar:
|
|
967
|
+
toolbar: T,
|
|
979
968
|
hideQuickSearch: t = !1,
|
|
980
|
-
pagination:
|
|
981
|
-
paginationPageSizeSelector:
|
|
969
|
+
pagination: i = !1,
|
|
970
|
+
paginationPageSizeSelector: o,
|
|
982
971
|
hideDetails: h = !1,
|
|
983
972
|
identityHref: v,
|
|
984
973
|
customFields: D,
|
|
985
|
-
"aria-label":
|
|
974
|
+
"aria-label": w,
|
|
986
975
|
className: I
|
|
987
976
|
}, S) {
|
|
988
|
-
const { t: V } = $("ui"), A = k(null), E = k(null), [M,
|
|
989
|
-
|
|
977
|
+
const { t: V } = $("ui"), A = k(null), E = k(null), [M, re] = ne(null);
|
|
978
|
+
be(
|
|
990
979
|
S,
|
|
991
980
|
() => M ?? A.current,
|
|
992
981
|
[M]
|
|
993
982
|
);
|
|
994
|
-
const { lockColumns:
|
|
983
|
+
const { lockColumns: oe } = Je(A, {
|
|
995
984
|
containerRef: E,
|
|
996
985
|
enabled: f
|
|
997
|
-
}), G = l ??
|
|
998
|
-
|
|
999
|
-
var
|
|
986
|
+
}), G = l ?? r === "compact", Q = k(G), X = z(() => Q.current, []);
|
|
987
|
+
te(() => {
|
|
988
|
+
var P;
|
|
1000
989
|
Q.current = G;
|
|
1001
|
-
const N = (
|
|
990
|
+
const N = (P = A.current) == null ? void 0 : P.getRawApi();
|
|
1002
991
|
N && (N.setColumnWidths([
|
|
1003
992
|
{
|
|
1004
993
|
key: "actions",
|
|
1005
|
-
newWidth: G ? 88 :
|
|
994
|
+
newWidth: G ? 88 : ie($e)
|
|
1006
995
|
}
|
|
1007
996
|
]), N.refreshCells({ force: !0 }));
|
|
1008
997
|
}, [G, M]);
|
|
1009
|
-
const
|
|
1010
|
-
() =>
|
|
998
|
+
const se = Y(
|
|
999
|
+
() => d ?? Qe(V, {
|
|
1011
1000
|
hideDetails: h,
|
|
1012
1001
|
onRowAction: m,
|
|
1013
1002
|
identityHref: v,
|
|
@@ -1015,7 +1004,7 @@ const lt = he(
|
|
|
1015
1004
|
getActionsCompact: X
|
|
1016
1005
|
}),
|
|
1017
1006
|
[
|
|
1018
|
-
|
|
1007
|
+
d,
|
|
1019
1008
|
V,
|
|
1020
1009
|
h,
|
|
1021
1010
|
m,
|
|
@@ -1023,40 +1012,40 @@ const lt = he(
|
|
|
1023
1012
|
D,
|
|
1024
1013
|
X
|
|
1025
1014
|
]
|
|
1026
|
-
),
|
|
1027
|
-
/* @__PURE__ */ O(
|
|
1028
|
-
|
|
1029
|
-
|
|
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,
|
|
1030
1019
|
{
|
|
1031
|
-
views:
|
|
1020
|
+
views: c,
|
|
1032
1021
|
handleRef: A,
|
|
1033
|
-
lockColumns:
|
|
1022
|
+
lockColumns: oe,
|
|
1034
1023
|
label: V("patientTable.views.label")
|
|
1035
1024
|
}
|
|
1036
1025
|
) : null,
|
|
1037
|
-
t ? null : /* @__PURE__ */ g(
|
|
1038
|
-
/* @__PURE__ */ g(
|
|
1026
|
+
t ? null : /* @__PURE__ */ g(y.Toolbar.QuickSearch, {}),
|
|
1027
|
+
/* @__PURE__ */ g(y.Toolbar.FilterChips, {})
|
|
1039
1028
|
] }),
|
|
1040
|
-
/* @__PURE__ */ O(
|
|
1029
|
+
/* @__PURE__ */ O(y.Toolbar.Actions, { children: [
|
|
1041
1030
|
C == null ? void 0 : C.map((N) => /* @__PURE__ */ g(
|
|
1042
|
-
|
|
1031
|
+
y.Toolbar.BulkAction,
|
|
1043
1032
|
{
|
|
1044
1033
|
label: N.label,
|
|
1045
1034
|
icon: N.icon,
|
|
1046
1035
|
variant: N.variant,
|
|
1047
|
-
onClick: (
|
|
1048
|
-
const
|
|
1049
|
-
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);
|
|
1050
1039
|
}
|
|
1051
1040
|
},
|
|
1052
1041
|
N.id
|
|
1053
1042
|
)),
|
|
1054
|
-
/* @__PURE__ */ g(
|
|
1055
|
-
/* @__PURE__ */ g(
|
|
1043
|
+
/* @__PURE__ */ g(y.Toolbar.ColumnToggle, {}),
|
|
1044
|
+
/* @__PURE__ */ g(y.Toolbar.ExportMenu, {})
|
|
1056
1045
|
] })
|
|
1057
|
-
] }),
|
|
1058
|
-
return
|
|
1059
|
-
|
|
1046
|
+
] }), ue = T ?? ce, me = a ? void 0 : n, fe = Y(() => ({ getRowId: et }), []);
|
|
1047
|
+
return Ne(
|
|
1048
|
+
Ce,
|
|
1060
1049
|
M,
|
|
1061
1050
|
s
|
|
1062
1051
|
), /* @__PURE__ */ g(
|
|
@@ -1064,45 +1053,68 @@ const lt = he(
|
|
|
1064
1053
|
{
|
|
1065
1054
|
ref: E,
|
|
1066
1055
|
role: "region",
|
|
1067
|
-
"aria-label":
|
|
1056
|
+
"aria-label": w ?? V("patientTable.regionLabel"),
|
|
1068
1057
|
"data-component": "patient-table",
|
|
1069
1058
|
"data-component-id": s,
|
|
1070
1059
|
className: "ds:flex ds:w-full ds:min-h-0 ds:flex-1 ds:flex-col",
|
|
1071
1060
|
children: /* @__PURE__ */ g(
|
|
1072
|
-
|
|
1061
|
+
y,
|
|
1073
1062
|
{
|
|
1074
1063
|
ref: (N) => {
|
|
1075
|
-
A.current = N,
|
|
1076
|
-
(
|
|
1064
|
+
A.current = N, re(
|
|
1065
|
+
(P) => P === N ? P : N
|
|
1077
1066
|
);
|
|
1078
1067
|
},
|
|
1079
1068
|
gridId: s,
|
|
1080
|
-
columnDefs:
|
|
1081
|
-
rowData:
|
|
1069
|
+
columnDefs: se,
|
|
1070
|
+
rowData: me,
|
|
1082
1071
|
rowSelection: "multiple",
|
|
1083
|
-
pagination:
|
|
1072
|
+
pagination: i,
|
|
1084
1073
|
...u !== void 0 ? { heightClass: u } : {},
|
|
1085
|
-
...
|
|
1086
|
-
density:
|
|
1087
|
-
getRowClass:
|
|
1088
|
-
gridOptions:
|
|
1074
|
+
...o !== void 0 ? { paginationPageSizeSelector: o } : {},
|
|
1075
|
+
density: r,
|
|
1076
|
+
getRowClass: Ze,
|
|
1077
|
+
gridOptions: fe,
|
|
1089
1078
|
className: I,
|
|
1090
|
-
children:
|
|
1079
|
+
children: ue
|
|
1091
1080
|
}
|
|
1092
1081
|
)
|
|
1093
1082
|
}
|
|
1094
1083
|
);
|
|
1095
1084
|
}
|
|
1096
1085
|
);
|
|
1097
|
-
|
|
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
|
+
}
|
|
1098
1109
|
export {
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
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,
|
|
1105
1117
|
q as g,
|
|
1106
|
-
|
|
1118
|
+
Je as u
|
|
1107
1119
|
};
|
|
1108
|
-
//# sourceMappingURL=
|
|
1120
|
+
//# sourceMappingURL=balance-badge-cell-DHTiSFyD.js.map
|