@notmrabhi/flowforge 0.1.41 → 0.1.42

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 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";
1
+ import { jsxs as t, jsx as e, Fragment as j } from "react/jsx-runtime";
2
+ import { Handle as x, Position as N, getStraightPath as U, BaseEdge as G } from "reactflow";
3
3
  import { Tooltip as $, Chip as q } from "@mui/material";
4
4
  import { GrTrigger as Ne } from "react-icons/gr";
5
5
  import { createContext as ke, useContext as ve } from "react";
6
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";
7
+ import { MdOutlineModeEdit as D, MdInfoOutline as B, MdInput as fe, MdDeleteOutline as F, MdCheckCircle as Se, MdPeople as Ce, MdSchedule as Ee, MdWebhook as de, MdNotifications as O, 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
8
  import { FaCheckCircle as ae, FaTimesCircle as pe } from "react-icons/fa";
9
9
  import { FiFilter as Le } from "react-icons/fi";
10
10
  import { a as K, H as We, B as Y } from "./canvasTokens-CAD6G24b.js";
@@ -20,14 +20,14 @@ const Fe = ke({
20
20
  messages: we,
21
21
  nodeRegistry: null,
22
22
  nodeBody: "full"
23
- }), I = () => ve(Fe), $e = () => /* @__PURE__ */ t("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
23
+ }), P = () => ve(Fe), $e = () => /* @__PURE__ */ t("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
24
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
- ] }), Be = () => /* @__PURE__ */ t("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
26
+ ] }), je = () => /* @__PURE__ */ t("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
27
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
- ] }), je = () => {
30
- const { onClickAddTrigger: n, messages: i } = I();
29
+ ] }), Be = () => {
30
+ const { onClickAddTrigger: n, messages: i } = P();
31
31
  return /* @__PURE__ */ t("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
32
32
  /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0, left: "50%" } }),
33
33
  /* @__PURE__ */ e($, { title: i.addTriggerTooltip, placement: "top", arrow: !0, children: /* @__PURE__ */ t(
@@ -49,7 +49,7 @@ const Fe = ke({
49
49
  /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0, left: "50%" } })
50
50
  ] });
51
51
  }, Ke = ({ id: n }) => {
52
- const { onAddStep: i } = I();
52
+ const { onAddStep: i } = P();
53
53
  return /* @__PURE__ */ t(
54
54
  "div",
55
55
  {
@@ -77,10 +77,10 @@ function Me(n) {
77
77
  return ge(i);
78
78
  }
79
79
  const _e = ({ data: n }) => {
80
- const { onClickAddTrigger: i } = I(), {
80
+ const { onClickAddTrigger: i } = P(), {
81
81
  type: f,
82
82
  eventType: p,
83
- sources: s,
83
+ sources: c,
84
84
  label: r,
85
85
  source: h,
86
86
  previewWorkflow: o,
@@ -88,7 +88,7 @@ const _e = ({ data: n }) => {
88
88
  infoText: d = "This node decides the flow trigger type and configuration."
89
89
  } = n ?? {}, u = (m) => {
90
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 = (() => {
91
+ }, y = Array.isArray(c) && c.length > 0, k = !!(r || h), g = f === "scheduler" ? "Scheduler Trigger" : f === "event" || y || k ? "Event Trigger Source" : "Select Trigger", s = (() => {
92
92
  if (f === "scheduler")
93
93
  return /* @__PURE__ */ e("span", { children: "Scheduler to be configured" });
94
94
  if (f === "event" || y) {
@@ -98,7 +98,7 @@ const _e = ({ data: n }) => {
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((C, v) => /* @__PURE__ */ e(
101
+ /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-2", style: { gap: 4 }, children: y ? c.map((C, v) => /* @__PURE__ */ e(
102
102
  q,
103
103
  {
104
104
  label: Me(C),
@@ -126,7 +126,7 @@ const _e = ({ data: n }) => {
126
126
  children: "Click to select a trigger to start your workflow"
127
127
  }
128
128
  );
129
- })(), S = l ? /* @__PURE__ */ t(B, { children: [
129
+ })(), S = l ? /* @__PURE__ */ t(j, { children: [
130
130
  l.status === "success" && /* @__PURE__ */ e(ae, { size: 16, color: "#1DBF60", style: { marginRight: 8 } }),
131
131
  l.status === "failed" && /* @__PURE__ */ e(pe, { size: 16, color: "#f44336", style: { marginRight: 8 } })
132
132
  ] }) : /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center", children: [
@@ -145,7 +145,7 @@ const _e = ({ data: n }) => {
145
145
  children: /* @__PURE__ */ e(D, { size: 16 })
146
146
  }
147
147
  ),
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 }) }) })
148
+ /* @__PURE__ */ e($, { title: /* @__PURE__ */ e("div", { children: d }), placement: "right", arrow: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
149
149
  ] });
150
150
  return /* @__PURE__ */ t("div", { style: { width: 350 }, children: [
151
151
  /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
@@ -184,29 +184,29 @@ const _e = ({ data: n }) => {
184
184
  borderRadius: 6,
185
185
  textAlign: "left"
186
186
  },
187
- children: c
187
+ children: s
188
188
  }
189
189
  )
190
190
  ] }),
191
191
  /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 }, id: "1" })
