@alfadocs/ui-kit 1.36.1 → 1.37.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/appointment-peek-5S4O1VQP.js +115 -0
- package/dist/_chunks/appointment-peek.agent-C539tNFM.js +17 -0
- package/dist/_chunks/building-2-D33bLCWL.js +24 -0
- package/dist/_chunks/calendar-workspace-BqKBj26r.js +9715 -0
- package/dist/_chunks/{control-room-rail-Ds45_g4f.js → control-room-rail-DQoHdE1U.js} +2 -2
- package/dist/_chunks/editable-description-BOfAeY3T.js +112 -0
- package/dist/_chunks/editable-description.agent-Bm_LBV2j.js +21 -0
- package/dist/_chunks/{money.agent-Dw55UxUA.js → money-BY-HmKhZ.js} +33 -47
- package/dist/_chunks/money.agent-BjJ6gOkx.js +17 -0
- package/dist/_chunks/notes-panel-4y5JioWN.js +556 -0
- package/dist/_chunks/panel-subview-BNXN8OEL.js +160 -0
- package/dist/_chunks/panel-subview.agent-BIBvE-IW.js +17 -0
- package/dist/_chunks/{patient-details-f7SSXkTJ.js → patient-details-2cIaL-Zb.js} +2 -2
- package/dist/_chunks/{patient-field-row-BQZoP4m2.js → patient-field-row-IHb2VFc2.js} +193 -172
- package/dist/_chunks/{patient-summary-card-Bz7KdUin.js → patient-summary-card-BzmJH9a-.js} +2 -2
- package/dist/_chunks/{section-card.agent-W18CHEgX.js → section-card-XR2bW1Ie.js} +20 -34
- package/dist/_chunks/section-card.agent-Bz1BhM_j.js +17 -0
- package/dist/_chunks/smartphone-DaPcFw-X.js +32 -0
- package/dist/_chunks/{task-card-BalrLkSz.js → task-card-qTKD1fIT.js} +39 -57
- package/dist/_chunks/{task-tray-wl9eti6J.js → task-tray-CQ8UAR2j.js} +2 -2
- package/dist/_chunks/{tasks-panel-BDNB7hsZ.js → tasks-panel-CBGMtQ_f.js} +2 -2
- package/dist/_chunks/{tool-rail-Bq5eiFMG.js → tool-rail-BP8sjxCw.js} +310 -231
- package/dist/_chunks/treatment-receipt-D4kOLXOk.js +94 -0
- package/dist/_chunks/treatment-receipt.agent-bpFm2RPH.js +21 -0
- package/dist/_chunks/use-presence-transition-cDwWUXV-.js +58 -0
- package/dist/_chunks/{workflow-map-D-LEni11.js → workflow-map-CXdsxvUj.js} +140 -156
- package/dist/agent-catalog.json +65 -1
- package/dist/components/appointment-peek/appointment-peek.agent.d.ts +3 -0
- package/dist/components/appointment-peek/appointment-peek.d.ts +45 -0
- package/dist/components/appointment-peek/index.d.ts +4 -0
- package/dist/components/appointment-peek/index.js +7 -0
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/editable-description/editable-description.agent.d.ts +3 -0
- package/dist/components/editable-description/editable-description.d.ts +20 -0
- package/dist/components/editable-description/index.d.ts +4 -0
- package/dist/components/editable-description/index.js +7 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/money/index.js +2 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +16 -0
- package/dist/components/panel-subview/index.d.ts +4 -0
- package/dist/components/panel-subview/index.js +7 -0
- package/dist/components/panel-subview/panel-subview.agent.d.ts +3 -0
- package/dist/components/panel-subview/panel-subview.d.ts +32 -0
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/section-card/index.js +4 -3
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/treatment-receipt/index.d.ts +4 -0
- package/dist/components/treatment-receipt/index.js +7 -0
- package/dist/components/treatment-receipt/treatment-receipt.agent.d.ts +3 -0
- package/dist/components/treatment-receipt/treatment-receipt.d.ts +30 -0
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +9 -7
- package/dist/hooks/use-presence-transition.d.ts +40 -0
- package/dist/host-compat.css +7 -1
- package/dist/i18n/locales/ar.d.ts +29 -5
- package/dist/i18n/locales/ar.js +29 -5
- package/dist/i18n/locales/de.d.ts +29 -5
- package/dist/i18n/locales/de.js +29 -5
- package/dist/i18n/locales/el.d.ts +29 -5
- package/dist/i18n/locales/el.js +29 -5
- package/dist/i18n/locales/en.d.ts +29 -5
- package/dist/i18n/locales/en.js +29 -5
- package/dist/i18n/locales/es.d.ts +29 -5
- package/dist/i18n/locales/es.js +29 -5
- package/dist/i18n/locales/fr.d.ts +29 -5
- package/dist/i18n/locales/fr.js +29 -5
- package/dist/i18n/locales/hi.d.ts +29 -5
- package/dist/i18n/locales/hi.js +29 -5
- package/dist/i18n/locales/it.d.ts +29 -5
- package/dist/i18n/locales/it.js +29 -5
- package/dist/i18n/locales/ja.d.ts +29 -5
- package/dist/i18n/locales/ja.js +29 -5
- package/dist/i18n/locales/nl.d.ts +29 -5
- package/dist/i18n/locales/nl.js +29 -5
- package/dist/i18n/locales/pl.d.ts +29 -5
- package/dist/i18n/locales/pl.js +29 -5
- package/dist/i18n/locales/pt.d.ts +29 -5
- package/dist/i18n/locales/pt.js +29 -5
- package/dist/i18n/locales/ro.d.ts +29 -5
- package/dist/i18n/locales/ro.js +29 -5
- package/dist/i18n/locales/ru.d.ts +29 -5
- package/dist/i18n/locales/ru.js +29 -5
- package/dist/i18n/locales/sq.d.ts +29 -5
- package/dist/i18n/locales/sq.js +29 -5
- package/dist/i18n/locales/sv.d.ts +29 -5
- package/dist/i18n/locales/sv.js +29 -5
- package/dist/i18n/locales/tr.d.ts +29 -5
- package/dist/i18n/locales/tr.js +29 -5
- package/dist/i18n/locales/zh.d.ts +29 -5
- package/dist/i18n/locales/zh.js +29 -5
- package/dist/index.js +958 -940
- package/dist/locales/ar.json +29 -5
- package/dist/locales/de.json +29 -5
- package/dist/locales/el.json +29 -5
- package/dist/locales/en.json +29 -5
- package/dist/locales/es.json +29 -5
- package/dist/locales/fr.json +29 -5
- package/dist/locales/hi.json +29 -5
- package/dist/locales/it.json +29 -5
- package/dist/locales/ja.json +29 -5
- package/dist/locales/nl.json +29 -5
- package/dist/locales/pl.json +29 -5
- package/dist/locales/pt.json +29 -5
- package/dist/locales/ro.json +29 -5
- package/dist/locales/ru.json +29 -5
- package/dist/locales/sq.json +29 -5
- package/dist/locales/sv.json +29 -5
- package/dist/locales/tr.json +29 -5
- package/dist/locales/zh.json +29 -5
- package/dist/patterns/calendar/calendar-appointment-details.d.ts +15 -6
- package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts +23 -23
- package/dist/patterns/calendar/calendar-info-hover.d.ts +18 -0
- package/dist/patterns/calendar/calendar.journey.d.ts +10 -0
- package/dist/patterns/calendar/calendar.sheets.d.ts +2 -2
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +17 -1
- package/dist/_chunks/calendar-workspace-BYwQK7fz.js +0 -9478
- package/dist/_chunks/hourglass-BEAzW1wE.js +0 -26
- package/dist/_chunks/notes-panel-Co8D3uDd.js +0 -469
- package/dist/_chunks/smartphone-C0rFF2if.js +0 -15
|
@@ -1,102 +1,122 @@
|
|
|
1
|
-
import { useMemo as
|
|
1
|
+
import { useMemo as _, useCallback as k, useState as z, cloneElement as W, useId as Y } from "react";
|
|
2
2
|
import { u as Z } from "./use-controllable-state-BiY4xTzM.js";
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import { useTranslation as
|
|
3
|
+
import { jsxs as V, jsx as t, Fragment as q } from "react/jsx-runtime";
|
|
4
|
+
import { useTranslation as A } from "react-i18next";
|
|
5
5
|
import { B as ee } from "./button-nJaPh_HC.js";
|
|
6
6
|
import { I } from "./icon-button-8xqRnkdG.js";
|
|
7
|
-
import { C as
|
|
7
|
+
import { C as j } from "./checkbox-CZkipDn7.js";
|
|
8
8
|
import { P as O } from "./popover-DzR5QYxp.js";
|
|
9
9
|
import { S as te } from "./separator-CYU_bGFn.js";
|
|
10
10
|
import { S as ae } from "./settings-d25ju_6L.js";
|
|
11
11
|
import { G as ne } from "./grip-vertical-onSb1JXO.js";
|
|
12
|
-
import { D as
|
|
13
|
-
import { B as
|
|
14
|
-
import { L as
|
|
15
|
-
import { T as
|
|
12
|
+
import { D as $ } from "./description-list-C1RXMDZ_.js";
|
|
13
|
+
import { B as R } from "./badge-BudgzTe_.js";
|
|
14
|
+
import { L as se } from "./link-CPb_pZPr.js";
|
|
15
|
+
import { T as re } from "./transaction-chip-Dth1nThY.js";
|
|
16
16
|
import { H as ie } from "./hash-CSQ9SChR.js";
|
|
17
17
|
import { C as oe } from "./calendar-days-BGWklvE-.js";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { C as de } from "./
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { P as he } from "./
|
|
28
|
-
import { P as ye } from "./
|
|
29
|
-
import {
|
|
30
|
-
import { S as ve } from "./
|
|
31
|
-
import {
|
|
32
|
-
import { T as Ce } from "./text-
|
|
33
|
-
import { T as Ve } from "./text-input-CUvCb6ST.js";
|
|
18
|
+
import { c as U } from "./createLucideIcon-DhHxpK9K.js";
|
|
19
|
+
import { U as le } from "./user-B12p7bVF.js";
|
|
20
|
+
import { C as ce } from "./city-input-DaQc-Hbj.js";
|
|
21
|
+
import { C as de } from "./country-select-CfDNFG5c.js";
|
|
22
|
+
import { D as ue } from "./date-picker-6tFnKFty.js";
|
|
23
|
+
import { E as me } from "./email-input-Dpe63k0K.js";
|
|
24
|
+
import { F as pe } from "./fiscal-code-input-CkwIdB1y.js";
|
|
25
|
+
import { N as fe } from "./number-input-Cgu2TtA8.js";
|
|
26
|
+
import { P as ge } from "./phone-input-BsZIoE36.js";
|
|
27
|
+
import { P as he } from "./postal-code-input-BznBxVxf.js";
|
|
28
|
+
import { P as ye } from "./province-select-BaUnkg4S.js";
|
|
29
|
+
import { S as be } from "./select-CLSUnKjF.js";
|
|
30
|
+
import { S as ve } from "./switch-OILsBLWo.js";
|
|
31
|
+
import { T as xe } from "./text-area-Bt3p7Pt0.js";
|
|
32
|
+
import { T as Ce } from "./text-input-CUvCb6ST.js";
|
|
34
33
|
import { C as K } from "./check-DrFSN__t.js";
|
|
35
34
|
import { X as ke } from "./x-B5YnXwCz.js";
|
|
36
|
-
import { P as
|
|
37
|
-
import { L as
|
|
38
|
-
import { C as
|
|
35
|
+
import { P as Ve } from "./pencil-B1sKKyuT.js";
|
|
36
|
+
import { L as Ne } from "./lock-ClAFG1gy.js";
|
|
37
|
+
import { C as De } from "./copy-vRpqqHtY.js";
|
|
39
38
|
/**
|
|
40
39
|
* @license lucide-react v1.22.0 - ISC
|
|
41
40
|
*
|
|
42
41
|
* This source code is licensed under the ISC license.
|
|
43
42
|
* See the LICENSE file in the root directory of this source tree.
|
|
44
43
|
*/
|
|
45
|
-
const
|
|
44
|
+
const we = [
|
|
45
|
+
["path", { d: "M5 22h14", key: "ehvnwv" }],
|
|
46
|
+
["path", { d: "M5 2h14", key: "pdyrp9" }],
|
|
47
|
+
[
|
|
48
|
+
"path",
|
|
49
|
+
{
|
|
50
|
+
d: "M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",
|
|
51
|
+
key: "1d314k"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
[
|
|
55
|
+
"path",
|
|
56
|
+
{ d: "M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2", key: "1vvvr6" }
|
|
57
|
+
]
|
|
58
|
+
], Se = U("hourglass", we);
|
|
59
|
+
/**
|
|
60
|
+
* @license lucide-react v1.22.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/
|
|
65
|
+
const Te = [
|
|
46
66
|
["path", { d: "M16 3h5v5", key: "1806ms" }],
|
|
47
67
|
["path", { d: "m21 3-6.75 6.75", key: "pv0uzu" }],
|
|
48
68
|
["circle", { cx: "10", cy: "14", r: "6", key: "1qwbdc" }]
|
|
49
|
-
],
|
|
69
|
+
], ze = U("mars", Te);
|
|
50
70
|
/**
|
|
51
71
|
* @license lucide-react v1.22.0 - ISC
|
|
52
72
|
*
|
|
53
73
|
* This source code is licensed under the ISC license.
|
|
54
74
|
* See the LICENSE file in the root directory of this source tree.
|
|
55
75
|
*/
|
|
56
|
-
const
|
|
76
|
+
const Pe = [
|
|
57
77
|
["path", { d: "M12 15v7", key: "t2xh3l" }],
|
|
58
78
|
["path", { d: "M9 19h6", key: "456am0" }],
|
|
59
79
|
["circle", { cx: "12", cy: "9", r: "6", key: "1nw4tq" }]
|
|
60
|
-
],
|
|
80
|
+
], Ae = U("venus", Pe);
|
|
61
81
|
function X(e) {
|
|
62
82
|
return e.flatMap((n) => n.fields.map((a) => a.id));
|
|
63
83
|
}
|
|
64
84
|
function Nt(e, n) {
|
|
65
|
-
const a = n ?? X(e),
|
|
66
|
-
return e.map((
|
|
67
|
-
section:
|
|
68
|
-
fields:
|
|
69
|
-
(h, l) =>
|
|
85
|
+
const a = n ?? X(e), s = new Map(a.map((r, h) => [r, h]));
|
|
86
|
+
return e.map((r) => ({
|
|
87
|
+
section: r,
|
|
88
|
+
fields: r.fields.filter((h) => s.has(h.id)).sort(
|
|
89
|
+
(h, l) => s.get(h.id) - s.get(l.id)
|
|
70
90
|
)
|
|
71
91
|
}));
|
|
72
92
|
}
|
|
73
|
-
function Dt(e, { value: n, defaultValue: a, onChange:
|
|
74
|
-
const
|
|
93
|
+
function Dt(e, { value: n, defaultValue: a, onChange: s } = {}) {
|
|
94
|
+
const r = _(
|
|
75
95
|
() => X(e),
|
|
76
96
|
[e]
|
|
77
97
|
), [h, l] = Z({
|
|
78
98
|
value: n,
|
|
79
|
-
defaultValue: a ??
|
|
80
|
-
onChange:
|
|
81
|
-
}), c = h ?? a ??
|
|
99
|
+
defaultValue: a ?? r,
|
|
100
|
+
onChange: s
|
|
101
|
+
}), c = h ?? a ?? r, m = _(() => {
|
|
82
102
|
const g = /* @__PURE__ */ new Map();
|
|
83
103
|
for (const y of e)
|
|
84
104
|
for (const x of y.fields)
|
|
85
105
|
g.set(x.id, { field: x, sectionId: y.id });
|
|
86
106
|
return g;
|
|
87
|
-
}, [e]), d =
|
|
107
|
+
}, [e]), d = k(
|
|
88
108
|
(g) => {
|
|
89
109
|
l(g.filter((y) => m.has(y)));
|
|
90
110
|
},
|
|
91
111
|
[l, m]
|
|
92
|
-
), i =
|
|
112
|
+
), i = k(
|
|
93
113
|
(g) => {
|
|
94
114
|
d(
|
|
95
115
|
c.includes(g) ? c.filter((y) => y !== g) : [...c, g]
|
|
96
116
|
);
|
|
97
117
|
},
|
|
98
118
|
[c, d]
|
|
99
|
-
),
|
|
119
|
+
), E = k(
|
|
100
120
|
(g, y) => {
|
|
101
121
|
var D;
|
|
102
122
|
const x = ((D = e.find((p) => p.id === g)) == null ? void 0 : D.fields.map((p) => p.id)) ?? [], P = new Set(x);
|
|
@@ -107,14 +127,14 @@ function Dt(e, { value: n, defaultValue: a, onChange: r } = {}) {
|
|
|
107
127
|
d(c.filter((p) => !P.has(p)));
|
|
108
128
|
},
|
|
109
129
|
[e, c, d]
|
|
110
|
-
), N =
|
|
130
|
+
), N = k(
|
|
111
131
|
(g, y) => {
|
|
112
|
-
var
|
|
132
|
+
var M, o, F;
|
|
113
133
|
if (g === y) return;
|
|
114
|
-
const x = (
|
|
134
|
+
const x = (M = m.get(g)) == null ? void 0 : M.sectionId, P = (o = m.get(y)) == null ? void 0 : o.sectionId;
|
|
115
135
|
if (!x || x !== P) return;
|
|
116
136
|
const D = new Set(
|
|
117
|
-
((
|
|
137
|
+
((F = e.find((b) => b.id === x)) == null ? void 0 : F.fields.map((b) => b.id)) ?? []
|
|
118
138
|
), p = c.filter((b) => D.has(b)), u = p.indexOf(g), v = p.indexOf(y);
|
|
119
139
|
if (u < 0 || v < 0) return;
|
|
120
140
|
const [S] = p.splice(u, 1);
|
|
@@ -126,16 +146,16 @@ function Dt(e, { value: n, defaultValue: a, onChange: r } = {}) {
|
|
|
126
146
|
d(H);
|
|
127
147
|
},
|
|
128
148
|
[m, e, c, d]
|
|
129
|
-
), w =
|
|
130
|
-
d(a ??
|
|
131
|
-
}, [a,
|
|
149
|
+
), w = k(() => {
|
|
150
|
+
d(a ?? r);
|
|
151
|
+
}, [a, r, d]);
|
|
132
152
|
return {
|
|
133
153
|
visible: c,
|
|
134
|
-
catalogueIds:
|
|
154
|
+
catalogueIds: r,
|
|
135
155
|
fieldById: m,
|
|
136
156
|
setOrder: d,
|
|
137
157
|
toggleField: i,
|
|
138
|
-
toggleSection:
|
|
158
|
+
toggleSection: E,
|
|
139
159
|
moveFieldOnto: N,
|
|
140
160
|
reset: w
|
|
141
161
|
};
|
|
@@ -144,20 +164,20 @@ function wt({
|
|
|
144
164
|
sections: e,
|
|
145
165
|
visible: n,
|
|
146
166
|
onToggleField: a,
|
|
147
|
-
onToggleSection:
|
|
148
|
-
onMoveFieldOnto:
|
|
167
|
+
onToggleSection: s,
|
|
168
|
+
onMoveFieldOnto: r,
|
|
149
169
|
onReset: h,
|
|
150
170
|
label: l
|
|
151
171
|
}) {
|
|
152
|
-
const { t: c } =
|
|
172
|
+
const { t: c } = A(), m = _(() => new Set(n), [n]), [d, i] = z(null), [E, N] = z(null), [w, g] = z(""), { sectionOfField: y, labelOfField: x } = _(() => {
|
|
153
173
|
const u = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map();
|
|
154
174
|
for (const S of e)
|
|
155
175
|
for (const C of S.fields)
|
|
156
176
|
u.set(C.id, S.id), v.set(C.id, C.label);
|
|
157
177
|
return { sectionOfField: u, labelOfField: v };
|
|
158
|
-
}, [e]), P = d ? y.get(d) : void 0, D =
|
|
178
|
+
}, [e]), P = d ? y.get(d) : void 0, D = k(() => {
|
|
159
179
|
i(null), N(null);
|
|
160
|
-
}, []), p =
|
|
180
|
+
}, []), p = k(
|
|
161
181
|
(u, v, S) => {
|
|
162
182
|
g(
|
|
163
183
|
c("fieldPicker.moved", {
|
|
@@ -170,7 +190,7 @@ function wt({
|
|
|
170
190
|
},
|
|
171
191
|
[c, x]
|
|
172
192
|
);
|
|
173
|
-
return /* @__PURE__ */
|
|
193
|
+
return /* @__PURE__ */ V(O.Root, { children: [
|
|
174
194
|
/* @__PURE__ */ t(O.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
175
195
|
I,
|
|
176
196
|
{
|
|
@@ -181,27 +201,27 @@ function wt({
|
|
|
181
201
|
className: "ds:shrink-0"
|
|
182
202
|
}
|
|
183
203
|
) }),
|
|
184
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ V(O.Content, { align: "end", size: "sm", children: [
|
|
185
205
|
/* @__PURE__ */ t(O.Heading, { children: c("fieldPicker.title", { defaultValue: "Customize fields" }) }),
|
|
186
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ V("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:mt-[var(--spacing-xs)]", children: [
|
|
187
207
|
e.map((u) => {
|
|
188
208
|
const v = u.fields.map((o) => o.id), S = v.filter(
|
|
189
209
|
(o) => m.has(o)
|
|
190
210
|
).length, C = n.filter(
|
|
191
211
|
(o) => v.includes(o)
|
|
192
|
-
), H = S === 0 ? !1 : S === v.length ? !0 : "indeterminate",
|
|
193
|
-
return /* @__PURE__ */
|
|
212
|
+
), H = S === 0 ? !1 : S === v.length ? !0 : "indeterminate", M = !!u.heading;
|
|
213
|
+
return /* @__PURE__ */ V(
|
|
194
214
|
"div",
|
|
195
215
|
{
|
|
196
216
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
|
|
197
217
|
children: [
|
|
198
|
-
|
|
199
|
-
|
|
218
|
+
M ? /* @__PURE__ */ t(
|
|
219
|
+
j,
|
|
200
220
|
{
|
|
201
221
|
size: "sm",
|
|
202
222
|
label: u.heading,
|
|
203
223
|
checked: H,
|
|
204
|
-
onCheckedChange: (o) =>
|
|
224
|
+
onCheckedChange: (o) => s(u.id, o === !0)
|
|
205
225
|
}
|
|
206
226
|
) : null,
|
|
207
227
|
/* @__PURE__ */ t(
|
|
@@ -209,14 +229,14 @@ function wt({
|
|
|
209
229
|
{
|
|
210
230
|
className: [
|
|
211
231
|
"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)]",
|
|
212
|
-
|
|
232
|
+
M ? "ds:ps-[var(--spacing-md)]" : "ds:ps-0"
|
|
213
233
|
].join(" "),
|
|
214
234
|
children: u.fields.map((o) => {
|
|
215
|
-
const
|
|
216
|
-
return /* @__PURE__ */
|
|
235
|
+
const F = m.has(o.id), b = C.indexOf(o.id), T = C.length, J = d === o.id, Q = E === o.id && d !== null && d !== o.id && P === u.id;
|
|
236
|
+
return /* @__PURE__ */ V(
|
|
217
237
|
"li",
|
|
218
238
|
{
|
|
219
|
-
...
|
|
239
|
+
...F ? {
|
|
220
240
|
draggable: !0,
|
|
221
241
|
onDragStart: (f) => {
|
|
222
242
|
i(o.id), f.dataTransfer.effectAllowed = "move", f.dataTransfer.setData("text/plain", o.id);
|
|
@@ -229,8 +249,8 @@ function wt({
|
|
|
229
249
|
),
|
|
230
250
|
onDrop: (f) => {
|
|
231
251
|
f.preventDefault();
|
|
232
|
-
const
|
|
233
|
-
|
|
252
|
+
const L = f.dataTransfer.getData("text/plain");
|
|
253
|
+
L && L !== o.id && y.get(L) === u.id && (r(L, o.id), p(L, b, T)), D();
|
|
234
254
|
},
|
|
235
255
|
onDragEnd: D
|
|
236
256
|
} : {},
|
|
@@ -241,15 +261,15 @@ function wt({
|
|
|
241
261
|
].filter(Boolean).join(" "),
|
|
242
262
|
children: [
|
|
243
263
|
/* @__PURE__ */ t(
|
|
244
|
-
|
|
264
|
+
j,
|
|
245
265
|
{
|
|
246
266
|
size: "sm",
|
|
247
267
|
label: o.label,
|
|
248
|
-
checked:
|
|
268
|
+
checked: F,
|
|
249
269
|
onCheckedChange: () => a(o.id)
|
|
250
270
|
}
|
|
251
271
|
),
|
|
252
|
-
|
|
272
|
+
F ? /* @__PURE__ */ t(
|
|
253
273
|
I,
|
|
254
274
|
{
|
|
255
275
|
size: "sm",
|
|
@@ -265,22 +285,22 @@ function wt({
|
|
|
265
285
|
if (f.altKey) {
|
|
266
286
|
if (f.key === "ArrowUp") {
|
|
267
287
|
if (b <= 0) return;
|
|
268
|
-
f.preventDefault(),
|
|
288
|
+
f.preventDefault(), r(
|
|
269
289
|
o.id,
|
|
270
290
|
C[b - 1]
|
|
271
291
|
), p(o.id, b - 1, T);
|
|
272
292
|
} else if (f.key === "ArrowDown") {
|
|
273
293
|
if (b >= T - 1) return;
|
|
274
|
-
f.preventDefault(),
|
|
294
|
+
f.preventDefault(), r(
|
|
275
295
|
o.id,
|
|
276
296
|
C[b + 1]
|
|
277
297
|
), p(o.id, b + 1, T);
|
|
278
298
|
} else if (f.key === "Home") {
|
|
279
299
|
if (b <= 0) return;
|
|
280
|
-
f.preventDefault(),
|
|
300
|
+
f.preventDefault(), r(o.id, C[0]), p(o.id, 0, T);
|
|
281
301
|
} else if (f.key === "End") {
|
|
282
302
|
if (b >= T - 1) return;
|
|
283
|
-
f.preventDefault(),
|
|
303
|
+
f.preventDefault(), r(
|
|
284
304
|
o.id,
|
|
285
305
|
C[T - 1]
|
|
286
306
|
), p(o.id, T - 1, T);
|
|
@@ -308,52 +328,52 @@ function wt({
|
|
|
308
328
|
] })
|
|
309
329
|
] });
|
|
310
330
|
}
|
|
311
|
-
const
|
|
331
|
+
const G = "ds:text-[color:var(--foreground)]", Ee = {
|
|
312
332
|
m: "Male",
|
|
313
333
|
f: "Female",
|
|
314
334
|
x: "Other"
|
|
315
335
|
};
|
|
316
|
-
function
|
|
336
|
+
function B({
|
|
317
337
|
icon: e,
|
|
318
338
|
mono: n,
|
|
319
339
|
children: a
|
|
320
340
|
}) {
|
|
321
341
|
return /* @__PURE__ */ t(
|
|
322
|
-
|
|
342
|
+
R,
|
|
323
343
|
{
|
|
324
344
|
variant: "neutral",
|
|
325
345
|
className: n ? "ds:font-mono" : void 0,
|
|
326
346
|
leading: e ? W(e, {
|
|
327
|
-
className:
|
|
347
|
+
className: G
|
|
328
348
|
}) : void 0,
|
|
329
|
-
children: /* @__PURE__ */ t("span", { className:
|
|
349
|
+
children: /* @__PURE__ */ t("span", { className: G, children: a })
|
|
330
350
|
}
|
|
331
351
|
);
|
|
332
352
|
}
|
|
333
353
|
function Fe({ code: e }) {
|
|
334
|
-
const { t: n } =
|
|
354
|
+
const { t: n } = A(), a = e.toLowerCase(), s = n(`patientField.sex.${a}`, {
|
|
335
355
|
defaultValue: Ee[a] ?? e
|
|
336
356
|
});
|
|
337
|
-
return a === "f" ? /* @__PURE__ */ t(
|
|
357
|
+
return a === "f" ? /* @__PURE__ */ t(R, { variant: "accentSoft", leading: /* @__PURE__ */ t(Ae, {}), children: s }) : a === "m" ? /* @__PURE__ */ t(R, { variant: "info", leading: /* @__PURE__ */ t(ze, {}), children: s }) : /* @__PURE__ */ t(B, { icon: /* @__PURE__ */ t(le, {}), children: s });
|
|
338
358
|
}
|
|
339
|
-
function
|
|
340
|
-
const { t: n } =
|
|
341
|
-
return /* @__PURE__ */ t(
|
|
359
|
+
function Ie({ years: e }) {
|
|
360
|
+
const { t: n } = A();
|
|
361
|
+
return /* @__PURE__ */ t(B, { icon: /* @__PURE__ */ t(Se, {}), children: n("patientField.age", {
|
|
342
362
|
count: e,
|
|
343
363
|
defaultValue: "{{count}} years old"
|
|
344
364
|
}) });
|
|
345
365
|
}
|
|
346
|
-
function
|
|
347
|
-
const { i18n: n } =
|
|
366
|
+
function Me({ field: e }) {
|
|
367
|
+
const { i18n: n } = A();
|
|
348
368
|
if (e.kind === "email" || e.kind === "phone") {
|
|
349
369
|
const a = typeof e.value == "string" ? e.value : e.copyText ?? (typeof e.editValue == "string" ? e.editValue : "");
|
|
350
370
|
if (a) {
|
|
351
|
-
const
|
|
352
|
-
return /* @__PURE__ */ t(
|
|
371
|
+
const s = e.kind === "email" ? `mailto:${a.trim()}` : `tel:${a.replace(/[^+\d]/g, "")}`;
|
|
372
|
+
return /* @__PURE__ */ t(se, { href: s, children: a });
|
|
353
373
|
}
|
|
354
374
|
}
|
|
355
375
|
if (e.value != null)
|
|
356
|
-
return /* @__PURE__ */ t(
|
|
376
|
+
return /* @__PURE__ */ t(q, { children: e.value });
|
|
357
377
|
if (!e.kind)
|
|
358
378
|
return null;
|
|
359
379
|
switch (e.kind) {
|
|
@@ -361,24 +381,24 @@ function Ie({ field: e }) {
|
|
|
361
381
|
return /* @__PURE__ */ t(Fe, { code: String(e.editValue ?? "") });
|
|
362
382
|
case "age": {
|
|
363
383
|
const a = typeof e.editValue == "number" ? e.editValue : Number(e.editValue);
|
|
364
|
-
return Number.isFinite(a) ? /* @__PURE__ */ t(
|
|
384
|
+
return Number.isFinite(a) ? /* @__PURE__ */ t(Ie, { years: a }) : null;
|
|
365
385
|
}
|
|
366
386
|
case "dob": {
|
|
367
|
-
const a = e.editValue,
|
|
387
|
+
const a = e.editValue, s = a instanceof Date ? a : new Date(String(a ?? "")), r = Number.isNaN(s.getTime()) ? String(a ?? "") : new Intl.DateTimeFormat(n.language, {
|
|
368
388
|
day: "numeric",
|
|
369
389
|
month: "short",
|
|
370
390
|
year: "numeric"
|
|
371
|
-
}).format(
|
|
372
|
-
return
|
|
391
|
+
}).format(s);
|
|
392
|
+
return r ? /* @__PURE__ */ t(B, { icon: /* @__PURE__ */ t(oe, {}), children: r }) : null;
|
|
373
393
|
}
|
|
374
394
|
case "fiscalCode": {
|
|
375
395
|
const a = e.copyText ?? (typeof e.editValue == "string" ? e.editValue : "");
|
|
376
|
-
return a ? /* @__PURE__ */ t(
|
|
396
|
+
return a ? /* @__PURE__ */ t(B, { icon: /* @__PURE__ */ t(ie, {}), mono: !0, children: a }) : null;
|
|
377
397
|
}
|
|
378
398
|
case "discount": {
|
|
379
399
|
const a = typeof e.editValue == "number" ? e.editValue : Number(e.editValue);
|
|
380
400
|
return Number.isFinite(a) ? /* @__PURE__ */ t(
|
|
381
|
-
|
|
401
|
+
re,
|
|
382
402
|
{
|
|
383
403
|
state: "discount",
|
|
384
404
|
amount: Math.abs(a),
|
|
@@ -394,11 +414,11 @@ function Ie({ field: e }) {
|
|
|
394
414
|
function Le({
|
|
395
415
|
field: e
|
|
396
416
|
}) {
|
|
397
|
-
const { t: n } =
|
|
398
|
-
return /* @__PURE__ */
|
|
417
|
+
const { t: n } = A();
|
|
418
|
+
return /* @__PURE__ */ V("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
399
419
|
e.label,
|
|
400
420
|
e.sensitive ? /* @__PURE__ */ t(
|
|
401
|
-
|
|
421
|
+
Ne,
|
|
402
422
|
{
|
|
403
423
|
"aria-label": n("patientDetails.sensitive", {
|
|
404
424
|
defaultValue: "Sensitive"
|
|
@@ -408,20 +428,20 @@ function Le({
|
|
|
408
428
|
) : null
|
|
409
429
|
] });
|
|
410
430
|
}
|
|
411
|
-
function
|
|
431
|
+
function Oe({
|
|
412
432
|
field: e,
|
|
413
433
|
editable: n,
|
|
414
434
|
onFieldSave: a,
|
|
415
|
-
validate:
|
|
416
|
-
locale:
|
|
435
|
+
validate: s,
|
|
436
|
+
locale: r
|
|
417
437
|
}) {
|
|
418
|
-
const { t: h } =
|
|
419
|
-
|
|
420
|
-
}, [e.editValue]), P =
|
|
438
|
+
const { t: h } = A(), l = Y(), c = n && !!e.editable && !!a, [m, d] = z(!1), [i, E] = z(e.editValue), [N, w] = z(null), [g, y] = z(!1), x = k(() => {
|
|
439
|
+
E(e.editValue), w(null), d(!0);
|
|
440
|
+
}, [e.editValue]), P = k(() => {
|
|
421
441
|
d(!1), w(null);
|
|
422
|
-
}, []), D =
|
|
442
|
+
}, []), D = k(async () => {
|
|
423
443
|
if (!a) return;
|
|
424
|
-
const u = (
|
|
444
|
+
const u = (s == null ? void 0 : s(e.id, i)) ?? null;
|
|
425
445
|
if (u) {
|
|
426
446
|
w(u);
|
|
427
447
|
return;
|
|
@@ -438,18 +458,18 @@ function Me({
|
|
|
438
458
|
} finally {
|
|
439
459
|
y(!1);
|
|
440
460
|
}
|
|
441
|
-
}, [a,
|
|
442
|
-
return m ? /* @__PURE__ */
|
|
443
|
-
/* @__PURE__ */
|
|
461
|
+
}, [a, s, e.id, i, h]), p = typeof e.value == "string" ? e.value : e.copyText ?? (typeof e.editValue == "string" ? e.editValue : void 0);
|
|
462
|
+
return m ? /* @__PURE__ */ V("span", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
463
|
+
/* @__PURE__ */ V("span", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-2xs)]", children: [
|
|
444
464
|
/* @__PURE__ */ t(
|
|
445
|
-
|
|
465
|
+
_e,
|
|
446
466
|
{
|
|
447
467
|
field: e,
|
|
448
468
|
value: i,
|
|
449
|
-
onChange:
|
|
469
|
+
onChange: E,
|
|
450
470
|
invalid: !!N,
|
|
451
471
|
errorId: N ? l : void 0,
|
|
452
|
-
locale:
|
|
472
|
+
locale: r,
|
|
453
473
|
disabled: g
|
|
454
474
|
}
|
|
455
475
|
),
|
|
@@ -487,13 +507,13 @@ function Me({
|
|
|
487
507
|
children: N
|
|
488
508
|
}
|
|
489
509
|
) : null
|
|
490
|
-
] }) : /* @__PURE__ */
|
|
510
|
+
] }) : /* @__PURE__ */ V("span", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-2xs)] ds:min-w-0", children: [
|
|
491
511
|
/* @__PURE__ */ t(
|
|
492
512
|
"span",
|
|
493
513
|
{
|
|
494
514
|
className: `ds:min-w-0 ${e.editType === "textarea" ? "" : "ds:truncate"}${e.mono ? " ds:font-mono" : ""}`,
|
|
495
515
|
title: p,
|
|
496
|
-
children: /* @__PURE__ */ t(
|
|
516
|
+
children: /* @__PURE__ */ t(Me, { field: e })
|
|
497
517
|
}
|
|
498
518
|
),
|
|
499
519
|
e.copyable && e.copyText ? /* @__PURE__ */ t(Be, { text: e.copyText, label: e.label }) : null,
|
|
@@ -503,7 +523,7 @@ function Me({
|
|
|
503
523
|
size: "sm",
|
|
504
524
|
intent: "ghost",
|
|
505
525
|
className: "ds:shrink-0 ds:opacity-0 ds:transition-opacity ds:motion-reduce:transition-none ds:group-hover:opacity-100 ds:focus-visible:opacity-100",
|
|
506
|
-
icon: /* @__PURE__ */ t(
|
|
526
|
+
icon: /* @__PURE__ */ t(Ve, { "aria-hidden": "true" }),
|
|
507
527
|
"aria-label": h("patientDetails.edit.editField", {
|
|
508
528
|
field: e.label,
|
|
509
529
|
defaultValue: "Edit {{field}}"
|
|
@@ -518,48 +538,48 @@ function St({
|
|
|
518
538
|
icon: n,
|
|
519
539
|
...a
|
|
520
540
|
}) {
|
|
521
|
-
return /* @__PURE__ */
|
|
522
|
-
|
|
541
|
+
return /* @__PURE__ */ V(
|
|
542
|
+
$.Row,
|
|
523
543
|
{
|
|
524
544
|
icon: n ?? null,
|
|
525
545
|
"data-field-id": e.id,
|
|
526
546
|
className: "ds:group",
|
|
527
547
|
children: [
|
|
528
|
-
/* @__PURE__ */ t(
|
|
529
|
-
/* @__PURE__ */ t(
|
|
548
|
+
/* @__PURE__ */ t($.Term, { children: /* @__PURE__ */ t(Le, { field: e }) }),
|
|
549
|
+
/* @__PURE__ */ t($.Detail, { children: /* @__PURE__ */ t(Oe, { field: e, ...a }) })
|
|
530
550
|
]
|
|
531
551
|
}
|
|
532
552
|
);
|
|
533
553
|
}
|
|
534
|
-
function
|
|
554
|
+
function _e({
|
|
535
555
|
field: e,
|
|
536
556
|
value: n,
|
|
537
557
|
onChange: a,
|
|
538
|
-
invalid:
|
|
539
|
-
errorId:
|
|
558
|
+
invalid: s,
|
|
559
|
+
errorId: r,
|
|
540
560
|
locale: h,
|
|
541
561
|
disabled: l
|
|
542
562
|
}) {
|
|
543
|
-
const { t: c } =
|
|
563
|
+
const { t: c } = A(), m = s ? "error" : "default";
|
|
544
564
|
switch (e.editType ?? "text") {
|
|
545
565
|
case "textarea":
|
|
546
566
|
return /* @__PURE__ */ t(
|
|
547
|
-
|
|
567
|
+
xe,
|
|
548
568
|
{
|
|
549
569
|
size: "sm",
|
|
550
570
|
value: typeof n == "string" ? n : "",
|
|
551
571
|
onChange: (i) => a(i.target.value),
|
|
552
572
|
tone: m,
|
|
553
573
|
"aria-label": e.label,
|
|
554
|
-
"aria-invalid":
|
|
555
|
-
"aria-describedby":
|
|
574
|
+
"aria-invalid": s || void 0,
|
|
575
|
+
"aria-describedby": r,
|
|
556
576
|
disabled: l,
|
|
557
577
|
className: "ds:flex-1"
|
|
558
578
|
}
|
|
559
579
|
);
|
|
560
580
|
case "select":
|
|
561
581
|
return /* @__PURE__ */ t(
|
|
562
|
-
|
|
582
|
+
be,
|
|
563
583
|
{
|
|
564
584
|
size: "sm",
|
|
565
585
|
options: e.options ?? [],
|
|
@@ -568,13 +588,13 @@ function Oe({
|
|
|
568
588
|
tone: m,
|
|
569
589
|
disabled: l,
|
|
570
590
|
"aria-label": e.label,
|
|
571
|
-
"aria-invalid":
|
|
572
|
-
"aria-describedby":
|
|
591
|
+
"aria-invalid": s || void 0,
|
|
592
|
+
"aria-describedby": r
|
|
573
593
|
}
|
|
574
594
|
);
|
|
575
595
|
case "boolean":
|
|
576
596
|
return /* @__PURE__ */ t(
|
|
577
|
-
|
|
597
|
+
ve,
|
|
578
598
|
{
|
|
579
599
|
label: e.label,
|
|
580
600
|
checked: n === !0,
|
|
@@ -584,7 +604,7 @@ function Oe({
|
|
|
584
604
|
);
|
|
585
605
|
case "date":
|
|
586
606
|
return /* @__PURE__ */ t(
|
|
587
|
-
|
|
607
|
+
ue,
|
|
588
608
|
{
|
|
589
609
|
size: "sm",
|
|
590
610
|
value: n instanceof Date ? n : void 0,
|
|
@@ -595,7 +615,7 @@ function Oe({
|
|
|
595
615
|
);
|
|
596
616
|
case "number":
|
|
597
617
|
return /* @__PURE__ */ t(
|
|
598
|
-
|
|
618
|
+
fe,
|
|
599
619
|
{
|
|
600
620
|
size: "sm",
|
|
601
621
|
value: typeof n == "number" ? n : null,
|
|
@@ -606,50 +626,50 @@ function Oe({
|
|
|
606
626
|
tone: m,
|
|
607
627
|
disabled: l,
|
|
608
628
|
"aria-label": e.label,
|
|
609
|
-
"aria-invalid":
|
|
610
|
-
"aria-describedby":
|
|
629
|
+
"aria-invalid": s || void 0,
|
|
630
|
+
"aria-describedby": r
|
|
611
631
|
}
|
|
612
632
|
);
|
|
613
633
|
case "email":
|
|
614
634
|
return /* @__PURE__ */ t(
|
|
615
|
-
|
|
635
|
+
me,
|
|
616
636
|
{
|
|
617
637
|
size: "sm",
|
|
618
638
|
value: typeof n == "string" ? n : "",
|
|
619
639
|
onChange: (i) => a(i.target.value),
|
|
620
640
|
"aria-label": e.label,
|
|
621
|
-
"aria-invalid":
|
|
622
|
-
"aria-describedby":
|
|
641
|
+
"aria-invalid": s || void 0,
|
|
642
|
+
"aria-describedby": r,
|
|
623
643
|
disabled: l,
|
|
624
644
|
className: "ds:flex-1"
|
|
625
645
|
}
|
|
626
646
|
);
|
|
627
647
|
case "phone":
|
|
628
648
|
return /* @__PURE__ */ t(
|
|
629
|
-
|
|
649
|
+
ge,
|
|
630
650
|
{
|
|
631
651
|
size: "sm",
|
|
632
652
|
value: typeof n == "string" ? n : "",
|
|
633
653
|
onChange: (i) => a(i),
|
|
634
654
|
tone: m,
|
|
635
655
|
"aria-label": e.label,
|
|
636
|
-
"aria-invalid":
|
|
637
|
-
"aria-describedby":
|
|
656
|
+
"aria-invalid": s || void 0,
|
|
657
|
+
"aria-describedby": r,
|
|
638
658
|
disabled: l,
|
|
639
659
|
className: "ds:flex-1"
|
|
640
660
|
}
|
|
641
661
|
);
|
|
642
662
|
case "fiscalCode":
|
|
643
663
|
return /* @__PURE__ */ t(
|
|
644
|
-
|
|
664
|
+
pe,
|
|
645
665
|
{
|
|
646
666
|
size: "sm",
|
|
647
667
|
value: typeof n == "string" ? n : "",
|
|
648
668
|
onChange: (i) => a(i),
|
|
649
669
|
tone: m,
|
|
650
670
|
"aria-label": e.label,
|
|
651
|
-
"aria-invalid":
|
|
652
|
-
"aria-describedby":
|
|
671
|
+
"aria-invalid": s || void 0,
|
|
672
|
+
"aria-describedby": r,
|
|
653
673
|
disabled: l,
|
|
654
674
|
className: "ds:flex-1"
|
|
655
675
|
}
|
|
@@ -660,7 +680,7 @@ function Oe({
|
|
|
660
680
|
// conveyed by colour alone.
|
|
661
681
|
case "province":
|
|
662
682
|
return /* @__PURE__ */ t(
|
|
663
|
-
|
|
683
|
+
ye,
|
|
664
684
|
{
|
|
665
685
|
size: "sm",
|
|
666
686
|
country: "it",
|
|
@@ -669,14 +689,14 @@ function Oe({
|
|
|
669
689
|
tone: m,
|
|
670
690
|
disabled: l,
|
|
671
691
|
"aria-label": e.label,
|
|
672
|
-
"aria-invalid":
|
|
673
|
-
"aria-describedby":
|
|
692
|
+
"aria-invalid": s || void 0,
|
|
693
|
+
"aria-describedby": r,
|
|
674
694
|
className: "ds:flex-1"
|
|
675
695
|
}
|
|
676
696
|
);
|
|
677
697
|
case "country":
|
|
678
698
|
return /* @__PURE__ */ t(
|
|
679
|
-
|
|
699
|
+
de,
|
|
680
700
|
{
|
|
681
701
|
size: "sm",
|
|
682
702
|
value: typeof n == "string" ? n : "",
|
|
@@ -684,29 +704,29 @@ function Oe({
|
|
|
684
704
|
tone: m,
|
|
685
705
|
disabled: l,
|
|
686
706
|
"aria-label": e.label,
|
|
687
|
-
"aria-invalid":
|
|
688
|
-
"aria-describedby":
|
|
707
|
+
"aria-invalid": s || void 0,
|
|
708
|
+
"aria-describedby": r,
|
|
689
709
|
className: "ds:flex-1"
|
|
690
710
|
}
|
|
691
711
|
);
|
|
692
712
|
case "postalCode":
|
|
693
713
|
return /* @__PURE__ */ t(
|
|
694
|
-
|
|
714
|
+
he,
|
|
695
715
|
{
|
|
696
716
|
size: "sm",
|
|
697
717
|
country: "it",
|
|
698
718
|
value: typeof n == "string" ? n : "",
|
|
699
719
|
onValueChange: (i) => a(i),
|
|
700
720
|
"aria-label": e.label,
|
|
701
|
-
"aria-invalid":
|
|
702
|
-
"aria-describedby":
|
|
721
|
+
"aria-invalid": s || void 0,
|
|
722
|
+
"aria-describedby": r,
|
|
703
723
|
disabled: l,
|
|
704
724
|
className: "ds:flex-1"
|
|
705
725
|
}
|
|
706
726
|
);
|
|
707
727
|
case "city":
|
|
708
728
|
return /* @__PURE__ */ t(
|
|
709
|
-
|
|
729
|
+
ce,
|
|
710
730
|
{
|
|
711
731
|
size: "sm",
|
|
712
732
|
value: typeof n == "string" ? n : "",
|
|
@@ -714,23 +734,23 @@ function Oe({
|
|
|
714
734
|
tone: m,
|
|
715
735
|
disabled: l,
|
|
716
736
|
"aria-label": e.label,
|
|
717
|
-
"aria-invalid":
|
|
718
|
-
"aria-describedby":
|
|
737
|
+
"aria-invalid": s || void 0,
|
|
738
|
+
"aria-describedby": r,
|
|
719
739
|
className: "ds:flex-1"
|
|
720
740
|
}
|
|
721
741
|
);
|
|
722
742
|
case "text":
|
|
723
743
|
default:
|
|
724
744
|
return /* @__PURE__ */ t(
|
|
725
|
-
|
|
745
|
+
Ce,
|
|
726
746
|
{
|
|
727
747
|
size: "sm",
|
|
728
748
|
value: typeof n == "string" ? n : "",
|
|
729
749
|
onChange: (i) => a(i.target.value),
|
|
730
750
|
tone: m,
|
|
731
751
|
"aria-label": e.label,
|
|
732
|
-
"aria-invalid":
|
|
733
|
-
"aria-describedby":
|
|
752
|
+
"aria-invalid": s || void 0,
|
|
753
|
+
"aria-describedby": r,
|
|
734
754
|
disabled: l,
|
|
735
755
|
clearable: !0,
|
|
736
756
|
placeholder: c("patientDetails.edit.placeholder", {
|
|
@@ -745,10 +765,10 @@ function Be({
|
|
|
745
765
|
text: e,
|
|
746
766
|
label: n
|
|
747
767
|
}) {
|
|
748
|
-
const { t: a } =
|
|
768
|
+
const { t: a } = A(), [s, r] = z(!1), [h, l] = z(""), c = k(async () => {
|
|
749
769
|
try {
|
|
750
|
-
await navigator.clipboard.writeText(e),
|
|
751
|
-
|
|
770
|
+
await navigator.clipboard.writeText(e), r(!0), l(a("keyValuePair.copied", { defaultValue: "Copied" })), setTimeout(() => {
|
|
771
|
+
r(!1), l("");
|
|
752
772
|
}, 2e3);
|
|
753
773
|
} catch {
|
|
754
774
|
l(
|
|
@@ -756,13 +776,13 @@ function Be({
|
|
|
756
776
|
), setTimeout(() => l(""), 3e3);
|
|
757
777
|
}
|
|
758
778
|
}, [e, a]);
|
|
759
|
-
return /* @__PURE__ */
|
|
779
|
+
return /* @__PURE__ */ V(q, { children: [
|
|
760
780
|
/* @__PURE__ */ t(
|
|
761
781
|
I,
|
|
762
782
|
{
|
|
763
783
|
size: "sm",
|
|
764
784
|
intent: "ghost",
|
|
765
|
-
icon:
|
|
785
|
+
icon: s ? /* @__PURE__ */ t(K, { "aria-hidden": "true" }) : /* @__PURE__ */ t(De, { "aria-hidden": "true" }),
|
|
766
786
|
"aria-label": a("keyValuePair.copy", {
|
|
767
787
|
label: n,
|
|
768
788
|
defaultValue: "Copy {{label}}"
|
|
@@ -774,14 +794,15 @@ function Be({
|
|
|
774
794
|
] });
|
|
775
795
|
}
|
|
776
796
|
export {
|
|
777
|
-
|
|
797
|
+
Ie as A,
|
|
778
798
|
wt as F,
|
|
779
|
-
|
|
799
|
+
Se as H,
|
|
800
|
+
B as N,
|
|
780
801
|
St as P,
|
|
781
802
|
Fe as S,
|
|
782
|
-
|
|
803
|
+
Oe as a,
|
|
783
804
|
Le as b,
|
|
784
805
|
Nt as r,
|
|
785
806
|
Dt as u
|
|
786
807
|
};
|
|
787
|
-
//# sourceMappingURL=patient-field-row-
|
|
808
|
+
//# sourceMappingURL=patient-field-row-IHb2VFc2.js.map
|