@notmrabhi/flowforge 0.1.106 → 0.1.108
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-BsPsPmnx.js → GatewayBranchEdge-C023FhhW.js} +653 -637
- package/dist/GatewayBranchEdge-C023FhhW.js.map +1 -0
- package/dist/GatewayBranchEdge-CdoZtIhn.js +2 -0
- package/dist/GatewayBranchEdge-CdoZtIhn.js.map +1 -0
- package/dist/{WorkflowExecutionHistory-DYp-l7mk.js → WorkflowExecutionHistory-BBeVPYVc.js} +728 -695
- package/dist/WorkflowExecutionHistory-BBeVPYVc.js.map +1 -0
- package/dist/WorkflowExecutionHistory-BrkL37Wb.js +2 -0
- package/dist/WorkflowExecutionHistory-BrkL37Wb.js.map +1 -0
- package/dist/canvas.cjs +1 -1
- package/dist/canvas.d.ts +22 -0
- package/dist/canvas.js +2 -2
- package/dist/core.d.ts +10 -0
- package/dist/defaultUi.cjs +1 -1
- package/dist/defaultUi.d.ts +2 -0
- package/dist/defaultUi.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.js +2 -2
- package/dist/nodeRegistry.d.ts +10 -0
- package/dist/templateRegistry.d.ts +2 -0
- package/package.json +1 -1
- package/dist/GatewayBranchEdge-BsPsPmnx.js.map +0 -1
- package/dist/GatewayBranchEdge-hUano0YJ.js +0 -2
- package/dist/GatewayBranchEdge-hUano0YJ.js.map +0 -1
- package/dist/WorkflowExecutionHistory-CsBnVxC5.js +0 -2
- package/dist/WorkflowExecutionHistory-CsBnVxC5.js.map +0 -1
- package/dist/WorkflowExecutionHistory-DYp-l7mk.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as n, jsx as e, Fragment as E } from "react/jsx-runtime";
|
|
2
2
|
import { Handle as m, Position as b, getStraightPath as U, BaseEdge as q } from "reactflow";
|
|
3
|
-
import { Tooltip as
|
|
3
|
+
import { Tooltip as R, Chip as G } from "@mui/material";
|
|
4
4
|
import { GrTrigger as ve } from "react-icons/gr";
|
|
5
5
|
import Ne, { createContext as ke, useContext as we } from "react";
|
|
6
6
|
import { d as Se } from "./messages-CRZgWFU-.js";
|
|
7
|
-
import { MdOutlineModeEdit as
|
|
8
|
-
import { FaCheckCircle as
|
|
7
|
+
import { MdOutlineModeEdit as C, MdInfoOutline as B, MdInput as pe, MdDeleteOutline as P, MdCheckCircle as Te, MdPeople as Ee, MdArrowForward as Ce, MdSchedule as ze, MdWebhook as he, MdNotifications as H, MdSms as Ae, MdEmail as Pe, MdContentCopy as Ie, MdHttp as Le, MdCallSplit as Re, MdAccountTree as De, MdOpenInNew as We } from "react-icons/md";
|
|
8
|
+
import { FaCheckCircle as ue, FaTimesCircle as ye } from "react-icons/fa";
|
|
9
9
|
import { FiFilter as $e } from "react-icons/fi";
|
|
10
|
-
import { a as
|
|
10
|
+
import { a as F, H as Be, B as Y } from "./canvasTokens-CAD6G24b.js";
|
|
11
11
|
const Fe = ke({
|
|
12
12
|
onEditNode: () => {
|
|
13
13
|
},
|
|
@@ -21,44 +21,44 @@ const Fe = ke({
|
|
|
21
21
|
nodeRegistry: null,
|
|
22
22
|
nodeBody: "full",
|
|
23
23
|
activeTemplate: null
|
|
24
|
-
}), S = () => we(Fe), je = () => /* @__PURE__ */
|
|
24
|
+
}), S = () => we(Fe), je = () => /* @__PURE__ */ n("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
|
|
25
25
|
/* @__PURE__ */ e(m, { type: "source", position: b.Bottom, style: { opacity: 0, left: "50%" } }),
|
|
26
26
|
/* @__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" })
|
|
27
|
-
] }), _e = () => /* @__PURE__ */
|
|
27
|
+
] }), _e = () => /* @__PURE__ */ n("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
|
|
28
28
|
/* @__PURE__ */ e(m, { type: "target", position: b.Top, style: { opacity: 0, left: "50%" } }),
|
|
29
29
|
/* @__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" })
|
|
30
30
|
] }), Ke = () => {
|
|
31
|
-
const { onClickAddTrigger: t, messages:
|
|
32
|
-
return /* @__PURE__ */
|
|
31
|
+
const { onClickAddTrigger: t, messages: i } = S();
|
|
32
|
+
return /* @__PURE__ */ n("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
|
|
33
33
|
/* @__PURE__ */ e(m, { type: "target", position: b.Top, style: { opacity: 0, left: "50%" } }),
|
|
34
|
-
/* @__PURE__ */ e(
|
|
34
|
+
/* @__PURE__ */ e(R, { title: i.addTriggerTooltip, placement: "top", arrow: !0, children: /* @__PURE__ */ n(
|
|
35
35
|
"div",
|
|
36
36
|
{
|
|
37
37
|
onClick: t,
|
|
38
38
|
role: "button",
|
|
39
39
|
tabIndex: 0,
|
|
40
|
-
onKeyDown: (
|
|
41
|
-
|
|
40
|
+
onKeyDown: (o) => {
|
|
41
|
+
o.key === "Enter" && t();
|
|
42
42
|
},
|
|
43
43
|
style: { padding: "10px 24px", borderRadius: 8, border: "1.5px dashed #d0d0d0", background: "#fff", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center", gap: 8 },
|
|
44
44
|
children: [
|
|
45
45
|
/* @__PURE__ */ e(ve, { size: 16 }),
|
|
46
|
-
/* @__PURE__ */ e("span", { className: "ff-text-black", style: { fontSize: 13 }, "data-testid": "add-trigger-btn-text", children:
|
|
46
|
+
/* @__PURE__ */ e("span", { className: "ff-text-black", style: { fontSize: 13 }, "data-testid": "add-trigger-btn-text", children: i.addTriggerButton })
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
) }),
|
|
50
50
|
/* @__PURE__ */ e(m, { type: "source", position: b.Bottom, style: { opacity: 0, left: "50%" } })
|
|
51
51
|
] });
|
|
52
52
|
}, Me = ({ id: t }) => {
|
|
53
|
-
const { onAddStep:
|
|
54
|
-
return /* @__PURE__ */
|
|
53
|
+
const { onAddStep: i } = S();
|
|
54
|
+
return /* @__PURE__ */ n(
|
|
55
55
|
"div",
|
|
56
56
|
{
|
|
57
|
-
onClick: () =>
|
|
57
|
+
onClick: () => i(t),
|
|
58
58
|
role: "button",
|
|
59
59
|
tabIndex: 0,
|
|
60
|
-
onKeyDown: (
|
|
61
|
-
|
|
60
|
+
onKeyDown: (o) => {
|
|
61
|
+
o.key === "Enter" && i(t);
|
|
62
62
|
},
|
|
63
63
|
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" },
|
|
64
64
|
children: [
|
|
@@ -68,7 +68,7 @@ const Fe = ke({
|
|
|
68
68
|
]
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
|
-
},
|
|
71
|
+
}, He = {
|
|
72
72
|
equals: "is",
|
|
73
73
|
notEquals: "is not",
|
|
74
74
|
contains: "contains",
|
|
@@ -83,7 +83,7 @@ const Fe = ke({
|
|
|
83
83
|
lessThan: "less than",
|
|
84
84
|
greaterOrEquals: "greater or equal",
|
|
85
85
|
lessOrEquals: "less or equal"
|
|
86
|
-
},
|
|
86
|
+
}, J = /* @__PURE__ */ new Set([
|
|
87
87
|
"descriptorType",
|
|
88
88
|
"title",
|
|
89
89
|
"header",
|
|
@@ -101,265 +101,265 @@ const Fe = ke({
|
|
|
101
101
|
"source",
|
|
102
102
|
"previewWorkflow",
|
|
103
103
|
"executionStatus"
|
|
104
|
-
]),
|
|
105
|
-
const
|
|
106
|
-
return Array.isArray(t) ? t.map(
|
|
107
|
-
},
|
|
108
|
-
const
|
|
109
|
-
return
|
|
104
|
+
]), O = (t, i) => i.split(".").reduce((o, c) => o == null ? void 0 : o[c], t), $ = (t) => {
|
|
105
|
+
const i = (o) => typeof o == "object" && o ? String(o.label ?? o.name ?? o.value ?? "") : o == null ? "" : String(o);
|
|
106
|
+
return Array.isArray(t) ? t.map(i).filter(Boolean) : t != null && t !== "" ? [i(t)].filter(Boolean) : [];
|
|
107
|
+
}, Q = (t, i) => {
|
|
108
|
+
const o = t._optionLabels;
|
|
109
|
+
return $(O(o, i) ?? O(t, i));
|
|
110
110
|
};
|
|
111
|
-
function
|
|
112
|
-
return (t.includes(".") ? t.slice(t.lastIndexOf(".") + 1) : t).replace(/[_-]+/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (
|
|
111
|
+
function Oe(t) {
|
|
112
|
+
return (t.includes(".") ? t.slice(t.lastIndexOf(".") + 1) : t).replace(/[_-]+/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (o) => o.toUpperCase());
|
|
113
113
|
}
|
|
114
114
|
const Ue = /* @__PURE__ */ new Set(["callout", "header", "section", "divider", "button", "group", "tabs", "info", "tree-map"]);
|
|
115
115
|
function qe(t) {
|
|
116
|
-
const
|
|
117
|
-
(Array.isArray(c) ? c : []).forEach((
|
|
118
|
-
if (!
|
|
119
|
-
const
|
|
120
|
-
(
|
|
116
|
+
const i = [], o = (c) => {
|
|
117
|
+
(Array.isArray(c) ? c : []).forEach((l) => {
|
|
118
|
+
if (!l || typeof l != "object") return;
|
|
119
|
+
const r = l;
|
|
120
|
+
(r.id || r.name) && i.push(r), Array.isArray(r.fields) && o(r.fields), Array.isArray(r.columns) && o(r.columns), Array.isArray(r.tabs) && r.tabs.forEach((d) => o(d == null ? void 0 : d.fields));
|
|
121
121
|
});
|
|
122
122
|
};
|
|
123
|
-
return
|
|
123
|
+
return o(t), i;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
const
|
|
127
|
-
if (
|
|
128
|
-
const
|
|
129
|
-
if (typeof
|
|
130
|
-
if (Array.isArray(
|
|
131
|
-
const
|
|
132
|
-
|
|
125
|
+
function Ge(t, i) {
|
|
126
|
+
const o = String(i.id || i.name || ""), c = t._optionLabels, l = c ? O(c, o) : void 0;
|
|
127
|
+
if (l != null) return $(l);
|
|
128
|
+
const r = O(t, o);
|
|
129
|
+
if (typeof r == "boolean") return r ? ["Yes"] : [];
|
|
130
|
+
if (Array.isArray(i.options) && r != null && r !== "") {
|
|
131
|
+
const d = new Map(
|
|
132
|
+
i.options.filter((s) => s && typeof s == "object").map((s) => [String(s.value), String(s.label ?? s.value)])
|
|
133
133
|
);
|
|
134
|
-
return
|
|
134
|
+
return $(r).map((s) => d.get(s) ?? s);
|
|
135
135
|
}
|
|
136
|
-
return
|
|
136
|
+
return $(r);
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
const
|
|
140
|
-
(Array.isArray(c) ? c : []).forEach((
|
|
141
|
-
|
|
138
|
+
function Ve(t) {
|
|
139
|
+
const i = [], o = (c) => {
|
|
140
|
+
(Array.isArray(c) ? c : []).forEach((l) => {
|
|
141
|
+
l && l.type === "group" ? o(l.entries) : l && i.push(l);
|
|
142
142
|
});
|
|
143
143
|
};
|
|
144
|
-
return
|
|
144
|
+
return o(t), i;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
const
|
|
148
|
-
const h =
|
|
149
|
-
return h != null && h.label ? String(h.label) :
|
|
150
|
-
},
|
|
151
|
-
if (c && typeof c == "object" && Object.entries(c).forEach(([
|
|
152
|
-
const
|
|
153
|
-
|
|
146
|
+
function Ze(t, i) {
|
|
147
|
+
const o = qe(i == null ? void 0 : i.formSchema), c = t.conditionConfig ?? t._conditionConfig, l = (i == null ? void 0 : i.label) || t.title || "Set", r = l.length <= 18 ? l : "", d = (a) => {
|
|
148
|
+
const h = o.find((y) => (y == null ? void 0 : y.id) === a || (y == null ? void 0 : y.name) === a);
|
|
149
|
+
return h != null && h.label ? String(h.label) : Oe(a);
|
|
150
|
+
}, s = [], p = new Set(c ? Object.keys(c) : []);
|
|
151
|
+
if (c && typeof c == "object" && Object.entries(c).forEach(([a, h]) => {
|
|
152
|
+
const y = Ve(h), g = Q(t, a);
|
|
153
|
+
y.length === 0 && g.length === 0 || s.push({
|
|
154
154
|
kind: "rule",
|
|
155
|
-
when:
|
|
156
|
-
field:
|
|
157
|
-
op:
|
|
158
|
-
value:
|
|
159
|
-
connector:
|
|
155
|
+
when: y.map((u) => ({
|
|
156
|
+
field: u.fieldLabel || d(u.field || ""),
|
|
157
|
+
op: He[u.operator] || u.operator || "",
|
|
158
|
+
value: u.value == null ? void 0 : $(u.value).join(", ") || void 0,
|
|
159
|
+
connector: u.connector || "and"
|
|
160
160
|
})),
|
|
161
|
-
outcomeLabel:
|
|
162
|
-
outcome:
|
|
161
|
+
outcomeLabel: r,
|
|
162
|
+
outcome: g
|
|
163
163
|
});
|
|
164
|
-
}),
|
|
165
|
-
|
|
166
|
-
const h = String(
|
|
167
|
-
if (!h ||
|
|
168
|
-
const
|
|
169
|
-
|
|
164
|
+
}), o.length)
|
|
165
|
+
o.forEach((a) => {
|
|
166
|
+
const h = String(a.id || a.name || "");
|
|
167
|
+
if (!h || J.has(h) || p.has(h) || Ue.has(a.type)) return;
|
|
168
|
+
const y = Ge(t, a);
|
|
169
|
+
y.length && s.push({ kind: "value", label: d(h), value: y });
|
|
170
170
|
});
|
|
171
171
|
else {
|
|
172
|
-
const
|
|
173
|
-
Object.keys(h).forEach((
|
|
174
|
-
const
|
|
175
|
-
if (
|
|
176
|
-
const
|
|
177
|
-
if (
|
|
178
|
-
|
|
172
|
+
const a = (h, y) => {
|
|
173
|
+
Object.keys(h).forEach((g) => {
|
|
174
|
+
const u = y ? `${y}.${g}` : g;
|
|
175
|
+
if (J.has(g) || p.has(u)) return;
|
|
176
|
+
const f = h[g];
|
|
177
|
+
if (f && typeof f == "object" && !Array.isArray(f)) {
|
|
178
|
+
a(f, u);
|
|
179
179
|
return;
|
|
180
180
|
}
|
|
181
|
-
if (typeof
|
|
182
|
-
|
|
181
|
+
if (typeof f == "boolean") {
|
|
182
|
+
f && s.push({ kind: "value", label: d(u), value: ["Yes"] });
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
|
-
const v =
|
|
186
|
-
v.length &&
|
|
185
|
+
const v = Q(t, u);
|
|
186
|
+
v.length && s.push({ kind: "value", label: d(u), value: v });
|
|
187
187
|
});
|
|
188
188
|
};
|
|
189
|
-
|
|
189
|
+
a(t, "");
|
|
190
190
|
}
|
|
191
|
-
return
|
|
191
|
+
return s;
|
|
192
192
|
}
|
|
193
|
-
function
|
|
194
|
-
const
|
|
195
|
-
return typeof
|
|
193
|
+
function Ye(t, i) {
|
|
194
|
+
const o = i == null ? void 0 : i.nodeBody;
|
|
195
|
+
return typeof o == "function" ? o(t) : Array.isArray(o) ? o : Ze(t, i);
|
|
196
196
|
}
|
|
197
|
-
const A = { color: "#64748b" },
|
|
198
|
-
function
|
|
197
|
+
const A = { color: "#64748b" }, V = { color: "#0f172a", fontWeight: 600 };
|
|
198
|
+
function W({ text: t, style: i }) {
|
|
199
199
|
return /* @__PURE__ */ e(
|
|
200
200
|
"span",
|
|
201
201
|
{
|
|
202
202
|
title: t,
|
|
203
|
-
style: { ...
|
|
203
|
+
style: { ...i, display: "inline-block", maxWidth: 230, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", verticalAlign: "bottom" },
|
|
204
204
|
children: t
|
|
205
205
|
}
|
|
206
206
|
);
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
return /* @__PURE__ */ e(
|
|
210
|
-
|
|
208
|
+
function X({ conditions: t }) {
|
|
209
|
+
return /* @__PURE__ */ e(E, { children: t.map((i, o) => /* @__PURE__ */ n(Ne.Fragment, { children: [
|
|
210
|
+
o > 0 && /* @__PURE__ */ n("span", { style: A, children: [
|
|
211
211
|
" ",
|
|
212
|
-
|
|
212
|
+
i.connector ?? "and",
|
|
213
213
|
" "
|
|
214
214
|
] }),
|
|
215
|
-
/* @__PURE__ */ e("span", { style:
|
|
216
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ e("span", { style: V, children: i.field }),
|
|
216
|
+
/* @__PURE__ */ n("span", { style: A, children: [
|
|
217
217
|
" ",
|
|
218
|
-
|
|
218
|
+
i.op,
|
|
219
219
|
" "
|
|
220
220
|
] }),
|
|
221
|
-
|
|
222
|
-
] },
|
|
221
|
+
i.value != null && /* @__PURE__ */ e("span", { style: V, children: i.value })
|
|
222
|
+
] }, o)) });
|
|
223
223
|
}
|
|
224
|
-
function ge({ data: t, descriptor:
|
|
225
|
-
const
|
|
226
|
-
if (!
|
|
224
|
+
function ge({ data: t, descriptor: i, accent: o = "#2563eb", emptyText: c }) {
|
|
225
|
+
const l = Ye(t || {}, i);
|
|
226
|
+
if (!l.length)
|
|
227
227
|
return /* @__PURE__ */ e("span", { style: { color: "#94a3b8" }, children: c ?? "Click edit to configure" });
|
|
228
|
-
const
|
|
229
|
-
return /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children:
|
|
230
|
-
if (
|
|
231
|
-
return /* @__PURE__ */
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
|
|
228
|
+
const r = { color: o, fontWeight: 600 };
|
|
229
|
+
return /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: l.map((d, s) => {
|
|
230
|
+
if (d.kind === "value")
|
|
231
|
+
return /* @__PURE__ */ n("div", { style: { lineHeight: 1.5 }, children: [
|
|
232
|
+
/* @__PURE__ */ n("span", { style: A, children: [
|
|
233
|
+
d.label,
|
|
234
234
|
" "
|
|
235
235
|
] }),
|
|
236
|
-
/* @__PURE__ */ e(
|
|
237
|
-
] },
|
|
238
|
-
if (
|
|
239
|
-
return /* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ e(W, { text: d.value.join(", "), style: V })
|
|
237
|
+
] }, s);
|
|
238
|
+
if (d.fallback)
|
|
239
|
+
return /* @__PURE__ */ n("div", { style: { lineHeight: 1.5 }, children: [
|
|
240
240
|
/* @__PURE__ */ e("span", { style: A, children: "Otherwise → " }),
|
|
241
|
-
/* @__PURE__ */ e(
|
|
242
|
-
] },
|
|
243
|
-
const
|
|
244
|
-
return
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
-
|
|
241
|
+
/* @__PURE__ */ e(W, { text: d.outcome.join(", "), style: r })
|
|
242
|
+
] }, s);
|
|
243
|
+
const p = d.outcome.length > 0, a = !!d.when && d.when.length > 0;
|
|
244
|
+
return d.outcomeLabel ? /* @__PURE__ */ n("div", { style: { lineHeight: 1.5 }, children: [
|
|
245
|
+
/* @__PURE__ */ n("span", { style: A, children: [
|
|
246
|
+
d.outcomeLabel,
|
|
247
247
|
" "
|
|
248
248
|
] }),
|
|
249
|
-
|
|
250
|
-
|
|
249
|
+
p && /* @__PURE__ */ e(W, { text: d.outcome.join(", "), style: r }),
|
|
250
|
+
a && /* @__PURE__ */ n(E, { children: [
|
|
251
251
|
/* @__PURE__ */ e("span", { style: A, children: " when " }),
|
|
252
|
-
/* @__PURE__ */ e(
|
|
252
|
+
/* @__PURE__ */ e(X, { conditions: d.when })
|
|
253
253
|
] })
|
|
254
|
-
] },
|
|
254
|
+
] }, s) : a ? /* @__PURE__ */ n("div", { style: { lineHeight: 1.5 }, children: [
|
|
255
255
|
/* @__PURE__ */ e("span", { style: A, children: "When " }),
|
|
256
|
-
/* @__PURE__ */ e(
|
|
257
|
-
|
|
256
|
+
/* @__PURE__ */ e(X, { conditions: d.when }),
|
|
257
|
+
p && /* @__PURE__ */ n(E, { children: [
|
|
258
258
|
/* @__PURE__ */ e("span", { style: A, children: " → " }),
|
|
259
|
-
/* @__PURE__ */ e(
|
|
259
|
+
/* @__PURE__ */ e(W, { text: d.outcome.join(", "), style: r })
|
|
260
260
|
] })
|
|
261
|
-
] },
|
|
261
|
+
] }, s) : /* @__PURE__ */ e("div", { style: { lineHeight: 1.5 }, children: /* @__PURE__ */ e(W, { text: d.outcome.join(", "), style: r }) }, s);
|
|
262
262
|
}) });
|
|
263
263
|
}
|
|
264
264
|
const Je = "#ea580c";
|
|
265
|
-
function
|
|
266
|
-
return t ? t.replace(/[_-]+/g, " ").toLowerCase().replace(/\b\w/g, (
|
|
265
|
+
function me(t) {
|
|
266
|
+
return t ? t.replace(/[_-]+/g, " ").toLowerCase().replace(/\b\w/g, (i) => i.toUpperCase()) : "";
|
|
267
267
|
}
|
|
268
268
|
function Qe(t) {
|
|
269
269
|
if (typeof t != "string" && t.label) return t.label;
|
|
270
|
-
const
|
|
271
|
-
return
|
|
270
|
+
const i = typeof t == "string" ? t : t.value ?? "";
|
|
271
|
+
return me(i);
|
|
272
272
|
}
|
|
273
|
-
const Xe = ({ id: t, data:
|
|
274
|
-
const { onClickAddTrigger:
|
|
275
|
-
type:
|
|
276
|
-
eventType:
|
|
277
|
-
sources:
|
|
278
|
-
label:
|
|
273
|
+
const Xe = ({ id: t, data: i }) => {
|
|
274
|
+
const { onClickAddTrigger: o, onEditNode: c, messages: l, activeTemplate: r } = S(), {
|
|
275
|
+
type: d,
|
|
276
|
+
eventType: s,
|
|
277
|
+
sources: p,
|
|
278
|
+
label: a,
|
|
279
279
|
source: h,
|
|
280
|
-
previewWorkflow:
|
|
281
|
-
executionStatus:
|
|
282
|
-
infoText:
|
|
283
|
-
} =
|
|
284
|
-
x == null || x.stopPropagation(),
|
|
285
|
-
}, v = Array.isArray(
|
|
286
|
-
if (
|
|
280
|
+
previewWorkflow: y,
|
|
281
|
+
executionStatus: g,
|
|
282
|
+
infoText: u = "This node decides the flow trigger type and configuration."
|
|
283
|
+
} = i ?? {}, f = (x) => {
|
|
284
|
+
x == null || x.stopPropagation(), d === "scheduler" ? c(t) : o();
|
|
285
|
+
}, v = Array.isArray(p) && p.length > 0, w = !!(a || h), T = d === "scheduler" ? (l == null ? void 0 : l.schedulerTriggerTitle) ?? "Scheduler Trigger" : d === "event" || v || w ? (l == null ? void 0 : l.eventTriggerSourceTitle) ?? "Event Trigger Source" : (l == null ? void 0 : l.selectTriggerTitle) ?? "Select Trigger", k = (() => {
|
|
286
|
+
if (d === "scheduler")
|
|
287
287
|
return /* @__PURE__ */ e(
|
|
288
288
|
ge,
|
|
289
289
|
{
|
|
290
|
-
data:
|
|
290
|
+
data: i,
|
|
291
291
|
accent: Je,
|
|
292
|
-
emptyText: (
|
|
292
|
+
emptyText: (l == null ? void 0 : l.schedulerToBeConfigured) ?? "Scheduler to be configured"
|
|
293
293
|
}
|
|
294
294
|
);
|
|
295
|
-
if (
|
|
296
|
-
const x =
|
|
297
|
-
return /* @__PURE__ */
|
|
298
|
-
/* @__PURE__ */
|
|
295
|
+
if (d === "event" || v) {
|
|
296
|
+
const x = a || me(s);
|
|
297
|
+
return /* @__PURE__ */ n("div", { children: [
|
|
298
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
|
|
299
299
|
/* @__PURE__ */ e("span", { style: { fontWeight: 600 }, children: x }),
|
|
300
300
|
/* @__PURE__ */ e("span", { className: "ff-ms-2 ff-text-muted", style: { fontSize: 12 }, children: "via" })
|
|
301
301
|
] }),
|
|
302
|
-
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-2", style: { gap: 4 }, children: v ?
|
|
303
|
-
|
|
302
|
+
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-2", style: { gap: 4 }, children: v ? p.map((I, D) => /* @__PURE__ */ e(
|
|
303
|
+
G,
|
|
304
304
|
{
|
|
305
|
-
label: Qe(
|
|
305
|
+
label: Qe(I),
|
|
306
306
|
variant: "outlined",
|
|
307
307
|
size: "small",
|
|
308
308
|
className: "ff-text-dark"
|
|
309
309
|
},
|
|
310
|
-
|
|
311
|
-
)) : /* @__PURE__ */ e("span", { className: "ff-text-muted", style: { fontSize: 12 }, children: (
|
|
310
|
+
D
|
|
311
|
+
)) : /* @__PURE__ */ e("span", { className: "ff-text-muted", style: { fontSize: 12 }, children: (l == null ? void 0 : l.noSourceSelected) ?? "No source selected" }) })
|
|
312
312
|
] });
|
|
313
313
|
}
|
|
314
|
-
return
|
|
315
|
-
|
|
316
|
-
h && /* @__PURE__ */ e(
|
|
314
|
+
return w ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-wrap ff-align-items-center", style: { gap: 6 }, children: [
|
|
315
|
+
a && /* @__PURE__ */ e("span", { style: { fontWeight: 600 }, children: a }),
|
|
316
|
+
h && /* @__PURE__ */ e(G, { label: h, variant: "outlined", size: "small" })
|
|
317
317
|
] }) : /* @__PURE__ */ e(
|
|
318
318
|
"span",
|
|
319
319
|
{
|
|
320
320
|
role: "button",
|
|
321
321
|
tabIndex: 0,
|
|
322
|
-
onClick:
|
|
322
|
+
onClick: f,
|
|
323
323
|
onKeyDown: (x) => {
|
|
324
|
-
(x.key === "Enter" || x.key === " ") &&
|
|
324
|
+
(x.key === "Enter" || x.key === " ") && f(x);
|
|
325
325
|
},
|
|
326
326
|
style: { cursor: "pointer", color: "#1e88e5" },
|
|
327
|
-
children: (
|
|
327
|
+
children: (l == null ? void 0 : l.selectTriggerCta) ?? "Click to select a trigger to start your workflow"
|
|
328
328
|
}
|
|
329
329
|
);
|
|
330
|
-
})(), z =
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
] }) : /* @__PURE__ */
|
|
334
|
-
!
|
|
330
|
+
})(), z = g ? /* @__PURE__ */ n(E, { children: [
|
|
331
|
+
g.status === "success" && /* @__PURE__ */ e(ue, { size: 16, color: "#1DBF60", style: { marginRight: 8 } }),
|
|
332
|
+
g.status === "failed" && /* @__PURE__ */ e(ye, { size: 16, color: "#f44336", style: { marginRight: 8 } })
|
|
333
|
+
] }) : /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
|
|
334
|
+
!y && /* @__PURE__ */ e(
|
|
335
335
|
"div",
|
|
336
336
|
{
|
|
337
337
|
role: "button",
|
|
338
338
|
tabIndex: 0,
|
|
339
|
-
onClick:
|
|
339
|
+
onClick: f,
|
|
340
340
|
onKeyDown: (x) => {
|
|
341
|
-
(x.key === "Enter" || x.key === " ") &&
|
|
341
|
+
(x.key === "Enter" || x.key === " ") && f(x);
|
|
342
342
|
},
|
|
343
343
|
className: "ff-me-2",
|
|
344
344
|
style: { cursor: "pointer", color: "#212121" },
|
|
345
345
|
"aria-label": "Edit trigger",
|
|
346
|
-
children: /* @__PURE__ */ e(
|
|
346
|
+
children: /* @__PURE__ */ e(C, { size: 16 })
|
|
347
347
|
}
|
|
348
348
|
),
|
|
349
|
-
/* @__PURE__ */ e(
|
|
349
|
+
/* @__PURE__ */ e(R, { title: /* @__PURE__ */ e("div", { children: u }), placement: "right", arrow: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
|
|
350
350
|
] });
|
|
351
|
-
return
|
|
351
|
+
return r != null && r.renderFullTriggerNode ? /* @__PURE__ */ n("div", { style: { position: "relative", display: "inline-block" }, children: [
|
|
352
352
|
/* @__PURE__ */ e(m, { type: "target", position: b.Top, style: { opacity: 0 } }),
|
|
353
|
-
|
|
354
|
-
data:
|
|
355
|
-
onEdit:
|
|
353
|
+
r.renderFullTriggerNode({
|
|
354
|
+
data: i,
|
|
355
|
+
onEdit: f
|
|
356
356
|
}),
|
|
357
357
|
/* @__PURE__ */ e(m, { type: "source", position: b.Bottom, style: { opacity: 0 }, id: "1" })
|
|
358
|
-
] }) : /* @__PURE__ */
|
|
358
|
+
] }) : /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
|
|
359
359
|
/* @__PURE__ */ e(m, { type: "target", position: b.Top, style: { opacity: 0 } }),
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #a5d6a7", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
|
|
361
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "12px 14px" }, children: [
|
|
362
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
363
363
|
/* @__PURE__ */ e(
|
|
364
364
|
"div",
|
|
365
365
|
{
|
|
@@ -373,10 +373,10 @@ const Xe = ({ id: t, data: n }) => {
|
|
|
373
373
|
justifyContent: "center",
|
|
374
374
|
flexShrink: 0
|
|
375
375
|
},
|
|
376
|
-
children: /* @__PURE__ */ e(
|
|
376
|
+
children: /* @__PURE__ */ e(pe, { size: 16, color: "#388e3c" })
|
|
377
377
|
}
|
|
378
378
|
),
|
|
379
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children:
|
|
379
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: T })
|
|
380
380
|
] }),
|
|
381
381
|
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center", children: z })
|
|
382
382
|
] }),
|
|
@@ -392,35 +392,35 @@ const Xe = ({ id: t, data: n }) => {
|
|
|
392
392
|
borderRadius: 6,
|
|
393
393
|
textAlign: "left"
|
|
394
394
|
},
|
|
395
|
-
children:
|
|
395
|
+
children: k
|
|
396
396
|
}
|
|
397
397
|
)
|
|
398
398
|
] }),
|
|
399
399
|
/* @__PURE__ */ e(m, { type: "source", position: b.Bottom, style: { opacity: 0 }, id: "1" })
|
|
400
400
|
] });
|
|
401
401
|
};
|
|
402
|
-
function
|
|
403
|
-
return t ? t.replace(/[_-]+/g, " ").replace(/\b\w/g, (
|
|
402
|
+
function be(t) {
|
|
403
|
+
return t ? t.replace(/[_-]+/g, " ").replace(/\b\w/g, (i) => i.toUpperCase()) : "";
|
|
404
404
|
}
|
|
405
405
|
function et(t) {
|
|
406
406
|
if (typeof t != "string" && t.label) return t.label;
|
|
407
|
-
const
|
|
408
|
-
return
|
|
407
|
+
const i = typeof t == "string" ? t : t.value ?? "";
|
|
408
|
+
return be(i);
|
|
409
409
|
}
|
|
410
410
|
const tt = ({ data: t }) => {
|
|
411
411
|
const {
|
|
412
|
-
header:
|
|
413
|
-
title:
|
|
412
|
+
header: i = "Event",
|
|
413
|
+
title: o,
|
|
414
414
|
eventType: c,
|
|
415
|
-
sources:
|
|
416
|
-
executionStatus:
|
|
417
|
-
infoText:
|
|
418
|
-
} = t ?? {},
|
|
419
|
-
return /* @__PURE__ */
|
|
415
|
+
sources: l,
|
|
416
|
+
executionStatus: r,
|
|
417
|
+
infoText: d = "This event is raised by the system. It cannot be configured."
|
|
418
|
+
} = t ?? {}, s = o || be(c) || "—";
|
|
419
|
+
return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
|
|
420
420
|
/* @__PURE__ */ e(m, { type: "target", position: b.Top, style: { opacity: 0 } }),
|
|
421
|
-
/* @__PURE__ */
|
|
422
|
-
/* @__PURE__ */
|
|
423
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #a5d6a7", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
|
|
422
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "12px 14px" }, children: [
|
|
423
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
424
424
|
/* @__PURE__ */ e(
|
|
425
425
|
"div",
|
|
426
426
|
{
|
|
@@ -434,18 +434,18 @@ const tt = ({ data: t }) => {
|
|
|
434
434
|
justifyContent: "center",
|
|
435
435
|
flexShrink: 0
|
|
436
436
|
},
|
|
437
|
-
children: /* @__PURE__ */ e(
|
|
437
|
+
children: /* @__PURE__ */ e(pe, { size: 16, color: "#388e3c" })
|
|
438
438
|
}
|
|
439
439
|
),
|
|
440
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children:
|
|
440
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: i })
|
|
441
441
|
] }),
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
(
|
|
444
|
-
(
|
|
445
|
-
!
|
|
442
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
|
|
443
|
+
(r == null ? void 0 : r.status) === "success" && /* @__PURE__ */ e(ue, { size: 16, color: "#1DBF60", style: { marginRight: 8 } }),
|
|
444
|
+
(r == null ? void 0 : r.status) === "failed" && /* @__PURE__ */ e(ye, { size: 16, color: "#f44336", style: { marginRight: 8 } }),
|
|
445
|
+
!r && /* @__PURE__ */ e(R, { title: /* @__PURE__ */ e("div", { children: d }), placement: "right", arrow: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
|
|
446
446
|
] })
|
|
447
447
|
] }),
|
|
448
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ n(
|
|
449
449
|
"div",
|
|
450
450
|
{
|
|
451
451
|
style: {
|
|
@@ -458,18 +458,18 @@ const tt = ({ data: t }) => {
|
|
|
458
458
|
textAlign: "left"
|
|
459
459
|
},
|
|
460
460
|
children: [
|
|
461
|
-
/* @__PURE__ */ e("div", { style: { fontWeight: 600 }, children:
|
|
462
|
-
Array.isArray(
|
|
461
|
+
/* @__PURE__ */ e("div", { style: { fontWeight: 600 }, children: s }),
|
|
462
|
+
Array.isArray(l) && l.length > 0 && /* @__PURE__ */ n(E, { children: [
|
|
463
463
|
/* @__PURE__ */ e("div", { className: "ff-text-muted", style: { fontSize: 12, marginTop: 4 }, children: "via" }),
|
|
464
|
-
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-1", style: { gap: 4 }, children:
|
|
465
|
-
|
|
464
|
+
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-1", style: { gap: 4 }, children: l.map((p, a) => /* @__PURE__ */ e(
|
|
465
|
+
G,
|
|
466
466
|
{
|
|
467
|
-
label: et(
|
|
467
|
+
label: et(p),
|
|
468
468
|
variant: "outlined",
|
|
469
469
|
size: "small",
|
|
470
470
|
className: "ff-text-dark"
|
|
471
471
|
},
|
|
472
|
-
|
|
472
|
+
a
|
|
473
473
|
)) })
|
|
474
474
|
] })
|
|
475
475
|
]
|
|
@@ -478,74 +478,87 @@ const tt = ({ data: t }) => {
|
|
|
478
478
|
] }),
|
|
479
479
|
/* @__PURE__ */ e(m, { type: "source", position: b.Bottom, style: { opacity: 0 }, id: "1" })
|
|
480
480
|
] });
|
|
481
|
-
},
|
|
482
|
-
const
|
|
483
|
-
|
|
481
|
+
}, Z = ({ rail: t, cardWidth: i }) => {
|
|
482
|
+
const o = i / 2;
|
|
483
|
+
i / 2 + t.indent;
|
|
484
484
|
const c = "var(--ff-edge-color, #b0bec5)";
|
|
485
|
-
return /* @__PURE__ */
|
|
485
|
+
return /* @__PURE__ */ n(
|
|
486
486
|
"svg",
|
|
487
487
|
{
|
|
488
|
-
width:
|
|
488
|
+
width: i + t.indent + 200,
|
|
489
489
|
height: t.height,
|
|
490
490
|
style: { position: "absolute", left: 0, top: "100%", pointerEvents: "none", overflow: "visible" },
|
|
491
491
|
children: [
|
|
492
|
-
/* @__PURE__ */ e("line", { x1:
|
|
493
|
-
t.branches.map((
|
|
494
|
-
const
|
|
495
|
-
return /* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ e("line", { x1: o, y1: 0, x2: o, y2: t.height, stroke: c, strokeWidth: 1.5 }),
|
|
493
|
+
t.branches.map((l, r) => {
|
|
494
|
+
const d = l.y;
|
|
495
|
+
return /* @__PURE__ */ n("g", { transform: `translate(0, ${d})`, children: [
|
|
496
496
|
/* @__PURE__ */ e(
|
|
497
497
|
"rect",
|
|
498
498
|
{
|
|
499
|
-
x:
|
|
499
|
+
x: o - 5,
|
|
500
500
|
y: -5,
|
|
501
501
|
width: 10,
|
|
502
502
|
height: 10,
|
|
503
503
|
fill: "#fff",
|
|
504
504
|
stroke: c,
|
|
505
505
|
strokeWidth: 1.5,
|
|
506
|
-
transform: `rotate(45, ${
|
|
506
|
+
transform: `rotate(45, ${o}, 0)`
|
|
507
507
|
}
|
|
508
508
|
),
|
|
509
509
|
/* @__PURE__ */ e(
|
|
510
510
|
"text",
|
|
511
511
|
{
|
|
512
|
-
x:
|
|
512
|
+
x: o + 14,
|
|
513
513
|
y: 4,
|
|
514
514
|
fontSize: 12,
|
|
515
515
|
fontWeight: 500,
|
|
516
516
|
fill: "var(--ff-text, #212121)",
|
|
517
517
|
style: { fontFamily: "sans-serif" },
|
|
518
|
-
children:
|
|
518
|
+
children: l.label
|
|
519
519
|
}
|
|
520
520
|
)
|
|
521
|
-
] },
|
|
521
|
+
] }, r);
|
|
522
522
|
})
|
|
523
523
|
]
|
|
524
524
|
}
|
|
525
525
|
);
|
|
526
|
-
}, nt = ({ id: t, data:
|
|
527
|
-
const { onEditNode:
|
|
528
|
-
|
|
526
|
+
}, nt = ({ id: t, data: i }) => {
|
|
527
|
+
const { onEditNode: o, onDeleteNode: c, nodeRegistry: l } = S(), { conditions: r = [], infoText: d = "Filter conditions applied to workflow data", _branchRail: s, descriptorType: p, branchStyle: a } = i, h = p ? l == null ? void 0 : l.forType(p) : void 0, y = a === "inline-gate", g = /* @__PURE__ */ n(E, { children: [
|
|
528
|
+
/* @__PURE__ */ e(m, { id: "pass", type: "source", position: b.Bottom, style: { opacity: 0 } }),
|
|
529
|
+
/* @__PURE__ */ e(m, { id: "fail", type: "source", position: b.Right, style: { opacity: 0, top: "50%" } })
|
|
530
|
+
] });
|
|
531
|
+
return h != null && h.renderFullNode ? /* @__PURE__ */ n("div", { style: { position: "relative", display: "inline-block" }, children: [
|
|
532
|
+
/* @__PURE__ */ e(m, { type: "target", position: b.Top, style: { opacity: 0 } }),
|
|
533
|
+
h.renderFullNode({
|
|
534
|
+
id: t,
|
|
535
|
+
data: i,
|
|
536
|
+
onEdit: () => o(t),
|
|
537
|
+
onDelete: () => c(t)
|
|
538
|
+
}),
|
|
539
|
+
g,
|
|
540
|
+
!y && s && /* @__PURE__ */ e(Z, { rail: s, cardWidth: 350 })
|
|
541
|
+
] }) : /* @__PURE__ */ n("div", { style: { width: 350, position: "relative" }, children: [
|
|
529
542
|
/* @__PURE__ */ e(m, { type: "target", position: b.Top, style: { opacity: 0 } }),
|
|
530
|
-
/* @__PURE__ */
|
|
531
|
-
/* @__PURE__ */
|
|
532
|
-
/* @__PURE__ */
|
|
543
|
+
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #ffe082", borderRadius: 8, background: "#fff" }, children: [
|
|
544
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
|
|
545
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
|
|
533
546
|
/* @__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($e, { className: "ff-text-warning", size: 16 }) }),
|
|
534
547
|
/* @__PURE__ */ e("span", { className: "ff-ms-2 ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "Filter" })
|
|
535
548
|
] }),
|
|
536
|
-
/* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
|
|
537
550
|
/* @__PURE__ */ e(
|
|
538
551
|
"div",
|
|
539
552
|
{
|
|
540
553
|
role: "button",
|
|
541
554
|
tabIndex: 0,
|
|
542
|
-
onClick: (
|
|
543
|
-
|
|
555
|
+
onClick: (u) => {
|
|
556
|
+
u.stopPropagation(), o(t);
|
|
544
557
|
},
|
|
545
|
-
onKeyDown: (
|
|
546
|
-
|
|
558
|
+
onKeyDown: (u) => {
|
|
559
|
+
u.key === "Enter" && (u.stopPropagation(), o(t));
|
|
547
560
|
},
|
|
548
|
-
children: /* @__PURE__ */ e(
|
|
561
|
+
children: /* @__PURE__ */ e(C, { size: 16 })
|
|
549
562
|
}
|
|
550
563
|
),
|
|
551
564
|
/* @__PURE__ */ e(
|
|
@@ -554,60 +567,60 @@ const tt = ({ data: t }) => {
|
|
|
554
567
|
className: "ff-ms-2",
|
|
555
568
|
role: "button",
|
|
556
569
|
tabIndex: 0,
|
|
557
|
-
onClick: (
|
|
558
|
-
|
|
570
|
+
onClick: (u) => {
|
|
571
|
+
u.stopPropagation(), c(t);
|
|
559
572
|
},
|
|
560
|
-
onKeyDown: (
|
|
561
|
-
|
|
573
|
+
onKeyDown: (u) => {
|
|
574
|
+
u.key === "Enter" && (u.stopPropagation(), c(t));
|
|
562
575
|
},
|
|
563
576
|
children: /* @__PURE__ */ e(P, { color: "red", size: 16 })
|
|
564
577
|
}
|
|
565
578
|
),
|
|
566
|
-
/* @__PURE__ */ e(
|
|
579
|
+
/* @__PURE__ */ e(R, { title: d, placement: "right", arrow: !0, children: /* @__PURE__ */ e("div", { className: "ff-ms-2", children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
|
|
567
580
|
] })
|
|
568
581
|
] }),
|
|
569
|
-
/* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: r.length === 0 ? /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "No conditions configured" }) : r.map((
|
|
570
|
-
/* @__PURE__ */ e("p", { className: "ff-m-0 ff-fw-bold ff-me-1 ff-text-truncate", style: { maxWidth: 100 }, title:
|
|
571
|
-
/* @__PURE__ */ e("span", { className: "ff-text-muted", children:
|
|
572
|
-
/* @__PURE__ */ e("p", { className: "ff-text-dark ff-text-truncate ff-mx-1 ff-m-0", title:
|
|
573
|
-
f < r.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:
|
|
582
|
+
/* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: r.length === 0 ? /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "No conditions configured" }) : r.map((u, f) => /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-mb-1", children: [
|
|
583
|
+
/* @__PURE__ */ e("p", { className: "ff-m-0 ff-fw-bold ff-me-1 ff-text-truncate", style: { maxWidth: 100 }, title: u.field, children: u.field }),
|
|
584
|
+
/* @__PURE__ */ e("span", { className: "ff-text-muted", children: u.operator }),
|
|
585
|
+
/* @__PURE__ */ e("p", { className: "ff-text-dark ff-text-truncate ff-mx-1 ff-m-0", title: u.value, children: u.value }),
|
|
586
|
+
f < r.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: u.logicalOperator })
|
|
574
587
|
] }, f)) })
|
|
575
588
|
] }),
|
|
576
|
-
|
|
577
|
-
|
|
589
|
+
g,
|
|
590
|
+
!y && s && /* @__PURE__ */ e(Z, { rail: s, cardWidth: 350 })
|
|
578
591
|
] });
|
|
579
|
-
},
|
|
580
|
-
const { onEditNode:
|
|
581
|
-
return h != null && h.renderFullNode ? /* @__PURE__ */
|
|
592
|
+
}, it = ({ id: t, data: i }) => {
|
|
593
|
+
const { onEditNode: o, onDeleteNode: c, nodeRegistry: l, nodeBody: r = "full", messages: d } = S(), { title: s = "Task", descriptorType: p, infoText: a = "" } = i, h = p ? l == null ? void 0 : l.forType(p) : void 0, y = h == null ? void 0 : h.icon;
|
|
594
|
+
return h != null && h.renderFullNode ? /* @__PURE__ */ n("div", { style: { position: "relative", display: "inline-block" }, children: [
|
|
582
595
|
/* @__PURE__ */ e(m, { type: "target", position: b.Top, style: { opacity: 0 } }),
|
|
583
596
|
h.renderFullNode({
|
|
584
597
|
id: t,
|
|
585
|
-
data:
|
|
586
|
-
onEdit: () =>
|
|
598
|
+
data: i,
|
|
599
|
+
onEdit: () => o(t),
|
|
587
600
|
onDelete: () => c(t)
|
|
588
601
|
}),
|
|
589
602
|
/* @__PURE__ */ e(m, { type: "source", position: b.Bottom, style: { opacity: 0 } })
|
|
590
|
-
] }) : /* @__PURE__ */
|
|
603
|
+
] }) : /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
|
|
591
604
|
/* @__PURE__ */ e(m, { type: "target", position: b.Top, style: { opacity: 0 } }),
|
|
592
|
-
/* @__PURE__ */
|
|
593
|
-
/* @__PURE__ */
|
|
594
|
-
/* @__PURE__ */
|
|
595
|
-
|
|
596
|
-
/* @__PURE__ */ e("span", { className: "ff-text-dark", style: { fontSize: 14, fontWeight: 500 }, children:
|
|
605
|
+
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
|
|
606
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 8px" }, children: [
|
|
607
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
608
|
+
y && /* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center" }, children: y }),
|
|
609
|
+
/* @__PURE__ */ e("span", { className: "ff-text-dark", style: { fontSize: 14, fontWeight: 500 }, children: s })
|
|
597
610
|
] }),
|
|
598
|
-
/* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
|
|
599
612
|
/* @__PURE__ */ e(
|
|
600
613
|
"div",
|
|
601
614
|
{
|
|
602
615
|
role: "button",
|
|
603
616
|
tabIndex: 0,
|
|
604
|
-
onClick: (
|
|
605
|
-
|
|
617
|
+
onClick: (g) => {
|
|
618
|
+
g.stopPropagation(), o(t);
|
|
606
619
|
},
|
|
607
|
-
onKeyDown: (
|
|
608
|
-
|
|
620
|
+
onKeyDown: (g) => {
|
|
621
|
+
g.key === "Enter" && (g.stopPropagation(), o(t));
|
|
609
622
|
},
|
|
610
|
-
children: /* @__PURE__ */ e(
|
|
623
|
+
children: /* @__PURE__ */ e(C, { size: 16 })
|
|
611
624
|
}
|
|
612
625
|
),
|
|
613
626
|
/* @__PURE__ */ e(
|
|
@@ -616,19 +629,19 @@ const tt = ({ data: t }) => {
|
|
|
616
629
|
className: "ff-ms-2",
|
|
617
630
|
role: "button",
|
|
618
631
|
tabIndex: 0,
|
|
619
|
-
onClick: (
|
|
620
|
-
|
|
632
|
+
onClick: (g) => {
|
|
633
|
+
g.stopPropagation(), c(t);
|
|
621
634
|
},
|
|
622
|
-
onKeyDown: (
|
|
623
|
-
|
|
635
|
+
onKeyDown: (g) => {
|
|
636
|
+
g.key === "Enter" && (g.stopPropagation(), c(t));
|
|
624
637
|
},
|
|
625
638
|
children: /* @__PURE__ */ e(P, { color: "red", size: 16 })
|
|
626
639
|
}
|
|
627
640
|
),
|
|
628
|
-
|
|
641
|
+
a && /* @__PURE__ */ e(R, { title: a, placement: "right", arrow: !0, children: /* @__PURE__ */ e("div", { className: "ff-ms-2", children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
|
|
629
642
|
] })
|
|
630
643
|
] }),
|
|
631
|
-
|
|
644
|
+
r !== "title-only" && /* @__PURE__ */ e(
|
|
632
645
|
"div",
|
|
633
646
|
{
|
|
634
647
|
style: {
|
|
@@ -641,13 +654,13 @@ const tt = ({ data: t }) => {
|
|
|
641
654
|
color: "#212529",
|
|
642
655
|
lineHeight: 1.4
|
|
643
656
|
},
|
|
644
|
-
children: h != null && h.renderNode ? h.renderNode(
|
|
657
|
+
children: h != null && h.renderNode ? h.renderNode(i) : /* @__PURE__ */ e(
|
|
645
658
|
ge,
|
|
646
659
|
{
|
|
647
|
-
data:
|
|
660
|
+
data: i,
|
|
648
661
|
descriptor: h,
|
|
649
662
|
accent: "#2563eb",
|
|
650
|
-
emptyText: (
|
|
663
|
+
emptyText: (d == null ? void 0 : d.clickEditToConfigure) ?? "Click edit to configure"
|
|
651
664
|
}
|
|
652
665
|
)
|
|
653
666
|
}
|
|
@@ -655,31 +668,31 @@ const tt = ({ data: t }) => {
|
|
|
655
668
|
] }),
|
|
656
669
|
/* @__PURE__ */ e(m, { type: "source", position: b.Bottom, style: { opacity: 0 } })
|
|
657
670
|
] });
|
|
658
|
-
},
|
|
659
|
-
function
|
|
660
|
-
const c = (t == null ? void 0 : t.toLowerCase()) || (
|
|
661
|
-
return c ? (
|
|
671
|
+
}, ee = 2;
|
|
672
|
+
function ot(t, i, o) {
|
|
673
|
+
const c = (t == null ? void 0 : t.toLowerCase()) || (i ? "sequential" : null);
|
|
674
|
+
return c ? (o == null ? void 0 : o[c]) ?? c.charAt(0).toUpperCase() + c.slice(1) : null;
|
|
662
675
|
}
|
|
663
676
|
function lt(t) {
|
|
664
|
-
var
|
|
665
|
-
const
|
|
666
|
-
return
|
|
667
|
-
label: `${
|
|
677
|
+
var r, d;
|
|
678
|
+
const i = Array.isArray(t.userIds) ? t.userIds.length : 0, o = ((r = t.groupName) == null ? void 0 : r.trim()) ?? "", c = ((d = t.roleName) == null ? void 0 : d.trim()) ?? "", l = i > 0 || !!o || !!c;
|
|
679
|
+
return o ? { label: `Group: ${o}`, configured: !0 } : c ? { label: `Role: ${c}`, configured: !0 } : i > 0 ? {
|
|
680
|
+
label: `${i} approver${i !== 1 ? "s" : ""}`,
|
|
668
681
|
configured: !0
|
|
669
|
-
} : { label: "Not configured", configured:
|
|
682
|
+
} : { label: "Not configured", configured: l };
|
|
670
683
|
}
|
|
671
|
-
const rt = ({ id: t, data:
|
|
672
|
-
const { onEditNode:
|
|
673
|
-
return /* @__PURE__ */
|
|
684
|
+
const rt = ({ id: t, data: i }) => {
|
|
685
|
+
const { onEditNode: o, onDeleteNode: c } = S(), { approvalData: l, isPreview: r = !1, _branchRail: d, executionModeLabel: s } = i, p = (l == null ? void 0 : l.policy) ?? {}, a = p.stages ?? [], h = a.length, y = a.slice(0, ee), g = h - ee, u = p.name ?? p.policyName ?? "Untitled Policy";
|
|
686
|
+
return /* @__PURE__ */ n("div", { style: { width: 350, position: "relative" }, children: [
|
|
674
687
|
/* @__PURE__ */ e(m, { type: "target", position: b.Top, style: { opacity: 0 } }),
|
|
675
|
-
/* @__PURE__ */
|
|
676
|
-
/* @__PURE__ */
|
|
688
|
+
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #ffe082", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
|
|
689
|
+
/* @__PURE__ */ n(
|
|
677
690
|
"div",
|
|
678
691
|
{
|
|
679
692
|
className: "ff-d-flex ff-justify-content-between ff-align-items-center",
|
|
680
693
|
style: { padding: "10px 8px 8px" },
|
|
681
694
|
children: [
|
|
682
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
683
696
|
/* @__PURE__ */ e(
|
|
684
697
|
"div",
|
|
685
698
|
{
|
|
@@ -690,47 +703,47 @@ const rt = ({ id: t, data: n }) => {
|
|
|
690
703
|
),
|
|
691
704
|
/* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "Approval Policy" })
|
|
692
705
|
] }),
|
|
693
|
-
/* @__PURE__ */
|
|
694
|
-
!
|
|
706
|
+
/* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
|
|
707
|
+
!r && /* @__PURE__ */ e(
|
|
695
708
|
"div",
|
|
696
709
|
{
|
|
697
710
|
role: "button",
|
|
698
711
|
tabIndex: 0,
|
|
699
712
|
style: { cursor: "pointer" },
|
|
700
|
-
onClick: (
|
|
701
|
-
|
|
713
|
+
onClick: (f) => {
|
|
714
|
+
f.stopPropagation(), o(t);
|
|
702
715
|
},
|
|
703
|
-
onKeyDown: (
|
|
704
|
-
|
|
716
|
+
onKeyDown: (f) => {
|
|
717
|
+
f.key === "Enter" && (f.stopPropagation(), o(t));
|
|
705
718
|
},
|
|
706
719
|
"data-testid": "approval-node-edit-btn",
|
|
707
|
-
children: /* @__PURE__ */ e(
|
|
720
|
+
children: /* @__PURE__ */ e(C, { size: 16, className: "ff-text-secondary" })
|
|
708
721
|
}
|
|
709
722
|
),
|
|
710
|
-
!
|
|
723
|
+
!r && /* @__PURE__ */ e(
|
|
711
724
|
"div",
|
|
712
725
|
{
|
|
713
726
|
className: "ff-ms-2",
|
|
714
727
|
role: "button",
|
|
715
728
|
tabIndex: 0,
|
|
716
729
|
style: { cursor: "pointer" },
|
|
717
|
-
onClick: (
|
|
718
|
-
|
|
730
|
+
onClick: (f) => {
|
|
731
|
+
f.stopPropagation(), c(t);
|
|
719
732
|
},
|
|
720
|
-
onKeyDown: (
|
|
721
|
-
|
|
733
|
+
onKeyDown: (f) => {
|
|
734
|
+
f.key === "Enter" && (f.stopPropagation(), c(t));
|
|
722
735
|
},
|
|
723
736
|
"data-testid": "approval-node-delete-btn",
|
|
724
737
|
children: /* @__PURE__ */ e(P, { color: "red", size: 16 })
|
|
725
738
|
}
|
|
726
739
|
),
|
|
727
740
|
/* @__PURE__ */ e(
|
|
728
|
-
|
|
741
|
+
R,
|
|
729
742
|
{
|
|
730
743
|
title: "This approval policy determines who must approve a request before the workflow continues.",
|
|
731
744
|
arrow: !0,
|
|
732
745
|
placement: "right",
|
|
733
|
-
children: /* @__PURE__ */ e("span", { className: "ff-ms-2 ff-d-inline-flex", children: /* @__PURE__ */ e(
|
|
746
|
+
children: /* @__PURE__ */ e("span", { className: "ff-ms-2 ff-d-inline-flex", children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) })
|
|
734
747
|
}
|
|
735
748
|
)
|
|
736
749
|
] })
|
|
@@ -742,11 +755,11 @@ const rt = ({ id: t, data: n }) => {
|
|
|
742
755
|
{
|
|
743
756
|
className: "ff-text-truncate ff-text-dark ff-fw-bold",
|
|
744
757
|
style: { margin: "0 10px 8px", fontSize: 13 },
|
|
745
|
-
title:
|
|
746
|
-
children:
|
|
758
|
+
title: u,
|
|
759
|
+
children: u
|
|
747
760
|
}
|
|
748
761
|
),
|
|
749
|
-
/* @__PURE__ */ e("div", { style: { margin: "0 10px 10px", display: "flex", flexDirection: "column", gap: 8 }, children:
|
|
762
|
+
/* @__PURE__ */ e("div", { style: { margin: "0 10px 10px", display: "flex", flexDirection: "column", gap: 8 }, children: a.length === 0 ? /* @__PURE__ */ e(
|
|
750
763
|
"div",
|
|
751
764
|
{
|
|
752
765
|
className: "ff-text-center",
|
|
@@ -760,20 +773,20 @@ const rt = ({ id: t, data: n }) => {
|
|
|
760
773
|
},
|
|
761
774
|
children: "No stages configured"
|
|
762
775
|
}
|
|
763
|
-
) : /* @__PURE__ */
|
|
764
|
-
|
|
776
|
+
) : /* @__PURE__ */ n(E, { children: [
|
|
777
|
+
y.map((f, v) => {
|
|
765
778
|
var x;
|
|
766
|
-
const
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
779
|
+
const w = ((x = f.stageName) == null ? void 0 : x.trim()) || `Stage ${v + 1}`, { label: T, configured: k } = lt(f), z = ot(
|
|
780
|
+
f.executionMode,
|
|
781
|
+
f.isSequential,
|
|
782
|
+
s
|
|
770
783
|
);
|
|
771
|
-
return /* @__PURE__ */
|
|
784
|
+
return /* @__PURE__ */ n(
|
|
772
785
|
"div",
|
|
773
786
|
{
|
|
774
787
|
style: { background: "#f5f5f5", borderRadius: 6, padding: 8 },
|
|
775
788
|
children: [
|
|
776
|
-
/* @__PURE__ */
|
|
789
|
+
/* @__PURE__ */ n(
|
|
777
790
|
"div",
|
|
778
791
|
{
|
|
779
792
|
className: "ff-d-flex ff-align-items-center",
|
|
@@ -801,30 +814,30 @@ const rt = ({ id: t, data: n }) => {
|
|
|
801
814
|
{
|
|
802
815
|
className: "ff-text-dark ff-text-truncate",
|
|
803
816
|
style: { fontSize: 12, fontWeight: 700, marginRight: "auto" },
|
|
804
|
-
children:
|
|
817
|
+
children: w
|
|
805
818
|
}
|
|
806
819
|
),
|
|
807
|
-
/* @__PURE__ */
|
|
820
|
+
/* @__PURE__ */ n(
|
|
808
821
|
"div",
|
|
809
822
|
{
|
|
810
|
-
className: `ff-d-flex ff-align-items-center ff-flex-shrink-0 ${
|
|
823
|
+
className: `ff-d-flex ff-align-items-center ff-flex-shrink-0 ${k ? "ff-text-dark" : "ff-text-muted"}`,
|
|
811
824
|
style: { gap: 4, fontSize: 12 },
|
|
812
825
|
children: [
|
|
813
826
|
/* @__PURE__ */ e(
|
|
814
827
|
Ee,
|
|
815
828
|
{
|
|
816
829
|
size: 15,
|
|
817
|
-
style: { color:
|
|
830
|
+
style: { color: k ? "#5D4037" : "#9E9E9E" }
|
|
818
831
|
}
|
|
819
832
|
),
|
|
820
|
-
|
|
833
|
+
T
|
|
821
834
|
]
|
|
822
835
|
}
|
|
823
836
|
)
|
|
824
837
|
]
|
|
825
838
|
}
|
|
826
839
|
),
|
|
827
|
-
z && /* @__PURE__ */
|
|
840
|
+
z && /* @__PURE__ */ n(
|
|
828
841
|
"div",
|
|
829
842
|
{
|
|
830
843
|
className: "ff-d-flex ff-align-items-center",
|
|
@@ -847,61 +860,61 @@ const rt = ({ id: t, data: n }) => {
|
|
|
847
860
|
v
|
|
848
861
|
);
|
|
849
862
|
}),
|
|
850
|
-
|
|
851
|
-
/* @__PURE__ */
|
|
863
|
+
g > 0 && // eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
864
|
+
/* @__PURE__ */ n(
|
|
852
865
|
"div",
|
|
853
866
|
{
|
|
854
867
|
className: "ff-text-primary",
|
|
855
868
|
style: {
|
|
856
869
|
fontSize: 12,
|
|
857
870
|
marginTop: 4,
|
|
858
|
-
cursor:
|
|
871
|
+
cursor: r ? "default" : "pointer",
|
|
859
872
|
color: "#1976d2"
|
|
860
873
|
},
|
|
861
|
-
role:
|
|
862
|
-
tabIndex:
|
|
863
|
-
onClick: (
|
|
864
|
-
|
|
874
|
+
role: r ? void 0 : "button",
|
|
875
|
+
tabIndex: r ? void 0 : 0,
|
|
876
|
+
onClick: (f) => {
|
|
877
|
+
r || (f.stopPropagation(), o(t));
|
|
865
878
|
},
|
|
866
|
-
onKeyDown: (
|
|
867
|
-
|
|
879
|
+
onKeyDown: (f) => {
|
|
880
|
+
r || (f.key === "Enter" || f.key === " ") && (f.stopPropagation(), o(t));
|
|
868
881
|
},
|
|
869
882
|
children: [
|
|
870
883
|
"+ ",
|
|
871
|
-
|
|
884
|
+
g,
|
|
872
885
|
" More Stage",
|
|
873
|
-
|
|
886
|
+
g > 1 ? "s" : ""
|
|
874
887
|
]
|
|
875
888
|
}
|
|
876
889
|
)
|
|
877
890
|
] }) })
|
|
878
891
|
] }),
|
|
879
892
|
/* @__PURE__ */ e(m, { type: "source", position: b.Bottom, style: { opacity: 0 } }),
|
|
880
|
-
|
|
893
|
+
d && /* @__PURE__ */ e(Z, { rail: d, cardWidth: 350 })
|
|
881
894
|
] });
|
|
882
|
-
}, st = ({ id: t, data:
|
|
883
|
-
const { onEditNode:
|
|
884
|
-
return /* @__PURE__ */
|
|
895
|
+
}, st = ({ id: t, data: i }) => {
|
|
896
|
+
const { onEditNode: o, onDeleteNode: c } = S(), { duration: l, unit: r } = i, d = l != null && r, s = d ? `Wait ${l} ${r}` : "Not configured";
|
|
897
|
+
return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
|
|
885
898
|
/* @__PURE__ */ e(m, { type: "target", position: b.Top, style: { opacity: 0 } }),
|
|
886
|
-
/* @__PURE__ */
|
|
887
|
-
/* @__PURE__ */
|
|
888
|
-
/* @__PURE__ */
|
|
899
|
+
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
|
|
900
|
+
/* @__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: [
|
|
901
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
889
902
|
/* @__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(ze, { size: 16, color: "#1976d2" }) }),
|
|
890
903
|
/* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "Delay" })
|
|
891
904
|
] }),
|
|
892
|
-
/* @__PURE__ */
|
|
905
|
+
/* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
|
|
893
906
|
/* @__PURE__ */ e(
|
|
894
907
|
"div",
|
|
895
908
|
{
|
|
896
909
|
role: "button",
|
|
897
910
|
tabIndex: 0,
|
|
898
|
-
onClick: (
|
|
899
|
-
|
|
911
|
+
onClick: (p) => {
|
|
912
|
+
p.stopPropagation(), o(t);
|
|
900
913
|
},
|
|
901
|
-
onKeyDown: (
|
|
902
|
-
|
|
914
|
+
onKeyDown: (p) => {
|
|
915
|
+
p.key === "Enter" && (p.stopPropagation(), o(t));
|
|
903
916
|
},
|
|
904
|
-
children: /* @__PURE__ */ e(
|
|
917
|
+
children: /* @__PURE__ */ e(C, { size: 16 })
|
|
905
918
|
}
|
|
906
919
|
),
|
|
907
920
|
/* @__PURE__ */ e(
|
|
@@ -910,39 +923,39 @@ const rt = ({ id: t, data: n }) => {
|
|
|
910
923
|
className: "ff-ms-2",
|
|
911
924
|
role: "button",
|
|
912
925
|
tabIndex: 0,
|
|
913
|
-
onClick: (
|
|
914
|
-
|
|
926
|
+
onClick: (p) => {
|
|
927
|
+
p.stopPropagation(), c(t);
|
|
915
928
|
},
|
|
916
|
-
onKeyDown: (
|
|
917
|
-
|
|
929
|
+
onKeyDown: (p) => {
|
|
930
|
+
p.key === "Enter" && (p.stopPropagation(), c(t));
|
|
918
931
|
},
|
|
919
932
|
children: /* @__PURE__ */ e(P, { color: "red", size: 16 })
|
|
920
933
|
}
|
|
921
934
|
)
|
|
922
935
|
] })
|
|
923
936
|
] }),
|
|
924
|
-
/* @__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:
|
|
937
|
+
/* @__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: d ? "ff-text-dark ff-fw-medium" : "ff-text-muted", children: s }) })
|
|
925
938
|
] }),
|
|
926
939
|
/* @__PURE__ */ e(m, { type: "source", position: b.Bottom, style: { opacity: 0 } })
|
|
927
940
|
] });
|
|
928
|
-
},
|
|
941
|
+
}, te = {
|
|
929
942
|
email: { label: "Email", bg: "#e3f2fd", color: "#1565c0", iconType: Pe },
|
|
930
|
-
slack: { label: "Slack", bg: "#e8f5e9", color: "#2e7d32", iconType:
|
|
931
|
-
teams: { label: "MS Teams", bg: "#ede7f6", color: "#4527a0", iconType:
|
|
943
|
+
slack: { label: "Slack", bg: "#e8f5e9", color: "#2e7d32", iconType: H },
|
|
944
|
+
teams: { label: "MS Teams", bg: "#ede7f6", color: "#4527a0", iconType: H },
|
|
932
945
|
sms: { label: "SMS", bg: "#fce4ec", color: "#880e4f", iconType: Ae },
|
|
933
|
-
"in-app": { label: "In-App", bg: "#fff3e0", color: "#e65100", iconType:
|
|
934
|
-
webhook: { label: "Webhook", bg: "#f3e5f5", color: "#6a1b9a", iconType:
|
|
946
|
+
"in-app": { label: "In-App", bg: "#fff3e0", color: "#e65100", iconType: H },
|
|
947
|
+
webhook: { label: "Webhook", bg: "#f3e5f5", color: "#6a1b9a", iconType: he }
|
|
935
948
|
}, ct = {
|
|
936
949
|
label: "Notification",
|
|
937
950
|
bg: "rgba(156,39,176,0.1)",
|
|
938
951
|
color: "#7b1fa2",
|
|
939
|
-
iconType:
|
|
952
|
+
iconType: H
|
|
940
953
|
};
|
|
941
954
|
function at(t) {
|
|
942
|
-
var
|
|
955
|
+
var i;
|
|
943
956
|
switch (t.channel) {
|
|
944
957
|
case "email":
|
|
945
|
-
return ((
|
|
958
|
+
return ((i = t.emailTo) == null ? void 0 : i.join(", ")) ?? t.recipient ?? null;
|
|
946
959
|
case "slack":
|
|
947
960
|
return t.slackChannel ?? null;
|
|
948
961
|
case "teams":
|
|
@@ -962,8 +975,8 @@ function dt(t) {
|
|
|
962
975
|
case "email":
|
|
963
976
|
return t.emailSubject ?? t.subject ?? null;
|
|
964
977
|
case "slack": {
|
|
965
|
-
const
|
|
966
|
-
return
|
|
978
|
+
const i = t.slackMessage;
|
|
979
|
+
return i ? i.length > 60 ? `${i.slice(0, 60)}…` : i : null;
|
|
967
980
|
}
|
|
968
981
|
case "in-app":
|
|
969
982
|
return t.inAppTitle ?? null;
|
|
@@ -971,29 +984,29 @@ function dt(t) {
|
|
|
971
984
|
return t.subject ?? null;
|
|
972
985
|
}
|
|
973
986
|
}
|
|
974
|
-
const ft = ({ id: t, data:
|
|
975
|
-
const { onEditNode:
|
|
976
|
-
return /* @__PURE__ */
|
|
987
|
+
const ft = ({ id: t, data: i }) => {
|
|
988
|
+
const { onEditNode: o, onDeleteNode: c } = S(), l = i, r = l.channel && te[l.channel] ? te[l.channel] : ct, d = at(l), s = dt(l), p = !!(l.channel && d), a = r.iconType;
|
|
989
|
+
return /* @__PURE__ */ n("div", { style: { width: F }, children: [
|
|
977
990
|
/* @__PURE__ */ e(m, { type: "target", position: b.Top, style: { opacity: 0 } }),
|
|
978
|
-
/* @__PURE__ */
|
|
979
|
-
/* @__PURE__ */
|
|
980
|
-
/* @__PURE__ */
|
|
981
|
-
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background:
|
|
982
|
-
/* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children:
|
|
991
|
+
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
|
|
992
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
|
|
993
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
994
|
+
/* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: r.bg }, children: /* @__PURE__ */ e(a, { size: 16, color: r.color }) }),
|
|
995
|
+
/* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: l.channel ? `${r.label} Notification` : "Notification" })
|
|
983
996
|
] }),
|
|
984
|
-
/* @__PURE__ */
|
|
997
|
+
/* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
|
|
985
998
|
/* @__PURE__ */ e(
|
|
986
999
|
"div",
|
|
987
1000
|
{
|
|
988
1001
|
role: "button",
|
|
989
1002
|
tabIndex: 0,
|
|
990
1003
|
onClick: (h) => {
|
|
991
|
-
h.stopPropagation(),
|
|
1004
|
+
h.stopPropagation(), o(t);
|
|
992
1005
|
},
|
|
993
1006
|
onKeyDown: (h) => {
|
|
994
|
-
(h.key === "Enter" || h.key === " ") && (h.stopPropagation(),
|
|
1007
|
+
(h.key === "Enter" || h.key === " ") && (h.stopPropagation(), o(t));
|
|
995
1008
|
},
|
|
996
|
-
children: /* @__PURE__ */ e(
|
|
1009
|
+
children: /* @__PURE__ */ e(C, { size: 16 })
|
|
997
1010
|
}
|
|
998
1011
|
),
|
|
999
1012
|
/* @__PURE__ */ e(
|
|
@@ -1013,32 +1026,32 @@ const ft = ({ id: t, data: n }) => {
|
|
|
1013
1026
|
)
|
|
1014
1027
|
] })
|
|
1015
1028
|
] }),
|
|
1016
|
-
/* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children:
|
|
1017
|
-
/* @__PURE__ */
|
|
1018
|
-
/* @__PURE__ */ e("span", { className: "ff-px-2 ff-py-1 ff-rounded", style: { fontSize: 10, background:
|
|
1019
|
-
/* @__PURE__ */ e("span", { className: "ff-text-dark ff-text-truncate", style: { maxWidth: 220 }, children:
|
|
1029
|
+
/* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: p ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-column ff-gap-1", children: [
|
|
1030
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
1031
|
+
/* @__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 }),
|
|
1032
|
+
/* @__PURE__ */ e("span", { className: "ff-text-dark ff-text-truncate", style: { maxWidth: 220 }, children: d })
|
|
1020
1033
|
] }),
|
|
1021
|
-
|
|
1034
|
+
s && /* @__PURE__ */ e("span", { className: "ff-text-muted ff-text-truncate", style: { maxWidth: 280 }, children: s })
|
|
1022
1035
|
] }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured" }) })
|
|
1023
1036
|
] }),
|
|
1024
1037
|
/* @__PURE__ */ e(m, { type: "source", position: b.Bottom, style: { opacity: 0 } })
|
|
1025
1038
|
] });
|
|
1026
|
-
},
|
|
1039
|
+
}, ne = {
|
|
1027
1040
|
"api-key": "API Key",
|
|
1028
1041
|
hmac: "HMAC"
|
|
1029
1042
|
}, pt = ({ data: t }) => {
|
|
1030
|
-
const { onClickAddTrigger:
|
|
1031
|
-
|
|
1032
|
-
},
|
|
1033
|
-
|
|
1043
|
+
const { onClickAddTrigger: i } = S(), { label: o = "Webhook Trigger", endpointUrl: c, authMethod: l, source: r } = t, d = (p) => {
|
|
1044
|
+
p.stopPropagation(), i();
|
|
1045
|
+
}, s = (p) => {
|
|
1046
|
+
p.stopPropagation(), c && navigator.clipboard.writeText(c).catch(() => {
|
|
1034
1047
|
});
|
|
1035
1048
|
};
|
|
1036
|
-
return /* @__PURE__ */
|
|
1049
|
+
return /* @__PURE__ */ n("div", { style: { width: F }, children: [
|
|
1037
1050
|
/* @__PURE__ */ e(m, { type: "target", position: b.Top, style: { opacity: 0 } }),
|
|
1038
|
-
/* @__PURE__ */
|
|
1039
|
-
/* @__PURE__ */
|
|
1040
|
-
/* @__PURE__ */
|
|
1041
|
-
/* @__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(
|
|
1051
|
+
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #90caf9", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
|
|
1052
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
|
|
1053
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
1054
|
+
/* @__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(he, { size: 16, color: "#1565c0" }) }),
|
|
1042
1055
|
/* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 600, color: "#212121" }, children: "Webhook Trigger" })
|
|
1043
1056
|
] }),
|
|
1044
1057
|
/* @__PURE__ */ e(
|
|
@@ -1046,32 +1059,32 @@ const ft = ({ id: t, data: n }) => {
|
|
|
1046
1059
|
{
|
|
1047
1060
|
role: "button",
|
|
1048
1061
|
tabIndex: 0,
|
|
1049
|
-
onClick:
|
|
1050
|
-
onKeyDown: (
|
|
1051
|
-
(
|
|
1062
|
+
onClick: d,
|
|
1063
|
+
onKeyDown: (p) => {
|
|
1064
|
+
(p.key === "Enter" || p.key === " ") && d(p);
|
|
1052
1065
|
},
|
|
1053
1066
|
className: "ff-d-flex ff-align-items-center",
|
|
1054
1067
|
style: { paddingRight: 4, cursor: "pointer" },
|
|
1055
|
-
children: /* @__PURE__ */ e(
|
|
1068
|
+
children: /* @__PURE__ */ e(C, { size: 16, color: "#555" })
|
|
1056
1069
|
}
|
|
1057
1070
|
)
|
|
1058
1071
|
] }),
|
|
1059
|
-
/* @__PURE__ */
|
|
1060
|
-
/* @__PURE__ */
|
|
1061
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 12, color: "#1565c0", fontWeight: 600 }, children:
|
|
1062
|
-
|
|
1063
|
-
|
|
1072
|
+
/* @__PURE__ */ n("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#e3f2fd", border: "1px solid #90caf9" }, children: [
|
|
1073
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-flex-wrap ff-gap-2 ff-mb-1", children: [
|
|
1074
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 12, color: "#1565c0", fontWeight: 600 }, children: o }),
|
|
1075
|
+
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 }),
|
|
1076
|
+
l && l !== "none" && ne[l] && /* @__PURE__ */ e("span", { className: "ff-px-2 ff-py-1 ff-rounded", style: { fontSize: 10, background: "#1565c0", color: "#fff", fontWeight: 600 }, children: ne[l] })
|
|
1064
1077
|
] }),
|
|
1065
|
-
c && /* @__PURE__ */
|
|
1078
|
+
c && /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-1", style: { marginTop: 4 }, children: [
|
|
1066
1079
|
/* @__PURE__ */ e("span", { style: { fontSize: 10, color: "#1565c0", fontFamily: "monospace", flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: c }),
|
|
1067
|
-
/* @__PURE__ */ e(
|
|
1080
|
+
/* @__PURE__ */ e(R, { title: "Copy URL", placement: "top", arrow: !0, children: /* @__PURE__ */ e(
|
|
1068
1081
|
"div",
|
|
1069
1082
|
{
|
|
1070
1083
|
role: "button",
|
|
1071
1084
|
tabIndex: 0,
|
|
1072
|
-
onClick:
|
|
1073
|
-
onKeyDown: (
|
|
1074
|
-
(
|
|
1085
|
+
onClick: s,
|
|
1086
|
+
onKeyDown: (p) => {
|
|
1087
|
+
(p.key === "Enter" || p.key === " ") && s(p);
|
|
1075
1088
|
},
|
|
1076
1089
|
style: { cursor: "pointer", flexShrink: 0 },
|
|
1077
1090
|
children: /* @__PURE__ */ e(Ie, { size: 12, color: "#1565c0" })
|
|
@@ -1082,30 +1095,30 @@ const ft = ({ id: t, data: n }) => {
|
|
|
1082
1095
|
] }),
|
|
1083
1096
|
/* @__PURE__ */ e(m, { type: "source", position: b.Bottom, style: { opacity: 0 } })
|
|
1084
1097
|
] });
|
|
1085
|
-
}, ht = ({ id: t, data:
|
|
1086
|
-
var
|
|
1087
|
-
const { onEditNode:
|
|
1088
|
-
return /* @__PURE__ */
|
|
1098
|
+
}, ht = ({ id: t, data: i }) => {
|
|
1099
|
+
var g;
|
|
1100
|
+
const { onEditNode: o, onDeleteNode: c, nodeRegistry: l } = S(), { method: r, url: d, descriptorType: s } = i, p = s ? (g = l == null ? void 0 : l.forType(s)) == null ? void 0 : g.icon : /* @__PURE__ */ e(Le, { size: 16, color: "#546e7a" }), a = !!(r && d), h = (r == null ? void 0 : r.toUpperCase()) ?? "", y = Be[h] ?? null;
|
|
1101
|
+
return /* @__PURE__ */ n("div", { style: { width: F }, children: [
|
|
1089
1102
|
/* @__PURE__ */ e(m, { type: "target", position: b.Top, style: { opacity: 0 } }),
|
|
1090
|
-
/* @__PURE__ */
|
|
1091
|
-
/* @__PURE__ */
|
|
1092
|
-
/* @__PURE__ */
|
|
1093
|
-
/* @__PURE__ */ e("div", { style: { width: 25, height: 25, display: "flex", alignItems: "center", justifyContent: "center" }, children:
|
|
1103
|
+
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
|
|
1104
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
|
|
1105
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
1106
|
+
/* @__PURE__ */ e("div", { style: { width: 25, height: 25, display: "flex", alignItems: "center", justifyContent: "center" }, children: p }),
|
|
1094
1107
|
/* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "REST API Call" })
|
|
1095
1108
|
] }),
|
|
1096
|
-
/* @__PURE__ */
|
|
1109
|
+
/* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
|
|
1097
1110
|
/* @__PURE__ */ e(
|
|
1098
1111
|
"div",
|
|
1099
1112
|
{
|
|
1100
1113
|
role: "button",
|
|
1101
1114
|
tabIndex: 0,
|
|
1102
|
-
onClick: (
|
|
1103
|
-
|
|
1115
|
+
onClick: (u) => {
|
|
1116
|
+
u.stopPropagation(), o(t);
|
|
1104
1117
|
},
|
|
1105
|
-
onKeyDown: (
|
|
1106
|
-
(
|
|
1118
|
+
onKeyDown: (u) => {
|
|
1119
|
+
(u.key === "Enter" || u.key === " ") && (u.stopPropagation(), o(t));
|
|
1107
1120
|
},
|
|
1108
|
-
children: /* @__PURE__ */ e(
|
|
1121
|
+
children: /* @__PURE__ */ e(C, { size: 16 })
|
|
1109
1122
|
}
|
|
1110
1123
|
),
|
|
1111
1124
|
/* @__PURE__ */ e(
|
|
@@ -1114,20 +1127,20 @@ const ft = ({ id: t, data: n }) => {
|
|
|
1114
1127
|
className: "ff-ms-2",
|
|
1115
1128
|
role: "button",
|
|
1116
1129
|
tabIndex: 0,
|
|
1117
|
-
onClick: (
|
|
1118
|
-
|
|
1130
|
+
onClick: (u) => {
|
|
1131
|
+
u.stopPropagation(), c(t);
|
|
1119
1132
|
},
|
|
1120
|
-
onKeyDown: (
|
|
1121
|
-
(
|
|
1133
|
+
onKeyDown: (u) => {
|
|
1134
|
+
(u.key === "Enter" || u.key === " ") && (u.stopPropagation(), c(t));
|
|
1122
1135
|
},
|
|
1123
1136
|
children: /* @__PURE__ */ e(P, { color: "red", size: 16 })
|
|
1124
1137
|
}
|
|
1125
1138
|
)
|
|
1126
1139
|
] })
|
|
1127
1140
|
] }),
|
|
1128
|
-
/* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children:
|
|
1129
|
-
|
|
1130
|
-
/* @__PURE__ */ e("span", { className: "ff-text-dark ff-text-truncate", style: { fontFamily: "monospace", fontSize: 11 }, title:
|
|
1141
|
+
/* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: a ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
1142
|
+
y && /* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 700, padding: "2px 6px", borderRadius: 4, background: y.bg, color: y.color, flexShrink: 0 }, children: h }),
|
|
1143
|
+
/* @__PURE__ */ e("span", { className: "ff-text-dark ff-text-truncate", style: { fontFamily: "monospace", fontSize: 11 }, title: d, children: d })
|
|
1131
1144
|
] }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured" }) })
|
|
1132
1145
|
] }),
|
|
1133
1146
|
/* @__PURE__ */ e(m, { type: "source", position: b.Bottom, style: { opacity: 0 } })
|
|
@@ -1144,29 +1157,29 @@ const ft = ({ id: t, data: n }) => {
|
|
|
1144
1157
|
endsWith: "ends with",
|
|
1145
1158
|
isEmpty: "is empty",
|
|
1146
1159
|
isNotEmpty: "is not empty"
|
|
1147
|
-
},
|
|
1148
|
-
const { onEditNode:
|
|
1149
|
-
return /* @__PURE__ */
|
|
1160
|
+
}, yt = ({ id: t, data: i }) => {
|
|
1161
|
+
const { onEditNode: o, onDeleteNode: c } = S(), { title: l = "Condition Branch", branchConfigs: r = [], defaultBranch: d } = i, s = r.length > 0;
|
|
1162
|
+
return /* @__PURE__ */ n("div", { style: { width: F }, children: [
|
|
1150
1163
|
/* @__PURE__ */ e(m, { type: "target", position: b.Top, style: { opacity: 0 } }),
|
|
1151
|
-
/* @__PURE__ */
|
|
1152
|
-
/* @__PURE__ */
|
|
1153
|
-
/* @__PURE__ */
|
|
1164
|
+
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #b39ddb", borderRadius: 8, background: "#fff" }, children: [
|
|
1165
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
|
|
1166
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
1154
1167
|
/* @__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(Re, { size: 16, color: "#512da8" }) }),
|
|
1155
|
-
/* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children:
|
|
1168
|
+
/* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: l })
|
|
1156
1169
|
] }),
|
|
1157
|
-
/* @__PURE__ */
|
|
1170
|
+
/* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
|
|
1158
1171
|
/* @__PURE__ */ e(
|
|
1159
1172
|
"div",
|
|
1160
1173
|
{
|
|
1161
1174
|
role: "button",
|
|
1162
1175
|
tabIndex: 0,
|
|
1163
|
-
onClick: (
|
|
1164
|
-
|
|
1176
|
+
onClick: (p) => {
|
|
1177
|
+
p.stopPropagation(), o(t);
|
|
1165
1178
|
},
|
|
1166
|
-
onKeyDown: (
|
|
1167
|
-
(
|
|
1179
|
+
onKeyDown: (p) => {
|
|
1180
|
+
(p.key === "Enter" || p.key === " ") && (p.stopPropagation(), o(t));
|
|
1168
1181
|
},
|
|
1169
|
-
children: /* @__PURE__ */ e(
|
|
1182
|
+
children: /* @__PURE__ */ e(C, { size: 16 })
|
|
1170
1183
|
}
|
|
1171
1184
|
),
|
|
1172
1185
|
/* @__PURE__ */ e(
|
|
@@ -1175,33 +1188,33 @@ const ft = ({ id: t, data: n }) => {
|
|
|
1175
1188
|
className: "ff-ms-2",
|
|
1176
1189
|
role: "button",
|
|
1177
1190
|
tabIndex: 0,
|
|
1178
|
-
onClick: (
|
|
1179
|
-
|
|
1191
|
+
onClick: (p) => {
|
|
1192
|
+
p.stopPropagation(), c(t);
|
|
1180
1193
|
},
|
|
1181
|
-
onKeyDown: (
|
|
1182
|
-
(
|
|
1194
|
+
onKeyDown: (p) => {
|
|
1195
|
+
(p.key === "Enter" || p.key === " ") && (p.stopPropagation(), c(t));
|
|
1183
1196
|
},
|
|
1184
1197
|
children: /* @__PURE__ */ e(P, { color: "red", size: 16 })
|
|
1185
1198
|
}
|
|
1186
1199
|
)
|
|
1187
1200
|
] })
|
|
1188
1201
|
] }),
|
|
1189
|
-
/* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children:
|
|
1190
|
-
|
|
1191
|
-
var
|
|
1192
|
-
const h = Y[
|
|
1193
|
-
return /* @__PURE__ */
|
|
1194
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background: h.bg, color: h.color, flexShrink: 0 }, children:
|
|
1195
|
-
|
|
1196
|
-
|
|
1202
|
+
/* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: s ? /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
1203
|
+
r.map((p, a) => {
|
|
1204
|
+
var u, f;
|
|
1205
|
+
const h = Y[a % Y.length], y = (u = p.conditions) == null ? void 0 : u[0], g = (((f = p.conditions) == null ? void 0 : f.length) ?? 0) - 1;
|
|
1206
|
+
return /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
1207
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background: h.bg, color: h.color, flexShrink: 0 }, children: p.label || p.key }),
|
|
1208
|
+
y ? /* @__PURE__ */ n("span", { style: { fontSize: 11, color: "#616161", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
|
|
1209
|
+
y.field,
|
|
1197
1210
|
" ",
|
|
1198
|
-
ut[
|
|
1199
|
-
|
|
1200
|
-
|
|
1211
|
+
ut[y.operator] ?? y.operator,
|
|
1212
|
+
y.value ? ` ${y.value}` : "",
|
|
1213
|
+
g > 0 ? ` +${g} more` : ""
|
|
1201
1214
|
] }) : /* @__PURE__ */ e("span", { style: { fontSize: 11, color: "#9e9e9e" }, children: "No conditions yet" })
|
|
1202
|
-
] },
|
|
1215
|
+
] }, p.key);
|
|
1203
1216
|
}),
|
|
1204
|
-
|
|
1217
|
+
d && /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 6, marginTop: 2 }, children: [
|
|
1205
1218
|
/* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background: "#f5f5f5", color: "#757575", flexShrink: 0 }, children: "Default" }),
|
|
1206
1219
|
/* @__PURE__ */ e("span", { style: { fontSize: 11, color: "#9e9e9e" }, children: "fallback path" })
|
|
1207
1220
|
] })
|
|
@@ -1209,32 +1222,32 @@ const ft = ({ id: t, data: n }) => {
|
|
|
1209
1222
|
] }),
|
|
1210
1223
|
/* @__PURE__ */ e(m, { type: "source", position: b.Bottom, style: { opacity: 0 } })
|
|
1211
1224
|
] });
|
|
1212
|
-
},
|
|
1213
|
-
var
|
|
1214
|
-
const { onEditNode:
|
|
1215
|
-
|
|
1225
|
+
}, gt = ({ id: t, data: i }) => {
|
|
1226
|
+
var u;
|
|
1227
|
+
const { onEditNode: o, onDeleteNode: c, nodeRegistry: l } = S(), { title: r = "Sub-Workflow", workflowId: d, workflowLabel: s, descriptorType: p, onPreview: a } = i, h = p ? (u = l == null ? void 0 : l.forType(p)) == null ? void 0 : u.icon : /* @__PURE__ */ e(De, { size: 16, color: "#00695c" }), y = !!d, g = (f) => {
|
|
1228
|
+
f.stopPropagation(), d && a && a(d);
|
|
1216
1229
|
};
|
|
1217
|
-
return /* @__PURE__ */
|
|
1230
|
+
return /* @__PURE__ */ n("div", { style: { width: F }, children: [
|
|
1218
1231
|
/* @__PURE__ */ e(m, { type: "target", position: b.Top, style: { opacity: 0 } }),
|
|
1219
|
-
/* @__PURE__ */
|
|
1220
|
-
/* @__PURE__ */
|
|
1221
|
-
/* @__PURE__ */
|
|
1232
|
+
/* @__PURE__ */ n("div", { style: { border: "1.5px solid #80cbc4", borderRadius: 8, background: "#fff" }, children: [
|
|
1233
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
|
|
1234
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
|
|
1222
1235
|
/* @__PURE__ */ e("div", { style: { width: 25, height: 25, borderRadius: 6, background: "rgba(0,137,123,0.1)", display: "flex", alignItems: "center", justifyContent: "center" }, children: h }),
|
|
1223
|
-
/* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children:
|
|
1236
|
+
/* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: r })
|
|
1224
1237
|
] }),
|
|
1225
|
-
/* @__PURE__ */
|
|
1238
|
+
/* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
|
|
1226
1239
|
/* @__PURE__ */ e(
|
|
1227
1240
|
"div",
|
|
1228
1241
|
{
|
|
1229
1242
|
role: "button",
|
|
1230
1243
|
tabIndex: 0,
|
|
1231
|
-
onClick: (
|
|
1232
|
-
|
|
1244
|
+
onClick: (f) => {
|
|
1245
|
+
f.stopPropagation(), o(t);
|
|
1233
1246
|
},
|
|
1234
|
-
onKeyDown: (
|
|
1235
|
-
(
|
|
1247
|
+
onKeyDown: (f) => {
|
|
1248
|
+
(f.key === "Enter" || f.key === " ") && (f.stopPropagation(), o(t));
|
|
1236
1249
|
},
|
|
1237
|
-
children: /* @__PURE__ */ e(
|
|
1250
|
+
children: /* @__PURE__ */ e(C, { size: 16 })
|
|
1238
1251
|
}
|
|
1239
1252
|
),
|
|
1240
1253
|
/* @__PURE__ */ e(
|
|
@@ -1243,33 +1256,33 @@ const ft = ({ id: t, data: n }) => {
|
|
|
1243
1256
|
className: "ff-ms-2",
|
|
1244
1257
|
role: "button",
|
|
1245
1258
|
tabIndex: 0,
|
|
1246
|
-
onClick: (
|
|
1247
|
-
|
|
1259
|
+
onClick: (f) => {
|
|
1260
|
+
f.stopPropagation(), c(t);
|
|
1248
1261
|
},
|
|
1249
|
-
onKeyDown: (
|
|
1250
|
-
(
|
|
1262
|
+
onKeyDown: (f) => {
|
|
1263
|
+
(f.key === "Enter" || f.key === " ") && (f.stopPropagation(), c(t));
|
|
1251
1264
|
},
|
|
1252
1265
|
children: /* @__PURE__ */ e(P, { color: "red", size: 16 })
|
|
1253
1266
|
}
|
|
1254
1267
|
)
|
|
1255
1268
|
] })
|
|
1256
1269
|
] }),
|
|
1257
|
-
/* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background:
|
|
1258
|
-
/* @__PURE__ */
|
|
1259
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 12, fontWeight: 600, color: "#00695c" }, children:
|
|
1260
|
-
/* @__PURE__ */
|
|
1270
|
+
/* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: y ? "#e0f2f1" : "#fafafa", fontSize: 12, border: y ? "1px solid #b2dfdb" : "none" }, children: y ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-between", children: [
|
|
1271
|
+
/* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-column ff-gap-1", children: [
|
|
1272
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 12, fontWeight: 600, color: "#00695c" }, children: s || d }),
|
|
1273
|
+
/* @__PURE__ */ n("span", { style: { fontSize: 10, color: "#80cbc4", fontFamily: "monospace" }, children: [
|
|
1261
1274
|
"ID: ",
|
|
1262
|
-
|
|
1275
|
+
d
|
|
1263
1276
|
] })
|
|
1264
1277
|
] }),
|
|
1265
|
-
|
|
1278
|
+
a && /* @__PURE__ */ n(
|
|
1266
1279
|
"div",
|
|
1267
1280
|
{
|
|
1268
1281
|
role: "button",
|
|
1269
1282
|
tabIndex: 0,
|
|
1270
|
-
onClick:
|
|
1271
|
-
onKeyDown: (
|
|
1272
|
-
(
|
|
1283
|
+
onClick: g,
|
|
1284
|
+
onKeyDown: (f) => {
|
|
1285
|
+
(f.key === "Enter" || f.key === " ") && g(f);
|
|
1273
1286
|
},
|
|
1274
1287
|
style: { cursor: "pointer", display: "flex", alignItems: "center", gap: 3, fontSize: 11, color: "#00897b" },
|
|
1275
1288
|
children: [
|
|
@@ -1290,123 +1303,123 @@ const ft = ({ id: t, data: n }) => {
|
|
|
1290
1303
|
triggerNode: Xe,
|
|
1291
1304
|
eventNode: tt,
|
|
1292
1305
|
filterNode: nt,
|
|
1293
|
-
actionNode:
|
|
1306
|
+
actionNode: it,
|
|
1294
1307
|
approvalNode: rt,
|
|
1295
1308
|
delayNode: st,
|
|
1296
1309
|
notificationNode: ft,
|
|
1297
1310
|
webhookTriggerNode: pt,
|
|
1298
1311
|
restApiNode: ht,
|
|
1299
|
-
conditionBranchNode:
|
|
1300
|
-
subWorkflowNode:
|
|
1301
|
-
}, mt = 11.5,
|
|
1312
|
+
conditionBranchNode: yt,
|
|
1313
|
+
subWorkflowNode: gt
|
|
1314
|
+
}, mt = 11.5, ie = 2, _ = 6, oe = 40, le = 20, re = 4, Lt = ({
|
|
1302
1315
|
id: t,
|
|
1303
|
-
sourceX:
|
|
1304
|
-
sourceY:
|
|
1316
|
+
sourceX: i,
|
|
1317
|
+
sourceY: o,
|
|
1305
1318
|
targetX: c,
|
|
1306
|
-
targetY:
|
|
1307
|
-
sourcePosition:
|
|
1308
|
-
targetPosition:
|
|
1309
|
-
source:
|
|
1310
|
-
target:
|
|
1311
|
-
data:
|
|
1319
|
+
targetY: l,
|
|
1320
|
+
sourcePosition: r,
|
|
1321
|
+
targetPosition: d,
|
|
1322
|
+
source: s,
|
|
1323
|
+
target: p,
|
|
1324
|
+
data: a
|
|
1312
1325
|
}) => {
|
|
1313
|
-
const [h,
|
|
1314
|
-
sourceX:
|
|
1315
|
-
sourceY:
|
|
1326
|
+
const [h, y, g] = U({
|
|
1327
|
+
sourceX: i,
|
|
1328
|
+
sourceY: o,
|
|
1316
1329
|
targetX: c,
|
|
1317
|
-
targetY:
|
|
1318
|
-
}),
|
|
1319
|
-
if (
|
|
1330
|
+
targetY: l
|
|
1331
|
+
}), u = a == null ? void 0 : a.label, f = u === "Pass", v = f || u === "Fail", w = i + (c - i) / 3, T = o + (l - o) / 3, k = i + 2 * (c - i) / 3, z = o + 2 * (l - o) / 3, x = a == null ? void 0 : a.onAddStepClick, I = (N) => {
|
|
1332
|
+
if (N.stopPropagation(), typeof x != "function") return;
|
|
1320
1333
|
const xe = {
|
|
1321
1334
|
edgeId: t,
|
|
1322
|
-
nodeId:
|
|
1323
|
-
sourceNodeId:
|
|
1324
|
-
targetNodeId:
|
|
1335
|
+
nodeId: s,
|
|
1336
|
+
sourceNodeId: s,
|
|
1337
|
+
targetNodeId: p,
|
|
1325
1338
|
position: "between",
|
|
1326
|
-
referenceNodeId:
|
|
1327
|
-
referenceNodeType:
|
|
1328
|
-
stepVisibility:
|
|
1339
|
+
referenceNodeId: s,
|
|
1340
|
+
referenceNodeType: a == null ? void 0 : a.referenceNodeType,
|
|
1341
|
+
stepVisibility: a == null ? void 0 : a.stepVisibility
|
|
1329
1342
|
};
|
|
1330
|
-
x(
|
|
1331
|
-
},
|
|
1332
|
-
(
|
|
1333
|
-
},
|
|
1334
|
-
/* @__PURE__ */
|
|
1343
|
+
x(s, xe);
|
|
1344
|
+
}, D = (N) => {
|
|
1345
|
+
(N.key === "Enter" || N.key === " ") && (N.preventDefault(), I(N));
|
|
1346
|
+
}, j = () => /* @__PURE__ */ n(E, { children: [
|
|
1347
|
+
/* @__PURE__ */ n("g", { className: "plus-icon-container", children: [
|
|
1335
1348
|
/* @__PURE__ */ e("circle", { r: mt, className: "edge-plus-circle" }),
|
|
1336
|
-
/* @__PURE__ */ e("line", { x1: 0, y1: -_, x2: 0, y2: _, strokeWidth:
|
|
1337
|
-
/* @__PURE__ */ e("line", { x1: -_, y1: 0, x2: _, y2: 0, strokeWidth:
|
|
1349
|
+
/* @__PURE__ */ e("line", { x1: 0, y1: -_, x2: 0, y2: _, strokeWidth: ie, strokeLinecap: "round", className: "plus-line" }),
|
|
1350
|
+
/* @__PURE__ */ e("line", { x1: -_, y1: 0, x2: _, y2: 0, strokeWidth: ie, strokeLinecap: "round", className: "plus-line" })
|
|
1338
1351
|
] }),
|
|
1339
|
-
/* @__PURE__ */
|
|
1352
|
+
/* @__PURE__ */ n("g", { className: "edge-plus-tooltip", transform: "translate(18, 0)", children: [
|
|
1340
1353
|
/* @__PURE__ */ e("rect", { x: 0, y: -10, width: 65, height: 20, rx: 4, className: "tooltip-bg" }),
|
|
1341
1354
|
/* @__PURE__ */ e("path", { d: "M0 -4 L-4 0 L0 4 Z", className: "tooltip-bg" }),
|
|
1342
1355
|
/* @__PURE__ */ e("text", { x: 32, y: 0, textAnchor: "middle", dominantBaseline: "central", fill: "white", style: { fontSize: 10, fontWeight: 600, pointerEvents: "none" }, children: "Add Step" })
|
|
1343
1356
|
] })
|
|
1344
|
-
] }),
|
|
1345
|
-
onClick:
|
|
1346
|
-
onKeyDown:
|
|
1357
|
+
] }), L = x ? {
|
|
1358
|
+
onClick: I,
|
|
1359
|
+
onKeyDown: D,
|
|
1347
1360
|
role: "button",
|
|
1348
1361
|
tabIndex: 0,
|
|
1349
1362
|
style: { cursor: "pointer", pointerEvents: "all" }
|
|
1350
1363
|
} : {
|
|
1351
1364
|
style: { cursor: "default", pointerEvents: "all" }
|
|
1352
1365
|
};
|
|
1353
|
-
return /* @__PURE__ */
|
|
1366
|
+
return /* @__PURE__ */ n("g", { className: "edge-with-plus-wrapper", children: [
|
|
1354
1367
|
/* @__PURE__ */ e(q, { id: t, path: h }),
|
|
1355
|
-
v ? /* @__PURE__ */
|
|
1356
|
-
/* @__PURE__ */
|
|
1357
|
-
/* @__PURE__ */ e("rect", { x: -oe / 2, y: -
|
|
1358
|
-
/* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill:
|
|
1368
|
+
v ? /* @__PURE__ */ n(E, { children: [
|
|
1369
|
+
/* @__PURE__ */ n("g", { transform: `translate(${w}, ${T})`, children: [
|
|
1370
|
+
/* @__PURE__ */ e("rect", { x: -oe / 2, y: -le / 2, width: oe, height: le, rx: re, ry: re, fill: f ? "#ADE6C5" : "#FDBFBF" }),
|
|
1371
|
+
/* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: f ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: u })
|
|
1359
1372
|
] }),
|
|
1360
|
-
/* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${
|
|
1361
|
-
] }) : /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${
|
|
1373
|
+
/* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${k}, ${z})`, "data-testid": "plus-node-icon", ...L, children: /* @__PURE__ */ e(j, {}) })
|
|
1374
|
+
] }) : /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${y}, ${g})`, "data-testid": "plus-node-icon", ...L, children: /* @__PURE__ */ e(j, {}) })
|
|
1362
1375
|
] });
|
|
1363
|
-
}, bt = 11.5,
|
|
1376
|
+
}, bt = 11.5, se = 2, K = 6, Rt = ({
|
|
1364
1377
|
id: t,
|
|
1365
|
-
sourceX:
|
|
1366
|
-
sourceY:
|
|
1378
|
+
sourceX: i,
|
|
1379
|
+
sourceY: o,
|
|
1367
1380
|
targetX: c,
|
|
1368
|
-
targetY:
|
|
1369
|
-
source:
|
|
1370
|
-
target:
|
|
1371
|
-
data:
|
|
1381
|
+
targetY: l,
|
|
1382
|
+
source: r,
|
|
1383
|
+
target: d,
|
|
1384
|
+
data: s
|
|
1372
1385
|
}) => {
|
|
1373
|
-
const [
|
|
1374
|
-
sourceX:
|
|
1375
|
-
sourceY:
|
|
1386
|
+
const [p, a, h] = U({
|
|
1387
|
+
sourceX: i,
|
|
1388
|
+
sourceY: o,
|
|
1376
1389
|
targetX: c,
|
|
1377
|
-
targetY:
|
|
1378
|
-
}),
|
|
1379
|
-
|
|
1390
|
+
targetY: l
|
|
1391
|
+
}), y = s == null ? void 0 : s.onAddStepClick, g = (f) => {
|
|
1392
|
+
f.stopPropagation(), typeof y == "function" && y(r, {
|
|
1380
1393
|
edgeId: t,
|
|
1381
|
-
nodeId:
|
|
1382
|
-
sourceNodeId:
|
|
1383
|
-
targetNodeId:
|
|
1394
|
+
nodeId: r,
|
|
1395
|
+
sourceNodeId: r,
|
|
1396
|
+
targetNodeId: d,
|
|
1384
1397
|
position: "between",
|
|
1385
|
-
referenceNodeId:
|
|
1386
|
-
referenceNodeType:
|
|
1387
|
-
stepVisibility:
|
|
1388
|
-
filterId:
|
|
1389
|
-
branch:
|
|
1398
|
+
referenceNodeId: r,
|
|
1399
|
+
referenceNodeType: s == null ? void 0 : s.referenceNodeType,
|
|
1400
|
+
stepVisibility: s == null ? void 0 : s.stepVisibility,
|
|
1401
|
+
filterId: s == null ? void 0 : s.filterId,
|
|
1402
|
+
branch: s == null ? void 0 : s.branch
|
|
1390
1403
|
});
|
|
1391
|
-
},
|
|
1392
|
-
(
|
|
1404
|
+
}, u = (f) => {
|
|
1405
|
+
(f.key === "Enter" || f.key === " ") && (f.preventDefault(), g(f));
|
|
1393
1406
|
};
|
|
1394
|
-
return /* @__PURE__ */
|
|
1395
|
-
/* @__PURE__ */ e(q, { id: t, path:
|
|
1396
|
-
/* @__PURE__ */
|
|
1407
|
+
return /* @__PURE__ */ n("g", { className: "edge-with-plus-wrapper", children: [
|
|
1408
|
+
/* @__PURE__ */ e(q, { id: t, path: p, style: { stroke: "#b0bec5" } }),
|
|
1409
|
+
/* @__PURE__ */ n(
|
|
1397
1410
|
"g",
|
|
1398
1411
|
{
|
|
1399
1412
|
className: "nodrag nopan edge-plus-svg",
|
|
1400
|
-
transform: `translate(${
|
|
1413
|
+
transform: `translate(${a}, ${h})`,
|
|
1401
1414
|
style: {
|
|
1402
|
-
cursor:
|
|
1415
|
+
cursor: y ? "pointer" : "default",
|
|
1403
1416
|
pointerEvents: "all",
|
|
1404
1417
|
outline: "none"
|
|
1405
1418
|
},
|
|
1406
|
-
onClick:
|
|
1407
|
-
onKeyDown:
|
|
1408
|
-
role:
|
|
1409
|
-
tabIndex:
|
|
1419
|
+
onClick: y ? g : void 0,
|
|
1420
|
+
onKeyDown: y ? u : void 0,
|
|
1421
|
+
role: y ? "button" : void 0,
|
|
1422
|
+
tabIndex: y ? 0 : void 0,
|
|
1410
1423
|
"data-testid": "plus-node-icon",
|
|
1411
1424
|
children: [
|
|
1412
1425
|
/* @__PURE__ */ e("circle", { r: bt, className: "edge-plus-circle" }),
|
|
@@ -1417,7 +1430,7 @@ const ft = ({ id: t, data: n }) => {
|
|
|
1417
1430
|
y1: -K,
|
|
1418
1431
|
x2: 0,
|
|
1419
1432
|
y2: K,
|
|
1420
|
-
strokeWidth:
|
|
1433
|
+
strokeWidth: se,
|
|
1421
1434
|
strokeLinecap: "round",
|
|
1422
1435
|
className: "plus-line"
|
|
1423
1436
|
}
|
|
@@ -1429,12 +1442,12 @@ const ft = ({ id: t, data: n }) => {
|
|
|
1429
1442
|
y1: 0,
|
|
1430
1443
|
x2: K,
|
|
1431
1444
|
y2: 0,
|
|
1432
|
-
strokeWidth:
|
|
1445
|
+
strokeWidth: se,
|
|
1433
1446
|
strokeLinecap: "round",
|
|
1434
1447
|
className: "plus-line"
|
|
1435
1448
|
}
|
|
1436
1449
|
),
|
|
1437
|
-
/* @__PURE__ */
|
|
1450
|
+
/* @__PURE__ */ n("g", { className: "edge-plus-tooltip", transform: "translate(18, 0)", children: [
|
|
1438
1451
|
/* @__PURE__ */ e(
|
|
1439
1452
|
"rect",
|
|
1440
1453
|
{
|
|
@@ -1464,67 +1477,67 @@ const ft = ({ id: t, data: n }) => {
|
|
|
1464
1477
|
}
|
|
1465
1478
|
)
|
|
1466
1479
|
] });
|
|
1467
|
-
}, Dt = ({ id: t, sourceX:
|
|
1468
|
-
const [
|
|
1469
|
-
return /* @__PURE__ */ e(q, { id: t, path:
|
|
1470
|
-
}, xt = 11.5,
|
|
1480
|
+
}, Dt = ({ id: t, sourceX: i, sourceY: o, targetX: c, targetY: l }) => {
|
|
1481
|
+
const [r] = U({ sourceX: i, sourceY: o, targetX: c, targetY: l });
|
|
1482
|
+
return /* @__PURE__ */ e(q, { id: t, path: r, style: { stroke: "#b0bec5" } });
|
|
1483
|
+
}, xt = 11.5, ce = 2, M = 6, vt = -24, ae = 40, de = 20, fe = 4, Wt = ({
|
|
1471
1484
|
id: t,
|
|
1472
|
-
sourceX:
|
|
1473
|
-
sourceY:
|
|
1485
|
+
sourceX: i,
|
|
1486
|
+
sourceY: o,
|
|
1474
1487
|
targetX: c,
|
|
1475
|
-
targetY:
|
|
1476
|
-
source:
|
|
1477
|
-
target:
|
|
1478
|
-
data:
|
|
1488
|
+
targetY: l,
|
|
1489
|
+
source: r,
|
|
1490
|
+
target: d,
|
|
1491
|
+
data: s
|
|
1479
1492
|
}) => {
|
|
1480
|
-
const [
|
|
1481
|
-
|
|
1493
|
+
const [p, a, h] = U({ sourceX: i, sourceY: o, targetX: c, targetY: l }), y = s == null ? void 0 : s.label, g = y === "Pass", u = g || y === "Fail", f = s == null ? void 0 : s.onAddStepClick, v = (s == null ? void 0 : s.showPlus) !== !1 && !!f, w = (k) => {
|
|
1494
|
+
k.stopPropagation(), typeof f == "function" && f(r, {
|
|
1482
1495
|
edgeId: t,
|
|
1483
|
-
nodeId:
|
|
1484
|
-
sourceNodeId:
|
|
1485
|
-
targetNodeId:
|
|
1496
|
+
nodeId: r,
|
|
1497
|
+
sourceNodeId: r,
|
|
1498
|
+
targetNodeId: d,
|
|
1486
1499
|
position: "between",
|
|
1487
|
-
referenceNodeId:
|
|
1488
|
-
referenceNodeType:
|
|
1489
|
-
stepVisibility:
|
|
1500
|
+
referenceNodeId: r,
|
|
1501
|
+
referenceNodeType: s == null ? void 0 : s.referenceNodeType,
|
|
1502
|
+
stepVisibility: s == null ? void 0 : s.stepVisibility
|
|
1490
1503
|
});
|
|
1491
|
-
},
|
|
1492
|
-
(
|
|
1504
|
+
}, T = (k) => {
|
|
1505
|
+
(k.key === "Enter" || k.key === " ") && (k.preventDefault(), w(k));
|
|
1493
1506
|
};
|
|
1494
|
-
return /* @__PURE__ */
|
|
1495
|
-
/* @__PURE__ */ e(q, { id: t, path:
|
|
1496
|
-
/* @__PURE__ */
|
|
1507
|
+
return /* @__PURE__ */ n("g", { className: "edge-with-plus-wrapper", children: [
|
|
1508
|
+
/* @__PURE__ */ e(q, { id: t, path: p, style: { stroke: "#b0bec5" } }),
|
|
1509
|
+
/* @__PURE__ */ n(
|
|
1497
1510
|
"g",
|
|
1498
1511
|
{
|
|
1499
1512
|
className: "nodrag nopan edge-plus-svg",
|
|
1500
|
-
transform: `translate(${
|
|
1501
|
-
style: { cursor:
|
|
1502
|
-
onClick:
|
|
1503
|
-
onKeyDown:
|
|
1504
|
-
role:
|
|
1505
|
-
tabIndex:
|
|
1513
|
+
transform: `translate(${a}, ${h})`,
|
|
1514
|
+
style: { cursor: f ? "pointer" : "default", pointerEvents: "all", outline: "none" },
|
|
1515
|
+
onClick: f ? w : void 0,
|
|
1516
|
+
onKeyDown: f ? T : void 0,
|
|
1517
|
+
role: f ? "button" : void 0,
|
|
1518
|
+
tabIndex: f ? 0 : void 0,
|
|
1506
1519
|
children: [
|
|
1507
|
-
|
|
1520
|
+
u && /* @__PURE__ */ n("g", { transform: `translate(0, ${v ? vt : 0})`, children: [
|
|
1508
1521
|
/* @__PURE__ */ e(
|
|
1509
1522
|
"rect",
|
|
1510
1523
|
{
|
|
1511
|
-
x: -
|
|
1512
|
-
y: -
|
|
1513
|
-
width:
|
|
1514
|
-
height:
|
|
1515
|
-
rx:
|
|
1516
|
-
ry:
|
|
1517
|
-
fill:
|
|
1524
|
+
x: -ae / 2,
|
|
1525
|
+
y: -de / 2,
|
|
1526
|
+
width: ae,
|
|
1527
|
+
height: de,
|
|
1528
|
+
rx: fe,
|
|
1529
|
+
ry: fe,
|
|
1530
|
+
fill: g ? "#ADE6C5" : "#FDBFBF"
|
|
1518
1531
|
}
|
|
1519
1532
|
),
|
|
1520
|
-
/* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill:
|
|
1533
|
+
/* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: g ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: y })
|
|
1521
1534
|
] }),
|
|
1522
|
-
v && /* @__PURE__ */
|
|
1535
|
+
v && /* @__PURE__ */ n("g", { className: "plus-icon-container", children: [
|
|
1523
1536
|
/* @__PURE__ */ e("circle", { r: xt, className: "edge-plus-circle" }),
|
|
1524
|
-
/* @__PURE__ */ e("line", { x1: 0, y1: -M, x2: 0, y2: M, strokeWidth:
|
|
1525
|
-
/* @__PURE__ */ e("line", { x1: -M, y1: 0, x2: M, y2: 0, strokeWidth:
|
|
1537
|
+
/* @__PURE__ */ e("line", { x1: 0, y1: -M, x2: 0, y2: M, strokeWidth: ce, strokeLinecap: "round", className: "plus-line" }),
|
|
1538
|
+
/* @__PURE__ */ e("line", { x1: -M, y1: 0, x2: M, y2: 0, strokeWidth: ce, strokeLinecap: "round", className: "plus-line" })
|
|
1526
1539
|
] }),
|
|
1527
|
-
v && /* @__PURE__ */
|
|
1540
|
+
v && /* @__PURE__ */ n("g", { className: "edge-plus-tooltip", transform: "translate(22, 0)", children: [
|
|
1528
1541
|
/* @__PURE__ */ e("rect", { x: 0, y: -10, width: 65, height: 20, rx: 4, className: "tooltip-bg" }),
|
|
1529
1542
|
/* @__PURE__ */ e("path", { d: "M0 -4 L-4 0 L0 4 Z", className: "tooltip-bg" }),
|
|
1530
1543
|
/* @__PURE__ */ e("text", { x: 32, y: 0, textAnchor: "middle", dominantBaseline: "central", fill: "white", style: { fontSize: 10, fontWeight: 600, pointerEvents: "none" }, children: "Add Step" })
|
|
@@ -1535,49 +1548,52 @@ const ft = ({ id: t, data: n }) => {
|
|
|
1535
1548
|
] });
|
|
1536
1549
|
}, $t = ({
|
|
1537
1550
|
id: t,
|
|
1538
|
-
source:
|
|
1539
|
-
target:
|
|
1551
|
+
source: i,
|
|
1552
|
+
target: o,
|
|
1540
1553
|
sourceX: c,
|
|
1541
|
-
sourceY:
|
|
1542
|
-
targetX:
|
|
1543
|
-
targetY:
|
|
1544
|
-
style:
|
|
1545
|
-
markerEnd:
|
|
1546
|
-
data:
|
|
1554
|
+
sourceY: l,
|
|
1555
|
+
targetX: r,
|
|
1556
|
+
targetY: d,
|
|
1557
|
+
style: s = {},
|
|
1558
|
+
markerEnd: p,
|
|
1559
|
+
data: a
|
|
1547
1560
|
}) => {
|
|
1548
|
-
const h = (
|
|
1549
|
-
|
|
1550
|
-
|
|
1561
|
+
const h = (a == null ? void 0 : a.verticalRouting) ?? !1, y = (a == null ? void 0 : a.sideRouting) ?? !1, g = 30, u = y ? (
|
|
1562
|
+
// From the right handle: straight across to the target X, then down into its top.
|
|
1563
|
+
`M ${c},${l} L ${r},${l} L ${r},${d}`
|
|
1564
|
+
) : h ? (() => {
|
|
1565
|
+
const N = d - g;
|
|
1566
|
+
return `M ${c},${N} L ${r},${N} L ${r},${d}`;
|
|
1551
1567
|
})() : (() => {
|
|
1552
|
-
const
|
|
1553
|
-
return `M ${c},${
|
|
1554
|
-
})(),
|
|
1555
|
-
|
|
1568
|
+
const N = l + 30;
|
|
1569
|
+
return `M ${c},${l} L ${c},${N} L ${r},${N} L ${r},${d}`;
|
|
1570
|
+
})(), f = s.stroke || "#d1d5db", v = a == null ? void 0 : a.label, w = (a == null ? void 0 : a.isFirst) ?? !1, T = a == null ? void 0 : a.onAddStepClick, k = y ? l : h ? d - g : l + 30, z = y ? c + (r - c) * 0.45 : c + (r - c) * (h ? 0.25 : 0.35), x = c + (r - c) * (h ? 0.65 : 0.7), I = k, D = (N) => {
|
|
1571
|
+
N.stopPropagation(), T && T(i, {
|
|
1556
1572
|
edgeId: t,
|
|
1557
|
-
nodeId:
|
|
1558
|
-
sourceNodeId:
|
|
1559
|
-
targetNodeId:
|
|
1573
|
+
nodeId: i,
|
|
1574
|
+
sourceNodeId: i,
|
|
1575
|
+
targetNodeId: o,
|
|
1560
1576
|
position: "between",
|
|
1561
|
-
referenceNodeId:
|
|
1562
|
-
filterId:
|
|
1563
|
-
branch:
|
|
1577
|
+
referenceNodeId: i,
|
|
1578
|
+
filterId: a == null ? void 0 : a.filterId,
|
|
1579
|
+
branch: a == null ? void 0 : a.branch
|
|
1564
1580
|
});
|
|
1565
|
-
},
|
|
1566
|
-
return /* @__PURE__ */
|
|
1567
|
-
/* @__PURE__ */ e("path", { id: t, d:
|
|
1568
|
-
|
|
1569
|
-
const
|
|
1570
|
-
return /* @__PURE__ */
|
|
1581
|
+
}, j = 11.5, L = 6;
|
|
1582
|
+
return /* @__PURE__ */ n("g", { children: [
|
|
1583
|
+
/* @__PURE__ */ e("path", { id: t, d: u, fill: "none", stroke: f, strokeWidth: 1.5, markerEnd: p }),
|
|
1584
|
+
v && (!h || y) && /* @__PURE__ */ e("g", { transform: `translate(${z}, ${I})`, children: (() => {
|
|
1585
|
+
const N = Math.max(44, v.length * 7 + 20);
|
|
1586
|
+
return /* @__PURE__ */ n(E, { children: [
|
|
1571
1587
|
/* @__PURE__ */ e(
|
|
1572
1588
|
"rect",
|
|
1573
1589
|
{
|
|
1574
|
-
x: -
|
|
1590
|
+
x: -N / 2,
|
|
1575
1591
|
y: -11,
|
|
1576
|
-
width:
|
|
1592
|
+
width: N,
|
|
1577
1593
|
height: 22,
|
|
1578
1594
|
rx: 11,
|
|
1579
|
-
fill:
|
|
1580
|
-
stroke:
|
|
1595
|
+
fill: w ? "#e8f5e9" : "#ffebee",
|
|
1596
|
+
stroke: w ? "#81c784" : "#e57373",
|
|
1581
1597
|
strokeWidth: 1
|
|
1582
1598
|
}
|
|
1583
1599
|
),
|
|
@@ -1589,31 +1605,31 @@ const ft = ({ id: t, data: n }) => {
|
|
|
1589
1605
|
textAnchor: "middle",
|
|
1590
1606
|
fontSize: 10,
|
|
1591
1607
|
fontWeight: 600,
|
|
1592
|
-
fill:
|
|
1608
|
+
fill: w ? "#2e7d32" : "#c62828",
|
|
1593
1609
|
style: { fontFamily: "sans-serif", pointerEvents: "none" },
|
|
1594
|
-
children:
|
|
1610
|
+
children: v
|
|
1595
1611
|
}
|
|
1596
1612
|
)
|
|
1597
1613
|
] });
|
|
1598
1614
|
})() }),
|
|
1599
|
-
|
|
1615
|
+
T && /* @__PURE__ */ n(
|
|
1600
1616
|
"g",
|
|
1601
1617
|
{
|
|
1602
|
-
transform: `translate(${
|
|
1603
|
-
onClick:
|
|
1618
|
+
transform: `translate(${x}, ${I})`,
|
|
1619
|
+
onClick: D,
|
|
1604
1620
|
style: { cursor: "pointer", pointerEvents: "all" },
|
|
1605
1621
|
className: "nodrag nopan edge-plus-svg",
|
|
1606
1622
|
children: [
|
|
1607
|
-
/* @__PURE__ */ e("circle", { r:
|
|
1608
|
-
/* @__PURE__ */ e("line", { x1: 0, y1: -
|
|
1609
|
-
/* @__PURE__ */ e("line", { x1: -
|
|
1623
|
+
/* @__PURE__ */ e("circle", { r: j, className: "edge-plus-circle" }),
|
|
1624
|
+
/* @__PURE__ */ e("line", { x1: 0, y1: -L, x2: 0, y2: L, strokeWidth: 2, strokeLinecap: "round", className: "plus-line" }),
|
|
1625
|
+
/* @__PURE__ */ e("line", { x1: -L, y1: 0, x2: L, y2: 0, strokeWidth: 2, strokeLinecap: "round", className: "plus-line" })
|
|
1610
1626
|
]
|
|
1611
1627
|
}
|
|
1612
1628
|
)
|
|
1613
1629
|
] });
|
|
1614
1630
|
};
|
|
1615
1631
|
export {
|
|
1616
|
-
|
|
1632
|
+
it as A,
|
|
1617
1633
|
st as D,
|
|
1618
1634
|
Lt as E,
|
|
1619
1635
|
nt as F,
|
|
@@ -1631,8 +1647,8 @@ export {
|
|
|
1631
1647
|
Rt as d,
|
|
1632
1648
|
It as e,
|
|
1633
1649
|
ge as f,
|
|
1634
|
-
|
|
1650
|
+
Ze as g,
|
|
1635
1651
|
Fe as h,
|
|
1636
|
-
|
|
1652
|
+
Ye as r
|
|
1637
1653
|
};
|
|
1638
|
-
//# sourceMappingURL=GatewayBranchEdge-
|
|
1654
|
+
//# sourceMappingURL=GatewayBranchEdge-C023FhhW.js.map
|