192
192
  ] });
193
193
  };
194
- function Oe(n) {
194
+ function He(n) {
195
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 Ue(n) {
197
+ function Oe(n) {
198
198
  const i = typeof n == "string" ? n : n.value ?? "";
199
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 He = ({ data: n }) => {
201
+ const Ue = ({ data: n }) => {
202
202
  const {
203
203
  header: i = "Event",
204
204
  title: f,
205
205
  eventType: p,
206
- sources: s,
206
+ sources: c,
207
207
  executionStatus: r,
208
208
  infoText: h = "This event is raised by the system. It cannot be configured."
209
- } = n ?? {}, o = f ?? Oe(p) ?? "—";
209
+ } = n ?? {}, o = f ?? He(p) ?? "—";
210
210
  return /* @__PURE__ */ t("div", { style: { width: 350 }, children: [
211
211
  /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
212
212
  /* @__PURE__ */ t("div", { style: { border: "1.5px solid #a5d6a7", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
@@ -233,7 +233,7 @@ const He = ({ data: n }) => {
233
233
  /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center", children: [
234
234
  (r == null ? void 0 : r.status) === "success" && /* @__PURE__ */ e(ae, { size: 16, color: "#1DBF60", style: { marginRight: 8 } }),
235
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 }) }) })
236
+ !r && /* @__PURE__ */ e($, { title: /* @__PURE__ */ e("div", { children: h }), placement: "right", arrow: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
237
237
  ] })
238
238
  ] }),
239
239
  /* @__PURE__ */ t(
@@ -250,12 +250,12 @@ const He = ({ data: n }) => {
250
250
  },
251
251
  children: [
252
252
  /* @__PURE__ */ e("div", { style: { fontWeight: 600 }, children: o }),
253
- Array.isArray(s) && s.length > 0 && /* @__PURE__ */ t(B, { children: [
253
+ Array.isArray(c) && c.length > 0 && /* @__PURE__ */ t(j, { 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((l, d) => /* @__PURE__ */ e(
255
+ /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-1", style: { gap: 4 }, children: c.map((l, d) => /* @__PURE__ */ e(
256
256
  q,
257
257
  {
258
- label: Ue(l),
258
+ label: Oe(l),
259
259
  variant: "outlined",
260
260
  size: "small",
261
261
  className: "ff-text-dark"
@@ -281,8 +281,8 @@ const He = ({ data: n }) => {
281
281
  style: { position: "absolute", left: 0, top: "100%", pointerEvents: "none", overflow: "visible" },
282
282
  children: [
283
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
- const h = s.y;
284
+ n.branches.map((c, r) => {
285
+ const h = c.y;
286
286
  return /* @__PURE__ */ t("g", { transform: `translate(0, ${h})`, children: [
287
287
  /* @__PURE__ */ e(
288
288
  "rect",
@@ -306,7 +306,7 @@ const He = ({ data: n }) => {
306
306
  fontWeight: 500,
307
307
  fill: "var(--ff-text, #212121)",
308
308
  style: { fontFamily: "sans-serif" },
309
- children: s.label
309
+ children: c.label
310
310
  }
311
311
  )
312
312
  ] }, r);
@@ -315,7 +315,7 @@ const He = ({ data: n }) => {
315
315
  }
316
316
  );
317
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;
318
+ const { onEditNode: f, onDeleteNode: p } = P(), { conditions: c = [], infoText: r = "Filter conditions applied to workflow data", _branchRail: h } = i;
319
319
  return /* @__PURE__ */ t("div", { style: { width: 350, position: "relative" }, children: [
320
320
  /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
321
321
  /* @__PURE__ */ t("div", { style: { border: "1.5px solid #ffe082", borderRadius: 8, background: "#fff" }, children: [
@@ -354,21 +354,21 @@ const He = ({ data: n }) => {
354
354
  children: /* @__PURE__ */ e(F, { color: "red", size: 16 })
355
355
  }
356
356
  ),
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 }) }) })
357
+ /* @__PURE__ */ e($, { title: r, placement: "right", arrow: !0, children: /* @__PURE__ */ e("div", { className: "ff-ms-2", children: /* @__PURE__ */ e(B, { 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, l) => /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-mb-1", children: [
360
+ /* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: c.length === 0 ? /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "No conditions configured" }) : c.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
- 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 })
364
+ l < c.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
365
  ] }, l)) })
366
366
  ] }),
367
367
  /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } }),
368
368
  h && /* @__PURE__ */ e(he, { rail: h, cardWidth: 350 })
369
369
  ] });
370
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([
371
+ const { onEditNode: f, onDeleteNode: p, nodeRegistry: c, nodeBody: r = "full" } = P(), { title: h = "Task", descriptorType: o, groupBlocks: l, groups: d, roles: u, groupId: y, roleId: k, infoText: g = "" } = i, s = o ? c == null ? void 0 : c.forType(o) : void 0, S = s == null ? void 0 : s.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",
@@ -379,13 +379,13 @@ const He = ({ data: n }) => {
379
379
  // proper "When ..." rows, not as a JSON dump in the generic body.
380
380
  "conditionConfig",
381
381
  "_conditionConfig"
382
- ]), R = c == null ? void 0 : c.formSchema, T = (a) => {
382
+ ]), R = s == null ? void 0 : s.formSchema, T = (a) => {
383
383
  if (Array.isArray(R)) {
384
384
  const b = R.find((w) => (w == null ? void 0 : w.id) === a || (w == null ? void 0 : w.name) === a);
385
385
  if (b != null && b.label) return b.label;
386
386
  }
387
387
  return a.replace(/[_-]+/g, " ").replace(/\b\w/g, (b) => b.toUpperCase());
388
- }, P = (a) => {
388
+ }, A = (a) => {
389
389
  if (Array.isArray(a)) {
390
390
  const b = a.map(
391
391
  (W) => typeof W == "object" && W ? W.label ?? W.name ?? W.value ?? "" : String(W)
@@ -397,7 +397,7 @@ const He = ({ data: n }) => {
397
397
  return b.label ?? b.name ?? b.value ?? JSON.stringify(a);
398
398
  }
399
399
  return String(a);
400
- }, A = Object.entries(i || {}).filter(
400
+ }, I = Object.entries(i || {}).filter(
401
401
  ([a, b]) => !v.has(a) && b !== "" && b !== null && b !== void 0 && !(Array.isArray(b) && b.length === 0)
402
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
403
  path: a,
@@ -441,7 +441,7 @@ const He = ({ data: n }) => {
441
441
  children: /* @__PURE__ */ e(F, { color: "red", size: 16 })
442
442
  }
443
443
  ),
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 }) }) })
444
+ g && /* @__PURE__ */ e($, { title: g, placement: "right", arrow: !0, children: /* @__PURE__ */ e("div", { className: "ff-ms-2", children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
445
445
  ] })
446
446
  ] }),
447
447
  r !== "title-only" && // Body container matches IAM ActionNodeLabel: 12px text, left-aligned.
@@ -451,45 +451,20 @@ const He = ({ data: n }) => {
451
451
  "div",
452
452
  {
453
453
  style: {
454
- margin: "0 10px 12px",
454
+ margin: "0 8px 8px",
455
455
  padding: 8,
456
456
  borderRadius: 4,
457
457
  background: "#f8f9fa",
458
458
  fontSize: 12,
459
459
  textAlign: "left",
460
- color: "#212529"
460
+ color: "#212529",
461
+ lineHeight: 1.4
461
462
  },
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),
466
- ":"
467
- ] }),
468
- /* @__PURE__ */ e(
469
- "span",
470
- {
471
- title: P(b),
472
- style: {
473
- color: "#212529",
474
- overflow: "hidden",
475
- textOverflow: "ellipsis",
476
- whiteSpace: "nowrap",
477
- minWidth: 0,
478
- flex: 1
479
- },
480
- children: P(b)
481
- }
482
- )
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" }),
463
+ children: s != null && s.renderNode ? s.renderNode(i) : I.length > 0 || E.length > 0 ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column" }, children: [
464
+ E.map((a, b) => /* @__PURE__ */ t("div", { children: [
465
+ /* @__PURE__ */ e("div", { style: { color: "#6c757d" }, children: "When" }),
491
466
  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";
467
+ const ue = w.field || "", me = w.fieldLabel || T(ue), be = w.operator || "", Z = w.value == null ? "" : typeof w.value == "object" ? A(w.value) : String(w.value), xe = w.connector || "and";
493
468
  return /* @__PURE__ */ t(
494
469
  "div",
495
470
  {
@@ -497,7 +472,7 @@ const He = ({ data: n }) => {
497
472
  display: "flex",
498
473
  alignItems: "center",
499
474
  flexWrap: "wrap",
500
- marginTop: 2
475
+ marginTop: 4
501
476
  },
502
477
  children: [
503
478
  /* @__PURE__ */ e("span", { style: { fontWeight: 700, marginRight: 4, color: "#212529" }, children: me }),
@@ -524,12 +499,45 @@ const He = ({ data: n }) => {
524
499
  W
525
500
  );
526
501
  }),
527
- a.entries.length > 3 && /* @__PURE__ */ t("div", { style: { color: "#6c757d", fontSize: 11 }, children: [
502
+ a.entries.length > 3 && /* @__PURE__ */ t("div", { style: { color: "#6c757d", fontSize: 11, marginTop: 2 }, children: [
528
503
  "+",
529
504
  a.entries.length - 3,
530
505
  " more"
531
506
  ] })
532
- ] }, `cond-${b}`))
507
+ ] }, `cond-${b}`)),
508
+ I.length > 0 && /* @__PURE__ */ e(
509
+ "div",
510
+ {
511
+ style: {
512
+ marginTop: 4,
513
+ color: "#212529",
514
+ display: "flex",
515
+ justifyContent: "flex-start"
516
+ },
517
+ children: (s == null ? void 0 : s.label) || h
518
+ }
519
+ ),
520
+ I.length > 0 && /* @__PURE__ */ t("div", { style: { display: "flex", flexWrap: "wrap", gap: 4, marginTop: 4 }, children: [
521
+ I.slice(0, 6).map(([a, b]) => /* @__PURE__ */ e(
522
+ "span",
523
+ {
524
+ title: `${T(a)}: ${A(b)}`,
525
+ style: {
526
+ background: "#212529",
527
+ color: "#fff",
528
+ padding: "4px 8px",
529
+ borderRadius: 4,
530
+ fontSize: 11
531
+ },
532
+ children: A(b)
533
+ },
534
+ a
535
+ )),
536
+ I.length > 6 && /* @__PURE__ */ t("span", { style: { color: "#6c757d", fontSize: 11, alignSelf: "center" }, children: [
537
+ "+",
538
+ I.length - 6
539
+ ] })
540
+ ] })
533
541
  ] }) : V ? (
534
542
  // Dark badges matching IAM's bg-dark text-white py-1 px-2 rounded
535
543
  /* @__PURE__ */ e("div", { style: { display: "flex", flexWrap: "wrap", gap: 4 }, children: L.map((a, b) => /* @__PURE__ */ e(
@@ -554,7 +562,7 @@ const He = ({ data: n }) => {
554
562
  /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
555
563
  ] });
556
564
  }, 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";
565
+ const { onEditNode: f, onDeleteNode: p } = P(), { approvalData: c, isPreview: r = !1, _branchRail: h } = i, o = (c == null ? void 0 : c.policy) ?? {}, l = o.stages ?? [], d = l.length, u = l.slice(0, J), y = d - J, k = o.name ?? o.policyName ?? "Untitled Policy";
558
566
  return /* @__PURE__ */ t("div", { style: { width: 350, position: "relative" }, children: [
559
567
  /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
560
568
  /* @__PURE__ */ t("div", { style: { border: "1.5px solid #ffe082", borderRadius: 8, background: "#fff" }, children: [
@@ -595,7 +603,7 @@ const He = ({ data: n }) => {
595
603
  children: /* @__PURE__ */ e(F, { color: "red", size: 16 })
596
604
  }
597
605
  ),
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 }) }) })
606
+ /* @__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(B, { color: "gray", size: 16 }) }) })
599
607
  ] })
600
608
  ] }),
601
609
  /* @__PURE__ */ t("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#FCFCFC" }, children: [
@@ -608,12 +616,12 @@ const He = ({ data: n }) => {
608
616
  ] })
609
617
  ] }),
610
618
  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;
619
+ u.map((g, s) => {
620
+ var A, I, z;
621
+ const S = ((A = g.stageName) == null ? void 0 : A.trim()) || `Stage ${s + 1}`, m = Array.isArray(g.userIds) ? g.userIds.length : 0, C = ((I = g.groupName) == null ? void 0 : I.trim()) ?? "", v = ((z = g.roleName) == null ? void 0 : z.trim()) ?? "", R = m > 0 || C || v;
614
622
  let T = "Not configured";
615
623
  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 }),
624
+ /* @__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: s + 1 }),
617
625
  /* @__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
626
  /* @__PURE__ */ e("span", { style: { fontSize: 12, fontWeight: 700, color: "#212121" }, children: S }),
619
627
  /* @__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: [
@@ -621,7 +629,7 @@ const He = ({ data: n }) => {
621
629
  T
622
630
  ] })
623
631
  ] })
624
- ] }, c);
632
+ ] }, s);
625
633
  }),
626
634
  y > 0 && /* @__PURE__ */ t(
627
635
  "div",
@@ -651,7 +659,7 @@ const He = ({ data: n }) => {
651
659
  h && /* @__PURE__ */ e(he, { rail: h, cardWidth: 350 })
652
660
  ] });
653
661
  }, 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";
