@notmrabhi/flowforge 0.1.15 → 0.1.17

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.
@@ -1,10 +1,10 @@
1
- import { jsxs as n, jsx as e, Fragment as R } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as e, Fragment as L } from "react/jsx-runtime";
2
2
  import { Handle as b, Position as x, getStraightPath as M, BaseEdge as K } from "reactflow";
3
3
  import { Tooltip as A, Chip as U } from "@mui/material";
4
4
  import { GrTrigger as ce } from "react-icons/gr";
5
5
  import { createContext as de, useContext as ae } from "react";
6
6
  import { d as pe } from "./messages-CO299wPN.js";
7
- import { MdOutlineModeEdit as T, MdInfoOutline as W, MdInput as oe, MdDeleteOutline as P, MdCheckCircle as he, MdPeople as ge, MdSchedule as ye, MdWebhook as ie, MdNotifications as j, MdSms as me, MdEmail as ue, MdContentCopy as be, MdHttp as xe, MdCallSplit as Ne, MdAccountTree as ke, MdOpenInNew as ve } from "react-icons/md";
7
+ import { MdOutlineModeEdit as T, MdInfoOutline as W, MdInput as oe, MdDeleteOutline as P, MdCheckCircle as ge, MdPeople as he, MdSchedule as ye, MdWebhook as ie, MdNotifications as j, MdSms as ue, MdEmail as me, MdContentCopy as be, MdHttp as xe, MdCallSplit as Ne, MdAccountTree as ke, MdOpenInNew as ve } from "react-icons/md";
8
8
  import { FaCheckCircle as le, FaTimesCircle as re } from "react-icons/fa";
9
9
  import { FiFilter as we } from "react-icons/fi";
10
10
  import { a as F, H as Se, B as O } from "./canvasTokens-CAD6G24b.js";
@@ -81,21 +81,21 @@ const De = ({ data: t }) => {
81
81
  eventType: a,
82
82
  sources: s,
83
83
  label: r,
84
- source: h,
84
+ source: g,
85
85
  previewWorkflow: o,
86
86
  executionStatus: l,
87
87
  infoText: d = "This node decides the flow trigger type and configuration."
88
- } = t ?? {}, y = (u) => {
89
- u == null || u.stopPropagation(), i();
90
- }, g = Array.isArray(s) && s.length > 0, N = !!(r || h), p = f === "scheduler" ? "Scheduler Trigger" : f === "event" || g || N ? "Event Trigger Source" : "Select Trigger", c = f === "scheduler" ? /* @__PURE__ */ e("span", { children: "Scheduler to be configured" }) : f === "event" || g ? /* @__PURE__ */ n("div", { children: [
88
+ } = t ?? {}, y = (m) => {
89
+ m == null || m.stopPropagation(), i();
90
+ }, h = Array.isArray(s) && s.length > 0, N = !!(r || g), p = f === "scheduler" ? "Scheduler Trigger" : f === "event" || h || N ? "Event Trigger Source" : "Select Trigger", c = f === "scheduler" ? /* @__PURE__ */ e("span", { children: "Scheduler to be configured" }) : f === "event" || h ? /* @__PURE__ */ n("div", { children: [
91
91
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
92
92
  /* @__PURE__ */ e("span", { style: { fontWeight: 600 }, children: Pe(a) }),
93
93
  /* @__PURE__ */ e("span", { className: "ff-ms-2 ff-text-muted", style: { fontSize: 12 }, children: "via" })
94
94
  ] }),
95
- /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-2", style: { gap: 4 }, children: g ? s.map((u, w) => /* @__PURE__ */ e(
95
+ /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-2", style: { gap: 4 }, children: h ? s.map((m, w) => /* @__PURE__ */ e(
96
96
  U,
97
97
  {
98
- label: Ae(u),
98
+ label: Ae(m),
99
99
  variant: "outlined",
100
100
  size: "small",
101
101
  className: "ff-text-dark"
@@ -104,20 +104,20 @@ const De = ({ data: t }) => {
104
104
  )) : /* @__PURE__ */ e("span", { className: "ff-text-muted", style: { fontSize: 12 }, children: "No source selected" }) })
105
105
  ] }) : N ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-wrap ff-align-items-center", style: { gap: 6 }, children: [
106
106
  r && /* @__PURE__ */ e("span", { style: { fontWeight: 600 }, children: r }),
107
- h && /* @__PURE__ */ e(U, { label: h, variant: "outlined", size: "small" })
107
+ g && /* @__PURE__ */ e(U, { label: g, variant: "outlined", size: "small" })
108
108
  ] }) : /* @__PURE__ */ e(
109
109
  "span",
110
110
  {
111
111
  role: "button",
112
112
  tabIndex: 0,
113
113
  onClick: y,
114
- onKeyDown: (u) => {
115
- (u.key === "Enter" || u.key === " ") && y(u);
114
+ onKeyDown: (m) => {
115
+ (m.key === "Enter" || m.key === " ") && y(m);
116
116
  },
117
117
  style: { cursor: "pointer", color: "#1e88e5" },
118
118
  children: "Click to select a trigger to start your workflow"
119
119
  }
120
- ), v = l ? /* @__PURE__ */ n(R, { children: [
120
+ ), v = l ? /* @__PURE__ */ n(L, { children: [
121
121
  l.status === "success" && /* @__PURE__ */ e(le, { size: 16, color: "#1DBF60", style: { marginRight: 8 } }),
122
122
  l.status === "failed" && /* @__PURE__ */ e(re, { size: 16, color: "#f44336", style: { marginRight: 8 } })
123
123
  ] }) : /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
@@ -127,8 +127,8 @@ const De = ({ data: t }) => {
127
127
  role: "button",
128
128
  tabIndex: 0,
129
129
  onClick: y,
130
- onKeyDown: (u) => {
131
- (u.key === "Enter" || u.key === " ") && y(u);
130
+ onKeyDown: (m) => {
131
+ (m.key === "Enter" || m.key === " ") && y(m);
132
132
  },
133
133
  className: "ff-me-2",
134
134
  style: { cursor: "pointer", color: "#212121" },
@@ -171,7 +171,7 @@ const De = ({ data: t }) => {
171
171
  fontSize: 12,
172
172
  color: "#212121",
173
173
  padding: "10px 6px",
174
- margin: "0 12px 12px",
174
+ margin: "0 6px 10px",
175
175
  borderRadius: 6
176
176
  },
177
177
  children: c
@@ -181,10 +181,10 @@ const De = ({ data: t }) => {
181
181
  /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 }, id: "1" })
182
182
  ] });
183
183
  };
