@alfadocs/ui-kit 1.31.0 → 1.33.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/{agenda-card-pdN49pMu.js → agenda-card-DVz3jwTf.js} +2 -2
- package/dist/_chunks/{agenda-tray-BweO8pDo.js → agenda-tray-1oDWCJdB.js} +2 -2
- package/dist/_chunks/{ai-prompt-input-CrHr-5H8.js → ai-prompt-input-Dt7tpCBh.js} +2 -2
- package/dist/_chunks/{alia-sidebar-BWcWZivN.js → alia-sidebar-D18kp3p9.js} +3 -3
- package/dist/_chunks/{anamnesis-summary-rows-DMO3MWSt.js → anamnesis-summary-rows-BYgyp_i2.js} +6 -6
- package/dist/_chunks/{appointment-card-CvUFFEdS.js → appointment-card-D-oj_ugh.js} +2 -2
- package/dist/_chunks/{appointment-timeline-DsMZY7U9.js → appointment-timeline-CymGHyIP.js} +2 -2
- package/dist/_chunks/{appointment-tray-Z2GaOIYQ.js → appointment-tray-DCk8gHod.js} +2 -2
- package/dist/_chunks/{audio-recorder-DXG6LTtO.js → audio-recorder-11wClczr.js} +2 -2
- package/dist/_chunks/{avatar-BNQNhoyL.js → avatar-CkDeQOSI.js} +37 -37
- package/dist/_chunks/{balance-badge-cell-CX6b0ML4.js → balance-badge-cell-DhBtFRoW.js} +4 -4
- package/dist/_chunks/{bishop-score-CJUVBfAu.js → bishop-score-CAl7C5hm.js} +2 -2
- package/dist/_chunks/{bmi-calculator-CcH6upht.js → bmi-calculator-Dwkih9a4.js} +3 -3
- package/dist/_chunks/{booking-jGzRUETo.js → booking-BqkEtsKx.js} +777 -747
- package/dist/_chunks/{calculator-dialog-12d3Sxaz.js → calculator-dialog-C0ixc3SU.js} +2 -2
- package/dist/_chunks/{calendar-BNQKpxhE.js → calendar-Dgvl5L4T.js} +2 -2
- package/dist/_chunks/{calendar-workspace-Dy1jHBvG.js → calendar-workspace-BX-zDyVR.js} +14 -14
- package/dist/_chunks/{care-plan-card-CQVboTn1.js → care-plan-card-CZW476Kg.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-jxHkzez5.js → care-plan-entry-card-BMUYagEw.js} +2 -2
- package/dist/_chunks/{chat-message-DBQu10rs.js → chat-message-C-8UU2av.js} +2 -2
- package/dist/_chunks/{clinical-note-card-yCTR9DB6.js → clinical-note-card-D2WTV2CO.js} +2 -2
- package/dist/_chunks/{data-table-DB5BiVQ0.js → data-table-DC96JJIq.js} +2 -2
- package/dist/_chunks/{dependent-selector-cJlJFAKD.js → dependent-selector-yTKKsuc9.js} +2 -2
- package/dist/_chunks/{dialog-UbKJCi1X.js → dialog-BJiLqhx6.js} +54 -46
- package/dist/_chunks/{document-preview-CDb-n_W7.js → document-preview-BrhMHNh8.js} +2 -2
- package/dist/_chunks/{due-date-calculator-BtgWeFqp.js → due-date-calculator-CxgK8vzt.js} +3 -3
- package/dist/_chunks/{entity-summary-B_vO5Ur4.js → entity-summary-5o768XLU.js} +2 -2
- package/dist/_chunks/{file-manager-Cd8V9IcZ.js → file-manager-CI2Qn8qW.js} +3 -3
- package/dist/_chunks/{gestational-age-calculator-KdMg9z9H.js → gestational-age-calculator-CZHVrERT.js} +4 -4
- package/dist/_chunks/{link-cell-renderer-tWEOv3Sc.js → link-cell-renderer-BEpMNtAa.js} +3 -3
- package/dist/_chunks/{marketplace-app-shell-C4AjQmvz.js → marketplace-app-shell-CK_ND8Tr.js} +2 -2
- package/dist/_chunks/{message-card-D8GB4FdF.js → message-card-BUMv16un.js} +2 -2
- package/dist/_chunks/{message-tray-CGIRQjx5.js → message-tray-0zsv27xX.js} +2 -2
- package/dist/_chunks/{muscle-scheme-BSJsI4-I.js → muscle-scheme-UVz_x4iE.js} +2 -2
- package/dist/_chunks/{notes-panel-am6e-Lwh.js → notes-panel-C4G-mhZ9.js} +3 -3
- package/dist/_chunks/{operator-hero-BnFv-Uef.js → operator-hero-D7-iiFQ9.js} +2 -2
- package/dist/_chunks/{optical-prescription-BvwuqTpl.js → optical-prescription-DUJOhKz_.js} +2 -2
- package/dist/_chunks/{patient-details-CdfursHt.js → patient-details-BGiawUHd.js} +3 -3
- package/dist/_chunks/{patient-summary-card-C9WBwct-.js → patient-summary-card--CT_gbaQ.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-HrFsVi-C.js → periodontal-diagnosis-lEwA8wqX.js} +3 -3
- package/dist/_chunks/{practice-profile-hero-YQ7h2K4o.js → practice-profile-hero-DQyDvpJL.js} +2 -2
- package/dist/_chunks/{practice-results-CxIsU2YO.js → practice-results-DjEzPgAK.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-m-c05DOI.js → pregnancy-dating-n5j5dAKy.js} +4 -4
- package/dist/_chunks/{pregnancy-weight-gain-CJwbs9W-.js → pregnancy-weight-gain-D5A8vPjj.js} +3 -3
- package/dist/_chunks/qr-code-DOJs4suh.js +750 -0
- package/dist/_chunks/radio-DNRe6H_8.js +193 -0
- package/dist/_chunks/radio-group-DyVBgnA3.js +297 -0
- package/dist/_chunks/{radiograph-panel.agent-ByM9M3qm.js → radiograph-panel.agent-o4jwEJPC.js} +2 -2
- package/dist/_chunks/{rich-text-editor-VJATL1Tk.js → rich-text-editor-CQ7yZdG3.js} +2 -2
- package/dist/_chunks/select-CLSUnKjF.js +520 -0
- package/dist/_chunks/signature-request-vihDT8On.js +2232 -0
- package/dist/_chunks/{tabs-DqKtTIjZ.js → tabs-BnRaLT0y.js} +2 -2
- package/dist/_chunks/{tasks-panel-DPCNaRko.js → tasks-panel-DQuaVvl5.js} +2 -2
- package/dist/_chunks/{timeline-u-2t9t_M.js → timeline-Bs9Erxlo.js} +2 -2
- package/dist/_chunks/{tooth-scheme-C9jssOmy.js → tooth-scheme-Qe7LO5Di.js} +2 -2
- package/dist/_chunks/{unit-converter-C6jMjqL9.js → unit-converter-BTgU50gk.js} +2 -2
- package/dist/_chunks/{widget-picker-em4xGgv0.js → widget-picker-DvUkBemi.js} +2 -2
- package/dist/agent-catalog.json +316 -20
- package/dist/agent-i18n/en.json +18 -8
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/avatar/avatar.d.ts +2 -0
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +9 -0
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/muscle-scheme/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/practice-profile-hero/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/qr-code/index.js +1 -1
- package/dist/components/qr-code/qr-encode.d.ts +14 -16
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio-group/index.js +2 -2
- package/dist/components/radio-group/radio-group-context.d.ts +4 -1
- package/dist/components/radio-group/radio-group.d.ts +13 -1
- package/dist/components/radio-group/radio.d.ts +24 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select.d.ts +33 -0
- package/dist/components/skeleton-scheme/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +68 -0
- package/dist/i18n/locales/ar.js +69 -1
- package/dist/i18n/locales/de.d.ts +68 -0
- package/dist/i18n/locales/de.js +71 -1
- package/dist/i18n/locales/el.d.ts +68 -0
- package/dist/i18n/locales/el.js +69 -1
- package/dist/i18n/locales/en.d.ts +68 -0
- package/dist/i18n/locales/en.js +69 -1
- package/dist/i18n/locales/es.d.ts +68 -0
- package/dist/i18n/locales/es.js +69 -1
- package/dist/i18n/locales/fr.d.ts +68 -0
- package/dist/i18n/locales/fr.js +69 -1
- package/dist/i18n/locales/hi.d.ts +68 -0
- package/dist/i18n/locales/hi.js +69 -1
- package/dist/i18n/locales/it.d.ts +68 -0
- package/dist/i18n/locales/it.js +69 -1
- package/dist/i18n/locales/ja.d.ts +68 -0
- package/dist/i18n/locales/ja.js +69 -1
- package/dist/i18n/locales/nl.d.ts +68 -0
- package/dist/i18n/locales/nl.js +69 -1
- package/dist/i18n/locales/pl.d.ts +68 -0
- package/dist/i18n/locales/pl.js +69 -1
- package/dist/i18n/locales/pt.d.ts +68 -0
- package/dist/i18n/locales/pt.js +69 -1
- package/dist/i18n/locales/ro.d.ts +68 -0
- package/dist/i18n/locales/ro.js +69 -1
- package/dist/i18n/locales/ru.d.ts +68 -0
- package/dist/i18n/locales/ru.js +69 -1
- package/dist/i18n/locales/sq.d.ts +68 -0
- package/dist/i18n/locales/sq.js +69 -1
- package/dist/i18n/locales/sv.d.ts +68 -0
- package/dist/i18n/locales/sv.js +69 -1
- package/dist/i18n/locales/tr.d.ts +68 -0
- package/dist/i18n/locales/tr.js +69 -1
- package/dist/i18n/locales/zh.d.ts +68 -0
- package/dist/i18n/locales/zh.js +69 -1
- package/dist/index.js +57 -57
- package/dist/locales/ar.json +69 -1
- package/dist/locales/de.json +69 -1
- package/dist/locales/el.json +69 -1
- package/dist/locales/en.json +69 -1
- package/dist/locales/es.json +69 -1
- package/dist/locales/fr.json +69 -1
- package/dist/locales/hi.json +69 -1
- package/dist/locales/it.json +69 -1
- package/dist/locales/ja.json +69 -1
- package/dist/locales/nl.json +69 -1
- package/dist/locales/pl.json +69 -1
- package/dist/locales/pt.json +69 -1
- package/dist/locales/ro.json +69 -1
- package/dist/locales/ru.json +69 -1
- package/dist/locales/sq.json +69 -1
- package/dist/locales/sv.json +69 -1
- package/dist/locales/tr.json +69 -1
- package/dist/locales/zh.json +69 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/signature-request/channel-meta.d.ts +27 -0
- package/dist/patterns/signature-request/index.d.ts +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signature-request/load-status.d.ts +13 -0
- package/dist/patterns/signature-request/person-grid.d.ts +32 -0
- package/dist/patterns/signature-request/required-documents.d.ts +127 -0
- package/dist/patterns/signature-request/signature-history.d.ts +57 -0
- package/dist/patterns/signature-request/signature-outcome.d.ts +29 -0
- package/dist/patterns/signature-request/signature-request.d.ts +390 -26
- package/dist/tokens.css +1 -1
- package/package.json +3 -1
- package/dist/_chunks/qr-code-CPkEs5mG.js +0 -574
- package/dist/_chunks/radio-TWf9Q-mp.js +0 -108
- package/dist/_chunks/radio-group-rXDJADzW.js +0 -175
- package/dist/_chunks/select-Bi8zril7.js +0 -471
- package/dist/_chunks/signature-request-C-IsbkPf.js +0 -417
|
@@ -1,417 +0,0 @@
|
|
|
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-nJaPh_HC.js";
|
|
6
|
-
import { I as xe } from "./icon-button-DA2CAGHZ.js";
|
|
7
|
-
import { C as Y } from "./checkbox-BuZ1u__2.js";
|
|
8
|
-
import { a as Re } from "./whatsapp-button-Ai4YAVkl.js";
|
|
9
|
-
import { S as Z } from "./select-Bi8zril7.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-CADik6WN.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 o;
|
|
50
|
-
return ((o = h.find((c) => c.value === D)) == null ? void 0 : o.label) ?? "";
|
|
51
|
-
}
|
|
52
|
-
const Me = ge(
|
|
53
|
-
({
|
|
54
|
-
open: h,
|
|
55
|
-
onOpenChange: D,
|
|
56
|
-
operators: o,
|
|
57
|
-
signerOptions: c,
|
|
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 = c.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
|
-
}, B = (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 = o[0]) == null ? void 0 : e.value) ?? v : E ?? ((a = o[0]) == null ? void 0 : a.value) ?? (T ? v : "");
|
|
85
|
-
}, G = () => (A && A.length > 0 ? A : c.length > 0 ? [
|
|
86
|
-
{
|
|
87
|
-
signerId: c[0].value,
|
|
88
|
-
channel: B(c[0].value, "on-device")
|
|
89
|
-
}
|
|
90
|
-
] : []).map((a) => ({ ...a, rowId: P.current++ })), x = (e) => {
|
|
91
|
-
var a;
|
|
92
|
-
return ((a = o.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, L] = 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
|
-
L(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
|
-
...o,
|
|
114
|
-
{ value: v, label: n("signatureRequest.assignLater") }
|
|
115
|
-
] : o, 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 = c.find(
|
|
142
|
-
(e) => !K.includes(e.value)
|
|
143
|
-
), me = !i && u.length < le && k !== void 0, O = (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: B(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
|
-
L(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(o, 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 && (L(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
|
-
c.length > 1 ? /* @__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
|
-
) : null
|
|
280
|
-
] }),
|
|
281
|
-
u.map((e) => {
|
|
282
|
-
const a = c.filter(
|
|
283
|
-
(l) => l.value === e.signerId || !K.includes(l.value)
|
|
284
|
-
), t = ae(c, 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 = B(
|
|
314
|
-
l,
|
|
315
|
-
e.channel
|
|
316
|
-
);
|
|
317
|
-
O(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 && O(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) => O(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-C-IsbkPf.js.map
|