@cratis/event-models 0.272.2 → 0.273.1
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/Tooltips/GridTooltip.d.ts +1 -0
- package/dist/index.js +815 -814
- package/dist/index.js.map +1 -1
- package/package.json +22 -22
package/dist/index.js
CHANGED
|
@@ -295,7 +295,7 @@ var ye = /* @__PURE__ */ (function(e) {
|
|
|
295
295
|
if (!n) throw new Ye(`${e.path}.severity`, `unknown annotation severity '${t}'`);
|
|
296
296
|
const r = e.optionalString("message");
|
|
297
297
|
if (r === void 0) throw new Ye(`${e.path}.message`, "expected a string");
|
|
298
|
-
const o = e.optionalString("code"), i = e.optionalGuid("eventId"), s = e.optionalGuid("commandId"),
|
|
298
|
+
const o = e.optionalString("code"), i = e.optionalGuid("eventId"), s = e.optionalGuid("commandId"), l = e.optionalGuid("readModelId"), d = e.optionalGuid("specificationId"), c = e.optionalString("specificationStep"), u = c === void 0 ? void 0 : Object.values(Na).find((f) => f === c);
|
|
299
299
|
if (c !== void 0 && !u) throw new Ye(`${e.path}.specificationStep`, `unknown specification step '${c}'`);
|
|
300
300
|
const g = e.has("stepIndex") ? e.number("stepIndex") : void 0;
|
|
301
301
|
return {
|
|
@@ -304,8 +304,8 @@ var ye = /* @__PURE__ */ (function(e) {
|
|
|
304
304
|
...o !== void 0 ? { code: o } : {},
|
|
305
305
|
...i ? { eventId: i } : {},
|
|
306
306
|
...s ? { commandId: s } : {},
|
|
307
|
-
...
|
|
308
|
-
...
|
|
307
|
+
...l ? { readModelId: l } : {},
|
|
308
|
+
...d ? { specificationId: d } : {},
|
|
309
309
|
...u ? { specificationStep: u } : {},
|
|
310
310
|
...g !== void 0 ? { stepIndex: g } : {}
|
|
311
311
|
};
|
|
@@ -365,7 +365,7 @@ var ye = /* @__PURE__ */ (function(e) {
|
|
|
365
365
|
...n !== void 0 ? { message: n } : {}
|
|
366
366
|
};
|
|
367
367
|
}, es = (e) => {
|
|
368
|
-
const t = Za(e.object("when")), n = Ja(e.object("caller")), r = Ya(e.object("whenEvent")), o = Xa(e.object("whenRedelivered")), i = Ar(e.object("givenReadModel")), s = Ar(e.object("thenReadModel")),
|
|
368
|
+
const t = Za(e.object("when")), n = Ja(e.object("caller")), r = Ya(e.object("whenEvent")), o = Xa(e.object("whenRedelivered")), i = Ar(e.object("givenReadModel")), s = Ar(e.object("thenReadModel")), l = e.optionalEnumValue("lastRunOutcome"), d = e.optionalString("lastRunMessage"), c = e.optionalString("outcomes");
|
|
369
369
|
return {
|
|
370
370
|
id: e.guid("id"),
|
|
371
371
|
name: e.string("name"),
|
|
@@ -383,8 +383,8 @@ var ye = /* @__PURE__ */ (function(e) {
|
|
|
383
383
|
...i ? { givenReadModel: i } : {},
|
|
384
384
|
...s ? { thenReadModel: s } : {},
|
|
385
385
|
...e.has("thenNoEvents") ? { thenNoEvents: e.boolean("thenNoEvents") } : {},
|
|
386
|
-
...
|
|
387
|
-
...
|
|
386
|
+
...l !== void 0 ? { lastRunOutcome: l } : {},
|
|
387
|
+
...d !== void 0 ? { lastRunMessage: d } : {}
|
|
388
388
|
};
|
|
389
389
|
}, ts = (e) => e ? {
|
|
390
390
|
intervalMinutes: e.number("intervalMinutes"),
|
|
@@ -454,7 +454,7 @@ var ye = /* @__PURE__ */ (function(e) {
|
|
|
454
454
|
...t ? { avatar: t } : {}
|
|
455
455
|
};
|
|
456
456
|
}, cs = (e) => {
|
|
457
|
-
const t = e.object("command"), n = e.object("projection"), r = e.object("capture"), o = e.object("readModel"), i = e.array("additionalReadModels", Rr), s = ns(e.object("automationTrigger")),
|
|
457
|
+
const t = e.object("command"), n = e.object("projection"), r = e.object("capture"), o = e.object("readModel"), i = e.array("additionalReadModels", Rr), s = ns(e.object("automationTrigger")), l = ds(e.object("assignee")), d = e.array("reactionRefusals", ss), c = e.array("reactionInvocations", as), u = e.array("annotations", Ga), g = e.optionalEnumValue("translationDirection");
|
|
458
458
|
return {
|
|
459
459
|
id: e.guid("id"),
|
|
460
460
|
name: e.string("name"),
|
|
@@ -477,9 +477,9 @@ var ye = /* @__PURE__ */ (function(e) {
|
|
|
477
477
|
...i.length > 0 ? { additionalReadModels: i } : {},
|
|
478
478
|
...s ? { automationTrigger: s } : {},
|
|
479
479
|
...c.length > 0 ? { reactionInvocations: c } : {},
|
|
480
|
-
...
|
|
480
|
+
...d.length > 0 ? { reactionRefusals: d } : {},
|
|
481
481
|
...g !== void 0 ? { translationDirection: g } : {},
|
|
482
|
-
...
|
|
482
|
+
...l ? { assignee: l } : {},
|
|
483
483
|
...u.length > 0 ? { annotations: u } : {}
|
|
484
484
|
};
|
|
485
485
|
}, Lo = (e) => e ? {
|
|
@@ -855,7 +855,7 @@ var Ss = {
|
|
|
855
855
|
...t ? { [Bo]: t } : {}
|
|
856
856
|
});
|
|
857
857
|
var Dt = (e, t, n) => Math.max(8, Math.min(e, n - t - 8)), Es = (e, t, n, r, o, i) => {
|
|
858
|
-
const s = e.left + e.width,
|
|
858
|
+
const s = e.left + e.width, l = e.top + e.height;
|
|
859
859
|
if (r === "left" || r === "right") {
|
|
860
860
|
const f = n.width - s - i, h = e.left - i, m = r === "right" ? f >= t.width || f >= h : !(h >= t.width || h >= f);
|
|
861
861
|
return {
|
|
@@ -863,16 +863,16 @@ var Dt = (e, t, n) => Math.max(8, Math.min(e, n - t - 8)), Es = (e, t, n, r, o,
|
|
|
863
863
|
left: Dt(m ? s + i : e.left - i - t.width, t.width, n.width)
|
|
864
864
|
};
|
|
865
865
|
}
|
|
866
|
-
const
|
|
866
|
+
const d = n.height - l - i, c = e.top - i, u = r === "below" ? d >= t.height || d >= c : !(c >= t.height || c >= d), g = o === "center" ? e.left + e.width / 2 - t.width / 2 : o === "right" ? s - t.width : e.left;
|
|
867
867
|
return {
|
|
868
|
-
top: Dt(u ?
|
|
868
|
+
top: Dt(u ? l + i : e.top - i - t.height, t.height, n.height),
|
|
869
869
|
left: Dt(g, t.width, n.width)
|
|
870
870
|
};
|
|
871
871
|
}, rn = ({ anchorRef: e, open: t, side: n = "below", align: r = "left", gap: o = 8, children: i }) => {
|
|
872
|
-
const s = O(null), [
|
|
872
|
+
const s = O(null), [l, d] = D(), [c, u] = D("");
|
|
873
873
|
return Pt(() => {
|
|
874
874
|
if (!t) {
|
|
875
|
-
|
|
875
|
+
d(void 0), u("");
|
|
876
876
|
return;
|
|
877
877
|
}
|
|
878
878
|
let g = 0;
|
|
@@ -884,7 +884,7 @@ var Dt = (e, t, n) => Math.max(8, Math.min(e, n - t - 8)), Es = (e, t, n, r, o,
|
|
|
884
884
|
width: window.innerWidth,
|
|
885
885
|
height: window.innerHeight
|
|
886
886
|
}, n, r, o);
|
|
887
|
-
|
|
887
|
+
d((p) => p && p.top === v.top && p.left === v.left ? p : v);
|
|
888
888
|
}
|
|
889
889
|
g = requestAnimationFrame(f);
|
|
890
890
|
};
|
|
@@ -897,7 +897,7 @@ var Dt = (e, t, n) => Math.max(8, Math.min(e, n - t - 8)), Es = (e, t, n, r, o,
|
|
|
897
897
|
e
|
|
898
898
|
]), t ? pt(/* @__PURE__ */ a("div", {
|
|
899
899
|
ref: s,
|
|
900
|
-
style: ks(
|
|
900
|
+
style: ks(l, c),
|
|
901
901
|
children: i
|
|
902
902
|
}), document.body) : null;
|
|
903
903
|
}, Ns = (e, t, n) => {
|
|
@@ -908,59 +908,59 @@ var Dt = (e, t, n) => Math.max(8, Math.min(e, n - t - 8)), Es = (e, t, n, r, o,
|
|
|
908
908
|
bottom: "below",
|
|
909
909
|
left: "left",
|
|
910
910
|
right: "right"
|
|
911
|
-
}, fe = ({ content: e, position: t = "top", openOnFocus: n = !1,
|
|
912
|
-
const
|
|
913
|
-
|
|
914
|
-
x:
|
|
915
|
-
y:
|
|
916
|
-
},
|
|
911
|
+
}, fe = ({ content: e, position: t = "top", openOnFocus: n = !1, disabled: r = !1, children: o }) => {
|
|
912
|
+
const i = O(null), [s, l] = D(!1), [d, c] = D(!1), [u, g] = D(!1), f = O(void 0), h = (b) => {
|
|
913
|
+
b.pointerType === "mouse" && (f.current = {
|
|
914
|
+
x: b.clientX,
|
|
915
|
+
y: b.clientY
|
|
916
|
+
}, l(!0));
|
|
917
917
|
};
|
|
918
918
|
return ie(() => {
|
|
919
|
-
if (!
|
|
920
|
-
const
|
|
921
|
-
|
|
922
|
-
x:
|
|
923
|
-
y:
|
|
919
|
+
if (!s) return;
|
|
920
|
+
const b = (S) => {
|
|
921
|
+
f.current = {
|
|
922
|
+
x: S.clientX,
|
|
923
|
+
y: S.clientY
|
|
924
924
|
};
|
|
925
|
-
},
|
|
925
|
+
}, y = {
|
|
926
926
|
capture: !0,
|
|
927
927
|
passive: !0
|
|
928
928
|
};
|
|
929
|
-
window.addEventListener("pointermove",
|
|
930
|
-
let
|
|
931
|
-
const
|
|
932
|
-
const
|
|
933
|
-
if (
|
|
934
|
-
|
|
929
|
+
window.addEventListener("pointermove", b, y), window.addEventListener("pointerdown", b, y), window.addEventListener("wheel", b, y);
|
|
930
|
+
let w = 0;
|
|
931
|
+
const k = () => {
|
|
932
|
+
const S = i.current;
|
|
933
|
+
if (S && f.current && !Ns(S, f.current, (N, R) => document.elementFromPoint(N, R))) {
|
|
934
|
+
l(!1), c(!1);
|
|
935
935
|
return;
|
|
936
936
|
}
|
|
937
|
-
|
|
937
|
+
w = requestAnimationFrame(k);
|
|
938
938
|
};
|
|
939
|
-
return
|
|
940
|
-
cancelAnimationFrame(
|
|
939
|
+
return w = requestAnimationFrame(k), () => {
|
|
940
|
+
cancelAnimationFrame(w), window.removeEventListener("pointermove", b, y), window.removeEventListener("pointerdown", b, y), window.removeEventListener("wheel", b, y);
|
|
941
941
|
};
|
|
942
|
-
}, [
|
|
943
|
-
ref:
|
|
942
|
+
}, [s]), /* @__PURE__ */ x("span", {
|
|
943
|
+
ref: i,
|
|
944
944
|
className: "grid-tooltip-root",
|
|
945
|
-
onPointerEnter:
|
|
945
|
+
onPointerEnter: h,
|
|
946
946
|
onPointerLeave: () => {
|
|
947
|
-
|
|
947
|
+
l(!1), c(!1);
|
|
948
948
|
},
|
|
949
|
-
onPointerDown: () =>
|
|
950
|
-
onFocus: n ? (
|
|
949
|
+
onPointerDown: () => c(!0),
|
|
950
|
+
onFocus: n ? (b) => {
|
|
951
951
|
try {
|
|
952
|
-
if (!
|
|
952
|
+
if (!b.target.matches(":focus-visible")) return;
|
|
953
953
|
} catch {
|
|
954
954
|
}
|
|
955
|
-
|
|
955
|
+
g(!0);
|
|
956
956
|
} : void 0,
|
|
957
|
-
onBlur: n ? () =>
|
|
958
|
-
onKeyDown: n ? (
|
|
959
|
-
|
|
957
|
+
onBlur: n ? () => g(!1) : void 0,
|
|
958
|
+
onKeyDown: n ? (b) => {
|
|
959
|
+
b.key === "Escape" && g(!1);
|
|
960
960
|
} : void 0,
|
|
961
|
-
children: [
|
|
962
|
-
anchorRef:
|
|
963
|
-
open:
|
|
961
|
+
children: [o, /* @__PURE__ */ a(rn, {
|
|
962
|
+
anchorRef: i,
|
|
963
|
+
open: !r && (s && !d || u),
|
|
964
964
|
side: Is[t],
|
|
965
965
|
gap: 6,
|
|
966
966
|
align: "center",
|
|
@@ -1067,10 +1067,10 @@ var Fs = {
|
|
|
1067
1067
|
}) : null;
|
|
1068
1068
|
};
|
|
1069
1069
|
function Jn(e, t, n) {
|
|
1070
|
-
const { selection: r, messages: o } = re(), i = O(void 0), s = e ? zo(r, e) : void 0,
|
|
1070
|
+
const { selection: r, messages: o } = re(), i = O(void 0), s = e ? zo(r, e) : void 0, l = !!e && As(r, e), d = r.onScopeSelected;
|
|
1071
1071
|
return ce(() => {
|
|
1072
1072
|
const c = Ls(s, o), u = jo(s), g = c ? { "aria-description": c } : {};
|
|
1073
|
-
if (!e || !
|
|
1073
|
+
if (!e || !d) return {
|
|
1074
1074
|
emphasis: s,
|
|
1075
1075
|
className: "",
|
|
1076
1076
|
emphasisClassName: u,
|
|
@@ -1080,12 +1080,12 @@ function Jn(e, t, n) {
|
|
|
1080
1080
|
}),
|
|
1081
1081
|
attributes: g
|
|
1082
1082
|
};
|
|
1083
|
-
const f = () =>
|
|
1083
|
+
const f = () => d(e, t), h = {
|
|
1084
1084
|
...g,
|
|
1085
1085
|
role: "group",
|
|
1086
1086
|
tabIndex: 0,
|
|
1087
1087
|
"aria-label": `${Ts(t, o)}: ${n}`,
|
|
1088
|
-
"aria-current":
|
|
1088
|
+
"aria-current": l ? "true" : void 0,
|
|
1089
1089
|
onPointerDownCapture: (m) => {
|
|
1090
1090
|
i.current = {
|
|
1091
1091
|
x: m.clientX,
|
|
@@ -1117,13 +1117,13 @@ function Jn(e, t, n) {
|
|
|
1117
1117
|
t,
|
|
1118
1118
|
n,
|
|
1119
1119
|
s,
|
|
1120
|
-
d,
|
|
1121
1120
|
l,
|
|
1121
|
+
d,
|
|
1122
1122
|
o
|
|
1123
1123
|
]);
|
|
1124
1124
|
}
|
|
1125
1125
|
var qo = $e({}), Bs = ({ readOnly: e = !1, editing: t, actions: n, selection: r, navigation: o, markers: i, children: s }) => {
|
|
1126
|
-
const
|
|
1126
|
+
const l = i?.changes, d = No.useMemo(() => ({ changes: typeof l == "function" ? l : l && new Map([...l].map(([c, u]) => [c.toLowerCase(), u])) }), [l]);
|
|
1127
1127
|
return /* @__PURE__ */ a(Kn.Provider, {
|
|
1128
1128
|
value: e,
|
|
1129
1129
|
children: /* @__PURE__ */ a(Ho, {
|
|
@@ -1132,7 +1132,7 @@ var qo = $e({}), Bs = ({ readOnly: e = !1, editing: t, actions: n, selection: r,
|
|
|
1132
1132
|
selection: r,
|
|
1133
1133
|
navigation: o,
|
|
1134
1134
|
children: /* @__PURE__ */ a(qo.Provider, {
|
|
1135
|
-
value:
|
|
1135
|
+
value: d,
|
|
1136
1136
|
children: s
|
|
1137
1137
|
})
|
|
1138
1138
|
})
|
|
@@ -1145,20 +1145,20 @@ function ze(e) {
|
|
|
1145
1145
|
return typeof t == "function" ? t(n) : t?.get(n);
|
|
1146
1146
|
}
|
|
1147
1147
|
var Vo = 0.1, Hs = (e, t, n, r) => !(e.ctrlKey || e.metaKey) || e.deltaY === 0 ? !1 : e.deltaY < 0 ? t >= r : t <= n, Ws = ({ chrome: e = {}, onHelp: t, helpTitle: n, onTransformChange: r, rootRef: o, ...i }) => {
|
|
1148
|
-
const { readOnly: s } = re(), { initialZoom:
|
|
1148
|
+
const { readOnly: s } = re(), { initialZoom: l = 1, minZoom: d = Vo, maxZoom: c = 5 } = i, u = O(l), g = O(null), f = j((h, m) => {
|
|
1149
1149
|
u.current = h, r?.(h, m);
|
|
1150
1150
|
}, [r]);
|
|
1151
1151
|
return ie(() => {
|
|
1152
1152
|
const h = g.current;
|
|
1153
1153
|
if (!h) return;
|
|
1154
1154
|
const m = (v) => {
|
|
1155
|
-
Hs(v, u.current,
|
|
1155
|
+
Hs(v, u.current, d, c) && (v.preventDefault(), v.stopPropagation());
|
|
1156
1156
|
};
|
|
1157
1157
|
return h.addEventListener("wheel", m, {
|
|
1158
1158
|
capture: !0,
|
|
1159
1159
|
passive: !1
|
|
1160
1160
|
}), () => h.removeEventListener("wheel", m, { capture: !0 });
|
|
1161
|
-
}, [
|
|
1161
|
+
}, [d, c]), /* @__PURE__ */ a("div", {
|
|
1162
1162
|
ref: (h) => {
|
|
1163
1163
|
g.current = h, typeof o == "function" ? o(h) : o && (o.current = h);
|
|
1164
1164
|
},
|
|
@@ -1180,8 +1180,8 @@ var Vo = 0.1, Hs = (e, t, n, r) => !(e.ctrlKey || e.metaKey) || e.deltaY === 0 ?
|
|
|
1180
1180
|
})({});
|
|
1181
1181
|
function Qn(e, t, n) {
|
|
1182
1182
|
if (n === Xt.Vertical) {
|
|
1183
|
-
const s = t.y - e.y,
|
|
1184
|
-
return `M ${e.x} ${e.y} C ${e.x} ${
|
|
1183
|
+
const s = t.y - e.y, l = e.y + s * 0.5, d = t.y - s * 0.5;
|
|
1184
|
+
return `M ${e.x} ${e.y} C ${e.x} ${l}, ${t.x} ${d}, ${t.x} ${t.y}`;
|
|
1185
1185
|
}
|
|
1186
1186
|
const r = t.x - e.x, o = e.x + r * 0.5, i = t.x - r * 0.5;
|
|
1187
1187
|
return `M ${e.x} ${e.y} C ${o} ${e.y}, ${i} ${t.y}, ${t.x} ${t.y}`;
|
|
@@ -1287,12 +1287,12 @@ function Us(e, t, n) {
|
|
|
1287
1287
|
width: 0,
|
|
1288
1288
|
height: 0
|
|
1289
1289
|
};
|
|
1290
|
-
const i = Math.min(...r) - n, s = Math.min(...o) - n,
|
|
1290
|
+
const i = Math.min(...r) - n, s = Math.min(...o) - n, l = Math.max(...r) + n, d = Math.max(...o) + n;
|
|
1291
1291
|
return {
|
|
1292
1292
|
x: i,
|
|
1293
1293
|
y: s,
|
|
1294
|
-
width:
|
|
1295
|
-
height:
|
|
1294
|
+
width: l - i,
|
|
1295
|
+
height: d - s
|
|
1296
1296
|
};
|
|
1297
1297
|
}
|
|
1298
1298
|
var Pv = 12, $v = 600, Ys = "Inter, Avenir, Helvetica, Arial, sans-serif", _v = 230, Ft = null;
|
|
@@ -1417,25 +1417,25 @@ function Qs(e, t, n = !1, r = 1) {
|
|
|
1417
1417
|
function el(e, t) {
|
|
1418
1418
|
const n = e.sliceType === F.automation, r = n ? e.reactionRefusals ?? [] : [], o = n ? ei([...e.reactionInvocations ?? []], [...r]) : [];
|
|
1419
1419
|
if (r.length === 0 && o.length === 0) return Pe[Z.System];
|
|
1420
|
-
const i = tr([...r]).length + o.length, s = r.reduce((
|
|
1421
|
-
return Math.max(Pe[Z.System], ae.systemCellPadding + ae.cogWheelHeight + ae.systemCellGap +
|
|
1420
|
+
const i = tr([...r]).length + o.length, s = r.reduce((d, c) => d + 2 + ti(c).length, 0) + o.length + i, l = ae.refusalListMargin + s * ae.refusalLineHeight * t + (r.length + o.length) * ae.refusalBranchGap;
|
|
1421
|
+
return Math.max(Pe[Z.System], ae.systemCellPadding + ae.cogWheelHeight + ae.systemCellGap + l);
|
|
1422
1422
|
}
|
|
1423
1423
|
function tl(e, t, n) {
|
|
1424
1424
|
const r = Math.round(ae.cardHeight * n), { events: o } = e;
|
|
1425
1425
|
if (o.length === 0) return Pe[Z.Events];
|
|
1426
1426
|
const i = [];
|
|
1427
|
-
for (let
|
|
1428
|
-
const
|
|
1429
|
-
i.push(t ? Math.max(r, ...
|
|
1427
|
+
for (let l = 0; l < o.length; l += ae.itemsPerRow) {
|
|
1428
|
+
const d = o.slice(l, l + ae.itemsPerRow);
|
|
1429
|
+
i.push(t ? Math.max(r, ...d.map((c) => Tn(rl(c), n))) : r);
|
|
1430
1430
|
}
|
|
1431
|
-
const s = i.reduce((
|
|
1431
|
+
const s = i.reduce((l, d) => l + d, 0) + (i.length - 1) * ni;
|
|
1432
1432
|
return Math.max(Pe[Z.Events], s + ae.cellVerticalPadding);
|
|
1433
1433
|
}
|
|
1434
1434
|
var oi = (e) => (e.additionalReadModels?.length ?? 0) > 0;
|
|
1435
1435
|
function nl(e, t, n) {
|
|
1436
1436
|
const r = Math.round(ae.cardHeight * n);
|
|
1437
1437
|
if (oi(e)) {
|
|
1438
|
-
const i = [e.readModel, ...e.additionalReadModels ?? []].filter((
|
|
1438
|
+
const i = [e.readModel, ...e.additionalReadModels ?? []].filter((l) => l !== void 0).map((l) => t ? Tn(l, n) : r), s = i.reduce((l, d) => l + d, 0) + (i.length - 1) * ni;
|
|
1439
1439
|
return Math.max(Pe[Z.Interaction], s + 48);
|
|
1440
1440
|
}
|
|
1441
1441
|
const o = [e.command, e.readModel].filter((i) => i !== void 0);
|
|
@@ -1491,26 +1491,26 @@ var on = (e) => {
|
|
|
1491
1491
|
padding: 12
|
|
1492
1492
|
}, Pn = Zt.borderWidth + Zt.padding;
|
|
1493
1493
|
function cl(e, t, n, r, o, i) {
|
|
1494
|
-
const s = O(void 0),
|
|
1494
|
+
const s = O(void 0), l = () => {
|
|
1495
1495
|
s.current && (s.current = void 0, i?.(e));
|
|
1496
1496
|
};
|
|
1497
1497
|
return {
|
|
1498
|
-
onPointerDown: (
|
|
1499
|
-
const c =
|
|
1500
|
-
c instanceof Element && c.closest("button, input, .event-modeling-grid-editable-label") || (
|
|
1501
|
-
lastX:
|
|
1502
|
-
lastY:
|
|
1498
|
+
onPointerDown: (d) => {
|
|
1499
|
+
const c = d.target;
|
|
1500
|
+
c instanceof Element && c.closest("button, input, .event-modeling-grid-editable-label") || (d.stopPropagation(), s.current = {
|
|
1501
|
+
lastX: d.clientX,
|
|
1502
|
+
lastY: d.clientY,
|
|
1503
1503
|
position: t,
|
|
1504
1504
|
moved: !1
|
|
1505
|
-
},
|
|
1505
|
+
}, d.currentTarget.setPointerCapture(d.pointerId));
|
|
1506
1506
|
},
|
|
1507
|
-
onPointerMove: (
|
|
1507
|
+
onPointerMove: (d) => {
|
|
1508
1508
|
const c = s.current;
|
|
1509
1509
|
if (!c) return;
|
|
1510
|
-
const u = n(), g = (
|
|
1510
|
+
const u = n(), g = (d.clientX - c.lastX) / u, f = (d.clientY - c.lastY) / u;
|
|
1511
1511
|
s.current = {
|
|
1512
|
-
lastX:
|
|
1513
|
-
lastY:
|
|
1512
|
+
lastX: d.clientX,
|
|
1513
|
+
lastY: d.clientY,
|
|
1514
1514
|
position: {
|
|
1515
1515
|
x: c.position.x + g,
|
|
1516
1516
|
y: c.position.y + f
|
|
@@ -1518,11 +1518,11 @@ function cl(e, t, n, r, o, i) {
|
|
|
1518
1518
|
moved: !0
|
|
1519
1519
|
}, r?.(e, g, f);
|
|
1520
1520
|
},
|
|
1521
|
-
onPointerCancel:
|
|
1522
|
-
onLostPointerCapture:
|
|
1521
|
+
onPointerCancel: l,
|
|
1522
|
+
onLostPointerCapture: l,
|
|
1523
1523
|
onPointerUp: () => {
|
|
1524
|
-
const
|
|
1525
|
-
s.current = void 0,
|
|
1524
|
+
const d = s.current;
|
|
1525
|
+
s.current = void 0, d?.moved && o?.(e, d.position);
|
|
1526
1526
|
}
|
|
1527
1527
|
};
|
|
1528
1528
|
}
|
|
@@ -1530,9 +1530,9 @@ var ul = ({ onCollectionMoved: e, ...t }) => e ? /* @__PURE__ */ a(vl, {
|
|
|
1530
1530
|
...t,
|
|
1531
1531
|
onCollectionMoved: e
|
|
1532
1532
|
}) : void 0, ml = 4, gl = 48, vl = ({ collectionId: e, position: t, getZoom: n, topOffset: r = Zt.padding, onCollectionMoving: o, onCollectionMoved: i, onCollectionMoveCanceled: s }) => {
|
|
1533
|
-
const [
|
|
1533
|
+
const [l, d] = D(!1), c = cl(e, t, n, o, i, s);
|
|
1534
1534
|
return /* @__PURE__ */ a("div", {
|
|
1535
|
-
className: `collection-drag-handle ${
|
|
1535
|
+
className: `collection-drag-handle ${l ? "collection-drag-handle--dragging" : ""}`,
|
|
1536
1536
|
style: {
|
|
1537
1537
|
top: `${r}px`,
|
|
1538
1538
|
left: `${Zt.padding + ml}px`,
|
|
@@ -1540,17 +1540,17 @@ var ul = ({ onCollectionMoved: e, ...t }) => e ? /* @__PURE__ */ a(vl, {
|
|
|
1540
1540
|
height: ae.headerHeight
|
|
1541
1541
|
},
|
|
1542
1542
|
onPointerDown: (u) => {
|
|
1543
|
-
|
|
1543
|
+
d(!0), c.onPointerDown(u);
|
|
1544
1544
|
},
|
|
1545
1545
|
onPointerMove: c.onPointerMove,
|
|
1546
1546
|
onPointerCancel: () => {
|
|
1547
|
-
|
|
1547
|
+
d(!1), c.onPointerCancel();
|
|
1548
1548
|
},
|
|
1549
1549
|
onLostPointerCapture: () => {
|
|
1550
|
-
|
|
1550
|
+
d(!1), c.onLostPointerCapture();
|
|
1551
1551
|
},
|
|
1552
1552
|
onPointerUp: () => {
|
|
1553
|
-
|
|
1553
|
+
d(!1), c.onPointerUp();
|
|
1554
1554
|
},
|
|
1555
1555
|
children: /* @__PURE__ */ a("i", { className: "pi pi-arrows-alt" })
|
|
1556
1556
|
});
|
|
@@ -1570,7 +1570,7 @@ var $r = (e, t, n, r) => {
|
|
|
1570
1570
|
return o !== void 0 && n - o < r;
|
|
1571
1571
|
};
|
|
1572
1572
|
function fl(e, t, n, r = hl) {
|
|
1573
|
-
const o = ii(t), i = new Map(t.map((u) => [u.id.toString(), u])), s = new Map(e.collections.map((u) => [u.id.toString(), u])),
|
|
1573
|
+
const o = ii(t), i = new Map(t.map((u) => [u.id.toString(), u])), s = new Map(e.collections.map((u) => [u.id.toString(), u])), l = e.additions.filter((u) => !i.has(u.id.toString()));
|
|
1574
1574
|
if (o !== e.contentSignature) {
|
|
1575
1575
|
const u = t.map((g) => {
|
|
1576
1576
|
const f = s.get(g.id.toString());
|
|
@@ -1583,14 +1583,14 @@ function fl(e, t, n, r = hl) {
|
|
|
1583
1583
|
...e,
|
|
1584
1584
|
snapshot: t,
|
|
1585
1585
|
contentSignature: o,
|
|
1586
|
-
additions:
|
|
1587
|
-
collections: [...u, ...
|
|
1586
|
+
additions: l,
|
|
1587
|
+
collections: [...u, ...l]
|
|
1588
1588
|
};
|
|
1589
1589
|
}
|
|
1590
|
-
let
|
|
1590
|
+
let d = !1;
|
|
1591
1591
|
const c = e.collections.map((u) => {
|
|
1592
1592
|
const g = i.get(u.id.toString());
|
|
1593
|
-
return !g || $r(e, u.id, n, r) || (u.position?.x ?? 0) === (g.position?.x ?? 0) && (u.position?.y ?? 0) === (g.position?.y ?? 0) ? u : (
|
|
1593
|
+
return !g || $r(e, u.id, n, r) || (u.position?.x ?? 0) === (g.position?.x ?? 0) && (u.position?.y ?? 0) === (g.position?.y ?? 0) ? u : (d = !0, {
|
|
1594
1594
|
...u,
|
|
1595
1595
|
position: g.position
|
|
1596
1596
|
});
|
|
@@ -1598,8 +1598,8 @@ function fl(e, t, n, r = hl) {
|
|
|
1598
1598
|
return {
|
|
1599
1599
|
...e,
|
|
1600
1600
|
snapshot: t,
|
|
1601
|
-
additions:
|
|
1602
|
-
collections:
|
|
1601
|
+
additions: l,
|
|
1602
|
+
collections: d ? c : e.collections
|
|
1603
1603
|
};
|
|
1604
1604
|
}
|
|
1605
1605
|
function _r(e, t) {
|
|
@@ -1678,31 +1678,31 @@ function xl(e, t) {
|
|
|
1678
1678
|
const n = [];
|
|
1679
1679
|
let r = !1;
|
|
1680
1680
|
const o = e.map((i) => {
|
|
1681
|
-
const { width: s, height:
|
|
1682
|
-
let
|
|
1681
|
+
const { width: s, height: l } = t(i);
|
|
1682
|
+
let d = {
|
|
1683
1683
|
x: i.position?.x ?? 0,
|
|
1684
1684
|
y: i.position?.y ?? 0,
|
|
1685
1685
|
width: s,
|
|
1686
|
-
height:
|
|
1686
|
+
height: l
|
|
1687
1687
|
};
|
|
1688
|
-
for (let c = n.find((u) => Dr(
|
|
1689
|
-
return n.push(
|
|
1688
|
+
for (let c = n.find((u) => Dr(d, u)); c; c = n.find((u) => Dr(d, u))) d = Cl(d, c);
|
|
1689
|
+
return n.push(d), d.x === (i.position?.x ?? 0) && d.y === (i.position?.y ?? 0) ? i : (r = !0, {
|
|
1690
1690
|
...i,
|
|
1691
1691
|
position: {
|
|
1692
|
-
x:
|
|
1693
|
-
y:
|
|
1692
|
+
x: d.x,
|
|
1693
|
+
y: d.y
|
|
1694
1694
|
}
|
|
1695
1695
|
});
|
|
1696
1696
|
});
|
|
1697
1697
|
return r ? o : e;
|
|
1698
1698
|
}
|
|
1699
1699
|
function Ml({ initialCollections: e, onAddCollection: t, onCollectionMoved: n, onCollectionsChange: r, onPersistenceError: o }) {
|
|
1700
|
-
const { readOnly: i } = re(), [s,
|
|
1701
|
-
const v = m(
|
|
1702
|
-
|
|
1700
|
+
const { readOnly: i } = re(), [s, l] = D(() => pl(e)), d = O(s), { collections: c, pendingMoveIds: u } = s, g = O(!1), f = O(!0), h = j((m) => {
|
|
1701
|
+
const v = m(d.current);
|
|
1702
|
+
d.current = v, l(v);
|
|
1703
1703
|
}, []);
|
|
1704
1704
|
return ie(() => {
|
|
1705
|
-
e !==
|
|
1705
|
+
e !== d.current.snapshot && h((m) => fl(m, e, Date.now(), i ? 1 / 0 : void 0));
|
|
1706
1706
|
}, [
|
|
1707
1707
|
e,
|
|
1708
1708
|
h,
|
|
@@ -1726,7 +1726,7 @@ function Ml({ initialCollections: e, onAddCollection: t, onCollectionMoved: n, o
|
|
|
1726
1726
|
if (!(i || !t || g.current)) {
|
|
1727
1727
|
g.current = !0;
|
|
1728
1728
|
try {
|
|
1729
|
-
const p = await t(m, v,
|
|
1729
|
+
const p = await t(m, v, d.current.collections);
|
|
1730
1730
|
p && h((b) => b.collections.some((y) => y.id.equals(p.id)) ? b : {
|
|
1731
1731
|
...b,
|
|
1732
1732
|
additions: [...b.additions, p],
|
|
@@ -1746,14 +1746,14 @@ function Ml({ initialCollections: e, onAddCollection: t, onCollectionMoved: n, o
|
|
|
1746
1746
|
h
|
|
1747
1747
|
]),
|
|
1748
1748
|
moveCollection: j((m, v, p) => {
|
|
1749
|
-
!i && !n ||
|
|
1749
|
+
!i && !n || d.current.pendingMoveIds.has(m.toString()) || h((b) => wl(b, m, v, p, Date.now()));
|
|
1750
1750
|
}, [
|
|
1751
1751
|
i,
|
|
1752
1752
|
n,
|
|
1753
1753
|
h
|
|
1754
1754
|
]),
|
|
1755
1755
|
collectionMoved: j(async (m, v) => {
|
|
1756
|
-
if (!(i || !n ||
|
|
1756
|
+
if (!(i || !n || d.current.pendingMoveIds.has(m.toString()))) {
|
|
1757
1757
|
h((p) => bl(p, m));
|
|
1758
1758
|
try {
|
|
1759
1759
|
await n(m, v) || h((p) => _r(p, m));
|
|
@@ -1790,8 +1790,8 @@ function Tl() {
|
|
|
1790
1790
|
Br = e;
|
|
1791
1791
|
const o = r ? Math.min(tt, Al) : tt;
|
|
1792
1792
|
let i = 0;
|
|
1793
|
-
for (const [s,
|
|
1794
|
-
if (ft.delete(s), r ? ca(() => s(
|
|
1793
|
+
for (const [s, l] of Ll((d) => !r || d.verdict))
|
|
1794
|
+
if (ft.delete(s), r ? ca(() => s(l.verdict)) : s(l.verdict), ++i >= o) break;
|
|
1795
1795
|
bn = i > 0;
|
|
1796
1796
|
}
|
|
1797
1797
|
ft.size > 0 && nr();
|
|
@@ -1830,14 +1830,14 @@ function rr(e, t = "250% 250%", n = "light") {
|
|
|
1830
1830
|
i(!0);
|
|
1831
1831
|
return;
|
|
1832
1832
|
}
|
|
1833
|
-
const
|
|
1834
|
-
const c =
|
|
1833
|
+
const l = new IntersectionObserver((d) => {
|
|
1834
|
+
const c = d[d.length - 1];
|
|
1835
1835
|
if (!c) return;
|
|
1836
1836
|
const u = c.boundingClientRect, g = Math.hypot(u.left + u.width / 2 - window.innerWidth / 2, u.top + u.height / 2 - window.innerHeight / 2);
|
|
1837
1837
|
Wr.request(i, c.isIntersecting, g, n);
|
|
1838
1838
|
}, { rootMargin: t });
|
|
1839
|
-
return
|
|
1840
|
-
|
|
1839
|
+
return l.observe(s), () => {
|
|
1840
|
+
l.disconnect(), Wr.cancel(i);
|
|
1841
1841
|
};
|
|
1842
1842
|
}, [
|
|
1843
1843
|
e,
|
|
@@ -1847,31 +1847,31 @@ function rr(e, t = "250% 250%", n = "light") {
|
|
|
1847
1847
|
]), r || o;
|
|
1848
1848
|
}
|
|
1849
1849
|
function $l({ collection: e, estimatedSize: t, measuredSize: n, onSize: r, children: o }) {
|
|
1850
|
-
const i = O(null), s = rr(i, void 0, "heavy"),
|
|
1850
|
+
const i = O(null), s = rr(i, void 0, "heavy"), l = n ?? t;
|
|
1851
1851
|
return /* @__PURE__ */ a(Ro, {
|
|
1852
1852
|
x: e.position?.x ?? 0,
|
|
1853
1853
|
y: e.position?.y ?? 0,
|
|
1854
|
-
onSize: r ? (
|
|
1854
|
+
onSize: r ? (d, c) => r(e.id, d, c) : void 0,
|
|
1855
1855
|
children: /* @__PURE__ */ a("div", {
|
|
1856
1856
|
ref: i,
|
|
1857
1857
|
children: s ? o : /* @__PURE__ */ a("div", {
|
|
1858
1858
|
className: "event-model-collection-placeholder",
|
|
1859
1859
|
style: {
|
|
1860
|
-
width:
|
|
1861
|
-
height:
|
|
1860
|
+
width: l.width,
|
|
1861
|
+
height: l.height
|
|
1862
1862
|
},
|
|
1863
1863
|
"aria-hidden": !0,
|
|
1864
|
-
children: e.modules.map((
|
|
1864
|
+
children: e.modules.map((d, c) => /* @__PURE__ */ x("div", {
|
|
1865
1865
|
className: "event-model-collection-placeholder-module",
|
|
1866
1866
|
style: { width: t.moduleWidths[c] },
|
|
1867
1867
|
children: [/* @__PURE__ */ a("div", {
|
|
1868
1868
|
className: "event-modeling-grid-pill event-modeling-grid-pill--module event-model-collection-placeholder-pill",
|
|
1869
|
-
children:
|
|
1869
|
+
children: d.name
|
|
1870
1870
|
}), /* @__PURE__ */ a("div", {
|
|
1871
1871
|
className: "event-model-collection-placeholder-body",
|
|
1872
|
-
style: { height: Math.max(0,
|
|
1872
|
+
style: { height: Math.max(0, l.height - ae.headerHeight - 4 - 2 * Pn) }
|
|
1873
1873
|
})]
|
|
1874
|
-
},
|
|
1874
|
+
}, d.id.toString()))
|
|
1875
1875
|
})
|
|
1876
1876
|
})
|
|
1877
1877
|
});
|
|
@@ -2020,13 +2020,13 @@ var _l = Io($l), Dl = ({ drag: e }) => e ? pt(/* @__PURE__ */ a("div", {
|
|
|
2020
2020
|
].find((t) => e.some((n) => n.severity === t)), Kt = ({ annotations: e = [], className: t = "" }) => {
|
|
2021
2021
|
const { messages: n } = re(), r = an(e);
|
|
2022
2022
|
if (!r) return null;
|
|
2023
|
-
const o = n.annotations ?? $t.annotations, i = e.map((
|
|
2023
|
+
const o = n.annotations ?? $t.annotations, i = e.map((l) => `${o[l.severity]}: ${l.code ? `${l.code} — ` : ""}${l.message}`), s = `${o.badge}: ${i.join(`
|
|
2024
2024
|
`)}`;
|
|
2025
2025
|
return /* @__PURE__ */ a("span", {
|
|
2026
2026
|
className: `event-model-annotation-badge event-model-annotation-severity ${t}`,
|
|
2027
2027
|
"data-severity": r,
|
|
2028
2028
|
children: /* @__PURE__ */ a(fe, {
|
|
2029
|
-
content: i.map((
|
|
2029
|
+
content: i.map((l, d) => /* @__PURE__ */ a("div", { children: l }, d)),
|
|
2030
2030
|
children: /* @__PURE__ */ a("span", {
|
|
2031
2031
|
role: "img",
|
|
2032
2032
|
"aria-label": s,
|
|
@@ -2113,10 +2113,10 @@ var lt = ({ change: e, kind: t, name: n }) => {
|
|
|
2113
2113
|
})
|
|
2114
2114
|
});
|
|
2115
2115
|
}, ln = ({ value: e, onChange: t, placeholder: n = "Name…", style: r, validate: o, readOnly: i = !1 }) => {
|
|
2116
|
-
const s = be(), [
|
|
2116
|
+
const s = be(), [l, d] = D(!1), [c, u] = D(e), [g, f] = D(void 0), h = () => {
|
|
2117
2117
|
const m = c.trim();
|
|
2118
2118
|
if (!m) {
|
|
2119
|
-
u(e),
|
|
2119
|
+
u(e), d(!1), f(void 0);
|
|
2120
2120
|
return;
|
|
2121
2121
|
}
|
|
2122
2122
|
if (o) {
|
|
@@ -2126,9 +2126,9 @@ var lt = ({ change: e, kind: t, name: n }) => {
|
|
|
2126
2126
|
return;
|
|
2127
2127
|
}
|
|
2128
2128
|
}
|
|
2129
|
-
f(void 0),
|
|
2129
|
+
f(void 0), d(!1), t(m);
|
|
2130
2130
|
};
|
|
2131
|
-
return
|
|
2131
|
+
return l && !i ? /* @__PURE__ */ a("input", {
|
|
2132
2132
|
autoFocus: !0,
|
|
2133
2133
|
value: c,
|
|
2134
2134
|
onChange: (m) => {
|
|
@@ -2140,7 +2140,7 @@ var lt = ({ change: e, kind: t, name: n }) => {
|
|
|
2140
2140
|
m.target.blur();
|
|
2141
2141
|
return;
|
|
2142
2142
|
}
|
|
2143
|
-
m.key === "Escape" && (u(e),
|
|
2143
|
+
m.key === "Escape" && (u(e), d(!1), f(void 0));
|
|
2144
2144
|
},
|
|
2145
2145
|
className: `event-modeling-grid-editable-label-input${g ? " event-modeling-grid-editable-label-input--error" : ""}`,
|
|
2146
2146
|
title: g,
|
|
@@ -2148,7 +2148,7 @@ var lt = ({ change: e, kind: t, name: n }) => {
|
|
|
2148
2148
|
}) : /* @__PURE__ */ a("span", {
|
|
2149
2149
|
title: i ? void 0 : s.editableLabel.doubleClickToRename,
|
|
2150
2150
|
onDoubleClick: i ? void 0 : () => {
|
|
2151
|
-
u(e),
|
|
2151
|
+
u(e), d(!0), f(void 0);
|
|
2152
2152
|
},
|
|
2153
2153
|
className: "event-modeling-grid-editable-label",
|
|
2154
2154
|
style: r,
|
|
@@ -2229,12 +2229,12 @@ var lt = ({ change: e, kind: t, name: n }) => {
|
|
|
2229
2229
|
children: i
|
|
2230
2230
|
})
|
|
2231
2231
|
});
|
|
2232
|
-
}, ci = ({ variant: e, collapsed: t, onToggle: n, label: r, onRenameLabel: o, labelReadOnly: i = !1, validateLabel: s, labelStyle:
|
|
2232
|
+
}, ci = ({ variant: e, collapsed: t, onToggle: n, label: r, onRenameLabel: o, labelReadOnly: i = !1, validateLabel: s, labelStyle: l, background: d, border: c, height: u, children: g, marker: f, description: h, documentation: m, leadingContent: v, draggable: p = !1, onPointerDown: b, onPointerMove: y, onPointerUp: w, error: k, className: S, attributes: N }) => {
|
|
2233
2233
|
const R = /* @__PURE__ */ a(ln, {
|
|
2234
2234
|
value: r,
|
|
2235
2235
|
onChange: o,
|
|
2236
2236
|
validate: s,
|
|
2237
|
-
style:
|
|
2237
|
+
style: l,
|
|
2238
2238
|
readOnly: i
|
|
2239
2239
|
}), C = f ? /* @__PURE__ */ x("div", {
|
|
2240
2240
|
className: "event-modeling-grid-pill-label",
|
|
@@ -2242,10 +2242,10 @@ var lt = ({ change: e, kind: t, name: n }) => {
|
|
|
2242
2242
|
}) : R, W = !t && Ze(h) !== void 0;
|
|
2243
2243
|
return /* @__PURE__ */ x("div", {
|
|
2244
2244
|
...N,
|
|
2245
|
-
className: `${S ? `${S} ` : ""}event-modeling-grid-pill event-modeling-grid-pill--${e}${t ? " event-modeling-grid-pill--collapsed" : ""}${W ? " event-modeling-grid-pill--described" : ""}${p ? " event-modeling-grid-pill--draggable" : ""}${
|
|
2245
|
+
className: `${S ? `${S} ` : ""}event-modeling-grid-pill event-modeling-grid-pill--${e}${t ? " event-modeling-grid-pill--collapsed" : ""}${W ? " event-modeling-grid-pill--described" : ""}${p ? " event-modeling-grid-pill--draggable" : ""}${k ? " event-modeling-grid-pill--error" : ""}`,
|
|
2246
2246
|
style: {
|
|
2247
|
-
background:
|
|
2248
|
-
border:
|
|
2247
|
+
background: d,
|
|
2248
|
+
border: k ? "2px solid #ef4444" : c,
|
|
2249
2249
|
height: u
|
|
2250
2250
|
},
|
|
2251
2251
|
onPointerDown: b,
|
|
@@ -2268,7 +2268,7 @@ var lt = ({ change: e, kind: t, name: n }) => {
|
|
|
2268
2268
|
}) : C,
|
|
2269
2269
|
/* @__PURE__ */ x("div", {
|
|
2270
2270
|
className: "event-modeling-grid-pill-right",
|
|
2271
|
-
children: [
|
|
2271
|
+
children: [k && /* @__PURE__ */ a(di, { error: k }), g]
|
|
2272
2272
|
})
|
|
2273
2273
|
]
|
|
2274
2274
|
});
|
|
@@ -2277,8 +2277,8 @@ var lt = ({ change: e, kind: t, name: n }) => {
|
|
|
2277
2277
|
r.current = t, ie(() => {
|
|
2278
2278
|
if (!n) return;
|
|
2279
2279
|
const o = (i) => {
|
|
2280
|
-
const s = e.map((c) => c.current).filter((c) => !!c),
|
|
2281
|
-
s.length > 0 && !
|
|
2280
|
+
const s = e.map((c) => c.current).filter((c) => !!c), l = i.target, d = l instanceof Node && s.some((c) => c?.contains(l));
|
|
2281
|
+
s.length > 0 && !d && r.current();
|
|
2282
2282
|
};
|
|
2283
2283
|
return document.addEventListener("pointerdown", o, !0), () => document.removeEventListener("pointerdown", o, !0);
|
|
2284
2284
|
}, [e, n]);
|
|
@@ -2312,15 +2312,15 @@ var lt = ({ change: e, kind: t, name: n }) => {
|
|
|
2312
2312
|
border: "1px solid #d1d5db",
|
|
2313
2313
|
flexShrink: 0,
|
|
2314
2314
|
display: "inline-block"
|
|
2315
|
-
}), qr = ({ rowType: e, height: t, name: n, description: r, actorId: o, onRenamed: i, validateName: s, onActorAdded:
|
|
2316
|
-
const { readOnly: h, messages: m } = re(), [v, p] = D(!1), [b, y] = D(!1), w = O(void 0),
|
|
2315
|
+
}), qr = ({ rowType: e, height: t, name: n, description: r, actorId: o, onRenamed: i, validateName: s, onActorAdded: l, onDragStart: d, dragging: c = !1, badge: u, personaAvatar: g, children: f }) => {
|
|
2316
|
+
const { readOnly: h, messages: m } = re(), [v, p] = D(!1), [b, y] = D(!1), w = O(void 0), k = O(null), S = O(null), N = O(null), R = ce(() => [S], []), C = ce(() => [N], []);
|
|
2317
2317
|
bt(R, () => p(!1), v), bt(C, () => y(!1), b);
|
|
2318
|
-
const W = n ?? zl(e, m), V = jl(e), te = V && !h ? i : void 0, $ = V && !h ?
|
|
2318
|
+
const W = n ?? zl(e, m), V = jl(e), te = V && !h ? i : void 0, $ = V && !h ? l : void 0, z = o && !h ? d : void 0, I = h ? [] : u?.actions ?? [], M = h ? void 0 : u?.onActivate, B = I.length > 0 || !!M, L = g ?? u?.avatar, A = V && (!!L || !!u && !h), G = () => {
|
|
2319
2319
|
if (I.length > 0) {
|
|
2320
2320
|
y((T) => !T);
|
|
2321
2321
|
return;
|
|
2322
2322
|
}
|
|
2323
|
-
|
|
2323
|
+
M?.();
|
|
2324
2324
|
};
|
|
2325
2325
|
return /* @__PURE__ */ x("div", {
|
|
2326
2326
|
style: {
|
|
@@ -2336,7 +2336,7 @@ var lt = ({ change: e, kind: t, name: n }) => {
|
|
|
2336
2336
|
"data-role-id": o,
|
|
2337
2337
|
children: [/* @__PURE__ */ x("div", {
|
|
2338
2338
|
className: "event-modeling-grid-row-label-pill",
|
|
2339
|
-
ref:
|
|
2339
|
+
ref: k,
|
|
2340
2340
|
style: z ? { cursor: "grab" } : void 0,
|
|
2341
2341
|
onPointerDown: z ? (T) => {
|
|
2342
2342
|
const H = T.target;
|
|
@@ -2376,7 +2376,7 @@ var lt = ({ change: e, kind: t, name: n }) => {
|
|
|
2376
2376
|
children: I.map((T) => /* @__PURE__ */ x("button", {
|
|
2377
2377
|
className: `event-modeling-grid-row-role-menu-option${T.danger ? " event-modeling-grid-row-role-menu-option--danger" : ""}`,
|
|
2378
2378
|
onClick: (H) => {
|
|
2379
|
-
H.stopPropagation(), y(!1), o &&
|
|
2379
|
+
H.stopPropagation(), y(!1), o && k.current && T.onActivate(o, k.current.getBoundingClientRect());
|
|
2380
2380
|
},
|
|
2381
2381
|
children: [T.icon, T.label]
|
|
2382
2382
|
}, T.id))
|
|
@@ -2462,16 +2462,16 @@ function Xl(e, t, n) {
|
|
|
2462
2462
|
function Zl(e, t, n) {
|
|
2463
2463
|
const r = re(), [o, i] = D(void 0), s = O(o);
|
|
2464
2464
|
s.current = o;
|
|
2465
|
-
const
|
|
2466
|
-
|
|
2467
|
-
const
|
|
2468
|
-
|
|
2465
|
+
const l = O(t);
|
|
2466
|
+
l.current = t;
|
|
2467
|
+
const d = O(e);
|
|
2468
|
+
d.current = e;
|
|
2469
2469
|
const c = O(n);
|
|
2470
2470
|
c.current = n;
|
|
2471
2471
|
const u = j((f, h, m) => {
|
|
2472
|
-
const v =
|
|
2472
|
+
const v = l.current.find((b) => b.id === f);
|
|
2473
2473
|
if (!v) return;
|
|
2474
|
-
const p =
|
|
2474
|
+
const p = l.current.filter((b) => b.actorType === v.actorType).findIndex((b) => b.id === f);
|
|
2475
2475
|
i({
|
|
2476
2476
|
actorId: f,
|
|
2477
2477
|
rowType: il(v.actorType),
|
|
@@ -2489,13 +2489,13 @@ function Zl(e, t, n) {
|
|
|
2489
2489
|
...v,
|
|
2490
2490
|
currentX: m.clientX,
|
|
2491
2491
|
currentY: m.clientY,
|
|
2492
|
-
dropIndex: Ul(
|
|
2492
|
+
dropIndex: Ul(d.current, v.rowType, m.clientY)
|
|
2493
2493
|
});
|
|
2494
2494
|
}, h = () => {
|
|
2495
2495
|
const m = s.current;
|
|
2496
2496
|
if (i(void 0), !m) return;
|
|
2497
|
-
const v = Xl(
|
|
2498
|
-
v && c.current?.(
|
|
2497
|
+
const v = Xl(l.current, m.actorId, m.dropIndex);
|
|
2498
|
+
v && c.current?.(d.current, v.actorType, v.orderedIds);
|
|
2499
2499
|
};
|
|
2500
2500
|
return window.addEventListener("pointermove", f), window.addEventListener("pointerup", h), () => {
|
|
2501
2501
|
window.removeEventListener("pointermove", f), window.removeEventListener("pointerup", h);
|
|
@@ -2505,25 +2505,25 @@ function Zl(e, t, n) {
|
|
|
2505
2505
|
handleActorDragStart: !r.readOnly && n !== void 0 ? u : void 0
|
|
2506
2506
|
};
|
|
2507
2507
|
}
|
|
2508
|
-
var Kl = ({ collectionId: e, topOffset: t, contentRows: n, rowHeights: r, actors: o, onActorAdded: i, onActorRenamed: s, onRowRenamed:
|
|
2509
|
-
const [g, f] = D({}), [h, m] = D({}), { actorDrag: v, handleActorDragStart: p } = Zl(e, o,
|
|
2508
|
+
var Kl = ({ collectionId: e, topOffset: t, contentRows: n, rowHeights: r, actors: o, onActorAdded: i, onActorRenamed: s, onRowRenamed: l, onActorsReordered: d, renderActorLabel: c, renderEmptyActorLabel: u }) => {
|
|
2509
|
+
const [g, f] = D({}), [h, m] = D({}), { actorDrag: v, handleActorDragStart: p } = Zl(e, o, d);
|
|
2510
2510
|
return /* @__PURE__ */ x(Gl, {
|
|
2511
2511
|
topOffset: t,
|
|
2512
2512
|
collectionId: e.toString(),
|
|
2513
2513
|
children: [/* @__PURE__ */ a(Dl, { drag: v }), n.flatMap((b) => {
|
|
2514
|
-
const y = on(b), w = y === void 0 ? [] : o.filter((R) => R.actorType === y),
|
|
2514
|
+
const y = on(b), w = y === void 0 ? [] : o.filter((R) => R.actorType === y), k = {
|
|
2515
2515
|
rowType: b,
|
|
2516
2516
|
height: r[b],
|
|
2517
2517
|
name: g[b],
|
|
2518
|
-
onRenamed:
|
|
2518
|
+
onRenamed: l ? (R) => {
|
|
2519
2519
|
f((C) => ({
|
|
2520
2520
|
...C,
|
|
2521
2521
|
[b]: R
|
|
2522
|
-
})),
|
|
2522
|
+
})), l(b, R);
|
|
2523
2523
|
} : void 0,
|
|
2524
2524
|
validateName: (R) => Object.entries(g).find(([C]) => C !== b)?.[1]?.toLowerCase() === R.toLowerCase() ? "Name already in use" : void 0,
|
|
2525
2525
|
onActorAdded: i ? (R) => i(b, R) : void 0
|
|
2526
|
-
}, S = y === void 0 || w.length === 0 ? [/* @__PURE__ */ a(ot, { children: y !== void 0 && u ? u(b,
|
|
2526
|
+
}, S = y === void 0 || w.length === 0 ? [/* @__PURE__ */ a(ot, { children: y !== void 0 && u ? u(b, k) : /* @__PURE__ */ a(qr, { ...k }) }, b)] : [], N = w.flatMap((R, C) => {
|
|
2527
2527
|
const W = v?.rowType === b, V = {
|
|
2528
2528
|
rowType: b,
|
|
2529
2529
|
height: r[b],
|
|
@@ -2803,7 +2803,7 @@ var Ur = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2803
2803
|
children: e
|
|
2804
2804
|
});
|
|
2805
2805
|
}, Je = ({ trigger: e, items: t, align: n = "right", onClose: r }) => {
|
|
2806
|
-
const o = Oe(hi), i = xt(), [s,
|
|
2806
|
+
const o = Oe(hi), i = xt(), [s, l] = D(!1), [d, c] = D(), u = O(null), g = O(null), f = o ? o.openMenuId === i : s, h = O(f);
|
|
2807
2807
|
ie(() => {
|
|
2808
2808
|
h.current && !f && (r?.(), c(void 0)), h.current = f;
|
|
2809
2809
|
}, [f, r]);
|
|
@@ -2812,7 +2812,7 @@ var Ur = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2812
2812
|
y ? o.setOpenMenuId((w) => ad(w, i)) : o.setOpenMenuId((w) => sd(w, i));
|
|
2813
2813
|
return;
|
|
2814
2814
|
}
|
|
2815
|
-
|
|
2815
|
+
l(y);
|
|
2816
2816
|
}, v = () => m(!1), p = ce(() => [u, g], []);
|
|
2817
2817
|
bt(p, v, f);
|
|
2818
2818
|
const b = (y) => y.map((w) => {
|
|
@@ -2821,15 +2821,15 @@ var Ur = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2821
2821
|
className: "event-modeling-menu-dropdown-header",
|
|
2822
2822
|
children: w.label
|
|
2823
2823
|
}, w.id.toString());
|
|
2824
|
-
const
|
|
2824
|
+
const k = w.items && w.items.length > 0, S = d === w.id.toString();
|
|
2825
2825
|
return /* @__PURE__ */ x("div", {
|
|
2826
2826
|
className: "event-modeling-menu-dropdown-item-wrapper",
|
|
2827
2827
|
children: [/* @__PURE__ */ x("button", {
|
|
2828
|
-
className: `event-modeling-menu-dropdown-option ${
|
|
2828
|
+
className: `event-modeling-menu-dropdown-option ${k ? "event-modeling-menu-dropdown-option--has-submenu" : ""}`,
|
|
2829
2829
|
disabled: w.disabled,
|
|
2830
2830
|
title: w.tooltip,
|
|
2831
2831
|
onClick: () => {
|
|
2832
|
-
w.disabled || (
|
|
2832
|
+
w.disabled || (k ? c(S ? void 0 : w.id.toString()) : (w.keepOpen || v(), w.onClick?.()));
|
|
2833
2833
|
},
|
|
2834
2834
|
children: [
|
|
2835
2835
|
w.icon && /* @__PURE__ */ a("span", {
|
|
@@ -2850,12 +2850,12 @@ var Ur = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2850
2850
|
className: "event-modeling-menu-dropdown-option-check",
|
|
2851
2851
|
children: w.checked && /* @__PURE__ */ a("i", { className: "pi pi-check" })
|
|
2852
2852
|
}),
|
|
2853
|
-
|
|
2853
|
+
k && /* @__PURE__ */ a("span", {
|
|
2854
2854
|
className: `event-modeling-menu-dropdown-option-arrow ${S ? "event-modeling-menu-dropdown-option-arrow--open" : ""}`,
|
|
2855
2855
|
children: /* @__PURE__ */ a("i", { className: "pi pi-chevron-right" })
|
|
2856
2856
|
})
|
|
2857
2857
|
]
|
|
2858
|
-
}),
|
|
2858
|
+
}), k && S && /* @__PURE__ */ a("div", {
|
|
2859
2859
|
className: `event-modeling-menu-dropdown-submenu ${n === "right" ? "event-modeling-menu-dropdown-submenu--left" : ""}`,
|
|
2860
2860
|
children: b(w.items)
|
|
2861
2861
|
})]
|
|
@@ -2928,21 +2928,21 @@ var Ur = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2928
2928
|
return t.statuses.done;
|
|
2929
2929
|
}
|
|
2930
2930
|
}, _n = (e) => de[e], sr = ({ status: e, onStatusChanged: t, selectable: n = Yr, unselectableReason: r, optimistic: o = !0 }) => {
|
|
2931
|
-
const { readOnly: i, messages: s } = re(), [
|
|
2932
|
-
ie(() =>
|
|
2933
|
-
const c = `${s.statuses.titlePrefix} ${wn(
|
|
2931
|
+
const { readOnly: i, messages: s } = re(), [l, d] = D(e);
|
|
2932
|
+
ie(() => d(e), [e]);
|
|
2933
|
+
const c = `${s.statuses.titlePrefix} ${wn(l, s)}`, u = `event-modeling-slice-status-icon event-modeling-slice-status-icon--${_n(l)}`;
|
|
2934
2934
|
if (i || !t) return /* @__PURE__ */ a("span", {
|
|
2935
2935
|
className: `${u} event-modeling-slice-status-icon--readonly`,
|
|
2936
2936
|
title: c,
|
|
2937
|
-
"aria-label": wn(
|
|
2938
|
-
children: /* @__PURE__ */ a(Ur, { status:
|
|
2937
|
+
"aria-label": wn(l, s),
|
|
2938
|
+
children: /* @__PURE__ */ a(Ur, { status: l })
|
|
2939
2939
|
});
|
|
2940
|
-
const g = (h) => o ? ld(
|
|
2940
|
+
const g = (h) => o ? ld(l, h, t, d) : void t(h), f = Yr.map((h) => ({
|
|
2941
2941
|
id: _n(h),
|
|
2942
2942
|
label: wn(h, s),
|
|
2943
2943
|
icon: /* @__PURE__ */ a(cd, {
|
|
2944
2944
|
status: h,
|
|
2945
|
-
checked: h ===
|
|
2945
|
+
checked: h === l
|
|
2946
2946
|
}),
|
|
2947
2947
|
disabled: !n.includes(h),
|
|
2948
2948
|
tooltip: n.includes(h) ? void 0 : r,
|
|
@@ -2953,7 +2953,7 @@ var Ur = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2953
2953
|
className: u,
|
|
2954
2954
|
title: c,
|
|
2955
2955
|
"aria-label": s.statuses.change,
|
|
2956
|
-
children: /* @__PURE__ */ a(Ur, { status:
|
|
2956
|
+
children: /* @__PURE__ */ a(Ur, { status: l })
|
|
2957
2957
|
}),
|
|
2958
2958
|
items: f,
|
|
2959
2959
|
align: "left"
|
|
@@ -2985,7 +2985,7 @@ var Ur = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2985
2985
|
})]
|
|
2986
2986
|
});
|
|
2987
2987
|
}, Xr = ({ moduleId: e, actions: t, onAddModule: n, onAddFeature: r, kind: o }) => {
|
|
2988
|
-
const i = be(), s = O(null), [
|
|
2988
|
+
const i = be(), s = O(null), [l, d] = D();
|
|
2989
2989
|
if (!t.length && !n && !r) return null;
|
|
2990
2990
|
const c = (h) => {
|
|
2991
2991
|
const m = s.current?.getBoundingClientRect();
|
|
@@ -2999,13 +2999,13 @@ var Ur = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
2999
2999
|
tooltip: m.tooltip,
|
|
3000
3000
|
isSeparator: m.isSeparator,
|
|
3001
3001
|
keepOpen: !!m.items,
|
|
3002
|
-
onClick: () => m.items ?
|
|
3003
|
-
})), g =
|
|
3002
|
+
onClick: () => m.items ? d(m.id) : c(m)
|
|
3003
|
+
})), g = l ? [{
|
|
3004
3004
|
id: "back",
|
|
3005
3005
|
label: i.features.back,
|
|
3006
3006
|
keepOpen: !0,
|
|
3007
|
-
onClick: () =>
|
|
3008
|
-
}, ...u(t.find((h) => h.id ===
|
|
3007
|
+
onClick: () => d(void 0)
|
|
3008
|
+
}, ...u(t.find((h) => h.id === l)?.items ?? [])] : [
|
|
3009
3009
|
...n ? [{
|
|
3010
3010
|
id: "module",
|
|
3011
3011
|
label: i.modules.addModule,
|
|
@@ -3066,7 +3066,7 @@ var Ur = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
3066
3066
|
}),
|
|
3067
3067
|
items: g,
|
|
3068
3068
|
align: "right",
|
|
3069
|
-
onClose: () =>
|
|
3069
|
+
onClose: () => d(void 0)
|
|
3070
3070
|
});
|
|
3071
3071
|
}, ud = ({ suggestion: e, background: t }) => {
|
|
3072
3072
|
const [n, r] = D(!1), o = async () => {
|
|
@@ -3117,8 +3117,8 @@ var Ur = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
3117
3117
|
fontWeight: 600,
|
|
3118
3118
|
color: "color-mix(in srgb, var(--board-ink, #ffffff) 80%, transparent)",
|
|
3119
3119
|
textAlign: "center"
|
|
3120
|
-
}, gd = ({ moduleId: e, name: t, description: n, documentation: r, height: o, collapsed: i, onToggleCollapse: s, onAddModule:
|
|
3121
|
-
const p = re(), b = ze(e), y = Jn(e, "module", t), { showStatuses: w = !0 } = Ee(),
|
|
3120
|
+
}, gd = ({ moduleId: e, name: t, description: n, documentation: r, height: o, collapsed: i, onToggleCollapse: s, onAddModule: l, onAddFeature: d, onRenamed: c, validateName: u, status: g, detailsVisible: f = !1, onToggleDetails: h, onDragStart: m, error: v }) => {
|
|
3121
|
+
const p = re(), b = ze(e), y = Jn(e, "module", t), { showStatuses: w = !0 } = Ee(), k = vi(!p.readOnly && !i ? m : void 0), S = p.readOnly ? void 0 : c, N = p.actions, R = Wm(e, d, p.editing);
|
|
3122
3122
|
return /* @__PURE__ */ x(ne, { children: [/* @__PURE__ */ x(ci, {
|
|
3123
3123
|
marker: b || y.marker ? /* @__PURE__ */ x(ne, { children: [b && /* @__PURE__ */ a(lt, {
|
|
3124
3124
|
change: b,
|
|
@@ -3155,10 +3155,10 @@ var Ur = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
3155
3155
|
background: Zr,
|
|
3156
3156
|
border: md,
|
|
3157
3157
|
height: o,
|
|
3158
|
-
draggable:
|
|
3159
|
-
onPointerDown:
|
|
3160
|
-
onPointerMove:
|
|
3161
|
-
onPointerUp:
|
|
3158
|
+
draggable: k !== void 0,
|
|
3159
|
+
onPointerDown: k?.onPointerDown,
|
|
3160
|
+
onPointerMove: k?.onPointerMove,
|
|
3161
|
+
onPointerUp: k?.onPointerUp,
|
|
3162
3162
|
error: v,
|
|
3163
3163
|
children: [
|
|
3164
3164
|
w && g !== void 0 && /* @__PURE__ */ a(sr, { status: g }),
|
|
@@ -3184,7 +3184,7 @@ var Ur = ({ status: e }) => /* @__PURE__ */ a("svg", {
|
|
|
3184
3184
|
kind: "add",
|
|
3185
3185
|
moduleId: e,
|
|
3186
3186
|
actions: N.moduleHeaderAdd ?? [],
|
|
3187
|
-
onAddModule:
|
|
3187
|
+
onAddModule: l,
|
|
3188
3188
|
onAddFeature: R
|
|
3189
3189
|
})
|
|
3190
3190
|
]
|
|
@@ -3200,14 +3200,14 @@ function vd(e, t) {
|
|
|
3200
3200
|
function hd(e, t, n) {
|
|
3201
3201
|
const r = re(), [o, i] = D(void 0), s = O(o);
|
|
3202
3202
|
s.current = o;
|
|
3203
|
-
const
|
|
3204
|
-
|
|
3205
|
-
const
|
|
3206
|
-
|
|
3203
|
+
const l = O(t);
|
|
3204
|
+
l.current = t;
|
|
3205
|
+
const d = O(e);
|
|
3206
|
+
d.current = e;
|
|
3207
3207
|
const c = O(n);
|
|
3208
3208
|
c.current = n;
|
|
3209
3209
|
const u = j((f, h, m) => {
|
|
3210
|
-
const v =
|
|
3210
|
+
const v = l.current.findIndex((p) => p.equals(f));
|
|
3211
3211
|
v !== -1 && i({
|
|
3212
3212
|
moduleId: f,
|
|
3213
3213
|
sourceIndex: v,
|
|
@@ -3228,13 +3228,13 @@ function hd(e, t, n) {
|
|
|
3228
3228
|
...v,
|
|
3229
3229
|
currentX: m.clientX,
|
|
3230
3230
|
currentY: m.clientY,
|
|
3231
|
-
dropIndex: vd(
|
|
3231
|
+
dropIndex: vd(l.current, m.clientX)
|
|
3232
3232
|
});
|
|
3233
3233
|
}, h = () => {
|
|
3234
3234
|
const m = s.current;
|
|
3235
3235
|
if (i(void 0), !m) return;
|
|
3236
|
-
const v = gi(
|
|
3237
|
-
v && c.current?.(
|
|
3236
|
+
const v = gi(l.current, m.sourceIndex, m.dropIndex);
|
|
3237
|
+
v && c.current?.(d.current, v);
|
|
3238
3238
|
};
|
|
3239
3239
|
return window.addEventListener("pointermove", f), window.addEventListener("pointerup", h), () => {
|
|
3240
3240
|
window.removeEventListener("pointermove", f), window.removeEventListener("pointerup", h);
|
|
@@ -3254,18 +3254,18 @@ var pd = (e) => ({
|
|
|
3254
3254
|
renameBarriers: /* @__PURE__ */ new Map()
|
|
3255
3255
|
}), Dn = (e, t) => e.length === t.length && e.every((n, r) => n.id.equals(t[r]));
|
|
3256
3256
|
function Ot(e, t) {
|
|
3257
|
-
const n = e.additions.filter((u) => !t.some((g) => g.id.equals(u.id))), r = new Map([...e.collapseBarriers].filter(([u, g]) => !t.some((f) => f.id.toString() === u && f.collapsed === g))), o = new Map([...e.renameBarriers].filter(([u, g]) => !t.some((f) => f.id.toString() === u && f.name === g))), i = e.orderBarrier && Dn(t, e.orderBarrier) ? void 0 : e.orderBarrier, s = new Map([...e.collapses].filter(([u, g]) => e.collapseBarriers.has(u) || !t.some((f) => f.id.toString() === u && f.collapsed === g))),
|
|
3257
|
+
const n = e.additions.filter((u) => !t.some((g) => g.id.equals(u.id))), r = new Map([...e.collapseBarriers].filter(([u, g]) => !t.some((f) => f.id.toString() === u && f.collapsed === g))), o = new Map([...e.renameBarriers].filter(([u, g]) => !t.some((f) => f.id.toString() === u && f.name === g))), i = e.orderBarrier && Dn(t, e.orderBarrier) ? void 0 : e.orderBarrier, s = new Map([...e.collapses].filter(([u, g]) => e.collapseBarriers.has(u) || !t.some((f) => f.id.toString() === u && f.collapsed === g))), l = new Map([...e.renames].filter(([u, g]) => e.renameBarriers.has(u) || !t.some((f) => f.id.toString() === u && f.name === g))), d = [...t, ...n].map((u) => ({
|
|
3258
3258
|
...u,
|
|
3259
3259
|
collapsed: s.get(u.id.toString()) ?? u.collapsed,
|
|
3260
|
-
name:
|
|
3261
|
-
})), c = e.order ? fi(
|
|
3260
|
+
name: l.get(u.id.toString()) ?? u.name
|
|
3261
|
+
})), c = e.order ? fi(d, e.order) : d;
|
|
3262
3262
|
return {
|
|
3263
3263
|
snapshot: t,
|
|
3264
3264
|
modules: c,
|
|
3265
3265
|
additions: n,
|
|
3266
3266
|
order: e.order && !e.orderBarrier && Dn(t, c.map((u) => u.id)) ? void 0 : e.order,
|
|
3267
3267
|
collapses: s,
|
|
3268
|
-
renames:
|
|
3268
|
+
renames: l,
|
|
3269
3269
|
collapseBarriers: r,
|
|
3270
3270
|
renameBarriers: o,
|
|
3271
3271
|
orderBarrier: i
|
|
@@ -3348,30 +3348,30 @@ async function Sn(e, t, n) {
|
|
|
3348
3348
|
}
|
|
3349
3349
|
r !== !0 && t();
|
|
3350
3350
|
}
|
|
3351
|
-
function xd({ collectionId: e, initialModules: t, onAddModule: n, onModulesReordered: r, onCollapseChanged: o, onRenameModule: i, onPersistenceError: s, renderModule:
|
|
3352
|
-
const { readOnly: c } = re(), u = j((
|
|
3353
|
-
if (s) s(
|
|
3354
|
-
else throw
|
|
3355
|
-
}, [s]), g = O(pd(t)), [f, h] = D(g.current), m = O(!1), [v, p] = D(!1), b = O(/* @__PURE__ */ new Set()), [y, w] = D(/* @__PURE__ */ new Set()),
|
|
3356
|
-
B ? b.current.add(
|
|
3357
|
-
}, C = j((
|
|
3358
|
-
const B =
|
|
3359
|
-
g.current = B, h(B),
|
|
3360
|
-
}, [
|
|
3351
|
+
function xd({ collectionId: e, initialModules: t, onAddModule: n, onModulesReordered: r, onCollapseChanged: o, onRenameModule: i, onPersistenceError: s, renderModule: l, onModulesChanged: d }) {
|
|
3352
|
+
const { readOnly: c } = re(), u = j((M) => {
|
|
3353
|
+
if (s) s(M);
|
|
3354
|
+
else throw M;
|
|
3355
|
+
}, [s]), g = O(pd(t)), [f, h] = D(g.current), m = O(!1), [v, p] = D(!1), b = O(/* @__PURE__ */ new Set()), [y, w] = D(/* @__PURE__ */ new Set()), k = O(!1), [S, N] = D(!1), R = (M, B) => {
|
|
3356
|
+
B ? b.current.add(M) : b.current.delete(M), w(new Set(b.current));
|
|
3357
|
+
}, C = j((M) => {
|
|
3358
|
+
const B = M(g.current);
|
|
3359
|
+
g.current = B, h(B), d?.(B.modules);
|
|
3360
|
+
}, [d]);
|
|
3361
3361
|
ie(() => {
|
|
3362
|
-
t !== g.current.snapshot && C((
|
|
3362
|
+
t !== g.current.snapshot && C((M) => Ot(M, t));
|
|
3363
3363
|
}, [t, C]);
|
|
3364
3364
|
const W = j(async () => {
|
|
3365
3365
|
if (!(c || !n || m.current)) {
|
|
3366
3366
|
m.current = !0, p(!0);
|
|
3367
3367
|
try {
|
|
3368
|
-
const
|
|
3369
|
-
|
|
3368
|
+
const M = await n();
|
|
3369
|
+
M && C((B) => Ot({
|
|
3370
3370
|
...B,
|
|
3371
|
-
additions: [...B.additions,
|
|
3371
|
+
additions: [...B.additions, M]
|
|
3372
3372
|
}, B.snapshot));
|
|
3373
|
-
} catch (
|
|
3374
|
-
u(
|
|
3373
|
+
} catch (M) {
|
|
3374
|
+
u(M);
|
|
3375
3375
|
} finally {
|
|
3376
3376
|
m.current = !1, p(!1);
|
|
3377
3377
|
}
|
|
@@ -3381,14 +3381,14 @@ function xd({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
|
|
|
3381
3381
|
n,
|
|
3382
3382
|
u,
|
|
3383
3383
|
C
|
|
3384
|
-
]), V = j(async (
|
|
3385
|
-
const B =
|
|
3384
|
+
]), V = j(async (M) => {
|
|
3385
|
+
const B = M.id.toString();
|
|
3386
3386
|
if (!o || b.current.has(B)) return;
|
|
3387
3387
|
R(B, !0);
|
|
3388
|
-
const L = !
|
|
3389
|
-
C((A) => fd(A,
|
|
3388
|
+
const L = !M.collapsed;
|
|
3389
|
+
C((A) => fd(A, M.id, L));
|
|
3390
3390
|
try {
|
|
3391
|
-
await Sn(() => o(
|
|
3391
|
+
await Sn(() => o(M.id, L), () => C((A) => wd(A, M.id)), u);
|
|
3392
3392
|
} finally {
|
|
3393
3393
|
R(B, !1);
|
|
3394
3394
|
}
|
|
@@ -3396,12 +3396,12 @@ function xd({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
|
|
|
3396
3396
|
o,
|
|
3397
3397
|
u,
|
|
3398
3398
|
C
|
|
3399
|
-
]), te = j(async (
|
|
3400
|
-
const L =
|
|
3399
|
+
]), te = j(async (M, B) => {
|
|
3400
|
+
const L = M.id.toString();
|
|
3401
3401
|
if (!(c || !i || b.current.has(L))) {
|
|
3402
|
-
R(L, !0), C((A) => bd(A,
|
|
3402
|
+
R(L, !0), C((A) => bd(A, M.id, B));
|
|
3403
3403
|
try {
|
|
3404
|
-
await Sn(() => i(
|
|
3404
|
+
await Sn(() => i(M.id, B), () => C((A) => Sd(A, M.id)), u);
|
|
3405
3405
|
} finally {
|
|
3406
3406
|
R(L, !1);
|
|
3407
3407
|
}
|
|
@@ -3411,49 +3411,49 @@ function xd({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
|
|
|
3411
3411
|
i,
|
|
3412
3412
|
u,
|
|
3413
3413
|
C
|
|
3414
|
-
]), $ = j(async (
|
|
3415
|
-
if (c || !r ||
|
|
3416
|
-
|
|
3414
|
+
]), $ = j(async (M, B) => {
|
|
3415
|
+
if (c || !r || k.current) return;
|
|
3416
|
+
k.current = !0, N(!0);
|
|
3417
3417
|
const L = g.current.order;
|
|
3418
3418
|
C((A) => yd(A, B));
|
|
3419
3419
|
try {
|
|
3420
3420
|
await Sn(() => r(B), () => C((A) => Cd(A, L)), u);
|
|
3421
3421
|
} finally {
|
|
3422
|
-
|
|
3422
|
+
k.current = !1, N(!1);
|
|
3423
3423
|
}
|
|
3424
3424
|
}, [
|
|
3425
3425
|
C,
|
|
3426
3426
|
r,
|
|
3427
3427
|
u,
|
|
3428
3428
|
c
|
|
3429
|
-
]), { moduleDrag: z, handleModuleDragStart: I } = hd(e, f.modules.map((
|
|
3429
|
+
]), { moduleDrag: z, handleModuleDragStart: I } = hd(e, f.modules.map((M) => M.id), r && !S ? $ : void 0);
|
|
3430
3430
|
return /* @__PURE__ */ x(ne, { children: [
|
|
3431
3431
|
/* @__PURE__ */ a(ui, {
|
|
3432
3432
|
drag: z,
|
|
3433
3433
|
headerHeight: ae.headerHeight
|
|
3434
3434
|
}),
|
|
3435
|
-
f.modules.map((
|
|
3435
|
+
f.modules.map((M, B) => /* @__PURE__ */ x("div", {
|
|
3436
3436
|
style: { display: "contents" },
|
|
3437
|
-
children: [z?.dropIndex === B && /* @__PURE__ */ a(Vr, {}),
|
|
3437
|
+
children: [z?.dropIndex === B && /* @__PURE__ */ a(Vr, {}), l(M, {
|
|
3438
3438
|
index: B,
|
|
3439
|
-
dragging: z?.moduleId.equals(
|
|
3440
|
-
onDragStart: !y.has(
|
|
3439
|
+
dragging: z?.moduleId.equals(M.id) ?? !1,
|
|
3440
|
+
onDragStart: !y.has(M.id.toString()) && I ? (L) => I(M.id, M.name, L) : void 0,
|
|
3441
3441
|
onAddModule: !c && !v && n ? () => {
|
|
3442
3442
|
W();
|
|
3443
3443
|
} : void 0,
|
|
3444
|
-
onToggleCollapse: !y.has(
|
|
3445
|
-
V(
|
|
3444
|
+
onToggleCollapse: !y.has(M.id.toString()) && o ? () => {
|
|
3445
|
+
V(M);
|
|
3446
3446
|
} : void 0,
|
|
3447
|
-
onRenamed: !c && !y.has(
|
|
3448
|
-
te(
|
|
3447
|
+
onRenamed: !c && !y.has(M.id.toString()) && i ? (L) => {
|
|
3448
|
+
te(M, L);
|
|
3449
3449
|
} : void 0
|
|
3450
3450
|
})]
|
|
3451
|
-
},
|
|
3451
|
+
}, M.id.toString())),
|
|
3452
3452
|
z?.dropIndex === f.modules.length && /* @__PURE__ */ a(Vr, {})
|
|
3453
3453
|
] });
|
|
3454
3454
|
}
|
|
3455
3455
|
function Md(e, t, n = Yo, r = ae.sliceGap) {
|
|
3456
|
-
const o = e.length ? e.reduce((i, s,
|
|
3456
|
+
const o = e.length ? e.reduce((i, s, l) => i + (l ? r : 0) + s, 0) : Math.round(ae.sliceWidth * 1.5);
|
|
3457
3457
|
return Math.max(o, Xo(t, n));
|
|
3458
3458
|
}
|
|
3459
3459
|
var kd = ({ width: e, collapsed: t, children: n }) => /* @__PURE__ */ a("div", {
|
|
@@ -3471,7 +3471,7 @@ var kd = ({ width: e, collapsed: t, children: n }) => /* @__PURE__ */ a("div", {
|
|
|
3471
3471
|
className: "event-modeling-module-placeholder__feature",
|
|
3472
3472
|
style: { width: r }
|
|
3473
3473
|
}, o))
|
|
3474
|
-
}), Nd = ({ moduleId: e, collectionId: t, index: n, width: r, collapsed: o, dragging: i, frameRef: s, header:
|
|
3474
|
+
}), Nd = ({ moduleId: e, collectionId: t, index: n, width: r, collapsed: o, dragging: i, frameRef: s, header: l, template: d, content: c }) => {
|
|
3475
3475
|
const { density: u } = Ee();
|
|
3476
3476
|
return /* @__PURE__ */ x(Jl, {
|
|
3477
3477
|
ref: s,
|
|
@@ -3482,7 +3482,7 @@ var kd = ({ width: e, collapsed: t, children: n }) => /* @__PURE__ */ a("div", {
|
|
|
3482
3482
|
children: [/* @__PURE__ */ x(kd, {
|
|
3483
3483
|
width: r,
|
|
3484
3484
|
collapsed: o,
|
|
3485
|
-
children: [
|
|
3485
|
+
children: [l, !o && d]
|
|
3486
3486
|
}), o ? /* @__PURE__ */ a("div", { style: { width: ae.collapsedModuleWidth } }) : c]
|
|
3487
3487
|
});
|
|
3488
3488
|
}, At = (e) => {
|
|
@@ -3515,11 +3515,11 @@ var kd = ({ width: e, collapsed: t, children: n }) => /* @__PURE__ */ a("div", {
|
|
|
3515
3515
|
const t = /* @__PURE__ */ new Set(), n = (r) => t.has(r.id.toString()) ? [] : (t.add(r.id.toString()), [r, ...r.subFeatures.flatMap(n)]);
|
|
3516
3516
|
return e.flatMap(n);
|
|
3517
3517
|
}, Ci = (e, t, n) => Md(Si(t).map(it).filter((r) => r > 0), e, void 0, nn(n).feature), xi = (e) => e.length === 0 ? 0 : 1 + Math.max(...e.map((t) => xi(t.subFeatures))), Id = (e, t, n, r) => {
|
|
3518
|
-
const o = lr(e), i = yi(e, t, r), s = At(e),
|
|
3518
|
+
const o = lr(e), i = yi(e, t, r), s = At(e), l = e.modules.map((g) => g.collapsed ? ae.collapsedModuleWidth : Ci(g.name, g.features, n)), d = l.reduce((g, f, h) => g + (h ? nn(n).module : 0) + f, 0), c = Math.max(1, ...e.modules.map((g) => xi(g.features))), u = o.reduce((g, f) => g + i[f], 0);
|
|
3519
3519
|
return {
|
|
3520
|
-
width: (s.length ? 56 : 0) +
|
|
3520
|
+
width: (s.length ? 56 : 0) + d + 2 * Pn,
|
|
3521
3521
|
height: ae.headerHeight * (1 + c) + 28 + u + 2 * Pn,
|
|
3522
|
-
moduleWidths:
|
|
3522
|
+
moduleWidths: l
|
|
3523
3523
|
};
|
|
3524
3524
|
}, Mi = () => {
|
|
3525
3525
|
const { detailLevel: e, detailsVisibility: t } = Ee();
|
|
@@ -3621,13 +3621,13 @@ function Ad(e) {
|
|
|
3621
3621
|
const r = (o, i) => {
|
|
3622
3622
|
const s = n.get(i);
|
|
3623
3623
|
if (!s || s.sliceId === o.id) return;
|
|
3624
|
-
const
|
|
3625
|
-
|
|
3624
|
+
const l = t.get(o.id), d = t.get(s.sliceId);
|
|
3625
|
+
l.connectedSliceIds.add(s.sliceId), d.connectedSliceIds.add(o.id), l.consumed.some((c) => c.eventId === i && c.sliceId === s.sliceId) || l.consumed.push({
|
|
3626
3626
|
eventId: i,
|
|
3627
3627
|
eventName: s.eventName,
|
|
3628
3628
|
sliceId: s.sliceId,
|
|
3629
3629
|
sliceName: s.sliceName
|
|
3630
|
-
}),
|
|
3630
|
+
}), d.produced.some((c) => c.eventId === i && c.sliceId === o.id) || d.produced.push({
|
|
3631
3631
|
eventId: i,
|
|
3632
3632
|
eventName: s.eventName,
|
|
3633
3633
|
sliceId: o.id,
|
|
@@ -3644,16 +3644,16 @@ var Ld = 40;
|
|
|
3644
3644
|
function Td(e, t) {
|
|
3645
3645
|
const n = e.x + e.width / 2, r = t.x + t.width / 2;
|
|
3646
3646
|
if (e.y < t.y + t.height && t.y < e.y + e.height) {
|
|
3647
|
-
const
|
|
3647
|
+
const d = Math.max(Ld, Math.abs(r - n) / 2), c = Math.min(e.y, t.y) - d;
|
|
3648
3648
|
return `M ${n} ${e.y} C ${n} ${c}, ${r} ${c}, ${r} ${t.y}`;
|
|
3649
3649
|
}
|
|
3650
|
-
const o = e.y + e.height / 2, i = t.y + t.height / 2 >= o, s = i ? e.y + e.height : e.y,
|
|
3650
|
+
const o = e.y + e.height / 2, i = t.y + t.height / 2 >= o, s = i ? e.y + e.height : e.y, l = i ? t.y : t.y + t.height;
|
|
3651
3651
|
return Qn({
|
|
3652
3652
|
x: n,
|
|
3653
3653
|
y: s
|
|
3654
3654
|
}, {
|
|
3655
3655
|
x: r,
|
|
3656
|
-
y:
|
|
3656
|
+
y: l
|
|
3657
3657
|
}, Xt.Vertical);
|
|
3658
3658
|
}
|
|
3659
3659
|
function Pd(e) {
|
|
@@ -3700,19 +3700,19 @@ var $d = ({ sliceType: e, recomputeKey: t }) => {
|
|
|
3700
3700
|
height: w.height / m
|
|
3701
3701
|
};
|
|
3702
3702
|
}, p = Pd(e).map((y) => Array.from(g.querySelectorAll(`[data-flow-node="${y}"]`)).map(v)).filter((y) => y.length > 0), b = [];
|
|
3703
|
-
for (let y = 0; y < p.length - 1; y++) for (const w of p[y]) for (const
|
|
3704
|
-
o((y) => y.length === b.length && y.every((w,
|
|
3705
|
-
}, [e]),
|
|
3703
|
+
for (let y = 0; y < p.length - 1; y++) for (const w of p[y]) for (const k of p[y + 1]) b.push(Td(w, k));
|
|
3704
|
+
o((y) => y.length === b.length && y.every((w, k) => w === b[k]) ? y : b);
|
|
3705
|
+
}, [e]), l = O(0), d = O(!1), c = j(() => {
|
|
3706
3706
|
if (Yt.isActive) {
|
|
3707
|
-
|
|
3707
|
+
d.current = !0;
|
|
3708
3708
|
return;
|
|
3709
3709
|
}
|
|
3710
|
-
|
|
3711
|
-
|
|
3710
|
+
l.current || (l.current = requestAnimationFrame(() => {
|
|
3711
|
+
l.current = 0, s();
|
|
3712
3712
|
}));
|
|
3713
3713
|
}, [s]);
|
|
3714
|
-
return ie(() => () => cancelAnimationFrame(
|
|
3715
|
-
u || !
|
|
3714
|
+
return ie(() => () => cancelAnimationFrame(l.current), []), ie(() => Yt.subscribe((u) => {
|
|
3715
|
+
u || !d.current || (d.current = !1, c());
|
|
3716
3716
|
}), [c]), Pt(() => {
|
|
3717
3717
|
s();
|
|
3718
3718
|
}, [s, t]), ie(() => {
|
|
@@ -3779,16 +3779,16 @@ function Hd(e) {
|
|
|
3779
3779
|
const s = i.closest(Fd);
|
|
3780
3780
|
if (!s) return;
|
|
3781
3781
|
r();
|
|
3782
|
-
const
|
|
3782
|
+
const l = [i];
|
|
3783
3783
|
i.classList.add(Cn);
|
|
3784
|
-
const
|
|
3785
|
-
c &&
|
|
3786
|
-
for (const u of
|
|
3787
|
-
g !== i && (g.classList.add(Cn),
|
|
3784
|
+
const d = new Set(e ?? []), c = i.dataset.sliceId;
|
|
3785
|
+
c && d.add(c);
|
|
3786
|
+
for (const u of d) s.querySelectorAll(Bd(u)).forEach((g) => {
|
|
3787
|
+
g !== i && (g.classList.add(Cn), l.push(g));
|
|
3788
3788
|
});
|
|
3789
3789
|
s.classList.add(Jr), n.current = {
|
|
3790
3790
|
board: s,
|
|
3791
|
-
columns:
|
|
3791
|
+
columns: l
|
|
3792
3792
|
};
|
|
3793
3793
|
}, [r, e]);
|
|
3794
3794
|
return ie(() => r, [r]), {
|
|
@@ -3815,7 +3815,7 @@ var Wd = ({ featureId: e, moduleId: t, enabled: n, dragging: r = !1, children: o
|
|
|
3815
3815
|
},
|
|
3816
3816
|
children: o
|
|
3817
3817
|
});
|
|
3818
|
-
}, zd = ({ featureId: e, moduleId: t, enabled: n, collapsed: r, rowCollapsed: o, width: i, headerVisibility: s, nested:
|
|
3818
|
+
}, zd = ({ featureId: e, moduleId: t, enabled: n, collapsed: r, rowCollapsed: o, width: i, headerVisibility: s, nested: l = !1, header: d, screenTemplate: c, slices: u }) => /* @__PURE__ */ x(Wd, {
|
|
3819
3819
|
featureId: e,
|
|
3820
3820
|
moduleId: t,
|
|
3821
3821
|
enabled: n,
|
|
@@ -3826,9 +3826,9 @@ var Wd = ({ featureId: e, moduleId: t, enabled: n, dragging: r = !1, children: o
|
|
|
3826
3826
|
visibility: s === "hidden" ? "hidden" : "visible",
|
|
3827
3827
|
overflow: s === "visible" && !r ? "visible" : "hidden"
|
|
3828
3828
|
},
|
|
3829
|
-
children: [s === "visible" ?
|
|
3829
|
+
children: [s === "visible" ? d : s === "hidden" ? /* @__PURE__ */ a("div", { style: { height: ae.headerHeight } }) : null, !r && c]
|
|
3830
3830
|
}), /* @__PURE__ */ a("div", {
|
|
3831
|
-
className: o ? "event-modeling-feature-grid-slices--row-collapsed" : s === "visible" ||
|
|
3831
|
+
className: o ? "event-modeling-feature-grid-slices--row-collapsed" : s === "visible" || l ? "event-modeling-feature-grid-slices--header-visible" : void 0,
|
|
3832
3832
|
children: u
|
|
3833
3833
|
})]
|
|
3834
3834
|
}), jd = {
|
|
@@ -3866,12 +3866,12 @@ function Ud(e, t) {
|
|
|
3866
3866
|
function Yd(e, t, n) {
|
|
3867
3867
|
const r = re(), [o, i] = D(void 0), s = O(o);
|
|
3868
3868
|
s.current = o;
|
|
3869
|
-
const
|
|
3870
|
-
|
|
3871
|
-
const
|
|
3872
|
-
|
|
3869
|
+
const l = O(t);
|
|
3870
|
+
l.current = t;
|
|
3871
|
+
const d = O(n);
|
|
3872
|
+
d.current = n;
|
|
3873
3873
|
const c = j((g, f, h) => {
|
|
3874
|
-
const m =
|
|
3874
|
+
const m = l.current.findIndex((v) => v.equals(g));
|
|
3875
3875
|
m !== -1 && i({
|
|
3876
3876
|
featureId: g,
|
|
3877
3877
|
moduleId: e,
|
|
@@ -3898,8 +3898,8 @@ function Yd(e, t, n) {
|
|
|
3898
3898
|
}, f = () => {
|
|
3899
3899
|
const h = s.current;
|
|
3900
3900
|
if (i(void 0), !h) return;
|
|
3901
|
-
const m = gi(
|
|
3902
|
-
m &&
|
|
3901
|
+
const m = gi(l.current, h.sourceIndex, h.dropIndex);
|
|
3902
|
+
m && d.current?.(h.moduleId, m);
|
|
3903
3903
|
};
|
|
3904
3904
|
return window.addEventListener("pointermove", g), window.addEventListener("pointerup", f), () => {
|
|
3905
3905
|
window.removeEventListener("pointermove", g), window.removeEventListener("pointerup", f);
|
|
@@ -3929,12 +3929,12 @@ function Kd() {
|
|
|
3929
3929
|
return {
|
|
3930
3930
|
targets: e,
|
|
3931
3931
|
register: j((o, i) => {
|
|
3932
|
-
const s = `${i}:${o}`,
|
|
3933
|
-
if (
|
|
3934
|
-
const
|
|
3932
|
+
const s = `${i}:${o}`, l = n.current.get(s);
|
|
3933
|
+
if (l) return l;
|
|
3934
|
+
const d = (g) => {
|
|
3935
3935
|
const f = (r.current.get(s) ?? []).filter((h) => h !== g);
|
|
3936
3936
|
f.length ? r.current.set(s, f) : r.current.delete(s), t((h) => Zd(h, o, i, g, r.current.get(s)?.[0]));
|
|
3937
|
-
}, c = (g) => (r.current.set(s, [...r.current.get(s) ?? [], g]), t((f) => Xd(f, o, i, g)), () =>
|
|
3937
|
+
}, c = (g) => (r.current.set(s, [...r.current.get(s) ?? [], g]), t((f) => Xd(f, o, i, g)), () => d(g)), u = (g) => g ? c(g) : void 0;
|
|
3938
3938
|
return n.current.set(s, u), u;
|
|
3939
3939
|
}, [])
|
|
3940
3940
|
};
|
|
@@ -3966,10 +3966,10 @@ function Ii(e, t, n) {
|
|
|
3966
3966
|
})) : [...e, t];
|
|
3967
3967
|
}
|
|
3968
3968
|
function Fn(e, t) {
|
|
3969
|
-
const n = e.pendingAdditions.filter(({ feature:
|
|
3969
|
+
const n = e.pendingAdditions.filter(({ feature: d }) => !ur(t, d.id)), r = n.reduce((d, c) => Ii(d, c.feature, c.parentId), t), o = new Map([...e.pendingRenames].filter(([d, c]) => !Ri(t, d, c))), i = [...o].reduce((d, [c, u]) => gr(d, c, u), r), s = new Map([...e.pendingCollapses].filter(([d, c]) => !Oi(t, d, c))), l = [...s].reduce((d, [c, u]) => mr(d, c, u), i);
|
|
3970
3970
|
return {
|
|
3971
3971
|
snapshot: t,
|
|
3972
|
-
features: e.order ? Bn(
|
|
3972
|
+
features: e.order ? Bn(l, e.order) : l,
|
|
3973
3973
|
pendingAdditions: n,
|
|
3974
3974
|
pendingRenames: o,
|
|
3975
3975
|
pendingCollapses: s,
|
|
@@ -4028,8 +4028,8 @@ function Bn(e, t) {
|
|
|
4028
4028
|
const n = e.filter((o, i) => e.findIndex((s) => s.id.equals(o.id)) === i), r = /* @__PURE__ */ new Set();
|
|
4029
4029
|
return [...t.flatMap((o) => r.has(o.toString()) ? [] : (r.add(o.toString()), n.filter((i) => i.id.equals(o)))), ...n.filter((o) => !t.some((i) => i.equals(o.id)))];
|
|
4030
4030
|
}
|
|
4031
|
-
function ec({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed: o, forceCollapsed: i = !1, onCollapseChanged: s, occupiesColumn:
|
|
4032
|
-
const { readOnly: v, messages: p } = re(), { targets: b, register: y } = Kd(), w = O(Jd(t)), [
|
|
4031
|
+
function ec({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed: o, forceCollapsed: i = !1, onCollapseChanged: s, occupiesColumn: l, renderHeader: d, renderColumn: c, renderFeatureBoundary: u, onAddFeature: g, onRenameFeature: f, onFeaturesReordered: h, onFeaturesChanged: m }) {
|
|
4032
|
+
const { readOnly: v, messages: p } = re(), { targets: b, register: y } = Kd(), w = O(Jd(t)), [k, S] = D(w.current), N = O(!1), R = O(/* @__PURE__ */ new Set()), C = j((P) => {
|
|
4033
4033
|
const E = P(w.current);
|
|
4034
4034
|
E !== w.current && (w.current = E, S(E), m?.(E.features));
|
|
4035
4035
|
}, [m]);
|
|
@@ -4078,10 +4078,10 @@ function ec({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
4078
4078
|
f,
|
|
4079
4079
|
v,
|
|
4080
4080
|
V
|
|
4081
|
-
]), $ = j((P) => i || (
|
|
4081
|
+
]), $ = j((P) => i || (k.pendingCollapses.get(P.id.toString()) ?? o(P)), [
|
|
4082
4082
|
i,
|
|
4083
4083
|
o,
|
|
4084
|
-
|
|
4084
|
+
k.pendingCollapses
|
|
4085
4085
|
]), z = j((P) => {
|
|
4086
4086
|
const E = !$(P);
|
|
4087
4087
|
C((q) => ({
|
|
@@ -4101,16 +4101,16 @@ function ec({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
4101
4101
|
pendingCollapses: q
|
|
4102
4102
|
}, E.snapshot);
|
|
4103
4103
|
}), s?.(P.id, P.collapsed);
|
|
4104
|
-
}, [C, s]),
|
|
4104
|
+
}, [C, s]), M = k.features, B = nn(Ee().density).feature, L = ce(() => Gd(M).map(({ feature: P, children: E }) => ({
|
|
4105
4105
|
feature: P,
|
|
4106
4106
|
children: E,
|
|
4107
|
-
width: [P, ...E].filter(
|
|
4107
|
+
width: [P, ...E].filter(l).reduce((q, ue, Se) => q + (Se ? B : 0) + r(ue), 0)
|
|
4108
4108
|
})), [
|
|
4109
|
-
|
|
4110
|
-
|
|
4109
|
+
M,
|
|
4110
|
+
l,
|
|
4111
4111
|
r,
|
|
4112
4112
|
B
|
|
4113
|
-
]), A = L.flatMap((P) => [P.feature, ...P.children]).filter(
|
|
4113
|
+
]), A = L.flatMap((P) => [P.feature, ...P.children]).filter(l), G = new Set(L.filter((P) => P.children.length).map((P) => P.feature.id.toString())), _ = new Set(L.flatMap((P) => P.children.map((E) => E.id.toString()))), U = M.map((P) => P.id), K = j((P, E) => {
|
|
4114
4114
|
C((q) => ({
|
|
4115
4115
|
...q,
|
|
4116
4116
|
features: Bn(q.features, E),
|
|
@@ -4134,7 +4134,7 @@ function ec({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
4134
4134
|
nested: G.size > 0
|
|
4135
4135
|
};
|
|
4136
4136
|
};
|
|
4137
|
-
return
|
|
4137
|
+
return M.length ? /* @__PURE__ */ x(ne, { children: [
|
|
4138
4138
|
/* @__PURE__ */ a(ui, {
|
|
4139
4139
|
drag: T,
|
|
4140
4140
|
headerHeight: ae.headerHeight
|
|
@@ -4149,7 +4149,7 @@ function ec({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
4149
4149
|
width: P.width,
|
|
4150
4150
|
collapsed: $(P.feature),
|
|
4151
4151
|
dropEdge: Vd(T?.dropIndex, E, L.length),
|
|
4152
|
-
children: !u &&
|
|
4152
|
+
children: !u && d(P.feature, X(P.feature))
|
|
4153
4153
|
}, P.feature.id.toString()))
|
|
4154
4154
|
}), /* @__PURE__ */ a("div", {
|
|
4155
4155
|
className: "event-modeling-features-area__columns",
|
|
@@ -4163,7 +4163,7 @@ function ec({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
4163
4163
|
}),
|
|
4164
4164
|
u && L.flatMap((P) => [P.feature, ...P.children]).map((P) => {
|
|
4165
4165
|
const E = b.get(P.id.toString());
|
|
4166
|
-
return !E || !_.has(P.id.toString()) && !E.header ||
|
|
4166
|
+
return !E || !_.has(P.id.toString()) && !E.header || l(P) && !E.column ? null : /* @__PURE__ */ a(ot, { children: u(P, /* @__PURE__ */ x(ne, { children: [!_.has(P.id.toString()) && E.header && pt(d(P, X(P)), E.header), E.column && pt(c(P, oe(P)), E.column)] })) }, P.id.toString());
|
|
4167
4167
|
})
|
|
4168
4168
|
] }) : /* @__PURE__ */ a("div", {
|
|
4169
4169
|
className: "event-modeling-module-empty-placeholder",
|
|
@@ -4422,7 +4422,7 @@ var tc = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4422
4422
|
align: "right"
|
|
4423
4423
|
});
|
|
4424
4424
|
}, ac = ({ featureId: e, onAddSubFeature: t, onAddSlice: n, actions: r = [] }) => {
|
|
4425
|
-
const o = be(), i = O(null), [s,
|
|
4425
|
+
const o = be(), i = O(null), [s, l] = D("main"), [d, c] = D(), u = r.filter((p) => !p.when || p.when(e));
|
|
4426
4426
|
if (!t && !n && u.length === 0) return null;
|
|
4427
4427
|
const g = [
|
|
4428
4428
|
...n ? [{
|
|
@@ -4430,7 +4430,7 @@ var tc = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4430
4430
|
label: o.sliceTypes.add + " ›",
|
|
4431
4431
|
description: o.features.addSliceDescription,
|
|
4432
4432
|
keepOpen: !0,
|
|
4433
|
-
onClick: () =>
|
|
4433
|
+
onClick: () => l("slice")
|
|
4434
4434
|
}] : [],
|
|
4435
4435
|
...t ? [{
|
|
4436
4436
|
id: "sub-feature",
|
|
@@ -4448,7 +4448,7 @@ var tc = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4448
4448
|
keepOpen: !!p.items,
|
|
4449
4449
|
onClick: () => {
|
|
4450
4450
|
if (!p.items) return f(p);
|
|
4451
|
-
c(p.id),
|
|
4451
|
+
c(p.id), l("consumer");
|
|
4452
4452
|
}
|
|
4453
4453
|
}))
|
|
4454
4454
|
];
|
|
@@ -4460,8 +4460,8 @@ var tc = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4460
4460
|
id: "back",
|
|
4461
4461
|
label: o.features.back,
|
|
4462
4462
|
keepOpen: !0,
|
|
4463
|
-
onClick: () =>
|
|
4464
|
-
}, m = n ? [h, ...Ti(o, n)] : [h], v = [h, ...(u.find((p) => p.id ===
|
|
4463
|
+
onClick: () => l("main")
|
|
4464
|
+
}, m = n ? [h, ...Ti(o, n)] : [h], v = [h, ...(u.find((p) => p.id === d)?.items ?? []).filter((p) => !p.when || p.when(e)).map((p) => ({
|
|
4465
4465
|
id: p.id,
|
|
4466
4466
|
label: p.label,
|
|
4467
4467
|
icon: p.icon,
|
|
@@ -4481,7 +4481,7 @@ var tc = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4481
4481
|
items: s === "main" ? g : s === "slice" ? m : v,
|
|
4482
4482
|
align: "right",
|
|
4483
4483
|
onClose: () => {
|
|
4484
|
-
|
|
4484
|
+
l("main"), c(void 0);
|
|
4485
4485
|
}
|
|
4486
4486
|
});
|
|
4487
4487
|
}, Pi = (e, t, n) => t.filter((r) => !r.when || r.when(e)).map((r) => ({
|
|
@@ -4511,16 +4511,16 @@ var tc = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4511
4511
|
items: i,
|
|
4512
4512
|
align: "right"
|
|
4513
4513
|
});
|
|
4514
|
-
}, Qr = "color-mix(in srgb, var(--board-feature, #a08ce6) 10%, transparent)", lc = "1px solid color-mix(in srgb, var(--board-feature, #a08ce6) 22%, transparent)", dc = ({ featureId: e, name: t, description: n, documentation: r, height: o, collapsed: i, onToggleCollapse: s, onRenamed:
|
|
4515
|
-
const y = re(), w = ze(e),
|
|
4514
|
+
}, Qr = "color-mix(in srgb, var(--board-feature, #a08ce6) 10%, transparent)", lc = "1px solid color-mix(in srgb, var(--board-feature, #a08ce6) 22%, transparent)", dc = ({ featureId: e, name: t, description: n, documentation: r, height: o, collapsed: i, onToggleCollapse: s, onRenamed: l, status: d, selectableStatuses: c, unselectableStatusReason: u, detailsVisible: g = !1, onToggleDetails: f, dragging: h = !1, onDragStart: m, error: v, onAddSubFeature: p, onAddSlice: b }) => {
|
|
4515
|
+
const y = re(), w = ze(e), k = Jn(e, "feature", t), { showStatuses: S = !0 } = Ee(), N = vi(!y.readOnly && !i ? m : void 0), R = y.readOnly ? void 0 : l, C = (y.actions.featureHeader ?? []).filter(($) => !$.when || $.when(e)), W = (y.actions.featureHeaderLeading ?? []).filter(($) => !$.when || $.when(e)), V = y.actions.featureHeaderMenu ?? [], te = zm(e, p, b, y.editing);
|
|
4516
4516
|
return /* @__PURE__ */ x(ne, { children: [/* @__PURE__ */ a(ci, {
|
|
4517
|
-
marker: w ||
|
|
4517
|
+
marker: w || k.marker ? /* @__PURE__ */ x(ne, { children: [w && /* @__PURE__ */ a(lt, {
|
|
4518
4518
|
change: w,
|
|
4519
4519
|
kind: y.messages.erroredEntity.feature,
|
|
4520
4520
|
name: t
|
|
4521
|
-
}),
|
|
4522
|
-
className: [
|
|
4523
|
-
attributes:
|
|
4521
|
+
}), k.marker] }) : void 0,
|
|
4522
|
+
className: [k.className, k.emphasisClassName].filter(Boolean).join(" ") || void 0,
|
|
4523
|
+
attributes: k.attributes,
|
|
4524
4524
|
variant: "feature",
|
|
4525
4525
|
collapsed: i,
|
|
4526
4526
|
onToggle: s,
|
|
@@ -4558,8 +4558,8 @@ var tc = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
4558
4558
|
},
|
|
4559
4559
|
error: v,
|
|
4560
4560
|
children: !i && /* @__PURE__ */ x(ne, { children: [
|
|
4561
|
-
S &&
|
|
4562
|
-
status:
|
|
4561
|
+
S && d !== void 0 && /* @__PURE__ */ a(sr, {
|
|
4562
|
+
status: d,
|
|
4563
4563
|
onStatusChanged: y.editing.onFeatureStatusChanged ? ($) => y.editing.onFeatureStatusChanged?.(e, $) : void 0,
|
|
4564
4564
|
selectable: c,
|
|
4565
4565
|
unselectableReason: u,
|
|
@@ -4660,18 +4660,18 @@ function cc(e, t) {
|
|
|
4660
4660
|
}
|
|
4661
4661
|
}
|
|
4662
4662
|
var uc = ({ state: e, specification: t }) => {
|
|
4663
|
-
const { actions: n } = re(), r = Me(), o = O(!1), [i, s] = D(!1),
|
|
4664
|
-
if (!
|
|
4663
|
+
const { actions: n } = re(), r = Me(), o = O(!1), [i, s] = D(!1), l = e === Ce.Running, d = l ? n.specificationStop : n.specificationRun;
|
|
4664
|
+
if (!d || d.when && !d.when(t)) return null;
|
|
4665
4665
|
const c = async (u) => {
|
|
4666
4666
|
if (!r) {
|
|
4667
|
-
if (
|
|
4668
|
-
await
|
|
4667
|
+
if (l) {
|
|
4668
|
+
await d.onActivate(t.id, u);
|
|
4669
4669
|
return;
|
|
4670
4670
|
}
|
|
4671
4671
|
if (!o.current) {
|
|
4672
4672
|
o.current = !0, s(!0);
|
|
4673
4673
|
try {
|
|
4674
|
-
await
|
|
4674
|
+
await d.onActivate(t.id, u);
|
|
4675
4675
|
} finally {
|
|
4676
4676
|
o.current = !1, s(!1);
|
|
4677
4677
|
}
|
|
@@ -4684,10 +4684,10 @@ var uc = ({ state: e, specification: t }) => {
|
|
|
4684
4684
|
onClick: (u) => {
|
|
4685
4685
|
c(u.currentTarget.getBoundingClientRect());
|
|
4686
4686
|
},
|
|
4687
|
-
disabled: r || i && !
|
|
4688
|
-
"aria-label":
|
|
4689
|
-
title:
|
|
4690
|
-
children: i && !
|
|
4687
|
+
disabled: r || i && !l,
|
|
4688
|
+
"aria-label": d.tooltip,
|
|
4689
|
+
title: d.tooltip,
|
|
4690
|
+
children: i && !l ? /* @__PURE__ */ a("i", { className: "pi pi-spin pi-spinner" }) : d.icon
|
|
4691
4691
|
});
|
|
4692
4692
|
}, mc = {
|
|
4693
4693
|
[Ce.Idle]: "pi pi-minus",
|
|
@@ -4715,15 +4715,15 @@ var uc = ({ state: e, specification: t }) => {
|
|
|
4715
4715
|
return !1;
|
|
4716
4716
|
}
|
|
4717
4717
|
}, hc = ({ text: e, variant: t }) => {
|
|
4718
|
-
const n = be().specificationResult, [r, o] = D(!1), [i, s] = D(!1),
|
|
4719
|
-
ie(() => () => clearTimeout(
|
|
4718
|
+
const n = be().specificationResult, [r, o] = D(!1), [i, s] = D(!1), l = xt(), d = O(void 0);
|
|
4719
|
+
ie(() => () => clearTimeout(d.current), []);
|
|
4720
4720
|
const c = async () => {
|
|
4721
|
-
await vc(e) && (s(!0), clearTimeout(
|
|
4721
|
+
await vc(e) && (s(!0), clearTimeout(d.current), d.current = setTimeout(() => s(!1), 1500));
|
|
4722
4722
|
}, u = /* @__PURE__ */ x("button", {
|
|
4723
4723
|
type: "button",
|
|
4724
4724
|
className: "spec-result-toggle",
|
|
4725
4725
|
"aria-expanded": r,
|
|
4726
|
-
"aria-controls":
|
|
4726
|
+
"aria-controls": l,
|
|
4727
4727
|
"aria-label": r ? n.collapse : `${n.expand}: ${e}`,
|
|
4728
4728
|
onClick: () => o((g) => !g),
|
|
4729
4729
|
onKeyDown: (g) => {
|
|
@@ -4742,13 +4742,14 @@ var uc = ({ state: e, specification: t }) => {
|
|
|
4742
4742
|
"data-spec-result": r ? "expanded" : "collapsed",
|
|
4743
4743
|
children: [/* @__PURE__ */ x("div", {
|
|
4744
4744
|
className: "spec-result-row",
|
|
4745
|
-
children: [
|
|
4745
|
+
children: [/* @__PURE__ */ a(fe, {
|
|
4746
4746
|
content: /* @__PURE__ */ a("span", {
|
|
4747
4747
|
className: "spec-result-tooltip",
|
|
4748
4748
|
children: e
|
|
4749
4749
|
}),
|
|
4750
4750
|
position: "bottom",
|
|
4751
4751
|
openOnFocus: !0,
|
|
4752
|
+
disabled: r,
|
|
4752
4753
|
children: u
|
|
4753
4754
|
}), r && /* @__PURE__ */ a("button", {
|
|
4754
4755
|
type: "button",
|
|
@@ -4764,7 +4765,7 @@ var uc = ({ state: e, specification: t }) => {
|
|
|
4764
4765
|
})
|
|
4765
4766
|
})]
|
|
4766
4767
|
}), /* @__PURE__ */ a("pre", {
|
|
4767
|
-
id:
|
|
4768
|
+
id: l,
|
|
4768
4769
|
className: "spec-result-full",
|
|
4769
4770
|
hidden: !r,
|
|
4770
4771
|
children: e
|
|
@@ -4775,7 +4776,7 @@ var uc = ({ state: e, specification: t }) => {
|
|
|
4775
4776
|
[Ce.CouldNotRun]: "could-not-run",
|
|
4776
4777
|
[Ce.Inconclusive]: "inconclusive",
|
|
4777
4778
|
[Ce.Unavailable]: "could-not-run"
|
|
4778
|
-
}, bc = ({ name: e, description: t, documentation: n, collapsed: r, onToggleCollapse: o, runState: i, runMessage: s, nameNotice:
|
|
4779
|
+
}, bc = ({ name: e, description: t, documentation: n, collapsed: r, onToggleCollapse: o, runState: i, runMessage: s, nameNotice: l, annotations: d, executionLabel: c, onRenamed: u, onDeleted: g, runControl: f }) => {
|
|
4779
4780
|
const { messages: h, readOnly: m } = re(), v = Me(), p = v ? void 0 : u, b = v ? void 0 : g;
|
|
4780
4781
|
return /* @__PURE__ */ x("div", {
|
|
4781
4782
|
className: "event-modeling-grid-specification-outer-row",
|
|
@@ -4820,7 +4821,7 @@ var uc = ({ state: e, specification: t }) => {
|
|
|
4820
4821
|
readOnly: !p
|
|
4821
4822
|
})
|
|
4822
4823
|
}),
|
|
4823
|
-
/* @__PURE__ */ a(Kt, { annotations:
|
|
4824
|
+
/* @__PURE__ */ a(Kt, { annotations: d }),
|
|
4824
4825
|
/* @__PURE__ */ a(gc, {
|
|
4825
4826
|
state: i,
|
|
4826
4827
|
message: s
|
|
@@ -4843,11 +4844,11 @@ var uc = ({ state: e, specification: t }) => {
|
|
|
4843
4844
|
documentation: n
|
|
4844
4845
|
})
|
|
4845
4846
|
}),
|
|
4846
|
-
|
|
4847
|
+
l && /* @__PURE__ */ a("div", {
|
|
4847
4848
|
className: "spec-header-message spec-header-message--name-notice",
|
|
4848
4849
|
role: "status",
|
|
4849
|
-
title:
|
|
4850
|
-
children:
|
|
4850
|
+
title: l,
|
|
4851
|
+
children: l
|
|
4851
4852
|
}),
|
|
4852
4853
|
c && i !== Ce.Idle && i !== Ce.Loading && i !== Ce.Unavailable && /* @__PURE__ */ a("div", {
|
|
4853
4854
|
className: "spec-header-execution",
|
|
@@ -4882,28 +4883,28 @@ var uc = ({ state: e, specification: t }) => {
|
|
|
4882
4883
|
}
|
|
4883
4884
|
}, cn = $e(Sc), to = "when", Cc = 15e3, Hn = (e) => e.given.length + (e.when ? 1 : 0) + e.thenEvents.length + e.thenErrors.length, xc = (e, t) => e || !(t.onGivenContextUsed || t.onGivenContextRemoved || t.onSpecificationAdded || t.onSpecificationRemoved || t.onSpecificationRenamed || t.onSpecificationOpenStateSet || t.onGivenEventAdded || t.onGivenEventValuesSet || t.onGivenReadModelSet || t.onWhenCommandSet || t.onWhenCommandValuesSet || t.onThenEventAdded || t.onThenEventValuesSet || t.onThenErrorAdded || t.onThenRuleErrorAdded || t.onThenErrorRenamed || t.onGivenEventRemoved || t.onGivenReadModelRemoved || t.onGivenReadModelValuesSet || t.onThenEventRemoved || t.onThenReadModelValuesSet || t.onThenErrorRemoved || t.onSpecificationItemOpened), Mc = (e, t, n, r, o) => {
|
|
4884
4885
|
if (n) return t;
|
|
4885
|
-
const i = r ? kc(e, t, o) : e, s = new Map(t.map((
|
|
4886
|
-
const c = s.get(
|
|
4887
|
-
return c && c.givenContexts !==
|
|
4888
|
-
...
|
|
4886
|
+
const i = r ? kc(e, t, o) : e, s = new Map(t.map((d) => [d.id.toString(), d])), l = i.map((d) => {
|
|
4887
|
+
const c = s.get(d.id.toString());
|
|
4888
|
+
return c && c.givenContexts !== d.givenContexts ? {
|
|
4889
|
+
...d,
|
|
4889
4890
|
givenContexts: c.givenContexts
|
|
4890
|
-
} :
|
|
4891
|
+
} : d;
|
|
4891
4892
|
});
|
|
4892
|
-
return
|
|
4893
|
+
return l.some((d, c) => d !== i[c]) ? l : i;
|
|
4893
4894
|
}, kc = (e, t, n = /* @__PURE__ */ new Set()) => {
|
|
4894
|
-
const r = t.filter((
|
|
4895
|
-
const c = o.get(
|
|
4896
|
-
return c && Hn(c) > Hn(
|
|
4897
|
-
}), s = new Set(e.map((
|
|
4898
|
-
return
|
|
4899
|
-
}, Ec = ({ sliceId: e, width: t, collapsed: n, specifications: r, runInfoFor: o, executionLabel: i, nameNoticeFor: s, annotations:
|
|
4900
|
-
const { editing: c, actions: u, messages: g } = re(), f = Me(), [h, m] = D(r), [v, p] = D(!1), [b, y] = D(!1), [w,
|
|
4895
|
+
const r = t.filter((d) => !n.has(d.id.toString())), o = new Map(r.map((d) => [d.id.toString(), d])), i = e.map((d) => {
|
|
4896
|
+
const c = o.get(d.id.toString());
|
|
4897
|
+
return c && Hn(c) > Hn(d) ? c : d;
|
|
4898
|
+
}), s = new Set(e.map((d) => d.id.toString())), l = r.filter((d) => !s.has(d.id.toString()));
|
|
4899
|
+
return l.length || i.some((d, c) => d !== e[c]) ? [...i, ...l] : e;
|
|
4900
|
+
}, Ec = ({ sliceId: e, width: t, collapsed: n, specifications: r, runInfoFor: o, executionLabel: i, nameNoticeFor: s, annotations: l, renderRows: d }) => {
|
|
4901
|
+
const { editing: c, actions: u, messages: g } = re(), f = Me(), [h, m] = D(r), [v, p] = D(!1), [b, y] = D(!1), [w, k] = D(!1), S = ce(wc, []), N = O(0), R = O(!1), C = O(!1), W = O(!1), V = O(/* @__PURE__ */ new Set()), te = xc(f, c), $ = te ? r : h;
|
|
4901
4902
|
ie(() => {
|
|
4902
4903
|
m((T) => Mc(T, r, te, Date.now() <= N.current, V.current));
|
|
4903
4904
|
}, [r, te]);
|
|
4904
4905
|
const z = async () => {
|
|
4905
4906
|
if (R.current || !c.onSpecificationAdded) return;
|
|
4906
|
-
R.current = !0,
|
|
4907
|
+
R.current = !0, k(!0);
|
|
4907
4908
|
const T = {
|
|
4908
4909
|
id: ve.create(),
|
|
4909
4910
|
name: yc($.map((H) => H.name), g.specifications.namePlaceholder),
|
|
@@ -4918,11 +4919,11 @@ var uc = ({ state: e, specification: t }) => {
|
|
|
4918
4919
|
} catch {
|
|
4919
4920
|
m((H) => H.filter((X) => !X.id.equals(T.id)));
|
|
4920
4921
|
} finally {
|
|
4921
|
-
R.current = !1,
|
|
4922
|
+
R.current = !1, k(!1);
|
|
4922
4923
|
}
|
|
4923
4924
|
}, I = (T) => {
|
|
4924
4925
|
V.current.has(T.toString()) || (V.current.add(T.toString()), N.current = 0, m((H) => H.filter((X) => !X.id.equals(T))), c.onSpecificationRemoved?.(e, T));
|
|
4925
|
-
},
|
|
4926
|
+
}, M = (T, H) => {
|
|
4926
4927
|
m((X) => X.map((oe) => oe.id.equals(T) ? {
|
|
4927
4928
|
...oe,
|
|
4928
4929
|
name: H
|
|
@@ -4983,20 +4984,20 @@ var uc = ({ state: e, specification: t }) => {
|
|
|
4983
4984
|
documentation: T.documentation,
|
|
4984
4985
|
collapsed: T.collapsed,
|
|
4985
4986
|
onToggleCollapse: c.onSpecificationOpenStateSet ? () => B(T.id, T.collapsed) : void 0,
|
|
4986
|
-
onRenamed: c.onSpecificationRenamed ? (oe) =>
|
|
4987
|
+
onRenamed: c.onSpecificationRenamed ? (oe) => M(T.id, oe) : void 0,
|
|
4987
4988
|
onDeleted: c.onSpecificationRemoved ? () => I(T.id) : void 0,
|
|
4988
4989
|
runState: H,
|
|
4989
4990
|
runMessage: X,
|
|
4990
4991
|
executionLabel: i,
|
|
4991
4992
|
nameNotice: s?.(T),
|
|
4992
|
-
annotations: (
|
|
4993
|
+
annotations: (l ?? []).filter((oe) => !oe.specificationStep && oe.specificationId?.toString().toLowerCase() === T.id.toString().toLowerCase()),
|
|
4993
4994
|
runControl: /* @__PURE__ */ a(uc, {
|
|
4994
4995
|
state: H,
|
|
4995
4996
|
specification: T
|
|
4996
4997
|
})
|
|
4997
4998
|
}), !T.collapsed && /* @__PURE__ */ a(cn.Provider, {
|
|
4998
4999
|
value: S,
|
|
4999
|
-
children:
|
|
5000
|
+
children: d(T)
|
|
5000
5001
|
})]
|
|
5001
5002
|
}, `${T.id.toString()}:${Hn(T)}`);
|
|
5002
5003
|
}),
|
|
@@ -5087,13 +5088,13 @@ function Lc(e, t) {
|
|
|
5087
5088
|
lines: [e]
|
|
5088
5089
|
});
|
|
5089
5090
|
return Pt(() => {
|
|
5090
|
-
const
|
|
5091
|
-
if (!
|
|
5092
|
-
const c = (u, g) => (
|
|
5091
|
+
const l = n.current, d = Ac();
|
|
5092
|
+
if (!l || !d) return;
|
|
5093
|
+
const c = (u, g) => (d.font = `${t.fontWeight} ${g}px ${t.fontFamily}`, d.measureText(u).width);
|
|
5093
5094
|
s(Oc(e, {
|
|
5094
5095
|
maxFontSizePx: r,
|
|
5095
5096
|
minFontSizePx: o,
|
|
5096
|
-
availableWidthPx:
|
|
5097
|
+
availableWidthPx: l.clientWidth
|
|
5097
5098
|
}, c));
|
|
5098
5099
|
}, [
|
|
5099
5100
|
e,
|
|
@@ -5103,7 +5104,7 @@ function Lc(e, t) {
|
|
|
5103
5104
|
t.fontFamily
|
|
5104
5105
|
]), [n, i];
|
|
5105
5106
|
}
|
|
5106
|
-
var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backgroundColor: t, textColor: n, isSelected: r = !1, disabled: o = !1, onSelected: i, onStartEdit: s, extraContent:
|
|
5107
|
+
var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backgroundColor: t, textColor: n, isSelected: r = !1, disabled: o = !1, onSelected: i, onStartEdit: s, extraContent: l, children: d, ariaLabel: c, ariaPressed: u, "data-event-id": g, "data-card-id": f, "data-slice-id": h }) => {
|
|
5107
5108
|
const m = O(null), v = !!(i ?? s) || o, p = Xn(Ee().textSize), [b, y] = Lc(e, {
|
|
5108
5109
|
fontFamily: Pc,
|
|
5109
5110
|
fontWeight: "bold",
|
|
@@ -5121,7 +5122,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5121
5122
|
m.current = setTimeout(() => {
|
|
5122
5123
|
m.current = null, i?.();
|
|
5123
5124
|
}, Tc);
|
|
5124
|
-
}, [i]),
|
|
5125
|
+
}, [i]), k = j((R) => {
|
|
5125
5126
|
R.stopPropagation(), m.current && (clearTimeout(m.current), m.current = null), s?.();
|
|
5126
5127
|
}, [s]), S = r ? {
|
|
5127
5128
|
outline: `2px solid ${t}`,
|
|
@@ -5140,14 +5141,14 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5140
5141
|
className: "event-modeling-card__title-line",
|
|
5141
5142
|
children: R
|
|
5142
5143
|
}, C)) : y.lines[0]
|
|
5143
|
-
}),
|
|
5144
|
-
}),
|
|
5144
|
+
}), l]
|
|
5145
|
+
}), d] });
|
|
5145
5146
|
return v ? /* @__PURE__ */ a("button", {
|
|
5146
5147
|
className: "event-modeling-card",
|
|
5147
5148
|
style: S,
|
|
5148
5149
|
disabled: o,
|
|
5149
5150
|
onClick: w,
|
|
5150
|
-
onDoubleClick:
|
|
5151
|
+
onDoubleClick: k,
|
|
5151
5152
|
"aria-label": c,
|
|
5152
5153
|
"aria-pressed": u,
|
|
5153
5154
|
"data-event-id": g,
|
|
@@ -5197,14 +5198,14 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5197
5198
|
}, zn = (e, t) => {
|
|
5198
5199
|
let n = t;
|
|
5199
5200
|
if (t.properties) {
|
|
5200
|
-
const r = e?.properties ?? {}, o = Object.keys(t.properties), i = $c(Object.keys(r), o), s = o.filter((c) => !(c in r) && !i.has(c)),
|
|
5201
|
+
const r = e?.properties ?? {}, o = Object.keys(t.properties), i = $c(Object.keys(r), o), s = o.filter((c) => !(c in r) && !i.has(c)), l = Object.fromEntries(o.map((c) => {
|
|
5201
5202
|
const u = r[i.get(c) ?? c];
|
|
5202
5203
|
return [c, zn(u, t.properties[c])];
|
|
5203
|
-
})),
|
|
5204
|
+
})), d = [.../* @__PURE__ */ new Set([...t.required ?? [], ...s])];
|
|
5204
5205
|
n = {
|
|
5205
5206
|
...n,
|
|
5206
|
-
properties:
|
|
5207
|
-
...
|
|
5207
|
+
properties: l,
|
|
5208
|
+
...d.length > 0 ? { required: d } : {}
|
|
5208
5209
|
};
|
|
5209
5210
|
}
|
|
5210
5211
|
return t.items && (n = {
|
|
@@ -5223,7 +5224,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5223
5224
|
...t,
|
|
5224
5225
|
onChange: (o, ...i) => r(_c(n, o), ...i)
|
|
5225
5226
|
};
|
|
5226
|
-
}, Fc = ({ name: e, kind: t, editor: n, targetLabel: r = "Target", headerLeading: o, headerActions: i, headerStyle: s, onHeaderClick:
|
|
5227
|
+
}, Fc = ({ name: e, kind: t, editor: n, targetLabel: r = "Target", headerLeading: o, headerActions: i, headerStyle: s, onHeaderClick: l, rootDropTarget: d, beforeProperties: c, afterCard: u }) => /* @__PURE__ */ x("div", {
|
|
5227
5228
|
className: "read-model-panel",
|
|
5228
5229
|
children: [
|
|
5229
5230
|
r && /* @__PURE__ */ a("p", {
|
|
@@ -5239,9 +5240,9 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5239
5240
|
background: ro[t].background,
|
|
5240
5241
|
...s
|
|
5241
5242
|
},
|
|
5242
|
-
"data-drop-target":
|
|
5243
|
+
"data-drop-target": d ? "root" : void 0,
|
|
5243
5244
|
onClick: (g) => {
|
|
5244
|
-
g.stopPropagation(),
|
|
5245
|
+
g.stopPropagation(), l?.();
|
|
5245
5246
|
},
|
|
5246
5247
|
children: [
|
|
5247
5248
|
o ?? /* @__PURE__ */ a("div", { className: "read-model-card__connector" }),
|
|
@@ -5278,7 +5279,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5278
5279
|
initialFocus: pa.Content,
|
|
5279
5280
|
className: "property-schema-dialog",
|
|
5280
5281
|
children: n
|
|
5281
|
-
}), Hc = ({ name: e, kind: t, schema: n, sourceRect: r, onSchemaChange: o, onClose: i, labels: s, targetLabel:
|
|
5282
|
+
}), Hc = ({ name: e, kind: t, schema: n, sourceRect: r, onSchemaChange: o, onClose: i, labels: s, targetLabel: l, frame: d = Bc, renderContent: c }) => /* @__PURE__ */ a(d, {
|
|
5282
5283
|
name: e,
|
|
5283
5284
|
kind: t,
|
|
5284
5285
|
sourceRect: r,
|
|
@@ -5286,7 +5287,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5286
5287
|
children: c ? c(o) : /* @__PURE__ */ a(Fc, {
|
|
5287
5288
|
name: e,
|
|
5288
5289
|
kind: t,
|
|
5289
|
-
targetLabel:
|
|
5290
|
+
targetLabel: l,
|
|
5290
5291
|
editor: {
|
|
5291
5292
|
schema: n ?? {
|
|
5292
5293
|
type: "object",
|
|
@@ -5446,15 +5447,15 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5446
5447
|
const { readOnly: e } = re();
|
|
5447
5448
|
return Oe($i) ?? { readOnly: e };
|
|
5448
5449
|
}, Me = () => Qe().readOnly, Uc = (e, t, n, r) => {
|
|
5449
|
-
const { editing: o, messages: i } = re(), { sliceId: s, readOnly:
|
|
5450
|
+
const { editing: o, messages: i } = re(), { sliceId: s, readOnly: l } = Qe(), [d, c] = D(), u = l ? void 0 : Wc(o, e, s, t);
|
|
5450
5451
|
return {
|
|
5451
5452
|
schema: r,
|
|
5452
5453
|
onActivate: u ? (g, f) => c(f) : void 0,
|
|
5453
|
-
overlay:
|
|
5454
|
+
overlay: d && u ? /* @__PURE__ */ a(Hc, {
|
|
5454
5455
|
name: n,
|
|
5455
5456
|
kind: e,
|
|
5456
5457
|
schema: Zo(r),
|
|
5457
|
-
sourceRect:
|
|
5458
|
+
sourceRect: d,
|
|
5458
5459
|
onSchemaChange: u,
|
|
5459
5460
|
onClose: () => c(void 0),
|
|
5460
5461
|
targetLabel: i.propertyEditor?.target,
|
|
@@ -5521,8 +5522,8 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5521
5522
|
fontSize: 11,
|
|
5522
5523
|
opacity: 0.8,
|
|
5523
5524
|
marginTop: 4
|
|
5524
|
-
}, pr = ({ kind: e, artifactId: t, summary: n, description: r, tags: o, marker: i, schema: s, showDetails:
|
|
5525
|
-
const f = Me(), h = ze(t), m = be(), v = Uc(e, t, g.name, s), p = c ?? v.onActivate, b = O(null), y = () => b.current?.getBoundingClientRect() ?? new DOMRect(), w = f ? [] :
|
|
5525
|
+
}, pr = ({ kind: e, artifactId: t, summary: n, description: r, tags: o, marker: i, schema: s, showDetails: l = !1, actions: d = [], onActivate: c, onSelected: u, ...g }) => {
|
|
5526
|
+
const f = Me(), h = ze(t), m = be(), v = Uc(e, t, g.name, s), p = c ?? v.onActivate, b = O(null), y = () => b.current?.getBoundingClientRect() ?? new DOMRect(), w = f ? [] : d.filter((N) => !N.when || !!t && N.when(t)), k = (N) => w.filter((R) => (R.corner ?? Yc.end) === N), S = /* @__PURE__ */ x("div", {
|
|
5526
5527
|
ref: b,
|
|
5527
5528
|
className: h ? "event-model-change-frame event-model-change-name" : void 0,
|
|
5528
5529
|
"data-board-change": h,
|
|
@@ -5546,7 +5547,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5546
5547
|
style: su,
|
|
5547
5548
|
children: n
|
|
5548
5549
|
}),
|
|
5549
|
-
|
|
5550
|
+
l && /* @__PURE__ */ a(wt, {
|
|
5550
5551
|
title: g.name,
|
|
5551
5552
|
schema: v.schema,
|
|
5552
5553
|
showTitle: !1,
|
|
@@ -5567,7 +5568,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5567
5568
|
return e === le.event && w.length === 0 ? S : /* @__PURE__ */ x("div", {
|
|
5568
5569
|
className: iu[e],
|
|
5569
5570
|
"data-artifact-kind": e,
|
|
5570
|
-
children: [S, Kc.flatMap((N) =>
|
|
5571
|
+
children: [S, Kc.flatMap((N) => k(N).map((R, C) => /* @__PURE__ */ a(ru, {
|
|
5571
5572
|
action: R,
|
|
5572
5573
|
corner: N,
|
|
5573
5574
|
slot: C,
|
|
@@ -5590,12 +5591,12 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5590
5591
|
children: /* @__PURE__ */ a("input", {
|
|
5591
5592
|
autoFocus: !0,
|
|
5592
5593
|
value: e,
|
|
5593
|
-
onChange: (
|
|
5594
|
+
onChange: (l) => o(l.target.value),
|
|
5594
5595
|
onBlur: i,
|
|
5595
|
-
onKeyDown: (
|
|
5596
|
-
|
|
5596
|
+
onKeyDown: (l) => {
|
|
5597
|
+
l.key === "Enter" && i(), l.key === "Escape" && s();
|
|
5597
5598
|
},
|
|
5598
|
-
onClick: (
|
|
5599
|
+
onClick: (l) => l.stopPropagation(),
|
|
5599
5600
|
title: r,
|
|
5600
5601
|
style: {
|
|
5601
5602
|
border: r ? "2px solid #f87171" : "none",
|
|
@@ -5611,11 +5612,11 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5611
5612
|
textAlign: "center"
|
|
5612
5613
|
}
|
|
5613
5614
|
})
|
|
5614
|
-
}), lu = 5, mn = ({ options: e, nameOf: t, color: n, searchPlaceholder: r, emptyLabel: o, onSelect: i, footer: s, trigger:
|
|
5615
|
-
const [
|
|
5615
|
+
}), lu = 5, mn = ({ options: e, nameOf: t, color: n, searchPlaceholder: r, emptyLabel: o, onSelect: i, footer: s, trigger: l }) => {
|
|
5616
|
+
const [d, c] = D(!1), [u, g] = D(""), f = O(null), h = O(null), m = e.length > lu, v = () => {
|
|
5616
5617
|
c(!1), g("");
|
|
5617
5618
|
}, p = ce(() => [f, h], []);
|
|
5618
|
-
bt(p, v,
|
|
5619
|
+
bt(p, v, d);
|
|
5619
5620
|
const b = u ? e.filter((w) => t(w).toLowerCase().includes(u.toLowerCase())) : e, y = (w) => {
|
|
5620
5621
|
i(w), v();
|
|
5621
5622
|
};
|
|
@@ -5623,12 +5624,12 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5623
5624
|
ref: f,
|
|
5624
5625
|
className: "event-modeling-grid-event-picker",
|
|
5625
5626
|
style: { position: "relative" },
|
|
5626
|
-
children: [
|
|
5627
|
-
open:
|
|
5627
|
+
children: [l({
|
|
5628
|
+
open: d,
|
|
5628
5629
|
toggle: () => c((w) => !w)
|
|
5629
5630
|
}), /* @__PURE__ */ a(rn, {
|
|
5630
5631
|
anchorRef: f,
|
|
5631
|
-
open:
|
|
5632
|
+
open: d,
|
|
5632
5633
|
side: "above",
|
|
5633
5634
|
align: "right",
|
|
5634
5635
|
gap: 4,
|
|
@@ -5645,12 +5646,12 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5645
5646
|
}), /* @__PURE__ */ x("ul", {
|
|
5646
5647
|
className: "event-modeling-grid-event-picker-list",
|
|
5647
5648
|
children: [
|
|
5648
|
-
b.map((w,
|
|
5649
|
+
b.map((w, k) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a("button", {
|
|
5649
5650
|
className: "event-modeling-grid-event-picker-item",
|
|
5650
5651
|
style: { borderLeft: `3px solid ${n}` },
|
|
5651
5652
|
onClick: () => y(w),
|
|
5652
5653
|
children: t(w)
|
|
5653
|
-
}) }, `${
|
|
5654
|
+
}) }, `${k}-${t(w)}`)),
|
|
5654
5655
|
b.length === 0 && o && /* @__PURE__ */ a("li", {
|
|
5655
5656
|
className: "event-modeling-grid-event-picker-empty",
|
|
5656
5657
|
children: o
|
|
@@ -5668,7 +5669,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5668
5669
|
searchPlaceholder: o,
|
|
5669
5670
|
emptyLabel: i,
|
|
5670
5671
|
onSelect: n,
|
|
5671
|
-
trigger: ({ toggle:
|
|
5672
|
+
trigger: ({ toggle: l }) => s !== void 0 ? /* @__PURE__ */ x("div", {
|
|
5672
5673
|
className: "event-modeling-grid-optional-event-reference",
|
|
5673
5674
|
children: [/* @__PURE__ */ a("div", {
|
|
5674
5675
|
className: "event-modeling-grid-optional-event-reference__card",
|
|
@@ -5678,8 +5679,8 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5678
5679
|
className: "event-modeling-grid-optional-event-reference__define-btn",
|
|
5679
5680
|
"aria-label": r,
|
|
5680
5681
|
title: r,
|
|
5681
|
-
onClick: (
|
|
5682
|
-
|
|
5682
|
+
onClick: (d) => {
|
|
5683
|
+
d.stopPropagation(), l();
|
|
5683
5684
|
},
|
|
5684
5685
|
children: /* @__PURE__ */ a("i", { className: "pi pi-plus" })
|
|
5685
5686
|
})]
|
|
@@ -5687,31 +5688,31 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5687
5688
|
content: r,
|
|
5688
5689
|
position: "top",
|
|
5689
5690
|
children: /* @__PURE__ */ a("button", {
|
|
5690
|
-
onClick:
|
|
5691
|
+
onClick: l,
|
|
5691
5692
|
className: "event-modeling-grid-add-button--small",
|
|
5692
5693
|
"aria-label": r,
|
|
5693
5694
|
children: "+"
|
|
5694
5695
|
})
|
|
5695
5696
|
})
|
|
5696
5697
|
}), Di = (e) => Object.fromEntries(e.map((t) => [t.id.toString(), t.values])), du = { borderLeft: `3px solid ${rt.background}` }, cu = { borderLeft: `3px solid ${He.background}` }, fr = ({ options: e, nameOf: t, onChosen: n, errors: r = [], statements: o = [], groups: i = [] }) => {
|
|
5697
|
-
const s = be().specifications,
|
|
5698
|
+
const s = be().specifications, l = i.filter((d) => d.options.length > 0);
|
|
5698
5699
|
return /* @__PURE__ */ a(mn, {
|
|
5699
5700
|
options: e,
|
|
5700
5701
|
nameOf: t,
|
|
5701
5702
|
color: ke.background,
|
|
5702
5703
|
searchPlaceholder: s.search,
|
|
5703
|
-
emptyLabel: e.length === 0 && (
|
|
5704
|
+
emptyLabel: e.length === 0 && (l.length > 0 || r.length > 0 || o.length > 0) ? "" : s.noItems,
|
|
5704
5705
|
onSelect: n,
|
|
5705
|
-
footer: (
|
|
5706
|
+
footer: (d) => /* @__PURE__ */ x(ne, { children: [
|
|
5706
5707
|
o.length > 0 && /* @__PURE__ */ a("li", { className: "event-modeling-grid-event-picker-separator" }),
|
|
5707
5708
|
o.map((c, u) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a("button", {
|
|
5708
5709
|
className: "event-modeling-grid-event-picker-item",
|
|
5709
5710
|
onClick: () => {
|
|
5710
|
-
c.onChosen(),
|
|
5711
|
+
c.onChosen(), d();
|
|
5711
5712
|
},
|
|
5712
5713
|
children: c.label
|
|
5713
5714
|
}) }, u)),
|
|
5714
|
-
|
|
5715
|
+
l.map((c) => /* @__PURE__ */ x(No.Fragment, { children: [
|
|
5715
5716
|
/* @__PURE__ */ a("li", { className: "event-modeling-grid-event-picker-separator" }),
|
|
5716
5717
|
/* @__PURE__ */ a("li", {
|
|
5717
5718
|
className: "event-modeling-grid-event-picker-empty",
|
|
@@ -5721,7 +5722,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5721
5722
|
className: "event-modeling-grid-event-picker-item",
|
|
5722
5723
|
style: cu,
|
|
5723
5724
|
onClick: () => {
|
|
5724
|
-
u.onChosen(),
|
|
5725
|
+
u.onChosen(), d();
|
|
5725
5726
|
},
|
|
5726
5727
|
children: u.label
|
|
5727
5728
|
}) }, g))
|
|
@@ -5731,16 +5732,16 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5731
5732
|
className: "event-modeling-grid-event-picker-item",
|
|
5732
5733
|
style: du,
|
|
5733
5734
|
onClick: () => {
|
|
5734
|
-
c.onChosen(),
|
|
5735
|
+
c.onChosen(), d();
|
|
5735
5736
|
},
|
|
5736
5737
|
children: c.label
|
|
5737
5738
|
}) }, u))
|
|
5738
5739
|
] }),
|
|
5739
|
-
trigger: ({ toggle:
|
|
5740
|
+
trigger: ({ toggle: d }) => /* @__PURE__ */ a(fe, {
|
|
5740
5741
|
content: s.addItem,
|
|
5741
5742
|
position: "top",
|
|
5742
5743
|
children: /* @__PURE__ */ a("button", {
|
|
5743
|
-
onClick:
|
|
5744
|
+
onClick: d,
|
|
5744
5745
|
className: "event-modeling-grid-add-button--small",
|
|
5745
5746
|
"aria-label": s.addItem,
|
|
5746
5747
|
children: "+"
|
|
@@ -5755,7 +5756,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5755
5756
|
].filter((r) => r !== void 0);
|
|
5756
5757
|
return n.length === 0 ? void 0 : `${t.caller}: ${n.join(" · ")}`;
|
|
5757
5758
|
}, Bi = ({ title: e, values: t, caller: n, message: r }) => {
|
|
5758
|
-
const { messages: o } = re(), i = o.specifications.values ?? It, s = Object.entries(t ?? {}),
|
|
5759
|
+
const { messages: o } = re(), i = o.specifications.values ?? It, s = Object.entries(t ?? {}), l = n ? Fi(n, i) : void 0;
|
|
5759
5760
|
return /* @__PURE__ */ x("div", {
|
|
5760
5761
|
className: "event-modeling-spec-details",
|
|
5761
5762
|
children: [
|
|
@@ -5769,26 +5770,26 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5769
5770
|
}),
|
|
5770
5771
|
s.length > 0 && /* @__PURE__ */ a("dl", {
|
|
5771
5772
|
className: "event-modeling-spec-details__list",
|
|
5772
|
-
children: s.map(([
|
|
5773
|
+
children: s.map(([d, c]) => /* @__PURE__ */ x("div", {
|
|
5773
5774
|
className: "event-modeling-spec-details__item",
|
|
5774
|
-
children: [/* @__PURE__ */ a("dt", { children:
|
|
5775
|
-
},
|
|
5775
|
+
children: [/* @__PURE__ */ a("dt", { children: d }), /* @__PURE__ */ a("dd", { children: uu(c) })]
|
|
5776
|
+
}, d))
|
|
5776
5777
|
}),
|
|
5777
|
-
|
|
5778
|
+
l && /* @__PURE__ */ a("div", {
|
|
5778
5779
|
className: "event-modeling-spec-details__caller",
|
|
5779
|
-
children:
|
|
5780
|
+
children: l
|
|
5780
5781
|
})
|
|
5781
5782
|
]
|
|
5782
5783
|
});
|
|
5783
5784
|
}, mu = (e, t, n) => Object.keys(e ?? {}).length > 0 || !!n || !!t && Fi(t, It) !== void 0, _e = ({ name: e, colors: t, onOpen: n, values: r, caller: o, message: i }) => {
|
|
5784
|
-
const s = Me(),
|
|
5785
|
-
ref:
|
|
5785
|
+
const s = Me(), l = O(null), d = !s && !!n, c = /* @__PURE__ */ a("div", {
|
|
5786
|
+
ref: l,
|
|
5786
5787
|
children: /* @__PURE__ */ a(dt, {
|
|
5787
5788
|
name: e,
|
|
5788
5789
|
backgroundColor: t.background,
|
|
5789
5790
|
textColor: t.text,
|
|
5790
|
-
onSelected:
|
|
5791
|
-
const u =
|
|
5791
|
+
onSelected: d ? () => {
|
|
5792
|
+
const u = l.current?.getBoundingClientRect();
|
|
5792
5793
|
u && n?.(u);
|
|
5793
5794
|
} : void 0
|
|
5794
5795
|
})
|
|
@@ -5888,7 +5889,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5888
5889
|
const r = e === F.stateChange ? vn.events : e === F.stateView ? vn.readModel : void 0;
|
|
5889
5890
|
return r === void 0 || r === vn.readModel && (t.givenReadModel || t.givenContexts?.length) ? [] : n.filter((o) => o.kind === r && !t.givenContexts?.some((i) => i.givenContextId.equals(o.givenContextId)));
|
|
5890
5891
|
}, yu = ({ sliceId: e, sliceType: t, specification: n, contexts: r }) => {
|
|
5891
|
-
const { editing: o, messages: i, navigation: s } = re(),
|
|
5892
|
+
const { editing: o, messages: i, navigation: s } = re(), l = Me(), [d, c] = D(!1), u = O(!1), [g, f] = D({
|
|
5892
5893
|
added: [],
|
|
5893
5894
|
removed: /* @__PURE__ */ new Set()
|
|
5894
5895
|
}), h = n.givenContexts ?? [], m = hu(g, h);
|
|
@@ -5902,14 +5903,14 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5902
5903
|
return {
|
|
5903
5904
|
used: v,
|
|
5904
5905
|
offered: b,
|
|
5905
|
-
busy:
|
|
5906
|
-
execute: async (w,
|
|
5907
|
-
const S =
|
|
5908
|
-
if (!(
|
|
5906
|
+
busy: d,
|
|
5907
|
+
execute: async (w, k) => {
|
|
5908
|
+
const S = k ? o.onGivenContextRemoved : o.onGivenContextUsed;
|
|
5909
|
+
if (!(l || !S || u.current || k && p.has(w.givenContextId.toString()))) {
|
|
5909
5910
|
u.current = !0, c(!0);
|
|
5910
5911
|
try {
|
|
5911
5912
|
if (!await S(e, n.id, w.givenContextId)) return;
|
|
5912
|
-
f((N) => fu(N, w,
|
|
5913
|
+
f((N) => fu(N, w, k));
|
|
5913
5914
|
} finally {
|
|
5914
5915
|
u.current = !1, c(!1);
|
|
5915
5916
|
}
|
|
@@ -5917,7 +5918,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5917
5918
|
},
|
|
5918
5919
|
editing: o,
|
|
5919
5920
|
messages: i,
|
|
5920
|
-
readOnly:
|
|
5921
|
+
readOnly: l,
|
|
5921
5922
|
pendingAdded: p,
|
|
5922
5923
|
navigation: s
|
|
5923
5924
|
};
|
|
@@ -5929,25 +5930,25 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5929
5930
|
remove: "Remove context",
|
|
5930
5931
|
saving: "Saving…"
|
|
5931
5932
|
}, wu = ({ sliceType: e, specification: t, contexts: n, state: r, labels: o = Ut }) => {
|
|
5932
|
-
const { used: i, offered: s, busy:
|
|
5933
|
-
return g || n === void 0 || s.length === 0 && !
|
|
5933
|
+
const { used: i, offered: s, busy: l, execute: d, editing: c, messages: u, readOnly: g } = r;
|
|
5934
|
+
return g || n === void 0 || s.length === 0 && !l || !c.onGivenContextUsed || e !== F.stateChange && e !== F.stateView ? null : /* @__PURE__ */ a(mn, {
|
|
5934
5935
|
options: s,
|
|
5935
5936
|
nameOf: (f) => f.name ?? "",
|
|
5936
5937
|
color: ke.background,
|
|
5937
5938
|
searchPlaceholder: u.specifications.search,
|
|
5938
5939
|
emptyLabel: u.specifications.noItems,
|
|
5939
5940
|
onSelect: (f) => {
|
|
5940
|
-
|
|
5941
|
+
d(f, !1);
|
|
5941
5942
|
},
|
|
5942
5943
|
trigger: ({ toggle: f }) => /* @__PURE__ */ a(fe, {
|
|
5943
|
-
content:
|
|
5944
|
+
content: l ? o.saving : o.use,
|
|
5944
5945
|
position: "top",
|
|
5945
5946
|
children: /* @__PURE__ */ a("button", {
|
|
5946
5947
|
type: "button",
|
|
5947
5948
|
className: "event-modeling-grid-add-button--small use-given-context-button",
|
|
5948
5949
|
"aria-label": o.use,
|
|
5949
|
-
"aria-busy":
|
|
5950
|
-
disabled:
|
|
5950
|
+
"aria-busy": l || void 0,
|
|
5951
|
+
disabled: l || e === F.stateView && (!!t.givenReadModel || i.length > 0),
|
|
5951
5952
|
onClick: f,
|
|
5952
5953
|
children: /* @__PURE__ */ a("i", {
|
|
5953
5954
|
className: e === F.stateView ? "pi pi-database" : "pi pi-list",
|
|
@@ -5957,7 +5958,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5957
5958
|
})
|
|
5958
5959
|
});
|
|
5959
5960
|
}, Su = ({ state: e, labels: t = Ut }) => {
|
|
5960
|
-
const { used: n, busy: r, execute: o, editing: i, readOnly: s, pendingAdded:
|
|
5961
|
+
const { used: n, busy: r, execute: o, editing: i, readOnly: s, pendingAdded: l, navigation: d } = e, c = d.onNavigateToGivenContext;
|
|
5961
5962
|
return n.length === 0 ? null : /* @__PURE__ */ a("div", {
|
|
5962
5963
|
className: "spec-contexts",
|
|
5963
5964
|
children: n.map((u) => /* @__PURE__ */ x("span", {
|
|
@@ -5976,7 +5977,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5976
5977
|
children: u.name
|
|
5977
5978
|
}) : u.name ?? t.loading, !s && i.onGivenContextRemoved && /* @__PURE__ */ a("button", {
|
|
5978
5979
|
type: "button",
|
|
5979
|
-
disabled: r ||
|
|
5980
|
+
disabled: r || l.has(u.givenContextId.toString()),
|
|
5980
5981
|
"aria-label": `${t.remove} ${u.name ?? t.missing}`,
|
|
5981
5982
|
onClick: () => {
|
|
5982
5983
|
o(u, !0);
|
|
@@ -5985,8 +5986,8 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5985
5986
|
})]
|
|
5986
5987
|
}, u.givenContextId.toString()))
|
|
5987
5988
|
});
|
|
5988
|
-
}, Cu = ({ sliceId: e, sliceType: t, specification: n, events: r, readModel: o, additionalReadModels: i = [], renamedReadModelName: s, contexts:
|
|
5989
|
-
const { editing: c, messages: u } = re(), g = Me(), { onGivenEventAdded: f, onGivenEventValuesSet: h, onGivenReadModelSet: m, onGivenReadModelValuesSet: v, onGivenEventRemoved: p, onGivenReadModelRemoved: b, onSpecificationItemOpened: y } = c, [w,
|
|
5989
|
+
}, Cu = ({ sliceId: e, sliceType: t, specification: n, events: r, readModel: o, additionalReadModels: i = [], renamedReadModelName: s, contexts: l, contextLabels: d }) => {
|
|
5990
|
+
const { editing: c, messages: u } = re(), g = Me(), { onGivenEventAdded: f, onGivenEventValuesSet: h, onGivenReadModelSet: m, onGivenReadModelValuesSet: v, onGivenEventRemoved: p, onGivenReadModelRemoved: b, onSpecificationItemOpened: y } = c, [w, k] = D(n.given), [S, N] = D(n.givenReadModel), R = Oe(cn), [C, W] = D(() => ({
|
|
5990
5991
|
...Di(n.given),
|
|
5991
5992
|
...n.givenReadModel ? { [n.givenReadModel.id.toString()]: n.givenReadModel.values ?? {} } : {},
|
|
5992
5993
|
...R.recall(n.id.toString())
|
|
@@ -5997,8 +5998,8 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
5997
5998
|
...n,
|
|
5998
5999
|
givenReadModel: $ ?? n.givenReadModel
|
|
5999
6000
|
},
|
|
6000
|
-
contexts:
|
|
6001
|
-
}), I = [...o ? [o] : [], ...i],
|
|
6001
|
+
contexts: l
|
|
6002
|
+
}), I = [...o ? [o] : [], ...i], M = I.find((Y) => Y.id.equals($?.readModelItemId ?? ve.empty)), B = O(null), L = ce(() => gu(r), [r]), A = ce(() => new Map(L.map((Y) => [Y.id.toString(), Y])), [L]), G = (Y, me, Ie, je, qe, Ve) => y?.({
|
|
6002
6003
|
sliceId: e,
|
|
6003
6004
|
specificationId: n.id,
|
|
6004
6005
|
itemId: Y,
|
|
@@ -6015,7 +6016,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6015
6016
|
}
|
|
6016
6017
|
}), _ = (Y) => {
|
|
6017
6018
|
const me = ve.create();
|
|
6018
|
-
|
|
6019
|
+
k((Ie) => [...Ie, {
|
|
6019
6020
|
id: me,
|
|
6020
6021
|
eventId: Y.id,
|
|
6021
6022
|
name: Y.name,
|
|
@@ -6029,17 +6030,17 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6029
6030
|
values: me
|
|
6030
6031
|
}), m?.(e, n.id, Y.id, Y.name), v?.(e, n.id, me);
|
|
6031
6032
|
}, K = (Y, me) => G(Y.id, at.readModel, Y.name, me, Y.schema, U(Y)), T = (Y) => {
|
|
6032
|
-
|
|
6033
|
+
k((me) => me.filter((Ie) => !Ie.id.equals(Y))), p?.(e, n.id, Y);
|
|
6033
6034
|
}, H = () => {
|
|
6034
6035
|
N(void 0), b?.(e, n.id);
|
|
6035
|
-
}, X = (Y) => (me) => h?.(e, n.id, Y, me), oe = !g && t === F.stateChange && !!f, P = !g && I.length > 0 && !!m && !!y && !z.busy && !(t === F.stateView && z.used.length > 0) && vu(!0, !!$), E = $ && (
|
|
6036
|
+
}, X = (Y) => (me) => h?.(e, n.id, Y, me), oe = !g && t === F.stateChange && !!f, P = !g && I.length > 0 && !!m && !!y && !z.busy && !(t === F.stateView && z.used.length > 0) && vu(!0, !!$), E = $ && (M?.id.equals(o?.id ?? ve.empty) ? s ?? M.name : M?.name ?? $.name), q = $?.id ?? $?.readModelItemId, ue = $ && q && E !== void 0 && /* @__PURE__ */ a(Xe, {
|
|
6036
6037
|
name: E,
|
|
6037
6038
|
onRemoved: b ? H : void 0,
|
|
6038
6039
|
children: /* @__PURE__ */ a(_e, {
|
|
6039
6040
|
name: E,
|
|
6040
6041
|
colors: He,
|
|
6041
6042
|
values: V ? $.values : C[q.toString()] ?? $.values,
|
|
6042
|
-
onOpen: !g && y && m &&
|
|
6043
|
+
onOpen: !g && y && m && M ? (Y) => G(q, at.readModel, E, Y, M.schema, U(M)) : void 0
|
|
6043
6044
|
})
|
|
6044
6045
|
}, q.toString()), Se = te.map((Y) => {
|
|
6045
6046
|
const me = A.get(Y.eventId.toString())?.name ?? Y.name;
|
|
@@ -6057,8 +6058,8 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6057
6058
|
sliceId: e,
|
|
6058
6059
|
sliceType: t,
|
|
6059
6060
|
specification: n,
|
|
6060
|
-
contexts:
|
|
6061
|
-
labels:
|
|
6061
|
+
contexts: l,
|
|
6062
|
+
labels: d,
|
|
6062
6063
|
state: z
|
|
6063
6064
|
};
|
|
6064
6065
|
return /* @__PURE__ */ x(Et, {
|
|
@@ -6123,7 +6124,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6123
6124
|
if (t?.type === Te.timer) return [];
|
|
6124
6125
|
if (t?.type === Te.event && t.eventId) {
|
|
6125
6126
|
const i = t.eventId;
|
|
6126
|
-
return e.filter((s) => s.eventId.equals(i) || o.some((
|
|
6127
|
+
return e.filter((s) => s.eventId.equals(i) || o.some((l) => l.id.equals(s.eventId) && ao(l.sourceEventId, i)));
|
|
6127
6128
|
}
|
|
6128
6129
|
return t?.type === Te.custom && o.length === 0 ? [] : e.filter((i) => o.some((s) => s.id.equals(i.eventId) || ao(s.sourceEventId, i.eventId) || s.name === i.name));
|
|
6129
6130
|
}, so = "when-event", jn = (e) => e ? JSON.stringify([
|
|
@@ -6140,10 +6141,10 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6140
6141
|
values: t.values,
|
|
6141
6142
|
...e?.eventSourceId ? { eventSourceId: e.eventSourceId } : {}
|
|
6142
6143
|
};
|
|
6143
|
-
}, ku = (e, t) => t || Object.keys(e).length > 0, Eu = ({ sliceId: e, sliceType: t, specification: n, command: r, renamedCommandName: o, events: i = [], inputEvents: s = [], trigger:
|
|
6144
|
-
const { editing: c, messages: u } = re(), g = Me(), { onWhenCommandSet: f, onWhenCommandValuesSet: h, onSpecificationItemOpened: m, onWhenEventRedelivered: v, onWhenRedeliveryRemoved: p, onWhenEventValuesSet: b, onWhenEventRemoved: y } = c, [w,
|
|
6144
|
+
}, ku = (e, t) => t || Object.keys(e).length > 0, Eu = ({ sliceId: e, sliceType: t, specification: n, command: r, renamedCommandName: o, events: i = [], inputEvents: s = [], trigger: l, sliceName: d }) => {
|
|
6145
|
+
const { editing: c, messages: u } = re(), g = Me(), { onWhenCommandSet: f, onWhenCommandValuesSet: h, onSpecificationItemOpened: m, onWhenEventRedelivered: v, onWhenRedeliveryRemoved: p, onWhenEventValuesSet: b, onWhenEventRemoved: y } = c, [w, k] = D(n.when), [S, N] = D(n.whenRedelivered), R = Oe(cn), [C, W] = D(() => R.recall(n.id.toString()).when ?? n.when?.values ?? {}), V = g || !(f || h || m || v || p || b || y), [te, $] = D(() => R.recall(n.id.toString())[so]), z = V ? n.whenEvent : Mu(n.whenEvent, te), I = V ? n.whenRedelivered : S, M = V ? n.when : w ?? n.when, B = (J) => {
|
|
6145
6146
|
const ee = ve.create();
|
|
6146
|
-
|
|
6147
|
+
k({
|
|
6147
6148
|
id: ee,
|
|
6148
6149
|
commandId: J.id,
|
|
6149
6150
|
name: J.name,
|
|
@@ -6191,14 +6192,14 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6191
6192
|
values: Le,
|
|
6192
6193
|
host: ge,
|
|
6193
6194
|
onValuesSet: (Ne) => {
|
|
6194
|
-
W(Ne),
|
|
6195
|
+
W(Ne), k((De) => De && {
|
|
6195
6196
|
...De,
|
|
6196
6197
|
values: Ne
|
|
6197
6198
|
}), R.remember(n.id.toString(), to, Ne), h?.(e, n.id, Ne);
|
|
6198
6199
|
}
|
|
6199
|
-
}), H = t === F.stateChange ? r : void 0, X = t === F.stateView ? i : t === F.translator ? s : [], oe = !!H && !!
|
|
6200
|
+
}), H = t === F.stateChange ? r : void 0, X = t === F.stateView ? i : t === F.translator ? s : [], oe = !!H && !!M && (M.commandId ? H.id.equals(M.commandId) : !M.name || M.name === H.name), P = M && (M.commandId && r?.id.equals(M.commandId) ? o ?? M.name : M.name), E = !g && !!m && !!h, q = oe && M ? M.id : H?.id, ue = oe ? V ? M?.values : C : void 0, Se = n.caller, Re = V ? M?.values : C, Y = t === F.automation || t === F.translator, me = I && n.given.find((J) => J.id.equals(I.givenEventId));
|
|
6200
6201
|
if (Y && I && me) {
|
|
6201
|
-
const J = i.find((se) => se.id.equals(me.eventId))?.name ?? me.name, ee =
|
|
6202
|
+
const J = i.find((se) => se.id.equals(me.eventId))?.name ?? me.name, ee = d ? u.specifications.redeliveredTo.replace("{slice}", d) : u.specifications.redelivered;
|
|
6202
6203
|
return /* @__PURE__ */ x(Et, {
|
|
6203
6204
|
headline: u.specifications.when,
|
|
6204
6205
|
children: [/* @__PURE__ */ a(Xe, {
|
|
@@ -6233,13 +6234,13 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6233
6234
|
})
|
|
6234
6235
|
});
|
|
6235
6236
|
}
|
|
6236
|
-
const je = !!
|
|
6237
|
+
const je = !!M && Object.keys(M.values ?? {}).length > 0, qe = Y ? xu(n.given, l, i, s) : [], Ve = !g && !je && v && qe.length > 0 ? [{
|
|
6237
6238
|
heading: u.specifications.redeliverGivenEvent,
|
|
6238
6239
|
options: qe.map((J) => ({
|
|
6239
6240
|
label: i.find((ee) => ee.id.equals(J.eventId))?.name ?? J.name,
|
|
6240
6241
|
onChosen: () => L(J.id)
|
|
6241
6242
|
}))
|
|
6242
|
-
}] : [], Ae = !g && t !== F.stateChange && t !== F.stateView && !
|
|
6243
|
+
}] : [], Ae = !g && t !== F.stateChange && t !== F.stateView && !M && !!r && !!f;
|
|
6243
6244
|
return /* @__PURE__ */ x(Et, {
|
|
6244
6245
|
headline: u.specifications.when,
|
|
6245
6246
|
actions: (Ae || Ve.length > 0) && /* @__PURE__ */ a(fr, {
|
|
@@ -6249,13 +6250,13 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6249
6250
|
groups: Ve
|
|
6250
6251
|
}),
|
|
6251
6252
|
children: [
|
|
6252
|
-
|
|
6253
|
+
M && P && !oe && /* @__PURE__ */ a(_e, {
|
|
6253
6254
|
name: P,
|
|
6254
6255
|
colors: yt,
|
|
6255
6256
|
values: Re,
|
|
6256
6257
|
caller: Se,
|
|
6257
|
-
onOpen: E ? (J) => T(
|
|
6258
|
-
},
|
|
6258
|
+
onOpen: E ? (J) => T(M.id, M.commandId, P, J, C) : void 0
|
|
6259
|
+
}, M.id.toString()),
|
|
6259
6260
|
H && q && /* @__PURE__ */ a(_e, {
|
|
6260
6261
|
name: H.name,
|
|
6261
6262
|
colors: yt,
|
|
@@ -6344,16 +6345,16 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6344
6345
|
}, Au = ({ name: e, onRenamed: t }) => {
|
|
6345
6346
|
const n = Me(), [r, o] = D(!1), [i, s] = D(e);
|
|
6346
6347
|
if (ie(() => s(e), [e]), r) {
|
|
6347
|
-
const
|
|
6348
|
-
const
|
|
6349
|
-
o(!1), !(!
|
|
6348
|
+
const l = () => {
|
|
6349
|
+
const d = i.trim();
|
|
6350
|
+
o(!1), !(!d || d === e) && t?.(d);
|
|
6350
6351
|
};
|
|
6351
6352
|
return /* @__PURE__ */ a(un, {
|
|
6352
6353
|
value: i,
|
|
6353
6354
|
backgroundColor: rt.background,
|
|
6354
6355
|
textColor: rt.text,
|
|
6355
6356
|
onChange: s,
|
|
6356
|
-
onCommit:
|
|
6357
|
+
onCommit: l,
|
|
6357
6358
|
onCancel: () => {
|
|
6358
6359
|
s(e), o(!1);
|
|
6359
6360
|
}
|
|
@@ -6366,11 +6367,11 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6366
6367
|
onStartEdit: t ? () => o(!0) : void 0,
|
|
6367
6368
|
disabled: n
|
|
6368
6369
|
});
|
|
6369
|
-
}, Lu = ({ sliceId: e, sliceType: t, specification: n, events: r, command: o, readModel: i, renamedEventNames: s = {}, extra:
|
|
6370
|
-
const { editing: u, messages: g } = re(), f = Me(), { onThenEventAdded: h, onThenEventValuesSet: m, onThenErrorAdded: v, onThenRuleErrorAdded: p, onThenErrorRenamed: b, onThenEventRemoved: y, onThenErrorRemoved: w, onThenReadModelValuesSet:
|
|
6370
|
+
}, Lu = ({ sliceId: e, sliceType: t, specification: n, events: r, command: o, readModel: i, renamedEventNames: s = {}, extra: l, extraGroups: d, onItemsChanged: c }) => {
|
|
6371
|
+
const { editing: u, messages: g } = re(), f = Me(), { onThenEventAdded: h, onThenEventValuesSet: m, onThenErrorAdded: v, onThenRuleErrorAdded: p, onThenErrorRenamed: b, onThenEventRemoved: y, onThenErrorRemoved: w, onThenReadModelValuesSet: k, onSpecificationItemOpened: S, onThenNoEventsExpected: N, onThenNoEventsRemoved: R } = u, [C, W] = D(n.thenEvents), [V, te] = D(n.thenErrors), [$, z] = D(n.thenNoEvents === !0), I = Oe(cn), M = I.recall(n.id.toString()), [B, L] = D(() => ({
|
|
6371
6372
|
...Di(n.thenEvents),
|
|
6372
|
-
...
|
|
6373
|
-
})), A = n.thenReadModel, G = !!A && !!i && i.id.equals(A.readModelItemId), [_, U] = D(() =>
|
|
6373
|
+
...M
|
|
6374
|
+
})), A = n.thenReadModel, G = !!A && !!i && i.id.equals(A.readModelItemId), [_, U] = D(() => M[i?.id.toString() ?? ""] ?? (G ? A?.values : void 0) ?? {}), K = f || !(h || m || v || p || b || y || w || k || S || N || R), T = K ? n.thenNoEvents === !0 : $, H = K ? n.thenEvents : C, X = K ? n.thenErrors : V;
|
|
6374
6375
|
ie(() => {
|
|
6375
6376
|
c?.(H.length, X.length);
|
|
6376
6377
|
}, [
|
|
@@ -6480,14 +6481,14 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6480
6481
|
}] : [], ...p ? P.map((Q) => ({
|
|
6481
6482
|
label: Q.label,
|
|
6482
6483
|
onChosen: () => Se(Q.reference)
|
|
6483
|
-
})) : []] : [], se = E.events && h && !T ? r : [], ge =
|
|
6484
|
+
})) : []] : [], se = E.events && h && !T ? r : [], ge = d ?? [], Le = ge.some((Q) => Q.options.length > 0), Ne = E.events && h !== void 0 && !T || ee.length > 0 || Le || J.length > 0, De = !f && Ne && /* @__PURE__ */ a(fr, {
|
|
6484
6485
|
options: se,
|
|
6485
6486
|
nameOf: (Q) => Q.name,
|
|
6486
6487
|
onChosen: q,
|
|
6487
6488
|
errors: ee,
|
|
6488
6489
|
statements: J,
|
|
6489
6490
|
groups: ge
|
|
6490
|
-
}), Er = t === F.stateView && i &&
|
|
6491
|
+
}), Er = t === F.stateView && i && d === void 0, aa = G ? K ? A?.values : _ : void 0, sa = !!A && d === void 0 && !(Er && G);
|
|
6491
6492
|
return /* @__PURE__ */ x(Et, {
|
|
6492
6493
|
headline: g.specifications.then,
|
|
6493
6494
|
actions: De,
|
|
@@ -6510,7 +6511,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6510
6511
|
values: _,
|
|
6511
6512
|
host: Q,
|
|
6512
6513
|
onValuesSet: (he) => {
|
|
6513
|
-
U(he), I.remember(n.id.toString(), i.id.toString(), he),
|
|
6514
|
+
U(he), I.remember(n.id.toString(), i.id.toString(), he), k?.(e, n.id, i.id, i.name, he);
|
|
6514
6515
|
}
|
|
6515
6516
|
}) : void 0
|
|
6516
6517
|
}, i.id.toString()),
|
|
@@ -6523,7 +6524,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6523
6524
|
declaration: n.outcomes,
|
|
6524
6525
|
section: "then"
|
|
6525
6526
|
}),
|
|
6526
|
-
|
|
6527
|
+
l
|
|
6527
6528
|
]
|
|
6528
6529
|
});
|
|
6529
6530
|
}, Tu = ({ slice: e, collapsed: t, showDetails: n }) => {
|
|
@@ -6543,7 +6544,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6543
6544
|
sliceType: e.sliceType,
|
|
6544
6545
|
recomputeKey: o
|
|
6545
6546
|
});
|
|
6546
|
-
}, Pu = ({ slice: e, collapsed: t, moduleId: n, featureId: r, collection: o, rows: i, heights: s, priorEvents:
|
|
6547
|
+
}, Pu = ({ slice: e, collapsed: t, moduleId: n, featureId: r, collection: o, rows: i, heights: s, priorEvents: l, followingEvents: d = [], externalEvents: c, slots: u, controls: g }) => {
|
|
6547
6548
|
const { detailLevel: f, detailsVisibility: h } = Ee(), m = $o(f, _o(h, n.toString(), r.toString(), e.id.toString())), v = /* @__PURE__ */ a(cg, {
|
|
6548
6549
|
featureId: r,
|
|
6549
6550
|
slice: e,
|
|
@@ -6589,20 +6590,20 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6589
6590
|
showDetails: m
|
|
6590
6591
|
};
|
|
6591
6592
|
if (u?.sliceCell) {
|
|
6592
|
-
const
|
|
6593
|
-
if (
|
|
6593
|
+
const k = u.sliceCell(e, b);
|
|
6594
|
+
if (k !== void 0) return k;
|
|
6594
6595
|
}
|
|
6595
6596
|
switch (b.rowType) {
|
|
6596
6597
|
case Z.UI: {
|
|
6597
|
-
const
|
|
6598
|
+
const k = e.actors.find((S) => S.id === b.actor?.id);
|
|
6598
6599
|
return /* @__PURE__ */ a(jg, {
|
|
6599
6600
|
...y,
|
|
6600
6601
|
actorId: b.actor?.id ?? "",
|
|
6601
|
-
elements:
|
|
6602
|
-
layout:
|
|
6603
|
-
windowSize:
|
|
6604
|
-
width:
|
|
6605
|
-
height:
|
|
6602
|
+
elements: k?.elements ?? [],
|
|
6603
|
+
layout: k?.layout,
|
|
6604
|
+
windowSize: k ? {
|
|
6605
|
+
width: k.windowWidth,
|
|
6606
|
+
height: k.windowHeight
|
|
6606
6607
|
} : void 0
|
|
6607
6608
|
});
|
|
6608
6609
|
}
|
|
@@ -6625,14 +6626,14 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6625
6626
|
...w,
|
|
6626
6627
|
slice: e,
|
|
6627
6628
|
externalEventOptions: c,
|
|
6628
|
-
priorEventOptions:
|
|
6629
|
+
priorEventOptions: l
|
|
6629
6630
|
});
|
|
6630
6631
|
case Z.Events:
|
|
6631
6632
|
return /* @__PURE__ */ a(nv, {
|
|
6632
6633
|
...w,
|
|
6633
6634
|
slice: e,
|
|
6634
|
-
priorEvents:
|
|
6635
|
-
followingEvents:
|
|
6635
|
+
priorEvents: l,
|
|
6636
|
+
followingEvents: d
|
|
6636
6637
|
});
|
|
6637
6638
|
}
|
|
6638
6639
|
}
|
|
@@ -6655,7 +6656,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6655
6656
|
sliceId: e.id,
|
|
6656
6657
|
sliceType: e.sliceType,
|
|
6657
6658
|
specification: y,
|
|
6658
|
-
events: [...
|
|
6659
|
+
events: [...l, ...e.events],
|
|
6659
6660
|
readModel: e.readModel,
|
|
6660
6661
|
additionalReadModels: e.additionalReadModels,
|
|
6661
6662
|
renamedReadModelName: e.readModel?.name
|
|
@@ -6696,7 +6697,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6696
6697
|
children: e.name
|
|
6697
6698
|
})]
|
|
6698
6699
|
})
|
|
6699
|
-
}), $u = ({ feature: e, options: t, moduleId: n, collection: r, rows: o, heights: i, slices: s, externalEvents:
|
|
6700
|
+
}), $u = ({ feature: e, options: t, moduleId: n, collection: r, rows: o, heights: i, slices: s, externalEvents: l, slots: d, editor: c, onSliceArea: u, sliceAreas: g, renderHeader: f, onSlicesChanged: h }) => {
|
|
6700
6701
|
const m = O(null), v = (S) => s.slice(0, s.findIndex((N) => N.id.equals(S))).filter((N) => N.sliceType === F.stateChange).flatMap((N) => N.events), p = (S) => s.slice(s.findIndex((N) => N.id.equals(S)) + 1).filter((N) => N.sliceType === F.stateChange).flatMap((N) => N.events), b = j(async (S, N, R) => {
|
|
6701
6702
|
const C = g.get(N.toString());
|
|
6702
6703
|
C?.moveIn(S, R);
|
|
@@ -6716,7 +6717,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6716
6717
|
c.onMoveSlice,
|
|
6717
6718
|
e.id,
|
|
6718
6719
|
b
|
|
6719
|
-
]), w = (S) => mg(c.takenArtifactNames?.() ?? ea, ug(S)),
|
|
6720
|
+
]), w = (S) => mg(c.takenArtifactNames?.() ?? ea, ug(S)), k = {
|
|
6720
6721
|
...t,
|
|
6721
6722
|
dragging: !1,
|
|
6722
6723
|
onAddSubFeature: t.addSubFeature,
|
|
@@ -6731,8 +6732,8 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6731
6732
|
width: it(e),
|
|
6732
6733
|
headerVisibility: t.headerVisibility,
|
|
6733
6734
|
nested: t.nested,
|
|
6734
|
-
header: f(
|
|
6735
|
-
screenTemplate:
|
|
6735
|
+
header: f(k),
|
|
6736
|
+
screenTemplate: d?.featureTemplate ? d.featureTemplate(e, it(e)) : e.screenTemplate && /* @__PURE__ */ a(zi, {
|
|
6736
6737
|
template: e.screenTemplate,
|
|
6737
6738
|
width: it(e)
|
|
6738
6739
|
}),
|
|
@@ -6762,8 +6763,8 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6762
6763
|
heights: i,
|
|
6763
6764
|
priorEvents: v(S.id),
|
|
6764
6765
|
followingEvents: p(S.id),
|
|
6765
|
-
externalEvents:
|
|
6766
|
-
slots:
|
|
6766
|
+
externalEvents: l,
|
|
6767
|
+
slots: d,
|
|
6767
6768
|
controls: {
|
|
6768
6769
|
collapsed: N.collapsed,
|
|
6769
6770
|
sliceCollapsed: N.sliceCollapsed,
|
|
@@ -6790,7 +6791,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6790
6791
|
})
|
|
6791
6792
|
})
|
|
6792
6793
|
});
|
|
6793
|
-
}, _u = ({ ref: e, moduleId: t, collection: n, features: r, rows: o, heights: i, slots: s, editor:
|
|
6794
|
+
}, _u = ({ ref: e, moduleId: t, collection: n, features: r, rows: o, heights: i, slots: s, editor: l, onFeaturesChanged: d }) => {
|
|
6794
6795
|
const c = O(/* @__PURE__ */ new Map()), u = O(null);
|
|
6795
6796
|
Mt(e, () => ({
|
|
6796
6797
|
addFeature: (v) => u.current?.addFeature(v) ?? Promise.resolve(),
|
|
@@ -6800,7 +6801,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6800
6801
|
const g = At(n).map((v) => v.slice), f = At({
|
|
6801
6802
|
...n,
|
|
6802
6803
|
modules: n.modules.filter((v) => !v.id.equals(t))
|
|
6803
|
-
}).flatMap((v) => v.slice.events), h = (v) =>
|
|
6804
|
+
}).flatMap((v) => v.slice.events), h = (v) => l.onAddSlice ? (p, b) => c.current.get(v.toString())?.addSlice(p, void 0, b) : void 0, m = (v, p) => s?.featureHeader?.(v, p) ?? /* @__PURE__ */ a(dc, {
|
|
6804
6805
|
featureId: v.id,
|
|
6805
6806
|
name: v.name,
|
|
6806
6807
|
description: v.description,
|
|
@@ -6821,12 +6822,12 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6821
6822
|
widthOf: it,
|
|
6822
6823
|
isCollapsed: (v) => v.collapsed,
|
|
6823
6824
|
occupiesColumn: (v) => it(v) > 0,
|
|
6824
|
-
onFeaturesChanged:
|
|
6825
|
+
onFeaturesChanged: d,
|
|
6825
6826
|
renderFeatureBoundary: s?.featureBoundary,
|
|
6826
|
-
onAddFeature:
|
|
6827
|
-
onRenameFeature:
|
|
6828
|
-
onCollapseChanged:
|
|
6829
|
-
onFeaturesReordered:
|
|
6827
|
+
onAddFeature: l.onAddFeature ? (v, p) => l.onAddFeature?.(t, v, p) ?? Promise.resolve(void 0) : void 0,
|
|
6828
|
+
onRenameFeature: l.onRenameFeature,
|
|
6829
|
+
onCollapseChanged: l.onFeatureCollapseChanged,
|
|
6830
|
+
onFeaturesReordered: l.onFeaturesReordered ? (v) => l.onFeaturesReordered?.(t, v) : void 0,
|
|
6830
6831
|
renderHeader: (v, p) => m(v, {
|
|
6831
6832
|
...p,
|
|
6832
6833
|
onDragStart: p.onDragStart ? (b) => p.onDragStart?.(v.id, v.name, b) : void 0,
|
|
@@ -6843,7 +6844,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6843
6844
|
slices: g,
|
|
6844
6845
|
externalEvents: f,
|
|
6845
6846
|
slots: s,
|
|
6846
|
-
editor:
|
|
6847
|
+
editor: l,
|
|
6847
6848
|
sliceAreas: c.current,
|
|
6848
6849
|
onSlicesChanged: (b) => u.current?.updateFeature(v.id, (y) => ({
|
|
6849
6850
|
...y,
|
|
@@ -6858,16 +6859,16 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6858
6859
|
})
|
|
6859
6860
|
})
|
|
6860
6861
|
});
|
|
6861
|
-
}, Du = ({ module: e, liveFeatures: t, index: n, collection: r, rows: o, heights: i, slots: s, editor:
|
|
6862
|
-
const m = O(null), v = O(null), p =
|
|
6862
|
+
}, Du = ({ module: e, liveFeatures: t, index: n, collection: r, rows: o, heights: i, slots: s, editor: l, dragging: d, onDragStart: c, onAddModule: u, onToggleCollapse: g, onRenamed: f, onFeaturesChanged: h }) => {
|
|
6863
|
+
const m = O(null), v = O(null), p = l.onAddFeature ? (S) => {
|
|
6863
6864
|
v.current?.addFeature(S);
|
|
6864
|
-
} : void 0, b = rr(m, void 0, "heavy"), { density: y } = Ee(), w = Ci(e.name, t ?? e.features, y),
|
|
6865
|
+
} : void 0, b = rr(m, void 0, "heavy"), { density: y } = Ee(), w = Ci(e.name, t ?? e.features, y), k = /* @__PURE__ */ a(Nd, {
|
|
6865
6866
|
moduleId: e.id,
|
|
6866
6867
|
collectionId: r.id,
|
|
6867
6868
|
index: n,
|
|
6868
6869
|
width: w,
|
|
6869
6870
|
collapsed: e.collapsed,
|
|
6870
|
-
dragging:
|
|
6871
|
+
dragging: d,
|
|
6871
6872
|
frameRef: m,
|
|
6872
6873
|
header: s?.moduleHeader?.(e, {
|
|
6873
6874
|
onDragStart: c,
|
|
@@ -6900,7 +6901,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6900
6901
|
rows: o,
|
|
6901
6902
|
heights: i,
|
|
6902
6903
|
slots: s,
|
|
6903
|
-
editor:
|
|
6904
|
+
editor: l,
|
|
6904
6905
|
onFeaturesChanged: (S) => h?.(e.id, S)
|
|
6905
6906
|
}) : /* @__PURE__ */ a(Ed, {
|
|
6906
6907
|
width: w,
|
|
@@ -6908,7 +6909,7 @@ var Tc = 250, Pc = "Inter, Helvetica, Arial, sans-serif", dt = ({ name: e, backg
|
|
|
6908
6909
|
featureWidths: Si(t ?? e.features).map(it).filter((S) => S > 0)
|
|
6909
6910
|
})
|
|
6910
6911
|
});
|
|
6911
|
-
return s?.moduleBoundary ? s.moduleBoundary(e,
|
|
6912
|
+
return s?.moduleBoundary ? s.moduleBoundary(e, k) : k;
|
|
6912
6913
|
}, Fu = (e) => Object.values(e).some((t) => typeof t == "function"), Vn = (e, t) => e.get(t.id.toString()) ?? t.collapsed, ji = (e, t) => ({
|
|
6913
6914
|
...t,
|
|
6914
6915
|
collapsed: Vn(e, t),
|
|
@@ -6925,15 +6926,15 @@ function Bu(e, t) {
|
|
|
6925
6926
|
features: n.features.map((r) => ji(t, r))
|
|
6926
6927
|
}));
|
|
6927
6928
|
}
|
|
6928
|
-
var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect: r, onCollectionMoving: o, onCollectionMoved: i, onCollectionMoveCanceled: s, canMove:
|
|
6929
|
-
const { readOnly: z, editing: I } = re(), [
|
|
6929
|
+
var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect: r, onCollectionMoving: o, onCollectionMoved: i, onCollectionMoveCanceled: s, canMove: l, onAddModule: d, onModulesReordered: c, onCollapseChanged: u, onRenameModule: g, onModulesChanged: f, onFeaturesChanged: h, onPersistenceError: m, rowLabels: v, onActorsReordered: p, onAddFeature: b, onRenameFeature: y, onFeatureCollapseChanged: w, onFeaturesReordered: k, onAddSlice: S, onReorderSlices: N, onMoveSlice: R, validateSliceDrop: C, onSliceCollapseChanged: W, onSliceRenamed: V, onSliceDuplicated: te, takenArtifactNames: $ }) => {
|
|
6930
|
+
const { readOnly: z, editing: I } = re(), [M, B] = D(/* @__PURE__ */ new Map()), L = j((ee, se) => B((ge) => new Map(ge).set(ee.toString(), se)), []), A = ce(() => Bu(e.modules, M), [e.modules, M]), G = z ? {
|
|
6930
6931
|
onFeatureCollapseChanged: L,
|
|
6931
6932
|
onSliceCollapseChanged: (ee, se, ge) => L(se, ge)
|
|
6932
6933
|
} : {
|
|
6933
6934
|
onAddFeature: b,
|
|
6934
6935
|
onRenameFeature: y,
|
|
6935
6936
|
onFeatureCollapseChanged: w,
|
|
6936
|
-
onFeaturesReordered:
|
|
6937
|
+
onFeaturesReordered: k,
|
|
6937
6938
|
onAddSlice: S,
|
|
6938
6939
|
onReorderSlices: N,
|
|
6939
6940
|
onMoveSlice: R,
|
|
@@ -6942,13 +6943,13 @@ var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect:
|
|
|
6942
6943
|
onSliceRenamed: V,
|
|
6943
6944
|
onSliceDuplicated: te,
|
|
6944
6945
|
takenArtifactNames: $
|
|
6945
|
-
}, [_, U] = D(e.modules), [K, T] = D(/* @__PURE__ */ new Map()), H = O(null), [X, oe] = D(0), P = !!(
|
|
6946
|
+
}, [_, U] = D(e.modules), [K, T] = D(/* @__PURE__ */ new Map()), H = O(null), [X, oe] = D(0), P = !!(d || c || u || g || p || b || y || w || k || S || N || R || W || V || te || l && o && i || Fu(I)), E = z || !P, q = z ? A : e.modules, ue = (E ? q : _).map((ee) => ({
|
|
6946
6947
|
...ee,
|
|
6947
6948
|
features: E ? ee.features : K.get(ee.id.toString()) ?? ee.features
|
|
6948
6949
|
})), Se = {
|
|
6949
6950
|
...e,
|
|
6950
6951
|
modules: ue
|
|
6951
|
-
}, Re = lr(Se), Y = Mi(), me = yi(Se, Y, Ee().textSize), Ie = At(Se), je = Ie.length > 0 && ue.some((ee) => !ee.collapsed), qe = !!(
|
|
6952
|
+
}, Re = lr(Se), Y = Mi(), me = yi(Se, Y, Ee().textSize), Ie = At(Se), je = Ie.length > 0 && ue.some((ee) => !ee.collapsed), qe = !!(l && o && i), Ve = Ad(Ie.map(({ slice: ee }) => ({
|
|
6952
6953
|
id: ee.id.toString(),
|
|
6953
6954
|
name: ee.name,
|
|
6954
6955
|
events: ee.events.map((se) => ({
|
|
@@ -6995,7 +6996,7 @@ var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect:
|
|
|
6995
6996
|
children: /* @__PURE__ */ x("div", {
|
|
6996
6997
|
className: "event-modeling-grid-container event-modeling-collection-grid",
|
|
6997
6998
|
onClick: r,
|
|
6998
|
-
children: [
|
|
6999
|
+
children: [l && o && i && /* @__PURE__ */ a(ul, {
|
|
6999
7000
|
collectionId: e.id,
|
|
7000
7001
|
position: e.position,
|
|
7001
7002
|
getZoom: t,
|
|
@@ -7021,7 +7022,7 @@ var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect:
|
|
|
7021
7022
|
children: /* @__PURE__ */ a(xd, {
|
|
7022
7023
|
collectionId: e.id,
|
|
7023
7024
|
initialModules: q,
|
|
7024
|
-
onAddModule:
|
|
7025
|
+
onAddModule: d,
|
|
7025
7026
|
onModulesReordered: c,
|
|
7026
7027
|
onCollapseChanged: z ? (ee, se) => (L(ee, se), Promise.resolve(!0)) : u,
|
|
7027
7028
|
onRenameModule: g,
|
|
@@ -7065,7 +7066,7 @@ var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect:
|
|
|
7065
7066
|
const i = t?.controlsSurface, s = t?.captureAttributes?.content;
|
|
7066
7067
|
return /* @__PURE__ */ x(ne, { children: [e && /* @__PURE__ */ a(Hl, { className: "event-model-board__logo" }), n && /* @__PURE__ */ a("div", {
|
|
7067
7068
|
className: "event-model-board__toolbar",
|
|
7068
|
-
onPointerDown: (
|
|
7069
|
+
onPointerDown: (l) => l.stopPropagation(),
|
|
7069
7070
|
children: /* @__PURE__ */ x("div", {
|
|
7070
7071
|
className: `event-model-board__toolbar-surface${i ? "" : " event-model-board__toolbar-surface--plain"}`,
|
|
7071
7072
|
...i && s ? { [s]: "true" } : {},
|
|
@@ -7165,7 +7166,7 @@ var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect:
|
|
|
7165
7166
|
];
|
|
7166
7167
|
return /* @__PURE__ */ a(qu, { items: r });
|
|
7167
7168
|
}, qi = ({ showLogo: e, showViewOptions: t, toolbar: n, chrome: r, children: o }) => {
|
|
7168
|
-
const i = Ee(), s = Cs(), [
|
|
7169
|
+
const i = Ee(), s = Cs(), [l, d] = D(i), c = s ? i : l, u = s ?? d, g = t || n !== void 0;
|
|
7169
7170
|
return /* @__PURE__ */ a(xs, {
|
|
7170
7171
|
presentation: c,
|
|
7171
7172
|
onChange: u,
|
|
@@ -7229,7 +7230,7 @@ var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect:
|
|
|
7229
7230
|
o.delete(r);
|
|
7230
7231
|
const i = new Set(e.removals);
|
|
7231
7232
|
n || i.delete(r);
|
|
7232
|
-
const s = n ? e.additions.filter((
|
|
7233
|
+
const s = n ? e.additions.filter((l) => l.id.toString() !== r) : e.additions;
|
|
7233
7234
|
return br({
|
|
7234
7235
|
...e,
|
|
7235
7236
|
pending: o,
|
|
@@ -7246,14 +7247,14 @@ var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect:
|
|
|
7246
7247
|
center: qs(i.start, i.end)
|
|
7247
7248
|
}];
|
|
7248
7249
|
}), Zu = 2e3, Ku = ({ links: e, collections: t, getZoom: n, onCollectionsLinked: r, onCollectionsUnlinked: o, onPersistenceError: i }) => {
|
|
7249
|
-
const s = re(),
|
|
7250
|
+
const s = re(), l = s.messages.links, d = s.readOnly ? void 0 : r, c = s.readOnly ? void 0 : o, [u, g] = D(null), [f, h] = D(() => Gu(e)), m = O(f), v = (L) => {
|
|
7250
7251
|
const A = L(m.current);
|
|
7251
7252
|
m.current = A, h(A);
|
|
7252
7253
|
};
|
|
7253
7254
|
ie(() => {
|
|
7254
7255
|
e !== m.current.snapshot && v((L) => br(L, e));
|
|
7255
7256
|
}, [e]);
|
|
7256
|
-
const p = en(f), b = O(null), y = O(null), w = `module-collection-link-arrow-${xt().replace(/:/g, "")}`,
|
|
7257
|
+
const p = en(f), b = O(null), y = O(null), w = `module-collection-link-arrow-${xt().replace(/:/g, "")}`, k = ce(() => new Map(t.map((L) => {
|
|
7257
7258
|
const A = {
|
|
7258
7259
|
x: L.position.x,
|
|
7259
7260
|
y: L.position.y,
|
|
@@ -7264,8 +7265,8 @@ var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect:
|
|
|
7264
7265
|
id: L.id,
|
|
7265
7266
|
rect: A
|
|
7266
7267
|
}];
|
|
7267
|
-
})), [t]), S = ce(() => Xu(p, (L) =>
|
|
7268
|
-
for (const G of
|
|
7268
|
+
})), [t]), S = ce(() => Xu(p, (L) => k.get(L)?.rect), [p, k]), N = (L, A) => {
|
|
7269
|
+
for (const G of k.values())
|
|
7269
7270
|
if (G.id.toString() !== A.toString() && Vs(L, G.rect))
|
|
7270
7271
|
return G;
|
|
7271
7272
|
return null;
|
|
@@ -7301,8 +7302,8 @@ var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect:
|
|
|
7301
7302
|
}, V = async (L) => {
|
|
7302
7303
|
const A = b.current, G = y.current;
|
|
7303
7304
|
if (b.current = null, y.current = null, g(null), !A) return;
|
|
7304
|
-
const _ = N(R(L, A), A.sourceId), U = Gs(_, G, (H) =>
|
|
7305
|
-
if (!U || !
|
|
7305
|
+
const _ = N(R(L, A), A.sourceId), U = Gs(_, G, (H) => k.get(H), A.sourceId.toString());
|
|
7306
|
+
if (!U || !d || m.current.pending.size > 0) return;
|
|
7306
7307
|
const K = {
|
|
7307
7308
|
id: ve.create(),
|
|
7308
7309
|
sourceCollectionId: A.sourceId,
|
|
@@ -7311,7 +7312,7 @@ var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect:
|
|
|
7311
7312
|
if (!(m.current.pending.has(T) || en(m.current).some((H) => We(H.sourceCollectionId, H.targetCollectionId) === T))) {
|
|
7312
7313
|
v((H) => Uu(H, K));
|
|
7313
7314
|
try {
|
|
7314
|
-
const H = await
|
|
7315
|
+
const H = await d(A.sourceId, U.id);
|
|
7315
7316
|
v((X) => lo(X, K, H));
|
|
7316
7317
|
} catch (H) {
|
|
7317
7318
|
if (v((X) => lo(X, K)), i) i(H);
|
|
@@ -7331,9 +7332,9 @@ var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect:
|
|
|
7331
7332
|
}
|
|
7332
7333
|
}, $ = () => {
|
|
7333
7334
|
b.current = null, y.current = null, g(null);
|
|
7334
|
-
}, z = Array.from(
|
|
7335
|
+
}, z = Array.from(k.values());
|
|
7335
7336
|
if (z.length === 0) return null;
|
|
7336
|
-
const I = Us(z.map((L) => L.rect), u ? [u.pointer] : [], Zu),
|
|
7337
|
+
const I = Us(z.map((L) => L.rect), u ? [u.pointer] : [], Zu), M = u ? k.get(u.sourceId) : void 0, B = u?.targetId ? k.get(u.targetId) : void 0;
|
|
7337
7338
|
return /* @__PURE__ */ x("div", {
|
|
7338
7339
|
className: "module-collection-link-layer",
|
|
7339
7340
|
children: [
|
|
@@ -7366,9 +7367,9 @@ var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect:
|
|
|
7366
7367
|
className: "module-collection-link-layer__arrow",
|
|
7367
7368
|
markerEnd: `url(#${w})`
|
|
7368
7369
|
}, L.id.toString())),
|
|
7369
|
-
u &&
|
|
7370
|
-
const L = B ? Uo(
|
|
7371
|
-
start: Rt(
|
|
7370
|
+
u && M && (() => {
|
|
7371
|
+
const L = B ? Uo(M.rect, B.rect) : {
|
|
7372
|
+
start: Rt(M.rect, u.side),
|
|
7372
7373
|
end: u.pointer,
|
|
7373
7374
|
axis: Go(u.side)
|
|
7374
7375
|
};
|
|
@@ -7389,7 +7390,7 @@ var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect:
|
|
|
7389
7390
|
height: B.rect.height
|
|
7390
7391
|
}
|
|
7391
7392
|
}),
|
|
7392
|
-
|
|
7393
|
+
d && f.pending.size === 0 && z.flatMap(({ id: L, rect: A }) => zs.map((G) => {
|
|
7393
7394
|
const _ = Rt(A, G);
|
|
7394
7395
|
return /* @__PURE__ */ a("div", {
|
|
7395
7396
|
className: "module-collection-link-layer__handle",
|
|
@@ -7398,7 +7399,7 @@ var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect:
|
|
|
7398
7399
|
left: _.x,
|
|
7399
7400
|
top: _.y
|
|
7400
7401
|
},
|
|
7401
|
-
title:
|
|
7402
|
+
title: l.dragToLink,
|
|
7402
7403
|
onPointerDown: C(L, G, _),
|
|
7403
7404
|
onPointerMove: W,
|
|
7404
7405
|
onPointerUp: V,
|
|
@@ -7412,7 +7413,7 @@ var Hu = () => 1, Wu = ({ collection: e, getZoom: t = Hu, slots: n, onDeselect:
|
|
|
7412
7413
|
left: A.x,
|
|
7413
7414
|
top: A.y
|
|
7414
7415
|
},
|
|
7415
|
-
title:
|
|
7416
|
+
title: l.removeLink,
|
|
7416
7417
|
onPointerDown: (G) => G.stopPropagation(),
|
|
7417
7418
|
onClick: () => {
|
|
7418
7419
|
te(L.id);
|
|
@@ -7443,24 +7444,24 @@ function tn(e, t) {
|
|
|
7443
7444
|
for (const n of [...t].reverse()) for (const [r, o] of Qu) {
|
|
7444
7445
|
const i = [...e.querySelectorAll(r)].find((s) => {
|
|
7445
7446
|
if (s.getAttribute(o)?.toLowerCase() !== n) return !1;
|
|
7446
|
-
const
|
|
7447
|
-
return
|
|
7447
|
+
const l = s.getBoundingClientRect();
|
|
7448
|
+
return l.width > 0 && l.height > 0;
|
|
7448
7449
|
});
|
|
7449
7450
|
if (i) return i;
|
|
7450
7451
|
}
|
|
7451
7452
|
}
|
|
7452
7453
|
function em(e, t, n, r, o) {
|
|
7453
|
-
const i = e.getBoundingClientRect(), s = r > 0 ? r : 1,
|
|
7454
|
-
for (const
|
|
7455
|
-
const c = tn(t, o?.(
|
|
7454
|
+
const i = e.getBoundingClientRect(), s = r > 0 ? r : 1, l = /* @__PURE__ */ new Map();
|
|
7455
|
+
for (const d of new Set(n.map((c) => c.toLowerCase()))) {
|
|
7456
|
+
const c = tn(t, o?.(d) ?? [d]);
|
|
7456
7457
|
if (!c) continue;
|
|
7457
7458
|
const u = c.getBoundingClientRect();
|
|
7458
|
-
|
|
7459
|
+
l.set(d, {
|
|
7459
7460
|
x: (u.left + u.width / 2 - i.left) / s,
|
|
7460
7461
|
y: (u.top - i.top) / s
|
|
7461
7462
|
});
|
|
7462
7463
|
}
|
|
7463
|
-
return
|
|
7464
|
+
return l;
|
|
7464
7465
|
}
|
|
7465
7466
|
var tm = 24, nm = 160, Wt = (e) => e.toString().toLowerCase();
|
|
7466
7467
|
function rm(e, t) {
|
|
@@ -7487,7 +7488,7 @@ var im = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
7487
7488
|
const o = t.get(n);
|
|
7488
7489
|
return !!o && o.x === r.x && o.y === r.y;
|
|
7489
7490
|
}), am = ({ links: e, boardRoot: t, getZoom: n, path: r, revision: o }) => {
|
|
7490
|
-
const { messages: i } = re(), s = O(null),
|
|
7491
|
+
const { messages: i } = re(), s = O(null), l = xt().replace(/:/g, ""), [d, c] = D(/* @__PURE__ */ new Map()), u = ce(() => e.flatMap((m) => [m.from.toString(), m.to.toString()]), [e]), g = O(() => {
|
|
7491
7492
|
});
|
|
7492
7493
|
g.current = () => {
|
|
7493
7494
|
const m = t.current;
|
|
@@ -7516,7 +7517,7 @@ var im = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
7516
7517
|
p.disconnect(), v !== void 0 && cancelAnimationFrame(v);
|
|
7517
7518
|
};
|
|
7518
7519
|
}, [t, u]);
|
|
7519
|
-
const f = ce(() => om(e,
|
|
7520
|
+
const f = ce(() => om(e, d), [e, d]);
|
|
7520
7521
|
if (e.length === 0) return null;
|
|
7521
7522
|
const h = i.sliceLinks ?? $t.sliceLinks;
|
|
7522
7523
|
return /* @__PURE__ */ a("div", {
|
|
@@ -7525,7 +7526,7 @@ var im = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
7525
7526
|
children: /* @__PURE__ */ x("svg", {
|
|
7526
7527
|
className: "slice-link-layer__svg",
|
|
7527
7528
|
children: [/* @__PURE__ */ x("defs", { children: [/* @__PURE__ */ a("marker", {
|
|
7528
|
-
id: `${
|
|
7529
|
+
id: `${l}-within`,
|
|
7529
7530
|
viewBox: "0 0 10 10",
|
|
7530
7531
|
refX: "9",
|
|
7531
7532
|
refY: "5",
|
|
@@ -7537,7 +7538,7 @@ var im = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
7537
7538
|
className: "slice-link-layer__head slice-link-layer__head--within"
|
|
7538
7539
|
})
|
|
7539
7540
|
}), /* @__PURE__ */ a("marker", {
|
|
7540
|
-
id: `${
|
|
7541
|
+
id: `${l}-crossing`,
|
|
7541
7542
|
viewBox: "0 0 10 10",
|
|
7542
7543
|
refX: "9",
|
|
7543
7544
|
refY: "5",
|
|
@@ -7555,7 +7556,7 @@ var im = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
7555
7556
|
children: [/* @__PURE__ */ a("path", {
|
|
7556
7557
|
d: m.path,
|
|
7557
7558
|
className: `slice-link-layer__link slice-link-layer__link--${m.emphasis}`,
|
|
7558
|
-
markerEnd: `url(#${
|
|
7559
|
+
markerEnd: `url(#${l}-${m.emphasis})`
|
|
7559
7560
|
}), m.label && /* @__PURE__ */ a("text", {
|
|
7560
7561
|
x: m.labelPosition.x,
|
|
7561
7562
|
y: m.labelPosition.y,
|
|
@@ -7697,23 +7698,23 @@ var im = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
7697
7698
|
}
|
|
7698
7699
|
}, zt = 50, jt = () => {
|
|
7699
7700
|
}, pm = (e) => e.stopPropagation(), Yi = da(({ notes: e, boardRoot: t }, n) => {
|
|
7700
|
-
const { editing: r, actions: o, messages: i } = re(), s = Vm(),
|
|
7701
|
+
const { editing: r, actions: o, messages: i } = re(), s = Vm(), l = O(new hm(e)), d = O(/* @__PURE__ */ new Set()), c = O(!1), u = O(/* @__PURE__ */ new Set()), g = O(/* @__PURE__ */ new Set()), [f, h] = D(0), [m, v] = D(), [p, b] = D(), y = O(null), w = ce(() => [y], []), k = j(() => h((I) => I + 1), []);
|
|
7701
7702
|
ie(() => {
|
|
7702
|
-
|
|
7703
|
-
}, [e,
|
|
7704
|
-
const I =
|
|
7703
|
+
l.current.reconcile(e), k();
|
|
7704
|
+
}, [e, k]), ie(() => {
|
|
7705
|
+
const I = l.current.nextExpiration;
|
|
7705
7706
|
if (I === void 0) return;
|
|
7706
|
-
const
|
|
7707
|
-
|
|
7707
|
+
const M = setTimeout(() => {
|
|
7708
|
+
l.current.expire(), k();
|
|
7708
7709
|
}, Math.max(0, I - Date.now()));
|
|
7709
|
-
return () => clearTimeout(
|
|
7710
|
-
}, [f,
|
|
7711
|
-
const S = j((I,
|
|
7712
|
-
|
|
7713
|
-
})), [o,
|
|
7710
|
+
return () => clearTimeout(M);
|
|
7711
|
+
}, [f, k]);
|
|
7712
|
+
const S = j((I, M, B) => d.current.has(I) ? Promise.resolve() : (d.current.add(I), l.current.change(I, M), l.current.begin(I, M), k(), Promise.resolve().then(B).then((L) => (L === !1 && (l.current.rollback(I, M), l.current.get(I) || v((A) => A === I ? void 0 : A), k()), L !== !1)).catch((L) => (l.current.rollback(I, M), l.current.get(I) || v((A) => A === I ? void 0 : A), k(), o.stickyNoteError ? o.stickyNoteError(L) : console.error(L), !1)).finally(() => {
|
|
7713
|
+
l.current.settle(I, M), d.current.delete(I), k();
|
|
7714
|
+
})), [o, k]);
|
|
7714
7715
|
Mt(n, () => ({ add(I) {
|
|
7715
|
-
const
|
|
7716
|
-
if (!
|
|
7716
|
+
const M = r.onStickyNoteAdded;
|
|
7717
|
+
if (!M || c.current) return;
|
|
7717
7718
|
c.current = !0, o.stickyNoteCreatingChanged?.(!0);
|
|
7718
7719
|
const B = {
|
|
7719
7720
|
id: ve.create().toString(),
|
|
@@ -7725,7 +7726,7 @@ var im = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
7725
7726
|
height: zt,
|
|
7726
7727
|
text: i.stickyNotes.newNote
|
|
7727
7728
|
};
|
|
7728
|
-
v(B.id), S(B.id, B, () =>
|
|
7729
|
+
v(B.id), S(B.id, B, () => M(B)).then((L) => {
|
|
7729
7730
|
L && o.stickyNoteCreated?.(B);
|
|
7730
7731
|
}).finally(() => {
|
|
7731
7732
|
c.current = !1, o.stickyNoteCreatingChanged?.(!1);
|
|
@@ -7738,52 +7739,52 @@ var im = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
7738
7739
|
]);
|
|
7739
7740
|
const N = r.onStickyNoteMoved || r.onStickyNoteResized || r.onStickyNoteTextChanged || r.onStickyNoteRemoved ? v : void 0;
|
|
7740
7741
|
bt(w, () => N?.(void 0), m !== void 0 && !!N);
|
|
7741
|
-
const R = (I,
|
|
7742
|
-
const B =
|
|
7743
|
-
!B ||
|
|
7742
|
+
const R = (I, M) => {
|
|
7743
|
+
const B = l.current.get(I);
|
|
7744
|
+
!B || d.current.has(I) || B.position.x === M.x && B.position.y === M.y || (u.current.add(I), l.current.change(I, {
|
|
7744
7745
|
...B,
|
|
7745
|
-
position:
|
|
7746
|
-
}),
|
|
7747
|
-
}, C = (I,
|
|
7748
|
-
const B =
|
|
7749
|
-
!B ||
|
|
7746
|
+
position: M
|
|
7747
|
+
}), k());
|
|
7748
|
+
}, C = (I, M) => {
|
|
7749
|
+
const B = l.current.get(I);
|
|
7750
|
+
!B || d.current.has(I) || B.position.x === M.position.x && B.position.y === M.position.y && B.width === M.width && B.height === M.height || (g.current.add(I), l.current.change(I, {
|
|
7750
7751
|
...B,
|
|
7751
|
-
...
|
|
7752
|
-
}),
|
|
7752
|
+
...M
|
|
7753
|
+
}), k());
|
|
7753
7754
|
}, W = (I) => {
|
|
7754
7755
|
if (!u.current.delete(I)) return;
|
|
7755
|
-
const
|
|
7756
|
-
|
|
7756
|
+
const M = l.current.get(I);
|
|
7757
|
+
M && r.onStickyNoteMoved && S(I, M, () => r.onStickyNoteMoved?.(I, M.position));
|
|
7757
7758
|
}, V = (I) => {
|
|
7758
7759
|
if (!g.current.delete(I)) return;
|
|
7759
|
-
const
|
|
7760
|
-
|
|
7761
|
-
position:
|
|
7762
|
-
width:
|
|
7763
|
-
height:
|
|
7760
|
+
const M = l.current.get(I);
|
|
7761
|
+
M && r.onStickyNoteResized && S(I, M, () => r.onStickyNoteResized?.(I, {
|
|
7762
|
+
position: M.position,
|
|
7763
|
+
width: M.width,
|
|
7764
|
+
height: M.height
|
|
7764
7765
|
}));
|
|
7765
|
-
}, te = (I,
|
|
7766
|
-
const B =
|
|
7767
|
-
B && B.text !==
|
|
7766
|
+
}, te = (I, M) => {
|
|
7767
|
+
const B = l.current.get(I);
|
|
7768
|
+
B && B.text !== M && r.onStickyNoteTextChanged && S(I, {
|
|
7768
7769
|
...B,
|
|
7769
|
-
text:
|
|
7770
|
-
}, () => r.onStickyNoteTextChanged?.(I,
|
|
7771
|
-
}, $ = (I,
|
|
7772
|
-
const B =
|
|
7773
|
-
B && (B.colour ?? nt.yellow) !==
|
|
7770
|
+
text: M
|
|
7771
|
+
}, () => r.onStickyNoteTextChanged?.(I, M));
|
|
7772
|
+
}, $ = (I, M) => {
|
|
7773
|
+
const B = l.current.get(I);
|
|
7774
|
+
B && (B.colour ?? nt.yellow) !== M && r.onStickyNoteColourChanged && S(I, {
|
|
7774
7775
|
...B,
|
|
7775
|
-
colour:
|
|
7776
|
-
}, () => r.onStickyNoteColourChanged?.(I,
|
|
7776
|
+
colour: M
|
|
7777
|
+
}, () => r.onStickyNoteColourChanged?.(I, M));
|
|
7777
7778
|
}, z = j((I) => {
|
|
7778
|
-
!
|
|
7779
|
+
!l.current.get(I) || !r.onStickyNoteRemoved || d.current.has(I) || (v((M) => M === I ? void 0 : M), S(I, null, () => r.onStickyNoteRemoved?.(I)));
|
|
7779
7780
|
}, [r, S]);
|
|
7780
7781
|
return ie(() => {
|
|
7781
7782
|
if (!r.onStickyNoteRemoved || m === void 0) return;
|
|
7782
|
-
const I = (
|
|
7783
|
-
mm(
|
|
7783
|
+
const I = (M) => {
|
|
7784
|
+
mm(M.key, M.target, t && {
|
|
7784
7785
|
boardRoot: t.current,
|
|
7785
7786
|
lastInteractionTarget: s()
|
|
7786
|
-
}) && (
|
|
7787
|
+
}) && (M.preventDefault(), z(m));
|
|
7787
7788
|
};
|
|
7788
7789
|
return document.addEventListener("keydown", I), () => document.removeEventListener("keydown", I);
|
|
7789
7790
|
}, [
|
|
@@ -7795,28 +7796,28 @@ var im = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
7795
7796
|
]), /* @__PURE__ */ a("div", {
|
|
7796
7797
|
ref: y,
|
|
7797
7798
|
className: "event-model-sticky-notes",
|
|
7798
|
-
children:
|
|
7799
|
-
const
|
|
7799
|
+
children: l.current.notes.map((I) => {
|
|
7800
|
+
const M = I.position?.x ?? 0, B = I.position?.y ?? 0;
|
|
7800
7801
|
return /* @__PURE__ */ a(Ro, {
|
|
7801
|
-
x:
|
|
7802
|
+
x: M,
|
|
7802
7803
|
y: B,
|
|
7803
7804
|
zIndex: p === I.id ? 3 : 2,
|
|
7804
7805
|
children: /* @__PURE__ */ x("div", {
|
|
7805
7806
|
"data-sticky-note-id": I.id,
|
|
7806
|
-
className: `${gm(I.colour)}${
|
|
7807
|
-
"aria-busy":
|
|
7808
|
-
onDoubleClickCapture: r.onStickyNoteTextChanged && !
|
|
7807
|
+
className: `${gm(I.colour)}${d.current.has(I.id) ? " event-model-sticky-note--busy" : ""}`,
|
|
7808
|
+
"aria-busy": d.current.has(I.id),
|
|
7809
|
+
onDoubleClickCapture: r.onStickyNoteTextChanged && !d.current.has(I.id) ? void 0 : pm,
|
|
7809
7810
|
children: [
|
|
7810
7811
|
/* @__PURE__ */ a(ga, {
|
|
7811
7812
|
note: {
|
|
7812
7813
|
id: I.id,
|
|
7813
|
-
x:
|
|
7814
|
+
x: M,
|
|
7814
7815
|
y: B,
|
|
7815
7816
|
width: I.width,
|
|
7816
7817
|
height: I.height,
|
|
7817
7818
|
text: I.text
|
|
7818
7819
|
},
|
|
7819
|
-
selected: m === I.id && !!r.onStickyNoteResized && !
|
|
7820
|
+
selected: m === I.id && !!r.onStickyNoteResized && !d.current.has(I.id),
|
|
7820
7821
|
onSelect: N ?? jt,
|
|
7821
7822
|
onMove: r.onStickyNoteMoved ? (L, A, G) => R(L, {
|
|
7822
7823
|
x: A,
|
|
@@ -7835,11 +7836,11 @@ var im = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
7835
7836
|
onTextChange: r.onStickyNoteTextChanged ? te : jt,
|
|
7836
7837
|
onExpandedChange: (L, A) => b((G) => A ? L : G === L ? void 0 : G)
|
|
7837
7838
|
}),
|
|
7838
|
-
m === I.id && r.onStickyNoteColourChanged && !
|
|
7839
|
+
m === I.id && r.onStickyNoteColourChanged && !d.current.has(I.id) && /* @__PURE__ */ a(vm, {
|
|
7839
7840
|
current: I.colour,
|
|
7840
7841
|
onPick: (L) => $(I.id, L)
|
|
7841
7842
|
}),
|
|
7842
|
-
|
|
7843
|
+
d.current.has(I.id) && /* @__PURE__ */ a("span", {
|
|
7843
7844
|
className: "event-model-sticky-note__progress",
|
|
7844
7845
|
"aria-hidden": "true",
|
|
7845
7846
|
children: /* @__PURE__ */ a(ya, { className: "event-model-sticky-note__spinner" })
|
|
@@ -7851,7 +7852,7 @@ var im = (e, t) => e.size === t.size && [...e].every(([n, r]) => {
|
|
|
7851
7852
|
});
|
|
7852
7853
|
});
|
|
7853
7854
|
Yi.displayName = "StickyNotes";
|
|
7854
|
-
var Xi = Io(({ collection: e, estimatedSize: t, measuredSize: n, onSize: r, getZoom: o, canMove: i, onCollectionMoving: s, onCollectionMoved:
|
|
7855
|
+
var Xi = Io(({ collection: e, estimatedSize: t, measuredSize: n, onSize: r, getZoom: o, canMove: i, onCollectionMoving: s, onCollectionMoved: l, onCollectionMoveCanceled: d, content: c, onGridMounted: u }) => {
|
|
7855
7856
|
const g = j((f) => /* @__PURE__ */ a("div", {
|
|
7856
7857
|
style: { display: "contents" },
|
|
7857
7858
|
ref: (h) => {
|
|
@@ -7862,15 +7863,15 @@ var Xi = Io(({ collection: e, estimatedSize: t, measuredSize: n, onSize: r, getZ
|
|
|
7862
7863
|
getZoom: o,
|
|
7863
7864
|
canMove: i,
|
|
7864
7865
|
onCollectionMoving: s,
|
|
7865
|
-
onCollectionMoved:
|
|
7866
|
-
onCollectionMoveCanceled:
|
|
7866
|
+
onCollectionMoved: l,
|
|
7867
|
+
onCollectionMoveCanceled: d
|
|
7867
7868
|
})
|
|
7868
7869
|
}), [
|
|
7869
7870
|
o,
|
|
7870
7871
|
i,
|
|
7871
7872
|
s,
|
|
7872
|
-
d,
|
|
7873
7873
|
l,
|
|
7874
|
+
d,
|
|
7874
7875
|
u
|
|
7875
7876
|
]);
|
|
7876
7877
|
return /* @__PURE__ */ a(_l, {
|
|
@@ -7908,15 +7909,15 @@ var Gv = "data-event-model-export-exclude", go = () => new Promise((e) => reques
|
|
|
7908
7909
|
}
|
|
7909
7910
|
};
|
|
7910
7911
|
async function bm(e, t, n, r, o, i, s = fm) {
|
|
7911
|
-
const
|
|
7912
|
-
let
|
|
7912
|
+
const l = s.createContainer(t, n, r);
|
|
7913
|
+
let d;
|
|
7913
7914
|
try {
|
|
7914
|
-
|
|
7915
|
-
const c = await s.captureBlob(
|
|
7915
|
+
d = s.mount(l, e), await s.waitForLayoutToSettle();
|
|
7916
|
+
const c = await s.captureBlob(l, o, i);
|
|
7916
7917
|
if (!c) throw new Error("Failed to capture the event model board as an image.");
|
|
7917
7918
|
return c;
|
|
7918
7919
|
} finally {
|
|
7919
|
-
|
|
7920
|
+
d?.(), s.removeContainer(l);
|
|
7920
7921
|
}
|
|
7921
7922
|
}
|
|
7922
7923
|
function ym(e, t) {
|
|
@@ -7947,12 +7948,12 @@ function wm(e) {
|
|
|
7947
7948
|
}
|
|
7948
7949
|
var Sm = 2, Cm = "#ffffff", xm = 48;
|
|
7949
7950
|
function Mm(e, t = bm) {
|
|
7950
|
-
const n = e.options?.scale ?? Sm, r = e.options?.background ?? Cm, o = e.options?.padding ?? xm, i = ym(e.collections, e.estimateSize), s = wm(i),
|
|
7951
|
+
const n = e.options?.scale ?? Sm, r = e.options?.background ?? Cm, o = e.options?.padding ?? xm, i = ym(e.collections, e.estimateSize), s = wm(i), l = {
|
|
7951
7952
|
initialCollections: [...e.collections],
|
|
7952
7953
|
estimateSize: e.estimateSize,
|
|
7953
7954
|
countSlices: e.countSlices,
|
|
7954
7955
|
renderCollection: e.renderCollection
|
|
7955
|
-
},
|
|
7956
|
+
}, d = {
|
|
7956
7957
|
initialZoom: s.canvasInitialZoom,
|
|
7957
7958
|
initialPan: s.canvasInitialPan,
|
|
7958
7959
|
showControls: !1
|
|
@@ -7961,7 +7962,7 @@ function Mm(e, t = bm) {
|
|
|
7961
7962
|
renderAll: !0,
|
|
7962
7963
|
children: /* @__PURE__ */ a(Ji, {
|
|
7963
7964
|
id: e.documentId,
|
|
7964
|
-
collections:
|
|
7965
|
+
collections: l,
|
|
7965
7966
|
links: e.links,
|
|
7966
7967
|
stickyNotes: e.stickyNotes,
|
|
7967
7968
|
changes: e.changes,
|
|
@@ -7970,7 +7971,7 @@ function Mm(e, t = bm) {
|
|
|
7970
7971
|
showMinimap: !1,
|
|
7971
7972
|
showLogo: !1,
|
|
7972
7973
|
showViewOptions: !1,
|
|
7973
|
-
canvas:
|
|
7974
|
+
canvas: d
|
|
7974
7975
|
})
|
|
7975
7976
|
}), s.canvasWidth, s.canvasHeight, o, n, r);
|
|
7976
7977
|
}
|
|
@@ -8003,8 +8004,8 @@ function Ki(e, t, n) {
|
|
|
8003
8004
|
const o = [...n, r.id.toString().toLowerCase()];
|
|
8004
8005
|
if (o[o.length - 1] === t) return o;
|
|
8005
8006
|
for (const s of r.slices) {
|
|
8006
|
-
const
|
|
8007
|
-
if (
|
|
8007
|
+
const l = [...o, s.id.toString().toLowerCase()];
|
|
8008
|
+
if (l[l.length - 1] === t) return l;
|
|
8008
8009
|
if ([
|
|
8009
8010
|
s.command,
|
|
8010
8011
|
s.readModel,
|
|
@@ -8013,7 +8014,7 @@ function Ki(e, t, n) {
|
|
|
8013
8014
|
...s.additionalReadModels ?? [],
|
|
8014
8015
|
...s.events,
|
|
8015
8016
|
...s.externalEvents
|
|
8016
|
-
].some((
|
|
8017
|
+
].some((d) => d?.id.toString().toLowerCase() === t)) return [...l, t];
|
|
8017
8018
|
}
|
|
8018
8019
|
const i = Ki(r.subFeatures, t, o);
|
|
8019
8020
|
if (i) return i;
|
|
@@ -8034,11 +8035,11 @@ async function Am(e, t) {
|
|
|
8034
8035
|
function Lm(e, t, n) {
|
|
8035
8036
|
const r = e.camera.getContainerRect();
|
|
8036
8037
|
if (!r || !e.active()) return !1;
|
|
8037
|
-
const o = t.getBoundingClientRect(), i = e.transform(), s = Ju(o, r, i),
|
|
8038
|
+
const o = t.getBoundingClientRect(), i = e.transform(), s = Ju(o, r, i), l = t.matches("[data-slice-col], [data-card-id], [data-event-id]") ? 1 : Vi({
|
|
8038
8039
|
width: o.width / i.zoom,
|
|
8039
8040
|
height: o.height / i.zoom
|
|
8040
8041
|
}, r);
|
|
8041
|
-
return e.camera.smoothPanZoomToWorld(s.x, s.y,
|
|
8042
|
+
return e.camera.smoothPanZoomToWorld(s.x, s.y, l, n), !0;
|
|
8042
8043
|
}
|
|
8043
8044
|
async function Tm(e, t) {
|
|
8044
8045
|
const { camera: n, footprint: r } = e, o = n.getContainerRect();
|
|
@@ -8048,36 +8049,36 @@ async function Tm(e, t) {
|
|
|
8048
8049
|
return n.smoothPanZoomToWorld(r.position.x + r.width / 2, r.position.y + r.height / 2, Vi(r, o), i), !0;
|
|
8049
8050
|
n.smoothPanZoomToWorld(r.position.x + Math.min(r.width, o.width) / 2, r.position.y + Math.min(r.height, o.height) / 2, 1, i);
|
|
8050
8051
|
let s = -1;
|
|
8051
|
-
for (let
|
|
8052
|
-
const
|
|
8053
|
-
if (!
|
|
8054
|
-
const c = e.path(), u = c.map((g) => tn(e.root, [g]) ===
|
|
8052
|
+
for (let l = 0; l < e.path().length; l++) {
|
|
8053
|
+
const d = await Am(e, i);
|
|
8054
|
+
if (!d || !e.active()) return !1;
|
|
8055
|
+
const c = e.path(), u = c.map((g) => tn(e.root, [g]) === d).lastIndexOf(!0);
|
|
8055
8056
|
if (u <= s) return !0;
|
|
8056
|
-
if (!Lm(e,
|
|
8057
|
+
if (!Lm(e, d, i)) return !1;
|
|
8057
8058
|
if (u === c.length - 1) return !0;
|
|
8058
8059
|
s = u;
|
|
8059
8060
|
}
|
|
8060
8061
|
return !0;
|
|
8061
8062
|
}
|
|
8062
|
-
function Pm(e, t, n, r, o, i, s = 1,
|
|
8063
|
+
function Pm(e, t, n, r, o, i, s = 1, l = {
|
|
8063
8064
|
x: 0,
|
|
8064
8065
|
y: 0
|
|
8065
8066
|
}) {
|
|
8066
|
-
const
|
|
8067
|
+
const d = e.toString().toLowerCase(), c = O(null), u = O(null), [g, f] = D(!1), h = O({
|
|
8067
8068
|
zoom: s,
|
|
8068
|
-
pan:
|
|
8069
|
+
pan: l
|
|
8069
8070
|
}), m = O(/* @__PURE__ */ new Map()), v = O(0), p = O(void 0);
|
|
8070
8071
|
ie(() => () => {
|
|
8071
8072
|
v.current++, p.current = void 0;
|
|
8072
8073
|
}, []), ie(() => () => {
|
|
8073
8074
|
v.current++;
|
|
8074
|
-
}, [
|
|
8075
|
+
}, [d]);
|
|
8075
8076
|
const b = j((S, N) => {
|
|
8076
8077
|
const R = S.id.toString().toLowerCase();
|
|
8077
8078
|
N ? m.current.set(R, S) : m.current.get(R) === S && m.current.delete(R);
|
|
8078
8079
|
}, []), y = j((S) => {
|
|
8079
8080
|
u.current = S, f(!0), i?.(S);
|
|
8080
|
-
}, [i]), w = j((S) => t.find((N) => N.id.toString().toLowerCase() === S || N.modules.some((R) => R.id.toString().toLowerCase() === S) || n.contains?.(N, S)), [t, n]),
|
|
8081
|
+
}, [i]), w = j((S) => t.find((N) => N.id.toString().toLowerCase() === S || N.modules.some((R) => R.id.toString().toLowerCase() === S) || n.contains?.(N, S)), [t, n]), k = j(async (S, N) => {
|
|
8081
8082
|
const R = S.toString().toLowerCase(), C = w(R);
|
|
8082
8083
|
if (!C || !u.current || !c.current) return !1;
|
|
8083
8084
|
const W = C.id.toString().toLowerCase(), V = ++v.current;
|
|
@@ -8102,31 +8103,31 @@ function Pm(e, t, n, r, o, i, s = 1, d = {
|
|
|
8102
8103
|
r
|
|
8103
8104
|
]);
|
|
8104
8105
|
return ie(() => {
|
|
8105
|
-
!g || p.current ===
|
|
8106
|
+
!g || p.current === d || o && !w(o.id.toString().toLowerCase()) || (p.current = d, o && k(o.id, { animate: !1 }));
|
|
8106
8107
|
}, [
|
|
8107
8108
|
g,
|
|
8108
|
-
|
|
8109
|
+
d,
|
|
8109
8110
|
o,
|
|
8110
8111
|
w,
|
|
8111
|
-
|
|
8112
|
+
k
|
|
8112
8113
|
]), {
|
|
8113
8114
|
rootRef: c,
|
|
8114
8115
|
handleReady: y,
|
|
8115
|
-
scrollTo:
|
|
8116
|
+
scrollTo: k,
|
|
8116
8117
|
onGridMounted: b,
|
|
8117
8118
|
transform: h
|
|
8118
8119
|
};
|
|
8119
8120
|
}
|
|
8120
8121
|
function $m(e, t, n = !0) {
|
|
8121
|
-
const r = O(/* @__PURE__ */ new Set()), [o, i] = D(r.current), [s,
|
|
8122
|
+
const r = O(/* @__PURE__ */ new Set()), [o, i] = D(r.current), [s, l] = D(void 0), { collections: d, moveCollection: c, collectionMoved: u } = e, g = ce(() => n ? s ? d.map((m) => {
|
|
8122
8123
|
if (o.has(m.id.toString())) return m;
|
|
8123
8124
|
const v = s.get(m.id.toString());
|
|
8124
8125
|
return v && v !== m.position ? {
|
|
8125
8126
|
...m,
|
|
8126
8127
|
position: v
|
|
8127
8128
|
} : m;
|
|
8128
|
-
}) : xl(Sl(
|
|
8129
|
-
|
|
8129
|
+
}) : xl(Sl(d), t) : d, [
|
|
8130
|
+
d,
|
|
8130
8131
|
t,
|
|
8131
8132
|
n,
|
|
8132
8133
|
o,
|
|
@@ -8134,17 +8135,17 @@ function $m(e, t, n = !0) {
|
|
|
8134
8135
|
]), f = j((m, v, p) => {
|
|
8135
8136
|
const b = m.toString();
|
|
8136
8137
|
if (!r.current.has(b)) {
|
|
8137
|
-
r.current.size ||
|
|
8138
|
-
const y = g.find((
|
|
8138
|
+
r.current.size || l(new Map(g.map((k) => [k.id.toString(), k.position])));
|
|
8139
|
+
const y = g.find((k) => k.id.equals(m))?.position, w = d.find((k) => k.id.equals(m))?.position;
|
|
8139
8140
|
v += (y?.x ?? 0) - (w?.x ?? 0), p += (y?.y ?? 0) - (w?.y ?? 0), r.current = /* @__PURE__ */ new Set([...r.current, b]), i(r.current);
|
|
8140
8141
|
}
|
|
8141
8142
|
c(m, v, p);
|
|
8142
8143
|
}, [
|
|
8143
8144
|
g,
|
|
8144
|
-
|
|
8145
|
+
d,
|
|
8145
8146
|
c
|
|
8146
8147
|
]), h = j((m) => {
|
|
8147
|
-
r.current = new Set(r.current), r.current.delete(m.toString()), i(r.current), r.current.size ||
|
|
8148
|
+
r.current = new Set(r.current), r.current.delete(m.toString()), i(r.current), r.current.size || l(void 0);
|
|
8148
8149
|
}, []);
|
|
8149
8150
|
return {
|
|
8150
8151
|
placed: g,
|
|
@@ -8164,41 +8165,41 @@ function ho(e) {
|
|
|
8164
8165
|
};
|
|
8165
8166
|
}, [e]);
|
|
8166
8167
|
}
|
|
8167
|
-
var _m = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor: i, canvas: s, showMinimap:
|
|
8168
|
+
var _m = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor: i, canvas: s, showMinimap: l, changes: d, initialFocus: c, handle: u, sliceLinks: g, separateOverlaps: f = !0 }) => {
|
|
8168
8169
|
const h = o ? void 0 : i?.links, m = Ml({
|
|
8169
8170
|
initialCollections: t.initialCollections,
|
|
8170
8171
|
onAddCollection: t.onAddCollection,
|
|
8171
8172
|
onCollectionMoved: t.onCollectionMoved,
|
|
8172
8173
|
onCollectionsChange: t.onCollectionsChange,
|
|
8173
8174
|
onPersistenceError: t.onPersistenceError
|
|
8174
|
-
}), { collections: v, pendingMoveIds: p, canMove: b, addCollection: y } = m, [w,
|
|
8175
|
-
|
|
8175
|
+
}), { collections: v, pendingMoveIds: p, canMove: b, addCollection: y } = m, [w, k] = D(/* @__PURE__ */ new Map()), S = O(s?.initialZoom ?? 1), N = j(() => S.current, []), R = O(null), { estimateSize: C, countSlices: W, renderCollection: V } = t, te = j((E, q, ue) => {
|
|
8176
|
+
k((Se) => {
|
|
8176
8177
|
const Re = E.toString(), Y = Se.get(Re);
|
|
8177
8178
|
return Y?.width === q && Y.height === ue ? Se : new Map(Se).set(Re, {
|
|
8178
8179
|
width: q,
|
|
8179
8180
|
height: ue
|
|
8180
8181
|
});
|
|
8181
8182
|
});
|
|
8182
|
-
}, []), $ = ho(C), z = ho(j((E) => (q) => V(E, q), [V])), I = j((E) => w.get(E.id.toString()) ?? $(E), [w, $]), { placed:
|
|
8183
|
+
}, []), $ = ho(C), z = ho(j((E) => (q) => V(E, q), [V])), I = j((E) => w.get(E.id.toString()) ?? $(E), [w, $]), { placed: M, moveCollection: B, collectionMoved: L, collectionMoveCanceled: A } = $m(m, I, f), G = j((E) => Mm({
|
|
8183
8184
|
documentId: e,
|
|
8184
|
-
collections:
|
|
8185
|
+
collections: M,
|
|
8185
8186
|
estimateSize: C,
|
|
8186
8187
|
countSlices: W,
|
|
8187
8188
|
renderCollection: V,
|
|
8188
8189
|
links: n,
|
|
8189
8190
|
stickyNotes: r,
|
|
8190
|
-
changes:
|
|
8191
|
+
changes: d,
|
|
8191
8192
|
options: E
|
|
8192
8193
|
}), [
|
|
8193
8194
|
e,
|
|
8194
|
-
|
|
8195
|
+
M,
|
|
8195
8196
|
C,
|
|
8196
8197
|
W,
|
|
8197
8198
|
V,
|
|
8198
8199
|
n,
|
|
8199
8200
|
r,
|
|
8200
|
-
|
|
8201
|
-
]), _ = Pm(e,
|
|
8201
|
+
d
|
|
8202
|
+
]), _ = Pm(e, M, t, w, c, s?.onHandleReady, s?.initialZoom, s?.initialPan);
|
|
8202
8203
|
Mt(u, () => ({
|
|
8203
8204
|
addCollection: y,
|
|
8204
8205
|
addStickyNote: (E) => R.current?.add(E),
|
|
@@ -8210,10 +8211,10 @@ var _m = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor
|
|
|
8210
8211
|
G,
|
|
8211
8212
|
_.scrollTo
|
|
8212
8213
|
]);
|
|
8213
|
-
const U = ce(() => Im(
|
|
8214
|
+
const U = ce(() => Im(M.map((E) => ({
|
|
8214
8215
|
position: E.position,
|
|
8215
8216
|
size: $(E)
|
|
8216
|
-
}))), [
|
|
8217
|
+
}))), [M, $]), K = ce(() => Om(v.reduce((E, q) => E + W(q), 0)), [v, W]), T = ce(() => M.flatMap((E) => {
|
|
8217
8218
|
const q = w.get(E.id.toString());
|
|
8218
8219
|
return q ? [{
|
|
8219
8220
|
id: E.id,
|
|
@@ -8221,7 +8222,7 @@ var _m = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor
|
|
|
8221
8222
|
width: q.width,
|
|
8222
8223
|
height: q.height
|
|
8223
8224
|
}] : [];
|
|
8224
|
-
}), [
|
|
8225
|
+
}), [M, w]), H = j((E) => {
|
|
8225
8226
|
for (const q of v) {
|
|
8226
8227
|
const ue = t.path?.(q, E);
|
|
8227
8228
|
if (ue) return ue;
|
|
@@ -8233,7 +8234,7 @@ var _m = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor
|
|
|
8233
8234
|
pan: q
|
|
8234
8235
|
}, X?.(E, q);
|
|
8235
8236
|
}, [X, _.transform]), P = /* @__PURE__ */ x(ne, { children: [
|
|
8236
|
-
|
|
8237
|
+
M.map((E) => /* @__PURE__ */ a(Xi, {
|
|
8237
8238
|
collection: E,
|
|
8238
8239
|
estimatedSize: $(E),
|
|
8239
8240
|
measuredSize: w.get(E.id.toString()),
|
|
@@ -8274,7 +8275,7 @@ var _m = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor
|
|
|
8274
8275
|
height: "100%",
|
|
8275
8276
|
...s?.style
|
|
8276
8277
|
},
|
|
8277
|
-
showMinimap:
|
|
8278
|
+
showMinimap: l,
|
|
8278
8279
|
minimapItems: U.items,
|
|
8279
8280
|
minimapWorldWidth: U.worldWidth,
|
|
8280
8281
|
minimapWorldHeight: U.worldHeight,
|
|
@@ -8283,10 +8284,10 @@ var _m = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor
|
|
|
8283
8284
|
onTransformChange: oe,
|
|
8284
8285
|
children: t.area ? t.area(m, P) : /* @__PURE__ */ a(ot, { children: P })
|
|
8285
8286
|
});
|
|
8286
|
-
}, Ji = ({ id: e, readOnly: t = !1, showMinimap: n = !0, showLogo: r = !1, showViewOptions: o = !1, toolbar: i, editor: s, ...
|
|
8287
|
-
const
|
|
8287
|
+
}, Ji = ({ id: e, readOnly: t = !1, showMinimap: n = !0, showLogo: r = !1, showViewOptions: o = !1, toolbar: i, editor: s, ...l }) => {
|
|
8288
|
+
const d = ce(() => ({ changes: l.changes }), [l.changes]), c = /* @__PURE__ */ a(Bs, {
|
|
8288
8289
|
readOnly: t,
|
|
8289
|
-
markers:
|
|
8290
|
+
markers: d,
|
|
8290
8291
|
editing: t ? void 0 : s?.editing,
|
|
8291
8292
|
actions: t ? void 0 : s?.actions,
|
|
8292
8293
|
selection: s?.selection,
|
|
@@ -8296,14 +8297,14 @@ var _m = ({ id: e, collections: t, links: n, stickyNotes: r, readOnly: o, editor
|
|
|
8296
8297
|
readOnly: t,
|
|
8297
8298
|
showMinimap: n,
|
|
8298
8299
|
editor: s,
|
|
8299
|
-
...
|
|
8300
|
+
...l
|
|
8300
8301
|
}, e.toString())
|
|
8301
8302
|
});
|
|
8302
8303
|
return !r && !o && i === void 0 ? c : /* @__PURE__ */ a(qi, {
|
|
8303
8304
|
showLogo: r,
|
|
8304
8305
|
showViewOptions: o,
|
|
8305
8306
|
toolbar: i,
|
|
8306
|
-
chrome:
|
|
8307
|
+
chrome: l.canvas?.chrome,
|
|
8307
8308
|
children: c
|
|
8308
8309
|
});
|
|
8309
8310
|
}, Dm = 360, Fm = {
|
|
@@ -8316,9 +8317,9 @@ function Bm(e) {
|
|
|
8316
8317
|
y: Math.max(...e.map((t) => t.y)) + Dm
|
|
8317
8318
|
};
|
|
8318
8319
|
}
|
|
8319
|
-
var Hm = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o = !0, changes: i, initialFocus: s, handle:
|
|
8320
|
-
const c = t ? void 0 : n?.collection, u = t ? void 0 : n?.collectionBoundary, g = t ? void 0 : n?.collections, f = j((w,
|
|
8321
|
-
const S =
|
|
8320
|
+
var Hm = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o = !0, changes: i, initialFocus: s, handle: l, sliceLinks: d }) => {
|
|
8321
|
+
const c = t ? void 0 : n?.collection, u = t ? void 0 : n?.collectionBoundary, g = t ? void 0 : n?.collections, f = j((w, k) => {
|
|
8322
|
+
const S = k({
|
|
8322
8323
|
collection: w,
|
|
8323
8324
|
...c?.(w)
|
|
8324
8325
|
});
|
|
@@ -8331,8 +8332,8 @@ var Hm = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
8331
8332
|
initialCollections: e.collections,
|
|
8332
8333
|
estimateSize: p,
|
|
8333
8334
|
countSlices: Rm,
|
|
8334
|
-
contains: (w,
|
|
8335
|
-
path: (w,
|
|
8335
|
+
contains: (w, k) => !!Un(w, k),
|
|
8336
|
+
path: (w, k) => Un(w, k),
|
|
8336
8337
|
renderCollection: f,
|
|
8337
8338
|
...g
|
|
8338
8339
|
}), [
|
|
@@ -8351,8 +8352,8 @@ var Hm = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
8351
8352
|
showMinimap: o,
|
|
8352
8353
|
changes: i,
|
|
8353
8354
|
initialFocus: s,
|
|
8354
|
-
handle:
|
|
8355
|
-
sliceLinks:
|
|
8355
|
+
handle: l,
|
|
8356
|
+
sliceLinks: d
|
|
8356
8357
|
});
|
|
8357
8358
|
return m === void 0 && v === void 0 ? y : /* @__PURE__ */ a("div", {
|
|
8358
8359
|
style: {
|
|
@@ -8362,30 +8363,30 @@ var Hm = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
8362
8363
|
"data-board-density": m ?? "compact",
|
|
8363
8364
|
children: y
|
|
8364
8365
|
});
|
|
8365
|
-
}, Yv = ({ showLogo: e = !1, showViewOptions: t = !1, toolbar: n, handle: r, editor: o, readOnly: i = !1, document: s, ...
|
|
8366
|
-
const
|
|
8366
|
+
}, Yv = ({ showLogo: e = !1, showViewOptions: t = !1, toolbar: n, handle: r, editor: o, readOnly: i = !1, document: s, ...l }) => {
|
|
8367
|
+
const d = O(null);
|
|
8367
8368
|
Mt(r, () => ({
|
|
8368
|
-
scrollTo: (h, m) =>
|
|
8369
|
-
revealSlice: (h, m) =>
|
|
8370
|
-
addCollection: (h, m) =>
|
|
8371
|
-
addStickyNote: (h) =>
|
|
8372
|
-
exportImage: (h) =>
|
|
8369
|
+
scrollTo: (h, m) => d.current?.scrollTo(h, m) ?? Promise.resolve(!1),
|
|
8370
|
+
revealSlice: (h, m) => d.current?.revealSlice(h, m) ?? Promise.resolve(!1),
|
|
8371
|
+
addCollection: (h, m) => d.current?.addCollection(h, m) ?? Promise.resolve(),
|
|
8372
|
+
addStickyNote: (h) => d.current?.addStickyNote(h),
|
|
8373
|
+
exportImage: (h) => d.current?.exportImage(h) ?? Promise.reject(/* @__PURE__ */ new Error("Board is not ready to export."))
|
|
8373
8374
|
}), []);
|
|
8374
8375
|
const c = !i && !!o?.collections?.onAddCollection, u = j(() => {
|
|
8375
8376
|
const h = Bm(s.collections.map((m) => m.position));
|
|
8376
|
-
|
|
8377
|
+
d.current?.addCollection(h.x, h.y);
|
|
8377
8378
|
}, [s.collections]), g = c ? /* @__PURE__ */ a(zu, { onAddModule: u }) : void 0, f = /* @__PURE__ */ a(Hm, {
|
|
8378
|
-
...
|
|
8379
|
+
...l,
|
|
8379
8380
|
document: s,
|
|
8380
8381
|
editor: o,
|
|
8381
8382
|
readOnly: i,
|
|
8382
|
-
handle:
|
|
8383
|
+
handle: d
|
|
8383
8384
|
});
|
|
8384
8385
|
return !e && !t && !g && n === void 0 ? f : /* @__PURE__ */ a(qi, {
|
|
8385
8386
|
showLogo: e,
|
|
8386
8387
|
showViewOptions: t,
|
|
8387
8388
|
toolbar: g ? /* @__PURE__ */ x(ne, { children: [g, n] }) : n,
|
|
8388
|
-
chrome:
|
|
8389
|
+
chrome: l.canvas?.chrome,
|
|
8389
8390
|
children: f
|
|
8390
8391
|
});
|
|
8391
8392
|
}, Xv = ({ slotName: e, order: t, children: n }) => {
|
|
@@ -8403,7 +8404,7 @@ var Hm = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
8403
8404
|
}, jm = () => (po++ === 0 && fo.forEach((e) => document.addEventListener(e, bo, !0)), () => {
|
|
8404
8405
|
--po === 0 && (fo.forEach((e) => document.removeEventListener(e, bo, !0)), yr = null);
|
|
8405
8406
|
}), qm = () => yr, Vm = () => (ie(() => jm(), []), qm), Gm = ({ sliceId: e, sliceType: t, status: n, children: r }) => {
|
|
8406
|
-
const { readOnly: o, presentation: i } = re(), s = Rs(o, i.detailLevel, n),
|
|
8407
|
+
const { readOnly: o, presentation: i } = re(), s = Rs(o, i.detailLevel, n), l = ce(() => ({
|
|
8407
8408
|
readOnly: s,
|
|
8408
8409
|
sliceId: e,
|
|
8409
8410
|
sliceType: t
|
|
@@ -8413,13 +8414,13 @@ var Hm = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
8413
8414
|
t
|
|
8414
8415
|
]);
|
|
8415
8416
|
return /* @__PURE__ */ a($i.Provider, {
|
|
8416
|
-
value:
|
|
8417
|
+
value: l,
|
|
8417
8418
|
children: r
|
|
8418
8419
|
});
|
|
8419
8420
|
}, Um = (e, t) => e === Ue.output ? t.translationDirection.output : t.translationDirection.input, Ym = (e, t) => e === Ue.output ? t.translationDirection.changeToInput : t.translationDirection.changeToOutput, Xm = (e) => e === Ue.output ? "pi pi-send" : "pi pi-inbox", Zm = ({ direction: e, onDirectionChanged: t }) => {
|
|
8420
|
-
const { readOnly: n, messages: r } = re(), [o, i] = D(e), [s,
|
|
8421
|
+
const { readOnly: n, messages: r } = re(), [o, i] = D(e), [s, l] = D(!1);
|
|
8421
8422
|
ie(() => i(e), [e]);
|
|
8422
|
-
const
|
|
8423
|
+
const d = /* @__PURE__ */ a("i", {
|
|
8423
8424
|
className: Xm(o),
|
|
8424
8425
|
style: { fontSize: 10 },
|
|
8425
8426
|
"aria-hidden": "true"
|
|
@@ -8428,16 +8429,16 @@ var Hm = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
8428
8429
|
className: "event-modeling-translation-direction event-modeling-translation-direction--readonly",
|
|
8429
8430
|
title: c,
|
|
8430
8431
|
"aria-label": c,
|
|
8431
|
-
children:
|
|
8432
|
+
children: d
|
|
8432
8433
|
});
|
|
8433
8434
|
const u = async () => {
|
|
8434
8435
|
if (s) return;
|
|
8435
8436
|
const f = o, h = f === Ue.input ? Ue.output : Ue.input;
|
|
8436
|
-
i(h),
|
|
8437
|
+
i(h), l(!0);
|
|
8437
8438
|
try {
|
|
8438
8439
|
await t(h) === !1 && i(f);
|
|
8439
8440
|
} finally {
|
|
8440
|
-
|
|
8441
|
+
l(!1);
|
|
8441
8442
|
}
|
|
8442
8443
|
}, g = Ym(o, r);
|
|
8443
8444
|
return /* @__PURE__ */ a("button", {
|
|
@@ -8447,15 +8448,15 @@ var Hm = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
8447
8448
|
"aria-label": g,
|
|
8448
8449
|
disabled: s,
|
|
8449
8450
|
onClick: u,
|
|
8450
|
-
children:
|
|
8451
|
+
children: d
|
|
8451
8452
|
});
|
|
8452
8453
|
}, Km = {
|
|
8453
8454
|
fontSize: 11,
|
|
8454
8455
|
fontWeight: 500,
|
|
8455
8456
|
color: "color-mix(in srgb, var(--board-ink, #ffffff) 80%, transparent)",
|
|
8456
8457
|
textAlign: "center"
|
|
8457
|
-
}, Qi = ({ slice: e, height: t, collapsed: n, selectableStatuses: r, unselectableStatusReason: o, error: i, leading: s, trailing:
|
|
8458
|
-
const c = re(), u = ze(e.id), g = Jn(e.id, "slice", e.name), { showStatuses: f = !0 } = Ee(), { readOnly: h } = Qe(), { editing: m, actions: v } = c, p = m.onSliceRenamed, b = m.onSliceStatusChanged, y = m.onTranslationDirectionChanged, w = m.onSliceAdded,
|
|
8458
|
+
}, Qi = ({ slice: e, height: t, collapsed: n, selectableStatuses: r, unselectableStatusReason: o, error: i, leading: s, trailing: l, onToggleCollapse: d }) => {
|
|
8459
|
+
const c = re(), u = ze(e.id), g = Jn(e.id, "slice", e.name), { showStatuses: f = !0 } = Ee(), { readOnly: h } = Qe(), { editing: m, actions: v } = c, p = m.onSliceRenamed, b = m.onSliceStatusChanged, y = m.onTranslationDirectionChanged, w = m.onSliceAdded, k = m.onSliceOpenStateSet, S = (v.sliceHeader ?? []).filter((C) => !C.when || C.when(e)), N = /* @__PURE__ */ a(fe, {
|
|
8459
8460
|
content: /* @__PURE__ */ a(oc, { sliceType: e.sliceType }),
|
|
8460
8461
|
position: "bottom",
|
|
8461
8462
|
children: /* @__PURE__ */ a(ln, {
|
|
@@ -8487,7 +8488,7 @@ var Hm = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
8487
8488
|
children: [
|
|
8488
8489
|
/* @__PURE__ */ a(or, {
|
|
8489
8490
|
collapsed: n,
|
|
8490
|
-
onToggle: c.readOnly ?
|
|
8491
|
+
onToggle: c.readOnly ? d : !h && k ? () => k(e.id, !n) : void 0
|
|
8491
8492
|
}),
|
|
8492
8493
|
g.marker,
|
|
8493
8494
|
!n && s
|
|
@@ -8522,7 +8523,7 @@ var Hm = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: o
|
|
|
8522
8523
|
direction: e.translationDirection ?? Ue.input,
|
|
8523
8524
|
onDirectionChanged: y && !h ? (C) => y(e.id, C) : void 0
|
|
8524
8525
|
}),
|
|
8525
|
-
!c.readOnly &&
|
|
8526
|
+
!c.readOnly && l,
|
|
8526
8527
|
!c.readOnly && S.map((C) => /* @__PURE__ */ a("button", {
|
|
8527
8528
|
type: "button",
|
|
8528
8529
|
className: "event-modeling-grid-add-button event-modeling-grid-add-button--small event-modeling-grid-add-button--no-circle",
|
|
@@ -8600,16 +8601,16 @@ var tg = 3, ng = ({ drag: e, headerHeight: t }) => e ? pt(/* @__PURE__ */ a(rg,
|
|
|
8600
8601
|
}, yo = ({ isValid: e, marginLeft: t }) => /* @__PURE__ */ a("div", {
|
|
8601
8602
|
className: Jm(e),
|
|
8602
8603
|
style: { marginLeft: t }
|
|
8603
|
-
}), Nn = ({ moduleId: e, featureId: t, active: n = !1, busy: r = !1, acceptsReorder: o = !0, acceptsMove: i = !0, style: s, className:
|
|
8604
|
+
}), Nn = ({ moduleId: e, featureId: t, active: n = !1, busy: r = !1, acceptsReorder: o = !0, acceptsMove: i = !0, style: s, className: l, children: d }) => /* @__PURE__ */ a("div", {
|
|
8604
8605
|
"data-slice-drop-target": "true",
|
|
8605
8606
|
"data-slice-module-id": e.toString(),
|
|
8606
8607
|
"data-slice-feature-id": t.toString(),
|
|
8607
8608
|
"data-slice-accepts-reorder": o,
|
|
8608
8609
|
"data-slice-accepts-move": i,
|
|
8609
8610
|
"aria-busy": r || void 0,
|
|
8610
|
-
className: [n && "event-modeling-grid-slice-drop-target--active",
|
|
8611
|
+
className: [n && "event-modeling-grid-slice-drop-target--active", l].filter(Boolean).join(" ") || void 0,
|
|
8611
8612
|
style: s,
|
|
8612
|
-
children:
|
|
8613
|
+
children: d
|
|
8613
8614
|
}), og = (e) => {
|
|
8614
8615
|
if (!e.targetFeatureId.equals(e.featureId)) return { index: e.dropIndex };
|
|
8615
8616
|
const t = e.dropIndex > e.sourceIndex ? e.dropIndex - 1 : e.dropIndex;
|
|
@@ -8618,13 +8619,13 @@ var tg = 3, ng = ({ drag: e, headerHeight: t }) => e ? pt(/* @__PURE__ */ a(rg,
|
|
|
8618
8619
|
function ig(e, t, n, r) {
|
|
8619
8620
|
const [o, i] = D(), s = O(void 0);
|
|
8620
8621
|
s.current = o;
|
|
8621
|
-
const
|
|
8622
|
-
|
|
8623
|
-
const
|
|
8624
|
-
|
|
8622
|
+
const l = O(r);
|
|
8623
|
+
l.current = r;
|
|
8624
|
+
const d = O(n);
|
|
8625
|
+
d.current = n;
|
|
8625
8626
|
const { readOnly: c } = re(), u = j((v, p, b) => {
|
|
8626
8627
|
try {
|
|
8627
|
-
return
|
|
8628
|
+
return l.current?.(v, p, b);
|
|
8628
8629
|
} catch (y) {
|
|
8629
8630
|
console.error("Slice drop validation failed — allowing the drop", y);
|
|
8630
8631
|
return;
|
|
@@ -8632,7 +8633,7 @@ function ig(e, t, n, r) {
|
|
|
8632
8633
|
}, []), g = j((v, p, b) => {
|
|
8633
8634
|
const y = document.querySelector(`[data-slice-drop-target="true"][data-slice-module-id="${v.toString()}"][data-slice-feature-id="${b.toString()}"]`);
|
|
8634
8635
|
return b.equals(p) ? y?.dataset.sliceAcceptsReorder === "true" : y?.dataset.sliceAcceptsMove === "true";
|
|
8635
|
-
}, []), f = j((v, p, b, y, w,
|
|
8636
|
+
}, []), f = j((v, p, b, y, w, k, S, N = null) => {
|
|
8636
8637
|
const R = e.slices.findIndex((W) => W.id.equals(v));
|
|
8637
8638
|
if (R === -1) return;
|
|
8638
8639
|
const C = u(v, e.id, R);
|
|
@@ -8648,7 +8649,7 @@ function ig(e, t, n, r) {
|
|
|
8648
8649
|
currentX: b,
|
|
8649
8650
|
currentY: y,
|
|
8650
8651
|
dropIndex: R,
|
|
8651
|
-
headerY:
|
|
8652
|
+
headerY: k,
|
|
8652
8653
|
zoom: S,
|
|
8653
8654
|
isValid: (C?.isValid ?? !0) && g(t, e.id, e.id),
|
|
8654
8655
|
invalidReason: C?.reason
|
|
@@ -8680,19 +8681,19 @@ function ig(e, t, n, r) {
|
|
|
8680
8681
|
const v = (b) => {
|
|
8681
8682
|
const y = s.current;
|
|
8682
8683
|
if (!y) return;
|
|
8683
|
-
const w = h(y.moduleId, b.clientX),
|
|
8684
|
+
const w = h(y.moduleId, b.clientX), k = m(w, b.clientX), S = u(y.sliceId, w, k);
|
|
8684
8685
|
i((N) => N ? {
|
|
8685
8686
|
...N,
|
|
8686
8687
|
currentX: b.clientX,
|
|
8687
8688
|
currentY: b.clientY,
|
|
8688
8689
|
targetFeatureId: w,
|
|
8689
|
-
dropIndex:
|
|
8690
|
+
dropIndex: k,
|
|
8690
8691
|
isValid: (S?.isValid ?? !0) && g(y.moduleId, y.featureId, w),
|
|
8691
8692
|
invalidReason: S?.reason
|
|
8692
8693
|
} : void 0);
|
|
8693
8694
|
}, p = () => {
|
|
8694
8695
|
const b = s.current, y = b && og(b);
|
|
8695
|
-
b && y && g(b.moduleId, b.featureId, b.targetFeatureId) &&
|
|
8696
|
+
b && y && g(b.moduleId, b.featureId, b.targetFeatureId) && d.current?.(b.sliceId, b.featureId, b.targetFeatureId, y.index), i(void 0);
|
|
8696
8697
|
};
|
|
8697
8698
|
return window.addEventListener("pointermove", v, !0), window.addEventListener("pointerup", p, !0), window.addEventListener("pointercancel", p, !0), () => {
|
|
8698
8699
|
window.removeEventListener("pointermove", v, !0), window.removeEventListener("pointerup", p, !0), window.removeEventListener("pointercancel", p, !0);
|
|
@@ -8709,15 +8710,15 @@ function ig(e, t, n, r) {
|
|
|
8709
8710
|
};
|
|
8710
8711
|
}
|
|
8711
8712
|
function ag(e, t, n, r, o) {
|
|
8712
|
-
const [i, s] = D(null),
|
|
8713
|
-
|
|
8713
|
+
const [i, s] = D(null), l = O(null), d = O(o);
|
|
8714
|
+
d.current = o;
|
|
8714
8715
|
const c = () => {
|
|
8715
|
-
|
|
8716
|
+
l.current !== null && (clearTimeout(l.current), l.current = null);
|
|
8716
8717
|
}, u = (v, p, b) => {
|
|
8717
8718
|
c(), s({
|
|
8718
8719
|
...v,
|
|
8719
8720
|
committed: !0
|
|
8720
|
-
}), v.element.setPointerCapture(v.pointerId), e &&
|
|
8721
|
+
}), v.element.setPointerCapture(v.pointerId), e && d.current?.(e, t, p, b, n, v.startY - v.grabOffsetY, sg(v.element), ed(v.element));
|
|
8721
8722
|
};
|
|
8722
8723
|
return ie(() => {
|
|
8723
8724
|
if (!i || i.committed) return;
|
|
@@ -8731,7 +8732,7 @@ function ag(e, t, n, r, o) {
|
|
|
8731
8732
|
return window.addEventListener("pointermove", v, !0), window.addEventListener("pointerup", p, !0), window.addEventListener("pointercancel", p, !0), () => {
|
|
8732
8733
|
window.removeEventListener("pointermove", v, !0), window.removeEventListener("pointerup", p, !0), window.removeEventListener("pointercancel", p, !0);
|
|
8733
8734
|
};
|
|
8734
|
-
}, [i]), ie(() => (!i || i.committed || i.pointerType !== "touch" || (
|
|
8735
|
+
}, [i]), ie(() => (!i || i.committed || i.pointerType !== "touch" || (l.current = setTimeout(() => u(i, i.startX, i.startY), 450)), c), [i]), {
|
|
8735
8736
|
onPointerDown: (v) => {
|
|
8736
8737
|
const p = v.currentTarget;
|
|
8737
8738
|
if (!e) return;
|
|
@@ -8767,10 +8768,10 @@ function sg(e) {
|
|
|
8767
8768
|
}
|
|
8768
8769
|
return 1;
|
|
8769
8770
|
}
|
|
8770
|
-
var lg = ({ featureId: e, name: t, status: n, width: r, collapsed: o, isDragging: i = !1, onDragStart: s, ref:
|
|
8771
|
+
var lg = ({ featureId: e, name: t, status: n, width: r, collapsed: o, isDragging: i = !1, onDragStart: s, ref: l, onMouseEnter: d, onMouseLeave: c, onFocusCapture: u, onBlurCapture: g, children: f }) => {
|
|
8771
8772
|
const { sliceId: h } = Qe(), m = ze(h), v = jo(Ps(h)), p = ag(h, t, r, o || !s, s);
|
|
8772
8773
|
return /* @__PURE__ */ a("div", {
|
|
8773
|
-
ref:
|
|
8774
|
+
ref: l,
|
|
8774
8775
|
"data-board-change": m,
|
|
8775
8776
|
"data-slice-col": "true",
|
|
8776
8777
|
"data-slice-feature-id": e.toString(),
|
|
@@ -8782,7 +8783,7 @@ var lg = ({ featureId: e, name: t, status: n, width: r, collapsed: o, isDragging
|
|
|
8782
8783
|
transition: "opacity 0.15s",
|
|
8783
8784
|
...i ? { opacity: 0.35 } : {}
|
|
8784
8785
|
},
|
|
8785
|
-
onMouseEnter:
|
|
8786
|
+
onMouseEnter: d,
|
|
8786
8787
|
onMouseLeave: c,
|
|
8787
8788
|
onFocusCapture: u,
|
|
8788
8789
|
onBlurCapture: g,
|
|
@@ -8793,14 +8794,14 @@ var lg = ({ featureId: e, name: t, status: n, width: r, collapsed: o, isDragging
|
|
|
8793
8794
|
onContextMenu: p.onContextMenu,
|
|
8794
8795
|
children: f
|
|
8795
8796
|
});
|
|
8796
|
-
}, dg = (e, t) => t !== null && e.contains(t), cg = ({ featureId: e, slice: t, eventCount: n, collapsed: r, isDragging: o = !1, onSliceDragStart: i, header: s, headerHeight:
|
|
8797
|
-
const { readOnly: g } = re(), f = Dd(t.id.toString()), { ref: h, onMouseEnter: m, onMouseLeave: v } = Hd(f?.connectedSliceIds), p = O(null), b = rr(p), [y, w] = D(!1),
|
|
8797
|
+
}, dg = (e, t) => t !== null && e.contains(t), cg = ({ featureId: e, slice: t, eventCount: n, collapsed: r, isDragging: o = !1, onSliceDragStart: i, header: s, headerHeight: l = 44, body: d, specifications: c, collapsedWidth: u }) => {
|
|
8798
|
+
const { readOnly: g } = re(), f = Dd(t.id.toString()), { ref: h, onMouseEnter: m, onMouseLeave: v } = Hd(f?.connectedSliceIds), p = O(null), b = rr(p), [y, w] = D(!1), k = O(!1), S = ri({
|
|
8798
8799
|
sliceType: t.sliceType,
|
|
8799
8800
|
eventCount: n
|
|
8800
8801
|
}), N = () => {
|
|
8801
|
-
|
|
8802
|
+
k.current = !0, m();
|
|
8802
8803
|
}, R = () => {
|
|
8803
|
-
|
|
8804
|
+
k.current = !1, y || v();
|
|
8804
8805
|
}, C = (V) => {
|
|
8805
8806
|
dg(V.currentTarget, V.target) && w(!0);
|
|
8806
8807
|
}, W = (V) => {
|
|
@@ -8808,7 +8809,7 @@ var lg = ({ featureId: e, name: t, status: n, width: r, collapsed: o, isDragging
|
|
|
8808
8809
|
(!(te instanceof Node) || !V.currentTarget.contains(te)) && w(!1);
|
|
8809
8810
|
};
|
|
8810
8811
|
return ie(() => {
|
|
8811
|
-
!y && !
|
|
8812
|
+
!y && !k.current && v();
|
|
8812
8813
|
}, [y, v]), /* @__PURE__ */ a(Gm, {
|
|
8813
8814
|
sliceId: t.id,
|
|
8814
8815
|
sliceType: t.sliceType,
|
|
@@ -8836,9 +8837,9 @@ var lg = ({ featureId: e, name: t, status: n, width: r, collapsed: o, isDragging
|
|
|
8836
8837
|
onBlurCapture: W,
|
|
8837
8838
|
children: [s ?? /* @__PURE__ */ a(Qi, {
|
|
8838
8839
|
slice: t,
|
|
8839
|
-
height:
|
|
8840
|
+
height: l,
|
|
8840
8841
|
collapsed: r
|
|
8841
|
-
}), typeof
|
|
8842
|
+
}), typeof d == "function" ? d(b) : b && d]
|
|
8842
8843
|
}), typeof c == "function" ? c(b, S) : b && c]
|
|
8843
8844
|
})
|
|
8844
8845
|
});
|
|
@@ -9021,22 +9022,22 @@ var gg = (e) => e === F.stateChange ? "State Change" : e === F.stateView ? "Stat
|
|
|
9021
9022
|
};
|
|
9022
9023
|
return n ? St(r, e.snapshot) : r;
|
|
9023
9024
|
}, St = (e, t) => {
|
|
9024
|
-
const n = e.additions.filter((h) => !h.confirmed || !Ge(t, h.slice.id)), r = e.outgoing.filter((h) => !h.confirmed || Ge(t, h.slice.id)), o = e.incoming.filter((h) => !h.confirmed || !Ge(t, h.slice.id)), i = e.order?.ids.filter((h) => Ge(t, h)), s = t.filter((h) => i?.some((m) => we(m, h.id))).map((h) => h.id),
|
|
9025
|
+
const n = e.additions.filter((h) => !h.confirmed || !Ge(t, h.slice.id)), r = e.outgoing.filter((h) => !h.confirmed || Ge(t, h.slice.id)), o = e.incoming.filter((h) => !h.confirmed || !Ge(t, h.slice.id)), i = e.order?.ids.filter((h) => Ge(t, h)), s = t.filter((h) => i?.some((m) => we(m, h.id))).map((h) => h.id), l = i !== void 0 && i.length > 0 && i.every((h, m) => we(h, s[m])), d = e.order?.confirmed && l ? void 0 : e.order, c = (h, m) => e.slices.find((v) => we(v.id, h)) ?? m, u = t.filter((h) => !r.some((m) => we(m.slice.id, h.id))).map((h) => e.additions.some((m) => we(m.slice.id, h.id)) || e.incoming.some((m) => we(m.slice.id, h.id)) ? c(h.id, h) : h), g = o.reduce((h, m) => Sr(h, c(m.slice.id, m.slice), m.index), u), f = n.reduce((h, m) => Ge(h, m.slice.id) ? h : wr(h, c(m.slice.id, m.slice), m.afterSliceId), g);
|
|
9025
9026
|
return {
|
|
9026
|
-
slices:
|
|
9027
|
+
slices: d ? kg(f, d.ids) : f,
|
|
9027
9028
|
snapshot: t,
|
|
9028
9029
|
additions: n,
|
|
9029
9030
|
outgoing: r,
|
|
9030
9031
|
incoming: o,
|
|
9031
|
-
order:
|
|
9032
|
+
order: d
|
|
9032
9033
|
};
|
|
9033
9034
|
}, kg = (e, t) => {
|
|
9034
9035
|
const n = t.map((o) => e.find((i) => we(i.id, o))).filter((o) => o !== void 0);
|
|
9035
9036
|
let r = 0;
|
|
9036
9037
|
return e.map((o) => t.some((i) => we(i, o.id)) ? n[r++] : o);
|
|
9037
9038
|
};
|
|
9038
|
-
function Eg({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollapsed: o, hideEmptyPlaceholder: i = !1, onSlicesChanged: s, takenArtifactNames:
|
|
9039
|
-
const { readOnly: m, messages: v } = re(), p = O(hg(t)), b = O(void 0), [y, w] = D(p.current), { slices:
|
|
9039
|
+
function Eg({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollapsed: o, hideEmptyPlaceholder: i = !1, onSlicesChanged: s, takenArtifactNames: l, createSlice: d, onAddSlice: c, onReorderSlices: u, onMoveSlice: g, validateSliceDrop: f, renderSlice: h }) {
|
|
9040
|
+
const { readOnly: m, messages: v } = re(), p = O(hg(t)), b = O(void 0), [y, w] = D(p.current), { slices: k } = y, S = O(!1), [N, R] = D(!1), C = j((_) => {
|
|
9040
9041
|
const U = p.current, K = _(U);
|
|
9041
9042
|
K !== U && (p.current = K, w(K), K.slices !== U.slices && (b.current = K.slices, s?.(K.slices)));
|
|
9042
9043
|
}, [s]);
|
|
@@ -9054,10 +9055,10 @@ function Eg({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
9054
9055
|
slices: K
|
|
9055
9056
|
};
|
|
9056
9057
|
});
|
|
9057
|
-
}, [C]), V = j((_, U) => C((K) => bg(K, _, U)), [C]), te = j((_, U) => C((K) => xg(K, _, U)), [C]), $ = j((_, U) => C((K) => Mg(K, _, U)), [C]), z = j((_) => [...p.current.additions, ...p.current.incoming].some((U) => U.slice.id.equals(_)) || !p.current.slices.some((U) => U.id.equals(_)) ? !1 : (C((U) => Sg(U, _)), !0), [C]), I = j((_, U) => C((K) => Cg(K, _, U)), [C]),
|
|
9058
|
+
}, [C]), V = j((_, U) => C((K) => bg(K, _, U)), [C]), te = j((_, U) => C((K) => xg(K, _, U)), [C]), $ = j((_, U) => C((K) => Mg(K, _, U)), [C]), z = j((_) => [...p.current.additions, ...p.current.incoming].some((U) => U.slice.id.equals(_)) || !p.current.slices.some((U) => U.id.equals(_)) ? !1 : (C((U) => Sg(U, _)), !0), [C]), I = j((_, U) => C((K) => Cg(K, _, U)), [C]), M = j((_, U, K) => {
|
|
9058
9059
|
if (m || !c || S.current) return;
|
|
9059
9060
|
S.current = !0, R(!0);
|
|
9060
|
-
const T = p.current.slices, H =
|
|
9061
|
+
const T = p.current.slices, H = d(vg(_, K, T.map((X) => X.name), l?.(T)));
|
|
9061
9062
|
C((X) => fg(X, H, U)), Promise.resolve().then(() => c(H, U)).then((X) => {
|
|
9062
9063
|
C((oe) => wo(oe, H.id, X));
|
|
9063
9064
|
}).catch(() => C((X) => wo(X, H.id))).finally(() => {
|
|
@@ -9065,13 +9066,13 @@ function Eg({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
9065
9066
|
});
|
|
9066
9067
|
}, [
|
|
9067
9068
|
m,
|
|
9068
|
-
l,
|
|
9069
9069
|
d,
|
|
9070
|
+
l,
|
|
9070
9071
|
c,
|
|
9071
9072
|
C
|
|
9072
9073
|
]);
|
|
9073
9074
|
Mt(e, () => ({
|
|
9074
|
-
addSlice:
|
|
9075
|
+
addSlice: M,
|
|
9075
9076
|
updateSlices: W,
|
|
9076
9077
|
addProjectedSlice: V,
|
|
9077
9078
|
moveIn: te,
|
|
@@ -9079,7 +9080,7 @@ function Eg({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
9079
9080
|
moveOut: z,
|
|
9080
9081
|
completeMoveOut: I
|
|
9081
9082
|
}), [
|
|
9082
|
-
|
|
9083
|
+
M,
|
|
9083
9084
|
W,
|
|
9084
9085
|
V,
|
|
9085
9086
|
te,
|
|
@@ -9089,8 +9090,8 @@ function Eg({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
9089
9090
|
]);
|
|
9090
9091
|
const B = ce(() => ({
|
|
9091
9092
|
id: r,
|
|
9092
|
-
slices:
|
|
9093
|
-
}), [r,
|
|
9093
|
+
slices: k
|
|
9094
|
+
}), [r, k]), L = j((_, U, K, T) => {
|
|
9094
9095
|
if (m || !U.equals(r)) return;
|
|
9095
9096
|
const H = p.current.slices.findIndex((X) => X.id.equals(_));
|
|
9096
9097
|
if (!(H < 0 || [...p.current.additions, ...p.current.incoming].some((X) => X.slice.id.equals(_)))) {
|
|
@@ -9114,7 +9115,7 @@ function Eg({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
9114
9115
|
z,
|
|
9115
9116
|
I
|
|
9116
9117
|
]), { sliceDrag: A, handleSliceDragStart: G } = ig(B, n, u || g ? L : void 0, f);
|
|
9117
|
-
return
|
|
9118
|
+
return k.length ? /* @__PURE__ */ x(ne, { children: [/* @__PURE__ */ a(ng, {
|
|
9118
9119
|
drag: A,
|
|
9119
9120
|
headerHeight: ae.headerHeight
|
|
9120
9121
|
}), /* @__PURE__ */ a(Nn, {
|
|
@@ -9129,7 +9130,7 @@ function Eg({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
9129
9130
|
flexDirection: "row",
|
|
9130
9131
|
alignItems: "flex-start"
|
|
9131
9132
|
},
|
|
9132
|
-
children:
|
|
9133
|
+
children: k.flatMap((_, U) => {
|
|
9133
9134
|
const K = A?.targetFeatureId.equals(r) ?? !1, T = U === 0 ? 0 : ae.sliceGap, H = [];
|
|
9134
9135
|
K && A?.dropIndex === U && H.push(/* @__PURE__ */ a(yo, {
|
|
9135
9136
|
isValid: A.isValid,
|
|
@@ -9143,10 +9144,10 @@ function Eg({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
9143
9144
|
sliceCollapsed: X,
|
|
9144
9145
|
isDragging: A?.sliceId.equals(_.id) ?? !1,
|
|
9145
9146
|
onSliceDragStart: [...y.additions, ...y.incoming].some((oe) => oe.slice.id.equals(_.id)) ? void 0 : G,
|
|
9146
|
-
addSlice:
|
|
9147
|
+
addSlice: M,
|
|
9147
9148
|
updateSlices: W
|
|
9148
9149
|
})
|
|
9149
|
-
}, _.id.toString())), K && U ===
|
|
9150
|
+
}, _.id.toString())), K && U === k.length - 1 && A?.dropIndex === k.length && H.push(/* @__PURE__ */ a(yo, {
|
|
9150
9151
|
isValid: A.isValid,
|
|
9151
9152
|
marginLeft: 2
|
|
9152
9153
|
}, "drop-end")), H;
|
|
@@ -9199,26 +9200,26 @@ var In = (e) => {
|
|
|
9199
9200
|
[Z.Chat]: "chat",
|
|
9200
9201
|
[Z.System]: "system"
|
|
9201
9202
|
}, Rg = ({ sliceType: e, contentRows: t, rowHeights: n, actors: r, renderCell: o }) => /* @__PURE__ */ a(ne, { children: t.flatMap((i) => {
|
|
9202
|
-
const s = Od(i, e, [...t]),
|
|
9203
|
-
if (
|
|
9203
|
+
const s = Od(i, e, [...t]), l = n[i], d = Ig[i];
|
|
9204
|
+
if (d === void 0) return [/* @__PURE__ */ a(ot, { children: o({
|
|
9204
9205
|
rowType: i,
|
|
9205
9206
|
conn: s,
|
|
9206
|
-
rowHeight:
|
|
9207
|
+
rowHeight: l
|
|
9207
9208
|
}) }, `row:${i}`)];
|
|
9208
9209
|
const c = dl(r, i);
|
|
9209
9210
|
return ll(e, i) ? c.length === 0 ? [/* @__PURE__ */ a(ot, { children: o({
|
|
9210
9211
|
rowType: i,
|
|
9211
9212
|
conn: s,
|
|
9212
|
-
rowHeight:
|
|
9213
|
-
}) }, `row:${
|
|
9213
|
+
rowHeight: l
|
|
9214
|
+
}) }, `row:${d}`)] : c.map((u) => /* @__PURE__ */ a(ot, { children: o({
|
|
9214
9215
|
rowType: i,
|
|
9215
9216
|
conn: s,
|
|
9216
|
-
rowHeight:
|
|
9217
|
+
rowHeight: l,
|
|
9217
9218
|
actor: u
|
|
9218
9219
|
}) }, `role:${u.id.toString()}`)) : Array.from({ length: Math.max(1, c.length) }, (u, g) => /* @__PURE__ */ a("div", {
|
|
9219
|
-
className: `event-modeling-grid-slice-cell event-modeling-grid-slice-cell--${
|
|
9220
|
-
style: { height:
|
|
9221
|
-
}, `row:${
|
|
9220
|
+
className: `event-modeling-grid-slice-cell event-modeling-grid-slice-cell--${d}`,
|
|
9221
|
+
style: { height: l }
|
|
9222
|
+
}, `row:${d}:${g}`));
|
|
9222
9223
|
}) }), Co = "38";
|
|
9223
9224
|
function Og(e) {
|
|
9224
9225
|
if (e.sliceType === F.stateChange && e.hasCommand) return yt.background;
|
|
@@ -9235,10 +9236,10 @@ var eh = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ne,
|
|
|
9235
9236
|
style: { background: `${o}${Co}` }
|
|
9236
9237
|
}), i > 0 && /* @__PURE__ */ a("span", {
|
|
9237
9238
|
className: "event-modeling-grid-slice-placeholder-chips",
|
|
9238
|
-
children: Array.from({ length: i }, (s,
|
|
9239
|
+
children: Array.from({ length: i }, (s, l) => /* @__PURE__ */ a("span", {
|
|
9239
9240
|
className: "event-modeling-grid-slice-placeholder-chip",
|
|
9240
9241
|
style: { background: `${ke.background}${Co}` }
|
|
9241
|
-
},
|
|
9242
|
+
}, l))
|
|
9242
9243
|
})]
|
|
9243
9244
|
}, r);
|
|
9244
9245
|
}) }), Ag = { fontSize: 10 }, Cr = ({ action: e }) => {
|
|
@@ -9315,11 +9316,11 @@ var eh = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ne,
|
|
|
9315
9316
|
title: Pr(o),
|
|
9316
9317
|
children: Pr(o)
|
|
9317
9318
|
}),
|
|
9318
|
-
ti(o).map((s,
|
|
9319
|
+
ti(o).map((s, l) => /* @__PURE__ */ a("span", {
|
|
9319
9320
|
className: "reaction-refusals__outcome",
|
|
9320
9321
|
title: s,
|
|
9321
9322
|
children: s
|
|
9322
|
-
},
|
|
9323
|
+
}, l))
|
|
9323
9324
|
]
|
|
9324
9325
|
}, i)),
|
|
9325
9326
|
n && tr(e).map((o, i) => {
|
|
@@ -9360,18 +9361,18 @@ var eh = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ne,
|
|
|
9360
9361
|
Rn.event,
|
|
9361
9362
|
Rn.custom
|
|
9362
9363
|
], Bg = ({ triggerType: e, onTriggerKindChosen: t, onTriggerOpened: n }) => {
|
|
9363
|
-
const r = be(), [o, i] = D(!1), s = O(null),
|
|
9364
|
-
bt(
|
|
9365
|
-
const
|
|
9364
|
+
const r = be(), [o, i] = D(!1), s = O(null), l = O([s]).current;
|
|
9365
|
+
bt(l, () => i(!1), o);
|
|
9366
|
+
const d = e === void 0 ? void 0 : ta(e), c = (u) => (g) => {
|
|
9366
9367
|
g.stopPropagation(), u();
|
|
9367
9368
|
};
|
|
9368
|
-
return
|
|
9369
|
+
return d ? /* @__PURE__ */ a("div", {
|
|
9369
9370
|
className: "system-row-cell__trigger-wrapper",
|
|
9370
9371
|
children: /* @__PURE__ */ a("button", {
|
|
9371
9372
|
className: "system-row-cell__trigger-btn system-row-cell__trigger-btn--active",
|
|
9372
9373
|
title: r.triggerControl.edit,
|
|
9373
9374
|
onPointerDown: c(n),
|
|
9374
|
-
children: /* @__PURE__ */ a("i", { className:
|
|
9375
|
+
children: /* @__PURE__ */ a("i", { className: d })
|
|
9375
9376
|
})
|
|
9376
9377
|
}) : /* @__PURE__ */ x("div", {
|
|
9377
9378
|
ref: s,
|
|
@@ -9398,8 +9399,8 @@ var eh = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ne,
|
|
|
9398
9399
|
}, u))
|
|
9399
9400
|
})]
|
|
9400
9401
|
});
|
|
9401
|
-
}, Hg = ({ sliceType: e, isSystemSlice: t, collapsed: n = !1, conn: r, rowHeight: o, triggerType: i, reactionRefusals: s, reactionInvocations:
|
|
9402
|
-
const { readOnly:
|
|
9402
|
+
}, Hg = ({ sliceType: e, isSystemSlice: t, collapsed: n = !1, conn: r, rowHeight: o, triggerType: i, reactionRefusals: s, reactionInvocations: l }) => {
|
|
9403
|
+
const { readOnly: d, sliceId: c } = Qe(), { onTriggerKindChosen: u, onTriggerOpened: g, onReactionRefusalsEdit: f } = re().editing, h = be(), m = i === void 0 ? void 0 : ta(i), v = { height: o }, p = t && e === F.automation;
|
|
9403
9404
|
return n ? /* @__PURE__ */ a("div", {
|
|
9404
9405
|
style: v,
|
|
9405
9406
|
className: "event-modeling-grid-slice-cell event-modeling-grid-slice-cell--centered event-modeling-grid-slice-cell--system event-modeling-grid-slice-cell--collapsed",
|
|
@@ -9419,17 +9420,17 @@ var eh = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ne,
|
|
|
9419
9420
|
className: "system-row-cell__cogwheel",
|
|
9420
9421
|
children: /* @__PURE__ */ a(yn, {})
|
|
9421
9422
|
}) : /* @__PURE__ */ a(yn, {})),
|
|
9422
|
-
p && ((s?.length ?? 0) > 0 || (
|
|
9423
|
+
p && ((s?.length ?? 0) > 0 || (l?.length ?? 0) > 0) && /* @__PURE__ */ a(Dg, {
|
|
9423
9424
|
branches: s ?? [],
|
|
9424
|
-
invocations:
|
|
9425
|
-
onEdit: !
|
|
9425
|
+
invocations: l,
|
|
9426
|
+
onEdit: !d && c && f ? (b) => f(c, b) : void 0
|
|
9426
9427
|
}),
|
|
9427
|
-
p && !
|
|
9428
|
+
p && !d && c && u && g && /* @__PURE__ */ a(Bg, {
|
|
9428
9429
|
triggerType: i,
|
|
9429
9430
|
onTriggerKindChosen: (b) => u(c, b),
|
|
9430
9431
|
onTriggerOpened: () => g(c)
|
|
9431
9432
|
}),
|
|
9432
|
-
p &&
|
|
9433
|
+
p && d && i !== void 0 && m && /* @__PURE__ */ a("div", {
|
|
9433
9434
|
className: "system-row-cell__trigger-wrapper",
|
|
9434
9435
|
children: /* @__PURE__ */ a("span", {
|
|
9435
9436
|
className: "system-row-cell__trigger-btn system-row-cell__trigger-btn--active system-row-cell__trigger-btn--readonly",
|
|
@@ -9459,7 +9460,7 @@ var eh = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ne,
|
|
|
9459
9460
|
}], zg = ({ templates: e, onFromScratch: t, onFromTemplate: n }) => {
|
|
9460
9461
|
const r = be().prototypes, o = O(null), i = () => o.current?.getBoundingClientRect() ?? new DOMRect(), s = Wg(e, r, {
|
|
9461
9462
|
onFromScratch: () => t(i()),
|
|
9462
|
-
onFromTemplate: (
|
|
9463
|
+
onFromTemplate: (l) => n(l, i())
|
|
9463
9464
|
});
|
|
9464
9465
|
return /* @__PURE__ */ a(fe, {
|
|
9465
9466
|
content: r.add,
|
|
@@ -9475,13 +9476,13 @@ var eh = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ne,
|
|
|
9475
9476
|
})
|
|
9476
9477
|
})
|
|
9477
9478
|
});
|
|
9478
|
-
}, jg = ({ elements: e, windowSize: t, layout: n, collapsed: r = !1, conn: o, rowHeight: i, actorId: s, hasScreen:
|
|
9479
|
-
const { readOnly: c, sliceId: u } = Qe(), { editing: g, actions: f, readOnly: h } = re(), { onPrototypeOpened: m, onPrototypeAdded: v } = g, p = O(null), [b, y] = D(), w = Ma().prototypeThumbnail,
|
|
9479
|
+
}, jg = ({ elements: e, windowSize: t, layout: n, collapsed: r = !1, conn: o, rowHeight: i, actorId: s, hasScreen: l = !1, renderThumbnail: d }) => {
|
|
9480
|
+
const { readOnly: c, sliceId: u } = Qe(), { editing: g, actions: f, readOnly: h } = re(), { onPrototypeOpened: m, onPrototypeAdded: v } = g, p = O(null), [b, y] = D(), w = Ma().prototypeThumbnail, k = { height: i }, S = "event-modeling-grid-slice-cell event-modeling-grid-slice-cell--centered event-modeling-grid-slice-cell--ui";
|
|
9480
9481
|
if (r) return /* @__PURE__ */ a("div", {
|
|
9481
|
-
style:
|
|
9482
|
+
style: k,
|
|
9482
9483
|
className: S
|
|
9483
9484
|
});
|
|
9484
|
-
const N = e.length > 0 ||
|
|
9485
|
+
const N = e.length > 0 || l, R = !c && u && m && u && m ? () => m(u, s, p.current?.getBoundingClientRect() ?? new DOMRect()) : h ? () => y(p.current?.getBoundingClientRect() ?? new DOMRect()) : void 0, C = /* @__PURE__ */ a(xa, {
|
|
9485
9486
|
elements: [...e],
|
|
9486
9487
|
windowSize: t,
|
|
9487
9488
|
layout: n,
|
|
@@ -9489,7 +9490,7 @@ var eh = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ne,
|
|
|
9489
9490
|
openTitle: h ? w.openPreview : void 0
|
|
9490
9491
|
});
|
|
9491
9492
|
return /* @__PURE__ */ x("div", {
|
|
9492
|
-
style:
|
|
9493
|
+
style: k,
|
|
9493
9494
|
className: S,
|
|
9494
9495
|
children: [
|
|
9495
9496
|
o.bottomOutgoing && N && /* @__PURE__ */ a(Lt, {}),
|
|
@@ -9500,7 +9501,7 @@ var eh = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ne,
|
|
|
9500
9501
|
ref: p,
|
|
9501
9502
|
className: `event-modeling-grid-ui-preview${R ? " event-modeling-grid-ui-preview--clickable" : ""}`,
|
|
9502
9503
|
"data-flow-node": pe.ui,
|
|
9503
|
-
children:
|
|
9504
|
+
children: d ? d({
|
|
9504
9505
|
elements: e,
|
|
9505
9506
|
windowSize: t,
|
|
9506
9507
|
layout: n,
|
|
@@ -9556,19 +9557,19 @@ var eh = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ne,
|
|
|
9556
9557
|
]
|
|
9557
9558
|
});
|
|
9558
9559
|
}, Vg = ({ collapsed: e = !1, conn: t, rowHeight: n, eventCount: r, children: o, after: i, corners: s }) => {
|
|
9559
|
-
const
|
|
9560
|
+
const l = "event-modeling-grid-slice-cell event-modeling-grid-slice-cell--centered event-modeling-grid-slice-cell--events";
|
|
9560
9561
|
if (e) return /* @__PURE__ */ a("div", {
|
|
9561
9562
|
style: { height: n },
|
|
9562
|
-
className:
|
|
9563
|
+
className: l,
|
|
9563
9564
|
children: Array.from({ length: r }, (c, u) => /* @__PURE__ */ a("div", { className: "event-modeling-grid-mini-card event-modeling-grid-mini-card--event" }, u))
|
|
9564
9565
|
});
|
|
9565
|
-
const
|
|
9566
|
+
const d = r > 0;
|
|
9566
9567
|
return /* @__PURE__ */ x("div", {
|
|
9567
9568
|
style: { height: n },
|
|
9568
|
-
className:
|
|
9569
|
+
className: l,
|
|
9569
9570
|
children: [
|
|
9570
|
-
t.topIncoming &&
|
|
9571
|
-
t.topOutgoing &&
|
|
9571
|
+
t.topIncoming && d && /* @__PURE__ */ a(Jt, {}),
|
|
9572
|
+
t.topOutgoing && d && /* @__PURE__ */ a(Qt, {}),
|
|
9572
9573
|
/* @__PURE__ */ x("div", {
|
|
9573
9574
|
className: "event-modeling-grid-slice-cell-cards",
|
|
9574
9575
|
children: [o, i]
|
|
@@ -9619,18 +9620,18 @@ var eh = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ne,
|
|
|
9619
9620
|
"data-rule-break": e,
|
|
9620
9621
|
onFocus: () => s(!0),
|
|
9621
9622
|
onBlur: () => s(!1),
|
|
9622
|
-
onPointerEnter: (
|
|
9623
|
-
|
|
9623
|
+
onPointerEnter: (l) => {
|
|
9624
|
+
l.pointerType === "mouse" && s(!0);
|
|
9624
9625
|
},
|
|
9625
9626
|
onPointerLeave: () => {
|
|
9626
9627
|
document.activeElement !== r.current && s(!1);
|
|
9627
9628
|
},
|
|
9628
|
-
onPointerDown: (
|
|
9629
|
-
onClick: (
|
|
9630
|
-
|
|
9629
|
+
onPointerDown: (l) => l.stopPropagation(),
|
|
9630
|
+
onClick: (l) => {
|
|
9631
|
+
l.stopPropagation(), s(!0);
|
|
9631
9632
|
},
|
|
9632
|
-
onKeyDown: (
|
|
9633
|
-
|
|
9633
|
+
onKeyDown: (l) => {
|
|
9634
|
+
l.stopPropagation(), l.key === "Escape" && s(!1);
|
|
9634
9635
|
},
|
|
9635
9636
|
children: "!"
|
|
9636
9637
|
}), /* @__PURE__ */ a(rn, {
|
|
@@ -9647,11 +9648,11 @@ var eh = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ne,
|
|
|
9647
9648
|
})
|
|
9648
9649
|
})] });
|
|
9649
9650
|
}, Zg = ({ sliceId: e, event: t, renameable: n, showDetails: r = !1, ruleBreak: o, annotations: i }) => {
|
|
9650
|
-
const { editing: s, actions:
|
|
9651
|
+
const { editing: s, actions: l, selection: d, messages: c } = re(), u = Me(), g = an(i), [f, h] = D(t.name), [m, v] = D(void 0);
|
|
9651
9652
|
ie(() => h(t.name), [t.name]);
|
|
9652
|
-
const p = s.onEventRenamed, b = n && !u && !!p, y = !!
|
|
9653
|
-
const
|
|
9654
|
-
v(void 0), !(!
|
|
9653
|
+
const p = s.onEventRenamed, b = n && !u && !!p, y = !!d.selectedArtifactId?.equals(t.id), w = () => {
|
|
9654
|
+
const k = m?.trim() ?? "";
|
|
9655
|
+
v(void 0), !(!k || !p) && h(p(e, t.id, k) ?? k);
|
|
9655
9656
|
};
|
|
9656
9657
|
return m !== void 0 ? /* @__PURE__ */ a("div", {
|
|
9657
9658
|
className: "event-modeling-grid-event-wrapper",
|
|
@@ -9687,8 +9688,8 @@ var eh = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ne,
|
|
|
9687
9688
|
marker: Ke(t) ? /* @__PURE__ */ a(kr, {}) : void 0,
|
|
9688
9689
|
schema: t.schema,
|
|
9689
9690
|
showDetails: r,
|
|
9690
|
-
actions:
|
|
9691
|
-
onActivate:
|
|
9691
|
+
actions: l.eventCard?.actions,
|
|
9692
|
+
onActivate: l.eventCard?.onActivate,
|
|
9692
9693
|
isSelected: y,
|
|
9693
9694
|
onStartEdit: b ? () => v(f) : void 0,
|
|
9694
9695
|
ariaLabel: `${c.events.openEvent} ${f}`,
|
|
@@ -9720,12 +9721,12 @@ function oa(e, t) {
|
|
|
9720
9721
|
const n = O(null), r = O(null), o = j(() => {
|
|
9721
9722
|
const s = n.current;
|
|
9722
9723
|
if (!s) return;
|
|
9723
|
-
const
|
|
9724
|
-
if (!
|
|
9725
|
-
const
|
|
9726
|
-
|
|
9727
|
-
board:
|
|
9728
|
-
origin:
|
|
9724
|
+
const l = s.closest(Kg);
|
|
9725
|
+
if (!l) return;
|
|
9726
|
+
const d = l.querySelector(`[data-event-id="${e.toString()}"]`)?.closest(".event-modeling-grid-event-wrapper");
|
|
9727
|
+
l.classList.add(Mo), s.classList.add(Vt), d?.classList.add(Vt), r.current = {
|
|
9728
|
+
board: l,
|
|
9729
|
+
origin: d
|
|
9729
9730
|
};
|
|
9730
9731
|
}, [e]), i = j(() => {
|
|
9731
9732
|
const s = r.current;
|
|
@@ -9758,7 +9759,7 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
9758
9759
|
"aria-hidden": "true"
|
|
9759
9760
|
})
|
|
9760
9761
|
});
|
|
9761
|
-
}, Jg = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: o, onNavigate: i, onRemove: s, removalPending:
|
|
9762
|
+
}, Jg = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: o, onNavigate: i, onRemove: s, removalPending: l = !1, isPublic: d = !1, ruleBreak: c, ariaLabel: u, ...g }) => {
|
|
9762
9763
|
const f = ze(e), h = be(), m = !!n && !n.equals(ve.empty) && !!i, v = oa(n ?? ve.empty, i);
|
|
9763
9764
|
return /* @__PURE__ */ x("div", {
|
|
9764
9765
|
ref: v.ref,
|
|
@@ -9778,14 +9779,14 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
9778
9779
|
change: f,
|
|
9779
9780
|
kind: h.interaction.externalEvent,
|
|
9780
9781
|
name: t
|
|
9781
|
-
}),
|
|
9782
|
+
}), d && /* @__PURE__ */ a(kr, {})] }),
|
|
9782
9783
|
...g
|
|
9783
9784
|
}),
|
|
9784
9785
|
c && /* @__PURE__ */ a(na, { ruleBreak: c }),
|
|
9785
9786
|
m && /* @__PURE__ */ a(ra, { onClick: v.handleNavigate }),
|
|
9786
9787
|
s && /* @__PURE__ */ a(ia, {
|
|
9787
9788
|
eventName: t,
|
|
9788
|
-
pending:
|
|
9789
|
+
pending: l,
|
|
9789
9790
|
onClick: (p) => {
|
|
9790
9791
|
p.stopPropagation(), s();
|
|
9791
9792
|
}
|
|
@@ -9793,7 +9794,7 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
9793
9794
|
]
|
|
9794
9795
|
});
|
|
9795
9796
|
}, Qg = ({ sliceId: e, event: t, selectable: n, showDetails: r = !1, projectedFromTheRight: o = !1, annotations: i = [] }) => {
|
|
9796
|
-
const { editing: s, selection:
|
|
9797
|
+
const { editing: s, selection: l, navigation: d, messages: c } = re(), u = Me() ? void 0 : s.onEventReferenceRemoved, g = ve.parse(t.sourceEventId ?? ve.empty.toString()), f = oa(g, d.onNavigateToEvent), h = !!l.selectedArtifactId?.equals(t.id), m = l.onArtifactSelected, v = ze(t.id), p = `${c.events.openEvent} ${t.name}`, b = o ? [{
|
|
9797
9798
|
severity: gt.warning,
|
|
9798
9799
|
message: c.events.projectedFromTheRight
|
|
9799
9800
|
}, ...i] : i, y = an(b);
|
|
@@ -9862,13 +9863,13 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
9862
9863
|
const n = new Set(e.events.flatMap((o) => o.sourceEventId ? [o.sourceEventId] : [])), r = new Set(e.events.map((o) => o.name));
|
|
9863
9864
|
return t.filter((o) => !n.has(o.id.toString()) && !r.has(o.name));
|
|
9864
9865
|
}, nv = ({ slice: e, collapsed: t = !1, conn: n, rowHeight: r, priorEvents: o, followingEvents: i = [], showDetails: s = !1 }) => {
|
|
9865
|
-
const { editing:
|
|
9866
|
+
const { editing: l, actions: d, messages: c } = re(), u = Me(), { onEventAdded: g, onEventReferenced: f } = l, h = xr(e.sliceType), m = Tg(e.sliceType, e.events.length), v = !(ct(e) && e.events.some((S) => !S.sourceEventId)), p = tv(e, o), b = ev(e, o, i), y = /* @__PURE__ */ new Map();
|
|
9866
9867
|
for (const S of e.annotations ?? []) {
|
|
9867
9868
|
if (!S.eventId) continue;
|
|
9868
9869
|
const N = S.eventId.toString().toLowerCase();
|
|
9869
9870
|
y.set(N, [...y.get(N) ?? [], S]);
|
|
9870
9871
|
}
|
|
9871
|
-
const w = (
|
|
9872
|
+
const w = (d.eventsRow ?? []).filter((S) => !S.when || S.when(e)), k = (S) => f && /* @__PURE__ */ a(_i, {
|
|
9872
9873
|
options: p,
|
|
9873
9874
|
nameOf: (N) => N.name,
|
|
9874
9875
|
onSelect: (N) => f(e.id, N),
|
|
@@ -9882,7 +9883,7 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
9882
9883
|
conn: n,
|
|
9883
9884
|
rowHeight: r,
|
|
9884
9885
|
eventCount: e.events.length,
|
|
9885
|
-
after: !u && m &&
|
|
9886
|
+
after: !u && m && k(!0),
|
|
9886
9887
|
corners: /* @__PURE__ */ x(ne, { children: [
|
|
9887
9888
|
!u && w.length > 0 && /* @__PURE__ */ a(Ct, {
|
|
9888
9889
|
placement: st.top,
|
|
@@ -9897,7 +9898,7 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
9897
9898
|
}),
|
|
9898
9899
|
!u && h && !m && f && /* @__PURE__ */ a(Ct, {
|
|
9899
9900
|
placement: st.add,
|
|
9900
|
-
children:
|
|
9901
|
+
children: k(!1)
|
|
9901
9902
|
})
|
|
9902
9903
|
] }),
|
|
9903
9904
|
children: e.events.map((S) => S.sourceEventId ? /* @__PURE__ */ a(Qg, {
|
|
@@ -9916,10 +9917,10 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
9916
9917
|
annotations: y.get(S.id.toString().toLowerCase())
|
|
9917
9918
|
}, S.id.toString()))
|
|
9918
9919
|
});
|
|
9919
|
-
}, ko = ({ sliceId: e, kind: t, artifactId: n, name: r, schema: o, description: i, documentation: s, showDetails:
|
|
9920
|
-
const u = an(
|
|
9920
|
+
}, ko = ({ sliceId: e, kind: t, artifactId: n, name: r, schema: o, description: i, documentation: s, showDetails: l = !1, annotations: d, onRenamed: c }) => {
|
|
9921
|
+
const u = an(d), { actions: g, selection: f, messages: h } = re(), m = Me(), [v, p] = D(r), [b, y] = D(void 0);
|
|
9921
9922
|
ie(() => p(r), [r]);
|
|
9922
|
-
const w = t === le.command,
|
|
9923
|
+
const w = t === le.command, k = w ? g.commandCard : g.readModelCardFor?.(n) ?? g.readModelCard, S = w ? yt : He, N = w ? h.interaction.command : h.interaction.readModel, R = !m && !!c, C = f.onArtifactSelected, W = () => {
|
|
9923
9924
|
const V = b?.trim() ?? "";
|
|
9924
9925
|
y(void 0), !(!V || !c) && (c(V), p(V));
|
|
9925
9926
|
};
|
|
@@ -9951,16 +9952,16 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
9951
9952
|
name: v,
|
|
9952
9953
|
schema: o,
|
|
9953
9954
|
description: i,
|
|
9954
|
-
showDetails:
|
|
9955
|
-
actions:
|
|
9956
|
-
onActivate:
|
|
9955
|
+
showDetails: l,
|
|
9956
|
+
actions: k?.actions,
|
|
9957
|
+
onActivate: k?.onActivate,
|
|
9957
9958
|
isSelected: !!f.selectedArtifactId?.equals(n),
|
|
9958
9959
|
onSelected: C ? () => C(n) : void 0,
|
|
9959
9960
|
onStartEdit: R ? () => y(v) : void 0,
|
|
9960
9961
|
ariaLabel: `${h.interaction.open} ${N}: ${v}`,
|
|
9961
9962
|
"data-card-id": n.toString(),
|
|
9962
9963
|
"data-slice-id": e.toString()
|
|
9963
|
-
}), u && /* @__PURE__ */ a(Mr, { annotations:
|
|
9964
|
+
}), u && /* @__PURE__ */ a(Mr, { annotations: d })]
|
|
9964
9965
|
})
|
|
9965
9966
|
});
|
|
9966
9967
|
}, On = "event-modeling-grid-slice-cell event-modeling-grid-slice-cell--centered event-modeling-grid-slice-cell--interaction", An = ({ collapsed: e = !1, conn: t, rowHeight: n, miniCards: r, layout: o }) => {
|
|
@@ -9968,7 +9969,7 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
9968
9969
|
if (e) return /* @__PURE__ */ a("div", {
|
|
9969
9970
|
style: i,
|
|
9970
9971
|
className: On,
|
|
9971
|
-
children: r.map((
|
|
9972
|
+
children: r.map((l, d) => /* @__PURE__ */ a("div", { className: `event-modeling-grid-mini-card event-modeling-grid-mini-card--${l}` }, d))
|
|
9972
9973
|
});
|
|
9973
9974
|
if (o.kind === "sideBySide") return /* @__PURE__ */ x("div", {
|
|
9974
9975
|
style: i,
|
|
@@ -10052,9 +10053,9 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10052
10053
|
return r.has(s) || o.has(s) ? !1 : (o.add(s), !0);
|
|
10053
10054
|
});
|
|
10054
10055
|
}, Eo = ({ sliceId: e, kind: t, artifactId: n, name: r, sources: o, onRenamed: i }) => {
|
|
10055
|
-
const { actions: s, selection:
|
|
10056
|
+
const { actions: s, selection: l, messages: d } = re(), c = Me(), [u, g] = D(r), [f, h] = D(void 0);
|
|
10056
10057
|
ie(() => g(r), [r]);
|
|
10057
|
-
const m = t === le.projection, v = m ? s.projectionCard : s.captureCard, p = m ? vr : hr, b = m ?
|
|
10058
|
+
const m = t === le.projection, v = m ? s.projectionCard : s.captureCard, p = m ? vr : hr, b = m ? d.interaction.projection : d.interaction.capture, y = !c && !!i, w = l.onArtifactSelected, k = o.length > 0 ? o.join(", ") : d.interaction.noSourceEvents, S = () => {
|
|
10058
10059
|
const N = f?.trim() ?? "";
|
|
10059
10060
|
h(void 0), !(!N || !i) && (i(N), g(N));
|
|
10060
10061
|
};
|
|
@@ -10066,7 +10067,7 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10066
10067
|
onCommit: S,
|
|
10067
10068
|
onCancel: () => h(void 0)
|
|
10068
10069
|
}) : /* @__PURE__ */ a(fe, {
|
|
10069
|
-
content: `${c ? "" : `${
|
|
10070
|
+
content: `${c ? "" : `${d.interaction.doubleClickToRenamePrefix} `}${b}: ${u}`,
|
|
10070
10071
|
position: "top",
|
|
10071
10072
|
children: /* @__PURE__ */ a("div", {
|
|
10072
10073
|
"data-flow-node": m ? pe.projection : pe.capture,
|
|
@@ -10074,24 +10075,24 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10074
10075
|
kind: t,
|
|
10075
10076
|
artifactId: n,
|
|
10076
10077
|
name: u,
|
|
10077
|
-
summary:
|
|
10078
|
+
summary: k,
|
|
10078
10079
|
actions: v?.actions,
|
|
10079
10080
|
onActivate: v?.onActivate,
|
|
10080
|
-
isSelected: !!
|
|
10081
|
+
isSelected: !!l.selectedArtifactId?.equals(n),
|
|
10081
10082
|
onSelected: w ? () => w(n) : void 0,
|
|
10082
10083
|
onStartEdit: y ? () => h(u) : void 0,
|
|
10083
|
-
ariaLabel: `${
|
|
10084
|
+
ariaLabel: `${d.interaction.open} ${b}: ${u}`,
|
|
10084
10085
|
"data-card-id": n.toString(),
|
|
10085
10086
|
"data-slice-id": e.toString()
|
|
10086
10087
|
})
|
|
10087
10088
|
})
|
|
10088
10089
|
});
|
|
10089
10090
|
}, av = ({ sliceId: e, commandActions: t, alternativeLabel: n, onAlternative: r, label: o }) => {
|
|
10090
|
-
const i = O(null), s = () => i.current?.getBoundingClientRect() ?? new DOMRect(),
|
|
10091
|
+
const i = O(null), s = () => i.current?.getBoundingClientRect() ?? new DOMRect(), l = [...t.map((d, c) => ({
|
|
10091
10092
|
id: `command-${c}`,
|
|
10092
|
-
label:
|
|
10093
|
-
disabled:
|
|
10094
|
-
onClick: () =>
|
|
10093
|
+
label: d.tooltip,
|
|
10094
|
+
disabled: d.disabled,
|
|
10095
|
+
onClick: () => d.onActivate(e, s())
|
|
10095
10096
|
})), {
|
|
10096
10097
|
id: "alternative",
|
|
10097
10098
|
label: n,
|
|
@@ -10106,7 +10107,7 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10106
10107
|
"aria-label": o,
|
|
10107
10108
|
children: "+"
|
|
10108
10109
|
}),
|
|
10109
|
-
items:
|
|
10110
|
+
items: l,
|
|
10110
10111
|
align: "right"
|
|
10111
10112
|
});
|
|
10112
10113
|
}, sv = (e) => {
|
|
@@ -10126,7 +10127,7 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10126
10127
|
];
|
|
10127
10128
|
}
|
|
10128
10129
|
}, lv = ({ slice: e, collapsed: t = !1, conn: n, rowHeight: r, externalEventOptions: o = [], priorEventOptions: i = [], showDetails: s = !1 }) => {
|
|
10129
|
-
const { editing:
|
|
10130
|
+
const { editing: l, actions: d, selection: c, navigation: u, messages: g } = re(), f = Me(), { onCommandRenamed: h, onReadModelRenamed: m, onReadModelAdded: v, onExternalEventAdded: p, onExternalEventRemoved: b, onProjectionRenamed: y, onCaptureRenamed: w, onProjectionAdded: k, onCaptureAdded: S } = l, N = iv(e, o, i), R = (d.interactionRow ?? []).filter((E) => !E.when || E.when(e)), C = sv(e), W = c.onArtifactSelected, { command: V, readModel: te } = e, $ = (E, q) => (e.annotations ?? []).filter((ue) => ue[E]?.toString().toLowerCase() === q.toString().toLowerCase()), z = V && /* @__PURE__ */ a(ko, {
|
|
10130
10131
|
sliceId: e.id,
|
|
10131
10132
|
kind: le.command,
|
|
10132
10133
|
artifactId: V.id,
|
|
@@ -10137,21 +10138,21 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10137
10138
|
showDetails: s,
|
|
10138
10139
|
annotations: $("commandId", V.id),
|
|
10139
10140
|
onRenamed: h && ((E) => h(e.id, V.id, E))
|
|
10140
|
-
}, V.id.toString()), { projection: I, capture:
|
|
10141
|
+
}, V.id.toString()), { projection: I, capture: M } = e, B = I && /* @__PURE__ */ a(Eo, {
|
|
10141
10142
|
sliceId: e.id,
|
|
10142
10143
|
kind: le.projection,
|
|
10143
10144
|
artifactId: I.id,
|
|
10144
10145
|
name: I.name,
|
|
10145
10146
|
sources: I.sources,
|
|
10146
10147
|
onRenamed: y && ((E) => y(e.id, I.id, E))
|
|
10147
|
-
}, I.id.toString()), L =
|
|
10148
|
+
}, I.id.toString()), L = M && /* @__PURE__ */ a(Eo, {
|
|
10148
10149
|
sliceId: e.id,
|
|
10149
10150
|
kind: le.capture,
|
|
10150
|
-
artifactId:
|
|
10151
|
-
name:
|
|
10152
|
-
sources:
|
|
10153
|
-
onRenamed: w && ((E) => w(e.id,
|
|
10154
|
-
},
|
|
10151
|
+
artifactId: M.id,
|
|
10152
|
+
name: M.name,
|
|
10153
|
+
sources: M.sources,
|
|
10154
|
+
onRenamed: w && ((E) => w(e.id, M.id, E))
|
|
10155
|
+
}, M.id.toString()), A = B ?? L ?? z, G = (E) => /* @__PURE__ */ a(ko, {
|
|
10155
10156
|
sliceId: e.id,
|
|
10156
10157
|
kind: le.readModel,
|
|
10157
10158
|
artifactId: E.id,
|
|
@@ -10181,7 +10182,7 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10181
10182
|
sourceEventId: E.sourceEventId ? ve.parse(E.sourceEventId) : void 0,
|
|
10182
10183
|
onNavigate: u.onNavigateToEvent,
|
|
10183
10184
|
onRemove: !f && b ? () => b(e.id, E.id) : void 0,
|
|
10184
|
-
removalPending:
|
|
10185
|
+
removalPending: l.isExternalEventRemovalPending?.(e.id, E.id),
|
|
10185
10186
|
isPublic: !!Se && Ke(Se),
|
|
10186
10187
|
ruleBreak: Ug(e, E, N),
|
|
10187
10188
|
isSelected: !!c.selectedArtifactId?.equals(E.id),
|
|
@@ -10192,13 +10193,13 @@ var ia = ({ onClick: e, eventName: t, pending: n = !1, label: r }) => {
|
|
|
10192
10193
|
})
|
|
10193
10194
|
})
|
|
10194
10195
|
}, E.id.toString());
|
|
10195
|
-
}, H = ct(e) ?
|
|
10196
|
+
}, H = ct(e) ? k && {
|
|
10196
10197
|
label: g.interaction.addProjection,
|
|
10197
|
-
add:
|
|
10198
|
+
add: k
|
|
10198
10199
|
} : S && {
|
|
10199
10200
|
label: g.interaction.addCapture,
|
|
10200
10201
|
add: S
|
|
10201
|
-
}, X = e.sliceType === F.translator && !V && !I && !
|
|
10202
|
+
}, X = e.sliceType === F.translator && !V && !I && !M && !!H, oe = !f && (R.length > 0 || X) && /* @__PURE__ */ a(Ct, {
|
|
10202
10203
|
placement: st.add,
|
|
10203
10204
|
children: X && H ? /* @__PURE__ */ a(av, {
|
|
10204
10205
|
sliceId: e.id,
|