184
- function Le(t) {
184
+ function Re(t) {
185
185
  return t ? t === "END_USER_CREATION" ? "New User Registration" : t === "END_USER_UPDATION" ? "On User Update" : t.replace(/[_-]+/g, " ").replace(/\b\w/g, (i) => i.toUpperCase()) : "";
186
186
  }
187
- function Re(t) {
187
+ function Le(t) {
188
188
  const i = typeof t == "string" ? t : t.value ?? "";
189
189
  return i === "SIGNUP_FLOW" ? "User Self-Registration" : i === "ADMIN_CREATION_FLOW" ? "Create User via Admin Portal" : i === "SHEDULAR" || i === "SCHEDULER" ? "Scheduler" : typeof t != "string" && t.label ? t.label : i.replace(/[_-]+/g, " ").replace(/\b\w/g, (f) => f.toUpperCase());
190
190
  }
@@ -195,12 +195,12 @@ const We = ({ data: t }) => {
195
195
  eventType: a,
196
196
  sources: s,
197
197
  executionStatus: r,
198
- infoText: h = "This event is raised by the system. It cannot be configured."
199
- } = t ?? {}, o = f ?? Le(a) ?? "—";
198
+ infoText: g = "This event is raised by the system. It cannot be configured."
199
+ } = t ?? {}, o = f ?? Re(a) ?? "—";
200
200
  return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
201
201
  /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
202
202
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #a5d6a7", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
203
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 12px" }, children: [
203
+ /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
204
204
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
205
205
  /* @__PURE__ */ e(
206
206
  "div",
@@ -223,7 +223,7 @@ const We = ({ data: t }) => {
223
223
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
224
224
  (r == null ? void 0 : r.status) === "success" && /* @__PURE__ */ e(le, { size: 16, color: "#1DBF60", style: { marginRight: 8 } }),
225
225
  (r == null ? void 0 : r.status) === "failed" && /* @__PURE__ */ e(re, { size: 16, color: "#f44336", style: { marginRight: 8 } }),
226
- !r && /* @__PURE__ */ e(A, { title: /* @__PURE__ */ e("div", { children: h }), placement: "right", arrow: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(W, { color: "gray", size: 16 }) }) })
226
+ !r && /* @__PURE__ */ e(A, { title: /* @__PURE__ */ e("div", { children: g }), placement: "right", arrow: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(W, { color: "gray", size: 16 }) }) })
227
227
  ] })
228
228
  ] }),
229
229
  /* @__PURE__ */ n(
@@ -234,17 +234,17 @@ const We = ({ data: t }) => {
234
234
  fontSize: 13,
235
235
  color: "#212121",
236
236
  padding: "10px 12px",
237
- margin: "0 12px 12px",
237
+ margin: "0 6px 10px",
238
238
  borderRadius: 6
239
239
  },
240
240
  children: [
241
241
  /* @__PURE__ */ e("div", { style: { fontWeight: 600 }, children: o }),
242
- Array.isArray(s) && s.length > 0 && /* @__PURE__ */ n(R, { children: [
242
+ Array.isArray(s) && s.length > 0 && /* @__PURE__ */ n(L, { children: [
243
243
  /* @__PURE__ */ e("div", { className: "ff-text-muted", style: { fontSize: 12, marginTop: 4 }, children: "via" }),
244
244
  /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-1", style: { gap: 4 }, children: s.map((l, d) => /* @__PURE__ */ e(
245
245
  U,
246
246
  {
247
- label: Re(l),
247
+ label: Le(l),
248
248
  variant: "outlined",
249
249
  size: "small",
250
250
  className: "ff-text-dark"
@@ -271,8 +271,8 @@ const We = ({ data: t }) => {
271
271
  children: [
272
272
  /* @__PURE__ */ e("line", { x1: f, y1: 0, x2: f, y2: t.height, stroke: a, strokeWidth: 1.5 }),
273
273
  t.branches.map((s, r) => {
274
- const h = s.y;
275
- return /* @__PURE__ */ n("g", { transform: `translate(0, ${h})`, children: [
274
+ const g = s.y;
275
+ return /* @__PURE__ */ n("g", { transform: `translate(0, ${g})`, children: [
276
276
  /* @__PURE__ */ e(
277
277
  "rect",
278
278
  {
@@ -304,11 +304,11 @@ const We = ({ data: t }) => {
304
304
  }
305
305
  );
306
306
  }, Fe = ({ id: t, data: i }) => {
307
- const { onEditNode: f, onDeleteNode: a } = E(), { conditions: s = [], infoText: r = "Filter conditions applied to workflow data", _branchRail: h } = i;
307
+ const { onEditNode: f, onDeleteNode: a } = E(), { conditions: s = [], infoText: r = "Filter conditions applied to workflow data", _branchRail: g } = i;
308
308
  return /* @__PURE__ */ n("div", { style: { width: 350, position: "relative" }, children: [
309
309
  /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
310
310
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #ffe082", borderRadius: 8, background: "#fff" }, children: [
311
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-mb-2 ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2", children: [
311
+ /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
312
312
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
313
313
  /* @__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(we, { className: "ff-text-warning", size: 16 }) }),
314
314
  /* @__PURE__ */ e("span", { className: "ff-ms-2 ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "Filter" })
@@ -346,7 +346,7 @@ const We = ({ data: t }) => {
346
346
  /* @__PURE__ */ e(A, { title: r, placement: "right", arrow: !0, children: /* @__PURE__ */ e("div", { className: "ff-ms-2", children: /* @__PURE__ */ e(W, { color: "gray", size: 16 }) }) })
347
347
  ] })
348
348
  ] }),
349
- /* @__PURE__ */ e("div", { className: "ff-p-2 ff-mx-2 ff-mb-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: s.length === 0 ? /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "No conditions configured" }) : s.map((o, l) => /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-mb-1", children: [
349
+ /* @__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__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-mb-1", children: [
350
350
  /* @__PURE__ */ e("p", { className: "ff-m-0 ff-fw-bold ff-me-1 ff-text-truncate", style: { maxWidth: 100 }, title: o.field, children: o.field }),
351
351
  /* @__PURE__ */ e("span", { className: "ff-text-muted", children: o.operator }),
352
352
  /* @__PURE__ */ e("p", { className: "ff-text-dark ff-text-truncate ff-mx-1 ff-m-0", title: o.value, children: o.value }),
@@ -354,17 +354,17 @@ const We = ({ data: t }) => {
354
354
  ] }, l)) })
355
355
  ] }),
356
356
  /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } }),
357
- h && /* @__PURE__ */ e(se, { rail: h, cardWidth: 350 })
357
+ g && /* @__PURE__ */ e(se, { rail: g, cardWidth: 350 })
358
358
  ] });
359
359
  }, $e = ({ id: t, data: i }) => {
360
- const { onEditNode: f, onDeleteNode: a, nodeRegistry: s, nodeBody: r = "full" } = E(), { title: h = "Task", descriptorType: o, groupBlocks: l, groups: d, roles: y, groupId: g, roleId: N, infoText: p = "" } = i, c = o ? s == null ? void 0 : s.forType(o) : void 0, v = c == null ? void 0 : c.icon, u = (m) => m == null ? "" : typeof m == "string" ? m : typeof m == "object" && "label" in m ? String(m.label) : String(m), w = (m) => Array.isArray(m) ? m.map(u).filter(Boolean) : m != null && m !== "" ? [u(m)] : [], k = (l == null ? void 0 : l.flatMap((m) => m.groups ?? [])) ?? [...w(d), ...w(y), ...w(g), ...w(N)], I = k.length > 0;
360
+ const { onEditNode: f, onDeleteNode: a, nodeRegistry: s, nodeBody: r = "full" } = E(), { title: g = "Task", descriptorType: o, groupBlocks: l, groups: d, roles: y, groupId: h, roleId: N, infoText: p = "" } = i, c = o ? s == null ? void 0 : s.forType(o) : void 0, v = c == null ? void 0 : c.icon, m = (u) => u == null ? "" : typeof u == "string" ? u : typeof u == "object" && "label" in u ? String(u.label) : String(u), w = (u) => Array.isArray(u) ? u.map(m).filter(Boolean) : u != null && u !== "" ? [m(u)] : [], k = (l == null ? void 0 : l.flatMap((u) => u.groups ?? [])) ?? [...w(d), ...w(y), ...w(h), ...w(N)], I = k.length > 0;
361
361
  return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
362
362
  /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
363
363
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
364
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1", children: [
364
+ /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
365
365
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
366
366
  v && /* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center" }, children: v }),
367
- /* @__PURE__ */ e("span", { className: "ff-text-dark", style: { fontSize: 14, fontWeight: 500 }, children: h })
367
+ /* @__PURE__ */ e("span", { className: "ff-text-dark", style: { fontSize: 14, fontWeight: 500 }, children: g })
368
368
  ] }),
369
369
  /* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
370
370
  /* @__PURE__ */ e(
@@ -372,11 +372,11 @@ const We = ({ data: t }) => {
372
372
  {
373
373
  role: "button",
374
374
  tabIndex: 0,
375
- onClick: (m) => {
376
- m.stopPropagation(), f(t);
375
+ onClick: (u) => {
376
+ u.stopPropagation(), f(t);
377
377
  },
378
- onKeyDown: (m) => {
379
- m.key === "Enter" && (m.stopPropagation(), f(t));
378
+ onKeyDown: (u) => {
379
+ u.key === "Enter" && (u.stopPropagation(), f(t));
380
380
  },
381
381
  children: /* @__PURE__ */ e(T, { size: 16 })
382
382
  }
@@ -387,11 +387,11 @@ const We = ({ data: t }) => {
387
387
  className: "ff-ms-2",
388
388
  role: "button",
389
389
  tabIndex: 0,
390
- onClick: (m) => {
391
- m.stopPropagation(), a(t);
390
+ onClick: (u) => {
391
+ u.stopPropagation(), a(t);
392
392
  },
393
- onKeyDown: (m) => {
394
- m.key === "Enter" && (m.stopPropagation(), a(t));
393
+ onKeyDown: (u) => {
394
+ u.key === "Enter" && (u.stopPropagation(), a(t));
395
395
  },
396
396
  children: /* @__PURE__ */ e(P, { color: "red", size: 16 })
397
397
  }
@@ -399,18 +399,18 @@ const We = ({ data: t }) => {
399
399
  p && /* @__PURE__ */ e(A, { title: p, placement: "right", arrow: !0, children: /* @__PURE__ */ e("div", { className: "ff-ms-2", children: /* @__PURE__ */ e(W, { color: "gray", size: 16 }) }) })
400
400
  ] })
401
401
  ] }),
402
- r !== "title-only" && /* @__PURE__ */ e("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: c != null && c.renderNode ? c.renderNode(i) : I ? /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-gap-1", children: k.map((m, z) => /* @__PURE__ */ e("span", { className: "ff-badge ff-bg-dark ff-text-white ff-py-1 ff-px-2 ff-rounded", style: { fontSize: 11 }, title: m, children: m }, z)) }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured" }) })
402
+ r !== "title-only" && /* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: c != null && c.renderNode ? c.renderNode(i) : I ? /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-gap-1", children: k.map((u, z) => /* @__PURE__ */ e("span", { className: "ff-badge ff-bg-dark ff-text-white ff-py-1 ff-px-2 ff-rounded", style: { fontSize: 11 }, title: u, children: u }, z)) }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured" }) })
403
403
  ] }),
404
404
  /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
405
405
  ] });
