@cratis/event-models 0.114.1 → 0.115.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/Rows/UserExperience/UiCell.d.ts +7 -2
- package/dist/Rows/UserExperience/UiThumbnailProps.d.ts +13 -0
- package/dist/Rows/UserExperience/index.d.ts +1 -0
- package/dist/index.js +163 -156
- package/dist/index.js.map +1 -1
- package/dist/screen-editor/ScreenEditor/Document/canvasMoveEdits.d.ts +7 -2
- package/dist/screen-editor/ScreenEditor/Document/placeOnCanvas.d.ts +8 -2
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorController.d.ts +7 -0
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorOverlay.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Play/PlayScreen.d.ts +11 -0
- package/dist/screen-editor/ScreenEditor/Play/composePlayScreen.d.ts +7 -0
- package/dist/screen-editor/ScreenEditor/Runtime/ScreenEditorAppearance.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/Runtime/profileTheme.d.ts +1 -1
- package/dist/screen-editor/ScreenEditor/Runtime/screenEditorRuntime.d.ts +3 -1
- package/dist/screen-editor/ScreenEditor/Runtime/screenEditorRuntimeForProfile.d.ts +2 -1
- package/dist/screen-editor/ScreenEditor/Surface/designTimePointer.d.ts +9 -0
- package/dist/screen-editor/ScreenEditor/Surface/useDesignTimePointer.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Thumbnail/ScreenThumbnail.d.ts +15 -0
- package/dist/screen-editor/ScreenEditor/Thumbnail/miniatureRegistry.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Thumbnail/readThumbnailDocument.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Thumbnail/thumbnailGeometry.d.ts +11 -0
- package/dist/screen-editor/ScreenEditor/Thumbnail/useIsNearViewport.d.ts +2 -0
- package/dist/screen-editor/ScreenEditor/Viewport/windowSizeMemory.d.ts +12 -0
- package/dist/screen-editor/ScreenEditor/Viewport/windowSizing.d.ts +10 -0
- package/dist/screen-editor/ScreenEditor/index.d.ts +8 -0
- package/dist/screen-editor/index.js +2074 -1740
- package/dist/screen-editor/screen-editor.css +1 -1
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -1652,8 +1652,8 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
|
|
|
1652
1652
|
flexShrink: 0,
|
|
1653
1653
|
display: "inline-block"
|
|
1654
1654
|
}), On = ({ rowType: e, height: t, name: n, description: r, actorId: i, onRenamed: o, validateName: s, onActorAdded: d, onDragStart: u, dragging: l = !1, badge: c, personaAvatar: f, children: y }) => {
|
|
1655
|
-
const { readOnly: h, messages: m } = K(), [g, v] = F(!1), [p, w] = F(!1), b = A(void 0), S = A(null), C = A(null),
|
|
1656
|
-
ze(N, () => v(!1), g), ze(
|
|
1655
|
+
const { readOnly: h, messages: m } = K(), [g, v] = F(!1), [p, w] = F(!1), b = A(void 0), S = A(null), C = A(null), L = A(null), N = oe(() => [C], []), O = oe(() => [L], []);
|
|
1656
|
+
ze(N, () => v(!1), g), ze(O, () => w(!1), p);
|
|
1657
1657
|
const j = n ?? ra(e, m), H = ia(e), M = H && !h ? o : void 0, T = H && !h ? d : void 0, W = i && !h ? u : void 0, X = h ? [] : c?.actions ?? [], D = h ? void 0 : c?.onActivate, z = X.length > 0 || !!D, I = f ?? c?.avatar, k = H && (!!I || !!c && !h), E = () => {
|
|
1658
1658
|
if (X.length > 0) {
|
|
1659
1659
|
w((P) => !P);
|
|
@@ -1696,7 +1696,7 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
|
|
|
1696
1696
|
children: [
|
|
1697
1697
|
k && /* @__PURE__ */ x("div", {
|
|
1698
1698
|
className: "event-modeling-grid-row-label-info",
|
|
1699
|
-
ref:
|
|
1699
|
+
ref: L,
|
|
1700
1700
|
children: [/* @__PURE__ */ a("button", {
|
|
1701
1701
|
className: "event-modeling-grid-row-label-info-btn",
|
|
1702
1702
|
onClick: (P) => {
|
|
@@ -1855,14 +1855,14 @@ var ma = ({ collectionId: e, topOffset: t, contentRows: n, rowHeights: r, actors
|
|
|
1855
1855
|
height: r[p],
|
|
1856
1856
|
name: f[p],
|
|
1857
1857
|
onRenamed: d ? (N) => {
|
|
1858
|
-
y((
|
|
1859
|
-
...
|
|
1858
|
+
y((O) => ({
|
|
1859
|
+
...O,
|
|
1860
1860
|
[p]: N
|
|
1861
1861
|
})), d(p, N);
|
|
1862
1862
|
} : void 0,
|
|
1863
|
-
validateName: (N) => Object.entries(f).find(([
|
|
1863
|
+
validateName: (N) => Object.entries(f).find(([O]) => O !== p)?.[1]?.toLowerCase() === N.toLowerCase() ? "Name already in use" : void 0,
|
|
1864
1864
|
onActorAdded: o ? (N) => o(p, N) : void 0
|
|
1865
|
-
}, C = w === void 0 || b.length === 0 ? [/* @__PURE__ */ a(Ae, { children: w !== void 0 && c ? c(p, S) : /* @__PURE__ */ a(On, { ...S }) }, p)] : [],
|
|
1865
|
+
}, C = w === void 0 || b.length === 0 ? [/* @__PURE__ */ a(Ae, { children: w !== void 0 && c ? c(p, S) : /* @__PURE__ */ a(On, { ...S }) }, p)] : [], L = b.flatMap((N, O) => {
|
|
1866
1866
|
const j = g?.rowType === p, H = {
|
|
1867
1867
|
rowType: p,
|
|
1868
1868
|
height: r[p],
|
|
@@ -1880,12 +1880,12 @@ var ma = ({ collectionId: e, topOffset: t, contentRows: n, rowHeights: r, actors
|
|
|
1880
1880
|
dragging: g?.actorId === N.id
|
|
1881
1881
|
};
|
|
1882
1882
|
return [
|
|
1883
|
-
...j && g.dropIndex ===
|
|
1883
|
+
...j && g.dropIndex === O ? [/* @__PURE__ */ a(Rn, {}, `drop-${p}-${O}`)] : [],
|
|
1884
1884
|
/* @__PURE__ */ a(Ae, { children: l ? l(N, H) : /* @__PURE__ */ a(On, { ...H }) }, N.id),
|
|
1885
|
-
...j &&
|
|
1885
|
+
...j && O === b.length - 1 && g.dropIndex === b.length ? [/* @__PURE__ */ a(Rn, {}, `drop-${p}-end`)] : []
|
|
1886
1886
|
];
|
|
1887
1887
|
});
|
|
1888
|
-
return [...C, ...
|
|
1888
|
+
return [...C, ...L];
|
|
1889
1889
|
})]
|
|
1890
1890
|
});
|
|
1891
1891
|
}, ga = ({ moduleId: e, collectionId: t, marginLeft: n, dragging: r = !1, ref: i, children: o }) => /* @__PURE__ */ a("div", {
|
|
@@ -2663,21 +2663,21 @@ function Ha({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
|
|
|
2663
2663
|
const { readOnly: l } = K(), c = q((D) => {
|
|
2664
2664
|
if (s) s(D);
|
|
2665
2665
|
else throw D;
|
|
2666
|
-
}, [s]), f = A(Ta(t)), [y, h] = F(f.current), m = A(!1), [g, v] = F(!1), p = A(/* @__PURE__ */ new Set()), [w, b] = F(/* @__PURE__ */ new Set()), S = A(!1), [C,
|
|
2666
|
+
}, [s]), f = A(Ta(t)), [y, h] = F(f.current), m = A(!1), [g, v] = F(!1), p = A(/* @__PURE__ */ new Set()), [w, b] = F(/* @__PURE__ */ new Set()), S = A(!1), [C, L] = F(!1), N = (D, z) => {
|
|
2667
2667
|
z ? p.current.add(D) : p.current.delete(D), b(new Set(p.current));
|
|
2668
|
-
},
|
|
2668
|
+
}, O = q((D) => {
|
|
2669
2669
|
const z = D(f.current);
|
|
2670
2670
|
f.current = z, h(z), u?.(z.modules);
|
|
2671
2671
|
}, [u]);
|
|
2672
2672
|
re(() => {
|
|
2673
|
-
t !== f.current.snapshot &&
|
|
2674
|
-
}, [t,
|
|
2673
|
+
t !== f.current.snapshot && O((D) => Je(D, t));
|
|
2674
|
+
}, [t, O]);
|
|
2675
2675
|
const j = q(async () => {
|
|
2676
2676
|
if (!(l || !n || m.current)) {
|
|
2677
2677
|
m.current = !0, v(!0);
|
|
2678
2678
|
try {
|
|
2679
2679
|
const D = await n();
|
|
2680
|
-
D &&
|
|
2680
|
+
D && O((z) => Je({
|
|
2681
2681
|
...z,
|
|
2682
2682
|
additions: [...z.additions, D]
|
|
2683
2683
|
}, z.snapshot));
|
|
@@ -2691,28 +2691,28 @@ function Ha({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
|
|
|
2691
2691
|
l,
|
|
2692
2692
|
n,
|
|
2693
2693
|
c,
|
|
2694
|
-
|
|
2694
|
+
O
|
|
2695
2695
|
]), H = q(async (D) => {
|
|
2696
2696
|
const z = D.id.toString();
|
|
2697
2697
|
if (!i || p.current.has(z)) return;
|
|
2698
2698
|
N(z, !0);
|
|
2699
2699
|
const I = !D.collapsed;
|
|
2700
|
-
|
|
2700
|
+
O((k) => Pa(k, D.id, I));
|
|
2701
2701
|
try {
|
|
2702
|
-
await Et(() => i(D.id, I), () =>
|
|
2702
|
+
await Et(() => i(D.id, I), () => O((k) => Fa(k, D.id)), c);
|
|
2703
2703
|
} finally {
|
|
2704
2704
|
N(z, !1);
|
|
2705
2705
|
}
|
|
2706
2706
|
}, [
|
|
2707
2707
|
i,
|
|
2708
2708
|
c,
|
|
2709
|
-
|
|
2709
|
+
O
|
|
2710
2710
|
]), M = q(async (D, z) => {
|
|
2711
2711
|
const I = D.id.toString();
|
|
2712
2712
|
if (!(l || !o || p.current.has(I))) {
|
|
2713
|
-
N(I, !0),
|
|
2713
|
+
N(I, !0), O((k) => Da(k, D.id, z));
|
|
2714
2714
|
try {
|
|
2715
|
-
await Et(() => o(D.id, z), () =>
|
|
2715
|
+
await Et(() => o(D.id, z), () => O((k) => $a(k, D.id)), c);
|
|
2716
2716
|
} finally {
|
|
2717
2717
|
N(I, !1);
|
|
2718
2718
|
}
|
|
@@ -2721,19 +2721,19 @@ function Ha({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
|
|
|
2721
2721
|
l,
|
|
2722
2722
|
o,
|
|
2723
2723
|
c,
|
|
2724
|
-
|
|
2724
|
+
O
|
|
2725
2725
|
]), T = q(async (D, z) => {
|
|
2726
2726
|
if (l || !r || S.current) return;
|
|
2727
|
-
S.current = !0,
|
|
2727
|
+
S.current = !0, L(!0);
|
|
2728
2728
|
const I = f.current.order;
|
|
2729
|
-
|
|
2729
|
+
O((k) => _a(k, z));
|
|
2730
2730
|
try {
|
|
2731
|
-
await Et(() => r(z), () =>
|
|
2731
|
+
await Et(() => r(z), () => O((k) => Ba(k, I)), c);
|
|
2732
2732
|
} finally {
|
|
2733
|
-
S.current = !1,
|
|
2733
|
+
S.current = !1, L(!1);
|
|
2734
2734
|
}
|
|
2735
2735
|
}, [
|
|
2736
|
-
|
|
2736
|
+
O,
|
|
2737
2737
|
r,
|
|
2738
2738
|
c,
|
|
2739
2739
|
l
|
|
@@ -3308,19 +3308,19 @@ function zr(e, t) {
|
|
|
3308
3308
|
return t.add(e.id.toString()), e.subFeatures.flatMap((n) => t.has(n.id.toString()) ? [] : [n, ...zr(n, t)]);
|
|
3309
3309
|
}
|
|
3310
3310
|
function gs({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed: i, forceCollapsed: o = !1, onCollapseChanged: s, occupiesColumn: d, renderHeader: u, renderColumn: l, renderFeatureBoundary: c, onAddFeature: f, onRenameFeature: y, onFeaturesReordered: h, onFeaturesChanged: m }) {
|
|
3311
|
-
const { readOnly: g, messages: v } = K(), { targets: p, register: w } = cs(), b = A(us(t)), [S, C] = F(b.current),
|
|
3311
|
+
const { readOnly: g, messages: v } = K(), { targets: p, register: w } = cs(), b = A(us(t)), [S, C] = F(b.current), L = A(!1), N = A(/* @__PURE__ */ new Set()), O = q((R) => {
|
|
3312
3312
|
const G = R(b.current);
|
|
3313
3313
|
G !== b.current && (b.current = G, C(G), m?.(G.features));
|
|
3314
3314
|
}, [m]);
|
|
3315
3315
|
re(() => {
|
|
3316
|
-
t !== b.current.snapshot &&
|
|
3317
|
-
}, [t,
|
|
3316
|
+
t !== b.current.snapshot && O((R) => Ht(R, t));
|
|
3317
|
+
}, [t, O]);
|
|
3318
3318
|
const j = q(async (R, G) => {
|
|
3319
|
-
if (!(g || !f ||
|
|
3320
|
-
|
|
3319
|
+
if (!(g || !f || L.current)) {
|
|
3320
|
+
L.current = !0;
|
|
3321
3321
|
try {
|
|
3322
3322
|
const _ = await f(R, G);
|
|
3323
|
-
_ &&
|
|
3323
|
+
_ && O((J) => ({
|
|
3324
3324
|
...J,
|
|
3325
3325
|
features: Br(J.features, _, G),
|
|
3326
3326
|
pendingAdditions: [...J.pendingAdditions, {
|
|
@@ -3329,31 +3329,31 @@ function gs({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
3329
3329
|
}]
|
|
3330
3330
|
}));
|
|
3331
3331
|
} finally {
|
|
3332
|
-
|
|
3332
|
+
L.current = !1;
|
|
3333
3333
|
}
|
|
3334
3334
|
}
|
|
3335
3335
|
}, [
|
|
3336
3336
|
g,
|
|
3337
3337
|
f,
|
|
3338
|
-
|
|
3338
|
+
O
|
|
3339
3339
|
]);
|
|
3340
3340
|
tt(e, () => ({
|
|
3341
3341
|
addFeature: (R) => j(R),
|
|
3342
3342
|
addSubFeature: (R, G) => j(G, R),
|
|
3343
|
-
updateFeature: (R, G) =>
|
|
3343
|
+
updateFeature: (R, G) => O((_) => ({
|
|
3344
3344
|
..._,
|
|
3345
3345
|
features: on(_.features, R, G)
|
|
3346
3346
|
}))
|
|
3347
|
-
}), [j,
|
|
3348
|
-
const H = q((R) =>
|
|
3347
|
+
}), [j, O]);
|
|
3348
|
+
const H = q((R) => O((G) => ms(G, R)), [O]), M = q((R, G) => {
|
|
3349
3349
|
const _ = R.toString();
|
|
3350
|
-
!y || g || N.current.has(_) || (N.current.add(_),
|
|
3350
|
+
!y || g || N.current.has(_) || (N.current.add(_), O((J) => ({
|
|
3351
3351
|
...J,
|
|
3352
3352
|
features: ln(J.features, _, G),
|
|
3353
3353
|
pendingRenames: new Map(J.pendingRenames).set(_, G)
|
|
3354
3354
|
})), y(R, G).catch(() => H(R)).finally(() => N.current.delete(_)));
|
|
3355
3355
|
}, [
|
|
3356
|
-
|
|
3356
|
+
O,
|
|
3357
3357
|
y,
|
|
3358
3358
|
g,
|
|
3359
3359
|
H
|
|
@@ -3363,24 +3363,24 @@ function gs({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
3363
3363
|
S.pendingCollapses
|
|
3364
3364
|
]), W = q((R) => {
|
|
3365
3365
|
const G = !T(R);
|
|
3366
|
-
|
|
3366
|
+
O((_) => ({
|
|
3367
3367
|
..._,
|
|
3368
3368
|
features: sn(_.features, R.id.toString(), G),
|
|
3369
3369
|
pendingCollapses: new Map(_.pendingCollapses).set(R.id.toString(), G)
|
|
3370
3370
|
})), s?.(R.id, G);
|
|
3371
3371
|
}, [
|
|
3372
|
-
|
|
3372
|
+
O,
|
|
3373
3373
|
T,
|
|
3374
3374
|
s
|
|
3375
3375
|
]), X = q((R) => {
|
|
3376
|
-
|
|
3376
|
+
O((G) => {
|
|
3377
3377
|
const _ = new Map(G.pendingCollapses);
|
|
3378
3378
|
return _.delete(R.id.toString()), Ht({
|
|
3379
3379
|
...G,
|
|
3380
3380
|
pendingCollapses: _
|
|
3381
3381
|
}, G.snapshot);
|
|
3382
3382
|
}), s?.(R.id, R.collapsed);
|
|
3383
|
-
}, [
|
|
3383
|
+
}, [O, s]), D = S.features, z = oe(() => D.map((R) => {
|
|
3384
3384
|
const G = zr(R, /* @__PURE__ */ new Set());
|
|
3385
3385
|
return {
|
|
3386
3386
|
feature: R,
|
|
@@ -3392,12 +3392,12 @@ function gs({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
|
|
|
3392
3392
|
d,
|
|
3393
3393
|
r
|
|
3394
3394
|
]), I = z.flatMap((R) => [R.feature, ...R.children]).filter(d), k = new Set(z.filter((R) => R.children.length).map((R) => R.feature.id.toString())), E = new Set(z.flatMap((R) => R.children.map((G) => G.id.toString()))), $ = D.map((R) => R.id), Y = q((R, G) => {
|
|
3395
|
-
|
|
3395
|
+
O((_) => ({
|
|
3396
3396
|
..._,
|
|
3397
3397
|
features: Wt(_.features, G),
|
|
3398
3398
|
order: G
|
|
3399
3399
|
})), h?.(Wt(b.current.features, G));
|
|
3400
|
-
}, [
|
|
3400
|
+
}, [O, h]), { featureDrag: Q, handleFeatureDragStart: P } = ds(n, $, h ? Y : void 0), V = (R) => ({
|
|
3401
3401
|
collapsed: T(R),
|
|
3402
3402
|
dragging: Q?.featureId.equals(R.id) ?? !1,
|
|
3403
3403
|
onDragStart: P,
|
|
@@ -3803,7 +3803,7 @@ var vs = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
3803
3803
|
title: C.disabled ? C.disabledTooltip ?? C.tooltip : C.tooltip,
|
|
3804
3804
|
"aria-label": C.tooltip,
|
|
3805
3805
|
disabled: C.disabled,
|
|
3806
|
-
onClick: (
|
|
3806
|
+
onClick: (L) => C.onActivate(e, L.currentTarget.getBoundingClientRect()),
|
|
3807
3807
|
children: [C.icon, C.indicator && /* @__PURE__ */ a("span", {
|
|
3808
3808
|
className: "event-modeling-feature-chat-dot",
|
|
3809
3809
|
"aria-hidden": "true"
|
|
@@ -3843,7 +3843,7 @@ var vs = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
3843
3843
|
borderColor: "var(--text-color)",
|
|
3844
3844
|
color: "var(--text-color)"
|
|
3845
3845
|
} : void 0,
|
|
3846
|
-
onClick: (
|
|
3846
|
+
onClick: (L) => C.onActivate(e, L.currentTarget.getBoundingClientRect()),
|
|
3847
3847
|
children: C.icon
|
|
3848
3848
|
}, C.tooltip)),
|
|
3849
3849
|
!m.readOnly && /* @__PURE__ */ a(ws, {
|
|
@@ -3893,7 +3893,7 @@ var vs = ({ type: e }) => /* @__PURE__ */ a("svg", {
|
|
|
3893
3893
|
title: C.disabled ? C.disabledTooltip ?? C.tooltip : C.tooltip,
|
|
3894
3894
|
"aria-label": C.tooltip,
|
|
3895
3895
|
disabled: C.disabled,
|
|
3896
|
-
onClick: (
|
|
3896
|
+
onClick: (L) => C.onActivate(e, L.currentTarget.getBoundingClientRect()),
|
|
3897
3897
|
children: C.icon
|
|
3898
3898
|
}, C.tooltip)),
|
|
3899
3899
|
!m.readOnly && /* @__PURE__ */ a(Rr, { suggestions: m.actions.featureHeaderSuggestions ?? [] }),
|
|
@@ -4043,9 +4043,9 @@ var ks = ({ state: e, specification: t }) => {
|
|
|
4043
4043
|
}), s = new Set(e.map((u) => u.id.toString())), d = r.filter((u) => !s.has(u.id.toString()));
|
|
4044
4044
|
return d.length || o.some((u, l) => u !== e[l]) ? [...o, ...d] : e;
|
|
4045
4045
|
}, Ps = 1, Ds = ({ sliceId: e, width: t, collapsed: n, specifications: r, runInfoFor: i, renderRows: o }) => {
|
|
4046
|
-
const { editing: s, actions: d, messages: u } = K(), l = ve(), [c, f] = F(r), [y, h] = F(!1), [m, g] = F(!1), [v, p] = F(!1), w = A(0), b = A(!1), S = A(!1), C = A(!1),
|
|
4046
|
+
const { editing: s, actions: d, messages: u } = K(), l = ve(), [c, f] = F(r), [y, h] = F(!1), [m, g] = F(!1), [v, p] = F(!1), w = A(0), b = A(!1), S = A(!1), C = A(!1), L = A(/* @__PURE__ */ new Set()), N = Os(l, s), O = N ? r : c;
|
|
4047
4047
|
re(() => {
|
|
4048
|
-
f((k) => Ls(k, r, N, Date.now() <= w.current,
|
|
4048
|
+
f((k) => Ls(k, r, N, Date.now() <= w.current, L.current));
|
|
4049
4049
|
}, [r, N]);
|
|
4050
4050
|
const j = async () => {
|
|
4051
4051
|
if (b.current || !s.onSpecificationAdded) return;
|
|
@@ -4067,7 +4067,7 @@ var ks = ({ state: e, specification: t }) => {
|
|
|
4067
4067
|
b.current = !1, p(!1);
|
|
4068
4068
|
}
|
|
4069
4069
|
}, H = (k) => {
|
|
4070
|
-
|
|
4070
|
+
L.current.has(k.toString()) || (L.current.add(k.toString()), w.current = 0, f((E) => E.filter(($) => !$.id.equals(k))), s.onSpecificationRemoved?.(e, k));
|
|
4071
4071
|
}, M = (k, E) => {
|
|
4072
4072
|
f(($) => $.map((Y) => Y.id.equals(k) ? {
|
|
4073
4073
|
...Y,
|
|
@@ -4097,7 +4097,7 @@ var ks = ({ state: e, specification: t }) => {
|
|
|
4097
4097
|
}
|
|
4098
4098
|
}
|
|
4099
4099
|
}, D = d.specificationsGenerate, z = d.specificationsRunAll, I = !l && D && (!D.when || D.when(e));
|
|
4100
|
-
return n ? null : /* @__PURE__ */ x(ee, { children: [
|
|
4100
|
+
return n ? null : /* @__PURE__ */ x(ee, { children: [O.map((k, E) => {
|
|
4101
4101
|
const { state: $, message: Y } = i(k);
|
|
4102
4102
|
return /* @__PURE__ */ x("div", {
|
|
4103
4103
|
"data-slice-spec-col": "true",
|
|
@@ -4239,16 +4239,16 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
|
|
|
4239
4239
|
re(() => () => {
|
|
4240
4240
|
m.current && clearTimeout(m.current);
|
|
4241
4241
|
}, []);
|
|
4242
|
-
const w = q((
|
|
4243
|
-
if (
|
|
4242
|
+
const w = q((L) => {
|
|
4243
|
+
if (L.stopPropagation(), m.current) {
|
|
4244
4244
|
clearTimeout(m.current), m.current = null;
|
|
4245
4245
|
return;
|
|
4246
4246
|
}
|
|
4247
4247
|
m.current = setTimeout(() => {
|
|
4248
4248
|
m.current = null, o?.();
|
|
4249
4249
|
}, zs);
|
|
4250
|
-
}, [o]), b = q((
|
|
4251
|
-
|
|
4250
|
+
}, [o]), b = q((L) => {
|
|
4251
|
+
L.stopPropagation(), m.current && (clearTimeout(m.current), m.current = null), s?.();
|
|
4252
4252
|
}, [s]), S = r ? {
|
|
4253
4253
|
outline: `2px solid ${t}`,
|
|
4254
4254
|
outlineOffset: 2
|
|
@@ -4262,9 +4262,9 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
|
|
|
4262
4262
|
ref: v,
|
|
4263
4263
|
className: "event-modeling-card__title",
|
|
4264
4264
|
style: { fontSize: p.fontSizePx },
|
|
4265
|
-
children: p.lines.length > 1 ? p.lines.map((
|
|
4265
|
+
children: p.lines.length > 1 ? p.lines.map((L, N) => /* @__PURE__ */ a("span", {
|
|
4266
4266
|
className: "event-modeling-card__title-line",
|
|
4267
|
-
children:
|
|
4267
|
+
children: L
|
|
4268
4268
|
}, N)) : p.lines[0]
|
|
4269
4269
|
}), d]
|
|
4270
4270
|
}), u] });
|
|
@@ -4729,7 +4729,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
|
|
|
4729
4729
|
const { editing: s, messages: d } = K(), u = ve(), { onGivenEventAdded: l, onGivenEventValuesSet: c, onGivenReadModelSet: f, onGivenReadModelValuesSet: y, onGivenEventRemoved: h, onGivenReadModelRemoved: m, onSpecificationItemOpened: g } = s, [v, p] = F(n.given), [w, b] = F(n.givenReadModel), [S, C] = F(() => ({
|
|
4730
4730
|
...jr(n.given),
|
|
4731
4731
|
...n.givenReadModel ? { [n.givenReadModel.id.toString()]: n.givenReadModel.values ?? {} } : {}
|
|
4732
|
-
})),
|
|
4732
|
+
})), L = u || !(l || c || f || y || h || m || g), N = L ? n.given : v, O = L ? n.givenReadModel : w, j = oe(() => nl(r), [r]), H = oe(() => new Map(j.map((P) => [P.id.toString(), P])), [j]), M = (P, V, te, R, G, _) => g?.({
|
|
4733
4733
|
sliceId: e,
|
|
4734
4734
|
specificationId: n.id,
|
|
4735
4735
|
itemId: P,
|
|
@@ -4763,7 +4763,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
|
|
|
4763
4763
|
p((V) => V.filter((te) => !te.id.equals(P))), h?.(e, n.id, P);
|
|
4764
4764
|
}, D = () => {
|
|
4765
4765
|
b(void 0), m?.(e, n.id);
|
|
4766
|
-
}, z = (P) => (V) => c?.(e, n.id, P, V), I = !u && t === B.stateChange && !!l, k = !u && !!i && !!f && !!g && rl(!0, !!
|
|
4766
|
+
}, z = (P) => (V) => c?.(e, n.id, P, V), I = !u && t === B.stateChange && !!l, k = !u && !!i && !!f && !!g && rl(!0, !!O), E = O && (o ?? O.name), $ = O?.id ?? O?.readModelItemId, Y = O && $ && E !== void 0 && /* @__PURE__ */ a(yt, {
|
|
4767
4767
|
name: E,
|
|
4768
4768
|
onRemoved: m ? D : void 0,
|
|
4769
4769
|
children: /* @__PURE__ */ a(Le, {
|
|
@@ -4806,26 +4806,26 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
|
|
|
4806
4806
|
});
|
|
4807
4807
|
}, ol = ({ sliceId: e, sliceType: t, specification: n, command: r, renamedCommandName: i, events: o = [] }) => {
|
|
4808
4808
|
const { editing: s, messages: d } = K(), u = ve(), { onWhenCommandSet: l, onWhenCommandValuesSet: c, onSpecificationItemOpened: f } = s, [y, h] = F(n.when), [m, g] = F(n.when?.values ?? {}), v = u || !(l || c || f) ? n.when : y, p = (N) => {
|
|
4809
|
-
const
|
|
4809
|
+
const O = de.create();
|
|
4810
4810
|
h({
|
|
4811
|
-
id:
|
|
4811
|
+
id: O,
|
|
4812
4812
|
commandId: N.id,
|
|
4813
4813
|
name: N.name,
|
|
4814
4814
|
values: {}
|
|
4815
|
-
}), g({}), l?.(e, n.id,
|
|
4816
|
-
}, w = (N,
|
|
4815
|
+
}), g({}), l?.(e, n.id, O, N.id, N.name);
|
|
4816
|
+
}, w = (N, O, j, H, M) => f?.({
|
|
4817
4817
|
sliceId: e,
|
|
4818
4818
|
specificationId: n.id,
|
|
4819
4819
|
itemId: N,
|
|
4820
4820
|
kind: Be.command,
|
|
4821
4821
|
name: j,
|
|
4822
|
-
schema:
|
|
4822
|
+
schema: O && r?.id.equals(O) ? r.schema : void 0,
|
|
4823
4823
|
values: M,
|
|
4824
4824
|
host: H,
|
|
4825
4825
|
onValuesSet: (T) => {
|
|
4826
4826
|
y?.id.equals(N) && g(T), c?.(e, n.id, T);
|
|
4827
4827
|
}
|
|
4828
|
-
}), b = t === B.stateChange ? r : void 0, S = t === B.stateView ? o : [], C = v && (v.commandId && r?.id.equals(v.commandId) ? i ?? v.name : v.name),
|
|
4828
|
+
}), b = t === B.stateChange ? r : void 0, S = t === B.stateView ? o : [], C = v && (v.commandId && r?.id.equals(v.commandId) ? i ?? v.name : v.name), L = !u && !!f && !!c;
|
|
4829
4829
|
return /* @__PURE__ */ x(un, {
|
|
4830
4830
|
headline: d.specifications.when,
|
|
4831
4831
|
actions: !u && t !== B.stateChange && t !== B.stateView && !v && r && l && /* @__PURE__ */ a(cn, {
|
|
@@ -4837,12 +4837,12 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
|
|
|
4837
4837
|
v && C && /* @__PURE__ */ a(Le, {
|
|
4838
4838
|
name: C,
|
|
4839
4839
|
colors: et,
|
|
4840
|
-
onOpen:
|
|
4840
|
+
onOpen: L ? (N) => w(v.id, v.commandId, C, N, m) : void 0
|
|
4841
4841
|
}, v.id.toString()),
|
|
4842
4842
|
b && /* @__PURE__ */ a(Le, {
|
|
4843
4843
|
name: b.name,
|
|
4844
4844
|
colors: et,
|
|
4845
|
-
onOpen:
|
|
4845
|
+
onOpen: L ? (N) => w(b.id, b.id, b.name, N, m) : void 0
|
|
4846
4846
|
}, b.id.toString()),
|
|
4847
4847
|
S.map((N) => /* @__PURE__ */ a(Le, {
|
|
4848
4848
|
name: N.name,
|
|
@@ -4905,7 +4905,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
|
|
|
4905
4905
|
disabled: n
|
|
4906
4906
|
});
|
|
4907
4907
|
}, cl = ({ sliceId: e, sliceType: t, specification: n, events: r, command: i, readModel: o, renamedEventNames: s = {}, extra: d }) => {
|
|
4908
|
-
const { editing: u, messages: l } = K(), c = ve(), { onThenEventAdded: f, onThenEventValuesSet: y, onThenErrorAdded: h, onThenRuleErrorAdded: m, onThenErrorRenamed: g, onThenEventRemoved: v, onThenErrorRemoved: p, onThenReadModelValuesSet: w, onSpecificationItemOpened: b } = u, [S, C] = F(n.thenEvents), [
|
|
4908
|
+
const { editing: u, messages: l } = K(), c = ve(), { onThenEventAdded: f, onThenEventValuesSet: y, onThenErrorAdded: h, onThenRuleErrorAdded: m, onThenErrorRenamed: g, onThenEventRemoved: v, onThenErrorRemoved: p, onThenReadModelValuesSet: w, onSpecificationItemOpened: b } = u, [S, C] = F(n.thenEvents), [L, N] = F(n.thenErrors), [O, j] = F(() => jr(n.thenEvents)), [H, M] = F({}), T = c || !(f || y || h || m || g || v || p || w || b), W = T ? n.thenEvents : S, X = T ? n.thenErrors : L, D = oe(() => new Map(r.map((_) => [_.id.toString(), _])), [r]), z = oe(() => sl(i, r), [i, r]), I = !c && t !== B.stateView, k = (_) => {
|
|
4909
4909
|
const J = de.create();
|
|
4910
4910
|
C((ae) => [...ae, {
|
|
4911
4911
|
id: J,
|
|
@@ -4950,7 +4950,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
|
|
|
4950
4950
|
kind: Be.event,
|
|
4951
4951
|
name: ae,
|
|
4952
4952
|
schema: J?.schema,
|
|
4953
|
-
values:
|
|
4953
|
+
values: O[_.id.toString()] ?? {},
|
|
4954
4954
|
host: Ie,
|
|
4955
4955
|
onValuesSet: (Ye) => {
|
|
4956
4956
|
j((rt) => ({
|
|
@@ -5186,12 +5186,12 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
|
|
|
5186
5186
|
})]
|
|
5187
5187
|
})
|
|
5188
5188
|
}), gl = ({ feature: e, options: t, moduleId: n, collection: r, rows: i, heights: o, slices: s, externalEvents: d, slots: u, editor: l, onSliceArea: c, sliceAreas: f, renderHeader: y, onSlicesChanged: h }) => {
|
|
5189
|
-
const m = A(null), g = (S) => s.slice(0, s.findIndex((C) => C.id.equals(S))).filter((C) => C.sliceType === B.stateChange).flatMap((C) => C.events), v = (S) => s.slice(s.findIndex((C) => C.id.equals(S)) + 1).filter((C) => C.sliceType === B.stateChange).flatMap((C) => C.events), p = q(async (S, C,
|
|
5189
|
+
const m = A(null), g = (S) => s.slice(0, s.findIndex((C) => C.id.equals(S))).filter((C) => C.sliceType === B.stateChange).flatMap((C) => C.events), v = (S) => s.slice(s.findIndex((C) => C.id.equals(S)) + 1).filter((C) => C.sliceType === B.stateChange).flatMap((C) => C.events), p = q(async (S, C, L) => {
|
|
5190
5190
|
const N = f.get(C.toString());
|
|
5191
|
-
N?.moveIn(S,
|
|
5191
|
+
N?.moveIn(S, L);
|
|
5192
5192
|
try {
|
|
5193
|
-
const
|
|
5194
|
-
return N?.completeMoveIn(S.id,
|
|
5193
|
+
const O = await l.onMoveSlice?.(S, e.id, C, L) ?? !1;
|
|
5194
|
+
return N?.completeMoveIn(S.id, O), O;
|
|
5195
5195
|
} catch {
|
|
5196
5196
|
return N?.completeMoveIn(S.id, !1), !1;
|
|
5197
5197
|
}
|
|
@@ -5200,7 +5200,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
|
|
|
5200
5200
|
e.id,
|
|
5201
5201
|
f
|
|
5202
5202
|
]), w = q((S, C) => {
|
|
5203
|
-
!l.onMoveSlice || C.equals(e.id) || !m.current?.moveOut(S.id) || p(S, C, Number.MAX_SAFE_INTEGER).then((
|
|
5203
|
+
!l.onMoveSlice || C.equals(e.id) || !m.current?.moveOut(S.id) || p(S, C, Number.MAX_SAFE_INTEGER).then((L) => m.current?.completeMoveOut(S.id, L));
|
|
5204
5204
|
}, [
|
|
5205
5205
|
l.onMoveSlice,
|
|
5206
5206
|
e.id,
|
|
@@ -5258,22 +5258,22 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
|
|
|
5258
5258
|
onSliceDragStart: C.onSliceDragStart,
|
|
5259
5259
|
onAddSlice: l.onAddSlice ? C.addSlice : void 0,
|
|
5260
5260
|
onToggleCollapse: l.onSliceCollapseChanged ? () => {
|
|
5261
|
-
m.current?.updateSlices((
|
|
5261
|
+
m.current?.updateSlices((L) => L.map((N) => N.id.equals(S.id) ? {
|
|
5262
5262
|
...N,
|
|
5263
5263
|
collapsed: !C.sliceCollapsed
|
|
5264
5264
|
} : N)), l.onSliceCollapseChanged?.(e.id, S.id, !C.sliceCollapsed);
|
|
5265
5265
|
} : void 0,
|
|
5266
|
-
onRenamed: l.onSliceRenamed ? (
|
|
5267
|
-
m.current?.updateSlices((N) => N.map((
|
|
5268
|
-
...
|
|
5269
|
-
name:
|
|
5270
|
-
} :
|
|
5266
|
+
onRenamed: l.onSliceRenamed ? (L) => {
|
|
5267
|
+
m.current?.updateSlices((N) => N.map((O) => O.id.equals(S.id) ? {
|
|
5268
|
+
...O,
|
|
5269
|
+
name: L
|
|
5270
|
+
} : O)), l.onSliceRenamed?.(e.id, S.id, L);
|
|
5271
5271
|
} : void 0,
|
|
5272
|
-
onMoveToFeature: l.onMoveSlice ? (
|
|
5273
|
-
onDuplicated: l.onSliceDuplicated ? (
|
|
5274
|
-
l.onSliceDuplicated?.(e.id, S.id,
|
|
5272
|
+
onMoveToFeature: l.onMoveSlice ? (L) => w(S, L) : void 0,
|
|
5273
|
+
onDuplicated: l.onSliceDuplicated ? (L) => {
|
|
5274
|
+
l.onSliceDuplicated?.(e.id, S.id, L), m.current?.addProjectedSlice({
|
|
5275
5275
|
...S,
|
|
5276
|
-
id:
|
|
5276
|
+
id: L,
|
|
5277
5277
|
name: ud(e.slices.map((N) => N.name), S.name),
|
|
5278
5278
|
specifications: [],
|
|
5279
5279
|
commentCount: 0,
|
|
@@ -5415,7 +5415,7 @@ function fl(e, t) {
|
|
|
5415
5415
|
features: n.features.map((r) => Qr(t, r))
|
|
5416
5416
|
}));
|
|
5417
5417
|
}
|
|
5418
|
-
var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect: r, onCollectionMoving: i, onCollectionMoved: o, canMove: s, onAddModule: d, onModulesReordered: u, onCollapseChanged: l, onRenameModule: c, onModulesChanged: f, onFeaturesChanged: y, onPersistenceError: h, rowLabels: m, onActorsReordered: g, onAddFeature: v, onRenameFeature: p, onFeatureCollapseChanged: w, onFeaturesReordered: b, onAddSlice: S, onReorderSlices: C, onMoveSlice:
|
|
5418
|
+
var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect: r, onCollectionMoving: i, onCollectionMoved: o, canMove: s, onAddModule: d, onModulesReordered: u, onCollapseChanged: l, onRenameModule: c, onModulesChanged: f, onFeaturesChanged: y, onPersistenceError: h, rowLabels: m, onActorsReordered: g, onAddFeature: v, onRenameFeature: p, onFeatureCollapseChanged: w, onFeaturesReordered: b, onAddSlice: S, onReorderSlices: C, onMoveSlice: L, validateSliceDrop: N, onSliceCollapseChanged: O, onSliceRenamed: j, onSliceDuplicated: H }) => {
|
|
5419
5419
|
const { readOnly: M, editing: T } = K(), [W, X] = F(/* @__PURE__ */ new Map()), D = q((ie, ce) => X((be) => new Map(be).set(ie.toString(), ce)), []), z = oe(() => fl(e.modules, W), [e.modules, W]), I = M ? {
|
|
5420
5420
|
onFeatureCollapseChanged: D,
|
|
5421
5421
|
onSliceCollapseChanged: (ie, ce, be) => D(ce, be)
|
|
@@ -5426,12 +5426,12 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
|
|
|
5426
5426
|
onFeaturesReordered: b,
|
|
5427
5427
|
onAddSlice: S,
|
|
5428
5428
|
onReorderSlices: C,
|
|
5429
|
-
onMoveSlice:
|
|
5429
|
+
onMoveSlice: L,
|
|
5430
5430
|
validateSliceDrop: N,
|
|
5431
|
-
onSliceCollapseChanged:
|
|
5431
|
+
onSliceCollapseChanged: O,
|
|
5432
5432
|
onSliceRenamed: j,
|
|
5433
5433
|
onSliceDuplicated: H
|
|
5434
|
-
}, [k, E] = F(e.modules), [$, Y] = F(/* @__PURE__ */ new Map()), Q = A(null), [P, V] = F(0), te = !!(d || u || l || c || g || v || p || w || b || S || C ||
|
|
5434
|
+
}, [k, E] = F(e.modules), [$, Y] = F(/* @__PURE__ */ new Map()), Q = A(null), [P, V] = F(0), te = !!(d || u || l || c || g || v || p || w || b || S || C || L || O || j || H || s && i && o || pl(T)), R = M || !te, G = M ? z : e.modules, _ = (R ? G : k).map((ie) => ({
|
|
5435
5435
|
...ie,
|
|
5436
5436
|
features: R ? ie.features : $.get(ie.id.toString()) ?? ie.features
|
|
5437
5437
|
})), J = {
|
|
@@ -5760,7 +5760,7 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
|
|
|
5760
5760
|
height: Math.min(k.height, I.contentHeight)
|
|
5761
5761
|
}
|
|
5762
5762
|
}];
|
|
5763
|
-
})), [t]), C = oe(() => kl(v, (I) => S.get(I)?.content), [v, S]),
|
|
5763
|
+
})), [t]), C = oe(() => kl(v, (I) => S.get(I)?.content), [v, S]), L = (I, k) => {
|
|
5764
5764
|
for (const E of S.values())
|
|
5765
5765
|
if (E.id.toString() !== k.toString() && Jo(I, E.rect))
|
|
5766
5766
|
return E;
|
|
@@ -5771,7 +5771,7 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
|
|
|
5771
5771
|
x: k.anchor.x + (I.clientX - k.startClientX) / E,
|
|
5772
5772
|
y: k.anchor.y + (I.clientY - k.startClientY) / E
|
|
5773
5773
|
};
|
|
5774
|
-
},
|
|
5774
|
+
}, O = (I, k) => (E) => {
|
|
5775
5775
|
m.current.pending.size > 0 || (E.stopPropagation(), E.preventDefault(), E.currentTarget.setPointerCapture(E.pointerId), p.current = {
|
|
5776
5776
|
sourceId: I,
|
|
5777
5777
|
anchor: k,
|
|
@@ -5785,7 +5785,7 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
|
|
|
5785
5785
|
}, j = (I) => {
|
|
5786
5786
|
const k = p.current;
|
|
5787
5787
|
if (!k) return;
|
|
5788
|
-
const E = N(I, k), $ =
|
|
5788
|
+
const E = N(I, k), $ = L(E, k.sourceId);
|
|
5789
5789
|
w.current = $?.id.toString() ?? null, f({
|
|
5790
5790
|
sourceId: k.sourceId.toString(),
|
|
5791
5791
|
pointer: E,
|
|
@@ -5794,7 +5794,7 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
|
|
|
5794
5794
|
}, H = async (I) => {
|
|
5795
5795
|
const k = p.current, E = w.current;
|
|
5796
5796
|
if (p.current = null, w.current = null, f(null), !k) return;
|
|
5797
|
-
const $ =
|
|
5797
|
+
const $ = L(N(I, k), k.sourceId), Y = Zo($, E, (V) => S.get(V), k.sourceId.toString());
|
|
5798
5798
|
if (!Y || !u || m.current.pending.size > 0) return;
|
|
5799
5799
|
const Q = {
|
|
5800
5800
|
id: de.create(),
|
|
@@ -5887,7 +5887,7 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
|
|
|
5887
5887
|
top: E.y
|
|
5888
5888
|
},
|
|
5889
5889
|
title: d.dragToLink,
|
|
5890
|
-
onPointerDown:
|
|
5890
|
+
onPointerDown: O(I, E),
|
|
5891
5891
|
onPointerMove: j,
|
|
5892
5892
|
onPointerUp: H,
|
|
5893
5893
|
onPointerCancel: T
|
|
@@ -6014,7 +6014,7 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
|
|
|
6014
6014
|
...W,
|
|
6015
6015
|
position: T
|
|
6016
6016
|
}), w());
|
|
6017
|
-
},
|
|
6017
|
+
}, L = (M, T) => {
|
|
6018
6018
|
const W = o.current.get(M);
|
|
6019
6019
|
!W || s.current.has(M) || W.position.x === T.position.x && W.position.y === T.position.y && W.width === T.width && W.height === T.height || (l.current.add(M), o.current.change(M, {
|
|
6020
6020
|
...W,
|
|
@@ -6024,7 +6024,7 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
|
|
|
6024
6024
|
if (!u.current.delete(M)) return;
|
|
6025
6025
|
const T = o.current.get(M);
|
|
6026
6026
|
T && n.onStickyNoteMoved && b(M, T, () => n.onStickyNoteMoved?.(M, T.position));
|
|
6027
|
-
},
|
|
6027
|
+
}, O = (M) => {
|
|
6028
6028
|
if (!l.current.delete(M)) return;
|
|
6029
6029
|
const T = o.current.get(M);
|
|
6030
6030
|
T && n.onStickyNoteResized && b(M, T, () => n.onStickyNoteResized?.(M, {
|
|
@@ -6081,7 +6081,7 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
|
|
|
6081
6081
|
y: z
|
|
6082
6082
|
}) : ct,
|
|
6083
6083
|
onMoveEnd: n.onStickyNoteMoved ? N : void 0,
|
|
6084
|
-
onResize: n.onStickyNoteResized ? (X, D, z, I, k) =>
|
|
6084
|
+
onResize: n.onStickyNoteResized ? (X, D, z, I, k) => L(X, {
|
|
6085
6085
|
position: {
|
|
6086
6086
|
x: D,
|
|
6087
6087
|
y: z
|
|
@@ -6089,7 +6089,7 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
|
|
|
6089
6089
|
width: I,
|
|
6090
6090
|
height: k
|
|
6091
6091
|
}) : ct,
|
|
6092
|
-
onResizeEnd: n.onStickyNoteResized ?
|
|
6092
|
+
onResizeEnd: n.onStickyNoteResized ? O : void 0,
|
|
6093
6093
|
onTextChange: n.onStickyNoteTextChanged ? j : ct,
|
|
6094
6094
|
onExpandedChange: (X, D) => g((z) => D ? X : z === X ? void 0 : z)
|
|
6095
6095
|
}), s.current.has(M.id) && /* @__PURE__ */ a("span", {
|
|
@@ -6170,35 +6170,35 @@ var Fl = ({ collections: e, links: t, stickyNotes: n, readOnly: r, editor: i, ca
|
|
|
6170
6170
|
height: E
|
|
6171
6171
|
});
|
|
6172
6172
|
});
|
|
6173
|
-
}, []),
|
|
6173
|
+
}, []), L = Un(e.estimateSize), { renderCollection: N } = e, O = Un(q((I) => (k) => N(I, k), [N])), j = oe(() => So(c), [c]), H = oe(() => Pl(j.map((I) => ({
|
|
6174
6174
|
position: I.position,
|
|
6175
|
-
size:
|
|
6176
|
-
}))), [j,
|
|
6175
|
+
size: L(I)
|
|
6176
|
+
}))), [j, L]), { countSlices: M } = e, T = oe(() => _l(c.reduce((I, k) => I + M(k), 0)), [c, M]), W = oe(() => j.flatMap((I) => {
|
|
6177
6177
|
const k = v.get(I.id.toString());
|
|
6178
6178
|
return k ? [{
|
|
6179
6179
|
id: I.id,
|
|
6180
6180
|
position: I.position,
|
|
6181
6181
|
width: k.width,
|
|
6182
6182
|
height: k.height,
|
|
6183
|
-
contentHeight:
|
|
6183
|
+
contentHeight: L(I).height
|
|
6184
6184
|
}] : [];
|
|
6185
6185
|
}), [
|
|
6186
6186
|
j,
|
|
6187
6187
|
v,
|
|
6188
|
-
|
|
6188
|
+
L
|
|
6189
6189
|
]), X = o?.onTransformChange, D = q((I, k) => {
|
|
6190
6190
|
w.current = I, X?.(I, k);
|
|
6191
6191
|
}, [X]), z = /* @__PURE__ */ x(ee, { children: [
|
|
6192
6192
|
j.map((I) => /* @__PURE__ */ a(ni, {
|
|
6193
6193
|
collection: I,
|
|
6194
|
-
estimatedSize:
|
|
6194
|
+
estimatedSize: L(I),
|
|
6195
6195
|
measuredSize: v.get(I.id.toString()),
|
|
6196
6196
|
onSize: C,
|
|
6197
6197
|
getZoom: b,
|
|
6198
6198
|
canMove: y && !f.has(I.id.toString()),
|
|
6199
6199
|
onCollectionMoving: y ? h : void 0,
|
|
6200
6200
|
onCollectionMoved: y ? m : void 0,
|
|
6201
|
-
content:
|
|
6201
|
+
content: O(I)
|
|
6202
6202
|
}, I.id.toString())),
|
|
6203
6203
|
/* @__PURE__ */ a(Il, {
|
|
6204
6204
|
links: t,
|
|
@@ -6463,10 +6463,10 @@ function jl(e, t, n, r) {
|
|
|
6463
6463
|
}, []), f = q((g, v, p) => {
|
|
6464
6464
|
const w = document.querySelector(`[data-slice-drop-target="true"][data-slice-module-id="${g.toString()}"][data-slice-feature-id="${p.toString()}"]`);
|
|
6465
6465
|
return p.equals(v) ? w?.dataset.sliceAcceptsReorder === "true" : w?.dataset.sliceAcceptsMove === "true";
|
|
6466
|
-
}, []), y = q((g, v, p, w, b, S, C,
|
|
6466
|
+
}, []), y = q((g, v, p, w, b, S, C, L = null) => {
|
|
6467
6467
|
const N = e.slices.findIndex((j) => j.id.equals(g));
|
|
6468
6468
|
if (N === -1) return;
|
|
6469
|
-
const
|
|
6469
|
+
const O = c(g, e.id, N);
|
|
6470
6470
|
o({
|
|
6471
6471
|
sliceId: g,
|
|
6472
6472
|
moduleId: t,
|
|
@@ -6475,14 +6475,14 @@ function jl(e, t, n, r) {
|
|
|
6475
6475
|
sourceIndex: N,
|
|
6476
6476
|
ghostLabel: v,
|
|
6477
6477
|
ghostWidth: b,
|
|
6478
|
-
ghost:
|
|
6478
|
+
ghost: L,
|
|
6479
6479
|
currentX: p,
|
|
6480
6480
|
currentY: w,
|
|
6481
6481
|
dropIndex: N,
|
|
6482
6482
|
headerY: S,
|
|
6483
6483
|
zoom: C,
|
|
6484
|
-
isValid: (
|
|
6485
|
-
invalidReason:
|
|
6484
|
+
isValid: (O?.isValid ?? !0) && f(t, e.id, e.id),
|
|
6485
|
+
invalidReason: O?.reason
|
|
6486
6486
|
});
|
|
6487
6487
|
}, [
|
|
6488
6488
|
e,
|
|
@@ -6512,8 +6512,8 @@ function jl(e, t, n, r) {
|
|
|
6512
6512
|
const w = s.current;
|
|
6513
6513
|
if (!w) return;
|
|
6514
6514
|
const b = h(w.moduleId, p.clientX), S = m(b, p.clientX), C = c(w.sliceId, b, S);
|
|
6515
|
-
o((
|
|
6516
|
-
...
|
|
6515
|
+
o((L) => L ? {
|
|
6516
|
+
...L,
|
|
6517
6517
|
currentX: p.clientX,
|
|
6518
6518
|
currentY: p.clientY,
|
|
6519
6519
|
targetFeatureId: b,
|
|
@@ -6627,11 +6627,11 @@ var Zl = ({ featureId: e, name: t, status: n, width: r, collapsed: i, isDragging
|
|
|
6627
6627
|
const { readOnly: f } = K(), y = Qa(t.id.toString()), { ref: h, onMouseEnter: m, onMouseLeave: g } = ns(y?.connectedSliceIds), v = A(null), p = Zt(v), [w, b] = F(!1), S = A(!1), C = pr({
|
|
6628
6628
|
sliceType: t.sliceType,
|
|
6629
6629
|
eventCount: n
|
|
6630
|
-
}),
|
|
6630
|
+
}), L = () => {
|
|
6631
6631
|
S.current = !0, m();
|
|
6632
6632
|
}, N = () => {
|
|
6633
6633
|
S.current = !1, w || g();
|
|
6634
|
-
},
|
|
6634
|
+
}, O = (j) => {
|
|
6635
6635
|
const H = j.relatedTarget;
|
|
6636
6636
|
(!(H instanceof Node) || !j.currentTarget.contains(H)) && b(!1);
|
|
6637
6637
|
};
|
|
@@ -6658,10 +6658,10 @@ var Zl = ({ featureId: e, name: t, status: n, width: r, collapsed: i, isDragging
|
|
|
6658
6658
|
collapsed: r,
|
|
6659
6659
|
isDragging: i,
|
|
6660
6660
|
onDragStart: f ? void 0 : o,
|
|
6661
|
-
onMouseEnter:
|
|
6661
|
+
onMouseEnter: L,
|
|
6662
6662
|
onMouseLeave: N,
|
|
6663
6663
|
onFocusCapture: () => b(!0),
|
|
6664
|
-
onBlurCapture:
|
|
6664
|
+
onBlurCapture: O,
|
|
6665
6665
|
children: [s ?? /* @__PURE__ */ a(oi, {
|
|
6666
6666
|
slice: t,
|
|
6667
6667
|
height: d,
|
|
@@ -6845,7 +6845,7 @@ var Zl = ({ featureId: e, name: t, status: n, width: r, collapsed: i, isDragging
|
|
|
6845
6845
|
return `${n} (${Array.from({ length: i.size + 1 }, (o, s) => s + 1).find((o) => !i.has(o))})`;
|
|
6846
6846
|
};
|
|
6847
6847
|
function md({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollapsed: i, hideEmptyPlaceholder: o = !1, onSlicesChanged: s, createSlice: d, onAddSlice: u, onReorderSlices: l, onMoveSlice: c, validateSliceDrop: f, renderSlice: y }) {
|
|
6848
|
-
const { readOnly: h, messages: m } = K(), g = A(ed(t)), v = A(void 0), [p, w] = F(g.current), { slices: b } = p, S = A(!1), [C,
|
|
6848
|
+
const { readOnly: h, messages: m } = K(), g = A(ed(t)), v = A(void 0), [p, w] = F(g.current), { slices: b } = p, S = A(!1), [C, L] = F(!1), N = q((E) => {
|
|
6849
6849
|
const $ = g.current, Y = E($);
|
|
6850
6850
|
Y !== $ && (g.current = Y, w(Y), Y.slices !== $.slices && (v.current = Y.slices, s?.(Y.slices)));
|
|
6851
6851
|
}, [s]);
|
|
@@ -6855,7 +6855,7 @@ function md({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
6855
6855
|
snapshot: t
|
|
6856
6856
|
} : qe(E, t));
|
|
6857
6857
|
}, [t, N]);
|
|
6858
|
-
const
|
|
6858
|
+
const O = q((E) => {
|
|
6859
6859
|
N(($) => {
|
|
6860
6860
|
const Y = E($.slices);
|
|
6861
6861
|
return Y === $.slices ? $ : {
|
|
@@ -6865,12 +6865,12 @@ function md({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
6865
6865
|
});
|
|
6866
6866
|
}, [N]), j = q((E, $) => N((Y) => rd(Y, E, $)), [N]), H = q((E, $) => N((Y) => ld(Y, E, $)), [N]), M = q((E, $) => N((Y) => dd(Y, E, $)), [N]), T = q((E) => [...g.current.additions, ...g.current.incoming].some(($) => $.slice.id.equals(E)) || !g.current.slices.some(($) => $.id.equals(E)) ? !1 : (N(($) => ad($, E)), !0), [N]), W = q((E, $) => N((Y) => sd(Y, E, $)), [N]), X = q((E, $, Y) => {
|
|
6867
6867
|
if (h || !u || S.current) return;
|
|
6868
|
-
S.current = !0,
|
|
6868
|
+
S.current = !0, L(!0);
|
|
6869
6869
|
const Q = d(Ql(E, Y));
|
|
6870
6870
|
N((P) => nd(P, Q, $)), Promise.resolve().then(() => u(Q, $)).then((P) => {
|
|
6871
6871
|
N((V) => Xn(V, Q.id, P));
|
|
6872
6872
|
}).catch(() => N((P) => Xn(P, Q.id))).finally(() => {
|
|
6873
|
-
S.current = !1,
|
|
6873
|
+
S.current = !1, L(!1);
|
|
6874
6874
|
});
|
|
6875
6875
|
}, [
|
|
6876
6876
|
h,
|
|
@@ -6880,7 +6880,7 @@ function md({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
6880
6880
|
]);
|
|
6881
6881
|
tt(e, () => ({
|
|
6882
6882
|
addSlice: X,
|
|
6883
|
-
updateSlices:
|
|
6883
|
+
updateSlices: O,
|
|
6884
6884
|
addProjectedSlice: j,
|
|
6885
6885
|
moveIn: H,
|
|
6886
6886
|
completeMoveIn: M,
|
|
@@ -6888,7 +6888,7 @@ function md({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
6888
6888
|
completeMoveOut: W
|
|
6889
6889
|
}), [
|
|
6890
6890
|
X,
|
|
6891
|
-
|
|
6891
|
+
O,
|
|
6892
6892
|
j,
|
|
6893
6893
|
H,
|
|
6894
6894
|
M,
|
|
@@ -6952,7 +6952,7 @@ function md({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
|
|
|
6952
6952
|
isDragging: I?.sliceId.equals(E.id) ?? !1,
|
|
6953
6953
|
onSliceDragStart: [...p.additions, ...p.incoming].some((te) => te.slice.id.equals(E.id)) ? void 0 : k,
|
|
6954
6954
|
addSlice: X,
|
|
6955
|
-
updateSlices:
|
|
6955
|
+
updateSlices: O
|
|
6956
6956
|
})
|
|
6957
6957
|
}, E.id.toString())), Y && $ === b.length - 1 && I?.dropIndex === b.length && P.push(/* @__PURE__ */ a(jn, {
|
|
6958
6958
|
isValid: I.isValid,
|
|
@@ -7197,46 +7197,53 @@ var Sc = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ee,
|
|
|
7197
7197
|
})
|
|
7198
7198
|
})
|
|
7199
7199
|
});
|
|
7200
|
-
}, Nd = ({ elements: e, windowSize: t, layout: n, collapsed: r = !1, conn: i, rowHeight: o, actorId: s }) => {
|
|
7201
|
-
const { readOnly:
|
|
7200
|
+
}, Nd = ({ elements: e, windowSize: t, layout: n, collapsed: r = !1, conn: i, rowHeight: o, actorId: s, hasScreen: d = !1, renderThumbnail: u }) => {
|
|
7201
|
+
const { readOnly: l, sliceId: c } = De(), { editing: f, actions: y, readOnly: h } = K(), { onPrototypeOpened: m, onPrototypeAdded: g } = f, v = A(null), [p, w] = F(), b = Si().prototypeThumbnail, S = { height: o }, C = "event-modeling-grid-slice-cell event-modeling-grid-slice-cell--centered event-modeling-grid-slice-cell--ui";
|
|
7202
7202
|
if (r) return /* @__PURE__ */ a("div", {
|
|
7203
|
-
style:
|
|
7204
|
-
className:
|
|
7203
|
+
style: S,
|
|
7204
|
+
className: C
|
|
7205
|
+
});
|
|
7206
|
+
const L = e.length > 0 || d, N = !l && c && m && c && m ? () => m(c, s, v.current?.getBoundingClientRect() ?? new DOMRect()) : h ? () => w(v.current?.getBoundingClientRect() ?? new DOMRect()) : void 0, O = /* @__PURE__ */ a(wi, {
|
|
7207
|
+
elements: [...e],
|
|
7208
|
+
windowSize: t,
|
|
7209
|
+
layout: n,
|
|
7210
|
+
onClick: N,
|
|
7211
|
+
openTitle: h ? b.openPreview : void 0
|
|
7205
7212
|
});
|
|
7206
|
-
const S = e.length > 0, C = !d && u && y && u && y ? () => y(u, s, m.current?.getBoundingClientRect() ?? new DOMRect()) : f ? () => v(m.current?.getBoundingClientRect() ?? new DOMRect()) : void 0;
|
|
7207
7213
|
return /* @__PURE__ */ x("div", {
|
|
7208
|
-
style:
|
|
7209
|
-
className:
|
|
7214
|
+
style: S,
|
|
7215
|
+
className: C,
|
|
7210
7216
|
children: [
|
|
7211
|
-
i.bottomOutgoing &&
|
|
7212
|
-
i.bottomIncoming &&
|
|
7217
|
+
i.bottomOutgoing && L && /* @__PURE__ */ a(Ke, {}),
|
|
7218
|
+
i.bottomIncoming && L && /* @__PURE__ */ a(Qe, {}),
|
|
7213
7219
|
/* @__PURE__ */ x("div", {
|
|
7214
7220
|
className: "event-modeling-grid-slice-cell-items",
|
|
7215
|
-
children: [
|
|
7216
|
-
ref:
|
|
7217
|
-
className: `event-modeling-grid-ui-preview${
|
|
7221
|
+
children: [L && /* @__PURE__ */ a("div", {
|
|
7222
|
+
ref: v,
|
|
7223
|
+
className: `event-modeling-grid-ui-preview${N ? " event-modeling-grid-ui-preview--clickable" : ""}`,
|
|
7218
7224
|
"data-flow-node": ue.ui,
|
|
7219
|
-
children:
|
|
7220
|
-
elements:
|
|
7225
|
+
children: u ? u({
|
|
7226
|
+
elements: e,
|
|
7221
7227
|
windowSize: t,
|
|
7222
7228
|
layout: n,
|
|
7223
|
-
onClick:
|
|
7224
|
-
openTitle:
|
|
7225
|
-
|
|
7226
|
-
|
|
7229
|
+
onClick: N,
|
|
7230
|
+
openTitle: h ? b.openPreview : void 0,
|
|
7231
|
+
fallback: O
|
|
7232
|
+
}) : O
|
|
7233
|
+
}), p && /* @__PURE__ */ a(yi, {
|
|
7227
7234
|
elements: e,
|
|
7228
7235
|
windowSize: t,
|
|
7229
7236
|
layout: n,
|
|
7230
|
-
sourceRect:
|
|
7231
|
-
onClose: () =>
|
|
7237
|
+
sourceRect: p,
|
|
7238
|
+
onClose: () => w(void 0)
|
|
7232
7239
|
})]
|
|
7233
7240
|
}),
|
|
7234
|
-
!
|
|
7241
|
+
!l && c && g && !L && /* @__PURE__ */ a(Ge, {
|
|
7235
7242
|
placement: Te.add,
|
|
7236
7243
|
children: /* @__PURE__ */ a(kd, {
|
|
7237
|
-
templates:
|
|
7238
|
-
onFromScratch: (
|
|
7239
|
-
onFromTemplate: (
|
|
7244
|
+
templates: y.prototypeTemplates ?? [],
|
|
7245
|
+
onFromScratch: (j) => g(c, s, j),
|
|
7246
|
+
onFromTemplate: (j, H) => j.onChosen(c, s, H)
|
|
7240
7247
|
})
|
|
7241
7248
|
})
|
|
7242
7249
|
]
|
|
@@ -7491,8 +7498,8 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
|
|
|
7491
7498
|
const { actions: d, selection: u, messages: l } = K(), c = ve(), [f, y] = F(r), [h, m] = F(void 0);
|
|
7492
7499
|
re(() => y(r), [r]);
|
|
7493
7500
|
const g = t === he.command, v = g ? d.commandCard : d.readModelCard, p = g ? et : nt, w = g ? l.interaction.command : l.interaction.readModel, b = !c && !!s, S = u.onArtifactSelected, C = () => {
|
|
7494
|
-
const
|
|
7495
|
-
m(void 0), !(!
|
|
7501
|
+
const L = h?.trim() ?? "";
|
|
7502
|
+
m(void 0), !(!L || !s) && (s(L), y(L));
|
|
7496
7503
|
};
|
|
7497
7504
|
return h !== void 0 ? /* @__PURE__ */ a(dn, {
|
|
7498
7505
|
value: h,
|
|
@@ -7624,7 +7631,7 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
|
|
|
7624
7631
|
schema: b.schema,
|
|
7625
7632
|
showDetails: o,
|
|
7626
7633
|
onRenamed: y && ((H) => y(e.id, b.id, H))
|
|
7627
|
-
}, b.id.toString()),
|
|
7634
|
+
}, b.id.toString()), L = S && /* @__PURE__ */ a(er, {
|
|
7628
7635
|
sliceId: e.id,
|
|
7629
7636
|
kind: he.readModel,
|
|
7630
7637
|
artifactId: S.id,
|
|
@@ -7655,7 +7662,7 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
|
|
|
7655
7662
|
})
|
|
7656
7663
|
})
|
|
7657
7664
|
}, H.id.toString());
|
|
7658
|
-
},
|
|
7665
|
+
}, O = !f && v.length > 0 && /* @__PURE__ */ a(Ge, {
|
|
7659
7666
|
placement: Te.add,
|
|
7660
7667
|
children: v.map((H) => /* @__PURE__ */ a(hn, { action: H }, H.tooltip))
|
|
7661
7668
|
});
|
|
@@ -7672,7 +7679,7 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
|
|
|
7672
7679
|
hasLeftCard: !!e.readModel || H,
|
|
7673
7680
|
hasRightCard: !!e.command,
|
|
7674
7681
|
cards: /* @__PURE__ */ x(ee, { children: [
|
|
7675
|
-
|
|
7682
|
+
L,
|
|
7676
7683
|
H && /* @__PURE__ */ a(_d, {
|
|
7677
7684
|
label: c.interaction.readModel,
|
|
7678
7685
|
defineLabel: c.interaction.defineReadModel,
|
|
@@ -7705,11 +7712,11 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
|
|
|
7705
7712
|
})
|
|
7706
7713
|
}),
|
|
7707
7714
|
right: C,
|
|
7708
|
-
rightCorner:
|
|
7715
|
+
rightCorner: O
|
|
7709
7716
|
}
|
|
7710
7717
|
});
|
|
7711
7718
|
}
|
|
7712
|
-
const j = e.sliceType === B.stateView ?
|
|
7719
|
+
const j = e.sliceType === B.stateView ? L : e.sliceType === B.automation ? /* @__PURE__ */ x(ee, { children: [L, C] }) : e.sliceType === B.translator ? /* @__PURE__ */ x(ee, { children: [e.externalEvents.map(N), C] }) : C;
|
|
7713
7720
|
return /* @__PURE__ */ a(Dt, {
|
|
7714
7721
|
collapsed: t,
|
|
7715
7722
|
conn: n,
|
|
@@ -7719,7 +7726,7 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
|
|
|
7719
7726
|
kind: "centered",
|
|
7720
7727
|
hasItems: p.length > 0,
|
|
7721
7728
|
cards: j,
|
|
7722
|
-
corners:
|
|
7729
|
+
corners: O
|
|
7723
7730
|
}
|
|
7724
7731
|
});
|
|
7725
7732
|
};
|