@cratis/event-models 0.171.12 → 0.171.14
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/README.md +2 -0
- package/dist/event-models.css +1 -1
- package/dist/index.js +262 -260
- package/dist/index.js.map +1 -1
- package/dist/theme.css +10 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Guid as ce } from "@cratis/fundamentals";
|
|
2
|
-
import ji, { Fragment as qe, createContext as
|
|
2
|
+
import ji, { Fragment as qe, createContext as Ee, forwardRef as qi, memo as Nr, startTransition as Gi, useCallback as q, useContext as Ce, useEffect as re, useId as Lt, useImperativeHandle as st, useLayoutEffect as Dt, useMemo as le, useRef as A, useState as z } from "react";
|
|
3
3
|
import { Fragment as te, jsx as a, jsxs as x } from "react/jsx-runtime";
|
|
4
4
|
import { createPortal as et, flushSync as Ui } from "react-dom";
|
|
5
|
-
import { Canvas as Yi, CanvasItem as Ir, Note as Xi, canvasGesture as
|
|
5
|
+
import { Canvas as Yi, CanvasItem as Ir, Note as Xi, canvasGesture as Et } from "@cratis/components/Canvas";
|
|
6
6
|
import { SchemaEditor as Zi } from "@cratis/components/SchemaEditor";
|
|
7
7
|
import { Dialog as Ji, DialogInitialFocus as Ki } from "@cratis/components/Dialogs";
|
|
8
8
|
import { Toolbar as Qi, ToolbarButton as Rr, ToolbarSlot as eo } from "@cratis/components/Toolbar";
|
|
@@ -41,7 +41,7 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
41
41
|
constructor(e, t) {
|
|
42
42
|
super(`Invalid event model document at '${e}': ${t}`), this.path = e, this.name = "InvalidEventModelDocument";
|
|
43
43
|
}
|
|
44
|
-
}, Xu = (e, t) => Object.values(e).includes(t), ht = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Ne = (e) => e == null, co = class
|
|
44
|
+
}, Xu = (e, t) => Object.values(e).includes(t), ht = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Ne = (e) => e == null, co = class kt {
|
|
45
45
|
_value;
|
|
46
46
|
path;
|
|
47
47
|
constructor(t, n) {
|
|
@@ -49,7 +49,7 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
49
49
|
}
|
|
50
50
|
static root(t) {
|
|
51
51
|
if (!ht(t)) throw new Mt("$", "the document must be an object");
|
|
52
|
-
return new
|
|
52
|
+
return new kt(t, "$");
|
|
53
53
|
}
|
|
54
54
|
has(t) {
|
|
55
55
|
return !Ne(this._value[t]);
|
|
@@ -116,7 +116,7 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
116
116
|
const n = this._value[t];
|
|
117
117
|
if (!Ne(n)) {
|
|
118
118
|
if (!ht(n)) throw this.invalid(t, "expected an object");
|
|
119
|
-
return new
|
|
119
|
+
return new kt(n, `${this.path}.${t}`);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
array(t, n) {
|
|
@@ -126,7 +126,7 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
126
126
|
return r.map((o, i) => {
|
|
127
127
|
const s = `${this.path}.${t}[${i}]`;
|
|
128
128
|
if (!ht(o)) throw new Mt(s, "expected an object");
|
|
129
|
-
return n(new
|
|
129
|
+
return n(new kt(o, s));
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
invalid(t, n) {
|
|
@@ -262,11 +262,11 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
262
262
|
code: r
|
|
263
263
|
} : {}
|
|
264
264
|
};
|
|
265
|
-
},
|
|
265
|
+
}, ko = (e) => ({
|
|
266
266
|
id: e.guid("id"),
|
|
267
267
|
name: e.string("name"),
|
|
268
268
|
sources: e.has("sources") ? e.strings("sources") : []
|
|
269
|
-
}),
|
|
269
|
+
}), Eo = (e) => ({
|
|
270
270
|
id: e.guid("id"),
|
|
271
271
|
name: e.string("name"),
|
|
272
272
|
sources: e.has("sources") ? e.strings("sources") : [],
|
|
@@ -390,8 +390,8 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
390
390
|
specifications: e.array("specifications", Po),
|
|
391
391
|
commentCount: e.number("commentCount"),
|
|
392
392
|
...t ? { command: So(t) } : {},
|
|
393
|
-
...n ? { projection:
|
|
394
|
-
...r ? { capture:
|
|
393
|
+
...n ? { projection: ko(n) } : {},
|
|
394
|
+
...r ? { capture: Eo(r) } : {},
|
|
395
395
|
...o ? { readModel: Vn(o) } : {},
|
|
396
396
|
...i.length > 0 ? { additionalReadModels: i } : {},
|
|
397
397
|
...s ? { automationTrigger: s } : {},
|
|
@@ -635,7 +635,7 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
635
635
|
chat: "Chat Actor"
|
|
636
636
|
},
|
|
637
637
|
viewOptions: hn
|
|
638
|
-
}, Pr =
|
|
638
|
+
}, Pr = Ee(Wo), fe = () => Ce(Pr), Ju = ({ messages: e, children: t }) => /* @__PURE__ */ a(Pr.Provider, {
|
|
639
639
|
value: e,
|
|
640
640
|
children: t
|
|
641
641
|
}), zo = "full";
|
|
@@ -691,7 +691,7 @@ var Go = {
|
|
|
691
691
|
detailLevel: zo,
|
|
692
692
|
visualizationMode: "simplified",
|
|
693
693
|
detailsVisibility: jo
|
|
694
|
-
}, _r =
|
|
694
|
+
}, _r = Ee(Go), ke = () => Ce(_r), Fr = Ee(void 0), Uo = () => Ce(Fr), Yo = ({ presentation: e, onChange: t, children: n }) => /* @__PURE__ */ a(_r.Provider, {
|
|
695
695
|
value: e,
|
|
696
696
|
children: /* @__PURE__ */ a(Fr.Provider, {
|
|
697
697
|
value: t,
|
|
@@ -818,7 +818,7 @@ var ft = (e, t, n) => Math.max(8, Math.min(e, n - t - 8)), Xo = (e, t, n, r, o,
|
|
|
818
818
|
actions: {},
|
|
819
819
|
selection: {},
|
|
820
820
|
navigation: {}
|
|
821
|
-
}, rn =
|
|
821
|
+
}, rn = Ee(Qo), $r = ({ editing: e, actions: t, selection: n, navigation: r, children: o }) => {
|
|
822
822
|
const i = Ce(rn), s = le(() => ({
|
|
823
823
|
editing: {
|
|
824
824
|
...i.editing,
|
|
@@ -847,7 +847,7 @@ var ft = (e, t, n) => Math.max(8, Math.min(e, n - t - 8)), Xo = (e, t, n, r, o,
|
|
|
847
847
|
value: s,
|
|
848
848
|
children: o
|
|
849
849
|
});
|
|
850
|
-
}, bn =
|
|
850
|
+
}, bn = Ee(!1), ea = ({ readOnly: e = !1, editing: t, actions: n, selection: r, navigation: o, children: i }) => /* @__PURE__ */ a(bn.Provider, {
|
|
851
851
|
value: e,
|
|
852
852
|
children: /* @__PURE__ */ a($r, {
|
|
853
853
|
editing: t,
|
|
@@ -857,7 +857,7 @@ var ft = (e, t, n) => Math.max(8, Math.min(e, n - t - 8)), Xo = (e, t, n, r, o,
|
|
|
857
857
|
children: i
|
|
858
858
|
})
|
|
859
859
|
}), Q = () => {
|
|
860
|
-
const e = Ce(bn), t =
|
|
860
|
+
const e = Ce(bn), t = ke(), n = fe(), { editing: r, actions: o, selection: i, navigation: s } = Ce(rn);
|
|
861
861
|
return le(() => ({
|
|
862
862
|
readOnly: e,
|
|
863
863
|
presentation: t,
|
|
@@ -1222,16 +1222,16 @@ function Ma(e, t, n, r, o) {
|
|
|
1222
1222
|
}
|
|
1223
1223
|
};
|
|
1224
1224
|
}
|
|
1225
|
-
var
|
|
1225
|
+
var ka = ({ onCollectionMoved: e, ...t }) => e ? /* @__PURE__ */ a(Ia, {
|
|
1226
1226
|
...t,
|
|
1227
1227
|
onCollectionMoved: e
|
|
1228
|
-
}) : void 0,
|
|
1228
|
+
}) : void 0, Ea = 4, Na = 48, Ia = ({ collectionId: e, position: t, getZoom: n, topOffset: r = It.padding, onCollectionMoving: o, onCollectionMoved: i }) => {
|
|
1229
1229
|
const [s, l] = z(!1), d = Ma(e, t, n, o, i);
|
|
1230
1230
|
return /* @__PURE__ */ a("div", {
|
|
1231
1231
|
className: `collection-drag-handle ${s ? "collection-drag-handle--dragging" : ""}`,
|
|
1232
1232
|
style: {
|
|
1233
1233
|
top: `${r}px`,
|
|
1234
|
-
left: `${It.padding +
|
|
1234
|
+
left: `${It.padding + Ea}px`,
|
|
1235
1235
|
width: Na,
|
|
1236
1236
|
height: ee.headerHeight
|
|
1237
1237
|
},
|
|
@@ -1432,7 +1432,7 @@ function _a({ initialCollections: e, onAddCollection: t, onCollectionMoved: n, o
|
|
|
1432
1432
|
canAdd: !i && !!t
|
|
1433
1433
|
};
|
|
1434
1434
|
}
|
|
1435
|
-
var Xr =
|
|
1435
|
+
var Xr = Ee(!1), Fa = ({ renderAll: e = !1, children: t }) => /* @__PURE__ */ a(Xr.Provider, {
|
|
1436
1436
|
value: e,
|
|
1437
1437
|
children: t
|
|
1438
1438
|
}), $a = () => Ce(Xr), Ba = 12, Xn = 24, Ha = 100, Zr = 1, Wa = 1, za = 24, Va = 3, tt = /* @__PURE__ */ new Map(), sn = !1, Ve = Zr, Zn = 0, Ut = !1;
|
|
@@ -1443,7 +1443,7 @@ function qa() {
|
|
|
1443
1443
|
sn = !1;
|
|
1444
1444
|
const e = performance.now(), t = e - Zn, n = t < Ha;
|
|
1445
1445
|
Ut && n ? t > Xn ? Ve = Math.max(Wa, Math.ceil(Ve / 2)) : t < Ba && (Ve = Math.min(za, Ve + 1)) : n || (Ve = Zr), Ut = !1;
|
|
1446
|
-
const r =
|
|
1446
|
+
const r = Et.isActive;
|
|
1447
1447
|
if (!r || !n || t <= Xn) {
|
|
1448
1448
|
Zn = e;
|
|
1449
1449
|
const o = r ? Math.min(Ve, Va) : Ve;
|
|
@@ -1459,7 +1459,7 @@ function wn() {
|
|
|
1459
1459
|
}
|
|
1460
1460
|
var Jn = !1;
|
|
1461
1461
|
function Ga() {
|
|
1462
|
-
Jn || (Jn = !0,
|
|
1462
|
+
Jn || (Jn = !0, Et.subscribe((e) => {
|
|
1463
1463
|
!e && tt.size > 0 && wn();
|
|
1464
1464
|
}));
|
|
1465
1465
|
}
|
|
@@ -1829,7 +1829,7 @@ var Ya = Nr(Ua), Xa = ({ drag: e }) => e ? et(/* @__PURE__ */ a("div", {
|
|
|
1829
1829
|
whiteSpace: "nowrap",
|
|
1830
1830
|
fontSize: 11,
|
|
1831
1831
|
fontWeight: 600,
|
|
1832
|
-
color: "
|
|
1832
|
+
color: "color-mix(in srgb, var(--board-ink, #ffffff) 45%, transparent)",
|
|
1833
1833
|
textTransform: "uppercase",
|
|
1834
1834
|
letterSpacing: "0.05em",
|
|
1835
1835
|
textAlign: "center"
|
|
@@ -1842,9 +1842,9 @@ var Ya = Nr(Ua), Xa = ({ drag: e }) => e ? et(/* @__PURE__ */ a("div", {
|
|
|
1842
1842
|
flexShrink: 0,
|
|
1843
1843
|
display: "inline-block"
|
|
1844
1844
|
}), tr = ({ rowType: e, height: t, name: n, description: r, actorId: o, onRenamed: i, validateName: s, onActorAdded: l, onDragStart: d, dragging: c = !1, badge: u, personaAvatar: v, children: h }) => {
|
|
1845
|
-
const { readOnly: g, messages: m } = Q(), [p, f] = z(!1), [b, w] = z(!1), S = A(void 0), y = A(null),
|
|
1845
|
+
const { readOnly: g, messages: m } = Q(), [p, f] = z(!1), [b, w] = z(!1), S = A(void 0), y = A(null), E = A(null), T = A(null), N = le(() => [E], []), C = le(() => [T], []);
|
|
1846
1846
|
nt(N, () => f(!1), p), nt(C, () => w(!1), b);
|
|
1847
|
-
const G = n ?? Ja(e, m), J = Ka(e),
|
|
1847
|
+
const G = n ?? Ja(e, m), J = Ka(e), k = J && !g ? i : void 0, L = J && !g ? l : void 0, F = o && !g ? d : void 0, j = g ? [] : u?.actions ?? [], P = g ? void 0 : u?.onActivate, H = j.length > 0 || !!P, I = v ?? u?.avatar, _ = J && (!!I || !!u && !g), D = () => {
|
|
1848
1848
|
if (j.length > 0) {
|
|
1849
1849
|
w((V) => !V);
|
|
1850
1850
|
return;
|
|
@@ -1913,9 +1913,9 @@ var Ya = Nr(Ua), Xa = ({ drag: e }) => e ? et(/* @__PURE__ */ a("div", {
|
|
|
1913
1913
|
}),
|
|
1914
1914
|
/* @__PURE__ */ a("div", {
|
|
1915
1915
|
className: "event-modeling-grid-row-label-title",
|
|
1916
|
-
children:
|
|
1916
|
+
children: k ? /* @__PURE__ */ a(Bt, {
|
|
1917
1917
|
value: G,
|
|
1918
|
-
onChange:
|
|
1918
|
+
onChange: k,
|
|
1919
1919
|
validate: s,
|
|
1920
1920
|
style: Qa
|
|
1921
1921
|
}) : r?.trim() ? /* @__PURE__ */ a(he, {
|
|
@@ -1932,7 +1932,7 @@ var Ya = Nr(Ua), Xa = ({ drag: e }) => e ? et(/* @__PURE__ */ a("div", {
|
|
|
1932
1932
|
}),
|
|
1933
1933
|
L && /* @__PURE__ */ x("div", {
|
|
1934
1934
|
className: "event-modeling-grid-row-label-add-role",
|
|
1935
|
-
ref:
|
|
1935
|
+
ref: E,
|
|
1936
1936
|
children: [/* @__PURE__ */ a("button", {
|
|
1937
1937
|
className: "event-modeling-grid-row-label-add-role-btn",
|
|
1938
1938
|
onClick: (V) => {
|
|
@@ -2052,21 +2052,21 @@ var as = ({ collectionId: e, topOffset: t, contentRows: n, rowHeights: r, actors
|
|
|
2052
2052
|
} : void 0,
|
|
2053
2053
|
validateName: (N) => Object.entries(v).find(([C]) => C !== b)?.[1]?.toLowerCase() === N.toLowerCase() ? "Name already in use" : void 0,
|
|
2054
2054
|
onActorAdded: i ? (N) => i(b, N) : void 0
|
|
2055
|
-
},
|
|
2055
|
+
}, E = w === void 0 || S.length === 0 ? [/* @__PURE__ */ a(qe, { children: w !== void 0 && u ? u(b, y) : /* @__PURE__ */ a(tr, { ...y }) }, b)] : [], T = S.flatMap((N, C) => {
|
|
2056
2056
|
const G = p?.rowType === b, J = {
|
|
2057
2057
|
rowType: b,
|
|
2058
2058
|
height: r[b],
|
|
2059
2059
|
name: g[N.id] ?? N.name,
|
|
2060
2060
|
description: N.description,
|
|
2061
2061
|
actorId: N.id,
|
|
2062
|
-
onRenamed: s ? (
|
|
2062
|
+
onRenamed: s ? (k) => {
|
|
2063
2063
|
m((L) => ({
|
|
2064
2064
|
...L,
|
|
2065
|
-
[N.id]:
|
|
2066
|
-
})), s(N.id,
|
|
2065
|
+
[N.id]: k
|
|
2066
|
+
})), s(N.id, k);
|
|
2067
2067
|
} : void 0,
|
|
2068
|
-
onActorAdded: i ? (
|
|
2069
|
-
onDragStart: f ? (
|
|
2068
|
+
onActorAdded: i ? (k) => i(b, k) : void 0,
|
|
2069
|
+
onDragStart: f ? (k, L) => f(N.id, k, L) : void 0,
|
|
2070
2070
|
dragging: p?.actorId === N.id
|
|
2071
2071
|
};
|
|
2072
2072
|
return [
|
|
@@ -2075,7 +2075,7 @@ var as = ({ collectionId: e, topOffset: t, contentRows: n, rowHeights: r, actors
|
|
|
2075
2075
|
...G && C === S.length - 1 && p.dropIndex === S.length ? [/* @__PURE__ */ a(Qn, {}, `drop-${b}-end`)] : []
|
|
2076
2076
|
];
|
|
2077
2077
|
});
|
|
2078
|
-
return [...
|
|
2078
|
+
return [...E, ...T];
|
|
2079
2079
|
})]
|
|
2080
2080
|
});
|
|
2081
2081
|
}, ss = ({ moduleId: e, collectionId: t, marginLeft: n, dragging: r = !1, ref: o, children: i }) => /* @__PURE__ */ a("div", {
|
|
@@ -2317,7 +2317,7 @@ var ir = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2317
2317
|
strokeLinejoin: "round"
|
|
2318
2318
|
})] });
|
|
2319
2319
|
}
|
|
2320
|
-
}, ii =
|
|
2320
|
+
}, ii = Ee(void 0), ps = (e, t) => e === t ? void 0 : t, hs = (e, t) => e === t ? void 0 : e, gm = ({ children: e }) => {
|
|
2321
2321
|
const [t, n] = z();
|
|
2322
2322
|
return /* @__PURE__ */ a(ii.Provider, {
|
|
2323
2323
|
value: {
|
|
@@ -2345,7 +2345,7 @@ var ir = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2345
2345
|
className: "event-modeling-menu-dropdown-header",
|
|
2346
2346
|
children: S.label
|
|
2347
2347
|
}, S.id.toString());
|
|
2348
|
-
const y = S.items && S.items.length > 0,
|
|
2348
|
+
const y = S.items && S.items.length > 0, E = d === S.id.toString();
|
|
2349
2349
|
return /* @__PURE__ */ x("div", {
|
|
2350
2350
|
className: "event-modeling-menu-dropdown-item-wrapper",
|
|
2351
2351
|
children: [/* @__PURE__ */ x("button", {
|
|
@@ -2353,7 +2353,7 @@ var ir = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2353
2353
|
disabled: S.disabled,
|
|
2354
2354
|
title: S.tooltip,
|
|
2355
2355
|
onClick: () => {
|
|
2356
|
-
S.disabled || (y ? c(
|
|
2356
|
+
S.disabled || (y ? c(E ? void 0 : S.id.toString()) : (S.keepOpen || p(), S.onClick?.()));
|
|
2357
2357
|
},
|
|
2358
2358
|
children: [
|
|
2359
2359
|
S.icon && /* @__PURE__ */ a("span", {
|
|
@@ -2375,11 +2375,11 @@ var ir = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2375
2375
|
children: S.checked && /* @__PURE__ */ a("i", { className: "pi pi-check" })
|
|
2376
2376
|
}),
|
|
2377
2377
|
y && /* @__PURE__ */ a("span", {
|
|
2378
|
-
className: `event-modeling-menu-dropdown-option-arrow ${
|
|
2378
|
+
className: `event-modeling-menu-dropdown-option-arrow ${E ? "event-modeling-menu-dropdown-option-arrow--open" : ""}`,
|
|
2379
2379
|
children: /* @__PURE__ */ a("i", { className: "pi pi-chevron-right" })
|
|
2380
2380
|
})
|
|
2381
2381
|
]
|
|
2382
|
-
}), y &&
|
|
2382
|
+
}), y && E && /* @__PURE__ */ a("div", {
|
|
2383
2383
|
className: `event-modeling-menu-dropdown-submenu ${n === "right" ? "event-modeling-menu-dropdown-submenu--left" : ""}`,
|
|
2384
2384
|
children: b(S.items)
|
|
2385
2385
|
})]
|
|
@@ -2420,7 +2420,7 @@ var ir = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2420
2420
|
], bs = (e) => {
|
|
2421
2421
|
switch (e) {
|
|
2422
2422
|
case ae.notStarted:
|
|
2423
|
-
return "
|
|
2423
|
+
return "color-mix(in srgb, var(--board-ink, #ffffff) 35%, transparent)";
|
|
2424
2424
|
case ae.draft:
|
|
2425
2425
|
return "#9333ea";
|
|
2426
2426
|
case ae.analysis:
|
|
@@ -2493,13 +2493,15 @@ var ir = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2493
2493
|
cx: "6",
|
|
2494
2494
|
cy: "6",
|
|
2495
2495
|
r: "5",
|
|
2496
|
-
|
|
2496
|
+
style: {
|
|
2497
|
+
fill: n,
|
|
2498
|
+
stroke: n
|
|
2499
|
+
},
|
|
2497
2500
|
fillOpacity: "0.25",
|
|
2498
|
-
stroke: n,
|
|
2499
2501
|
strokeWidth: "1.5"
|
|
2500
2502
|
}), t && /* @__PURE__ */ a("polyline", {
|
|
2501
2503
|
points: "3,6 5,8 9,4",
|
|
2502
|
-
stroke: n,
|
|
2504
|
+
style: { stroke: n },
|
|
2503
2505
|
strokeWidth: "1.4",
|
|
2504
2506
|
strokeLinecap: "round",
|
|
2505
2507
|
strokeLinejoin: "round",
|
|
@@ -2627,13 +2629,13 @@ var ir = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2627
2629
|
children: "×"
|
|
2628
2630
|
})]
|
|
2629
2631
|
});
|
|
2630
|
-
}, oi = ({ suggestions: e }) => /* @__PURE__ */ a(te, { children: e.map((t) => /* @__PURE__ */ a(ws, { suggestion: t }, t.id)) }), Ss = "
|
|
2632
|
+
}, oi = ({ suggestions: e }) => /* @__PURE__ */ a(te, { children: e.map((t) => /* @__PURE__ */ a(ws, { suggestion: t }, t.id)) }), Ss = "color-mix(in srgb, var(--board-ink, #ffffff) 5%, transparent)", Cs = "1px solid color-mix(in srgb, var(--board-ink, #ffffff) 10%, transparent)", xs = {
|
|
2631
2633
|
fontSize: 13,
|
|
2632
2634
|
fontWeight: 600,
|
|
2633
|
-
color: "
|
|
2635
|
+
color: "color-mix(in srgb, var(--board-ink, #ffffff) 80%, transparent)",
|
|
2634
2636
|
textAlign: "center"
|
|
2635
2637
|
}, Ms = ({ moduleId: e, name: t, height: n, collapsed: r, onToggleCollapse: o, onAddModule: i, onAddFeature: s, onRenamed: l, validateName: d, status: c, detailsVisible: u = !1, onToggleDetails: v, onDragStart: h, error: g }) => {
|
|
2636
|
-
const m = Q(), { showStatuses: p = !0 } =
|
|
2638
|
+
const m = Q(), { showStatuses: p = !0 } = ke(), f = ri(!m.readOnly && !r ? h : void 0), b = m.readOnly ? void 0 : l, w = m.actions, S = Sc(e, s, m.editing);
|
|
2637
2639
|
return /* @__PURE__ */ x(Qr, {
|
|
2638
2640
|
variant: "module",
|
|
2639
2641
|
collapsed: r,
|
|
@@ -2644,7 +2646,7 @@ var ir = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2644
2646
|
title: y.label,
|
|
2645
2647
|
"aria-label": y.label,
|
|
2646
2648
|
disabled: y.disabled,
|
|
2647
|
-
onClick: (
|
|
2649
|
+
onClick: (E) => y.onActivate(e, E.currentTarget.getBoundingClientRect()),
|
|
2648
2650
|
children: [y.icon, y.indicator && /* @__PURE__ */ a("span", {
|
|
2649
2651
|
className: "event-modeling-feature-chat-dot",
|
|
2650
2652
|
"aria-hidden": "true"
|
|
@@ -2680,7 +2682,7 @@ var ir = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2680
2682
|
title: y.label,
|
|
2681
2683
|
"aria-label": y.label,
|
|
2682
2684
|
disabled: y.disabled,
|
|
2683
|
-
onClick: (
|
|
2685
|
+
onClick: (E) => y.onActivate(e, E.currentTarget.getBoundingClientRect()),
|
|
2684
2686
|
children: y.icon
|
|
2685
2687
|
}, y.id)),
|
|
2686
2688
|
!m.readOnly && /* @__PURE__ */ a(oi, { suggestions: w.moduleHeaderSuggestions ?? [] }),
|
|
@@ -2694,11 +2696,11 @@ var ir = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2694
2696
|
]
|
|
2695
2697
|
});
|
|
2696
2698
|
};
|
|
2697
|
-
function
|
|
2699
|
+
function ks(e, t) {
|
|
2698
2700
|
const n = e.map((r) => document.querySelector(`[data-module-id="${r.toString()}"]`)).filter((r) => r !== null).map((r) => r.getBoundingClientRect());
|
|
2699
2701
|
return ti(n, t);
|
|
2700
2702
|
}
|
|
2701
|
-
function
|
|
2703
|
+
function Es(e, t, n) {
|
|
2702
2704
|
const r = Q(), [o, i] = z(void 0), s = A(o);
|
|
2703
2705
|
s.current = o;
|
|
2704
2706
|
const l = A(t);
|
|
@@ -2729,7 +2731,7 @@ function ks(e, t, n) {
|
|
|
2729
2731
|
...p,
|
|
2730
2732
|
currentX: m.clientX,
|
|
2731
2733
|
currentY: m.clientY,
|
|
2732
|
-
dropIndex:
|
|
2734
|
+
dropIndex: ks(l.current, m.clientX)
|
|
2733
2735
|
});
|
|
2734
2736
|
}, g = () => {
|
|
2735
2737
|
const m = s.current;
|
|
@@ -2853,7 +2855,7 @@ function Ls({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
|
|
|
2853
2855
|
const { readOnly: c } = Q(), u = q((P) => {
|
|
2854
2856
|
if (s) s(P);
|
|
2855
2857
|
else throw P;
|
|
2856
|
-
}, [s]), v = A(Ns(t)), [h, g] = z(v.current), m = A(!1), [p, f] = z(!1), b = A(/* @__PURE__ */ new Set()), [w, S] = z(/* @__PURE__ */ new Set()), y = A(!1), [
|
|
2858
|
+
}, [s]), v = A(Ns(t)), [h, g] = z(v.current), m = A(!1), [p, f] = z(!1), b = A(/* @__PURE__ */ new Set()), [w, S] = z(/* @__PURE__ */ new Set()), y = A(!1), [E, T] = z(!1), N = (P, H) => {
|
|
2857
2859
|
H ? b.current.add(P) : b.current.delete(P), S(new Set(b.current));
|
|
2858
2860
|
}, C = q((P) => {
|
|
2859
2861
|
const H = P(v.current);
|
|
@@ -2897,7 +2899,7 @@ function Ls({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
|
|
|
2897
2899
|
o,
|
|
2898
2900
|
u,
|
|
2899
2901
|
C
|
|
2900
|
-
]),
|
|
2902
|
+
]), k = q(async (P, H) => {
|
|
2901
2903
|
const I = P.id.toString();
|
|
2902
2904
|
if (!(c || !i || b.current.has(I))) {
|
|
2903
2905
|
N(I, !0), C((_) => Rs(_, P.id, H));
|
|
@@ -2927,7 +2929,7 @@ function Ls({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
|
|
|
2927
2929
|
r,
|
|
2928
2930
|
u,
|
|
2929
2931
|
c
|
|
2930
|
-
]), { moduleDrag: F, handleModuleDragStart: j } =
|
|
2932
|
+
]), { moduleDrag: F, handleModuleDragStart: j } = Es(e, h.modules.map((P) => P.id), r && !E ? L : void 0);
|
|
2931
2933
|
return /* @__PURE__ */ x(te, { children: [
|
|
2932
2934
|
/* @__PURE__ */ a(ei, {
|
|
2933
2935
|
drag: F,
|
|
@@ -2946,7 +2948,7 @@ function Ls({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
|
|
|
2946
2948
|
J(P);
|
|
2947
2949
|
} : void 0,
|
|
2948
2950
|
onRenamed: !c && !w.has(P.id.toString()) && i ? (I) => {
|
|
2949
|
-
|
|
2951
|
+
k(P, I);
|
|
2950
2952
|
} : void 0
|
|
2951
2953
|
})]
|
|
2952
2954
|
}, P.id.toString())),
|
|
@@ -2990,7 +2992,7 @@ var _s = ({ width: e, collapsed: t, children: n }) => /* @__PURE__ */ a("div", {
|
|
|
2990
2992
|
featureId: r.id.toString()
|
|
2991
2993
|
})), ...r.subFeatures.flatMap((i) => t(n, i, o))]);
|
|
2992
2994
|
return e.modules.flatMap((n) => n.features.flatMap((r) => t(n.id.toString(), r, /* @__PURE__ */ new Set())));
|
|
2993
|
-
},
|
|
2995
|
+
}, kn = (e) => [
|
|
2994
2996
|
...e.actors.some((t) => t.actorType === ve.UIRole) ? [X.UI] : [],
|
|
2995
2997
|
...e.actors.some((t) => t.actorType === ve.systemRole) ? [X.System] : [],
|
|
2996
2998
|
...e.actors.some((t) => t.actorType === ve.chatRole) ? [X.Chat] : [],
|
|
@@ -2999,7 +3001,7 @@ var _s = ({ width: e, collapsed: t, children: n }) => /* @__PURE__ */ a("div", {
|
|
|
2999
3001
|
], li = (e, t) => ba(gt(e).map((n) => ({
|
|
3000
3002
|
slice: n.slice,
|
|
3001
3003
|
showDetails: t?.(n) ?? !1
|
|
3002
|
-
})),
|
|
3004
|
+
})), kn(e)), di = (e, t, n) => t.reduce((r, o) => {
|
|
3003
3005
|
const i = $t(o);
|
|
3004
3006
|
return r + (i === void 0 ? 1 : Math.max(1, e.actors.filter((s) => s.actorType === i).length)) * n[o];
|
|
3005
3007
|
}, 0), Ge = (e) => {
|
|
@@ -3013,42 +3015,42 @@ var _s = ({ width: e, collapsed: t, children: n }) => /* @__PURE__ */ a("div", {
|
|
|
3013
3015
|
const t = /* @__PURE__ */ new Set(), n = (r) => t.has(r.id.toString()) ? [] : (t.add(r.id.toString()), [r, ...r.subFeatures.flatMap(n)]);
|
|
3014
3016
|
return e.flatMap(n);
|
|
3015
3017
|
}, ui = (e, t) => Ds(ci(t).map(Ge).filter((n) => n > 0), e), mi = (e) => e.length === 0 ? 0 : 1 + Math.max(...e.map((t) => mi(t.subFeatures))), Bs = (e, t) => {
|
|
3016
|
-
const n =
|
|
3018
|
+
const n = kn(e), r = li(e, t), o = gt(e), i = e.modules.map((c) => c.collapsed ? ee.collapsedModuleWidth : ui(c.name, c.features)), s = i.reduce((c, u, v) => c + (v ? ee.sliceGap : 0) + u, 0), l = Math.max(1, ...e.modules.map((c) => mi(c.features))), d = n.reduce((c, u) => c + r[u], 0);
|
|
3017
3019
|
return {
|
|
3018
3020
|
width: (o.length ? 56 : 0) + s + 2 * an,
|
|
3019
3021
|
height: ee.headerHeight * (1 + l) + 28 + d + 2 * an,
|
|
3020
3022
|
moduleWidths: i
|
|
3021
3023
|
};
|
|
3022
3024
|
}, gi = () => {
|
|
3023
|
-
const { detailLevel: e, detailsVisibility: t } =
|
|
3025
|
+
const { detailLevel: e, detailsVisibility: t } = ke();
|
|
3024
3026
|
return q(({ slice: n, moduleId: r, featureId: o }) => Lr(e, Dr(t, r, o, n.id.toString())), [e, t]);
|
|
3025
3027
|
};
|
|
3026
|
-
function
|
|
3028
|
+
function En(e) {
|
|
3027
3029
|
if (e === "left") return "25%";
|
|
3028
3030
|
if (e === "right") return "75%";
|
|
3029
3031
|
}
|
|
3030
3032
|
var Rt = ({ columnPosition: e }) => {
|
|
3031
|
-
const { visualizationMode: t } =
|
|
3033
|
+
const { visualizationMode: t } = ke();
|
|
3032
3034
|
if (t === "fillLines") return null;
|
|
3033
|
-
const n = e ? { left:
|
|
3035
|
+
const n = e ? { left: En(e) } : void 0;
|
|
3034
3036
|
return /* @__PURE__ */ a("div", {
|
|
3035
3037
|
className: "event-modeling-grid-flow-triangle event-modeling-grid-flow-triangle--down",
|
|
3036
3038
|
style: n,
|
|
3037
3039
|
"aria-hidden": "true"
|
|
3038
3040
|
});
|
|
3039
3041
|
}, At = ({ columnPosition: e }) => {
|
|
3040
|
-
const { visualizationMode: t } =
|
|
3042
|
+
const { visualizationMode: t } = ke();
|
|
3041
3043
|
if (t === "fillLines") return null;
|
|
3042
|
-
const n = e ? { left:
|
|
3044
|
+
const n = e ? { left: En(e) } : void 0;
|
|
3043
3045
|
return /* @__PURE__ */ a("div", {
|
|
3044
3046
|
className: "event-modeling-grid-flow-triangle event-modeling-grid-flow-triangle--up",
|
|
3045
3047
|
style: n,
|
|
3046
3048
|
"aria-hidden": "true"
|
|
3047
3049
|
});
|
|
3048
3050
|
}, Hs = ({ columnPosition: e }) => {
|
|
3049
|
-
const { visualizationMode: t } =
|
|
3051
|
+
const { visualizationMode: t } = ke();
|
|
3050
3052
|
if (t === "fillLines") return null;
|
|
3051
|
-
const n = e ? { left:
|
|
3053
|
+
const n = e ? { left: En(e) } : void 0;
|
|
3052
3054
|
return /* @__PURE__ */ a("div", {
|
|
3053
3055
|
className: "event-modeling-grid-flow-triangle event-modeling-grid-flow-triangle--down",
|
|
3054
3056
|
style: n,
|
|
@@ -3195,7 +3197,7 @@ var qs = ({ sliceType: e, recomputeKey: t }) => {
|
|
|
3195
3197
|
for (let w = 0; w < f.length - 1; w++) for (const S of f[w]) for (const y of f[w + 1]) b.push(js(S, y));
|
|
3196
3198
|
o((w) => w.length === b.length && w.every((S, y) => S === b[y]) ? w : b);
|
|
3197
3199
|
}, [e]), l = A(0), d = A(!1), c = q(() => {
|
|
3198
|
-
if (
|
|
3200
|
+
if (Et.isActive) {
|
|
3199
3201
|
d.current = !0;
|
|
3200
3202
|
return;
|
|
3201
3203
|
}
|
|
@@ -3203,7 +3205,7 @@ var qs = ({ sliceType: e, recomputeKey: t }) => {
|
|
|
3203
3205
|
l.current = 0, s();
|
|
3204
3206
|
}));
|
|
3205
3207
|
}, [s]);
|
|
3206
|
-
return re(() => () => cancelAnimationFrame(l.current), []), re(() =>
|
|
3208
|
+
return re(() => () => cancelAnimationFrame(l.current), []), re(() => Et.subscribe((u) => {
|
|
3207
3209
|
u || !d.current || (d.current = !1, c());
|
|
3208
3210
|
}), [c]), Dt(() => {
|
|
3209
3211
|
s();
|
|
@@ -3254,7 +3256,7 @@ var qs = ({ sliceType: e, recomputeKey: t }) => {
|
|
|
3254
3256
|
}, v))]
|
|
3255
3257
|
})
|
|
3256
3258
|
});
|
|
3257
|
-
}, vi =
|
|
3259
|
+
}, vi = Ee(null), Gs = ({ connections: e, children: t }) => {
|
|
3258
3260
|
const n = le(() => ({ getConnection: (r) => e.get(r) }), [e]);
|
|
3259
3261
|
return /* @__PURE__ */ a(vi.Provider, {
|
|
3260
3262
|
value: n,
|
|
@@ -3319,8 +3321,8 @@ var Js = ({ featureId: e, moduleId: t, enabled: n, dragging: r = !1, children: o
|
|
|
3319
3321
|
children: u
|
|
3320
3322
|
})]
|
|
3321
3323
|
}), Qs = {
|
|
3322
|
-
before: "inset 6px 0 0
|
|
3323
|
-
after: "inset -6px 0 0
|
|
3324
|
+
before: "inset 6px 0 0 color-mix(in srgb, var(--board-accent, #b4a5ff) 95%, transparent), inset 0 0 14px 0 rgba(150,130,255,0.5)",
|
|
3325
|
+
after: "inset -6px 0 0 color-mix(in srgb, var(--board-accent, #b4a5ff) 95%, transparent), inset 0 0 14px 0 rgba(150,130,255,0.5)"
|
|
3324
3326
|
}, el = ({ width: e, collapsed: t, dropEdge: n, children: r, ref: o }) => /* @__PURE__ */ a("div", {
|
|
3325
3327
|
ref: o,
|
|
3326
3328
|
className: `event-modeling-grid-header-cell-wrapper${t ? " event-modeling-grid-header-cell-wrapper--feature-collapsed" : ""}`,
|
|
@@ -3500,9 +3502,9 @@ function bi(e, t) {
|
|
|
3500
3502
|
return t.add(e.id.toString()), e.subFeatures.flatMap((n) => t.has(n.id.toString()) ? [] : [n, ...bi(n, t)]);
|
|
3501
3503
|
}
|
|
3502
3504
|
function sl({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed: o, forceCollapsed: i = !1, onCollapseChanged: s, occupiesColumn: l, renderHeader: d, renderColumn: c, renderFeatureBoundary: u, onAddFeature: v, onRenameFeature: h, onFeaturesReordered: g, onFeaturesChanged: m }) {
|
|
3503
|
-
const { readOnly: p, messages: f } = Q(), { targets: b, register: w } = il(), S = A(ol(t)), [y,
|
|
3505
|
+
const { readOnly: p, messages: f } = Q(), { targets: b, register: w } = il(), S = A(ol(t)), [y, E] = z(S.current), T = A(!1), N = A(/* @__PURE__ */ new Set()), C = q((O) => {
|
|
3504
3506
|
const R = O(S.current);
|
|
3505
|
-
R !== S.current && (S.current = R,
|
|
3507
|
+
R !== S.current && (S.current = R, E(R), m?.(R.features));
|
|
3506
3508
|
}, [m]);
|
|
3507
3509
|
re(() => {
|
|
3508
3510
|
t !== S.current.snapshot && C((O) => cn(O, t));
|
|
@@ -3537,7 +3539,7 @@ function sl({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
3537
3539
|
features: Nn(K.features, O, R)
|
|
3538
3540
|
}))
|
|
3539
3541
|
}), [G, C]);
|
|
3540
|
-
const J = q((O) => C((R) => al(R, O)), [C]),
|
|
3542
|
+
const J = q((O) => C((R) => al(R, O)), [C]), k = q((O, R) => {
|
|
3541
3543
|
const K = O.toString();
|
|
3542
3544
|
!h || p || N.current.has(K) || (N.current.add(K), C((ue) => ({
|
|
3543
3545
|
...ue,
|
|
@@ -3596,7 +3598,7 @@ function sl({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
3596
3598
|
addSubFeature: !p && v ? (R) => {
|
|
3597
3599
|
G(R, O.id);
|
|
3598
3600
|
} : void 0,
|
|
3599
|
-
onRenamed: !p && h ? (R) =>
|
|
3601
|
+
onRenamed: !p && h ? (R) => k(O.id, R) : void 0,
|
|
3600
3602
|
onToggleCollapse: s ? () => F(O) : void 0,
|
|
3601
3603
|
onCollapseFailed: s ? () => j(O) : void 0
|
|
3602
3604
|
}), oe = (O) => {
|
|
@@ -3984,13 +3986,13 @@ var ll = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
3984
3986
|
items: i,
|
|
3985
3987
|
align: "right"
|
|
3986
3988
|
});
|
|
3987
|
-
}, pl = "
|
|
3988
|
-
const f = Q(), { showStatuses: b = !0 } =
|
|
3989
|
+
}, pl = "color-mix(in srgb, var(--board-feature, #a08ce6) 10%, transparent)", hl = "1px solid color-mix(in srgb, var(--board-feature, #a08ce6) 22%, transparent)", fl = ({ featureId: e, name: t, height: n, collapsed: r, onToggleCollapse: o, onRenamed: i, status: s, selectableStatuses: l, unselectableStatusReason: d, detailsVisible: c = !1, onToggleDetails: u, dragging: v = !1, onDragStart: h, error: g, onAddSubFeature: m, onAddSlice: p }) => {
|
|
3990
|
+
const f = Q(), { showStatuses: b = !0 } = ke(), w = ri(!f.readOnly && !r ? h : void 0), S = f.readOnly ? void 0 : i, y = (f.actions.featureHeader ?? []).filter((C) => !C.when || C.when(e)), E = (f.actions.featureHeaderLeading ?? []).filter((C) => !C.when || C.when(e)), T = f.actions.featureHeaderMenu ?? [], N = Cc(e, m, p, f.editing);
|
|
3989
3991
|
return /* @__PURE__ */ a(Qr, {
|
|
3990
3992
|
variant: "feature",
|
|
3991
3993
|
collapsed: r,
|
|
3992
3994
|
onToggle: o,
|
|
3993
|
-
leadingContent: !f.readOnly &&
|
|
3995
|
+
leadingContent: !f.readOnly && E.map((C) => /* @__PURE__ */ x("button", {
|
|
3994
3996
|
type: "button",
|
|
3995
3997
|
className: "event-modeling-grid-icon-btn",
|
|
3996
3998
|
title: C.disabled ? C.disabledTooltip ?? C.tooltip : C.tooltip,
|
|
@@ -4015,7 +4017,7 @@ var ll = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4015
4017
|
labelStyle: {
|
|
4016
4018
|
fontSize: 12,
|
|
4017
4019
|
fontWeight: 600,
|
|
4018
|
-
color: "
|
|
4020
|
+
color: "color-mix(in srgb, var(--board-accent, #b4a5ff) 85%, transparent)",
|
|
4019
4021
|
textAlign: "center",
|
|
4020
4022
|
opacity: v ? 0.65 : 1
|
|
4021
4023
|
},
|
|
@@ -4210,7 +4212,7 @@ var yl = ({ state: e, specification: t }) => {
|
|
|
4210
4212
|
style: {
|
|
4211
4213
|
fontSize: 11,
|
|
4212
4214
|
fontWeight: 500,
|
|
4213
|
-
color: "
|
|
4215
|
+
color: "color-mix(in srgb, var(--board-ink, #ffffff) 80%, transparent)",
|
|
4214
4216
|
textAlign: "center"
|
|
4215
4217
|
},
|
|
4216
4218
|
readOnly: !g
|
|
@@ -4248,7 +4250,7 @@ var yl = ({ state: e, specification: t }) => {
|
|
|
4248
4250
|
]
|
|
4249
4251
|
})]
|
|
4250
4252
|
});
|
|
4251
|
-
},
|
|
4253
|
+
}, kl = () => {
|
|
4252
4254
|
const e = /* @__PURE__ */ new Map();
|
|
4253
4255
|
return {
|
|
4254
4256
|
recall: (t) => e.get(t) ?? {},
|
|
@@ -4259,11 +4261,11 @@ var yl = ({ state: e, specification: t }) => {
|
|
|
4259
4261
|
});
|
|
4260
4262
|
}
|
|
4261
4263
|
};
|
|
4262
|
-
},
|
|
4264
|
+
}, El = {
|
|
4263
4265
|
recall: () => ({}),
|
|
4264
4266
|
remember: () => {
|
|
4265
4267
|
}
|
|
4266
|
-
}, Ht =
|
|
4268
|
+
}, Ht = Ee(El), lr = "when", Nl = 15e3, mn = (e) => e.given.length + (e.when ? 1 : 0) + e.thenEvents.length + e.thenErrors.length, Il = (e, t) => e || !(t.onGivenContextUsed || t.onGivenContextRemoved || t.onSpecificationAdded || t.onSpecificationRemoved || t.onSpecificationRenamed || t.onSpecificationOpenStateSet || t.onGivenEventAdded || t.onGivenEventValuesSet || t.onGivenReadModelSet || t.onWhenCommandSet || t.onWhenCommandValuesSet || t.onThenEventAdded || t.onThenEventValuesSet || t.onThenErrorAdded || t.onThenRuleErrorAdded || t.onThenErrorRenamed || t.onGivenEventRemoved || t.onGivenReadModelRemoved || t.onGivenReadModelValuesSet || t.onThenEventRemoved || t.onThenReadModelValuesSet || t.onThenErrorRemoved || t.onSpecificationItemOpened), Rl = (e, t, n, r, o) => {
|
|
4267
4269
|
if (n) return t;
|
|
4268
4270
|
const i = r ? Al(e, t, o) : e, s = new Map(t.map((d) => [d.id.toString(), d])), l = i.map((d) => {
|
|
4269
4271
|
const c = s.get(d.id.toString());
|
|
@@ -4280,13 +4282,13 @@ var yl = ({ state: e, specification: t }) => {
|
|
|
4280
4282
|
}), s = new Set(e.map((d) => d.id.toString())), l = r.filter((d) => !s.has(d.id.toString()));
|
|
4281
4283
|
return l.length || i.some((d, c) => d !== e[c]) ? [...i, ...l] : e;
|
|
4282
4284
|
}, Ol = 1, Tl = ({ sliceId: e, width: t, collapsed: n, specifications: r, runInfoFor: o, executionLabel: i, renderRows: s }) => {
|
|
4283
|
-
const { editing: l, actions: d, messages: c } = Q(), u = be(), [v, h] = z(r), [g, m] = z(!1), [p, f] = z(!1), [b, w] = z(!1), S = le(
|
|
4285
|
+
const { editing: l, actions: d, messages: c } = Q(), u = be(), [v, h] = z(r), [g, m] = z(!1), [p, f] = z(!1), [b, w] = z(!1), S = le(kl, []), y = A(0), E = A(!1), T = A(!1), N = A(!1), C = A(/* @__PURE__ */ new Set()), G = Il(u, l), J = G ? r : v;
|
|
4284
4286
|
re(() => {
|
|
4285
4287
|
h((M) => Rl(M, r, G, Date.now() <= y.current, C.current));
|
|
4286
4288
|
}, [r, G]);
|
|
4287
|
-
const
|
|
4288
|
-
if (
|
|
4289
|
-
|
|
4289
|
+
const k = async () => {
|
|
4290
|
+
if (E.current || !l.onSpecificationAdded) return;
|
|
4291
|
+
E.current = !0, w(!0);
|
|
4290
4292
|
const M = {
|
|
4291
4293
|
id: ce.create(),
|
|
4292
4294
|
name: `${c.specifications.namePlaceholder} ${Ol++}`,
|
|
@@ -4301,7 +4303,7 @@ var yl = ({ state: e, specification: t }) => {
|
|
|
4301
4303
|
} catch {
|
|
4302
4304
|
h((W) => W.filter((Z) => !Z.id.equals(M.id)));
|
|
4303
4305
|
} finally {
|
|
4304
|
-
|
|
4306
|
+
E.current = !1, w(!1);
|
|
4305
4307
|
}
|
|
4306
4308
|
}, L = (M) => {
|
|
4307
4309
|
C.current.has(M.toString()) || (C.current.add(M.toString()), y.current = 0, h((W) => W.filter((Z) => !Z.id.equals(M))), l.onSpecificationRemoved?.(e, M));
|
|
@@ -4378,7 +4380,7 @@ var yl = ({ state: e, specification: t }) => {
|
|
|
4378
4380
|
children: /* @__PURE__ */ a("button", {
|
|
4379
4381
|
type: "button",
|
|
4380
4382
|
onClick: () => {
|
|
4381
|
-
|
|
4383
|
+
k();
|
|
4382
4384
|
},
|
|
4383
4385
|
disabled: b,
|
|
4384
4386
|
className: "event-modeling-grid-add-button--small",
|
|
@@ -4493,7 +4495,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
4493
4495
|
}, [s]), y = r ? {
|
|
4494
4496
|
outline: `2px solid ${t}`,
|
|
4495
4497
|
outlineOffset: 2
|
|
4496
|
-
} : {},
|
|
4498
|
+
} : {}, E = /* @__PURE__ */ x(te, { children: [/* @__PURE__ */ x("div", {
|
|
4497
4499
|
className: "event-modeling-card__face",
|
|
4498
4500
|
style: {
|
|
4499
4501
|
background: t,
|
|
@@ -4520,13 +4522,13 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
4520
4522
|
"data-event-id": v,
|
|
4521
4523
|
"data-card-id": h,
|
|
4522
4524
|
"data-slice-id": g,
|
|
4523
|
-
children:
|
|
4525
|
+
children: E
|
|
4524
4526
|
}) : /* @__PURE__ */ a("div", {
|
|
4525
4527
|
className: "event-modeling-card",
|
|
4526
4528
|
"data-event-id": v,
|
|
4527
4529
|
"data-card-id": h,
|
|
4528
4530
|
"data-slice-id": g,
|
|
4529
|
-
children:
|
|
4531
|
+
children: E
|
|
4530
4532
|
});
|
|
4531
4533
|
}, we = {
|
|
4532
4534
|
background: "#ff9933",
|
|
@@ -4779,7 +4781,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
4779
4781
|
children: o.properties.none
|
|
4780
4782
|
})]
|
|
4781
4783
|
});
|
|
4782
|
-
}, xi =
|
|
4784
|
+
}, xi = Ee(void 0), We = () => {
|
|
4783
4785
|
const { readOnly: e } = Q();
|
|
4784
4786
|
return Ce(xi) ?? { readOnly: e };
|
|
4785
4787
|
}, be = () => We().readOnly, Zl = (e, t, n, r) => {
|
|
@@ -4885,12 +4887,12 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
4885
4887
|
return e === se.event && f.length === 0 ? w : /* @__PURE__ */ x("div", {
|
|
4886
4888
|
className: ld[e],
|
|
4887
4889
|
"data-artifact-kind": e,
|
|
4888
|
-
children: [w, ed.flatMap((S) => b(S).map((y,
|
|
4890
|
+
children: [w, ed.flatMap((S) => b(S).map((y, E) => /* @__PURE__ */ a(ad, {
|
|
4889
4891
|
action: y,
|
|
4890
4892
|
corner: S,
|
|
4891
|
-
slot:
|
|
4893
|
+
slot: E,
|
|
4892
4894
|
onActivate: () => t && y.onActivate(t, p())
|
|
4893
|
-
}, `${S}-${
|
|
4895
|
+
}, `${S}-${E}`)))]
|
|
4894
4896
|
});
|
|
4895
4897
|
}, Wt = ({ value: e, backgroundColor: t, textColor: n, nameError: r, onChange: o, onCommit: i, onCancel: s }) => /* @__PURE__ */ a("div", {
|
|
4896
4898
|
style: {
|
|
@@ -5011,7 +5013,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5011
5013
|
children: "+"
|
|
5012
5014
|
})
|
|
5013
5015
|
})
|
|
5014
|
-
}),
|
|
5016
|
+
}), ki = (e) => Object.fromEntries(e.map((t) => [t.id.toString(), t.values])), ud = { borderLeft: `3px solid ${je.background}` }, md = { borderLeft: `3px solid ${Oe.background}` }, Ln = ({ options: e, nameOf: t, onChosen: n, errors: r = [], groups: o = [] }) => {
|
|
5015
5017
|
const i = fe().specifications, s = o.filter((l) => l.options.length > 0);
|
|
5016
5018
|
return /* @__PURE__ */ a(zt, {
|
|
5017
5019
|
options: e,
|
|
@@ -5057,7 +5059,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5057
5059
|
})
|
|
5058
5060
|
})
|
|
5059
5061
|
});
|
|
5060
|
-
}, gd = (e) => e == null ? "" : typeof e == "string" ? e : typeof e == "object" ? JSON.stringify(e) : String(e), vd = (e, t) => `${t.eventSource ?? _t.eventSource}: ${e}`,
|
|
5062
|
+
}, gd = (e) => e == null ? "" : typeof e == "string" ? e : typeof e == "object" ? JSON.stringify(e) : String(e), vd = (e, t) => `${t.eventSource ?? _t.eventSource}: ${e}`, Ei = (e, t) => {
|
|
5061
5063
|
const n = [
|
|
5062
5064
|
e.authenticated === void 0 ? void 0 : e.authenticated ? t.authenticated : t.anonymous,
|
|
5063
5065
|
e.roles && e.roles.length > 0 ? `${t.roles}: ${e.roles.join(", ")}` : void 0,
|
|
@@ -5065,7 +5067,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5065
5067
|
].filter((r) => r !== void 0);
|
|
5066
5068
|
return n.length === 0 ? void 0 : `${t.caller}: ${n.join(" · ")}`;
|
|
5067
5069
|
}, Ni = ({ title: e, values: t, caller: n, message: r }) => {
|
|
5068
|
-
const { messages: o } = Q(), i = o.specifications.values ?? _t, s = Object.entries(t ?? {}), l = n ?
|
|
5070
|
+
const { messages: o } = Q(), i = o.specifications.values ?? _t, s = Object.entries(t ?? {}), l = n ? Ei(n, i) : void 0;
|
|
5069
5071
|
return /* @__PURE__ */ x("div", {
|
|
5070
5072
|
className: "event-modeling-spec-details",
|
|
5071
5073
|
children: [
|
|
@@ -5090,7 +5092,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5090
5092
|
})
|
|
5091
5093
|
]
|
|
5092
5094
|
});
|
|
5093
|
-
}, pd = (e, t, n) => Object.keys(e ?? {}).length > 0 || !!n || !!t &&
|
|
5095
|
+
}, pd = (e, t, n) => Object.keys(e ?? {}).length > 0 || !!n || !!t && Ei(t, _t) !== void 0, Re = ({ name: e, colors: t, onOpen: n, values: r, caller: o, message: i }) => {
|
|
5094
5096
|
const s = be(), l = A(null), d = !s && !!n, c = /* @__PURE__ */ a("div", {
|
|
5095
5097
|
ref: l,
|
|
5096
5098
|
children: /* @__PURE__ */ a(lt, {
|
|
@@ -5199,7 +5201,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5199
5201
|
c.current = !0, d(!0);
|
|
5200
5202
|
try {
|
|
5201
5203
|
if (!await y(e, n.id, w.givenContextId)) return;
|
|
5202
|
-
v((
|
|
5204
|
+
v((E) => wd(E, w, S));
|
|
5203
5205
|
} finally {
|
|
5204
5206
|
c.current = !1, d(!1);
|
|
5205
5207
|
}
|
|
@@ -5256,12 +5258,12 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5256
5258
|
})]
|
|
5257
5259
|
}, d.givenContextId.toString()))
|
|
5258
5260
|
});
|
|
5259
|
-
},
|
|
5260
|
-
const { editing: c, messages: u } = Q(), v = be(), { onGivenEventAdded: h, onGivenEventValuesSet: g, onGivenReadModelSet: m, onGivenReadModelValuesSet: p, onGivenEventRemoved: f, onGivenReadModelRemoved: b, onSpecificationItemOpened: w } = c, [S, y] = z(n.given), [
|
|
5261
|
-
...
|
|
5261
|
+
}, kd = ({ sliceId: e, sliceType: t, specification: n, events: r, readModel: o, additionalReadModels: i = [], renamedReadModelName: s, contexts: l, contextLabels: d }) => {
|
|
5262
|
+
const { editing: c, messages: u } = Q(), v = be(), { onGivenEventAdded: h, onGivenEventValuesSet: g, onGivenReadModelSet: m, onGivenReadModelValuesSet: p, onGivenEventRemoved: f, onGivenReadModelRemoved: b, onSpecificationItemOpened: w } = c, [S, y] = z(n.given), [E, T] = z(n.givenReadModel), N = Ce(Ht), [C, G] = z(() => ({
|
|
5263
|
+
...ki(n.given),
|
|
5262
5264
|
...n.givenReadModel ? { [n.givenReadModel.id.toString()]: n.givenReadModel.values ?? {} } : {},
|
|
5263
5265
|
...N.recall(n.id.toString())
|
|
5264
|
-
})), J = v || !(h || g || m || p || f || b || w),
|
|
5266
|
+
})), J = v || !(h || g || m || p || f || b || w), k = J ? n.given : S, L = J ? n.givenReadModel : E, F = Cd({
|
|
5265
5267
|
sliceId: e,
|
|
5266
5268
|
sliceType: t,
|
|
5267
5269
|
specification: {
|
|
@@ -5312,7 +5314,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5312
5314
|
values: J ? L.values : C[ue.toString()] ?? L.values,
|
|
5313
5315
|
onOpen: !v && w && m && P ? (Y) => D(ue, Ke.readModel, K, Y, P.schema, W(P)) : void 0
|
|
5314
5316
|
})
|
|
5315
|
-
}, ue.toString()), Pe =
|
|
5317
|
+
}, ue.toString()), Pe = k.map((Y) => {
|
|
5316
5318
|
const ge = _.get(Y.eventId.toString())?.name ?? Y.name;
|
|
5317
5319
|
return /* @__PURE__ */ a(Tt, {
|
|
5318
5320
|
name: ge,
|
|
@@ -5385,7 +5387,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5385
5387
|
Pe
|
|
5386
5388
|
]
|
|
5387
5389
|
});
|
|
5388
|
-
},
|
|
5390
|
+
}, Ed = ({ sliceId: e, sliceType: t, specification: n, command: r, renamedCommandName: o, events: i = [], inputEvents: s = [] }) => {
|
|
5389
5391
|
const { editing: l, messages: d } = Q(), c = be(), { onWhenCommandSet: u, onWhenCommandValuesSet: v, onSpecificationItemOpened: h } = l, [g, m] = z(n.when), p = Ce(Ht), [f, b] = z(() => p.recall(n.id.toString()).when ?? n.when?.values ?? {}), w = c || !(u || v || h), S = w ? n.when : g ?? n.when, y = (H) => {
|
|
5390
5392
|
const I = ce.create();
|
|
5391
5393
|
m({
|
|
@@ -5394,7 +5396,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5394
5396
|
name: H.name,
|
|
5395
5397
|
values: {}
|
|
5396
5398
|
}), b({}), p.remember(n.id.toString(), lr, {}), u?.(e, n.id, I, H.id, H.name);
|
|
5397
|
-
},
|
|
5399
|
+
}, E = (H, I, _, D, M) => h?.({
|
|
5398
5400
|
sliceId: e,
|
|
5399
5401
|
specificationId: n.id,
|
|
5400
5402
|
itemId: H,
|
|
@@ -5409,7 +5411,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5409
5411
|
values: W
|
|
5410
5412
|
}), p.remember(n.id.toString(), lr, W), v?.(e, n.id, W);
|
|
5411
5413
|
}
|
|
5412
|
-
}), T = t === B.stateChange ? r : void 0, N = t === B.stateView ? i : t === B.translator ? s : [], C = !!T && !!S && (S.commandId ? T.id.equals(S.commandId) : !S.name || S.name === T.name), G = S && (S.commandId && r?.id.equals(S.commandId) ? o ?? S.name : S.name), J = !c && !!h && !!v,
|
|
5414
|
+
}), T = t === B.stateChange ? r : void 0, N = t === B.stateView ? i : t === B.translator ? s : [], C = !!T && !!S && (S.commandId ? T.id.equals(S.commandId) : !S.name || S.name === T.name), G = S && (S.commandId && r?.id.equals(S.commandId) ? o ?? S.name : S.name), J = !c && !!h && !!v, k = C && S ? S.id : T?.id, L = C ? w ? S?.values : f : void 0, F = n.caller, j = w ? S?.values : f, P = n.whenEvent;
|
|
5413
5415
|
if (P) {
|
|
5414
5416
|
const H = i.find((_) => _.id.equals(P.eventId))?.name ?? P.name, I = d.specifications.values ?? _t;
|
|
5415
5417
|
return /* @__PURE__ */ a(Ot, {
|
|
@@ -5435,15 +5437,15 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5435
5437
|
colors: rt,
|
|
5436
5438
|
values: j,
|
|
5437
5439
|
caller: F,
|
|
5438
|
-
onOpen: J ? (H) =>
|
|
5440
|
+
onOpen: J ? (H) => E(S.id, S.commandId, G, H, f) : void 0
|
|
5439
5441
|
}, S.id.toString()),
|
|
5440
|
-
T &&
|
|
5442
|
+
T && k && /* @__PURE__ */ a(Re, {
|
|
5441
5443
|
name: T.name,
|
|
5442
5444
|
colors: rt,
|
|
5443
5445
|
values: L,
|
|
5444
5446
|
caller: F,
|
|
5445
|
-
onOpen: J ? (H) => k
|
|
5446
|
-
},
|
|
5447
|
+
onOpen: J ? (H) => E(k, T.id, T.name, H, f) : void 0
|
|
5448
|
+
}, k.toString()),
|
|
5447
5449
|
N.map((H) => /* @__PURE__ */ a(Re, {
|
|
5448
5450
|
name: H.name,
|
|
5449
5451
|
colors: t === B.translator ? gn : we,
|
|
@@ -5534,10 +5536,10 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5534
5536
|
disabled: n
|
|
5535
5537
|
});
|
|
5536
5538
|
}, Td = ({ sliceId: e, sliceType: t, specification: n, events: r, command: o, readModel: i, renamedEventNames: s = {}, extra: l, extraGroups: d }) => {
|
|
5537
|
-
const { editing: c, messages: u } = Q(), v = be(), { onThenEventAdded: h, onThenEventValuesSet: g, onThenErrorAdded: m, onThenRuleErrorAdded: p, onThenErrorRenamed: f, onThenEventRemoved: b, onThenErrorRemoved: w, onThenReadModelValuesSet: S, onSpecificationItemOpened: y } = c, [
|
|
5538
|
-
...
|
|
5539
|
+
const { editing: c, messages: u } = Q(), v = be(), { onThenEventAdded: h, onThenEventValuesSet: g, onThenErrorAdded: m, onThenRuleErrorAdded: p, onThenErrorRenamed: f, onThenEventRemoved: b, onThenErrorRemoved: w, onThenReadModelValuesSet: S, onSpecificationItemOpened: y } = c, [E, T] = z(n.thenEvents), [N, C] = z(n.thenErrors), G = Ce(Ht), J = G.recall(n.id.toString()), [k, L] = z(() => ({
|
|
5540
|
+
...ki(n.thenEvents),
|
|
5539
5541
|
...J
|
|
5540
|
-
})), F = n.thenReadModel, j = !!F && !!i && i.id.equals(F.readModelItemId), [P, H] = z(() => J[i?.id.toString() ?? ""] ?? (j ? F?.values : void 0) ?? {}), I = v || !(h || g || m || p || f || b || w || S || y), _ = I ? n.thenEvents :
|
|
5542
|
+
})), F = n.thenReadModel, j = !!F && !!i && i.id.equals(F.readModelItemId), [P, H] = z(() => J[i?.id.toString() ?? ""] ?? (j ? F?.values : void 0) ?? {}), I = v || !(h || g || m || p || f || b || w || S || y), _ = I ? n.thenEvents : E, D = I ? n.thenErrors : N, M = le(() => new Map(r.map(($) => [$.id.toString(), $])), [r]), W = le(() => Rd(o, r), [o, r]), Z = Nd(t), V = ($) => {
|
|
5541
5543
|
const ie = ce.create();
|
|
5542
5544
|
T((me) => [...me, {
|
|
5543
5545
|
id: ie,
|
|
@@ -5575,7 +5577,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5575
5577
|
children: /* @__PURE__ */ a(Re, {
|
|
5576
5578
|
name: me,
|
|
5577
5579
|
colors: we,
|
|
5578
|
-
values: I ? $.values :
|
|
5580
|
+
values: I ? $.values : k[$.id.toString()] ?? $.values,
|
|
5579
5581
|
onOpen: !v && y && g ? (ye) => y({
|
|
5580
5582
|
sliceId: e,
|
|
5581
5583
|
specificationId: n.id,
|
|
@@ -5583,7 +5585,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5583
5585
|
kind: Ke.event,
|
|
5584
5586
|
name: me,
|
|
5585
5587
|
schema: ie?.schema,
|
|
5586
|
-
values:
|
|
5588
|
+
values: k[$.id.toString()] ?? {},
|
|
5587
5589
|
host: ye,
|
|
5588
5590
|
onValuesSet: (De) => {
|
|
5589
5591
|
L((Vi) => ({
|
|
@@ -5665,7 +5667,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5665
5667
|
]
|
|
5666
5668
|
});
|
|
5667
5669
|
}, Pd = ({ slice: e, collapsed: t, showDetails: n }) => {
|
|
5668
|
-
const { visualizationMode: r } =
|
|
5670
|
+
const { visualizationMode: r } = ke();
|
|
5669
5671
|
if (r !== "fillLines" || t) return null;
|
|
5670
5672
|
const o = [
|
|
5671
5673
|
e.id.toString(),
|
|
@@ -5682,7 +5684,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5682
5684
|
recomputeKey: o
|
|
5683
5685
|
});
|
|
5684
5686
|
}, Ld = ({ slice: e, collapsed: t, moduleId: n, featureId: r, collection: o, rows: i, heights: s, priorEvents: l, followingEvents: d = [], externalEvents: c, slots: u, controls: v }) => {
|
|
5685
|
-
const { detailLevel: h, detailsVisibility: g } =
|
|
5687
|
+
const { detailLevel: h, detailsVisibility: g } = ke(), m = Lr(h, Dr(g, n.toString(), r.toString(), e.id.toString())), p = /* @__PURE__ */ a(Hc, {
|
|
5686
5688
|
featureId: r,
|
|
5687
5689
|
slice: e,
|
|
5688
5690
|
eventCount: e.events.length,
|
|
@@ -5732,7 +5734,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5732
5734
|
}
|
|
5733
5735
|
switch (b.rowType) {
|
|
5734
5736
|
case X.UI: {
|
|
5735
|
-
const y = e.actors.find((
|
|
5737
|
+
const y = e.actors.find((E) => E.id === b.actor?.id);
|
|
5736
5738
|
return /* @__PURE__ */ a(vu, {
|
|
5737
5739
|
...w,
|
|
5738
5740
|
actorId: b.actor?.id ?? "",
|
|
@@ -5786,7 +5788,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5786
5788
|
message: w.lastRunMessage ?? ""
|
|
5787
5789
|
}),
|
|
5788
5790
|
renderRows: (w) => /* @__PURE__ */ x(te, { children: [
|
|
5789
|
-
/* @__PURE__ */ a(
|
|
5791
|
+
/* @__PURE__ */ a(kd, {
|
|
5790
5792
|
sliceId: e.id,
|
|
5791
5793
|
sliceType: e.sliceType,
|
|
5792
5794
|
specification: w,
|
|
@@ -5795,7 +5797,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5795
5797
|
additionalReadModels: e.additionalReadModels,
|
|
5796
5798
|
renamedReadModelName: e.readModel?.name
|
|
5797
5799
|
}),
|
|
5798
|
-
/* @__PURE__ */ a(
|
|
5800
|
+
/* @__PURE__ */ a(Ed, {
|
|
5799
5801
|
sliceId: e.id,
|
|
5800
5802
|
sliceType: e.sliceType,
|
|
5801
5803
|
specification: w,
|
|
@@ -5831,11 +5833,11 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5831
5833
|
})]
|
|
5832
5834
|
})
|
|
5833
5835
|
}), Dd = ({ feature: e, options: t, moduleId: n, collection: r, rows: o, heights: i, slices: s, externalEvents: l, slots: d, editor: c, onSliceArea: u, sliceAreas: v, renderHeader: h, onSlicesChanged: g }) => {
|
|
5834
|
-
const m = A(null), p = (y) => s.slice(0, s.findIndex((
|
|
5835
|
-
const N = v.get(
|
|
5836
|
+
const m = A(null), p = (y) => s.slice(0, s.findIndex((E) => E.id.equals(y))).filter((E) => E.sliceType === B.stateChange).flatMap((E) => E.events), f = (y) => s.slice(s.findIndex((E) => E.id.equals(y)) + 1).filter((E) => E.sliceType === B.stateChange).flatMap((E) => E.events), b = q(async (y, E, T) => {
|
|
5837
|
+
const N = v.get(E.toString());
|
|
5836
5838
|
N?.moveIn(y, T);
|
|
5837
5839
|
try {
|
|
5838
|
-
const C = await c.onMoveSlice?.(y, e.id,
|
|
5840
|
+
const C = await c.onMoveSlice?.(y, e.id, E, T) ?? !1;
|
|
5839
5841
|
return N?.completeMoveIn(y.id, C), C;
|
|
5840
5842
|
} catch {
|
|
5841
5843
|
return N?.completeMoveIn(y.id, !1), !1;
|
|
@@ -5844,8 +5846,8 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5844
5846
|
c.onMoveSlice,
|
|
5845
5847
|
e.id,
|
|
5846
5848
|
v
|
|
5847
|
-
]), w = q((y,
|
|
5848
|
-
!c.onMoveSlice ||
|
|
5849
|
+
]), w = q((y, E) => {
|
|
5850
|
+
!c.onMoveSlice || E.equals(e.id) || !m.current?.moveOut(y.id) || b(y, E, Number.MAX_SAFE_INTEGER).then((T) => m.current?.completeMoveOut(y.id, T));
|
|
5849
5851
|
}, [
|
|
5850
5852
|
c.onMoveSlice,
|
|
5851
5853
|
e.id,
|
|
@@ -5881,13 +5883,13 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5881
5883
|
hideEmptyPlaceholder: t.headerVisibility === "hidden",
|
|
5882
5884
|
createSlice: (y) => y,
|
|
5883
5885
|
onSlicesChanged: g,
|
|
5884
|
-
onAddSlice: c.onAddSlice ? (y,
|
|
5886
|
+
onAddSlice: c.onAddSlice ? (y, E) => c.onAddSlice?.(e.id, y, E) ?? Promise.resolve(void 0) : void 0,
|
|
5885
5887
|
onReorderSlices: c.onReorderSlices ? (y) => c.onReorderSlices?.(e.id, y) ?? Promise.resolve(!1) : void 0,
|
|
5886
5888
|
onMoveSlice: c.onMoveSlice ? b : void 0,
|
|
5887
5889
|
validateSliceDrop: c.validateSliceDrop,
|
|
5888
|
-
renderSlice: (y,
|
|
5890
|
+
renderSlice: (y, E) => /* @__PURE__ */ a(Ld, {
|
|
5889
5891
|
slice: y,
|
|
5890
|
-
collapsed:
|
|
5892
|
+
collapsed: E.collapsed,
|
|
5891
5893
|
moduleId: n,
|
|
5892
5894
|
featureId: e.id,
|
|
5893
5895
|
collection: r,
|
|
@@ -5898,16 +5900,16 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
5898
5900
|
externalEvents: l,
|
|
5899
5901
|
slots: d,
|
|
5900
5902
|
controls: {
|
|
5901
|
-
collapsed:
|
|
5902
|
-
sliceCollapsed:
|
|
5903
|
-
isDragging:
|
|
5904
|
-
onSliceDragStart:
|
|
5905
|
-
onAddSlice: c.onAddSlice ?
|
|
5903
|
+
collapsed: E.collapsed,
|
|
5904
|
+
sliceCollapsed: E.sliceCollapsed,
|
|
5905
|
+
isDragging: E.isDragging,
|
|
5906
|
+
onSliceDragStart: E.onSliceDragStart,
|
|
5907
|
+
onAddSlice: c.onAddSlice ? E.addSlice : void 0,
|
|
5906
5908
|
onToggleCollapse: c.onSliceCollapseChanged ? () => {
|
|
5907
5909
|
m.current?.updateSlices((T) => T.map((N) => N.id.equals(y.id) ? {
|
|
5908
5910
|
...N,
|
|
5909
|
-
collapsed: !
|
|
5910
|
-
} : N)), c.onSliceCollapseChanged?.(e.id, y.id, !
|
|
5911
|
+
collapsed: !E.sliceCollapsed
|
|
5912
|
+
} : N)), c.onSliceCollapseChanged?.(e.id, y.id, !E.sliceCollapsed);
|
|
5911
5913
|
} : void 0,
|
|
5912
5914
|
onRenamed: c.onSliceRenamed ? (T) => {
|
|
5913
5915
|
m.current?.updateSlices((N) => N.map((C) => C.id.equals(y.id) ? {
|
|
@@ -6020,7 +6022,7 @@ var Bl = 250, Hl = "Inter, Helvetica, Arial, sans-serif", lt = ({ name: e, backg
|
|
|
6020
6022
|
collapsed: e.collapsed,
|
|
6021
6023
|
onAddModule: u,
|
|
6022
6024
|
onToggleCollapse: v,
|
|
6023
|
-
onRenamed: h ? (y,
|
|
6025
|
+
onRenamed: h ? (y, E) => h(E) : void 0,
|
|
6024
6026
|
onDragStart: c,
|
|
6025
6027
|
onAddFeature: f
|
|
6026
6028
|
}),
|
|
@@ -6061,8 +6063,8 @@ function Bd(e, t) {
|
|
|
6061
6063
|
features: n.features.map((r) => Oi(t, r))
|
|
6062
6064
|
}));
|
|
6063
6065
|
}
|
|
6064
|
-
var Hd = () => 1, Wd = ({ collection: e, getZoom: t = Hd, slots: n, onDeselect: r, onCollectionMoving: o, onCollectionMoved: i, canMove: s, onAddModule: l, onModulesReordered: d, onCollapseChanged: c, onRenameModule: u, onModulesChanged: v, onFeaturesChanged: h, onPersistenceError: g, rowLabels: m, onActorsReordered: p, onAddFeature: f, onRenameFeature: b, onFeatureCollapseChanged: w, onFeaturesReordered: S, onAddSlice: y, onReorderSlices:
|
|
6065
|
-
const { readOnly:
|
|
6066
|
+
var Hd = () => 1, Wd = ({ collection: e, getZoom: t = Hd, slots: n, onDeselect: r, onCollectionMoving: o, onCollectionMoved: i, canMove: s, onAddModule: l, onModulesReordered: d, onCollapseChanged: c, onRenameModule: u, onModulesChanged: v, onFeaturesChanged: h, onPersistenceError: g, rowLabels: m, onActorsReordered: p, onAddFeature: f, onRenameFeature: b, onFeatureCollapseChanged: w, onFeaturesReordered: S, onAddSlice: y, onReorderSlices: E, onMoveSlice: T, validateSliceDrop: N, onSliceCollapseChanged: C, onSliceRenamed: G, onSliceDuplicated: J }) => {
|
|
6067
|
+
const { readOnly: k, editing: L } = Q(), [F, j] = z(/* @__PURE__ */ new Map()), P = q((ne, $) => j((ie) => new Map(ie).set(ne.toString(), $)), []), H = le(() => Bd(e.modules, F), [e.modules, F]), I = k ? {
|
|
6066
6068
|
onFeatureCollapseChanged: P,
|
|
6067
6069
|
onSliceCollapseChanged: (ne, $, ie) => P($, ie)
|
|
6068
6070
|
} : {
|
|
@@ -6071,19 +6073,19 @@ var Hd = () => 1, Wd = ({ collection: e, getZoom: t = Hd, slots: n, onDeselect:
|
|
|
6071
6073
|
onFeatureCollapseChanged: w,
|
|
6072
6074
|
onFeaturesReordered: S,
|
|
6073
6075
|
onAddSlice: y,
|
|
6074
|
-
onReorderSlices:
|
|
6076
|
+
onReorderSlices: E,
|
|
6075
6077
|
onMoveSlice: T,
|
|
6076
6078
|
validateSliceDrop: N,
|
|
6077
6079
|
onSliceCollapseChanged: C,
|
|
6078
6080
|
onSliceRenamed: G,
|
|
6079
6081
|
onSliceDuplicated: J
|
|
6080
|
-
}, [_, D] = z(e.modules), [M, W] = z(/* @__PURE__ */ new Map()), Z = A(null), [V, U] = z(0), oe = !!(l || d || c || u || p || f || b || w || S || y ||
|
|
6082
|
+
}, [_, D] = z(e.modules), [M, W] = z(/* @__PURE__ */ new Map()), Z = A(null), [V, U] = z(0), oe = !!(l || d || c || u || p || f || b || w || S || y || E || T || C || G || J || s && o && i || $d(L)), O = k || !oe, R = k ? H : e.modules, K = (O ? R : _).map((ne) => ({
|
|
6081
6083
|
...ne,
|
|
6082
6084
|
features: O ? ne.features : M.get(ne.id.toString()) ?? ne.features
|
|
6083
6085
|
})), ue = {
|
|
6084
6086
|
...e,
|
|
6085
6087
|
modules: K
|
|
6086
|
-
}, xe =
|
|
6088
|
+
}, xe = kn(ue), Pe = gi(), ze = li(ue, Pe), Y = gt(ue), ge = Y.length > 0 && K.some((ne) => !ne.collapsed), Me = !!(s && o && i), dt = zs(Y.map(({ slice: ne }) => ({
|
|
6087
6089
|
id: ne.id.toString(),
|
|
6088
6090
|
name: ne.name,
|
|
6089
6091
|
events: ne.events.map(($) => ({
|
|
@@ -6123,14 +6125,14 @@ var Hd = () => 1, Wd = ({ collection: e, getZoom: t = Hd, slots: n, onDeselect:
|
|
|
6123
6125
|
contentRows: xe,
|
|
6124
6126
|
rowHeights: ze,
|
|
6125
6127
|
actors: e.actors,
|
|
6126
|
-
onActorsReordered:
|
|
6128
|
+
onActorsReordered: k ? void 0 : p
|
|
6127
6129
|
};
|
|
6128
6130
|
return /* @__PURE__ */ a(bn.Provider, {
|
|
6129
|
-
value:
|
|
6131
|
+
value: k || !oe,
|
|
6130
6132
|
children: /* @__PURE__ */ x("div", {
|
|
6131
6133
|
className: "event-modeling-grid-container event-modeling-collection-grid",
|
|
6132
6134
|
onClick: r,
|
|
6133
|
-
children: [s && o && i && /* @__PURE__ */ a(
|
|
6135
|
+
children: [s && o && i && /* @__PURE__ */ a(ka, {
|
|
6134
6136
|
collectionId: e.id,
|
|
6135
6137
|
position: e.position,
|
|
6136
6138
|
getZoom: t,
|
|
@@ -6157,7 +6159,7 @@ var Hd = () => 1, Wd = ({ collection: e, getZoom: t = Hd, slots: n, onDeselect:
|
|
|
6157
6159
|
initialModules: R,
|
|
6158
6160
|
onAddModule: l,
|
|
6159
6161
|
onModulesReordered: d,
|
|
6160
|
-
onCollapseChanged:
|
|
6162
|
+
onCollapseChanged: k ? (ne, $) => (P(ne, $), Promise.resolve(!0)) : c,
|
|
6161
6163
|
onRenameModule: u,
|
|
6162
6164
|
onPersistenceError: g,
|
|
6163
6165
|
onModulesChanged: (ne) => {
|
|
@@ -6330,7 +6332,7 @@ var Hd = () => 1, Wd = ({ collection: e, getZoom: t = Hd, slots: n, onDeselect:
|
|
|
6330
6332
|
];
|
|
6331
6333
|
return /* @__PURE__ */ a(qd, { items: r });
|
|
6332
6334
|
}, Ti = ({ showLogo: e, showViewOptions: t, toolbar: n, chrome: r, children: o }) => {
|
|
6333
|
-
const i =
|
|
6335
|
+
const i = ke(), s = Uo(), [l, d] = z(i), c = s ? i : l, u = s ?? d, v = t || n !== void 0;
|
|
6334
6336
|
return /* @__PURE__ */ a(Yo, {
|
|
6335
6337
|
presentation: c,
|
|
6336
6338
|
onChange: u,
|
|
@@ -6429,7 +6431,7 @@ var Hd = () => 1, Wd = ({ collection: e, getZoom: t = Hd, slots: n, onDeselect:
|
|
|
6429
6431
|
id: I.id,
|
|
6430
6432
|
rect: _
|
|
6431
6433
|
}];
|
|
6432
|
-
})), [t]),
|
|
6434
|
+
})), [t]), E = le(() => Zd(f, (I) => y.get(I)?.rect), [f, y]), T = (I, _) => {
|
|
6433
6435
|
for (const D of y.values())
|
|
6434
6436
|
if (D.id.toString() !== _.toString() && sa(I, D.rect))
|
|
6435
6437
|
return D;
|
|
@@ -6483,7 +6485,7 @@ var Hd = () => 1, Wd = ({ collection: e, getZoom: t = Hd, slots: n, onDeselect:
|
|
|
6483
6485
|
else throw U;
|
|
6484
6486
|
}
|
|
6485
6487
|
}
|
|
6486
|
-
},
|
|
6488
|
+
}, k = async (I) => {
|
|
6487
6489
|
if (!(!c || m.current.pending.size > 0)) {
|
|
6488
6490
|
p((_) => Xd(_, I));
|
|
6489
6491
|
try {
|
|
@@ -6526,7 +6528,7 @@ var Hd = () => 1, Wd = ({ collection: e, getZoom: t = Hd, slots: n, onDeselect:
|
|
|
6526
6528
|
className: "module-collection-link-layer__arrow-head"
|
|
6527
6529
|
})
|
|
6528
6530
|
}) }),
|
|
6529
|
-
|
|
6531
|
+
E.map(({ link: I, path: _ }) => /* @__PURE__ */ a("path", {
|
|
6530
6532
|
d: _,
|
|
6531
6533
|
className: "module-collection-link-layer__arrow",
|
|
6532
6534
|
markerEnd: `url(#${S})`
|
|
@@ -6570,7 +6572,7 @@ var Hd = () => 1, Wd = ({ collection: e, getZoom: t = Hd, slots: n, onDeselect:
|
|
|
6570
6572
|
onPointerCancel: L
|
|
6571
6573
|
}, `${I.toString()}-${D}`);
|
|
6572
6574
|
})),
|
|
6573
|
-
c && h.pending.size === 0 &&
|
|
6575
|
+
c && h.pending.size === 0 && E.map(({ link: I, center: _ }) => /* @__PURE__ */ a("button", {
|
|
6574
6576
|
type: "button",
|
|
6575
6577
|
className: "module-collection-link-layer__delete",
|
|
6576
6578
|
style: {
|
|
@@ -6580,7 +6582,7 @@ var Hd = () => 1, Wd = ({ collection: e, getZoom: t = Hd, slots: n, onDeselect:
|
|
|
6580
6582
|
title: l.removeLink,
|
|
6581
6583
|
onPointerDown: (D) => D.stopPropagation(),
|
|
6582
6584
|
onClick: () => {
|
|
6583
|
-
|
|
6585
|
+
k(I.id);
|
|
6584
6586
|
},
|
|
6585
6587
|
children: /* @__PURE__ */ a("i", { className: "pi pi-times" })
|
|
6586
6588
|
}, I.id.toString()))
|
|
@@ -6644,29 +6646,29 @@ var Hd = () => 1, Wd = ({ collection: e, getZoom: t = Hd, slots: n, onDeselect:
|
|
|
6644
6646
|
}
|
|
6645
6647
|
}, St = 50, Ct = () => {
|
|
6646
6648
|
}, tc = (e) => e.stopPropagation(), Pi = qi(({ notes: e }, t) => {
|
|
6647
|
-
const { editing: n, actions: r, messages: o } = Q(), i = A(new ec(e)), s = A(/* @__PURE__ */ new Set()), l = A(!1), d = A(/* @__PURE__ */ new Set()), c = A(/* @__PURE__ */ new Set()), [u, v] = z(0), [h, g] = z(), [m, p] = z(), f = A(null), b = le(() => [f], []), w = q(() => v((
|
|
6649
|
+
const { editing: n, actions: r, messages: o } = Q(), i = A(new ec(e)), s = A(/* @__PURE__ */ new Set()), l = A(!1), d = A(/* @__PURE__ */ new Set()), c = A(/* @__PURE__ */ new Set()), [u, v] = z(0), [h, g] = z(), [m, p] = z(), f = A(null), b = le(() => [f], []), w = q(() => v((k) => k + 1), []);
|
|
6648
6650
|
re(() => {
|
|
6649
6651
|
i.current.reconcile(e), w();
|
|
6650
6652
|
}, [e, w]), re(() => {
|
|
6651
|
-
const
|
|
6652
|
-
if (
|
|
6653
|
+
const k = i.current.nextExpiration;
|
|
6654
|
+
if (k === void 0) return;
|
|
6653
6655
|
const L = setTimeout(() => {
|
|
6654
6656
|
i.current.expire(), w();
|
|
6655
|
-
}, Math.max(0,
|
|
6657
|
+
}, Math.max(0, k - Date.now()));
|
|
6656
6658
|
return () => clearTimeout(L);
|
|
6657
6659
|
}, [u, w]);
|
|
6658
|
-
const S = q((
|
|
6659
|
-
i.current.settle(
|
|
6660
|
+
const S = q((k, L, F) => s.current.has(k) ? Promise.resolve() : (s.current.add(k), i.current.change(k, L), i.current.begin(k, L), w(), Promise.resolve().then(F).then((j) => (j === !1 && (i.current.rollback(k, L), i.current.get(k) || g((P) => P === k ? void 0 : P), w()), j !== !1)).catch((j) => (i.current.rollback(k, L), i.current.get(k) || g((P) => P === k ? void 0 : P), w(), r.stickyNoteError ? r.stickyNoteError(j) : console.error(j), !1)).finally(() => {
|
|
6661
|
+
i.current.settle(k, L), s.current.delete(k), w();
|
|
6660
6662
|
})), [r, w]);
|
|
6661
|
-
st(t, () => ({ add(
|
|
6663
|
+
st(t, () => ({ add(k) {
|
|
6662
6664
|
const L = n.onStickyNoteAdded;
|
|
6663
6665
|
if (!L || l.current) return;
|
|
6664
6666
|
l.current = !0, r.stickyNoteCreatingChanged?.(!0);
|
|
6665
6667
|
const F = {
|
|
6666
6668
|
id: ce.create().toString(),
|
|
6667
6669
|
position: {
|
|
6668
|
-
x:
|
|
6669
|
-
y:
|
|
6670
|
+
x: k.x - St / 2,
|
|
6671
|
+
y: k.y - St / 2
|
|
6670
6672
|
},
|
|
6671
6673
|
width: St,
|
|
6672
6674
|
height: St,
|
|
@@ -6685,45 +6687,45 @@ var Hd = () => 1, Wd = ({ collection: e, getZoom: t = Hd, slots: n, onDeselect:
|
|
|
6685
6687
|
]);
|
|
6686
6688
|
const y = n.onStickyNoteMoved || n.onStickyNoteResized || n.onStickyNoteTextChanged || n.onStickyNoteRemoved ? g : void 0;
|
|
6687
6689
|
nt(b, () => y?.(void 0), h !== void 0 && !!y);
|
|
6688
|
-
const
|
|
6689
|
-
const F = i.current.get(
|
|
6690
|
-
!F || s.current.has(
|
|
6690
|
+
const E = (k, L) => {
|
|
6691
|
+
const F = i.current.get(k);
|
|
6692
|
+
!F || s.current.has(k) || F.position.x === L.x && F.position.y === L.y || (d.current.add(k), i.current.change(k, {
|
|
6691
6693
|
...F,
|
|
6692
6694
|
position: L
|
|
6693
6695
|
}), w());
|
|
6694
|
-
}, T = (
|
|
6695
|
-
const F = i.current.get(
|
|
6696
|
-
!F || s.current.has(
|
|
6696
|
+
}, T = (k, L) => {
|
|
6697
|
+
const F = i.current.get(k);
|
|
6698
|
+
!F || s.current.has(k) || F.position.x === L.position.x && F.position.y === L.position.y && F.width === L.width && F.height === L.height || (c.current.add(k), i.current.change(k, {
|
|
6697
6699
|
...F,
|
|
6698
6700
|
...L
|
|
6699
6701
|
}), w());
|
|
6700
|
-
}, N = (
|
|
6701
|
-
if (!d.current.delete(
|
|
6702
|
-
const L = i.current.get(
|
|
6703
|
-
L && n.onStickyNoteMoved && S(
|
|
6704
|
-
}, C = (
|
|
6705
|
-
if (!c.current.delete(
|
|
6706
|
-
const L = i.current.get(
|
|
6707
|
-
L && n.onStickyNoteResized && S(
|
|
6702
|
+
}, N = (k) => {
|
|
6703
|
+
if (!d.current.delete(k)) return;
|
|
6704
|
+
const L = i.current.get(k);
|
|
6705
|
+
L && n.onStickyNoteMoved && S(k, L, () => n.onStickyNoteMoved?.(k, L.position));
|
|
6706
|
+
}, C = (k) => {
|
|
6707
|
+
if (!c.current.delete(k)) return;
|
|
6708
|
+
const L = i.current.get(k);
|
|
6709
|
+
L && n.onStickyNoteResized && S(k, L, () => n.onStickyNoteResized?.(k, {
|
|
6708
6710
|
position: L.position,
|
|
6709
6711
|
width: L.width,
|
|
6710
6712
|
height: L.height
|
|
6711
6713
|
}));
|
|
6712
|
-
}, G = (
|
|
6713
|
-
const F = i.current.get(
|
|
6714
|
-
F && F.text !== L && n.onStickyNoteTextChanged && S(
|
|
6714
|
+
}, G = (k, L) => {
|
|
6715
|
+
const F = i.current.get(k);
|
|
6716
|
+
F && F.text !== L && n.onStickyNoteTextChanged && S(k, {
|
|
6715
6717
|
...F,
|
|
6716
6718
|
text: L
|
|
6717
|
-
}, () => n.onStickyNoteTextChanged?.(
|
|
6718
|
-
}, J = q((
|
|
6719
|
-
!i.current.get(
|
|
6719
|
+
}, () => n.onStickyNoteTextChanged?.(k, L));
|
|
6720
|
+
}, J = q((k) => {
|
|
6721
|
+
!i.current.get(k) || !n.onStickyNoteRemoved || s.current.has(k) || (g((L) => L === k ? void 0 : L), S(k, null, () => n.onStickyNoteRemoved?.(k)));
|
|
6720
6722
|
}, [n, S]);
|
|
6721
6723
|
return re(() => {
|
|
6722
6724
|
if (!n.onStickyNoteRemoved || h === void 0) return;
|
|
6723
|
-
const
|
|
6725
|
+
const k = (L) => {
|
|
6724
6726
|
L.key !== "Delete" && L.key !== "Backspace" || Qd(L.target) || (L.preventDefault(), J(h));
|
|
6725
6727
|
};
|
|
6726
|
-
return document.addEventListener("keydown",
|
|
6728
|
+
return document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k);
|
|
6727
6729
|
}, [
|
|
6728
6730
|
h,
|
|
6729
6731
|
n,
|
|
@@ -6731,29 +6733,29 @@ var Hd = () => 1, Wd = ({ collection: e, getZoom: t = Hd, slots: n, onDeselect:
|
|
|
6731
6733
|
]), /* @__PURE__ */ a("div", {
|
|
6732
6734
|
ref: f,
|
|
6733
6735
|
className: "event-model-sticky-notes",
|
|
6734
|
-
children: i.current.notes.map((
|
|
6735
|
-
const L =
|
|
6736
|
+
children: i.current.notes.map((k) => {
|
|
6737
|
+
const L = k.position?.x ?? 0, F = k.position?.y ?? 0;
|
|
6736
6738
|
return /* @__PURE__ */ a(Ir, {
|
|
6737
6739
|
x: L,
|
|
6738
6740
|
y: F,
|
|
6739
|
-
zIndex: m ===
|
|
6741
|
+
zIndex: m === k.id ? 3 : 2,
|
|
6740
6742
|
children: /* @__PURE__ */ x("div", {
|
|
6741
|
-
"data-sticky-note-id":
|
|
6742
|
-
className: s.current.has(
|
|
6743
|
-
"aria-busy": s.current.has(
|
|
6744
|
-
onDoubleClickCapture: n.onStickyNoteTextChanged && !s.current.has(
|
|
6743
|
+
"data-sticky-note-id": k.id,
|
|
6744
|
+
className: s.current.has(k.id) ? "event-model-sticky-note--busy" : void 0,
|
|
6745
|
+
"aria-busy": s.current.has(k.id),
|
|
6746
|
+
onDoubleClickCapture: n.onStickyNoteTextChanged && !s.current.has(k.id) ? void 0 : tc,
|
|
6745
6747
|
children: [/* @__PURE__ */ a(Xi, {
|
|
6746
6748
|
note: {
|
|
6747
|
-
id:
|
|
6749
|
+
id: k.id,
|
|
6748
6750
|
x: L,
|
|
6749
6751
|
y: F,
|
|
6750
|
-
width:
|
|
6751
|
-
height:
|
|
6752
|
-
text:
|
|
6752
|
+
width: k.width,
|
|
6753
|
+
height: k.height,
|
|
6754
|
+
text: k.text
|
|
6753
6755
|
},
|
|
6754
|
-
selected: h ===
|
|
6756
|
+
selected: h === k.id && !!n.onStickyNoteResized && !s.current.has(k.id),
|
|
6755
6757
|
onSelect: y ?? Ct,
|
|
6756
|
-
onMove: n.onStickyNoteMoved ? (j, P, H) =>
|
|
6758
|
+
onMove: n.onStickyNoteMoved ? (j, P, H) => E(j, {
|
|
6757
6759
|
x: P,
|
|
6758
6760
|
y: H
|
|
6759
6761
|
}) : Ct,
|
|
@@ -6769,13 +6771,13 @@ var Hd = () => 1, Wd = ({ collection: e, getZoom: t = Hd, slots: n, onDeselect:
|
|
|
6769
6771
|
onResizeEnd: n.onStickyNoteResized ? C : void 0,
|
|
6770
6772
|
onTextChange: n.onStickyNoteTextChanged ? G : Ct,
|
|
6771
6773
|
onExpandedChange: (j, P) => p((H) => P ? j : H === j ? void 0 : H)
|
|
6772
|
-
}), s.current.has(
|
|
6774
|
+
}), s.current.has(k.id) && /* @__PURE__ */ a("span", {
|
|
6773
6775
|
className: "event-model-sticky-note__progress",
|
|
6774
6776
|
"aria-hidden": "true",
|
|
6775
6777
|
children: /* @__PURE__ */ a(to, { className: "event-model-sticky-note__spinner" })
|
|
6776
6778
|
})]
|
|
6777
6779
|
})
|
|
6778
|
-
},
|
|
6780
|
+
}, k.id);
|
|
6779
6781
|
})
|
|
6780
6782
|
});
|
|
6781
6783
|
});
|
|
@@ -6924,7 +6926,7 @@ var hc = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor
|
|
|
6924
6926
|
onCollectionMoved: t.onCollectionMoved,
|
|
6925
6927
|
onCollectionsChange: t.onCollectionsChange,
|
|
6926
6928
|
onPersistenceError: t.onPersistenceError
|
|
6927
|
-
}), { collections: v, pendingMoveIds: h, canMove: g, moveCollection: m, collectionMoved: p, addCollection: f } = u, [b, w] = z(/* @__PURE__ */ new Map()), S = A(s?.initialZoom ?? 1), y = q(() => S.current, []),
|
|
6929
|
+
}), { collections: v, pendingMoveIds: h, canMove: g, moveCollection: m, collectionMoved: p, addCollection: f } = u, [b, w] = z(/* @__PURE__ */ new Map()), S = A(s?.initialZoom ?? 1), y = q(() => S.current, []), E = A(null), { estimateSize: T, countSlices: N, renderCollection: C } = t, G = q((M) => dc({
|
|
6928
6930
|
documentId: e,
|
|
6929
6931
|
collections: v,
|
|
6930
6932
|
estimateSize: T,
|
|
@@ -6944,7 +6946,7 @@ var hc = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor
|
|
|
6944
6946
|
]);
|
|
6945
6947
|
st(d, () => ({
|
|
6946
6948
|
addCollection: f,
|
|
6947
|
-
addStickyNote: (M) =>
|
|
6949
|
+
addStickyNote: (M) => E.current?.add(M),
|
|
6948
6950
|
exportImage: G
|
|
6949
6951
|
}), [f, G]);
|
|
6950
6952
|
const J = q((M, W, Z) => {
|
|
@@ -6955,10 +6957,10 @@ var hc = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor
|
|
|
6955
6957
|
height: Z
|
|
6956
6958
|
});
|
|
6957
6959
|
});
|
|
6958
|
-
}, []),
|
|
6960
|
+
}, []), k = br(T), L = br(q((M) => (W) => C(M, W), [C])), F = le(() => Da(v), [v]), j = le(() => gc(F.map((M) => ({
|
|
6959
6961
|
position: M.position,
|
|
6960
|
-
size:
|
|
6961
|
-
}))), [F,
|
|
6962
|
+
size: k(M)
|
|
6963
|
+
}))), [F, k]), P = le(() => pc(v.reduce((M, W) => M + N(W), 0)), [v, N]), H = le(() => F.flatMap((M) => {
|
|
6962
6964
|
const W = b.get(M.id.toString());
|
|
6963
6965
|
return W ? [{
|
|
6964
6966
|
id: M.id,
|
|
@@ -6971,7 +6973,7 @@ var hc = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor
|
|
|
6971
6973
|
}, [I]), D = /* @__PURE__ */ x(te, { children: [
|
|
6972
6974
|
F.map((M) => /* @__PURE__ */ a(Li, {
|
|
6973
6975
|
collection: M,
|
|
6974
|
-
estimatedSize:
|
|
6976
|
+
estimatedSize: k(M),
|
|
6975
6977
|
measuredSize: b.get(M.id.toString()),
|
|
6976
6978
|
onSize: J,
|
|
6977
6979
|
getZoom: y,
|
|
@@ -6987,7 +6989,7 @@ var hc = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor
|
|
|
6987
6989
|
...c
|
|
6988
6990
|
}),
|
|
6989
6991
|
/* @__PURE__ */ a(Pi, {
|
|
6990
|
-
ref:
|
|
6992
|
+
ref: E,
|
|
6991
6993
|
notes: r
|
|
6992
6994
|
})
|
|
6993
6995
|
] });
|
|
@@ -7117,11 +7119,11 @@ var wc = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
7117
7119
|
value: l,
|
|
7118
7120
|
children: r
|
|
7119
7121
|
});
|
|
7120
|
-
}, Mc = (e, t) => e === $e.output ? t.translationDirection.output : t.translationDirection.input,
|
|
7122
|
+
}, Mc = (e, t) => e === $e.output ? t.translationDirection.output : t.translationDirection.input, kc = (e, t) => e === $e.output ? t.translationDirection.changeToInput : t.translationDirection.changeToOutput, Ec = (e) => e === $e.output ? "pi pi-send" : "pi pi-inbox", Nc = ({ direction: e, onDirectionChanged: t }) => {
|
|
7121
7123
|
const { readOnly: n, messages: r } = Q(), [o, i] = z(e), [s, l] = z(!1);
|
|
7122
7124
|
re(() => i(e), [e]);
|
|
7123
7125
|
const d = /* @__PURE__ */ a("i", {
|
|
7124
|
-
className:
|
|
7126
|
+
className: Ec(o),
|
|
7125
7127
|
style: { fontSize: 10 },
|
|
7126
7128
|
"aria-hidden": "true"
|
|
7127
7129
|
}), c = Mc(o, r);
|
|
@@ -7140,7 +7142,7 @@ var wc = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
7140
7142
|
} finally {
|
|
7141
7143
|
l(!1);
|
|
7142
7144
|
}
|
|
7143
|
-
}, v =
|
|
7145
|
+
}, v = kc(o, r);
|
|
7144
7146
|
return /* @__PURE__ */ a("button", {
|
|
7145
7147
|
type: "button",
|
|
7146
7148
|
className: "event-modeling-grid-add-button event-modeling-grid-add-button--small event-modeling-grid-add-button--no-circle",
|
|
@@ -7153,10 +7155,10 @@ var wc = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
7153
7155
|
}, Ic = {
|
|
7154
7156
|
fontSize: 11,
|
|
7155
7157
|
fontWeight: 500,
|
|
7156
|
-
color: "
|
|
7158
|
+
color: "color-mix(in srgb, var(--board-ink, #ffffff) 80%, transparent)",
|
|
7157
7159
|
textAlign: "center"
|
|
7158
7160
|
}, Fi = ({ slice: e, height: t, collapsed: n, selectableStatuses: r, unselectableStatusReason: o, error: i, leading: s, trailing: l, onToggleCollapse: d }) => {
|
|
7159
|
-
const c = Q(), { showStatuses: u = !0 } =
|
|
7161
|
+
const c = Q(), { showStatuses: u = !0 } = ke(), { readOnly: v } = We(), { editing: h, actions: g } = c, m = h.onSliceRenamed, p = h.onSliceStatusChanged, f = h.onTranslationDirectionChanged, b = h.onSliceAdded, w = h.onSliceOpenStateSet, S = (g.sliceHeader ?? []).filter((y) => !y.when || y.when(e));
|
|
7160
7162
|
return /* @__PURE__ */ x("div", {
|
|
7161
7163
|
className: "event-modeling-grid-slice-column-header",
|
|
7162
7164
|
style: {
|
|
@@ -7206,7 +7208,7 @@ var wc = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
7206
7208
|
title: y.tooltip,
|
|
7207
7209
|
"aria-label": y.tooltip,
|
|
7208
7210
|
disabled: v || y.disabled,
|
|
7209
|
-
onClick: (
|
|
7211
|
+
onClick: (E) => y.onActivate(e.id, E.currentTarget.getBoundingClientRect()),
|
|
7210
7212
|
children: y.icon
|
|
7211
7213
|
}, y.tooltip)),
|
|
7212
7214
|
!c.readOnly && b && /* @__PURE__ */ a(ml, {
|
|
@@ -7309,7 +7311,7 @@ function _c(e, t, n, r) {
|
|
|
7309
7311
|
}, []), v = q((p, f, b) => {
|
|
7310
7312
|
const w = document.querySelector(`[data-slice-drop-target="true"][data-slice-module-id="${p.toString()}"][data-slice-feature-id="${b.toString()}"]`);
|
|
7311
7313
|
return b.equals(f) ? w?.dataset.sliceAcceptsReorder === "true" : w?.dataset.sliceAcceptsMove === "true";
|
|
7312
|
-
}, []), h = q((p, f, b, w, S, y,
|
|
7314
|
+
}, []), h = q((p, f, b, w, S, y, E, T = null) => {
|
|
7313
7315
|
const N = e.slices.findIndex((G) => G.id.equals(p));
|
|
7314
7316
|
if (N === -1) return;
|
|
7315
7317
|
const C = u(p, e.id, N);
|
|
@@ -7326,7 +7328,7 @@ function _c(e, t, n, r) {
|
|
|
7326
7328
|
currentY: w,
|
|
7327
7329
|
dropIndex: N,
|
|
7328
7330
|
headerY: y,
|
|
7329
|
-
zoom:
|
|
7331
|
+
zoom: E,
|
|
7330
7332
|
isValid: (C?.isValid ?? !0) && v(t, e.id, e.id),
|
|
7331
7333
|
invalidReason: C?.reason
|
|
7332
7334
|
});
|
|
@@ -7357,15 +7359,15 @@ function _c(e, t, n, r) {
|
|
|
7357
7359
|
const p = (b) => {
|
|
7358
7360
|
const w = s.current;
|
|
7359
7361
|
if (!w) return;
|
|
7360
|
-
const S = g(w.moduleId, b.clientX), y = m(S, b.clientX),
|
|
7362
|
+
const S = g(w.moduleId, b.clientX), y = m(S, b.clientX), E = u(w.sliceId, S, y);
|
|
7361
7363
|
i((T) => T ? {
|
|
7362
7364
|
...T,
|
|
7363
7365
|
currentX: b.clientX,
|
|
7364
7366
|
currentY: b.clientY,
|
|
7365
7367
|
targetFeatureId: S,
|
|
7366
7368
|
dropIndex: y,
|
|
7367
|
-
isValid: (
|
|
7368
|
-
invalidReason:
|
|
7369
|
+
isValid: (E?.isValid ?? !0) && v(w.moduleId, w.featureId, S),
|
|
7370
|
+
invalidReason: E?.reason
|
|
7369
7371
|
} : void 0);
|
|
7370
7372
|
}, f = () => {
|
|
7371
7373
|
const b = s.current, w = b && Dc(b);
|
|
@@ -7470,7 +7472,7 @@ var Bc = ({ featureId: e, name: t, status: n, width: r, collapsed: o, isDragging
|
|
|
7470
7472
|
children: h
|
|
7471
7473
|
});
|
|
7472
7474
|
}, Hc = ({ featureId: e, slice: t, eventCount: n, collapsed: r, isDragging: o = !1, onSliceDragStart: i, header: s, headerHeight: l = 44, body: d, specifications: c, collapsedWidth: u }) => {
|
|
7473
|
-
const { readOnly: v } = Q(), h = Us(t.id.toString()), { ref: g, onMouseEnter: m, onMouseLeave: p } = Zs(h?.connectedSliceIds), f = A(null), b = Sn(f), [w, S] = z(!1), y = A(!1),
|
|
7475
|
+
const { readOnly: v } = Q(), h = Us(t.id.toString()), { ref: g, onMouseEnter: m, onMouseLeave: p } = Zs(h?.connectedSliceIds), f = A(null), b = Sn(f), [w, S] = z(!1), y = A(!1), E = Gr({
|
|
7474
7476
|
sliceType: t.sliceType,
|
|
7475
7477
|
eventCount: n
|
|
7476
7478
|
}), T = () => {
|
|
@@ -7500,7 +7502,7 @@ var Bc = ({ featureId: e, name: t, status: n, width: r, collapsed: o, isDragging
|
|
|
7500
7502
|
featureId: e,
|
|
7501
7503
|
name: t.name,
|
|
7502
7504
|
status: t.status,
|
|
7503
|
-
width: r ? u :
|
|
7505
|
+
width: r ? u : E,
|
|
7504
7506
|
collapsed: r,
|
|
7505
7507
|
isDragging: o,
|
|
7506
7508
|
onDragStart: v ? void 0 : i,
|
|
@@ -7513,7 +7515,7 @@ var Bc = ({ featureId: e, name: t, status: n, width: r, collapsed: o, isDragging
|
|
|
7513
7515
|
height: l,
|
|
7514
7516
|
collapsed: r
|
|
7515
7517
|
}), typeof d == "function" ? d(b) : b && d]
|
|
7516
|
-
}), typeof c == "function" ? c(b,
|
|
7518
|
+
}), typeof c == "function" ? c(b, E) : b && c]
|
|
7517
7519
|
})
|
|
7518
7520
|
});
|
|
7519
7521
|
}, Wc = (e, t) => {
|
|
@@ -7691,7 +7693,7 @@ var Bc = ({ featureId: e, name: t, status: n, width: r, collapsed: o, isDragging
|
|
|
7691
7693
|
return `${n} (${Array.from({ length: o.size + 1 }, (i, s) => s + 1).find((i) => !o.has(i))})`;
|
|
7692
7694
|
};
|
|
7693
7695
|
function eu({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollapsed: o, hideEmptyPlaceholder: i = !1, onSlicesChanged: s, createSlice: l, onAddSlice: d, onReorderSlices: c, onMoveSlice: u, validateSliceDrop: v, renderSlice: h }) {
|
|
7694
|
-
const { readOnly: g, messages: m } = Q(), p = A(zc(t)), f = A(void 0), [b, w] = z(p.current), { slices: S } = b, y = A(!1), [
|
|
7696
|
+
const { readOnly: g, messages: m } = Q(), p = A(zc(t)), f = A(void 0), [b, w] = z(p.current), { slices: S } = b, y = A(!1), [E, T] = z(!1), N = q((D) => {
|
|
7695
7697
|
const M = p.current, W = D(M);
|
|
7696
7698
|
W !== M && (p.current = W, w(W), W.slices !== M.slices && (f.current = W.slices, s?.(W.slices)));
|
|
7697
7699
|
}, [s]);
|
|
@@ -7709,7 +7711,7 @@ function eu({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
7709
7711
|
slices: W
|
|
7710
7712
|
};
|
|
7711
7713
|
});
|
|
7712
|
-
}, [N]), G = q((D, M) => N((W) => qc(W, D, M)), [N]), J = q((D, M) => N((W) => Zc(W, D, M)), [N]),
|
|
7714
|
+
}, [N]), G = q((D, M) => N((W) => qc(W, D, M)), [N]), J = q((D, M) => N((W) => Zc(W, D, M)), [N]), k = q((D, M) => N((W) => Jc(W, D, M)), [N]), L = q((D) => [...p.current.additions, ...p.current.incoming].some((M) => M.slice.id.equals(D)) || !p.current.slices.some((M) => M.id.equals(D)) ? !1 : (N((M) => Yc(M, D)), !0), [N]), F = q((D, M) => N((W) => Xc(W, D, M)), [N]), j = q((D, M, W) => {
|
|
7713
7715
|
if (g || !d || y.current) return;
|
|
7714
7716
|
y.current = !0, T(!0);
|
|
7715
7717
|
const Z = l(Wc(D, W));
|
|
@@ -7729,7 +7731,7 @@ function eu({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
7729
7731
|
updateSlices: C,
|
|
7730
7732
|
addProjectedSlice: G,
|
|
7731
7733
|
moveIn: J,
|
|
7732
|
-
completeMoveIn:
|
|
7734
|
+
completeMoveIn: k,
|
|
7733
7735
|
moveOut: L,
|
|
7734
7736
|
completeMoveOut: F
|
|
7735
7737
|
}), [
|
|
@@ -7737,7 +7739,7 @@ function eu({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
7737
7739
|
C,
|
|
7738
7740
|
G,
|
|
7739
7741
|
J,
|
|
7740
|
-
|
|
7742
|
+
k,
|
|
7741
7743
|
L,
|
|
7742
7744
|
F
|
|
7743
7745
|
]);
|
|
@@ -7774,7 +7776,7 @@ function eu({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
7774
7776
|
}), /* @__PURE__ */ a(Qt, {
|
|
7775
7777
|
moduleId: n,
|
|
7776
7778
|
featureId: r,
|
|
7777
|
-
busy:
|
|
7779
|
+
busy: E,
|
|
7778
7780
|
acceptsReorder: !g && !!c,
|
|
7779
7781
|
acceptsMove: !g && !!u,
|
|
7780
7782
|
active: I?.targetFeatureId.equals(r),
|
|
@@ -7817,7 +7819,7 @@ function eu({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
7817
7819
|
}) : /* @__PURE__ */ a(Qt, {
|
|
7818
7820
|
moduleId: n,
|
|
7819
7821
|
featureId: r,
|
|
7820
|
-
busy:
|
|
7822
|
+
busy: E,
|
|
7821
7823
|
acceptsReorder: !g && !!c,
|
|
7822
7824
|
acceptsMove: !g && !!u,
|
|
7823
7825
|
className: "event-modeling-slices-empty",
|
|
@@ -7905,7 +7907,7 @@ var Mm = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(te,
|
|
|
7905
7907
|
placement: e,
|
|
7906
7908
|
children: /* @__PURE__ */ a($n, { action: t })
|
|
7907
7909
|
});
|
|
7908
|
-
}, Bn = (e) => e === B.stateView,
|
|
7910
|
+
}, Bn = (e) => e === B.stateView, km = (e) => !Bn(e), au = (e, t) => Bn(e) && t === 0, su = (e) => e === B.translator, $i = (e) => {
|
|
7909
7911
|
switch (e) {
|
|
7910
7912
|
case Fe.timer:
|
|
7911
7913
|
return "pi pi-clock";
|
|
@@ -8045,10 +8047,10 @@ var Mm = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(te,
|
|
|
8045
8047
|
})
|
|
8046
8048
|
});
|
|
8047
8049
|
}, vu = ({ elements: e, windowSize: t, layout: n, collapsed: r = !1, conn: o, rowHeight: i, actorId: s, hasScreen: l = !1, renderThumbnail: d }) => {
|
|
8048
|
-
const { readOnly: c, sliceId: u } = We(), { editing: v, actions: h, readOnly: g } = Q(), { onPrototypeOpened: m, onPrototypeAdded: p } = v, f = A(null), [b, w] = z(), S = ao().prototypeThumbnail, y = { height: i },
|
|
8050
|
+
const { readOnly: c, sliceId: u } = We(), { editing: v, actions: h, readOnly: g } = Q(), { onPrototypeOpened: m, onPrototypeAdded: p } = v, f = A(null), [b, w] = z(), S = ao().prototypeThumbnail, y = { height: i }, E = "event-modeling-grid-slice-cell event-modeling-grid-slice-cell--centered event-modeling-grid-slice-cell--ui";
|
|
8049
8051
|
if (r) return /* @__PURE__ */ a("div", {
|
|
8050
8052
|
style: y,
|
|
8051
|
-
className:
|
|
8053
|
+
className: E
|
|
8052
8054
|
});
|
|
8053
8055
|
const T = e.length > 0 || l, N = !c && u && m && u && m ? () => m(u, s, f.current?.getBoundingClientRect() ?? new DOMRect()) : g ? () => w(f.current?.getBoundingClientRect() ?? new DOMRect()) : void 0, C = /* @__PURE__ */ a(oo, {
|
|
8054
8056
|
elements: [...e],
|
|
@@ -8059,7 +8061,7 @@ var Mm = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(te,
|
|
|
8059
8061
|
});
|
|
8060
8062
|
return /* @__PURE__ */ x("div", {
|
|
8061
8063
|
style: y,
|
|
8062
|
-
className:
|
|
8064
|
+
className: E,
|
|
8063
8065
|
children: [
|
|
8064
8066
|
o.bottomOutgoing && T && /* @__PURE__ */ a(vt, {}),
|
|
8065
8067
|
o.bottomIncoming && T && /* @__PURE__ */ a(pt, {}),
|
|
@@ -8391,18 +8393,18 @@ var zi = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
8391
8393
|
})
|
|
8392
8394
|
]
|
|
8393
8395
|
});
|
|
8394
|
-
},
|
|
8396
|
+
}, ku = (e, t, n) => {
|
|
8395
8397
|
if (e.sliceType !== B.stateView) return /* @__PURE__ */ new Set();
|
|
8396
8398
|
const r = new Set(t.map((i) => i.id.toString())), o = new Set(n.map((i) => i.id.toString()));
|
|
8397
8399
|
return new Set(e.events.filter((i) => !!i.sourceEventId && o.has(i.sourceEventId) && !r.has(i.sourceEventId)).map((i) => i.id.toString()));
|
|
8398
|
-
},
|
|
8400
|
+
}, Eu = (e, t) => {
|
|
8399
8401
|
const n = new Set(e.events.flatMap((o) => o.sourceEventId ? [o.sourceEventId] : [])), r = new Set(e.events.map((o) => o.name));
|
|
8400
8402
|
return t.filter((o) => !n.has(o.id.toString()) && !r.has(o.name));
|
|
8401
8403
|
}, Nu = ({ slice: e, collapsed: t = !1, conn: n, rowHeight: r, priorEvents: o, followingEvents: i = [], showDetails: s = !1 }) => {
|
|
8402
|
-
const { editing: l, actions: d, messages: c } = Q(), u = be(), { onEventAdded: v, onEventReferenced: h } = l, g = Bn(e.sliceType), m = au(e.sliceType, e.events.length), p = !(Ye(e) && e.events.some((y) => !y.sourceEventId)), f =
|
|
8404
|
+
const { editing: l, actions: d, messages: c } = Q(), u = be(), { onEventAdded: v, onEventReferenced: h } = l, g = Bn(e.sliceType), m = au(e.sliceType, e.events.length), p = !(Ye(e) && e.events.some((y) => !y.sourceEventId)), f = Eu(e, o), b = ku(e, o, i), w = (d.eventsRow ?? []).filter((y) => !y.when || y.when(e)), S = (y) => h && /* @__PURE__ */ a(Mi, {
|
|
8403
8405
|
options: f,
|
|
8404
|
-
nameOf: (
|
|
8405
|
-
onSelect: (
|
|
8406
|
+
nameOf: (E) => E.name,
|
|
8407
|
+
onSelect: (E) => h(e.id, E),
|
|
8406
8408
|
label: c.events.addExistingEvent,
|
|
8407
8409
|
searchPlaceholder: c.events.searchEvents,
|
|
8408
8410
|
emptyLabel: c.events.noEventsAvailable,
|
|
@@ -8445,10 +8447,10 @@ var zi = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
8445
8447
|
ruleBreak: fu(e, y)
|
|
8446
8448
|
}, y.id.toString()))
|
|
8447
8449
|
});
|
|
8448
|
-
},
|
|
8450
|
+
}, kr = ({ sliceId: e, kind: t, artifactId: n, name: r, schema: o, showDetails: i = !1, onRenamed: s }) => {
|
|
8449
8451
|
const { actions: l, selection: d, messages: c } = Q(), u = be(), [v, h] = z(r), [g, m] = z(void 0);
|
|
8450
8452
|
re(() => h(r), [r]);
|
|
8451
|
-
const p = t === se.command, f = p ? l.commandCard : l.readModelCardFor?.(n) ?? l.readModelCard, b = p ? rt : Oe, w = p ? c.interaction.command : c.interaction.readModel, S = !u && !!s, y = d.onArtifactSelected,
|
|
8453
|
+
const p = t === se.command, f = p ? l.commandCard : l.readModelCardFor?.(n) ?? l.readModelCard, b = p ? rt : Oe, w = p ? c.interaction.command : c.interaction.readModel, S = !u && !!s, y = d.onArtifactSelected, E = () => {
|
|
8452
8454
|
const T = g?.trim() ?? "";
|
|
8453
8455
|
m(void 0), !(!T || !s) && (s(T), h(T));
|
|
8454
8456
|
};
|
|
@@ -8457,7 +8459,7 @@ var zi = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
8457
8459
|
backgroundColor: b.background,
|
|
8458
8460
|
textColor: b.text,
|
|
8459
8461
|
onChange: m,
|
|
8460
|
-
onCommit:
|
|
8462
|
+
onCommit: E,
|
|
8461
8463
|
onCancel: () => m(void 0)
|
|
8462
8464
|
}) : /* @__PURE__ */ a(he, {
|
|
8463
8465
|
content: /* @__PURE__ */ a(it, {
|
|
@@ -8572,10 +8574,10 @@ var zi = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
8572
8574
|
const s = i.id.toString();
|
|
8573
8575
|
return r.has(s) || o.has(s) ? !1 : (o.add(s), !0);
|
|
8574
8576
|
});
|
|
8575
|
-
},
|
|
8577
|
+
}, Er = ({ sliceId: e, kind: t, artifactId: n, name: r, sources: o, onRenamed: i }) => {
|
|
8576
8578
|
const { actions: s, selection: l, messages: d } = Q(), c = be(), [u, v] = z(r), [h, g] = z(void 0);
|
|
8577
8579
|
re(() => v(r), [r]);
|
|
8578
|
-
const m = t === se.projection, p = m ? s.projectionCard : s.captureCard, f = m ? On : Tn, b = m ? d.interaction.projection : d.interaction.capture, w = !c && !!i, S = l.onArtifactSelected, y = o.length > 0 ? o.join(", ") : d.interaction.noSourceEvents,
|
|
8580
|
+
const m = t === se.projection, p = m ? s.projectionCard : s.captureCard, f = m ? On : Tn, b = m ? d.interaction.projection : d.interaction.capture, w = !c && !!i, S = l.onArtifactSelected, y = o.length > 0 ? o.join(", ") : d.interaction.noSourceEvents, E = () => {
|
|
8579
8581
|
const T = h?.trim() ?? "";
|
|
8580
8582
|
g(void 0), !(!T || !i) && (i(T), v(T));
|
|
8581
8583
|
};
|
|
@@ -8584,7 +8586,7 @@ var zi = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
8584
8586
|
backgroundColor: f.background,
|
|
8585
8587
|
textColor: f.text,
|
|
8586
8588
|
onChange: g,
|
|
8587
|
-
onCommit:
|
|
8589
|
+
onCommit: E,
|
|
8588
8590
|
onCancel: () => g(void 0)
|
|
8589
8591
|
}) : /* @__PURE__ */ a(he, {
|
|
8590
8592
|
content: `${c ? "" : `${d.interaction.doubleClickToRenamePrefix} `}${b}: ${u}`,
|
|
@@ -8647,7 +8649,7 @@ var zi = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
8647
8649
|
];
|
|
8648
8650
|
}
|
|
8649
8651
|
}, Pu = ({ slice: e, collapsed: t = !1, conn: n, rowHeight: r, externalEventOptions: o = [], priorEventOptions: i = [], showDetails: s = !1 }) => {
|
|
8650
|
-
const { editing: l, actions: d, selection: c, navigation: u, messages: v } = Q(), h = be(), { onCommandRenamed: g, onReadModelRenamed: m, onReadModelAdded: p, onExternalEventAdded: f, onExternalEventRemoved: b, onProjectionRenamed: w, onCaptureRenamed: S, onProjectionAdded: y, onCaptureAdded:
|
|
8652
|
+
const { editing: l, actions: d, selection: c, navigation: u, messages: v } = Q(), h = be(), { onCommandRenamed: g, onReadModelRenamed: m, onReadModelAdded: p, onExternalEventAdded: f, onExternalEventRemoved: b, onProjectionRenamed: w, onCaptureRenamed: S, onProjectionAdded: y, onCaptureAdded: E } = l, T = Au(e, o, i), N = (d.interactionRow ?? []).filter((R) => !R.when || R.when(e)), C = Tu(e), G = c.onArtifactSelected, { command: J, readModel: k } = e, L = J && /* @__PURE__ */ a(kr, {
|
|
8651
8653
|
sliceId: e.id,
|
|
8652
8654
|
kind: se.command,
|
|
8653
8655
|
artifactId: J.id,
|
|
@@ -8655,21 +8657,21 @@ var zi = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
8655
8657
|
schema: J.schema,
|
|
8656
8658
|
showDetails: s,
|
|
8657
8659
|
onRenamed: g && ((R) => g(e.id, J.id, R))
|
|
8658
|
-
}, J.id.toString()), { projection: F, capture: j } = e, P = F && /* @__PURE__ */ a(
|
|
8660
|
+
}, J.id.toString()), { projection: F, capture: j } = e, P = F && /* @__PURE__ */ a(Er, {
|
|
8659
8661
|
sliceId: e.id,
|
|
8660
8662
|
kind: se.projection,
|
|
8661
8663
|
artifactId: F.id,
|
|
8662
8664
|
name: F.name,
|
|
8663
8665
|
sources: F.sources,
|
|
8664
8666
|
onRenamed: w && ((R) => w(e.id, F.id, R))
|
|
8665
|
-
}, F.id.toString()), H = j && /* @__PURE__ */ a(
|
|
8667
|
+
}, F.id.toString()), H = j && /* @__PURE__ */ a(Er, {
|
|
8666
8668
|
sliceId: e.id,
|
|
8667
8669
|
kind: se.capture,
|
|
8668
8670
|
artifactId: j.id,
|
|
8669
8671
|
name: j.name,
|
|
8670
8672
|
sources: j.sources,
|
|
8671
8673
|
onRenamed: S && ((R) => S(e.id, j.id, R))
|
|
8672
|
-
}, j.id.toString()), I = P ?? H ?? L, _ = (R) => /* @__PURE__ */ a(
|
|
8674
|
+
}, j.id.toString()), I = P ?? H ?? L, _ = (R) => /* @__PURE__ */ a(kr, {
|
|
8673
8675
|
sliceId: e.id,
|
|
8674
8676
|
kind: se.readModel,
|
|
8675
8677
|
artifactId: R.id,
|
|
@@ -8677,7 +8679,7 @@ var zi = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
8677
8679
|
schema: R.schema,
|
|
8678
8680
|
showDetails: s,
|
|
8679
8681
|
onRenamed: m && ((K) => m(e.id, R.id, K))
|
|
8680
|
-
}, R.id.toString()), D = e.sliceType === B.stateView ? e.additionalReadModels ?? [] : [], M =
|
|
8682
|
+
}, R.id.toString()), D = e.sliceType === B.stateView ? e.additionalReadModels ?? [] : [], M = k && _(k), W = D.length > 0 ? /* @__PURE__ */ x("div", {
|
|
8681
8683
|
className: "event-modeling-grid-slice-cell-stack",
|
|
8682
8684
|
children: [M, D.map(_)]
|
|
8683
8685
|
}) : M, Z = (R) => {
|
|
@@ -8710,9 +8712,9 @@ var zi = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
8710
8712
|
}, V = Ye(e) ? y && {
|
|
8711
8713
|
label: v.interaction.addProjection,
|
|
8712
8714
|
add: y
|
|
8713
|
-
} :
|
|
8715
|
+
} : E && {
|
|
8714
8716
|
label: v.interaction.addCapture,
|
|
8715
|
-
add:
|
|
8717
|
+
add: E
|
|
8716
8718
|
}, U = e.sliceType === B.translator && !J && !F && !j && !!V, oe = !h && (N.length > 0 || U) && /* @__PURE__ */ a(at, {
|
|
8717
8719
|
placement: Ue.add,
|
|
8718
8720
|
children: U && V ? /* @__PURE__ */ a(Ou, {
|
|
@@ -8816,7 +8818,7 @@ export {
|
|
|
8816
8818
|
Jt as CogWheel,
|
|
8817
8819
|
Cn as CollapseButton,
|
|
8818
8820
|
Wd as CollectionGrid,
|
|
8819
|
-
|
|
8821
|
+
ka as CollectionMoveHandle,
|
|
8820
8822
|
Ya as CollectionViewport,
|
|
8821
8823
|
Gu as ConcurrencyValueSource,
|
|
8822
8824
|
pt as ConnectorIncomingBottom,
|
|
@@ -8858,13 +8860,13 @@ export {
|
|
|
8858
8860
|
de as FlowNodeActor,
|
|
8859
8861
|
Nl as GENERATED_SPECIFICATIONS_ABSORB_WINDOW_MS,
|
|
8860
8862
|
Vt as GivenContextKind,
|
|
8861
|
-
|
|
8863
|
+
kd as GivenSection,
|
|
8862
8864
|
he as GridTooltip,
|
|
8863
8865
|
ls as HIT_TEST_ATTRIBUTES,
|
|
8864
8866
|
ei as HeaderDragGhost,
|
|
8865
8867
|
_i as HostedEventModelBoard,
|
|
8866
8868
|
xm as INTERACTIVE_SELECTOR,
|
|
8867
|
-
|
|
8869
|
+
kr as InteractionCard,
|
|
8868
8870
|
nn as InteractionCell,
|
|
8869
8871
|
Ie as InteractionMiniCard,
|
|
8870
8872
|
Mt as InvalidEventModelDocument,
|
|
@@ -8943,7 +8945,7 @@ export {
|
|
|
8943
8945
|
Td as ThenSection,
|
|
8944
8946
|
$e as TranslationDirection,
|
|
8945
8947
|
Nc as TranslationDirectionToggle,
|
|
8946
|
-
|
|
8948
|
+
Er as TranslationMappingCard,
|
|
8947
8949
|
Ou as TranslatorAddChoice,
|
|
8948
8950
|
cu as TriggerControl,
|
|
8949
8951
|
en as TriggerKind,
|
|
@@ -8951,7 +8953,7 @@ export {
|
|
|
8951
8953
|
vu as UiCell,
|
|
8952
8954
|
Fa as ViewportRenderingProvider,
|
|
8953
8955
|
Bi as VisibilityRuleBreakMark,
|
|
8954
|
-
|
|
8956
|
+
Ed as WhenSection,
|
|
8955
8957
|
Al as absorbSpecifications,
|
|
8956
8958
|
is as actorDrop,
|
|
8957
8959
|
Za as actorKinds,
|
|
@@ -9001,7 +9003,7 @@ export {
|
|
|
9001
9003
|
Wc as createOptimisticSlice,
|
|
9002
9004
|
zc as createSliceAreaState,
|
|
9003
9005
|
ds as createSliceDragGhost,
|
|
9004
|
-
|
|
9006
|
+
kl as createSpecificationValuesMemory,
|
|
9005
9007
|
nc as defaultBoardImageCaptureEnvironment,
|
|
9006
9008
|
zo as defaultDetailLevel,
|
|
9007
9009
|
jo as defaultDetailsVisibilityState,
|
|
@@ -9054,7 +9056,7 @@ export {
|
|
|
9054
9056
|
sa as pointInRect,
|
|
9055
9057
|
xn as prepareGhost,
|
|
9056
9058
|
fu as producedEventRuleBreak,
|
|
9057
|
-
|
|
9059
|
+
ku as projectedFromTheRightOf,
|
|
9058
9060
|
On as projectionCardColors,
|
|
9059
9061
|
jl as propertySchemaChangeHandler,
|
|
9060
9062
|
Zu as readEventModelDocument,
|
|
@@ -9068,7 +9070,7 @@ export {
|
|
|
9068
9070
|
ot as reconcileSliceSnapshot,
|
|
9069
9071
|
Rl as reconcileSpecifications,
|
|
9070
9072
|
nm as rectAt,
|
|
9071
|
-
|
|
9073
|
+
Eu as referenceableEvents,
|
|
9072
9074
|
An as renameFeature,
|
|
9073
9075
|
Uc as reorderPendingSlices,
|
|
9074
9076
|
rs as reorderedActorIds,
|
|
@@ -9090,7 +9092,7 @@ export {
|
|
|
9090
9092
|
As as setModuleOrder,
|
|
9091
9093
|
Rs as setModuleRename,
|
|
9092
9094
|
Vc as settleAddedSlice,
|
|
9093
|
-
|
|
9095
|
+
km as showsAddNewEventButton,
|
|
9094
9096
|
au as showsEventReferencePlaceholder,
|
|
9095
9097
|
su as showsExternalEventPicker,
|
|
9096
9098
|
ut as sideAnchor,
|
|
@@ -9130,12 +9132,12 @@ export {
|
|
|
9130
9132
|
_a as useCollectionsArea,
|
|
9131
9133
|
Zs as useConnectionHighlight,
|
|
9132
9134
|
fe as useEventModelMessages,
|
|
9133
|
-
|
|
9135
|
+
ke as useEventModelPresentation,
|
|
9134
9136
|
Uo as useEventModelPresentationChange,
|
|
9135
9137
|
rl as useFeatureDrag,
|
|
9136
9138
|
ri as useHeaderDragIntent,
|
|
9137
9139
|
Sn as useInViewport,
|
|
9138
|
-
|
|
9140
|
+
Es as useModuleDrag,
|
|
9139
9141
|
Wi as useReferenceHover,
|
|
9140
9142
|
We as useSlice,
|
|
9141
9143
|
Us as useSliceConnection,
|