@alfadocs/ui-kit 1.134.0 → 1.135.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-summary-panel-B70S2lgC.js +455 -0
- package/dist/_chunks/{alia-sidebar-CK1zw_Bc.js → alia-sidebar-CtwhdASP.js} +3 -3
- package/dist/_chunks/{appointment-card-DG3m9yN-.js → appointment-card-BT1cMZIX.js} +2 -2
- package/dist/_chunks/{appointment-peek-BK0tDs4C.js → appointment-peek-BP_ACFz5.js} +2 -2
- package/dist/_chunks/{appointment-timeline-BiI2riRZ.js → appointment-timeline-Dy4YQJ17.js} +2 -2
- package/dist/_chunks/{appointment-tray-ClJCtYQj.js → appointment-tray-B3gSHL1j.js} +2 -2
- package/dist/_chunks/{calendar-appointment-editor-dialog-BSkIYGlW.js → calendar-appointment-editor-dialog-I5PfWudy.js} +8 -8
- package/dist/_chunks/{chat-container-B83b4hut.js → chat-container-CoOT7dzB.js} +37 -36
- package/dist/_chunks/{chat-input-DwQ4_WXK.js → chat-input-CX4dxBq7.js} +85 -84
- package/dist/_chunks/communications-panel-BKPHCiMB.js +973 -0
- package/dist/_chunks/{entity-summary-KHM0PnSI.js → entity-summary-CpNk6ybN.js} +70 -69
- package/dist/_chunks/get-error-message-DbFUzuja.js +7 -0
- package/dist/_chunks/handled-rejection-C-6Dq0As.js +9 -0
- package/dist/_chunks/megaphone-CzeTT9B3.js +22 -0
- package/dist/_chunks/{notes-panel-BAyPOr8N.js → notes-panel-BvjAo4RQ.js} +5 -4
- package/dist/_chunks/{patient-account-settings-BkAtIxJW.js → patient-account-settings-B2XbN_Fe.js} +2 -2
- package/dist/_chunks/{patient-check-in-resume-xhqjC6gf.js → patient-check-in-resume-B7NY-6KI.js} +4 -4
- package/dist/_chunks/{portal-details-CTEsm705.js → portal-details-DCIiGkHA.js} +2 -2
- package/dist/_chunks/{portal-documents-D8skew0h.js → portal-documents-DJOH8pZx.js} +2 -2
- package/dist/_chunks/{portal-parts-BdR29P7z.js → portal-parts-Br8wuala.js} +2 -2
- package/dist/_chunks/signing-end-screen-BdhbkPKO.js +1355 -0
- package/dist/_chunks/{task-editor-g1AGfxhr.js → task-editor-DvwqPfFR.js} +3 -2
- package/dist/_chunks/{tasks-panel-BE3zaayj.js → tasks-panel-6EzdnwT8.js} +155 -171
- package/dist/_chunks/{use-appointment-details-read-Dzc6fEzG.js → use-appointment-details-read-6_OmOwUs.js} +110 -109
- package/dist/_chunks/{workflow-status-D1WgGVTP.js → workflow-status-CO0mxXs2.js} +3 -2
- package/dist/agent-catalog.json +251 -1
- package/dist/agent-i18n/en.json +28 -0
- package/dist/browser-support.js +1 -1
- package/dist/components/_shared/sms-segments.d.ts +43 -0
- package/dist/components/ai-summary-panel/ai-summary-panel.agent.d.ts +4 -0
- package/dist/components/ai-summary-panel/ai-summary-panel.d.ts +71 -0
- package/dist/components/ai-summary-panel/index.d.ts +4 -0
- package/dist/components/ai-summary-panel/index.js +6 -0
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/chat-container/chat-container.d.ts +7 -0
- package/dist/components/chat-container/index.js +1 -1
- package/dist/components/chat-input/chat-input.d.ts +3 -0
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/communications-panel/communications-panel.agent.d.ts +4 -0
- package/dist/components/communications-panel/communications-panel.d.ts +136 -0
- package/dist/components/communications-panel/index.d.ts +6 -0
- package/dist/components/communications-panel/index.js +7 -0
- package/dist/components/entity-summary/entity-summary.d.ts +8 -0
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/notes-panel/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/workflow-status/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/host-compat.css +10 -4
- package/dist/i18n/locales/ar.d.ts +93 -0
- package/dist/i18n/locales/ar.js +94 -0
- package/dist/i18n/locales/de.d.ts +93 -0
- package/dist/i18n/locales/de.js +94 -0
- package/dist/i18n/locales/el.d.ts +93 -0
- package/dist/i18n/locales/el.js +94 -0
- package/dist/i18n/locales/en.d.ts +93 -0
- package/dist/i18n/locales/en.js +94 -0
- package/dist/i18n/locales/es.d.ts +93 -0
- package/dist/i18n/locales/es.js +94 -0
- package/dist/i18n/locales/fr.d.ts +93 -0
- package/dist/i18n/locales/fr.js +94 -0
- package/dist/i18n/locales/hi.d.ts +93 -0
- package/dist/i18n/locales/hi.js +94 -0
- package/dist/i18n/locales/it.d.ts +93 -0
- package/dist/i18n/locales/it.js +94 -0
- package/dist/i18n/locales/ja.d.ts +93 -0
- package/dist/i18n/locales/ja.js +94 -0
- package/dist/i18n/locales/nl.d.ts +93 -0
- package/dist/i18n/locales/nl.js +94 -0
- package/dist/i18n/locales/pl.d.ts +93 -0
- package/dist/i18n/locales/pl.js +94 -0
- package/dist/i18n/locales/pt.d.ts +93 -0
- package/dist/i18n/locales/pt.js +94 -0
- package/dist/i18n/locales/ro.d.ts +93 -0
- package/dist/i18n/locales/ro.js +94 -0
- package/dist/i18n/locales/ru.d.ts +93 -0
- package/dist/i18n/locales/ru.js +94 -0
- package/dist/i18n/locales/sq.d.ts +93 -0
- package/dist/i18n/locales/sq.js +94 -0
- package/dist/i18n/locales/sv.d.ts +93 -0
- package/dist/i18n/locales/sv.js +94 -0
- package/dist/i18n/locales/tr.d.ts +93 -0
- package/dist/i18n/locales/tr.js +94 -0
- package/dist/i18n/locales/zh.d.ts +93 -0
- package/dist/i18n/locales/zh.js +94 -0
- package/dist/index.js +893 -886
- package/dist/locales/ar.json +93 -0
- package/dist/locales/de.json +93 -0
- package/dist/locales/el.json +93 -0
- package/dist/locales/en.json +93 -0
- package/dist/locales/es.json +93 -0
- package/dist/locales/fr.json +93 -0
- package/dist/locales/hi.json +93 -0
- package/dist/locales/it.json +93 -0
- package/dist/locales/ja.json +93 -0
- package/dist/locales/nl.json +93 -0
- package/dist/locales/pl.json +93 -0
- package/dist/locales/pt.json +93 -0
- package/dist/locales/ro.json +93 -0
- package/dist/locales/ru.json +93 -0
- package/dist/locales/sq.json +93 -0
- package/dist/locales/sv.json +93 -0
- package/dist/locales/tr.json +93 -0
- package/dist/locales/zh.json +93 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/calendar/calendar.journey.d.ts +7 -0
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/patient-account-settings/index.js +1 -1
- package/dist/patterns/patient-check-in/index.js +1 -1
- package/dist/patterns/patient-portal/index.js +2 -2
- package/dist/patterns/signing/index.d.ts +1 -0
- package/dist/patterns/signing/index.js +1 -1
- package/dist/patterns/signing/multi-field-signer.d.ts +22 -1
- package/dist/patterns/signing/signing-checkbox-pill.d.ts +66 -0
- package/dist/patterns/signing/signing-checkbox-sheet.d.ts +16 -0
- package/dist/patterns/signing/signing-document-screen.d.ts +18 -1
- package/dist/tokens.css +1 -1
- package/package.json +9 -1
- package/dist/_chunks/handled-rejection-6gqCf5vt.js +0 -13
- package/dist/_chunks/signing-end-screen-an9P8DOT.js +0 -1041
|
@@ -1,1041 +0,0 @@
|
|
|
1
|
-
import { jsxs as o, jsx as e, Fragment as A } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as R, useEffect as V, useState as ne, useId as Z } from "react";
|
|
3
|
-
import { useTranslation as z, Trans as D } from "react-i18next";
|
|
4
|
-
import { A as j } from "./alert-C4WKViaS.js";
|
|
5
|
-
import { P as se } from "./pdf-viewer-TRC5jEm5.js";
|
|
6
|
-
import { S as ae } from "./signature-field-BjlY_yXH.js";
|
|
7
|
-
import { S as re } from "./signature-capture-BJc7kfqi.js";
|
|
8
|
-
import { D as y } from "./dialog-CVTxyR0v.js";
|
|
9
|
-
import { B as H } from "./button-DohK_Ak_.js";
|
|
10
|
-
import { C as le } from "./chevron-left-B8cOyH-V.js";
|
|
11
|
-
import { C as oe } from "./chevron-right-I9AeSxH2.js";
|
|
12
|
-
import { S as ce } from "./spinner-CoflYlEx.js";
|
|
13
|
-
import { u as ue } from "./use-visual-viewport-pin-ChurOsHM.js";
|
|
14
|
-
import { A as ge } from "./arrow-left-BfaGqVam.js";
|
|
15
|
-
import { A as me } from "./arrow-right-KsIrLdt0.js";
|
|
16
|
-
import { c as fe } from "./index-D2ZczOXr.js";
|
|
17
|
-
import { p as M } from "./privacy-mask-text-B8YfzB7L.js";
|
|
18
|
-
import { C as X } from "./card-n6W6LW-N.js";
|
|
19
|
-
import { A as ie } from "./avatar-Dp5apm1d.js";
|
|
20
|
-
import { B as pe } from "./badge-BUk4RjTS.js";
|
|
21
|
-
import { F as Y } from "./finished-terminal-unDnXT4j.js";
|
|
22
|
-
import { H as he, g as ve, a as xe, d as be } from "./header-l_B8MV0g.js";
|
|
23
|
-
import { L as ye } from "./logo-hIsyVE96.js";
|
|
24
|
-
import { C as Ne } from "./clock-Drd4Wtis.js";
|
|
25
|
-
import { B as Ie } from "./ban-CiSCCcOE.js";
|
|
26
|
-
function Se({
|
|
27
|
-
labels: i,
|
|
28
|
-
disabled: t,
|
|
29
|
-
id: n,
|
|
30
|
-
onComplete: s
|
|
31
|
-
}) {
|
|
32
|
-
return /* @__PURE__ */ e(
|
|
33
|
-
re,
|
|
34
|
-
{
|
|
35
|
-
id: n,
|
|
36
|
-
width: "100%",
|
|
37
|
-
allowTypedFallback: !0,
|
|
38
|
-
disabled: t,
|
|
39
|
-
ariaLabel: i.dialogTitle,
|
|
40
|
-
onConfirm: (r) => s(r)
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
function we({
|
|
45
|
-
src: i,
|
|
46
|
-
documents: t,
|
|
47
|
-
session: n,
|
|
48
|
-
labels: s,
|
|
49
|
-
docIndex: r,
|
|
50
|
-
ariaLabel: m,
|
|
51
|
-
initialZoom: a = "fit-width",
|
|
52
|
-
hideFieldLabels: f = !1,
|
|
53
|
-
onFieldConfirm: d,
|
|
54
|
-
submittingFieldId: u = null,
|
|
55
|
-
captureError: g = null,
|
|
56
|
-
onAllSigned: h,
|
|
57
|
-
className: v
|
|
58
|
-
}) {
|
|
59
|
-
var K;
|
|
60
|
-
const N = t ?? (i !== void 0 ? [{ docIndex: r ?? 0, src: i, title: m ?? "" }] : []), x = t !== void 0, w = x || r === void 0 ? n.fields : n.fields.filter((l) => (l.docIndex ?? 0) === r), S = R({}), I = R({}), c = R(n.fields);
|
|
61
|
-
c.current = n.fields;
|
|
62
|
-
const F = R(!0), C = R(null);
|
|
63
|
-
V(() => {
|
|
64
|
-
n.activeFieldId !== null && C.current === null && (C.current = n.activeFieldId);
|
|
65
|
-
}, [n.activeFieldId]);
|
|
66
|
-
const P = (l) => {
|
|
67
|
-
var L;
|
|
68
|
-
l.preventDefault();
|
|
69
|
-
const b = C.current;
|
|
70
|
-
C.current = null;
|
|
71
|
-
const B = (L = n.fields.find((E) => !E.signed)) == null ? void 0 : L.id, p = (b ? I.current[b] : null) ?? (B ? I.current[B] : null);
|
|
72
|
-
p == null || p.focus({ preventScroll: !0 });
|
|
73
|
-
}, T = R(n.isComplete), $ = R(h);
|
|
74
|
-
$.current = h, V(() => {
|
|
75
|
-
var l;
|
|
76
|
-
n.isComplete && !T.current && ((l = $.current) == null || l.call($)), T.current = n.isComplete;
|
|
77
|
-
}, [n.isComplete]), V(() => {
|
|
78
|
-
var E;
|
|
79
|
-
if (F.current) {
|
|
80
|
-
F.current = !1;
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
const l = n.cursorFieldId;
|
|
84
|
-
if (!l) return;
|
|
85
|
-
const b = c.current.find((Q) => Q.id === l);
|
|
86
|
-
if (!b) return;
|
|
87
|
-
(E = S.current[b.docIndex ?? 0]) == null || E.goToPage(b.page);
|
|
88
|
-
let B = 0, p = 0;
|
|
89
|
-
const L = () => {
|
|
90
|
-
const Q = I.current[l];
|
|
91
|
-
if (Q) {
|
|
92
|
-
Q.focus();
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
B < 30 && (B += 1, p = requestAnimationFrame(L));
|
|
96
|
-
};
|
|
97
|
-
return p = requestAnimationFrame(L), () => cancelAnimationFrame(p);
|
|
98
|
-
}, [n.cursorFieldId]);
|
|
99
|
-
const k = u !== null && u === n.activeFieldId, q = n.fields.findIndex(
|
|
100
|
-
(l) => l.id === n.activeFieldId
|
|
101
|
-
), G = (l) => {
|
|
102
|
-
if (!(q < 0)) {
|
|
103
|
-
for (let b = q + l; b >= 0 && b < n.fields.length; b += l)
|
|
104
|
-
if (!n.fields[b].signed) return n.fields[b];
|
|
105
|
-
}
|
|
106
|
-
}, J = G(-1), O = G(1), _ = (K = n.fields.find(
|
|
107
|
-
(l) => l.id === n.activeFieldId
|
|
108
|
-
)) == null ? void 0 : K.label, U = (l) => {
|
|
109
|
-
var b;
|
|
110
|
-
!l || k || n.openField(l.id) && ((b = S.current[l.docIndex ?? 0]) == null || b.goToPage(l.page));
|
|
111
|
-
};
|
|
112
|
-
return /* @__PURE__ */ o("div", { "data-component": "multi-field-signer", className: v, children: [
|
|
113
|
-
/* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: N.map((l, b) => /* @__PURE__ */ o(
|
|
114
|
-
"div",
|
|
115
|
-
{
|
|
116
|
-
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
117
|
-
children: [
|
|
118
|
-
x && s.documentHeading ? /* @__PURE__ */ e("h2", { dir: "auto", className: "type-title-card ds:m-0", children: s.documentHeading(b + 1, N.length) }) : null,
|
|
119
|
-
/* @__PURE__ */ e(
|
|
120
|
-
se,
|
|
121
|
-
{
|
|
122
|
-
ref: (B) => {
|
|
123
|
-
S.current[l.docIndex] = B;
|
|
124
|
-
},
|
|
125
|
-
id: `signing-document-${l.docIndex}`,
|
|
126
|
-
src: l.src,
|
|
127
|
-
initialZoom: a,
|
|
128
|
-
toolbarVariant: "minimal",
|
|
129
|
-
ariaLabel: l.title || m,
|
|
130
|
-
renderPageOverlay: ({ pageNumber: B }) => /* @__PURE__ */ e(A, { children: w.filter(
|
|
131
|
-
(p) => (p.docIndex ?? 0) === l.docIndex && p.page === B
|
|
132
|
-
).map((p) => {
|
|
133
|
-
var L;
|
|
134
|
-
return /* @__PURE__ */ e(
|
|
135
|
-
ae,
|
|
136
|
-
{
|
|
137
|
-
id: p.id,
|
|
138
|
-
ref: (E) => {
|
|
139
|
-
I.current[p.id] = E;
|
|
140
|
-
},
|
|
141
|
-
state: p.signed ? "signed" : p.id === u ? "signing" : "unsigned",
|
|
142
|
-
active: n.cursorFieldId === p.id,
|
|
143
|
-
signedImageSrc: (L = p.payload) == null ? void 0 : L.png,
|
|
144
|
-
label: p.label,
|
|
145
|
-
hideLabel: f || p.hideLabel,
|
|
146
|
-
insetInlineStart: p.insetInlineStart,
|
|
147
|
-
insetBlockStart: p.insetBlockStart,
|
|
148
|
-
inlineSize: p.inlineSize,
|
|
149
|
-
blockSize: p.blockSize,
|
|
150
|
-
onActivate: () => n.openField(p.id),
|
|
151
|
-
"data-testid": `field-${p.id}`
|
|
152
|
-
},
|
|
153
|
-
p.id
|
|
154
|
-
);
|
|
155
|
-
}) })
|
|
156
|
-
}
|
|
157
|
-
)
|
|
158
|
-
]
|
|
159
|
-
},
|
|
160
|
-
l.docIndex
|
|
161
|
-
)) }),
|
|
162
|
-
/* @__PURE__ */ e(
|
|
163
|
-
y.Root,
|
|
164
|
-
{
|
|
165
|
-
id: "signing-capture",
|
|
166
|
-
open: n.activeFieldId !== null,
|
|
167
|
-
onOpenChange: (l) => {
|
|
168
|
-
l || n.closeField();
|
|
169
|
-
},
|
|
170
|
-
children: /* @__PURE__ */ o(y.Content, { size: "lg", onCloseAutoFocus: P, children: [
|
|
171
|
-
/* @__PURE__ */ o(y.Header, { children: [
|
|
172
|
-
/* @__PURE__ */ e(y.Title, { children: s.dialogTitle }),
|
|
173
|
-
/* @__PURE__ */ o(y.Description, { children: [
|
|
174
|
-
s.dialogSubtitle,
|
|
175
|
-
_ ? /* @__PURE__ */ o(A, { children: [
|
|
176
|
-
" ",
|
|
177
|
-
/* @__PURE__ */ e("bdi", { children: _ })
|
|
178
|
-
] }) : null
|
|
179
|
-
] })
|
|
180
|
-
] }),
|
|
181
|
-
/* @__PURE__ */ o(y.Body, { children: [
|
|
182
|
-
g ? /* @__PURE__ */ e(j, { variant: "error", className: "ds:mb-[var(--spacing-md)]", children: /* @__PURE__ */ e(j.Description, { children: g }) }) : null,
|
|
183
|
-
/* @__PURE__ */ e(
|
|
184
|
-
Se,
|
|
185
|
-
{
|
|
186
|
-
labels: s,
|
|
187
|
-
id: `signing-capture-${n.activeFieldId ?? "none"}`,
|
|
188
|
-
disabled: k,
|
|
189
|
-
onComplete: (l) => {
|
|
190
|
-
const b = n.activeFieldId;
|
|
191
|
-
b && (d ? d(b, l) : n.markSigned(b, l));
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
n.activeFieldId ?? "none"
|
|
195
|
-
)
|
|
196
|
-
] }),
|
|
197
|
-
s.previousField && s.nextField && n.fields.length > 1 ? /* @__PURE__ */ o(y.Footer, { className: "ds:justify-between", children: [
|
|
198
|
-
/* @__PURE__ */ e(
|
|
199
|
-
H,
|
|
200
|
-
{
|
|
201
|
-
intent: "ghost",
|
|
202
|
-
size: "sm",
|
|
203
|
-
type: "button",
|
|
204
|
-
className: "ds:min-h-[var(--min-target-size)]",
|
|
205
|
-
flipIconInRtl: !0,
|
|
206
|
-
startIcon: /* @__PURE__ */ e(le, { "aria-hidden": "true" }),
|
|
207
|
-
"aria-disabled": !J || k,
|
|
208
|
-
"data-action": "previous-field",
|
|
209
|
-
onClick: () => U(J),
|
|
210
|
-
children: s.previousField
|
|
211
|
-
}
|
|
212
|
-
),
|
|
213
|
-
/* @__PURE__ */ e(
|
|
214
|
-
H,
|
|
215
|
-
{
|
|
216
|
-
intent: "ghost",
|
|
217
|
-
size: "sm",
|
|
218
|
-
type: "button",
|
|
219
|
-
className: "ds:min-h-[var(--min-target-size)]",
|
|
220
|
-
flipIconInRtl: !0,
|
|
221
|
-
endIcon: /* @__PURE__ */ e(oe, { "aria-hidden": "true" }),
|
|
222
|
-
"aria-disabled": !O || k,
|
|
223
|
-
"data-action": "next-field",
|
|
224
|
-
onClick: () => U(O),
|
|
225
|
-
children: s.nextField
|
|
226
|
-
}
|
|
227
|
-
)
|
|
228
|
-
] }) : null
|
|
229
|
-
] })
|
|
230
|
-
}
|
|
231
|
-
)
|
|
232
|
-
] });
|
|
233
|
-
}
|
|
234
|
-
function W({
|
|
235
|
-
children: i,
|
|
236
|
-
brand: t,
|
|
237
|
-
headerActions: n,
|
|
238
|
-
brandLabel: s,
|
|
239
|
-
className: r
|
|
240
|
-
}) {
|
|
241
|
-
const { t: m } = z("ui"), a = s ?? m("signing.chrome.brandLabel");
|
|
242
|
-
return /* @__PURE__ */ o(
|
|
243
|
-
"div",
|
|
244
|
-
{
|
|
245
|
-
"data-component": "signing-chrome",
|
|
246
|
-
className: `ds:flex ds:flex-col ds:min-h-screen ds:bg-[color:var(--app-shell-background)] ds:text-[var(--foreground)]${r ? ` ${r}` : ""}`,
|
|
247
|
-
children: [
|
|
248
|
-
/* @__PURE__ */ o(he, { "aria-label": a, children: [
|
|
249
|
-
/* @__PURE__ */ e(
|
|
250
|
-
ve,
|
|
251
|
-
{
|
|
252
|
-
className: n ? "ds:min-w-0 ds:justify-start" : "ds:flex-1 ds:justify-center",
|
|
253
|
-
children: /* @__PURE__ */ e(xe, { asChild: !0, children: t != null ? /* @__PURE__ */ e("span", { children: t }) : /* @__PURE__ */ e("span", { role: "img", "aria-label": a, children: /* @__PURE__ */ e(
|
|
254
|
-
ye,
|
|
255
|
-
{
|
|
256
|
-
variant: "monochrome",
|
|
257
|
-
tone: "inherit",
|
|
258
|
-
decorative: !0,
|
|
259
|
-
size: "md"
|
|
260
|
-
}
|
|
261
|
-
) }) })
|
|
262
|
-
}
|
|
263
|
-
),
|
|
264
|
-
n ? /* @__PURE__ */ e(be, { className: "ds:min-w-0 ds:flex-1 ds:justify-end ds:text-end", children: n }) : null
|
|
265
|
-
] }),
|
|
266
|
-
/* @__PURE__ */ e("main", { className: "ds:flex ds:flex-1 ds:flex-col", children: i })
|
|
267
|
-
]
|
|
268
|
-
}
|
|
269
|
-
);
|
|
270
|
-
}
|
|
271
|
-
const Fe = fe(
|
|
272
|
-
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] ds:[min-block-size:var(--min-target-size)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-sm)] ds:font-semibold",
|
|
273
|
-
{
|
|
274
|
-
variants: {
|
|
275
|
-
placement: {
|
|
276
|
-
header: "ds:text-[color:var(--header-foreground)]",
|
|
277
|
-
page: "ds:text-[color:var(--foreground)]"
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
defaultVariants: { placement: "header" }
|
|
281
|
-
}
|
|
282
|
-
);
|
|
283
|
-
function Ce({
|
|
284
|
-
signed: i,
|
|
285
|
-
total: t,
|
|
286
|
-
name: n,
|
|
287
|
-
privacy: s = !1,
|
|
288
|
-
placement: r = "header",
|
|
289
|
-
className: m
|
|
290
|
-
}) {
|
|
291
|
-
const { t: a } = z("ui"), f = !s && n !== void 0 && n.trim() !== "";
|
|
292
|
-
return /* @__PURE__ */ e(
|
|
293
|
-
"span",
|
|
294
|
-
{
|
|
295
|
-
role: "status",
|
|
296
|
-
"aria-live": "polite",
|
|
297
|
-
"data-component": "signing-progress-chip",
|
|
298
|
-
"data-complete": t > 0 && i >= t ? "true" : void 0,
|
|
299
|
-
className: `${Fe({ placement: r })}${m ? ` ${m}` : ""}`,
|
|
300
|
-
children: f ? /* @__PURE__ */ e(
|
|
301
|
-
D,
|
|
302
|
-
{
|
|
303
|
-
t: a,
|
|
304
|
-
ns: "ui",
|
|
305
|
-
i18nKey: "signing.progressNamed",
|
|
306
|
-
values: { name: n, signed: i, total: t },
|
|
307
|
-
components: { name: /* @__PURE__ */ e("bdi", {}) }
|
|
308
|
-
}
|
|
309
|
-
) : a("signing.progress", { signed: i, total: t })
|
|
310
|
-
}
|
|
311
|
-
);
|
|
312
|
-
}
|
|
313
|
-
const ke = "ds:!bg-[var(--accent)] ds:!text-[color:var(--accent-foreground)] ds:hover:!bg-[var(--accent-hover)]";
|
|
314
|
-
function ze({
|
|
315
|
-
total: i,
|
|
316
|
-
onPrevious: t,
|
|
317
|
-
onNext: n,
|
|
318
|
-
previousDisabled: s = !1,
|
|
319
|
-
nextDisabled: r = !1,
|
|
320
|
-
onSign: m,
|
|
321
|
-
signArmed: a = !1,
|
|
322
|
-
signError: f = null,
|
|
323
|
-
completing: d = !1,
|
|
324
|
-
className: u
|
|
325
|
-
}) {
|
|
326
|
-
const { t: g } = z("ui"), h = ue({ edge: "bottom" }), [v, N] = ne(""), x = g("signing.completing");
|
|
327
|
-
V(() => {
|
|
328
|
-
N(d ? x : "");
|
|
329
|
-
}, [d, x]);
|
|
330
|
-
const w = /* @__PURE__ */ e("span", { role: "status", "data-live": "signing-footer", className: "ds:sr-only", children: v }), S = Z(), I = Z(), c = !!f && !d, F = i >= 2;
|
|
331
|
-
if (!d && !F && !m) return w;
|
|
332
|
-
const C = c ? S : a ? void 0 : I, P = m ? /* @__PURE__ */ o(A, { children: [
|
|
333
|
-
C !== I ? null : /* @__PURE__ */ e("span", { id: I, className: "ds:sr-only", children: g("signing.signHint") }),
|
|
334
|
-
/* @__PURE__ */ e(
|
|
335
|
-
H,
|
|
336
|
-
{
|
|
337
|
-
intent: a ? "primary" : "outline",
|
|
338
|
-
size: "md",
|
|
339
|
-
type: "button",
|
|
340
|
-
className: `ds:ms-auto ds:min-h-[var(--min-target-size)]${a ? ` ${ke}` : ""}`,
|
|
341
|
-
"aria-disabled": a ? void 0 : !0,
|
|
342
|
-
"aria-describedby": C,
|
|
343
|
-
loading: d,
|
|
344
|
-
"data-action": "sign",
|
|
345
|
-
"data-armed": a ? "true" : "false",
|
|
346
|
-
onClick: () => {
|
|
347
|
-
a && !d && m();
|
|
348
|
-
},
|
|
349
|
-
children: g("signing.sign")
|
|
350
|
-
}
|
|
351
|
-
)
|
|
352
|
-
] }) : null, T = /* @__PURE__ */ o("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
353
|
-
m ? null : /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "ds:inline-flex", children: /* @__PURE__ */ e(ce, { size: "sm" }) }),
|
|
354
|
-
/* @__PURE__ */ e("span", { "aria-hidden": "true", className: "type-body", children: x })
|
|
355
|
-
] }), $ = F ? /* @__PURE__ */ o(A, { children: [
|
|
356
|
-
t ? /* @__PURE__ */ e(
|
|
357
|
-
H,
|
|
358
|
-
{
|
|
359
|
-
intent: "ghost",
|
|
360
|
-
size: "md",
|
|
361
|
-
type: "button",
|
|
362
|
-
className: "ds:min-h-[var(--min-target-size)]",
|
|
363
|
-
flipIconInRtl: !0,
|
|
364
|
-
startIcon: /* @__PURE__ */ e(ge, { "aria-hidden": "true" }),
|
|
365
|
-
"aria-label": g("signing.previousField"),
|
|
366
|
-
disabled: s,
|
|
367
|
-
"data-action": "previous-field",
|
|
368
|
-
onClick: t,
|
|
369
|
-
children: g("signing.previousShort")
|
|
370
|
-
}
|
|
371
|
-
) : null,
|
|
372
|
-
n ? /* @__PURE__ */ e(
|
|
373
|
-
H,
|
|
374
|
-
{
|
|
375
|
-
intent: P && a ? "ghost" : "primary",
|
|
376
|
-
size: "md",
|
|
377
|
-
type: "button",
|
|
378
|
-
className: "ds:min-h-[var(--min-target-size)]",
|
|
379
|
-
flipIconInRtl: !0,
|
|
380
|
-
endIcon: /* @__PURE__ */ e(me, { "aria-hidden": "true" }),
|
|
381
|
-
"aria-label": g("signing.nextField"),
|
|
382
|
-
disabled: r,
|
|
383
|
-
"data-action": "next-field",
|
|
384
|
-
onClick: n,
|
|
385
|
-
children: g("signing.nextShort")
|
|
386
|
-
}
|
|
387
|
-
) : null
|
|
388
|
-
] }) : null;
|
|
389
|
-
return /* @__PURE__ */ o(A, { children: [
|
|
390
|
-
w,
|
|
391
|
-
/* @__PURE__ */ e(
|
|
392
|
-
"div",
|
|
393
|
-
{
|
|
394
|
-
ref: h,
|
|
395
|
-
"data-component": "signing-footer",
|
|
396
|
-
className: `ds:sticky ds:bottom-0 ds:p-[var(--spacing-md)] ds:bg-[var(--card)] ds:text-[var(--foreground)] ds:border-t ds:border-[color:var(--border)] ds:shadow-[var(--shadow-lg)]${u ? ` ${u}` : ""}`,
|
|
397
|
-
children: /* @__PURE__ */ o("div", { className: "ds:mx-auto ds:flex ds:w-full ds:max-w-[56rem] ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
398
|
-
c ? /* @__PURE__ */ e(j, { variant: "error", "data-error": "sign", id: S, children: /* @__PURE__ */ e(j.Description, { children: f }) }) : null,
|
|
399
|
-
/* @__PURE__ */ e("div", { className: "ds:flex ds:w-full ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: P ? /* @__PURE__ */ o(A, { children: [
|
|
400
|
-
/* @__PURE__ */ e("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: d ? T : $ }),
|
|
401
|
-
P
|
|
402
|
-
] }) : d ? T : $ })
|
|
403
|
-
] })
|
|
404
|
-
}
|
|
405
|
-
)
|
|
406
|
-
] });
|
|
407
|
-
}
|
|
408
|
-
const $e = {
|
|
409
|
-
awaiting: "neutral",
|
|
410
|
-
verifying: "info",
|
|
411
|
-
signing: "info",
|
|
412
|
-
signed: "success"
|
|
413
|
-
};
|
|
414
|
-
function te(i, t) {
|
|
415
|
-
if (i.statusLabel !== void 0) return i.statusLabel;
|
|
416
|
-
switch (i.status) {
|
|
417
|
-
case "awaiting":
|
|
418
|
-
return t("signing.roster.status.awaiting");
|
|
419
|
-
case "verifying":
|
|
420
|
-
return t("signing.roster.status.verifying");
|
|
421
|
-
case "signing":
|
|
422
|
-
return t("signing.roster.status.signing");
|
|
423
|
-
default:
|
|
424
|
-
return t("signing.roster.status.signed");
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
function ee({
|
|
428
|
-
signer: i,
|
|
429
|
-
youLabel: t,
|
|
430
|
-
privacy: n
|
|
431
|
-
}) {
|
|
432
|
-
const { t: s } = z("ui"), r = n ? M(i.maskedName) : i.name;
|
|
433
|
-
return /* @__PURE__ */ o(
|
|
434
|
-
"li",
|
|
435
|
-
{
|
|
436
|
-
"aria-current": i.isCurrent ? "step" : void 0,
|
|
437
|
-
"data-status": i.status,
|
|
438
|
-
className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
439
|
-
children: [
|
|
440
|
-
/* @__PURE__ */ e(ie, { name: n ? void 0 : i.name, size: "sm" }),
|
|
441
|
-
/* @__PURE__ */ o("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col", children: [
|
|
442
|
-
/* @__PURE__ */ o("span", { className: "type-label ds:break-words", children: [
|
|
443
|
-
/* @__PURE__ */ e("bdi", { children: r }),
|
|
444
|
-
i.isCurrent ? /* @__PURE__ */ e("span", { className: "ds:ms-[var(--spacing-2xs)] ds:font-normal ds:text-[var(--muted-foreground)]", children: t }) : null
|
|
445
|
-
] }),
|
|
446
|
-
i.relationship ? /* @__PURE__ */ e(
|
|
447
|
-
"span",
|
|
448
|
-
{
|
|
449
|
-
dir: "auto",
|
|
450
|
-
className: "type-meta ds:break-words ds:text-[var(--muted-foreground)]",
|
|
451
|
-
children: i.relationship
|
|
452
|
-
}
|
|
453
|
-
) : null
|
|
454
|
-
] }),
|
|
455
|
-
/* @__PURE__ */ e(pe, { variant: $e[i.status], withDot: !0, children: te(i, s) })
|
|
456
|
-
]
|
|
457
|
-
}
|
|
458
|
-
);
|
|
459
|
-
}
|
|
460
|
-
function de({
|
|
461
|
-
title: i,
|
|
462
|
-
primary: t,
|
|
463
|
-
secondary: n,
|
|
464
|
-
youLabel: s,
|
|
465
|
-
secondaryPendingLabel: r,
|
|
466
|
-
secondaryPendingHint: m,
|
|
467
|
-
privacy: a = !1,
|
|
468
|
-
className: f
|
|
469
|
-
}) {
|
|
470
|
-
const { t: d } = z("ui"), u = i ?? d("signing.roster.title"), h = [t, n ?? null].filter(
|
|
471
|
-
(c) => c !== null
|
|
472
|
-
).map((c) => ({
|
|
473
|
-
id: c.id,
|
|
474
|
-
name: a ? M(c.maskedName) : c.name,
|
|
475
|
-
status: c.status,
|
|
476
|
-
label: te(c, d)
|
|
477
|
-
})), v = R(new Map(h.map((c) => [c.id, c.status]))), [N, x] = ne(null), w = h.find((c) => c.id === N), S = h.map((c) => `${c.id}:${c.status}`).join("|");
|
|
478
|
-
V(() => {
|
|
479
|
-
let c = null;
|
|
480
|
-
for (const F of h) {
|
|
481
|
-
const C = v.current.get(F.id);
|
|
482
|
-
C !== void 0 && C !== F.status && (c = F.id), v.current.set(F.id, F.status);
|
|
483
|
-
}
|
|
484
|
-
c !== null && x(c);
|
|
485
|
-
}, [S]);
|
|
486
|
-
const I = s ?? d("signing.roster.you");
|
|
487
|
-
return (
|
|
488
|
-
// A labelled section exposes the roster as a region without adding a
|
|
489
|
-
// heading that would skip the page's level order.
|
|
490
|
-
/* @__PURE__ */ o(
|
|
491
|
-
"section",
|
|
492
|
-
{
|
|
493
|
-
"aria-label": u,
|
|
494
|
-
"data-component": "signing-roster",
|
|
495
|
-
"data-privacy": a ? "masked" : void 0,
|
|
496
|
-
className: `ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]${f ? ` ${f}` : ""}`,
|
|
497
|
-
children: [
|
|
498
|
-
/* @__PURE__ */ e(
|
|
499
|
-
"p",
|
|
500
|
-
{
|
|
501
|
-
"aria-hidden": "true",
|
|
502
|
-
className: "type-eyebrow ds:m-0 ds:text-[var(--muted-foreground)]",
|
|
503
|
-
children: u
|
|
504
|
-
}
|
|
505
|
-
),
|
|
506
|
-
/* @__PURE__ */ e("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: w ? /* @__PURE__ */ o(A, { children: [
|
|
507
|
-
/* @__PURE__ */ e("bdi", { children: w.name }),
|
|
508
|
-
": ",
|
|
509
|
-
w.label
|
|
510
|
-
] }) : null }),
|
|
511
|
-
/* @__PURE__ */ o(
|
|
512
|
-
"ol",
|
|
513
|
-
{
|
|
514
|
-
role: "list",
|
|
515
|
-
className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0",
|
|
516
|
-
children: [
|
|
517
|
-
/* @__PURE__ */ e(ee, { signer: t, youLabel: I, privacy: a }),
|
|
518
|
-
n ? /* @__PURE__ */ e(ee, { signer: n, youLabel: I, privacy: a }) : /* @__PURE__ */ o(
|
|
519
|
-
"li",
|
|
520
|
-
{
|
|
521
|
-
"data-status": "pending",
|
|
522
|
-
className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
523
|
-
children: [
|
|
524
|
-
/* @__PURE__ */ e(ie, { size: "sm" }),
|
|
525
|
-
/* @__PURE__ */ o("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col", children: [
|
|
526
|
-
/* @__PURE__ */ e("span", { className: "type-label ds:truncate ds:text-[var(--muted-foreground)]", children: r ?? d("signing.roster.pendingTitle") }),
|
|
527
|
-
/* @__PURE__ */ e("span", { className: "type-meta ds:truncate ds:text-[var(--muted-foreground)]", children: m ?? d("signing.roster.pendingHint") })
|
|
528
|
-
] })
|
|
529
|
-
]
|
|
530
|
-
}
|
|
531
|
-
)
|
|
532
|
-
]
|
|
533
|
-
}
|
|
534
|
-
)
|
|
535
|
-
]
|
|
536
|
-
}
|
|
537
|
-
)
|
|
538
|
-
);
|
|
539
|
-
}
|
|
540
|
-
function nn({
|
|
541
|
-
session: i,
|
|
542
|
-
src: t,
|
|
543
|
-
documents: n,
|
|
544
|
-
title: s,
|
|
545
|
-
meta: r,
|
|
546
|
-
headingLevel: m = 1,
|
|
547
|
-
instruction: a,
|
|
548
|
-
roster: f,
|
|
549
|
-
envelopeProgress: d,
|
|
550
|
-
progressName: u,
|
|
551
|
-
completing: g = !1,
|
|
552
|
-
onSign: h,
|
|
553
|
-
signError: v = null,
|
|
554
|
-
onFieldConfirm: N,
|
|
555
|
-
submittingFieldId: x,
|
|
556
|
-
captureError: w,
|
|
557
|
-
dialogs: S,
|
|
558
|
-
hideFieldLabels: I,
|
|
559
|
-
withChrome: c = !0,
|
|
560
|
-
brand: F,
|
|
561
|
-
brandLabel: C,
|
|
562
|
-
focusOnMount: P = !1,
|
|
563
|
-
privacy: T = !1,
|
|
564
|
-
className: $
|
|
565
|
-
}) {
|
|
566
|
-
const { t: k } = z("ui"), q = R(null);
|
|
567
|
-
V(() => {
|
|
568
|
-
var K;
|
|
569
|
-
P && ((K = q.current) == null || K.focus({ preventScroll: !0 }));
|
|
570
|
-
}, [P]);
|
|
571
|
-
const G = m === 2 ? "h2" : "h1", J = {
|
|
572
|
-
dialogTitle: k("signing.capture.title"),
|
|
573
|
-
dialogSubtitle: k("signing.capture.subtitle"),
|
|
574
|
-
apply: k("signing.complete"),
|
|
575
|
-
previousField: k("signing.previousField"),
|
|
576
|
-
nextField: k("signing.nextField"),
|
|
577
|
-
documentHeading: n !== void 0 ? (K, l) => k("signing.documentHeading", { current: K, total: l }) : void 0
|
|
578
|
-
}, O = /* @__PURE__ */ e(
|
|
579
|
-
Ce,
|
|
580
|
-
{
|
|
581
|
-
signed: i.signedCount,
|
|
582
|
-
total: i.total,
|
|
583
|
-
name: u,
|
|
584
|
-
privacy: T,
|
|
585
|
-
placement: c ? "header" : "page"
|
|
586
|
-
}
|
|
587
|
-
), _ = (
|
|
588
|
-
// The chrome owns the page's `main`; embedded, the host's shell does.
|
|
589
|
-
/* @__PURE__ */ e(
|
|
590
|
-
"div",
|
|
591
|
-
{
|
|
592
|
-
"data-component": "signing-document-screen",
|
|
593
|
-
"data-privacy": T ? "masked" : void 0,
|
|
594
|
-
className: `ds:flex ds:flex-1 ds:justify-center ds:p-[var(--spacing-lg)]${$ ? ` ${$}` : ""}`,
|
|
595
|
-
children: /* @__PURE__ */ o("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:min-w-0 ds:[inline-size:100%] ds:max-w-[56rem]", children: [
|
|
596
|
-
a ? /* @__PURE__ */ e(j, { variant: "info", announce: "off", children: /* @__PURE__ */ e(j.Description, { dir: "auto", className: "ds:whitespace-pre-line", children: a }) }) : null,
|
|
597
|
-
s ? /* @__PURE__ */ o("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
598
|
-
/* @__PURE__ */ e(
|
|
599
|
-
G,
|
|
600
|
-
{
|
|
601
|
-
ref: q,
|
|
602
|
-
tabIndex: -1,
|
|
603
|
-
dir: "auto",
|
|
604
|
-
className: "type-title-page ds:m-0 ds:outline-none",
|
|
605
|
-
children: s
|
|
606
|
-
}
|
|
607
|
-
),
|
|
608
|
-
r ? /* @__PURE__ */ e(
|
|
609
|
-
"div",
|
|
610
|
-
{
|
|
611
|
-
dir: "auto",
|
|
612
|
-
className: "type-body-sm ds:text-[color:var(--muted-foreground)]",
|
|
613
|
-
children: r
|
|
614
|
-
}
|
|
615
|
-
) : null
|
|
616
|
-
] }) : null,
|
|
617
|
-
f ? /* @__PURE__ */ e(de, { ...f, privacy: T }) : null,
|
|
618
|
-
c ? null : O,
|
|
619
|
-
d ? /* @__PURE__ */ e(
|
|
620
|
-
"p",
|
|
621
|
-
{
|
|
622
|
-
role: "status",
|
|
623
|
-
"aria-live": "polite",
|
|
624
|
-
className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]",
|
|
625
|
-
children: k("signing.envelopeProgress", {
|
|
626
|
-
done: d.done,
|
|
627
|
-
total: d.total
|
|
628
|
-
})
|
|
629
|
-
}
|
|
630
|
-
) : null,
|
|
631
|
-
/* @__PURE__ */ e(
|
|
632
|
-
we,
|
|
633
|
-
{
|
|
634
|
-
src: t,
|
|
635
|
-
documents: n,
|
|
636
|
-
session: i,
|
|
637
|
-
labels: J,
|
|
638
|
-
ariaLabel: s,
|
|
639
|
-
hideFieldLabels: I,
|
|
640
|
-
onFieldConfirm: N,
|
|
641
|
-
submittingFieldId: x,
|
|
642
|
-
captureError: w
|
|
643
|
-
}
|
|
644
|
-
)
|
|
645
|
-
] })
|
|
646
|
-
}
|
|
647
|
-
)
|
|
648
|
-
), U = /* @__PURE__ */ e(
|
|
649
|
-
ze,
|
|
650
|
-
{
|
|
651
|
-
total: i.total,
|
|
652
|
-
completing: g,
|
|
653
|
-
onPrevious: i.goToPreviousField,
|
|
654
|
-
onNext: i.goToNextField,
|
|
655
|
-
onSign: h,
|
|
656
|
-
signArmed: i.isComplete,
|
|
657
|
-
signError: v
|
|
658
|
-
}
|
|
659
|
-
);
|
|
660
|
-
return c ? /* @__PURE__ */ o(W, { brand: F, brandLabel: C, headerActions: O, children: [
|
|
661
|
-
_,
|
|
662
|
-
U,
|
|
663
|
-
S
|
|
664
|
-
] }) : /* @__PURE__ */ o(A, { children: [
|
|
665
|
-
_,
|
|
666
|
-
U,
|
|
667
|
-
S
|
|
668
|
-
] });
|
|
669
|
-
}
|
|
670
|
-
function tn({
|
|
671
|
-
open: i,
|
|
672
|
-
title: t,
|
|
673
|
-
body: n,
|
|
674
|
-
onDismiss: s,
|
|
675
|
-
dismissLabel: r,
|
|
676
|
-
onCloseAutoFocus: m,
|
|
677
|
-
id: a = "signing-message",
|
|
678
|
-
className: f
|
|
679
|
-
}) {
|
|
680
|
-
const { t: d } = z("ui");
|
|
681
|
-
return /* @__PURE__ */ e(
|
|
682
|
-
y.Root,
|
|
683
|
-
{
|
|
684
|
-
id: a,
|
|
685
|
-
open: i,
|
|
686
|
-
onOpenChange: (u) => {
|
|
687
|
-
u || s();
|
|
688
|
-
},
|
|
689
|
-
children: /* @__PURE__ */ o(
|
|
690
|
-
y.Content,
|
|
691
|
-
{
|
|
692
|
-
size: "sm",
|
|
693
|
-
hideCloseButton: !0,
|
|
694
|
-
onCloseAutoFocus: m,
|
|
695
|
-
className: f,
|
|
696
|
-
"data-component": "signing-message-dialog",
|
|
697
|
-
children: [
|
|
698
|
-
/* @__PURE__ */ o(y.Header, { children: [
|
|
699
|
-
/* @__PURE__ */ e(y.Title, { dir: "auto", children: t }),
|
|
700
|
-
/* @__PURE__ */ e(
|
|
701
|
-
y.Description,
|
|
702
|
-
{
|
|
703
|
-
dir: "auto",
|
|
704
|
-
className: "ds:whitespace-pre-line ds:break-words",
|
|
705
|
-
children: n
|
|
706
|
-
}
|
|
707
|
-
)
|
|
708
|
-
] }),
|
|
709
|
-
/* @__PURE__ */ e(y.Footer, { children: /* @__PURE__ */ e(
|
|
710
|
-
H,
|
|
711
|
-
{
|
|
712
|
-
intent: "primary",
|
|
713
|
-
type: "button",
|
|
714
|
-
className: "ds:min-h-[var(--min-target-size)]",
|
|
715
|
-
"data-action": "dismiss-message",
|
|
716
|
-
onClick: s,
|
|
717
|
-
children: r ?? d("signing.message.close")
|
|
718
|
-
}
|
|
719
|
-
) })
|
|
720
|
-
]
|
|
721
|
-
}
|
|
722
|
-
)
|
|
723
|
-
}
|
|
724
|
-
);
|
|
725
|
-
}
|
|
726
|
-
function dn({
|
|
727
|
-
open: i,
|
|
728
|
-
onOpenChange: t,
|
|
729
|
-
staffName: n,
|
|
730
|
-
patientName: s,
|
|
731
|
-
documentTitle: r,
|
|
732
|
-
onConfirm: m,
|
|
733
|
-
onCancel: a,
|
|
734
|
-
submitting: f = !1,
|
|
735
|
-
error: d = null,
|
|
736
|
-
errorText: u,
|
|
737
|
-
privacy: g = !1,
|
|
738
|
-
onCloseAutoFocus: h,
|
|
739
|
-
id: v = "signing-staff-id",
|
|
740
|
-
className: N
|
|
741
|
-
}) {
|
|
742
|
-
const { t: x } = z("ui"), w = s !== void 0 && s.trim() !== "", S = g ? M() : s, I = d === null ? null : u ?? x("signing.staffId.errorFailed");
|
|
743
|
-
return /* @__PURE__ */ e(
|
|
744
|
-
y.Root,
|
|
745
|
-
{
|
|
746
|
-
id: v,
|
|
747
|
-
open: i,
|
|
748
|
-
onOpenChange: (c) => {
|
|
749
|
-
t(c), c || a == null || a();
|
|
750
|
-
},
|
|
751
|
-
children: /* @__PURE__ */ o(
|
|
752
|
-
y.Content,
|
|
753
|
-
{
|
|
754
|
-
size: "sm",
|
|
755
|
-
hideCloseButton: !0,
|
|
756
|
-
onCloseAutoFocus: h,
|
|
757
|
-
className: N,
|
|
758
|
-
"data-component": "signing-staff-id-confirmation",
|
|
759
|
-
"data-privacy": g ? "masked" : void 0,
|
|
760
|
-
children: [
|
|
761
|
-
/* @__PURE__ */ o(y.Header, { children: [
|
|
762
|
-
/* @__PURE__ */ e(y.Title, { children: x("signing.staffId.title") }),
|
|
763
|
-
/* @__PURE__ */ e(y.Description, { className: "ds:break-words", children: /* @__PURE__ */ e(
|
|
764
|
-
D,
|
|
765
|
-
{
|
|
766
|
-
t: x,
|
|
767
|
-
ns: "ui",
|
|
768
|
-
i18nKey: w ? "signing.staffId.body" : "signing.staffId.bodyNoPatient",
|
|
769
|
-
values: { staff: n, patient: S },
|
|
770
|
-
components: { staff: /* @__PURE__ */ e("bdi", {}), patient: /* @__PURE__ */ e("bdi", {}) }
|
|
771
|
-
}
|
|
772
|
-
) })
|
|
773
|
-
] }),
|
|
774
|
-
/* @__PURE__ */ e(y.Body, { children: /* @__PURE__ */ o("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
775
|
-
r ? /* @__PURE__ */ e(
|
|
776
|
-
"p",
|
|
777
|
-
{
|
|
778
|
-
dir: "auto",
|
|
779
|
-
className: "type-body ds:m-0 ds:font-medium ds:break-words",
|
|
780
|
-
children: r
|
|
781
|
-
}
|
|
782
|
-
) : null,
|
|
783
|
-
/* @__PURE__ */ e("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: x("signing.staffId.record") }),
|
|
784
|
-
I ? /* @__PURE__ */ e(j, { variant: "error", "data-error": d ?? void 0, children: /* @__PURE__ */ e(j.Description, { children: I }) }) : null
|
|
785
|
-
] }) }),
|
|
786
|
-
/* @__PURE__ */ o(y.Footer, { children: [
|
|
787
|
-
/* @__PURE__ */ e(y.Close, { asChild: !0, children: /* @__PURE__ */ e(
|
|
788
|
-
H,
|
|
789
|
-
{
|
|
790
|
-
intent: "outline",
|
|
791
|
-
type: "button",
|
|
792
|
-
className: "ds:min-h-[var(--min-target-size)]",
|
|
793
|
-
"data-action": "cancel",
|
|
794
|
-
children: x("common.cancel")
|
|
795
|
-
}
|
|
796
|
-
) }),
|
|
797
|
-
/* @__PURE__ */ e(
|
|
798
|
-
H,
|
|
799
|
-
{
|
|
800
|
-
intent: "primary",
|
|
801
|
-
type: "button",
|
|
802
|
-
className: "ds:min-h-[var(--min-target-size)]",
|
|
803
|
-
loading: f,
|
|
804
|
-
"data-action": "confirm-staff-id",
|
|
805
|
-
onClick: m,
|
|
806
|
-
children: x("signing.staffId.confirm")
|
|
807
|
-
}
|
|
808
|
-
)
|
|
809
|
-
] })
|
|
810
|
-
]
|
|
811
|
-
}
|
|
812
|
-
)
|
|
813
|
-
}
|
|
814
|
-
);
|
|
815
|
-
}
|
|
816
|
-
function sn({
|
|
817
|
-
signerName: i,
|
|
818
|
-
nextName: t,
|
|
819
|
-
roster: n,
|
|
820
|
-
onContinue: s,
|
|
821
|
-
continueLabel: r,
|
|
822
|
-
submitting: m = !1,
|
|
823
|
-
focusOnMount: a = !0,
|
|
824
|
-
withChrome: f = !0,
|
|
825
|
-
brand: d,
|
|
826
|
-
brandLabel: u,
|
|
827
|
-
privacy: g = !1,
|
|
828
|
-
className: h
|
|
829
|
-
}) {
|
|
830
|
-
const { t: v } = z("ui"), N = R(null);
|
|
831
|
-
V(() => {
|
|
832
|
-
var I;
|
|
833
|
-
a && ((I = N.current) == null || I.focus({ preventScroll: !0 }));
|
|
834
|
-
}, [a]);
|
|
835
|
-
const x = g ? M() : i, w = g ? M() : t, S = /* @__PURE__ */ e(
|
|
836
|
-
"div",
|
|
837
|
-
{
|
|
838
|
-
"data-component": "signing-handoff-screen",
|
|
839
|
-
"data-privacy": g ? "masked" : void 0,
|
|
840
|
-
className: `ds:flex ds:flex-1 ds:flex-col ds:items-center ds:overflow-y-auto ds:p-[var(--spacing-lg)]${h ? ` ${h}` : ""}`,
|
|
841
|
-
children: /* @__PURE__ */ o(
|
|
842
|
-
X,
|
|
843
|
-
{
|
|
844
|
-
variant: "elevated",
|
|
845
|
-
className: "ds:my-auto ds:min-w-0 ds:[inline-size:100%] ds:max-w-[28rem]",
|
|
846
|
-
children: [
|
|
847
|
-
/* @__PURE__ */ e(X.Header, { children: /* @__PURE__ */ e(
|
|
848
|
-
"h1",
|
|
849
|
-
{
|
|
850
|
-
ref: N,
|
|
851
|
-
tabIndex: -1,
|
|
852
|
-
className: "type-title-card ds:m-0 ds:outline-none",
|
|
853
|
-
children: /* @__PURE__ */ e(
|
|
854
|
-
D,
|
|
855
|
-
{
|
|
856
|
-
t: v,
|
|
857
|
-
ns: "ui",
|
|
858
|
-
i18nKey: "signing.handoff.title",
|
|
859
|
-
values: { name: x },
|
|
860
|
-
components: { name: /* @__PURE__ */ e("bdi", {}) }
|
|
861
|
-
}
|
|
862
|
-
)
|
|
863
|
-
}
|
|
864
|
-
) }),
|
|
865
|
-
/* @__PURE__ */ e(X.Body, { children: /* @__PURE__ */ o("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
866
|
-
/* @__PURE__ */ e("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: /* @__PURE__ */ e(
|
|
867
|
-
D,
|
|
868
|
-
{
|
|
869
|
-
t: v,
|
|
870
|
-
ns: "ui",
|
|
871
|
-
i18nKey: "signing.handoff.body",
|
|
872
|
-
values: { next: w },
|
|
873
|
-
components: { next: /* @__PURE__ */ e("bdi", {}) }
|
|
874
|
-
}
|
|
875
|
-
) }),
|
|
876
|
-
/* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: m ? v("signing.roster.status.verifying") : "" }),
|
|
877
|
-
n ? /* @__PURE__ */ e(de, { ...n, privacy: g }) : null,
|
|
878
|
-
/* @__PURE__ */ e(
|
|
879
|
-
H,
|
|
880
|
-
{
|
|
881
|
-
intent: "primary",
|
|
882
|
-
size: "lg",
|
|
883
|
-
type: "button",
|
|
884
|
-
loading: m,
|
|
885
|
-
"data-action": "continue",
|
|
886
|
-
onClick: s,
|
|
887
|
-
children: !g && r !== void 0 ? r : /* @__PURE__ */ e(
|
|
888
|
-
D,
|
|
889
|
-
{
|
|
890
|
-
t: v,
|
|
891
|
-
ns: "ui",
|
|
892
|
-
i18nKey: "signing.handoff.continue",
|
|
893
|
-
values: { next: w },
|
|
894
|
-
components: { next: /* @__PURE__ */ e("bdi", {}) }
|
|
895
|
-
}
|
|
896
|
-
)
|
|
897
|
-
}
|
|
898
|
-
)
|
|
899
|
-
] }) })
|
|
900
|
-
]
|
|
901
|
-
}
|
|
902
|
-
)
|
|
903
|
-
}
|
|
904
|
-
);
|
|
905
|
-
return f ? /* @__PURE__ */ e(W, { brand: d, brandLabel: u, children: S }) : S;
|
|
906
|
-
}
|
|
907
|
-
function an({
|
|
908
|
-
signerName: i,
|
|
909
|
-
nextName: t,
|
|
910
|
-
secondaryPending: n = !1,
|
|
911
|
-
withChrome: s = !0,
|
|
912
|
-
brand: r,
|
|
913
|
-
brandLabel: m,
|
|
914
|
-
privacy: a = !1,
|
|
915
|
-
className: f
|
|
916
|
-
}) {
|
|
917
|
-
const { t: d } = z("ui"), u = a ? M() : i, g = n || !t || t.trim() === "", h = a ? M() : t ?? "", v = /* @__PURE__ */ e(
|
|
918
|
-
"div",
|
|
919
|
-
{
|
|
920
|
-
"data-component": "signing-awaiting-screen",
|
|
921
|
-
"data-privacy": a ? "masked" : void 0,
|
|
922
|
-
className: `ds:flex ds:flex-1 ds:flex-col${f ? ` ${f}` : ""}`,
|
|
923
|
-
children: /* @__PURE__ */ e(
|
|
924
|
-
Y,
|
|
925
|
-
{
|
|
926
|
-
title: d("signing.awaiting.title"),
|
|
927
|
-
body: /* @__PURE__ */ e(
|
|
928
|
-
D,
|
|
929
|
-
{
|
|
930
|
-
t: d,
|
|
931
|
-
ns: "ui",
|
|
932
|
-
i18nKey: g ? "signing.awaiting.pendingBody" : "signing.awaiting.body",
|
|
933
|
-
values: { name: u, next: h },
|
|
934
|
-
components: { name: /* @__PURE__ */ e("bdi", {}), next: /* @__PURE__ */ e("bdi", {}) }
|
|
935
|
-
}
|
|
936
|
-
),
|
|
937
|
-
autoCloseSeconds: 0
|
|
938
|
-
}
|
|
939
|
-
)
|
|
940
|
-
}
|
|
941
|
-
);
|
|
942
|
-
return s ? /* @__PURE__ */ e(W, { brand: r, brandLabel: m, children: v }) : v;
|
|
943
|
-
}
|
|
944
|
-
function rn({
|
|
945
|
-
reason: i = "signed",
|
|
946
|
-
practiceName: t,
|
|
947
|
-
title: n,
|
|
948
|
-
body: s,
|
|
949
|
-
action: r,
|
|
950
|
-
withChrome: m = !0,
|
|
951
|
-
brand: a,
|
|
952
|
-
brandLabel: f,
|
|
953
|
-
className: d
|
|
954
|
-
}) {
|
|
955
|
-
const { t: u } = z("ui"), g = t !== void 0 && t.trim() !== "", h = u(i === "all-signed" ? "signing.finished.allSigned.title" : "signing.finished.signed.title"), v = i === "all-signed" ? u("signing.finished.allSigned.body") : g ? /* @__PURE__ */ e(
|
|
956
|
-
D,
|
|
957
|
-
{
|
|
958
|
-
t: u,
|
|
959
|
-
ns: "ui",
|
|
960
|
-
i18nKey: "signing.finished.signed.body",
|
|
961
|
-
values: { practice: t },
|
|
962
|
-
components: { practice: /* @__PURE__ */ e("bdi", {}) }
|
|
963
|
-
}
|
|
964
|
-
) : u("signing.finished.signed.bodyNoPractice"), N = r.onClick !== void 0 || r.href !== void 0, x = /* @__PURE__ */ e(
|
|
965
|
-
"div",
|
|
966
|
-
{
|
|
967
|
-
"data-component": "signing-finished-screen",
|
|
968
|
-
"data-reason": i,
|
|
969
|
-
className: `ds:flex ds:flex-1 ds:flex-col${d ? ` ${d}` : ""}`,
|
|
970
|
-
children: /* @__PURE__ */ e(
|
|
971
|
-
Y,
|
|
972
|
-
{
|
|
973
|
-
title: n ?? h,
|
|
974
|
-
body: s ?? v,
|
|
975
|
-
action: N ? {
|
|
976
|
-
...r,
|
|
977
|
-
label: r.label ?? u("signing.finished.action")
|
|
978
|
-
} : void 0,
|
|
979
|
-
autoCloseSeconds: N ? void 0 : 0
|
|
980
|
-
}
|
|
981
|
-
)
|
|
982
|
-
}
|
|
983
|
-
);
|
|
984
|
-
return m ? /* @__PURE__ */ e(W, { brand: a, brandLabel: f, children: x }) : x;
|
|
985
|
-
}
|
|
986
|
-
function ln({
|
|
987
|
-
reason: i,
|
|
988
|
-
practiceName: t,
|
|
989
|
-
title: n,
|
|
990
|
-
body: s,
|
|
991
|
-
withChrome: r = !0,
|
|
992
|
-
brand: m,
|
|
993
|
-
brandLabel: a,
|
|
994
|
-
className: f
|
|
995
|
-
}) {
|
|
996
|
-
const { t: d } = z("ui"), u = t !== void 0 && t.trim() !== "", g = (x) => /* @__PURE__ */ e(
|
|
997
|
-
D,
|
|
998
|
-
{
|
|
999
|
-
t: d,
|
|
1000
|
-
ns: "ui",
|
|
1001
|
-
i18nKey: x,
|
|
1002
|
-
values: { practice: t },
|
|
1003
|
-
components: { practice: /* @__PURE__ */ e("bdi", {}) }
|
|
1004
|
-
}
|
|
1005
|
-
);
|
|
1006
|
-
let h, v;
|
|
1007
|
-
i === "expired" ? (h = d("signing.end.expired.title"), v = u ? g("signing.end.expired.body") : d("signing.end.expired.bodyNoPractice")) : i === "already-completed" ? (h = d("signing.end.alreadyCompleted.title"), v = u ? g("signing.end.alreadyCompleted.body") : d("signing.end.alreadyCompleted.bodyNoPractice")) : (h = d("signing.end.cancelled.title"), v = u ? g("signing.end.cancelled.body") : d("signing.end.cancelled.bodyNoPractice"));
|
|
1008
|
-
const N = /* @__PURE__ */ e(
|
|
1009
|
-
"div",
|
|
1010
|
-
{
|
|
1011
|
-
"data-component": "signing-end-screen",
|
|
1012
|
-
"data-reason": i,
|
|
1013
|
-
className: `ds:flex ds:flex-1 ds:flex-col${f ? ` ${f}` : ""}`,
|
|
1014
|
-
children: /* @__PURE__ */ e(
|
|
1015
|
-
Y,
|
|
1016
|
-
{
|
|
1017
|
-
title: n ?? h,
|
|
1018
|
-
body: s ?? v,
|
|
1019
|
-
icon: i === "expired" ? /* @__PURE__ */ e(Ne, {}) : i === "cancelled" ? /* @__PURE__ */ e(Ie, {}) : void 0,
|
|
1020
|
-
autoCloseSeconds: 0
|
|
1021
|
-
}
|
|
1022
|
-
)
|
|
1023
|
-
}
|
|
1024
|
-
);
|
|
1025
|
-
return r ? /* @__PURE__ */ e(W, { brand: m, brandLabel: a, children: N }) : N;
|
|
1026
|
-
}
|
|
1027
|
-
export {
|
|
1028
|
-
we as M,
|
|
1029
|
-
an as S,
|
|
1030
|
-
W as a,
|
|
1031
|
-
nn as b,
|
|
1032
|
-
ln as c,
|
|
1033
|
-
rn as d,
|
|
1034
|
-
ze as e,
|
|
1035
|
-
sn as f,
|
|
1036
|
-
tn as g,
|
|
1037
|
-
Ce as h,
|
|
1038
|
-
de as i,
|
|
1039
|
-
dn as j
|
|
1040
|
-
};
|
|
1041
|
-
//# sourceMappingURL=signing-end-screen-an9P8DOT.js.map
|