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