@cratis/event-models 0.347.0 → 0.348.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/References/EventNavigateButton.d.ts +1 -0
- package/dist/Rows/UserExperience/UiCell.d.ts +2 -1
- package/dist/event-models.css +1 -1
- package/dist/index.js +805 -791
- package/dist/index.js.map +1 -1
- package/dist/screen-editor/DataBindingSections-BeQxUfQM.js +1919 -0
- package/dist/screen-editor/{QueryBindingPropertyEditor-BzDtdbGf.js → QueryBindingPropertyEditor-XQDHU9xb.js} +15 -15
- package/dist/screen-editor/ScreenEditor/DesignMode/DesignModeStrings.d.ts +1 -0
- package/dist/screen-editor/ScreenEditor/DesignMode/designModeFeedback.d.ts +10 -0
- package/dist/screen-editor/ScreenEditor/DesignMode/useDesignMode.d.ts +1 -0
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorController.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorHost.d.ts +1 -0
- package/dist/screen-editor/ScreenEditor/Host/openSubject.d.ts +1 -0
- package/dist/screen-editor/ScreenEditor/Host/useEditingScene.d.ts +1 -1
- package/dist/screen-editor/ScreenEditor/Inspector/ScreenEditorStrings.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Inspector/ViewportControls.d.ts +2 -1
- package/dist/screen-editor/ScreenEditor/Play/PlayScreen.d.ts +2 -1
- package/dist/screen-editor/ScreenEditor/Play/composePlayScreen.d.ts +4 -2
- package/dist/screen-editor/ScreenEditor/ShellFrame/shellVisibility.d.ts +3 -2
- package/dist/screen-editor/ScreenEditor/ShellFrame/useShellFrame.d.ts +3 -1
- package/dist/screen-editor/ScreenEditor/Surface/dialogFrameAttributes.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Templates/dialogActionsChrome.d.ts +3 -3
- package/dist/screen-editor/ScreenEditor/Templates/dialogPresentation.d.ts +13 -0
- package/dist/screen-editor/ScreenEditor/Templates/displayedFits.d.ts +6 -0
- package/dist/screen-editor/ScreenEditor/Thumbnail/ScreenThumbnail.d.ts +2 -1
- package/dist/screen-editor/index.js +3701 -3626
- package/dist/screen-editor/screen-editor.css +1 -1
- package/package.json +3 -3
- package/dist/screen-editor/DataBindingSections-DLo6sV-E.js +0 -1862
package/dist/index.js
CHANGED
|
@@ -32,7 +32,7 @@ var Ie = /* @__PURE__ */ (function(e) {
|
|
|
32
32
|
return e.given = "given", e.givenReadModel = "givenReadModel", e.when = "when", e.append = "append", e.then = "then", e;
|
|
33
33
|
})({}), se = /* @__PURE__ */ (function(e) {
|
|
34
34
|
return e[e.notStarted = 0] = "notStarted", e[e.draft = 1] = "draft", e[e.readyForImplementation = 2] = "readyForImplementation", e[e.inProgress = 3] = "inProgress", e[e.readyForReview = 4] = "readyForReview", e[e.done = 5] = "done", e[e.analysis = 6] = "analysis", e[e.blocked = 7] = "blocked", e[e.waiting = 8] = "waiting", e;
|
|
35
|
-
})({}),
|
|
35
|
+
})({}), B = /* @__PURE__ */ (function(e) {
|
|
36
36
|
return e[e.stateChange = 0] = "stateChange", e[e.stateView = 1] = "stateView", e[e.automation = 2] = "automation", e[e.translator = 3] = "translator", e;
|
|
37
37
|
})({}), Lt = /* @__PURE__ */ (function(e) {
|
|
38
38
|
return e[e.commandValidationRule = 0] = "commandValidationRule", e[e.eventUniqueConstraint = 1] = "eventUniqueConstraint", e[e.eventUniqueEventTypeConstraint = 2] = "eventUniqueEventTypeConstraint", e;
|
|
@@ -474,7 +474,7 @@ var Ie = /* @__PURE__ */ (function(e) {
|
|
|
474
474
|
...t ? { avatar: t } : {}
|
|
475
475
|
};
|
|
476
476
|
}, ul = (e) => {
|
|
477
|
-
const t = e.object("command"), n = e.object("projection"), r = e.object("capture"), o = e.object("readModel"), i = e.array("additionalReadModels", co), s = rl(e.object("automationTrigger")), d = cl(e.object("assignee")), l = e.array("reactionRefusals", ll), c = e.array("reactionInvocations", sl), u = e.array("annotations", Gs), g = e.optionalEnumValue("translationDirection"), v = e.optionalString("blockedReason"),
|
|
477
|
+
const t = e.object("command"), n = e.object("projection"), r = e.object("capture"), o = e.object("readModel"), i = e.array("additionalReadModels", co), s = rl(e.object("automationTrigger")), d = cl(e.object("assignee")), l = e.array("reactionRefusals", ll), c = e.array("reactionInvocations", sl), u = e.array("annotations", Gs), g = e.optionalEnumValue("translationDirection"), v = e.optionalString("blockedReason"), p = e.strings("blockedQuestions");
|
|
478
478
|
return {
|
|
479
479
|
id: e.guid("id"),
|
|
480
480
|
name: e.string("name"),
|
|
@@ -483,7 +483,7 @@ var Ie = /* @__PURE__ */ (function(e) {
|
|
|
483
483
|
...$s(e),
|
|
484
484
|
status: e.enumValue("status"),
|
|
485
485
|
...v ? { blockedReason: v } : {},
|
|
486
|
-
...
|
|
486
|
+
...p.length > 0 ? { blockedQuestions: p } : {},
|
|
487
487
|
collapsed: e.boolean("collapsed"),
|
|
488
488
|
sortOrder: e.number("sortOrder"),
|
|
489
489
|
externalEvents: e.array("externalEvents", zs),
|
|
@@ -1038,7 +1038,7 @@ var sp = 56, lp = 1, $l = (e, t, n = 1) => Math.abs(e - t) <= n ? e : t, _l = (e
|
|
|
1038
1038
|
var nn = (e, t, n) => Math.max(8, Math.min(e, n - t - 8)), Dl = (e, t, n, r, o, i) => {
|
|
1039
1039
|
const s = e.left + e.width, d = e.top + e.height;
|
|
1040
1040
|
if (r === "left" || r === "right") {
|
|
1041
|
-
const v = n.width - s - i,
|
|
1041
|
+
const v = n.width - s - i, p = e.left - i, m = r === "right" ? v >= t.width || v >= p : !(p >= t.width || p >= v);
|
|
1042
1042
|
return {
|
|
1043
1043
|
top: nn(e.top + e.height / 2 - t.height / 2, t.height, n.height),
|
|
1044
1044
|
left: nn(m ? s + i : e.left - i - t.width, t.width, n.width)
|
|
@@ -1059,13 +1059,13 @@ var nn = (e, t, n) => Math.max(8, Math.min(e, n - t - 8)), Dl = (e, t, n, r, o,
|
|
|
1059
1059
|
let g = 0;
|
|
1060
1060
|
const v = () => {
|
|
1061
1061
|
u(kl(e.current));
|
|
1062
|
-
const
|
|
1063
|
-
if (
|
|
1064
|
-
const
|
|
1062
|
+
const p = e.current?.getBoundingClientRect(), m = s.current?.getBoundingClientRect();
|
|
1063
|
+
if (p && m) {
|
|
1064
|
+
const h = Dl(p, m, {
|
|
1065
1065
|
width: window.innerWidth,
|
|
1066
1066
|
height: window.innerHeight
|
|
1067
1067
|
}, n, r, o);
|
|
1068
|
-
l((b) => b && Math.abs(b.top -
|
|
1068
|
+
l((b) => b && Math.abs(b.top - h.top) <= 1 && Math.abs(b.left - h.left) <= 1 ? b : h);
|
|
1069
1069
|
}
|
|
1070
1070
|
g = requestAnimationFrame(v);
|
|
1071
1071
|
};
|
|
@@ -1089,8 +1089,8 @@ var nn = (e, t, n) => Math.max(8, Math.min(e, n - t - 8)), Dl = (e, t, n, r, o,
|
|
|
1089
1089
|
bottom: "below",
|
|
1090
1090
|
left: "left",
|
|
1091
1091
|
right: "right"
|
|
1092
|
-
},
|
|
1093
|
-
const i = O(null), [s, d] = D(!1), [l, c] = D(!1), [u, g] = D(!1), v = O(void 0),
|
|
1092
|
+
}, ye = ({ content: e, position: t = "top", openOnFocus: n = !1, disabled: r = !1, children: o }) => {
|
|
1093
|
+
const i = O(null), [s, d] = D(!1), [l, c] = D(!1), [u, g] = D(!1), v = O(void 0), p = (f) => {
|
|
1094
1094
|
f.pointerType === "mouse" && (v.current = {
|
|
1095
1095
|
x: f.clientX,
|
|
1096
1096
|
y: f.clientY
|
|
@@ -1123,7 +1123,7 @@ var nn = (e, t, n) => Math.max(8, Math.min(e, n - t - 8)), Dl = (e, t, n, r, o,
|
|
|
1123
1123
|
}, [s]), /* @__PURE__ */ S("span", {
|
|
1124
1124
|
ref: i,
|
|
1125
1125
|
className: "grid-tooltip-root",
|
|
1126
|
-
onPointerEnter:
|
|
1126
|
+
onPointerEnter: p,
|
|
1127
1127
|
onPointerLeave: () => {
|
|
1128
1128
|
d(!1), c(!1);
|
|
1129
1129
|
},
|
|
@@ -1260,7 +1260,7 @@ function Mr(e, t, n) {
|
|
|
1260
1260
|
}),
|
|
1261
1261
|
attributes: g
|
|
1262
1262
|
};
|
|
1263
|
-
const v = (m) => l(e, t, { additive: Yl(m) }),
|
|
1263
|
+
const v = (m) => l(e, t, { additive: Yl(m) }), p = {
|
|
1264
1264
|
...g,
|
|
1265
1265
|
role: "group",
|
|
1266
1266
|
tabIndex: 0,
|
|
@@ -1273,9 +1273,9 @@ function Mr(e, t, n) {
|
|
|
1273
1273
|
};
|
|
1274
1274
|
},
|
|
1275
1275
|
onClick: (m) => {
|
|
1276
|
-
const
|
|
1276
|
+
const h = i.current;
|
|
1277
1277
|
i.current = void 0;
|
|
1278
|
-
const b =
|
|
1278
|
+
const b = h ? Math.max(Math.abs(m.clientX - h.x), Math.abs(m.clientY - h.y)) : 0;
|
|
1279
1279
|
Ul(m.currentTarget, m.target, b) && v(m);
|
|
1280
1280
|
},
|
|
1281
1281
|
onKeyDown: (m) => {
|
|
@@ -1290,7 +1290,7 @@ function Mr(e, t, n) {
|
|
|
1290
1290
|
emphasis: s,
|
|
1291
1291
|
label: c
|
|
1292
1292
|
}),
|
|
1293
|
-
attributes:
|
|
1293
|
+
attributes: p
|
|
1294
1294
|
};
|
|
1295
1295
|
}, [
|
|
1296
1296
|
e,
|
|
@@ -1325,23 +1325,23 @@ function at(e) {
|
|
|
1325
1325
|
return typeof t == "function" ? t(n) : t?.get(n);
|
|
1326
1326
|
}
|
|
1327
1327
|
var Ti = 0.1, Zl = (e, t, n, r) => !(e.ctrlKey || e.metaKey) || e.deltaY === 0 ? !1 : e.deltaY < 0 ? t >= r : t <= n, Kl = ({ chrome: e = {}, onHelp: t, helpTitle: n, onTransformChange: r, rootRef: o, ...i }) => {
|
|
1328
|
-
const { readOnly: s } = ne(), { initialZoom: d = 1, minZoom: l = Ti, maxZoom: c = 5 } = i, u = O(d), g = O(null), v = G((m,
|
|
1329
|
-
u.current = m, r?.(m,
|
|
1330
|
-
}, [r]),
|
|
1328
|
+
const { readOnly: s } = ne(), { initialZoom: d = 1, minZoom: l = Ti, maxZoom: c = 5 } = i, u = O(d), g = O(null), v = G((m, h) => {
|
|
1329
|
+
u.current = m, r?.(m, h);
|
|
1330
|
+
}, [r]), p = G((m) => {
|
|
1331
1331
|
g.current = m, typeof o == "function" ? o(m) : o && (o.current = m);
|
|
1332
1332
|
}, [o]);
|
|
1333
1333
|
return oe(() => {
|
|
1334
1334
|
const m = g.current;
|
|
1335
1335
|
if (!m) return;
|
|
1336
|
-
const
|
|
1336
|
+
const h = (b) => {
|
|
1337
1337
|
Zl(b, u.current, l, c) && (b.preventDefault(), b.stopPropagation());
|
|
1338
1338
|
};
|
|
1339
|
-
return m.addEventListener("wheel",
|
|
1339
|
+
return m.addEventListener("wheel", h, {
|
|
1340
1340
|
capture: !0,
|
|
1341
1341
|
passive: !1
|
|
1342
|
-
}), () => m.removeEventListener("wheel",
|
|
1342
|
+
}), () => m.removeEventListener("wheel", h, { capture: !0 });
|
|
1343
1343
|
}, [l, c]), /* @__PURE__ */ a("div", {
|
|
1344
|
-
ref:
|
|
1344
|
+
ref: p,
|
|
1345
1345
|
style: { display: "contents" },
|
|
1346
1346
|
children: /* @__PURE__ */ a(ms, {
|
|
1347
1347
|
controlsLabels: e.controlsLabels,
|
|
@@ -1450,9 +1450,9 @@ var Di = (e) => ({
|
|
|
1450
1450
|
return t.length > 0 ? `produces ${e.event} (${t})` : `produces ${e.event}`;
|
|
1451
1451
|
}, qi = (e) => [...e.acknowledge ? ["acknowledge"] : [], ...e.produces.map(td)], Wi = 8;
|
|
1452
1452
|
function Ir(e) {
|
|
1453
|
-
if (e.sliceType ===
|
|
1453
|
+
if (e.sliceType === B.translator || e.sliceType === B.automation || e.sliceType === B.stateChange) return ae.translatorSliceWidth;
|
|
1454
1454
|
const t = ("eventCount" in e ? e.eventCount : e.events.length) >= ae.itemsPerRow ? ae.sliceWidthDouble : ae.sliceWidth;
|
|
1455
|
-
return e.sliceType ===
|
|
1455
|
+
return e.sliceType === B.stateView ? Math.round(t * 1.5) : t;
|
|
1456
1456
|
}
|
|
1457
1457
|
function nd(e, t, n = !1, r = 1) {
|
|
1458
1458
|
switch (e) {
|
|
@@ -1467,7 +1467,7 @@ function nd(e, t, n = !1, r = 1) {
|
|
|
1467
1467
|
}
|
|
1468
1468
|
}
|
|
1469
1469
|
function rd(e, t) {
|
|
1470
|
-
const n = e.sliceType ===
|
|
1470
|
+
const n = e.sliceType === B.automation, r = n ? e.reactionRefusals ?? [] : [], o = n ? Bi([...e.reactionInvocations ?? []], [...r]) : [];
|
|
1471
1471
|
if (r.length === 0 && o.length === 0) return Qe[J.System];
|
|
1472
1472
|
const i = Er([...r]).length + o.length, s = r.reduce((l, c) => l + 2 + qi(c).length, 0) + o.length + i, d = ae.refusalListMargin + s * ae.refusalLineHeight * t + (r.length + o.length) * ae.refusalBranchGap;
|
|
1473
1473
|
return Math.max(Qe[J.System], ae.systemCellPadding + ae.cogWheelHeight + ae.systemCellGap + d);
|
|
@@ -1524,18 +1524,18 @@ var Nn = (e) => {
|
|
|
1524
1524
|
return J.Chat;
|
|
1525
1525
|
}
|
|
1526
1526
|
}, cd = {
|
|
1527
|
-
[
|
|
1527
|
+
[B.stateChange]: /* @__PURE__ */ new Set([
|
|
1528
1528
|
Ie.UIRole,
|
|
1529
1529
|
Ie.systemRole,
|
|
1530
1530
|
Ie.chatRole
|
|
1531
1531
|
]),
|
|
1532
|
-
[
|
|
1532
|
+
[B.stateView]: /* @__PURE__ */ new Set([
|
|
1533
1533
|
Ie.UIRole,
|
|
1534
1534
|
Ie.systemRole,
|
|
1535
1535
|
Ie.chatRole
|
|
1536
1536
|
]),
|
|
1537
|
-
[
|
|
1538
|
-
[
|
|
1537
|
+
[B.automation]: /* @__PURE__ */ new Set([Ie.systemRole, Ie.chatRole]),
|
|
1538
|
+
[B.translator]: /* @__PURE__ */ new Set([Ie.systemRole, Ie.chatRole])
|
|
1539
1539
|
}, ud = (e, t) => cd[e].has(t), md = (e, t) => {
|
|
1540
1540
|
const n = Nn(t);
|
|
1541
1541
|
return n === void 0 || ud(e, n);
|
|
@@ -1753,15 +1753,15 @@ function Id(e, t) {
|
|
|
1753
1753
|
return r ? o : e;
|
|
1754
1754
|
}
|
|
1755
1755
|
function Nd({ initialCollections: e, onAddCollection: t, onCollectionMoved: n, onCollectionsChange: r, onPersistenceError: o }) {
|
|
1756
|
-
const { readOnly: i } = ne(), [s, d] = D(() => wd(e)), l = O(s), { collections: c, pendingMoveIds: u } = s, g = O(!1), v = O(!0),
|
|
1757
|
-
const
|
|
1758
|
-
l.current =
|
|
1756
|
+
const { readOnly: i } = ne(), [s, d] = D(() => wd(e)), l = O(s), { collections: c, pendingMoveIds: u } = s, g = O(!1), v = O(!0), p = G((m) => {
|
|
1757
|
+
const h = m(l.current);
|
|
1758
|
+
l.current = h, d(h);
|
|
1759
1759
|
}, []);
|
|
1760
1760
|
return oe(() => {
|
|
1761
|
-
e !== l.current.snapshot &&
|
|
1761
|
+
e !== l.current.snapshot && p((m) => Sd(m, e, Date.now(), i ? 1 / 0 : void 0));
|
|
1762
1762
|
}, [
|
|
1763
1763
|
e,
|
|
1764
|
-
|
|
1764
|
+
p,
|
|
1765
1765
|
i
|
|
1766
1766
|
]), oe(() => {
|
|
1767
1767
|
if (v.current) {
|
|
@@ -1773,17 +1773,17 @@ function Nd({ initialCollections: e, onAddCollection: t, onCollectionMoved: n, o
|
|
|
1773
1773
|
collections: c,
|
|
1774
1774
|
pendingMoveIds: u,
|
|
1775
1775
|
setCollections: G((m) => {
|
|
1776
|
-
|
|
1777
|
-
...
|
|
1778
|
-
collections: typeof m == "function" ? m(
|
|
1776
|
+
p((h) => ({
|
|
1777
|
+
...h,
|
|
1778
|
+
collections: typeof m == "function" ? m(h.collections) : m
|
|
1779
1779
|
}));
|
|
1780
|
-
}, [
|
|
1781
|
-
addCollection: G(async (m,
|
|
1780
|
+
}, [p]),
|
|
1781
|
+
addCollection: G(async (m, h) => {
|
|
1782
1782
|
if (!(i || !t || g.current)) {
|
|
1783
1783
|
g.current = !0;
|
|
1784
1784
|
try {
|
|
1785
|
-
const b = await t(m,
|
|
1786
|
-
b &&
|
|
1785
|
+
const b = await t(m, h, l.current.collections);
|
|
1786
|
+
b && p((f) => f.collections.some((y) => y.id.equals(b.id)) ? f : {
|
|
1787
1787
|
...f,
|
|
1788
1788
|
additions: [...f.additions, b],
|
|
1789
1789
|
collections: [...f.collections, b]
|
|
@@ -1799,32 +1799,32 @@ function Nd({ initialCollections: e, onAddCollection: t, onCollectionMoved: n, o
|
|
|
1799
1799
|
i,
|
|
1800
1800
|
t,
|
|
1801
1801
|
o,
|
|
1802
|
-
|
|
1802
|
+
p
|
|
1803
1803
|
]),
|
|
1804
|
-
moveCollection: G((m,
|
|
1805
|
-
!i && !n || l.current.pendingMoveIds.has(m.toString()) ||
|
|
1804
|
+
moveCollection: G((m, h, b) => {
|
|
1805
|
+
!i && !n || l.current.pendingMoveIds.has(m.toString()) || p((f) => Md(f, m, h, b, Date.now()));
|
|
1806
1806
|
}, [
|
|
1807
1807
|
i,
|
|
1808
1808
|
n,
|
|
1809
|
-
|
|
1809
|
+
p
|
|
1810
1810
|
]),
|
|
1811
|
-
collectionMoved: G(async (m,
|
|
1811
|
+
collectionMoved: G(async (m, h) => {
|
|
1812
1812
|
if (!(i || !n || l.current.pendingMoveIds.has(m.toString()))) {
|
|
1813
|
-
|
|
1813
|
+
p((b) => Cd(b, m));
|
|
1814
1814
|
try {
|
|
1815
|
-
await n(m,
|
|
1815
|
+
await n(m, h) || p((b) => yo(b, m));
|
|
1816
1816
|
} catch (b) {
|
|
1817
|
-
if (
|
|
1817
|
+
if (p((f) => yo(f, m)), o) o(b);
|
|
1818
1818
|
else throw b;
|
|
1819
1819
|
} finally {
|
|
1820
|
-
|
|
1820
|
+
p((b) => xd(b, m));
|
|
1821
1821
|
}
|
|
1822
1822
|
}
|
|
1823
1823
|
}, [
|
|
1824
1824
|
i,
|
|
1825
1825
|
n,
|
|
1826
1826
|
o,
|
|
1827
|
-
|
|
1827
|
+
p
|
|
1828
1828
|
]),
|
|
1829
1829
|
canMove: i || !!n,
|
|
1830
1830
|
canAdd: !i && !!t
|
|
@@ -2081,7 +2081,7 @@ var qd = gi(Bd), Wd = ({ drag: e }) => e ? Tt(/* @__PURE__ */ a("div", {
|
|
|
2081
2081
|
return /* @__PURE__ */ a("span", {
|
|
2082
2082
|
className: `event-model-annotation-badge event-model-annotation-severity ${t}`,
|
|
2083
2083
|
"data-severity": r,
|
|
2084
|
-
children: /* @__PURE__ */ a(
|
|
2084
|
+
children: /* @__PURE__ */ a(ye, {
|
|
2085
2085
|
content: i.map((d, l) => /* @__PURE__ */ a("div", { children: d }, l)),
|
|
2086
2086
|
children: /* @__PURE__ */ a("span", {
|
|
2087
2087
|
role: "img",
|
|
@@ -2168,16 +2168,16 @@ var Mt = ({ change: e, kind: t, name: n }) => {
|
|
|
2168
2168
|
})
|
|
2169
2169
|
});
|
|
2170
2170
|
}, An = ({ value: e, onChange: t, placeholder: n = "Name…", style: r, validate: o, readOnly: i = !1 }) => {
|
|
2171
|
-
const s = Ce(), [d, l] = D(!1), [c, u] = D(e), [g, v] = D(void 0),
|
|
2171
|
+
const s = Ce(), [d, l] = D(!1), [c, u] = D(e), [g, v] = D(void 0), p = () => {
|
|
2172
2172
|
const m = c.trim();
|
|
2173
2173
|
if (!m) {
|
|
2174
2174
|
u(e), l(!1), v(void 0);
|
|
2175
2175
|
return;
|
|
2176
2176
|
}
|
|
2177
2177
|
if (o) {
|
|
2178
|
-
const
|
|
2179
|
-
if (
|
|
2180
|
-
v(
|
|
2178
|
+
const h = o(m);
|
|
2179
|
+
if (h) {
|
|
2180
|
+
v(h);
|
|
2181
2181
|
return;
|
|
2182
2182
|
}
|
|
2183
2183
|
}
|
|
@@ -2189,7 +2189,7 @@ var Mt = ({ change: e, kind: t, name: n }) => {
|
|
|
2189
2189
|
onChange: (m) => {
|
|
2190
2190
|
u(m.target.value), v(void 0);
|
|
2191
2191
|
},
|
|
2192
|
-
onBlur:
|
|
2192
|
+
onBlur: p,
|
|
2193
2193
|
onKeyDown: (m) => {
|
|
2194
2194
|
if (m.key === "Enter") {
|
|
2195
2195
|
m.target.blur();
|
|
@@ -2212,7 +2212,7 @@ var Mt = ({ change: e, kind: t, name: n }) => {
|
|
|
2212
2212
|
children: n
|
|
2213
2213
|
})
|
|
2214
2214
|
});
|
|
2215
|
-
}, Gd = ({ error: e }) => /* @__PURE__ */ a(
|
|
2215
|
+
}, Gd = ({ error: e }) => /* @__PURE__ */ a(ye, {
|
|
2216
2216
|
content: e,
|
|
2217
2217
|
children: /* @__PURE__ */ a("span", {
|
|
2218
2218
|
className: "entity-error-indicator",
|
|
@@ -2222,7 +2222,7 @@ var Mt = ({ change: e, kind: t, name: n }) => {
|
|
|
2222
2222
|
return e.Module = "module", e.Feature = "feature", e.Slice = "slice", e;
|
|
2223
2223
|
})({}), gp = ({ kind: e, label: t, error: n, onRetry: r }) => {
|
|
2224
2224
|
const o = Ce().erroredEntity;
|
|
2225
|
-
return /* @__PURE__ */ a(
|
|
2225
|
+
return /* @__PURE__ */ a(ye, {
|
|
2226
2226
|
content: o.couldNotBeRendered(o[e], n),
|
|
2227
2227
|
children: /* @__PURE__ */ S("div", {
|
|
2228
2228
|
className: `errored-entity errored-entity--${e}`,
|
|
@@ -2271,7 +2271,7 @@ var Mt = ({ change: e, kind: t, name: n }) => {
|
|
|
2271
2271
|
return o ? /* @__PURE__ */ a("span", {
|
|
2272
2272
|
className: `${s} event-model-description--plain`,
|
|
2273
2273
|
children: i
|
|
2274
|
-
}) : /* @__PURE__ */ a(
|
|
2274
|
+
}) : /* @__PURE__ */ a(ye, {
|
|
2275
2275
|
position: r,
|
|
2276
2276
|
openOnFocus: !0,
|
|
2277
2277
|
content: /* @__PURE__ */ a(Ar, {
|
|
@@ -2284,7 +2284,7 @@ var Mt = ({ change: e, kind: t, name: n }) => {
|
|
|
2284
2284
|
children: i
|
|
2285
2285
|
})
|
|
2286
2286
|
});
|
|
2287
|
-
}, Ui = ({ variant: e, collapsed: t, onToggle: n, label: r, onRenameLabel: o, labelReadOnly: i = !1, validateLabel: s, labelStyle: d, background: l, border: c, height: u, children: g, marker: v, description:
|
|
2287
|
+
}, Ui = ({ variant: e, collapsed: t, onToggle: n, label: r, onRenameLabel: o, labelReadOnly: i = !1, validateLabel: s, labelStyle: d, background: l, border: c, height: u, children: g, marker: v, description: p, documentation: m, leadingContent: h, draggable: b = !1, onPointerDown: f, onPointerMove: y, onPointerUp: w, error: x, className: k, attributes: R }) => {
|
|
2288
2288
|
const M = /* @__PURE__ */ a(An, {
|
|
2289
2289
|
value: r,
|
|
2290
2290
|
onChange: o,
|
|
@@ -2294,7 +2294,7 @@ var Mt = ({ change: e, kind: t, name: n }) => {
|
|
|
2294
2294
|
}), C = v ? /* @__PURE__ */ S("div", {
|
|
2295
2295
|
className: "event-modeling-grid-pill-label",
|
|
2296
2296
|
children: [M, v]
|
|
2297
|
-
}) : M, L = !t && mt(
|
|
2297
|
+
}) : M, L = !t && mt(p) !== void 0;
|
|
2298
2298
|
return /* @__PURE__ */ S("div", {
|
|
2299
2299
|
...R,
|
|
2300
2300
|
className: `${k ? `${k} ` : ""}event-modeling-grid-pill event-modeling-grid-pill--${e}${t ? " event-modeling-grid-pill--collapsed" : ""}${L ? " event-modeling-grid-pill--described" : ""}${b ? " event-modeling-grid-pill--draggable" : ""}${x ? " event-modeling-grid-pill--error" : ""}`,
|
|
@@ -2312,12 +2312,12 @@ var Mt = ({ change: e, kind: t, name: n }) => {
|
|
|
2312
2312
|
children: [n && /* @__PURE__ */ a(Or, {
|
|
2313
2313
|
collapsed: t,
|
|
2314
2314
|
onToggle: n
|
|
2315
|
-
}),
|
|
2315
|
+
}), h]
|
|
2316
2316
|
}),
|
|
2317
2317
|
L ? /* @__PURE__ */ S("div", {
|
|
2318
2318
|
className: "event-modeling-grid-pill-center",
|
|
2319
2319
|
children: [C, /* @__PURE__ */ a(Ln, {
|
|
2320
|
-
description:
|
|
2320
|
+
description: p,
|
|
2321
2321
|
documentation: m
|
|
2322
2322
|
})]
|
|
2323
2323
|
}) : C,
|
|
@@ -2368,9 +2368,9 @@ var Mt = ({ change: e, kind: t, name: n }) => {
|
|
|
2368
2368
|
flexShrink: 0,
|
|
2369
2369
|
display: "inline-block"
|
|
2370
2370
|
}), Io = ({ rowType: e, height: t, name: n, description: r, actorId: o, onRenamed: i, validateName: s, onActorAdded: d, onDragStart: l, dragging: c = !1, badge: u, personaAvatar: g, children: v }) => {
|
|
2371
|
-
const { readOnly:
|
|
2372
|
-
Dt(M, () => b(!1),
|
|
2373
|
-
const L = n ?? Ud(e, m), V = Yd(e),
|
|
2371
|
+
const { readOnly: p, messages: m } = ne(), [h, b] = D(!1), [f, y] = D(!1), w = O(void 0), x = O(null), k = O(null), R = O(null), M = ge(() => [k], []), C = ge(() => [R], []);
|
|
2372
|
+
Dt(M, () => b(!1), h), Dt(C, () => y(!1), f);
|
|
2373
|
+
const L = n ?? Ud(e, m), V = Yd(e), U = V && !p ? i : void 0, F = V && !p ? d : void 0, te = o && !p ? l : void 0, N = p ? [] : u?.actions ?? [], E = p ? void 0 : u?.onActivate, q = N.length > 0 || !!E, A = g ?? u?.avatar, P = V && (!!A || !!u && !p), Z = () => {
|
|
2374
2374
|
if (N.length > 0) {
|
|
2375
2375
|
y((I) => !I);
|
|
2376
2376
|
return;
|
|
@@ -2403,8 +2403,8 @@ var Mt = ({ change: e, kind: t, name: n }) => {
|
|
|
2403
2403
|
onPointerMove: te ? (I) => {
|
|
2404
2404
|
const j = w.current;
|
|
2405
2405
|
if (!j || !te) return;
|
|
2406
|
-
const
|
|
2407
|
-
(
|
|
2406
|
+
const Y = Math.abs(I.clientY - j.startY), ie = Math.abs(I.clientX - j.startX);
|
|
2407
|
+
(Y > Eo || ie > Eo) && (w.current = void 0, te(I.clientX, I.clientY));
|
|
2408
2408
|
} : void 0,
|
|
2409
2409
|
onPointerUp: te ? () => {
|
|
2410
2410
|
w.current = void 0;
|
|
@@ -2422,7 +2422,7 @@ var Mt = ({ change: e, kind: t, name: n }) => {
|
|
|
2422
2422
|
"aria-label": u?.title ?? L,
|
|
2423
2423
|
disabled: !q,
|
|
2424
2424
|
style: q ? void 0 : {
|
|
2425
|
-
opacity:
|
|
2425
|
+
opacity: p ? 1 : 0.4,
|
|
2426
2426
|
cursor: "default"
|
|
2427
2427
|
},
|
|
2428
2428
|
children: A ?? /* @__PURE__ */ a("i", { className: "pi pi-id-card" })
|
|
@@ -2439,12 +2439,12 @@ var Mt = ({ change: e, kind: t, name: n }) => {
|
|
|
2439
2439
|
}),
|
|
2440
2440
|
/* @__PURE__ */ a("div", {
|
|
2441
2441
|
className: "event-modeling-grid-row-label-title",
|
|
2442
|
-
children:
|
|
2442
|
+
children: U ? /* @__PURE__ */ a(An, {
|
|
2443
2443
|
value: L,
|
|
2444
|
-
onChange:
|
|
2444
|
+
onChange: U,
|
|
2445
2445
|
validate: s,
|
|
2446
2446
|
style: Xd
|
|
2447
|
-
}) : r?.trim() ? /* @__PURE__ */ a(
|
|
2447
|
+
}) : r?.trim() ? /* @__PURE__ */ a(ye, {
|
|
2448
2448
|
content: r,
|
|
2449
2449
|
position: "right",
|
|
2450
2450
|
children: /* @__PURE__ */ a("span", {
|
|
@@ -2456,7 +2456,7 @@ var Mt = ({ change: e, kind: t, name: n }) => {
|
|
|
2456
2456
|
children: L
|
|
2457
2457
|
})
|
|
2458
2458
|
}),
|
|
2459
|
-
|
|
2459
|
+
F && /* @__PURE__ */ S("div", {
|
|
2460
2460
|
className: "event-modeling-grid-row-label-add-role",
|
|
2461
2461
|
ref: k,
|
|
2462
2462
|
children: [/* @__PURE__ */ a("button", {
|
|
@@ -2467,14 +2467,14 @@ var Mt = ({ change: e, kind: t, name: n }) => {
|
|
|
2467
2467
|
title: m.actors.add,
|
|
2468
2468
|
"aria-label": m.actors.add,
|
|
2469
2469
|
children: "+"
|
|
2470
|
-
}),
|
|
2470
|
+
}), h && /* @__PURE__ */ a("div", {
|
|
2471
2471
|
className: "event-modeling-grid-row-role-menu",
|
|
2472
|
-
children: zd(m).map(({ actorType: I, label: j, color:
|
|
2472
|
+
children: zd(m).map(({ actorType: I, label: j, color: Y }) => /* @__PURE__ */ S("button", {
|
|
2473
2473
|
className: "event-modeling-grid-row-role-menu-option",
|
|
2474
2474
|
onClick: () => {
|
|
2475
|
-
|
|
2475
|
+
F(I), b(!1);
|
|
2476
2476
|
},
|
|
2477
|
-
children: [/* @__PURE__ */ a("span", { style: Qd(
|
|
2477
|
+
children: [/* @__PURE__ */ a("span", { style: Qd(Y) }), j]
|
|
2478
2478
|
}, I))
|
|
2479
2479
|
})]
|
|
2480
2480
|
})
|
|
@@ -2523,16 +2523,16 @@ function tc(e, t, n) {
|
|
|
2523
2523
|
l.current = e;
|
|
2524
2524
|
const c = O(n);
|
|
2525
2525
|
c.current = n;
|
|
2526
|
-
const u = G((v,
|
|
2527
|
-
const
|
|
2528
|
-
if (!
|
|
2529
|
-
const b = d.current.filter((f) => f.actorType ===
|
|
2526
|
+
const u = G((v, p, m) => {
|
|
2527
|
+
const h = d.current.find((f) => f.id === v);
|
|
2528
|
+
if (!h) return;
|
|
2529
|
+
const b = d.current.filter((f) => f.actorType === h.actorType).findIndex((f) => f.id === v);
|
|
2530
2530
|
i({
|
|
2531
2531
|
actorId: v,
|
|
2532
|
-
rowType: dd(
|
|
2532
|
+
rowType: dd(h.actorType),
|
|
2533
2533
|
sourceIndex: b,
|
|
2534
|
-
ghostLabel:
|
|
2535
|
-
currentX:
|
|
2534
|
+
ghostLabel: h.name,
|
|
2535
|
+
currentX: p,
|
|
2536
2536
|
currentY: m,
|
|
2537
2537
|
dropIndex: b
|
|
2538
2538
|
});
|
|
@@ -2540,20 +2540,20 @@ function tc(e, t, n) {
|
|
|
2540
2540
|
return oe(() => {
|
|
2541
2541
|
if (!g) return;
|
|
2542
2542
|
const v = (m) => {
|
|
2543
|
-
i((
|
|
2544
|
-
...
|
|
2543
|
+
i((h) => h && {
|
|
2544
|
+
...h,
|
|
2545
2545
|
currentX: m.clientX,
|
|
2546
2546
|
currentY: m.clientY,
|
|
2547
|
-
dropIndex: Kd(l.current,
|
|
2547
|
+
dropIndex: Kd(l.current, h.rowType, m.clientY)
|
|
2548
2548
|
});
|
|
2549
|
-
},
|
|
2549
|
+
}, p = () => {
|
|
2550
2550
|
const m = s.current;
|
|
2551
2551
|
if (i(void 0), !m) return;
|
|
2552
|
-
const
|
|
2553
|
-
|
|
2552
|
+
const h = ec(d.current, m.actorId, m.dropIndex);
|
|
2553
|
+
h && c.current?.(l.current, h.actorType, h.orderedIds);
|
|
2554
2554
|
};
|
|
2555
|
-
return window.addEventListener("pointermove", v), window.addEventListener("pointerup",
|
|
2556
|
-
window.removeEventListener("pointermove", v), window.removeEventListener("pointerup",
|
|
2555
|
+
return window.addEventListener("pointermove", v), window.addEventListener("pointerup", p), () => {
|
|
2556
|
+
window.removeEventListener("pointermove", v), window.removeEventListener("pointerup", p);
|
|
2557
2557
|
};
|
|
2558
2558
|
}, [g]), {
|
|
2559
2559
|
actorDrag: o,
|
|
@@ -2561,11 +2561,11 @@ function tc(e, t, n) {
|
|
|
2561
2561
|
};
|
|
2562
2562
|
}
|
|
2563
2563
|
var nc = ({ collectionId: e, topOffset: t, contentRows: n, rowHeights: r, actors: o, onActorAdded: i, onActorRenamed: s, onRowRenamed: d, onActorsReordered: l, renderActorLabel: c, renderEmptyActorLabel: u }) => {
|
|
2564
|
-
const [g, v] = D({}), [
|
|
2564
|
+
const [g, v] = D({}), [p, m] = D({}), { actorDrag: h, handleActorDragStart: b } = tc(e, o, l);
|
|
2565
2565
|
return /* @__PURE__ */ S(Zd, {
|
|
2566
2566
|
topOffset: t,
|
|
2567
2567
|
collectionId: e.toString(),
|
|
2568
|
-
children: [/* @__PURE__ */ a(Wd, { drag:
|
|
2568
|
+
children: [/* @__PURE__ */ a(Wd, { drag: h }), n.flatMap((f) => {
|
|
2569
2569
|
const y = Nn(f), w = y === void 0 ? [] : o.filter((M) => M.actorType === y), x = {
|
|
2570
2570
|
rowType: f,
|
|
2571
2571
|
height: r[f],
|
|
@@ -2579,26 +2579,26 @@ var nc = ({ collectionId: e, topOffset: t, contentRows: n, rowHeights: r, actors
|
|
|
2579
2579
|
validateName: (M) => Object.entries(g).find(([C]) => C !== f)?.[1]?.toLowerCase() === M.toLowerCase() ? "Name already in use" : void 0,
|
|
2580
2580
|
onActorAdded: i ? (M) => i(f, M) : void 0
|
|
2581
2581
|
}, k = y === void 0 || w.length === 0 ? [/* @__PURE__ */ a(wt, { children: y !== void 0 && u ? u(f, x) : /* @__PURE__ */ a(Io, { ...x }) }, f)] : [], R = w.flatMap((M, C) => {
|
|
2582
|
-
const L =
|
|
2582
|
+
const L = h?.rowType === f, V = {
|
|
2583
2583
|
rowType: f,
|
|
2584
2584
|
height: r[f],
|
|
2585
|
-
name:
|
|
2585
|
+
name: p[M.id] ?? M.name,
|
|
2586
2586
|
description: M.description,
|
|
2587
2587
|
actorId: M.id,
|
|
2588
|
-
onRenamed: s ? (
|
|
2589
|
-
m((
|
|
2590
|
-
...
|
|
2591
|
-
[M.id]:
|
|
2592
|
-
})), s(M.id,
|
|
2588
|
+
onRenamed: s ? (U) => {
|
|
2589
|
+
m((F) => ({
|
|
2590
|
+
...F,
|
|
2591
|
+
[M.id]: U
|
|
2592
|
+
})), s(M.id, U);
|
|
2593
2593
|
} : void 0,
|
|
2594
|
-
onActorAdded: i ? (
|
|
2595
|
-
onDragStart: b ? (
|
|
2596
|
-
dragging:
|
|
2594
|
+
onActorAdded: i ? (U) => i(f, U) : void 0,
|
|
2595
|
+
onDragStart: b ? (U, F) => b(M.id, U, F) : void 0,
|
|
2596
|
+
dragging: h?.actorId === M.id
|
|
2597
2597
|
};
|
|
2598
2598
|
return [
|
|
2599
|
-
...L &&
|
|
2599
|
+
...L && h.dropIndex === C ? [/* @__PURE__ */ a(ko, {}, `drop-${f}-${C}`)] : [],
|
|
2600
2600
|
/* @__PURE__ */ a(wt, { children: c ? c(M, V) : /* @__PURE__ */ a(Io, { ...V }) }, M.id),
|
|
2601
|
-
...L && C === w.length - 1 &&
|
|
2601
|
+
...L && C === w.length - 1 && h.dropIndex === w.length ? [/* @__PURE__ */ a(ko, {}, `drop-${f}-end`)] : []
|
|
2602
2602
|
];
|
|
2603
2603
|
});
|
|
2604
2604
|
return [...k, ...R];
|
|
@@ -2889,9 +2889,9 @@ var Oo = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2889
2889
|
children: e
|
|
2890
2890
|
});
|
|
2891
2891
|
}, vt = ({ trigger: e, items: t, align: n = "right", onClose: r }) => {
|
|
2892
|
-
const o = Te(Ki), i = Ht(), [s, d] = D(!1), [l, c] = D(), u = O(null), g = O(null), v = o ? o.openMenuId === i : s,
|
|
2892
|
+
const o = Te(Ki), i = Ht(), [s, d] = D(!1), [l, c] = D(), u = O(null), g = O(null), v = o ? o.openMenuId === i : s, p = O(v);
|
|
2893
2893
|
oe(() => {
|
|
2894
|
-
|
|
2894
|
+
p.current && !v && (r?.(), c(void 0)), p.current = v;
|
|
2895
2895
|
}, [v, r]);
|
|
2896
2896
|
const m = (y) => {
|
|
2897
2897
|
if (o) {
|
|
@@ -2899,8 +2899,8 @@ var Oo = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2899
2899
|
return;
|
|
2900
2900
|
}
|
|
2901
2901
|
d(y);
|
|
2902
|
-
},
|
|
2903
|
-
Dt(b,
|
|
2902
|
+
}, h = () => m(!1), b = ge(() => [u, g], []);
|
|
2903
|
+
Dt(b, h, v);
|
|
2904
2904
|
const f = (y) => y.map((w) => {
|
|
2905
2905
|
if (w.isSeparator) return /* @__PURE__ */ a("div", { className: "event-modeling-menu-dropdown-separator" }, w.id.toString());
|
|
2906
2906
|
if (w.isHeader) return /* @__PURE__ */ a("div", {
|
|
@@ -2915,7 +2915,7 @@ var Oo = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2915
2915
|
disabled: w.disabled,
|
|
2916
2916
|
title: w.tooltip,
|
|
2917
2917
|
onClick: () => {
|
|
2918
|
-
w.disabled || (x ? c(k ? void 0 : w.id.toString()) : (w.keepOpen ||
|
|
2918
|
+
w.disabled || (x ? c(k ? void 0 : w.id.toString()) : (w.keepOpen || h(), w.onClick?.()));
|
|
2919
2919
|
},
|
|
2920
2920
|
children: [
|
|
2921
2921
|
w.icon && /* @__PURE__ */ a("span", {
|
|
@@ -3033,16 +3033,16 @@ var Oo = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
3033
3033
|
"aria-label": jn(l, d),
|
|
3034
3034
|
children: /* @__PURE__ */ a(Oo, { status: l })
|
|
3035
3035
|
});
|
|
3036
|
-
const
|
|
3037
|
-
id: sr(
|
|
3038
|
-
label: jn(
|
|
3036
|
+
const p = (h) => o ? gc(l, h, t, c) : void t(h), m = Ao.map((h) => ({
|
|
3037
|
+
id: sr(h),
|
|
3038
|
+
label: jn(h, d),
|
|
3039
3039
|
icon: /* @__PURE__ */ a(hc, {
|
|
3040
|
-
status:
|
|
3041
|
-
checked:
|
|
3040
|
+
status: h,
|
|
3041
|
+
checked: h === l
|
|
3042
3042
|
}),
|
|
3043
|
-
disabled: !n.includes(
|
|
3044
|
-
tooltip: n.includes(
|
|
3045
|
-
onClick: () => h
|
|
3043
|
+
disabled: !n.includes(h),
|
|
3044
|
+
tooltip: n.includes(h) ? void 0 : r,
|
|
3045
|
+
onClick: () => p(h)
|
|
3046
3046
|
}));
|
|
3047
3047
|
return /* @__PURE__ */ a(vt, {
|
|
3048
3048
|
trigger: /* @__PURE__ */ a("button", {
|
|
@@ -3083,10 +3083,10 @@ var Oo = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
3083
3083
|
}, Lo = ({ moduleId: e, actions: t, onAddModule: n, onAddFeature: r, kind: o }) => {
|
|
3084
3084
|
const i = Ce(), s = O(null), [d, l] = D();
|
|
3085
3085
|
if (!t.length && !n && !r) return null;
|
|
3086
|
-
const c = (
|
|
3086
|
+
const c = (p) => {
|
|
3087
3087
|
const m = s.current?.getBoundingClientRect();
|
|
3088
|
-
m &&
|
|
3089
|
-
}, u = (
|
|
3088
|
+
m && p.onActivate(e, m);
|
|
3089
|
+
}, u = (p) => p.map((m) => ({
|
|
3090
3090
|
id: m.id,
|
|
3091
3091
|
label: m.label + (m.items ? " ›" : ""),
|
|
3092
3092
|
description: m.description,
|
|
@@ -3101,7 +3101,7 @@ var Oo = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
3101
3101
|
label: i.features.back,
|
|
3102
3102
|
keepOpen: !0,
|
|
3103
3103
|
onClick: () => l(void 0)
|
|
3104
|
-
}, ...u(t.find((
|
|
3104
|
+
}, ...u(t.find((p) => p.id === d)?.items ?? [])] : [
|
|
3105
3105
|
...n ? [{
|
|
3106
3106
|
id: "module",
|
|
3107
3107
|
label: i.modules.addModule,
|
|
@@ -3229,7 +3229,7 @@ var Oo = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
3229
3229
|
fontWeight: 600,
|
|
3230
3230
|
color: "color-mix(in srgb, var(--board-ink, #ffffff) 80%, transparent)",
|
|
3231
3231
|
textAlign: "center"
|
|
3232
|
-
}, bc = ({ moduleId: e, name: t, description: n, documentation: r, height: o, collapsed: i, onToggleCollapse: s, onAddModule: d, onAddFeature: l, onRenamed: c, validateName: u, status: g, detailsVisible: v = !1, onToggleDetails:
|
|
3232
|
+
}, bc = ({ moduleId: e, name: t, description: n, documentation: r, height: o, collapsed: i, onToggleCollapse: s, onAddModule: d, onAddFeature: l, onRenamed: c, validateName: u, status: g, detailsVisible: v = !1, onToggleDetails: p, onDragStart: m, error: h }) => {
|
|
3233
3233
|
const b = ne(), f = at(e), y = Mr(e, "module", t), { showStatuses: w = !0 } = Le(), x = Zi(!b.readOnly && !i ? m : void 0), k = b.readOnly ? void 0 : c, R = b.actions, M = sv(e, l, b.editing);
|
|
3234
3234
|
return /* @__PURE__ */ S(re, { children: [/* @__PURE__ */ S(Ui, {
|
|
3235
3235
|
marker: f || y.marker ? /* @__PURE__ */ S(re, { children: [f && /* @__PURE__ */ a(Mt, {
|
|
@@ -3271,12 +3271,12 @@ var Oo = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
3271
3271
|
onPointerDown: x?.onPointerDown,
|
|
3272
3272
|
onPointerMove: x?.onPointerMove,
|
|
3273
3273
|
onPointerUp: x?.onPointerUp,
|
|
3274
|
-
error:
|
|
3274
|
+
error: h,
|
|
3275
3275
|
children: [
|
|
3276
3276
|
w && g !== void 0 && /* @__PURE__ */ a(Pr, { status: g }),
|
|
3277
|
-
!b.readOnly &&
|
|
3277
|
+
!b.readOnly && p && /* @__PURE__ */ a(Gi, {
|
|
3278
3278
|
visible: v,
|
|
3279
|
-
onToggle:
|
|
3279
|
+
onToggle: p
|
|
3280
3280
|
}),
|
|
3281
3281
|
!b.readOnly && /* @__PURE__ */ a(Lo, {
|
|
3282
3282
|
kind: "options",
|
|
@@ -3318,17 +3318,17 @@ function wc(e, t, n) {
|
|
|
3318
3318
|
l.current = e;
|
|
3319
3319
|
const c = O(n);
|
|
3320
3320
|
c.current = n;
|
|
3321
|
-
const u = G((v,
|
|
3322
|
-
const
|
|
3323
|
-
|
|
3321
|
+
const u = G((v, p, m) => {
|
|
3322
|
+
const h = d.current.findIndex((b) => b.equals(v));
|
|
3323
|
+
h !== -1 && i({
|
|
3324
3324
|
moduleId: v,
|
|
3325
|
-
sourceIndex:
|
|
3326
|
-
ghostLabel:
|
|
3325
|
+
sourceIndex: h,
|
|
3326
|
+
ghostLabel: p,
|
|
3327
3327
|
ghostWidth: m.width,
|
|
3328
3328
|
ghost: m.ghost,
|
|
3329
3329
|
currentX: m.clientX,
|
|
3330
3330
|
currentY: m.clientY,
|
|
3331
|
-
dropIndex:
|
|
3331
|
+
dropIndex: h,
|
|
3332
3332
|
headerY: m.headerY,
|
|
3333
3333
|
zoom: m.zoom
|
|
3334
3334
|
});
|
|
@@ -3336,20 +3336,20 @@ function wc(e, t, n) {
|
|
|
3336
3336
|
return oe(() => {
|
|
3337
3337
|
if (!g) return;
|
|
3338
3338
|
const v = (m) => {
|
|
3339
|
-
i((
|
|
3340
|
-
...
|
|
3339
|
+
i((h) => h && {
|
|
3340
|
+
...h,
|
|
3341
3341
|
currentX: m.clientX,
|
|
3342
3342
|
currentY: m.clientY,
|
|
3343
3343
|
dropIndex: yc(d.current, m.clientX)
|
|
3344
3344
|
});
|
|
3345
|
-
},
|
|
3345
|
+
}, p = () => {
|
|
3346
3346
|
const m = s.current;
|
|
3347
3347
|
if (i(void 0), !m) return;
|
|
3348
|
-
const
|
|
3349
|
-
|
|
3348
|
+
const h = Qi(d.current, m.sourceIndex, m.dropIndex);
|
|
3349
|
+
h && c.current?.(l.current, h);
|
|
3350
3350
|
};
|
|
3351
|
-
return window.addEventListener("pointermove", v), window.addEventListener("pointerup",
|
|
3352
|
-
window.removeEventListener("pointermove", v), window.removeEventListener("pointerup",
|
|
3351
|
+
return window.addEventListener("pointermove", v), window.addEventListener("pointerup", p), () => {
|
|
3352
|
+
window.removeEventListener("pointermove", v), window.removeEventListener("pointerup", p);
|
|
3353
3353
|
};
|
|
3354
3354
|
}, [g]), {
|
|
3355
3355
|
moduleDrag: o,
|
|
@@ -3464,11 +3464,11 @@ function Nc({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
|
|
|
3464
3464
|
const { readOnly: c } = ne(), u = G((E) => {
|
|
3465
3465
|
if (s) s(E);
|
|
3466
3466
|
else throw E;
|
|
3467
|
-
}, [s]), g = O(Sc(t)), [v,
|
|
3467
|
+
}, [s]), g = O(Sc(t)), [v, p] = D(g.current), m = O(!1), [h, b] = D(!1), f = O(/* @__PURE__ */ new Set()), [y, w] = D(/* @__PURE__ */ new Set()), x = O(!1), [k, R] = D(!1), M = (E, q) => {
|
|
3468
3468
|
q ? f.current.add(E) : f.current.delete(E), w(new Set(f.current));
|
|
3469
3469
|
}, C = G((E) => {
|
|
3470
3470
|
const q = E(g.current);
|
|
3471
|
-
g.current = q,
|
|
3471
|
+
g.current = q, p(q), l?.(q.modules);
|
|
3472
3472
|
}, [l]);
|
|
3473
3473
|
oe(() => {
|
|
3474
3474
|
t !== g.current.snapshot && C((E) => Xt(E, t));
|
|
@@ -3508,7 +3508,7 @@ function Nc({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
|
|
|
3508
3508
|
o,
|
|
3509
3509
|
u,
|
|
3510
3510
|
C
|
|
3511
|
-
]),
|
|
3511
|
+
]), U = G(async (E, q) => {
|
|
3512
3512
|
const A = E.id.toString();
|
|
3513
3513
|
if (!(c || !i || f.current.has(A))) {
|
|
3514
3514
|
M(A, !0), C((P) => xc(P, E.id, q));
|
|
@@ -3523,7 +3523,7 @@ function Nc({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
|
|
|
3523
3523
|
i,
|
|
3524
3524
|
u,
|
|
3525
3525
|
C
|
|
3526
|
-
]),
|
|
3526
|
+
]), F = G(async (E, q) => {
|
|
3527
3527
|
if (c || !r || x.current) return;
|
|
3528
3528
|
x.current = !0, R(!0);
|
|
3529
3529
|
const A = g.current.order;
|
|
@@ -3538,7 +3538,7 @@ function Nc({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
|
|
|
3538
3538
|
r,
|
|
3539
3539
|
u,
|
|
3540
3540
|
c
|
|
3541
|
-
]), { moduleDrag: te, handleModuleDragStart: N } = wc(e, v.modules.map((E) => E.id), r && !k ?
|
|
3541
|
+
]), { moduleDrag: te, handleModuleDragStart: N } = wc(e, v.modules.map((E) => E.id), r && !k ? F : void 0);
|
|
3542
3542
|
return /* @__PURE__ */ S(re, { children: [
|
|
3543
3543
|
/* @__PURE__ */ a(Yi, {
|
|
3544
3544
|
drag: te,
|
|
@@ -3550,14 +3550,14 @@ function Nc({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
|
|
|
3550
3550
|
index: q,
|
|
3551
3551
|
dragging: te?.moduleId.equals(E.id) ?? !1,
|
|
3552
3552
|
onDragStart: !y.has(E.id.toString()) && N ? (A) => N(E.id, E.name, A) : void 0,
|
|
3553
|
-
onAddModule: !c && !
|
|
3553
|
+
onAddModule: !c && !h && n ? () => {
|
|
3554
3554
|
L();
|
|
3555
3555
|
} : void 0,
|
|
3556
3556
|
onToggleCollapse: !y.has(E.id.toString()) && o ? () => {
|
|
3557
3557
|
V(E);
|
|
3558
3558
|
} : void 0,
|
|
3559
3559
|
onRenamed: !c && !y.has(E.id.toString()) && i ? (A) => {
|
|
3560
|
-
|
|
3560
|
+
U(E, A);
|
|
3561
3561
|
} : void 0
|
|
3562
3562
|
})]
|
|
3563
3563
|
}, E.id.toString())),
|
|
@@ -3633,7 +3633,7 @@ var Oc = ({ width: e, collapsed: t, children: n }) => /* @__PURE__ */ a("div", {
|
|
|
3633
3633
|
featureGap: kn(n).feature,
|
|
3634
3634
|
textScale: r
|
|
3635
3635
|
}), aa = (e) => e.length === 0 ? 0 : 1 + Math.max(...e.map((t) => aa(t.subFeatures))), Pc = (e, t, n, r) => {
|
|
3636
|
-
const o = Tr(e), i = na(e, t, r), s = Qt(e), d = e.modules.map((g) => g.collapsed ? ae.collapsedModuleWidth : ia(g.name, g.features, n, kt(r))), l = d.reduce((g, v,
|
|
3636
|
+
const o = Tr(e), i = na(e, t, r), s = Qt(e), d = e.modules.map((g) => g.collapsed ? ae.collapsedModuleWidth : ia(g.name, g.features, n, kt(r))), l = d.reduce((g, v, p) => g + (p ? kn(n).module : 0) + v, 0), c = Math.max(1, ...e.modules.map((g) => aa(g.features))), u = o.reduce((g, v) => g + i[v], 0);
|
|
3637
3637
|
return {
|
|
3638
3638
|
width: (s.length ? 56 : 0) + l + 2 * ir,
|
|
3639
3639
|
height: ae.headerHeight * (1 + c) + 28 + u + 2 * ir,
|
|
@@ -3678,7 +3678,7 @@ var yn = ({ columnPosition: e }) => {
|
|
|
3678
3678
|
function $c(e, t, n = []) {
|
|
3679
3679
|
const r = n.includes(J.System);
|
|
3680
3680
|
switch (t) {
|
|
3681
|
-
case
|
|
3681
|
+
case B.stateChange:
|
|
3682
3682
|
if (e === J.UI) return { bottomOutgoing: !0 };
|
|
3683
3683
|
if (e === J.Chat) return { bottomOutgoing: !0 };
|
|
3684
3684
|
if (e === J.System) return r ? { passthrough: !0 } : {};
|
|
@@ -3688,7 +3688,7 @@ function $c(e, t, n = []) {
|
|
|
3688
3688
|
};
|
|
3689
3689
|
if (e === J.Events) return { topIncoming: !0 };
|
|
3690
3690
|
break;
|
|
3691
|
-
case
|
|
3691
|
+
case B.stateView:
|
|
3692
3692
|
if (e === J.UI) return { bottomOutgoing: !0 };
|
|
3693
3693
|
if (e === J.Chat) return { bottomOutgoing: !0 };
|
|
3694
3694
|
if (e === J.System) return r ? { passthrough: !0 } : {};
|
|
@@ -3698,7 +3698,7 @@ function $c(e, t, n = []) {
|
|
|
3698
3698
|
};
|
|
3699
3699
|
if (e === J.Events) return { topOutgoing: !0 };
|
|
3700
3700
|
break;
|
|
3701
|
-
case
|
|
3701
|
+
case B.automation:
|
|
3702
3702
|
if (e === J.Interaction) return {
|
|
3703
3703
|
topOutgoing: !0,
|
|
3704
3704
|
topIncoming: !0
|
|
@@ -3709,7 +3709,7 @@ function $c(e, t, n = []) {
|
|
|
3709
3709
|
};
|
|
3710
3710
|
if (e === J.Events) return { topIncoming: !0 };
|
|
3711
3711
|
break;
|
|
3712
|
-
case
|
|
3712
|
+
case B.translator:
|
|
3713
3713
|
if (e === J.System) return { bottomOutgoing: !0 };
|
|
3714
3714
|
if (e === J.Interaction) return {
|
|
3715
3715
|
topIncoming: !0,
|
|
@@ -3781,26 +3781,26 @@ function Bc(e, t) {
|
|
|
3781
3781
|
}
|
|
3782
3782
|
function qc(e) {
|
|
3783
3783
|
switch (e) {
|
|
3784
|
-
case
|
|
3784
|
+
case B.stateChange:
|
|
3785
3785
|
return [
|
|
3786
3786
|
Me.ui,
|
|
3787
3787
|
Me.command,
|
|
3788
3788
|
Me.event
|
|
3789
3789
|
];
|
|
3790
|
-
case
|
|
3790
|
+
case B.stateView:
|
|
3791
3791
|
return [
|
|
3792
3792
|
Me.event,
|
|
3793
3793
|
Me.readModel,
|
|
3794
3794
|
Me.ui
|
|
3795
3795
|
];
|
|
3796
|
-
case
|
|
3796
|
+
case B.automation:
|
|
3797
3797
|
return [
|
|
3798
3798
|
Me.readModel,
|
|
3799
3799
|
Me.cogwheel,
|
|
3800
3800
|
Me.command,
|
|
3801
3801
|
Me.event
|
|
3802
3802
|
];
|
|
3803
|
-
case
|
|
3803
|
+
case B.translator:
|
|
3804
3804
|
return [
|
|
3805
3805
|
Me.externalEvent,
|
|
3806
3806
|
Me.command,
|
|
@@ -3814,7 +3814,7 @@ var Wc = ({ sliceType: e, recomputeKey: t }) => {
|
|
|
3814
3814
|
const n = O(null), [r, o] = D([]), i = `flow-arrow-${Ht().replace(/:/g, "")}`, s = G(() => {
|
|
3815
3815
|
const u = n.current, g = u?.parentElement;
|
|
3816
3816
|
if (!u || !g) return;
|
|
3817
|
-
const v = u.getBoundingClientRect(),
|
|
3817
|
+
const v = u.getBoundingClientRect(), p = u.clientWidth || v.width, m = p ? v.width / p : 1, h = (y) => {
|
|
3818
3818
|
const w = y.getBoundingClientRect();
|
|
3819
3819
|
return {
|
|
3820
3820
|
x: (w.left - v.left) / m,
|
|
@@ -3822,7 +3822,7 @@ var Wc = ({ sliceType: e, recomputeKey: t }) => {
|
|
|
3822
3822
|
width: w.width / m,
|
|
3823
3823
|
height: w.height / m
|
|
3824
3824
|
};
|
|
3825
|
-
}, b = qc(e).map((y) => Array.from(g.querySelectorAll(`[data-flow-node="${y}"]`)).map(
|
|
3825
|
+
}, b = qc(e).map((y) => Array.from(g.querySelectorAll(`[data-flow-node="${y}"]`)).map(h)).filter((y) => y.length > 0), f = [];
|
|
3826
3826
|
for (let y = 0; y < b.length - 1; y++) for (const w of b[y + 1]) for (const x of Bc(b[y], w)) f.push(Fc(x, w));
|
|
3827
3827
|
o((y) => y.length === f.length && y.every((w, x) => w === f[x]) ? y : f);
|
|
3828
3828
|
}, [e]), d = O(0), l = O(!1), c = G(() => {
|
|
@@ -3841,12 +3841,12 @@ var Wc = ({ sliceType: e, recomputeKey: t }) => {
|
|
|
3841
3841
|
}, [s, t]), oe(() => {
|
|
3842
3842
|
const u = n.current, g = u?.parentElement;
|
|
3843
3843
|
if (!u || !g) return;
|
|
3844
|
-
const v = new ResizeObserver(() => c()),
|
|
3845
|
-
v.disconnect(), v.observe(g), g.querySelectorAll("[data-flow-node]").forEach((
|
|
3844
|
+
const v = new ResizeObserver(() => c()), p = () => {
|
|
3845
|
+
v.disconnect(), v.observe(g), g.querySelectorAll("[data-flow-node]").forEach((h) => v.observe(h));
|
|
3846
3846
|
};
|
|
3847
|
-
|
|
3848
|
-
const m = new MutationObserver((
|
|
3849
|
-
|
|
3847
|
+
p();
|
|
3848
|
+
const m = new MutationObserver((h) => {
|
|
3849
|
+
h.every((b) => u.contains(b.target)) || (p(), c());
|
|
3850
3850
|
});
|
|
3851
3851
|
return m.observe(g, {
|
|
3852
3852
|
childList: !0,
|
|
@@ -3940,12 +3940,12 @@ function Gc(e) {
|
|
|
3940
3940
|
}
|
|
3941
3941
|
var Uc = ({ container: e, getZoom: t }) => {
|
|
3942
3942
|
const { actions: n } = ne(), r = n.boardSpecificationsRunAll, [o, i] = D(), [s, d] = D(!1), l = O(null), c = G(() => {
|
|
3943
|
-
const g = e.current, v = g?.closest(".event-modeling-grid-container"),
|
|
3944
|
-
if (!g || !v || !
|
|
3943
|
+
const g = e.current, v = g?.closest(".event-modeling-grid-container"), p = g?.querySelector(".event-modeling-grid-specification-box--header"), m = g?.querySelector(".event-modeling-grid-row-labels");
|
|
3944
|
+
if (!g || !v || !p || !m) {
|
|
3945
3945
|
i(void 0);
|
|
3946
3946
|
return;
|
|
3947
3947
|
}
|
|
3948
|
-
const
|
|
3948
|
+
const h = t(), b = v.getBoundingClientRect(), f = Math.round((p.getBoundingClientRect().top - b.top) / h - v.clientTop), y = Math.round((m.getBoundingClientRect().left - b.left) / h - v.clientLeft), w = Math.round(p.getBoundingClientRect().height / h);
|
|
3949
3949
|
i((x) => x?.top === f && x.left === y && x.height === w ? x : {
|
|
3950
3950
|
top: f,
|
|
3951
3951
|
left: y,
|
|
@@ -3976,7 +3976,7 @@ var Uc = ({ container: e, getZoom: t }) => {
|
|
|
3976
3976
|
width: 56,
|
|
3977
3977
|
height: o.height
|
|
3978
3978
|
},
|
|
3979
|
-
children: /* @__PURE__ */ a(
|
|
3979
|
+
children: /* @__PURE__ */ a(ye, {
|
|
3980
3980
|
content: r.tooltip,
|
|
3981
3981
|
position: "right",
|
|
3982
3982
|
children: /* @__PURE__ */ a("button", {
|
|
@@ -4015,7 +4015,7 @@ var Uc = ({ container: e, getZoom: t }) => {
|
|
|
4015
4015
|
children: o
|
|
4016
4016
|
});
|
|
4017
4017
|
}, Xc = ({ featureId: e, moduleId: t, enabled: n, collapsed: r, rowCollapsed: o, width: i, headerVisibility: s, nested: d = !1, header: l, screenTemplate: c, slices: u, hiddenSliceCount: g = 0, onExpandRow: v }) => {
|
|
4018
|
-
const
|
|
4018
|
+
const p = Ce().rowCollapsed ?? Ze.rowCollapsed;
|
|
4019
4019
|
return /* @__PURE__ */ S(Yc, {
|
|
4020
4020
|
featureId: e,
|
|
4021
4021
|
moduleId: t,
|
|
@@ -4033,10 +4033,10 @@ var Uc = ({ container: e, getZoom: t }) => {
|
|
|
4033
4033
|
children: [o && g > 0 && !r && s !== "hidden" && /* @__PURE__ */ S("div", {
|
|
4034
4034
|
className: "event-modeling-feature-grid-row-collapsed-note",
|
|
4035
4035
|
role: "note",
|
|
4036
|
-
children: [/* @__PURE__ */ a("span", { children:
|
|
4036
|
+
children: [/* @__PURE__ */ a("span", { children: p.slicesHidden(g) }), v && /* @__PURE__ */ a("button", {
|
|
4037
4037
|
type: "button",
|
|
4038
4038
|
onClick: v,
|
|
4039
|
-
children:
|
|
4039
|
+
children: p.show
|
|
4040
4040
|
})]
|
|
4041
4041
|
}), /* @__PURE__ */ a("div", {
|
|
4042
4042
|
className: o ? "event-modeling-feature-grid-slices--row-collapsed" : "event-modeling-feature-grid-slices--row-open",
|
|
@@ -4083,36 +4083,36 @@ function tu(e, t, n) {
|
|
|
4083
4083
|
d.current = t;
|
|
4084
4084
|
const l = O(n);
|
|
4085
4085
|
l.current = n;
|
|
4086
|
-
const c = G((g, v,
|
|
4087
|
-
const m = d.current.findIndex((
|
|
4086
|
+
const c = G((g, v, p) => {
|
|
4087
|
+
const m = d.current.findIndex((h) => h.equals(g));
|
|
4088
4088
|
m !== -1 && i({
|
|
4089
4089
|
featureId: g,
|
|
4090
4090
|
moduleId: e,
|
|
4091
4091
|
sourceIndex: m,
|
|
4092
4092
|
ghostLabel: v,
|
|
4093
|
-
ghostWidth:
|
|
4094
|
-
ghost:
|
|
4095
|
-
currentX:
|
|
4096
|
-
currentY:
|
|
4093
|
+
ghostWidth: p.width,
|
|
4094
|
+
ghost: p.ghost,
|
|
4095
|
+
currentX: p.clientX,
|
|
4096
|
+
currentY: p.clientY,
|
|
4097
4097
|
dropIndex: m,
|
|
4098
|
-
headerY:
|
|
4099
|
-
zoom:
|
|
4098
|
+
headerY: p.headerY,
|
|
4099
|
+
zoom: p.zoom
|
|
4100
4100
|
});
|
|
4101
4101
|
}, [e]), u = o !== void 0;
|
|
4102
4102
|
return oe(() => {
|
|
4103
4103
|
if (!u) return;
|
|
4104
|
-
const g = (
|
|
4104
|
+
const g = (p) => {
|
|
4105
4105
|
i((m) => m && {
|
|
4106
4106
|
...m,
|
|
4107
|
-
currentX:
|
|
4108
|
-
currentY:
|
|
4109
|
-
dropIndex: eu(m.moduleId,
|
|
4107
|
+
currentX: p.clientX,
|
|
4108
|
+
currentY: p.clientY,
|
|
4109
|
+
dropIndex: eu(m.moduleId, p.clientX)
|
|
4110
4110
|
});
|
|
4111
4111
|
}, v = () => {
|
|
4112
|
-
const
|
|
4113
|
-
if (i(void 0), !
|
|
4114
|
-
const m = Qi(d.current,
|
|
4115
|
-
m && l.current?.(
|
|
4112
|
+
const p = s.current;
|
|
4113
|
+
if (i(void 0), !p) return;
|
|
4114
|
+
const m = Qi(d.current, p.sourceIndex, p.dropIndex);
|
|
4115
|
+
m && l.current?.(p.moduleId, m);
|
|
4116
4116
|
};
|
|
4117
4117
|
return window.addEventListener("pointermove", g), window.addEventListener("pointerup", v), () => {
|
|
4118
4118
|
window.removeEventListener("pointermove", g), window.removeEventListener("pointerup", v);
|
|
@@ -4145,8 +4145,8 @@ function ou() {
|
|
|
4145
4145
|
const s = `${i}:${o}`, d = n.current.get(s);
|
|
4146
4146
|
if (d) return d;
|
|
4147
4147
|
const l = (g) => {
|
|
4148
|
-
const v = (r.current.get(s) ?? []).filter((
|
|
4149
|
-
v.length ? r.current.set(s, v) : r.current.delete(s), t((
|
|
4148
|
+
const v = (r.current.get(s) ?? []).filter((p) => p !== g);
|
|
4149
|
+
v.length ? r.current.set(s, v) : r.current.delete(s), t((p) => ru(p, o, i, g, r.current.get(s)?.[0]));
|
|
4150
4150
|
}, c = (g) => (r.current.set(s, [...r.current.get(s) ?? [], g]), t((v) => nu(v, o, i, g)), () => l(g)), u = (g) => g ? c(g) : void 0;
|
|
4151
4151
|
return n.current.set(s, u), u;
|
|
4152
4152
|
}, [])
|
|
@@ -4241,8 +4241,8 @@ function cr(e, t) {
|
|
|
4241
4241
|
const n = e.filter((i, s) => e.findIndex((d) => d.id.equals(i.id)) === s), r = /* @__PURE__ */ new Set(), o = [...t.flatMap((i) => r.has(i.toString()) ? [] : (r.add(i.toString()), n.filter((s) => s.id.equals(i)))), ...n.filter((i) => !t.some((s) => s.equals(i.id)))];
|
|
4242
4242
|
return o.length === e.length && o.every((i, s) => i === e[s]) ? e : o;
|
|
4243
4243
|
}
|
|
4244
|
-
function su({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed: o, forceCollapsed: i = !1, onCollapseChanged: s, occupiesColumn: d, renderHeader: l, renderColumn: c, renderFeatureBoundary: u, onAddFeature: g, onRenameFeature: v, onFeaturesReordered:
|
|
4245
|
-
const { readOnly:
|
|
4244
|
+
function su({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed: o, forceCollapsed: i = !1, onCollapseChanged: s, occupiesColumn: d, renderHeader: l, renderColumn: c, renderFeatureBoundary: u, onAddFeature: g, onRenameFeature: v, onFeaturesReordered: p, onFeaturesChanged: m }) {
|
|
4245
|
+
const { readOnly: h, messages: b } = ne(), { targets: f, register: y } = ou(), w = O(iu(t)), [x, k] = D(w.current), R = O(!1), M = O(/* @__PURE__ */ new Set()), C = G(($) => {
|
|
4246
4246
|
const _ = $(w.current);
|
|
4247
4247
|
_ !== w.current && (w.current = _, k(_), m?.(_.features));
|
|
4248
4248
|
}, [m]);
|
|
@@ -4250,7 +4250,7 @@ function su({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
4250
4250
|
t !== w.current.snapshot && t !== w.current.features && C(($) => dr($, t));
|
|
4251
4251
|
}, [t, C]);
|
|
4252
4252
|
const L = G(async ($, _) => {
|
|
4253
|
-
if (!(
|
|
4253
|
+
if (!(h || !g || R.current)) {
|
|
4254
4254
|
R.current = !0;
|
|
4255
4255
|
try {
|
|
4256
4256
|
const ee = await g($, _);
|
|
@@ -4267,7 +4267,7 @@ function su({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
4267
4267
|
}
|
|
4268
4268
|
}
|
|
4269
4269
|
}, [
|
|
4270
|
-
|
|
4270
|
+
h,
|
|
4271
4271
|
g,
|
|
4272
4272
|
C
|
|
4273
4273
|
]);
|
|
@@ -4279,9 +4279,9 @@ function su({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
4279
4279
|
features: _r(ee.features, $, _)
|
|
4280
4280
|
}))
|
|
4281
4281
|
}), [L, C]);
|
|
4282
|
-
const V = G(($) => C((_) => au(_, $)), [C]),
|
|
4282
|
+
const V = G(($) => C((_) => au(_, $)), [C]), U = G(($, _) => {
|
|
4283
4283
|
const ee = $.toString();
|
|
4284
|
-
!v ||
|
|
4284
|
+
!v || h || M.current.has(ee) || (M.current.add(ee), C((he) => ({
|
|
4285
4285
|
...he,
|
|
4286
4286
|
features: Br(he.features, ee, _),
|
|
4287
4287
|
pendingRenames: new Map(he.pendingRenames).set(ee, _)
|
|
@@ -4289,14 +4289,14 @@ function su({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
4289
4289
|
}, [
|
|
4290
4290
|
C,
|
|
4291
4291
|
v,
|
|
4292
|
-
|
|
4292
|
+
h,
|
|
4293
4293
|
V
|
|
4294
|
-
]),
|
|
4294
|
+
]), F = G(($) => i || (x.pendingCollapses.get($.id.toString()) ?? o($)), [
|
|
4295
4295
|
i,
|
|
4296
4296
|
o,
|
|
4297
4297
|
x.pendingCollapses
|
|
4298
4298
|
]), te = G(($) => {
|
|
4299
|
-
const _ = !
|
|
4299
|
+
const _ = !F($);
|
|
4300
4300
|
C((ee) => ({
|
|
4301
4301
|
...ee,
|
|
4302
4302
|
features: Fr(ee.features, $.id.toString(), _),
|
|
@@ -4304,7 +4304,7 @@ function su({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
4304
4304
|
})), s?.($.id, _);
|
|
4305
4305
|
}, [
|
|
4306
4306
|
C,
|
|
4307
|
-
|
|
4307
|
+
F,
|
|
4308
4308
|
s
|
|
4309
4309
|
]), N = G(($) => {
|
|
4310
4310
|
C((_) => {
|
|
@@ -4317,7 +4317,7 @@ function su({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
4317
4317
|
}, [C, s]), E = x.features, q = kn(Le().density).feature, A = ge(() => Jc(E).map(({ feature: $, children: _ }) => ({
|
|
4318
4318
|
feature: $,
|
|
4319
4319
|
children: _,
|
|
4320
|
-
width: [$, ..._].filter(d).reduce((ee, he,
|
|
4320
|
+
width: [$, ..._].filter(d).reduce((ee, he, Q) => ee + (Q ? q : 0) + r(he), 0)
|
|
4321
4321
|
})), [
|
|
4322
4322
|
E,
|
|
4323
4323
|
d,
|
|
@@ -4328,21 +4328,21 @@ function su({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
4328
4328
|
...ee,
|
|
4329
4329
|
features: cr(ee.features, _),
|
|
4330
4330
|
order: _
|
|
4331
|
-
})),
|
|
4332
|
-
}, [C,
|
|
4333
|
-
collapsed:
|
|
4331
|
+
})), p?.(cr(w.current.features, _));
|
|
4332
|
+
}, [C, p]), { featureDrag: I, handleFeatureDragStart: j } = tu(n, z, p ? K : void 0), Y = ($) => ({
|
|
4333
|
+
collapsed: F($),
|
|
4334
4334
|
dragging: I?.featureId.equals($.id) ?? !1,
|
|
4335
4335
|
onDragStart: j,
|
|
4336
|
-
addSubFeature: !
|
|
4336
|
+
addSubFeature: !h && g ? (_) => {
|
|
4337
4337
|
L(_, $.id);
|
|
4338
4338
|
} : void 0,
|
|
4339
|
-
onRenamed: !
|
|
4339
|
+
onRenamed: !h && v ? (_) => U($.id, _) : void 0,
|
|
4340
4340
|
onToggleCollapse: s ? () => te($) : void 0,
|
|
4341
4341
|
onCollapseFailed: s ? () => N($) : void 0
|
|
4342
4342
|
}), ie = ($) => {
|
|
4343
4343
|
const _ = Z.has($.id.toString()) ? "hidden" : T.has($.id.toString()) ? "visible" : "none";
|
|
4344
4344
|
return {
|
|
4345
|
-
...
|
|
4345
|
+
...Y($),
|
|
4346
4346
|
headerVisibility: _,
|
|
4347
4347
|
nested: Z.size > 0
|
|
4348
4348
|
};
|
|
@@ -4360,9 +4360,9 @@ function su({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
4360
4360
|
children: A.map(($, _) => /* @__PURE__ */ a(Zc, {
|
|
4361
4361
|
ref: u ? y($.feature.id.toString(), "header") : void 0,
|
|
4362
4362
|
width: $.width,
|
|
4363
|
-
collapsed:
|
|
4363
|
+
collapsed: F($.feature),
|
|
4364
4364
|
dropEdge: Kc(I?.dropIndex, _, A.length),
|
|
4365
|
-
children: !u && l($.feature,
|
|
4365
|
+
children: !u && l($.feature, Y($.feature))
|
|
4366
4366
|
}, $.feature.id.toString()))
|
|
4367
4367
|
}), /* @__PURE__ */ a("div", {
|
|
4368
4368
|
className: "event-modeling-features-area__columns",
|
|
@@ -4376,7 +4376,7 @@ function su({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
4376
4376
|
}),
|
|
4377
4377
|
u && A.flatMap(($) => [$.feature, ...$.children]).map(($) => {
|
|
4378
4378
|
const _ = f.get($.id.toString());
|
|
4379
|
-
return !_ || !T.has($.id.toString()) && !_.header || d($) && !_.column ? null : /* @__PURE__ */ a(wt, { children: u($, /* @__PURE__ */ S(re, { children: [!T.has($.id.toString()) && _.header && Tt(l($,
|
|
4379
|
+
return !_ || !T.has($.id.toString()) && !_.header || d($) && !_.column ? null : /* @__PURE__ */ a(wt, { children: u($, /* @__PURE__ */ S(re, { children: [!T.has($.id.toString()) && _.header && Tt(l($, Y($)), _.header), _.column && Tt(c($, ie($)), _.column)] })) }, $.id.toString());
|
|
4380
4380
|
})
|
|
4381
4381
|
] }) : /* @__PURE__ */ a("div", {
|
|
4382
4382
|
className: "event-modeling-module-empty-placeholder",
|
|
@@ -4394,7 +4394,7 @@ var lu = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4394
4394
|
children: /* @__PURE__ */ a(du, { type: e })
|
|
4395
4395
|
}), du = ({ type: e }) => {
|
|
4396
4396
|
switch (e) {
|
|
4397
|
-
case
|
|
4397
|
+
case B.stateChange:
|
|
4398
4398
|
return /* @__PURE__ */ S(re, { children: [
|
|
4399
4399
|
/* @__PURE__ */ a("rect", {
|
|
4400
4400
|
x: "3",
|
|
@@ -4435,7 +4435,7 @@ var lu = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4435
4435
|
}),
|
|
4436
4436
|
/* @__PURE__ */ a("polyline", { points: "10,16 12,17 14,16" })
|
|
4437
4437
|
] });
|
|
4438
|
-
case
|
|
4438
|
+
case B.stateView:
|
|
4439
4439
|
return /* @__PURE__ */ S(re, { children: [
|
|
4440
4440
|
/* @__PURE__ */ a("rect", {
|
|
4441
4441
|
x: "3",
|
|
@@ -4485,7 +4485,7 @@ var lu = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4485
4485
|
}),
|
|
4486
4486
|
/* @__PURE__ */ a("polyline", { points: "9,14 12,10 15,14" })
|
|
4487
4487
|
] });
|
|
4488
|
-
case
|
|
4488
|
+
case B.automation:
|
|
4489
4489
|
return /* @__PURE__ */ S(re, { children: [
|
|
4490
4490
|
/* @__PURE__ */ a("circle", {
|
|
4491
4491
|
cx: "12",
|
|
@@ -4529,7 +4529,7 @@ var lu = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4529
4529
|
y2: "14"
|
|
4530
4530
|
})
|
|
4531
4531
|
] });
|
|
4532
|
-
case
|
|
4532
|
+
case B.translator:
|
|
4533
4533
|
return /* @__PURE__ */ S(re, { children: [
|
|
4534
4534
|
/* @__PURE__ */ a("circle", {
|
|
4535
4535
|
cx: "12",
|
|
@@ -4584,30 +4584,30 @@ var lu = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4584
4584
|
] });
|
|
4585
4585
|
}
|
|
4586
4586
|
}, cu = [
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4587
|
+
B.stateChange,
|
|
4588
|
+
B.stateView,
|
|
4589
|
+
B.automation,
|
|
4590
|
+
B.translator
|
|
4591
4591
|
], ha = (e, t) => {
|
|
4592
4592
|
switch (e) {
|
|
4593
|
-
case
|
|
4593
|
+
case B.stateChange:
|
|
4594
4594
|
return t.sliceTypes.stateChange;
|
|
4595
|
-
case
|
|
4595
|
+
case B.stateView:
|
|
4596
4596
|
return t.sliceTypes.stateView;
|
|
4597
|
-
case
|
|
4597
|
+
case B.automation:
|
|
4598
4598
|
return t.sliceTypes.automation;
|
|
4599
|
-
case
|
|
4599
|
+
case B.translator:
|
|
4600
4600
|
return t.sliceTypes.translator;
|
|
4601
4601
|
}
|
|
4602
4602
|
}, pa = (e, t) => {
|
|
4603
4603
|
switch (e) {
|
|
4604
|
-
case
|
|
4604
|
+
case B.stateChange:
|
|
4605
4605
|
return t.sliceTypes.stateChangeDescription;
|
|
4606
|
-
case
|
|
4606
|
+
case B.stateView:
|
|
4607
4607
|
return t.sliceTypes.stateViewDescription;
|
|
4608
|
-
case
|
|
4608
|
+
case B.automation:
|
|
4609
4609
|
return t.sliceTypes.automationDescription;
|
|
4610
|
-
case
|
|
4610
|
+
case B.translator:
|
|
4611
4611
|
return t.sliceTypes.translatorDescription;
|
|
4612
4612
|
}
|
|
4613
4613
|
}, fa = (e, t) => cu.map((n) => ({
|
|
@@ -4669,12 +4669,12 @@ var lu = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4669
4669
|
const f = i.current?.getBoundingClientRect();
|
|
4670
4670
|
f && b.onActivate(e, f);
|
|
4671
4671
|
}
|
|
4672
|
-
const
|
|
4672
|
+
const p = {
|
|
4673
4673
|
id: "back",
|
|
4674
4674
|
label: o.features.back,
|
|
4675
4675
|
keepOpen: !0,
|
|
4676
4676
|
onClick: () => d("main")
|
|
4677
|
-
}, m = n ? [
|
|
4677
|
+
}, m = n ? [p, ...fa(o, n)] : [p], h = [p, ...(u.find((b) => b.id === l)?.items ?? []).filter((b) => !b.when || b.when(e)).map((b) => ({
|
|
4678
4678
|
id: b.id,
|
|
4679
4679
|
label: b.label,
|
|
4680
4680
|
icon: b.icon,
|
|
@@ -4691,7 +4691,7 @@ var lu = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4691
4691
|
"aria-label": o.features.add,
|
|
4692
4692
|
children: "+"
|
|
4693
4693
|
}),
|
|
4694
|
-
items: s === "main" ? g : s === "slice" ? m :
|
|
4694
|
+
items: s === "main" ? g : s === "slice" ? m : h,
|
|
4695
4695
|
align: "right",
|
|
4696
4696
|
onClose: () => {
|
|
4697
4697
|
d("main"), c(void 0);
|
|
@@ -4724,8 +4724,8 @@ var lu = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4724
4724
|
items: i,
|
|
4725
4725
|
align: "right"
|
|
4726
4726
|
});
|
|
4727
|
-
}, Do = "color-mix(in srgb, var(--board-feature, #a08ce6) 10%, transparent)", hu = "1px solid color-mix(in srgb, var(--board-feature, #a08ce6) 22%, transparent)", pu = ({ featureId: e, name: t, description: n, documentation: r, height: o, collapsed: i, onToggleCollapse: s, onRenamed: d, status: l, selectableStatuses: c, unselectableStatusReason: u, detailsVisible: g = !1, onToggleDetails: v, dragging:
|
|
4728
|
-
const y = ne(), w = at(e), x = Mr(e, "feature", t), { showStatuses: k = !0 } = Le(), R = Zi(!y.readOnly && !i ? m : void 0), M = y.readOnly ? void 0 : d, C = (y.actions.featureHeader ?? []).filter((
|
|
4727
|
+
}, Do = "color-mix(in srgb, var(--board-feature, #a08ce6) 10%, transparent)", hu = "1px solid color-mix(in srgb, var(--board-feature, #a08ce6) 22%, transparent)", pu = ({ featureId: e, name: t, description: n, documentation: r, height: o, collapsed: i, onToggleCollapse: s, onRenamed: d, status: l, selectableStatuses: c, unselectableStatusReason: u, detailsVisible: g = !1, onToggleDetails: v, dragging: p = !1, onDragStart: m, error: h, onAddSubFeature: b, onAddSlice: f }) => {
|
|
4728
|
+
const y = ne(), w = at(e), x = Mr(e, "feature", t), { showStatuses: k = !0 } = Le(), R = Zi(!y.readOnly && !i ? m : void 0), M = y.readOnly ? void 0 : d, C = (y.actions.featureHeader ?? []).filter((F) => !F.when || F.when(e)), L = (y.actions.featureHeaderLeading ?? []).filter((F) => !F.when || F.when(e)), V = y.actions.featureHeaderMenu ?? [], U = lv(e, b, f, y.editing);
|
|
4729
4729
|
return /* @__PURE__ */ S(re, { children: [/* @__PURE__ */ a(Ui, {
|
|
4730
4730
|
marker: w || x.marker ? /* @__PURE__ */ S(re, { children: [w && /* @__PURE__ */ a(Mt, {
|
|
4731
4731
|
change: w,
|
|
@@ -4737,22 +4737,22 @@ var lu = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4737
4737
|
variant: "feature",
|
|
4738
4738
|
collapsed: i,
|
|
4739
4739
|
onToggle: s,
|
|
4740
|
-
leadingContent: !y.readOnly && L.map((
|
|
4740
|
+
leadingContent: !y.readOnly && L.map((F) => /* @__PURE__ */ S("button", {
|
|
4741
4741
|
type: "button",
|
|
4742
4742
|
className: "event-modeling-grid-icon-btn",
|
|
4743
|
-
title:
|
|
4744
|
-
"aria-label":
|
|
4745
|
-
disabled:
|
|
4746
|
-
onClick: (te) =>
|
|
4747
|
-
children: [
|
|
4743
|
+
title: F.disabled ? F.disabledTooltip ?? F.tooltip : F.tooltip,
|
|
4744
|
+
"aria-label": F.tooltip,
|
|
4745
|
+
disabled: F.disabled,
|
|
4746
|
+
onClick: (te) => F.onActivate(e, te.currentTarget.getBoundingClientRect()),
|
|
4747
|
+
children: [F.icon, F.indicator && /* @__PURE__ */ a("span", {
|
|
4748
4748
|
className: "event-modeling-feature-chat-dot",
|
|
4749
4749
|
"aria-hidden": "true"
|
|
4750
4750
|
})]
|
|
4751
|
-
},
|
|
4751
|
+
}, F.tooltip)),
|
|
4752
4752
|
label: t,
|
|
4753
4753
|
description: n,
|
|
4754
4754
|
documentation: r,
|
|
4755
|
-
onRenameLabel: (
|
|
4755
|
+
onRenameLabel: (F) => M?.(e, F),
|
|
4756
4756
|
labelReadOnly: !M,
|
|
4757
4757
|
background: Do,
|
|
4758
4758
|
border: hu,
|
|
@@ -4766,14 +4766,14 @@ var lu = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4766
4766
|
fontWeight: 600,
|
|
4767
4767
|
color: "color-mix(in srgb, var(--board-accent, #b4a5ff) 85%, transparent)",
|
|
4768
4768
|
textAlign: "center",
|
|
4769
|
-
opacity:
|
|
4769
|
+
opacity: p ? 0.65 : 1,
|
|
4770
4770
|
textDecoration: w === "removed" ? "line-through" : void 0
|
|
4771
4771
|
},
|
|
4772
|
-
error:
|
|
4772
|
+
error: h,
|
|
4773
4773
|
children: !i && /* @__PURE__ */ S(re, { children: [
|
|
4774
4774
|
k && l !== void 0 && /* @__PURE__ */ a(Pr, {
|
|
4775
4775
|
status: l,
|
|
4776
|
-
onStatusChanged: y.editing.onFeatureStatusChanged ? (
|
|
4776
|
+
onStatusChanged: y.editing.onFeatureStatusChanged ? (F) => y.editing.onFeatureStatusChanged?.(e, F) : void 0,
|
|
4777
4777
|
selectable: c,
|
|
4778
4778
|
unselectableReason: u,
|
|
4779
4779
|
optimistic: !1
|
|
@@ -4782,19 +4782,19 @@ var lu = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4782
4782
|
visible: g,
|
|
4783
4783
|
onToggle: v
|
|
4784
4784
|
}),
|
|
4785
|
-
!y.readOnly && C.map((
|
|
4785
|
+
!y.readOnly && C.map((F) => /* @__PURE__ */ a("button", {
|
|
4786
4786
|
type: "button",
|
|
4787
4787
|
className: "event-modeling-grid-add-button event-modeling-grid-add-button--small event-modeling-grid-add-button--no-circle",
|
|
4788
|
-
title:
|
|
4789
|
-
"aria-label":
|
|
4790
|
-
disabled:
|
|
4791
|
-
style:
|
|
4788
|
+
title: F.disabled ? F.disabledTooltip ?? F.tooltip : F.tooltip,
|
|
4789
|
+
"aria-label": F.tooltip,
|
|
4790
|
+
disabled: F.disabled,
|
|
4791
|
+
style: F.active ? {
|
|
4792
4792
|
borderColor: "var(--text-color)",
|
|
4793
4793
|
color: "var(--text-color)"
|
|
4794
4794
|
} : void 0,
|
|
4795
|
-
onClick: (te) =>
|
|
4796
|
-
children:
|
|
4797
|
-
},
|
|
4795
|
+
onClick: (te) => F.onActivate(e, te.currentTarget.getBoundingClientRect()),
|
|
4796
|
+
children: F.icon
|
|
4797
|
+
}, F.tooltip)),
|
|
4798
4798
|
!y.readOnly && /* @__PURE__ */ a(vu, {
|
|
4799
4799
|
featureId: e,
|
|
4800
4800
|
tooltip: y.messages.features.options,
|
|
@@ -4836,19 +4836,19 @@ var lu = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4836
4836
|
}),
|
|
4837
4837
|
actions: V
|
|
4838
4838
|
}),
|
|
4839
|
-
!y.readOnly && (y.actions.featureHeaderAfterMenu ?? []).filter((
|
|
4839
|
+
!y.readOnly && (y.actions.featureHeaderAfterMenu ?? []).filter((F) => !F.when || F.when(e)).map((F) => /* @__PURE__ */ a("button", {
|
|
4840
4840
|
type: "button",
|
|
4841
4841
|
className: "event-modeling-grid-add-button event-modeling-grid-add-button--small event-modeling-grid-add-button--no-circle",
|
|
4842
|
-
title:
|
|
4843
|
-
"aria-label":
|
|
4844
|
-
disabled:
|
|
4845
|
-
onClick: (te) =>
|
|
4846
|
-
children:
|
|
4847
|
-
},
|
|
4842
|
+
title: F.disabled ? F.disabledTooltip ?? F.tooltip : F.tooltip,
|
|
4843
|
+
"aria-label": F.tooltip,
|
|
4844
|
+
disabled: F.disabled,
|
|
4845
|
+
onClick: (te) => F.onActivate(e, te.currentTarget.getBoundingClientRect()),
|
|
4846
|
+
children: F.icon
|
|
4847
|
+
}, F.tooltip)),
|
|
4848
4848
|
!y.readOnly && /* @__PURE__ */ a(gu, {
|
|
4849
4849
|
featureId: e,
|
|
4850
|
-
onAddSubFeature:
|
|
4851
|
-
onAddSlice:
|
|
4850
|
+
onAddSubFeature: U.onAddSubFeature,
|
|
4851
|
+
onAddSlice: U.onAddSlice,
|
|
4852
4852
|
actions: y.actions.featureHeaderAdd
|
|
4853
4853
|
})
|
|
4854
4854
|
] })
|
|
@@ -4985,7 +4985,7 @@ var bu = ({ state: e, specification: t }) => {
|
|
|
4985
4985
|
"data-spec-result": r ? "expanded" : "collapsed",
|
|
4986
4986
|
children: [/* @__PURE__ */ S("div", {
|
|
4987
4987
|
className: "spec-result-row",
|
|
4988
|
-
children: [/* @__PURE__ */ a(
|
|
4988
|
+
children: [/* @__PURE__ */ a(ye, {
|
|
4989
4989
|
content: /* @__PURE__ */ a("span", {
|
|
4990
4990
|
className: "spec-result-tooltip",
|
|
4991
4991
|
children: e
|
|
@@ -5097,8 +5097,8 @@ var bu = ({ state: e, specification: t }) => {
|
|
|
5097
5097
|
[Ne.CouldNotRun]: "could-not-run",
|
|
5098
5098
|
[Ne.Inconclusive]: "inconclusive",
|
|
5099
5099
|
[Ne.Unavailable]: "could-not-run"
|
|
5100
|
-
}, Nu = ({ name: e, description: t, documentation: n, collapsed: r, onToggleCollapse: o, runState: i, runMessage: s, builderResult: d, builderMessage: l, nameNotice: c, annotations: u, onRenamed: g, onDeleted: v, runControl:
|
|
5101
|
-
const { messages: m, readOnly:
|
|
5100
|
+
}, Nu = ({ name: e, description: t, documentation: n, collapsed: r, onToggleCollapse: o, runState: i, runMessage: s, builderResult: d, builderMessage: l, nameNotice: c, annotations: u, onRenamed: g, onDeleted: v, runControl: p }) => {
|
|
5101
|
+
const { messages: m, readOnly: h } = ne(), b = _e(), f = b ? void 0 : g, y = b ? void 0 : v;
|
|
5102
5102
|
return /* @__PURE__ */ S("div", {
|
|
5103
5103
|
className: "event-modeling-grid-specification-outer-row",
|
|
5104
5104
|
children: [/* @__PURE__ */ a("div", {
|
|
@@ -5123,7 +5123,7 @@ var bu = ({ state: e, specification: t }) => {
|
|
|
5123
5123
|
/* @__PURE__ */ S("div", {
|
|
5124
5124
|
className: "event-modeling-grid-specification-header",
|
|
5125
5125
|
children: [
|
|
5126
|
-
!
|
|
5126
|
+
!h && o && /* @__PURE__ */ a(Or, {
|
|
5127
5127
|
collapsed: r,
|
|
5128
5128
|
onToggle: b ? void 0 : o
|
|
5129
5129
|
}),
|
|
@@ -5152,7 +5152,7 @@ var bu = ({ state: e, specification: t }) => {
|
|
|
5152
5152
|
message: l,
|
|
5153
5153
|
runState: i
|
|
5154
5154
|
}),
|
|
5155
|
-
|
|
5155
|
+
p,
|
|
5156
5156
|
y && /* @__PURE__ */ a("button", {
|
|
5157
5157
|
type: "button",
|
|
5158
5158
|
className: "spec-delete-button",
|
|
@@ -5267,48 +5267,48 @@ var bu = ({ state: e, specification: t }) => {
|
|
|
5267
5267
|
}), s = new Set(e.map((l) => l.id.toString())), d = r.filter((l) => !s.has(l.id.toString()));
|
|
5268
5268
|
return d.length || i.some((l, c) => l !== e[c]) ? [...i, ...d] : e;
|
|
5269
5269
|
}, Bu = ({ sliceId: e, width: t, collapsed: n, specifications: r, runInfoFor: o, nameNoticeFor: i, annotations: s, renderRows: d }) => {
|
|
5270
|
-
const { editing: l, actions: c, messages: u } = ne(), g = _e(), [v,
|
|
5270
|
+
const { editing: l, actions: c, messages: u } = ne(), g = _e(), [v, p] = D(r), [m, h] = D(!1), [b, f] = D(!1), [y, w] = D(!1), x = ge(Pu, []), k = ge(Ou, []), R = O(0), M = O(!1), C = O(!1), L = O(!1), V = O(/* @__PURE__ */ new Set()), U = _u(g, l), F = U ? r : v;
|
|
5271
5271
|
oe(() => {
|
|
5272
|
-
|
|
5273
|
-
}, [r,
|
|
5272
|
+
p((I) => Du(I, r, U, Date.now() <= R.current, V.current));
|
|
5273
|
+
}, [r, U]);
|
|
5274
5274
|
const te = async () => {
|
|
5275
5275
|
if (M.current || !l.onSpecificationAdded) return;
|
|
5276
5276
|
M.current = !0, w(!0);
|
|
5277
5277
|
const I = {
|
|
5278
5278
|
id: pe.create(),
|
|
5279
|
-
name: Ru(
|
|
5279
|
+
name: Ru(F.map((j) => j.name), u.specifications.namePlaceholder),
|
|
5280
5280
|
collapsed: !1,
|
|
5281
5281
|
given: [],
|
|
5282
5282
|
thenEvents: [],
|
|
5283
5283
|
thenErrors: []
|
|
5284
5284
|
};
|
|
5285
|
-
|
|
5285
|
+
p((j) => [...j, I]);
|
|
5286
5286
|
try {
|
|
5287
|
-
await l.onSpecificationAdded(e, I) ||
|
|
5287
|
+
await l.onSpecificationAdded(e, I) || p((j) => j.filter((Y) => !Y.id.equals(I.id)));
|
|
5288
5288
|
} catch {
|
|
5289
|
-
|
|
5289
|
+
p((j) => j.filter((Y) => !Y.id.equals(I.id)));
|
|
5290
5290
|
} finally {
|
|
5291
5291
|
M.current = !1, w(!1);
|
|
5292
5292
|
}
|
|
5293
5293
|
}, N = (I) => {
|
|
5294
|
-
V.current.has(I.toString()) || (V.current.add(I.toString()), R.current = 0,
|
|
5294
|
+
V.current.has(I.toString()) || (V.current.add(I.toString()), R.current = 0, p((j) => j.filter((Y) => !Y.id.equals(I))), l.onSpecificationRemoved?.(e, I));
|
|
5295
5295
|
}, E = (I, j) => {
|
|
5296
|
-
|
|
5296
|
+
p((Y) => Y.map((ie) => ie.id.equals(I) ? {
|
|
5297
5297
|
...ie,
|
|
5298
5298
|
name: j
|
|
5299
5299
|
} : ie)), l.onSpecificationRenamed?.(e, I, j);
|
|
5300
5300
|
}, q = (I, j) => {
|
|
5301
|
-
g || !l.onSpecificationOpenStateSet || (
|
|
5301
|
+
g || !l.onSpecificationOpenStateSet || (p((Y) => Y.map((ie) => ie.id.equals(I) ? {
|
|
5302
5302
|
...ie,
|
|
5303
5303
|
collapsed: !j
|
|
5304
5304
|
} : ie)), l.onSpecificationOpenStateSet?.(e, I, j));
|
|
5305
5305
|
}, A = async (I) => {
|
|
5306
5306
|
if (!(g || C.current || !c.specificationsGenerate)) {
|
|
5307
|
-
C.current = !0,
|
|
5307
|
+
C.current = !0, h(!0);
|
|
5308
5308
|
try {
|
|
5309
5309
|
await c.specificationsGenerate.onActivate(e, I) && (R.current = Date.now() + $u);
|
|
5310
5310
|
} finally {
|
|
5311
|
-
C.current = !1,
|
|
5311
|
+
C.current = !1, h(!1);
|
|
5312
5312
|
}
|
|
5313
5313
|
}
|
|
5314
5314
|
}, P = async (I) => {
|
|
@@ -5320,9 +5320,9 @@ var bu = ({ state: e, specification: t }) => {
|
|
|
5320
5320
|
L.current = !1, f(!1);
|
|
5321
5321
|
}
|
|
5322
5322
|
}
|
|
5323
|
-
}, Z = c.specificationsGenerate, T = c.specificationsRunAll, z = !g && Z && (!Z.when || Z.when(e)), K =
|
|
5324
|
-
return n ? /* @__PURE__ */ a(re, { children:
|
|
5325
|
-
const { state: j, message:
|
|
5323
|
+
}, Z = c.specificationsGenerate, T = c.specificationsRunAll, z = !g && Z && (!Z.when || Z.when(e)), K = F.length > 0 && T && (!T.when || T.when(e));
|
|
5324
|
+
return n ? /* @__PURE__ */ a(re, { children: F.map((I) => {
|
|
5325
|
+
const { state: j, message: Y } = o(I);
|
|
5326
5326
|
return /* @__PURE__ */ a("div", {
|
|
5327
5327
|
"data-slice-spec-col": "true",
|
|
5328
5328
|
"data-slice-id": e.toString(),
|
|
@@ -5347,7 +5347,7 @@ var bu = ({ state: e, specification: t }) => {
|
|
|
5347
5347
|
className: "event-modeling-grid-specification-header event-modeling-grid-specification-header--compact",
|
|
5348
5348
|
children: /* @__PURE__ */ a(ya, {
|
|
5349
5349
|
state: j,
|
|
5350
|
-
message:
|
|
5350
|
+
message: Y
|
|
5351
5351
|
})
|
|
5352
5352
|
})
|
|
5353
5353
|
})]
|
|
@@ -5357,7 +5357,7 @@ var bu = ({ state: e, specification: t }) => {
|
|
|
5357
5357
|
K && /* @__PURE__ */ a("div", {
|
|
5358
5358
|
className: "event-modeling-grid-specification-run-all-area",
|
|
5359
5359
|
"data-slice-id": e.toString(),
|
|
5360
|
-
children: /* @__PURE__ */ a(
|
|
5360
|
+
children: /* @__PURE__ */ a(ye, {
|
|
5361
5361
|
content: T.tooltip,
|
|
5362
5362
|
position: "top",
|
|
5363
5363
|
children: /* @__PURE__ */ a("button", {
|
|
@@ -5372,8 +5372,8 @@ var bu = ({ state: e, specification: t }) => {
|
|
|
5372
5372
|
})
|
|
5373
5373
|
})
|
|
5374
5374
|
}),
|
|
5375
|
-
|
|
5376
|
-
const { state: j, message:
|
|
5375
|
+
F.map((I) => {
|
|
5376
|
+
const { state: j, message: Y } = o(I);
|
|
5377
5377
|
return /* @__PURE__ */ S("div", {
|
|
5378
5378
|
"data-slice-spec-col": "true",
|
|
5379
5379
|
"data-slice-id": e.toString(),
|
|
@@ -5388,7 +5388,7 @@ var bu = ({ state: e, specification: t }) => {
|
|
|
5388
5388
|
onRenamed: l.onSpecificationRenamed ? (ie) => E(I.id, ie) : void 0,
|
|
5389
5389
|
onDeleted: l.onSpecificationRemoved ? () => N(I.id) : void 0,
|
|
5390
5390
|
runState: j,
|
|
5391
|
-
runMessage:
|
|
5391
|
+
runMessage: Y,
|
|
5392
5392
|
builderResult: I.builderResult,
|
|
5393
5393
|
builderMessage: I.builderMessage,
|
|
5394
5394
|
nameNotice: i?.(I),
|
|
@@ -5408,7 +5408,7 @@ var bu = ({ state: e, specification: t }) => {
|
|
|
5408
5408
|
}),
|
|
5409
5409
|
!g && (l.onSpecificationAdded || z) && /* @__PURE__ */ S("div", {
|
|
5410
5410
|
className: "event-modeling-grid-specification-add-area",
|
|
5411
|
-
children: [l.onSpecificationAdded && /* @__PURE__ */ a(
|
|
5411
|
+
children: [l.onSpecificationAdded && /* @__PURE__ */ a(ye, {
|
|
5412
5412
|
content: u.specifications.add,
|
|
5413
5413
|
position: "top",
|
|
5414
5414
|
children: /* @__PURE__ */ a("button", {
|
|
@@ -5421,7 +5421,7 @@ var bu = ({ state: e, specification: t }) => {
|
|
|
5421
5421
|
"aria-label": u.specifications.add,
|
|
5422
5422
|
children: "+"
|
|
5423
5423
|
})
|
|
5424
|
-
}), z && /* @__PURE__ */ a(
|
|
5424
|
+
}), z && /* @__PURE__ */ a(ye, {
|
|
5425
5425
|
content: Z.tooltip,
|
|
5426
5426
|
position: "top",
|
|
5427
5427
|
children: /* @__PURE__ */ a("button", {
|
|
@@ -5509,8 +5509,8 @@ function Gu(e, t) {
|
|
|
5509
5509
|
t.fontFamily
|
|
5510
5510
|
]), [n, i];
|
|
5511
5511
|
}
|
|
5512
|
-
var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backgroundColor: t, textColor: n, isSelected: r = !1, disabled: o = !1, onSelected: i, onStartEdit: s, extraContent: d, children: l, ariaLabel: c, ariaPressed: u, "data-event-id": g, "data-card-id": v, "data-slice-id":
|
|
5513
|
-
const m = O(null),
|
|
5512
|
+
var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backgroundColor: t, textColor: n, isSelected: r = !1, disabled: o = !1, onSelected: i, onStartEdit: s, extraContent: d, children: l, ariaLabel: c, ariaPressed: u, "data-event-id": g, "data-card-id": v, "data-slice-id": p }) => {
|
|
5513
|
+
const m = O(null), h = !!(i ?? s) || o, b = kt(Le().textSize), [f, y] = Gu(e, {
|
|
5514
5514
|
fontFamily: Yu,
|
|
5515
5515
|
fontWeight: "bold",
|
|
5516
5516
|
maxFontSizePx: nr(13, b),
|
|
@@ -5548,7 +5548,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
5548
5548
|
}, C)) : y.lines[0]
|
|
5549
5549
|
}), d]
|
|
5550
5550
|
}), l] });
|
|
5551
|
-
return
|
|
5551
|
+
return h ? /* @__PURE__ */ a("button", {
|
|
5552
5552
|
className: "event-modeling-card",
|
|
5553
5553
|
style: k,
|
|
5554
5554
|
disabled: o,
|
|
@@ -5558,13 +5558,13 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
5558
5558
|
"aria-pressed": u,
|
|
5559
5559
|
"data-event-id": g,
|
|
5560
5560
|
"data-card-id": v,
|
|
5561
|
-
"data-slice-id":
|
|
5561
|
+
"data-slice-id": p,
|
|
5562
5562
|
children: R
|
|
5563
5563
|
}) : /* @__PURE__ */ a("div", {
|
|
5564
5564
|
className: "event-modeling-card",
|
|
5565
5565
|
"data-event-id": g,
|
|
5566
5566
|
"data-card-id": v,
|
|
5567
|
-
"data-slice-id":
|
|
5567
|
+
"data-slice-id": p,
|
|
5568
5568
|
children: R
|
|
5569
5569
|
});
|
|
5570
5570
|
}, Ae = {
|
|
@@ -5943,16 +5943,16 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
5943
5943
|
opacity: 0.8,
|
|
5944
5944
|
marginTop: 4
|
|
5945
5945
|
}, jr = ({ kind: e, artifactId: t, summary: n, description: r, tags: o, marker: i, schema: s, showDetails: d = !1, actions: l = [], onActivate: c, onSelected: u, ...g }) => {
|
|
5946
|
-
const v = _e(),
|
|
5946
|
+
const v = _e(), p = at(t), m = Ce(), h = dm(e, t, g.name, s), b = c ?? (v ? void 0 : h.onActivate), f = O(null), y = () => f.current?.getBoundingClientRect() ?? new DOMRect(), w = v ? [] : l.filter((R) => !R.when || !!t && R.when(t)), x = (R) => w.filter((M) => (M.corner ?? cm.end) === R), k = /* @__PURE__ */ S("div", {
|
|
5947
5947
|
ref: f,
|
|
5948
|
-
className:
|
|
5949
|
-
"data-board-change":
|
|
5950
|
-
children: [!c &&
|
|
5948
|
+
className: p ? "event-model-change-frame event-model-change-name" : void 0,
|
|
5949
|
+
"data-board-change": p,
|
|
5950
|
+
children: [!c && h.overlay, /* @__PURE__ */ a(ut, {
|
|
5951
5951
|
backgroundColor: jo[e].background,
|
|
5952
5952
|
textColor: jo[e].text,
|
|
5953
5953
|
extraContent: /* @__PURE__ */ S(re, { children: [
|
|
5954
5954
|
/* @__PURE__ */ a(Mt, {
|
|
5955
|
-
change:
|
|
5955
|
+
change: p,
|
|
5956
5956
|
kind: Cm(e, m),
|
|
5957
5957
|
name: g.name
|
|
5958
5958
|
}),
|
|
@@ -5969,7 +5969,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
5969
5969
|
}),
|
|
5970
5970
|
d && /* @__PURE__ */ a(Bt, {
|
|
5971
5971
|
title: g.name,
|
|
5972
|
-
schema:
|
|
5972
|
+
schema: h.schema,
|
|
5973
5973
|
showTitle: !1,
|
|
5974
5974
|
compact: !0
|
|
5975
5975
|
})
|
|
@@ -5982,7 +5982,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
5982
5982
|
u?.();
|
|
5983
5983
|
},
|
|
5984
5984
|
...g,
|
|
5985
|
-
ariaLabel:
|
|
5985
|
+
ariaLabel: p ? `${g.ariaLabel ?? g.name} · ${On(m, p)}` : g.ariaLabel
|
|
5986
5986
|
})]
|
|
5987
5987
|
});
|
|
5988
5988
|
return e === ue.event && w.length === 0 ? k : /* @__PURE__ */ S("div", {
|
|
@@ -6033,12 +6033,12 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6033
6033
|
}
|
|
6034
6034
|
})
|
|
6035
6035
|
}), Mm = 5, _n = ({ options: e, nameOf: t, color: n, searchPlaceholder: r, emptyLabel: o, onSelect: i, footer: s, trigger: d }) => {
|
|
6036
|
-
const [l, c] = D(!1), [u, g] = D(""), v = O(null),
|
|
6036
|
+
const [l, c] = D(!1), [u, g] = D(""), v = O(null), p = O(null), m = e.length > Mm, h = () => {
|
|
6037
6037
|
c(!1), g("");
|
|
6038
|
-
}, b = ge(() => [v,
|
|
6039
|
-
Dt(b,
|
|
6038
|
+
}, b = ge(() => [v, p], []);
|
|
6039
|
+
Dt(b, h, l);
|
|
6040
6040
|
const f = u ? e.filter((w) => t(w).toLowerCase().includes(u.toLowerCase())) : e, y = (w) => {
|
|
6041
|
-
i(w),
|
|
6041
|
+
i(w), h();
|
|
6042
6042
|
};
|
|
6043
6043
|
return /* @__PURE__ */ S("div", {
|
|
6044
6044
|
ref: v,
|
|
@@ -6054,7 +6054,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6054
6054
|
align: "right",
|
|
6055
6055
|
gap: 4,
|
|
6056
6056
|
children: /* @__PURE__ */ S("div", {
|
|
6057
|
-
ref:
|
|
6057
|
+
ref: p,
|
|
6058
6058
|
className: "event-modeling-grid-event-picker-dropdown",
|
|
6059
6059
|
children: [m && /* @__PURE__ */ a("input", {
|
|
6060
6060
|
className: "event-modeling-grid-event-picker-search",
|
|
@@ -6076,7 +6076,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6076
6076
|
className: "event-modeling-grid-event-picker-empty",
|
|
6077
6077
|
children: o
|
|
6078
6078
|
}),
|
|
6079
|
-
s?.(
|
|
6079
|
+
s?.(h)
|
|
6080
6080
|
]
|
|
6081
6081
|
})]
|
|
6082
6082
|
})
|
|
@@ -6104,7 +6104,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6104
6104
|
},
|
|
6105
6105
|
children: /* @__PURE__ */ a("i", { className: "pi pi-plus" })
|
|
6106
6106
|
})]
|
|
6107
|
-
}) : /* @__PURE__ */ a(
|
|
6107
|
+
}) : /* @__PURE__ */ a(ye, {
|
|
6108
6108
|
content: r,
|
|
6109
6109
|
position: "top",
|
|
6110
6110
|
children: /* @__PURE__ */ a("button", {
|
|
@@ -6157,7 +6157,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6157
6157
|
children: u.label
|
|
6158
6158
|
}) }, g))
|
|
6159
6159
|
] }),
|
|
6160
|
-
trigger: ({ toggle: c }) => /* @__PURE__ */ a(
|
|
6160
|
+
trigger: ({ toggle: c }) => /* @__PURE__ */ a(ye, {
|
|
6161
6161
|
content: d.addItem,
|
|
6162
6162
|
position: "top",
|
|
6163
6163
|
children: /* @__PURE__ */ a("button", {
|
|
@@ -6219,7 +6219,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6219
6219
|
} : void 0
|
|
6220
6220
|
})
|
|
6221
6221
|
});
|
|
6222
|
-
return Nm(r, o, i) ? /* @__PURE__ */ a(
|
|
6222
|
+
return Nm(r, o, i) ? /* @__PURE__ */ a(ye, {
|
|
6223
6223
|
content: /* @__PURE__ */ a(Ea, {
|
|
6224
6224
|
title: e,
|
|
6225
6225
|
values: r,
|
|
@@ -6311,22 +6311,22 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6311
6311
|
removed: new Set([...e.removed].filter((i) => i !== r))
|
|
6312
6312
|
};
|
|
6313
6313
|
}, Tm = (e, t, n) => {
|
|
6314
|
-
const r = e ===
|
|
6314
|
+
const r = e === B.stateChange ? Fn.events : e === B.stateView ? Fn.readModel : void 0;
|
|
6315
6315
|
return r === void 0 || r === Fn.readModel && (t.givenReadModel || t.givenContexts?.length) ? [] : n.filter((o) => o.kind === r && !t.givenContexts?.some((i) => i.givenContextId.equals(o.givenContextId)));
|
|
6316
6316
|
}, $m = ({ sliceId: e, sliceType: t, specification: n, contexts: r }) => {
|
|
6317
6317
|
const { editing: o, messages: i, navigation: s } = ne(), d = _e(), [l, c] = D(!1), u = O(!1), [g, v] = D({
|
|
6318
6318
|
added: [],
|
|
6319
6319
|
removed: /* @__PURE__ */ new Set()
|
|
6320
|
-
}),
|
|
6320
|
+
}), p = n.givenContexts ?? [], m = Am(g, p);
|
|
6321
6321
|
oe(() => {
|
|
6322
6322
|
m !== g && v(m);
|
|
6323
6323
|
}, [g, m]);
|
|
6324
|
-
const
|
|
6324
|
+
const h = Lm(p, m), b = new Set(m.added.map((w) => w.givenContextId.toString())), f = Tm(t, {
|
|
6325
6325
|
...n,
|
|
6326
|
-
givenContexts:
|
|
6326
|
+
givenContexts: h
|
|
6327
6327
|
}, r ?? []).filter((w) => !m.removed.has(w.givenContextId.toString()));
|
|
6328
6328
|
return {
|
|
6329
|
-
used:
|
|
6329
|
+
used: h,
|
|
6330
6330
|
offered: f,
|
|
6331
6331
|
busy: l,
|
|
6332
6332
|
execute: async (w, x) => {
|
|
@@ -6356,7 +6356,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6356
6356
|
saving: "Saving…"
|
|
6357
6357
|
}, _m = ({ sliceType: e, specification: t, contexts: n, state: r, labels: o = vn }) => {
|
|
6358
6358
|
const { used: i, offered: s, busy: d, execute: l, editing: c, messages: u, readOnly: g } = r;
|
|
6359
|
-
return g || n === void 0 || s.length === 0 && !d || !c.onGivenContextUsed || e !==
|
|
6359
|
+
return g || n === void 0 || s.length === 0 && !d || !c.onGivenContextUsed || e !== B.stateChange && e !== B.stateView ? null : /* @__PURE__ */ a(_n, {
|
|
6360
6360
|
options: s,
|
|
6361
6361
|
nameOf: (v) => v.name ?? "",
|
|
6362
6362
|
color: Ae.background,
|
|
@@ -6365,7 +6365,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6365
6365
|
onSelect: (v) => {
|
|
6366
6366
|
l(v, !1);
|
|
6367
6367
|
},
|
|
6368
|
-
trigger: ({ toggle: v }) => /* @__PURE__ */ a(
|
|
6368
|
+
trigger: ({ toggle: v }) => /* @__PURE__ */ a(ye, {
|
|
6369
6369
|
content: d ? o.saving : o.use,
|
|
6370
6370
|
position: "top",
|
|
6371
6371
|
children: /* @__PURE__ */ a("button", {
|
|
@@ -6373,10 +6373,10 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6373
6373
|
className: "event-modeling-grid-add-button--small use-given-context-button",
|
|
6374
6374
|
"aria-label": o.use,
|
|
6375
6375
|
"aria-busy": d || void 0,
|
|
6376
|
-
disabled: d || e ===
|
|
6376
|
+
disabled: d || e === B.stateView && (!!t.givenReadModel || i.length > 0),
|
|
6377
6377
|
onClick: v,
|
|
6378
6378
|
children: /* @__PURE__ */ a("i", {
|
|
6379
|
-
className: e ===
|
|
6379
|
+
className: e === B.stateView ? "pi pi-database" : "pi pi-list",
|
|
6380
6380
|
style: { fontSize: 10 }
|
|
6381
6381
|
})
|
|
6382
6382
|
})
|
|
@@ -6417,12 +6417,12 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6417
6417
|
onValuesSet: () => {
|
|
6418
6418
|
}
|
|
6419
6419
|
}), Fm = ({ sliceId: e, sliceType: t, specification: n, events: r, readModel: o, additionalReadModels: i = [], renamedReadModelName: s, contexts: d, contextLabels: l }) => {
|
|
6420
|
-
const { editing: c, messages: u } = ne(), g = _e(), { onGivenEventAdded: v, onGivenEventValuesSet:
|
|
6420
|
+
const { editing: c, messages: u } = ne(), g = _e(), { onGivenEventAdded: v, onGivenEventValuesSet: p, onGivenReadModelSet: m, onGivenReadModelValuesSet: h, onGivenEventRemoved: b, onGivenReadModelRemoved: f, onSpecificationItemOpened: y, onGivenReadModelAdded: w, onGivenReadModelItemValuesSet: x, onGivenReadModelItemRemoved: k } = c, R = Vr(g, y), { isQueryMode: M } = Wr(n), [C, L] = D(n.givenReadModels ?? []), [V, U] = D(n.given), [F, te] = D(n.givenReadModel), N = Te(Tn), [E, q] = D(() => ({
|
|
6421
6421
|
...Ma(n.given),
|
|
6422
6422
|
...n.givenReadModel ? { [n.givenReadModel.id.toString()]: n.givenReadModel.values ?? {} } : {},
|
|
6423
6423
|
...Object.fromEntries((n.givenReadModels ?? []).map((H) => [H.id.toString(), H.values ?? {}])),
|
|
6424
6424
|
...N.recall(n.id.toString())
|
|
6425
|
-
})), A = g || !(v ||
|
|
6425
|
+
})), A = g || !(v || p || m || h || b || f || R || w || x || k), P = A ? n.givenReadModels ?? [] : C, Z = A ? n.given : V, T = A ? n.givenReadModel : F, z = $m({
|
|
6426
6426
|
sliceId: e,
|
|
6427
6427
|
sliceType: t,
|
|
6428
6428
|
specification: {
|
|
@@ -6430,7 +6430,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6430
6430
|
givenReadModel: T ?? n.givenReadModel
|
|
6431
6431
|
},
|
|
6432
6432
|
contexts: d
|
|
6433
|
-
}), K = [...o ? [o] : [], ...i], I = K.find((H) => H.id.equals(T?.readModelItemId ?? pe.empty)), j = O(null),
|
|
6433
|
+
}), K = [...o ? [o] : [], ...i], I = K.find((H) => H.id.equals(T?.readModelItemId ?? pe.empty)), j = O(null), Y = ge(() => Rm(r), [r]), ie = ge(() => new Map(Y.map((H) => [H.id.toString(), H])), [Y]), $ = (H, me, xe, De, Et, X, fe) => R?.({
|
|
6434
6434
|
sliceId: e,
|
|
6435
6435
|
specificationId: n.id,
|
|
6436
6436
|
itemId: H,
|
|
@@ -6440,14 +6440,14 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6440
6440
|
values: (A ? fe : void 0) ?? E[H.toString()] ?? {},
|
|
6441
6441
|
host: De,
|
|
6442
6442
|
onValuesSet: (Ee) => {
|
|
6443
|
-
q((
|
|
6444
|
-
...
|
|
6443
|
+
q((Se) => ({
|
|
6444
|
+
...Se,
|
|
6445
6445
|
[H.toString()]: Ee
|
|
6446
|
-
})), N.remember(n.id.toString(), H.toString(), Ee),
|
|
6446
|
+
})), N.remember(n.id.toString(), H.toString(), Ee), X(Ee);
|
|
6447
6447
|
}
|
|
6448
6448
|
}), _ = (H) => {
|
|
6449
6449
|
const me = pe.create();
|
|
6450
|
-
|
|
6450
|
+
U((xe) => [...xe, {
|
|
6451
6451
|
id: me,
|
|
6452
6452
|
eventId: H.id,
|
|
6453
6453
|
name: H.name,
|
|
@@ -6459,12 +6459,12 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6459
6459
|
readModelItemId: H.id,
|
|
6460
6460
|
name: H.name,
|
|
6461
6461
|
values: me
|
|
6462
|
-
}), m?.(e, n.id, H.id, H.name),
|
|
6463
|
-
}, he = (H, me) => $(H.id, tt.readModel, H.name, me, H.schema, ee(H)),
|
|
6464
|
-
|
|
6462
|
+
}), m?.(e, n.id, H.id, H.name), h?.(e, n.id, me);
|
|
6463
|
+
}, he = (H, me) => $(H.id, tt.readModel, H.name, me, H.schema, ee(H)), Q = (H) => {
|
|
6464
|
+
U((me) => me.filter((xe) => !xe.id.equals(H))), b?.(e, n.id, H);
|
|
6465
6465
|
}, de = () => {
|
|
6466
6466
|
te(void 0), f?.(e, n.id);
|
|
6467
|
-
}, Pe = (H) => (me) =>
|
|
6467
|
+
}, Pe = (H) => (me) => p?.(e, n.id, H, me), Ve = (H) => {
|
|
6468
6468
|
const me = pe.create();
|
|
6469
6469
|
L((xe) => [...xe, {
|
|
6470
6470
|
id: me,
|
|
@@ -6490,25 +6490,25 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6490
6490
|
onOpen: R && (g || $e && x) && me ? (De) => $(H.id, tt.readModel, xe, De, me.schema, ke(H), H.values) : void 0
|
|
6491
6491
|
})
|
|
6492
6492
|
}, H.id.toString());
|
|
6493
|
-
}), ze = !g && t ===
|
|
6493
|
+
}), ze = !g && t === B.stateChange && !!v, le = !g && !M && K.length > 0 && !!m && !!y && !z.busy && !(t === B.stateView && z.used.length > 0) && Om(!0, !!T), ce = T && (I?.id.equals(o?.id ?? pe.empty) ? s ?? I.name : I?.name ?? T.name), we = T?.id ?? T?.readModelItemId, Be = T && we && ce !== void 0 && /* @__PURE__ */ a(He, {
|
|
6494
6494
|
name: ce,
|
|
6495
6495
|
onRemoved: f ? de : void 0,
|
|
6496
6496
|
children: /* @__PURE__ */ a(qe, {
|
|
6497
6497
|
name: ce,
|
|
6498
6498
|
colors: We,
|
|
6499
|
-
values: A ? T.values : E[
|
|
6500
|
-
onOpen: R && (g || m) && I ? (H) => $(
|
|
6499
|
+
values: A ? T.values : E[we.toString()] ?? T.values,
|
|
6500
|
+
onOpen: R && (g || m) && I ? (H) => $(we, tt.readModel, ce, H, I.schema, ee(I), T.values) : void 0
|
|
6501
6501
|
})
|
|
6502
|
-
},
|
|
6502
|
+
}, we.toString()), Oe = Z.map((H) => {
|
|
6503
6503
|
const me = ie.get(Sn(H))?.name ?? H.name;
|
|
6504
6504
|
return /* @__PURE__ */ a(He, {
|
|
6505
6505
|
name: me,
|
|
6506
|
-
onRemoved: b ? () =>
|
|
6506
|
+
onRemoved: b ? () => Q(H.id) : void 0,
|
|
6507
6507
|
children: /* @__PURE__ */ a(qe, {
|
|
6508
6508
|
name: me,
|
|
6509
6509
|
colors: Ae,
|
|
6510
6510
|
values: A ? H.values : E[H.id.toString()] ?? H.values,
|
|
6511
|
-
onOpen: R && (g ||
|
|
6511
|
+
onOpen: R && (g || p) ? (xe) => $(H.id, tt.event, me, xe, ie.get(Sn(H))?.schema, Pe(H.id), H.values) : void 0
|
|
6512
6512
|
})
|
|
6513
6513
|
}, H.id.toString());
|
|
6514
6514
|
}), Ge = {
|
|
@@ -6523,7 +6523,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6523
6523
|
headline: u.specifications.given,
|
|
6524
6524
|
actions: /* @__PURE__ */ S(re, { children: [
|
|
6525
6525
|
ze && /* @__PURE__ */ a(qt, {
|
|
6526
|
-
options:
|
|
6526
|
+
options: Y,
|
|
6527
6527
|
nameOf: (H) => H.name,
|
|
6528
6528
|
onChosen: _
|
|
6529
6529
|
}),
|
|
@@ -6536,7 +6536,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6536
6536
|
onSelect: (H) => {
|
|
6537
6537
|
j.current && he(H, j.current.getBoundingClientRect());
|
|
6538
6538
|
},
|
|
6539
|
-
trigger: ({ toggle: H }) => /* @__PURE__ */ a(
|
|
6539
|
+
trigger: ({ toggle: H }) => /* @__PURE__ */ a(ye, {
|
|
6540
6540
|
content: u.specifications.defineReadModel,
|
|
6541
6541
|
position: "top",
|
|
6542
6542
|
children: /* @__PURE__ */ a("button", {
|
|
@@ -6551,7 +6551,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6551
6551
|
})
|
|
6552
6552
|
})
|
|
6553
6553
|
}),
|
|
6554
|
-
le && K.length === 1 && /* @__PURE__ */ a(
|
|
6554
|
+
le && K.length === 1 && /* @__PURE__ */ a(ye, {
|
|
6555
6555
|
content: u.specifications.defineReadModel,
|
|
6556
6556
|
position: "top",
|
|
6557
6557
|
children: /* @__PURE__ */ a("button", {
|
|
@@ -6643,99 +6643,99 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6643
6643
|
...e?.eventSourceId ? { eventSourceId: e.eventSourceId } : {}
|
|
6644
6644
|
};
|
|
6645
6645
|
}, jm = (e, t) => t || Object.keys(e).length > 0, Vm = ({ sliceId: e, sliceType: t, specification: n, command: r, renamedCommandName: o, events: i = [], inputEvents: s = [], trigger: d, sliceName: l, queries: c = [] }) => {
|
|
6646
|
-
const { editing: u, messages: g } = ne(), v = _e(), { onWhenCommandSet:
|
|
6646
|
+
const { editing: u, messages: g } = ne(), v = _e(), { onWhenCommandSet: p, onWhenCommandValuesSet: m, onSpecificationItemOpened: h, onWhenEventRedelivered: b, onWhenRedeliveryRemoved: f, onWhenEventValuesSet: y, onWhenEventRemoved: w, onWhenQuerySet: x, onWhenQueryArgumentsSet: k, onWhenQueryRemoved: R } = u, M = Vr(v, h), C = Lu();
|
|
6647
6647
|
Wr(n);
|
|
6648
|
-
const [L, V] = D(n.whenQuery), [
|
|
6648
|
+
const [L, V] = D(n.whenQuery), [U, F] = D(n.when), [te, N] = D(n.whenRedelivered), E = Te(Tn), [q, A] = D(() => E.recall(n.id.toString()).when ?? n.when?.values ?? {}), P = v || !(p || m || M || b || f || y || w || x || k || R), [Z, T] = D(() => E.recall(n.id.toString())[Uo]), z = P ? n.whenEvent : Hm(n.whenEvent, Z), K = P ? n.whenRedelivered : te, I = P ? n.when : U ?? n.when, j = (X) => {
|
|
6649
6649
|
const fe = pe.create();
|
|
6650
|
-
|
|
6650
|
+
F({
|
|
6651
6651
|
id: fe,
|
|
6652
|
-
commandId:
|
|
6653
|
-
name:
|
|
6652
|
+
commandId: X.id,
|
|
6653
|
+
name: X.name,
|
|
6654
6654
|
values: {}
|
|
6655
|
-
}), A({}), E.remember(n.id.toString(), qo, {}),
|
|
6656
|
-
},
|
|
6655
|
+
}), A({}), E.remember(n.id.toString(), qo, {}), p?.(e, n.id, fe, X.id, X.name);
|
|
6656
|
+
}, Y = P ? n.whenQuery : L, ie = (X) => {
|
|
6657
6657
|
V({
|
|
6658
|
-
queryItemId:
|
|
6659
|
-
name:
|
|
6658
|
+
queryItemId: X.id,
|
|
6659
|
+
name: X.name,
|
|
6660
6660
|
arguments: {}
|
|
6661
|
-
}), C(n.id,
|
|
6661
|
+
}), C(n.id, X.id), x?.(e, n.id, X.id, X.name);
|
|
6662
6662
|
}, $ = () => {
|
|
6663
6663
|
V(void 0), C(n.id, void 0), R?.(e, n.id);
|
|
6664
|
-
}, _ = (
|
|
6665
|
-
const Ee = c.find((
|
|
6664
|
+
}, _ = (X, fe) => {
|
|
6665
|
+
const Ee = c.find((Se) => Se.id.equals(X.queryItemId));
|
|
6666
6666
|
return M?.({
|
|
6667
6667
|
sliceId: e,
|
|
6668
6668
|
specificationId: n.id,
|
|
6669
|
-
itemId:
|
|
6669
|
+
itemId: X.queryItemId,
|
|
6670
6670
|
kind: tt.query,
|
|
6671
|
-
name:
|
|
6671
|
+
name: X.name,
|
|
6672
6672
|
schema: Ee ? Wm(Ee) : void 0,
|
|
6673
|
-
values:
|
|
6673
|
+
values: X.arguments,
|
|
6674
6674
|
host: fe,
|
|
6675
|
-
onValuesSet: (
|
|
6675
|
+
onValuesSet: (Se) => {
|
|
6676
6676
|
V((Je) => Je && {
|
|
6677
6677
|
...Je,
|
|
6678
|
-
arguments:
|
|
6679
|
-
}), k?.(e, n.id,
|
|
6678
|
+
arguments: Se
|
|
6679
|
+
}), k?.(e, n.id, Se);
|
|
6680
6680
|
}
|
|
6681
6681
|
});
|
|
6682
|
-
}, ee = (
|
|
6683
|
-
N({ givenEventId:
|
|
6682
|
+
}, ee = (X) => {
|
|
6683
|
+
N({ givenEventId: X }), b?.(e, n.id, X);
|
|
6684
6684
|
}, he = () => {
|
|
6685
6685
|
N(void 0), f?.(e, n.id);
|
|
6686
|
-
},
|
|
6687
|
-
T(
|
|
6688
|
-
}, de = (
|
|
6689
|
-
const Ee = Un(z,
|
|
6686
|
+
}, Q = (X) => {
|
|
6687
|
+
T(X), E.remember(n.id.toString(), Uo, X);
|
|
6688
|
+
}, de = (X, fe) => {
|
|
6689
|
+
const Ee = Un(z, X);
|
|
6690
6690
|
return M?.({
|
|
6691
6691
|
sliceId: e,
|
|
6692
6692
|
specificationId: n.id,
|
|
6693
|
-
itemId:
|
|
6693
|
+
itemId: X.id,
|
|
6694
6694
|
kind: tt.event,
|
|
6695
|
-
name:
|
|
6696
|
-
schema:
|
|
6695
|
+
name: X.name,
|
|
6696
|
+
schema: X.schema,
|
|
6697
6697
|
values: Ee ? z?.values ?? {} : {},
|
|
6698
6698
|
host: fe,
|
|
6699
|
-
onValuesSet: (
|
|
6700
|
-
jm(
|
|
6699
|
+
onValuesSet: (Se) => {
|
|
6700
|
+
jm(Se, Ee) && (Q({
|
|
6701
6701
|
from: hr(n.whenEvent),
|
|
6702
|
-
eventId:
|
|
6703
|
-
name:
|
|
6704
|
-
values:
|
|
6705
|
-
}), y?.(e, n.id,
|
|
6702
|
+
eventId: X.id.toString(),
|
|
6703
|
+
name: X.name,
|
|
6704
|
+
values: Se
|
|
6705
|
+
}), y?.(e, n.id, X.id, X.name, Se, z?.eventSourceId));
|
|
6706
6706
|
}
|
|
6707
6707
|
});
|
|
6708
6708
|
}, Pe = () => {
|
|
6709
|
-
|
|
6709
|
+
Q({
|
|
6710
6710
|
from: hr(n.whenEvent),
|
|
6711
6711
|
eventId: z?.eventId.toString() ?? "",
|
|
6712
6712
|
name: z?.name ?? ""
|
|
6713
6713
|
}), w?.(e, n.id);
|
|
6714
|
-
}, Ve = !!M && (v || !!y), Ue = (
|
|
6714
|
+
}, Ve = !!M && (v || !!y), Ue = (X, fe, Ee, Se, Je) => M?.({
|
|
6715
6715
|
sliceId: e,
|
|
6716
6716
|
specificationId: n.id,
|
|
6717
|
-
itemId:
|
|
6717
|
+
itemId: X,
|
|
6718
6718
|
kind: tt.command,
|
|
6719
6719
|
name: Ee,
|
|
6720
6720
|
schema: fe && r?.id.equals(fe) ? r.schema : void 0,
|
|
6721
6721
|
values: Je,
|
|
6722
|
-
host:
|
|
6722
|
+
host: Se,
|
|
6723
6723
|
onValuesSet: (It) => {
|
|
6724
|
-
A(It),
|
|
6724
|
+
A(It), F((Jt) => Jt && {
|
|
6725
6725
|
...Jt,
|
|
6726
6726
|
values: It
|
|
6727
6727
|
}), E.remember(n.id.toString(), qo, It), m?.(e, n.id, It);
|
|
6728
6728
|
}
|
|
6729
|
-
}), ke = t ===
|
|
6729
|
+
}), ke = t === B.stateChange ? r : void 0, Ye = t === B.stateView ? i : t === B.translator ? s : [], $e = !!ke && !!I && (I.commandId ? ke.id.equals(I.commandId) : !I.name || I.name === ke.name), Ke = I && (I.commandId && r?.id.equals(I.commandId) ? o ?? I.name : I.name), Fe = !!M && (v || !!m), ze = $e && I ? I.id : ke?.id, le = $e ? P ? I?.values : q : void 0, ce = n.caller, we = P ? I?.values : q, Be = t === B.automation || t === B.translator, Oe = K && n.given.find((X) => X.id.equals(K.givenEventId));
|
|
6730
6730
|
if (Be && K && Oe) {
|
|
6731
|
-
const
|
|
6731
|
+
const X = i.find((Ee) => Ee.id.equals(Oe.eventId))?.name ?? Oe.name, fe = l ? g.specifications.redeliveredTo.replace("{slice}", l) : g.specifications.redelivered;
|
|
6732
6732
|
return /* @__PURE__ */ S(yt, {
|
|
6733
6733
|
headline: g.specifications.when,
|
|
6734
6734
|
children: [/* @__PURE__ */ a(He, {
|
|
6735
|
-
name:
|
|
6735
|
+
name: X,
|
|
6736
6736
|
onRemoved: f ? he : void 0,
|
|
6737
6737
|
children: /* @__PURE__ */ a(qe, {
|
|
6738
|
-
name:
|
|
6738
|
+
name: X,
|
|
6739
6739
|
colors: Ae,
|
|
6740
6740
|
values: Oe.values
|
|
6741
6741
|
}, Oe.id.toString())
|
|
@@ -6745,25 +6745,25 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6745
6745
|
})]
|
|
6746
6746
|
});
|
|
6747
6747
|
}
|
|
6748
|
-
if (
|
|
6749
|
-
const
|
|
6748
|
+
if (Y) {
|
|
6749
|
+
const X = !v && !Y.legacy, fe = c.find((Se) => Se.id.equals(Y.queryItemId)), Ee = fe?.name ?? Y.name;
|
|
6750
6750
|
return /* @__PURE__ */ a(yt, {
|
|
6751
6751
|
headline: g.specifications.when,
|
|
6752
6752
|
children: /* @__PURE__ */ a(He, {
|
|
6753
6753
|
name: Ee,
|
|
6754
|
-
onRemoved:
|
|
6754
|
+
onRemoved: X && R ? $ : void 0,
|
|
6755
6755
|
children: /* @__PURE__ */ a(qe, {
|
|
6756
6756
|
name: Ee,
|
|
6757
6757
|
colors: Wo,
|
|
6758
|
-
values:
|
|
6759
|
-
onOpen: (v ||
|
|
6760
|
-
},
|
|
6758
|
+
values: Y.arguments,
|
|
6759
|
+
onOpen: (v || X && k) && M && fe && fe.parameters.length > 0 ? (Se) => _(Y, Se) : void 0
|
|
6760
|
+
}, Y.queryItemId.toString())
|
|
6761
6761
|
})
|
|
6762
6762
|
});
|
|
6763
6763
|
}
|
|
6764
|
-
const Ge = t ===
|
|
6765
|
-
if (z && !Ge.some((
|
|
6766
|
-
const
|
|
6764
|
+
const Ge = t === B.stateView ? i : [];
|
|
6765
|
+
if (z && !Ge.some((X) => Un(z, X))) {
|
|
6766
|
+
const X = i.find((Se) => Se.id.equals(z.eventId) || Se.name.toLowerCase() === z.name.toLowerCase()), fe = X?.name ?? z.name, Ee = g.specifications.values ?? $t;
|
|
6767
6767
|
return /* @__PURE__ */ a(yt, {
|
|
6768
6768
|
headline: g.specifications.when,
|
|
6769
6769
|
children: /* @__PURE__ */ a(He, {
|
|
@@ -6774,28 +6774,28 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6774
6774
|
colors: Ae,
|
|
6775
6775
|
values: z.values,
|
|
6776
6776
|
message: z.eventSourceId ? Vo(z.eventSourceId, Ee) : void 0,
|
|
6777
|
-
onOpen: Ve &&
|
|
6777
|
+
onOpen: Ve && X ? (Se) => de(X, Se) : void 0
|
|
6778
6778
|
}, z.id.toString())
|
|
6779
6779
|
})
|
|
6780
6780
|
});
|
|
6781
6781
|
}
|
|
6782
6782
|
const H = !!I && Object.keys(I.values ?? {}).length > 0, me = Be ? Bm(n.given, d, i, s) : [], xe = !v && !H && b && me.length > 0 ? [{
|
|
6783
6783
|
heading: g.specifications.redeliverGivenEvent,
|
|
6784
|
-
options: me.map((
|
|
6785
|
-
label: i.find((fe) => fe.id.equals(
|
|
6786
|
-
onChosen: () => ee(
|
|
6784
|
+
options: me.map((X) => ({
|
|
6785
|
+
label: i.find((fe) => fe.id.equals(X.eventId))?.name ?? X.name,
|
|
6786
|
+
onChosen: () => ee(X.id)
|
|
6787
6787
|
}))
|
|
6788
|
-
}] : [], De = !v && t ===
|
|
6788
|
+
}] : [], De = !v && t === B.stateView && !z && !I && !K && c.length > 0 && !!x, Et = !v && t !== B.stateChange && t !== B.stateView && !I && !!r && !!p;
|
|
6789
6789
|
return /* @__PURE__ */ S(yt, {
|
|
6790
6790
|
headline: g.specifications.when,
|
|
6791
6791
|
actions: (Et || xe.length > 0 || De) && (De ? /* @__PURE__ */ a(qt, {
|
|
6792
6792
|
options: c,
|
|
6793
|
-
nameOf: (
|
|
6793
|
+
nameOf: (X) => X.name,
|
|
6794
6794
|
onChosen: ie,
|
|
6795
6795
|
color: Wo.background
|
|
6796
6796
|
}) : /* @__PURE__ */ a(qt, {
|
|
6797
6797
|
options: Et && r ? [r] : [],
|
|
6798
|
-
nameOf: (
|
|
6798
|
+
nameOf: (X) => X.name,
|
|
6799
6799
|
onChosen: j,
|
|
6800
6800
|
groups: xe
|
|
6801
6801
|
})),
|
|
@@ -6803,52 +6803,52 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6803
6803
|
I && Ke && !$e && /* @__PURE__ */ a(qe, {
|
|
6804
6804
|
name: Ke,
|
|
6805
6805
|
colors: Ft,
|
|
6806
|
-
values:
|
|
6806
|
+
values: we,
|
|
6807
6807
|
caller: ce,
|
|
6808
|
-
onOpen: Fe ? (
|
|
6808
|
+
onOpen: Fe ? (X) => Ue(I.id, I.commandId, Ke, X, we ?? {}) : void 0
|
|
6809
6809
|
}, I.id.toString()),
|
|
6810
6810
|
ke && ze && /* @__PURE__ */ a(qe, {
|
|
6811
6811
|
name: ke.name,
|
|
6812
6812
|
colors: Ft,
|
|
6813
6813
|
values: le,
|
|
6814
6814
|
caller: ce,
|
|
6815
|
-
onOpen: Fe ? (
|
|
6815
|
+
onOpen: Fe ? (X) => Ue(ze, ke.id, ke.name, X, le ?? {}) : void 0
|
|
6816
6816
|
}, ze.toString()),
|
|
6817
|
-
Ye.map((
|
|
6818
|
-
const fe = t ===
|
|
6819
|
-
name:
|
|
6820
|
-
colors: t ===
|
|
6817
|
+
Ye.map((X) => {
|
|
6818
|
+
const fe = t === B.stateView && Un(z, X), Ee = Ge.find((Je) => Je.id.equals(X.id)), Se = /* @__PURE__ */ a(qe, {
|
|
6819
|
+
name: X.name,
|
|
6820
|
+
colors: t === B.translator ? mr : Ae,
|
|
6821
6821
|
caller: ce,
|
|
6822
6822
|
values: fe ? z?.values : void 0,
|
|
6823
6823
|
message: fe && z?.eventSourceId ? Vo(z.eventSourceId, g.specifications.values ?? $t) : void 0,
|
|
6824
6824
|
onOpen: Ve && Ee ? (Je) => de(Ee, Je) : void 0
|
|
6825
|
-
},
|
|
6825
|
+
}, X.id.toString());
|
|
6826
6826
|
return fe ? /* @__PURE__ */ a(He, {
|
|
6827
|
-
name:
|
|
6827
|
+
name: X.name,
|
|
6828
6828
|
onRemoved: w ? Pe : void 0,
|
|
6829
|
-
children:
|
|
6830
|
-
},
|
|
6829
|
+
children: Se
|
|
6830
|
+
}, X.id.toString()) : Se;
|
|
6831
6831
|
})
|
|
6832
6832
|
]
|
|
6833
6833
|
});
|
|
6834
6834
|
}, Gm = (e) => {
|
|
6835
6835
|
switch (e) {
|
|
6836
|
-
case
|
|
6836
|
+
case B.stateChange:
|
|
6837
6837
|
return {
|
|
6838
6838
|
events: !0,
|
|
6839
6839
|
errors: !0,
|
|
6840
6840
|
readModel: !1,
|
|
6841
6841
|
noEvents: !0
|
|
6842
6842
|
};
|
|
6843
|
-
case
|
|
6844
|
-
case
|
|
6843
|
+
case B.automation:
|
|
6844
|
+
case B.translator:
|
|
6845
6845
|
return {
|
|
6846
6846
|
events: !0,
|
|
6847
6847
|
errors: !1,
|
|
6848
6848
|
readModel: !1,
|
|
6849
6849
|
noEvents: !0
|
|
6850
6850
|
};
|
|
6851
|
-
case
|
|
6851
|
+
case B.stateView:
|
|
6852
6852
|
return {
|
|
6853
6853
|
events: !1,
|
|
6854
6854
|
errors: !1,
|
|
@@ -6918,11 +6918,11 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6918
6918
|
disabled: n
|
|
6919
6919
|
});
|
|
6920
6920
|
}, Zm = ({ sliceId: e, sliceType: t, specification: n, events: r, command: o, readModel: i, renamedEventNames: s = {}, extra: d, extraGroups: l, queries: c = [], onItemsChanged: u }) => {
|
|
6921
|
-
const { editing: g, messages: v } = ne(),
|
|
6921
|
+
const { editing: g, messages: v } = ne(), p = _e(), { onThenEventAdded: m, onThenEventValuesSet: h, onThenErrorAdded: b, onThenRuleErrorAdded: f, onThenErrorRenamed: y, onThenEventRemoved: w, onThenErrorRemoved: x, onThenReadModelValuesSet: k, onSpecificationItemOpened: R, onThenNoEventsExpected: M, onThenNoEventsRemoved: C, onThenEventsInAnyOrderExpected: L, onThenEventsInAnyOrderRemoved: V, onThenResultAdded: U, onThenResultValuesSet: F, onThenResultRemoved: te, onThenQueryRemoved: N } = g, E = Vr(p, R), { isQueryMode: q, queryItemId: A } = Wr(n), [P, Z] = D(n.thenReadModels ?? []), [T, z] = D(n.thenEvents), [K, I] = D(n.thenErrors), [j, Y] = D(n.thenNoEvents === !0), [ie, $] = D(n.thenEventsInAnyOrder === !0), _ = Te(Tn), ee = _.recall(n.id.toString()), [he, Q] = D(() => ({
|
|
6922
6922
|
...Ma(n.thenEvents),
|
|
6923
6923
|
...Object.fromEntries((n.thenReadModels ?? []).map((W) => [W.id.toString(), W.values ?? {}])),
|
|
6924
6924
|
...ee
|
|
6925
|
-
})), de = n.thenReadModel, Pe = !!de && !!i && i.id.equals(de.readModelItemId), [Ve, Ue] = D(() => ee[i?.id.toString() ?? ""] ?? (Pe ? de?.values : void 0) ?? {}), ke =
|
|
6925
|
+
})), de = n.thenReadModel, Pe = !!de && !!i && i.id.equals(de.readModelItemId), [Ve, Ue] = D(() => ee[i?.id.toString() ?? ""] ?? (Pe ? de?.values : void 0) ?? {}), ke = p || !(m || h || b || f || y || w || x || k || E || M || C || L || V || U || F || te || N), Ye = ke ? n.thenReadModels ?? [] : P, $e = ke ? n.thenNoEvents === !0 : j, Ke = ke ? n.thenEventsInAnyOrder === !0 : ie, Fe = ke ? n.thenEvents : T, ze = ke ? n.thenErrors : K;
|
|
6926
6926
|
oe(() => {
|
|
6927
6927
|
u?.(Fe.length, ze.length);
|
|
6928
6928
|
}, [
|
|
@@ -6930,16 +6930,16 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6930
6930
|
Fe.length,
|
|
6931
6931
|
ze.length
|
|
6932
6932
|
]);
|
|
6933
|
-
const le = ge(() => new Map(r.map((W) => [W.id.toString(), W])), [r]), ce = ge(() => Ym(o, r), [o, r]),
|
|
6933
|
+
const le = ge(() => new Map(r.map((W) => [W.id.toString(), W])), [r]), ce = ge(() => Ym(o, r), [o, r]), we = Gm(t), Be = c.find((W) => A && W.id.equals(A)), Oe = !p && q && n.whenQuery?.legacy !== !0, Ge = Be ? zm(Be) : !0, H = (W) => {
|
|
6934
6934
|
const ve = pe.create();
|
|
6935
6935
|
Z((be) => [...be, {
|
|
6936
6936
|
id: ve,
|
|
6937
6937
|
readModelItemId: W.id,
|
|
6938
6938
|
name: W.name
|
|
6939
|
-
}]),
|
|
6939
|
+
}]), U?.(e, n.id, ve, W.id, W.name);
|
|
6940
6940
|
}, me = (W) => {
|
|
6941
6941
|
Z((ve) => ve.filter((be) => !be.id.equals(W))), te?.(e, n.id, W);
|
|
6942
|
-
}, xe = n.whenQuery?.legacy === !0 ? n.whenQuery.storedQueryId : void 0, De = xe && N && !
|
|
6942
|
+
}, xe = n.whenQuery?.legacy === !0 ? n.whenQuery.storedQueryId : void 0, De = xe && N && !p ? () => {
|
|
6943
6943
|
Z([]), N(e, n.id, xe);
|
|
6944
6944
|
} : void 0, Et = q && De && Ye.length === 0 && n.whenQuery ? /* @__PURE__ */ a(He, {
|
|
6945
6945
|
name: n.whenQuery.name,
|
|
@@ -6948,7 +6948,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6948
6948
|
name: n.whenQuery.name,
|
|
6949
6949
|
colors: We
|
|
6950
6950
|
})
|
|
6951
|
-
}, xe?.toString()) : void 0,
|
|
6951
|
+
}, xe?.toString()) : void 0, X = q ? Ye.map((W, ve) => {
|
|
6952
6952
|
const be = i?.id.equals(W.readModelItemId) ? i.name : W.name;
|
|
6953
6953
|
return /* @__PURE__ */ a(He, {
|
|
6954
6954
|
name: be,
|
|
@@ -6957,7 +6957,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6957
6957
|
name: be,
|
|
6958
6958
|
colors: We,
|
|
6959
6959
|
values: ke ? W.values : he[W.id.toString()] ?? W.values,
|
|
6960
|
-
onOpen: (
|
|
6960
|
+
onOpen: (p || Oe && F) && E && i ? (nt) => E({
|
|
6961
6961
|
sliceId: e,
|
|
6962
6962
|
specificationId: n.id,
|
|
6963
6963
|
itemId: W.id,
|
|
@@ -6967,18 +6967,18 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6967
6967
|
values: he[W.id.toString()] ?? W.values ?? {},
|
|
6968
6968
|
host: nt,
|
|
6969
6969
|
onValuesSet: (st) => {
|
|
6970
|
-
|
|
6970
|
+
Q((Gt) => ({
|
|
6971
6971
|
...Gt,
|
|
6972
6972
|
[W.id.toString()]: st
|
|
6973
6973
|
})), _.remember(n.id.toString(), W.id.toString(), st), Z((Gt) => Gt.map((Dn) => Dn.id.equals(W.id) ? {
|
|
6974
6974
|
...Dn,
|
|
6975
6975
|
values: st
|
|
6976
|
-
} : Dn)),
|
|
6976
|
+
} : Dn)), F?.(e, n.id, W.id, W.readModelItemId, be, st);
|
|
6977
6977
|
}
|
|
6978
6978
|
}) : void 0
|
|
6979
6979
|
})
|
|
6980
6980
|
}, W.id.toString());
|
|
6981
|
-
}) : [], fe = Oe && !!
|
|
6981
|
+
}) : [], fe = Oe && !!U && !!i && (Ge || Ye.length === 0), Ee = (W) => {
|
|
6982
6982
|
const ve = pe.create();
|
|
6983
6983
|
z((be) => [...be, {
|
|
6984
6984
|
id: ve,
|
|
@@ -6986,7 +6986,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
6986
6986
|
name: W.name,
|
|
6987
6987
|
values: {}
|
|
6988
6988
|
}]), m?.(e, n.id, ve, W.id, W.name);
|
|
6989
|
-
},
|
|
6989
|
+
}, Se = () => {
|
|
6990
6990
|
const W = pe.create(), ve = v.specifications.error;
|
|
6991
6991
|
I((be) => [...be, {
|
|
6992
6992
|
id: W,
|
|
@@ -7005,9 +7005,9 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7005
7005
|
name: ve
|
|
7006
7006
|
} : nt)), y?.(e, n.id, W, ve);
|
|
7007
7007
|
}, Jt = () => {
|
|
7008
|
-
|
|
7008
|
+
Y(!0), M?.(e, n.id);
|
|
7009
7009
|
}, Xa = () => {
|
|
7010
|
-
|
|
7010
|
+
Y(!1), C?.(e, n.id);
|
|
7011
7011
|
}, Qa = () => {
|
|
7012
7012
|
$(!0), L?.(e, n.id);
|
|
7013
7013
|
}, Za = () => {
|
|
@@ -7025,7 +7025,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7025
7025
|
name: be,
|
|
7026
7026
|
colors: Ae,
|
|
7027
7027
|
values: ke ? W.values : he[W.id.toString()] ?? W.values,
|
|
7028
|
-
onOpen: E && (
|
|
7028
|
+
onOpen: E && (p || h) ? (nt) => E({
|
|
7029
7029
|
sliceId: e,
|
|
7030
7030
|
specificationId: n.id,
|
|
7031
7031
|
itemId: W.id,
|
|
@@ -7035,10 +7035,10 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7035
7035
|
values: (ke ? W.values : he[W.id.toString()]) ?? {},
|
|
7036
7036
|
host: nt,
|
|
7037
7037
|
onValuesSet: (st) => {
|
|
7038
|
-
|
|
7038
|
+
Q((Gt) => ({
|
|
7039
7039
|
...Gt,
|
|
7040
7040
|
[W.id.toString()]: st
|
|
7041
|
-
})), _.remember(n.id.toString(), W.id.toString(), st),
|
|
7041
|
+
})), _.remember(n.id.toString(), W.id.toString(), st), h?.(e, n.id, W.id, st);
|
|
7042
7042
|
}
|
|
7043
7043
|
}) : void 0
|
|
7044
7044
|
})
|
|
@@ -7050,14 +7050,14 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7050
7050
|
textColor: bt.text
|
|
7051
7051
|
}) : /* @__PURE__ */ a(Qm, {
|
|
7052
7052
|
name: W.name,
|
|
7053
|
-
onRenamed: !
|
|
7053
|
+
onRenamed: !p && y ? (nt) => It(W.id, nt) : void 0
|
|
7054
7054
|
});
|
|
7055
7055
|
return /* @__PURE__ */ a("div", {
|
|
7056
7056
|
className: "event-modeling-spec-error",
|
|
7057
7057
|
children: /* @__PURE__ */ a(He, {
|
|
7058
7058
|
name: ve,
|
|
7059
7059
|
onRemoved: x ? () => Ja(W.id) : void 0,
|
|
7060
|
-
children: W.message ? /* @__PURE__ */ a(
|
|
7060
|
+
children: W.message ? /* @__PURE__ */ a(ye, {
|
|
7061
7061
|
content: /* @__PURE__ */ a(Ea, {
|
|
7062
7062
|
title: ve,
|
|
7063
7063
|
message: W.message
|
|
@@ -7083,19 +7083,19 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7083
7083
|
backgroundColor: Ae.background,
|
|
7084
7084
|
textColor: Ae.text
|
|
7085
7085
|
})
|
|
7086
|
-
}, "events-in-any-order"), ns =
|
|
7086
|
+
}, "events-in-any-order"), ns = we.noEvents && !!L && !Ke && !$e && Fe.length > 0, no = [...we.noEvents && M && !$e && Fe.length === 0 && ze.length === 0 ? [{
|
|
7087
7087
|
label: v.specifications.noEvents,
|
|
7088
7088
|
onChosen: Jt
|
|
7089
7089
|
}] : [], ...ns ? [{
|
|
7090
7090
|
label: v.specifications.eventsInAnyOrder,
|
|
7091
7091
|
onChosen: Qa
|
|
7092
|
-
}] : []], ro =
|
|
7092
|
+
}] : []], ro = we.errors && !$e ? [...b ? [{
|
|
7093
7093
|
label: v.specifications.addError,
|
|
7094
|
-
onChosen:
|
|
7094
|
+
onChosen: Se
|
|
7095
7095
|
}] : [], ...f ? ce.map((W) => ({
|
|
7096
7096
|
label: W.label,
|
|
7097
7097
|
onChosen: () => Je(W.reference)
|
|
7098
|
-
})) : []] : [], rs =
|
|
7098
|
+
})) : []] : [], rs = we.events && m && !$e ? r : [], oo = l ?? [], os = oo.some((W) => W.options.length > 0);
|
|
7099
7099
|
if (q) return /* @__PURE__ */ S(yt, {
|
|
7100
7100
|
headline: v.specifications.then,
|
|
7101
7101
|
actions: fe && i && /* @__PURE__ */ a(qt, {
|
|
@@ -7108,7 +7108,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7108
7108
|
children: [
|
|
7109
7109
|
eo,
|
|
7110
7110
|
to,
|
|
7111
|
-
|
|
7111
|
+
X,
|
|
7112
7112
|
Et,
|
|
7113
7113
|
/* @__PURE__ */ a(vr, {
|
|
7114
7114
|
declaration: n.outcomes,
|
|
@@ -7116,14 +7116,14 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7116
7116
|
})
|
|
7117
7117
|
]
|
|
7118
7118
|
});
|
|
7119
|
-
const is =
|
|
7119
|
+
const is = we.events && m !== void 0 && !$e || ro.length > 0 || os || no.length > 0, as = !p && is && /* @__PURE__ */ a(qt, {
|
|
7120
7120
|
options: rs,
|
|
7121
7121
|
nameOf: (W) => W.name,
|
|
7122
7122
|
onChosen: Ee,
|
|
7123
7123
|
errors: ro,
|
|
7124
7124
|
statements: no,
|
|
7125
7125
|
groups: oo
|
|
7126
|
-
}), io = t ===
|
|
7126
|
+
}), io = t === B.stateView && i && l === void 0, ao = Pe ? ke ? de?.values : Ve : void 0, ss = !!de && l === void 0 && !(io && Pe);
|
|
7127
7127
|
return /* @__PURE__ */ S(yt, {
|
|
7128
7128
|
headline: v.specifications.then,
|
|
7129
7129
|
actions: as,
|
|
@@ -7144,7 +7144,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7144
7144
|
kind: tt.readModel,
|
|
7145
7145
|
name: i.name,
|
|
7146
7146
|
schema: i.schema,
|
|
7147
|
-
values: (
|
|
7147
|
+
values: (p ? ao : Ve) ?? {},
|
|
7148
7148
|
host: W,
|
|
7149
7149
|
onValuesSet: (ve) => {
|
|
7150
7150
|
Ue(ve), _.remember(n.id.toString(), i.id.toString(), ve), k?.(e, n.id, i.id, i.name, ve);
|
|
@@ -7200,7 +7200,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7200
7200
|
})
|
|
7201
7201
|
});
|
|
7202
7202
|
}, eg = (e) => e.slice.preview ? /* @__PURE__ */ a(Jm, { ...e }) : /* @__PURE__ */ a(Na, { ...e }), Na = ({ slice: e, collapsed: t, moduleId: n, featureId: r, collection: o, rows: i, heights: s, priorEvents: d, followingEvents: l = [], externalEvents: c, slots: u, controls: g, header: v }) => {
|
|
7203
|
-
const { detailLevel:
|
|
7203
|
+
const { detailLevel: p, detailsVisibility: m } = Le(), h = wi(p, Si(m, n.toString(), r.toString(), e.id.toString())), b = /* @__PURE__ */ a(Pv, {
|
|
7204
7204
|
featureId: r,
|
|
7205
7205
|
slice: e,
|
|
7206
7206
|
eventCount: e.events.length,
|
|
@@ -7229,7 +7229,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7229
7229
|
body: (f) => f ? /* @__PURE__ */ S(re, { children: [u?.sliceBodyOverlay ? u.sliceBodyOverlay(e, t) : /* @__PURE__ */ a(Km, {
|
|
7230
7230
|
slice: e,
|
|
7231
7231
|
collapsed: t,
|
|
7232
|
-
showDetails:
|
|
7232
|
+
showDetails: h
|
|
7233
7233
|
}), /* @__PURE__ */ a(Jv, {
|
|
7234
7234
|
sliceType: e.sliceType,
|
|
7235
7235
|
contentRows: i,
|
|
@@ -7242,7 +7242,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7242
7242
|
collapsed: t
|
|
7243
7243
|
}, x = {
|
|
7244
7244
|
...w,
|
|
7245
|
-
showDetails:
|
|
7245
|
+
showDetails: h
|
|
7246
7246
|
};
|
|
7247
7247
|
if (u?.sliceCell) {
|
|
7248
7248
|
const k = u.sliceCell(e, y);
|
|
@@ -7266,7 +7266,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7266
7266
|
return /* @__PURE__ */ a(ch, {
|
|
7267
7267
|
...w,
|
|
7268
7268
|
sliceType: e.sliceType,
|
|
7269
|
-
isSystemSlice: !!y.actor && (e.sliceType ===
|
|
7269
|
+
isSystemSlice: !!y.actor && (e.sliceType === B.automation || e.sliceType === B.translator),
|
|
7270
7270
|
triggerType: e.automationTrigger?.type,
|
|
7271
7271
|
reactionRefusals: e.reactionRefusals,
|
|
7272
7272
|
reactionInvocations: e.reactionInvocations
|
|
@@ -7354,13 +7354,13 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7354
7354
|
children: e.name
|
|
7355
7355
|
})]
|
|
7356
7356
|
})
|
|
7357
|
-
}), tg = ({ feature: e, options: t, moduleId: n, collection: r, rows: o, heights: i, slices: s, externalEvents: d, slots: l, editor: c, onSliceArea: u, sliceAreas: g, renderHeader: v, onSlicesChanged:
|
|
7358
|
-
const m = O(null), { textSize:
|
|
7357
|
+
}), tg = ({ feature: e, options: t, moduleId: n, collection: r, rows: o, heights: i, slices: s, externalEvents: d, slots: l, editor: c, onSliceArea: u, sliceAreas: g, renderHeader: v, onSlicesChanged: p }) => {
|
|
7358
|
+
const m = O(null), { textSize: h } = Le(), b = G((M) => Pn(M, kt(h)), [h]), f = (M) => s.slice(0, s.findIndex((C) => C.id.equals(M))).filter((C) => C.sliceType === B.stateChange).flatMap((C) => C.events), y = (M) => s.slice(s.findIndex((C) => C.id.equals(M)) + 1).filter((C) => C.sliceType === B.stateChange).flatMap((C) => C.events), w = G(async (M, C, L) => {
|
|
7359
7359
|
const V = g.get(C.toString());
|
|
7360
7360
|
V?.moveIn(M, L);
|
|
7361
7361
|
try {
|
|
7362
|
-
const
|
|
7363
|
-
return V?.completeMoveIn(M.id,
|
|
7362
|
+
const U = await c.onMoveSlice?.(M, e.id, C, L) ?? !1;
|
|
7363
|
+
return V?.completeMoveIn(M.id, U), U;
|
|
7364
7364
|
} catch {
|
|
7365
7365
|
return V?.completeMoveIn(M.id, !1), !1;
|
|
7366
7366
|
}
|
|
@@ -7406,7 +7406,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7406
7406
|
featureCollapsed: t.collapsed,
|
|
7407
7407
|
hideEmptyPlaceholder: t.headerVisibility === "hidden",
|
|
7408
7408
|
createSlice: (M) => M,
|
|
7409
|
-
onSlicesChanged:
|
|
7409
|
+
onSlicesChanged: p,
|
|
7410
7410
|
takenArtifactNames: k,
|
|
7411
7411
|
onAddSlice: c.onAddSlice ? (M, C) => c.onAddSlice?.(e.id, M, C) ?? Promise.resolve(void 0) : void 0,
|
|
7412
7412
|
onReorderSlices: c.onReorderSlices ? (M) => c.onReorderSlices?.(e.id, M) ?? Promise.resolve(!1) : void 0,
|
|
@@ -7437,10 +7437,10 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7437
7437
|
} : V)), c.onSliceCollapseChanged?.(e.id, M.id, !C.sliceCollapsed);
|
|
7438
7438
|
} : void 0,
|
|
7439
7439
|
onRenamed: c.onSliceRenamed ? (L) => {
|
|
7440
|
-
m.current?.updateSlices((V) => V.map((
|
|
7441
|
-
...
|
|
7440
|
+
m.current?.updateSlices((V) => V.map((U) => U.id.equals(M.id) ? {
|
|
7441
|
+
...U,
|
|
7442
7442
|
name: L
|
|
7443
|
-
} :
|
|
7443
|
+
} : U)), c.onSliceRenamed?.(e.id, M.id, L);
|
|
7444
7444
|
} : void 0,
|
|
7445
7445
|
onMoveToFeature: c.onMoveSlice ? (L) => x(M, L) : void 0,
|
|
7446
7446
|
onDuplicated: c.onSliceDuplicated ? (L) => {
|
|
@@ -7457,10 +7457,10 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7457
7457
|
addSubFeature: (f, y) => u.current?.addSubFeature(f, y) ?? Promise.resolve(),
|
|
7458
7458
|
updateFeature: (f, y) => u.current?.updateFeature(f, y)
|
|
7459
7459
|
}), []);
|
|
7460
|
-
const
|
|
7460
|
+
const p = Qt(n).map((f) => f.slice), m = Qt({
|
|
7461
7461
|
...n,
|
|
7462
7462
|
modules: n.modules.filter((f) => !f.id.equals(t))
|
|
7463
|
-
}).flatMap((f) => f.slice.events),
|
|
7463
|
+
}).flatMap((f) => f.slice.events), h = (f) => d.onAddSlice ? (y, w) => c.current.get(f.toString())?.addSlice(y, void 0, w) : void 0, b = (f, y) => s?.featureHeader?.(f, y) ?? /* @__PURE__ */ a(pu, {
|
|
7464
7464
|
featureId: f.id,
|
|
7465
7465
|
name: f.name,
|
|
7466
7466
|
description: f.description,
|
|
@@ -7491,7 +7491,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7491
7491
|
...y,
|
|
7492
7492
|
onDragStart: y.onDragStart ? (w) => y.onDragStart?.(f.id, f.name, w) : void 0,
|
|
7493
7493
|
onAddSubFeature: y.addSubFeature,
|
|
7494
|
-
onAddSlice:
|
|
7494
|
+
onAddSlice: h(f.id)
|
|
7495
7495
|
}),
|
|
7496
7496
|
renderColumn: (f, y) => /* @__PURE__ */ a(tg, {
|
|
7497
7497
|
feature: f,
|
|
@@ -7500,7 +7500,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7500
7500
|
collection: n,
|
|
7501
7501
|
rows: o,
|
|
7502
7502
|
heights: i,
|
|
7503
|
-
slices:
|
|
7503
|
+
slices: p,
|
|
7504
7504
|
externalEvents: m,
|
|
7505
7505
|
slots: s,
|
|
7506
7506
|
editor: d,
|
|
@@ -7514,13 +7514,13 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7514
7514
|
},
|
|
7515
7515
|
renderHeader: (w) => b(f, {
|
|
7516
7516
|
...w,
|
|
7517
|
-
onAddSlice:
|
|
7517
|
+
onAddSlice: h(f.id)
|
|
7518
7518
|
})
|
|
7519
7519
|
})
|
|
7520
7520
|
});
|
|
7521
|
-
}, rg = ({ module: e, liveFeatures: t, index: n, collection: r, rows: o, heights: i, slots: s, editor: d, dragging: l, onDragStart: c, onAddModule: u, onToggleCollapse: g, onRenamed: v, onFeaturesChanged:
|
|
7522
|
-
const m = O(null),
|
|
7523
|
-
|
|
7521
|
+
}, rg = ({ module: e, liveFeatures: t, index: n, collection: r, rows: o, heights: i, slots: s, editor: d, dragging: l, onDragStart: c, onAddModule: u, onToggleCollapse: g, onRenamed: v, onFeaturesChanged: p }) => {
|
|
7522
|
+
const m = O(null), h = O(null), b = d.onAddFeature ? (M) => {
|
|
7523
|
+
h.current?.addFeature(M);
|
|
7524
7524
|
} : void 0, f = Rr(m, void 0, "heavy"), { density: y, textSize: w } = Le(), x = kt(w), k = ia(e.name, t ?? e.features, y, x), R = /* @__PURE__ */ a(Lc, {
|
|
7525
7525
|
moduleId: e.id,
|
|
7526
7526
|
collectionId: r.id,
|
|
@@ -7553,7 +7553,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7553
7553
|
width: k
|
|
7554
7554
|
}),
|
|
7555
7555
|
content: f ? /* @__PURE__ */ a(ng, {
|
|
7556
|
-
ref:
|
|
7556
|
+
ref: h,
|
|
7557
7557
|
moduleId: e.id,
|
|
7558
7558
|
collection: r,
|
|
7559
7559
|
features: e.features,
|
|
@@ -7561,7 +7561,7 @@ var Uu = 250, Yu = "Inter, Helvetica, Arial, sans-serif", ut = ({ name: e, backg
|
|
|
7561
7561
|
heights: i,
|
|
7562
7562
|
slots: s,
|
|
7563
7563
|
editor: d,
|
|
7564
|
-
onFeaturesChanged: (M) =>
|
|
7564
|
+
onFeaturesChanged: (M) => p?.(e.id, M)
|
|
7565
7565
|
}) : /* @__PURE__ */ a(Ac, {
|
|
7566
7566
|
width: k,
|
|
7567
7567
|
height: ra(r, o, i),
|
|
@@ -7585,10 +7585,10 @@ function ig(e, t) {
|
|
|
7585
7585
|
features: n.features.map((r) => Oa(t, r))
|
|
7586
7586
|
}));
|
|
7587
7587
|
}
|
|
7588
|
-
var ag = () => 1, sg = ({ collection: e, getZoom: t = ag, slots: n, onDeselect: r, onCollectionMoving: o, onCollectionMoved: i, onCollectionMoveCanceled: s, canMove: d, onAddModule: l, onModulesReordered: c, onCollapseChanged: u, onRenameModule: g, onModulesChanged: v, onFeaturesChanged:
|
|
7589
|
-
const { readOnly: N, editing: E } = ne(), [q, A] = D(/* @__PURE__ */ new Map()), P = G((le, ce) => A((
|
|
7588
|
+
var ag = () => 1, sg = ({ collection: e, getZoom: t = ag, slots: n, onDeselect: r, onCollectionMoving: o, onCollectionMoved: i, onCollectionMoveCanceled: s, canMove: d, onAddModule: l, onModulesReordered: c, onCollapseChanged: u, onRenameModule: g, onModulesChanged: v, onFeaturesChanged: p, onPersistenceError: m, rowLabels: h, onActorsReordered: b, onAddFeature: f, onRenameFeature: y, onFeatureCollapseChanged: w, onFeatureRowExpand: x, onFeaturesReordered: k, onAddSlice: R, onReorderSlices: M, onMoveSlice: C, validateSliceDrop: L, onSliceCollapseChanged: V, onSliceRenamed: U, onSliceDuplicated: F, takenArtifactNames: te }) => {
|
|
7589
|
+
const { readOnly: N, editing: E } = ne(), [q, A] = D(/* @__PURE__ */ new Map()), P = G((le, ce) => A((we) => new Map(we).set(le.toString(), ce)), []), Z = ge(() => ig(e.modules, q), [e.modules, q]), T = N ? {
|
|
7590
7590
|
onFeatureCollapseChanged: P,
|
|
7591
|
-
onSliceCollapseChanged: (le, ce,
|
|
7591
|
+
onSliceCollapseChanged: (le, ce, we) => P(ce, we)
|
|
7592
7592
|
} : {
|
|
7593
7593
|
onAddFeature: f,
|
|
7594
7594
|
onRenameFeature: y,
|
|
@@ -7600,16 +7600,16 @@ var ag = () => 1, sg = ({ collection: e, getZoom: t = ag, slots: n, onDeselect:
|
|
|
7600
7600
|
onMoveSlice: C,
|
|
7601
7601
|
validateSliceDrop: L,
|
|
7602
7602
|
onSliceCollapseChanged: V,
|
|
7603
|
-
onSliceRenamed:
|
|
7604
|
-
onSliceDuplicated:
|
|
7603
|
+
onSliceRenamed: U,
|
|
7604
|
+
onSliceDuplicated: F,
|
|
7605
7605
|
takenArtifactNames: te
|
|
7606
|
-
}, [z, K] = D(e.modules), [I, j] = D(/* @__PURE__ */ new Map()),
|
|
7606
|
+
}, [z, K] = D(e.modules), [I, j] = D(/* @__PURE__ */ new Map()), Y = O(null), [ie, $] = D(0), _ = !!(l || c || u || g || b || f || y || w || x || k || R || M || C || V || U || F || d && o && i || og(E)), ee = N || !_, he = N ? Z : e.modules, Q = (ee ? he : z).map((le) => ({
|
|
7607
7607
|
...le,
|
|
7608
7608
|
features: ee ? le.features : I.get(le.id.toString()) ?? le.features
|
|
7609
7609
|
})), de = {
|
|
7610
7610
|
...e,
|
|
7611
|
-
modules:
|
|
7612
|
-
}, Pe = Tr(de), Ve = sa(), Ue = na(de, Ve, Le().textSize), ke = Qt(de), Ye = ke.length > 0 &&
|
|
7611
|
+
modules: Q
|
|
7612
|
+
}, Pe = Tr(de), Ve = sa(), Ue = na(de, Ve, Le().textSize), ke = Qt(de), Ye = ke.length > 0 && Q.some((le) => !le.collapsed), $e = !!(d && o && i), Ke = _c(ke.map(({ slice: le }) => ({
|
|
7613
7613
|
id: le.id.toString(),
|
|
7614
7614
|
name: le.name,
|
|
7615
7615
|
events: le.events.map((ce) => ({
|
|
@@ -7619,20 +7619,20 @@ var ag = () => 1, sg = ({ collection: e, getZoom: t = ag, slots: n, onDeselect:
|
|
|
7619
7619
|
})),
|
|
7620
7620
|
automationTriggerEventId: le.automationTrigger?.eventId?.toString()
|
|
7621
7621
|
}))), Fe = G(() => {
|
|
7622
|
-
const le =
|
|
7622
|
+
const le = Y.current;
|
|
7623
7623
|
if (!le) return;
|
|
7624
|
-
const ce = le.querySelector(".event-modeling-grid-slice-column-header"),
|
|
7625
|
-
$((Be) => $l(Be,
|
|
7624
|
+
const ce = le.querySelector(".event-modeling-grid-slice-column-header"), we = ce ? Math.max(0, Math.round((ce.getBoundingClientRect().bottom - le.getBoundingClientRect().top) / t() - 4)) : 0;
|
|
7625
|
+
$((Be) => $l(Be, we));
|
|
7626
7626
|
}, [t]);
|
|
7627
7627
|
xt(Fe), oe(() => {
|
|
7628
|
-
const le =
|
|
7628
|
+
const le = Y.current;
|
|
7629
7629
|
if (!le) return;
|
|
7630
7630
|
const ce = new ResizeObserver(Fe);
|
|
7631
7631
|
ce.observe(le);
|
|
7632
|
-
const
|
|
7633
|
-
|
|
7632
|
+
const we = le.querySelector(".event-modeling-grid-slices-area");
|
|
7633
|
+
we && ce.observe(we);
|
|
7634
7634
|
const Be = le.querySelector(".event-modeling-grid-slice-column-header");
|
|
7635
|
-
for (let Oe = Be; Oe && Oe !==
|
|
7635
|
+
for (let Oe = Be; Oe && Oe !== we && Oe !== le; Oe = Oe.parentElement) {
|
|
7636
7636
|
ce.observe(Oe);
|
|
7637
7637
|
for (let Ge = Oe.previousElementSibling; Ge; Ge = Ge.previousElementSibling) ce.observe(Ge);
|
|
7638
7638
|
}
|
|
@@ -7665,14 +7665,14 @@ var ag = () => 1, sg = ({ collection: e, getZoom: t = ag, slots: n, onDeselect:
|
|
|
7665
7665
|
onCollectionMoveCanceled: s
|
|
7666
7666
|
}), /* @__PURE__ */ S("div", {
|
|
7667
7667
|
className: "event-modeling-grid-content-row",
|
|
7668
|
-
ref:
|
|
7668
|
+
ref: Y,
|
|
7669
7669
|
children: [
|
|
7670
|
-
Ye && (
|
|
7670
|
+
Ye && (h ? h(ze) : /* @__PURE__ */ a(nc, { ...ze })),
|
|
7671
7671
|
Ye && /* @__PURE__ */ a(Uc, {
|
|
7672
|
-
container:
|
|
7672
|
+
container: Y,
|
|
7673
7673
|
getZoom: t
|
|
7674
7674
|
}),
|
|
7675
|
-
!Ye && $e &&
|
|
7675
|
+
!Ye && $e && Q.length > 0 && /* @__PURE__ */ a("div", {
|
|
7676
7676
|
"aria-hidden": "true",
|
|
7677
7677
|
style: {
|
|
7678
7678
|
width: 56,
|
|
@@ -7708,8 +7708,8 @@ var ag = () => 1, sg = ({ collection: e, getZoom: t = ag, slots: n, onDeselect:
|
|
|
7708
7708
|
onToggleCollapse: ce.onToggleCollapse,
|
|
7709
7709
|
onRenamed: ce.onRenamed,
|
|
7710
7710
|
editor: T,
|
|
7711
|
-
onFeaturesChanged: (
|
|
7712
|
-
j((Oe) => new Map(Oe).set(
|
|
7711
|
+
onFeaturesChanged: (we, Be) => {
|
|
7712
|
+
j((Oe) => new Map(Oe).set(we.toString(), Be)), p?.(we, Be);
|
|
7713
7713
|
}
|
|
7714
7714
|
})
|
|
7715
7715
|
})
|
|
@@ -7911,12 +7911,12 @@ var ag = () => 1, sg = ({ collection: e, getZoom: t = ag, slots: n, onDeselect:
|
|
|
7911
7911
|
center: Rl(i.start, i.end)
|
|
7912
7912
|
}];
|
|
7913
7913
|
}), pg = 2e3, fg = ({ links: e, collections: t, getZoom: n, onCollectionsLinked: r, onCollectionsUnlinked: o, onPersistenceError: i }) => {
|
|
7914
|
-
const s = ne(), d = s.messages.links, l = s.readOnly ? void 0 : r, c = s.readOnly ? void 0 : o, [u, g] = D(null), [v,
|
|
7914
|
+
const s = ne(), d = s.messages.links, l = s.readOnly ? void 0 : r, c = s.readOnly ? void 0 : o, [u, g] = D(null), [v, p] = D(() => mg(e)), m = O(v), h = (A) => {
|
|
7915
7915
|
const P = A(m.current);
|
|
7916
|
-
m.current = P,
|
|
7916
|
+
m.current = P, p(P);
|
|
7917
7917
|
};
|
|
7918
7918
|
oe(() => {
|
|
7919
|
-
e !== m.current.snapshot &&
|
|
7919
|
+
e !== m.current.snapshot && h((A) => Gr(A, e));
|
|
7920
7920
|
}, [e]);
|
|
7921
7921
|
const b = Cn(v), f = O(null), y = O(null), w = `module-collection-link-arrow-${Ht().replace(/:/g, "")}`, x = ge(() => new Map(t.map((A) => {
|
|
7922
7922
|
const P = {
|
|
@@ -7974,27 +7974,27 @@ var ag = () => 1, sg = ({ collection: e, getZoom: t = ag, slots: n, onDeselect:
|
|
|
7974
7974
|
targetCollectionId: z.id
|
|
7975
7975
|
}, I = it(P.sourceId, z.id);
|
|
7976
7976
|
if (!(m.current.pending.has(I) || Cn(m.current).some((j) => it(j.sourceCollectionId, j.targetCollectionId) === I))) {
|
|
7977
|
-
|
|
7977
|
+
h((j) => gg(j, K));
|
|
7978
7978
|
try {
|
|
7979
7979
|
const j = await l(P.sourceId, z.id);
|
|
7980
|
-
|
|
7980
|
+
h((Y) => Yo(Y, K, j));
|
|
7981
7981
|
} catch (j) {
|
|
7982
|
-
if (
|
|
7982
|
+
if (h((Y) => Yo(Y, K)), i) i(j);
|
|
7983
7983
|
else throw j;
|
|
7984
7984
|
}
|
|
7985
7985
|
}
|
|
7986
|
-
},
|
|
7986
|
+
}, U = async (A) => {
|
|
7987
7987
|
if (!(!c || m.current.pending.size > 0)) {
|
|
7988
|
-
|
|
7988
|
+
h((P) => vg(P, A));
|
|
7989
7989
|
try {
|
|
7990
7990
|
const P = await c(A);
|
|
7991
|
-
|
|
7991
|
+
h((Z) => Xo(Z, A, P));
|
|
7992
7992
|
} catch (P) {
|
|
7993
|
-
if (
|
|
7993
|
+
if (h((Z) => Xo(Z, A, !1)), i) i(P);
|
|
7994
7994
|
else throw P;
|
|
7995
7995
|
}
|
|
7996
7996
|
}
|
|
7997
|
-
},
|
|
7997
|
+
}, F = () => {
|
|
7998
7998
|
f.current = null, y.current = null, g(null);
|
|
7999
7999
|
}, te = Array.from(x.values());
|
|
8000
8000
|
if (te.length === 0) return null;
|
|
@@ -8067,7 +8067,7 @@ var ag = () => 1, sg = ({ collection: e, getZoom: t = ag, slots: n, onDeselect:
|
|
|
8067
8067
|
onPointerDown: C(A, Z, T),
|
|
8068
8068
|
onPointerMove: L,
|
|
8069
8069
|
onPointerUp: V,
|
|
8070
|
-
onPointerCancel:
|
|
8070
|
+
onPointerCancel: F
|
|
8071
8071
|
}, `${A.toString()}-${Z}`);
|
|
8072
8072
|
})),
|
|
8073
8073
|
c && v.pending.size === 0 && k.map(({ link: A, center: P }) => /* @__PURE__ */ a("button", {
|
|
@@ -8080,7 +8080,7 @@ var ag = () => 1, sg = ({ collection: e, getZoom: t = ag, slots: n, onDeselect:
|
|
|
8080
8080
|
title: d.removeLink,
|
|
8081
8081
|
onPointerDown: (Z) => Z.stopPropagation(),
|
|
8082
8082
|
onClick: () => {
|
|
8083
|
-
|
|
8083
|
+
U(A.id);
|
|
8084
8084
|
},
|
|
8085
8085
|
children: /* @__PURE__ */ a("i", { className: "pi pi-times" })
|
|
8086
8086
|
}, A.id.toString()))
|
|
@@ -8157,8 +8157,8 @@ var kg = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
8157
8157
|
g.current = () => {
|
|
8158
8158
|
const m = t.current;
|
|
8159
8159
|
if (!s.current || !m || u.length === 0) return;
|
|
8160
|
-
const
|
|
8161
|
-
c((b) => kg(b,
|
|
8160
|
+
const h = wg(s.current, m, u, n(), r);
|
|
8161
|
+
c((b) => kg(b, h) ? b : h);
|
|
8162
8162
|
}, xt(() => g.current(), [
|
|
8163
8163
|
u,
|
|
8164
8164
|
o,
|
|
@@ -8166,10 +8166,10 @@ var kg = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
8166
8166
|
]), oe(() => {
|
|
8167
8167
|
const m = t.current;
|
|
8168
8168
|
if (!m || u.length === 0 || (g.current(), typeof MutationObserver > "u")) return;
|
|
8169
|
-
let
|
|
8169
|
+
let h;
|
|
8170
8170
|
const b = new MutationObserver(() => {
|
|
8171
|
-
|
|
8172
|
-
|
|
8171
|
+
h === void 0 && (h = requestAnimationFrame(() => {
|
|
8172
|
+
h = void 0, g.current();
|
|
8173
8173
|
}));
|
|
8174
8174
|
});
|
|
8175
8175
|
return b.observe(m, {
|
|
@@ -8178,12 +8178,12 @@ var kg = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
8178
8178
|
attributes: !0,
|
|
8179
8179
|
attributeFilter: ["class", "data-collapsed"]
|
|
8180
8180
|
}), () => {
|
|
8181
|
-
b.disconnect(),
|
|
8181
|
+
b.disconnect(), h !== void 0 && cancelAnimationFrame(h);
|
|
8182
8182
|
};
|
|
8183
8183
|
}, [t, u]);
|
|
8184
8184
|
const v = ge(() => Mg(e, l), [e, l]);
|
|
8185
8185
|
if (e.length === 0) return null;
|
|
8186
|
-
const
|
|
8186
|
+
const p = i.sliceLinks ?? Ze.sliceLinks;
|
|
8187
8187
|
return /* @__PURE__ */ a("div", {
|
|
8188
8188
|
ref: s,
|
|
8189
8189
|
className: "slice-link-layer",
|
|
@@ -8215,7 +8215,7 @@ var kg = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
8215
8215
|
})
|
|
8216
8216
|
})] }), v.map((m) => /* @__PURE__ */ S("g", {
|
|
8217
8217
|
role: "img",
|
|
8218
|
-
"aria-label": m.label ? `${
|
|
8218
|
+
"aria-label": m.label ? `${p[m.emphasis]}: ${m.label}` : p[m.emphasis],
|
|
8219
8219
|
"data-slice-link": m.emphasis,
|
|
8220
8220
|
children: [/* @__PURE__ */ a("path", {
|
|
8221
8221
|
d: m.path,
|
|
@@ -8362,7 +8362,7 @@ var kg = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
8362
8362
|
}
|
|
8363
8363
|
}, ln = 50, dn = () => {
|
|
8364
8364
|
}, _g = (e) => e.stopPropagation(), $a = ls(({ notes: e, boardRoot: t }, n) => {
|
|
8365
|
-
const { editing: r, actions: o, messages: i } = ne(), s = uv(), d = O(new $g(e)), l = O(/* @__PURE__ */ new Set()), c = O(!1), u = O(/* @__PURE__ */ new Set()), g = O(/* @__PURE__ */ new Set()), [v,
|
|
8365
|
+
const { editing: r, actions: o, messages: i } = ne(), s = uv(), d = O(new $g(e)), l = O(/* @__PURE__ */ new Set()), c = O(!1), u = O(/* @__PURE__ */ new Set()), g = O(/* @__PURE__ */ new Set()), [v, p] = D(0), [m, h] = D(), [b, f] = D(), y = O(null), w = ge(() => [y], []), x = G(() => p((N) => N + 1), []);
|
|
8366
8366
|
oe(() => {
|
|
8367
8367
|
d.current.reconcile(e), x();
|
|
8368
8368
|
}, [e, x]), oe(() => {
|
|
@@ -8373,7 +8373,7 @@ var kg = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
8373
8373
|
}, Math.max(0, N - Date.now()));
|
|
8374
8374
|
return () => clearTimeout(E);
|
|
8375
8375
|
}, [v, x]);
|
|
8376
|
-
const k = G((N, E, q) => l.current.has(N) ? Promise.resolve() : (l.current.add(N), d.current.change(N, E), d.current.begin(N, E), x(), Promise.resolve().then(q).then((A) => (A === !1 && (d.current.rollback(N, E), d.current.get(N) ||
|
|
8376
|
+
const k = G((N, E, q) => l.current.has(N) ? Promise.resolve() : (l.current.add(N), d.current.change(N, E), d.current.begin(N, E), x(), Promise.resolve().then(q).then((A) => (A === !1 && (d.current.rollback(N, E), d.current.get(N) || h((P) => P === N ? void 0 : P), x()), A !== !1)).catch((A) => (d.current.rollback(N, E), d.current.get(N) || h((P) => P === N ? void 0 : P), x(), o.stickyNoteError ? o.stickyNoteError(A) : console.error(A), !1)).finally(() => {
|
|
8377
8377
|
d.current.settle(N, E), l.current.delete(N), x();
|
|
8378
8378
|
})), [o, x]);
|
|
8379
8379
|
jt(n, () => ({ add(N) {
|
|
@@ -8390,7 +8390,7 @@ var kg = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
8390
8390
|
height: ln,
|
|
8391
8391
|
text: i.stickyNotes.newNote
|
|
8392
8392
|
};
|
|
8393
|
-
|
|
8393
|
+
h(q.id), k(q.id, q, () => E(q)).then((A) => {
|
|
8394
8394
|
A && o.stickyNoteCreated?.(q);
|
|
8395
8395
|
}).finally(() => {
|
|
8396
8396
|
c.current = !1, o.stickyNoteCreatingChanged?.(!1);
|
|
@@ -8401,7 +8401,7 @@ var kg = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
8401
8401
|
i,
|
|
8402
8402
|
k
|
|
8403
8403
|
]);
|
|
8404
|
-
const R = r.onStickyNoteMoved || r.onStickyNoteResized || r.onStickyNoteTextChanged || r.onStickyNoteRemoved ?
|
|
8404
|
+
const R = r.onStickyNoteMoved || r.onStickyNoteResized || r.onStickyNoteTextChanged || r.onStickyNoteRemoved ? h : void 0;
|
|
8405
8405
|
Dt(w, () => R?.(void 0), m !== void 0 && !!R);
|
|
8406
8406
|
const M = (N, E) => {
|
|
8407
8407
|
const q = d.current.get(N);
|
|
@@ -8427,20 +8427,20 @@ var kg = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
8427
8427
|
width: E.width,
|
|
8428
8428
|
height: E.height
|
|
8429
8429
|
}));
|
|
8430
|
-
},
|
|
8430
|
+
}, U = (N, E) => {
|
|
8431
8431
|
const q = d.current.get(N);
|
|
8432
8432
|
q && q.text !== E && r.onStickyNoteTextChanged && k(N, {
|
|
8433
8433
|
...q,
|
|
8434
8434
|
text: E
|
|
8435
8435
|
}, () => r.onStickyNoteTextChanged?.(N, E));
|
|
8436
|
-
},
|
|
8436
|
+
}, F = (N, E) => {
|
|
8437
8437
|
const q = d.current.get(N);
|
|
8438
8438
|
q && (q.colour ?? ft.yellow) !== E && r.onStickyNoteColourChanged && k(N, {
|
|
8439
8439
|
...q,
|
|
8440
8440
|
colour: E
|
|
8441
8441
|
}, () => r.onStickyNoteColourChanged?.(N, E));
|
|
8442
8442
|
}, te = G((N) => {
|
|
8443
|
-
!d.current.get(N) || !r.onStickyNoteRemoved || l.current.has(N) || (
|
|
8443
|
+
!d.current.get(N) || !r.onStickyNoteRemoved || l.current.has(N) || (h((E) => E === N ? void 0 : E), k(N, null, () => r.onStickyNoteRemoved?.(N)));
|
|
8444
8444
|
}, [r, k]);
|
|
8445
8445
|
return oe(() => {
|
|
8446
8446
|
if (!r.onStickyNoteRemoved || m === void 0) return;
|
|
@@ -8497,12 +8497,12 @@ var kg = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
8497
8497
|
height: z
|
|
8498
8498
|
}) : dn,
|
|
8499
8499
|
onResizeEnd: r.onStickyNoteResized ? V : void 0,
|
|
8500
|
-
onTextChange: r.onStickyNoteTextChanged ?
|
|
8500
|
+
onTextChange: r.onStickyNoteTextChanged ? U : dn,
|
|
8501
8501
|
onExpandedChange: (A, P) => f((Z) => P ? A : Z === A ? void 0 : Z)
|
|
8502
8502
|
}),
|
|
8503
8503
|
m === N.id && r.onStickyNoteColourChanged && !l.current.has(N.id) && /* @__PURE__ */ a(Tg, {
|
|
8504
8504
|
current: N.colour,
|
|
8505
|
-
onPick: (A) =>
|
|
8505
|
+
onPick: (A) => F(N.id, A)
|
|
8506
8506
|
}),
|
|
8507
8507
|
l.current.has(N.id) && /* @__PURE__ */ a("span", {
|
|
8508
8508
|
className: "event-model-sticky-note__progress",
|
|
@@ -8519,8 +8519,8 @@ $a.displayName = "StickyNotes";
|
|
|
8519
8519
|
var _a = gi(({ collection: e, estimatedSize: t, measuredSize: n, onSize: r, getZoom: o, canMove: i, onCollectionMoving: s, onCollectionMoved: d, onCollectionMoveCanceled: l, content: c, onGridMounted: u }) => {
|
|
8520
8520
|
const g = G((v) => /* @__PURE__ */ a("div", {
|
|
8521
8521
|
style: { display: "contents" },
|
|
8522
|
-
ref: (
|
|
8523
|
-
u?.(v.collection, !!
|
|
8522
|
+
ref: (p) => {
|
|
8523
|
+
u?.(v.collection, !!p);
|
|
8524
8524
|
},
|
|
8525
8525
|
children: /* @__PURE__ */ a(sg, {
|
|
8526
8526
|
...v,
|
|
@@ -8728,14 +8728,14 @@ function ev(e, t, n, r, o, i, s = 1, d = {
|
|
|
8728
8728
|
x: 0,
|
|
8729
8729
|
y: 0
|
|
8730
8730
|
}) {
|
|
8731
|
-
const l = e.toString().toLowerCase(), c = O(null), u = O(null), [g, v] = D(!1),
|
|
8731
|
+
const l = e.toString().toLowerCase(), c = O(null), u = O(null), [g, v] = D(!1), p = O({
|
|
8732
8732
|
zoom: s,
|
|
8733
8733
|
pan: d
|
|
8734
|
-
}), m = O(/* @__PURE__ */ new Map()),
|
|
8734
|
+
}), m = O(/* @__PURE__ */ new Map()), h = O(0), b = O(void 0);
|
|
8735
8735
|
oe(() => () => {
|
|
8736
|
-
|
|
8736
|
+
h.current++, b.current = void 0;
|
|
8737
8737
|
}, []), oe(() => () => {
|
|
8738
|
-
|
|
8738
|
+
h.current++;
|
|
8739
8739
|
}, [l]);
|
|
8740
8740
|
const f = G((k, R) => {
|
|
8741
8741
|
const M = k.id.toString().toLowerCase();
|
|
@@ -8745,7 +8745,7 @@ function ev(e, t, n, r, o, i, s = 1, d = {
|
|
|
8745
8745
|
}, [i]), w = G((k) => t.find((R) => R.id.toString().toLowerCase() === k || R.modules.some((M) => M.id.toString().toLowerCase() === k) || n.contains?.(R, k)), [t, n]), x = G(async (k, R) => {
|
|
8746
8746
|
const M = k.toString().toLowerCase(), C = w(M);
|
|
8747
8747
|
if (!C || !u.current || !c.current) return !1;
|
|
8748
|
-
const L = C.id.toString().toLowerCase(), V = ++
|
|
8748
|
+
const L = C.id.toString().toLowerCase(), V = ++h.current;
|
|
8749
8749
|
return Jg({
|
|
8750
8750
|
camera: u.current,
|
|
8751
8751
|
root: c.current,
|
|
@@ -8754,12 +8754,12 @@ function ev(e, t, n, r, o, i, s = 1, d = {
|
|
|
8754
8754
|
...r.get(C.id.toString()) ?? n.estimateSize(C)
|
|
8755
8755
|
},
|
|
8756
8756
|
path: () => {
|
|
8757
|
-
const
|
|
8758
|
-
return (
|
|
8757
|
+
const U = m.current.get(L);
|
|
8758
|
+
return (U && yr(U, M)) ?? (L === M ? [M] : [L, M]);
|
|
8759
8759
|
},
|
|
8760
|
-
transform: () =>
|
|
8761
|
-
active: () => V ===
|
|
8762
|
-
nextFrame: () => new Promise((
|
|
8760
|
+
transform: () => p.current,
|
|
8761
|
+
active: () => V === h.current,
|
|
8762
|
+
nextFrame: () => new Promise((U) => requestAnimationFrame(U))
|
|
8763
8763
|
}, R?.animate ?? !0);
|
|
8764
8764
|
}, [
|
|
8765
8765
|
w,
|
|
@@ -8779,16 +8779,16 @@ function ev(e, t, n, r, o, i, s = 1, d = {
|
|
|
8779
8779
|
handleReady: y,
|
|
8780
8780
|
scrollTo: x,
|
|
8781
8781
|
onGridMounted: f,
|
|
8782
|
-
transform:
|
|
8782
|
+
transform: p
|
|
8783
8783
|
};
|
|
8784
8784
|
}
|
|
8785
8785
|
function tv(e, t, n = !0) {
|
|
8786
8786
|
const r = O(/* @__PURE__ */ new Set()), [o, i] = D(r.current), [s, d] = D(void 0), { collections: l, moveCollection: c, collectionMoved: u } = e, g = ge(() => n ? s ? l.map((m) => {
|
|
8787
8787
|
if (o.has(m.id.toString())) return m;
|
|
8788
|
-
const
|
|
8789
|
-
return
|
|
8788
|
+
const h = s.get(m.id.toString());
|
|
8789
|
+
return h && h !== m.position ? {
|
|
8790
8790
|
...m,
|
|
8791
|
-
position:
|
|
8791
|
+
position: h
|
|
8792
8792
|
} : m;
|
|
8793
8793
|
}) : Id(kd(l), t) : l, [
|
|
8794
8794
|
l,
|
|
@@ -8796,26 +8796,26 @@ function tv(e, t, n = !0) {
|
|
|
8796
8796
|
n,
|
|
8797
8797
|
o,
|
|
8798
8798
|
s
|
|
8799
|
-
]), v = G((m,
|
|
8799
|
+
]), v = G((m, h, b) => {
|
|
8800
8800
|
const f = m.toString();
|
|
8801
8801
|
if (!r.current.has(f)) {
|
|
8802
8802
|
r.current.size || d(new Map(g.map((x) => [x.id.toString(), x.position])));
|
|
8803
8803
|
const y = g.find((x) => x.id.equals(m))?.position, w = l.find((x) => x.id.equals(m))?.position;
|
|
8804
|
-
|
|
8804
|
+
h += (y?.x ?? 0) - (w?.x ?? 0), b += (y?.y ?? 0) - (w?.y ?? 0), r.current = /* @__PURE__ */ new Set([...r.current, f]), i(r.current);
|
|
8805
8805
|
}
|
|
8806
|
-
c(m,
|
|
8806
|
+
c(m, h, b);
|
|
8807
8807
|
}, [
|
|
8808
8808
|
g,
|
|
8809
8809
|
l,
|
|
8810
8810
|
c
|
|
8811
|
-
]),
|
|
8811
|
+
]), p = G((m) => {
|
|
8812
8812
|
r.current = new Set(r.current), r.current.delete(m.toString()), i(r.current), r.current.size || d(void 0);
|
|
8813
8813
|
}, []);
|
|
8814
8814
|
return {
|
|
8815
8815
|
placed: g,
|
|
8816
8816
|
moveCollection: v,
|
|
8817
|
-
collectionMoved: G((m,
|
|
8818
|
-
collectionMoveCanceled:
|
|
8817
|
+
collectionMoved: G((m, h) => (p(m), u(m, h)), [u, p]),
|
|
8818
|
+
collectionMoveCanceled: p
|
|
8819
8819
|
};
|
|
8820
8820
|
}
|
|
8821
8821
|
function ei(e) {
|
|
@@ -8830,21 +8830,21 @@ function ei(e) {
|
|
|
8830
8830
|
}, [e]);
|
|
8831
8831
|
}
|
|
8832
8832
|
var nv = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor: i, canvas: s, showMinimap: d, changes: l, initialFocus: c, handle: u, sliceLinks: g, separateOverlaps: v = !0 }) => {
|
|
8833
|
-
const
|
|
8833
|
+
const p = o ? void 0 : i?.links, m = Nd({
|
|
8834
8834
|
initialCollections: t.initialCollections,
|
|
8835
8835
|
onAddCollection: t.onAddCollection,
|
|
8836
8836
|
onCollectionMoved: t.onCollectionMoved,
|
|
8837
8837
|
onCollectionsChange: t.onCollectionsChange,
|
|
8838
8838
|
onPersistenceError: t.onPersistenceError
|
|
8839
|
-
}), { collections:
|
|
8840
|
-
x((
|
|
8841
|
-
const de = _.toString(), Pe =
|
|
8842
|
-
return Pe?.width === ee && Pe.height === he ?
|
|
8839
|
+
}), { collections: h, pendingMoveIds: b, canMove: f, addCollection: y } = m, [w, x] = D(/* @__PURE__ */ new Map()), k = O(s?.initialZoom ?? 1), R = G(() => k.current, []), M = O(null), { estimateSize: C, countSlices: L, renderCollection: V } = t, U = G((_, ee, he) => {
|
|
8840
|
+
x((Q) => {
|
|
8841
|
+
const de = _.toString(), Pe = Q.get(de);
|
|
8842
|
+
return Pe?.width === ee && Pe.height === he ? Q : new Map(Q).set(de, {
|
|
8843
8843
|
width: ee,
|
|
8844
8844
|
height: he
|
|
8845
8845
|
});
|
|
8846
8846
|
});
|
|
8847
|
-
}, []),
|
|
8847
|
+
}, []), F = ei(C), te = ei(G((_) => (ee) => V(_, ee), [V])), N = G((_) => w.get(_.id.toString()) ?? F(_), [w, F]), { placed: E, moveCollection: q, collectionMoved: A, collectionMoveCanceled: P } = tv(m, N, v), Z = G((_) => jg({
|
|
8848
8848
|
documentId: e,
|
|
8849
8849
|
collections: E,
|
|
8850
8850
|
estimateSize: C,
|
|
@@ -8877,8 +8877,8 @@ var nv = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor
|
|
|
8877
8877
|
]);
|
|
8878
8878
|
const z = ge(() => Yg(E.map((_) => ({
|
|
8879
8879
|
position: _.position,
|
|
8880
|
-
size:
|
|
8881
|
-
}))), [E,
|
|
8880
|
+
size: F(_)
|
|
8881
|
+
}))), [E, F]), K = ge(() => Qg(h.reduce((_, ee) => _ + L(ee), 0)), [h, L]), I = ge(() => E.flatMap((_) => {
|
|
8882
8882
|
const ee = w.get(_.id.toString());
|
|
8883
8883
|
return ee ? [{
|
|
8884
8884
|
id: _.id,
|
|
@@ -8887,22 +8887,22 @@ var nv = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor
|
|
|
8887
8887
|
height: ee.height
|
|
8888
8888
|
}] : [];
|
|
8889
8889
|
}), [E, w]), j = G((_) => {
|
|
8890
|
-
for (const ee of
|
|
8890
|
+
for (const ee of h) {
|
|
8891
8891
|
const he = t.path?.(ee, _);
|
|
8892
8892
|
if (he) return he;
|
|
8893
8893
|
if (t.contains?.(ee, _)) return [ee.id.toString().toLowerCase(), _];
|
|
8894
8894
|
}
|
|
8895
|
-
}, [
|
|
8895
|
+
}, [h, t]), Y = s?.onTransformChange, ie = G((_, ee) => {
|
|
8896
8896
|
k.current = _, T.transform.current = {
|
|
8897
8897
|
zoom: _,
|
|
8898
8898
|
pan: ee
|
|
8899
|
-
},
|
|
8900
|
-
}, [
|
|
8899
|
+
}, Y?.(_, ee);
|
|
8900
|
+
}, [Y, T.transform]), $ = /* @__PURE__ */ S(re, { children: [
|
|
8901
8901
|
E.map((_) => /* @__PURE__ */ a(_a, {
|
|
8902
8902
|
collection: _,
|
|
8903
|
-
estimatedSize:
|
|
8903
|
+
estimatedSize: F(_),
|
|
8904
8904
|
measuredSize: w.get(_.id.toString()),
|
|
8905
|
-
onSize:
|
|
8905
|
+
onSize: U,
|
|
8906
8906
|
getZoom: R,
|
|
8907
8907
|
canMove: f && !b.has(_.id.toString()),
|
|
8908
8908
|
onCollectionMoving: f ? q : void 0,
|
|
@@ -8915,7 +8915,7 @@ var nv = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor
|
|
|
8915
8915
|
links: n,
|
|
8916
8916
|
collections: I,
|
|
8917
8917
|
getZoom: R,
|
|
8918
|
-
...
|
|
8918
|
+
...p
|
|
8919
8919
|
}),
|
|
8920
8920
|
g && g.length > 0 && /* @__PURE__ */ a(Eg, {
|
|
8921
8921
|
links: g,
|
|
@@ -8988,10 +8988,10 @@ var av = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
8988
8988
|
...c?.(w)
|
|
8989
8989
|
});
|
|
8990
8990
|
return u ? u(w, k) : k;
|
|
8991
|
-
}, [c, u]),
|
|
8992
|
-
|
|
8991
|
+
}, [c, u]), p = sa(), { density: m, textSize: h } = Le(), b = G((w) => Pc(w, p, m, h), [
|
|
8992
|
+
p,
|
|
8993
8993
|
m,
|
|
8994
|
-
|
|
8994
|
+
h
|
|
8995
8995
|
]), f = ge(() => ({
|
|
8996
8996
|
initialCollections: e.collections,
|
|
8997
8997
|
estimateSize: b,
|
|
@@ -9019,10 +9019,10 @@ var av = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
9019
9019
|
handle: d,
|
|
9020
9020
|
sliceLinks: l
|
|
9021
9021
|
});
|
|
9022
|
-
return m === void 0 &&
|
|
9022
|
+
return m === void 0 && h === void 0 ? y : /* @__PURE__ */ a("div", {
|
|
9023
9023
|
style: {
|
|
9024
9024
|
display: "contents",
|
|
9025
|
-
"--board-text-scale": kt(
|
|
9025
|
+
"--board-text-scale": kt(h)
|
|
9026
9026
|
},
|
|
9027
9027
|
"data-board-density": m ?? "compact",
|
|
9028
9028
|
children: y
|
|
@@ -9030,15 +9030,15 @@ var av = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
9030
9030
|
}, yp = ({ showLogo: e = !1, showViewOptions: t = !1, toolbar: n, handle: r, editor: o, readOnly: i = !1, document: s, ...d }) => {
|
|
9031
9031
|
const l = O(null);
|
|
9032
9032
|
jt(r, () => ({
|
|
9033
|
-
scrollTo: (
|
|
9034
|
-
revealSlice: (
|
|
9035
|
-
addCollection: (
|
|
9036
|
-
addStickyNote: (
|
|
9037
|
-
exportImage: (
|
|
9033
|
+
scrollTo: (p, m) => l.current?.scrollTo(p, m) ?? Promise.resolve(!1),
|
|
9034
|
+
revealSlice: (p, m) => l.current?.revealSlice(p, m) ?? Promise.resolve(!1),
|
|
9035
|
+
addCollection: (p, m) => l.current?.addCollection(p, m) ?? Promise.resolve(),
|
|
9036
|
+
addStickyNote: (p) => l.current?.addStickyNote(p),
|
|
9037
|
+
exportImage: (p) => l.current?.exportImage(p) ?? Promise.reject(/* @__PURE__ */ new Error("Board is not ready to export."))
|
|
9038
9038
|
}), []);
|
|
9039
9039
|
const c = !i && !!o?.collections?.onAddCollection, u = G(() => {
|
|
9040
|
-
const
|
|
9041
|
-
l.current?.addCollection(
|
|
9040
|
+
const p = iv(s.collections.map((m) => m.position));
|
|
9041
|
+
l.current?.addCollection(p.x, p.y);
|
|
9042
9042
|
}, [s.collections]), g = c ? /* @__PURE__ */ a(lg, { onAddModule: u }) : void 0, v = /* @__PURE__ */ a(av, {
|
|
9043
9043
|
...d,
|
|
9044
9044
|
document: s,
|
|
@@ -9109,7 +9109,7 @@ var av = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
9109
9109
|
const t = Wa(e);
|
|
9110
9110
|
if (!t) return null;
|
|
9111
9111
|
const n = e.map((r) => r.message).join("; ");
|
|
9112
|
-
return /* @__PURE__ */ a(
|
|
9112
|
+
return /* @__PURE__ */ a(ye, {
|
|
9113
9113
|
position: "bottom",
|
|
9114
9114
|
content: /* @__PURE__ */ a("ul", {
|
|
9115
9115
|
className: "slice-problem-indicator__details",
|
|
@@ -9143,10 +9143,10 @@ var av = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
9143
9143
|
});
|
|
9144
9144
|
const u = async () => {
|
|
9145
9145
|
if (s) return;
|
|
9146
|
-
const v = o,
|
|
9147
|
-
i(
|
|
9146
|
+
const v = o, p = v === dt.input ? dt.output : dt.input;
|
|
9147
|
+
i(p), d(!0);
|
|
9148
9148
|
try {
|
|
9149
|
-
await t(
|
|
9149
|
+
await t(p) === !1 && i(v);
|
|
9150
9150
|
} finally {
|
|
9151
9151
|
d(!1);
|
|
9152
9152
|
}
|
|
@@ -9166,12 +9166,12 @@ var av = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
9166
9166
|
color: "color-mix(in srgb, var(--board-ink, #ffffff) 80%, transparent)",
|
|
9167
9167
|
textAlign: "center"
|
|
9168
9168
|
}, za = ({ slice: e, height: t, collapsed: n, selectableStatuses: r, unselectableStatusReason: o, error: i, leading: s, trailing: d, onToggleCollapse: l }) => {
|
|
9169
|
-
const c = ne(), u = at(e.id), g = Mr(e.id, "slice", e.name), { showStatuses: v = !0 } = Le(), { readOnly:
|
|
9169
|
+
const c = ne(), u = at(e.id), g = Mr(e.id, "slice", e.name), { showStatuses: v = !0 } = Le(), { readOnly: p } = ht();
|
|
9170
9170
|
gv("header", i ? [{
|
|
9171
9171
|
severity: "error",
|
|
9172
9172
|
message: i
|
|
9173
9173
|
}] : []);
|
|
9174
|
-
const m = qa(), { editing:
|
|
9174
|
+
const m = qa(), { editing: h, actions: b } = c, f = h.onSliceRenamed, y = h.onSliceStatusChanged, w = h.onTranslationDirectionChanged, x = h.onSliceAdded, k = h.onSliceOpenStateSet, R = (b.sliceHeader ?? []).filter((L) => !L.when || L.when(e)), M = /* @__PURE__ */ a(ye, {
|
|
9175
9175
|
content: /* @__PURE__ */ a(uu, { sliceType: e.sliceType }),
|
|
9176
9176
|
position: "bottom",
|
|
9177
9177
|
children: /* @__PURE__ */ a(An, {
|
|
@@ -9179,7 +9179,7 @@ var av = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
9179
9179
|
onChange: (L) => f?.(e.id, L),
|
|
9180
9180
|
placeholder: c.messages.slices.namePlaceholder,
|
|
9181
9181
|
style: yv,
|
|
9182
|
-
readOnly:
|
|
9182
|
+
readOnly: p || !f
|
|
9183
9183
|
})
|
|
9184
9184
|
}), C = mt(e.description) !== void 0;
|
|
9185
9185
|
return /* @__PURE__ */ S("div", {
|
|
@@ -9188,7 +9188,7 @@ var av = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
9188
9188
|
"data-board-change": u,
|
|
9189
9189
|
style: {
|
|
9190
9190
|
height: t,
|
|
9191
|
-
cursor: n ||
|
|
9191
|
+
cursor: n || p ? "default" : "grab"
|
|
9192
9192
|
},
|
|
9193
9193
|
children: [
|
|
9194
9194
|
n && /* @__PURE__ */ a(Mt, {
|
|
@@ -9203,7 +9203,7 @@ var av = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
9203
9203
|
children: [
|
|
9204
9204
|
/* @__PURE__ */ a(Or, {
|
|
9205
9205
|
collapsed: n,
|
|
9206
|
-
onToggle: c.readOnly ? l : !
|
|
9206
|
+
onToggle: c.readOnly ? l : !p && k ? () => k(e.id, !n) : void 0
|
|
9207
9207
|
}),
|
|
9208
9208
|
g.marker,
|
|
9209
9209
|
!n && s
|
|
@@ -9235,9 +9235,9 @@ var av = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
9235
9235
|
selectable: r,
|
|
9236
9236
|
unselectableReason: o
|
|
9237
9237
|
}),
|
|
9238
|
-
e.sliceType ===
|
|
9238
|
+
e.sliceType === B.translator && /* @__PURE__ */ a(bv, {
|
|
9239
9239
|
direction: e.translationDirection ?? dt.input,
|
|
9240
|
-
onDirectionChanged: w && !
|
|
9240
|
+
onDirectionChanged: w && !p ? (L) => w(e.id, L) : void 0
|
|
9241
9241
|
}),
|
|
9242
9242
|
!c.readOnly && d,
|
|
9243
9243
|
!c.readOnly && R.map((L) => /* @__PURE__ */ a("button", {
|
|
@@ -9245,13 +9245,13 @@ var av = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
9245
9245
|
className: "event-modeling-grid-add-button event-modeling-grid-add-button--small event-modeling-grid-add-button--no-circle",
|
|
9246
9246
|
title: L.tooltip,
|
|
9247
9247
|
"aria-label": L.tooltip,
|
|
9248
|
-
disabled:
|
|
9248
|
+
disabled: p || L.disabled,
|
|
9249
9249
|
onClick: (V) => L.onActivate(e.id, V.currentTarget.getBoundingClientRect()),
|
|
9250
9250
|
children: L.icon
|
|
9251
9251
|
}, L.tooltip)),
|
|
9252
9252
|
!c.readOnly && x && /* @__PURE__ */ a(mu, {
|
|
9253
9253
|
onSelect: (L) => x(e.id, L),
|
|
9254
|
-
disabled:
|
|
9254
|
+
disabled: p
|
|
9255
9255
|
})
|
|
9256
9256
|
]
|
|
9257
9257
|
})
|
|
@@ -9409,22 +9409,22 @@ function Nv(e, t, n, r) {
|
|
|
9409
9409
|
d.current = r;
|
|
9410
9410
|
const l = O(n);
|
|
9411
9411
|
l.current = n;
|
|
9412
|
-
const { readOnly: c } = ne(), u = G((
|
|
9412
|
+
const { readOnly: c } = ne(), u = G((h, b, f) => {
|
|
9413
9413
|
try {
|
|
9414
|
-
return d.current?.(
|
|
9414
|
+
return d.current?.(h, b, f);
|
|
9415
9415
|
} catch (y) {
|
|
9416
9416
|
console.error("Slice drop validation failed — allowing the drop", y);
|
|
9417
9417
|
return;
|
|
9418
9418
|
}
|
|
9419
|
-
}, []), g = G((
|
|
9420
|
-
const y = document.querySelector(`[data-slice-drop-target="true"][data-slice-module-id="${
|
|
9419
|
+
}, []), g = G((h, b, f) => {
|
|
9420
|
+
const y = document.querySelector(`[data-slice-drop-target="true"][data-slice-module-id="${h.toString()}"][data-slice-feature-id="${f.toString()}"]`);
|
|
9421
9421
|
return f.equals(b) ? y?.dataset.sliceAcceptsReorder === "true" : y?.dataset.sliceAcceptsMove === "true";
|
|
9422
|
-
}, []), v = G((
|
|
9423
|
-
const M = e.slices.findIndex((L) => L.id.equals(
|
|
9422
|
+
}, []), v = G((h, b, f, y, w, x, k, R = null) => {
|
|
9423
|
+
const M = e.slices.findIndex((L) => L.id.equals(h));
|
|
9424
9424
|
if (M === -1) return;
|
|
9425
|
-
const C = u(
|
|
9425
|
+
const C = u(h, e.id, M);
|
|
9426
9426
|
i({
|
|
9427
|
-
sliceId:
|
|
9427
|
+
sliceId: h,
|
|
9428
9428
|
moduleId: t,
|
|
9429
9429
|
featureId: e.id,
|
|
9430
9430
|
targetFeatureId: e.id,
|
|
@@ -9445,16 +9445,16 @@ function Nv(e, t, n, r) {
|
|
|
9445
9445
|
t,
|
|
9446
9446
|
u,
|
|
9447
9447
|
g
|
|
9448
|
-
]),
|
|
9449
|
-
const f = Array.from(document.querySelectorAll(`[data-slice-drop-target="true"][data-slice-module-id="${
|
|
9448
|
+
]), p = G((h, b) => {
|
|
9449
|
+
const f = Array.from(document.querySelectorAll(`[data-slice-drop-target="true"][data-slice-module-id="${h.toString()}"]`));
|
|
9450
9450
|
if (f.length === 0) return e.id;
|
|
9451
9451
|
for (let y = 0; y < f.length; y++) {
|
|
9452
9452
|
const w = f[y].getBoundingClientRect();
|
|
9453
9453
|
if (b < w.left + w.width / 2) return pe.parse(f[y].dataset.sliceFeatureId);
|
|
9454
9454
|
}
|
|
9455
9455
|
return pe.parse(f[f.length - 1].dataset.sliceFeatureId);
|
|
9456
|
-
}, [e.id]), m = G((
|
|
9457
|
-
const f = Array.from(document.querySelectorAll(`[data-slice-col="true"][data-slice-feature-id="${
|
|
9456
|
+
}, [e.id]), m = G((h, b) => {
|
|
9457
|
+
const f = Array.from(document.querySelectorAll(`[data-slice-col="true"][data-slice-feature-id="${h.toString()}"]`));
|
|
9458
9458
|
if (f.length === 0) return 0;
|
|
9459
9459
|
for (let y = 0; y < f.length; y++) {
|
|
9460
9460
|
const w = f[y].getBoundingClientRect();
|
|
@@ -9464,10 +9464,10 @@ function Nv(e, t, n, r) {
|
|
|
9464
9464
|
}, []);
|
|
9465
9465
|
return oe(() => {
|
|
9466
9466
|
if (!o) return;
|
|
9467
|
-
const
|
|
9467
|
+
const h = (f) => {
|
|
9468
9468
|
const y = s.current;
|
|
9469
9469
|
if (!y) return;
|
|
9470
|
-
const w =
|
|
9470
|
+
const w = p(y.moduleId, f.clientX), x = m(w, f.clientX), k = u(y.sliceId, w, x);
|
|
9471
9471
|
i((R) => R ? {
|
|
9472
9472
|
...R,
|
|
9473
9473
|
currentX: f.clientX,
|
|
@@ -9481,12 +9481,12 @@ function Nv(e, t, n, r) {
|
|
|
9481
9481
|
const f = s.current, y = f && Iv(f);
|
|
9482
9482
|
f && y && g(f.moduleId, f.featureId, f.targetFeatureId) && l.current?.(f.sliceId, f.featureId, f.targetFeatureId, y.index), i(void 0);
|
|
9483
9483
|
};
|
|
9484
|
-
return window.addEventListener("pointermove",
|
|
9485
|
-
window.removeEventListener("pointermove",
|
|
9484
|
+
return window.addEventListener("pointermove", h, !0), window.addEventListener("pointerup", b, !0), window.addEventListener("pointercancel", b, !0), () => {
|
|
9485
|
+
window.removeEventListener("pointermove", h, !0), window.removeEventListener("pointerup", b, !0), window.removeEventListener("pointercancel", b, !0);
|
|
9486
9486
|
};
|
|
9487
9487
|
}, [
|
|
9488
9488
|
o,
|
|
9489
|
-
|
|
9489
|
+
p,
|
|
9490
9490
|
m,
|
|
9491
9491
|
u,
|
|
9492
9492
|
g
|
|
@@ -9500,48 +9500,48 @@ function Rv(e, t, n, r, o) {
|
|
|
9500
9500
|
l.current = o;
|
|
9501
9501
|
const c = () => {
|
|
9502
9502
|
d.current !== null && (clearTimeout(d.current), d.current = null);
|
|
9503
|
-
}, u = (
|
|
9503
|
+
}, u = (h, b, f) => {
|
|
9504
9504
|
c(), s({
|
|
9505
|
-
...
|
|
9505
|
+
...h,
|
|
9506
9506
|
committed: !0
|
|
9507
|
-
}),
|
|
9507
|
+
}), h.element.setPointerCapture(h.pointerId), e && l.current?.(e, t, b, f, n, h.startY - h.grabOffsetY, Ov(h.element), ic(h.element));
|
|
9508
9508
|
};
|
|
9509
9509
|
return oe(() => {
|
|
9510
9510
|
if (!i || i.committed) return;
|
|
9511
|
-
const
|
|
9511
|
+
const h = (f) => {
|
|
9512
9512
|
if (f.pointerId !== i.pointerId) return;
|
|
9513
9513
|
const y = Cv(i.pointerType, f.clientX - i.startX, f.clientY - i.startY);
|
|
9514
9514
|
y === Rt.abandon && s(null), y === Rt.commit && u(i, f.clientX, f.clientY);
|
|
9515
9515
|
}, b = (f) => {
|
|
9516
9516
|
f.pointerId === i.pointerId && s(null);
|
|
9517
9517
|
};
|
|
9518
|
-
return window.addEventListener("pointermove",
|
|
9519
|
-
window.removeEventListener("pointermove",
|
|
9518
|
+
return window.addEventListener("pointermove", h, !0), window.addEventListener("pointerup", b, !0), window.addEventListener("pointercancel", b, !0), () => {
|
|
9519
|
+
window.removeEventListener("pointermove", h, !0), window.removeEventListener("pointerup", b, !0), window.removeEventListener("pointercancel", b, !0);
|
|
9520
9520
|
};
|
|
9521
9521
|
}, [i]), oe(() => (!i || i.committed || i.pointerType !== "touch" || (d.current = setTimeout(() => u(i, i.startX, i.startY), 450)), c), [i]), {
|
|
9522
|
-
onPointerDown: (
|
|
9523
|
-
const b =
|
|
9522
|
+
onPointerDown: (h) => {
|
|
9523
|
+
const b = h.currentTarget;
|
|
9524
9524
|
if (!e) return;
|
|
9525
9525
|
const f = xv({
|
|
9526
|
-
target:
|
|
9527
|
-
clientX:
|
|
9528
|
-
clientY:
|
|
9529
|
-
pointerId:
|
|
9530
|
-
pointerType:
|
|
9526
|
+
target: h.target instanceof Element ? h.target : null,
|
|
9527
|
+
clientX: h.clientX,
|
|
9528
|
+
clientY: h.clientY,
|
|
9529
|
+
pointerId: h.pointerId,
|
|
9530
|
+
pointerType: h.pointerType,
|
|
9531
9531
|
elementTop: b.getBoundingClientRect().top
|
|
9532
9532
|
}, r);
|
|
9533
9533
|
f && (s({
|
|
9534
9534
|
...f,
|
|
9535
9535
|
element: b,
|
|
9536
9536
|
committed: !1
|
|
9537
|
-
}),
|
|
9537
|
+
}), h.pointerType !== "touch" && h.stopPropagation());
|
|
9538
9538
|
},
|
|
9539
|
-
onPointerMove: (
|
|
9540
|
-
i?.committed &&
|
|
9539
|
+
onPointerMove: (h) => {
|
|
9540
|
+
i?.committed && h.stopPropagation();
|
|
9541
9541
|
},
|
|
9542
9542
|
onPointerUp: () => s(null),
|
|
9543
|
-
onContextMenu: (
|
|
9544
|
-
i?.committed &&
|
|
9543
|
+
onContextMenu: (h) => {
|
|
9544
|
+
i?.committed && h.preventDefault();
|
|
9545
9545
|
}
|
|
9546
9546
|
};
|
|
9547
9547
|
}
|
|
@@ -9555,14 +9555,14 @@ function Ov(e) {
|
|
|
9555
9555
|
return 1;
|
|
9556
9556
|
}
|
|
9557
9557
|
var Av = ({ featureId: e, name: t, status: n, width: r, collapsed: o, isDragging: i = !1, onDragStart: s, ref: d, onMouseEnter: l, onMouseLeave: c, onFocusCapture: u, onBlurCapture: g, children: v }) => {
|
|
9558
|
-
const { sliceId:
|
|
9558
|
+
const { sliceId: p } = ht(), m = at(p), h = Wa(qa()), b = Li(jl(p)), f = Rv(p, t, r, o || !s, s);
|
|
9559
9559
|
return /* @__PURE__ */ a("div", {
|
|
9560
9560
|
ref: d,
|
|
9561
9561
|
"data-board-change": m,
|
|
9562
9562
|
"data-slice-col": "true",
|
|
9563
|
-
"data-slice-problem":
|
|
9563
|
+
"data-slice-problem": h,
|
|
9564
9564
|
"data-slice-feature-id": e.toString(),
|
|
9565
|
-
"data-slice-id":
|
|
9565
|
+
"data-slice-id": p?.toString(),
|
|
9566
9566
|
className: `${m ? "event-model-change-frame " : ""}event-modeling-grid-slice-column event-modeling-grid-slice-column--${sr(n)}${o ? " event-modeling-grid-slice-column--collapsed" : ""}${b ? ` ${b}` : ""}`,
|
|
9567
9567
|
style: {
|
|
9568
9568
|
width: r,
|
|
@@ -9582,22 +9582,22 @@ var Av = ({ featureId: e, name: t, status: n, width: r, collapsed: o, isDragging
|
|
|
9582
9582
|
children: v
|
|
9583
9583
|
});
|
|
9584
9584
|
}, Lv = (e, t) => t !== null && e.contains(t), Pv = ({ featureId: e, slice: t, eventCount: n, collapsed: r, isDragging: o = !1, onSliceDragStart: i, header: s, headerHeight: d = 44, body: l, specifications: c, collapsedWidth: u }) => {
|
|
9585
|
-
const { readOnly: g } = ne(), v = Hc(t.id.toString()), { ref:
|
|
9585
|
+
const { readOnly: g } = ne(), v = Hc(t.id.toString()), { ref: p, onMouseEnter: m, onMouseLeave: h } = Gc(v?.connectedSliceIds), b = O(null), f = Rr(b), [y, w] = D(!1), x = O(!1), k = Ir({
|
|
9586
9586
|
sliceType: t.sliceType,
|
|
9587
9587
|
eventCount: n
|
|
9588
9588
|
}), R = () => {
|
|
9589
9589
|
x.current = !0, m();
|
|
9590
9590
|
}, M = () => {
|
|
9591
|
-
x.current = !1, y ||
|
|
9591
|
+
x.current = !1, y || h();
|
|
9592
9592
|
}, C = (V) => {
|
|
9593
9593
|
Lv(V.currentTarget, V.target) && w(!0);
|
|
9594
9594
|
}, L = (V) => {
|
|
9595
|
-
const
|
|
9596
|
-
(!(
|
|
9595
|
+
const U = V.relatedTarget;
|
|
9596
|
+
(!(U instanceof Node) || !V.currentTarget.contains(U)) && w(!1);
|
|
9597
9597
|
};
|
|
9598
9598
|
return oe(() => {
|
|
9599
|
-
!y && !x.current &&
|
|
9600
|
-
}, [y,
|
|
9599
|
+
!y && !x.current && h();
|
|
9600
|
+
}, [y, h]), /* @__PURE__ */ a(vv, {
|
|
9601
9601
|
sliceId: t.id,
|
|
9602
9602
|
sliceType: t.sliceType,
|
|
9603
9603
|
status: t.status,
|
|
@@ -9610,7 +9610,7 @@ var Av = ({ featureId: e, name: t, status: n, width: r, collapsed: o, isDragging
|
|
|
9610
9610
|
flexShrink: 0
|
|
9611
9611
|
},
|
|
9612
9612
|
children: [/* @__PURE__ */ S(Av, {
|
|
9613
|
-
ref:
|
|
9613
|
+
ref: p,
|
|
9614
9614
|
featureId: e,
|
|
9615
9615
|
name: t.name,
|
|
9616
9616
|
status: t.status,
|
|
@@ -9652,7 +9652,7 @@ function Ot(e, t) {
|
|
|
9652
9652
|
for (; n.has(cn(`${r} (${o})`)); ) o++;
|
|
9653
9653
|
return `${r} (${o})`;
|
|
9654
9654
|
}
|
|
9655
|
-
var _v = (e) => e ===
|
|
9655
|
+
var _v = (e) => e === B.stateChange ? "State Change" : e === B.stateView ? "State View" : e === B.automation ? "Automation" : "Translator", Dv = {
|
|
9656
9656
|
type: "object",
|
|
9657
9657
|
properties: { id: {
|
|
9658
9658
|
type: "string",
|
|
@@ -9669,7 +9669,7 @@ var _v = (e) => e === F.stateChange ? "State Change" : e === F.stateView ? "Stat
|
|
|
9669
9669
|
status: se.notStarted,
|
|
9670
9670
|
collapsed: !1,
|
|
9671
9671
|
sortOrder: Number.MAX_SAFE_INTEGER,
|
|
9672
|
-
command: e ===
|
|
9672
|
+
command: e === B.stateView || e === B.translator ? void 0 : {
|
|
9673
9673
|
id: o,
|
|
9674
9674
|
name: Ot(t?.commandName?.trim() || "Command", r.commands),
|
|
9675
9675
|
schema: {},
|
|
@@ -9677,13 +9677,13 @@ var _v = (e) => e === F.stateChange ? "State Change" : e === F.stateView ? "Stat
|
|
|
9677
9677
|
rules: [],
|
|
9678
9678
|
logicDescription: ""
|
|
9679
9679
|
},
|
|
9680
|
-
readModel: e ===
|
|
9680
|
+
readModel: e === B.stateView ? {
|
|
9681
9681
|
id: s,
|
|
9682
9682
|
name: Ot(t?.readModelName?.trim() || "Read Model", r.readModels),
|
|
9683
9683
|
schema: Dv,
|
|
9684
9684
|
materializes: !0
|
|
9685
9685
|
} : void 0,
|
|
9686
|
-
events: e ===
|
|
9686
|
+
events: e === B.stateChange ? [{
|
|
9687
9687
|
id: i,
|
|
9688
9688
|
name: Ot(t?.eventName?.trim() || "Event", r.events),
|
|
9689
9689
|
schema: {},
|
|
@@ -9691,7 +9691,7 @@ var _v = (e) => e === F.stateChange ? "State Change" : e === F.stateView ? "Stat
|
|
|
9691
9691
|
}] : [],
|
|
9692
9692
|
externalEvents: [],
|
|
9693
9693
|
actors: [],
|
|
9694
|
-
queries: e ===
|
|
9694
|
+
queries: e === B.stateView ? [{
|
|
9695
9695
|
id: pe.create(),
|
|
9696
9696
|
name: "GetById",
|
|
9697
9697
|
parameters: [{
|
|
@@ -9824,7 +9824,7 @@ var _v = (e) => e === F.stateChange ? "State Change" : e === F.stateView ? "Stat
|
|
|
9824
9824
|
};
|
|
9825
9825
|
return n ? Wt(r, e.snapshot) : r;
|
|
9826
9826
|
}, Wt = (e, t) => {
|
|
9827
|
-
const n = e.additions.filter((
|
|
9827
|
+
const n = e.additions.filter((p) => !p.confirmed || !lt(t, p.slice.id)), r = e.outgoing.filter((p) => !p.confirmed || lt(t, p.slice.id)), o = e.incoming.filter((p) => !p.confirmed || !lt(t, p.slice.id)), i = e.order?.ids.filter((p) => lt(t, p)), s = t.filter((p) => i?.some((m) => Re(m, p.id))).map((p) => p.id), d = i !== void 0 && i.length > 0 && i.every((p, m) => Re(p, s[m])), l = e.order?.confirmed && d ? void 0 : e.order, c = (p, m) => e.slices.find((h) => Re(h.id, p)) ?? m, u = t.filter((p) => !r.some((m) => Re(m.slice.id, p.id))).map((p) => e.additions.some((m) => Re(m.slice.id, p.id)) || e.incoming.some((m) => Re(m.slice.id, p.id)) ? c(p.id, p) : p), g = o.reduce((p, m) => Qr(p, c(m.slice.id, m.slice), m.index), u), v = n.reduce((p, m) => lt(p, m.slice.id) ? p : Xr(p, c(m.slice.id, m.slice), m.afterSliceId), g);
|
|
9828
9828
|
return {
|
|
9829
9829
|
slices: l ? Xv(v, l.ids) : v,
|
|
9830
9830
|
snapshot: t,
|
|
@@ -9838,8 +9838,8 @@ var _v = (e) => e === F.stateChange ? "State Change" : e === F.stateView ? "Stat
|
|
|
9838
9838
|
let r = 0;
|
|
9839
9839
|
return e.map((o) => t.some((i) => Re(i, o.id)) ? n[r++] : o);
|
|
9840
9840
|
};
|
|
9841
|
-
function Qv({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollapsed: o, hideEmptyPlaceholder: i = !1, onSlicesChanged: s, takenArtifactNames: d, createSlice: l, onAddSlice: c, onReorderSlices: u, onMoveSlice: g, validateSliceDrop: v, renderSlice:
|
|
9842
|
-
const { readOnly: m, messages:
|
|
9841
|
+
function Qv({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollapsed: o, hideEmptyPlaceholder: i = !1, onSlicesChanged: s, takenArtifactNames: d, createSlice: l, onAddSlice: c, onReorderSlices: u, onMoveSlice: g, validateSliceDrop: v, renderSlice: p }) {
|
|
9842
|
+
const { readOnly: m, messages: h } = ne(), b = O(Bv(t)), f = O(void 0), [y, w] = D(b.current), { slices: x } = y, k = O(!1), [R, M] = D(!1), C = G((T) => {
|
|
9843
9843
|
const z = b.current, K = T(z);
|
|
9844
9844
|
K !== z && (b.current = K, w(K), K.slices !== z.slices && (f.current = K.slices, s?.(K.slices)));
|
|
9845
9845
|
}, [s]);
|
|
@@ -9857,13 +9857,13 @@ function Qv({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
9857
9857
|
slices: K
|
|
9858
9858
|
};
|
|
9859
9859
|
});
|
|
9860
|
-
}, [C]), V = G((T, z) => C((K) => zv(K, T, z)), [C]),
|
|
9860
|
+
}, [C]), V = G((T, z) => C((K) => zv(K, T, z)), [C]), U = G((T, z) => C((K) => Uv(K, T, z)), [C]), F = G((T, z) => C((K) => Yv(K, T, z)), [C]), te = G((T) => [...b.current.additions, ...b.current.incoming].some((z) => z.slice.id.equals(T)) || !b.current.slices.some((z) => z.id.equals(T)) ? !1 : (C((z) => Vv(z, T)), !0), [C]), N = G((T, z) => C((K) => Gv(K, T, z)), [C]), E = G((T, z, K) => {
|
|
9861
9861
|
if (m || !c || k.current) return;
|
|
9862
9862
|
k.current = !0, M(!0);
|
|
9863
|
-
const I = b.current.slices, j = l(Fv(T, K, I.map((
|
|
9864
|
-
C((
|
|
9865
|
-
C((ie) => ii(ie, j.id,
|
|
9866
|
-
}).catch(() => C((
|
|
9863
|
+
const I = b.current.slices, j = l(Fv(T, K, I.map((Y) => Y.name), d?.(I)));
|
|
9864
|
+
C((Y) => Wv(Y, j, z)), Promise.resolve().then(() => c(j, z)).then((Y) => {
|
|
9865
|
+
C((ie) => ii(ie, j.id, Y));
|
|
9866
|
+
}).catch(() => C((Y) => ii(Y, j.id))).finally(() => {
|
|
9867
9867
|
k.current = !1, M(!1);
|
|
9868
9868
|
});
|
|
9869
9869
|
}, [
|
|
@@ -9877,16 +9877,16 @@ function Qv({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
9877
9877
|
addSlice: E,
|
|
9878
9878
|
updateSlices: L,
|
|
9879
9879
|
addProjectedSlice: V,
|
|
9880
|
-
moveIn:
|
|
9881
|
-
completeMoveIn:
|
|
9880
|
+
moveIn: U,
|
|
9881
|
+
completeMoveIn: F,
|
|
9882
9882
|
moveOut: te,
|
|
9883
9883
|
completeMoveOut: N
|
|
9884
9884
|
}), [
|
|
9885
9885
|
E,
|
|
9886
9886
|
L,
|
|
9887
9887
|
V,
|
|
9888
|
-
|
|
9889
|
-
|
|
9888
|
+
U,
|
|
9889
|
+
F,
|
|
9890
9890
|
te,
|
|
9891
9891
|
N
|
|
9892
9892
|
]);
|
|
@@ -9895,17 +9895,17 @@ function Qv({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
9895
9895
|
slices: x
|
|
9896
9896
|
}), [r, x]), A = G((T, z, K, I) => {
|
|
9897
9897
|
if (m || !z.equals(r)) return;
|
|
9898
|
-
const j = b.current.slices.findIndex((
|
|
9899
|
-
if (!(j < 0 || b.current.slices[j].preview || [...b.current.additions, ...b.current.incoming].some((
|
|
9898
|
+
const j = b.current.slices.findIndex((Y) => Y.id.equals(T));
|
|
9899
|
+
if (!(j < 0 || b.current.slices[j].preview || [...b.current.additions, ...b.current.incoming].some((Y) => Y.slice.id.equals(T)))) {
|
|
9900
9900
|
if (K.equals(r)) {
|
|
9901
9901
|
if (!u || b.current.order && !b.current.order.confirmed) return;
|
|
9902
|
-
const
|
|
9903
|
-
if (
|
|
9904
|
-
C(() =>
|
|
9902
|
+
const Y = jv(b.current, j, I);
|
|
9903
|
+
if (Y === b.current) return;
|
|
9904
|
+
C(() => Y), Promise.resolve().then(() => u(Y.slices.filter((ie) => !ie.preview).map((ie) => ie.id))).then((ie) => C(($) => ai($, ie))).catch(() => C((ie) => ai(ie, !1)));
|
|
9905
9905
|
} else if (g) {
|
|
9906
|
-
const
|
|
9906
|
+
const Y = b.current.slices[j];
|
|
9907
9907
|
if (!te(T)) return;
|
|
9908
|
-
Promise.resolve().then(() => g(
|
|
9908
|
+
Promise.resolve().then(() => g(Y, K, I)).then((ie) => N(T, ie)).catch(() => N(T, !1));
|
|
9909
9909
|
}
|
|
9910
9910
|
}
|
|
9911
9911
|
}, [
|
|
@@ -9938,12 +9938,12 @@ function Qv({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
9938
9938
|
isValid: P.isValid,
|
|
9939
9939
|
marginLeft: I > 0 ? Math.max(I - 6, 0) : 0
|
|
9940
9940
|
}, `drop-${z}`));
|
|
9941
|
-
const
|
|
9941
|
+
const Y = T.collapsed;
|
|
9942
9942
|
return j.push(/* @__PURE__ */ a("div", {
|
|
9943
9943
|
style: { marginLeft: K && P?.dropIndex === z ? 2 : I },
|
|
9944
|
-
children:
|
|
9945
|
-
collapsed: o ||
|
|
9946
|
-
sliceCollapsed:
|
|
9944
|
+
children: p(T, {
|
|
9945
|
+
collapsed: o || Y,
|
|
9946
|
+
sliceCollapsed: Y,
|
|
9947
9947
|
isDragging: P?.sliceId.equals(T.id) ?? !1,
|
|
9948
9948
|
onSliceDragStart: [...y.additions, ...y.incoming].some((ie) => ie.slice.id.equals(T.id)) ? void 0 : Z,
|
|
9949
9949
|
addSlice: E,
|
|
@@ -9971,7 +9971,7 @@ function Qv({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
9971
9971
|
acceptsMove: !m && !!g,
|
|
9972
9972
|
className: "event-modeling-slices-empty",
|
|
9973
9973
|
style: { width: Math.round(ae.sliceWidth * 1.5) },
|
|
9974
|
-
children:
|
|
9974
|
+
children: h.slices.empty
|
|
9975
9975
|
});
|
|
9976
9976
|
}
|
|
9977
9977
|
var Kn = (e) => {
|
|
@@ -10024,8 +10024,8 @@ var Kn = (e) => {
|
|
|
10024
10024
|
}, `row:${l}:${g}`));
|
|
10025
10025
|
}) }), si = "38";
|
|
10026
10026
|
function eh(e) {
|
|
10027
|
-
if (e.sliceType ===
|
|
10028
|
-
if (e.sliceType ===
|
|
10027
|
+
if (e.sliceType === B.stateChange && e.hasCommand) return Ft.background;
|
|
10028
|
+
if (e.sliceType === B.stateView && e.hasReadModel) return We.background;
|
|
10029
10029
|
}
|
|
10030
10030
|
var kp = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(re, { children: t.map((r) => {
|
|
10031
10031
|
const o = r === J.Interaction ? eh(e) : void 0, i = r === J.Events ? Math.min(e.eventCount, 3) : 0;
|
|
@@ -10047,7 +10047,7 @@ var kp = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(re,
|
|
|
10047
10047
|
}) }), th = { fontSize: 10 }, Mn = ({ action: e }) => {
|
|
10048
10048
|
const { readOnly: t, sliceId: n } = ht(), r = O(null);
|
|
10049
10049
|
if (!(t || !n))
|
|
10050
|
-
return /* @__PURE__ */ a(
|
|
10050
|
+
return /* @__PURE__ */ a(ye, {
|
|
10051
10051
|
content: e.tooltip,
|
|
10052
10052
|
position: "top",
|
|
10053
10053
|
children: /* @__PURE__ */ a("button", {
|
|
@@ -10077,7 +10077,7 @@ var kp = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(re,
|
|
|
10077
10077
|
placement: e,
|
|
10078
10078
|
children: /* @__PURE__ */ a(Mn, { action: t })
|
|
10079
10079
|
});
|
|
10080
|
-
}, Zr = (e) => e ===
|
|
10080
|
+
}, Zr = (e) => e === B.stateView, Ep = (e) => !Zr(e), rh = (e, t) => Zr(e) && t === 0, oh = (e) => e === B.translator, ja = (e) => {
|
|
10081
10081
|
switch (e) {
|
|
10082
10082
|
case Xe.timer:
|
|
10083
10083
|
return "pi pi-clock";
|
|
@@ -10202,22 +10202,22 @@ var kp = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(re,
|
|
|
10202
10202
|
})]
|
|
10203
10203
|
});
|
|
10204
10204
|
}, ch = ({ sliceType: e, isSystemSlice: t, collapsed: n = !1, conn: r, rowHeight: o, triggerType: i, reactionRefusals: s, reactionInvocations: d }) => {
|
|
10205
|
-
const { readOnly: l, sliceId: c } = ht(), { onTriggerKindChosen: u, onTriggerOpened: g, onReactionRefusalsEdit: v } = ne().editing,
|
|
10205
|
+
const { readOnly: l, sliceId: c } = ht(), { onTriggerKindChosen: u, onTriggerOpened: g, onReactionRefusalsEdit: v } = ne().editing, p = Ce(), m = i === void 0 ? void 0 : ja(i), h = { height: o }, b = t && e === B.automation;
|
|
10206
10206
|
return n ? /* @__PURE__ */ a("div", {
|
|
10207
|
-
style:
|
|
10207
|
+
style: h,
|
|
10208
10208
|
className: "event-modeling-grid-slice-cell event-modeling-grid-slice-cell--centered event-modeling-grid-slice-cell--system event-modeling-grid-slice-cell--collapsed",
|
|
10209
10209
|
children: t && /* @__PURE__ */ a(Hn, {})
|
|
10210
10210
|
}) : /* @__PURE__ */ S("div", {
|
|
10211
|
-
style:
|
|
10211
|
+
style: h,
|
|
10212
10212
|
"data-card-id": "system",
|
|
10213
10213
|
"data-slice-id": c?.toString(),
|
|
10214
10214
|
className: "event-modeling-grid-slice-cell event-modeling-grid-slice-cell--centered event-modeling-grid-slice-cell--system",
|
|
10215
10215
|
children: [
|
|
10216
10216
|
r.topOutgoing && /* @__PURE__ */ a(wn, {}),
|
|
10217
10217
|
r.topIncoming && /* @__PURE__ */ a(yn, {}),
|
|
10218
|
-
e ===
|
|
10218
|
+
e === B.automation ? /* @__PURE__ */ S(re, { children: [r.bottomIncoming && /* @__PURE__ */ a(Kt, { columnPosition: "left" }), r.bottomOutgoing && /* @__PURE__ */ a(Zt, { columnPosition: "right" })] }) : /* @__PURE__ */ S(re, { children: [r.bottomOutgoing && /* @__PURE__ */ a(Zt, {}), r.bottomIncoming && /* @__PURE__ */ a(Kt, {})] }),
|
|
10219
10219
|
r.passthrough && /* @__PURE__ */ a(Tc, {}),
|
|
10220
|
-
t && (e ===
|
|
10220
|
+
t && (e === B.automation ? /* @__PURE__ */ a("span", {
|
|
10221
10221
|
"data-flow-node": Me.cogwheel,
|
|
10222
10222
|
className: "system-row-cell__cogwheel",
|
|
10223
10223
|
children: /* @__PURE__ */ a(Hn, {})
|
|
@@ -10236,7 +10236,7 @@ var kp = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(re,
|
|
|
10236
10236
|
className: "system-row-cell__trigger-wrapper",
|
|
10237
10237
|
children: /* @__PURE__ */ a("span", {
|
|
10238
10238
|
className: "system-row-cell__trigger-btn system-row-cell__trigger-btn--active system-row-cell__trigger-btn--readonly",
|
|
10239
|
-
title: ih(i,
|
|
10239
|
+
title: ih(i, p),
|
|
10240
10240
|
children: /* @__PURE__ */ a("i", { className: m })
|
|
10241
10241
|
})
|
|
10242
10242
|
})
|
|
@@ -10264,7 +10264,7 @@ var kp = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(re,
|
|
|
10264
10264
|
onFromScratch: () => t(i()),
|
|
10265
10265
|
onFromTemplate: (d) => n(d, i())
|
|
10266
10266
|
});
|
|
10267
|
-
return /* @__PURE__ */ a(
|
|
10267
|
+
return /* @__PURE__ */ a(ye, {
|
|
10268
10268
|
content: r.add,
|
|
10269
10269
|
position: "top",
|
|
10270
10270
|
children: /* @__PURE__ */ a(vt, {
|
|
@@ -10278,54 +10278,64 @@ var kp = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(re,
|
|
|
10278
10278
|
})
|
|
10279
10279
|
})
|
|
10280
10280
|
});
|
|
10281
|
-
}, gh = ({ elements: e, windowSize: t, layout: n, collapsed: r = !1, conn: o, rowHeight: i, actorId: s, hasScreen: d = !1, renderThumbnail: l, adornment: c }) => {
|
|
10282
|
-
const { readOnly:
|
|
10281
|
+
}, gh = ({ elements: e, windowSize: t, layout: n, collapsed: r = !1, conn: o, rowHeight: i, actorId: s, hasScreen: d = !1, renderThumbnail: l, adornment: c, corner: u }) => {
|
|
10282
|
+
const { readOnly: g, sliceId: v } = ht(), { editing: p, actions: m, readOnly: h } = ne(), { onPrototypeOpened: b, onPrototypeAdded: f } = p, y = O(null), [w, x] = D(), k = Ms().prototypeThumbnail, R = { height: i }, M = "event-modeling-grid-slice-cell event-modeling-grid-slice-cell--centered event-modeling-grid-slice-cell--ui";
|
|
10283
10283
|
if (r) return /* @__PURE__ */ a("div", {
|
|
10284
|
-
style:
|
|
10285
|
-
className:
|
|
10284
|
+
style: R,
|
|
10285
|
+
className: M
|
|
10286
10286
|
});
|
|
10287
|
-
const
|
|
10287
|
+
const C = e.length > 0 || d, L = !h && v && b && v && b ? () => b(v, s, y.current?.getBoundingClientRect() ?? new DOMRect()) : h ? () => x(y.current?.getBoundingClientRect() ?? new DOMRect()) : void 0, V = /* @__PURE__ */ a(xs, {
|
|
10288
10288
|
elements: [...e],
|
|
10289
10289
|
windowSize: t,
|
|
10290
10290
|
layout: n,
|
|
10291
|
-
onClick:
|
|
10292
|
-
openTitle:
|
|
10291
|
+
onClick: L,
|
|
10292
|
+
openTitle: h ? k.openPreview : void 0
|
|
10293
10293
|
});
|
|
10294
10294
|
return /* @__PURE__ */ S("div", {
|
|
10295
|
-
style:
|
|
10296
|
-
className:
|
|
10295
|
+
style: R,
|
|
10296
|
+
className: M,
|
|
10297
10297
|
children: [
|
|
10298
|
-
o.bottomOutgoing &&
|
|
10299
|
-
o.bottomIncoming &&
|
|
10298
|
+
o.bottomOutgoing && C && /* @__PURE__ */ a(Zt, {}),
|
|
10299
|
+
o.bottomIncoming && C && /* @__PURE__ */ a(Kt, {}),
|
|
10300
10300
|
/* @__PURE__ */ S("div", {
|
|
10301
10301
|
className: "event-modeling-grid-slice-cell-items",
|
|
10302
|
-
children: [
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10306
|
-
|
|
10302
|
+
children: [
|
|
10303
|
+
C && /* @__PURE__ */ a("div", {
|
|
10304
|
+
ref: y,
|
|
10305
|
+
className: `event-modeling-grid-ui-preview${L ? " event-modeling-grid-ui-preview--clickable" : ""}`,
|
|
10306
|
+
"data-flow-node": Me.ui,
|
|
10307
|
+
children: l ? l({
|
|
10308
|
+
elements: e,
|
|
10309
|
+
windowSize: t,
|
|
10310
|
+
layout: n,
|
|
10311
|
+
onClick: L,
|
|
10312
|
+
openTitle: h ? k.openPreview : void 0,
|
|
10313
|
+
fallback: V
|
|
10314
|
+
}) : V
|
|
10315
|
+
}),
|
|
10316
|
+
C && u && /* @__PURE__ */ a("div", {
|
|
10317
|
+
className: "event-modeling-grid-ui-corner",
|
|
10318
|
+
onPointerDown: (U) => U.stopPropagation(),
|
|
10319
|
+
onMouseDown: (U) => U.stopPropagation(),
|
|
10320
|
+
onClick: (U) => U.stopPropagation(),
|
|
10321
|
+
children: u
|
|
10322
|
+
}),
|
|
10323
|
+
w && /* @__PURE__ */ a(Cs, {
|
|
10307
10324
|
elements: e,
|
|
10308
10325
|
windowSize: t,
|
|
10309
10326
|
layout: n,
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
}), y && /* @__PURE__ */ a(Cs, {
|
|
10315
|
-
elements: e,
|
|
10316
|
-
windowSize: t,
|
|
10317
|
-
layout: n,
|
|
10318
|
-
sourceRect: y,
|
|
10319
|
-
onClose: () => w(void 0)
|
|
10320
|
-
})]
|
|
10327
|
+
sourceRect: w,
|
|
10328
|
+
onClose: () => x(void 0)
|
|
10329
|
+
})
|
|
10330
|
+
]
|
|
10321
10331
|
}),
|
|
10322
10332
|
c,
|
|
10323
|
-
!
|
|
10333
|
+
!g && v && f && !C && /* @__PURE__ */ a(zt, {
|
|
10324
10334
|
placement: Ct.add,
|
|
10325
10335
|
children: /* @__PURE__ */ a(mh, {
|
|
10326
|
-
templates:
|
|
10327
|
-
onFromScratch: (
|
|
10328
|
-
onFromTemplate: (
|
|
10336
|
+
templates: m.prototypeTemplates ?? [],
|
|
10337
|
+
onFromScratch: (U) => f(v, s, U),
|
|
10338
|
+
onFromTemplate: (U, F) => U.onChosen(v, s, F)
|
|
10329
10339
|
})
|
|
10330
10340
|
})
|
|
10331
10341
|
]
|
|
@@ -10385,7 +10395,7 @@ var kp = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(re,
|
|
|
10385
10395
|
className: `event-modeling-event__mark${t ? " event-modeling-event__mark--opposite" : ""}`
|
|
10386
10396
|
}), Pt = /* @__PURE__ */ (function(e) {
|
|
10387
10397
|
return e.publicOutsideOutputTranslation = "publicOutsideOutputTranslation", e.privateOutputOfOutputTranslation = "privateOutputOfOutputTranslation", e.publicInputOfOutputTranslation = "publicInputOfOutputTranslation", e;
|
|
10388
|
-
})({}), gt = (e) => e.visibility === Es.public, et = (e) => e.sliceType ===
|
|
10398
|
+
})({}), gt = (e) => e.visibility === Es.public, et = (e) => e.sliceType === B.translator && e.translationDirection === dt.output, ph = (e, t) => {
|
|
10389
10399
|
if (!t.sourceEventId)
|
|
10390
10400
|
return et(e) ? gt(t) ? void 0 : Pt.privateOutputOfOutputTranslation : gt(t) ? Pt.publicOutsideOutputTranslation : void 0;
|
|
10391
10401
|
}, fh = (e, t, n) => {
|
|
@@ -10451,11 +10461,11 @@ var kp = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(re,
|
|
|
10451
10461
|
})
|
|
10452
10462
|
})] });
|
|
10453
10463
|
}, wh = ({ sliceId: e, event: t, renameable: n, showDetails: r = !1, ruleBreak: o, annotations: i }) => {
|
|
10454
|
-
const { editing: s, actions: d, selection: l, messages: c } = ne(), u = _e(), g = Rn(i), [v,
|
|
10455
|
-
oe(() =>
|
|
10464
|
+
const { editing: s, actions: d, selection: l, messages: c } = ne(), u = _e(), g = Rn(i), [v, p] = D(t.name), [m, h] = D(void 0);
|
|
10465
|
+
oe(() => p(t.name), [t.name]);
|
|
10456
10466
|
const b = s.onEventRenamed, f = n && !u && !!b, y = !!l.selectedArtifactId?.equals(t.id), w = () => {
|
|
10457
10467
|
const x = m?.trim() ?? "";
|
|
10458
|
-
|
|
10468
|
+
h(void 0), !(!x || !b) && p(b(e, t.id, x) ?? x);
|
|
10459
10469
|
};
|
|
10460
10470
|
return m !== void 0 ? /* @__PURE__ */ a("div", {
|
|
10461
10471
|
className: "event-modeling-grid-event-wrapper",
|
|
@@ -10463,16 +10473,16 @@ var kp = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(re,
|
|
|
10463
10473
|
value: m,
|
|
10464
10474
|
backgroundColor: Ae.background,
|
|
10465
10475
|
textColor: Ae.text,
|
|
10466
|
-
onChange:
|
|
10476
|
+
onChange: h,
|
|
10467
10477
|
onCommit: w,
|
|
10468
|
-
onCancel: () =>
|
|
10478
|
+
onCancel: () => h(void 0)
|
|
10469
10479
|
})
|
|
10470
10480
|
}) : /* @__PURE__ */ S("div", {
|
|
10471
10481
|
className: `event-modeling-grid-event-wrapper${o ? " event-modeling-grid-event-wrapper--rule-break" : ""}${g ? " event-modeling-event--marked event-model-annotation-severity" : ""}`,
|
|
10472
10482
|
"data-severity": g,
|
|
10473
10483
|
"data-flow-node": Me.event,
|
|
10474
10484
|
children: [
|
|
10475
|
-
/* @__PURE__ */ a(
|
|
10485
|
+
/* @__PURE__ */ a(ye, {
|
|
10476
10486
|
content: /* @__PURE__ */ S(re, { children: [mt(t.description) !== void 0 && /* @__PURE__ */ a(Ar, {
|
|
10477
10487
|
description: t.description,
|
|
10478
10488
|
documentation: t.documentation
|
|
@@ -10494,7 +10504,7 @@ var kp = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(re,
|
|
|
10494
10504
|
actions: d.eventCard?.actions,
|
|
10495
10505
|
onActivate: d.eventCard?.onActivate,
|
|
10496
10506
|
isSelected: y,
|
|
10497
|
-
onStartEdit: f ? () =>
|
|
10507
|
+
onStartEdit: f ? () => h(v) : void 0,
|
|
10498
10508
|
ariaLabel: `${c.events.openEvent} ${v}`,
|
|
10499
10509
|
ariaPressed: y,
|
|
10500
10510
|
"data-event-id": t.id.toString()
|
|
@@ -10507,18 +10517,22 @@ var kp = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(re,
|
|
|
10507
10517
|
})
|
|
10508
10518
|
]
|
|
10509
10519
|
});
|
|
10510
|
-
}, Ga = ({ onClick: e }) => {
|
|
10511
|
-
const
|
|
10512
|
-
return /* @__PURE__ */ a("button", {
|
|
10520
|
+
}, Ga = ({ onClick: e, label: t }) => {
|
|
10521
|
+
const n = Ce(), r = t ?? n.references.navigateToOriginal, o = /* @__PURE__ */ a("button", {
|
|
10513
10522
|
className: "event-modeling-grid-event-navigate-button",
|
|
10514
|
-
"aria-label":
|
|
10515
|
-
title: t
|
|
10523
|
+
"aria-label": r,
|
|
10524
|
+
title: t === void 0 ? r : void 0,
|
|
10516
10525
|
onClick: e,
|
|
10517
10526
|
children: /* @__PURE__ */ a("i", {
|
|
10518
10527
|
className: "pi pi-arrow-up-right",
|
|
10519
10528
|
style: { transform: "scaleX(-1)" }
|
|
10520
10529
|
})
|
|
10521
10530
|
});
|
|
10531
|
+
return t === void 0 ? o : /* @__PURE__ */ a(ye, {
|
|
10532
|
+
content: t.split(`
|
|
10533
|
+
`).map((i, s) => /* @__PURE__ */ a("div", { children: i }, s)),
|
|
10534
|
+
children: o
|
|
10535
|
+
});
|
|
10522
10536
|
}, Sh = "[data-event-model-board]", di = "event-modeling-board--dim-others", un = "event-modeling-event--undimmed";
|
|
10523
10537
|
function Ua(e, t) {
|
|
10524
10538
|
const n = O(null), r = O(null), o = G(() => {
|
|
@@ -10567,13 +10581,13 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10567
10581
|
})
|
|
10568
10582
|
});
|
|
10569
10583
|
}, Ch = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: o, onNavigate: i, onRemove: s, removalPending: d = !1, isPublic: l = !1, ruleBreak: c, ariaLabel: u, ...g }) => {
|
|
10570
|
-
const v = at(e),
|
|
10584
|
+
const v = at(e), p = Ce(), m = !!n && !n.equals(pe.empty) && !!i, h = Ua(n ?? pe.empty, i);
|
|
10571
10585
|
return /* @__PURE__ */ S("div", {
|
|
10572
|
-
ref:
|
|
10586
|
+
ref: h.ref,
|
|
10573
10587
|
"data-board-change": v,
|
|
10574
10588
|
className: `${v ? "event-model-change-frame event-model-change-name " : ""}event-modeling-grid-event-wrapper event-modeling-grid-event-wrapper--reference${c ? " event-modeling-grid-event-wrapper--rule-break" : ""}`,
|
|
10575
|
-
onMouseEnter: m ?
|
|
10576
|
-
onMouseLeave: m ?
|
|
10589
|
+
onMouseEnter: m ? h.onMouseEnter : void 0,
|
|
10590
|
+
onMouseLeave: m ? h.onMouseLeave : void 0,
|
|
10577
10591
|
children: [
|
|
10578
10592
|
/* @__PURE__ */ a(ut, {
|
|
10579
10593
|
name: t,
|
|
@@ -10581,16 +10595,16 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10581
10595
|
textColor: mr.text,
|
|
10582
10596
|
isSelected: r,
|
|
10583
10597
|
onSelected: o,
|
|
10584
|
-
ariaLabel: v ? `${u ?? t} · ${On(
|
|
10598
|
+
ariaLabel: v ? `${u ?? t} · ${On(p, v)}` : u,
|
|
10585
10599
|
extraContent: /* @__PURE__ */ S(re, { children: [/* @__PURE__ */ a(Mt, {
|
|
10586
10600
|
change: v,
|
|
10587
|
-
kind:
|
|
10601
|
+
kind: p.interaction.externalEvent,
|
|
10588
10602
|
name: t
|
|
10589
10603
|
}), l && /* @__PURE__ */ a(Jr, {})] }),
|
|
10590
10604
|
...g
|
|
10591
10605
|
}),
|
|
10592
10606
|
c && /* @__PURE__ */ a(Va, { ruleBreak: c }),
|
|
10593
|
-
m && /* @__PURE__ */ a(Ga, { onClick:
|
|
10607
|
+
m && /* @__PURE__ */ a(Ga, { onClick: h.handleNavigate }),
|
|
10594
10608
|
s && /* @__PURE__ */ a(Ya, {
|
|
10595
10609
|
eventName: t,
|
|
10596
10610
|
pending: d,
|
|
@@ -10601,14 +10615,14 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10601
10615
|
]
|
|
10602
10616
|
});
|
|
10603
10617
|
}, xh = ({ sliceId: e, event: t, selectable: n, showDetails: r = !1, projectedFromTheRight: o = !1, annotations: i = [] }) => {
|
|
10604
|
-
const { editing: s, selection: d, navigation: l, messages: c } = ne(), u = _e() ? void 0 : s.onEventReferenceRemoved, g = pe.parse(t.sourceEventId ?? pe.empty.toString()), v = Ua(g, l.onNavigateToEvent),
|
|
10618
|
+
const { editing: s, selection: d, navigation: l, messages: c } = ne(), u = _e() ? void 0 : s.onEventReferenceRemoved, g = pe.parse(t.sourceEventId ?? pe.empty.toString()), v = Ua(g, l.onNavigateToEvent), p = !!d.selectedArtifactId?.equals(t.id), m = d.onArtifactSelected, h = at(t.id), b = `${c.events.openEvent} ${t.name}`, f = o ? [{
|
|
10605
10619
|
severity: At.warning,
|
|
10606
10620
|
message: c.events.projectedFromTheRight
|
|
10607
10621
|
}, ...i] : i, y = Rn(f);
|
|
10608
10622
|
return /* @__PURE__ */ S("div", {
|
|
10609
10623
|
ref: v.ref,
|
|
10610
|
-
className: `event-modeling-grid-event-wrapper event-modeling-grid-event-wrapper--reference event-modeling-event-reference${o ? " event-modeling-event-reference--out-of-order" : ""}${y ? " event-modeling-event--marked event-model-annotation-severity" : ""}${
|
|
10611
|
-
"data-board-change":
|
|
10624
|
+
className: `event-modeling-grid-event-wrapper event-modeling-grid-event-wrapper--reference event-modeling-event-reference${o ? " event-modeling-event-reference--out-of-order" : ""}${y ? " event-modeling-event--marked event-model-annotation-severity" : ""}${h ? " event-model-change-frame event-model-change-name" : ""}`,
|
|
10625
|
+
"data-board-change": h,
|
|
10612
10626
|
"data-out-of-order": o || void 0,
|
|
10613
10627
|
"data-severity": y,
|
|
10614
10628
|
title: o ? c.events.projectedFromTheRight : void 0,
|
|
@@ -10616,7 +10630,7 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10616
10630
|
onMouseEnter: v.onMouseEnter,
|
|
10617
10631
|
onMouseLeave: v.onMouseLeave,
|
|
10618
10632
|
children: [
|
|
10619
|
-
/* @__PURE__ */ a(
|
|
10633
|
+
/* @__PURE__ */ a(ye, {
|
|
10620
10634
|
content: /* @__PURE__ */ a(Bt, {
|
|
10621
10635
|
title: t.name,
|
|
10622
10636
|
schema: t.schema
|
|
@@ -10626,14 +10640,14 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10626
10640
|
name: t.name,
|
|
10627
10641
|
backgroundColor: Ae.background,
|
|
10628
10642
|
textColor: Ae.text,
|
|
10629
|
-
isSelected:
|
|
10643
|
+
isSelected: p,
|
|
10630
10644
|
onSelected: n && m ? () => m(t.id) : void 0,
|
|
10631
|
-
ariaLabel:
|
|
10632
|
-
ariaPressed:
|
|
10645
|
+
ariaLabel: h ? `${b} · ${On(c, h)}` : b,
|
|
10646
|
+
ariaPressed: p,
|
|
10633
10647
|
"data-event-id": t.id.toString(),
|
|
10634
|
-
extraContent:
|
|
10648
|
+
extraContent: h || gt(t) || r ? /* @__PURE__ */ S(re, { children: [
|
|
10635
10649
|
/* @__PURE__ */ a(Mt, {
|
|
10636
|
-
change:
|
|
10650
|
+
change: h,
|
|
10637
10651
|
kind: ue.event,
|
|
10638
10652
|
name: t.name
|
|
10639
10653
|
}),
|
|
@@ -10663,14 +10677,14 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10663
10677
|
]
|
|
10664
10678
|
});
|
|
10665
10679
|
}, Mh = (e, t, n) => {
|
|
10666
|
-
if (e.sliceType !==
|
|
10680
|
+
if (e.sliceType !== B.stateView) return /* @__PURE__ */ new Set();
|
|
10667
10681
|
const r = new Set(t.map((i) => i.id.toString())), o = new Set(n.map((i) => i.id.toString()));
|
|
10668
10682
|
return new Set(e.events.filter((i) => !!i.sourceEventId && o.has(i.sourceEventId) && !r.has(i.sourceEventId)).map((i) => i.id.toString()));
|
|
10669
10683
|
}, kh = (e, t) => {
|
|
10670
10684
|
const n = new Set(e.events.flatMap((o) => o.sourceEventId ? [o.sourceEventId] : [])), r = new Set(e.events.map((o) => o.name));
|
|
10671
10685
|
return t.filter((o) => !n.has(o.id.toString()) && !r.has(o.name));
|
|
10672
10686
|
}, Eh = ({ slice: e, collapsed: t = !1, conn: n, rowHeight: r, priorEvents: o, followingEvents: i = [], showDetails: s = !1 }) => {
|
|
10673
|
-
const { editing: d, actions: l, messages: c } = ne(), u = _e(), { onEventAdded: g, onEventReferenced: v } = d,
|
|
10687
|
+
const { editing: d, actions: l, messages: c } = ne(), u = _e(), { onEventAdded: g, onEventReferenced: v } = d, p = Zr(e.sliceType), m = rh(e.sliceType, e.events.length), h = !(et(e) && e.events.some((k) => !k.sourceEventId)), b = kh(e, o), f = Mh(e, o, i), y = /* @__PURE__ */ new Map();
|
|
10674
10688
|
for (const k of e.annotations ?? []) {
|
|
10675
10689
|
if (!k.eventId) continue;
|
|
10676
10690
|
const R = k.eventId.toString().toLowerCase();
|
|
@@ -10696,14 +10710,14 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10696
10710
|
placement: Ct.top,
|
|
10697
10711
|
children: w.map((k) => /* @__PURE__ */ a(Mn, { action: k }, k.tooltip))
|
|
10698
10712
|
}),
|
|
10699
|
-
!u && !
|
|
10713
|
+
!u && !p && h && g && /* @__PURE__ */ a(nh, {
|
|
10700
10714
|
placement: Ct.add,
|
|
10701
10715
|
action: {
|
|
10702
10716
|
tooltip: c.events.addEvent,
|
|
10703
10717
|
onActivate: (k) => g(k)
|
|
10704
10718
|
}
|
|
10705
10719
|
}),
|
|
10706
|
-
!u &&
|
|
10720
|
+
!u && p && !m && v && /* @__PURE__ */ a(zt, {
|
|
10707
10721
|
placement: Ct.add,
|
|
10708
10722
|
children: x(!1)
|
|
10709
10723
|
})
|
|
@@ -10711,25 +10725,25 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10711
10725
|
children: e.events.map((k) => k.sourceEventId ? /* @__PURE__ */ a(xh, {
|
|
10712
10726
|
sliceId: e.id,
|
|
10713
10727
|
event: k,
|
|
10714
|
-
selectable: e.sliceType !==
|
|
10728
|
+
selectable: e.sliceType !== B.stateView,
|
|
10715
10729
|
showDetails: s,
|
|
10716
10730
|
projectedFromTheRight: f.has(k.id.toString()),
|
|
10717
10731
|
annotations: y.get(k.id.toString().toLowerCase())
|
|
10718
10732
|
}, k.id.toString()) : /* @__PURE__ */ a(wh, {
|
|
10719
10733
|
sliceId: e.id,
|
|
10720
10734
|
event: k,
|
|
10721
|
-
renameable: e.sliceType !==
|
|
10735
|
+
renameable: e.sliceType !== B.stateView,
|
|
10722
10736
|
showDetails: s,
|
|
10723
10737
|
ruleBreak: ph(e, k),
|
|
10724
10738
|
annotations: y.get(k.id.toString().toLowerCase())
|
|
10725
10739
|
}, k.id.toString()))
|
|
10726
10740
|
});
|
|
10727
10741
|
}, ci = ({ sliceId: e, kind: t, artifactId: n, name: r, schema: o, description: i, summary: s, documentation: d, showDetails: l = !1, annotations: c, onRenamed: u }) => {
|
|
10728
|
-
const g = Rn(c), { actions: v, selection:
|
|
10742
|
+
const g = Rn(c), { actions: v, selection: p, messages: m } = ne(), h = _e(), [b, f] = D(r), [y, w] = D(void 0);
|
|
10729
10743
|
oe(() => f(r), [r]);
|
|
10730
|
-
const x = t === ue.command, k = x ? v.commandCard : v.readModelCardFor?.(n) ?? v.readModelCard, R = x ? Ft : We, M = x ? m.interaction.command : m.interaction.readModel, C = !
|
|
10731
|
-
const
|
|
10732
|
-
w(void 0), !(!
|
|
10744
|
+
const x = t === ue.command, k = x ? v.commandCard : v.readModelCardFor?.(n) ?? v.readModelCard, R = x ? Ft : We, M = x ? m.interaction.command : m.interaction.readModel, C = !h && !!u, L = p.onArtifactSelected, V = () => {
|
|
10745
|
+
const U = y?.trim() ?? "";
|
|
10746
|
+
w(void 0), !(!U || !u) && (u(U), f(U));
|
|
10733
10747
|
};
|
|
10734
10748
|
return y !== void 0 ? /* @__PURE__ */ a($n, {
|
|
10735
10749
|
value: y,
|
|
@@ -10738,12 +10752,12 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10738
10752
|
onChange: w,
|
|
10739
10753
|
onCommit: V,
|
|
10740
10754
|
onCancel: () => w(void 0)
|
|
10741
|
-
}) : /* @__PURE__ */ a(
|
|
10755
|
+
}) : /* @__PURE__ */ a(ye, {
|
|
10742
10756
|
content: /* @__PURE__ */ S(re, { children: [mt(i) !== void 0 && /* @__PURE__ */ a(Ar, {
|
|
10743
10757
|
description: i,
|
|
10744
10758
|
documentation: d
|
|
10745
10759
|
}), /* @__PURE__ */ a(Bt, {
|
|
10746
|
-
title: `${
|
|
10760
|
+
title: `${h ? "" : `${m.interaction.doubleClickToRenamePrefix} `}${M}: ${b}`,
|
|
10747
10761
|
schema: o
|
|
10748
10762
|
})] }),
|
|
10749
10763
|
position: "top",
|
|
@@ -10763,7 +10777,7 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10763
10777
|
showDetails: l,
|
|
10764
10778
|
actions: k?.actions,
|
|
10765
10779
|
onActivate: k?.onActivate,
|
|
10766
|
-
isSelected: !!
|
|
10780
|
+
isSelected: !!p.selectedArtifactId?.equals(n),
|
|
10767
10781
|
onSelected: L ? () => L(n) : void 0,
|
|
10768
10782
|
onStartEdit: C ? () => w(b) : void 0,
|
|
10769
10783
|
ariaLabel: `${m.interaction.open} ${M}: ${b}`,
|
|
@@ -10861,20 +10875,20 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10861
10875
|
return r.has(s) || o.has(s) ? !1 : (o.add(s), !0);
|
|
10862
10876
|
});
|
|
10863
10877
|
}, ui = ({ sliceId: e, kind: t, artifactId: n, name: r, sources: o, onRenamed: i }) => {
|
|
10864
|
-
const { actions: s, selection: d, messages: l } = ne(), c = _e(), [u, g] = D(r), [v,
|
|
10878
|
+
const { actions: s, selection: d, messages: l } = ne(), c = _e(), [u, g] = D(r), [v, p] = D(void 0);
|
|
10865
10879
|
oe(() => g(r), [r]);
|
|
10866
|
-
const m = t === ue.projection,
|
|
10880
|
+
const m = t === ue.projection, h = m ? s.projectionCard : s.captureCard, b = m ? zr : Hr, f = m ? l.interaction.projection : l.interaction.capture, y = !c && !!i, w = d.onArtifactSelected, x = o.length > 0 ? o.join(", ") : l.interaction.noSourceEvents, k = () => {
|
|
10867
10881
|
const R = v?.trim() ?? "";
|
|
10868
|
-
|
|
10882
|
+
p(void 0), !(!R || !i) && (i(R), g(R));
|
|
10869
10883
|
};
|
|
10870
10884
|
return v !== void 0 ? /* @__PURE__ */ a($n, {
|
|
10871
10885
|
value: v,
|
|
10872
10886
|
backgroundColor: b.background,
|
|
10873
10887
|
textColor: b.text,
|
|
10874
|
-
onChange:
|
|
10888
|
+
onChange: p,
|
|
10875
10889
|
onCommit: k,
|
|
10876
|
-
onCancel: () =>
|
|
10877
|
-
}) : /* @__PURE__ */ a(
|
|
10890
|
+
onCancel: () => p(void 0)
|
|
10891
|
+
}) : /* @__PURE__ */ a(ye, {
|
|
10878
10892
|
content: `${c ? "" : `${l.interaction.doubleClickToRenamePrefix} `}${f}: ${u}`,
|
|
10879
10893
|
position: "top",
|
|
10880
10894
|
children: /* @__PURE__ */ a("div", {
|
|
@@ -10885,11 +10899,11 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10885
10899
|
name: u,
|
|
10886
10900
|
summary: x,
|
|
10887
10901
|
marker: /* @__PURE__ */ a("div", { children: (l.interaction.implementationSummary ?? Ze.interaction.implementationSummary)(f, o.length) }),
|
|
10888
|
-
actions:
|
|
10889
|
-
onActivate:
|
|
10902
|
+
actions: h?.actions,
|
|
10903
|
+
onActivate: h?.onActivate,
|
|
10890
10904
|
isSelected: !!d.selectedArtifactId?.equals(n),
|
|
10891
10905
|
onSelected: w ? () => w(n) : void 0,
|
|
10892
|
-
onStartEdit: y ? () =>
|
|
10906
|
+
onStartEdit: y ? () => p(u) : void 0,
|
|
10893
10907
|
ariaLabel: `${l.interaction.open} ${f}: ${u}`,
|
|
10894
10908
|
"data-card-id": n.toString(),
|
|
10895
10909
|
"data-slice-id": e.toString()
|
|
@@ -10897,18 +10911,18 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10897
10911
|
})
|
|
10898
10912
|
});
|
|
10899
10913
|
}, Oh = ({ sliceId: e, commandActions: t, alternativeLabel: n, onAlternative: r, label: o, configuredKind: i, oppositeLabel: s, oppositeReason: d, onOppositeAlternative: l }) => {
|
|
10900
|
-
const { messages: c } = ne(), u = Ze.interaction, g = i ? (c.interaction.occupiedImplementation ?? u.occupiedImplementation)(i) : void 0, v = O(null),
|
|
10914
|
+
const { messages: c } = ne(), u = Ze.interaction, g = i ? (c.interaction.occupiedImplementation ?? u.occupiedImplementation)(i) : void 0, v = O(null), p = () => v.current?.getBoundingClientRect() ?? new DOMRect(), m = [
|
|
10901
10915
|
...i ? [{
|
|
10902
10916
|
id: "command",
|
|
10903
10917
|
label: c.interaction.addCommand ?? u.addCommand,
|
|
10904
10918
|
disabled: !0,
|
|
10905
10919
|
description: g
|
|
10906
|
-
}] : t.map((
|
|
10920
|
+
}] : t.map((h, b) => ({
|
|
10907
10921
|
id: `command-${b}`,
|
|
10908
|
-
label:
|
|
10909
|
-
disabled:
|
|
10922
|
+
label: h.tooltip,
|
|
10923
|
+
disabled: h.disabled,
|
|
10910
10924
|
onClick: () => {
|
|
10911
|
-
|
|
10925
|
+
h.disabled || h.onActivate(e, p());
|
|
10912
10926
|
}
|
|
10913
10927
|
})),
|
|
10914
10928
|
{
|
|
@@ -10917,7 +10931,7 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10917
10931
|
disabled: !!i,
|
|
10918
10932
|
description: g,
|
|
10919
10933
|
onClick: () => {
|
|
10920
|
-
i || r(
|
|
10934
|
+
i || r(p());
|
|
10921
10935
|
}
|
|
10922
10936
|
},
|
|
10923
10937
|
...l && s ? [{
|
|
@@ -10941,11 +10955,11 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10941
10955
|
});
|
|
10942
10956
|
}, Ah = (e) => {
|
|
10943
10957
|
switch (e.sliceType) {
|
|
10944
|
-
case
|
|
10958
|
+
case B.stateChange:
|
|
10945
10959
|
return e.command ? [ot.command] : [];
|
|
10946
|
-
case
|
|
10960
|
+
case B.stateView:
|
|
10947
10961
|
return [...e.readModel ? [ot.readModel] : [], ...(e.additionalReadModels ?? []).map(() => ot.readModel)];
|
|
10948
|
-
case
|
|
10962
|
+
case B.automation:
|
|
10949
10963
|
return [...e.readModel ? [ot.readModel] : [], ...e.command ? [ot.command] : []];
|
|
10950
10964
|
default:
|
|
10951
10965
|
return [
|
|
@@ -10955,8 +10969,8 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10955
10969
|
...e.capture ? [ot.capture] : []
|
|
10956
10970
|
];
|
|
10957
10971
|
}
|
|
10958
|
-
}, Lh = (e, t) => e.sliceType ===
|
|
10959
|
-
const { editing: d, actions: l, selection: c, navigation: u, messages: g } = ne(), v = _e(), { onCommandRenamed:
|
|
10972
|
+
}, Lh = (e, t) => e.sliceType === B.translator ? (t.interaction.implementationSummary ?? Ze.interaction.implementationSummary)(t.interaction.command, e.externalEvents.length) : void 0, Ph = ({ slice: e, collapsed: t = !1, conn: n, rowHeight: r, externalEventOptions: o = [], priorEventOptions: i = [], showDetails: s = !1 }) => {
|
|
10973
|
+
const { editing: d, actions: l, selection: c, navigation: u, messages: g } = ne(), v = _e(), { onCommandRenamed: p, onReadModelRenamed: m, onReadModelAdded: h, onExternalEventAdded: b, onExternalEventRemoved: f, onProjectionRenamed: y, onCaptureRenamed: w, onProjectionAdded: x, onCaptureAdded: k } = d, R = Rh(e, o, i), M = (l.interactionRow ?? []).filter((Q) => !Q.when || Q.when(e)), C = Ah(e), L = c.onArtifactSelected, { command: V, readModel: U } = e, F = (Q, de) => (e.annotations ?? []).filter((Pe) => Pe[Q]?.toString().toLowerCase() === de.toString().toLowerCase()), te = V && /* @__PURE__ */ a(ci, {
|
|
10960
10974
|
sliceId: e.id,
|
|
10961
10975
|
kind: ue.command,
|
|
10962
10976
|
artifactId: V.id,
|
|
@@ -10966,85 +10980,85 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10966
10980
|
summary: Lh(e, g),
|
|
10967
10981
|
documentation: V.documentation,
|
|
10968
10982
|
showDetails: s,
|
|
10969
|
-
annotations:
|
|
10970
|
-
onRenamed:
|
|
10983
|
+
annotations: F("commandId", V.id),
|
|
10984
|
+
onRenamed: p && ((Q) => p(e.id, V.id, Q))
|
|
10971
10985
|
}, V.id.toString()), { projection: N, capture: E } = e, q = N && /* @__PURE__ */ a(ui, {
|
|
10972
10986
|
sliceId: e.id,
|
|
10973
10987
|
kind: ue.projection,
|
|
10974
10988
|
artifactId: N.id,
|
|
10975
10989
|
name: N.name,
|
|
10976
10990
|
sources: N.sources,
|
|
10977
|
-
onRenamed: y && ((
|
|
10991
|
+
onRenamed: y && ((Q) => y(e.id, N.id, Q))
|
|
10978
10992
|
}, N.id.toString()), A = E && /* @__PURE__ */ a(ui, {
|
|
10979
10993
|
sliceId: e.id,
|
|
10980
10994
|
kind: ue.capture,
|
|
10981
10995
|
artifactId: E.id,
|
|
10982
10996
|
name: E.name,
|
|
10983
10997
|
sources: E.sources,
|
|
10984
|
-
onRenamed: w && ((
|
|
10985
|
-
}, E.id.toString()), P = q ?? A ?? te, Z = (
|
|
10998
|
+
onRenamed: w && ((Q) => w(e.id, E.id, Q))
|
|
10999
|
+
}, E.id.toString()), P = q ?? A ?? te, Z = (Q) => /* @__PURE__ */ a(ci, {
|
|
10986
11000
|
sliceId: e.id,
|
|
10987
11001
|
kind: ue.readModel,
|
|
10988
|
-
artifactId:
|
|
10989
|
-
name:
|
|
10990
|
-
schema:
|
|
10991
|
-
description:
|
|
10992
|
-
documentation:
|
|
11002
|
+
artifactId: Q.id,
|
|
11003
|
+
name: Q.name,
|
|
11004
|
+
schema: Q.schema,
|
|
11005
|
+
description: Q.description,
|
|
11006
|
+
documentation: Q.documentation,
|
|
10993
11007
|
showDetails: s,
|
|
10994
|
-
annotations:
|
|
10995
|
-
onRenamed: m && ((de) => m(e.id,
|
|
10996
|
-
},
|
|
11008
|
+
annotations: F("readModelId", Q.id),
|
|
11009
|
+
onRenamed: m && ((de) => m(e.id, Q.id, de))
|
|
11010
|
+
}, Q.id.toString()), T = e.sliceType === B.stateView ? e.additionalReadModels ?? [] : [], z = U && Z(U), K = T.length > 0 ? /* @__PURE__ */ S("div", {
|
|
10997
11011
|
className: "event-modeling-grid-slice-cell-stack",
|
|
10998
11012
|
children: [z, T.map(Z)]
|
|
10999
|
-
}) : z, I = (
|
|
11000
|
-
const de = `${g.interaction.open} ${g.interaction.externalEvent}: ${
|
|
11001
|
-
return /* @__PURE__ */ a(
|
|
11013
|
+
}) : z, I = (Q) => {
|
|
11014
|
+
const de = `${g.interaction.open} ${g.interaction.externalEvent}: ${Q.name}`, Pe = Nh(Q, R), Ve = R.find((Ue) => Ue.id.toString() === Q.sourceEventId);
|
|
11015
|
+
return /* @__PURE__ */ a(ye, {
|
|
11002
11016
|
content: /* @__PURE__ */ a(Bt, {
|
|
11003
|
-
title: `${v ? "" : `${g.interaction.doubleClickToRenamePrefix} `}${g.interaction.externalEvent}: ${
|
|
11017
|
+
title: `${v ? "" : `${g.interaction.doubleClickToRenamePrefix} `}${g.interaction.externalEvent}: ${Q.name}`,
|
|
11004
11018
|
schema: Pe
|
|
11005
11019
|
}),
|
|
11006
11020
|
position: "top",
|
|
11007
11021
|
children: /* @__PURE__ */ a("div", {
|
|
11008
11022
|
"data-flow-node": Me.externalEvent,
|
|
11009
11023
|
children: /* @__PURE__ */ a(Ch, {
|
|
11010
|
-
id:
|
|
11011
|
-
name:
|
|
11012
|
-
sourceEventId:
|
|
11024
|
+
id: Q.id,
|
|
11025
|
+
name: Q.name,
|
|
11026
|
+
sourceEventId: Q.sourceEventId ? pe.parse(Q.sourceEventId) : void 0,
|
|
11013
11027
|
onNavigate: u.onNavigateToEvent,
|
|
11014
|
-
onRemove: !v && f ? () => f(e.id,
|
|
11015
|
-
removalPending: d.isExternalEventRemovalPending?.(e.id,
|
|
11028
|
+
onRemove: !v && f ? () => f(e.id, Q.id) : void 0,
|
|
11029
|
+
removalPending: d.isExternalEventRemovalPending?.(e.id, Q.id),
|
|
11016
11030
|
isPublic: !!Ve && gt(Ve),
|
|
11017
|
-
ruleBreak: fh(e,
|
|
11018
|
-
isSelected: !!c.selectedArtifactId?.equals(
|
|
11019
|
-
onSelected: L ? () => L(
|
|
11031
|
+
ruleBreak: fh(e, Q, R),
|
|
11032
|
+
isSelected: !!c.selectedArtifactId?.equals(Q.id),
|
|
11033
|
+
onSelected: L ? () => L(Q.id) : void 0,
|
|
11020
11034
|
ariaLabel: de,
|
|
11021
|
-
"data-card-id":
|
|
11035
|
+
"data-card-id": Q.id.toString(),
|
|
11022
11036
|
"data-slice-id": e.id.toString()
|
|
11023
11037
|
})
|
|
11024
11038
|
})
|
|
11025
|
-
},
|
|
11039
|
+
}, Q.id.toString());
|
|
11026
11040
|
}, j = et(e) ? x && {
|
|
11027
11041
|
label: g.interaction.addProjection,
|
|
11028
11042
|
add: x
|
|
11029
11043
|
} : k && {
|
|
11030
11044
|
label: g.interaction.addCapture,
|
|
11031
11045
|
add: k
|
|
11032
|
-
},
|
|
11046
|
+
}, Y = N ? g.interaction.projection : E ? g.interaction.capture : V ? g.interaction.command : void 0, ie = e.sliceType === B.translator && !!j, $ = et(e) ? k : x, _ = et(e) ? g.interaction.captureInputOnly ?? Ze.interaction.captureInputOnly : g.interaction.projectionOutputOnly ?? Ze.interaction.projectionOutputOnly, ee = !v && (M.length > 0 || ie) && /* @__PURE__ */ S(zt, {
|
|
11033
11047
|
placement: Ct.add,
|
|
11034
11048
|
children: [ie && j ? /* @__PURE__ */ a(Oh, {
|
|
11035
11049
|
sliceId: e.id,
|
|
11036
|
-
commandActions:
|
|
11037
|
-
configuredKind:
|
|
11050
|
+
commandActions: Y ? [] : M,
|
|
11051
|
+
configuredKind: Y,
|
|
11038
11052
|
oppositeLabel: et(e) ? g.interaction.addCapture : g.interaction.addProjection,
|
|
11039
11053
|
oppositeReason: _,
|
|
11040
|
-
onOppositeAlternative: $ && ((
|
|
11054
|
+
onOppositeAlternative: $ && ((Q) => $(e.id, Q)),
|
|
11041
11055
|
alternativeLabel: j.label,
|
|
11042
|
-
onAlternative: (
|
|
11056
|
+
onAlternative: (Q) => j.add(e.id, Q),
|
|
11043
11057
|
label: g.interaction.addToTranslator
|
|
11044
|
-
}) : M.map((
|
|
11058
|
+
}) : M.map((Q) => /* @__PURE__ */ a(Mn, { action: Q }, Q.tooltip)), ie && Y && M.map((Q) => /* @__PURE__ */ a(Mn, { action: Q }, Q.tooltip))]
|
|
11045
11059
|
});
|
|
11046
|
-
if (e.sliceType ===
|
|
11047
|
-
const
|
|
11060
|
+
if (e.sliceType === B.automation && !t) {
|
|
11061
|
+
const Q = !v && !e.readModel && !!e.command && !!h;
|
|
11048
11062
|
return /* @__PURE__ */ a(tr, {
|
|
11049
11063
|
conn: n,
|
|
11050
11064
|
rowHeight: r,
|
|
@@ -11053,22 +11067,22 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
11053
11067
|
kind: "sideBySide",
|
|
11054
11068
|
readModelOnTop: !!e.readModel,
|
|
11055
11069
|
commandBelow: !!e.command,
|
|
11056
|
-
hasLeftCard: !!e.readModel ||
|
|
11070
|
+
hasLeftCard: !!e.readModel || Q,
|
|
11057
11071
|
hasRightCard: !!e.command,
|
|
11058
11072
|
cards: /* @__PURE__ */ S(re, { children: [
|
|
11059
11073
|
K,
|
|
11060
|
-
|
|
11074
|
+
Q && /* @__PURE__ */ a(Ih, {
|
|
11061
11075
|
label: g.interaction.readModel,
|
|
11062
11076
|
defineLabel: g.interaction.defineReadModel,
|
|
11063
|
-
onDefine: (de) =>
|
|
11077
|
+
onDefine: (de) => h(e.id, de)
|
|
11064
11078
|
}),
|
|
11065
11079
|
te
|
|
11066
11080
|
] })
|
|
11067
11081
|
}
|
|
11068
11082
|
});
|
|
11069
11083
|
}
|
|
11070
|
-
if (e.sliceType ===
|
|
11071
|
-
const
|
|
11084
|
+
if (e.sliceType === B.translator && !t) {
|
|
11085
|
+
const Q = new Set(e.externalEvents.map((de) => de.name));
|
|
11072
11086
|
return /* @__PURE__ */ a(tr, {
|
|
11073
11087
|
conn: n,
|
|
11074
11088
|
rowHeight: r,
|
|
@@ -11080,7 +11094,7 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
11080
11094
|
leftCorner: !v && oh(e.sliceType) && b && /* @__PURE__ */ a(zt, {
|
|
11081
11095
|
placement: Ct.add,
|
|
11082
11096
|
children: /* @__PURE__ */ a(xa, {
|
|
11083
|
-
options: bh(e, R).filter((de) => !
|
|
11097
|
+
options: bh(e, R).filter((de) => !Q.has(de.name)),
|
|
11084
11098
|
nameOf: (de) => de.name,
|
|
11085
11099
|
onSelect: (de) => b(e.id, de),
|
|
11086
11100
|
label: g.interaction.addExternalEvent,
|
|
@@ -11093,7 +11107,7 @@ var Ya = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
11093
11107
|
}
|
|
11094
11108
|
});
|
|
11095
11109
|
}
|
|
11096
|
-
const he = e.sliceType ===
|
|
11110
|
+
const he = e.sliceType === B.stateView ? K : e.sliceType === B.automation ? /* @__PURE__ */ S(re, { children: [K, te] }) : e.sliceType === B.translator ? /* @__PURE__ */ S(re, { children: [e.externalEvents.map(I), P] }) : te;
|
|
11097
11111
|
return /* @__PURE__ */ a(tr, {
|
|
11098
11112
|
collapsed: t,
|
|
11099
11113
|
conn: n,
|
|
@@ -11186,7 +11200,7 @@ export {
|
|
|
11186
11200
|
$u as GENERATED_SPECIFICATIONS_ABSORB_WINDOW_MS,
|
|
11187
11201
|
Fn as GivenContextKind,
|
|
11188
11202
|
Fm as GivenSection,
|
|
11189
|
-
|
|
11203
|
+
ye as GridTooltip,
|
|
11190
11204
|
oc as HIT_TEST_ATTRIBUTES,
|
|
11191
11205
|
Yi as HeaderDragGhost,
|
|
11192
11206
|
Ba as HostedEventModelBoard,
|
|
@@ -11259,7 +11273,7 @@ export {
|
|
|
11259
11273
|
se as SliceStatus,
|
|
11260
11274
|
Oo as SliceStatusIcon,
|
|
11261
11275
|
Pr as SliceStatusPicker,
|
|
11262
|
-
|
|
11276
|
+
B as SliceType,
|
|
11263
11277
|
uu as SliceTypeExplanation,
|
|
11264
11278
|
lu as SliceTypeIcon,
|
|
11265
11279
|
mu as SliceTypeMenu,
|