406
406
  }, H = 5, Be = ({ id: t, data: i }) => {
407
- const { onEditNode: f, onDeleteNode: a } = E(), { approvalData: s, isPreview: r = !1, _branchRail: h } = i, o = (s == null ? void 0 : s.policy) ?? {}, l = o.stages ?? [], d = l.length, y = l.slice(0, H), g = d - H, N = o.name ?? o.policyName ?? "Untitled Policy";
407
+ const { onEditNode: f, onDeleteNode: a } = E(), { approvalData: s, isPreview: r = !1, _branchRail: g } = i, o = (s == null ? void 0 : s.policy) ?? {}, l = o.stages ?? [], d = l.length, y = l.slice(0, H), h = d - H, N = o.name ?? o.policyName ?? "Untitled Policy";
408
408
  return /* @__PURE__ */ n("div", { style: { width: 350, position: "relative" }, children: [
409
409
  /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
410
410
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #ffe082", borderRadius: 8, background: "#fff" }, children: [
411
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-mb-2 ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2", children: [
411
+ /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
412
412
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
413
- /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(251,192,45,0.2)" }, children: /* @__PURE__ */ e(he, { style: { color: "#FBC02D" }, size: 16 }) }),
413
+ /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(251,192,45,0.2)" }, children: /* @__PURE__ */ e(ge, { style: { color: "#FBC02D" }, size: 16 }) }),
414
414
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "Approval Policy" })
415
415
  ] }),
416
416
  /* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
@@ -448,7 +448,7 @@ const We = ({ data: t }) => {
448
448
  /* @__PURE__ */ e(A, { title: "This approval policy determines who must approve a request before the workflow continues.", arrow: !0, placement: "right", children: /* @__PURE__ */ e("span", { className: "ff-ms-2 ff-d-inline-flex", children: /* @__PURE__ */ e(W, { color: "gray", size: 16 }) }) })
449
449
  ] })
450
450
  ] }),
