@alfadocs/ui-kit 1.65.0 → 1.67.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/ai-credits-exhausted-notice-DfAgfZDF.js +287 -0
- package/dist/_chunks/ai-credits-exhausted-notice.agent-DgTSTgez.js +43 -0
- package/dist/_chunks/ai-credits-notice-DQ-r3iQU.js +191 -0
- package/dist/_chunks/{ai-permission-notice-DpRmZ9Q3.js → ai-permission-notice-qsdm4Sx4.js} +2 -2
- package/dist/_chunks/{alert-DdDpOi-P.js → alert-DjsJMGRE.js} +3 -2
- package/dist/_chunks/{anamnesis-summary-rows-BIfw890v.js → anamnesis-summary-rows-BQ_EokKz.js} +2 -2
- package/dist/_chunks/{audio-recorder-DR-u1qbl.js → audio-recorder-B11RR-rC.js} +2 -2
- package/dist/_chunks/{auth-form-parts-Cmb41LSQ.js → auth-form-parts-DwUTH6YN.js} +2 -2
- package/dist/_chunks/{booking-DkjatiXc.js → booking-tTVxKPQY.js} +2 -2
- package/dist/_chunks/{calendar-workspace-Cp8yTZ1g.js → calendar-workspace-MRrzcxAy.js} +6 -6
- package/dist/_chunks/chart-CwmyCuWe.js +1340 -0
- package/dist/_chunks/{document-preview-B1dQm292.js → document-preview-VyQOjFVL.js} +2 -2
- package/dist/_chunks/{document-scanner-CVPVLK7z.js → document-scanner-CXH_GYh4.js} +2 -2
- package/dist/_chunks/{entity-summary-BQ9_KA8S.js → entity-summary-Bj-Wxq7Y.js} +2 -2
- package/dist/_chunks/{error-summary-DrUfuKu1.js → error-summary-PUE5Zxp9.js} +2 -2
- package/dist/_chunks/{forgot-password-form-CgZkEvZy.js → forgot-password-form-CPOfRE0C.js} +4 -4
- package/dist/_chunks/{freemium-paywall-DKJHRFpp.js → freemium-paywall-6DO7noHX.js} +2 -2
- package/dist/_chunks/heatmap-C1TeC7wT.js +3650 -0
- package/dist/_chunks/help-me-write-templates-Bw3Q58x-.js +687 -0
- package/dist/_chunks/hourglass-BEAzW1wE.js +26 -0
- package/dist/_chunks/{login-dev-card-PnADNcI9.js → login-dev-card-A-CL3mjt.js} +3 -3
- package/dist/_chunks/{marketplace-app-shell-C-2e4eCD.js → marketplace-app-shell-DtSX8sYb.js} +2 -2
- package/dist/_chunks/{notes-panel-uEGIL7mi.js → notes-panel-IdsmqRFC.js} +3 -3
- package/dist/_chunks/{patient-details-4P1vA9Ls.js → patient-details-C-EWQTms.js} +2 -2
- package/dist/_chunks/{patient-field-row-CBXhlfGD.js → patient-field-row-lY-Tb5Mo.js} +155 -176
- package/dist/_chunks/{patient-search-DOnDUVsl.js → patient-search-DpAKidZ5.js} +2 -2
- package/dist/_chunks/{patient-summary-card-CuDLo8MP.js → patient-summary-card-Bpto_VCD.js} +2 -2
- package/dist/_chunks/{payment-automation-upsell-C8MEu0t6.js → payment-automation-upsell-BQ307qEX.js} +2 -2
- package/dist/_chunks/{payment-form-C3dGY7v4.js → payment-form-XKtinW8r.js} +2 -2
- package/dist/_chunks/{pdf-viewer-DJ9VN7cu.js → pdf-viewer-BvoVMjH4.js} +2 -2
- package/dist/_chunks/{practice-results-8h2Utpt3.js → practice-results-BrUDDMXC.js} +2 -2
- package/dist/_chunks/{registration-form-BQyT_kBX.js → registration-form-BxwqUZzk.js} +3 -3
- package/dist/_chunks/{rich-text-editor-M2gT_E7f.js → rich-text-editor-aCIoptbg.js} +1653 -1743
- package/dist/_chunks/{sign-document-CY7xTXbm.js → sign-document-D1P1nUQA.js} +2 -2
- package/dist/_chunks/{signature-request-BMCHy2ZO.js → signature-request-3u6TvRt2.js} +2 -2
- package/dist/_chunks/{task-editor-CifOznfq.js → task-editor-Bb5MMcid.js} +2 -2
- package/dist/_chunks/{tasks-panel-8nLwBw6P.js → tasks-panel-BOb57Ysw.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-B-FEWbQM.js → use-appointment-details-read-CVSPoP5j.js} +4 -4
- package/dist/_chunks/voice-control-panel-BJIEbDq6.js +1148 -0
- package/dist/_chunks/{warning-stack-HYWAytZV.js → warning-stack-BdY-0bd3.js} +2 -2
- package/dist/_chunks/{workflow-map-C2B2qIr1.js → workflow-map-CYbRD9ek.js} +2 -2
- package/dist/agent-catalog.json +50 -3
- package/dist/agent-i18n/en.json +7 -4
- package/dist/components/_shared/use-apex-radial-centre.d.ts +7 -4
- package/dist/components/ai-credits-notice/ai-credits-exhausted-notice.agent.d.ts +4 -0
- package/dist/components/ai-credits-notice/ai-credits-exhausted-notice.d.ts +96 -0
- package/dist/components/ai-credits-notice/ai-credits-notice.d.ts +30 -4
- package/dist/components/ai-credits-notice/index.d.ts +3 -0
- package/dist/components/ai-credits-notice/index.js +10 -4
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/error-summary/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/heatmap/heatmap-context.d.ts +3 -0
- package/dist/components/heatmap/heatmap-disclosure.d.ts +67 -0
- package/dist/components/heatmap/heatmap-grid.d.ts +1 -1
- package/dist/components/heatmap/heatmap-legend.d.ts +5 -2
- package/dist/components/heatmap/heatmap-model.d.ts +107 -15
- package/dist/components/heatmap/heatmap-table-view.d.ts +3 -2
- package/dist/components/heatmap/heatmap.d.ts +33 -7
- package/dist/components/heatmap/index.d.ts +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/voice-control-panel/index.d.ts +2 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/components/voice-control-panel/voice-control-panel.d.ts +43 -3
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +29 -12
- package/dist/i18n/locales/ar.js +29 -12
- package/dist/i18n/locales/de.d.ts +29 -12
- package/dist/i18n/locales/de.js +29 -12
- package/dist/i18n/locales/el.d.ts +29 -12
- package/dist/i18n/locales/el.js +29 -12
- package/dist/i18n/locales/en.d.ts +29 -12
- package/dist/i18n/locales/en.js +29 -12
- package/dist/i18n/locales/es.d.ts +29 -12
- package/dist/i18n/locales/es.js +29 -12
- package/dist/i18n/locales/fr.d.ts +29 -12
- package/dist/i18n/locales/fr.js +29 -12
- package/dist/i18n/locales/hi.d.ts +29 -12
- package/dist/i18n/locales/hi.js +29 -12
- package/dist/i18n/locales/it.d.ts +29 -12
- package/dist/i18n/locales/it.js +29 -12
- package/dist/i18n/locales/ja.d.ts +29 -12
- package/dist/i18n/locales/ja.js +29 -12
- package/dist/i18n/locales/nl.d.ts +29 -12
- package/dist/i18n/locales/nl.js +29 -12
- package/dist/i18n/locales/pl.d.ts +29 -12
- package/dist/i18n/locales/pl.js +29 -12
- package/dist/i18n/locales/pt.d.ts +29 -12
- package/dist/i18n/locales/pt.js +29 -12
- package/dist/i18n/locales/ro.d.ts +29 -12
- package/dist/i18n/locales/ro.js +29 -12
- package/dist/i18n/locales/ru.d.ts +29 -12
- package/dist/i18n/locales/ru.js +29 -12
- package/dist/i18n/locales/sq.d.ts +29 -12
- package/dist/i18n/locales/sq.js +29 -12
- package/dist/i18n/locales/sv.d.ts +29 -12
- package/dist/i18n/locales/sv.js +29 -12
- package/dist/i18n/locales/tr.d.ts +29 -12
- package/dist/i18n/locales/tr.js +29 -12
- package/dist/i18n/locales/zh.d.ts +29 -12
- package/dist/i18n/locales/zh.js +29 -12
- package/dist/index.js +814 -809
- package/dist/locales/ar.json +29 -12
- package/dist/locales/de.json +29 -12
- package/dist/locales/el.json +29 -12
- package/dist/locales/en.json +29 -12
- package/dist/locales/es.json +29 -12
- package/dist/locales/fr.json +29 -12
- package/dist/locales/hi.json +29 -12
- package/dist/locales/it.json +29 -12
- package/dist/locales/ja.json +29 -12
- package/dist/locales/nl.json +29 -12
- package/dist/locales/pl.json +29 -12
- package/dist/locales/pt.json +29 -12
- package/dist/locales/ro.json +29 -12
- package/dist/locales/ru.json +29 -12
- package/dist/locales/sq.json +29 -12
- package/dist/locales/sv.json +29 -12
- package/dist/locales/tr.json +29 -12
- package/dist/locales/zh.json +29 -12
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/forgot-password-form/index.js +1 -1
- package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +6 -23
- package/dist/patterns/help-me-write-templates/index.js +8 -7
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/ai-credits-notice-pK9BOmEz.js +0 -90
- package/dist/_chunks/ai-credits-notice.agent-C9L7orrP.js +0 -17
- package/dist/_chunks/chart-CIzXxNeM.js +0 -1322
- package/dist/_chunks/heatmap-BxRHM8Et.js +0 -2865
- package/dist/_chunks/help-me-write-templates-DFmqnsAa.js +0 -747
- package/dist/_chunks/voice-control-panel-C0BfY23Y.js +0 -1009
|
@@ -1,109 +1,89 @@
|
|
|
1
1
|
import { useMemo as B, useCallback as V, useState as P, cloneElement as W, useId as Y } from "react";
|
|
2
2
|
import { u as Z } from "./use-controllable-state-BiY4xTzM.js";
|
|
3
|
-
import { jsxs as N, jsx as t, Fragment as
|
|
4
|
-
import { useTranslation as
|
|
3
|
+
import { jsxs as N, jsx as t, Fragment as $ } from "react/jsx-runtime";
|
|
4
|
+
import { useTranslation as E } from "react-i18next";
|
|
5
5
|
import { B as ee } from "./button-D-MQxsA_.js";
|
|
6
6
|
import { I } from "./icon-button-C_1TgRiK.js";
|
|
7
7
|
import { C as R } from "./checkbox-BjDv-r3o.js";
|
|
8
8
|
import { P as O } from "./popover-4ZVtH_At.js";
|
|
9
9
|
import { S as te } from "./separator-CYU_bGFn.js";
|
|
10
10
|
import { S as ae } from "./settings-d25ju_6L.js";
|
|
11
|
-
import { G as
|
|
12
|
-
import { D as
|
|
13
|
-
import { B as
|
|
14
|
-
import { L as
|
|
11
|
+
import { G as re } from "./grip-vertical-onSb1JXO.js";
|
|
12
|
+
import { D as j } from "./description-list-Q8640NHu.js";
|
|
13
|
+
import { B as q } from "./badge-BUk4RjTS.js";
|
|
14
|
+
import { L as se } from "./link-N5_YpLtm.js";
|
|
15
15
|
import { T as ne } from "./transaction-chip-CohY6sTA.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 {
|
|
18
|
+
import { H as le } from "./hourglass-BEAzW1wE.js";
|
|
19
|
+
import { c as G } from "./createLucideIcon-DhHxpK9K.js";
|
|
20
|
+
import { U as ce } from "./user-B12p7bVF.js";
|
|
21
|
+
import { C as de } from "./city-input-3J3bz9EO.js";
|
|
22
|
+
import { C as ue } from "./country-select-DF5Bd_mn.js";
|
|
23
|
+
import { D as me } from "./date-picker-KcoNNsM0.js";
|
|
24
|
+
import { E as pe } from "./email-input-C7THAwh2.js";
|
|
25
|
+
import { F as fe } from "./fiscal-code-input-DwHb2nVW.js";
|
|
26
|
+
import { N as ge } from "./number-input-CVwI1ltI.js";
|
|
27
|
+
import { P as he } from "./phone-input-O9camxkq.js";
|
|
28
|
+
import { P as ye } from "./postal-code-input-CfZOnIkW.js";
|
|
29
|
+
import { P as be } from "./province-select-Bd20Z9Br.js";
|
|
30
|
+
import { S as ve } from "./select-k4gBdS8N.js";
|
|
31
|
+
import { S as xe } from "./switch-D--x7n6h.js";
|
|
32
|
+
import { T as Ce } from "./text-area-COMVJ1yE.js";
|
|
32
33
|
import { T as ke } from "./text-input-CaG9ApoE.js";
|
|
33
|
-
import { u as
|
|
34
|
+
import { u as Ve } from "./use-state-backed-input-DhRQo6gM.js";
|
|
34
35
|
import { C as K } from "./check-DrFSN__t.js";
|
|
35
|
-
import { X as
|
|
36
|
-
import { P as
|
|
37
|
-
import { L as
|
|
38
|
-
import { C as
|
|
36
|
+
import { X as Ne } from "./x-B5YnXwCz.js";
|
|
37
|
+
import { P as we } from "./pencil-B1sKKyuT.js";
|
|
38
|
+
import { L as De } from "./lock-ClAFG1gy.js";
|
|
39
|
+
import { C as Se } from "./copy-vRpqqHtY.js";
|
|
39
40
|
/**
|
|
40
41
|
* @license lucide-react v1.22.0 - ISC
|
|
41
42
|
*
|
|
42
43
|
* This source code is licensed under the ISC license.
|
|
43
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
44
45
|
*/
|
|
45
|
-
const
|
|
46
|
-
["path", { d: "M5 22h14", key: "ehvnwv" }],
|
|
47
|
-
["path", { d: "M5 2h14", key: "pdyrp9" }],
|
|
48
|
-
[
|
|
49
|
-
"path",
|
|
50
|
-
{
|
|
51
|
-
d: "M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",
|
|
52
|
-
key: "1d314k"
|
|
53
|
-
}
|
|
54
|
-
],
|
|
55
|
-
[
|
|
56
|
-
"path",
|
|
57
|
-
{ d: "M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2", key: "1vvvr6" }
|
|
58
|
-
]
|
|
59
|
-
], Te = q("hourglass", Se);
|
|
60
|
-
/**
|
|
61
|
-
* @license lucide-react v1.22.0 - ISC
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the ISC license.
|
|
64
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/
|
|
66
|
-
const ze = [
|
|
46
|
+
const Te = [
|
|
67
47
|
["path", { d: "M16 3h5v5", key: "1806ms" }],
|
|
68
48
|
["path", { d: "m21 3-6.75 6.75", key: "pv0uzu" }],
|
|
69
49
|
["circle", { cx: "10", cy: "14", r: "6", key: "1qwbdc" }]
|
|
70
|
-
],
|
|
50
|
+
], ze = G("mars", Te);
|
|
71
51
|
/**
|
|
72
52
|
* @license lucide-react v1.22.0 - ISC
|
|
73
53
|
*
|
|
74
54
|
* This source code is licensed under the ISC license.
|
|
75
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
56
|
*/
|
|
77
|
-
const
|
|
57
|
+
const Pe = [
|
|
78
58
|
["path", { d: "M12 15v7", key: "t2xh3l" }],
|
|
79
59
|
["path", { d: "M9 19h6", key: "456am0" }],
|
|
80
60
|
["circle", { cx: "12", cy: "9", r: "6", key: "1nw4tq" }]
|
|
81
|
-
],
|
|
61
|
+
], Fe = G("venus", Pe);
|
|
82
62
|
function X(e) {
|
|
83
|
-
return e.flatMap((
|
|
63
|
+
return e.flatMap((r) => r.fields.map((a) => a.id));
|
|
84
64
|
}
|
|
85
|
-
function Dt(e,
|
|
86
|
-
const a =
|
|
65
|
+
function Dt(e, r) {
|
|
66
|
+
const a = r ?? X(e), s = new Map(a.map((n, h) => [n, h]));
|
|
87
67
|
return e.map((n) => ({
|
|
88
68
|
section: n,
|
|
89
|
-
fields: n.fields.filter((h) =>
|
|
90
|
-
(h, l) =>
|
|
69
|
+
fields: n.fields.filter((h) => s.has(h.id)).sort(
|
|
70
|
+
(h, l) => s.get(h.id) - s.get(l.id)
|
|
91
71
|
)
|
|
92
72
|
}));
|
|
93
73
|
}
|
|
94
|
-
function St(e, { value:
|
|
74
|
+
function St(e, { value: r, defaultValue: a, onChange: s } = {}) {
|
|
95
75
|
const n = B(
|
|
96
76
|
() => X(e),
|
|
97
77
|
[e]
|
|
98
78
|
), [h, l] = Z({
|
|
99
|
-
value:
|
|
79
|
+
value: r,
|
|
100
80
|
defaultValue: a ?? n,
|
|
101
|
-
onChange:
|
|
81
|
+
onChange: s
|
|
102
82
|
}), c = h ?? a ?? n, m = B(() => {
|
|
103
83
|
const g = /* @__PURE__ */ new Map();
|
|
104
84
|
for (const b of e)
|
|
105
|
-
for (const
|
|
106
|
-
g.set(
|
|
85
|
+
for (const C of b.fields)
|
|
86
|
+
g.set(C.id, { field: C, sectionId: b.id });
|
|
107
87
|
return g;
|
|
108
88
|
}, [e]), d = V(
|
|
109
89
|
(g) => {
|
|
@@ -120,9 +100,9 @@ function St(e, { value: s, defaultValue: a, onChange: r } = {}) {
|
|
|
120
100
|
), o = V(
|
|
121
101
|
(g, b) => {
|
|
122
102
|
var D;
|
|
123
|
-
const
|
|
103
|
+
const C = ((D = e.find((p) => p.id === g)) == null ? void 0 : D.fields.map((p) => p.id)) ?? [], F = new Set(C);
|
|
124
104
|
if (b) {
|
|
125
|
-
const p =
|
|
105
|
+
const p = C.filter((u) => !c.includes(u));
|
|
126
106
|
d([...c, ...p]);
|
|
127
107
|
} else
|
|
128
108
|
d(c.filter((p) => !F.has(p)));
|
|
@@ -130,19 +110,19 @@ function St(e, { value: s, defaultValue: a, onChange: r } = {}) {
|
|
|
130
110
|
[e, c, d]
|
|
131
111
|
), w = V(
|
|
132
112
|
(g, b) => {
|
|
133
|
-
var
|
|
113
|
+
var L, i, A;
|
|
134
114
|
if (g === b) return;
|
|
135
|
-
const
|
|
136
|
-
if (!
|
|
115
|
+
const C = (L = m.get(g)) == null ? void 0 : L.sectionId, F = (i = m.get(b)) == null ? void 0 : i.sectionId;
|
|
116
|
+
if (!C || C !== F) return;
|
|
137
117
|
const D = new Set(
|
|
138
|
-
((
|
|
118
|
+
((A = e.find((v) => v.id === C)) == null ? void 0 : A.fields.map((v) => v.id)) ?? []
|
|
139
119
|
), p = c.filter((v) => D.has(v)), u = p.indexOf(g), x = p.indexOf(b);
|
|
140
120
|
if (u < 0 || x < 0) return;
|
|
141
121
|
const [T] = p.splice(u, 1);
|
|
142
122
|
p.splice(x, 0, T);
|
|
143
|
-
let
|
|
123
|
+
let k = 0;
|
|
144
124
|
const H = c.map(
|
|
145
|
-
(v) => D.has(v) ? p[
|
|
125
|
+
(v) => D.has(v) ? p[k++] : v
|
|
146
126
|
);
|
|
147
127
|
d(H);
|
|
148
128
|
},
|
|
@@ -163,18 +143,18 @@ function St(e, { value: s, defaultValue: a, onChange: r } = {}) {
|
|
|
163
143
|
}
|
|
164
144
|
function Tt({
|
|
165
145
|
sections: e,
|
|
166
|
-
visible:
|
|
146
|
+
visible: r,
|
|
167
147
|
onToggleField: a,
|
|
168
|
-
onToggleSection:
|
|
148
|
+
onToggleSection: s,
|
|
169
149
|
onMoveFieldOnto: n,
|
|
170
150
|
onReset: h,
|
|
171
151
|
label: l
|
|
172
152
|
}) {
|
|
173
|
-
const { t: c } =
|
|
153
|
+
const { t: c } = E("ui"), m = B(() => new Set(r), [r]), [d, y] = P(null), [o, w] = P(null), [S, g] = P(""), { sectionOfField: b, labelOfField: C } = B(() => {
|
|
174
154
|
const u = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map();
|
|
175
155
|
for (const T of e)
|
|
176
|
-
for (const
|
|
177
|
-
u.set(
|
|
156
|
+
for (const k of T.fields)
|
|
157
|
+
u.set(k.id, T.id), x.set(k.id, k.label);
|
|
178
158
|
return { sectionOfField: u, labelOfField: x };
|
|
179
159
|
}, [e]), F = d ? b.get(d) : void 0, D = V(() => {
|
|
180
160
|
y(null), w(null);
|
|
@@ -182,14 +162,14 @@ function Tt({
|
|
|
182
162
|
(u, x, T) => {
|
|
183
163
|
g(
|
|
184
164
|
c("fieldPicker.moved", {
|
|
185
|
-
field:
|
|
165
|
+
field: C.get(u) ?? "",
|
|
186
166
|
position: x + 1,
|
|
187
167
|
count: T,
|
|
188
168
|
defaultValue: "Moved {{field}} to position {{position}} of {{count}}"
|
|
189
169
|
})
|
|
190
170
|
);
|
|
191
171
|
},
|
|
192
|
-
[c,
|
|
172
|
+
[c, C]
|
|
193
173
|
);
|
|
194
174
|
return /* @__PURE__ */ N(O.Root, { children: [
|
|
195
175
|
/* @__PURE__ */ t(O.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
@@ -223,21 +203,21 @@ function Tt({
|
|
|
223
203
|
children: e.map((u) => {
|
|
224
204
|
const x = u.fields.map((i) => i.id), T = x.filter(
|
|
225
205
|
(i) => m.has(i)
|
|
226
|
-
).length,
|
|
206
|
+
).length, k = r.filter(
|
|
227
207
|
(i) => x.includes(i)
|
|
228
|
-
), H = T === 0 ? !1 : T === x.length ? !0 : "indeterminate",
|
|
208
|
+
), H = T === 0 ? !1 : T === x.length ? !0 : "indeterminate", L = !!u.heading;
|
|
229
209
|
return /* @__PURE__ */ N(
|
|
230
210
|
"div",
|
|
231
211
|
{
|
|
232
212
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
|
|
233
213
|
children: [
|
|
234
|
-
|
|
214
|
+
L ? /* @__PURE__ */ t(
|
|
235
215
|
R,
|
|
236
216
|
{
|
|
237
217
|
size: "sm",
|
|
238
218
|
label: u.heading,
|
|
239
219
|
checked: H,
|
|
240
|
-
onCheckedChange: (i) =>
|
|
220
|
+
onCheckedChange: (i) => s(u.id, i === !0)
|
|
241
221
|
}
|
|
242
222
|
) : null,
|
|
243
223
|
/* @__PURE__ */ t(
|
|
@@ -245,14 +225,14 @@ function Tt({
|
|
|
245
225
|
{
|
|
246
226
|
className: [
|
|
247
227
|
"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)]",
|
|
248
|
-
|
|
228
|
+
L ? "ds:ps-[var(--spacing-md)]" : "ds:ps-0"
|
|
249
229
|
].join(" "),
|
|
250
230
|
children: u.fields.map((i) => {
|
|
251
|
-
const
|
|
231
|
+
const A = m.has(i.id), v = k.indexOf(i.id), z = k.length, J = d === i.id, Q = o === i.id && d !== null && d !== i.id && F === u.id;
|
|
252
232
|
return /* @__PURE__ */ N(
|
|
253
233
|
"li",
|
|
254
234
|
{
|
|
255
|
-
...
|
|
235
|
+
...A ? {
|
|
256
236
|
draggable: !0,
|
|
257
237
|
onDragStart: (f) => {
|
|
258
238
|
y(i.id), f.dataTransfer.effectAllowed = "move", f.dataTransfer.setData("text/plain", i.id);
|
|
@@ -265,8 +245,8 @@ function Tt({
|
|
|
265
245
|
),
|
|
266
246
|
onDrop: (f) => {
|
|
267
247
|
f.preventDefault();
|
|
268
|
-
const
|
|
269
|
-
|
|
248
|
+
const M = f.dataTransfer.getData("text/plain");
|
|
249
|
+
M && M !== i.id && b.get(M) === u.id && (n(M, i.id), p(M, v, z)), D();
|
|
270
250
|
},
|
|
271
251
|
onDragEnd: D
|
|
272
252
|
} : {},
|
|
@@ -281,16 +261,16 @@ function Tt({
|
|
|
281
261
|
{
|
|
282
262
|
size: "sm",
|
|
283
263
|
label: i.label,
|
|
284
|
-
checked:
|
|
264
|
+
checked: A,
|
|
285
265
|
onCheckedChange: () => a(i.id)
|
|
286
266
|
}
|
|
287
267
|
),
|
|
288
|
-
|
|
268
|
+
A ? /* @__PURE__ */ t(
|
|
289
269
|
I,
|
|
290
270
|
{
|
|
291
271
|
size: "sm",
|
|
292
272
|
intent: "ghost",
|
|
293
|
-
icon: /* @__PURE__ */ t(
|
|
273
|
+
icon: /* @__PURE__ */ t(re, { "aria-hidden": "true" }),
|
|
294
274
|
"aria-label": c("fieldPicker.reorder", {
|
|
295
275
|
field: i.label,
|
|
296
276
|
defaultValue: "Reorder {{field}}. Press Alt + Up or Alt + Down to move."
|
|
@@ -303,22 +283,22 @@ function Tt({
|
|
|
303
283
|
if (v <= 0) return;
|
|
304
284
|
f.preventDefault(), n(
|
|
305
285
|
i.id,
|
|
306
|
-
|
|
286
|
+
k[v - 1]
|
|
307
287
|
), p(i.id, v - 1, z);
|
|
308
288
|
} else if (f.key === "ArrowDown") {
|
|
309
289
|
if (v >= z - 1) return;
|
|
310
290
|
f.preventDefault(), n(
|
|
311
291
|
i.id,
|
|
312
|
-
|
|
292
|
+
k[v + 1]
|
|
313
293
|
), p(i.id, v + 1, z);
|
|
314
294
|
} else if (f.key === "Home") {
|
|
315
295
|
if (v <= 0) return;
|
|
316
|
-
f.preventDefault(), n(i.id,
|
|
296
|
+
f.preventDefault(), n(i.id, k[0]), p(i.id, 0, z);
|
|
317
297
|
} else if (f.key === "End") {
|
|
318
298
|
if (v >= z - 1) return;
|
|
319
299
|
f.preventDefault(), n(
|
|
320
300
|
i.id,
|
|
321
|
-
|
|
301
|
+
k[z - 1]
|
|
322
302
|
), p(i.id, z - 1, z);
|
|
323
303
|
}
|
|
324
304
|
}
|
|
@@ -356,14 +336,14 @@ const U = "ds:text-[color:var(--foreground)]", Ee = {
|
|
|
356
336
|
};
|
|
357
337
|
function _({
|
|
358
338
|
icon: e,
|
|
359
|
-
mono:
|
|
339
|
+
mono: r,
|
|
360
340
|
children: a
|
|
361
341
|
}) {
|
|
362
342
|
return /* @__PURE__ */ t(
|
|
363
|
-
|
|
343
|
+
q,
|
|
364
344
|
{
|
|
365
345
|
variant: "neutral",
|
|
366
|
-
className:
|
|
346
|
+
className: r ? "ds:font-mono" : void 0,
|
|
367
347
|
leading: e ? W(e, {
|
|
368
348
|
className: U
|
|
369
349
|
}) : void 0,
|
|
@@ -371,45 +351,45 @@ function _({
|
|
|
371
351
|
}
|
|
372
352
|
);
|
|
373
353
|
}
|
|
374
|
-
function
|
|
375
|
-
const { t:
|
|
354
|
+
function Ae({ code: e }) {
|
|
355
|
+
const { t: r } = E("ui"), a = e.toLowerCase(), s = r(`patientField.sex.${a}`, {
|
|
376
356
|
defaultValue: Ee[a] ?? e
|
|
377
357
|
});
|
|
378
|
-
return a === "f" ? /* @__PURE__ */ t(
|
|
358
|
+
return a === "f" ? /* @__PURE__ */ t(q, { variant: "accentSoft", leading: /* @__PURE__ */ t(Fe, {}), children: s }) : a === "m" ? /* @__PURE__ */ t(q, { variant: "info", leading: /* @__PURE__ */ t(ze, {}), children: s }) : /* @__PURE__ */ t(_, { icon: /* @__PURE__ */ t(ce, {}), children: s });
|
|
379
359
|
}
|
|
380
|
-
function
|
|
381
|
-
const { t:
|
|
382
|
-
return /* @__PURE__ */ t(_, { icon: /* @__PURE__ */ t(
|
|
360
|
+
function Ie({ years: e }) {
|
|
361
|
+
const { t: r } = E("ui");
|
|
362
|
+
return /* @__PURE__ */ t(_, { icon: /* @__PURE__ */ t(le, {}), children: r("patientField.age", {
|
|
383
363
|
count: e,
|
|
384
364
|
defaultValue: "{{count}} years old"
|
|
385
365
|
}) });
|
|
386
366
|
}
|
|
387
367
|
function Le({ field: e }) {
|
|
388
|
-
const { i18n:
|
|
368
|
+
const { i18n: r } = E("ui");
|
|
389
369
|
if (e.kind === "email" || e.kind === "phone") {
|
|
390
370
|
const a = typeof e.value == "string" ? e.value : e.copyText ?? (typeof e.editValue == "string" ? e.editValue : "");
|
|
391
371
|
if (a) {
|
|
392
|
-
const
|
|
393
|
-
return /* @__PURE__ */ t(
|
|
372
|
+
const s = e.kind === "email" ? `mailto:${a.trim()}` : `tel:${a.replace(/[^+\d]/g, "")}`;
|
|
373
|
+
return /* @__PURE__ */ t(se, { href: s, dir: "ltr", children: a });
|
|
394
374
|
}
|
|
395
375
|
}
|
|
396
376
|
if (e.value != null)
|
|
397
|
-
return /* @__PURE__ */ t(
|
|
377
|
+
return /* @__PURE__ */ t($, { children: e.value });
|
|
398
378
|
if (!e.kind)
|
|
399
379
|
return null;
|
|
400
380
|
switch (e.kind) {
|
|
401
381
|
case "sex":
|
|
402
|
-
return /* @__PURE__ */ t(
|
|
382
|
+
return /* @__PURE__ */ t(Ae, { code: String(e.editValue ?? "") });
|
|
403
383
|
case "age": {
|
|
404
384
|
const a = typeof e.editValue == "number" ? e.editValue : Number(e.editValue);
|
|
405
|
-
return Number.isFinite(a) ? /* @__PURE__ */ t(
|
|
385
|
+
return Number.isFinite(a) ? /* @__PURE__ */ t(Ie, { years: a }) : null;
|
|
406
386
|
}
|
|
407
387
|
case "dob": {
|
|
408
|
-
const a = e.editValue,
|
|
388
|
+
const a = e.editValue, s = a instanceof Date ? a : new Date(String(a ?? "")), n = Number.isNaN(s.getTime()) ? String(a ?? "") : new Intl.DateTimeFormat(r.language, {
|
|
409
389
|
day: "numeric",
|
|
410
390
|
month: "short",
|
|
411
391
|
year: "numeric"
|
|
412
|
-
}).format(
|
|
392
|
+
}).format(s);
|
|
413
393
|
return n ? /* @__PURE__ */ t(_, { icon: /* @__PURE__ */ t(oe, {}), children: n }) : null;
|
|
414
394
|
}
|
|
415
395
|
case "fiscalCode": {
|
|
@@ -432,16 +412,16 @@ function Le({ field: e }) {
|
|
|
432
412
|
return null;
|
|
433
413
|
}
|
|
434
414
|
}
|
|
435
|
-
function
|
|
415
|
+
function Me({
|
|
436
416
|
field: e
|
|
437
417
|
}) {
|
|
438
|
-
const { t:
|
|
418
|
+
const { t: r } = E("ui");
|
|
439
419
|
return /* @__PURE__ */ N("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
440
420
|
e.label,
|
|
441
421
|
e.sensitive ? /* @__PURE__ */ t(
|
|
442
|
-
|
|
422
|
+
De,
|
|
443
423
|
{
|
|
444
|
-
"aria-label":
|
|
424
|
+
"aria-label": r("patientDetails.sensitive", {
|
|
445
425
|
defaultValue: "Sensitive"
|
|
446
426
|
}),
|
|
447
427
|
className: "ds:size-3 ds:shrink-0 ds:text-[color:var(--muted-foreground)]"
|
|
@@ -449,20 +429,20 @@ function Oe({
|
|
|
449
429
|
) : null
|
|
450
430
|
] });
|
|
451
431
|
}
|
|
452
|
-
function
|
|
432
|
+
function Oe({
|
|
453
433
|
field: e,
|
|
454
|
-
editable:
|
|
434
|
+
editable: r,
|
|
455
435
|
onFieldSave: a,
|
|
456
|
-
validate:
|
|
436
|
+
validate: s,
|
|
457
437
|
locale: n
|
|
458
438
|
}) {
|
|
459
|
-
const { t: h } =
|
|
439
|
+
const { t: h } = E("ui"), l = Y(), c = r && !!e.editable && !!a, [m, d] = P(!1), [y, o] = P(e.editValue), [w, S] = P(null), [g, b] = P(!1), C = V(() => {
|
|
460
440
|
o(e.editValue), S(null), d(!0);
|
|
461
441
|
}, [e.editValue]), F = V(() => {
|
|
462
442
|
d(!1), S(null);
|
|
463
443
|
}, []), D = V(async () => {
|
|
464
444
|
if (!a) return;
|
|
465
|
-
const u = (
|
|
445
|
+
const u = (s == null ? void 0 : s(e.id, y)) ?? null;
|
|
466
446
|
if (u) {
|
|
467
447
|
S(u);
|
|
468
448
|
return;
|
|
@@ -479,11 +459,11 @@ function Be({
|
|
|
479
459
|
} finally {
|
|
480
460
|
b(!1);
|
|
481
461
|
}
|
|
482
|
-
}, [a,
|
|
462
|
+
}, [a, s, e.id, y, h]), p = typeof e.value == "string" ? e.value : e.copyText ?? (typeof e.editValue == "string" ? e.editValue : void 0);
|
|
483
463
|
return m ? /* @__PURE__ */ N("span", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
484
464
|
/* @__PURE__ */ N("span", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-2xs)]", children: [
|
|
485
465
|
/* @__PURE__ */ t(
|
|
486
|
-
|
|
466
|
+
Be,
|
|
487
467
|
{
|
|
488
468
|
field: e,
|
|
489
469
|
value: y,
|
|
@@ -510,7 +490,7 @@ function Be({
|
|
|
510
490
|
{
|
|
511
491
|
size: "sm",
|
|
512
492
|
intent: "ghost",
|
|
513
|
-
icon: /* @__PURE__ */ t(
|
|
493
|
+
icon: /* @__PURE__ */ t(Ne, { "aria-hidden": "true" }),
|
|
514
494
|
"aria-label": h("patientDetails.edit.cancel", {
|
|
515
495
|
defaultValue: "Cancel"
|
|
516
496
|
}),
|
|
@@ -537,62 +517,62 @@ function Be({
|
|
|
537
517
|
children: /* @__PURE__ */ t(Le, { field: e })
|
|
538
518
|
}
|
|
539
519
|
),
|
|
540
|
-
e.copyable && e.copyText ? /* @__PURE__ */ t(
|
|
520
|
+
e.copyable && e.copyText ? /* @__PURE__ */ t(_e, { text: e.copyText, label: e.label }) : null,
|
|
541
521
|
c ? /* @__PURE__ */ t(
|
|
542
522
|
I,
|
|
543
523
|
{
|
|
544
524
|
size: "sm",
|
|
545
525
|
intent: "ghost",
|
|
546
526
|
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",
|
|
547
|
-
icon: /* @__PURE__ */ t(
|
|
527
|
+
icon: /* @__PURE__ */ t(we, { "aria-hidden": "true" }),
|
|
548
528
|
"aria-label": h("patientDetails.edit.editField", {
|
|
549
529
|
field: e.label,
|
|
550
530
|
defaultValue: "Edit {{field}}"
|
|
551
531
|
}),
|
|
552
|
-
onClick:
|
|
532
|
+
onClick: C
|
|
553
533
|
}
|
|
554
534
|
) : null
|
|
555
535
|
] });
|
|
556
536
|
}
|
|
557
537
|
function zt({
|
|
558
538
|
field: e,
|
|
559
|
-
icon:
|
|
539
|
+
icon: r,
|
|
560
540
|
...a
|
|
561
541
|
}) {
|
|
562
542
|
return /* @__PURE__ */ N(
|
|
563
|
-
|
|
543
|
+
j.Row,
|
|
564
544
|
{
|
|
565
|
-
icon:
|
|
545
|
+
icon: r ?? null,
|
|
566
546
|
"data-field-id": e.id,
|
|
567
547
|
className: "ds:group",
|
|
568
548
|
children: [
|
|
569
|
-
/* @__PURE__ */ t(
|
|
570
|
-
/* @__PURE__ */ t(
|
|
549
|
+
/* @__PURE__ */ t(j.Term, { children: /* @__PURE__ */ t(Me, { field: e }) }),
|
|
550
|
+
/* @__PURE__ */ t(j.Detail, { children: /* @__PURE__ */ t(Oe, { field: e, ...a }) })
|
|
571
551
|
]
|
|
572
552
|
}
|
|
573
553
|
);
|
|
574
554
|
}
|
|
575
|
-
function
|
|
555
|
+
function Be({
|
|
576
556
|
field: e,
|
|
577
|
-
value:
|
|
557
|
+
value: r,
|
|
578
558
|
onChange: a,
|
|
579
|
-
invalid:
|
|
559
|
+
invalid: s,
|
|
580
560
|
errorId: n,
|
|
581
561
|
locale: h,
|
|
582
562
|
disabled: l
|
|
583
563
|
}) {
|
|
584
|
-
const { t: c } =
|
|
564
|
+
const { t: c } = E("ui"), m = s ? "error" : "default", d = e.editType ?? "text", y = Ve(typeof r == "string" ? r : "");
|
|
585
565
|
switch (d) {
|
|
586
566
|
case "textarea":
|
|
587
567
|
return /* @__PURE__ */ t(
|
|
588
|
-
|
|
568
|
+
Ce,
|
|
589
569
|
{
|
|
590
570
|
size: "sm",
|
|
591
|
-
value: typeof
|
|
571
|
+
value: typeof r == "string" ? r : "",
|
|
592
572
|
onChange: (o) => a(o.target.value),
|
|
593
573
|
tone: m,
|
|
594
574
|
"aria-label": e.label,
|
|
595
|
-
"aria-invalid":
|
|
575
|
+
"aria-invalid": s || void 0,
|
|
596
576
|
"aria-describedby": n,
|
|
597
577
|
disabled: l,
|
|
598
578
|
className: "ds:flex-1"
|
|
@@ -600,35 +580,35 @@ function _e({
|
|
|
600
580
|
);
|
|
601
581
|
case "select":
|
|
602
582
|
return /* @__PURE__ */ t(
|
|
603
|
-
|
|
583
|
+
ve,
|
|
604
584
|
{
|
|
605
585
|
size: "sm",
|
|
606
586
|
options: e.options ?? [],
|
|
607
|
-
value: typeof
|
|
587
|
+
value: typeof r == "string" ? r : "",
|
|
608
588
|
onValueChange: (o) => a(o),
|
|
609
589
|
tone: m,
|
|
610
590
|
disabled: l,
|
|
611
591
|
"aria-label": e.label,
|
|
612
|
-
"aria-invalid":
|
|
592
|
+
"aria-invalid": s || void 0,
|
|
613
593
|
"aria-describedby": n
|
|
614
594
|
}
|
|
615
595
|
);
|
|
616
596
|
case "boolean":
|
|
617
597
|
return /* @__PURE__ */ t(
|
|
618
|
-
|
|
598
|
+
xe,
|
|
619
599
|
{
|
|
620
600
|
label: e.label,
|
|
621
|
-
checked:
|
|
601
|
+
checked: r === !0,
|
|
622
602
|
onCheckedChange: (o) => a(o),
|
|
623
603
|
disabled: l
|
|
624
604
|
}
|
|
625
605
|
);
|
|
626
606
|
case "date":
|
|
627
607
|
return /* @__PURE__ */ t(
|
|
628
|
-
|
|
608
|
+
me,
|
|
629
609
|
{
|
|
630
610
|
size: "sm",
|
|
631
|
-
value:
|
|
611
|
+
value: r instanceof Date ? r : void 0,
|
|
632
612
|
onChange: (o) => a(o ?? null),
|
|
633
613
|
disabled: l,
|
|
634
614
|
"aria-label": e.label
|
|
@@ -636,10 +616,10 @@ function _e({
|
|
|
636
616
|
);
|
|
637
617
|
case "number":
|
|
638
618
|
return /* @__PURE__ */ t(
|
|
639
|
-
|
|
619
|
+
ge,
|
|
640
620
|
{
|
|
641
621
|
size: "sm",
|
|
642
|
-
value: typeof
|
|
622
|
+
value: typeof r == "number" ? r : null,
|
|
643
623
|
onChange: (o) => a(o),
|
|
644
624
|
mode: e.currency ? "currency" : "decimal",
|
|
645
625
|
currency: e.currency,
|
|
@@ -647,19 +627,19 @@ function _e({
|
|
|
647
627
|
tone: m,
|
|
648
628
|
disabled: l,
|
|
649
629
|
"aria-label": e.label,
|
|
650
|
-
"aria-invalid":
|
|
630
|
+
"aria-invalid": s || void 0,
|
|
651
631
|
"aria-describedby": n
|
|
652
632
|
}
|
|
653
633
|
);
|
|
654
634
|
case "email":
|
|
655
635
|
return /* @__PURE__ */ t(
|
|
656
|
-
|
|
636
|
+
pe,
|
|
657
637
|
{
|
|
658
638
|
size: "sm",
|
|
659
639
|
ref: y.ref,
|
|
660
640
|
onChange: y.quiet((o) => a(o.target.value)),
|
|
661
641
|
"aria-label": e.label,
|
|
662
|
-
"aria-invalid":
|
|
642
|
+
"aria-invalid": s || void 0,
|
|
663
643
|
"aria-describedby": n,
|
|
664
644
|
disabled: l,
|
|
665
645
|
className: "ds:flex-1"
|
|
@@ -667,14 +647,14 @@ function _e({
|
|
|
667
647
|
);
|
|
668
648
|
case "phone":
|
|
669
649
|
return /* @__PURE__ */ t(
|
|
670
|
-
|
|
650
|
+
he,
|
|
671
651
|
{
|
|
672
652
|
size: "sm",
|
|
673
|
-
value: typeof
|
|
653
|
+
value: typeof r == "string" ? r : "",
|
|
674
654
|
onChange: (o) => a(o),
|
|
675
655
|
tone: m,
|
|
676
656
|
"aria-label": e.label,
|
|
677
|
-
"aria-invalid":
|
|
657
|
+
"aria-invalid": s || void 0,
|
|
678
658
|
"aria-describedby": n,
|
|
679
659
|
disabled: l,
|
|
680
660
|
className: "ds:flex-1"
|
|
@@ -682,14 +662,14 @@ function _e({
|
|
|
682
662
|
);
|
|
683
663
|
case "fiscalCode":
|
|
684
664
|
return /* @__PURE__ */ t(
|
|
685
|
-
|
|
665
|
+
fe,
|
|
686
666
|
{
|
|
687
667
|
size: "sm",
|
|
688
|
-
value: typeof
|
|
668
|
+
value: typeof r == "string" ? r : "",
|
|
689
669
|
onChange: (o) => a(o),
|
|
690
670
|
tone: m,
|
|
691
671
|
"aria-label": e.label,
|
|
692
|
-
"aria-invalid":
|
|
672
|
+
"aria-invalid": s || void 0,
|
|
693
673
|
"aria-describedby": n,
|
|
694
674
|
disabled: l,
|
|
695
675
|
className: "ds:flex-1"
|
|
@@ -701,45 +681,45 @@ function _e({
|
|
|
701
681
|
// conveyed by colour alone.
|
|
702
682
|
case "province":
|
|
703
683
|
return /* @__PURE__ */ t(
|
|
704
|
-
|
|
684
|
+
be,
|
|
705
685
|
{
|
|
706
686
|
size: "sm",
|
|
707
687
|
country: "it",
|
|
708
|
-
value: typeof
|
|
688
|
+
value: typeof r == "string" ? r : "",
|
|
709
689
|
onValueChange: (o) => a(o),
|
|
710
690
|
tone: m,
|
|
711
691
|
disabled: l,
|
|
712
692
|
"aria-label": e.label,
|
|
713
|
-
"aria-invalid":
|
|
693
|
+
"aria-invalid": s || void 0,
|
|
714
694
|
"aria-describedby": n,
|
|
715
695
|
className: "ds:flex-1"
|
|
716
696
|
}
|
|
717
697
|
);
|
|
718
698
|
case "country":
|
|
719
699
|
return /* @__PURE__ */ t(
|
|
720
|
-
|
|
700
|
+
ue,
|
|
721
701
|
{
|
|
722
702
|
size: "sm",
|
|
723
|
-
value: typeof
|
|
703
|
+
value: typeof r == "string" ? r : "",
|
|
724
704
|
onValueChange: (o) => a(o),
|
|
725
705
|
tone: m,
|
|
726
706
|
disabled: l,
|
|
727
707
|
"aria-label": e.label,
|
|
728
|
-
"aria-invalid":
|
|
708
|
+
"aria-invalid": s || void 0,
|
|
729
709
|
"aria-describedby": n,
|
|
730
710
|
className: "ds:flex-1"
|
|
731
711
|
}
|
|
732
712
|
);
|
|
733
713
|
case "postalCode":
|
|
734
714
|
return /* @__PURE__ */ t(
|
|
735
|
-
|
|
715
|
+
ye,
|
|
736
716
|
{
|
|
737
717
|
size: "sm",
|
|
738
718
|
country: "it",
|
|
739
719
|
ref: y.ref,
|
|
740
720
|
onValueChange: y.quiet((o) => a(o)),
|
|
741
721
|
"aria-label": e.label,
|
|
742
|
-
"aria-invalid":
|
|
722
|
+
"aria-invalid": s || void 0,
|
|
743
723
|
"aria-describedby": n,
|
|
744
724
|
disabled: l,
|
|
745
725
|
className: "ds:flex-1"
|
|
@@ -747,7 +727,7 @@ function _e({
|
|
|
747
727
|
);
|
|
748
728
|
case "city":
|
|
749
729
|
return /* @__PURE__ */ t(
|
|
750
|
-
|
|
730
|
+
de,
|
|
751
731
|
{
|
|
752
732
|
size: "sm",
|
|
753
733
|
ref: y.ref,
|
|
@@ -755,7 +735,7 @@ function _e({
|
|
|
755
735
|
tone: m,
|
|
756
736
|
disabled: l,
|
|
757
737
|
"aria-label": e.label,
|
|
758
|
-
"aria-invalid":
|
|
738
|
+
"aria-invalid": s || void 0,
|
|
759
739
|
"aria-describedby": n,
|
|
760
740
|
className: "ds:flex-1"
|
|
761
741
|
}
|
|
@@ -770,7 +750,7 @@ function _e({
|
|
|
770
750
|
onChange: y.quiet((o) => a(o.target.value)),
|
|
771
751
|
tone: m,
|
|
772
752
|
"aria-label": e.label,
|
|
773
|
-
"aria-invalid":
|
|
753
|
+
"aria-invalid": s || void 0,
|
|
774
754
|
"aria-describedby": n,
|
|
775
755
|
disabled: l,
|
|
776
756
|
clearable: !0,
|
|
@@ -782,11 +762,11 @@ function _e({
|
|
|
782
762
|
);
|
|
783
763
|
}
|
|
784
764
|
}
|
|
785
|
-
function
|
|
765
|
+
function _e({
|
|
786
766
|
text: e,
|
|
787
|
-
label:
|
|
767
|
+
label: r
|
|
788
768
|
}) {
|
|
789
|
-
const { t: a } =
|
|
769
|
+
const { t: a } = E("ui"), [s, n] = P(!1), [h, l] = P(""), c = V(async () => {
|
|
790
770
|
try {
|
|
791
771
|
await navigator.clipboard.writeText(e), n(!0), l(a("keyValuePair.copied", { defaultValue: "Copied" })), setTimeout(() => {
|
|
792
772
|
n(!1), l("");
|
|
@@ -797,15 +777,15 @@ function He({
|
|
|
797
777
|
), setTimeout(() => l(""), 3e3);
|
|
798
778
|
}
|
|
799
779
|
}, [e, a]);
|
|
800
|
-
return /* @__PURE__ */ N(
|
|
780
|
+
return /* @__PURE__ */ N($, { children: [
|
|
801
781
|
/* @__PURE__ */ t(
|
|
802
782
|
I,
|
|
803
783
|
{
|
|
804
784
|
size: "sm",
|
|
805
785
|
intent: "ghost",
|
|
806
|
-
icon:
|
|
786
|
+
icon: s ? /* @__PURE__ */ t(K, { "aria-hidden": "true" }) : /* @__PURE__ */ t(Se, { "aria-hidden": "true" }),
|
|
807
787
|
"aria-label": a("keyValuePair.copy", {
|
|
808
|
-
label:
|
|
788
|
+
label: r,
|
|
809
789
|
defaultValue: "Copy {{label}}"
|
|
810
790
|
}),
|
|
811
791
|
onClick: c
|
|
@@ -815,15 +795,14 @@ function He({
|
|
|
815
795
|
] });
|
|
816
796
|
}
|
|
817
797
|
export {
|
|
818
|
-
|
|
798
|
+
Ie as A,
|
|
819
799
|
Tt as F,
|
|
820
|
-
Te as H,
|
|
821
800
|
_ as N,
|
|
822
801
|
zt as P,
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
802
|
+
Ae as S,
|
|
803
|
+
Oe as a,
|
|
804
|
+
Me as b,
|
|
826
805
|
Dt as r,
|
|
827
806
|
St as u
|
|
828
807
|
};
|
|
829
|
-
//# sourceMappingURL=patient-field-row-
|
|
808
|
+
//# sourceMappingURL=patient-field-row-lY-Tb5Mo.js.map
|