@alfadocs/ui-kit 1.3.6 → 1.3.8
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/{anamnesis-i18n-DqRbWU2L.js → anamnesis-i18n-v2h_WUXg.js} +1017 -946
- package/dist/_chunks/signature-request-CrRj64Nz.js +417 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/index.js +2 -2
- package/dist/patterns/anamnesis/anamnesis-questionnaire.d.ts +29 -0
- package/dist/patterns/anamnesis/anamnesis-types.d.ts +5 -1
- package/dist/patterns/anamnesis/anamnesis.d.ts +5 -1
- package/dist/patterns/anamnesis/index.d.ts +1 -0
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signature-request/signature-request.d.ts +14 -0
- package/package.json +1 -1
- package/dist/_chunks/signature-request-DZEFtbER.js +0 -403
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
import { jsx as s, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ge, useRef as j, useState as y, useEffect as Q } from "react";
|
|
3
|
+
import { useTranslation as fe } from "react-i18next";
|
|
4
|
+
import { D as m } from "./dialog-UbKJCi1X.js";
|
|
5
|
+
import { B as z } from "./button-CPGiR_bH.js";
|
|
6
|
+
import { I as xe } from "./icon-button-C_kbcd7I.js";
|
|
7
|
+
import { C as Y } from "./checkbox-BuZ1u__2.js";
|
|
8
|
+
import { a as Re } from "./whatsapp-button-BIy6NaJK.js";
|
|
9
|
+
import { S as Z } from "./select-BW5ecXlX.js";
|
|
10
|
+
import { S as be } from "./switch-OILsBLWo.js";
|
|
11
|
+
import { A as _ } from "./alert-CiJT540z.js";
|
|
12
|
+
import { I as Ne } from "./info-tip-Bxk3w6UM.js";
|
|
13
|
+
import { S as we } from "./separator-CYU_bGFn.js";
|
|
14
|
+
import { A as ee } from "./avatar-BNQNhoyL.js";
|
|
15
|
+
import { c as ne } from "./createLucideIcon-DhHxpK9K.js";
|
|
16
|
+
import { P as Ce } from "./plus-DzMQ_c6b.js";
|
|
17
|
+
import { X as Ie } from "./x-B5YnXwCz.js";
|
|
18
|
+
import { P as Se } from "./pen-line-D0De5zdl.js";
|
|
19
|
+
import { M as ke } from "./mail-BqXVF2zH.js";
|
|
20
|
+
import { M as qe } from "./message-square-Bye4ATvx.js";
|
|
21
|
+
/**
|
|
22
|
+
* @license lucide-react v1.22.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/
|
|
27
|
+
const ye = [
|
|
28
|
+
["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", ry: "2", key: "76otgf" }],
|
|
29
|
+
["line", { x1: "12", x2: "12.01", y1: "18", y2: "18", key: "1dp563" }]
|
|
30
|
+
], ze = ne("tablet", ye);
|
|
31
|
+
/**
|
|
32
|
+
* @license lucide-react v1.22.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/
|
|
37
|
+
const _e = [
|
|
38
|
+
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
39
|
+
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
40
|
+
["line", { x1: "19", x2: "19", y1: "8", y2: "14", key: "1bvyxn" }],
|
|
41
|
+
["line", { x1: "22", x2: "16", y1: "11", y2: "11", key: "1shjgl" }]
|
|
42
|
+
], De = ne("user-plus", _e), v = "__assign-later__", se = [
|
|
43
|
+
"sms",
|
|
44
|
+
"email",
|
|
45
|
+
"whatsapp",
|
|
46
|
+
"on-device"
|
|
47
|
+
];
|
|
48
|
+
function ae(h, D) {
|
|
49
|
+
var c;
|
|
50
|
+
return ((c = h.find((o) => o.value === D)) == null ? void 0 : c.label) ?? "";
|
|
51
|
+
}
|
|
52
|
+
const Me = ge(
|
|
53
|
+
({
|
|
54
|
+
open: h,
|
|
55
|
+
onOpenChange: D,
|
|
56
|
+
operators: c,
|
|
57
|
+
signerOptions: o,
|
|
58
|
+
currentOperatorId: M,
|
|
59
|
+
allowAssignLater: T = !0,
|
|
60
|
+
requireOperator: g = !0,
|
|
61
|
+
requirePatient: f = !0,
|
|
62
|
+
initialOperatorId: E,
|
|
63
|
+
initialOperatorChannel: F,
|
|
64
|
+
initialSigners: A,
|
|
65
|
+
maxSigners: le = 2,
|
|
66
|
+
busy: i = !1,
|
|
67
|
+
error: H,
|
|
68
|
+
title: te,
|
|
69
|
+
description: re,
|
|
70
|
+
onRequestSignature: ie,
|
|
71
|
+
contentProps: de
|
|
72
|
+
}, ce) => {
|
|
73
|
+
const { t: n } = fe(), P = j(0), U = j(null), V = (e) => {
|
|
74
|
+
var t;
|
|
75
|
+
const a = (t = o.find(
|
|
76
|
+
(d) => d.value === e
|
|
77
|
+
)) == null ? void 0 : t.availableChannels;
|
|
78
|
+
return a && a.length > 0 ? se.filter((d) => a.includes(d)) : se;
|
|
79
|
+
}, O = (e, a) => {
|
|
80
|
+
const t = V(e);
|
|
81
|
+
return t.includes(a) ? a : t[0];
|
|
82
|
+
}, W = () => {
|
|
83
|
+
var e, a;
|
|
84
|
+
return E === null ? T ? v : ((e = c[0]) == null ? void 0 : e.value) ?? v : E ?? ((a = c[0]) == null ? void 0 : a.value) ?? (T ? v : "");
|
|
85
|
+
}, G = () => (A && A.length > 0 ? A : o.length > 0 ? [
|
|
86
|
+
{
|
|
87
|
+
signerId: o[0].value,
|
|
88
|
+
channel: O(o[0].value, "on-device")
|
|
89
|
+
}
|
|
90
|
+
] : []).map((a) => ({ ...a, rowId: P.current++ })), x = (e) => {
|
|
91
|
+
var a;
|
|
92
|
+
return ((a = c.find((t) => t.value === e)) == null ? void 0 : a.defaultChannel) ?? "email";
|
|
93
|
+
}, X = (e, a) => F === "on-device" ? a.some((t) => t.channel === "on-device") ? "on-device" : x(e) : F ?? x(e), [p, B] = y(W), [u, w] = y(G), [C, R] = y(
|
|
94
|
+
() => X(p, u)
|
|
95
|
+
), [$, b] = y(null), J = j(h);
|
|
96
|
+
Q(() => {
|
|
97
|
+
if (h && !J.current) {
|
|
98
|
+
const e = W(), a = G();
|
|
99
|
+
B(e), w(a), R(X(e, a)), b(null);
|
|
100
|
+
}
|
|
101
|
+
J.current = h;
|
|
102
|
+
}, [h]);
|
|
103
|
+
const I = u.some(
|
|
104
|
+
(e) => e.channel === "on-device"
|
|
105
|
+
);
|
|
106
|
+
Q(() => {
|
|
107
|
+
if (C === "on-device" && !I) {
|
|
108
|
+
const e = x(p);
|
|
109
|
+
R(e), b(e);
|
|
110
|
+
}
|
|
111
|
+
}, [C, I, p]);
|
|
112
|
+
const oe = T ? [
|
|
113
|
+
...c,
|
|
114
|
+
{ value: v, label: n("signatureRequest.assignLater") }
|
|
115
|
+
] : c, S = p === v, N = {
|
|
116
|
+
sms: {
|
|
117
|
+
label: n("signatureRequest.viaSms"),
|
|
118
|
+
icon: /* @__PURE__ */ s(qe, { className: "ds:size-4", "aria-hidden": !0 })
|
|
119
|
+
},
|
|
120
|
+
email: {
|
|
121
|
+
label: n("signatureRequest.viaEmail"),
|
|
122
|
+
icon: /* @__PURE__ */ s(ke, { className: "ds:size-4", "aria-hidden": !0 })
|
|
123
|
+
},
|
|
124
|
+
whatsapp: {
|
|
125
|
+
label: n("signatureRequest.viaWhatsapp"),
|
|
126
|
+
icon: /* @__PURE__ */ s(Re, { className: "ds:size-4", "aria-hidden": !0 })
|
|
127
|
+
},
|
|
128
|
+
"on-device": {
|
|
129
|
+
label: n("signatureRequest.onThisDevice"),
|
|
130
|
+
icon: /* @__PURE__ */ s(ze, { className: "ds:size-4", "aria-hidden": !0 })
|
|
131
|
+
}
|
|
132
|
+
}, ue = [
|
|
133
|
+
{ value: "sms", ...N.sms },
|
|
134
|
+
{ value: "email", ...N.email },
|
|
135
|
+
{
|
|
136
|
+
value: "on-device",
|
|
137
|
+
...N["on-device"],
|
|
138
|
+
disabled: !I,
|
|
139
|
+
hint: I ? void 0 : n("signatureRequest.onDeviceUnavailableHint")
|
|
140
|
+
}
|
|
141
|
+
], K = u.map((e) => e.signerId), k = o.find(
|
|
142
|
+
(e) => !K.includes(e.value)
|
|
143
|
+
), me = !i && u.length < le && k !== void 0, L = (e, a) => {
|
|
144
|
+
w(
|
|
145
|
+
(t) => t.map(
|
|
146
|
+
(d) => d.rowId === e ? { ...d, ...a } : d
|
|
147
|
+
)
|
|
148
|
+
);
|
|
149
|
+
}, he = () => {
|
|
150
|
+
k && w((e) => [
|
|
151
|
+
...e,
|
|
152
|
+
{
|
|
153
|
+
signerId: k.value,
|
|
154
|
+
channel: O(k.value, "sms"),
|
|
155
|
+
rowId: P.current++
|
|
156
|
+
}
|
|
157
|
+
]);
|
|
158
|
+
}, pe = (e) => {
|
|
159
|
+
var a;
|
|
160
|
+
(a = U.current) == null || a.focus(), w(
|
|
161
|
+
(t) => t.filter((d) => d.rowId !== e)
|
|
162
|
+
);
|
|
163
|
+
}, ve = () => {
|
|
164
|
+
ie({
|
|
165
|
+
operatorId: !g || S ? null : p,
|
|
166
|
+
operatorChannel: !g || S ? null : C,
|
|
167
|
+
signers: f ? u.map(({ rowId: e, ...a }) => a) : []
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
return /* @__PURE__ */ s("div", { ref: ce, className: "ds:contents", "data-component": "signature-request", children: /* @__PURE__ */ s(m, { open: h, onOpenChange: D, children: /* @__PURE__ */ r(m.Content, { size: "lg", hideCloseButton: !0, ...de, children: [
|
|
171
|
+
/* @__PURE__ */ r(m.Header, { children: [
|
|
172
|
+
/* @__PURE__ */ s(m.Title, { children: te ?? n("signatureRequest.title") }),
|
|
173
|
+
/* @__PURE__ */ s(m.Description, { children: re ?? n("signatureRequest.noSignedVersions") })
|
|
174
|
+
] }),
|
|
175
|
+
/* @__PURE__ */ r(m.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
176
|
+
g ? /* @__PURE__ */ r("section", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
177
|
+
/* @__PURE__ */ r("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
178
|
+
/* @__PURE__ */ s("p", { className: "type-eyebrow ds:text-start ds:text-[color:var(--muted-foreground)]", children: n("signatureRequest.operatorSection") }),
|
|
179
|
+
M !== void 0 ? /* @__PURE__ */ s(
|
|
180
|
+
z,
|
|
181
|
+
{
|
|
182
|
+
intent: "primary",
|
|
183
|
+
size: "sm",
|
|
184
|
+
startIcon: /* @__PURE__ */ s(De, {}),
|
|
185
|
+
disabled: i,
|
|
186
|
+
onClick: () => {
|
|
187
|
+
B(M), R(
|
|
188
|
+
x(M)
|
|
189
|
+
), b(null);
|
|
190
|
+
},
|
|
191
|
+
children: n("signatureRequest.assignToMe")
|
|
192
|
+
}
|
|
193
|
+
) : null
|
|
194
|
+
] }),
|
|
195
|
+
/* @__PURE__ */ r("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
196
|
+
/* @__PURE__ */ s(
|
|
197
|
+
ee,
|
|
198
|
+
{
|
|
199
|
+
"aria-hidden": "true",
|
|
200
|
+
name: S ? void 0 : ae(c, p),
|
|
201
|
+
size: "sm"
|
|
202
|
+
}
|
|
203
|
+
),
|
|
204
|
+
/* @__PURE__ */ s("div", { className: "ds:min-w-0 ds:flex-1 ds:text-start", children: /* @__PURE__ */ s(
|
|
205
|
+
Z,
|
|
206
|
+
{
|
|
207
|
+
options: oe,
|
|
208
|
+
value: p,
|
|
209
|
+
onValueChange: (e) => {
|
|
210
|
+
e && (B(e), R(
|
|
211
|
+
e === v ? "email" : x(e)
|
|
212
|
+
), b(null));
|
|
213
|
+
},
|
|
214
|
+
required: !0,
|
|
215
|
+
disabled: i,
|
|
216
|
+
placeholder: n("signatureRequest.operatorPlaceholder"),
|
|
217
|
+
"aria-label": n("signatureRequest.operatorSection")
|
|
218
|
+
}
|
|
219
|
+
) })
|
|
220
|
+
] }),
|
|
221
|
+
S ? null : /* @__PURE__ */ s(
|
|
222
|
+
"div",
|
|
223
|
+
{
|
|
224
|
+
role: "group",
|
|
225
|
+
"aria-label": n("signatureRequest.operatorChannelLabel"),
|
|
226
|
+
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-lg)] ds:gap-y-[var(--spacing-sm)] ds:ps-[var(--spacing-xl)]",
|
|
227
|
+
children: ue.map((e) => /* @__PURE__ */ r(
|
|
228
|
+
"span",
|
|
229
|
+
{
|
|
230
|
+
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
231
|
+
children: [
|
|
232
|
+
/* @__PURE__ */ s(
|
|
233
|
+
Y,
|
|
234
|
+
{
|
|
235
|
+
checked: C === e.value,
|
|
236
|
+
disabled: i || e.disabled,
|
|
237
|
+
onCheckedChange: (a) => {
|
|
238
|
+
a === !0 && (R(e.value), b(null));
|
|
239
|
+
},
|
|
240
|
+
label: /* @__PURE__ */ r("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
241
|
+
/* @__PURE__ */ s(
|
|
242
|
+
"span",
|
|
243
|
+
{
|
|
244
|
+
"aria-hidden": "true",
|
|
245
|
+
className: "ds:text-[var(--accent)]",
|
|
246
|
+
children: e.icon
|
|
247
|
+
}
|
|
248
|
+
),
|
|
249
|
+
e.label
|
|
250
|
+
] })
|
|
251
|
+
}
|
|
252
|
+
),
|
|
253
|
+
e.hint ? /* @__PURE__ */ s(Ne, { size: "sm", content: e.hint }) : null
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
e.value
|
|
257
|
+
))
|
|
258
|
+
}
|
|
259
|
+
),
|
|
260
|
+
/* @__PURE__ */ s("span", { role: "status", className: "ds:sr-only", children: $ ? n("signatureRequest.operatorChannelReverted", {
|
|
261
|
+
channel: N[$].label
|
|
262
|
+
}) : null })
|
|
263
|
+
] }) : null,
|
|
264
|
+
g && f ? /* @__PURE__ */ s(we, { decorative: !0 }) : null,
|
|
265
|
+
f ? /* @__PURE__ */ r("section", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:text-start", children: [
|
|
266
|
+
/* @__PURE__ */ r("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
267
|
+
/* @__PURE__ */ s("p", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)]", children: n("signatureRequest.signersSection") }),
|
|
268
|
+
/* @__PURE__ */ s(
|
|
269
|
+
z,
|
|
270
|
+
{
|
|
271
|
+
ref: U,
|
|
272
|
+
intent: "primary",
|
|
273
|
+
size: "sm",
|
|
274
|
+
startIcon: /* @__PURE__ */ s(Ce, {}),
|
|
275
|
+
disabled: !me,
|
|
276
|
+
onClick: he,
|
|
277
|
+
children: n("signatureRequest.addSigner")
|
|
278
|
+
}
|
|
279
|
+
)
|
|
280
|
+
] }),
|
|
281
|
+
u.map((e) => {
|
|
282
|
+
const a = o.filter(
|
|
283
|
+
(l) => l.value === e.signerId || !K.includes(l.value)
|
|
284
|
+
), t = ae(o, e.signerId), d = V(e.signerId).map(
|
|
285
|
+
(l) => ({
|
|
286
|
+
value: l,
|
|
287
|
+
...N[l]
|
|
288
|
+
})
|
|
289
|
+
);
|
|
290
|
+
return /* @__PURE__ */ r(
|
|
291
|
+
"div",
|
|
292
|
+
{
|
|
293
|
+
role: "group",
|
|
294
|
+
"aria-label": t,
|
|
295
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
296
|
+
children: [
|
|
297
|
+
/* @__PURE__ */ r("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
298
|
+
/* @__PURE__ */ s(
|
|
299
|
+
ee,
|
|
300
|
+
{
|
|
301
|
+
"aria-hidden": "true",
|
|
302
|
+
name: t,
|
|
303
|
+
size: "sm"
|
|
304
|
+
}
|
|
305
|
+
),
|
|
306
|
+
/* @__PURE__ */ s("div", { className: "ds:min-w-0 ds:flex-1", children: /* @__PURE__ */ s(
|
|
307
|
+
Z,
|
|
308
|
+
{
|
|
309
|
+
options: a,
|
|
310
|
+
value: e.signerId,
|
|
311
|
+
onValueChange: (l) => {
|
|
312
|
+
if (!l) return;
|
|
313
|
+
const q = O(
|
|
314
|
+
l,
|
|
315
|
+
e.channel
|
|
316
|
+
);
|
|
317
|
+
L(e.rowId, {
|
|
318
|
+
signerId: l,
|
|
319
|
+
channel: q,
|
|
320
|
+
skipOtp: q === "on-device" ? e.skipOtp : void 0
|
|
321
|
+
});
|
|
322
|
+
},
|
|
323
|
+
required: !0,
|
|
324
|
+
disabled: i,
|
|
325
|
+
placeholder: n(
|
|
326
|
+
"signatureRequest.signerPlaceholder"
|
|
327
|
+
),
|
|
328
|
+
"aria-label": n(
|
|
329
|
+
"signatureRequest.signerPlaceholder"
|
|
330
|
+
)
|
|
331
|
+
}
|
|
332
|
+
) }),
|
|
333
|
+
u.length > 1 ? /* @__PURE__ */ s(
|
|
334
|
+
xe,
|
|
335
|
+
{
|
|
336
|
+
intent: "ghost",
|
|
337
|
+
size: "sm",
|
|
338
|
+
icon: /* @__PURE__ */ s(Ie, {}),
|
|
339
|
+
disabled: i,
|
|
340
|
+
"aria-label": n("signatureRequest.removeSigner"),
|
|
341
|
+
onClick: () => pe(e.rowId)
|
|
342
|
+
}
|
|
343
|
+
) : null
|
|
344
|
+
] }),
|
|
345
|
+
/* @__PURE__ */ s(
|
|
346
|
+
"div",
|
|
347
|
+
{
|
|
348
|
+
role: "group",
|
|
349
|
+
"aria-label": n("signatureRequest.channelLabel"),
|
|
350
|
+
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-lg)] ds:gap-y-[var(--spacing-sm)] ds:ps-[var(--spacing-xl)]",
|
|
351
|
+
children: d.map((l) => /* @__PURE__ */ s(
|
|
352
|
+
Y,
|
|
353
|
+
{
|
|
354
|
+
checked: e.channel === l.value,
|
|
355
|
+
disabled: i,
|
|
356
|
+
onCheckedChange: (q) => q === !0 && L(e.rowId, {
|
|
357
|
+
channel: l.value,
|
|
358
|
+
skipOtp: void 0
|
|
359
|
+
}),
|
|
360
|
+
label: /* @__PURE__ */ r("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
361
|
+
/* @__PURE__ */ s(
|
|
362
|
+
"span",
|
|
363
|
+
{
|
|
364
|
+
"aria-hidden": "true",
|
|
365
|
+
className: "ds:text-[var(--accent)]",
|
|
366
|
+
children: l.icon
|
|
367
|
+
}
|
|
368
|
+
),
|
|
369
|
+
l.label
|
|
370
|
+
] })
|
|
371
|
+
},
|
|
372
|
+
l.value
|
|
373
|
+
))
|
|
374
|
+
}
|
|
375
|
+
),
|
|
376
|
+
e.channel === "on-device" ? /* @__PURE__ */ s("div", { className: "ds:ps-[var(--spacing-xl)]", children: /* @__PURE__ */ s(
|
|
377
|
+
be,
|
|
378
|
+
{
|
|
379
|
+
label: n("signatureRequest.noOtp"),
|
|
380
|
+
checked: e.skipOtp === !0,
|
|
381
|
+
disabled: i,
|
|
382
|
+
onCheckedChange: (l) => L(e.rowId, { skipOtp: l })
|
|
383
|
+
}
|
|
384
|
+
) }) : null
|
|
385
|
+
]
|
|
386
|
+
},
|
|
387
|
+
e.rowId
|
|
388
|
+
);
|
|
389
|
+
})
|
|
390
|
+
] }) : null,
|
|
391
|
+
u.some(
|
|
392
|
+
(e) => e.channel === "on-device" && e.skipOtp === !0
|
|
393
|
+
) ? /* @__PURE__ */ s(_, { variant: "warning", children: /* @__PURE__ */ s(_.Description, { children: n("signatureRequest.noOtpWarning") }) }) : null,
|
|
394
|
+
H ? /* @__PURE__ */ s(_, { variant: "error", children: /* @__PURE__ */ s(_.Description, { children: H }) }) : null
|
|
395
|
+
] }),
|
|
396
|
+
/* @__PURE__ */ r(m.Footer, { children: [
|
|
397
|
+
/* @__PURE__ */ s(
|
|
398
|
+
z,
|
|
399
|
+
{
|
|
400
|
+
intent: "primary",
|
|
401
|
+
startIcon: /* @__PURE__ */ s(Se, {}),
|
|
402
|
+
onClick: ve,
|
|
403
|
+
disabled: i || f && u.length === 0 || !f && !g,
|
|
404
|
+
loading: i,
|
|
405
|
+
children: n("signatureRequest.requestSignature")
|
|
406
|
+
}
|
|
407
|
+
),
|
|
408
|
+
/* @__PURE__ */ s(m.Close, { asChild: !0, children: /* @__PURE__ */ s(z, { intent: "outline", disabled: i, children: n("signatureRequest.close") }) })
|
|
409
|
+
] })
|
|
410
|
+
] }) }) });
|
|
411
|
+
}
|
|
412
|
+
);
|
|
413
|
+
Me.displayName = "SignatureRequestModal";
|
|
414
|
+
export {
|
|
415
|
+
Me as S
|
|
416
|
+
};
|
|
417
|
+
//# sourceMappingURL=signature-request-CrRj64Nz.js.map
|
package/dist/agent-catalog.json
CHANGED
package/dist/index.js
CHANGED
|
@@ -214,10 +214,10 @@ import { T as Og } from "./_chunks/transaction-chip-DJCstquX.js";
|
|
|
214
214
|
import { W as yg, a as kg } from "./_chunks/whatsapp-button-BIy6NaJK.js";
|
|
215
215
|
import { C as vg, W as Gg, a as Hg, b as wg, c as Vg, i as Ug, l as Wg, m as Kg, r as Yg, w as Xg, d as qg, e as zg, f as jg } from "./_chunks/workflow-map-BVMeVHkV.js";
|
|
216
216
|
import { A as Jg, a as Zg, b as $g, c as aC } from "./_chunks/alia-sidebar-DzNz1gDf.js";
|
|
217
|
-
import { A as rC, a as sC, L as oC, P as tC, S as nC, T as iC, b as pC, c as mC, d as lC, e as dC, f as AC, g as cC, h as fC, i as gC, j as CC, k as SC, l as xC, m as TC, r as uC, n as PC, s as IC, o as EC } from "./_chunks/anamnesis-i18n-
|
|
217
|
+
import { A as rC, a as sC, L as oC, P as tC, S as nC, T as iC, b as pC, c as mC, d as lC, e as dC, f as AC, g as cC, h as fC, i as gC, j as CC, k as SC, l as xC, m as TC, r as uC, n as PC, s as IC, o as EC } from "./_chunks/anamnesis-i18n-v2h_WUXg.js";
|
|
218
218
|
import { C as RC, M as _C, P as NC } from "./_chunks/marketplace-app-shell-DwcFMxzp.js";
|
|
219
219
|
import { P as DC } from "./_chunks/payment-automation-upsell-D_x880pr.js";
|
|
220
|
-
import { S as MC } from "./_chunks/signature-request-
|
|
220
|
+
import { S as MC } from "./_chunks/signature-request-CrRj64Nz.js";
|
|
221
221
|
import { D as LC, d as yC } from "./_chunks/dependent-selector-DyFpdzZV.js";
|
|
222
222
|
import { D as BC, d as vC } from "./_chunks/document-preview-D3gg4MXB.js";
|
|
223
223
|
import { D as HC, d as wC } from "./_chunks/document-scanner-D8ASqxif.js";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { TFunction } from 'i18next';
|
|
3
|
+
import { type IntakeAnswerMap } from './anamnesis-intake';
|
|
4
|
+
import type { PracticeAnamnesisConfig } from './anamnesis-config';
|
|
5
|
+
import type { AnamnesisRecord } from './anamnesis-types';
|
|
6
|
+
export interface AnamnesisQuestionnaireProps {
|
|
7
|
+
record: AnamnesisRecord;
|
|
8
|
+
t: TFunction;
|
|
9
|
+
/** The practice's configured vocabulary. Omitted = the kit-seeded default. */
|
|
10
|
+
config?: PracticeAnamnesisConfig;
|
|
11
|
+
/** The questionnaire was submitted — receives the full answer map. The
|
|
12
|
+
* surface keeps its own working copy either way; this is the seam a
|
|
13
|
+
* platform host persists through. */
|
|
14
|
+
onSubmit?: (answers: IntakeAnswerMap) => void;
|
|
15
|
+
/** Open the section containing this field key and focus it on mount. */
|
|
16
|
+
jumpToField?: string;
|
|
17
|
+
/** Host status chips (signature / expiry / save feedback) above the tabs. */
|
|
18
|
+
statusSlot?: ReactNode;
|
|
19
|
+
/** Mount on this tab instead of the questionnaire. Demo/story hook only —
|
|
20
|
+
* Chromatic skips play functions, so a click-selected tab is never
|
|
21
|
+
* snapshotted. */
|
|
22
|
+
defaultTab?: AnamnesisQuestionnaireTab;
|
|
23
|
+
}
|
|
24
|
+
export type AnamnesisQuestionnaireTab = 'questionnaire' | 'trend';
|
|
25
|
+
export declare function AnamnesisQuestionnaire({ record, t, config, onSubmit, jumpToField, statusSlot, defaultTab, }: AnamnesisQuestionnaireProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare namespace AnamnesisQuestionnaire {
|
|
27
|
+
var displayName: string;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=anamnesis-questionnaire.d.ts.map
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/** The three host contexts the one pattern renders in. */
|
|
2
|
-
|
|
2
|
+
/** `questionnaire` is the contained platform surface: ONE questionnaire for
|
|
3
|
+
* clinician and patient alike, plus the trend over its numeric answers. It
|
|
4
|
+
* deliberately carries none of `compile`'s bespoke measurement blocks — a
|
|
5
|
+
* practice that needs the two roles asked different things makes two forms. */
|
|
6
|
+
export type AnamnesisMode = 'intake' | 'compile' | 'questionnaire' | 'readOnly';
|
|
3
7
|
/** Recorded biological sex — gates the menstrual-cycle / pregnancy fields. */
|
|
4
8
|
export type PatientSex = 'female' | 'male' | 'unspecified';
|
|
5
9
|
/** Who authored a value. Patient-submitted values render a "from patient"
|
|
@@ -5,6 +5,7 @@ import { type AnamnesisCompileView } from './anamnesis-compile';
|
|
|
5
5
|
import type { DisclosureAudience } from './anamnesis-disclosure';
|
|
6
6
|
import { type IntakeAnswerMap } from './anamnesis-intake';
|
|
7
7
|
import type { MissingAnswer } from './anamnesis-digest';
|
|
8
|
+
import type { AnamnesisQuestionnaireTab } from './anamnesis-questionnaire';
|
|
8
9
|
import type { AnamnesisMode, AnamnesisRecord, OpenAnamnesisNote, PractitionerOption } from './anamnesis-types';
|
|
9
10
|
export interface AnamnesisProps {
|
|
10
11
|
/** Which host context to render. */
|
|
@@ -49,6 +50,9 @@ export interface AnamnesisProps {
|
|
|
49
50
|
/** Compile mode only: every edit to the working record — the visit-data
|
|
50
51
|
* persistence seam (hosts debounce + diff). See `AnamnesisCompileProps`. */
|
|
51
52
|
onRecordChange?: (record: AnamnesisRecord) => void;
|
|
53
|
+
/** Questionnaire mode only: mount on this tab instead of the questionnaire.
|
|
54
|
+
* Demo/story hook only — Chromatic skips play functions. */
|
|
55
|
+
defaultQuestionnaireTab?: AnamnesisQuestionnaireTab;
|
|
52
56
|
/** Compile mode only: the practice's operators, offered in the visit's
|
|
53
57
|
* Practitioner select. Omitted or empty keeps the free-text input. */
|
|
54
58
|
practitioners?: PractitionerOption[];
|
|
@@ -65,5 +69,5 @@ export interface AnamnesisProps {
|
|
|
65
69
|
defaultShareOpen?: boolean;
|
|
66
70
|
defaultExportAudience?: DisclosureAudience;
|
|
67
71
|
}
|
|
68
|
-
export declare function Anamnesis({ mode, record, t, dataComponent, embedded, config, onTargetChange, hideTargetStrip, statusSlot, onOpenNote, onIntakeSubmit, intakeJumpToField, onMissingAnswerJump, onRecordChange, practitioners, newVisitDateIso, defaultView, defaultExportMenuOpen, defaultShareOpen, defaultExportAudience, }: AnamnesisProps): import("react/jsx-runtime").JSX.Element;
|
|
72
|
+
export declare function Anamnesis({ mode, record, t, dataComponent, embedded, config, onTargetChange, hideTargetStrip, statusSlot, onOpenNote, onIntakeSubmit, intakeJumpToField, onMissingAnswerJump, onRecordChange, defaultQuestionnaireTab, practitioners, newVisitDateIso, defaultView, defaultExportMenuOpen, defaultShareOpen, defaultExportAudience, }: AnamnesisProps): import("react/jsx-runtime").JSX.Element;
|
|
69
73
|
//# sourceMappingURL=anamnesis.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Anamnesis, type AnamnesisProps } from './anamnesis';
|
|
2
2
|
export type { IntakeAnswerMap } from './anamnesis-intake';
|
|
3
|
+
export type { AnamnesisQuestionnaireTab } from './anamnesis-questionnaire';
|
|
3
4
|
export type { MissingAnswer } from './anamnesis-digest';
|
|
4
5
|
export { AnamnesisConfigEditor, keyFromLabel, seededConfigDraft, type AnamnesisConfigEditorProps, } from './anamnesis-config-editor';
|
|
5
6
|
export { LOCKED_PARAMETER_KEYS, SEEDED_ANAMNESIS_CONFIG, TARGETABLE_PARAMETER_KEYS, allParametersIncludingArchived, allPathologiesIncludingArchived, allSectionsIncludingArchived, assignablePathologyCodes, configuredParameters, configuredPathologies, configuredSections, isParameterLocked, isParameterTargetable, resolveConfig, type PracticeAnamnesisConfig, } from './anamnesis-config';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, a as i, L as n, P as r, S as o, T as l, b as t, c as d, d as g, e as A, f as E, g as c, h as m, i as P, j as f, k as S, l as T, m as h, r as u, n as N, s as _, o as C } from "../../_chunks/anamnesis-i18n-
|
|
1
|
+
import { A as e, a as i, L as n, P as r, S as o, T as l, b as t, c as d, d as g, e as A, f as E, g as c, h as m, i as P, j as f, k as S, l as T, m as h, r as u, n as N, s as _, o as C } from "../../_chunks/anamnesis-i18n-v2h_WUXg.js";
|
|
2
2
|
export {
|
|
3
3
|
e as Anamnesis,
|
|
4
4
|
i as AnamnesisConfigEditor,
|
|
@@ -95,6 +95,20 @@ export interface SignatureRequestModalProps {
|
|
|
95
95
|
initialSigners?: SignerRequest[];
|
|
96
96
|
/** Cap on roster size. Default `2`. */
|
|
97
97
|
maxSigners?: number;
|
|
98
|
+
/**
|
|
99
|
+
* Whether an operator must counter-sign. `false` drops the operator
|
|
100
|
+
* section entirely and submits `operatorId: null` — a host whose document
|
|
101
|
+
* does not require a counter-signature must not be asked for one. Default
|
|
102
|
+
* `true`.
|
|
103
|
+
*/
|
|
104
|
+
requireOperator?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Whether the patient side signs at all. `false` drops the signer roster
|
|
107
|
+
* and submits an empty `signers` array — for documents only an operator
|
|
108
|
+
* signs. Default `true`. Setting BOTH this and `requireOperator` to false
|
|
109
|
+
* leaves nothing to request, so the primary action stays disabled.
|
|
110
|
+
*/
|
|
111
|
+
requirePatient?: boolean;
|
|
98
112
|
/** Disables all inputs and shows the primary action as loading. */
|
|
99
113
|
busy?: boolean;
|
|
100
114
|
/** Consumer-translated error shown above the footer (e.g. server failure). */
|
package/package.json
CHANGED