@notmrabhi/flowforge 0.1.52 → 0.1.54

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.
Files changed (36) hide show
  1. package/dist/{GatewayBranchEdge-CrgczPYJ.js → GatewayBranchEdge-BWz43Sat.js} +99 -102
  2. package/dist/GatewayBranchEdge-BWz43Sat.js.map +1 -0
  3. package/dist/GatewayBranchEdge-Ukfp7i1Q.js +2 -0
  4. package/dist/GatewayBranchEdge-Ukfp7i1Q.js.map +1 -0
  5. package/dist/{templateSkeletons-f-XQQvyE.js → WorkflowExecutionHistory-B0OiFCyi.js} +804 -858
  6. package/dist/WorkflowExecutionHistory-B0OiFCyi.js.map +1 -0
  7. package/dist/{templateSkeletons-gOva2Xus.js → WorkflowExecutionHistory-BHb6-2lt.js} +2 -2
  8. package/dist/WorkflowExecutionHistory-BHb6-2lt.js.map +1 -0
  9. package/dist/buildBackendPayload-4SwOp7St.js +316 -0
  10. package/dist/buildBackendPayload-4SwOp7St.js.map +1 -0
  11. package/dist/buildBackendPayload-BvrjW1uM.js +2 -0
  12. package/dist/buildBackendPayload-BvrjW1uM.js.map +1 -0
  13. package/dist/canvas.cjs +1 -1
  14. package/dist/canvas.d.ts +0 -61
  15. package/dist/canvas.js +21 -25
  16. package/dist/core.cjs +1 -1
  17. package/dist/core.d.ts +163 -24
  18. package/dist/core.js +11 -9
  19. package/dist/core.js.map +1 -1
  20. package/dist/defaultUi.cjs +1 -1
  21. package/dist/defaultUi.js +1 -1
  22. package/dist/form.d.ts +0 -35
  23. package/dist/index-B-D9UuLO.js.map +1 -1
  24. package/dist/index-DUbQPmIx.js.map +1 -1
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.ts +0 -43
  28. package/dist/index.js +123 -443
  29. package/dist/index.js.map +1 -1
  30. package/dist/nodeRegistry.d.ts +0 -24
  31. package/package.json +1 -1
  32. package/dist/GatewayBranchEdge-CMY30xhz.js +0 -2
  33. package/dist/GatewayBranchEdge-CMY30xhz.js.map +0 -1
  34. package/dist/GatewayBranchEdge-CrgczPYJ.js.map +0 -1
  35. package/dist/templateSkeletons-f-XQQvyE.js.map +0 -1
  36. package/dist/templateSkeletons-gOva2Xus.js.map +0 -1
@@ -1,14 +1,14 @@
1
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";
2
+ import { Handle as x, Position as N, getStraightPath as U, BaseEdge as V } from "reactflow";
3
3
  import { Tooltip as $, Chip as q } from "@mui/material";
