@emporix/process-diagram 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsxs as g, Fragment as se, jsx as t } from "react/jsx-runtime";
2
- import O, { forwardRef as le, useState as E, useRef as T, useCallback as H, useImperativeHandle as ce, useEffect as W, createContext as ae, useMemo as $, useContext as de } from "react";
2
+ import E, { forwardRef as le, useState as B, useRef as H, useCallback as T, useImperativeHandle as ce, useEffect as Z, createContext as ae, useMemo as $, useContext as de } from "react";
3
3
  import { createPortal as ue } from "react-dom";
4
- const pe = "_container_ww84z_1", he = "_step_ww84z_7", me = "_selected_ww84z_22", ge = "_selectedInvalid_ww84z_28", Ce = "_isSet_ww84z_34", fe = "_invalid_ww84z_38", ve = "_filterFlag_ww84z_44", _e = "_title_ww84z_70", we = "_icon_ww84z_87", ye = "_content_ww84z_105", xe = "_dotsButton_ww84z_111", f = {
4
+ const pe = "_container_ww84z_1", he = "_step_ww84z_7", me = "_selected_ww84z_22", ge = "_selectedInvalid_ww84z_28", Ce = "_isSet_ww84z_34", fe = "_invalid_ww84z_38", ve = "_filterFlag_ww84z_44", _e = "_title_ww84z_70", we = "_icon_ww84z_87", xe = "_content_ww84z_105", ye = "_dotsButton_ww84z_111", f = {
5
5
  container: pe,
6
6
  step: he,
7
7
  selected: me,
@@ -11,8 +11,8 @@ const pe = "_container_ww84z_1", he = "_step_ww84z_7", me = "_selected_ww84z_22"
11
11
  filterFlag: ve,
12
12
  title: _e,
13
13
  icon: we,
14
- content: ye,
15
- dotsButton: xe
14
+ content: xe,
15
+ dotsButton: ye
16
16
  };
17
17
  var J = {
18
18
  color: void 0,
@@ -20,18 +20,18 @@ var J = {
20
20
  className: void 0,
21
21
  style: void 0,
22
22
  attr: void 0
23
- }, Y = O.createContext && /* @__PURE__ */ O.createContext(J), Ie = ["attr", "size", "title"];
24
- function be(e, i) {
23
+ }, X = E.createContext && /* @__PURE__ */ E.createContext(J), be = ["attr", "size", "title"];
24
+ function ke(e, i) {
25
25
  if (e == null) return {};
26
- var n = ke(e, i), r, a;
26
+ var n = Ie(e, i), r, c;
27
27
  if (Object.getOwnPropertySymbols) {
28
28
  var p = Object.getOwnPropertySymbols(e);
29
- for (a = 0; a < p.length; a++)
30
- r = p[a], !(i.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
29
+ for (c = 0; c < p.length; c++)
30
+ r = p[c], !(i.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
31
31
  }
32
32
  return n;
33
33
  }
34
- function ke(e, i) {
34
+ function Ie(e, i) {
35
35
  if (e == null) return {};
36
36
  var n = {};
37
37
  for (var r in e)
@@ -51,12 +51,12 @@ function F() {
51
51
  return e;
52
52
  }, F.apply(this, arguments);
53
53
  }
54
- function X(e, i) {
54
+ function G(e, i) {
55
55
  var n = Object.keys(e);
56
56
  if (Object.getOwnPropertySymbols) {
57
57
  var r = Object.getOwnPropertySymbols(e);
58
- i && (r = r.filter(function(a) {
59
- return Object.getOwnPropertyDescriptor(e, a).enumerable;
58
+ i && (r = r.filter(function(c) {
59
+ return Object.getOwnPropertyDescriptor(e, c).enumerable;
60
60
  })), n.push.apply(n, r);
61
61
  }
62
62
  return n;
@@ -64,9 +64,9 @@ function X(e, i) {
64
64
  function A(e) {
65
65
  for (var i = 1; i < arguments.length; i++) {
66
66
  var n = arguments[i] != null ? arguments[i] : {};
67
- i % 2 ? X(Object(n), !0).forEach(function(r) {
67
+ i % 2 ? G(Object(n), !0).forEach(function(r) {
68
68
  Ne(e, r, n[r]);
69
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : X(Object(n)).forEach(function(r) {
69
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : G(Object(n)).forEach(function(r) {
70
70
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
71
71
  });
72
72
  }
@@ -90,12 +90,12 @@ function Me(e, i) {
90
90
  return (i === "string" ? String : Number)(e);
91
91
  }
92
92
  function Q(e) {
93
- return e && e.map((i, n) => /* @__PURE__ */ O.createElement(i.tag, A({
93
+ return e && e.map((i, n) => /* @__PURE__ */ E.createElement(i.tag, A({
94
94
  key: n
95
95
  }, i.attr), Q(i.child)));
96
96
  }
97
97
  function z(e) {
98
- return (i) => /* @__PURE__ */ O.createElement(Le, F({
98
+ return (i) => /* @__PURE__ */ E.createElement(Le, F({
99
99
  attr: A({}, e.attr)
100
100
  }, i), Q(e.child));
101
101
  }
@@ -103,10 +103,10 @@ function Le(e) {
103
103
  var i = (n) => {
104
104
  var {
105
105
  attr: r,
106
- size: a,
106
+ size: c,
107
107
  title: p
108
- } = e, d = be(e, Ie), l = a || n.size || "1em", o;
109
- return n.className && (o = n.className), e.className && (o = (o ? o + " " : "") + e.className), /* @__PURE__ */ O.createElement("svg", F({
108
+ } = e, d = ke(e, be), l = c || n.size || "1em", o;
109
+ return n.className && (o = n.className), e.className && (o = (o ? o + " " : "") + e.className), /* @__PURE__ */ E.createElement("svg", F({
110
110
  stroke: "currentColor",
111
111
  fill: "currentColor",
112
112
  strokeWidth: "0"
@@ -118,89 +118,89 @@ function Le(e) {
118
118
  height: l,
119
119
  width: l,
120
120
  xmlns: "http://www.w3.org/2000/svg"
121
- }), p && /* @__PURE__ */ O.createElement("title", null, p), e.children);
121
+ }), p && /* @__PURE__ */ E.createElement("title", null, p), e.children);
122
122
  };
123
- return Y !== void 0 ? /* @__PURE__ */ O.createElement(Y.Consumer, null, (n) => i(n)) : i(J);
123
+ return X !== void 0 ? /* @__PURE__ */ E.createElement(X.Consumer, null, (n) => i(n)) : i(J);
124
124
  }
125
- function Ee(e) {
125
+ function Be(e) {
126
126
  return z({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641zM6.374 1 4.168 8.5H7.5a.5.5 0 0 1 .478.647L6.78 13.04 11.478 7H8a.5.5 0 0 1-.474-.658L9.306 1z" }, child: [] }] })(e);
127
127
  }
128
- function G(e) {
128
+ function q(e) {
129
129
  return z({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" }, child: [] }] })(e);
130
130
  }
131
131
  function ee(e) {
132
132
  return z({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z" }, child: [] }, { tag: "path", attr: { d: "M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z" }, child: [] }] })(e);
133
133
  }
134
- const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_19663_37", He = "_disabled_19663_52", Te = "_menuItemIcon_19663_57", $e = "_menuItemText_19663_63", ze = "_overlay_19663_69", b = {
135
- panel: Oe,
136
- panelExiting: Be,
134
+ const Ee = "_panel_19663_1", Oe = "_panelExiting_19663_13", Se = "_menuItem_19663_37", Te = "_disabled_19663_52", He = "_menuItemIcon_19663_57", $e = "_menuItemText_19663_63", ze = "_overlay_19663_69", k = {
135
+ panel: Ee,
136
+ panelExiting: Oe,
137
137
  menuItem: Se,
138
- disabled: He,
139
- menuItemIcon: Te,
138
+ disabled: Te,
139
+ menuItemIcon: He,
140
140
  menuItemText: $e,
141
141
  overlay: ze
142
142
  }, je = (e) => {
143
143
  const n = e.currentTarget ?? e.target;
144
144
  if (n?.getBoundingClientRect) {
145
- const a = n.getBoundingClientRect();
146
- return { top: a.bottom + 2, left: a.left };
145
+ const c = n.getBoundingClientRect();
146
+ return { top: c.bottom + 2, left: c.left };
147
147
  }
148
148
  const r = e;
149
149
  return {
150
150
  top: (r.clientY ?? 0) + 2,
151
151
  left: r.clientX ?? 0
152
152
  };
153
- }, te = le(function({ model: i, popup: n = !0, onHide: r, onClick: a }, p) {
154
- const [d, l] = E(!1), [o, C] = E(!1), [y, S] = E({ top: 0, left: 0 }), _ = T(null), v = H(() => {
153
+ }, te = le(function({ model: i, popup: n = !0, onHide: r, onClick: c }, p) {
154
+ const [d, l] = B(!1), [o, C] = B(!1), [x, S] = B({ top: 0, left: 0 }), _ = H(null), v = T(() => {
155
155
  o || C(!0);
156
- }, [o]), B = H(
157
- (c) => {
158
- o && c.animationName.includes("menuOut") && (l(!1), C(!1), r?.());
156
+ }, [o]), O = T(
157
+ (a) => {
158
+ o && a.animationName.includes("menuOut") && (l(!1), C(!1), r?.());
159
159
  },
160
160
  [o, r]
161
- ), k = H((c) => {
162
- S(je(c)), C(!1), l(!0);
163
- }, []), x = H(
164
- (c) => {
165
- d ? v() : k(c);
161
+ ), I = T((a) => {
162
+ S(je(a)), C(!1), l(!0);
163
+ }, []), y = T(
164
+ (a) => {
165
+ d ? v() : I(a);
166
166
  },
167
- [d, v, k]
167
+ [d, v, I]
168
168
  );
169
169
  ce(
170
170
  p,
171
171
  () => ({
172
- show: k,
172
+ show: I,
173
173
  hide: v,
174
- toggle: x
174
+ toggle: y
175
175
  }),
176
- [k, v, x]
177
- ), W(() => {
176
+ [I, v, y]
177
+ ), Z(() => {
178
178
  if (!d) return;
179
- const c = (u) => {
179
+ const a = (u) => {
180
180
  u.key === "Escape" && v();
181
181
  }, s = (u) => {
182
182
  const h = _.current;
183
183
  h && !h.contains(u.target) && v();
184
184
  };
185
- return document.addEventListener("keydown", c), document.addEventListener("mousedown", s), () => {
186
- document.removeEventListener("keydown", c), document.removeEventListener("mousedown", s);
185
+ return document.addEventListener("keydown", a), document.addEventListener("mousedown", s), () => {
186
+ document.removeEventListener("keydown", a), document.removeEventListener("mousedown", s);
187
187
  };
188
188
  }, [d, v]);
189
- const P = (c, s) => {
190
- s.stopPropagation(), c.command?.({ originalEvent: s, item: c }), v();
191
- }, I = (c, s) => {
192
- const u = (h) => P(c, h);
193
- return c.template ? /* @__PURE__ */ t(O.Fragment, { children: c.template(c, { onClick: u }) }, s) : /* @__PURE__ */ g(
189
+ const P = (a, s) => {
190
+ s.stopPropagation(), a.command?.({ originalEvent: s, item: a }), v();
191
+ }, b = (a, s) => {
192
+ const u = (h) => P(a, h);
193
+ return a.template ? /* @__PURE__ */ t(E.Fragment, { children: a.template(a, { onClick: u }) }, s) : /* @__PURE__ */ g(
194
194
  "button",
195
195
  {
196
196
  type: "button",
197
- className: `${b.menuItem} ${c.disabled && b.disabled}`,
197
+ className: `${k.menuItem} ${a.disabled && k.disabled}`,
198
198
  onClick: (h) => {
199
- c.disabled || u(h);
199
+ a.disabled || u(h);
200
200
  },
201
201
  children: [
202
- c.icon && /* @__PURE__ */ t("span", { className: b.menuItemIcon, children: c.icon }),
203
- /* @__PURE__ */ t("span", { className: b.menuItemText, children: c.label })
202
+ a.icon && /* @__PURE__ */ t("span", { className: k.menuItemIcon, children: a.icon }),
203
+ /* @__PURE__ */ t("span", { className: k.menuItemText, children: a.label })
204
204
  ]
205
205
  },
206
206
  s
@@ -211,24 +211,24 @@ const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_1966
211
211
  /* @__PURE__ */ t(
212
212
  "div",
213
213
  {
214
- className: b.overlay,
214
+ className: k.overlay,
215
215
  "aria-hidden": !0,
216
216
  onClick: () => v(),
217
- onMouseDown: (c) => c.stopPropagation()
217
+ onMouseDown: (a) => a.stopPropagation()
218
218
  }
219
219
  ),
220
220
  /* @__PURE__ */ t(
221
221
  "div",
222
222
  {
223
223
  ref: _,
224
- className: `${b.panel} ${o ? b.panelExiting : ""}`,
224
+ className: `${k.panel} ${o ? k.panelExiting : ""}`,
225
225
  role: "menu",
226
- style: { top: y.top, left: y.left },
227
- onAnimationEnd: B,
228
- onClick: (c) => {
229
- c.stopPropagation(), a?.(c);
226
+ style: { top: x.top, left: x.left },
227
+ onAnimationEnd: O,
228
+ onClick: (a) => {
229
+ a.stopPropagation(), c?.(a);
230
230
  },
231
- children: i.map(I)
231
+ children: i.map(b)
232
232
  }
233
233
  )
234
234
  ] }),
@@ -237,11 +237,11 @@ const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_1966
237
237
  }), ne = () => (e, i) => /* @__PURE__ */ g(
238
238
  "button",
239
239
  {
240
- className: b.menuItem,
240
+ className: k.menuItem,
241
241
  onClick: (n) => i.onClick(n),
242
242
  children: [
243
- /* @__PURE__ */ t("span", { className: b.menuItemIcon, children: e.icon }),
244
- /* @__PURE__ */ t("span", { className: b.menuItemText, children: e.label })
243
+ /* @__PURE__ */ t("span", { className: k.menuItemIcon, children: e.icon }),
244
+ /* @__PURE__ */ t("span", { className: k.menuItemText, children: e.label })
245
245
  ]
246
246
  }
247
247
  ), K = ({
@@ -276,19 +276,19 @@ const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_1966
276
276
  ), ie = ae(
277
277
  void 0
278
278
  ), wt = ({ children: e }) => {
279
- const [i, n] = E([]), r = H((d, l) => {
279
+ const [i, n] = B([]), r = T((d, l) => {
280
280
  n((o) => (o.forEach((C) => {
281
281
  C.current && C !== d && C.current.hide(l);
282
282
  }), [])), d.current?.toggle(l), n([d]);
283
- }, []), a = H((d) => {
283
+ }, []), c = T((d) => {
284
284
  n((l) => l.filter((o) => o !== d));
285
285
  }, []), p = $(
286
286
  () => ({
287
287
  openMenus: i,
288
288
  openMenu: r,
289
- closeMenu: a
289
+ closeMenu: c
290
290
  }),
291
- [i, r, a]
291
+ [i, r, c]
292
292
  );
293
293
  return /* @__PURE__ */ t(ie.Provider, { value: p, children: e });
294
294
  }, Re = () => {
@@ -320,22 +320,22 @@ const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_1966
320
320
  isSet: i,
321
321
  isSelected: n,
322
322
  isFilter: r,
323
- className: a,
323
+ className: c,
324
324
  title: p,
325
325
  icon: d,
326
326
  contextMenuItems: l = void 0,
327
327
  onClick: o,
328
328
  onDeleteStep: C,
329
- onUpdateFilter: y,
329
+ onUpdateFilter: x,
330
330
  subtitle: S,
331
331
  isInvalid: _,
332
332
  idx: v
333
- } = e, B = T(null), { openMenu: k, closeMenu: x } = Re(), P = ne(), I = $(() => [
333
+ } = e, O = H(null), { openMenu: I, closeMenu: y } = Re(), P = ne(), b = $(() => [
334
334
  {
335
335
  label: "Add Step Filter",
336
336
  icon: /* @__PURE__ */ t("div", { className: "mr-2 flex items-center justify-center", children: /* @__PURE__ */ t(K, {}) }),
337
337
  command: (m) => {
338
- m?.originalEvent?.stopPropagation(), y && y(v);
338
+ m?.originalEvent?.stopPropagation(), x && x(v);
339
339
  },
340
340
  template: P
341
341
  },
@@ -347,10 +347,10 @@ const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_1966
347
347
  },
348
348
  template: P
349
349
  }
350
- ], [y, C, v]), c = $(() => l !== void 0 ? l : I, [l, I]), s = (m) => {
351
- m.stopPropagation(), k(B, m);
350
+ ], [x, C, v]), a = $(() => l !== void 0 ? l : b, [l, b]), s = (m) => {
351
+ m.stopPropagation(), I(O, m);
352
352
  }, u = $(() => n && _ ? f.step + " " + f.selectedInvalid : n ? f.step + " " + f.selected : i ? f.step + " " + f.isSet : _ ? f.step + " " + f.invalid : f.step, [i, n, _]), h = $(() => _ ? /* @__PURE__ */ t(Fe, { color: "#E32012" }) : d, [d, _]);
353
- return /* @__PURE__ */ t("div", { className: f.container + " " + a, children: /* @__PURE__ */ g("div", { children: [
353
+ return /* @__PURE__ */ t("div", { className: f.container + " " + c, children: /* @__PURE__ */ g("div", { children: [
354
354
  /* @__PURE__ */ g("div", { className: u, onClick: o, children: [
355
355
  /* @__PURE__ */ g("div", { className: f.content, children: [
356
356
  /* @__PURE__ */ t("div", { className: `${f.icon} ${_ && f.invalid}`, children: h }),
@@ -364,7 +364,7 @@ const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_1966
364
364
  "aria-haspopup": !0,
365
365
  "aria-label": "Step options",
366
366
  children: /* @__PURE__ */ t(
367
- G,
367
+ q,
368
368
  {
369
369
  className: f.dots,
370
370
  color: _ ? "#E32012" : "#3B64A0"
@@ -375,11 +375,11 @@ const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_1966
375
375
  /* @__PURE__ */ t(
376
376
  te,
377
377
  {
378
- model: c,
378
+ model: a,
379
379
  popup: !0,
380
- ref: B,
380
+ ref: O,
381
381
  onClick: (m) => m.stopPropagation(),
382
- onHide: () => x(B)
382
+ onHide: () => y(O)
383
383
  }
384
384
  )
385
385
  ] }),
@@ -390,16 +390,16 @@ const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_1966
390
390
  role: "button",
391
391
  tabIndex: 0,
392
392
  onClick: () => {
393
- y && y(v);
393
+ x && x(v);
394
394
  },
395
395
  onKeyDown: (m) => {
396
- (m.key === "Enter" || m.key === " ") && y && (m.preventDefault(), y(v));
396
+ (m.key === "Enter" || m.key === " ") && x && (m.preventDefault(), x(v));
397
397
  },
398
398
  children: [
399
399
  /* @__PURE__ */ t(K, { color: "#3B64A0" }),
400
400
  /* @__PURE__ */ t("span", { children: "Filter" }),
401
401
  /* @__PURE__ */ t(
402
- G,
402
+ q,
403
403
  {
404
404
  className: f.dots,
405
405
  color: _ ? "#E32012" : "#3B64A0",
@@ -418,16 +418,16 @@ const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_1966
418
418
  ] }),
419
419
  /* @__PURE__ */ t("rect", { x: "0.75", y: "0.75", width: "22.5", height: "22.5", rx: "11.25", stroke: "#14BC2B", strokeWidth: "1.5" }),
420
420
  /* @__PURE__ */ t("defs", { children: /* @__PURE__ */ t("clipPath", { id: "clip0_6551_9169", children: /* @__PURE__ */ t("rect", { width: "24", height: "24", rx: "12", fill: "white" }) }) })
421
- ] }), Ve = "_multipleTriggersIcon_oxhdi_1", De = {
421
+ ] }), Ve = "_multipleTriggersIcon_oxhdi_1", We = {
422
422
  multipleTriggersIcon: Ve
423
- }, We = () => /* @__PURE__ */ t("div", { className: De.multipleTriggersIcon, children: /* @__PURE__ */ t("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.5 3.75C1.5 3.15326 1.73705 2.58097 2.15901 2.15901C2.58097 1.73705 3.15326 1.5 3.75 1.5H5.25C5.84674 1.5 6.41903 1.73705 6.84099 2.15901C7.26295 2.58097 7.5 3.15326 7.5 3.75L13.701 3.75C13.8661 3.46404 14.1209 3.24054 14.426 3.11418C14.7311 2.98782 15.0693 2.96565 15.3883 3.05111C15.7072 3.13657 15.9891 3.32489 16.1901 3.58686C16.3911 3.84882 16.5 4.1698 16.5 4.5C16.5 4.8302 16.3911 5.15118 16.1901 5.41314C15.9891 5.67511 15.7072 5.86343 15.3883 5.94889C15.0693 6.03435 14.7311 6.01218 14.426 5.88582C14.1209 5.75946 13.8661 5.53596 13.701 5.25H10.686C10.956 5.52 11.196 5.8215 11.412 6.1575C12.369 7.6455 12.75 9.6885 12.75 12C12.75 14.9895 13.1355 16.638 13.8195 17.55C14.3535 18.264 15.162 18.6315 16.5 18.726C16.5063 18.1334 16.7462 17.5673 17.1674 17.1505C17.5887 16.7337 18.1574 16.5 18.75 16.5H20.25C20.8467 16.5 21.419 16.7371 21.841 17.159C22.2629 17.581 22.5 18.1533 22.5 18.75V20.25C22.5 20.8467 22.2629 21.419 21.841 21.841C21.419 22.2629 20.8467 22.5 20.25 22.5H18.75C18.1533 22.5 17.581 22.2629 17.159 21.841C16.7371 21.419 16.5 20.8467 16.5 20.25H10.299C10.1339 20.536 9.87905 20.7595 9.57399 20.8858C9.26892 21.0122 8.93068 21.0344 8.61173 20.9489C8.29278 20.8634 8.01095 20.6751 7.80993 20.4131C7.60892 20.1512 7.49996 19.8302 7.49996 19.5C7.49996 19.1698 7.60892 18.8488 7.80993 18.5869C8.01095 18.3249 8.29278 18.1366 8.61173 18.0511C8.93068 17.9656 9.26892 17.9878 9.57399 18.1142C9.87905 18.2405 10.1339 18.464 10.299 18.75H12.8655C12.7785 18.6538 12.6959 18.5537 12.618 18.45C11.6145 17.1105 11.25 15.0105 11.25 12C11.25 9.81 10.881 8.1045 10.1505 6.9675C9.5655 6.06 8.7225 5.4675 7.5 5.2995C7.48706 5.88762 7.2443 6.44728 6.82374 6.85859C6.40318 7.2699 5.83826 7.50014 5.25 7.5H3.75C3.15326 7.5 2.58097 7.26295 2.15901 6.84099C1.73705 6.41903 1.5 5.84674 1.5 5.25V3.75ZM3.75 3C3.55109 3 3.36032 3.07902 3.21967 3.21967C3.07902 3.36032 3 3.55109 3 3.75V5.25C3 5.44891 3.07902 5.63968 3.21967 5.78033C3.36032 5.92098 3.55109 6 3.75 6H5.25C5.44891 6 5.63968 5.92098 5.78033 5.78033C5.92098 5.63968 6 5.44891 6 5.25V3.75C6 3.55109 5.92098 3.36032 5.78033 3.21967C5.63968 3.07902 5.44891 3 5.25 3H3.75ZM18.75 18C18.5511 18 18.3603 18.079 18.2197 18.2197C18.079 18.3603 18 18.5511 18 18.75V20.25C18 20.4489 18.079 20.6397 18.2197 20.7803C18.3603 20.921 18.5511 21 18.75 21H20.25C20.4489 21 20.6397 20.921 20.7803 20.7803C20.921 20.6397 21 20.4489 21 20.25V18.75C21 18.5511 20.921 18.3603 20.7803 18.2197C20.6397 18.079 20.4489 18 20.25 18H18.75Z", fill: "white" }) }) }), Ze = "_trigger_kfg1y_1", Ye = "_title_kfg1y_7", Xe = "_empty_kfg1y_15", Ge = "_triggerContainer_kfg1y_21", Ke = "_stepsContainer_kfg1y_25", Ue = "_stepItem_kfg1y_51", qe = "_curvesSvg_kfg1y_70", Je = "_centralNode_kfg1y_78", Qe = "_iconWrapper_kfg1y_104", et = "_fadeIn_kfg1y_127", tt = "_fadeOut_kfg1y_130", nt = "_operationContainer_kfg1y_134", w = {
423
+ }, De = () => /* @__PURE__ */ t("div", { className: We.multipleTriggersIcon, children: /* @__PURE__ */ t("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.5 3.75C1.5 3.15326 1.73705 2.58097 2.15901 2.15901C2.58097 1.73705 3.15326 1.5 3.75 1.5H5.25C5.84674 1.5 6.41903 1.73705 6.84099 2.15901C7.26295 2.58097 7.5 3.15326 7.5 3.75L13.701 3.75C13.8661 3.46404 14.1209 3.24054 14.426 3.11418C14.7311 2.98782 15.0693 2.96565 15.3883 3.05111C15.7072 3.13657 15.9891 3.32489 16.1901 3.58686C16.3911 3.84882 16.5 4.1698 16.5 4.5C16.5 4.8302 16.3911 5.15118 16.1901 5.41314C15.9891 5.67511 15.7072 5.86343 15.3883 5.94889C15.0693 6.03435 14.7311 6.01218 14.426 5.88582C14.1209 5.75946 13.8661 5.53596 13.701 5.25H10.686C10.956 5.52 11.196 5.8215 11.412 6.1575C12.369 7.6455 12.75 9.6885 12.75 12C12.75 14.9895 13.1355 16.638 13.8195 17.55C14.3535 18.264 15.162 18.6315 16.5 18.726C16.5063 18.1334 16.7462 17.5673 17.1674 17.1505C17.5887 16.7337 18.1574 16.5 18.75 16.5H20.25C20.8467 16.5 21.419 16.7371 21.841 17.159C22.2629 17.581 22.5 18.1533 22.5 18.75V20.25C22.5 20.8467 22.2629 21.419 21.841 21.841C21.419 22.2629 20.8467 22.5 20.25 22.5H18.75C18.1533 22.5 17.581 22.2629 17.159 21.841C16.7371 21.419 16.5 20.8467 16.5 20.25H10.299C10.1339 20.536 9.87905 20.7595 9.57399 20.8858C9.26892 21.0122 8.93068 21.0344 8.61173 20.9489C8.29278 20.8634 8.01095 20.6751 7.80993 20.4131C7.60892 20.1512 7.49996 19.8302 7.49996 19.5C7.49996 19.1698 7.60892 18.8488 7.80993 18.5869C8.01095 18.3249 8.29278 18.1366 8.61173 18.0511C8.93068 17.9656 9.26892 17.9878 9.57399 18.1142C9.87905 18.2405 10.1339 18.464 10.299 18.75H12.8655C12.7785 18.6538 12.6959 18.5537 12.618 18.45C11.6145 17.1105 11.25 15.0105 11.25 12C11.25 9.81 10.881 8.1045 10.1505 6.9675C9.5655 6.06 8.7225 5.4675 7.5 5.2995C7.48706 5.88762 7.2443 6.44728 6.82374 6.85859C6.40318 7.2699 5.83826 7.50014 5.25 7.5H3.75C3.15326 7.5 2.58097 7.26295 2.15901 6.84099C1.73705 6.41903 1.5 5.84674 1.5 5.25V3.75ZM3.75 3C3.55109 3 3.36032 3.07902 3.21967 3.21967C3.07902 3.36032 3 3.55109 3 3.75V5.25C3 5.44891 3.07902 5.63968 3.21967 5.78033C3.36032 5.92098 3.55109 6 3.75 6H5.25C5.44891 6 5.63968 5.92098 5.78033 5.78033C5.92098 5.63968 6 5.44891 6 5.25V3.75C6 3.55109 5.92098 3.36032 5.78033 3.21967C5.63968 3.07902 5.44891 3 5.25 3H3.75ZM18.75 18C18.5511 18 18.3603 18.079 18.2197 18.2197C18.079 18.3603 18 18.5511 18 18.75V20.25C18 20.4489 18.079 20.6397 18.2197 20.7803C18.3603 20.921 18.5511 21 18.75 21H20.25C20.4489 21 20.6397 20.921 20.7803 20.7803C20.921 20.6397 21 20.4489 21 20.25V18.75C21 18.5511 20.921 18.3603 20.7803 18.2197C20.6397 18.079 20.4489 18 20.25 18H18.75Z", fill: "white" }) }) }), Ze = "_trigger_kfg1y_1", Ye = "_title_kfg1y_7", Xe = "_empty_kfg1y_15", Ge = "_triggerContainer_kfg1y_21", qe = "_stepsContainer_kfg1y_25", Ke = "_stepItem_kfg1y_51", Ue = "_curvesSvg_kfg1y_70", Je = "_centralNode_kfg1y_78", Qe = "_iconWrapper_kfg1y_104", et = "_fadeIn_kfg1y_127", tt = "_fadeOut_kfg1y_130", nt = "_operationContainer_kfg1y_134", w = {
424
424
  trigger: Ze,
425
425
  title: Ye,
426
426
  empty: Xe,
427
427
  triggerContainer: Ge,
428
- stepsContainer: Ke,
429
- stepItem: Ue,
430
- curvesSvg: qe,
428
+ stepsContainer: qe,
429
+ stepItem: Ke,
430
+ curvesSvg: Ue,
431
431
  centralNode: Je,
432
432
  iconWrapper: Qe,
433
433
  fadeIn: et,
@@ -448,11 +448,11 @@ const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_1966
448
448
  title: i,
449
449
  className: n,
450
450
  onDeleteTrigger: r,
451
- onAddTrigger: a,
451
+ onAddTrigger: c,
452
452
  onSelectStep: p
453
453
  }) => {
454
- const d = T(null), l = T([]), [o, C] = E([]), [y, S] = E({ width: 0, height: 0 }), [_, v] = E(!1), [B, k] = E(!1), x = T(null);
455
- if (W(() => {
454
+ const d = H(null), l = H([]), [o, C] = B([]), [x, S] = B({ width: 0, height: 0 }), [_, v] = B(!1), [O, I] = B(!1), y = H(null);
455
+ if (Z(() => {
456
456
  const s = () => {
457
457
  if (!d.current) return;
458
458
  const u = [];
@@ -469,34 +469,34 @@ const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_1966
469
469
  }), C(u), d.current && u.length > 0) {
470
470
  const h = d.current.getBoundingClientRect(), m = Math.min(...u.map((L) => L.top)), M = l.current.filter(Boolean).map((L) => L?.offsetHeight || 68), N = Math.max(
471
471
  ...u.map((L, oe) => L.top + (M[oe] || 68))
472
- ), V = Math.max(...u.map((L) => L.right)) + 0, D = Math.max(
472
+ ), V = Math.max(...u.map((L) => L.right)) + 0, W = Math.max(
473
473
  h.height,
474
474
  N - m + 100
475
475
  );
476
476
  S({
477
477
  width: V,
478
- height: D
478
+ height: W
479
479
  });
480
480
  }
481
481
  };
482
482
  return s(), window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
483
- }, [e]), W(() => (_ ? (x.current && (clearTimeout(x.current), x.current = null), setTimeout(() => {
484
- k(!0);
485
- }, 0)) : x.current = setTimeout(() => {
486
- k(!1);
483
+ }, [e]), Z(() => (_ ? (y.current && (clearTimeout(y.current), y.current = null), setTimeout(() => {
484
+ I(!0);
485
+ }, 0)) : y.current = setTimeout(() => {
486
+ I(!1);
487
487
  }, 140), () => {
488
- x.current && clearTimeout(x.current);
488
+ y.current && clearTimeout(y.current);
489
489
  }), [_]), e.length === 0)
490
490
  return /* @__PURE__ */ g("div", { className: `${w.trigger} ${n || ""}`, children: [
491
491
  i && /* @__PURE__ */ t("h3", { className: w.title, children: i }),
492
492
  /* @__PURE__ */ t("div", { className: w.empty, children: "No steps" })
493
493
  ] });
494
494
  const P = o.length > 0 ? rt : 0;
495
- let I = 0;
496
- o.length > 1 ? I = o.reduce((s, u) => s + u.top + j, 0) / o.length : o.length === 1 && (I = o[0].top + j);
497
- const c = (s, u, h, m) => {
498
- const M = h - s, N = Math.min(M * 0.6, 60), Z = s + N, V = u, D = h - N;
499
- return `M ${s} ${u} C ${Z} ${V}, ${D} ${m}, ${h} ${m}`;
495
+ let b = 0;
496
+ o.length > 1 ? b = o.reduce((s, u) => s + u.top + j, 0) / o.length : o.length === 1 && (b = o[0].top + j);
497
+ const a = (s, u, h, m) => {
498
+ const M = h - s, N = Math.min(M * 0.6, 60), Y = s + N, V = u, W = h - N;
499
+ return `M ${s} ${u} C ${Y} ${V}, ${W} ${m}, ${h} ${m}`;
500
500
  };
501
501
  return /* @__PURE__ */ g("div", { className: `${w.trigger} ${n || ""}`, ref: d, children: [
502
502
  i && /* @__PURE__ */ t("h3", { className: w.title, children: i }),
@@ -535,9 +535,9 @@ const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_1966
535
535
  },
536
536
  {
537
537
  label: "Add More Triggers",
538
- icon: /* @__PURE__ */ t(Ee, { className: "mr-2", color: "#3B64A0", size: 18 }),
538
+ icon: /* @__PURE__ */ t(Be, { className: "mr-2", color: "#3B64A0", size: 18 }),
539
539
  command: () => {
540
- a?.();
540
+ c?.();
541
541
  }
542
542
  }
543
543
  ]
@@ -550,14 +550,14 @@ const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_1966
550
550
  "svg",
551
551
  {
552
552
  className: w.curvesSvg,
553
- width: y.width,
554
- height: y.height,
553
+ width: x.width,
554
+ height: x.height,
555
555
  children: o.map((s) => {
556
556
  const h = o.length === 1 ? o[0].top + j : s.top + j;
557
557
  return /* @__PURE__ */ t(
558
558
  "path",
559
559
  {
560
- d: c(0, h, P, I),
560
+ d: a(0, h, P, b),
561
561
  stroke: "#3b64a0",
562
562
  strokeWidth: "2",
563
563
  fill: "none",
@@ -575,15 +575,15 @@ const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_1966
575
575
  className: w.centralNode,
576
576
  style: {
577
577
  "--node-x": `${P}px`,
578
- "--node-y": `${I}px`
578
+ "--node-y": `${b}px`
579
579
  },
580
580
  onMouseEnter: () => v(!0),
581
581
  onMouseLeave: () => v(!1),
582
- children: B ? /* @__PURE__ */ t(
582
+ children: O ? /* @__PURE__ */ t(
583
583
  "div",
584
584
  {
585
585
  className: `${w.iconWrapper} ${_ ? w.fadeIn : w.fadeOut}`,
586
- onClick: a,
586
+ onClick: c,
587
587
  children: /* @__PURE__ */ t(Ae, {})
588
588
  }
589
589
  ) : null
@@ -595,9 +595,9 @@ const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_1966
595
595
  className: w.operationContainer,
596
596
  style: {
597
597
  "--op-x": `${P + 16}px`,
598
- "--op-y": `${I}px`
598
+ "--op-y": `${b}px`
599
599
  },
600
- children: /* @__PURE__ */ t(We, {})
600
+ children: /* @__PURE__ */ t(De, {})
601
601
  }
602
602
  )
603
603
  ] }) : null
@@ -632,7 +632,7 @@ const Oe = "_panel_19663_1", Be = "_panelExiting_19663_13", Se = "_menuItem_1966
632
632
  )
633
633
  ]
634
634
  }
635
- ), lt = "_stepLinkIcon_1enyn_1", ct = "_stepLinkLine_1enyn_17", at = "_stepLinkContainer_1enyn_39", R = {
635
+ ), lt = "_stepLinkIcon_a40q0_1", ct = "_stepLinkLine_a40q0_17", at = "_stepLinkContainer_a40q0_39", R = {
636
636
  stepLinkIcon: lt,
637
637
  stepLinkLine: ct,
638
638
  stepLinkContainer: at
@@ -643,12 +643,12 @@ function dt(e) {
643
643
  function ut(e) {
644
644
  return z({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polygon", attr: { points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2" }, child: [] }] })(e);
645
645
  }
646
- const U = ({
646
+ const D = ({
647
647
  onAddStep: e,
648
648
  onAddTrigger: i,
649
649
  index: n = 0
650
650
  }) => {
651
- const r = ne(), a = T(null), p = [
651
+ const r = ne(), c = H(null), p = [
652
652
  {
653
653
  label: "Trigger",
654
654
  icon: /* @__PURE__ */ t(ut, { className: "mr-2", color: "#3B64A0", size: 18 }),
@@ -666,7 +666,7 @@ const U = ({
666
666
  template: r
667
667
  }
668
668
  ], d = (l) => {
669
- a.current?.show(l);
669
+ c.current?.show(l);
670
670
  };
671
671
  return /* @__PURE__ */ g("div", { className: R.stepLinkContainer, children: [
672
672
  /* @__PURE__ */ t("div", { className: R.stepLinkLine }),
@@ -684,12 +684,12 @@ const U = ({
684
684
  {
685
685
  model: n === 0 ? p.splice(1) : p,
686
686
  popup: !0,
687
- ref: a
687
+ ref: c
688
688
  }
689
689
  ),
690
690
  /* @__PURE__ */ t("div", { className: R.stepLinkLine })
691
691
  ] });
692
- }, pt = "_steps_1y1ls_1", ht = "_stepContainer_1y1ls_9", q = {
692
+ }, pt = "_steps_1r4b1_1", ht = "_stepContainer_1r4b1_9", U = {
693
693
  steps: pt,
694
694
  stepContainer: ht
695
695
  }, mt = ({
@@ -697,10 +697,47 @@ const U = ({
697
697
  className: i,
698
698
  onDeleteStep: n,
699
699
  onUpdateFilter: r,
700
- onAddStep: a,
700
+ onAddStep: c,
701
701
  onAddTrigger: p,
702
702
  onSelectStep: d
703
- }) => /* @__PURE__ */ t("div", { className: q.steps + (i ? " " + i : ""), children: /* @__PURE__ */ g(
703
+ }) => e.length === 0 ? /* @__PURE__ */ g("div", { style: { width: "100%", marginTop: "23px", display: "flex", flexDirection: "row", flex: 1, minWidth: 0 }, children: [
704
+ /* @__PURE__ */ t(
705
+ "div",
706
+ {
707
+ style: {
708
+ flexGrow: 1,
709
+ flexShrink: 0,
710
+ flexBasis: "auto",
711
+ minWidth: 0,
712
+ height: "2px",
713
+ marginTop: "13.5px",
714
+ borderTop: "2px solid #3B64A0"
715
+ }
716
+ }
717
+ ),
718
+ /* @__PURE__ */ t(
719
+ D,
720
+ {
721
+ onAddStep: c,
722
+ onAddTrigger: p,
723
+ index: 0
724
+ }
725
+ ),
726
+ /* @__PURE__ */ t(
727
+ "div",
728
+ {
729
+ style: {
730
+ flexGrow: 1,
731
+ flexShrink: 0,
732
+ flexBasis: "auto",
733
+ minWidth: 0,
734
+ height: "2px",
735
+ marginTop: "13.5px",
736
+ borderTop: "2px solid #3B64A0"
737
+ }
738
+ }
739
+ )
740
+ ] }) : /* @__PURE__ */ t("div", { className: U.steps + (i ? " " + i : ""), children: /* @__PURE__ */ g(
704
741
  "div",
705
742
  {
706
743
  style: {
@@ -712,14 +749,14 @@ const U = ({
712
749
  },
713
750
  children: [
714
751
  /* @__PURE__ */ t(
715
- U,
752
+ D,
716
753
  {
717
- onAddStep: a,
754
+ onAddStep: c,
718
755
  onAddTrigger: p,
719
756
  index: 0
720
757
  }
721
758
  ),
722
- e.map((l, o) => /* @__PURE__ */ g("div", { className: q.stepContainer, children: [
759
+ e.map((l, o) => /* @__PURE__ */ g("div", { className: U.stepContainer, children: [
723
760
  /* @__PURE__ */ t(
724
761
  re,
725
762
  {
@@ -738,9 +775,9 @@ const U = ({
738
775
  }
739
776
  ),
740
777
  /* @__PURE__ */ t(
741
- U,
778
+ D,
742
779
  {
743
- onAddStep: a,
780
+ onAddStep: c,
744
781
  onAddTrigger: p,
745
782
  index: o + 1
746
783
  }
@@ -750,11 +787,13 @@ const U = ({
750
787
  "div",
751
788
  {
752
789
  style: {
753
- flex: 1,
790
+ flexGrow: 1,
791
+ flexShrink: 0,
792
+ flexBasis: "auto",
754
793
  minWidth: 0,
755
794
  height: "2px",
756
795
  borderTop: "2px solid #3B64A0",
757
- marginTop: "34px"
796
+ marginTop: "36.5px"
758
797
  }
759
798
  }
760
799
  )
@@ -762,12 +801,12 @@ const U = ({
762
801
  }
763
802
  ) }), gt = "_container_12c1g_1", Ct = {
764
803
  container: gt
765
- }, yt = ({
804
+ }, xt = ({
766
805
  process: e,
767
806
  onAddTrigger: i,
768
807
  addMultipleTriggers: n,
769
808
  onAddStep: r,
770
- onEditTrigger: a,
809
+ onEditTrigger: c,
771
810
  onDeleteTrigger: p,
772
811
  onDeleteStep: d,
773
812
  onUpdateFilter: l,
@@ -779,7 +818,7 @@ const U = ({
779
818
  steps: e.triggers,
780
819
  onAddTrigger: n,
781
820
  onDeleteTrigger: p,
782
- onEditTrigger: a,
821
+ onEditTrigger: c,
783
822
  onSelectStep: o
784
823
  }
785
824
  ),
@@ -800,7 +839,7 @@ const U = ({
800
839
  export {
801
840
  te as Menu,
802
841
  wt as MenuProvider,
803
- yt as ProcessDiagram,
842
+ xt as ProcessDiagram,
804
843
  re as ProcessStep,
805
844
  ot as Trigger,
806
845
  Re as useMenuProvider