662
+ const { onEditNode: f, onDeleteNode: p } = P(), { duration: c, unit: r } = i, h = c != null && r, o = h ? `Wait ${c} ${r}` : "Not configured";
655
663
  return /* @__PURE__ */ t("div", { style: { width: 350 }, children: [
656
664
  /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
657
665
  /* @__PURE__ */ t("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
@@ -698,16 +706,16 @@ const He = ({ data: n }) => {
698
706
  ] });
699
707
  }, Q = {
700
708
  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 },
709
+ slack: { label: "Slack", bg: "#e8f5e9", color: "#2e7d32", iconType: O },
710
+ teams: { label: "MS Teams", bg: "#ede7f6", color: "#4527a0", iconType: O },
703
711
  sms: { label: "SMS", bg: "#fce4ec", color: "#880e4f", iconType: Te },
704
- "in-app": { label: "In-App", bg: "#fff3e0", color: "#e65100", iconType: U },
712
+ "in-app": { label: "In-App", bg: "#fff3e0", color: "#e65100", iconType: O },
705
713
  webhook: { label: "Webhook", bg: "#f3e5f5", color: "#6a1b9a", iconType: de }
706
714
  }, Ye = {
707
715
  label: "Notification",
708
716
  bg: "rgba(156,39,176,0.1)",
709
717
  color: "#7b1fa2",
710
- iconType: U
718
+ iconType: O
711
719
  };