451
- /* @__PURE__ */ n("div", { className: "ff-p-2 ff-rounded ff-mx-2 ff-mb-2", style: { background: "#FCFCFC" }, children: [
451
+ /* @__PURE__ */ n("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#FCFCFC" }, children: [
452
452
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-start ff-align-items-center ff-mb-2", children: [
453
453
  /* @__PURE__ */ e("h6", { className: "ff-text-dark ff-mb-0 ff-text-truncate ff-flex-grow-1 ff-me-2", style: { fontSize: 13, fontWeight: 700 }, title: N, children: N }),
454
454
  /* @__PURE__ */ n("span", { className: "ff-badge ff-rounded-pill ff-px-2 ff-py-1 ff-flex-shrink-0", style: { background: "#FFF9C4", color: "#616161", fontSize: 11, fontWeight: 600 }, children: [
@@ -460,20 +460,20 @@ const We = ({ data: t }) => {
460
460
  l.length > 0 ? /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
461
461
  y.map((p, c) => {
462
462
  var z, D, C;
463
- const v = ((z = p.stageName) == null ? void 0 : z.trim()) || `Stage ${c + 1}`, u = Array.isArray(p.userIds) ? p.userIds.length : 0, w = ((D = p.groupName) == null ? void 0 : D.trim()) ?? "", k = ((C = p.roleName) == null ? void 0 : C.trim()) ?? "", I = u > 0 || w || k;
464
- let m = "Not configured";
465
- return w ? m = `Group: ${w}` : k ? m = `Role: ${k}` : u > 0 && (m = `${u} approver${u !== 1 ? "s" : ""}`), /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
463
+ const v = ((z = p.stageName) == null ? void 0 : z.trim()) || `Stage ${c + 1}`, m = Array.isArray(p.userIds) ? p.userIds.length : 0, w = ((D = p.groupName) == null ? void 0 : D.trim()) ?? "", k = ((C = p.roleName) == null ? void 0 : C.trim()) ?? "", I = m > 0 || w || k;
464
+ let u = "Not configured";
465
+ return w ? u = `Group: ${w}` : k ? u = `Role: ${k}` : m > 0 && (u = `${m} approver${m !== 1 ? "s" : ""}`), /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
466
466
  /* @__PURE__ */ e("div", { className: "ff-rounded-circle ff-d-flex ff-align-items-center ff-justify-content-center ff-flex-shrink-0", style: { width: 28, height: 28, background: "#FFF9C4", color: "#5D4037", fontSize: 12, fontWeight: 700 }, children: c + 1 }),
467
467
  /* @__PURE__ */ n("div", { className: "ff-flex-grow-1 ff-rounded ff-p-2 ff-d-flex ff-justify-content-between ff-align-items-center ff-border", style: { background: "#FFFDE7", borderColor: "#FEE79A" }, children: [
468
468
  /* @__PURE__ */ e("span", { style: { fontSize: 12, fontWeight: 700, color: "#212121" }, children: v }),
469
469
  /* @__PURE__ */ n("span", { className: `ff-d-flex ff-align-items-center ff-gap-1 ${I ? "ff-text-dark" : "ff-text-muted"}`, style: { fontSize: 12 }, children: [
470
- /* @__PURE__ */ e(ge, { size: 16, className: "ff-flex-shrink-0", style: { color: I ? "#5D4037" : "#9E9E9E" } }),
471
- m
470
+ /* @__PURE__ */ e(he, { size: 16, className: "ff-flex-shrink-0", style: { color: I ? "#5D4037" : "#9E9E9E" } }),
471
+ u
472
472
  ] })
473
473
  ] })
474
474
  ] }, c);
475
475
  }),
476
- g > 0 && /* @__PURE__ */ n(
476
+ h > 0 && /* @__PURE__ */ n(
477
477
  "div",
478
478
  {
479
479
  className: "ff-text-center ff-fw-bold ff-py-2 ff-border ff-rounded",
@@ -488,9 +488,9 @@ const We = ({ data: t }) => {
488
488
  },
489
489
  children: [
490
490
  "+ ",
491
- g,
491
+ h,
492
492
  " More Stage",
493
- g > 1 ? "s" : ""
493
+ h > 1 ? "s" : ""
494
494
  ]
495
495
  }
496
496
  )
@@ -498,10 +498,10 @@ const We = ({ data: t }) => {
498
498
  ] })
499
499
  ] }),
500
500
  /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } }),
501
- h && /* @__PURE__ */ e(se, { rail: h, cardWidth: 350 })
501
+ g && /* @__PURE__ */ e(se, { rail: g, cardWidth: 350 })
502
502
  ] });
503
503
  }, _e = ({ id: t, data: i }) => {
504
- const { onEditNode: f, onDeleteNode: a } = E(), { duration: s, unit: r } = i, h = s != null && r, o = h ? `Wait ${s} ${r}` : "Not configured";
504
+ const { onEditNode: f, onDeleteNode: a } = E(), { duration: s, unit: r } = i, g = s != null && r, o = g ? `Wait ${s} ${r}` : "Not configured";
505
505
  return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
506
506
  /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
507
507
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
@@ -542,15 +542,15 @@ const We = ({ data: t }) => {
542
542
  )
543
543
  ] })
544
544
  ] }),
545
- /* @__PURE__ */ e("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: /* @__PURE__ */ e("span", { className: h ? "ff-text-dark ff-fw-medium" : "ff-text-muted", children: o }) })
545
+ /* @__PURE__ */ e("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: /* @__PURE__ */ e("span", { className: g ? "ff-text-dark ff-fw-medium" : "ff-text-muted", children: o }) })
546
546
  ] }),
547
547
  /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
548
548
  ] });
549
549
  }, G = {
550
- email: { label: "Email", bg: "#e3f2fd", color: "#1565c0", iconType: ue },
550
+ email: { label: "Email", bg: "#e3f2fd", color: "#1565c0", iconType: me },
551
551
  slack: { label: "Slack", bg: "#e8f5e9", color: "#2e7d32", iconType: j },
552
552
  teams: { label: "MS Teams", bg: "#ede7f6", color: "#4527a0", iconType: j },
553
- sms: { label: "SMS", bg: "#fce4ec", color: "#880e4f", iconType: me },
553
+ sms: { label: "SMS", bg: "#fce4ec", color: "#880e4f", iconType: ue },
554
554
  "in-app": { label: "In-App", bg: "#fff3e0", color: "#e65100", iconType: j },
555
555
  webhook: { label: "Webhook", bg: "#f3e5f5", color: "#6a1b9a", iconType: ie }
556
556
  }, je = {
@@ -593,11 +593,11 @@ function Ke(t) {
593
593
  }
594
594
  }
