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