712
720
  function Je(n) {
713
721
  var i;
@@ -743,14 +751,14 @@ function Qe(n) {
743
751
  }
744
752
  }
745
753
  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;
754
+ const { onEditNode: f, onDeleteNode: p } = P(), c = i, r = c.channel && Q[c.channel] ? Q[c.channel] : Ye, h = Je(c), o = Qe(c), l = !!(c.channel && h), d = r.iconType;
747
755
  return /* @__PURE__ */ t("div", { style: { width: K }, children: [
748
756
  /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
749
757
  /* @__PURE__ */ t("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
750
758
  /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
751
759
  /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
752
760
  /* @__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 }) }),
753
- /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: s.channel ? `${r.label} Notification` : "Notification" })
761
+ /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: c.channel ? `${r.label} Notification` : "Notification" })
754
762
  ] }),
755
763
  /* @__PURE__ */ t("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
756
764
  /* @__PURE__ */ e(
@@ -798,7 +806,7 @@ const Xe = ({ id: n, data: i }) => {
798
806
  "api-key": "API Key",
799
807
  hmac: "HMAC"
800
808
  }, et = ({ data: n }) => {
801
- const { onClickAddTrigger: i } = I(), { label: f = "Webhook Trigger", endpointUrl: p, authMethod: s, source: r } = n, h = (l) => {
809
+ const { onClickAddTrigger: i } = P(), { label: f = "Webhook Trigger", endpointUrl: p, authMethod: c, source: r } = n, h = (l) => {
802
810
  l.stopPropagation(), i();
803
811
  }, o = (l) => {
804
812
  l.stopPropagation(), p && navigator.clipboard.writeText(p).catch(() => {
@@ -831,7 +839,7 @@ const Xe = ({ id: n, data: i }) => {
831
839
  /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-flex-wrap ff-gap-2 ff-mb-1", children: [
832
840
  /* @__PURE__ */ e("span", { style: { fontSize: 12, color: "#1565c0", fontWeight: 600 }, children: f }),
833
841
  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 }),
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] })
842
+ c && c !== "none" && X[c] && /* @__PURE__ */ e("span", { className: "ff-px-2 ff-py-1 ff-rounded", style: { fontSize: 10, background: "#1565c0", color: "#fff", fontWeight: 600 }, children: X[c] })
835
843
  ] }),
836
844
  p && /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-1", style: { marginTop: 4 }, children: [
837
845
  /* @__PURE__ */ e("span", { style: { fontSize: 10, color: "#1565c0", fontFamily: "monospace", flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: p }),
@@ -855,7 +863,7 @@ const Xe = ({ id: n, data: i }) => {
855
863
  ] });
856
864
  }, tt = ({ id: n, data: i }) => {
857
865
  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;
866
+ const { onEditNode: f, onDeleteNode: p, nodeRegistry: c } = P(), { method: r, url: h, descriptorType: o } = i, l = o ? (k = c == null ? void 0 : c.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
867
  return /* @__PURE__ */ t("div", { style: { width: K }, children: [
860
868
  /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
861
869
  /* @__PURE__ */ t("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
@@ -916,14 +924,14 @@ const Xe = ({ id: n, data: i }) => {
916
924
  isEmpty: "is empty",
917
925
  isNotEmpty: "is not empty"
918
926
  }, 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;
927
+ const { onEditNode: f, onDeleteNode: p } = P(), { title: c = "Condition Branch", branchConfigs: r = [], defaultBranch: h } = i, o = r.length > 0;
920
928
  return /* @__PURE__ */ t("div", { style: { width: K }, children: [
921
929
  /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
922
930
  /* @__PURE__ */ t("div", { style: { border: "1.5px solid #b39ddb", borderRadius: 8, background: "#fff" }, children: [
923
931
  /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
924
932
  /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
925
933
  /* @__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" }) }),
926
- /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: s })
934
+ /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: c })
927
935
  ] }),
928
936
  /* @__PURE__ */ t("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
929
937
  /* @__PURE__ */ e(
@@ -959,8 +967,8 @@ const Xe = ({ id: n, data: i }) => {
959
967
  ] }),
960
968
  /* @__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
969
  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;
970
+ var g, s;
971
+ const u = Y[d % Y.length], y = (g = l.conditions) == null ? void 0 : g[0], k = (((s = l.conditions) == null ? void 0 : s.length) ?? 0) - 1;
964
972
  return /* @__PURE__ */ t("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
965
973
  /* @__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
974
  y ? /* @__PURE__ */ t("span", { style: { fontSize: 11, color: "#616161", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
@@ -982,8 +990,8 @@ const Xe = ({ id: n, data: i }) => {
982
990
  ] });
983
991
  }, it = ({ id: n, data: i }) => {
984
992
  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);
993
+ const { onEditNode: f, onDeleteNode: p, nodeRegistry: c } = P(), { title: r = "Sub-Workflow", workflowId: h, workflowLabel: o, descriptorType: l, onPreview: d } = i, u = l ? (g = c == null ? void 0 : c.forType(l)) == null ? void 0 : g.icon : /* @__PURE__ */ e(De, { size: 16, color: "#00695c" }), y = !!h, k = (s) => {
994
+ s.stopPropagation(), h && d && d(h);
987
995
  };
988
996
  return /* @__PURE__ */ t("div", { style: { width: K }, children: [
989
997
  /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
@@ -999,11 +1007,11 @@ const Xe = ({ id: n, data: i }) => {
999
1007
  {
1000
1008
  role: "button",
1001
1009
  tabIndex: 0,
1002
- onClick: (c) => {
1003
- c.stopPropagation(), f(n);
1010
+ onClick: (s) => {
1011
+ s.stopPropagation(), f(n);
1004
1012
  },
1005
- onKeyDown: (c) => {
1006
- (c.key === "Enter" || c.key === " ") && (c.stopPropagation(), f(n));
1013
+ onKeyDown: (s) => {
1014
+ (s.key === "Enter" || s.key === " ") && (s.stopPropagation(), f(n));
1007
1015
  },
1008
1016
  children: /* @__PURE__ */ e(D, { size: 16 })
1009
1017
  }
@@ -1014,11 +1022,11 @@ const Xe = ({ id: n, data: i }) => {
1014
1022
  className: "ff-ms-2",
1015
1023
  role: "button",
1016
1024
  tabIndex: 0,
1017
- onClick: (c) => {
1018
- c.stopPropagation(), p(n);
1025
+ onClick: (s) => {
1026
+ s.stopPropagation(), p(n);
1019
1027
  },
1020
- onKeyDown: (c) => {
1021
- (c.key === "Enter" || c.key === " ") && (c.stopPropagation(), p(n));
1028
+ onKeyDown: (s) => {
1029
+ (s.key === "Enter" || s.key === " ") && (s.stopPropagation(), p(n));
1022
1030
  },
1023
1031
  children: /* @__PURE__ */ e(F, { color: "red", size: 16 })
1024
1032
  }
@@ -1039,8 +1047,8 @@ const Xe = ({ id: n, data: i }) => {
1039
1047
  role: "button",
1040
1048
  tabIndex: 0,
1041
1049
  onClick: k,
1042
- onKeyDown: (c) => {
1043
- (c.key === "Enter" || c.key === " ") && k(c);
1050
+ onKeyDown: (s) => {
1051
+ (s.key === "Enter" || s.key === " ") && k(s);
1044
1052
  },
1045
1053
  style: { cursor: "pointer", display: "flex", alignItems: "center", gap: 3, fontSize: 11, color: "#00897b" },
1046
1054
  children: [
@@ -1055,11 +1063,11 @@ const Xe = ({ id: n, data: i }) => {
1055
1063
  ] });
1056
1064
  }, xt = {
1057
1065
  startNode: $e,
1058
- endNode: Be,
1059
- addTriggerNode: je,
1066
+ endNode: je,
1067
+ addTriggerNode: Be,
1060
1068
  addStepNode: Ke,
1061
1069
  triggerNode: _e,
1062
- eventNode: He,
1070
+ eventNode: Ue,
1063
1071
  filterNode: Ge,
1064
1072
  actionNode: Ve,
1065
1073
  approvalNode: qe,
@@ -1074,19 +1082,19 @@ const Xe = ({ id: n, data: i }) => {
1074
1082
  sourceX: i,
1075
1083
  sourceY: f,
1076
1084
  targetX: p,
1077
- targetY: s,
1085
+ targetY: c,
1078
1086
  sourcePosition: r,
1079
1087
  targetPosition: h,
1080
1088
  source: o,
1081
1089
  target: l,
1082
1090
  data: d
1083
1091
  }) => {
1084
- const [u, y, k] = H({
1092
+ const [u, y, k] = U({
1085
1093
  sourceX: i,
1086
1094
  sourceY: f,
1087
1095
  targetX: p,
1088
- targetY: s
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) => {
1096
+ targetY: c
1097
+ }), g = d == null ? void 0 : d.label, s = g === "Pass", S = s || g === "Fail", m = i + (p - i) / 3, C = f + (c - f) / 3, v = i + 2 * (p - i) / 3, R = f + 2 * (c - f) / 3, T = d == null ? void 0 : d.onAddStepClick, A = (L) => {
1090
1098
  if (L.stopPropagation(), typeof T != "function") return;
1091
1099
  const V = {
1092
1100
  edgeId: n,
@@ -1099,9 +1107,9 @@ const Xe = ({ id: n, data: i }) => {
1099
1107
  stepVisibility: d == null ? void 0 : d.stepVisibility
1100
1108
  };
1101
1109
  T(o, V);
1102
- }, A = (L) => {
1103
- (L.key === "Enter" || L.key === " ") && (L.preventDefault(), P(L));
1104
- }, z = () => /* @__PURE__ */ t(B, { children: [
1110
+ }, I = (L) => {
1111
+ (L.key === "Enter" || L.key === " ") && (L.preventDefault(), A(L));
1112
+ }, z = () => /* @__PURE__ */ t(j, { children: [
1105
1113
  /* @__PURE__ */ t("g", { className: "plus-icon-container", children: [
1106
1114
  /* @__PURE__ */ e("circle", { r: lt, className: "edge-plus-circle" }),
1107
1115
  /* @__PURE__ */ e("line", { x1: 0, y1: -M, x2: 0, y2: M, strokeWidth: ee, strokeLinecap: "round", className: "plus-line" }),
@@ -1113,8 +1121,8 @@ const Xe = ({ id: n, data: i }) => {
1113
1121
  /* @__PURE__ */ e("text", { x: 32, y: 0, textAnchor: "middle", dominantBaseline: "central", fill: "white", style: { fontSize: 10, fontWeight: 600, pointerEvents: "none" }, children: "Add Step" })
1114
1122
  ] })
1115
1123
  ] }), E = T ? {
1116
- onClick: P,
1117
- onKeyDown: A,
1124
+ onClick: A,
1125
+ onKeyDown: I,
1118
1126
  role: "button",
1119
1127
  tabIndex: 0,
1120
1128
  style: { cursor: "pointer", pointerEvents: "all" }
@@ -1123,10 +1131,10 @@ const Xe = ({ id: n, data: i }) => {
1123
1131
  };
1124
1132
  return /* @__PURE__ */ t("g", { className: "edge-with-plus-wrapper", children: [
1125
1133
  /* @__PURE__ */ e(G, { id: n, path: u }),
1126
- S ? /* @__PURE__ */ t(B, { children: [
1134
+ S ? /* @__PURE__ */ t(j, { children: [
1127
1135
  /* @__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 })
1136
+ /* @__PURE__ */ e("rect", { x: -te / 2, y: -ne / 2, width: te, height: ne, rx: oe, ry: oe, fill: s ? "#ADE6C5" : "#FDBFBF" }),
1137
+ /* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: s ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: g })
1130
1138
  ] }),
1131
1139
  /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${v}, ${R})`, "data-testid": "plus-node-icon", ...E, children: /* @__PURE__ */ e(z, {}) })
1132
1140
  ] }) : /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${y}, ${k})`, "data-testid": "plus-node-icon", ...E, children: /* @__PURE__ */ e(z, {}) })
@@ -1136,18 +1144,18 @@ const Xe = ({ id: n, data: i }) => {
1136
1144
  sourceX: i,
1137
1145
  sourceY: f,
1138
1146
  targetX: p,
1139
- targetY: s,
1147
+ targetY: c,
1140
1148
  source: r,
1141
1149
  target: h,
1142
1150
  data: o
1143
1151
  }) => {
1144
- const [l, d, u] = H({
1152
+ const [l, d, u] = U({
1145
1153
  sourceX: i,
1146
1154
  sourceY: f,
1147
1155
  targetX: p,
1148
- targetY: s
1149
- }), y = o == null ? void 0 : o.onAddStepClick, k = (c) => {
1150
- c.stopPropagation(), typeof y == "function" && y(r, {
1156
+ targetY: c
1157
+ }), y = o == null ? void 0 : o.onAddStepClick, k = (s) => {
1158
+ s.stopPropagation(), typeof y == "function" && y(r, {
1151
1159
  edgeId: n,
1152
1160
  nodeId: r,
1153
1161
  sourceNodeId: r,
@@ -1159,8 +1167,8 @@ const Xe = ({ id: n, data: i }) => {
1159
1167
  filterId: o == null ? void 0 : o.filterId,
1160
1168
  branch: o == null ? void 0 : o.branch
1161
1169
  });
1162
- }, g = (c) => {
1163
- (c.key === "Enter" || c.key === " ") && (c.preventDefault(), k(c));
1170
+ }, g = (s) => {
1171
+ (s.key === "Enter" || s.key === " ") && (s.preventDefault(), k(s));
1164
1172
  };
1165
1173
  return /* @__PURE__ */ t("g", { className: "edge-with-plus-wrapper", children: [
1166
1174
  /* @__PURE__ */ e(G, { id: n, path: l, style: { stroke: "#b0bec5" } }),
@@ -1235,21 +1243,21 @@ const Xe = ({ id: n, data: i }) => {
1235
1243
  }
1236
1244
  )
1237
1245
  ] });
1238
- }, vt = ({ id: n, sourceX: i, sourceY: f, targetX: p, targetY: s }) => {
1239
- const [r] = H({ sourceX: i, sourceY: f, targetX: p, targetY: s });
1246
+ }, vt = ({ id: n, sourceX: i, sourceY: f, targetX: p, targetY: c }) => {
1247
+ const [r] = U({ sourceX: i, sourceY: f, targetX: p, targetY: c });
1240
1248
  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 = ({
1249
+ }, st = 11.5, le = 2, H = 6, ct = -24, re = 40, se = 20, ce = 4, wt = ({
1242
1250
  id: n,
1243
1251
  sourceX: i,
1244
1252
  sourceY: f,
1245
1253
  targetX: p,
1246
- targetY: s,
1254
+ targetY: c,
1247
1255
  source: r,
1248
1256
  target: h,
1249
1257
  data: o
1250
1258
  }) => {
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, {
1259
+ const [l, d, u] = U({ sourceX: i, sourceY: f, targetX: p, targetY: c }), y = o == null ? void 0 : o.label, k = y === "Pass", g = k || y === "Fail", s = o == null ? void 0 : o.onAddStepClick, S = (o == null ? void 0 : o.showPlus) !== !1 && !!s, m = (v) => {
1260
+ v.stopPropagation(), typeof s == "function" && s(r, {
1253
1261
  edgeId: n,
1254
1262
  nodeId: r,
1255
1263
  sourceNodeId: r,
@@ -1269,11 +1277,11 @@ const Xe = ({ id: n, data: i }) => {
1269
1277
  {
1270
1278
  className: "nodrag nopan edge-plus-svg",
1271
1279
  transform: `translate(${d}, ${u})`,
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,
1280
+ style: { cursor: s ? "pointer" : "default", pointerEvents: "all", outline: "none" },
1281
+ onClick: s ? m : void 0,
1282
+ onKeyDown: s ? C : void 0,
1283
+ role: s ? "button" : void 0,
1284
+ tabIndex: s ? 0 : void 0,
1277
1285
  children: [
1278
1286
  g && /* @__PURE__ */ t("g", { transform: `translate(0, ${S ? ct : 0})`, children: [
1279
1287
  /* @__PURE__ */ e(
@@ -1292,8 +1300,8 @@ const Xe = ({ id: n, data: i }) => {
1292
1300
  ] }),
1293
1301
  S && /* @__PURE__ */ t("g", { className: "plus-icon-container", children: [
1294
1302
  /* @__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" })
1303
+ /* @__PURE__ */ e("line", { x1: 0, y1: -H, x2: 0, y2: H, strokeWidth: le, strokeLinecap: "round", className: "plus-line" }),
1304
+ /* @__PURE__ */ e("line", { x1: -H, y1: 0, x2: H, y2: 0, strokeWidth: le, strokeLinecap: "round", className: "plus-line" })
1297
1305
  ] }),
1298
1306
  S && /* @__PURE__ */ t("g", { className: "edge-plus-tooltip", transform: "translate(22, 0)", children: [
1299
1307
  /* @__PURE__ */ e("rect", { x: 0, y: -10, width: 65, height: 20, rx: 4, className: "tooltip-bg" }),
@@ -1309,7 +1317,7 @@ const Xe = ({ id: n, data: i }) => {
1309
1317
  source: i,
1310
1318
  target: f,
1311
1319
  sourceX: p,
1312
- sourceY: s,
1320
+ sourceY: c,
1313
1321
  targetX: r,
1314
1322
  targetY: h,
1315
1323
  style: o = {},
@@ -1320,9 +1328,9 @@ const Xe = ({ id: n, data: i }) => {
1320
1328
  const E = h - y;
1321
1329
  return `M ${p},${E} L ${r},${E} L ${r},${h}`;
1322
1330
  })() : (() => {
1323
- const E = s + 30;
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) => {
1331
+ const E = c + 30;
1332
+ return `M ${p},${c} L ${p},${E} L ${r},${E} L ${r},${h}`;
1333
+ })(), g = o.stroke || "#d1d5db", s = 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 : c + 30, v = p + (r - p) * (u ? 0.25 : 0.35), R = p + (r - p) * (u ? 0.65 : 0.7), T = C, A = (E) => {
1326
1334
  E.stopPropagation(), m && m(i, {
1327
1335
  edgeId: n,
1328
1336
  nodeId: i,
@@ -1333,12 +1341,12 @@ const Xe = ({ id: n, data: i }) => {
1333
1341
  filterId: d == null ? void 0 : d.filterId,
1334
1342
  branch: d == null ? void 0 : d.branch
1335
1343
  });
1336
- }, A = 11.5, z = 6;
1344
+ }, I = 11.5, z = 6;
1337
1345
  return /* @__PURE__ */ t("g", { children: [
1338
1346
  /* @__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: [
1347
+ s && !u && /* @__PURE__ */ e("g", { transform: `translate(${v}, ${T})`, children: (() => {
1348
+ const E = Math.max(44, s.length * 7 + 20);
1349
+ return /* @__PURE__ */ t(j, { children: [
1342
1350
  /* @__PURE__ */ e(
1343
1351
  "rect",
1344
1352
  {
@@ -1362,7 +1370,7 @@ const Xe = ({ id: n, data: i }) => {
1362
1370
  fontWeight: 600,
1363
1371
  fill: S ? "#2e7d32" : "#c62828",
1364
1372
  style: { fontFamily: "sans-serif", pointerEvents: "none" },
1365
- children: c
1373
+ children: s
1366
1374
  }
1367
1375
  )
1368
1376
  ] });
@@ -1371,11 +1379,11 @@ const Xe = ({ id: n, data: i }) => {
1371
1379
  "g",
1372
1380
  {
1373
1381
  transform: `translate(${R}, ${T})`,
1374
- onClick: P,
1382
+ onClick: A,
1375
1383
  style: { cursor: "pointer", pointerEvents: "all" },
1376
1384
  className: "nodrag nopan edge-plus-svg",
1377
1385
  children: [
1378
- /* @__PURE__ */ e("circle", { r: A, className: "edge-plus-circle" }),
1386
+ /* @__PURE__ */ e("circle", { r: I, className: "edge-plus-circle" }),
1379
1387
  /* @__PURE__ */ e("line", { x1: 0, y1: -z, x2: 0, y2: z, strokeWidth: 2, strokeLinecap: "round", className: "plus-line" }),
1380
1388
  /* @__PURE__ */ e("line", { x1: -z, y1: 0, x2: z, y2: 0, strokeWidth: 2, strokeLinecap: "round", className: "plus-line" })
1381
1389
  ]
@@ -1396,11 +1404,11 @@ export {
1396
1404
  $e as S,
1397
1405
  _e as T,
1398
1406
  et as W,
1399
- je as a,
1407
+ Be as a,
1400
1408
  qe as b,
1401
- Be as c,
1409
+ je as c,
1402
1410
  kt as d,
1403
1411
  xt as e,
1404
1412
  Fe as f
1405
1413
  };
1406
- //# sourceMappingURL=GatewayBranchEdge-F2AGJpun.js.map
1414
+ //# sourceMappingURL=GatewayBranchEdge-CrgczPYJ.js.map