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