595
595
  const Ue = ({ id: t, data: i }) => {
596
- const { onEditNode: f, onDeleteNode: a } = E(), s = i, r = s.channel && G[s.channel] ? G[s.channel] : je, h = Me(s), o = Ke(s), l = !!(s.channel && h), d = r.iconType;
596
+ const { onEditNode: f, onDeleteNode: a } = E(), s = i, r = s.channel && G[s.channel] ? G[s.channel] : je, g = Me(s), o = Ke(s), l = !!(s.channel && g), d = r.iconType;
597
597
  return /* @__PURE__ */ n("div", { style: { width: F }, children: [
598
598
  /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
599
599
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
600
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1", children: [
600
+ /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
601
601
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
602
602
  /* @__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 }) }),
603
603
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: s.channel ? `${r.label} Notification` : "Notification" })
@@ -634,10 +634,10 @@ const Ue = ({ id: t, data: i }) => {
634
634
  )
635
635
  ] })
636
636
  ] }),
637
- /* @__PURE__ */ e("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: l ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-column ff-gap-1", children: [
637
+ /* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: l ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-column ff-gap-1", children: [
638
638
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
639
639
  /* @__PURE__ */ e("span", { className: "ff-px-2 ff-py-1 ff-rounded", style: { fontSize: 10, background: r.bg, color: r.color, fontWeight: 600, flexShrink: 0 }, children: r.label }),
640
- /* @__PURE__ */ e("span", { className: "ff-text-dark ff-text-truncate", style: { maxWidth: 220 }, children: h })
640
+ /* @__PURE__ */ e("span", { className: "ff-text-dark ff-text-truncate", style: { maxWidth: 220 }, children: g })
641
641
  ] }),
642
642
  o && /* @__PURE__ */ e("span", { className: "ff-text-muted ff-text-truncate", style: { maxWidth: 280 }, children: o })
643
643
  ] }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured" }) })
@@ -648,7 +648,7 @@ const Ue = ({ id: t, data: i }) => {
648
648
  "api-key": "API Key",
649
649
  hmac: "HMAC"
650
650
  }, Oe = ({ data: t }) => {
651
- const { onClickAddTrigger: i } = E(), { label: f = "Webhook Trigger", endpointUrl: a, authMethod: s, source: r } = t, h = (l) => {
651
+ const { onClickAddTrigger: i } = E(), { label: f = "Webhook Trigger", endpointUrl: a, authMethod: s, source: r } = t, g = (l) => {
652
652
  l.stopPropagation(), i();
653
653
  }, o = (l) => {
654
654
  l.stopPropagation(), a && navigator.clipboard.writeText(a).catch(() => {
@@ -657,7 +657,7 @@ const Ue = ({ id: t, data: i }) => {
657
657
  return /* @__PURE__ */ n("div", { style: { width: F }, children: [
658
658
  /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
659
659
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #90caf9", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
660
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-2", children: [
660
+ /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
661
661
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
662
662
  /* @__PURE__ */ e("div", { style: { width: 28, height: 28, borderRadius: 6, background: "rgba(33,150,243,0.1)", display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ e(ie, { size: 16, color: "#1565c0" }) }),
663
663
  /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 600, color: "#212121" }, children: "Webhook Trigger" })
@@ -667,9 +667,9 @@ const Ue = ({ id: t, data: i }) => {
667
667
  {
668
668
  role: "button",
669
669
  tabIndex: 0,
670
- onClick: h,
670
+ onClick: g,
671
671
  onKeyDown: (l) => {
672
- (l.key === "Enter" || l.key === " ") && h(l);
672
+ (l.key === "Enter" || l.key === " ") && g(l);
673
673
  },
674
674
  className: "ff-d-flex ff-align-items-center",
675
675
  style: { paddingRight: 4, cursor: "pointer" },
@@ -677,7 +677,7 @@ const Ue = ({ id: t, data: i }) => {
677
677
  }
678
678
  )
679
679
  ] }),
680
- /* @__PURE__ */ n("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: "#e3f2fd", border: "1px solid #90caf9" }, children: [
680
+ /* @__PURE__ */ n("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#e3f2fd", border: "1px solid #90caf9" }, children: [
681
681
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-flex-wrap ff-gap-2 ff-mb-1", children: [
682
682
  /* @__PURE__ */ e("span", { style: { fontSize: 12, color: "#1565c0", fontWeight: 600 }, children: f }),
683
683
  r && /* @__PURE__ */ e("span", { className: "ff-px-2 ff-py-1 ff-rounded", style: { fontSize: 11, background: "#fff", border: "1px solid #90caf9", color: "#1565c0" }, children: r }),
@@ -705,11 +705,11 @@ const Ue = ({ id: t, data: i }) => {
705
705
  ] });
706
706
  }, He = ({ id: t, data: i }) => {
707
707
  var N;
708
- const { onEditNode: f, onDeleteNode: a, nodeRegistry: s } = E(), { method: r, url: h, descriptorType: o } = i, l = o ? (N = s == null ? void 0 : s.forType(o)) == null ? void 0 : N.icon : /* @__PURE__ */ e(xe, { size: 16, color: "#546e7a" }), d = !!(r && h), y = (r == null ? void 0 : r.toUpperCase()) ?? "", g = Se[y] ?? null;
708
+ const { onEditNode: f, onDeleteNode: a, nodeRegistry: s } = E(), { method: r, url: g, descriptorType: o } = i, l = o ? (N = s == null ? void 0 : s.forType(o)) == null ? void 0 : N.icon : /* @__PURE__ */ e(xe, { size: 16, color: "#546e7a" }), d = !!(r && g), y = (r == null ? void 0 : r.toUpperCase()) ?? "", h = Se[y] ?? null;
709
709
  return /* @__PURE__ */ n("div", { style: { width: F }, children: [
710
710
  /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
711
711
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
712
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1", children: [
712
+ /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
713
713
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
714
714
  /* @__PURE__ */ e("div", { style: { width: 25, height: 25, display: "flex", alignItems: "center", justifyContent: "center" }, children: l }),
715
715
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "REST API Call" })
@@ -746,9 +746,9 @@ const Ue = ({ id: t, data: i }) => {
746
746
  )
747
747
  ] })
748
748
  ] }),
749
- /* @__PURE__ */ e("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: d ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
750
- g && /* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 700, padding: "2px 6px", borderRadius: 4, background: g.bg, color: g.color, flexShrink: 0 }, children: y }),
751
- /* @__PURE__ */ e("span", { className: "ff-text-dark ff-text-truncate", style: { fontFamily: "monospace", fontSize: 11 }, title: h, children: h })
749
+ /* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: d ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
750
+ h && /* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 700, padding: "2px 6px", borderRadius: 4, background: h.bg, color: h.color, flexShrink: 0 }, children: y }),
751
+ /* @__PURE__ */ e("span", { className: "ff-text-dark ff-text-truncate", style: { fontFamily: "monospace", fontSize: 11 }, title: g, children: g })
752
752
  ] }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured" }) })
753
753
  ] }),
754
754
  /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
