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