@notmrabhi/flowforge 0.1.37 → 0.1.39
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/GatewayBranchEdge-CYoEUE5g.js +2 -0
- package/dist/GatewayBranchEdge-CYoEUE5g.js.map +1 -0
- package/dist/{GatewayBranchEdge-Diid9GtB.js → GatewayBranchEdge-DffZFc99.js} +473 -407
- package/dist/GatewayBranchEdge-DffZFc99.js.map +1 -0
- package/dist/canvas.cjs +1 -1
- package/dist/canvas.d.ts +46 -1
- package/dist/canvas.js +22 -21
- package/dist/defaultUi.cjs +1 -1
- package/dist/defaultUi.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +46 -1
- package/dist/index.js +33 -32
- package/dist/{templateSkeletons-BB6jQ9r5.js → templateSkeletons-CEqw1Djn.js} +1168 -987
- package/dist/templateSkeletons-CEqw1Djn.js.map +1 -0
- package/dist/templateSkeletons-Sd2FDF9w.js +2 -0
- package/dist/templateSkeletons-Sd2FDF9w.js.map +1 -0
- package/package.json +1 -1
- package/dist/GatewayBranchEdge-DNSPjIZw.js +0 -2
- package/dist/GatewayBranchEdge-DNSPjIZw.js.map +0 -1
- package/dist/GatewayBranchEdge-Diid9GtB.js.map +0 -1
- package/dist/templateSkeletons-BB6jQ9r5.js.map +0 -1
- package/dist/templateSkeletons-BkdRPbV0.js +0 -2
- package/dist/templateSkeletons-BkdRPbV0.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as n, jsx as e, Fragment as
|
|
2
|
-
import { Handle as b, Position as x, getStraightPath as
|
|
3
|
-
import { Tooltip as
|
|
4
|
-
import { GrTrigger as
|
|
5
|
-
import { createContext as
|
|
6
|
-
import { d as
|
|
7
|
-
import { MdOutlineModeEdit as
|
|
8
|
-
import { FaCheckCircle as
|
|
9
|
-
import { FiFilter as
|
|
10
|
-
import { a as
|
|
11
|
-
const
|
|
1
|
+
import { jsxs as n, jsx as e, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import { Handle as b, Position as x, getStraightPath as U, BaseEdge as H } from "reactflow";
|
|
3
|
+
import { Tooltip as W, Chip as V } from "@mui/material";
|
|
4
|
+
import { GrTrigger as pe } from "react-icons/gr";
|
|
5
|
+
import { createContext as ge, useContext as he } from "react";
|
|
6
|
+
import { d as ye } from "./messages-CO299wPN.js";
|
|
7
|
+
import { MdOutlineModeEdit as A, MdInfoOutline as B, MdInput as re, MdDeleteOutline as R, MdCheckCircle as ue, MdPeople as me, MdSchedule as be, MdWebhook as se, MdNotifications as O, MdSms as xe, MdEmail as Ne, MdContentCopy as ke, MdHttp as ve, MdCallSplit as we, MdAccountTree as Se, MdOpenInNew as Ee } from "react-icons/md";
|
|
8
|
+
import { FaCheckCircle as fe, FaTimesCircle as ce } from "react-icons/fa";
|
|
9
|
+
import { FiFilter as Ce } from "react-icons/fi";
|
|
10
|
+
import { a as j, H as Te, B as G } from "./canvasTokens-CAD6G24b.js";
|
|
11
|
+
const ze = ge({
|
|
12
12
|
onEditNode: () => {
|
|
13
13
|
},
|
|
14
14
|
onDeleteNode: () => {
|
|
@@ -17,47 +17,47 @@ const Ce = ae({
|
|
|
17
17
|
},
|
|
18
18
|
onClickAddTrigger: () => {
|
|
19
19
|
},
|
|
20
|
-
messages:
|
|
20
|
+
messages: ye,
|
|
21
21
|
nodeRegistry: null,
|
|
22
22
|
nodeBody: "full"
|
|
23
|
-
}),
|
|
23
|
+
}), z = () => he(ze), Ie = () => /* @__PURE__ */ n("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
|
|
24
24
|
/* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0, left: "50%" } }),
|
|
25
25
|
/* @__PURE__ */ e("div", { style: { padding: "8px 28px", borderRadius: 999, background: "#f5f5f5", border: "1.5px solid #bdbdbd", fontSize: 13, fontWeight: 500, color: "#424242", userSelect: "none" }, children: "Start" })
|
|
26
|
-
] }),
|
|
26
|
+
] }), Pe = () => /* @__PURE__ */ n("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
|
|
27
27
|
/* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0, left: "50%" } }),
|
|
28
28
|
/* @__PURE__ */ e("div", { style: { padding: "8px 28px", borderRadius: 999, background: "#f5f5f5", border: "1.5px solid #bdbdbd", fontSize: 13, fontWeight: 500, color: "#424242", userSelect: "none" }, children: "End" })
|
|
29
|
-
] }),
|
|
30
|
-
const { onClickAddTrigger: t, messages:
|
|
29
|
+
] }), Ae = () => {
|
|
30
|
+
const { onClickAddTrigger: t, messages: l } = z();
|
|
31
31
|
return /* @__PURE__ */ n("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
|
|
32
32
|
/* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0, left: "50%" } }),
|
|
33
|
-
/* @__PURE__ */ e(
|
|
33
|
+
/* @__PURE__ */ e(W, { title: l.addTriggerTooltip, placement: "top", arrow: !0, children: /* @__PURE__ */ n(
|
|
34
34
|
"div",
|
|
35
35
|
{
|
|
36
36
|
onClick: t,
|
|
37
37
|
role: "button",
|
|
38
38
|
tabIndex: 0,
|
|
39
|
-
onKeyDown: (
|
|
40
|
-
|
|
39
|
+
onKeyDown: (c) => {
|
|
40
|
+
c.key === "Enter" && t();
|
|
41
41
|
},
|
|
42
42
|
style: { padding: "10px 24px", borderRadius: 8, border: "1.5px dashed #d0d0d0", background: "#fff", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center", gap: 8 },
|
|
43
43
|
children: [
|
|
44
|
-
/* @__PURE__ */ e(
|
|
45
|
-
/* @__PURE__ */ e("span", { className: "ff-text-black", style: { fontSize: 13 }, "data-testid": "add-trigger-btn-text", children:
|
|
44
|
+
/* @__PURE__ */ e(pe, { size: 16 }),
|
|
45
|
+
/* @__PURE__ */ e("span", { className: "ff-text-black", style: { fontSize: 13 }, "data-testid": "add-trigger-btn-text", children: l.addTriggerButton })
|
|
46
46
|
]
|
|
47
47
|
}
|
|
48
48
|
) }),
|
|
49
49
|
/* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0, left: "50%" } })
|
|
50
50
|
] });
|
|
51
|
-
},
|
|
52
|
-
const { onAddStep:
|
|
51
|
+
}, De = ({ id: t }) => {
|
|
52
|
+
const { onAddStep: l } = z();
|
|
53
53
|
return /* @__PURE__ */ n(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
|
-
onClick: () =>
|
|
56
|
+
onClick: () => l(t),
|
|
57
57
|
role: "button",
|
|
58
58
|
tabIndex: 0,
|
|
59
|
-
onKeyDown: (
|
|
60
|
-
|
|
59
|
+
onKeyDown: (c) => {
|
|
60
|
+
c.key === "Enter" && l(t);
|
|
61
61
|
},
|
|
62
62
|
style: { width: 28, height: 28, borderRadius: "50%", border: "1.5px solid #9e9e9e", background: "#fff", display: "flex", alignItems: "center", justifyContent: "center", cursor: "pointer", fontSize: 18, color: "#757575", lineHeight: 1, userSelect: "none" },
|
|
63
63
|
children: [
|
|
@@ -68,84 +68,84 @@ const Ce = ae({
|
|
|
68
68
|
}
|
|
69
69
|
);
|
|
70
70
|
};
|
|
71
|
-
function
|
|
72
|
-
return t ? t.replace(/[_-]+/g, " ").toLowerCase().replace(/\b\w/g, (
|
|
71
|
+
function de(t) {
|
|
72
|
+
return t ? t.replace(/[_-]+/g, " ").toLowerCase().replace(/\b\w/g, (l) => l.toUpperCase()) : "";
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function Le(t) {
|
|
75
75
|
if (typeof t != "string" && t.label) return t.label;
|
|
76
|
-
const
|
|
77
|
-
return
|
|
76
|
+
const l = typeof t == "string" ? t : t.value ?? "";
|
|
77
|
+
return de(l);
|
|
78
78
|
}
|
|
79
|
-
const
|
|
80
|
-
const { onClickAddTrigger:
|
|
81
|
-
type:
|
|
79
|
+
const Re = ({ data: t }) => {
|
|
80
|
+
const { onClickAddTrigger: l } = z(), {
|
|
81
|
+
type: c,
|
|
82
82
|
eventType: a,
|
|
83
83
|
sources: s,
|
|
84
|
-
label:
|
|
85
|
-
source:
|
|
84
|
+
label: r,
|
|
85
|
+
source: h,
|
|
86
86
|
previewWorkflow: o,
|
|
87
87
|
executionStatus: i,
|
|
88
88
|
infoText: d = "This node decides the flow trigger type and configuration."
|
|
89
|
-
} = t ?? {},
|
|
90
|
-
m == null || m.stopPropagation(),
|
|
91
|
-
},
|
|
92
|
-
if (
|
|
89
|
+
} = t ?? {}, u = (m) => {
|
|
90
|
+
m == null || m.stopPropagation(), l();
|
|
91
|
+
}, y = Array.isArray(s) && s.length > 0, N = !!(r || h), p = c === "scheduler" ? "Scheduler Trigger" : c === "event" || y || N ? "Event Trigger Source" : "Select Trigger", f = (() => {
|
|
92
|
+
if (c === "scheduler")
|
|
93
93
|
return /* @__PURE__ */ e("span", { children: "Scheduler to be configured" });
|
|
94
|
-
if (
|
|
95
|
-
const m =
|
|
94
|
+
if (c === "event" || y) {
|
|
95
|
+
const m = r || de(a);
|
|
96
96
|
return /* @__PURE__ */ n("div", { children: [
|
|
97
97
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
|
|
98
98
|
/* @__PURE__ */ e("span", { style: { fontWeight: 600 }, children: m }),
|
|
99
99
|
/* @__PURE__ */ e("span", { className: "ff-ms-2 ff-text-muted", style: { fontSize: 12 }, children: "via" })
|
|
100
100
|
] }),
|
|
101
|
-
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-2", style: { gap: 4 }, children:
|
|
102
|
-
|
|
101
|
+
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-2", style: { gap: 4 }, children: y ? s.map((S, v) => /* @__PURE__ */ e(
|
|
102
|
+
V,
|
|
103
103
|
{
|
|
104
|
-
label:
|
|
104
|
+
label: Le(S),
|
|
105
105
|
variant: "outlined",
|
|
106
106
|
size: "small",
|
|
107
107
|
className: "ff-text-dark"
|
|
108
108
|
},
|
|
109
|
-
|
|
109
|
+
v
|
|
110
110
|
)) : /* @__PURE__ */ e("span", { className: "ff-text-muted", style: { fontSize: 12 }, children: "No source selected" }) })
|
|
111
111
|
] });
|
|
112
112
|
}
|
|
113
113
|
return N ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-wrap ff-align-items-center", style: { gap: 6 }, children: [
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
r && /* @__PURE__ */ e("span", { style: { fontWeight: 600 }, children: r }),
|
|
115
|
+
h && /* @__PURE__ */ e(V, { label: h, variant: "outlined", size: "small" })
|
|
116
116
|
] }) : /* @__PURE__ */ e(
|
|
117
117
|
"span",
|
|
118
118
|
{
|
|
119
119
|
role: "button",
|
|
120
120
|
tabIndex: 0,
|
|
121
|
-
onClick:
|
|
121
|
+
onClick: u,
|
|
122
122
|
onKeyDown: (m) => {
|
|
123
|
-
(m.key === "Enter" || m.key === " ") &&
|
|
123
|
+
(m.key === "Enter" || m.key === " ") && u(m);
|
|
124
124
|
},
|
|
125
125
|
style: { cursor: "pointer", color: "#1e88e5" },
|
|
126
126
|
children: "Click to select a trigger to start your workflow"
|
|
127
127
|
}
|
|
128
128
|
);
|
|
129
|
-
})(),
|
|
130
|
-
i.status === "success" && /* @__PURE__ */ e(
|
|
131
|
-
i.status === "failed" && /* @__PURE__ */ e(
|
|
129
|
+
})(), w = i ? /* @__PURE__ */ n($, { children: [
|
|
130
|
+
i.status === "success" && /* @__PURE__ */ e(fe, { size: 16, color: "#1DBF60", style: { marginRight: 8 } }),
|
|
131
|
+
i.status === "failed" && /* @__PURE__ */ e(ce, { size: 16, color: "#f44336", style: { marginRight: 8 } })
|
|
132
132
|
] }) : /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
|
|
133
133
|
!o && /* @__PURE__ */ e(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
136
136
|
role: "button",
|
|
137
137
|
tabIndex: 0,
|
|
138
|
-
onClick:
|
|
138
|
+
onClick: u,
|
|
139
139
|
onKeyDown: (m) => {
|
|
140
|
-
(m.key === "Enter" || m.key === " ") &&
|
|
140
|
+
(m.key === "Enter" || m.key === " ") && u(m);
|
|
141
141
|
},
|
|
142
142
|
className: "ff-me-2",
|
|
143
143
|
style: { cursor: "pointer", color: "#212121" },
|
|
144
144
|
"aria-label": "Edit trigger",
|
|
145
|
-
children: /* @__PURE__ */ e(
|
|
145
|
+
children: /* @__PURE__ */ e(A, { size: 16 })
|
|
146
146
|
}
|
|
147
147
|
),
|
|
148
|
-
/* @__PURE__ */ e(
|
|
148
|
+
/* @__PURE__ */ e(W, { title: /* @__PURE__ */ e("div", { children: d }), placement: "right", arrow: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
|
|
149
149
|
] });
|
|
150
150
|
return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
|
|
151
151
|
/* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
|
|
@@ -165,12 +165,12 @@ const De = ({ data: t }) => {
|
|
|
165
165
|
justifyContent: "center",
|
|
166
166
|
flexShrink: 0
|
|
167
167
|
},
|
|
168
|
-
children: /* @__PURE__ */ e(
|
|
168
|
+
children: /* @__PURE__ */ e(re, { size: 16, color: "#388e3c" })
|
|
169
169
|
}
|
|
170
170
|
),
|
|
171
171
|
/* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: p })
|
|
172
172
|
] }),
|
|
173
|
-
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center", children:
|
|
173
|
+
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center", children: w })
|
|
174
174
|
] }),
|
|
175
175
|
/* @__PURE__ */ e(
|
|
176
176
|
"div",
|
|
@@ -184,29 +184,29 @@ const De = ({ data: t }) => {
|
|
|
184
184
|
borderRadius: 6,
|
|
185
185
|
textAlign: "left"
|
|
186
186
|
},
|
|
187
|
-
children:
|
|
187
|
+
children: f
|
|
188
188
|
}
|
|
189
189
|
)
|
|
190
190
|
] }),
|
|
191
191
|
/* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 }, id: "1" })
|
|
192
192
|
] });
|
|
193
193
|
};
|
|
194
|
-
function
|
|
195
|
-
return t ? t === "END_USER_CREATION" ? "New User Registration" : t === "END_USER_UPDATION" ? "On User Update" : t.replace(/[_-]+/g, " ").replace(/\b\w/g, (
|
|
194
|
+
function We(t) {
|
|
195
|
+
return t ? t === "END_USER_CREATION" ? "New User Registration" : t === "END_USER_UPDATION" ? "On User Update" : t.replace(/[_-]+/g, " ").replace(/\b\w/g, (l) => l.toUpperCase()) : "";
|
|
196
196
|
}
|
|
197
|
-
function
|
|
198
|
-
const
|
|
199
|
-
return
|
|
197
|
+
function Fe(t) {
|
|
198
|
+
const l = typeof t == "string" ? t : t.value ?? "";
|
|
199
|
+
return l === "SIGNUP_FLOW" ? "User Self-Registration" : l === "ADMIN_CREATION_FLOW" ? "Create User via Admin Portal" : l === "SHEDULAR" || l === "SCHEDULER" ? "Scheduler" : typeof t != "string" && t.label ? t.label : l.replace(/[_-]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const $e = ({ data: t }) => {
|
|
202
202
|
const {
|
|
203
|
-
header:
|
|
204
|
-
title:
|
|
203
|
+
header: l = "Event",
|
|
204
|
+
title: c,
|
|
205
205
|
eventType: a,
|
|
206
206
|
sources: s,
|
|
207
|
-
executionStatus:
|
|
208
|
-
infoText:
|
|
209
|
-
} = t ?? {}, o =
|
|
207
|
+
executionStatus: r,
|
|
208
|
+
infoText: h = "This event is raised by the system. It cannot be configured."
|
|
209
|
+
} = t ?? {}, o = c ?? We(a) ?? "—";
|
|
210
210
|
return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
|
|
211
211
|
/* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
|
|
212
212
|
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #a5d6a7", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
|
|
@@ -225,15 +225,15 @@ const We = ({ data: t }) => {
|
|
|
225
225
|
justifyContent: "center",
|
|
226
226
|
flexShrink: 0
|
|
227
227
|
},
|
|
228
|
-
children: /* @__PURE__ */ e(
|
|
228
|
+
children: /* @__PURE__ */ e(re, { size: 16, color: "#388e3c" })
|
|
229
229
|
}
|
|
230
230
|
),
|
|
231
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children:
|
|
231
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: l })
|
|
232
232
|
] }),
|
|
233
233
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
|
|
234
|
-
(
|
|
235
|
-
(
|
|
236
|
-
!
|
|
234
|
+
(r == null ? void 0 : r.status) === "success" && /* @__PURE__ */ e(fe, { size: 16, color: "#1DBF60", style: { marginRight: 8 } }),
|
|
235
|
+
(r == null ? void 0 : r.status) === "failed" && /* @__PURE__ */ e(ce, { size: 16, color: "#f44336", style: { marginRight: 8 } }),
|
|
236
|
+
!r && /* @__PURE__ */ e(W, { title: /* @__PURE__ */ e("div", { children: h }), placement: "right", arrow: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
|
|
237
237
|
] })
|
|
238
238
|
] }),
|
|
239
239
|
/* @__PURE__ */ n(
|
|
@@ -250,12 +250,12 @@ const We = ({ data: t }) => {
|
|
|
250
250
|
},
|
|
251
251
|
children: [
|
|
252
252
|
/* @__PURE__ */ e("div", { style: { fontWeight: 600 }, children: o }),
|
|
253
|
-
Array.isArray(s) && s.length > 0 && /* @__PURE__ */ n(
|
|
253
|
+
Array.isArray(s) && s.length > 0 && /* @__PURE__ */ n($, { children: [
|
|
254
254
|
/* @__PURE__ */ e("div", { className: "ff-text-muted", style: { fontSize: 12, marginTop: 4 }, children: "via" }),
|
|
255
255
|
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-1", style: { gap: 4 }, children: s.map((i, d) => /* @__PURE__ */ e(
|
|
256
|
-
|
|
256
|
+
V,
|
|
257
257
|
{
|
|
258
|
-
label:
|
|
258
|
+
label: Fe(i),
|
|
259
259
|
variant: "outlined",
|
|
260
260
|
size: "small",
|
|
261
261
|
className: "ff-text-dark"
|
|
@@ -269,38 +269,38 @@ const We = ({ data: t }) => {
|
|
|
269
269
|
] }),
|
|
270
270
|
/* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 }, id: "1" })
|
|
271
271
|
] });
|
|
272
|
-
},
|
|
273
|
-
const
|
|
274
|
-
|
|
272
|
+
}, ae = ({ rail: t, cardWidth: l }) => {
|
|
273
|
+
const c = l / 2;
|
|
274
|
+
l / 2 + t.indent;
|
|
275
275
|
const a = "var(--ff-edge-color, #b0bec5)";
|
|
276
276
|
return /* @__PURE__ */ n(
|
|
277
277
|
"svg",
|
|
278
278
|
{
|
|
279
|
-
width:
|
|
279
|
+
width: l + t.indent + 200,
|
|
280
280
|
height: t.height,
|
|
281
281
|
style: { position: "absolute", left: 0, top: "100%", pointerEvents: "none", overflow: "visible" },
|
|
282
282
|
children: [
|
|
283
|
-
/* @__PURE__ */ e("line", { x1:
|
|
284
|
-
t.branches.map((s,
|
|
285
|
-
const
|
|
286
|
-
return /* @__PURE__ */ n("g", { transform: `translate(0, ${
|
|
283
|
+
/* @__PURE__ */ e("line", { x1: c, y1: 0, x2: c, y2: t.height, stroke: a, strokeWidth: 1.5 }),
|
|
284
|
+
t.branches.map((s, r) => {
|
|
285
|
+
const h = s.y;
|
|
286
|
+
return /* @__PURE__ */ n("g", { transform: `translate(0, ${h})`, children: [
|
|
287
287
|
/* @__PURE__ */ e(
|
|
288
288
|
"rect",
|
|
289
289
|
{
|
|
290
|
-
x:
|
|
290
|
+
x: c - 5,
|
|
291
291
|
y: -5,
|
|
292
292
|
width: 10,
|
|
293
293
|
height: 10,
|
|
294
294
|
fill: "#fff",
|
|
295
295
|
stroke: a,
|
|
296
296
|
strokeWidth: 1.5,
|
|
297
|
-
transform: `rotate(45, ${
|
|
297
|
+
transform: `rotate(45, ${c}, 0)`
|
|
298
298
|
}
|
|
299
299
|
),
|
|
300
300
|
/* @__PURE__ */ e(
|
|
301
301
|
"text",
|
|
302
302
|
{
|
|
303
|
-
x:
|
|
303
|
+
x: c + 14,
|
|
304
304
|
y: 4,
|
|
305
305
|
fontSize: 12,
|
|
306
306
|
fontWeight: 500,
|
|
@@ -309,19 +309,19 @@ const We = ({ data: t }) => {
|
|
|
309
309
|
children: s.label
|
|
310
310
|
}
|
|
311
311
|
)
|
|
312
|
-
] },
|
|
312
|
+
] }, r);
|
|
313
313
|
})
|
|
314
314
|
]
|
|
315
315
|
}
|
|
316
316
|
);
|
|
317
|
-
},
|
|
318
|
-
const { onEditNode:
|
|
317
|
+
}, Be = ({ id: t, data: l }) => {
|
|
318
|
+
const { onEditNode: c, onDeleteNode: a } = z(), { conditions: s = [], infoText: r = "Filter conditions applied to workflow data", _branchRail: h } = l;
|
|
319
319
|
return /* @__PURE__ */ n("div", { style: { width: 350, position: "relative" }, children: [
|
|
320
320
|
/* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
|
|
321
321
|
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #ffe082", borderRadius: 8, background: "#fff" }, children: [
|
|
322
322
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
|
|
323
323
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
|
|
324
|
-
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(255,160,0,0.1)" }, children: /* @__PURE__ */ e(
|
|
324
|
+
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(255,160,0,0.1)" }, children: /* @__PURE__ */ e(Ce, { className: "ff-text-warning", size: 16 }) }),
|
|
325
325
|
/* @__PURE__ */ e("span", { className: "ff-ms-2 ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "Filter" })
|
|
326
326
|
] }),
|
|
327
327
|
/* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
|
|
@@ -331,12 +331,12 @@ const We = ({ data: t }) => {
|
|
|
331
331
|
role: "button",
|
|
332
332
|
tabIndex: 0,
|
|
333
333
|
onClick: (o) => {
|
|
334
|
-
o.stopPropagation(),
|
|
334
|
+
o.stopPropagation(), c(t);
|
|
335
335
|
},
|
|
336
336
|
onKeyDown: (o) => {
|
|
337
|
-
o.key === "Enter" && (o.stopPropagation(),
|
|
337
|
+
o.key === "Enter" && (o.stopPropagation(), c(t));
|
|
338
338
|
},
|
|
339
|
-
children: /* @__PURE__ */ e(
|
|
339
|
+
children: /* @__PURE__ */ e(A, { size: 16 })
|
|
340
340
|
}
|
|
341
341
|
),
|
|
342
342
|
/* @__PURE__ */ e(
|
|
@@ -351,10 +351,10 @@ const We = ({ data: t }) => {
|
|
|
351
351
|
onKeyDown: (o) => {
|
|
352
352
|
o.key === "Enter" && (o.stopPropagation(), a(t));
|
|
353
353
|
},
|
|
354
|
-
children: /* @__PURE__ */ e(
|
|
354
|
+
children: /* @__PURE__ */ e(R, { color: "red", size: 16 })
|
|
355
355
|
}
|
|
356
356
|
),
|
|
357
|
-
/* @__PURE__ */ e(
|
|
357
|
+
/* @__PURE__ */ e(W, { title: r, placement: "right", arrow: !0, children: /* @__PURE__ */ e("div", { className: "ff-ms-2", children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
|
|
358
358
|
] })
|
|
359
359
|
] }),
|
|
360
360
|
/* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: s.length === 0 ? /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "No conditions configured" }) : s.map((o, i) => /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-mb-1", children: [
|
|
@@ -365,17 +365,44 @@ const We = ({ data: t }) => {
|
|
|
365
365
|
] }, i)) })
|
|
366
366
|
] }),
|
|
367
367
|
/* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } }),
|
|
368
|
-
|
|
368
|
+
h && /* @__PURE__ */ e(ae, { rail: h, cardWidth: 350 })
|
|
369
369
|
] });
|
|
370
|
-
},
|
|
371
|
-
const { onEditNode:
|
|
370
|
+
}, je = ({ id: t, data: l }) => {
|
|
371
|
+
const { onEditNode: c, onDeleteNode: a, nodeRegistry: s, nodeBody: r = "full" } = z(), { title: h = "Task", descriptorType: o, groupBlocks: i, groups: d, roles: u, groupId: y, roleId: N, infoText: p = "" } = l, f = o ? s == null ? void 0 : s.forType(o) : void 0, w = f == null ? void 0 : f.icon, m = (g) => g == null ? "" : typeof g == "string" ? g : typeof g == "object" && "label" in g ? String(g.label) : String(g), S = (g) => Array.isArray(g) ? g.map(m).filter(Boolean) : g != null && g !== "" ? [m(g)] : [], v = /* @__PURE__ */ new Set([
|
|
372
|
+
"descriptorType",
|
|
373
|
+
"title",
|
|
374
|
+
"header",
|
|
375
|
+
"icon",
|
|
376
|
+
"infoText",
|
|
377
|
+
"label"
|
|
378
|
+
]), D = f == null ? void 0 : f.formSchema, C = (g) => {
|
|
379
|
+
if (Array.isArray(D)) {
|
|
380
|
+
const k = D.find((L) => (L == null ? void 0 : L.id) === g || (L == null ? void 0 : L.name) === g);
|
|
381
|
+
if (k != null && k.label) return k.label;
|
|
382
|
+
}
|
|
383
|
+
return g.replace(/[_-]+/g, " ").replace(/\b\w/g, (k) => k.toUpperCase());
|
|
384
|
+
}, P = (g) => {
|
|
385
|
+
if (Array.isArray(g)) {
|
|
386
|
+
const k = g.map(
|
|
387
|
+
(F) => typeof F == "object" && F ? F.label ?? F.name ?? F.value ?? "" : String(F)
|
|
388
|
+
).filter(Boolean), L = k.slice(0, 3).join(", ");
|
|
389
|
+
return k.length > 3 ? `${L} +${k.length - 3}` : L;
|
|
390
|
+
}
|
|
391
|
+
if (g && typeof g == "object") {
|
|
392
|
+
const k = g;
|
|
393
|
+
return k.label ?? k.name ?? k.value ?? JSON.stringify(g);
|
|
394
|
+
}
|
|
395
|
+
return String(g);
|
|
396
|
+
}, I = Object.entries(l || {}).filter(
|
|
397
|
+
([g, k]) => !v.has(g) && k !== "" && k !== null && k !== void 0 && !(Array.isArray(k) && k.length === 0)
|
|
398
|
+
), T = (i == null ? void 0 : i.flatMap((g) => g.groups ?? [])) ?? [...S(d), ...S(u), ...S(y), ...S(N)], E = T.length > 0;
|
|
372
399
|
return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
|
|
373
400
|
/* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
|
|
374
401
|
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
|
|
375
402
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
|
|
376
403
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
377
|
-
|
|
378
|
-
/* @__PURE__ */ e("span", { className: "ff-text-dark", style: { fontSize: 14, fontWeight: 500 }, children:
|
|
404
|
+
w && /* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center" }, children: w }),
|
|
405
|
+
/* @__PURE__ */ e("span", { className: "ff-text-dark", style: { fontSize: 14, fontWeight: 500 }, children: h })
|
|
379
406
|
] }),
|
|
380
407
|
/* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
|
|
381
408
|
/* @__PURE__ */ e(
|
|
@@ -383,13 +410,13 @@ const We = ({ data: t }) => {
|
|
|
383
410
|
{
|
|
384
411
|
role: "button",
|
|
385
412
|
tabIndex: 0,
|
|
386
|
-
onClick: (
|
|
387
|
-
|
|
413
|
+
onClick: (g) => {
|
|
414
|
+
g.stopPropagation(), c(t);
|
|
388
415
|
},
|
|
389
|
-
onKeyDown: (
|
|
390
|
-
|
|
416
|
+
onKeyDown: (g) => {
|
|
417
|
+
g.key === "Enter" && (g.stopPropagation(), c(t));
|
|
391
418
|
},
|
|
392
|
-
children: /* @__PURE__ */ e(
|
|
419
|
+
children: /* @__PURE__ */ e(A, { size: 16 })
|
|
393
420
|
}
|
|
394
421
|
),
|
|
395
422
|
/* @__PURE__ */ e(
|
|
@@ -398,49 +425,88 @@ const We = ({ data: t }) => {
|
|
|
398
425
|
className: "ff-ms-2",
|
|
399
426
|
role: "button",
|
|
400
427
|
tabIndex: 0,
|
|
401
|
-
onClick: (
|
|
402
|
-
|
|
428
|
+
onClick: (g) => {
|
|
429
|
+
g.stopPropagation(), a(t);
|
|
403
430
|
},
|
|
404
|
-
onKeyDown: (
|
|
405
|
-
|
|
431
|
+
onKeyDown: (g) => {
|
|
432
|
+
g.key === "Enter" && (g.stopPropagation(), a(t));
|
|
406
433
|
},
|
|
407
|
-
children: /* @__PURE__ */ e(
|
|
434
|
+
children: /* @__PURE__ */ e(R, { color: "red", size: 16 })
|
|
408
435
|
}
|
|
409
436
|
),
|
|
410
|
-
p && /* @__PURE__ */ e(
|
|
437
|
+
p && /* @__PURE__ */ e(W, { title: p, placement: "right", arrow: !0, children: /* @__PURE__ */ e("div", { className: "ff-ms-2", children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
|
|
411
438
|
] })
|
|
412
439
|
] }),
|
|
413
|
-
|
|
440
|
+
r !== "title-only" && /* @__PURE__ */ e("div", { style: { margin: "0 10px 12px", padding: "14px 16px", borderRadius: 6, background: "#fafafa", fontSize: 12, textAlign: "left" }, children: f != null && f.renderNode ? f.renderNode(l) : I.length > 0 ? /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
441
|
+
I.slice(0, 4).map(([g, k]) => /* @__PURE__ */ n(
|
|
442
|
+
"div",
|
|
443
|
+
{
|
|
444
|
+
style: {
|
|
445
|
+
display: "flex",
|
|
446
|
+
alignItems: "baseline",
|
|
447
|
+
gap: 6,
|
|
448
|
+
color: "#475569",
|
|
449
|
+
overflow: "hidden"
|
|
450
|
+
},
|
|
451
|
+
children: [
|
|
452
|
+
/* @__PURE__ */ n("span", { style: { fontWeight: 600, color: "#0f172a", flexShrink: 0 }, children: [
|
|
453
|
+
C(g),
|
|
454
|
+
":"
|
|
455
|
+
] }),
|
|
456
|
+
/* @__PURE__ */ e(
|
|
457
|
+
"span",
|
|
458
|
+
{
|
|
459
|
+
title: P(k),
|
|
460
|
+
style: {
|
|
461
|
+
overflow: "hidden",
|
|
462
|
+
textOverflow: "ellipsis",
|
|
463
|
+
whiteSpace: "nowrap",
|
|
464
|
+
minWidth: 0,
|
|
465
|
+
flex: 1
|
|
466
|
+
},
|
|
467
|
+
children: P(k)
|
|
468
|
+
}
|
|
469
|
+
)
|
|
470
|
+
]
|
|
471
|
+
},
|
|
472
|
+
g
|
|
473
|
+
)),
|
|
474
|
+
I.length > 4 && /* @__PURE__ */ n("div", { style: { color: "#94a3b8", fontSize: 11 }, children: [
|
|
475
|
+
"+",
|
|
476
|
+
I.length - 4,
|
|
477
|
+
" more"
|
|
478
|
+
] })
|
|
479
|
+
] }) : E ? /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-gap-1", children: T.map((g, k) => /* @__PURE__ */ e("span", { className: "ff-badge ff-bg-dark ff-text-white ff-py-1 ff-px-2 ff-rounded", style: { fontSize: 11 }, title: g, children: g }, k)) }) : /* @__PURE__ */ e("span", { style: { color: "#94a3b8" }, children: "Click edit to configure" }) })
|
|
414
480
|
] }),
|
|
415
481
|
/* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
|
|
416
482
|
] });
|
|
417
|
-
},
|
|
418
|
-
const { onEditNode:
|
|
483
|
+
}, q = 5, Me = ({ id: t, data: l }) => {
|
|
484
|
+
const { onEditNode: c, onDeleteNode: a } = z(), { approvalData: s, isPreview: r = !1, _branchRail: h } = l, o = (s == null ? void 0 : s.policy) ?? {}, i = o.stages ?? [], d = i.length, u = i.slice(0, q), y = d - q, N = o.name ?? o.policyName ?? "Untitled Policy";
|
|
419
485
|
return /* @__PURE__ */ n("div", { style: { width: 350, position: "relative" }, children: [
|
|
420
486
|
/* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
|
|
421
487
|
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #ffe082", borderRadius: 8, background: "#fff" }, children: [
|
|
422
488
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
|
|
423
489
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
424
|
-
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(251,192,45,0.2)" }, children: /* @__PURE__ */ e(
|
|
490
|
+
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(251,192,45,0.2)" }, children: /* @__PURE__ */ e(ue, { style: { color: "#FBC02D" }, size: 16 }) }),
|
|
425
491
|
/* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "Approval Policy" })
|
|
426
492
|
] }),
|
|
427
493
|
/* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
|
|
428
|
-
!
|
|
494
|
+
!r && /* @__PURE__ */ e(
|
|
429
495
|
"div",
|
|
430
496
|
{
|
|
431
497
|
role: "button",
|
|
432
498
|
tabIndex: 0,
|
|
433
499
|
style: { cursor: "pointer" },
|
|
434
500
|
onClick: (p) => {
|
|
435
|
-
p.stopPropagation(),
|
|
501
|
+
p.stopPropagation(), c(t);
|
|
436
502
|
},
|
|
437
503
|
onKeyDown: (p) => {
|
|
438
|
-
p.key === "Enter" && (p.stopPropagation(),
|
|
504
|
+
p.key === "Enter" && (p.stopPropagation(), c(t));
|
|
439
505
|
},
|
|
440
|
-
children: /* @__PURE__ */ e(
|
|
506
|
+
children: /* @__PURE__ */ e(A, { size: 16, className: "ff-text-secondary" })
|
|
441
507
|
}
|
|
442
508
|
),
|
|
443
|
-
!
|
|
509
|
+
!r && /* @__PURE__ */ e(
|
|
444
510
|
"div",
|
|
445
511
|
{
|
|
446
512
|
className: "ff-ms-2",
|
|
@@ -453,10 +519,10 @@ const We = ({ data: t }) => {
|
|
|
453
519
|
onKeyDown: (p) => {
|
|
454
520
|
p.key === "Enter" && (p.stopPropagation(), a(t));
|
|
455
521
|
},
|
|
456
|
-
children: /* @__PURE__ */ e(
|
|
522
|
+
children: /* @__PURE__ */ e(R, { color: "red", size: 16 })
|
|
457
523
|
}
|
|
458
524
|
),
|
|
459
|
-
/* @__PURE__ */ e(
|
|
525
|
+
/* @__PURE__ */ e(W, { title: "This approval policy determines who must approve a request before the workflow continues.", arrow: !0, placement: "right", children: /* @__PURE__ */ e("span", { className: "ff-ms-2 ff-d-inline-flex", children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
|
|
460
526
|
] })
|
|
461
527
|
] }),
|
|
462
528
|
/* @__PURE__ */ n("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#FCFCFC" }, children: [
|
|
@@ -469,39 +535,39 @@ const We = ({ data: t }) => {
|
|
|
469
535
|
] })
|
|
470
536
|
] }),
|
|
471
537
|
i.length > 0 ? /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
472
|
-
|
|
473
|
-
var
|
|
474
|
-
const
|
|
475
|
-
let
|
|
476
|
-
return
|
|
477
|
-
/* @__PURE__ */ e("div", { className: "ff-rounded-circle ff-d-flex ff-align-items-center ff-justify-content-center ff-flex-shrink-0", style: { width: 28, height: 28, background: "#FFF9C4", color: "#5D4037", fontSize: 12, fontWeight: 700 }, children:
|
|
538
|
+
u.map((p, f) => {
|
|
539
|
+
var P, I, T;
|
|
540
|
+
const w = ((P = p.stageName) == null ? void 0 : P.trim()) || `Stage ${f + 1}`, m = Array.isArray(p.userIds) ? p.userIds.length : 0, S = ((I = p.groupName) == null ? void 0 : I.trim()) ?? "", v = ((T = p.roleName) == null ? void 0 : T.trim()) ?? "", D = m > 0 || S || v;
|
|
541
|
+
let C = "Not configured";
|
|
542
|
+
return S ? C = `Group: ${S}` : v ? C = `Role: ${v}` : m > 0 && (C = `${m} approver${m !== 1 ? "s" : ""}`), /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
543
|
+
/* @__PURE__ */ e("div", { className: "ff-rounded-circle ff-d-flex ff-align-items-center ff-justify-content-center ff-flex-shrink-0", style: { width: 28, height: 28, background: "#FFF9C4", color: "#5D4037", fontSize: 12, fontWeight: 700 }, children: f + 1 }),
|
|
478
544
|
/* @__PURE__ */ n("div", { className: "ff-flex-grow-1 ff-rounded ff-p-2 ff-d-flex ff-justify-content-between ff-align-items-center ff-border", style: { background: "#FFFDE7", borderColor: "#FEE79A" }, children: [
|
|
479
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 12, fontWeight: 700, color: "#212121" }, children:
|
|
480
|
-
/* @__PURE__ */ n("span", { className: `ff-d-flex ff-align-items-center ff-gap-1 ${
|
|
481
|
-
/* @__PURE__ */ e(
|
|
482
|
-
|
|
545
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 12, fontWeight: 700, color: "#212121" }, children: w }),
|
|
546
|
+
/* @__PURE__ */ n("span", { className: `ff-d-flex ff-align-items-center ff-gap-1 ${D ? "ff-text-dark" : "ff-text-muted"}`, style: { fontSize: 12 }, children: [
|
|
547
|
+
/* @__PURE__ */ e(me, { size: 16, className: "ff-flex-shrink-0", style: { color: D ? "#5D4037" : "#9E9E9E" } }),
|
|
548
|
+
C
|
|
483
549
|
] })
|
|
484
550
|
] })
|
|
485
|
-
] },
|
|
551
|
+
] }, f);
|
|
486
552
|
}),
|
|
487
|
-
|
|
553
|
+
y > 0 && /* @__PURE__ */ n(
|
|
488
554
|
"div",
|
|
489
555
|
{
|
|
490
556
|
className: "ff-text-center ff-fw-bold ff-py-2 ff-border ff-rounded",
|
|
491
|
-
style: { fontSize: 11, color: "#1976d2", borderColor: "#FEE79A", background: "#FFFDE7", borderStyle: "dashed", cursor:
|
|
492
|
-
role:
|
|
493
|
-
tabIndex:
|
|
557
|
+
style: { fontSize: 11, color: "#1976d2", borderColor: "#FEE79A", background: "#FFFDE7", borderStyle: "dashed", cursor: r ? "default" : "pointer" },
|
|
558
|
+
role: r ? void 0 : "button",
|
|
559
|
+
tabIndex: r ? void 0 : 0,
|
|
494
560
|
onClick: (p) => {
|
|
495
|
-
|
|
561
|
+
r || (p.stopPropagation(), c(t));
|
|
496
562
|
},
|
|
497
563
|
onKeyDown: (p) => {
|
|
498
|
-
|
|
564
|
+
r || p.key !== "Enter" || (p.stopPropagation(), c(t));
|
|
499
565
|
},
|
|
500
566
|
children: [
|
|
501
567
|
"+ ",
|
|
502
|
-
|
|
568
|
+
y,
|
|
503
569
|
" More Stage",
|
|
504
|
-
|
|
570
|
+
y > 1 ? "s" : ""
|
|
505
571
|
]
|
|
506
572
|
}
|
|
507
573
|
)
|
|
@@ -509,16 +575,16 @@ const We = ({ data: t }) => {
|
|
|
509
575
|
] })
|
|
510
576
|
] }),
|
|
511
577
|
/* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } }),
|
|
512
|
-
|
|
578
|
+
h && /* @__PURE__ */ e(ae, { rail: h, cardWidth: 350 })
|
|
513
579
|
] });
|
|
514
|
-
},
|
|
515
|
-
const { onEditNode:
|
|
580
|
+
}, Ke = ({ id: t, data: l }) => {
|
|
581
|
+
const { onEditNode: c, onDeleteNode: a } = z(), { duration: s, unit: r } = l, h = s != null && r, o = h ? `Wait ${s} ${r}` : "Not configured";
|
|
516
582
|
return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
|
|
517
583
|
/* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
|
|
518
584
|
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
|
|
519
585
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1", children: [
|
|
520
586
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
521
|
-
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(33,150,243,0.1)" }, children: /* @__PURE__ */ e(
|
|
587
|
+
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(33,150,243,0.1)" }, children: /* @__PURE__ */ e(be, { size: 16, color: "#1976d2" }) }),
|
|
522
588
|
/* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "Delay" })
|
|
523
589
|
] }),
|
|
524
590
|
/* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
|
|
@@ -528,12 +594,12 @@ const We = ({ data: t }) => {
|
|
|
528
594
|
role: "button",
|
|
529
595
|
tabIndex: 0,
|
|
530
596
|
onClick: (i) => {
|
|
531
|
-
i.stopPropagation(),
|
|
597
|
+
i.stopPropagation(), c(t);
|
|
532
598
|
},
|
|
533
599
|
onKeyDown: (i) => {
|
|
534
|
-
i.key === "Enter" && (i.stopPropagation(),
|
|
600
|
+
i.key === "Enter" && (i.stopPropagation(), c(t));
|
|
535
601
|
},
|
|
536
|
-
children: /* @__PURE__ */ e(
|
|
602
|
+
children: /* @__PURE__ */ e(A, { size: 16 })
|
|
537
603
|
}
|
|
538
604
|
),
|
|
539
605
|
/* @__PURE__ */ e(
|
|
@@ -548,33 +614,33 @@ const We = ({ data: t }) => {
|
|
|
548
614
|
onKeyDown: (i) => {
|
|
549
615
|
i.key === "Enter" && (i.stopPropagation(), a(t));
|
|
550
616
|
},
|
|
551
|
-
children: /* @__PURE__ */ e(
|
|
617
|
+
children: /* @__PURE__ */ e(R, { color: "red", size: 16 })
|
|
552
618
|
}
|
|
553
619
|
)
|
|
554
620
|
] })
|
|
555
621
|
] }),
|
|
556
|
-
/* @__PURE__ */ e("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: /* @__PURE__ */ e("span", { className:
|
|
622
|
+
/* @__PURE__ */ e("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: /* @__PURE__ */ e("span", { className: h ? "ff-text-dark ff-fw-medium" : "ff-text-muted", children: o }) })
|
|
557
623
|
] }),
|
|
558
624
|
/* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
|
|
559
625
|
] });
|
|
560
|
-
},
|
|
561
|
-
email: { label: "Email", bg: "#e3f2fd", color: "#1565c0", iconType:
|
|
562
|
-
slack: { label: "Slack", bg: "#e8f5e9", color: "#2e7d32", iconType:
|
|
563
|
-
teams: { label: "MS Teams", bg: "#ede7f6", color: "#4527a0", iconType:
|
|
564
|
-
sms: { label: "SMS", bg: "#fce4ec", color: "#880e4f", iconType:
|
|
565
|
-
"in-app": { label: "In-App", bg: "#fff3e0", color: "#e65100", iconType:
|
|
566
|
-
webhook: { label: "Webhook", bg: "#f3e5f5", color: "#6a1b9a", iconType:
|
|
567
|
-
},
|
|
626
|
+
}, Z = {
|
|
627
|
+
email: { label: "Email", bg: "#e3f2fd", color: "#1565c0", iconType: Ne },
|
|
628
|
+
slack: { label: "Slack", bg: "#e8f5e9", color: "#2e7d32", iconType: O },
|
|
629
|
+
teams: { label: "MS Teams", bg: "#ede7f6", color: "#4527a0", iconType: O },
|
|
630
|
+
sms: { label: "SMS", bg: "#fce4ec", color: "#880e4f", iconType: xe },
|
|
631
|
+
"in-app": { label: "In-App", bg: "#fff3e0", color: "#e65100", iconType: O },
|
|
632
|
+
webhook: { label: "Webhook", bg: "#f3e5f5", color: "#6a1b9a", iconType: se }
|
|
633
|
+
}, _e = {
|
|
568
634
|
label: "Notification",
|
|
569
635
|
bg: "rgba(156,39,176,0.1)",
|
|
570
636
|
color: "#7b1fa2",
|
|
571
|
-
iconType:
|
|
637
|
+
iconType: O
|
|
572
638
|
};
|
|
573
|
-
function
|
|
574
|
-
var
|
|
639
|
+
function Oe(t) {
|
|
640
|
+
var l;
|
|
575
641
|
switch (t.channel) {
|
|
576
642
|
case "email":
|
|
577
|
-
return ((
|
|
643
|
+
return ((l = t.emailTo) == null ? void 0 : l.join(", ")) ?? t.recipient ?? null;
|
|
578
644
|
case "slack":
|
|
579
645
|
return t.slackChannel ?? null;
|
|
580
646
|
case "teams":
|
|
@@ -589,13 +655,13 @@ function Ke(t) {
|
|
|
589
655
|
return t.recipient ?? null;
|
|
590
656
|
}
|
|
591
657
|
}
|
|
592
|
-
function
|
|
658
|
+
function Ue(t) {
|
|
593
659
|
switch (t.channel) {
|
|
594
660
|
case "email":
|
|
595
661
|
return t.emailSubject ?? t.subject ?? null;
|
|
596
662
|
case "slack": {
|
|
597
|
-
const
|
|
598
|
-
return
|
|
663
|
+
const l = t.slackMessage;
|
|
664
|
+
return l ? l.length > 60 ? `${l.slice(0, 60)}…` : l : null;
|
|
599
665
|
}
|
|
600
666
|
case "in-app":
|
|
601
667
|
return t.inAppTitle ?? null;
|
|
@@ -603,15 +669,15 @@ function _e(t) {
|
|
|
603
669
|
return t.subject ?? null;
|
|
604
670
|
}
|
|
605
671
|
}
|
|
606
|
-
const He = ({ id: t, data:
|
|
607
|
-
const { onEditNode:
|
|
608
|
-
return /* @__PURE__ */ n("div", { style: { width:
|
|
672
|
+
const He = ({ id: t, data: l }) => {
|
|
673
|
+
const { onEditNode: c, onDeleteNode: a } = z(), s = l, r = s.channel && Z[s.channel] ? Z[s.channel] : _e, h = Oe(s), o = Ue(s), i = !!(s.channel && h), d = r.iconType;
|
|
674
|
+
return /* @__PURE__ */ n("div", { style: { width: j }, children: [
|
|
609
675
|
/* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
|
|
610
676
|
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
|
|
611
677
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
|
|
612
678
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
613
|
-
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background:
|
|
614
|
-
/* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: s.channel ? `${
|
|
679
|
+
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: r.bg }, children: /* @__PURE__ */ e(d, { size: 16, color: r.color }) }),
|
|
680
|
+
/* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: s.channel ? `${r.label} Notification` : "Notification" })
|
|
615
681
|
] }),
|
|
616
682
|
/* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
|
|
617
683
|
/* @__PURE__ */ e(
|
|
@@ -619,13 +685,13 @@ const He = ({ id: t, data: r }) => {
|
|
|
619
685
|
{
|
|
620
686
|
role: "button",
|
|
621
687
|
tabIndex: 0,
|
|
622
|
-
onClick: (
|
|
623
|
-
|
|
688
|
+
onClick: (u) => {
|
|
689
|
+
u.stopPropagation(), c(t);
|
|
624
690
|
},
|
|
625
|
-
onKeyDown: (
|
|
626
|
-
(
|
|
691
|
+
onKeyDown: (u) => {
|
|
692
|
+
(u.key === "Enter" || u.key === " ") && (u.stopPropagation(), c(t));
|
|
627
693
|
},
|
|
628
|
-
children: /* @__PURE__ */ e(
|
|
694
|
+
children: /* @__PURE__ */ e(A, { size: 16 })
|
|
629
695
|
}
|
|
630
696
|
),
|
|
631
697
|
/* @__PURE__ */ e(
|
|
@@ -634,43 +700,43 @@ const He = ({ id: t, data: r }) => {
|
|
|
634
700
|
className: "ff-ms-2",
|
|
635
701
|
role: "button",
|
|
636
702
|
tabIndex: 0,
|
|
637
|
-
onClick: (
|
|
638
|
-
|
|
703
|
+
onClick: (u) => {
|
|
704
|
+
u.stopPropagation(), a(t);
|
|
639
705
|
},
|
|
640
|
-
onKeyDown: (
|
|
641
|
-
(
|
|
706
|
+
onKeyDown: (u) => {
|
|
707
|
+
(u.key === "Enter" || u.key === " ") && (u.stopPropagation(), a(t));
|
|
642
708
|
},
|
|
643
|
-
children: /* @__PURE__ */ e(
|
|
709
|
+
children: /* @__PURE__ */ e(R, { color: "red", size: 16 })
|
|
644
710
|
}
|
|
645
711
|
)
|
|
646
712
|
] })
|
|
647
713
|
] }),
|
|
648
714
|
/* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: i ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-column ff-gap-1", children: [
|
|
649
715
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
650
|
-
/* @__PURE__ */ e("span", { className: "ff-px-2 ff-py-1 ff-rounded", style: { fontSize: 10, background:
|
|
651
|
-
/* @__PURE__ */ e("span", { className: "ff-text-dark ff-text-truncate", style: { maxWidth: 220 }, children:
|
|
716
|
+
/* @__PURE__ */ e("span", { className: "ff-px-2 ff-py-1 ff-rounded", style: { fontSize: 10, background: r.bg, color: r.color, fontWeight: 600, flexShrink: 0 }, children: r.label }),
|
|
717
|
+
/* @__PURE__ */ e("span", { className: "ff-text-dark ff-text-truncate", style: { maxWidth: 220 }, children: h })
|
|
652
718
|
] }),
|
|
653
719
|
o && /* @__PURE__ */ e("span", { className: "ff-text-muted ff-text-truncate", style: { maxWidth: 280 }, children: o })
|
|
654
720
|
] }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured" }) })
|
|
655
721
|
] }),
|
|
656
722
|
/* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
|
|
657
723
|
] });
|
|
658
|
-
},
|
|
724
|
+
}, Y = {
|
|
659
725
|
"api-key": "API Key",
|
|
660
726
|
hmac: "HMAC"
|
|
661
|
-
},
|
|
662
|
-
const { onClickAddTrigger:
|
|
663
|
-
i.stopPropagation(),
|
|
727
|
+
}, Ve = ({ data: t }) => {
|
|
728
|
+
const { onClickAddTrigger: l } = z(), { label: c = "Webhook Trigger", endpointUrl: a, authMethod: s, source: r } = t, h = (i) => {
|
|
729
|
+
i.stopPropagation(), l();
|
|
664
730
|
}, o = (i) => {
|
|
665
731
|
i.stopPropagation(), a && navigator.clipboard.writeText(a).catch(() => {
|
|
666
732
|
});
|
|
667
733
|
};
|
|
668
|
-
return /* @__PURE__ */ n("div", { style: { width:
|
|
734
|
+
return /* @__PURE__ */ n("div", { style: { width: j }, children: [
|
|
669
735
|
/* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
|
|
670
736
|
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #90caf9", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
|
|
671
737
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
|
|
672
738
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
673
|
-
/* @__PURE__ */ e("div", { style: { width: 28, height: 28, borderRadius: 6, background: "rgba(33,150,243,0.1)", display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ e(
|
|
739
|
+
/* @__PURE__ */ e("div", { style: { width: 28, height: 28, borderRadius: 6, background: "rgba(33,150,243,0.1)", display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ e(se, { size: 16, color: "#1565c0" }) }),
|
|
674
740
|
/* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 600, color: "#212121" }, children: "Webhook Trigger" })
|
|
675
741
|
] }),
|
|
676
742
|
/* @__PURE__ */ e(
|
|
@@ -678,25 +744,25 @@ const He = ({ id: t, data: r }) => {
|
|
|
678
744
|
{
|
|
679
745
|
role: "button",
|
|
680
746
|
tabIndex: 0,
|
|
681
|
-
onClick:
|
|
747
|
+
onClick: h,
|
|
682
748
|
onKeyDown: (i) => {
|
|
683
|
-
(i.key === "Enter" || i.key === " ") &&
|
|
749
|
+
(i.key === "Enter" || i.key === " ") && h(i);
|
|
684
750
|
},
|
|
685
751
|
className: "ff-d-flex ff-align-items-center",
|
|
686
752
|
style: { paddingRight: 4, cursor: "pointer" },
|
|
687
|
-
children: /* @__PURE__ */ e(
|
|
753
|
+
children: /* @__PURE__ */ e(A, { size: 16, color: "#555" })
|
|
688
754
|
}
|
|
689
755
|
)
|
|
690
756
|
] }),
|
|
691
757
|
/* @__PURE__ */ n("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#e3f2fd", border: "1px solid #90caf9" }, children: [
|
|
692
758
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-flex-wrap ff-gap-2 ff-mb-1", children: [
|
|
693
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 12, color: "#1565c0", fontWeight: 600 }, children:
|
|
694
|
-
|
|
695
|
-
s && s !== "none" &&
|
|
759
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 12, color: "#1565c0", fontWeight: 600 }, children: c }),
|
|
760
|
+
r && /* @__PURE__ */ e("span", { className: "ff-px-2 ff-py-1 ff-rounded", style: { fontSize: 11, background: "#fff", border: "1px solid #90caf9", color: "#1565c0" }, children: r }),
|
|
761
|
+
s && s !== "none" && Y[s] && /* @__PURE__ */ e("span", { className: "ff-px-2 ff-py-1 ff-rounded", style: { fontSize: 10, background: "#1565c0", color: "#fff", fontWeight: 600 }, children: Y[s] })
|
|
696
762
|
] }),
|
|
697
763
|
a && /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-1", style: { marginTop: 4 }, children: [
|
|
698
764
|
/* @__PURE__ */ e("span", { style: { fontSize: 10, color: "#1565c0", fontFamily: "monospace", flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: a }),
|
|
699
|
-
/* @__PURE__ */ e(
|
|
765
|
+
/* @__PURE__ */ e(W, { title: "Copy URL", placement: "top", arrow: !0, children: /* @__PURE__ */ e(
|
|
700
766
|
"div",
|
|
701
767
|
{
|
|
702
768
|
role: "button",
|
|
@@ -706,7 +772,7 @@ const He = ({ id: t, data: r }) => {
|
|
|
706
772
|
(i.key === "Enter" || i.key === " ") && o(i);
|
|
707
773
|
},
|
|
708
774
|
style: { cursor: "pointer", flexShrink: 0 },
|
|
709
|
-
children: /* @__PURE__ */ e(
|
|
775
|
+
children: /* @__PURE__ */ e(ke, { size: 12, color: "#1565c0" })
|
|
710
776
|
}
|
|
711
777
|
) })
|
|
712
778
|
] })
|
|
@@ -714,10 +780,10 @@ const He = ({ id: t, data: r }) => {
|
|
|
714
780
|
] }),
|
|
715
781
|
/* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
|
|
716
782
|
] });
|
|
717
|
-
},
|
|
783
|
+
}, Ge = ({ id: t, data: l }) => {
|
|
718
784
|
var N;
|
|
719
|
-
const { onEditNode:
|
|
720
|
-
return /* @__PURE__ */ n("div", { style: { width:
|
|
785
|
+
const { onEditNode: c, onDeleteNode: a, nodeRegistry: s } = z(), { method: r, url: h, descriptorType: o } = l, i = o ? (N = s == null ? void 0 : s.forType(o)) == null ? void 0 : N.icon : /* @__PURE__ */ e(ve, { size: 16, color: "#546e7a" }), d = !!(r && h), u = (r == null ? void 0 : r.toUpperCase()) ?? "", y = Te[u] ?? null;
|
|
786
|
+
return /* @__PURE__ */ n("div", { style: { width: j }, children: [
|
|
721
787
|
/* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
|
|
722
788
|
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
|
|
723
789
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
|
|
@@ -732,12 +798,12 @@ const He = ({ id: t, data: r }) => {
|
|
|
732
798
|
role: "button",
|
|
733
799
|
tabIndex: 0,
|
|
734
800
|
onClick: (p) => {
|
|
735
|
-
p.stopPropagation(),
|
|
801
|
+
p.stopPropagation(), c(t);
|
|
736
802
|
},
|
|
737
803
|
onKeyDown: (p) => {
|
|
738
|
-
(p.key === "Enter" || p.key === " ") && (p.stopPropagation(),
|
|
804
|
+
(p.key === "Enter" || p.key === " ") && (p.stopPropagation(), c(t));
|
|
739
805
|
},
|
|
740
|
-
children: /* @__PURE__ */ e(
|
|
806
|
+
children: /* @__PURE__ */ e(A, { size: 16 })
|
|
741
807
|
}
|
|
742
808
|
),
|
|
743
809
|
/* @__PURE__ */ e(
|
|
@@ -752,19 +818,19 @@ const He = ({ id: t, data: r }) => {
|
|
|
752
818
|
onKeyDown: (p) => {
|
|
753
819
|
(p.key === "Enter" || p.key === " ") && (p.stopPropagation(), a(t));
|
|
754
820
|
},
|
|
755
|
-
children: /* @__PURE__ */ e(
|
|
821
|
+
children: /* @__PURE__ */ e(R, { color: "red", size: 16 })
|
|
756
822
|
}
|
|
757
823
|
)
|
|
758
824
|
] })
|
|
759
825
|
] }),
|
|
760
826
|
/* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: d ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
761
|
-
|
|
762
|
-
/* @__PURE__ */ e("span", { className: "ff-text-dark ff-text-truncate", style: { fontFamily: "monospace", fontSize: 11 }, title:
|
|
827
|
+
y && /* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 700, padding: "2px 6px", borderRadius: 4, background: y.bg, color: y.color, flexShrink: 0 }, children: u }),
|
|
828
|
+
/* @__PURE__ */ e("span", { className: "ff-text-dark ff-text-truncate", style: { fontFamily: "monospace", fontSize: 11 }, title: h, children: h })
|
|
763
829
|
] }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured" }) })
|
|
764
830
|
] }),
|
|
765
831
|
/* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
|
|
766
832
|
] });
|
|
767
|
-
},
|
|
833
|
+
}, qe = {
|
|
768
834
|
eq: "=",
|
|
769
835
|
neq: "≠",
|
|
770
836
|
gt: ">",
|
|
@@ -776,14 +842,14 @@ const He = ({ id: t, data: r }) => {
|
|
|
776
842
|
endsWith: "ends with",
|
|
777
843
|
isEmpty: "is empty",
|
|
778
844
|
isNotEmpty: "is not empty"
|
|
779
|
-
},
|
|
780
|
-
const { onEditNode:
|
|
781
|
-
return /* @__PURE__ */ n("div", { style: { width:
|
|
845
|
+
}, Ze = ({ id: t, data: l }) => {
|
|
846
|
+
const { onEditNode: c, onDeleteNode: a } = z(), { title: s = "Condition Branch", branchConfigs: r = [], defaultBranch: h } = l, o = r.length > 0;
|
|
847
|
+
return /* @__PURE__ */ n("div", { style: { width: j }, children: [
|
|
782
848
|
/* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
|
|
783
849
|
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #b39ddb", borderRadius: 8, background: "#fff" }, children: [
|
|
784
850
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
|
|
785
851
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
786
|
-
/* @__PURE__ */ e("div", { style: { width: 25, height: 25, borderRadius: 6, background: "rgba(103,58,183,0.1)", display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(
|
|
852
|
+
/* @__PURE__ */ e("div", { style: { width: 25, height: 25, borderRadius: 6, background: "rgba(103,58,183,0.1)", display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(we, { size: 16, color: "#512da8" }) }),
|
|
787
853
|
/* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: s })
|
|
788
854
|
] }),
|
|
789
855
|
/* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
|
|
@@ -793,12 +859,12 @@ const He = ({ id: t, data: r }) => {
|
|
|
793
859
|
role: "button",
|
|
794
860
|
tabIndex: 0,
|
|
795
861
|
onClick: (i) => {
|
|
796
|
-
i.stopPropagation(),
|
|
862
|
+
i.stopPropagation(), c(t);
|
|
797
863
|
},
|
|
798
864
|
onKeyDown: (i) => {
|
|
799
|
-
(i.key === "Enter" || i.key === " ") && (i.stopPropagation(),
|
|
865
|
+
(i.key === "Enter" || i.key === " ") && (i.stopPropagation(), c(t));
|
|
800
866
|
},
|
|
801
|
-
children: /* @__PURE__ */ e(
|
|
867
|
+
children: /* @__PURE__ */ e(A, { size: 16 })
|
|
802
868
|
}
|
|
803
869
|
),
|
|
804
870
|
/* @__PURE__ */ e(
|
|
@@ -813,27 +879,27 @@ const He = ({ id: t, data: r }) => {
|
|
|
813
879
|
onKeyDown: (i) => {
|
|
814
880
|
(i.key === "Enter" || i.key === " ") && (i.stopPropagation(), a(t));
|
|
815
881
|
},
|
|
816
|
-
children: /* @__PURE__ */ e(
|
|
882
|
+
children: /* @__PURE__ */ e(R, { color: "red", size: 16 })
|
|
817
883
|
}
|
|
818
884
|
)
|
|
819
885
|
] })
|
|
820
886
|
] }),
|
|
821
887
|
/* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: o ? /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
822
|
-
|
|
823
|
-
var p,
|
|
824
|
-
const
|
|
888
|
+
r.map((i, d) => {
|
|
889
|
+
var p, f;
|
|
890
|
+
const u = G[d % G.length], y = (p = i.conditions) == null ? void 0 : p[0], N = (((f = i.conditions) == null ? void 0 : f.length) ?? 0) - 1;
|
|
825
891
|
return /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
826
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background:
|
|
827
|
-
|
|
828
|
-
|
|
892
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background: u.bg, color: u.color, flexShrink: 0 }, children: i.label || i.key }),
|
|
893
|
+
y ? /* @__PURE__ */ n("span", { style: { fontSize: 11, color: "#616161", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
|
|
894
|
+
y.field,
|
|
829
895
|
" ",
|
|
830
|
-
|
|
831
|
-
|
|
896
|
+
qe[y.operator] ?? y.operator,
|
|
897
|
+
y.value ? ` ${y.value}` : "",
|
|
832
898
|
N > 0 ? ` +${N} more` : ""
|
|
833
899
|
] }) : /* @__PURE__ */ e("span", { style: { fontSize: 11, color: "#9e9e9e" }, children: "No conditions yet" })
|
|
834
900
|
] }, i.key);
|
|
835
901
|
}),
|
|
836
|
-
|
|
902
|
+
h && /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 6, marginTop: 2 }, children: [
|
|
837
903
|
/* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background: "#f5f5f5", color: "#757575", flexShrink: 0 }, children: "Default" }),
|
|
838
904
|
/* @__PURE__ */ e("span", { style: { fontSize: 11, color: "#9e9e9e" }, children: "fallback path" })
|
|
839
905
|
] })
|
|
@@ -841,18 +907,18 @@ const He = ({ id: t, data: r }) => {
|
|
|
841
907
|
] }),
|
|
842
908
|
/* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
|
|
843
909
|
] });
|
|
844
|
-
},
|
|
910
|
+
}, Ye = ({ id: t, data: l }) => {
|
|
845
911
|
var p;
|
|
846
|
-
const { onEditNode:
|
|
847
|
-
|
|
912
|
+
const { onEditNode: c, onDeleteNode: a, nodeRegistry: s } = z(), { title: r = "Sub-Workflow", workflowId: h, workflowLabel: o, descriptorType: i, onPreview: d } = l, u = i ? (p = s == null ? void 0 : s.forType(i)) == null ? void 0 : p.icon : /* @__PURE__ */ e(Se, { size: 16, color: "#00695c" }), y = !!h, N = (f) => {
|
|
913
|
+
f.stopPropagation(), h && d && d(h);
|
|
848
914
|
};
|
|
849
|
-
return /* @__PURE__ */ n("div", { style: { width:
|
|
915
|
+
return /* @__PURE__ */ n("div", { style: { width: j }, children: [
|
|
850
916
|
/* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
|
|
851
917
|
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #80cbc4", borderRadius: 8, background: "#fff" }, children: [
|
|
852
918
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
|
|
853
919
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
854
|
-
/* @__PURE__ */ e("div", { style: { width: 25, height: 25, borderRadius: 6, background: "rgba(0,137,123,0.1)", display: "flex", alignItems: "center", justifyContent: "center" }, children:
|
|
855
|
-
/* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children:
|
|
920
|
+
/* @__PURE__ */ e("div", { style: { width: 25, height: 25, borderRadius: 6, background: "rgba(0,137,123,0.1)", display: "flex", alignItems: "center", justifyContent: "center" }, children: u }),
|
|
921
|
+
/* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: r })
|
|
856
922
|
] }),
|
|
857
923
|
/* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
|
|
858
924
|
/* @__PURE__ */ e(
|
|
@@ -860,13 +926,13 @@ const He = ({ id: t, data: r }) => {
|
|
|
860
926
|
{
|
|
861
927
|
role: "button",
|
|
862
928
|
tabIndex: 0,
|
|
863
|
-
onClick: (
|
|
864
|
-
|
|
929
|
+
onClick: (f) => {
|
|
930
|
+
f.stopPropagation(), c(t);
|
|
865
931
|
},
|
|
866
|
-
onKeyDown: (
|
|
867
|
-
(
|
|
932
|
+
onKeyDown: (f) => {
|
|
933
|
+
(f.key === "Enter" || f.key === " ") && (f.stopPropagation(), c(t));
|
|
868
934
|
},
|
|
869
|
-
children: /* @__PURE__ */ e(
|
|
935
|
+
children: /* @__PURE__ */ e(A, { size: 16 })
|
|
870
936
|
}
|
|
871
937
|
),
|
|
872
938
|
/* @__PURE__ */ e(
|
|
@@ -875,23 +941,23 @@ const He = ({ id: t, data: r }) => {
|
|
|
875
941
|
className: "ff-ms-2",
|
|
876
942
|
role: "button",
|
|
877
943
|
tabIndex: 0,
|
|
878
|
-
onClick: (
|
|
879
|
-
|
|
944
|
+
onClick: (f) => {
|
|
945
|
+
f.stopPropagation(), a(t);
|
|
880
946
|
},
|
|
881
|
-
onKeyDown: (
|
|
882
|
-
(
|
|
947
|
+
onKeyDown: (f) => {
|
|
948
|
+
(f.key === "Enter" || f.key === " ") && (f.stopPropagation(), a(t));
|
|
883
949
|
},
|
|
884
|
-
children: /* @__PURE__ */ e(
|
|
950
|
+
children: /* @__PURE__ */ e(R, { color: "red", size: 16 })
|
|
885
951
|
}
|
|
886
952
|
)
|
|
887
953
|
] })
|
|
888
954
|
] }),
|
|
889
|
-
/* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background:
|
|
955
|
+
/* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: y ? "#e0f2f1" : "#fafafa", fontSize: 12, border: y ? "1px solid #b2dfdb" : "none" }, children: y ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-between", children: [
|
|
890
956
|
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-column ff-gap-1", children: [
|
|
891
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 12, fontWeight: 600, color: "#00695c" }, children: o ||
|
|
957
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 12, fontWeight: 600, color: "#00695c" }, children: o || h }),
|
|
892
958
|
/* @__PURE__ */ n("span", { style: { fontSize: 10, color: "#80cbc4", fontFamily: "monospace" }, children: [
|
|
893
959
|
"ID: ",
|
|
894
|
-
|
|
960
|
+
h
|
|
895
961
|
] })
|
|
896
962
|
] }),
|
|
897
963
|
d && /* @__PURE__ */ n(
|
|
@@ -900,12 +966,12 @@ const He = ({ id: t, data: r }) => {
|
|
|
900
966
|
role: "button",
|
|
901
967
|
tabIndex: 0,
|
|
902
968
|
onClick: N,
|
|
903
|
-
onKeyDown: (
|
|
904
|
-
(
|
|
969
|
+
onKeyDown: (f) => {
|
|
970
|
+
(f.key === "Enter" || f.key === " ") && N(f);
|
|
905
971
|
},
|
|
906
972
|
style: { cursor: "pointer", display: "flex", alignItems: "center", gap: 3, fontSize: 11, color: "#00897b" },
|
|
907
973
|
children: [
|
|
908
|
-
/* @__PURE__ */ e(
|
|
974
|
+
/* @__PURE__ */ e(Ee, { size: 13 }),
|
|
909
975
|
"Preview"
|
|
910
976
|
]
|
|
911
977
|
}
|
|
@@ -914,42 +980,42 @@ const He = ({ id: t, data: r }) => {
|
|
|
914
980
|
] }),
|
|
915
981
|
/* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
|
|
916
982
|
] });
|
|
917
|
-
},
|
|
918
|
-
startNode:
|
|
919
|
-
endNode:
|
|
920
|
-
addTriggerNode:
|
|
921
|
-
addStepNode:
|
|
922
|
-
triggerNode:
|
|
923
|
-
eventNode:
|
|
924
|
-
filterNode:
|
|
925
|
-
actionNode:
|
|
926
|
-
approvalNode:
|
|
927
|
-
delayNode:
|
|
983
|
+
}, at = {
|
|
984
|
+
startNode: Ie,
|
|
985
|
+
endNode: Pe,
|
|
986
|
+
addTriggerNode: Ae,
|
|
987
|
+
addStepNode: De,
|
|
988
|
+
triggerNode: Re,
|
|
989
|
+
eventNode: $e,
|
|
990
|
+
filterNode: Be,
|
|
991
|
+
actionNode: je,
|
|
992
|
+
approvalNode: Me,
|
|
993
|
+
delayNode: Ke,
|
|
928
994
|
notificationNode: He,
|
|
929
|
-
webhookTriggerNode:
|
|
930
|
-
restApiNode:
|
|
931
|
-
conditionBranchNode:
|
|
932
|
-
subWorkflowNode:
|
|
933
|
-
},
|
|
995
|
+
webhookTriggerNode: Ve,
|
|
996
|
+
restApiNode: Ge,
|
|
997
|
+
conditionBranchNode: Ze,
|
|
998
|
+
subWorkflowNode: Ye
|
|
999
|
+
}, Je = 11.5, J = 2, M = 6, Q = 40, X = 20, ee = 4, pt = ({
|
|
934
1000
|
id: t,
|
|
935
|
-
sourceX:
|
|
936
|
-
sourceY:
|
|
1001
|
+
sourceX: l,
|
|
1002
|
+
sourceY: c,
|
|
937
1003
|
targetX: a,
|
|
938
1004
|
targetY: s,
|
|
939
|
-
sourcePosition:
|
|
940
|
-
targetPosition:
|
|
1005
|
+
sourcePosition: r,
|
|
1006
|
+
targetPosition: h,
|
|
941
1007
|
source: o,
|
|
942
1008
|
target: i,
|
|
943
1009
|
data: d
|
|
944
1010
|
}) => {
|
|
945
|
-
const [
|
|
946
|
-
sourceX:
|
|
947
|
-
sourceY:
|
|
1011
|
+
const [u, y, N] = U({
|
|
1012
|
+
sourceX: l,
|
|
1013
|
+
sourceY: c,
|
|
948
1014
|
targetX: a,
|
|
949
1015
|
targetY: s
|
|
950
|
-
}), p = d == null ? void 0 : d.label,
|
|
951
|
-
if (
|
|
952
|
-
const
|
|
1016
|
+
}), p = d == null ? void 0 : d.label, f = p === "Pass", w = f || p === "Fail", m = l + (a - l) / 3, S = c + (s - c) / 3, v = l + 2 * (a - l) / 3, D = c + 2 * (s - c) / 3, C = d == null ? void 0 : d.onAddStepClick, P = (g) => {
|
|
1017
|
+
if (g.stopPropagation(), typeof C != "function") return;
|
|
1018
|
+
const k = {
|
|
953
1019
|
edgeId: t,
|
|
954
1020
|
nodeId: o,
|
|
955
1021
|
sourceNodeId: o,
|
|
@@ -959,23 +1025,23 @@ const He = ({ id: t, data: r }) => {
|
|
|
959
1025
|
referenceNodeType: d == null ? void 0 : d.referenceNodeType,
|
|
960
1026
|
stepVisibility: d == null ? void 0 : d.stepVisibility
|
|
961
1027
|
};
|
|
962
|
-
|
|
963
|
-
},
|
|
964
|
-
(
|
|
965
|
-
},
|
|
1028
|
+
C(o, k);
|
|
1029
|
+
}, I = (g) => {
|
|
1030
|
+
(g.key === "Enter" || g.key === " ") && (g.preventDefault(), P(g));
|
|
1031
|
+
}, T = () => /* @__PURE__ */ n($, { children: [
|
|
966
1032
|
/* @__PURE__ */ n("g", { className: "plus-icon-container", children: [
|
|
967
|
-
/* @__PURE__ */ e("circle", { r:
|
|
968
|
-
/* @__PURE__ */ e("line", { x1: 0, y1:
|
|
969
|
-
/* @__PURE__ */ e("line", { x1:
|
|
1033
|
+
/* @__PURE__ */ e("circle", { r: Je, className: "edge-plus-circle" }),
|
|
1034
|
+
/* @__PURE__ */ e("line", { x1: 0, y1: -M, x2: 0, y2: M, strokeWidth: J, strokeLinecap: "round", className: "plus-line" }),
|
|
1035
|
+
/* @__PURE__ */ e("line", { x1: -M, y1: 0, x2: M, y2: 0, strokeWidth: J, strokeLinecap: "round", className: "plus-line" })
|
|
970
1036
|
] }),
|
|
971
1037
|
/* @__PURE__ */ n("g", { className: "edge-plus-tooltip", transform: "translate(18, 0)", children: [
|
|
972
1038
|
/* @__PURE__ */ e("rect", { x: 0, y: -10, width: 65, height: 20, rx: 4, className: "tooltip-bg" }),
|
|
973
1039
|
/* @__PURE__ */ e("path", { d: "M0 -4 L-4 0 L0 4 Z", className: "tooltip-bg" }),
|
|
974
1040
|
/* @__PURE__ */ e("text", { x: 32, y: 0, textAnchor: "middle", dominantBaseline: "central", fill: "white", style: { fontSize: 10, fontWeight: 600, pointerEvents: "none" }, children: "Add Step" })
|
|
975
1041
|
] })
|
|
976
|
-
] }),
|
|
977
|
-
onClick:
|
|
978
|
-
onKeyDown:
|
|
1042
|
+
] }), E = C ? {
|
|
1043
|
+
onClick: P,
|
|
1044
|
+
onKeyDown: I,
|
|
979
1045
|
role: "button",
|
|
980
1046
|
tabIndex: 0,
|
|
981
1047
|
style: { cursor: "pointer", pointerEvents: "all" }
|
|
@@ -983,73 +1049,73 @@ const He = ({ id: t, data: r }) => {
|
|
|
983
1049
|
style: { cursor: "default", pointerEvents: "all" }
|
|
984
1050
|
};
|
|
985
1051
|
return /* @__PURE__ */ n("g", { className: "edge-with-plus-wrapper", children: [
|
|
986
|
-
/* @__PURE__ */ e(
|
|
987
|
-
|
|
988
|
-
/* @__PURE__ */ n("g", { transform: `translate(${m}, ${
|
|
989
|
-
/* @__PURE__ */ e("rect", { x: -
|
|
990
|
-
/* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill:
|
|
1052
|
+
/* @__PURE__ */ e(H, { id: t, path: u }),
|
|
1053
|
+
w ? /* @__PURE__ */ n($, { children: [
|
|
1054
|
+
/* @__PURE__ */ n("g", { transform: `translate(${m}, ${S})`, children: [
|
|
1055
|
+
/* @__PURE__ */ e("rect", { x: -Q / 2, y: -X / 2, width: Q, height: X, rx: ee, ry: ee, fill: f ? "#ADE6C5" : "#FDBFBF" }),
|
|
1056
|
+
/* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: f ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: p })
|
|
991
1057
|
] }),
|
|
992
|
-
/* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${
|
|
993
|
-
] }) : /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${
|
|
1058
|
+
/* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${v}, ${D})`, "data-testid": "plus-node-icon", ...E, children: /* @__PURE__ */ e(T, {}) })
|
|
1059
|
+
] }) : /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${y}, ${N})`, "data-testid": "plus-node-icon", ...E, children: /* @__PURE__ */ e(T, {}) })
|
|
994
1060
|
] });
|
|
995
|
-
},
|
|
1061
|
+
}, Qe = 11.5, te = 2, K = 6, gt = ({
|
|
996
1062
|
id: t,
|
|
997
|
-
sourceX:
|
|
998
|
-
sourceY:
|
|
1063
|
+
sourceX: l,
|
|
1064
|
+
sourceY: c,
|
|
999
1065
|
targetX: a,
|
|
1000
1066
|
targetY: s,
|
|
1001
|
-
source:
|
|
1002
|
-
target:
|
|
1067
|
+
source: r,
|
|
1068
|
+
target: h,
|
|
1003
1069
|
data: o
|
|
1004
1070
|
}) => {
|
|
1005
|
-
const [i, d,
|
|
1006
|
-
sourceX:
|
|
1007
|
-
sourceY:
|
|
1071
|
+
const [i, d, u] = U({
|
|
1072
|
+
sourceX: l,
|
|
1073
|
+
sourceY: c,
|
|
1008
1074
|
targetX: a,
|
|
1009
1075
|
targetY: s
|
|
1010
|
-
}),
|
|
1011
|
-
|
|
1076
|
+
}), y = o == null ? void 0 : o.onAddStepClick, N = (f) => {
|
|
1077
|
+
f.stopPropagation(), typeof y == "function" && y(r, {
|
|
1012
1078
|
edgeId: t,
|
|
1013
|
-
nodeId:
|
|
1014
|
-
sourceNodeId:
|
|
1015
|
-
targetNodeId:
|
|
1079
|
+
nodeId: r,
|
|
1080
|
+
sourceNodeId: r,
|
|
1081
|
+
targetNodeId: h,
|
|
1016
1082
|
position: "between",
|
|
1017
|
-
referenceNodeId:
|
|
1083
|
+
referenceNodeId: r,
|
|
1018
1084
|
referenceNodeType: o == null ? void 0 : o.referenceNodeType,
|
|
1019
1085
|
stepVisibility: o == null ? void 0 : o.stepVisibility,
|
|
1020
1086
|
filterId: o == null ? void 0 : o.filterId,
|
|
1021
1087
|
branch: o == null ? void 0 : o.branch
|
|
1022
1088
|
});
|
|
1023
|
-
}, p = (
|
|
1024
|
-
(
|
|
1089
|
+
}, p = (f) => {
|
|
1090
|
+
(f.key === "Enter" || f.key === " ") && (f.preventDefault(), N(f));
|
|
1025
1091
|
};
|
|
1026
1092
|
return /* @__PURE__ */ n("g", { className: "edge-with-plus-wrapper", children: [
|
|
1027
|
-
/* @__PURE__ */ e(
|
|
1093
|
+
/* @__PURE__ */ e(H, { id: t, path: i, style: { stroke: "#b0bec5" } }),
|
|
1028
1094
|
/* @__PURE__ */ n(
|
|
1029
1095
|
"g",
|
|
1030
1096
|
{
|
|
1031
1097
|
className: "nodrag nopan edge-plus-svg",
|
|
1032
|
-
transform: `translate(${d}, ${
|
|
1098
|
+
transform: `translate(${d}, ${u})`,
|
|
1033
1099
|
style: {
|
|
1034
|
-
cursor:
|
|
1100
|
+
cursor: y ? "pointer" : "default",
|
|
1035
1101
|
pointerEvents: "all",
|
|
1036
1102
|
outline: "none"
|
|
1037
1103
|
},
|
|
1038
|
-
onClick:
|
|
1039
|
-
onKeyDown:
|
|
1040
|
-
role:
|
|
1041
|
-
tabIndex:
|
|
1104
|
+
onClick: y ? N : void 0,
|
|
1105
|
+
onKeyDown: y ? p : void 0,
|
|
1106
|
+
role: y ? "button" : void 0,
|
|
1107
|
+
tabIndex: y ? 0 : void 0,
|
|
1042
1108
|
"data-testid": "plus-node-icon",
|
|
1043
1109
|
children: [
|
|
1044
|
-
/* @__PURE__ */ e("circle", { r:
|
|
1110
|
+
/* @__PURE__ */ e("circle", { r: Qe, className: "edge-plus-circle" }),
|
|
1045
1111
|
/* @__PURE__ */ e(
|
|
1046
1112
|
"line",
|
|
1047
1113
|
{
|
|
1048
1114
|
x1: 0,
|
|
1049
|
-
y1: -
|
|
1115
|
+
y1: -K,
|
|
1050
1116
|
x2: 0,
|
|
1051
|
-
y2:
|
|
1052
|
-
strokeWidth:
|
|
1117
|
+
y2: K,
|
|
1118
|
+
strokeWidth: te,
|
|
1053
1119
|
strokeLinecap: "round",
|
|
1054
1120
|
className: "plus-line"
|
|
1055
1121
|
}
|
|
@@ -1057,11 +1123,11 @@ const He = ({ id: t, data: r }) => {
|
|
|
1057
1123
|
/* @__PURE__ */ e(
|
|
1058
1124
|
"line",
|
|
1059
1125
|
{
|
|
1060
|
-
x1: -
|
|
1126
|
+
x1: -K,
|
|
1061
1127
|
y1: 0,
|
|
1062
|
-
x2:
|
|
1128
|
+
x2: K,
|
|
1063
1129
|
y2: 0,
|
|
1064
|
-
strokeWidth:
|
|
1130
|
+
strokeWidth: te,
|
|
1065
1131
|
strokeLinecap: "round",
|
|
1066
1132
|
className: "plus-line"
|
|
1067
1133
|
}
|
|
@@ -1096,67 +1162,67 @@ const He = ({ id: t, data: r }) => {
|
|
|
1096
1162
|
}
|
|
1097
1163
|
)
|
|
1098
1164
|
] });
|
|
1099
|
-
},
|
|
1100
|
-
const [
|
|
1101
|
-
return /* @__PURE__ */ e(
|
|
1102
|
-
},
|
|
1165
|
+
}, ht = ({ id: t, sourceX: l, sourceY: c, targetX: a, targetY: s }) => {
|
|
1166
|
+
const [r] = U({ sourceX: l, sourceY: c, targetX: a, targetY: s });
|
|
1167
|
+
return /* @__PURE__ */ e(H, { id: t, path: r, style: { stroke: "#b0bec5" } });
|
|
1168
|
+
}, Xe = 11.5, ne = 2, _ = 6, et = -24, oe = 40, ie = 20, le = 4, yt = ({
|
|
1103
1169
|
id: t,
|
|
1104
|
-
sourceX:
|
|
1105
|
-
sourceY:
|
|
1170
|
+
sourceX: l,
|
|
1171
|
+
sourceY: c,
|
|
1106
1172
|
targetX: a,
|
|
1107
1173
|
targetY: s,
|
|
1108
|
-
source:
|
|
1109
|
-
target:
|
|
1174
|
+
source: r,
|
|
1175
|
+
target: h,
|
|
1110
1176
|
data: o
|
|
1111
1177
|
}) => {
|
|
1112
|
-
const [i, d,
|
|
1113
|
-
|
|
1178
|
+
const [i, d, u] = U({ sourceX: l, sourceY: c, targetX: a, targetY: s }), y = o == null ? void 0 : o.label, N = y === "Pass", p = N || y === "Fail", f = o == null ? void 0 : o.onAddStepClick, w = (o == null ? void 0 : o.showPlus) !== !1 && !!f, m = (v) => {
|
|
1179
|
+
v.stopPropagation(), typeof f == "function" && f(r, {
|
|
1114
1180
|
edgeId: t,
|
|
1115
|
-
nodeId:
|
|
1116
|
-
sourceNodeId:
|
|
1117
|
-
targetNodeId:
|
|
1181
|
+
nodeId: r,
|
|
1182
|
+
sourceNodeId: r,
|
|
1183
|
+
targetNodeId: h,
|
|
1118
1184
|
position: "between",
|
|
1119
|
-
referenceNodeId:
|
|
1185
|
+
referenceNodeId: r,
|
|
1120
1186
|
referenceNodeType: o == null ? void 0 : o.referenceNodeType,
|
|
1121
1187
|
stepVisibility: o == null ? void 0 : o.stepVisibility
|
|
1122
1188
|
});
|
|
1123
|
-
},
|
|
1124
|
-
(
|
|
1189
|
+
}, S = (v) => {
|
|
1190
|
+
(v.key === "Enter" || v.key === " ") && (v.preventDefault(), m(v));
|
|
1125
1191
|
};
|
|
1126
1192
|
return /* @__PURE__ */ n("g", { className: "edge-with-plus-wrapper", children: [
|
|
1127
|
-
/* @__PURE__ */ e(
|
|
1193
|
+
/* @__PURE__ */ e(H, { id: t, path: i, style: { stroke: "#b0bec5" } }),
|
|
1128
1194
|
/* @__PURE__ */ n(
|
|
1129
1195
|
"g",
|
|
1130
1196
|
{
|
|
1131
1197
|
className: "nodrag nopan edge-plus-svg",
|
|
1132
|
-
transform: `translate(${d}, ${
|
|
1133
|
-
style: { cursor:
|
|
1134
|
-
onClick:
|
|
1135
|
-
onKeyDown:
|
|
1136
|
-
role:
|
|
1137
|
-
tabIndex:
|
|
1198
|
+
transform: `translate(${d}, ${u})`,
|
|
1199
|
+
style: { cursor: f ? "pointer" : "default", pointerEvents: "all", outline: "none" },
|
|
1200
|
+
onClick: f ? m : void 0,
|
|
1201
|
+
onKeyDown: f ? S : void 0,
|
|
1202
|
+
role: f ? "button" : void 0,
|
|
1203
|
+
tabIndex: f ? 0 : void 0,
|
|
1138
1204
|
children: [
|
|
1139
|
-
p && /* @__PURE__ */ n("g", { transform: `translate(0, ${
|
|
1205
|
+
p && /* @__PURE__ */ n("g", { transform: `translate(0, ${w ? et : 0})`, children: [
|
|
1140
1206
|
/* @__PURE__ */ e(
|
|
1141
1207
|
"rect",
|
|
1142
1208
|
{
|
|
1143
|
-
x: -
|
|
1144
|
-
y: -
|
|
1145
|
-
width:
|
|
1146
|
-
height:
|
|
1147
|
-
rx:
|
|
1148
|
-
ry:
|
|
1209
|
+
x: -oe / 2,
|
|
1210
|
+
y: -ie / 2,
|
|
1211
|
+
width: oe,
|
|
1212
|
+
height: ie,
|
|
1213
|
+
rx: le,
|
|
1214
|
+
ry: le,
|
|
1149
1215
|
fill: N ? "#ADE6C5" : "#FDBFBF"
|
|
1150
1216
|
}
|
|
1151
1217
|
),
|
|
1152
|
-
/* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: N ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children:
|
|
1218
|
+
/* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: N ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: y })
|
|
1153
1219
|
] }),
|
|
1154
|
-
|
|
1155
|
-
/* @__PURE__ */ e("circle", { r:
|
|
1156
|
-
/* @__PURE__ */ e("line", { x1: 0, y1: -
|
|
1157
|
-
/* @__PURE__ */ e("line", { x1: -
|
|
1220
|
+
w && /* @__PURE__ */ n("g", { className: "plus-icon-container", children: [
|
|
1221
|
+
/* @__PURE__ */ e("circle", { r: Xe, className: "edge-plus-circle" }),
|
|
1222
|
+
/* @__PURE__ */ e("line", { x1: 0, y1: -_, x2: 0, y2: _, strokeWidth: ne, strokeLinecap: "round", className: "plus-line" }),
|
|
1223
|
+
/* @__PURE__ */ e("line", { x1: -_, y1: 0, x2: _, y2: 0, strokeWidth: ne, strokeLinecap: "round", className: "plus-line" })
|
|
1158
1224
|
] }),
|
|
1159
|
-
|
|
1225
|
+
w && /* @__PURE__ */ n("g", { className: "edge-plus-tooltip", transform: "translate(22, 0)", children: [
|
|
1160
1226
|
/* @__PURE__ */ e("rect", { x: 0, y: -10, width: 65, height: 20, rx: 4, className: "tooltip-bg" }),
|
|
1161
1227
|
/* @__PURE__ */ e("path", { d: "M0 -4 L-4 0 L0 4 Z", className: "tooltip-bg" }),
|
|
1162
1228
|
/* @__PURE__ */ e("text", { x: 32, y: 0, textAnchor: "middle", dominantBaseline: "central", fill: "white", style: { fontSize: 10, fontWeight: 600, pointerEvents: "none" }, children: "Add Step" })
|
|
@@ -1165,51 +1231,51 @@ const He = ({ id: t, data: r }) => {
|
|
|
1165
1231
|
}
|
|
1166
1232
|
)
|
|
1167
1233
|
] });
|
|
1168
|
-
},
|
|
1234
|
+
}, ut = ({
|
|
1169
1235
|
id: t,
|
|
1170
|
-
source:
|
|
1171
|
-
target:
|
|
1236
|
+
source: l,
|
|
1237
|
+
target: c,
|
|
1172
1238
|
sourceX: a,
|
|
1173
1239
|
sourceY: s,
|
|
1174
|
-
targetX:
|
|
1175
|
-
targetY:
|
|
1240
|
+
targetX: r,
|
|
1241
|
+
targetY: h,
|
|
1176
1242
|
style: o = {},
|
|
1177
1243
|
markerEnd: i,
|
|
1178
1244
|
data: d
|
|
1179
1245
|
}) => {
|
|
1180
|
-
const
|
|
1181
|
-
const
|
|
1182
|
-
return `M ${a},${
|
|
1246
|
+
const u = (d == null ? void 0 : d.verticalRouting) ?? !1, y = 30, N = u ? (() => {
|
|
1247
|
+
const E = h - y;
|
|
1248
|
+
return `M ${a},${E} L ${r},${E} L ${r},${h}`;
|
|
1183
1249
|
})() : (() => {
|
|
1184
|
-
const
|
|
1185
|
-
return `M ${a},${s} L ${a},${
|
|
1186
|
-
})(), p = o.stroke || "#d1d5db",
|
|
1187
|
-
|
|
1250
|
+
const E = s + 30;
|
|
1251
|
+
return `M ${a},${s} L ${a},${E} L ${r},${E} L ${r},${h}`;
|
|
1252
|
+
})(), p = o.stroke || "#d1d5db", f = d == null ? void 0 : d.label, w = (d == null ? void 0 : d.isFirst) ?? !1, m = d == null ? void 0 : d.onAddStepClick, S = u ? h - y : s + 30, v = a + (r - a) * (u ? 0.25 : 0.35), D = a + (r - a) * (u ? 0.65 : 0.7), C = S, P = (E) => {
|
|
1253
|
+
E.stopPropagation(), m && m(l, {
|
|
1188
1254
|
edgeId: t,
|
|
1189
|
-
nodeId:
|
|
1190
|
-
sourceNodeId:
|
|
1191
|
-
targetNodeId:
|
|
1255
|
+
nodeId: l,
|
|
1256
|
+
sourceNodeId: l,
|
|
1257
|
+
targetNodeId: c,
|
|
1192
1258
|
position: "between",
|
|
1193
|
-
referenceNodeId:
|
|
1259
|
+
referenceNodeId: l,
|
|
1194
1260
|
filterId: d == null ? void 0 : d.filterId,
|
|
1195
1261
|
branch: d == null ? void 0 : d.branch
|
|
1196
1262
|
});
|
|
1197
|
-
},
|
|
1263
|
+
}, I = 11.5, T = 6;
|
|
1198
1264
|
return /* @__PURE__ */ n("g", { children: [
|
|
1199
1265
|
/* @__PURE__ */ e("path", { id: t, d: N, fill: "none", stroke: p, strokeWidth: 1.5, markerEnd: i }),
|
|
1200
|
-
|
|
1201
|
-
const
|
|
1202
|
-
return /* @__PURE__ */ n(
|
|
1266
|
+
f && !u && /* @__PURE__ */ e("g", { transform: `translate(${v}, ${C})`, children: (() => {
|
|
1267
|
+
const E = Math.max(44, f.length * 7 + 20);
|
|
1268
|
+
return /* @__PURE__ */ n($, { children: [
|
|
1203
1269
|
/* @__PURE__ */ e(
|
|
1204
1270
|
"rect",
|
|
1205
1271
|
{
|
|
1206
|
-
x: -
|
|
1272
|
+
x: -E / 2,
|
|
1207
1273
|
y: -11,
|
|
1208
|
-
width:
|
|
1274
|
+
width: E,
|
|
1209
1275
|
height: 22,
|
|
1210
1276
|
rx: 11,
|
|
1211
|
-
fill:
|
|
1212
|
-
stroke:
|
|
1277
|
+
fill: w ? "#e8f5e9" : "#ffebee",
|
|
1278
|
+
stroke: w ? "#81c784" : "#e57373",
|
|
1213
1279
|
strokeWidth: 1
|
|
1214
1280
|
}
|
|
1215
1281
|
),
|
|
@@ -1221,9 +1287,9 @@ const He = ({ id: t, data: r }) => {
|
|
|
1221
1287
|
textAnchor: "middle",
|
|
1222
1288
|
fontSize: 10,
|
|
1223
1289
|
fontWeight: 600,
|
|
1224
|
-
fill:
|
|
1290
|
+
fill: w ? "#2e7d32" : "#c62828",
|
|
1225
1291
|
style: { fontFamily: "sans-serif", pointerEvents: "none" },
|
|
1226
|
-
children:
|
|
1292
|
+
children: f
|
|
1227
1293
|
}
|
|
1228
1294
|
)
|
|
1229
1295
|
] });
|
|
@@ -1231,37 +1297,37 @@ const He = ({ id: t, data: r }) => {
|
|
|
1231
1297
|
m && /* @__PURE__ */ n(
|
|
1232
1298
|
"g",
|
|
1233
1299
|
{
|
|
1234
|
-
transform: `translate(${
|
|
1235
|
-
onClick:
|
|
1300
|
+
transform: `translate(${D}, ${C})`,
|
|
1301
|
+
onClick: P,
|
|
1236
1302
|
style: { cursor: "pointer", pointerEvents: "all" },
|
|
1237
1303
|
className: "nodrag nopan edge-plus-svg",
|
|
1238
1304
|
children: [
|
|
1239
|
-
/* @__PURE__ */ e("circle", { r:
|
|
1240
|
-
/* @__PURE__ */ e("line", { x1: 0, y1: -
|
|
1241
|
-
/* @__PURE__ */ e("line", { x1: -
|
|
1305
|
+
/* @__PURE__ */ e("circle", { r: I, className: "edge-plus-circle" }),
|
|
1306
|
+
/* @__PURE__ */ e("line", { x1: 0, y1: -T, x2: 0, y2: T, strokeWidth: 2, strokeLinecap: "round", className: "plus-line" }),
|
|
1307
|
+
/* @__PURE__ */ e("line", { x1: -T, y1: 0, x2: T, y2: 0, strokeWidth: 2, strokeLinecap: "round", className: "plus-line" })
|
|
1242
1308
|
]
|
|
1243
1309
|
}
|
|
1244
1310
|
)
|
|
1245
1311
|
] });
|
|
1246
1312
|
};
|
|
1247
1313
|
export {
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1314
|
+
je as A,
|
|
1315
|
+
Ke as D,
|
|
1316
|
+
pt as E,
|
|
1317
|
+
Be as F,
|
|
1318
|
+
ut as G,
|
|
1319
|
+
yt as L,
|
|
1254
1320
|
He as N,
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1321
|
+
ht as P,
|
|
1322
|
+
Ge as R,
|
|
1323
|
+
Ie as S,
|
|
1324
|
+
Re as T,
|
|
1325
|
+
Ve as W,
|
|
1326
|
+
Ae as a,
|
|
1327
|
+
Me as b,
|
|
1328
|
+
Pe as c,
|
|
1329
|
+
gt as d,
|
|
1330
|
+
at as e,
|
|
1331
|
+
ze as f
|
|
1266
1332
|
};
|
|
1267
|
-
//# sourceMappingURL=GatewayBranchEdge-
|
|
1333
|
+
//# sourceMappingURL=GatewayBranchEdge-DffZFc99.js.map
|