@alfadocs/ui-kit 1.9.3 → 1.10.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.
- package/dist/_chunks/actions-cell-renderer-BbzCqcld.js +1887 -0
- package/dist/_chunks/{patient-table-S77TBCEB.js → balance-badge-cell-DK9wxCxW.js} +491 -459
- package/dist/_chunks/{data-table-tabs-C1kRUzat.js → data-table-tabs-D24qj89A.js} +343 -325
- package/dist/_chunks/editable-currency-cell-renderer-zLf_bXvL.js +412 -0
- package/dist/_chunks/{file-manager-Crg5dKez.js → file-manager-CRxq0UIl.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/data-table.d.ts +11 -0
- package/dist/components/data-table/index.js +11 -11
- package/dist/components/data-table/toolbar.d.ts +2 -1
- package/dist/components/data-table-tabs/data-table-tabs.d.ts +2 -0
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/data-table-tabs/use-data-table-filter-tabs.d.ts +7 -0
- 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/components/patient-table/use-responsive-columns.d.ts +7 -4
- package/dist/index.js +336 -335
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/actions-cell-renderer-B2pw6iH8.js +0 -1784
- package/dist/_chunks/editable-currency-cell-renderer-DYdzKpjL.js +0 -390
|
@@ -1,57 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createElement as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { a as
|
|
1
|
+
import { jsx as v, jsxs as k } from "react/jsx-runtime";
|
|
2
|
+
import { createElement as E, useRef as G, useEffect as te, useCallback as j, forwardRef as he, useState as ne, useImperativeHandle as pe, useMemo as Q } from "react";
|
|
3
|
+
import { useTranslation as K } from "react-i18next";
|
|
4
|
+
import { a as g, T as C, A as be, d as ie, D as S, e as ge } from "./actions-cell-renderer-BbzCqcld.js";
|
|
5
5
|
import { S as Ce } from "./select-BW5ecXlX.js";
|
|
6
6
|
import { u as ve } from "./registry-DvAUVLHh.js";
|
|
7
|
-
import { I as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { I as Te, L as we, b as _, a as z, c as H, N as $, d as R, S as I, T as ae, D as q, g as Ne, f as Fe, U as Re, e as Ie } from "./link-cell-renderer-Cp2MSlJl.js";
|
|
8
|
+
import { T as Pe } from "./transaction-chip-DJCstquX.js";
|
|
9
|
+
import { B as re } from "./badge-sTusUqZD.js";
|
|
10
|
+
import { c as ye } from "./index-D2ZczOXr.js";
|
|
11
|
+
import { T as Se } from "./timestamp-BV2lC-wV.js";
|
|
12
|
+
import { C as We } from "./calendar-clock-hbObjfGY.js";
|
|
12
13
|
import { E as Ae } from "./eye-BjhN2nYf.js";
|
|
13
|
-
import { P as
|
|
14
|
-
import { M as
|
|
15
|
-
import { M as
|
|
16
|
-
import { U as
|
|
17
|
-
import { T as
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (e == null || e === "") return null;
|
|
24
|
-
const i = typeof e == "number" ? e : Number(e);
|
|
25
|
-
return Number.isFinite(i) ? i : null;
|
|
14
|
+
import { P as De } from "./pencil-B1sKKyuT.js";
|
|
15
|
+
import { M as Be } from "./mail-BqXVF2zH.js";
|
|
16
|
+
import { M as xe } from "./message-square-Bye4ATvx.js";
|
|
17
|
+
import { U as Ve } from "./users-BjS_Gg1E.js";
|
|
18
|
+
import { T as Oe } from "./trash-2-uumy3fy1.js";
|
|
19
|
+
function Z(e) {
|
|
20
|
+
const { value: n, positiveState: s, showLabel: o = !0 } = e, l = typeof n == "number" && Number.isFinite(n) ? n : null;
|
|
21
|
+
if (l === null) return null;
|
|
22
|
+
const r = l > 0 ? s : "settled";
|
|
23
|
+
return /* @__PURE__ */ v(Pe, { state: r, amount: l / 100, showLabel: o });
|
|
26
24
|
}
|
|
27
|
-
|
|
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 Ee = {
|
|
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
|
|
52
|
-
return /* @__PURE__ */
|
|
33
|
+
function ke(e) {
|
|
34
|
+
const { t: n } = K("ui"), { data: s, value: o, size: l = "sm" } = e, r = (s == null ? void 0 : s.carePlanStatus) ?? o;
|
|
35
|
+
if (!Me(r)) return null;
|
|
36
|
+
const c = Ee[r];
|
|
37
|
+
return /* @__PURE__ */ v(re, { variant: c, withDot: !0, size: l, children: n(`patientTable.carePlanStatus.${r}`) });
|
|
53
38
|
}
|
|
54
|
-
const
|
|
39
|
+
const ee = ye(
|
|
55
40
|
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] ds:whitespace-nowrap",
|
|
56
41
|
{
|
|
57
42
|
variants: {
|
|
@@ -66,199 +51,199 @@ const J = Pe(
|
|
|
66
51
|
},
|
|
67
52
|
defaultVariants: { tone: "default" }
|
|
68
53
|
}
|
|
69
|
-
),
|
|
70
|
-
function
|
|
54
|
+
), Ge = 1440 * 60 * 1e3, Le = 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 _e(e, n) {
|
|
61
|
+
if (n <= 0) return "default";
|
|
62
|
+
const s = e - Date.now();
|
|
63
|
+
return s < 0 ? "default" : s <= n * Ge ? "soon" : "default";
|
|
79
64
|
}
|
|
80
|
-
function
|
|
81
|
-
const { t:
|
|
82
|
-
if (
|
|
83
|
-
return /* @__PURE__ */
|
|
84
|
-
const
|
|
85
|
-
return /* @__PURE__ */
|
|
86
|
-
|
|
87
|
-
/* @__PURE__ */
|
|
65
|
+
function ze(e) {
|
|
66
|
+
const { t: n } = K("ui"), { data: s, value: o, soonWithinDays: l = Le } = e, r = Ue((s == null ? void 0 : s.nextAppointment) ?? o);
|
|
67
|
+
if (r === null)
|
|
68
|
+
return /* @__PURE__ */ v("span", { className: ee({ tone: "empty" }), children: n("patientTable.nextAppointment.none") });
|
|
69
|
+
const c = _e(r, l);
|
|
70
|
+
return /* @__PURE__ */ k("span", { className: ee({ tone: c }), children: [
|
|
71
|
+
c === "soon" ? /* @__PURE__ */ v(We, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }) : null,
|
|
72
|
+
/* @__PURE__ */ v(Se, { value: r, format: "relative", shape: "bare" })
|
|
88
73
|
] });
|
|
89
74
|
}
|
|
90
|
-
function
|
|
75
|
+
function le(e) {
|
|
91
76
|
return e.responsiveTier;
|
|
92
77
|
}
|
|
93
|
-
const
|
|
94
|
-
function
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
-
icon:
|
|
99
|
-
label:
|
|
100
|
-
variant:
|
|
101
|
-
onClick:
|
|
102
|
-
...
|
|
78
|
+
const He = 6;
|
|
79
|
+
function $e(e, n) {
|
|
80
|
+
const s = (l) => (r) => {
|
|
81
|
+
n == null || n(l, r);
|
|
82
|
+
}, o = (l, r) => ({
|
|
83
|
+
icon: l.icon,
|
|
84
|
+
label: l.label,
|
|
85
|
+
variant: l.variant,
|
|
86
|
+
onClick: s(l),
|
|
87
|
+
...r
|
|
103
88
|
});
|
|
104
89
|
return [
|
|
105
|
-
|
|
90
|
+
o(
|
|
106
91
|
{
|
|
107
92
|
id: "show",
|
|
108
93
|
label: e("patientTable.actions.show"),
|
|
109
|
-
icon:
|
|
94
|
+
icon: E(Ae, { "aria-hidden": "true" })
|
|
110
95
|
},
|
|
111
96
|
{}
|
|
112
97
|
),
|
|
113
|
-
|
|
98
|
+
o(
|
|
114
99
|
{
|
|
115
100
|
id: "edit",
|
|
116
101
|
label: e("patientTable.actions.edit"),
|
|
117
|
-
icon:
|
|
102
|
+
icon: E(De, { "aria-hidden": "true" })
|
|
118
103
|
},
|
|
119
104
|
{}
|
|
120
105
|
),
|
|
121
|
-
|
|
106
|
+
o(
|
|
122
107
|
{
|
|
123
108
|
id: "sendEmailReminder",
|
|
124
109
|
label: e("patientTable.actions.sendEmailReminder"),
|
|
125
|
-
icon:
|
|
110
|
+
icon: E(Be, { "aria-hidden": "true" })
|
|
126
111
|
},
|
|
127
112
|
// Hidden when the patient has email contact disabled (spec).
|
|
128
|
-
{ hidden: (
|
|
113
|
+
{ hidden: (l) => !l.emailEnabled }
|
|
129
114
|
),
|
|
130
|
-
|
|
115
|
+
o(
|
|
131
116
|
{
|
|
132
117
|
id: "sendSmsReminder",
|
|
133
118
|
label: e("patientTable.actions.sendSmsReminder"),
|
|
134
|
-
icon:
|
|
119
|
+
icon: E(xe, { "aria-hidden": "true" })
|
|
135
120
|
},
|
|
136
121
|
// Hidden when no phone number is SMS-enabled (spec).
|
|
137
122
|
{
|
|
138
|
-
hidden: (
|
|
123
|
+
hidden: (l) => !(l.phoneNumbers ?? []).some((r) => r.smsEnabled)
|
|
139
124
|
}
|
|
140
125
|
),
|
|
141
|
-
|
|
126
|
+
o(
|
|
142
127
|
{
|
|
143
128
|
id: "reassign",
|
|
144
129
|
label: e("patientTable.actions.reassign"),
|
|
145
|
-
icon:
|
|
130
|
+
icon: E(Ve, { "aria-hidden": "true" })
|
|
146
131
|
},
|
|
147
132
|
{}
|
|
148
133
|
),
|
|
149
|
-
|
|
134
|
+
o(
|
|
150
135
|
{
|
|
151
136
|
id: "delete",
|
|
152
137
|
label: e("patientTable.actions.delete"),
|
|
153
|
-
icon:
|
|
138
|
+
icon: E(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: (l) => !!l.isArchived,
|
|
160
145
|
disabledReason: e("patientTable.actions.deleteLocked")
|
|
161
146
|
}
|
|
162
147
|
)
|
|
163
148
|
];
|
|
164
149
|
}
|
|
165
|
-
const
|
|
166
|
-
function
|
|
150
|
+
const je = () => !1, A = "✓", W = "—";
|
|
151
|
+
function Ke(e) {
|
|
167
152
|
if (!e) return null;
|
|
168
|
-
const
|
|
169
|
-
if (Number.isNaN(
|
|
170
|
-
const
|
|
171
|
-
let
|
|
172
|
-
const
|
|
173
|
-
return (
|
|
153
|
+
const n = new Date(e), s = n.getTime();
|
|
154
|
+
if (Number.isNaN(s)) return null;
|
|
155
|
+
const o = /* @__PURE__ */ new Date();
|
|
156
|
+
let l = o.getFullYear() - n.getFullYear();
|
|
157
|
+
const r = o.getMonth() - n.getMonth();
|
|
158
|
+
return (r < 0 || r === 0 && o.getDate() < n.getDate()) && (l -= 1), l >= 0 ? l : null;
|
|
174
159
|
}
|
|
175
|
-
function
|
|
176
|
-
return e.map((
|
|
177
|
-
var
|
|
178
|
-
const
|
|
179
|
-
colId: `custom:${
|
|
180
|
-
headerName:
|
|
160
|
+
function Ye(e) {
|
|
161
|
+
return e.map((n) => {
|
|
162
|
+
var l;
|
|
163
|
+
const o = {
|
|
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
|
|
185
|
-
...
|
|
186
|
-
valueGetter: (
|
|
187
|
-
var
|
|
188
|
-
return ((
|
|
169
|
+
return n.type === "checkbox" ? {
|
|
170
|
+
...o,
|
|
171
|
+
valueGetter: (r) => {
|
|
172
|
+
var c, h;
|
|
173
|
+
return ((h = (c = r.data) == null ? void 0 : c.customFields) == null ? void 0 : h[n.fieldName]) === !0;
|
|
189
174
|
},
|
|
190
|
-
valueFormatter: (
|
|
191
|
-
filter:
|
|
192
|
-
floatingFilterComponent:
|
|
175
|
+
valueFormatter: (r) => r.value === !0 ? A : W,
|
|
176
|
+
filter: I,
|
|
177
|
+
floatingFilterComponent: R,
|
|
193
178
|
filterParams: {
|
|
194
179
|
options: [
|
|
195
|
-
{ value: !0, label:
|
|
180
|
+
{ value: !0, label: A },
|
|
196
181
|
{ value: !1, label: W }
|
|
197
182
|
]
|
|
198
183
|
},
|
|
199
184
|
minWidth: 110,
|
|
200
185
|
width: 130
|
|
201
|
-
} :
|
|
202
|
-
...
|
|
186
|
+
} : n.type === "dropdown" ? {
|
|
187
|
+
...o,
|
|
203
188
|
// TagListCellRenderer expects an array; wrap the single value.
|
|
204
|
-
valueGetter: (
|
|
205
|
-
var
|
|
206
|
-
const
|
|
207
|
-
return typeof
|
|
189
|
+
valueGetter: (r) => {
|
|
190
|
+
var h, d;
|
|
191
|
+
const c = (d = (h = r.data) == null ? void 0 : h.customFields) == null ? void 0 : d[n.fieldName];
|
|
192
|
+
return typeof c == "string" && c ? [c] : [];
|
|
208
193
|
},
|
|
209
|
-
cellRenderer:
|
|
210
|
-
filterValueGetter: (
|
|
211
|
-
var
|
|
212
|
-
const
|
|
213
|
-
return typeof
|
|
194
|
+
cellRenderer: ae,
|
|
195
|
+
filterValueGetter: (r) => {
|
|
196
|
+
var h, d;
|
|
197
|
+
const c = (d = (h = r.data) == null ? void 0 : h.customFields) == null ? void 0 : d[n.fieldName];
|
|
198
|
+
return typeof c == "string" ? c : "";
|
|
214
199
|
},
|
|
215
|
-
filter:
|
|
216
|
-
floatingFilterComponent:
|
|
200
|
+
filter: I,
|
|
201
|
+
floatingFilterComponent: R,
|
|
217
202
|
filterParams: {
|
|
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: (
|
|
222
|
-
value:
|
|
223
|
-
label:
|
|
206
|
+
options: (l = n.options) == null ? void 0 : l.map((r) => ({
|
|
207
|
+
value: r,
|
|
208
|
+
label: r
|
|
224
209
|
}))
|
|
225
210
|
},
|
|
226
211
|
sortable: !1,
|
|
227
212
|
minWidth: 130,
|
|
228
213
|
width: 160
|
|
229
214
|
} : {
|
|
230
|
-
...
|
|
231
|
-
valueGetter: (
|
|
232
|
-
var
|
|
233
|
-
const
|
|
234
|
-
return typeof
|
|
215
|
+
...o,
|
|
216
|
+
valueGetter: (r) => {
|
|
217
|
+
var h, d;
|
|
218
|
+
const c = (d = (h = r.data) == null ? void 0 : h.customFields) == null ? void 0 : d[n.fieldName];
|
|
219
|
+
return typeof c == "string" ? c : "";
|
|
235
220
|
},
|
|
236
|
-
filter:
|
|
237
|
-
floatingFilterComponent:
|
|
221
|
+
filter: C,
|
|
222
|
+
floatingFilterComponent: g,
|
|
238
223
|
minWidth: 140,
|
|
239
224
|
width: 170
|
|
240
225
|
};
|
|
241
226
|
});
|
|
242
227
|
}
|
|
243
|
-
function
|
|
228
|
+
function qe(e, n = {}) {
|
|
244
229
|
const {
|
|
245
|
-
hideDetails:
|
|
246
|
-
getActionsCompact:
|
|
247
|
-
onRowAction:
|
|
248
|
-
identityHref:
|
|
249
|
-
customFields:
|
|
250
|
-
} =
|
|
230
|
+
hideDetails: s = !1,
|
|
231
|
+
getActionsCompact: o = je,
|
|
232
|
+
onRowAction: l,
|
|
233
|
+
identityHref: r,
|
|
234
|
+
customFields: c = []
|
|
235
|
+
} = n, h = $e(e, l), d = {
|
|
251
236
|
m: e("patientTable.gender.m"),
|
|
252
237
|
f: e("patientTable.gender.f"),
|
|
253
238
|
x: e("patientTable.gender.x")
|
|
254
|
-
},
|
|
239
|
+
}, u = {
|
|
255
240
|
yes: e("patientTable.consent.yes"),
|
|
256
241
|
no: e("patientTable.consent.no"),
|
|
257
242
|
notSpecified: e("patientTable.consent.notSpecified")
|
|
258
|
-
},
|
|
259
|
-
[
|
|
260
|
-
[
|
|
261
|
-
[
|
|
243
|
+
}, p = {
|
|
244
|
+
[u.yes]: "success",
|
|
245
|
+
[u.no]: "error",
|
|
246
|
+
[u.notSpecified]: "neutral"
|
|
262
247
|
}, a = (t) => e(`patientTable.column.${t}`);
|
|
263
248
|
return [
|
|
264
249
|
/* ── Avatar (P0, pinned-start) ─────────────────────────────────── */
|
|
@@ -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",
|
|
@@ -301,8 +286,8 @@ function Ze(e, i = {}) {
|
|
|
301
286
|
headerName: a("firstName"),
|
|
302
287
|
pinned: "left",
|
|
303
288
|
field: "firstName",
|
|
304
|
-
filter:
|
|
305
|
-
floatingFilterComponent:
|
|
289
|
+
filter: C,
|
|
290
|
+
floatingFilterComponent: g,
|
|
306
291
|
// Size to content: width === minWidth so the pinned column sits tight with
|
|
307
292
|
// no dead space before the next pinned column (pinned columns can't flex).
|
|
308
293
|
width: 140,
|
|
@@ -317,16 +302,16 @@ function Ze(e, i = {}) {
|
|
|
317
302
|
field: "lastName",
|
|
318
303
|
cellRenderer: we,
|
|
319
304
|
cellRendererParams: {
|
|
320
|
-
href:
|
|
305
|
+
href: r,
|
|
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: l ? (t) => l(
|
|
324
309
|
{ id: "show", label: e("patientTable.actions.show") },
|
|
325
310
|
t
|
|
326
311
|
) : void 0
|
|
327
312
|
},
|
|
328
|
-
filter:
|
|
329
|
-
floatingFilterComponent:
|
|
313
|
+
filter: C,
|
|
314
|
+
floatingFilterComponent: g,
|
|
330
315
|
// Size to content: a modest pinned width with no stretched default, so the
|
|
331
316
|
// avatar + first + last group ends tight against the scrollable columns.
|
|
332
317
|
width: 150,
|
|
@@ -340,11 +325,11 @@ 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 ((
|
|
328
|
+
var i, f, b;
|
|
329
|
+
return ((b = (f = (i = t.data) == null ? void 0 : i.phoneNumbers) == null ? void 0 : f[0]) == null ? void 0 : b.number) ?? "";
|
|
345
330
|
},
|
|
346
|
-
filter:
|
|
347
|
-
floatingFilterComponent:
|
|
331
|
+
filter: C,
|
|
332
|
+
floatingFilterComponent: g,
|
|
348
333
|
minWidth: 160,
|
|
349
334
|
width: 180
|
|
350
335
|
},
|
|
@@ -354,9 +339,9 @@ function Ze(e, i = {}) {
|
|
|
354
339
|
headerName: a("nextAppointment"),
|
|
355
340
|
responsiveTier: "P1",
|
|
356
341
|
field: "nextAppointment",
|
|
357
|
-
cellRenderer:
|
|
358
|
-
filter:
|
|
359
|
-
floatingFilterComponent:
|
|
342
|
+
cellRenderer: ze,
|
|
343
|
+
filter: z,
|
|
344
|
+
floatingFilterComponent: _,
|
|
360
345
|
minWidth: 160,
|
|
361
346
|
width: 180
|
|
362
347
|
},
|
|
@@ -367,9 +352,11 @@ function Ze(e, i = {}) {
|
|
|
367
352
|
responsiveTier: "P1",
|
|
368
353
|
field: "unpaidAmount",
|
|
369
354
|
type: "numericColumn",
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
355
|
+
// The kit's financial-state pill: `debt` while anything is owed, `settled` at zero.
|
|
356
|
+
cellRenderer: Z,
|
|
357
|
+
cellRendererParams: { positiveState: "debt" },
|
|
358
|
+
filter: $,
|
|
359
|
+
floatingFilterComponent: H,
|
|
373
360
|
// Money is integer cents; the inRange filter compares cents directly.
|
|
374
361
|
filterParams: { defaultOperator: "inRange", min: 0 },
|
|
375
362
|
minWidth: 150,
|
|
@@ -384,9 +371,9 @@ 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:
|
|
388
|
-
filter:
|
|
389
|
-
floatingFilterComponent:
|
|
374
|
+
hide: s || void 0,
|
|
375
|
+
filter: C,
|
|
376
|
+
floatingFilterComponent: g,
|
|
390
377
|
minWidth: 200,
|
|
391
378
|
width: 240
|
|
392
379
|
},
|
|
@@ -396,9 +383,9 @@ function Ze(e, i = {}) {
|
|
|
396
383
|
headerName: a("carePlanStatus"),
|
|
397
384
|
responsiveTier: "P2",
|
|
398
385
|
field: "carePlanStatus",
|
|
399
|
-
cellRenderer:
|
|
400
|
-
filter:
|
|
401
|
-
floatingFilterComponent:
|
|
386
|
+
cellRenderer: ke,
|
|
387
|
+
filter: I,
|
|
388
|
+
floatingFilterComponent: R,
|
|
402
389
|
filterParams: {
|
|
403
390
|
options: [
|
|
404
391
|
{
|
|
@@ -422,8 +409,8 @@ function Ze(e, i = {}) {
|
|
|
422
409
|
headerName: a("fiscalCode"),
|
|
423
410
|
responsiveTier: "P3",
|
|
424
411
|
field: "italianFiscalCode",
|
|
425
|
-
filter:
|
|
426
|
-
floatingFilterComponent:
|
|
412
|
+
filter: C,
|
|
413
|
+
floatingFilterComponent: g,
|
|
427
414
|
minWidth: 160,
|
|
428
415
|
width: 180
|
|
429
416
|
},
|
|
@@ -436,11 +423,11 @@ 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 Ke((i = t.data) == null ? void 0 : i.dateOfBirth) ?? void 0;
|
|
441
428
|
},
|
|
442
|
-
filter:
|
|
443
|
-
floatingFilterComponent:
|
|
429
|
+
filter: $,
|
|
430
|
+
floatingFilterComponent: H,
|
|
444
431
|
minWidth: 90,
|
|
445
432
|
width: 110
|
|
446
433
|
},
|
|
@@ -451,11 +438,11 @@ 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 ? d[t.data.gender] : W;
|
|
456
443
|
},
|
|
457
|
-
filter:
|
|
458
|
-
floatingFilterComponent:
|
|
444
|
+
filter: I,
|
|
445
|
+
floatingFilterComponent: R,
|
|
459
446
|
filterParams: {
|
|
460
447
|
options: [
|
|
461
448
|
{ value: d.m, label: d.m },
|
|
@@ -473,17 +460,17 @@ 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 f, b;
|
|
464
|
+
const i = ((f = t.data) == null ? void 0 : f.source) ?? ((b = t.data) == null ? void 0 : b.customSource);
|
|
465
|
+
return i ? [i] : [];
|
|
479
466
|
},
|
|
480
|
-
cellRenderer:
|
|
467
|
+
cellRenderer: ae,
|
|
481
468
|
filterValueGetter: (t) => {
|
|
482
|
-
var
|
|
483
|
-
return ((
|
|
469
|
+
var i, f;
|
|
470
|
+
return ((i = t.data) == null ? void 0 : i.source) ?? ((f = t.data) == null ? void 0 : f.customSource) ?? "";
|
|
484
471
|
},
|
|
485
|
-
filter:
|
|
486
|
-
floatingFilterComponent:
|
|
472
|
+
filter: I,
|
|
473
|
+
floatingFilterComponent: R,
|
|
487
474
|
sortable: !1,
|
|
488
475
|
minWidth: 120,
|
|
489
476
|
width: 150
|
|
@@ -494,10 +481,10 @@ function Ze(e, i = {}) {
|
|
|
494
481
|
headerName: a("dateOfBirth"),
|
|
495
482
|
hide: !0,
|
|
496
483
|
field: "dateOfBirth",
|
|
497
|
-
cellRenderer:
|
|
484
|
+
cellRenderer: q,
|
|
498
485
|
cellRendererParams: { format: "date" },
|
|
499
|
-
filter:
|
|
500
|
-
floatingFilterComponent:
|
|
486
|
+
filter: z,
|
|
487
|
+
floatingFilterComponent: _,
|
|
501
488
|
minWidth: 140,
|
|
502
489
|
width: 160
|
|
503
490
|
},
|
|
@@ -506,8 +493,8 @@ function Ze(e, i = {}) {
|
|
|
506
493
|
headerName: a("placeOfBirth"),
|
|
507
494
|
hide: !0,
|
|
508
495
|
field: "placeOfBirth",
|
|
509
|
-
filter:
|
|
510
|
-
floatingFilterComponent:
|
|
496
|
+
filter: C,
|
|
497
|
+
floatingFilterComponent: g,
|
|
511
498
|
minWidth: 140,
|
|
512
499
|
width: 160
|
|
513
500
|
},
|
|
@@ -516,8 +503,8 @@ function Ze(e, i = {}) {
|
|
|
516
503
|
headerName: a("countryOfBirth"),
|
|
517
504
|
hide: !0,
|
|
518
505
|
field: "countryOfBirth",
|
|
519
|
-
filter:
|
|
520
|
-
floatingFilterComponent:
|
|
506
|
+
filter: C,
|
|
507
|
+
floatingFilterComponent: g,
|
|
521
508
|
minWidth: 130,
|
|
522
509
|
width: 150
|
|
523
510
|
},
|
|
@@ -527,15 +514,15 @@ 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
|
-
valueFormatter: (t) => t.value === !0 ?
|
|
534
|
-
filter:
|
|
535
|
-
floatingFilterComponent:
|
|
520
|
+
valueFormatter: (t) => t.value === !0 ? A : W,
|
|
521
|
+
filter: I,
|
|
522
|
+
floatingFilterComponent: R,
|
|
536
523
|
filterParams: {
|
|
537
524
|
options: [
|
|
538
|
-
{ value: !0, label:
|
|
525
|
+
{ value: !0, label: A },
|
|
539
526
|
{ value: !1, label: W }
|
|
540
527
|
]
|
|
541
528
|
},
|
|
@@ -547,15 +534,15 @@ 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
|
-
valueFormatter: (t) => t.value === !0 ?
|
|
554
|
-
filter:
|
|
555
|
-
floatingFilterComponent:
|
|
540
|
+
valueFormatter: (t) => t.value === !0 ? A : W,
|
|
541
|
+
filter: I,
|
|
542
|
+
floatingFilterComponent: R,
|
|
556
543
|
filterParams: {
|
|
557
544
|
options: [
|
|
558
|
-
{ value: !0, label:
|
|
545
|
+
{ value: !0, label: A },
|
|
559
546
|
{ value: !1, label: W }
|
|
560
547
|
]
|
|
561
548
|
},
|
|
@@ -567,8 +554,8 @@ function Ze(e, i = {}) {
|
|
|
567
554
|
headerName: a("pec"),
|
|
568
555
|
hide: !0,
|
|
569
556
|
field: "pecAddress",
|
|
570
|
-
filter:
|
|
571
|
-
floatingFilterComponent:
|
|
557
|
+
filter: C,
|
|
558
|
+
floatingFilterComponent: g,
|
|
572
559
|
minWidth: 200,
|
|
573
560
|
width: 240
|
|
574
561
|
},
|
|
@@ -578,10 +565,10 @@ function Ze(e, i = {}) {
|
|
|
578
565
|
headerName: a("lastVisit"),
|
|
579
566
|
hide: !0,
|
|
580
567
|
field: "lastAppointment",
|
|
581
|
-
cellRenderer:
|
|
568
|
+
cellRenderer: q,
|
|
582
569
|
cellRendererParams: { format: "relative" },
|
|
583
|
-
filter:
|
|
584
|
-
floatingFilterComponent:
|
|
570
|
+
filter: z,
|
|
571
|
+
floatingFilterComponent: _,
|
|
585
572
|
minWidth: 140,
|
|
586
573
|
width: 160
|
|
587
574
|
},
|
|
@@ -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
|
-
|
|
600
|
-
filter:
|
|
601
|
-
floatingFilterComponent:
|
|
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: Z,
|
|
586
|
+
cellRendererParams: { positiveState: "to-invoice" },
|
|
587
|
+
filter: $,
|
|
588
|
+
floatingFilterComponent: H,
|
|
589
|
+
filterParams: { defaultOperator: "inRange", min: 0 },
|
|
602
590
|
minWidth: 140,
|
|
603
591
|
width: 160
|
|
604
592
|
},
|
|
@@ -609,8 +597,8 @@ function Ze(e, i = {}) {
|
|
|
609
597
|
field: "defaultDiscount",
|
|
610
598
|
type: "numericColumn",
|
|
611
599
|
valueFormatter: (t) => t.value == null ? "" : `${t.value}%`,
|
|
612
|
-
filter:
|
|
613
|
-
floatingFilterComponent:
|
|
600
|
+
filter: $,
|
|
601
|
+
floatingFilterComponent: H,
|
|
614
602
|
minWidth: 110,
|
|
615
603
|
width: 130
|
|
616
604
|
},
|
|
@@ -620,8 +608,8 @@ function Ze(e, i = {}) {
|
|
|
620
608
|
headerName: a("diagnosis"),
|
|
621
609
|
hide: !0,
|
|
622
610
|
field: "diagnosis",
|
|
623
|
-
filter:
|
|
624
|
-
floatingFilterComponent:
|
|
611
|
+
filter: C,
|
|
612
|
+
floatingFilterComponent: g,
|
|
625
613
|
minWidth: 180,
|
|
626
614
|
width: 220
|
|
627
615
|
},
|
|
@@ -630,8 +618,8 @@ function Ze(e, i = {}) {
|
|
|
630
618
|
headerName: a("insurance"),
|
|
631
619
|
hide: !0,
|
|
632
620
|
field: "defaultInsurance",
|
|
633
|
-
filter:
|
|
634
|
-
floatingFilterComponent:
|
|
621
|
+
filter: I,
|
|
622
|
+
floatingFilterComponent: R,
|
|
635
623
|
minWidth: 140,
|
|
636
624
|
width: 160
|
|
637
625
|
},
|
|
@@ -639,18 +627,18 @@ function Ze(e, i = {}) {
|
|
|
639
627
|
colId: "assignedTo",
|
|
640
628
|
headerName: a("assignedTo"),
|
|
641
629
|
hide: !0,
|
|
642
|
-
cellRenderer:
|
|
630
|
+
cellRenderer: Re,
|
|
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
|
-
filter:
|
|
653
|
-
floatingFilterComponent:
|
|
640
|
+
filter: Fe,
|
|
641
|
+
floatingFilterComponent: Ne,
|
|
654
642
|
minWidth: 160,
|
|
655
643
|
width: 180
|
|
656
644
|
},
|
|
@@ -659,8 +647,8 @@ function Ze(e, i = {}) {
|
|
|
659
647
|
headerName: a("job"),
|
|
660
648
|
hide: !0,
|
|
661
649
|
field: "job",
|
|
662
|
-
filter:
|
|
663
|
-
floatingFilterComponent:
|
|
650
|
+
filter: C,
|
|
651
|
+
floatingFilterComponent: g,
|
|
664
652
|
minWidth: 140,
|
|
665
653
|
width: 160
|
|
666
654
|
},
|
|
@@ -669,30 +657,30 @@ function Ze(e, i = {}) {
|
|
|
669
657
|
colId: "marketingConsent",
|
|
670
658
|
headerName: a("marketingConsent"),
|
|
671
659
|
hide: !0,
|
|
672
|
-
cellRenderer:
|
|
660
|
+
cellRenderer: Ie,
|
|
673
661
|
cellRendererParams: {
|
|
674
|
-
variantMap:
|
|
662
|
+
variantMap: p
|
|
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
|
-
return
|
|
668
|
+
return u.yes;
|
|
681
669
|
case 0:
|
|
682
|
-
return
|
|
670
|
+
return u.no;
|
|
683
671
|
default:
|
|
684
|
-
return
|
|
672
|
+
return u.notSpecified;
|
|
685
673
|
}
|
|
686
674
|
},
|
|
687
|
-
filter:
|
|
688
|
-
floatingFilterComponent:
|
|
675
|
+
filter: I,
|
|
676
|
+
floatingFilterComponent: R,
|
|
689
677
|
filterParams: {
|
|
690
678
|
options: [
|
|
691
|
-
{ value:
|
|
692
|
-
{ value:
|
|
679
|
+
{ value: u.yes, label: u.yes },
|
|
680
|
+
{ value: u.no, label: u.no },
|
|
693
681
|
{
|
|
694
|
-
value:
|
|
695
|
-
label:
|
|
682
|
+
value: u.notSpecified,
|
|
683
|
+
label: u.notSpecified
|
|
696
684
|
}
|
|
697
685
|
]
|
|
698
686
|
},
|
|
@@ -706,12 +694,12 @@ function Ze(e, i = {}) {
|
|
|
706
694
|
hide: !0,
|
|
707
695
|
// `YYYY/N` yearly numbering.
|
|
708
696
|
valueGetter: (t) => {
|
|
709
|
-
var
|
|
710
|
-
const
|
|
711
|
-
return
|
|
697
|
+
var b, m;
|
|
698
|
+
const i = (b = t.data) == null ? void 0 : b.yearlyNumberingYear, f = (m = t.data) == null ? void 0 : m.yearlyNumberingNumber;
|
|
699
|
+
return i != null && f != null ? `${i}/${f}` : "";
|
|
712
700
|
},
|
|
713
|
-
filter:
|
|
714
|
-
floatingFilterComponent:
|
|
701
|
+
filter: C,
|
|
702
|
+
floatingFilterComponent: g,
|
|
715
703
|
minWidth: 120,
|
|
716
704
|
width: 140
|
|
717
705
|
},
|
|
@@ -720,15 +708,15 @@ 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
|
-
valueFormatter: (t) => t.value === !0 ?
|
|
727
|
-
filter:
|
|
728
|
-
floatingFilterComponent:
|
|
714
|
+
valueFormatter: (t) => t.value === !0 ? A : W,
|
|
715
|
+
filter: I,
|
|
716
|
+
floatingFilterComponent: R,
|
|
729
717
|
filterParams: {
|
|
730
718
|
options: [
|
|
731
|
-
{ value: !0, label:
|
|
719
|
+
{ value: !0, label: A },
|
|
732
720
|
{ value: !1, label: W }
|
|
733
721
|
]
|
|
734
722
|
},
|
|
@@ -740,10 +728,10 @@ function Ze(e, i = {}) {
|
|
|
740
728
|
headerName: a("createdAt"),
|
|
741
729
|
hide: !0,
|
|
742
730
|
field: "createdAt",
|
|
743
|
-
cellRenderer:
|
|
731
|
+
cellRenderer: q,
|
|
744
732
|
cellRendererParams: { format: "date" },
|
|
745
|
-
filter:
|
|
746
|
-
floatingFilterComponent:
|
|
733
|
+
filter: z,
|
|
734
|
+
floatingFilterComponent: _,
|
|
747
735
|
minWidth: 140,
|
|
748
736
|
width: 160
|
|
749
737
|
},
|
|
@@ -753,8 +741,8 @@ function Ze(e, i = {}) {
|
|
|
753
741
|
headerName: a("city"),
|
|
754
742
|
hide: !0,
|
|
755
743
|
field: "city",
|
|
756
|
-
filter:
|
|
757
|
-
floatingFilterComponent:
|
|
744
|
+
filter: C,
|
|
745
|
+
floatingFilterComponent: g,
|
|
758
746
|
minWidth: 120,
|
|
759
747
|
width: 150
|
|
760
748
|
},
|
|
@@ -763,8 +751,8 @@ function Ze(e, i = {}) {
|
|
|
763
751
|
headerName: a("province"),
|
|
764
752
|
hide: !0,
|
|
765
753
|
field: "province",
|
|
766
|
-
filter:
|
|
767
|
-
floatingFilterComponent:
|
|
754
|
+
filter: C,
|
|
755
|
+
floatingFilterComponent: g,
|
|
768
756
|
minWidth: 100,
|
|
769
757
|
width: 120
|
|
770
758
|
},
|
|
@@ -773,8 +761,8 @@ function Ze(e, i = {}) {
|
|
|
773
761
|
headerName: a("postcode"),
|
|
774
762
|
hide: !0,
|
|
775
763
|
field: "postcode",
|
|
776
|
-
filter:
|
|
777
|
-
floatingFilterComponent:
|
|
764
|
+
filter: C,
|
|
765
|
+
floatingFilterComponent: g,
|
|
778
766
|
minWidth: 110,
|
|
779
767
|
width: 130
|
|
780
768
|
},
|
|
@@ -783,8 +771,8 @@ function Ze(e, i = {}) {
|
|
|
783
771
|
headerName: a("country"),
|
|
784
772
|
hide: !0,
|
|
785
773
|
field: "countryCode",
|
|
786
|
-
filter:
|
|
787
|
-
floatingFilterComponent:
|
|
774
|
+
filter: C,
|
|
775
|
+
floatingFilterComponent: g,
|
|
788
776
|
minWidth: 110,
|
|
789
777
|
width: 130
|
|
790
778
|
},
|
|
@@ -793,13 +781,13 @@ function Ze(e, i = {}) {
|
|
|
793
781
|
headerName: a("street"),
|
|
794
782
|
hide: !0,
|
|
795
783
|
field: "street",
|
|
796
|
-
filter:
|
|
797
|
-
floatingFilterComponent:
|
|
784
|
+
filter: C,
|
|
785
|
+
floatingFilterComponent: g,
|
|
798
786
|
minWidth: 180,
|
|
799
787
|
width: 220
|
|
800
788
|
},
|
|
801
789
|
/* ── Custom fields (per-practice, dynamic) — appended, hidden ──── */
|
|
802
|
-
...
|
|
790
|
+
...Ye(c),
|
|
803
791
|
/* ── Actions (P0, pinned-end) ──────────────────────────────────── */
|
|
804
792
|
{
|
|
805
793
|
colId: "actions",
|
|
@@ -817,11 +805,11 @@ function Ze(e, i = {}) {
|
|
|
817
805
|
cellClass: "ds:justify-start ag-cell-graphic",
|
|
818
806
|
cellRenderer: be,
|
|
819
807
|
cellRendererParams: {
|
|
820
|
-
actions:
|
|
808
|
+
actions: h,
|
|
821
809
|
intent: "ghost",
|
|
822
810
|
group: !0,
|
|
823
811
|
label: e("patientTable.actions.group"),
|
|
824
|
-
collapsed:
|
|
812
|
+
collapsed: o
|
|
825
813
|
},
|
|
826
814
|
sortable: !1,
|
|
827
815
|
filter: !1,
|
|
@@ -829,265 +817,286 @@ 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(h.length),
|
|
833
821
|
minWidth: 88
|
|
834
822
|
// Anchor — never auto-hidden (no tier).
|
|
835
823
|
}
|
|
836
824
|
];
|
|
837
825
|
}
|
|
838
|
-
const
|
|
826
|
+
const Qe = /* @__PURE__ */ new Set([
|
|
827
|
+
"api",
|
|
828
|
+
"flex",
|
|
829
|
+
"gridInitializing",
|
|
830
|
+
"gridOptionsChanged",
|
|
831
|
+
"autosizeColumns",
|
|
832
|
+
"sizeColumnsToFit",
|
|
833
|
+
"rowDataUpdated",
|
|
834
|
+
"rowModelUpdated"
|
|
835
|
+
]), Xe = [
|
|
839
836
|
{ minWidth: 0, tier: "P0" },
|
|
840
837
|
{ minWidth: 640, tier: "P1" },
|
|
841
838
|
{ minWidth: 900, tier: "P2" },
|
|
842
839
|
{ minWidth: 1200, tier: "P3" }
|
|
843
840
|
];
|
|
844
|
-
function
|
|
845
|
-
const
|
|
846
|
-
for (const
|
|
847
|
-
e >=
|
|
848
|
-
return
|
|
841
|
+
function Je(e, n) {
|
|
842
|
+
const s = /* @__PURE__ */ new Set();
|
|
843
|
+
for (const o of n)
|
|
844
|
+
e >= o.minWidth && s.add(o.tier);
|
|
845
|
+
return s.add("P0"), s;
|
|
849
846
|
}
|
|
850
|
-
function
|
|
847
|
+
function Ze(e, n) {
|
|
851
848
|
const {
|
|
852
|
-
containerRef:
|
|
853
|
-
enabled:
|
|
854
|
-
breakpoints:
|
|
855
|
-
} =
|
|
856
|
-
return
|
|
857
|
-
const d =
|
|
858
|
-
if (!
|
|
859
|
-
const
|
|
860
|
-
var
|
|
861
|
-
return (
|
|
862
|
-
}, C = (r) => {
|
|
863
|
-
if (u.current || r.source === "api") return;
|
|
864
|
-
const h = r.columns ?? (r.column ? [r.column] : []);
|
|
865
|
-
for (const v of h)
|
|
866
|
-
l.current.add(v.getColId());
|
|
849
|
+
containerRef: s,
|
|
850
|
+
enabled: o = !0,
|
|
851
|
+
breakpoints: l = Xe
|
|
852
|
+
} = n, r = G(/* @__PURE__ */ new Set()), c = G(!1);
|
|
853
|
+
return te(() => {
|
|
854
|
+
const d = s.current;
|
|
855
|
+
if (!o || !d) return;
|
|
856
|
+
const u = () => {
|
|
857
|
+
var m;
|
|
858
|
+
return (m = e.current) == null ? void 0 : m.getRawApi();
|
|
867
859
|
};
|
|
868
|
-
let
|
|
869
|
-
const
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
}, t = () => {
|
|
880
|
-
const r = m();
|
|
881
|
-
if (!r) return;
|
|
882
|
-
w(r);
|
|
883
|
-
const h = r.getColumns();
|
|
884
|
-
if (!h) return;
|
|
885
|
-
const v = d.getBoundingClientRect().width, D = Z(v, o), T = [], I = [];
|
|
886
|
-
for (const S of h) {
|
|
887
|
-
const V = S.getColId();
|
|
888
|
-
if (l.current.has(V)) continue;
|
|
889
|
-
const A = q(S.getColDef());
|
|
890
|
-
if (!A) continue;
|
|
891
|
-
const E = D.has(A);
|
|
892
|
-
E && !S.isVisible() ? T.push(S) : !E && S.isVisible() && I.push(S);
|
|
860
|
+
let p;
|
|
861
|
+
const a = () => {
|
|
862
|
+
p === void 0 && (p = window.setTimeout(() => {
|
|
863
|
+
p = void 0, f();
|
|
864
|
+
}, 0));
|
|
865
|
+
}, T = (m) => {
|
|
866
|
+
var O;
|
|
867
|
+
if (c.current) return;
|
|
868
|
+
if (Qe.has(m.source)) {
|
|
869
|
+
a();
|
|
870
|
+
return;
|
|
893
871
|
}
|
|
894
|
-
|
|
895
|
-
|
|
872
|
+
const V = (m.columns ?? (m.column ? [m.column] : [])).map((D) => D.getColId());
|
|
873
|
+
for (const D of V) r.current.add(D);
|
|
874
|
+
(O = e.current) == null || O.markColumnsUserTouched(V);
|
|
875
|
+
};
|
|
876
|
+
let t = !1;
|
|
877
|
+
const i = (m) => {
|
|
878
|
+
t || (t = !0, m.addEventListener("columnVisible", T));
|
|
879
|
+
}, f = () => {
|
|
880
|
+
var M;
|
|
881
|
+
const m = u();
|
|
882
|
+
if (!m) return;
|
|
883
|
+
i(m);
|
|
884
|
+
const x = m.getColumns();
|
|
885
|
+
if (!x) return;
|
|
886
|
+
const V = d.getBoundingClientRect().width, O = Je(V, l), D = new Set(
|
|
887
|
+
((M = e.current) == null ? void 0 : M.getUserTouchedColumns()) ?? []
|
|
888
|
+
), P = [], F = [];
|
|
889
|
+
for (const N of x) {
|
|
890
|
+
const L = N.getColId();
|
|
891
|
+
if (r.current.has(L) || D.has(L))
|
|
892
|
+
continue;
|
|
893
|
+
const U = le(N.getColDef());
|
|
894
|
+
if (!U) continue;
|
|
895
|
+
const B = O.has(U);
|
|
896
|
+
B && !N.isVisible() ? P.push(N) : !B && N.isVisible() && F.push(N);
|
|
897
|
+
}
|
|
898
|
+
if (!(P.length === 0 && F.length === 0)) {
|
|
899
|
+
c.current = !0;
|
|
896
900
|
try {
|
|
897
|
-
|
|
901
|
+
P.length > 0 && m.setColumnsVisible(P, !0), F.length > 0 && m.setColumnsVisible(F, !1);
|
|
898
902
|
} finally {
|
|
899
|
-
|
|
903
|
+
c.current = !1;
|
|
900
904
|
}
|
|
901
905
|
}
|
|
902
|
-
},
|
|
903
|
-
return
|
|
904
|
-
var
|
|
905
|
-
|
|
906
|
+
}, b = new ResizeObserver(() => f());
|
|
907
|
+
return b.observe(d), f(), () => {
|
|
908
|
+
var m;
|
|
909
|
+
b.disconnect(), p !== void 0 && window.clearTimeout(p), (m = u()) == null || m.removeEventListener("columnVisible", T);
|
|
906
910
|
};
|
|
907
|
-
}, [
|
|
908
|
-
|
|
909
|
-
|
|
911
|
+
}, [s, o, l, e]), { lockColumns: j(
|
|
912
|
+
(d) => {
|
|
913
|
+
var u;
|
|
914
|
+
for (const p of d) r.current.add(p);
|
|
915
|
+
(u = e.current) == null || u.markColumnsUserTouched(d);
|
|
916
|
+
},
|
|
917
|
+
[e]
|
|
918
|
+
) };
|
|
910
919
|
}
|
|
911
|
-
function
|
|
912
|
-
var
|
|
913
|
-
return (
|
|
920
|
+
function et(e) {
|
|
921
|
+
var n;
|
|
922
|
+
return (n = e.data) != null && n.isArchived ? "data-table-row-archived" : void 0;
|
|
914
923
|
}
|
|
915
|
-
function
|
|
924
|
+
function tt(e) {
|
|
916
925
|
return e.data.id;
|
|
917
926
|
}
|
|
918
|
-
function
|
|
927
|
+
function nt({
|
|
919
928
|
views: e,
|
|
920
|
-
handleRef:
|
|
921
|
-
lockColumns:
|
|
922
|
-
label:
|
|
929
|
+
handleRef: n,
|
|
930
|
+
lockColumns: s,
|
|
931
|
+
label: o
|
|
923
932
|
}) {
|
|
924
|
-
const [
|
|
925
|
-
() => e.map((
|
|
933
|
+
const [l, r] = ne(""), c = Q(
|
|
934
|
+
() => e.map((u) => ({ value: u.id, label: u.label })),
|
|
926
935
|
[e]
|
|
927
|
-
),
|
|
928
|
-
(
|
|
929
|
-
const
|
|
930
|
-
if (!
|
|
931
|
-
const
|
|
932
|
-
if (
|
|
933
|
-
const t = new Set(
|
|
934
|
-
for (const
|
|
935
|
-
if (
|
|
936
|
-
const
|
|
937
|
-
t.has(
|
|
936
|
+
), h = j(
|
|
937
|
+
(u) => {
|
|
938
|
+
const p = e.find((t) => t.id === u), a = n.current;
|
|
939
|
+
if (!p || !a) return;
|
|
940
|
+
const T = a.getRawApi();
|
|
941
|
+
if (T) {
|
|
942
|
+
const t = new Set(p.columns), i = [], f = [];
|
|
943
|
+
for (const b of T.getColumns() ?? []) {
|
|
944
|
+
if (le(b.getColDef()) === void 0) continue;
|
|
945
|
+
const m = b.getColId();
|
|
946
|
+
t.has(m) ? i.push(m) : f.push(m);
|
|
938
947
|
}
|
|
939
|
-
|
|
948
|
+
s([...i, ...f]), i.length > 0 && T.setColumnsVisible(i, !0), f.length > 0 && T.setColumnsVisible(f, !1);
|
|
940
949
|
}
|
|
941
|
-
a.setFilter(
|
|
950
|
+
a.setFilter(p.filterModel), a.setSort(p.sortModel), T == null || T.onFilterChanged();
|
|
942
951
|
},
|
|
943
|
-
[e,
|
|
944
|
-
), d =
|
|
945
|
-
(
|
|
946
|
-
|
|
952
|
+
[e, n, s]
|
|
953
|
+
), d = j(
|
|
954
|
+
(u) => {
|
|
955
|
+
r(u), u && h(u);
|
|
947
956
|
},
|
|
948
|
-
[
|
|
957
|
+
[h]
|
|
949
958
|
);
|
|
950
959
|
return (
|
|
951
960
|
// Width-constraining wrapper (same pattern as the toolbar's QuickSearch) so
|
|
952
961
|
// the Select's intrinsic `w-full` trigger sizes to a compact, legible width
|
|
953
962
|
// instead of absorbing the whole FilterBar row.
|
|
954
|
-
/* @__PURE__ */
|
|
963
|
+
/* @__PURE__ */ v("div", { className: "ds:w-[12rem] ds:max-w-full ds:min-w-0 ds:shrink-0", children: /* @__PURE__ */ v(
|
|
955
964
|
Ce,
|
|
956
965
|
{
|
|
957
|
-
options:
|
|
958
|
-
value:
|
|
966
|
+
options: c,
|
|
967
|
+
value: l,
|
|
959
968
|
onValueChange: d,
|
|
960
969
|
size: "sm",
|
|
961
|
-
"aria-label":
|
|
970
|
+
"aria-label": o
|
|
962
971
|
}
|
|
963
972
|
) })
|
|
964
973
|
);
|
|
965
974
|
}
|
|
966
|
-
const
|
|
975
|
+
const it = he(
|
|
967
976
|
function({
|
|
968
|
-
rowData:
|
|
969
|
-
columns:
|
|
970
|
-
gridId:
|
|
971
|
-
density:
|
|
972
|
-
actionsCompact:
|
|
973
|
-
heightClass:
|
|
974
|
-
responsive:
|
|
977
|
+
rowData: n,
|
|
978
|
+
columns: s,
|
|
979
|
+
gridId: o,
|
|
980
|
+
density: l,
|
|
981
|
+
actionsCompact: r,
|
|
982
|
+
heightClass: c,
|
|
983
|
+
responsive: h = !0,
|
|
975
984
|
views: d,
|
|
976
|
-
onRowAction:
|
|
977
|
-
bulkActions:
|
|
985
|
+
onRowAction: u,
|
|
986
|
+
bulkActions: p,
|
|
978
987
|
loading: a = !1,
|
|
979
|
-
toolbar:
|
|
988
|
+
toolbar: T,
|
|
980
989
|
hideQuickSearch: t = !1,
|
|
981
|
-
pagination:
|
|
982
|
-
paginationPageSizeSelector:
|
|
983
|
-
hideDetails:
|
|
984
|
-
identityHref:
|
|
985
|
-
customFields:
|
|
986
|
-
"aria-label":
|
|
987
|
-
className:
|
|
988
|
-
},
|
|
989
|
-
const { t:
|
|
990
|
+
pagination: i = !1,
|
|
991
|
+
paginationPageSizeSelector: f,
|
|
992
|
+
hideDetails: b = !1,
|
|
993
|
+
identityHref: m,
|
|
994
|
+
customFields: x,
|
|
995
|
+
"aria-label": V,
|
|
996
|
+
className: O
|
|
997
|
+
}, D) {
|
|
998
|
+
const { t: P } = K("ui"), F = G(null), M = G(null), [N, L] = ne(null);
|
|
990
999
|
pe(
|
|
991
|
-
|
|
992
|
-
() =>
|
|
993
|
-
[
|
|
1000
|
+
D,
|
|
1001
|
+
() => N ?? F.current,
|
|
1002
|
+
[N]
|
|
994
1003
|
);
|
|
995
|
-
const { lockColumns:
|
|
996
|
-
containerRef:
|
|
997
|
-
enabled:
|
|
998
|
-
}),
|
|
999
|
-
|
|
1004
|
+
const { lockColumns: U } = Ze(F, {
|
|
1005
|
+
containerRef: M,
|
|
1006
|
+
enabled: h
|
|
1007
|
+
}), B = r ?? l === "compact", X = G(B), J = j(() => X.current, []);
|
|
1008
|
+
te(() => {
|
|
1000
1009
|
var y;
|
|
1001
|
-
|
|
1002
|
-
const
|
|
1003
|
-
|
|
1010
|
+
X.current = B;
|
|
1011
|
+
const w = (y = F.current) == null ? void 0 : y.getRawApi();
|
|
1012
|
+
w && (w.setColumnWidths([
|
|
1004
1013
|
{
|
|
1005
1014
|
key: "actions",
|
|
1006
|
-
newWidth:
|
|
1015
|
+
newWidth: B ? 88 : ie(He)
|
|
1007
1016
|
}
|
|
1008
|
-
]),
|
|
1009
|
-
}, [
|
|
1010
|
-
const oe =
|
|
1011
|
-
() =>
|
|
1012
|
-
hideDetails:
|
|
1013
|
-
onRowAction:
|
|
1014
|
-
identityHref:
|
|
1015
|
-
customFields:
|
|
1016
|
-
getActionsCompact:
|
|
1017
|
+
]), w.refreshCells({ force: !0 }));
|
|
1018
|
+
}, [B, N]);
|
|
1019
|
+
const oe = Q(
|
|
1020
|
+
() => s ?? qe(P, {
|
|
1021
|
+
hideDetails: b,
|
|
1022
|
+
onRowAction: u,
|
|
1023
|
+
identityHref: m,
|
|
1024
|
+
customFields: x,
|
|
1025
|
+
getActionsCompact: J
|
|
1017
1026
|
}),
|
|
1018
1027
|
[
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1028
|
+
s,
|
|
1029
|
+
P,
|
|
1030
|
+
b,
|
|
1031
|
+
u,
|
|
1022
1032
|
m,
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
X
|
|
1033
|
+
x,
|
|
1034
|
+
J
|
|
1026
1035
|
]
|
|
1027
|
-
), se = ((d == null ? void 0 : d.length) ?? 0) > 0, de = /* @__PURE__ */
|
|
1028
|
-
/* @__PURE__ */
|
|
1029
|
-
se && d ? /* @__PURE__ */
|
|
1030
|
-
|
|
1036
|
+
), se = ((d == null ? void 0 : d.length) ?? 0) > 0, de = /* @__PURE__ */ k(S.Toolbar, { children: [
|
|
1037
|
+
/* @__PURE__ */ k(S.Toolbar.FilterBar, { children: [
|
|
1038
|
+
se && d ? /* @__PURE__ */ v(
|
|
1039
|
+
nt,
|
|
1031
1040
|
{
|
|
1032
1041
|
views: d,
|
|
1033
|
-
handleRef:
|
|
1034
|
-
lockColumns:
|
|
1035
|
-
label:
|
|
1042
|
+
handleRef: F,
|
|
1043
|
+
lockColumns: U,
|
|
1044
|
+
label: P("patientTable.views.label")
|
|
1036
1045
|
}
|
|
1037
1046
|
) : null,
|
|
1038
|
-
t ? null : /* @__PURE__ */
|
|
1039
|
-
/* @__PURE__ */
|
|
1047
|
+
t ? null : /* @__PURE__ */ v(S.Toolbar.QuickSearch, {}),
|
|
1048
|
+
/* @__PURE__ */ v(S.Toolbar.FilterChips, {})
|
|
1040
1049
|
] }),
|
|
1041
|
-
/* @__PURE__ */
|
|
1042
|
-
|
|
1043
|
-
|
|
1050
|
+
/* @__PURE__ */ k(S.Toolbar.Actions, { children: [
|
|
1051
|
+
p == null ? void 0 : p.map((w) => /* @__PURE__ */ v(
|
|
1052
|
+
S.Toolbar.BulkAction,
|
|
1044
1053
|
{
|
|
1045
|
-
label:
|
|
1046
|
-
icon:
|
|
1047
|
-
variant:
|
|
1054
|
+
label: w.label,
|
|
1055
|
+
icon: w.icon,
|
|
1056
|
+
variant: w.variant,
|
|
1048
1057
|
onClick: (y) => {
|
|
1049
|
-
const fe = (y == null ? void 0 : y.getSelectedNodes().map((
|
|
1050
|
-
|
|
1058
|
+
const fe = (y == null ? void 0 : y.getSelectedNodes().map((Y) => Y.id).filter((Y) => Y != null)) ?? [];
|
|
1059
|
+
w.onSelect(fe);
|
|
1051
1060
|
}
|
|
1052
1061
|
},
|
|
1053
|
-
|
|
1062
|
+
w.id
|
|
1054
1063
|
)),
|
|
1055
|
-
/* @__PURE__ */
|
|
1056
|
-
/* @__PURE__ */
|
|
1064
|
+
/* @__PURE__ */ v(S.Toolbar.ColumnToggle, {}),
|
|
1065
|
+
/* @__PURE__ */ v(S.Toolbar.ExportMenu, {})
|
|
1057
1066
|
] })
|
|
1058
|
-
] }), ce =
|
|
1067
|
+
] }), ce = T ?? de, ue = a ? void 0 : n, me = Q(() => ({ getRowId: tt }), []);
|
|
1059
1068
|
return ve(
|
|
1060
1069
|
ge,
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
), /* @__PURE__ */
|
|
1070
|
+
N,
|
|
1071
|
+
o
|
|
1072
|
+
), /* @__PURE__ */ v(
|
|
1064
1073
|
"div",
|
|
1065
1074
|
{
|
|
1066
|
-
ref:
|
|
1075
|
+
ref: M,
|
|
1067
1076
|
role: "region",
|
|
1068
|
-
"aria-label":
|
|
1077
|
+
"aria-label": V ?? P("patientTable.regionLabel"),
|
|
1069
1078
|
"data-component": "patient-table",
|
|
1070
|
-
"data-component-id":
|
|
1079
|
+
"data-component-id": o,
|
|
1071
1080
|
className: "ds:flex ds:w-full ds:min-h-0 ds:flex-1 ds:flex-col",
|
|
1072
|
-
children: /* @__PURE__ */
|
|
1073
|
-
|
|
1081
|
+
children: /* @__PURE__ */ v(
|
|
1082
|
+
S,
|
|
1074
1083
|
{
|
|
1075
|
-
ref: (
|
|
1076
|
-
|
|
1077
|
-
(y) => y ===
|
|
1084
|
+
ref: (w) => {
|
|
1085
|
+
F.current = w, L(
|
|
1086
|
+
(y) => y === w ? y : w
|
|
1078
1087
|
);
|
|
1079
1088
|
},
|
|
1080
|
-
gridId:
|
|
1089
|
+
gridId: o,
|
|
1081
1090
|
columnDefs: oe,
|
|
1082
1091
|
rowData: ue,
|
|
1083
1092
|
rowSelection: "multiple",
|
|
1084
|
-
pagination:
|
|
1085
|
-
...
|
|
1086
|
-
...
|
|
1087
|
-
density:
|
|
1088
|
-
getRowClass:
|
|
1093
|
+
pagination: i,
|
|
1094
|
+
...c !== void 0 ? { heightClass: c } : {},
|
|
1095
|
+
...f !== void 0 ? { paginationPageSizeSelector: f } : {},
|
|
1096
|
+
density: l,
|
|
1097
|
+
getRowClass: et,
|
|
1089
1098
|
gridOptions: me,
|
|
1090
|
-
className:
|
|
1099
|
+
className: O,
|
|
1091
1100
|
children: ce
|
|
1092
1101
|
}
|
|
1093
1102
|
)
|
|
@@ -1095,15 +1104,38 @@ const lt = he(
|
|
|
1095
1104
|
);
|
|
1096
1105
|
}
|
|
1097
1106
|
);
|
|
1098
|
-
|
|
1107
|
+
it.displayName = "PatientTable";
|
|
1108
|
+
const at = 5e4;
|
|
1109
|
+
function rt(e) {
|
|
1110
|
+
return e === 0 ? { variant: "success", statusKey: "settled" } : e <= at ? { variant: "warning", statusKey: "pending" } : { variant: "error", statusKey: "overdue" };
|
|
1111
|
+
}
|
|
1112
|
+
function lt(e) {
|
|
1113
|
+
if (e == null || e === "") return null;
|
|
1114
|
+
const n = typeof e == "number" ? e : Number(e);
|
|
1115
|
+
return Number.isFinite(n) ? n : null;
|
|
1116
|
+
}
|
|
1117
|
+
function It(e) {
|
|
1118
|
+
const { value: n, currency: s = "EUR", options: o } = e, { t: l, i18n: r } = K("ui"), c = lt(n);
|
|
1119
|
+
if (c === null) return null;
|
|
1120
|
+
const h = r.language || "en", d = new Intl.NumberFormat(h, {
|
|
1121
|
+
style: "currency",
|
|
1122
|
+
currency: s,
|
|
1123
|
+
...o
|
|
1124
|
+
}).format(c / 100), { variant: u, statusKey: p } = rt(c), a = l(`patientTable.balance.status.${p}`);
|
|
1125
|
+
return /* @__PURE__ */ k(re, { variant: u, withDot: !0, size: "sm", className: "ds:tabular-nums", children: [
|
|
1126
|
+
/* @__PURE__ */ v("span", { children: d }),
|
|
1127
|
+
/* @__PURE__ */ v("span", { className: "ds:sr-only", children: a })
|
|
1128
|
+
] });
|
|
1129
|
+
}
|
|
1099
1130
|
export {
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1131
|
+
It as B,
|
|
1132
|
+
ke as C,
|
|
1133
|
+
ze as N,
|
|
1134
|
+
He as P,
|
|
1135
|
+
Z as T,
|
|
1136
|
+
it as a,
|
|
1137
|
+
qe as b,
|
|
1138
|
+
le as g,
|
|
1139
|
+
Ze as u
|
|
1108
1140
|
};
|
|
1109
|
-
//# sourceMappingURL=
|
|
1141
|
+
//# sourceMappingURL=balance-badge-cell-DK9wxCxW.js.map
|