@@ -766,11 +766,11 @@ const Ue = ({ id: t, data: i }) => {
766
766
  isEmpty: "is empty",
767
767
  isNotEmpty: "is not empty"
768
768
  }, Ve = ({ id: t, data: i }) => {
769
- const { onEditNode: f, onDeleteNode: a } = E(), { title: s = "Condition Branch", branchConfigs: r = [], defaultBranch: h } = i, o = r.length > 0;
769
+ const { onEditNode: f, onDeleteNode: a } = E(), { title: s = "Condition Branch", branchConfigs: r = [], defaultBranch: g } = i, o = r.length > 0;
770
770
  return /* @__PURE__ */ n("div", { style: { width: F }, children: [
771
771
  /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
772
772
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #b39ddb", borderRadius: 8, background: "#fff" }, children: [
773
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1", children: [
773
+ /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
774
774
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
775
775
  /* @__PURE__ */ e("div", { style: { width: 25, height: 25, borderRadius: 6, background: "rgba(103,58,183,0.1)", display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(Ne, { size: 16, color: "#512da8" }) }),
776
776
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: s })
@@ -807,22 +807,22 @@ const Ue = ({ id: t, data: i }) => {
807
807
  )
808
808
  ] })
809
809
  ] }),
810
- /* @__PURE__ */ e("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: o ? /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
810
+ /* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: o ? /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
811
811
  r.map((l, d) => {
812
812
  var p, c;
813
- const y = O[d % O.length], g = (p = l.conditions) == null ? void 0 : p[0], N = (((c = l.conditions) == null ? void 0 : c.length) ?? 0) - 1;
813
+ const y = O[d % O.length], h = (p = l.conditions) == null ? void 0 : p[0], N = (((c = l.conditions) == null ? void 0 : c.length) ?? 0) - 1;
814
814
  return /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
815
815
  /* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background: y.bg, color: y.color, flexShrink: 0 }, children: l.label || l.key }),
816
- g ? /* @__PURE__ */ n("span", { style: { fontSize: 11, color: "#616161", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
817
- g.field,
816
+ h ? /* @__PURE__ */ n("span", { style: { fontSize: 11, color: "#616161", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
817
+ h.field,
818
818
  " ",
819
- Ge[g.operator] ?? g.operator,
820
- g.value ? ` ${g.value}` : "",
819
+ Ge[h.operator] ?? h.operator,
820
+ h.value ? ` ${h.value}` : "",
821
821
  N > 0 ? ` +${N} more` : ""
822
822
  ] }) : /* @__PURE__ */ e("span", { style: { fontSize: 11, color: "#9e9e9e" }, children: "No conditions yet" })
823
823
  ] }, l.key);
824
824
  }),
825
- h && /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 6, marginTop: 2 }, children: [
825
+ g && /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 6, marginTop: 2 }, children: [
826
826
  /* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background: "#f5f5f5", color: "#757575", flexShrink: 0 }, children: "Default" }),
827
827
  /* @__PURE__ */ e("span", { style: { fontSize: 11, color: "#9e9e9e" }, children: "fallback path" })
828
828
  ] })
@@ -832,13 +832,13 @@ const Ue = ({ id: t, data: i }) => {
832
832
  ] });
833
833
  }, qe = ({ id: t, data: i }) => {
834
834
  var p;
835
- const { onEditNode: f, onDeleteNode: a, nodeRegistry: s } = E(), { title: r = "Sub-Workflow", workflowId: h, workflowLabel: o, descriptorType: l, onPreview: d } = i, y = l ? (p = s == null ? void 0 : s.forType(l)) == null ? void 0 : p.icon : /* @__PURE__ */ e(ke, { size: 16, color: "#00695c" }), g = !!h, N = (c) => {
836
- c.stopPropagation(), h && d && d(h);
835
+ const { onEditNode: f, onDeleteNode: a, nodeRegistry: s } = E(), { title: r = "Sub-Workflow", workflowId: g, workflowLabel: o, descriptorType: l, onPreview: d } = i, y = l ? (p = s == null ? void 0 : s.forType(l)) == null ? void 0 : p.icon : /* @__PURE__ */ e(ke, { size: 16, color: "#00695c" }), h = !!g, N = (c) => {
836
+ c.stopPropagation(), g && d && d(g);
837
837
  };
838
838
  return /* @__PURE__ */ n("div", { style: { width: F }, children: [
839
839
  /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
840
840
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #80cbc4", borderRadius: 8, background: "#fff" }, children: [
841
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1", children: [
841
+ /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
842
842
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
843
843
  /* @__PURE__ */ e("div", { style: { width: 25, height: 25, borderRadius: 6, background: "rgba(0,137,123,0.1)", display: "flex", alignItems: "center", justifyContent: "center" }, children: y }),
844
844
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: r })
@@ -875,12 +875,12 @@ const Ue = ({ id: t, data: i }) => {
875
875
  )
876
876
  ] })
877
877
  ] }),
878
- /* @__PURE__ */ e("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: g ? "#e0f2f1" : "#fafafa", fontSize: 12, border: g ? "1px solid #b2dfdb" : "none" }, children: g ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-between", children: [
878
+ /* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: h ? "#e0f2f1" : "#fafafa", fontSize: 12, border: h ? "1px solid #b2dfdb" : "none" }, children: h ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-between", children: [
879
879
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-column ff-gap-1", children: [
880
- /* @__PURE__ */ e("span", { style: { fontSize: 12, fontWeight: 600, color: "#00695c" }, children: o || h }),
880
+ /* @__PURE__ */ e("span", { style: { fontSize: 12, fontWeight: 600, color: "#00695c" }, children: o || g }),
881
881
  /* @__PURE__ */ n("span", { style: { fontSize: 10, color: "#80cbc4", fontFamily: "monospace" }, children: [
882
882
  "ID: ",
883
- h
883
+ g
884
884
  ] })
885
885
  ] }),
