@alfadocs/ui-kit 1.36.1 → 1.38.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-tray-DYGCTIWB.js → agenda-tray-CG6jUjKc.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-card-GYHa7VGp.js → anamnesis-summary-card-CclBbiXg.js} +2 -2
- package/dist/_chunks/appointment-peek-5S4O1VQP.js +115 -0
- package/dist/_chunks/appointment-peek.agent-C539tNFM.js +17 -0
- package/dist/_chunks/{appointment-timeline-ByfovxqR.js → appointment-timeline-D-rNwKpS.js} +2 -2
- package/dist/_chunks/{appointment-tray-D6UyJHej.js → appointment-tray-CK2CULg_.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-B0Z8Dwn8.js → balance-badge-cell-DHs5p0bA.js} +2 -2
- package/dist/_chunks/{booking-Dp-9qR6F.js → booking-x3J7sS2G.js} +3 -3
- package/dist/_chunks/building-2-D33bLCWL.js +24 -0
- package/dist/_chunks/calendar-workspace-Cc1LRVWY.js +9900 -0
- package/dist/_chunks/{control-room-rail-Ds45_g4f.js → control-room-rail-DQoHdE1U.js} +2 -2
- package/dist/_chunks/{data-table-BYGK-gUJ.js → data-table-Dy1lyumT.js} +2 -2
- package/dist/_chunks/editable-description-7ptNpJEg.js +142 -0
- package/dist/_chunks/editable-description.agent-Bm_LBV2j.js +21 -0
- package/dist/_chunks/{file-manager-DvkFgj7d.js → file-manager-UlcYQv8n.js} +3 -3
- package/dist/_chunks/{message-tray-BcLyaO-G.js → message-tray-CXjVsKqp.js} +2 -2
- package/dist/_chunks/{money.agent-Dw55UxUA.js → money-BY-HmKhZ.js} +33 -47
- package/dist/_chunks/money.agent-BjJ6gOkx.js +17 -0
- package/dist/_chunks/{note-timeline-CXfSV3yX.js → note-timeline-D2oPuQP6.js} +134 -73
- package/dist/_chunks/notes-panel-CkbfDDzj.js +614 -0
- package/dist/_chunks/{notification-tray-CJ8jOe-U.js → notification-tray-_NoChRKi.js} +2 -2
- package/dist/_chunks/panel-subview-BNXN8OEL.js +160 -0
- package/dist/_chunks/panel-subview.agent-BIBvE-IW.js +17 -0
- package/dist/_chunks/{patient-details-f7SSXkTJ.js → patient-details-2cIaL-Zb.js} +2 -2
- package/dist/_chunks/{patient-field-row-BQZoP4m2.js → patient-field-row-IHb2VFc2.js} +193 -172
- package/dist/_chunks/{patient-summary-card-Bz7KdUin.js → patient-summary-card-B131Q7Bp.js} +3 -3
- package/dist/_chunks/{practice-results-DOcORTkP.js → practice-results-CBNRJNnY.js} +2 -2
- package/dist/_chunks/{product-hub-panel-C0TO69P7.js → product-hub-panel-C3bMjscm.js} +2 -2
- package/dist/_chunks/{reviews-panel-BaHZb_ai.js → reviews-panel-Cy969x7q.js} +2 -2
- package/dist/_chunks/{section-card.agent-W18CHEgX.js → section-card-XR2bW1Ie.js} +20 -34
- package/dist/_chunks/section-card.agent-Bz1BhM_j.js +17 -0
- package/dist/_chunks/{signature-request-Dej2g86d.js → signature-request-b-86AGlT.js} +2 -2
- package/dist/_chunks/{skeleton-CZbwyJAA.js → skeleton-B1KTdJ4N.js} +46 -33
- package/dist/_chunks/{slot-grid-8Ko6thzz.js → slot-grid-Bk3GZL1p.js} +2 -2
- package/dist/_chunks/smartphone-DaPcFw-X.js +32 -0
- package/dist/_chunks/{task-card-BalrLkSz.js → task-card-qTKD1fIT.js} +39 -57
- package/dist/_chunks/{task-tray-wl9eti6J.js → task-tray-5co9Jr2L.js} +3 -3
- package/dist/_chunks/{tasks-panel-BDNB7hsZ.js → tasks-panel-BpH-x7U3.js} +3 -3
- package/dist/_chunks/{tool-rail-Bq5eiFMG.js → tool-rail-BP8sjxCw.js} +310 -231
- package/dist/_chunks/treatment-receipt-dUm99mdn.js +160 -0
- package/dist/_chunks/treatment-receipt.agent-bpFm2RPH.js +21 -0
- package/dist/_chunks/use-presence-transition-cDwWUXV-.js +58 -0
- package/dist/_chunks/{workflow-map-D-LEni11.js → workflow-map-CXdsxvUj.js} +140 -156
- package/dist/agent-catalog.json +65 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/anamnesis-summary-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +1 -1
- package/dist/components/appointment-peek/appointment-peek.agent.d.ts +3 -0
- package/dist/components/appointment-peek/appointment-peek.d.ts +45 -0
- package/dist/components/appointment-peek/index.d.ts +4 -0
- package/dist/components/appointment-peek/index.js +7 -0
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/editable-description/editable-description.agent.d.ts +3 -0
- package/dist/components/editable-description/editable-description.d.ts +26 -0
- package/dist/components/editable-description/index.d.ts +4 -0
- package/dist/components/editable-description/index.js +7 -0
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/money/index.js +2 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/note-timeline/note-timeline.d.ts +8 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +16 -0
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/panel-subview/index.d.ts +4 -0
- package/dist/components/panel-subview/index.js +7 -0
- package/dist/components/panel-subview/panel-subview.agent.d.ts +3 -0
- package/dist/components/panel-subview/panel-subview.d.ts +32 -0
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/section-card/index.js +4 -3
- package/dist/components/skeleton/index.d.ts +1 -1
- package/dist/components/skeleton/index.js +3 -2
- package/dist/components/skeleton/skeleton.d.ts +12 -0
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/treatment-receipt/index.d.ts +4 -0
- package/dist/components/treatment-receipt/index.js +7 -0
- package/dist/components/treatment-receipt/treatment-receipt.agent.d.ts +3 -0
- package/dist/components/treatment-receipt/treatment-receipt.d.ts +38 -0
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +9 -7
- package/dist/hooks/use-presence-transition.d.ts +40 -0
- package/dist/host-compat.css +7 -1
- package/dist/i18n/locales/ar.d.ts +29 -5
- package/dist/i18n/locales/ar.js +29 -5
- package/dist/i18n/locales/de.d.ts +29 -5
- package/dist/i18n/locales/de.js +29 -5
- package/dist/i18n/locales/el.d.ts +29 -5
- package/dist/i18n/locales/el.js +29 -5
- package/dist/i18n/locales/en.d.ts +29 -5
- package/dist/i18n/locales/en.js +29 -5
- package/dist/i18n/locales/es.d.ts +29 -5
- package/dist/i18n/locales/es.js +29 -5
- package/dist/i18n/locales/fr.d.ts +29 -5
- package/dist/i18n/locales/fr.js +29 -5
- package/dist/i18n/locales/hi.d.ts +29 -5
- package/dist/i18n/locales/hi.js +29 -5
- package/dist/i18n/locales/it.d.ts +29 -5
- package/dist/i18n/locales/it.js +29 -5
- package/dist/i18n/locales/ja.d.ts +29 -5
- package/dist/i18n/locales/ja.js +29 -5
- package/dist/i18n/locales/nl.d.ts +29 -5
- package/dist/i18n/locales/nl.js +29 -5
- package/dist/i18n/locales/pl.d.ts +29 -5
- package/dist/i18n/locales/pl.js +29 -5
- package/dist/i18n/locales/pt.d.ts +29 -5
- package/dist/i18n/locales/pt.js +29 -5
- package/dist/i18n/locales/ro.d.ts +29 -5
- package/dist/i18n/locales/ro.js +29 -5
- package/dist/i18n/locales/ru.d.ts +29 -5
- package/dist/i18n/locales/ru.js +29 -5
- package/dist/i18n/locales/sq.d.ts +29 -5
- package/dist/i18n/locales/sq.js +29 -5
- package/dist/i18n/locales/sv.d.ts +29 -5
- package/dist/i18n/locales/sv.js +29 -5
- package/dist/i18n/locales/tr.d.ts +29 -5
- package/dist/i18n/locales/tr.js +29 -5
- package/dist/i18n/locales/zh.d.ts +29 -5
- package/dist/i18n/locales/zh.js +29 -5
- package/dist/index.js +959 -940
- package/dist/locales/ar.json +29 -5
- package/dist/locales/de.json +29 -5
- package/dist/locales/el.json +29 -5
- package/dist/locales/en.json +29 -5
- package/dist/locales/es.json +29 -5
- package/dist/locales/fr.json +29 -5
- package/dist/locales/hi.json +29 -5
- package/dist/locales/it.json +29 -5
- package/dist/locales/ja.json +29 -5
- package/dist/locales/nl.json +29 -5
- package/dist/locales/pl.json +29 -5
- package/dist/locales/pt.json +29 -5
- package/dist/locales/ro.json +29 -5
- package/dist/locales/ru.json +29 -5
- package/dist/locales/sq.json +29 -5
- package/dist/locales/sv.json +29 -5
- package/dist/locales/tr.json +29 -5
- package/dist/locales/zh.json +29 -5
- package/dist/patterns/calendar/calendar-appointment-details.d.ts +16 -7
- package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts +23 -23
- package/dist/patterns/calendar/calendar-editor-hydration.d.ts +0 -2
- package/dist/patterns/calendar/calendar-info-hover.d.ts +18 -0
- package/dist/patterns/calendar/calendar.journey.d.ts +10 -0
- package/dist/patterns/calendar/calendar.sheets.d.ts +2 -2
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +17 -1
- package/dist/_chunks/calendar-workspace-BYwQK7fz.js +0 -9478
- package/dist/_chunks/hourglass-BEAzW1wE.js +0 -26
- package/dist/_chunks/notes-panel-Co8D3uDd.js +0 -469
- package/dist/_chunks/smartphone-C0rFF2if.js +0 -15
|
@@ -1,82 +1,66 @@
|
|
|
1
1
|
import { jsx as t, jsxs as u, Fragment as ve } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as H, useMemo as W, useRef as
|
|
2
|
+
import { forwardRef as H, useMemo as W, useRef as M, useCallback as F, useState as ge, useImperativeHandle as be, useEffect as ke } from "react";
|
|
3
3
|
import { c as j } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as
|
|
4
|
+
import { useTranslation as z } from "react-i18next";
|
|
5
5
|
import { C } from "./card-DPmk26CL.js";
|
|
6
6
|
import { B as ye } from "./badge-BudgzTe_.js";
|
|
7
7
|
import { a as Z } from "./key-value-pair-DczGb4yz.js";
|
|
8
8
|
import { T as xe } from "./timestamp-BV2lC-wV.js";
|
|
9
9
|
import { I as S } from "./icon-button-8xqRnkdG.js";
|
|
10
|
-
import { P as
|
|
11
|
-
import { c as
|
|
10
|
+
import { P as $ } from "./pencil-B1sKKyuT.js";
|
|
11
|
+
import { c as U } from "./createLucideIcon-DhHxpK9K.js";
|
|
12
12
|
import { T as ae } from "./trash-2-uumy3fy1.js";
|
|
13
|
-
import { C as Ne } from "./
|
|
14
|
-
import {
|
|
13
|
+
import { C as Ne, S as ne } from "./smartphone-DaPcFw-X.js";
|
|
14
|
+
import { C as Ce } from "./circle-j7oZoouK.js";
|
|
15
|
+
import { u as _e } from "./registry-DvAUVLHh.js";
|
|
15
16
|
import { A as V } from "./alert-CiQ5Pa3Q.js";
|
|
16
|
-
import { B as
|
|
17
|
+
import { B as Se } from "./button-nJaPh_HC.js";
|
|
17
18
|
import { D as N } from "./dropdown-menu-DU-Hrf33.js";
|
|
18
19
|
import { E } from "./empty-state-X0sVPfVo.js";
|
|
19
|
-
import { P as
|
|
20
|
-
import { G as
|
|
21
|
-
import { U as
|
|
22
|
-
import { M as
|
|
23
|
-
import { S as
|
|
24
|
-
import { S as ue } from "./smartphone-C0rFF2if.js";
|
|
20
|
+
import { P as ie } from "./plus-DzMQ_c6b.js";
|
|
21
|
+
import { G as de } from "./globe-sHBW1JN5.js";
|
|
22
|
+
import { U as le } from "./user-cog-BTn98Arm.js";
|
|
23
|
+
import { M as ce } from "./message-circle-Bepl9JT5.js";
|
|
24
|
+
import { S as ue } from "./square-check-big-dj0o8yA3.js";
|
|
25
25
|
import { M as fe } from "./mail-BqXVF2zH.js";
|
|
26
26
|
import { C as me } from "./clock-Drd4Wtis.js";
|
|
27
|
-
import { C as
|
|
27
|
+
import { C as ze } from "./chevron-up-umRGgtJA.js";
|
|
28
28
|
import { C as Me } from "./chevron-down-DWE7GSq9.js";
|
|
29
|
-
import { C as
|
|
30
|
-
import { C as
|
|
29
|
+
import { C as Ae } from "./clipboard-check-BeAGxDVT.js";
|
|
30
|
+
import { C as Ie } from "./check-DrFSN__t.js";
|
|
31
31
|
/**
|
|
32
32
|
* @license lucide-react v1.22.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
36
|
*/
|
|
37
|
-
const
|
|
38
|
-
["path", { d: "M10.1 2.182a10 10 0 0 1 3.8 0", key: "5ilxe3" }],
|
|
39
|
-
["path", { d: "M13.9 21.818a10 10 0 0 1-3.8 0", key: "11zvb9" }],
|
|
40
|
-
["path", { d: "M17.609 3.721a10 10 0 0 1 2.69 2.7", key: "1iw5b2" }],
|
|
41
|
-
["path", { d: "M2.182 13.9a10 10 0 0 1 0-3.8", key: "c0bmvh" }],
|
|
42
|
-
["path", { d: "M20.279 17.609a10 10 0 0 1-2.7 2.69", key: "1ruxm7" }],
|
|
43
|
-
["path", { d: "M21.818 10.1a10 10 0 0 1 0 3.8", key: "qkgqxc" }],
|
|
44
|
-
["path", { d: "M3.721 6.391a10 10 0 0 1 2.7-2.69", key: "1mcia2" }],
|
|
45
|
-
["path", { d: "M6.391 20.279a10 10 0 0 1-2.69-2.7", key: "1fvljs" }]
|
|
46
|
-
], Te = q("circle-dashed", Ie);
|
|
47
|
-
/**
|
|
48
|
-
* @license lucide-react v1.22.0 - ISC
|
|
49
|
-
*
|
|
50
|
-
* This source code is licensed under the ISC license.
|
|
51
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/
|
|
53
|
-
const Ee = [
|
|
37
|
+
const Te = [
|
|
54
38
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
55
39
|
["line", { x1: "10", x2: "10", y1: "15", y2: "9", key: "c1nkhi" }],
|
|
56
40
|
["line", { x1: "14", x2: "14", y1: "15", y2: "9", key: "h65svq" }]
|
|
57
|
-
],
|
|
41
|
+
], Ee = U("circle-pause", Te);
|
|
58
42
|
/**
|
|
59
43
|
* @license lucide-react v1.22.0 - ISC
|
|
60
44
|
*
|
|
61
45
|
* This source code is licensed under the ISC license.
|
|
62
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
63
47
|
*/
|
|
64
|
-
const
|
|
48
|
+
const je = [
|
|
65
49
|
["path", { d: "M18.36 6.64A9 9 0 0 1 20.77 15", key: "dxknvb" }],
|
|
66
50
|
["path", { d: "M6.16 6.16a9 9 0 1 0 12.68 12.68", key: "1x7qb5" }],
|
|
67
51
|
["path", { d: "M12 2v4", key: "3427ic" }],
|
|
68
52
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
69
|
-
],
|
|
53
|
+
], De = U("power-off", je);
|
|
70
54
|
/**
|
|
71
55
|
* @license lucide-react v1.22.0 - ISC
|
|
72
56
|
*
|
|
73
57
|
* This source code is licensed under the ISC license.
|
|
74
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
75
59
|
*/
|
|
76
|
-
const
|
|
60
|
+
const Le = [
|
|
77
61
|
["path", { d: "M12 2v10", key: "mnfbl" }],
|
|
78
62
|
["path", { d: "M18.4 6.6a9 9 0 1 1-12.77.04", key: "obofu9" }]
|
|
79
|
-
],
|
|
63
|
+
], Ke = U("power", Le), Be = j("ds:relative ds:w-full", {
|
|
80
64
|
variants: {
|
|
81
65
|
density: {
|
|
82
66
|
comfortable: "",
|
|
@@ -87,27 +71,27 @@ const Ke = [
|
|
|
87
71
|
density: "comfortable"
|
|
88
72
|
}
|
|
89
73
|
});
|
|
90
|
-
function
|
|
74
|
+
function Pe(e) {
|
|
91
75
|
switch (e) {
|
|
92
76
|
case "active":
|
|
93
77
|
return {
|
|
94
78
|
badgeVariant: "success",
|
|
95
|
-
icon: /* @__PURE__ */ t(
|
|
79
|
+
icon: /* @__PURE__ */ t(Ce, { className: "ds:fill-current", "aria-hidden": "true" })
|
|
96
80
|
};
|
|
97
81
|
case "paused":
|
|
98
82
|
return {
|
|
99
83
|
badgeVariant: "warning",
|
|
100
|
-
icon: /* @__PURE__ */ t(
|
|
84
|
+
icon: /* @__PURE__ */ t(Ee, { "aria-hidden": "true" })
|
|
101
85
|
};
|
|
102
86
|
case "inactive":
|
|
103
87
|
default:
|
|
104
88
|
return {
|
|
105
89
|
badgeVariant: "neutral",
|
|
106
|
-
icon: /* @__PURE__ */ t(
|
|
90
|
+
icon: /* @__PURE__ */ t(Ne, { "aria-hidden": "true" })
|
|
107
91
|
};
|
|
108
92
|
}
|
|
109
93
|
}
|
|
110
|
-
const
|
|
94
|
+
const Re = H(
|
|
111
95
|
function({
|
|
112
96
|
workflow: r,
|
|
113
97
|
density: s = "comfortable",
|
|
@@ -117,8 +101,8 @@ const We = H(
|
|
|
117
101
|
onToggleActive: a,
|
|
118
102
|
className: p
|
|
119
103
|
}, m) {
|
|
120
|
-
const { t: c } =
|
|
121
|
-
k.stopPropagation(),
|
|
104
|
+
const { t: c } = z(), i = Pe(r.status), l = r.status === "active", v = s === "compact", w = (h) => (k) => {
|
|
105
|
+
k.stopPropagation(), h == null || h();
|
|
122
106
|
}, y = /* @__PURE__ */ t(
|
|
123
107
|
ye,
|
|
124
108
|
{
|
|
@@ -133,7 +117,7 @@ const We = H(
|
|
|
133
117
|
{
|
|
134
118
|
ref: m,
|
|
135
119
|
variant: "default",
|
|
136
|
-
className:
|
|
120
|
+
className: Be({ density: s, className: p }),
|
|
137
121
|
"data-component": "workflow-card",
|
|
138
122
|
"data-component-id": r.id,
|
|
139
123
|
children: [
|
|
@@ -202,23 +186,23 @@ const We = H(
|
|
|
202
186
|
d && /* @__PURE__ */ t(
|
|
203
187
|
S,
|
|
204
188
|
{
|
|
205
|
-
icon: /* @__PURE__ */ t(
|
|
189
|
+
icon: /* @__PURE__ */ t($, {}),
|
|
206
190
|
size: "sm",
|
|
207
191
|
intent: "ghost",
|
|
208
192
|
"aria-label": c("workflow.card.edit"),
|
|
209
|
-
onClick:
|
|
193
|
+
onClick: w(() => d(r.id))
|
|
210
194
|
}
|
|
211
195
|
),
|
|
212
196
|
a && /* @__PURE__ */ t(
|
|
213
197
|
S,
|
|
214
198
|
{
|
|
215
|
-
icon: l ? /* @__PURE__ */ t(
|
|
199
|
+
icon: l ? /* @__PURE__ */ t(De, {}) : /* @__PURE__ */ t(Ke, {}),
|
|
216
200
|
size: "sm",
|
|
217
201
|
intent: "ghost",
|
|
218
202
|
"aria-label": c(
|
|
219
203
|
l ? "workflow.card.deactivate" : "workflow.card.activate"
|
|
220
204
|
),
|
|
221
|
-
onClick:
|
|
205
|
+
onClick: w(() => a(r.id, !l))
|
|
222
206
|
}
|
|
223
207
|
),
|
|
224
208
|
n && /* @__PURE__ */ t(
|
|
@@ -228,7 +212,7 @@ const We = H(
|
|
|
228
212
|
size: "sm",
|
|
229
213
|
intent: "destructive",
|
|
230
214
|
"aria-label": c("workflow.card.delete"),
|
|
231
|
-
onClick:
|
|
215
|
+
onClick: w(() => n(r.id))
|
|
232
216
|
}
|
|
233
217
|
)
|
|
234
218
|
] })
|
|
@@ -238,8 +222,8 @@ const We = H(
|
|
|
238
222
|
);
|
|
239
223
|
}
|
|
240
224
|
);
|
|
241
|
-
|
|
242
|
-
const
|
|
225
|
+
Re.displayName = "WorkflowCard";
|
|
226
|
+
const Wt = {
|
|
243
227
|
id: "workflow-card",
|
|
244
228
|
// Presentational summary card — no agent-facing action or state. Navigation
|
|
245
229
|
// is owned by the host pattern, so no capability is declared here.
|
|
@@ -258,7 +242,7 @@ const Ft = {
|
|
|
258
242
|
description: "Sourced from the id prop."
|
|
259
243
|
}
|
|
260
244
|
}
|
|
261
|
-
},
|
|
245
|
+
}, Ft = {
|
|
262
246
|
id: "workflow-map",
|
|
263
247
|
// Presentational linear visualisation — no agent-facing action or state.
|
|
264
248
|
capabilities: [],
|
|
@@ -280,7 +264,7 @@ const Ft = {
|
|
|
280
264
|
description: "Stable opaque workflow node id emitted on each step."
|
|
281
265
|
}
|
|
282
266
|
}
|
|
283
|
-
},
|
|
267
|
+
}, We = {
|
|
284
268
|
id: "workflow-editor",
|
|
285
269
|
// `goto_step` focuses a node (navigation). No `expand` capability: the
|
|
286
270
|
// WorkflowEditorHandle exposes no expand/collapse method to back it.
|
|
@@ -353,7 +337,7 @@ function G(e) {
|
|
|
353
337
|
p.has(i.id) || m.push(i);
|
|
354
338
|
return m;
|
|
355
339
|
}
|
|
356
|
-
function
|
|
340
|
+
function q(e, r, s) {
|
|
357
341
|
const o = [...e.nodes, s];
|
|
358
342
|
if (r === null) {
|
|
359
343
|
const a = e.nodes[0];
|
|
@@ -397,16 +381,16 @@ function ee(e, r) {
|
|
|
397
381
|
edges: n
|
|
398
382
|
};
|
|
399
383
|
}
|
|
400
|
-
function
|
|
401
|
-
var
|
|
384
|
+
function Fe(e, r, s) {
|
|
385
|
+
var w;
|
|
402
386
|
const o = G(e), d = o.findIndex((y) => y.id === r);
|
|
403
387
|
if (d === -1) return e;
|
|
404
388
|
const n = s === "up" ? d - 1 : d + 1;
|
|
405
389
|
if (n < 0 || n >= o.length) return e;
|
|
406
390
|
const a = o[d], p = o[n];
|
|
407
391
|
if (!a || !p) return e;
|
|
408
|
-
const m = ee(ee(e, a.id), p.id), c = s === "up" ? a : p, i = s === "up" ? p : a, l = ((
|
|
409
|
-
return
|
|
392
|
+
const m = ee(ee(e, a.id), p.id), c = s === "up" ? a : p, i = s === "up" ? p : a, l = ((w = o[Math.min(d, n) - 1]) == null ? void 0 : w.id) ?? null, v = q(m, l, c);
|
|
393
|
+
return q(v, c.id, i);
|
|
410
394
|
}
|
|
411
395
|
const Oe = /* @__PURE__ */ new Set([
|
|
412
396
|
"dateOfBirth",
|
|
@@ -460,27 +444,27 @@ const D = {
|
|
|
460
444
|
labelKey: "workflow.action.webhook",
|
|
461
445
|
iconName: "Globe"
|
|
462
446
|
}
|
|
463
|
-
},
|
|
447
|
+
}, qe = {
|
|
464
448
|
Clock: me,
|
|
465
449
|
Mail: fe,
|
|
466
|
-
Smartphone:
|
|
467
|
-
CheckSquare:
|
|
468
|
-
MessageCircle:
|
|
469
|
-
UserCog:
|
|
470
|
-
Globe:
|
|
450
|
+
Smartphone: ne,
|
|
451
|
+
CheckSquare: ue,
|
|
452
|
+
MessageCircle: ce,
|
|
453
|
+
UserCog: le,
|
|
454
|
+
Globe: de
|
|
471
455
|
};
|
|
472
456
|
function Y({
|
|
473
457
|
iconName: e,
|
|
474
458
|
className: r
|
|
475
459
|
}) {
|
|
476
|
-
const s =
|
|
460
|
+
const s = qe[e];
|
|
477
461
|
return /* @__PURE__ */ t(s, { "aria-hidden": "true", className: r ?? "ds:size-4" });
|
|
478
462
|
}
|
|
479
|
-
const He = 40,
|
|
463
|
+
const He = 40, $e = 60;
|
|
480
464
|
function te(e, r) {
|
|
481
465
|
return e.length <= r ? e : `${e.slice(0, r - 1)}…`;
|
|
482
466
|
}
|
|
483
|
-
function
|
|
467
|
+
function Ue(e, r) {
|
|
484
468
|
switch (e.kind) {
|
|
485
469
|
case "add_delay": {
|
|
486
470
|
const s = e.days ?? 0, o = r("workflow.delay.summary", { count: s });
|
|
@@ -492,7 +476,7 @@ function Ge(e, r) {
|
|
|
492
476
|
}
|
|
493
477
|
case "send_sms": {
|
|
494
478
|
const s = e.body ?? "";
|
|
495
|
-
return { text: te(s,
|
|
479
|
+
return { text: te(s, $e), full: s };
|
|
496
480
|
}
|
|
497
481
|
case "create_task": {
|
|
498
482
|
const s = e.title ?? "";
|
|
@@ -519,7 +503,7 @@ const re = [
|
|
|
519
503
|
"ds:border-inline-start-[var(--border-width-hairline)]",
|
|
520
504
|
"ds:border-solid",
|
|
521
505
|
"ds:border-[color:var(--border)]"
|
|
522
|
-
].join(" "),
|
|
506
|
+
].join(" "), Ge = [
|
|
523
507
|
"ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]",
|
|
524
508
|
"ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
|
|
525
509
|
"ds:rounded-[var(--radius-full)]",
|
|
@@ -534,21 +518,21 @@ const re = [
|
|
|
534
518
|
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
535
519
|
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
536
520
|
"ds:disabled:opacity-50 ds:disabled:cursor-not-allowed"
|
|
537
|
-
].join(" "),
|
|
521
|
+
].join(" "), Ye = [
|
|
538
522
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
539
523
|
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
540
524
|
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
541
525
|
"ds:rounded-[var(--radius-lg)]"
|
|
542
|
-
].join(" "),
|
|
526
|
+
].join(" "), Je = Object.keys(
|
|
543
527
|
D
|
|
544
528
|
);
|
|
545
529
|
let se = 0;
|
|
546
|
-
function
|
|
530
|
+
function Qe() {
|
|
547
531
|
se += 1;
|
|
548
532
|
const e = Math.random().toString(36).slice(2, 8);
|
|
549
533
|
return `wf-node-${Date.now()}-${se}-${e}`;
|
|
550
534
|
}
|
|
551
|
-
function
|
|
535
|
+
function Xe(e) {
|
|
552
536
|
switch (e) {
|
|
553
537
|
case "add_delay":
|
|
554
538
|
return { kind: "add_delay", days: 1 };
|
|
@@ -571,13 +555,13 @@ function Ze(e) {
|
|
|
571
555
|
return { kind: "webhook", url: "", method: "POST" };
|
|
572
556
|
}
|
|
573
557
|
}
|
|
574
|
-
function
|
|
575
|
-
const r =
|
|
558
|
+
function Ze(e = 0) {
|
|
559
|
+
const r = M(e), s = F((o) => {
|
|
576
560
|
r.current = o;
|
|
577
561
|
}, []);
|
|
578
562
|
return [r, s];
|
|
579
563
|
}
|
|
580
|
-
function
|
|
564
|
+
function et({
|
|
581
565
|
node: e,
|
|
582
566
|
position: r,
|
|
583
567
|
total: s,
|
|
@@ -587,7 +571,7 @@ function tt({
|
|
|
587
571
|
onMove: a,
|
|
588
572
|
registerRef: p
|
|
589
573
|
}) {
|
|
590
|
-
const { t: m } =
|
|
574
|
+
const { t: m } = z(), c = D[e.type], i = M(null), [l, v] = Ze(0), w = F(
|
|
591
575
|
(g) => {
|
|
592
576
|
var B, P;
|
|
593
577
|
const _ = (B = i.current) == null ? void 0 : B.querySelectorAll(
|
|
@@ -599,10 +583,10 @@ function tt({
|
|
|
599
583
|
},
|
|
600
584
|
[v]
|
|
601
585
|
), y = (g) => {
|
|
602
|
-
g.target === g.currentTarget && (g.key === "ArrowRight" || g.key === "ArrowDown") && (g.preventDefault(),
|
|
586
|
+
g.target === g.currentTarget && (g.key === "ArrowRight" || g.key === "ArrowDown") && (g.preventDefault(), w(0));
|
|
603
587
|
}, x = (g) => {
|
|
604
|
-
g.key === "ArrowRight" ? (g.preventDefault(),
|
|
605
|
-
},
|
|
588
|
+
g.key === "ArrowRight" ? (g.preventDefault(), w(l.current + 1)) : g.key === "ArrowLeft" ? (g.preventDefault(), w(l.current - 1)) : g.key === "Home" ? (g.preventDefault(), w(0)) : g.key === "End" && (g.preventDefault(), w(Number.POSITIVE_INFINITY));
|
|
589
|
+
}, h = Ue(e.settings, m), k = m(c.labelKey), A = r > 0, I = r < s - 1, L = m("workflow.editor.position", {
|
|
606
590
|
current: r + 1,
|
|
607
591
|
total: s
|
|
608
592
|
}), T = m("workflow.editor.nodeAriaLabel", {
|
|
@@ -620,7 +604,7 @@ function tt({
|
|
|
620
604
|
onKeyDown: y,
|
|
621
605
|
"aria-label": T,
|
|
622
606
|
"data-node-id": e.id,
|
|
623
|
-
className:
|
|
607
|
+
className: Ye,
|
|
624
608
|
children: /* @__PURE__ */ u(C, { variant: "outlined", children: [
|
|
625
609
|
/* @__PURE__ */ t(C.Header, { className: "ds:pb-[var(--spacing-sm)]", children: /* @__PURE__ */ u("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
626
610
|
/* @__PURE__ */ t(
|
|
@@ -646,7 +630,7 @@ function tt({
|
|
|
646
630
|
S,
|
|
647
631
|
{
|
|
648
632
|
"data-wf-control": "edit",
|
|
649
|
-
icon: /* @__PURE__ */ t(
|
|
633
|
+
icon: /* @__PURE__ */ t($, {}),
|
|
650
634
|
size: "sm",
|
|
651
635
|
intent: "ghost",
|
|
652
636
|
disabled: o,
|
|
@@ -659,7 +643,7 @@ function tt({
|
|
|
659
643
|
S,
|
|
660
644
|
{
|
|
661
645
|
"data-wf-control": "up",
|
|
662
|
-
icon: /* @__PURE__ */ t(
|
|
646
|
+
icon: /* @__PURE__ */ t(ze, {}),
|
|
663
647
|
size: "sm",
|
|
664
648
|
intent: "ghost",
|
|
665
649
|
disabled: o || !A,
|
|
@@ -698,12 +682,12 @@ function tt({
|
|
|
698
682
|
}
|
|
699
683
|
)
|
|
700
684
|
] }) }),
|
|
701
|
-
|
|
685
|
+
h ? /* @__PURE__ */ t(C.Body, { className: "ds:pt-0", children: /* @__PURE__ */ t(
|
|
702
686
|
"p",
|
|
703
687
|
{
|
|
704
688
|
className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)] ds:[overflow-wrap:anywhere] ds:break-words",
|
|
705
|
-
title:
|
|
706
|
-
children:
|
|
689
|
+
title: h.full,
|
|
690
|
+
children: h.text
|
|
707
691
|
}
|
|
708
692
|
) }) : null,
|
|
709
693
|
e.settings.kind === "update_patient_field" && Ve(e.settings.fieldId) ? /* @__PURE__ */ t(C.Body, { className: "ds:pt-0", children: /* @__PURE__ */ t(V, { variant: "error", "data-testid": "workflow-editor-invalid-field", children: m("workflow.editor.invalidField") }) }) : null
|
|
@@ -719,7 +703,7 @@ function oe({
|
|
|
719
703
|
label: o,
|
|
720
704
|
compact: d = !0
|
|
721
705
|
}) {
|
|
722
|
-
const { t: n } =
|
|
706
|
+
const { t: n } = z();
|
|
723
707
|
return /* @__PURE__ */ u(N.Root, { children: [
|
|
724
708
|
/* @__PURE__ */ t(N.Trigger, { asChild: !0, children: /* @__PURE__ */ u(
|
|
725
709
|
"button",
|
|
@@ -727,9 +711,9 @@ function oe({
|
|
|
727
711
|
type: "button",
|
|
728
712
|
disabled: s,
|
|
729
713
|
"aria-label": o,
|
|
730
|
-
className:
|
|
714
|
+
className: Ge,
|
|
731
715
|
children: [
|
|
732
|
-
/* @__PURE__ */ t(
|
|
716
|
+
/* @__PURE__ */ t(ie, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
733
717
|
d ? null : /* @__PURE__ */ t("span", { className: "ds:text-[length:var(--font-size-sm)]", children: o })
|
|
734
718
|
]
|
|
735
719
|
}
|
|
@@ -751,8 +735,8 @@ function oe({
|
|
|
751
735
|
] })
|
|
752
736
|
] });
|
|
753
737
|
}
|
|
754
|
-
function
|
|
755
|
-
const { t: o } =
|
|
738
|
+
function tt({ criteria: e, onEdit: r, disabled: s }) {
|
|
739
|
+
const { t: o } = z(), d = (e == null ? void 0 : e.ruleCount) ?? 0, n = d > 0 ? o("workflow.editor.criteriaCount", { count: d }) : o("workflow.editor.noCriteria");
|
|
756
740
|
return /* @__PURE__ */ t(C, { variant: "outlined", children: /* @__PURE__ */ t(C.Header, { className: "ds:pb-[var(--spacing-sm)]", children: /* @__PURE__ */ u("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
757
741
|
/* @__PURE__ */ u("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col", children: [
|
|
758
742
|
/* @__PURE__ */ t("span", { className: "ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-semibold)] ds:text-[color:var(--foreground)]", children: o("workflow.editor.enrollmentCriteria") }),
|
|
@@ -761,7 +745,7 @@ function rt({ criteria: e, onEdit: r, disabled: s }) {
|
|
|
761
745
|
r ? /* @__PURE__ */ t(
|
|
762
746
|
S,
|
|
763
747
|
{
|
|
764
|
-
icon: /* @__PURE__ */ t(
|
|
748
|
+
icon: /* @__PURE__ */ t($, {}),
|
|
765
749
|
size: "sm",
|
|
766
750
|
intent: "ghost",
|
|
767
751
|
disabled: s,
|
|
@@ -771,7 +755,7 @@ function rt({ criteria: e, onEdit: r, disabled: s }) {
|
|
|
771
755
|
) : null
|
|
772
756
|
] }) }) });
|
|
773
757
|
}
|
|
774
|
-
const
|
|
758
|
+
const rt = H(
|
|
775
759
|
function({
|
|
776
760
|
graph: r,
|
|
777
761
|
onChange: s,
|
|
@@ -783,29 +767,29 @@ const st = H(
|
|
|
783
767
|
onDeleteNode: m,
|
|
784
768
|
className: c
|
|
785
769
|
}, i) {
|
|
786
|
-
const { t: l } =
|
|
770
|
+
const { t: l } = z(), v = a ?? Je, w = W(() => G(r), [r]), y = M(/* @__PURE__ */ new Map()), x = M(null), h = F(
|
|
787
771
|
(f) => {
|
|
788
772
|
n || s(f);
|
|
789
773
|
},
|
|
790
774
|
[n, s]
|
|
791
775
|
), k = F((f, b) => {
|
|
792
776
|
b ? y.current.set(f, b) : y.current.delete(f);
|
|
793
|
-
}, []), [A, I] = ge(null), L =
|
|
777
|
+
}, []), [A, I] = ge(null), L = M(null);
|
|
794
778
|
L.current = A;
|
|
795
|
-
const T =
|
|
779
|
+
const T = M(null);
|
|
796
780
|
be(i, () => T.current, []);
|
|
797
781
|
const g = W(
|
|
798
782
|
() => ({
|
|
799
|
-
getTotalSteps: () =>
|
|
783
|
+
getTotalSteps: () => w.length,
|
|
800
784
|
getCurrentStep: () => L.current,
|
|
801
785
|
gotoStep: (f) => {
|
|
802
786
|
const b = y.current.get(f);
|
|
803
787
|
b && (b.focus(), I(f));
|
|
804
788
|
}
|
|
805
789
|
}),
|
|
806
|
-
[
|
|
790
|
+
[w.length]
|
|
807
791
|
);
|
|
808
|
-
|
|
792
|
+
_e(We, g, void 0), ke(() => {
|
|
809
793
|
const f = x.current;
|
|
810
794
|
if (!f) return;
|
|
811
795
|
const b = y.current.get(f);
|
|
@@ -814,20 +798,20 @@ const st = H(
|
|
|
814
798
|
const _ = (f, b) => {
|
|
815
799
|
if (n) return;
|
|
816
800
|
const R = {
|
|
817
|
-
id:
|
|
801
|
+
id: Qe(),
|
|
818
802
|
type: b,
|
|
819
|
-
settings:
|
|
803
|
+
settings: Xe(b)
|
|
820
804
|
};
|
|
821
|
-
x.current = R.id,
|
|
805
|
+
x.current = R.id, h(q(r, f, R));
|
|
822
806
|
}, K = (f, b) => {
|
|
823
|
-
n || (x.current = f,
|
|
807
|
+
n || (x.current = f, h(Fe(r, f, b)));
|
|
824
808
|
}, B = (f) => {
|
|
825
809
|
n || !p || p(f);
|
|
826
810
|
}, P = (f) => {
|
|
827
811
|
n || !m || m(f);
|
|
828
812
|
}, J = () => n ? /* @__PURE__ */ t(V, { variant: "warning", children: /* @__PURE__ */ t(V.Title, { as: "p", children: l("workflow.editor.activeLock") }) }) : null, Q = () => o || d ? /* @__PURE__ */ u(ve, { children: [
|
|
829
813
|
/* @__PURE__ */ t(
|
|
830
|
-
|
|
814
|
+
tt,
|
|
831
815
|
{
|
|
832
816
|
criteria: o,
|
|
833
817
|
onEdit: d,
|
|
@@ -835,7 +819,7 @@ const st = H(
|
|
|
835
819
|
}
|
|
836
820
|
),
|
|
837
821
|
/* @__PURE__ */ t("span", { "aria-hidden": "true", className: O })
|
|
838
|
-
] }) : null, X =
|
|
822
|
+
] }) : null, X = w.length;
|
|
839
823
|
return X === 0 ? /* @__PURE__ */ u(
|
|
840
824
|
"div",
|
|
841
825
|
{
|
|
@@ -898,8 +882,8 @@ const st = H(
|
|
|
898
882
|
/* @__PURE__ */ t(E.Title, { children: l("workflow.editor.addFirstAction") }),
|
|
899
883
|
/* @__PURE__ */ t(E.Description, { children: l("workflow.editor.empty") }),
|
|
900
884
|
/* @__PURE__ */ t(E.Actions, { children: /* @__PURE__ */ u(N.Root, { children: [
|
|
901
|
-
/* @__PURE__ */ t(N.Trigger, { asChild: !0, children: /* @__PURE__ */ u(
|
|
902
|
-
/* @__PURE__ */ t(
|
|
885
|
+
/* @__PURE__ */ t(N.Trigger, { asChild: !0, children: /* @__PURE__ */ u(Se, { intent: "primary", disabled: n, children: [
|
|
886
|
+
/* @__PURE__ */ t(ie, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
903
887
|
/* @__PURE__ */ t("span", { children: l("workflow.editor.addFirstAction") })
|
|
904
888
|
] }) }),
|
|
905
889
|
/* @__PURE__ */ u(N.Content, { align: "center", sideOffset: 6, children: [
|
|
@@ -947,10 +931,10 @@ const st = H(
|
|
|
947
931
|
role: "list",
|
|
948
932
|
"aria-label": l("workflow.editor.pipeline"),
|
|
949
933
|
className: "ds:list-none ds:m-0 ds:p-0 ds:flex ds:flex-col",
|
|
950
|
-
children:
|
|
934
|
+
children: w.map((f, b) => /* @__PURE__ */ u("li", { className: "ds:list-none ds:flex ds:flex-col", children: [
|
|
951
935
|
/* @__PURE__ */ t("span", { "aria-hidden": "true", className: O }),
|
|
952
936
|
/* @__PURE__ */ t(
|
|
953
|
-
|
|
937
|
+
et,
|
|
954
938
|
{
|
|
955
939
|
node: f,
|
|
956
940
|
position: b,
|
|
@@ -980,16 +964,16 @@ const st = H(
|
|
|
980
964
|
);
|
|
981
965
|
}
|
|
982
966
|
);
|
|
983
|
-
|
|
984
|
-
const
|
|
967
|
+
rt.displayName = "WorkflowEditor";
|
|
968
|
+
const st = {
|
|
985
969
|
Clock: me,
|
|
986
970
|
Mail: fe,
|
|
987
|
-
Smartphone:
|
|
988
|
-
CheckSquare:
|
|
989
|
-
MessageCircle:
|
|
990
|
-
UserCog:
|
|
991
|
-
Globe:
|
|
992
|
-
},
|
|
971
|
+
Smartphone: ne,
|
|
972
|
+
CheckSquare: ue,
|
|
973
|
+
MessageCircle: ce,
|
|
974
|
+
UserCog: le,
|
|
975
|
+
Globe: de
|
|
976
|
+
}, ot = j(
|
|
993
977
|
// The map is a list of steps — never a list of meaningful controls.
|
|
994
978
|
// Layout via logical properties only; connectors are sibling spacers
|
|
995
979
|
// styled with border-inline-start / border-block-end (see node/spacer).
|
|
@@ -1017,7 +1001,7 @@ const ot = {
|
|
|
1017
1001
|
horizontal: "ds:flex-row ds:items-center"
|
|
1018
1002
|
}
|
|
1019
1003
|
}
|
|
1020
|
-
}),
|
|
1004
|
+
}), we = j(
|
|
1021
1005
|
[
|
|
1022
1006
|
"ds:relative ds:flex ds:items-center",
|
|
1023
1007
|
"ds:gap-[var(--spacing-sm)]",
|
|
@@ -1063,7 +1047,7 @@ const ot = {
|
|
|
1063
1047
|
}
|
|
1064
1048
|
}
|
|
1065
1049
|
}
|
|
1066
|
-
),
|
|
1050
|
+
), he = j(
|
|
1067
1051
|
["ds:block", "ds:border-solid", "ds:border-[color:var(--border)]"].join(" "),
|
|
1068
1052
|
{
|
|
1069
1053
|
variants: {
|
|
@@ -1112,7 +1096,7 @@ const ot = {
|
|
|
1112
1096
|
]
|
|
1113
1097
|
}
|
|
1114
1098
|
);
|
|
1115
|
-
function
|
|
1099
|
+
function at(e) {
|
|
1116
1100
|
switch (e.kind) {
|
|
1117
1101
|
case "add_delay":
|
|
1118
1102
|
return typeof e.days == "number" && e.days > 0 ? {
|
|
@@ -1141,11 +1125,11 @@ function nt(e) {
|
|
|
1141
1125
|
return;
|
|
1142
1126
|
}
|
|
1143
1127
|
}
|
|
1144
|
-
function
|
|
1128
|
+
function nt(e, r) {
|
|
1145
1129
|
if (e !== void 0)
|
|
1146
1130
|
return typeof e == "string" ? e : r(e.key, e.options);
|
|
1147
1131
|
}
|
|
1148
|
-
const
|
|
1132
|
+
const it = H(
|
|
1149
1133
|
function({
|
|
1150
1134
|
graph: r,
|
|
1151
1135
|
activeNodeId: s,
|
|
@@ -1157,10 +1141,10 @@ const dt = H(
|
|
|
1157
1141
|
"aria-label": m,
|
|
1158
1142
|
...c
|
|
1159
1143
|
}, i) {
|
|
1160
|
-
const { t: l } =
|
|
1161
|
-
() => s ? v.findIndex((
|
|
1144
|
+
const { t: l } = z(), v = W(() => G(r), [r]), w = W(
|
|
1145
|
+
() => s ? v.findIndex((h) => h.id === s) : -1,
|
|
1162
1146
|
[v, s]
|
|
1163
|
-
), y = m ?? l("workflow.map.label", { count: v.length }), x = (
|
|
1147
|
+
), y = m ?? l("workflow.map.label", { count: v.length }), x = (h) => w === -1 ? "neutral" : h === w ? "current" : h < w ? "completed" : "pending";
|
|
1164
1148
|
return (
|
|
1165
1149
|
// eslint-disable-next-line jsx-a11y/no-redundant-roles -- Safari strips the implicit list role on <ol> with list-style:none; this guard puts it back in the accessibility tree
|
|
1166
1150
|
/* @__PURE__ */ u(
|
|
@@ -1171,30 +1155,30 @@ const dt = H(
|
|
|
1171
1155
|
"aria-label": y,
|
|
1172
1156
|
"data-component": "workflow-map",
|
|
1173
1157
|
"data-component-id": c.id,
|
|
1174
|
-
className:
|
|
1158
|
+
className: ot({ orientation: n, compact: a, className: p }),
|
|
1175
1159
|
...c,
|
|
1176
1160
|
children: [
|
|
1177
1161
|
d ? /* @__PURE__ */ t(
|
|
1178
|
-
|
|
1162
|
+
lt,
|
|
1179
1163
|
{
|
|
1180
1164
|
orientation: n,
|
|
1181
1165
|
compact: a,
|
|
1182
1166
|
criteria: d
|
|
1183
1167
|
}
|
|
1184
1168
|
) : null,
|
|
1185
|
-
v.map((
|
|
1169
|
+
v.map((h, k) => {
|
|
1186
1170
|
const A = x(k), I = k === v.length - 1;
|
|
1187
1171
|
return /* @__PURE__ */ t(
|
|
1188
|
-
|
|
1172
|
+
dt,
|
|
1189
1173
|
{
|
|
1190
|
-
node:
|
|
1174
|
+
node: h,
|
|
1191
1175
|
state: A,
|
|
1192
1176
|
orientation: n,
|
|
1193
1177
|
compact: a,
|
|
1194
1178
|
isLast: I,
|
|
1195
1179
|
onNodeClick: o
|
|
1196
1180
|
},
|
|
1197
|
-
|
|
1181
|
+
h.id
|
|
1198
1182
|
);
|
|
1199
1183
|
})
|
|
1200
1184
|
]
|
|
@@ -1203,8 +1187,8 @@ const dt = H(
|
|
|
1203
1187
|
);
|
|
1204
1188
|
}
|
|
1205
1189
|
);
|
|
1206
|
-
|
|
1207
|
-
function
|
|
1190
|
+
it.displayName = "WorkflowMap";
|
|
1191
|
+
function dt({
|
|
1208
1192
|
node: e,
|
|
1209
1193
|
state: r,
|
|
1210
1194
|
orientation: s,
|
|
@@ -1212,11 +1196,11 @@ function lt({
|
|
|
1212
1196
|
isLast: d,
|
|
1213
1197
|
onNodeClick: n
|
|
1214
1198
|
}) {
|
|
1215
|
-
const { t: a } =
|
|
1199
|
+
const { t: a } = z(), p = D[e.type], m = st[p.iconName], c = a(p.labelKey), i = nt(at(e.settings), a), l = typeof n == "function", v = r === "current", w = r === "completed", y = (k) => {
|
|
1216
1200
|
l && (k.preventDefault(), n == null || n(e.id));
|
|
1217
1201
|
}, x = (k) => {
|
|
1218
1202
|
l && (k.key === "Enter" || k.key === " ") && (k.preventDefault(), n == null || n(e.id));
|
|
1219
|
-
},
|
|
1203
|
+
}, h = v ? a("workflow.map.current") : w ? a("workflow.map.completed") : r === "pending" ? a("workflow.map.pending") : null;
|
|
1220
1204
|
return (
|
|
1221
1205
|
// `<li>` has implicit role="listitem"; no explicit role needed.
|
|
1222
1206
|
/* @__PURE__ */ u("li", { "data-node-id": e.id, className: pe({ orientation: s }), children: [
|
|
@@ -1236,7 +1220,7 @@ function lt({
|
|
|
1236
1220
|
}) : void 0,
|
|
1237
1221
|
onClick: l ? y : void 0,
|
|
1238
1222
|
onKeyDown: l ? x : void 0,
|
|
1239
|
-
className:
|
|
1223
|
+
className: we({
|
|
1240
1224
|
orientation: s,
|
|
1241
1225
|
compact: o,
|
|
1242
1226
|
state: r,
|
|
@@ -1250,8 +1234,8 @@ function lt({
|
|
|
1250
1234
|
{
|
|
1251
1235
|
"aria-hidden": "true",
|
|
1252
1236
|
className: "ds:flex ds:items-center ds:justify-center ds:shrink-0 ds:size-[var(--spacing-md)] ds:text-[var(--muted-foreground)]",
|
|
1253
|
-
children:
|
|
1254
|
-
|
|
1237
|
+
children: w ? /* @__PURE__ */ t(
|
|
1238
|
+
Ie,
|
|
1255
1239
|
{
|
|
1256
1240
|
className: "ds:size-[var(--spacing-md)] ds:text-[color:var(--success)]",
|
|
1257
1241
|
"data-testid": "workflow-map-check"
|
|
@@ -1270,7 +1254,7 @@ function lt({
|
|
|
1270
1254
|
}
|
|
1271
1255
|
) : null
|
|
1272
1256
|
] }),
|
|
1273
|
-
|
|
1257
|
+
h ? /* @__PURE__ */ t("span", { className: "ds:sr-only", children: h }) : null
|
|
1274
1258
|
]
|
|
1275
1259
|
}
|
|
1276
1260
|
),
|
|
@@ -1278,24 +1262,24 @@ function lt({
|
|
|
1278
1262
|
"span",
|
|
1279
1263
|
{
|
|
1280
1264
|
"aria-hidden": "true",
|
|
1281
|
-
className:
|
|
1265
|
+
className: he({ orientation: s, compact: o }),
|
|
1282
1266
|
"data-testid": "workflow-map-connector"
|
|
1283
1267
|
}
|
|
1284
1268
|
)
|
|
1285
1269
|
] })
|
|
1286
1270
|
);
|
|
1287
1271
|
}
|
|
1288
|
-
function
|
|
1272
|
+
function lt({
|
|
1289
1273
|
orientation: e,
|
|
1290
1274
|
compact: r,
|
|
1291
1275
|
criteria: s
|
|
1292
1276
|
}) {
|
|
1293
|
-
const { t: o } =
|
|
1277
|
+
const { t: o } = z();
|
|
1294
1278
|
return /* @__PURE__ */ u("li", { className: pe({ orientation: e }), children: [
|
|
1295
1279
|
/* @__PURE__ */ u(
|
|
1296
1280
|
"div",
|
|
1297
1281
|
{
|
|
1298
|
-
className:
|
|
1282
|
+
className: we({
|
|
1299
1283
|
orientation: e,
|
|
1300
1284
|
compact: r,
|
|
1301
1285
|
state: "neutral",
|
|
@@ -1308,7 +1292,7 @@ function ct({
|
|
|
1308
1292
|
{
|
|
1309
1293
|
"aria-hidden": "true",
|
|
1310
1294
|
className: "ds:flex ds:items-center ds:justify-center ds:shrink-0 ds:size-[var(--spacing-md)] ds:text-[var(--muted-foreground)]",
|
|
1311
|
-
children: /* @__PURE__ */ t(
|
|
1295
|
+
children: /* @__PURE__ */ t(Ae, { className: "ds:size-[var(--spacing-md)]" })
|
|
1312
1296
|
}
|
|
1313
1297
|
),
|
|
1314
1298
|
/* @__PURE__ */ u("span", { className: "ds:flex ds:flex-col ds:min-w-0 ds:flex-1", children: [
|
|
@@ -1324,24 +1308,24 @@ function ct({
|
|
|
1324
1308
|
"span",
|
|
1325
1309
|
{
|
|
1326
1310
|
"aria-hidden": "true",
|
|
1327
|
-
className:
|
|
1311
|
+
className: he({ orientation: e, compact: r })
|
|
1328
1312
|
}
|
|
1329
1313
|
)
|
|
1330
1314
|
] });
|
|
1331
1315
|
}
|
|
1332
1316
|
export {
|
|
1333
1317
|
Oe as C,
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1318
|
+
Re as W,
|
|
1319
|
+
rt as a,
|
|
1320
|
+
it as b,
|
|
1321
|
+
q as c,
|
|
1322
|
+
Wt as d,
|
|
1323
|
+
We as e,
|
|
1324
|
+
Ft as f,
|
|
1341
1325
|
Ve as i,
|
|
1342
1326
|
G as l,
|
|
1343
|
-
|
|
1327
|
+
Fe as m,
|
|
1344
1328
|
ee as r,
|
|
1345
1329
|
D as w
|
|
1346
1330
|
};
|
|
1347
|
-
//# sourceMappingURL=workflow-map-
|
|
1331
|
+
//# sourceMappingURL=workflow-map-CXdsxvUj.js.map
|