@cratis/event-models 0.345.0 → 0.347.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/screen-editor/BindingExpressionPropertyEditor-BDzuLWUA.js +471 -0
- package/dist/screen-editor/{DataBindingSections-wybsadzf.js → DataBindingSections-DLo6sV-E.js} +228 -228
- package/dist/screen-editor/{QueryBindingPropertyEditor-BofsQo32.js → QueryBindingPropertyEditor-BzDtdbGf.js} +1 -1
- package/dist/screen-editor/ScreenEditor/DesignMode/designModeAnnouncements.d.ts +9 -0
- package/dist/screen-editor/ScreenEditor/DesignMode/designModeSelection.d.ts +9 -0
- package/dist/screen-editor/ScreenEditor/Host/useDocumentSetters.d.ts +15 -0
- package/dist/screen-editor/ScreenEditor/Host/useEditApplication.d.ts +15 -0
- package/dist/screen-editor/ScreenEditor/Host/useEditingScene.d.ts +12 -0
- package/dist/screen-editor/ScreenEditor/Host/useNavigationEditing.d.ts +17 -0
- package/dist/screen-editor/ScreenEditor/Host/useStructureOperations.d.ts +39 -0
- package/dist/screen-editor/ScreenEditor/Inspector/ActionProperties.d.ts +14 -0
- package/dist/screen-editor/ScreenEditor/Inspector/CommandFormProperties.d.ts +12 -0
- package/dist/screen-editor/ScreenEditor/Inspector/ComponentProperties.d.ts +17 -0
- package/dist/screen-editor/ScreenEditor/Inspector/ExternalComponentSections.d.ts +14 -0
- package/dist/screen-editor/ScreenEditor/Inspector/PropertiesPanel.d.ts +1 -1
- package/dist/screen-editor/ScreenEditor/Inspector/PropertyGroups.d.ts +20 -0
- package/dist/screen-editor/ScreenEditor/Inspector/ScreenProperties.d.ts +10 -0
- package/dist/screen-editor/ScreenEditor/Inspector/bindingExpressionEdits.d.ts +26 -0
- package/dist/screen-editor/ScreenEditor/Surface/ScreenSurface.d.ts +1 -1
- package/dist/screen-editor/ScreenEditor/Surface/SelectionGrip.d.ts +10 -0
- package/dist/screen-editor/ScreenEditor/Surface/surfaceText.d.ts +4 -0
- package/dist/screen-editor/ScreenEditor/Surface/useDrawnScreen.d.ts +7 -0
- package/dist/screen-editor/ScreenEditor/Surface/useSurfaceKeys.d.ts +5 -0
- package/dist/screen-editor/ScreenEditor/Surface/useSurfaceMeasurer.d.ts +3 -0
- package/dist/screen-editor/ScreenEditor/Surface/useSurfaceViewportHeight.d.ts +2 -0
- package/dist/screen-editor/index.js +6486 -6356
- package/dist/screen-editor/screen-editor.css +1 -1
- package/package.json +3 -3
- package/dist/screen-editor/BindingExpressionPropertyEditor-D63oFTJg.js +0 -455
package/dist/screen-editor/{DataBindingSections-wybsadzf.js → DataBindingSections-DLo6sV-E.js}
RENAMED
|
@@ -157,7 +157,99 @@ var Zn = ({ diagnostics: e, label: t }) => {
|
|
|
157
157
|
}, `${r.code}:${r.path ?? ""}:${o}`))
|
|
158
158
|
})
|
|
159
159
|
});
|
|
160
|
-
},
|
|
160
|
+
}, d = {
|
|
161
|
+
addItem: "addItem",
|
|
162
|
+
addButton: "addButton",
|
|
163
|
+
rename: "rename",
|
|
164
|
+
target: "target",
|
|
165
|
+
slot: "slot",
|
|
166
|
+
slice: "slice",
|
|
167
|
+
emphasis: "emphasis",
|
|
168
|
+
display: "display",
|
|
169
|
+
addFilter: "addFilter",
|
|
170
|
+
addTab: "addTab",
|
|
171
|
+
addStat: "addStat",
|
|
172
|
+
sets: "sets",
|
|
173
|
+
control: "control",
|
|
174
|
+
shows: "shows",
|
|
175
|
+
valueFrom: "valueFrom",
|
|
176
|
+
opens: "opens",
|
|
177
|
+
enabled: "enabled",
|
|
178
|
+
moveEarlier: "moveEarlier",
|
|
179
|
+
moveLater: "moveLater",
|
|
180
|
+
duplicate: "duplicate",
|
|
181
|
+
delete: "delete",
|
|
182
|
+
addSubItem: "addSubItem"
|
|
183
|
+
}, Le = /* @__PURE__ */ (function(e) {
|
|
184
|
+
return e.Elements = "elements", e.Collection = "collection", e.Region = "region", e.Outlet = "outlet", e;
|
|
185
|
+
})({}), Et = (e) => "rejected" in e, x = (e, t, n) => ({
|
|
186
|
+
id: e,
|
|
187
|
+
icon: je(t),
|
|
188
|
+
title: n,
|
|
189
|
+
availability: Fe,
|
|
190
|
+
readOnlyReason: xe
|
|
191
|
+
}), Ft = [
|
|
192
|
+
x(d.moveEarlier, "arrow-left", "Move earlier"),
|
|
193
|
+
x(d.moveLater, "arrow-right", "Move later"),
|
|
194
|
+
x(d.duplicate, "copy", "Duplicate"),
|
|
195
|
+
x(d.delete, "trash", "Delete")
|
|
196
|
+
], ie = {
|
|
197
|
+
[E.Actions]: {
|
|
198
|
+
id: d.addButton,
|
|
199
|
+
item: O.Button
|
|
200
|
+
},
|
|
201
|
+
[E.Filters]: {
|
|
202
|
+
id: d.addFilter,
|
|
203
|
+
item: O.Filter
|
|
204
|
+
},
|
|
205
|
+
[E.Tabs]: {
|
|
206
|
+
id: d.addTab,
|
|
207
|
+
item: O.Tab
|
|
208
|
+
},
|
|
209
|
+
[E.Stats]: {
|
|
210
|
+
id: d.addStat,
|
|
211
|
+
item: O.Stat
|
|
212
|
+
},
|
|
213
|
+
[E.Navigation]: {
|
|
214
|
+
id: d.addItem,
|
|
215
|
+
item: O.Navigation
|
|
216
|
+
}
|
|
217
|
+
}, ne = (e, t, n) => ({
|
|
218
|
+
addActions: [{
|
|
219
|
+
id: ie[e].id,
|
|
220
|
+
label: t,
|
|
221
|
+
icon: je("plus")
|
|
222
|
+
}],
|
|
223
|
+
itemToolbar: [
|
|
224
|
+
x(d.rename, "pencil", "Rename"),
|
|
225
|
+
...n,
|
|
226
|
+
...Ft
|
|
227
|
+
]
|
|
228
|
+
});
|
|
229
|
+
function xt(e) {
|
|
230
|
+
switch (e) {
|
|
231
|
+
case E.Actions: {
|
|
232
|
+
const t = It(), n = t.itemToolbar.findIndex((i) => i.id === d.emphasis), r = [x(d.opens, "panel-right-open", "Opens"), x(d.enabled, "toggle-right", "Enabled")], o = n < 0 ? [...t.itemToolbar, ...r] : [
|
|
233
|
+
...t.itemToolbar.slice(0, n),
|
|
234
|
+
...r,
|
|
235
|
+
...t.itemToolbar.slice(n)
|
|
236
|
+
];
|
|
237
|
+
return {
|
|
238
|
+
...t,
|
|
239
|
+
itemToolbar: o
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
case E.Navigation:
|
|
243
|
+
return kt({ sidebar: !0 });
|
|
244
|
+
case E.Filters:
|
|
245
|
+
return ne(e, "Add filter", [x(d.sets, "filter", "Sets"), x(d.control, "sliders-horizontal", "Control")]);
|
|
246
|
+
case E.Tabs:
|
|
247
|
+
return ne(e, "Add tab", [x(d.shows, "app-window", "Shows")]);
|
|
248
|
+
case E.Stats:
|
|
249
|
+
return ne(e, "Add stat", [x(d.valueFrom, "hash", "Value from")]);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
var Mt = {
|
|
161
253
|
kinds: {
|
|
162
254
|
actions: "actions",
|
|
163
255
|
filters: "filters",
|
|
@@ -281,7 +373,7 @@ var Zn = ({ diagnostics: e, label: t }) => {
|
|
|
281
373
|
primary: "primary",
|
|
282
374
|
optional: "optional"
|
|
283
375
|
}
|
|
284
|
-
},
|
|
376
|
+
}, Rt = {
|
|
285
377
|
toolbarLabel: (e) => `Actions for ${e}`,
|
|
286
378
|
slotName: (e) => `slot: ${e}`,
|
|
287
379
|
titleField: "Title",
|
|
@@ -378,7 +470,7 @@ var Zn = ({ diagnostics: e, label: t }) => {
|
|
|
378
470
|
}
|
|
379
471
|
},
|
|
380
472
|
close: "Close",
|
|
381
|
-
outlets:
|
|
473
|
+
outlets: Mt,
|
|
382
474
|
announce: {
|
|
383
475
|
added: (e) => `Added ${e}`,
|
|
384
476
|
moved: (e, t, n) => `Moved ${e} to position ${t} of ${n}`,
|
|
@@ -386,108 +478,8 @@ var Zn = ({ diagnostics: e, label: t }) => {
|
|
|
386
478
|
removed: (e) => `Removed ${e}`,
|
|
387
479
|
refused: (e) => `Not possible: ${e}`
|
|
388
480
|
}
|
|
389
|
-
},
|
|
390
|
-
|
|
391
|
-
addButton: "addButton",
|
|
392
|
-
rename: "rename",
|
|
393
|
-
target: "target",
|
|
394
|
-
slot: "slot",
|
|
395
|
-
slice: "slice",
|
|
396
|
-
emphasis: "emphasis",
|
|
397
|
-
display: "display",
|
|
398
|
-
addFilter: "addFilter",
|
|
399
|
-
addTab: "addTab",
|
|
400
|
-
addStat: "addStat",
|
|
401
|
-
sets: "sets",
|
|
402
|
-
control: "control",
|
|
403
|
-
shows: "shows",
|
|
404
|
-
valueFrom: "valueFrom",
|
|
405
|
-
opens: "opens",
|
|
406
|
-
enabled: "enabled",
|
|
407
|
-
moveEarlier: "moveEarlier",
|
|
408
|
-
moveLater: "moveLater",
|
|
409
|
-
duplicate: "duplicate",
|
|
410
|
-
delete: "delete",
|
|
411
|
-
addSubItem: "addSubItem"
|
|
412
|
-
}, Be = /* @__PURE__ */ (function(e) {
|
|
413
|
-
return e.Elements = "elements", e.Collection = "collection", e.Region = "region", e.Outlet = "outlet", e;
|
|
414
|
-
})({}), xt = (e) => "rejected" in e;
|
|
415
|
-
function Mt(e, t) {
|
|
416
|
-
return {
|
|
417
|
-
id: e,
|
|
418
|
-
name: t,
|
|
419
|
-
visibility: lt.Visible,
|
|
420
|
-
isEnabled: !0,
|
|
421
|
-
opacity: 1,
|
|
422
|
-
size: {},
|
|
423
|
-
zIndex: 0,
|
|
424
|
-
minimumSize: {},
|
|
425
|
-
maximumSize: {},
|
|
426
|
-
margin: {
|
|
427
|
-
left: 0,
|
|
428
|
-
top: 0,
|
|
429
|
-
right: 0,
|
|
430
|
-
bottom: 0
|
|
431
|
-
},
|
|
432
|
-
horizontalAlignment: ot.Stretch,
|
|
433
|
-
verticalAlignment: at.Stretch,
|
|
434
|
-
properties: {}
|
|
435
|
-
};
|
|
436
|
-
}
|
|
437
|
-
function Rt(e, t, n, r = {}, o = {}) {
|
|
438
|
-
return {
|
|
439
|
-
...Mt(e, t),
|
|
440
|
-
componentName: n,
|
|
441
|
-
properties: r,
|
|
442
|
-
slots: o
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
var Lt = "dialog-actions-chrome";
|
|
446
|
-
function Bt(e) {
|
|
447
|
-
const t = e.screens.find((n) => n.name === q)?.fits;
|
|
448
|
-
return !t || t.length === 0 || t.includes(Oe.Dialog) || t.includes(Oe.Drawer);
|
|
449
|
-
}
|
|
450
|
-
function Dt(e) {
|
|
451
|
-
const t = e.dialogTemplates ?? [];
|
|
452
|
-
return t.find((n) => n.name === "FormDialog") ?? t[0] ?? {
|
|
453
|
-
name: "FormDialog",
|
|
454
|
-
slots: []
|
|
455
|
-
};
|
|
456
|
-
}
|
|
457
|
-
function _t(e, t = [], n = []) {
|
|
458
|
-
if (!Bt(e)) return !1;
|
|
459
|
-
const r = e.screens.find((s) => s.name === q), o = r?.screenTemplate ? [...e.screenTemplates, ...t].find((s) => s.name === r.screenTemplate) : void 0, i = r?.layout ? [...e.layouts, ...n].find((s) => s.name === r.layout) : void 0;
|
|
460
|
-
return ![...o?.outlets ?? [], ...i?.outlets ?? []].some((s) => s.name === $e);
|
|
461
|
-
}
|
|
462
|
-
function er(e, t) {
|
|
463
|
-
if (t.length === 0) return e;
|
|
464
|
-
const n = e.screens.map((r) => {
|
|
465
|
-
if (r.name !== "Screen") return r;
|
|
466
|
-
const o = r.slotContent?.[P]?.[0];
|
|
467
|
-
return o ? {
|
|
468
|
-
...r,
|
|
469
|
-
slotContent: {
|
|
470
|
-
...r.slotContent,
|
|
471
|
-
[P]: [{
|
|
472
|
-
...o,
|
|
473
|
-
children: [...o.children ?? [], ...t]
|
|
474
|
-
}, ...r.slotContent[P].slice(1)]
|
|
475
|
-
}
|
|
476
|
-
} : r;
|
|
477
|
-
});
|
|
478
|
-
return {
|
|
479
|
-
...e,
|
|
480
|
-
screens: n
|
|
481
|
-
};
|
|
482
|
-
}
|
|
483
|
-
function tr() {
|
|
484
|
-
return Rt(Lt, "Dialog actions", Ee, {
|
|
485
|
-
name: $e,
|
|
486
|
-
kind: "actions",
|
|
487
|
-
items: []
|
|
488
|
-
});
|
|
489
|
-
}
|
|
490
|
-
function qt({ document: e, screen: t, slices: n, queries: r, templates: o = [], layouts: i = [] }) {
|
|
481
|
+
}, Be = () => globalThis.crypto.randomUUID();
|
|
482
|
+
function Lt({ document: e, screen: t, slices: n, queries: r, templates: o = [], layouts: i = [] }) {
|
|
491
483
|
return {
|
|
492
484
|
slices: n,
|
|
493
485
|
slots: Xe(e, o, i, t),
|
|
@@ -495,7 +487,7 @@ function qt({ document: e, screen: t, slices: n, queries: r, templates: o = [],
|
|
|
495
487
|
routeParameters: []
|
|
496
488
|
};
|
|
497
489
|
}
|
|
498
|
-
function
|
|
490
|
+
function Bt(e, t) {
|
|
499
491
|
switch (e.availability) {
|
|
500
492
|
case void 0:
|
|
501
493
|
return !0;
|
|
@@ -506,8 +498,8 @@ function Ht(e, t) {
|
|
|
506
498
|
}
|
|
507
499
|
}
|
|
508
500
|
var Q = xe;
|
|
509
|
-
function
|
|
510
|
-
if (!
|
|
501
|
+
function er(e, t) {
|
|
502
|
+
if (!Bt(e, t)) return {
|
|
511
503
|
visible: !1,
|
|
512
504
|
enabled: !1
|
|
513
505
|
};
|
|
@@ -543,10 +535,10 @@ var fe = (e, t, n) => e.flatMap((r) => {
|
|
|
543
535
|
...r,
|
|
544
536
|
children: fe(r.children, t, n)
|
|
545
537
|
} : r];
|
|
546
|
-
}),
|
|
538
|
+
}), Dt = (e) => Object.fromEntries(Object.entries(e).filter(([, t]) => t !== void 0)), J = (e, t, n) => fe(e, t, (r) => Dt({
|
|
547
539
|
...r,
|
|
548
540
|
...n
|
|
549
|
-
})),
|
|
541
|
+
})), _t = (e, t) => fe(e, t, () => {
|
|
550
542
|
});
|
|
551
543
|
function G(e, t) {
|
|
552
544
|
for (const n of e) {
|
|
@@ -562,7 +554,7 @@ function Y(e, t) {
|
|
|
562
554
|
if (r) return r;
|
|
563
555
|
}
|
|
564
556
|
}
|
|
565
|
-
function
|
|
557
|
+
function qt(e, t, n) {
|
|
566
558
|
const r = Y(e, t);
|
|
567
559
|
if (!r) return [...e];
|
|
568
560
|
const o = r.findIndex((c) => c.id === t);
|
|
@@ -584,7 +576,7 @@ var De = (e, t) => ({
|
|
|
584
576
|
id: t(),
|
|
585
577
|
...e.children ? { children: e.children.map((n) => De(n, t)) } : {}
|
|
586
578
|
});
|
|
587
|
-
function
|
|
579
|
+
function Ht(e, t, n) {
|
|
588
580
|
const r = G(e, t), o = Y(e, t);
|
|
589
581
|
if (!r || !o) return { items: [...e] };
|
|
590
582
|
const i = De(r, n), s = o.findIndex((l) => l.id === t) + 1, c = [
|
|
@@ -597,7 +589,7 @@ function Ut(e, t, n) {
|
|
|
597
589
|
copy: i
|
|
598
590
|
};
|
|
599
591
|
}
|
|
600
|
-
var
|
|
592
|
+
var Pt = (e) => e === R.Inherits ? "inherit" : e === R.Extends ? "extend" : e === R.Overrides ? "override" : void 0;
|
|
601
593
|
function _e(e, t) {
|
|
602
594
|
if (!t?.module) return;
|
|
603
595
|
const n = e.modules.find((i) => i.id === t.module);
|
|
@@ -611,7 +603,7 @@ function _e(e, t) {
|
|
|
611
603
|
}
|
|
612
604
|
return [n.name, ...r].join(" › ");
|
|
613
605
|
}
|
|
614
|
-
function
|
|
606
|
+
function tr(e) {
|
|
615
607
|
const { region: t, module: n, navigation: r, structure: o, newId: i, slots: s, startingLabel: c, strings: l } = e, f = ht(o, r, n, t), y = At(r, n, t), h = pt(o, r, { slots: [...s] }), g = (k) => `${n ?? "application"}:${t}:${k}`, p = [], I = (k, v) => {
|
|
616
608
|
const S = k.filter((u) => !u.readOnly);
|
|
617
609
|
k.forEach((u) => {
|
|
@@ -672,7 +664,7 @@ function rr(e) {
|
|
|
672
664
|
});
|
|
673
665
|
};
|
|
674
666
|
return {
|
|
675
|
-
kind:
|
|
667
|
+
kind: Le.Region,
|
|
676
668
|
items: p,
|
|
677
669
|
regionTag: {
|
|
678
670
|
text: f.sources.label,
|
|
@@ -682,7 +674,7 @@ function rr(e) {
|
|
|
682
674
|
region: {
|
|
683
675
|
region: L,
|
|
684
676
|
...n !== void 0 ? { module: n } : {},
|
|
685
|
-
...f.mode ? { mode:
|
|
677
|
+
...f.mode ? { mode: Pt(f.mode) } : {}
|
|
686
678
|
},
|
|
687
679
|
add: (k) => k === d.addItem ? A() : { rejected: k },
|
|
688
680
|
act: (k, v) => {
|
|
@@ -692,15 +684,15 @@ function rr(e) {
|
|
|
692
684
|
case d.moveEarlier:
|
|
693
685
|
case d.moveLater: {
|
|
694
686
|
const S = v.index + (k === d.moveEarlier ? -1 : 1), u = Y(y, v.id);
|
|
695
|
-
return !u || S < 0 || S >= u.length ? { rejected: "noWhere" } : j("Move", w(
|
|
687
|
+
return !u || S < 0 || S >= u.length ? { rejected: "noWhere" } : j("Move", w(qt(y, v.id, S)), { itemId: v.id });
|
|
696
688
|
}
|
|
697
689
|
case d.duplicate: {
|
|
698
|
-
const S =
|
|
690
|
+
const S = Ht(y, v.id, i);
|
|
699
691
|
return S.copy ? j("Duplicate", w(S.items), { itemId: S.copy.id }) : { rejected: k };
|
|
700
692
|
}
|
|
701
693
|
case d.delete: {
|
|
702
694
|
const S = Y(y, v.id) ?? [], u = S.findIndex((z) => z.id === v.id), C = S[u + 1] ?? S[u - 1];
|
|
703
|
-
return j("Remove", w(
|
|
695
|
+
return j("Remove", w(_t(y, v.id)), { itemId: C?.id ?? null });
|
|
704
696
|
}
|
|
705
697
|
default:
|
|
706
698
|
return { rejected: k };
|
|
@@ -711,15 +703,15 @@ function rr(e) {
|
|
|
711
703
|
const S = G(y, v.id);
|
|
712
704
|
if (S) {
|
|
713
705
|
if (k === d.target) return {
|
|
714
|
-
property:
|
|
715
|
-
plan: (u) => j("Link", w(J(y, v.id, { target:
|
|
706
|
+
property: re("target", "Navigate to", "navigationItemTarget", S.target),
|
|
707
|
+
plan: (u) => j("Link", w(J(y, v.id, { target: Vt(u) ? u : void 0 })), { itemId: v.id })
|
|
716
708
|
};
|
|
717
709
|
if (k === d.slot) return {
|
|
718
|
-
property:
|
|
710
|
+
property: re("slot", "Render into slot", "renderingSlot", S.slot ?? "content"),
|
|
719
711
|
plan: (u) => j("Change", w(J(y, v.id, { slot: typeof u == "string" && u !== "content" ? u : void 0 })), { itemId: v.id })
|
|
720
712
|
};
|
|
721
713
|
if (k === "icon") return {
|
|
722
|
-
property:
|
|
714
|
+
property: re("icon", "Icon", "icon", S.icon),
|
|
723
715
|
plan: (u) => j("Change", w(J(y, v.id, { icon: typeof u == "string" && u !== "" ? u : void 0 })), { itemId: v.id })
|
|
724
716
|
};
|
|
725
717
|
}
|
|
@@ -739,8 +731,8 @@ function rr(e) {
|
|
|
739
731
|
}]
|
|
740
732
|
};
|
|
741
733
|
}
|
|
742
|
-
var
|
|
743
|
-
function
|
|
734
|
+
var Vt = (e) => typeof e == "object" && e !== null && typeof e.module == "string";
|
|
735
|
+
function re(e, t, n, r) {
|
|
744
736
|
return {
|
|
745
737
|
descriptor: {
|
|
746
738
|
path: e,
|
|
@@ -755,6 +747,81 @@ function ne(e, t, n, r) {
|
|
|
755
747
|
editable: !0
|
|
756
748
|
};
|
|
757
749
|
}
|
|
750
|
+
function Wt(e, t) {
|
|
751
|
+
return {
|
|
752
|
+
id: e,
|
|
753
|
+
name: t,
|
|
754
|
+
visibility: lt.Visible,
|
|
755
|
+
isEnabled: !0,
|
|
756
|
+
opacity: 1,
|
|
757
|
+
size: {},
|
|
758
|
+
zIndex: 0,
|
|
759
|
+
minimumSize: {},
|
|
760
|
+
maximumSize: {},
|
|
761
|
+
margin: {
|
|
762
|
+
left: 0,
|
|
763
|
+
top: 0,
|
|
764
|
+
right: 0,
|
|
765
|
+
bottom: 0
|
|
766
|
+
},
|
|
767
|
+
horizontalAlignment: ot.Stretch,
|
|
768
|
+
verticalAlignment: at.Stretch,
|
|
769
|
+
properties: {}
|
|
770
|
+
};
|
|
771
|
+
}
|
|
772
|
+
function Ut(e, t, n, r = {}, o = {}) {
|
|
773
|
+
return {
|
|
774
|
+
...Wt(e, t),
|
|
775
|
+
componentName: n,
|
|
776
|
+
properties: r,
|
|
777
|
+
slots: o
|
|
778
|
+
};
|
|
779
|
+
}
|
|
780
|
+
var zt = "dialog-actions-chrome";
|
|
781
|
+
function Kt(e) {
|
|
782
|
+
const t = e.screens.find((n) => n.name === q)?.fits;
|
|
783
|
+
return !t || t.length === 0 || t.includes(Oe.Dialog) || t.includes(Oe.Drawer);
|
|
784
|
+
}
|
|
785
|
+
function Qt(e) {
|
|
786
|
+
const t = e.dialogTemplates ?? [];
|
|
787
|
+
return t.find((n) => n.name === "FormDialog") ?? t[0] ?? {
|
|
788
|
+
name: "FormDialog",
|
|
789
|
+
slots: []
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
function Yt(e, t = [], n = []) {
|
|
793
|
+
if (!Kt(e)) return !1;
|
|
794
|
+
const r = e.screens.find((s) => s.name === q), o = r?.screenTemplate ? [...e.screenTemplates, ...t].find((s) => s.name === r.screenTemplate) : void 0, i = r?.layout ? [...e.layouts, ...n].find((s) => s.name === r.layout) : void 0;
|
|
795
|
+
return ![...o?.outlets ?? [], ...i?.outlets ?? []].some((s) => s.name === $e);
|
|
796
|
+
}
|
|
797
|
+
function nr(e, t) {
|
|
798
|
+
if (t.length === 0) return e;
|
|
799
|
+
const n = e.screens.map((r) => {
|
|
800
|
+
if (r.name !== "Screen") return r;
|
|
801
|
+
const o = r.slotContent?.[P]?.[0];
|
|
802
|
+
return o ? {
|
|
803
|
+
...r,
|
|
804
|
+
slotContent: {
|
|
805
|
+
...r.slotContent,
|
|
806
|
+
[P]: [{
|
|
807
|
+
...o,
|
|
808
|
+
children: [...o.children ?? [], ...t]
|
|
809
|
+
}, ...r.slotContent[P].slice(1)]
|
|
810
|
+
}
|
|
811
|
+
} : r;
|
|
812
|
+
});
|
|
813
|
+
return {
|
|
814
|
+
...e,
|
|
815
|
+
screens: n
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
function rr() {
|
|
819
|
+
return Ut(zt, "Dialog actions", Ee, {
|
|
820
|
+
name: $e,
|
|
821
|
+
kind: "actions",
|
|
822
|
+
items: []
|
|
823
|
+
});
|
|
824
|
+
}
|
|
758
825
|
function X(e, t) {
|
|
759
826
|
const n = e;
|
|
760
827
|
return {
|
|
@@ -765,7 +832,7 @@ function X(e, t) {
|
|
|
765
832
|
...typeof n.enabledWhen == "string" && n.enabledWhen !== "" ? { enabledWhen: n.enabledWhen } : {}
|
|
766
833
|
};
|
|
767
834
|
}
|
|
768
|
-
var
|
|
835
|
+
var Jt = (e) => {
|
|
769
836
|
switch (e) {
|
|
770
837
|
case O.Button:
|
|
771
838
|
case O.MenuEntry:
|
|
@@ -812,21 +879,21 @@ var Qt = (e) => {
|
|
|
812
879
|
effectiveValue: o,
|
|
813
880
|
source: ce.Local,
|
|
814
881
|
editable: !0
|
|
815
|
-
}),
|
|
882
|
+
}), Gt = (e) => e.flatMap((t) => t.parameters.map((n) => ({
|
|
816
883
|
value: ge(t.name, n.name),
|
|
817
884
|
label: `${t.name} › ${n.name}`
|
|
818
|
-
}))),
|
|
885
|
+
}))), Xt = (e) => e.filter((t) => t.resultShape !== Ce.Collection).flatMap((t) => t.resultFields.map((n) => ({
|
|
819
886
|
value: ge(t.name, n.name),
|
|
820
887
|
label: `${t.name} › ${n.name}`
|
|
821
888
|
})));
|
|
822
|
-
function
|
|
889
|
+
function Zt(e, t, n) {
|
|
823
890
|
const r = t, o = n.strings, i = (s) => {
|
|
824
891
|
const c = s;
|
|
825
892
|
return c?.query ? ge(c.query, c.parameter ?? c.field ?? "") : void 0;
|
|
826
893
|
};
|
|
827
894
|
switch (e) {
|
|
828
895
|
case d.sets:
|
|
829
|
-
return D("sets", o.sets, F.Enum, K.Enum, i(r.sets),
|
|
896
|
+
return D("sets", o.sets, F.Enum, K.Enum, i(r.sets), Gt(n.queries));
|
|
830
897
|
case d.control:
|
|
831
898
|
return D("control", o.control, F.Enum, K.Enum, r.control ?? se.Search, Object.values(se).map((s) => ({
|
|
832
899
|
value: s,
|
|
@@ -838,7 +905,7 @@ function Gt(e, t, n) {
|
|
|
838
905
|
label: s.label
|
|
839
906
|
})));
|
|
840
907
|
case d.valueFrom:
|
|
841
|
-
return D("valueFrom", o.valueFrom, F.Enum, K.Enum, i(r.valueFrom),
|
|
908
|
+
return D("valueFrom", o.valueFrom, F.Enum, K.Enum, i(r.valueFrom), Xt(n.queries));
|
|
842
909
|
case d.target:
|
|
843
910
|
return D("target", o.target, F.String, "navigationItemTarget", r.target);
|
|
844
911
|
case d.slot:
|
|
@@ -873,7 +940,7 @@ function Gt(e, t, n) {
|
|
|
873
940
|
return;
|
|
874
941
|
}
|
|
875
942
|
}
|
|
876
|
-
function
|
|
943
|
+
function en(e, t) {
|
|
877
944
|
const n = t == null || t === "";
|
|
878
945
|
switch (e) {
|
|
879
946
|
case d.sets: {
|
|
@@ -911,7 +978,7 @@ function Xt(e, t) {
|
|
|
911
978
|
return;
|
|
912
979
|
}
|
|
913
980
|
}
|
|
914
|
-
function
|
|
981
|
+
function tn(e, t) {
|
|
915
982
|
const n = e, r = t.strings, o = {}, i = n.sets, s = n.valueFrom;
|
|
916
983
|
switch (e.kind) {
|
|
917
984
|
case O.Filter:
|
|
@@ -934,7 +1001,7 @@ function Zt(e, t) {
|
|
|
934
1001
|
}
|
|
935
1002
|
return o;
|
|
936
1003
|
}
|
|
937
|
-
function
|
|
1004
|
+
function nn(e) {
|
|
938
1005
|
const t = e;
|
|
939
1006
|
switch (e.kind) {
|
|
940
1007
|
case O.Button:
|
|
@@ -952,73 +1019,6 @@ function en(e) {
|
|
|
952
1019
|
return !1;
|
|
953
1020
|
}
|
|
954
1021
|
}
|
|
955
|
-
var x = (e, t, n) => ({
|
|
956
|
-
id: e,
|
|
957
|
-
icon: je(t),
|
|
958
|
-
title: n,
|
|
959
|
-
availability: Fe,
|
|
960
|
-
readOnlyReason: xe
|
|
961
|
-
}), tn = [
|
|
962
|
-
x(d.moveEarlier, "arrow-left", "Move earlier"),
|
|
963
|
-
x(d.moveLater, "arrow-right", "Move later"),
|
|
964
|
-
x(d.duplicate, "copy", "Duplicate"),
|
|
965
|
-
x(d.delete, "trash", "Delete")
|
|
966
|
-
], ie = {
|
|
967
|
-
[E.Actions]: {
|
|
968
|
-
id: d.addButton,
|
|
969
|
-
item: O.Button
|
|
970
|
-
},
|
|
971
|
-
[E.Filters]: {
|
|
972
|
-
id: d.addFilter,
|
|
973
|
-
item: O.Filter
|
|
974
|
-
},
|
|
975
|
-
[E.Tabs]: {
|
|
976
|
-
id: d.addTab,
|
|
977
|
-
item: O.Tab
|
|
978
|
-
},
|
|
979
|
-
[E.Stats]: {
|
|
980
|
-
id: d.addStat,
|
|
981
|
-
item: O.Stat
|
|
982
|
-
},
|
|
983
|
-
[E.Navigation]: {
|
|
984
|
-
id: d.addItem,
|
|
985
|
-
item: O.Navigation
|
|
986
|
-
}
|
|
987
|
-
}, re = (e, t, n) => ({
|
|
988
|
-
addActions: [{
|
|
989
|
-
id: ie[e].id,
|
|
990
|
-
label: t,
|
|
991
|
-
icon: je("plus")
|
|
992
|
-
}],
|
|
993
|
-
itemToolbar: [
|
|
994
|
-
x(d.rename, "pencil", "Rename"),
|
|
995
|
-
...n,
|
|
996
|
-
...tn
|
|
997
|
-
]
|
|
998
|
-
});
|
|
999
|
-
function nn(e) {
|
|
1000
|
-
switch (e) {
|
|
1001
|
-
case E.Actions: {
|
|
1002
|
-
const t = It(), n = t.itemToolbar.findIndex((i) => i.id === d.emphasis), r = [x(d.opens, "panel-right-open", "Opens"), x(d.enabled, "toggle-right", "Enabled")], o = n < 0 ? [...t.itemToolbar, ...r] : [
|
|
1003
|
-
...t.itemToolbar.slice(0, n),
|
|
1004
|
-
...r,
|
|
1005
|
-
...t.itemToolbar.slice(n)
|
|
1006
|
-
];
|
|
1007
|
-
return {
|
|
1008
|
-
...t,
|
|
1009
|
-
itemToolbar: o
|
|
1010
|
-
};
|
|
1011
|
-
}
|
|
1012
|
-
case E.Navigation:
|
|
1013
|
-
return kt({ sidebar: !0 });
|
|
1014
|
-
case E.Filters:
|
|
1015
|
-
return re(e, "Add filter", [x(d.sets, "filter", "Sets"), x(d.control, "sliders-horizontal", "Control")]);
|
|
1016
|
-
case E.Tabs:
|
|
1017
|
-
return re(e, "Add tab", [x(d.shows, "app-window", "Shows")]);
|
|
1018
|
-
case E.Stats:
|
|
1019
|
-
return re(e, "Add stat", [x(d.valueFrom, "hash", "Value from")]);
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
1022
|
var U = (e) => {
|
|
1023
1023
|
const t = e;
|
|
1024
1024
|
if (Array.isArray(t.children)) return {
|
|
@@ -1211,9 +1211,9 @@ function yn(e) {
|
|
|
1211
1211
|
...a,
|
|
1212
1212
|
provenance: m
|
|
1213
1213
|
},
|
|
1214
|
-
chips:
|
|
1214
|
+
chips: tn(a, f),
|
|
1215
1215
|
...H.length > 0 ? { problems: H } : {},
|
|
1216
|
-
unlinked:
|
|
1216
|
+
unlinked: nn(a),
|
|
1217
1217
|
provenance: m
|
|
1218
1218
|
}), vn(a).forEach((te) => A(te, m, b, a.id));
|
|
1219
1219
|
};
|
|
@@ -1300,7 +1300,7 @@ function yn(e) {
|
|
|
1300
1300
|
title: b
|
|
1301
1301
|
};
|
|
1302
1302
|
}
|
|
1303
|
-
}, ee = (a) => "rejected" in a, V = (a) => a.readOnly ? void 0 : ve(g, a.id), W =
|
|
1303
|
+
}, ee = (a) => "rejected" in a, V = (a) => a.readOnly ? void 0 : ve(g, a.id), W = xt(y), be = (a) => a.readOnly ? p.includes(a.id) ? { rejected: "alreadyHidden" } : S("Hide", v({
|
|
1304
1304
|
hide: [...p, a.id],
|
|
1305
1305
|
...u()
|
|
1306
1306
|
}), { itemId: null }) : { rejected: "ownItem" }, ye = (a) => {
|
|
@@ -1330,7 +1330,7 @@ function yn(e) {
|
|
|
1330
1330
|
plan: () => be(a)
|
|
1331
1331
|
}];
|
|
1332
1332
|
return {
|
|
1333
|
-
kind:
|
|
1333
|
+
kind: Le.Outlet,
|
|
1334
1334
|
items: j,
|
|
1335
1335
|
removed: k,
|
|
1336
1336
|
name: n,
|
|
@@ -1385,13 +1385,13 @@ function yn(e) {
|
|
|
1385
1385
|
rename: (a, m) => V(a) ? C("Rename", Ie(g, a.id, { title: m }), a.id) : { rejected: a.readOnlyReason ?? Q },
|
|
1386
1386
|
choice: (a, m) => {
|
|
1387
1387
|
const b = V(m);
|
|
1388
|
-
if (!b || !
|
|
1389
|
-
const N =
|
|
1388
|
+
if (!b || !Jt(b.kind).includes(a)) return;
|
|
1389
|
+
const N = Zt(a, b, f);
|
|
1390
1390
|
if (N)
|
|
1391
1391
|
return {
|
|
1392
1392
|
property: N,
|
|
1393
1393
|
plan: (B) => {
|
|
1394
|
-
const H =
|
|
1394
|
+
const H = en(a, B);
|
|
1395
1395
|
return H ? C("Bind", Ie(g, m.id, H), m.id) : { rejected: a };
|
|
1396
1396
|
}
|
|
1397
1397
|
};
|
|
@@ -1431,7 +1431,7 @@ function wn(e) {
|
|
|
1431
1431
|
queries: On(t, e.queries),
|
|
1432
1432
|
screens: e.screens,
|
|
1433
1433
|
actionProperties: Sn(n),
|
|
1434
|
-
...e.slices ? { placement:
|
|
1434
|
+
...e.slices ? { placement: Lt({
|
|
1435
1435
|
document: t,
|
|
1436
1436
|
screen: q,
|
|
1437
1437
|
slices: e.slices,
|
|
@@ -1446,7 +1446,7 @@ function wn(e) {
|
|
|
1446
1446
|
kind: h.kind,
|
|
1447
1447
|
owner: g.name,
|
|
1448
1448
|
shell: g.kind === $.Layout && g.name === mt
|
|
1449
|
-
})), y = e.newId ??
|
|
1449
|
+
})), y = e.newId ?? Be;
|
|
1450
1450
|
return {
|
|
1451
1451
|
outlets: o,
|
|
1452
1452
|
levels: i,
|
|
@@ -1468,7 +1468,7 @@ function kn(e, t, n) {
|
|
|
1468
1468
|
const { document: r, context: o, outletLevel: i, structure: s } = e, c = t.location?.path, l = M(() => [...t.ownTemplates ?? [], ...t.runtime.bundles.flatMap((p) => p.screenTemplates ?? [])], [t.ownTemplates, t.runtime.bundles]), f = M(() => t.runtime.bundles.flatMap((p) => p.layouts ?? []), [t.runtime.bundles]), y = M(() => t.destinations.map((p) => ({
|
|
1469
1469
|
id: p.id,
|
|
1470
1470
|
label: p.label
|
|
1471
|
-
})), [t.destinations]), h = o.scope.kind === oe.Screen, g = M(() => h &&
|
|
1471
|
+
})), [t.destinations]), h = o.scope.kind === oe.Screen, g = M(() => h && Yt(r, l, f) ? Qt(r) : void 0, [
|
|
1472
1472
|
r,
|
|
1473
1473
|
h,
|
|
1474
1474
|
l,
|
|
@@ -1657,7 +1657,7 @@ var cr = (e, t) => ({
|
|
|
1657
1657
|
...e.ownTemplates ?? [],
|
|
1658
1658
|
...e.runtime.bundles.flatMap((n) => n.screenTemplates ?? [])
|
|
1659
1659
|
], ze = (e, t) => [...t.layouts, ...e.runtime.bundles.flatMap((n) => n.layouts ?? [])], ur = ({ controller: e, environment: t, strings: n, binding: r, candidate: o, disabled: i, onChange: s }) => {
|
|
1660
|
-
const c = n.properties.dataBinding, l = n.designMode ??
|
|
1660
|
+
const c = n.properties.dataBinding, l = n.designMode ?? Rt, f = kn(e, t, l.outlets), y = M(() => Ue(t, e.document), [t, e.document]), h = M(() => ze(t, e.document), [t, e.document]), g = M(() => Ve(e.document, y, h), [
|
|
1661
1661
|
e.document,
|
|
1662
1662
|
y,
|
|
1663
1663
|
h
|
|
@@ -1677,8 +1677,8 @@ var cr = (e, t) => ({
|
|
|
1677
1677
|
}))), j = (w) => {
|
|
1678
1678
|
const A = I[0] && f.design(I[0].name);
|
|
1679
1679
|
if (!A) return;
|
|
1680
|
-
const k = A.addItem(Cn(o.name, w,
|
|
1681
|
-
!
|
|
1680
|
+
const k = A.addItem(Cn(o.name, w, Be()));
|
|
1681
|
+
!Et(k) && k.documentChange && e.changeDocument(k.documentChange, k.label);
|
|
1682
1682
|
};
|
|
1683
1683
|
return /* @__PURE__ */ _("div", {
|
|
1684
1684
|
className: "studio-editor-query__group",
|
|
@@ -1809,11 +1809,11 @@ var cr = (e, t) => ({
|
|
|
1809
1809
|
});
|
|
1810
1810
|
};
|
|
1811
1811
|
export {
|
|
1812
|
-
|
|
1812
|
+
ie as A,
|
|
1813
1813
|
me as B,
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1814
|
+
Wt as C,
|
|
1815
|
+
Lt as D,
|
|
1816
|
+
Q as E,
|
|
1817
1817
|
Xn as F,
|
|
1818
1818
|
Qn as G,
|
|
1819
1819
|
Yn as H,
|
|
@@ -1821,12 +1821,12 @@ export {
|
|
|
1821
1821
|
zn as J,
|
|
1822
1822
|
Jn as K,
|
|
1823
1823
|
Ct as L,
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1824
|
+
d as M,
|
|
1825
|
+
Et as N,
|
|
1826
|
+
Be as O,
|
|
1827
1827
|
Zn as P,
|
|
1828
1828
|
$t as R,
|
|
1829
|
-
|
|
1829
|
+
Ut as S,
|
|
1830
1830
|
er as T,
|
|
1831
1831
|
P as U,
|
|
1832
1832
|
Nt as V,
|
|
@@ -1835,15 +1835,15 @@ export {
|
|
|
1835
1835
|
ue as Y,
|
|
1836
1836
|
mn as _,
|
|
1837
1837
|
Bn as a,
|
|
1838
|
-
|
|
1838
|
+
nr as b,
|
|
1839
1839
|
or as c,
|
|
1840
1840
|
sr as d,
|
|
1841
1841
|
Tn as f,
|
|
1842
1842
|
kn as g,
|
|
1843
1843
|
ar as h,
|
|
1844
1844
|
de as i,
|
|
1845
|
-
|
|
1846
|
-
|
|
1845
|
+
Le as j,
|
|
1846
|
+
Rt as k,
|
|
1847
1847
|
lr as l,
|
|
1848
1848
|
Nn as m,
|
|
1849
1849
|
mr as n,
|
|
@@ -1854,9 +1854,9 @@ export {
|
|
|
1854
1854
|
dr as s,
|
|
1855
1855
|
ur as t,
|
|
1856
1856
|
In as u,
|
|
1857
|
-
|
|
1857
|
+
Jt as v,
|
|
1858
1858
|
tr as w,
|
|
1859
|
-
|
|
1860
|
-
|
|
1859
|
+
Yt as x,
|
|
1860
|
+
rr as y,
|
|
1861
1861
|
Gn as z
|
|
1862
1862
|
};
|