886
886
  d && /* @__PURE__ */ n(
@@ -926,18 +926,18 @@ const Ue = ({ id: t, data: i }) => {
926
926
  targetX: a,
927
927
  targetY: s,
928
928
  sourcePosition: r,
929
- targetPosition: h,
929
+ targetPosition: g,
930
930
  source: o,
931
931
  target: l,
932
932
  data: d
933
933
  }) => {
934
- const [y, g, N] = M({
934
+ const [y, h, N] = M({
935
935
  sourceX: i,
936
936
  sourceY: f,
937
937
  targetX: a,
938
938
  targetY: s
939
- }), p = d == null ? void 0 : d.label, c = p === "Pass", v = c || p === "Fail", u = i + (a - i) / 3, w = f + (s - f) / 3, k = i + 2 * (a - i) / 3, I = f + 2 * (s - f) / 3, m = d == null ? void 0 : d.onAddStepClick, z = (L) => {
940
- if (L.stopPropagation(), typeof m != "function") return;
939
+ }), p = d == null ? void 0 : d.label, c = p === "Pass", v = c || p === "Fail", m = i + (a - i) / 3, w = f + (s - f) / 3, k = i + 2 * (a - i) / 3, I = f + 2 * (s - f) / 3, u = d == null ? void 0 : d.onAddStepClick, z = (R) => {
940
+ if (R.stopPropagation(), typeof u != "function") return;
941
941
  const fe = {
942
942
  edgeId: t,
943
943
  nodeId: o,
@@ -948,10 +948,10 @@ const Ue = ({ id: t, data: i }) => {
948
948
  referenceNodeType: d == null ? void 0 : d.referenceNodeType,
949
949
  stepVisibility: d == null ? void 0 : d.stepVisibility
950
950
  };
951
- m(o, fe);
952
- }, D = (L) => {
953
- (L.key === "Enter" || L.key === " ") && (L.preventDefault(), z(L));
954
- }, C = () => /* @__PURE__ */ n(R, { children: [
951
+ u(o, fe);
952
+ }, D = (R) => {
953
+ (R.key === "Enter" || R.key === " ") && (R.preventDefault(), z(R));
954
+ }, C = () => /* @__PURE__ */ n(L, { children: [
955
955
  /* @__PURE__ */ n("g", { className: "plus-icon-container", children: [
956
956
  /* @__PURE__ */ e("circle", { r: Ze, className: "edge-plus-circle" }),
957
957
  /* @__PURE__ */ e("line", { x1: 0, y1: -$, x2: 0, y2: $, strokeWidth: q, strokeLinecap: "round", className: "plus-line" }),
@@ -962,7 +962,7 @@ const Ue = ({ id: t, data: i }) => {
962
962
  /* @__PURE__ */ e("path", { d: "M0 -4 L-4 0 L0 4 Z", className: "tooltip-bg" }),
963
963
  /* @__PURE__ */ e("text", { x: 32, y: 0, textAnchor: "middle", dominantBaseline: "central", fill: "white", style: { fontSize: 10, fontWeight: 600, pointerEvents: "none" }, children: "Add Step" })
964
964
  ] })
965
- ] }), S = m ? {
965
+ ] }), S = u ? {
966
966
  onClick: z,
967
967
  onKeyDown: D,
968
968
  role: "button",
@@ -973,13 +973,13 @@ const Ue = ({ id: t, data: i }) => {
973
973
  };
974
974
  return /* @__PURE__ */ n("g", { className: "edge-with-plus-wrapper", children: [
975
975
  /* @__PURE__ */ e(K, { id: t, path: y }),
976
- v ? /* @__PURE__ */ n(R, { children: [
977
- /* @__PURE__ */ n("g", { transform: `translate(${u}, ${w})`, children: [
976
+ v ? /* @__PURE__ */ n(L, { children: [
977
+ /* @__PURE__ */ n("g", { transform: `translate(${m}, ${w})`, children: [
978
978
  /* @__PURE__ */ e("rect", { x: -Z / 2, y: -Y / 2, width: Z, height: Y, rx: J, ry: J, fill: c ? "#ADE6C5" : "#FDBFBF" }),
979
979
  /* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: c ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: p })
980
980
  ] }),
981
981
  /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${k}, ${I})`, "data-testid": "plus-node-icon", ...S, children: /* @__PURE__ */ e(C, {}) })
982
- ] }) : /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${g}, ${N})`, "data-testid": "plus-node-icon", ...S, children: /* @__PURE__ */ e(C, {}) })
982
+ ] }) : /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${h}, ${N})`, "data-testid": "plus-node-icon", ...S, children: /* @__PURE__ */ e(C, {}) })
983
983
  ] });
984
984
  }, Ye = 11.5, Q = 2, B = 6, at = ({
985
985
  id: t,
@@ -988,7 +988,7 @@ const Ue = ({ id: t, data: i }) => {
988
988
  targetX: a,
989
989
  targetY: s,
990
990
  source: r,
991
- target: h,
991
+ target: g,
992
992
  data: o
993
993
  }) => {
994
994
  const [l, d, y] = M({
@@ -996,12 +996,12 @@ const Ue = ({ id: t, data: i }) => {
996
996
  sourceY: f,
997
997
  targetX: a,
998
998
  targetY: s
999
- }), g = o == null ? void 0 : o.onAddStepClick, N = (c) => {
1000
- c.stopPropagation(), typeof g == "function" && g(r, {
999
+ }), h = o == null ? void 0 : o.onAddStepClick, N = (c) => {
1000
+ c.stopPropagation(), typeof h == "function" && h(r, {
1001
1001
  edgeId: t,
1002
1002
  nodeId: r,
1003
1003
  sourceNodeId: r,
1004
- targetNodeId: h,
1004
+ targetNodeId: g,
1005
1005
  position: "between",
1006
1006
  referenceNodeId: r,
1007
1007
  referenceNodeType: o == null ? void 0 : o.referenceNodeType,
@@ -1020,14 +1020,14 @@ const Ue = ({ id: t, data: i }) => {
1020
1020
  className: "nodrag nopan edge-plus-svg",
1021
1021
  transform: `translate(${d}, ${y})`,
1022
1022
  style: {
1023
- cursor: g ? "pointer" : "default",
1023
+ cursor: h ? "pointer" : "default",
1024
1024
  pointerEvents: "all",
1025
1025
  outline: "none"
1026
1026
  },
1027
- onClick: g ? N : void 0,
1028
- onKeyDown: g ? p : void 0,
1029
- role: g ? "button" : void 0,
1030
- tabIndex: g ? 0 : void 0,
1027
+ onClick: h ? N : void 0,
1028
+ onKeyDown: h ? p : void 0,
1029
+ role: h ? "button" : void 0,
1030
+ tabIndex: h ? 0 : void 0,
1031
1031
  "data-testid": "plus-node-icon",
1032
1032
  children: [
1033
1033
  /* @__PURE__ */ e("circle", { r: Ye, className: "edge-plus-circle" }),
@@ -1088,29 +1088,29 @@ const Ue = ({ id: t, data: i }) => {
1088
1088
  }, pt = ({ id: t, sourceX: i, sourceY: f, targetX: a, targetY: s }) => {
1089
1089
  const [r] = M({ sourceX: i, sourceY: f, targetX: a, targetY: s });
1090
1090
  return /* @__PURE__ */ e(K, { id: t, path: r, style: { stroke: "#b0bec5" } });
1091
- }, Je = 11.5, X = 2, _ = 6, Qe = -24, ee = 40, te = 20, ne = 4, ht = ({
1091
+ }, Je = 11.5, X = 2, _ = 6, Qe = -24, ee = 40, te = 20, ne = 4, gt = ({
1092
1092
  id: t,
1093
1093
  sourceX: i,
1094
1094
  sourceY: f,
1095
1095
  targetX: a,
1096
1096
  targetY: s,
1097
1097
  source: r,
1098
- target: h,
1098
+ target: g,
1099
1099
  data: o
1100
1100
  }) => {
1101
- const [l, d, y] = M({ sourceX: i, sourceY: f, targetX: a, targetY: s }), g = o == null ? void 0 : o.label, N = g === "Pass", p = N || g === "Fail", c = o == null ? void 0 : o.onAddStepClick, v = (o == null ? void 0 : o.showPlus) !== !1 && !!c, u = (k) => {
1101
+ const [l, d, y] = M({ sourceX: i, sourceY: f, targetX: a, targetY: s }), h = o == null ? void 0 : o.label, N = h === "Pass", p = N || h === "Fail", c = o == null ? void 0 : o.onAddStepClick, v = (o == null ? void 0 : o.showPlus) !== !1 && !!c, m = (k) => {
1102
1102
  k.stopPropagation(), typeof c == "function" && c(r, {
1103
1103
  edgeId: t,
1104
1104
  nodeId: r,
1105
1105
  sourceNodeId: r,
1106
- targetNodeId: h,
1106
+ targetNodeId: g,
1107
1107
  position: "between",
1108
1108
  referenceNodeId: r,
1109
1109
  referenceNodeType: o == null ? void 0 : o.referenceNodeType,
1110
1110
  stepVisibility: o == null ? void 0 : o.stepVisibility
1111
1111
  });
1112
1112
  }, w = (k) => {
1113
- (k.key === "Enter" || k.key === " ") && (k.preventDefault(), u(k));
1113
+ (k.key === "Enter" || k.key === " ") && (k.preventDefault(), m(k));
1114
1114
  };
1115
1115
  return /* @__PURE__ */ n("g", { className: "edge-with-plus-wrapper", children: [
1116
1116
  /* @__PURE__ */ e(K, { id: t, path: l, style: { stroke: "#b0bec5" } }),
@@ -1120,7 +1120,7 @@ const Ue = ({ id: t, data: i }) => {
1120
1120
  className: "nodrag nopan edge-plus-svg",
1121
1121
  transform: `translate(${d}, ${y})`,
1122
1122
  style: { cursor: c ? "pointer" : "default", pointerEvents: "all", outline: "none" },
1123
- onClick: c ? u : void 0,
1123
+ onClick: c ? m : void 0,
1124
1124
  onKeyDown: c ? w : void 0,
1125
1125
  role: c ? "button" : void 0,
1126
1126
  tabIndex: c ? 0 : void 0,
@@ -1138,7 +1138,7 @@ const Ue = ({ id: t, data: i }) => {
1138
1138
  fill: N ? "#ADE6C5" : "#FDBFBF"
1139
1139
  }
1140
1140
  ),
1141
- /* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: N ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: g })
1141
+ /* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: N ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: h })
1142
1142
  ] }),
1143
1143
  v && /* @__PURE__ */ n("g", { className: "plus-icon-container", children: [
1144
1144
  /* @__PURE__ */ e("circle", { r: Je, className: "edge-plus-circle" }),
@@ -1154,26 +1154,26 @@ const Ue = ({ id: t, data: i }) => {
1154
1154
  }
1155
1155
  )
1156
1156
  ] });
1157
- }, gt = ({
1157
+ }, ht = ({
1158
1158
  id: t,
1159
1159
  source: i,
1160
1160
  target: f,
1161
1161
  sourceX: a,
1162
1162
  sourceY: s,
1163
1163
  targetX: r,
1164
- targetY: h,
1164
+ targetY: g,
1165
1165
  style: o = {},
1166
1166
  markerEnd: l,
1167
1167
  data: d
1168
1168
  }) => {
1169
- const y = (d == null ? void 0 : d.verticalRouting) ?? !1, g = 30, N = y ? (() => {
1170
- const S = h - g;
1171
- return `M ${a},${S} L ${r},${S} L ${r},${h}`;
1169
+ const y = (d == null ? void 0 : d.verticalRouting) ?? !1, h = 30, N = y ? (() => {
1170
+ const S = g - h;
1171
+ return `M ${a},${S} L ${r},${S} L ${r},${g}`;
1172
1172
  })() : (() => {
1173
1173
  const S = s + 30;
1174
- return `M ${a},${s} L ${a},${S} L ${r},${S} L ${r},${h}`;
1175
- })(), p = o.stroke || "#d1d5db", c = d == null ? void 0 : d.label, v = (d == null ? void 0 : d.isFirst) ?? !1, u = d == null ? void 0 : d.onAddStepClick, w = y ? h - g : s + 30, k = a + (r - a) * (y ? 0.25 : 0.35), I = a + (r - a) * (y ? 0.65 : 0.7), m = w, z = (S) => {
1176
- S.stopPropagation(), u && u(i, {
1174
+ return `M ${a},${s} L ${a},${S} L ${r},${S} L ${r},${g}`;
1175
+ })(), p = o.stroke || "#d1d5db", c = d == null ? void 0 : d.label, v = (d == null ? void 0 : d.isFirst) ?? !1, m = d == null ? void 0 : d.onAddStepClick, w = y ? g - h : s + 30, k = a + (r - a) * (y ? 0.25 : 0.35), I = a + (r - a) * (y ? 0.65 : 0.7), u = w, z = (S) => {
1176
+ S.stopPropagation(), m && m(i, {
1177
1177
  edgeId: t,
1178
1178
  nodeId: i,
1179
1179
  sourceNodeId: i,
@@ -1186,9 +1186,9 @@ const Ue = ({ id: t, data: i }) => {
1186
1186
  }, D = 11.5, C = 6;
1187
1187
  return /* @__PURE__ */ n("g", { children: [
1188
1188
  /* @__PURE__ */ e("path", { id: t, d: N, fill: "none", stroke: p, strokeWidth: 1.5, markerEnd: l }),
1189
- c && !y && /* @__PURE__ */ e("g", { transform: `translate(${k}, ${m})`, children: (() => {
1189
+ c && !y && /* @__PURE__ */ e("g", { transform: `translate(${k}, ${u})`, children: (() => {
1190
1190
  const S = Math.max(44, c.length * 7 + 20);
1191
- return /* @__PURE__ */ n(R, { children: [
1191
+ return /* @__PURE__ */ n(L, { children: [
1192
1192
  /* @__PURE__ */ e(
1193
1193
  "rect",
1194
1194
  {
@@ -1217,10 +1217,10 @@ const Ue = ({ id: t, data: i }) => {
1217
1217
  )
1218
1218
  ] });
1219
1219
  })() }),
1220
- u && /* @__PURE__ */ n(
1220
+ m && /* @__PURE__ */ n(
1221
1221
  "g",
1222
1222
  {
1223
- transform: `translate(${I}, ${m})`,
1223
+ transform: `translate(${I}, ${u})`,
1224
1224
  onClick: z,
1225
1225
  style: { cursor: "pointer", pointerEvents: "all" },
1226
1226
  className: "nodrag nopan edge-plus-svg",
@@ -1238,8 +1238,8 @@ export {
1238
1238
  _e as D,
1239
1239
  dt as E,
1240
1240
  Fe as F,
1241
- gt as G,
1242
- ht as L,
1241
+ ht as G,
1242
+ gt as L,
1243
1243
  Ue as N,
1244
1244
  pt as P,
1245
1245
  He as R,