4
- import { GrTrigger as Ne } from "react-icons/gr";
5
- import { createContext as ke, useContext as ve } from "react";
6
- import { d as we } from "./messages-CO299wPN.js";
7
- import { MdOutlineModeEdit as D, MdInfoOutline as 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";
4
+ import { GrTrigger as ke } from "react-icons/gr";
5
+ import { createContext as ve, useContext as we } from "react";
6
+ import { d as Se } from "./messages-CO299wPN.js";
7
+ import { MdOutlineModeEdit as D, MdInfoOutline as B, MdInput as fe, MdDeleteOutline as F, MdCheckCircle as Ce, MdPeople as Te, MdSchedule as Ee, MdWebhook as de, MdNotifications as O, MdSms as ze, MdEmail as Ie, MdContentCopy as Pe, MdHttp as Ae, MdCallSplit as De, MdAccountTree as Le, MdOpenInNew as Re } from "react-icons/md";
8
8
  import { FaCheckCircle as ae, FaTimesCircle as pe } from "react-icons/fa";
9
- import { FiFilter as Le } from "react-icons/fi";
10
- import { a as K, H as We, B as Y } from "./canvasTokens-CAD6G24b.js";
11
- const Fe = ke({
9
+ import { FiFilter as We } from "react-icons/fi";
10
+ import { a as K, H as Fe, B as Y } from "./canvasTokens-CAD6G24b.js";
11
+ const $e = ve({
12
12
  onEditNode: () => {
13
13
  },
14
14
  onDeleteNode: () => {
@@ -17,16 +17,16 @@ const Fe = ke({
17
17
  },
18
18
  onClickAddTrigger: () => {
19
19
  },
20
- messages: we,
20
+ messages: Se,
21
21
  nodeRegistry: null,
22
22
  nodeBody: "full"
23
- }), P = () => ve(Fe), $e = () => /* @__PURE__ */ t("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
23
+ }), P = () => we($e), je = () => /* @__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
- ] }), je = () => /* @__PURE__ */ t("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
26
+ ] }), Be = () => /* @__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
- ] }), Be = () => {
29
+ ] }), Ke = () => {
30
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%" } }),
@@ -41,14 +41,14 @@ const Fe = ke({
41
41
  },
42
42
  style: { padding: "10px 24px", borderRadius: 8, border: "1.5px dashed #d0d0d0", background: "#fff", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center", gap: 8 },
43
43
  children: [
44
- /* @__PURE__ */ e(Ne, { size: 16 }),
44
+ /* @__PURE__ */ e(ke, { size: 16 }),
45
45
  /* @__PURE__ */ e("span", { className: "ff-text-black", style: { fontSize: 13 }, "data-testid": "add-trigger-btn-text", children: i.addTriggerButton })
46
46
  ]
47
47
  }
48
48
  ) }),
49
49
  /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0, left: "50%" } })
50
50
  ] });
51
- }, Ke = ({ id: n }) => {
51
+ }, Me = ({ id: n }) => {
52
52
  const { onAddStep: i } = P();
53
53
  return /* @__PURE__ */ t(
54
54
  "div",
@@ -71,12 +71,12 @@ const Fe = ke({
71
71
  function ge(n) {
72
72
  return n ? n.replace(/[_-]+/g, " ").toLowerCase().replace(/\b\w/g, (i) => i.toUpperCase()) : "";
73
73
  }
74
- function Me(n) {
74
+ function _e(n) {
75
75
  if (typeof n != "string" && n.label) return n.label;
76
76
  const i = typeof n == "string" ? n : n.value ?? "";
77
77
  return ge(i);
78
78
  }
79
- const _e = ({ data: n }) => {
79
+ const He = ({ data: n }) => {
80
80
  const { onClickAddTrigger: i } = P(), {
81
81
  type: f,
82
82
  eventType: p,
@@ -101,7 +101,7 @@ const _e = ({ data: n }) => {
101
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
- label: Me(C),
104
+ label: _e(C),
105
105
  variant: "outlined",
106
106
  size: "small",
107
107
  className: "ff-text-dark"
@@ -191,12 +191,13 @@ const _e = ({ data: n }) => {
191
191
  /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 }, id: "1" })
192
192
  ] });
193
193
  };
194
- function He(n) {
195
- return n ? n === "END_USER_CREATION" ? "New User Registration" : n === "END_USER_UPDATION" ? "On User Update" : n.replace(/[_-]+/g, " ").replace(/\b\w/g, (i) => i.toUpperCase()) : "";
194
+ function he(n) {
195
+ return n ? n.replace(/[_-]+/g, " ").replace(/\b\w/g, (i) => i.toUpperCase()) : "";
196
196
  }
197
197
  function Oe(n) {
198
+ if (typeof n != "string" && n.label) return n.label;
198
199
  const i = typeof n == "string" ? n : n.value ?? "";
199
- return i === "SIGNUP_FLOW" ? "User Self-Registration" : i === "ADMIN_CREATION_FLOW" ? "Create User via Admin Portal" : i === "SHEDULAR" || i === "SCHEDULER" ? "Scheduler" : typeof n != "string" && n.label ? n.label : i.replace(/[_-]+/g, " ").replace(/\b\w/g, (f) => f.toUpperCase());
200
+ return he(i);
200
201
  }
201
202
  const Ue = ({ data: n }) => {
202
203
  const {
@@ -206,7 +207,7 @@ const Ue = ({ data: n }) => {
206
207
  sources: c,
207
208
  executionStatus: r,
208
209
  infoText: h = "This event is raised by the system. It cannot be configured."
209
- } = n ?? {}, o = f ?? He(p) ?? "—";
210
+ } = n ?? {}, o = f || he(p) || "—";
210
211
  return /* @__PURE__ */ t("div", { style: { width: 350 }, children: [
211
212
  /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
212
213
  /* @__PURE__ */ t("div", { style: { border: "1.5px solid #a5d6a7", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
@@ -269,7 +270,7 @@ const Ue = ({ data: n }) => {
269
270
  ] }),
270
271
  /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 }, id: "1" })
271
272
  ] });
272
- }, he = ({ rail: n, cardWidth: i }) => {
273
+ }, ye = ({ rail: n, cardWidth: i }) => {
273
274
  const f = i / 2;
274
275
  i / 2 + n.indent;
275
276
  const p = "var(--ff-edge-color, #b0bec5)";
@@ -314,14 +315,14 @@ const Ue = ({ data: n }) => {
314
315
  ]
315
316
  }
316
317
  );
317
- }, Ge = ({ id: n, data: i }) => {
318
+ }, Ve = ({ id: n, data: i }) => {
318
319
  const { onEditNode: f, onDeleteNode: p } = P(), { conditions: c = [], infoText: r = "Filter conditions applied to workflow data", _branchRail: h } = i;
319
320
  return /* @__PURE__ */ t("div", { style: { width: 350, position: "relative" }, children: [
320
321
  /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
321
322
  /* @__PURE__ */ t("div", { style: { border: "1.5px solid #ffe082", borderRadius: 8, background: "#fff" }, children: [
322
323
  /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
323
324
  /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center", children: [
324
- /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(255,160,0,0.1)" }, children: /* @__PURE__ */ e(Le, { className: "ff-text-warning", size: 16 }) }),
325
+ /* @__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 }) }),
325
326
  /* @__PURE__ */ e("span", { className: "ff-ms-2 ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "Filter" })
326
327
  ] }),
327
328
  /* @__PURE__ */ t("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
@@ -365,9 +366,9 @@ const Ue = ({ data: n }) => {
365
366
  ] }, l)) })
366
367
  ] }),
