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