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