367
368
  /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } }),
368
- h && /* @__PURE__ */ e(he, { rail: h, cardWidth: 350 })
369
+ h && /* @__PURE__ */ e(ye, { rail: h, cardWidth: 350 })
369
370
  ] });
370
- }, Ve = ({ id: n, data: i }) => {
371
+ }, Ge = ({ id: n, data: i }) => {
371
372
  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
373
  "descriptorType",
373
374
  "title",
@@ -375,13 +376,11 @@ const Ue = ({ data: n }) => {
375
376
  "icon",
376
377
  "infoText",
377
378
  "label",
378
- // FlowForm's condition-builder sidecar — rendered separately below as
379
- // proper "When ..." rows, not as a JSON dump in the generic body.
380
379
  "conditionConfig",
381
380
  "_conditionConfig"
382
- ]), R = s == null ? void 0 : s.formSchema, T = (a) => {
383
- if (Array.isArray(R)) {
384
- const b = R.find((w) => (w == null ? void 0 : w.id) === a || (w == null ? void 0 : w.name) === a);
381
+ ]), L = s == null ? void 0 : s.formSchema, E = (a) => {
382
+ if (Array.isArray(L)) {
383
+ const b = L.find((w) => (w == null ? void 0 : w.id) === a || (w == null ? void 0 : w.name) === a);
385
384
  if (b != null && b.label) return b.label;
386
385
  }
387
386
  return a.replace(/[_-]+/g, " ").replace(/\b\w/g, (b) => b.toUpperCase());
@@ -399,10 +398,10 @@ const Ue = ({ data: n }) => {
399
398
  return String(a);
400
399
  }, I = Object.entries(i || {}).filter(
401
400
  ([a, b]) => !v.has(a) && b !== "" && b !== null && b !== void 0 && !(Array.isArray(b) && b.length === 0)
402
- ), z = (i == null ? void 0 : i.conditionConfig) ?? (i == null ? void 0 : i._conditionConfig), E = z && typeof z == "object" ? Object.entries(z).filter(([, a]) => Array.isArray(a) && a.length > 0).map(([a, b]) => ({
401
+ ), z = (i == null ? void 0 : i.conditionConfig) ?? (i == null ? void 0 : i._conditionConfig), T = z && typeof z == "object" ? Object.entries(z).filter(([, a]) => Array.isArray(a) && a.length > 0).map(([a, b]) => ({
403
402
  path: a,
404
403
  entries: b
405
- })) : [], L = (l == null ? void 0 : l.flatMap((a) => a.groups ?? [])) ?? [...C(d), ...C(u), ...C(y), ...C(k)], V = L.length > 0;
404
+ })) : [], R = (l == null ? void 0 : l.flatMap((a) => a.groups ?? [])) ?? [...C(d), ...C(u), ...C(y), ...C(k)], G = R.length > 0;
406
405
  return /* @__PURE__ */ t("div", { style: { width: 350 }, children: [
407
406
  /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
408
407
  /* @__PURE__ */ t("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
@@ -444,10 +443,7 @@ const Ue = ({ data: n }) => {
444
443
  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
444
  ] })
446
445
  ] }),
447
- r !== "title-only" && // Body container matches IAM ActionNodeLabel: 12px text, left-aligned.
448
- // We use a single bg-light rounded pill that wraps everything, the
449
- // same way IAM's groupBlocks each render as bg-light rounded my-2 p-2.
450
- /* @__PURE__ */ e(
446
+ r !== "title-only" && /* @__PURE__ */ e(
451
447
  "div",
452
448
  {
453
449
  style: {
@@ -460,11 +456,11 @@ const Ue = ({ data: n }) => {
460
456
  color: "#212529",
461
457
  lineHeight: 1.4
462
458
  },
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: [
459
+ children: s != null && s.renderNode ? s.renderNode(i) : I.length > 0 || T.length > 0 ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column" }, children: [
460
+ T.map((a, b) => /* @__PURE__ */ t("div", { children: [
465
461
  /* @__PURE__ */ e("div", { style: { color: "#6c757d" }, children: "When" }),
466
- a.entries.slice(0, 3).map((w, W, ye) => {
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";
462
+ a.entries.slice(0, 3).map((w, W, ue) => {
463
+ const me = w.field || "", be = w.fieldLabel || E(me), xe = w.operator || "", Z = w.value == null ? "" : typeof w.value == "object" ? A(w.value) : String(w.value), Ne = w.connector || "and";
468
464
  return /* @__PURE__ */ t(
469
465
  "div",
470
466
  {
@@ -475,10 +471,10 @@ const Ue = ({ data: n }) => {
475
471
  marginTop: 4
476
472
  },
477
473
  children: [
478
- /* @__PURE__ */ e("span", { style: { fontWeight: 700, marginRight: 4, color: "#212529" }, children: me }),
479
- /* @__PURE__ */ e("span", { style: { color: "#6c757d", marginRight: 4 }, children: be }),
474
+ /* @__PURE__ */ e("span", { style: { fontWeight: 700, marginRight: 4, color: "#212529" }, children: be }),
475
+ /* @__PURE__ */ e("span", { style: { color: "#6c757d", marginRight: 4 }, children: xe }),
480
476
  /* @__PURE__ */ e("span", { style: { color: "#212529", marginRight: 4 }, title: Z, children: Z }),
481
- W < ye.length - 1 && /* @__PURE__ */ e(
477
+ W < ue.length - 1 && /* @__PURE__ */ e(
482
478
  "span",
483
479
  {
484
480
  style: {
@@ -491,7 +487,7 @@ const Ue = ({ data: n }) => {
491
487
  textTransform: "uppercase",
492
488
  fontSize: 10
493
489
  },
494
- children: xe
490
+ children: Ne
495
491
  }
496
492
  )
497
493
  ]
@@ -521,7 +517,7 @@ const Ue = ({ data: n }) => {
521
517
  I.slice(0, 6).map(([a, b]) => /* @__PURE__ */ e(
522
518
  "span",
523
519
  {
524
- title: `${T(a)}: ${A(b)}`,
520
+ title: `${E(a)}: ${A(b)}`,
525
521
  style: {
526
522
  background: "#212529",
527
523
  color: "#fff",
@@ -538,9 +534,10 @@ const Ue = ({ data: n }) => {
538
534
  I.length - 6
539
535
  ] })
540
536
  ] })
541
- ] }) : V ? (
542
- // Dark badges matching IAM's bg-dark text-white py-1 px-2 rounded
543
- /* @__PURE__ */ e("div", { style: { display: "flex", flexWrap: "wrap", gap: 4 }, children: L.map((a, b) => /* @__PURE__ */ e(
537
+ ] }) : G ? (
538
+ // Legacy display fallback: dark badges for old-shape data
539
+ // (groupBlocks/groups/roles/groupId/roleId on the slot)
540
+ /* @__PURE__ */ e("div", { style: { display: "flex", flexWrap: "wrap", gap: 4 }, children: R.map((a, b) => /* @__PURE__ */ e(
544
541
  "span",
545
542
  {
546
543
  title: a,
@@ -568,7 +565,7 @@ const Ue = ({ data: n }) => {
568
565
  /* @__PURE__ */ t("div", { style: { border: "1.5px solid #ffe082", borderRadius: 8, background: "#fff" }, children: [
569
566
  /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
570
567
  /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
571
- /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(251,192,45,0.2)" }, children: /* @__PURE__ */ e(Se, { style: { color: "#FBC02D" }, size: 16 }) }),
568
+ /* @__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(Ce, { style: { color: "#FBC02D" }, size: 16 }) }),
572
569
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "Approval Policy" })
573
570
  ] }),
574
571
  /* @__PURE__ */ t("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
@@ -618,15 +615,15 @@ const Ue = ({ data: n }) => {
618
615
  l.length > 0 ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
619
616
  u.map((g, s) => {
620
617
  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;
622
- let T = "Not configured";
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: [
618
+ 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()) ?? "", L = m > 0 || C || v;
619
+ let E = "Not configured";
620
+ return C ? E = `Group: ${C}` : v ? E = `Role: ${v}` : m > 0 && (E = `${m} approver${m !== 1 ? "s" : ""}`), /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
624
621
  /* @__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 }),
625
622
  /* @__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: [
626
623
  /* @__PURE__ */ e("span", { style: { fontSize: 12, fontWeight: 700, color: "#212121" }, children: S }),
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: [
628
- /* @__PURE__ */ e(Ce, { size: 16, className: "ff-flex-shrink-0", style: { color: R ? "#5D4037" : "#9E9E9E" } }),
629
- T
624
+ /* @__PURE__ */ t("span", { className: `ff-d-flex ff-align-items-center ff-gap-1 ${L ? "ff-text-dark" : "ff-text-muted"}`, style: { fontSize: 12 }, children: [
625
+ /* @__PURE__ */ e(Te, { size: 16, className: "ff-flex-shrink-0", style: { color: L ? "#5D4037" : "#9E9E9E" } }),
626
+ E
630
627
  ] })
631
628
  ] })
632
629
  ] }, s);
@@ -656,7 +653,7 @@ const Ue = ({ data: n }) => {
656
653
  ] })
657
654
  ] }),
658
655
  /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } }),
659
- h && /* @__PURE__ */ e(he, { rail: h, cardWidth: 350 })
656
+ h && /* @__PURE__ */ e(ye, { rail: h, cardWidth: 350 })
660
657
  ] });
661
658
  }, Ze = ({ id: n, data: i }) => {
662
659
  const { onEditNode: f, onDeleteNode: p } = P(), { duration: c, unit: r } = i, h = c != null && r, o = h ? `Wait ${c} ${r}` : "Not configured";
@@ -705,10 +702,10 @@ const Ue = ({ data: n }) => {
705
702
  /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
706
703
  ] });
707
704
  }, Q = {
708
- email: { label: "Email", bg: "#e3f2fd", color: "#1565c0", iconType: ze },
705
+ email: { label: "Email", bg: "#e3f2fd", color: "#1565c0", iconType: Ie },
709
706
  slack: { label: "Slack", bg: "#e8f5e9", color: "#2e7d32", iconType: O },
710
707
  teams: { label: "MS Teams", bg: "#ede7f6", color: "#4527a0", iconType: O },
711
- sms: { label: "SMS", bg: "#fce4ec", color: "#880e4f", iconType: Te },
708
+ sms: { label: "SMS", bg: "#fce4ec", color: "#880e4f", iconType: ze },
712
709
  "in-app": { label: "In-App", bg: "#fff3e0", color: "#e65100", iconType: O },
713
710
  webhook: { label: "Webhook", bg: "#f3e5f5", color: "#6a1b9a", iconType: de }
714
711
  }, Ye = {
@@ -853,7 +850,7 @@ const Xe = ({ id: n, data: i }) => {
853
850
  (l.key === "Enter" || l.key === " ") && o(l);
854
851
  },
855
852
  style: { cursor: "pointer", flexShrink: 0 },
856
- children: /* @__PURE__ */ e(Ie, { size: 12, color: "#1565c0" })
853
+ children: /* @__PURE__ */ e(Pe, { size: 12, color: "#1565c0" })
857
854
  }
858
855
  ) })
859
856
  ] })
@@ -863,7 +860,7 @@ const Xe = ({ id: n, data: i }) => {
863
860
  ] });
864
861
  }, tt = ({ id: n, data: i }) => {
865
862
  var k;
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;
863
+ 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(Ae, { size: 16, color: "#546e7a" }), d = !!(r && h), u = (r == null ? void 0 : r.toUpperCase()) ?? "", y = Fe[u] ?? null;
867
864
  return /* @__PURE__ */ t("div", { style: { width: K }, children: [
868
865
  /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
869
866
  /* @__PURE__ */ t("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
@@ -930,7 +927,7 @@ const Xe = ({ id: n, data: i }) => {
930
927
  /* @__PURE__ */ t("div", { style: { border: "1.5px solid #b39ddb", borderRadius: 8, background: "#fff" }, children: [
931
928
  /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
932
929
  /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
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" }) }),
930
+ /* @__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(De, { size: 16, color: "#512da8" }) }),
934
931
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: c })
935
932
  ] }),
936
933
  /* @__PURE__ */ t("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
@@ -990,7 +987,7 @@ const Xe = ({ id: n, data: i }) => {
990
987
  ] });
991
988
  }, it = ({ id: n, data: i }) => {
992
989
  var g;
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) => {
990
+ 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(Le, { size: 16, color: "#00695c" }), y = !!h, k = (s) => {
994
991
  s.stopPropagation(), h && d && d(h);
995
992
  };
996
993
  return /* @__PURE__ */ t("div", { style: { width: K }, children: [
@@ -1062,14 +1059,14 @@ const Xe = ({ id: n, data: i }) => {
1062
1059
  /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
1063
1060
  ] });
1064
1061
  }, xt = {
1065
- startNode: $e,
1066
- endNode: je,
1067
- addTriggerNode: Be,
1068
- addStepNode: Ke,
1069
- triggerNode: _e,
1062
+ startNode: je,
1063
+ endNode: Be,
1064
+ addTriggerNode: Ke,
1065
+ addStepNode: Me,
1066
+ triggerNode: He,
1070
1067
  eventNode: Ue,
1071
- filterNode: Ge,
1072
- actionNode: Ve,
1068
+ filterNode: Ve,
1069
+ actionNode: Ge,
1073
1070
  approvalNode: qe,
1074
1071
  delayNode: Ze,
1075
1072
  notificationNode: Xe,
@@ -1094,9 +1091,9 @@ const Xe = ({ id: n, data: i }) => {
1094
1091
  sourceY: f,
1095
1092
  targetX: p,
1096
1093
  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) => {
1098
- if (L.stopPropagation(), typeof T != "function") return;
1099
- const V = {
1094
+ }), 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, L = f + 2 * (c - f) / 3, E = d == null ? void 0 : d.onAddStepClick, A = (R) => {
1095
+ if (R.stopPropagation(), typeof E != "function") return;
1096
+ const G = {
1100
1097
  edgeId: n,
1101
1098
  nodeId: o,
1102
1099
  sourceNodeId: o,
@@ -1106,9 +1103,9 @@ const Xe = ({ id: n, data: i }) => {
1106
1103
  referenceNodeType: d == null ? void 0 : d.referenceNodeType,
1107
1104
  stepVisibility: d == null ? void 0 : d.stepVisibility
1108
1105
  };
1109
- T(o, V);
1110
- }, I = (L) => {
1111
- (L.key === "Enter" || L.key === " ") && (L.preventDefault(), A(L));
1106
+ E(o, G);
1107
+ }, I = (R) => {
1108
+ (R.key === "Enter" || R.key === " ") && (R.preventDefault(), A(R));
1112
1109
  }, z = () => /* @__PURE__ */ t(j, { children: [
1113
1110
  /* @__PURE__ */ t("g", { className: "plus-icon-container", children: [
1114
1111
  /* @__PURE__ */ e("circle", { r: lt, className: "edge-plus-circle" }),
@@ -1120,7 +1117,7 @@ const Xe = ({ id: n, data: i }) => {
1120
1117
  /* @__PURE__ */ e("path", { d: "M0 -4 L-4 0 L0 4 Z", className: "tooltip-bg" }),
1121
1118
  /* @__PURE__ */ e("text", { x: 32, y: 0, textAnchor: "middle", dominantBaseline: "central", fill: "white", style: { fontSize: 10, fontWeight: 600, pointerEvents: "none" }, children: "Add Step" })
1122
1119
  ] })
1123
- ] }), E = T ? {
1120
+ ] }), T = E ? {
1124
1121
  onClick: A,
1125
1122
  onKeyDown: I,
1126
1123
  role: "button",
@@ -1130,14 +1127,14 @@ const Xe = ({ id: n, data: i }) => {
1130
1127
  style: { cursor: "default", pointerEvents: "all" }
1131
1128
  };
1132
1129
  return /* @__PURE__ */ t("g", { className: "edge-with-plus-wrapper", children: [
1133
- /* @__PURE__ */ e(G, { id: n, path: u }),
1130
+ /* @__PURE__ */ e(V, { id: n, path: u }),
1134
1131
  S ? /* @__PURE__ */ t(j, { children: [
1135
1132
  /* @__PURE__ */ t("g", { transform: `translate(${m}, ${C})`, children: [
1136
1133
  /* @__PURE__ */ e("rect", { x: -te / 2, y: -ne / 2, width: te, height: ne, rx: oe, ry: oe, fill: s ? "#ADE6C5" : "#FDBFBF" }),
1137
1134
  /* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: s ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: g })
1138
1135
  ] }),
1139
- /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${v}, ${R})`, "data-testid": "plus-node-icon", ...E, children: /* @__PURE__ */ e(z, {}) })
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
+ /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${v}, ${L})`, "data-testid": "plus-node-icon", ...T, children: /* @__PURE__ */ e(z, {}) })
1137
+ ] }) : /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${y}, ${k})`, "data-testid": "plus-node-icon", ...T, children: /* @__PURE__ */ e(z, {}) })
1141
1138
  ] });
1142
1139
  }, rt = 11.5, ie = 2, _ = 6, kt = ({
1143
1140
  id: n,
@@ -1171,7 +1168,7 @@ const Xe = ({ id: n, data: i }) => {
1171
1168
  (s.key === "Enter" || s.key === " ") && (s.preventDefault(), k(s));
1172
1169
  };
1173
1170
  return /* @__PURE__ */ t("g", { className: "edge-with-plus-wrapper", children: [
1174
- /* @__PURE__ */ e(G, { id: n, path: l, style: { stroke: "#b0bec5" } }),
1171
+ /* @__PURE__ */ e(V, { id: n, path: l, style: { stroke: "#b0bec5" } }),
1175
1172
  /* @__PURE__ */ t(
1176
1173
  "g",
1177
1174
  {
@@ -1245,7 +1242,7 @@ const Xe = ({ id: n, data: i }) => {
1245
1242
  ] });
1246
1243
  }, vt = ({ id: n, sourceX: i, sourceY: f, targetX: p, targetY: c }) => {
1247
1244
  const [r] = U({ sourceX: i, sourceY: f, targetX: p, targetY: c });
1248
- return /* @__PURE__ */ e(G, { id: n, path: r, style: { stroke: "#b0bec5" } });
1245
+ return /* @__PURE__ */ e(V, { id: n, path: r, style: { stroke: "#b0bec5" } });
1249
1246
  }, st = 11.5, le = 2, H = 6, ct = -24, re = 40, se = 20, ce = 4, wt = ({
1250
1247
  id: n,
1251
1248
  sourceX: i,
@@ -1271,7 +1268,7 @@ const Xe = ({ id: n, data: i }) => {
1271
1268
  (v.key === "Enter" || v.key === " ") && (v.preventDefault(), m(v));
1272
1269
  };
1273
1270
  return /* @__PURE__ */ t("g", { className: "edge-with-plus-wrapper", children: [
1274
- /* @__PURE__ */ e(G, { id: n, path: l, style: { stroke: "#b0bec5" } }),
1271
+ /* @__PURE__ */ e(V, { id: n, path: l, style: { stroke: "#b0bec5" } }),
1275
1272
  /* @__PURE__ */ t(
1276
1273
  "g",
1277
1274
  {
@@ -1325,13 +1322,13 @@ const Xe = ({ id: n, data: i }) => {
1325
1322
  data: d
1326
1323
  }) => {
1327
1324
  const u = (d == null ? void 0 : d.verticalRouting) ?? !1, y = 30, k = u ? (() => {
1328
- const E = h - y;
1329
- return `M ${p},${E} L ${r},${E} L ${r},${h}`;
1325
+ const T = h - y;
1326
+ return `M ${p},${T} L ${r},${T} L ${r},${h}`;
1330
1327
  })() : (() => {
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) => {
1334
- E.stopPropagation(), m && m(i, {
1328
+ const T = c + 30;
1329
+ return `M ${p},${c} L ${p},${T} L ${r},${T} L ${r},${h}`;
1330
+ })(), 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), L = p + (r - p) * (u ? 0.65 : 0.7), E = C, A = (T) => {
1331
+ T.stopPropagation(), m && m(i, {
1335
1332
  edgeId: n,
1336
1333
  nodeId: i,
1337
1334
  sourceNodeId: i,
@@ -1344,15 +1341,15 @@ const Xe = ({ id: n, data: i }) => {
1344
1341
  }, I = 11.5, z = 6;
1345
1342
  return /* @__PURE__ */ t("g", { children: [
1346
1343
  /* @__PURE__ */ e("path", { id: n, d: k, fill: "none", stroke: g, strokeWidth: 1.5, markerEnd: l }),
1347
- s && !u && /* @__PURE__ */ e("g", { transform: `translate(${v}, ${T})`, children: (() => {
1348
- const E = Math.max(44, s.length * 7 + 20);
1344
+ s && !u && /* @__PURE__ */ e("g", { transform: `translate(${v}, ${E})`, children: (() => {
1345
+ const T = Math.max(44, s.length * 7 + 20);
1349
1346
  return /* @__PURE__ */ t(j, { children: [
1350
1347
  /* @__PURE__ */ e(
1351
1348
  "rect",
1352
1349
  {
1353
- x: -E / 2,
1350
+ x: -T / 2,
1354
1351
  y: -11,
1355
- width: E,
1352
+ width: T,
1356
1353
  height: 22,
1357
1354
  rx: 11,
1358
1355
  fill: S ? "#e8f5e9" : "#ffebee",
@@ -1378,7 +1375,7 @@ const Xe = ({ id: n, data: i }) => {
1378
1375
  m && /* @__PURE__ */ t(
1379
1376
  "g",
1380
1377
  {
1381
- transform: `translate(${R}, ${T})`,
1378
+ transform: `translate(${L}, ${E})`,
1382
1379
  onClick: A,
1383
1380
  style: { cursor: "pointer", pointerEvents: "all" },
1384
1381
  className: "nodrag nopan edge-plus-svg",
@@ -1392,23 +1389,23 @@ const Xe = ({ id: n, data: i }) => {
1392
1389
  ] });
1393
1390
  };
1394
1391
  export {
1395
- Ve as A,
1392
+ Ge as A,
1396
1393
  Ze as D,
1397
1394
  Nt as E,
1398
- Ge as F,
1395
+ Ve as F,
1399
1396
  St as G,
1400
1397
  wt as L,
1401
1398
  Xe as N,
1402
1399
  vt as P,
1403
1400
  tt as R,
1404
- $e as S,
1405
- _e as T,
1401
+ je as S,
1402
+ He as T,
1406
1403
  et as W,
1407
- Be as a,
1404
+ Ke as a,
1408
1405
  qe as b,
1409
- je as c,
1406
+ Be as c,
1410
1407
  kt as d,
1411
1408
  xt as e,
1412
- Fe as f
1409
+ $e as f
1413
1410
  };
1414
- //# sourceMappingURL=GatewayBranchEdge-CrgczPYJ.js.map
1411
+ //# sourceMappingURL=GatewayBranchEdge-BWz43Sat.js.map