@cratis/event-models 0.220.2 → 0.221.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.
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { c as Ha, d as Va, f as We, l as Xi, m as oo, p as Ja, s as Qa, t as er, u as Zt } from "./defaultStructuredEditorStrings-Ch1I0Lci.js";
|
|
2
2
|
import { t as tr } from "./QueryBindingEditor-MTd0R7iQ.js";
|
|
3
3
|
import { i as Ya, n as Za, r as Xa, t as es } from "./toTemplateSources-B9ALGe3x.js";
|
|
4
|
-
import { _ as ts, a as
|
|
4
|
+
import { _ as ts, a as rv, c as Ko, d as nr, f as ns, g as av, h as os, i as is, l as sv, m as rs, n as lv, o as ln, p as or, r as as, s as cv, t as dv, u as uv, v as pv, y as mv } from "./structuredValue-vqCZttsk.js";
|
|
5
5
|
import { a as ve, n as ss, r as ls } from "./iconDiagnostics-Ds4CnqD0.js";
|
|
6
|
-
import { t as
|
|
6
|
+
import { t as gv } from "./StructuredValueEditor-CcwyOga0.js";
|
|
7
7
|
import { createContext as cs, createElement as yt, useCallback as U, useContext as ds, useEffect as le, useId as us, useLayoutEffect as ye, useMemo as L, useRef as V, useState as z } from "react";
|
|
8
8
|
import { LayoutArrangement as J, PrototypeOverlayFrame as ir } from "@cratis/scene/ScreenEditor";
|
|
9
|
-
import { BindingMode as
|
|
10
|
-
import { ApplicationStructureIndex as Xt, EffectiveIconCatalog as Cs, NavigationEditKind as Ho, TemplateCatalogKind as lr, ToolbarDiagnosticSeverity as Ns, addNavItem as Ts, applicableTemplates as Is, applyEdit as cr, applyNavigationEdits as Ps, baseComponentLibraries as
|
|
9
|
+
import { BindingMode as wv, BindingNullBehavior as kv, BindingSourceKind as Sv, BindingSourceKind as xt, CollectionOperation as be, ColorScheme as ps, ComponentCategory as ms, DestinationKind as Cv, DestinationKind as rr, DiagnosticCode as hs, EditTarget as fs, EditingScopeKind as Vt, FlowContainerKind as cn, FormGenerationMode as he, FormWidthUnit as we, GridUnitType as gs, HorizontalAlignment as io, InteractionActionKind as lt, InteractionTriggerKind as ar, NavigationRegionKind as qo, NavigationRegionMode as xe, Orientation as ct, PackageKind as dt, PropertyEditorKind as Y, PropertyValueType as G, ProvenanceKind as Go, QueryOriginKind as vs, QueryResultShape as bs, SceneEditKind as Q, SceneNodeKind as ys, TemplateReferenceSource as ws, TemplateScope as ks, ValueSource as sr, VerticalAlignment as ro, Visibility as ao, componentCategories as Ss } from "@cratis/scene.model";
|
|
10
|
+
import { ApplicationStructureIndex as Xt, EffectiveIconCatalog as Cs, NavigationEditKind as Ho, TemplateCatalogKind as lr, ToolbarDiagnosticSeverity as Ns, addNavItem as Ts, applicableTemplates as Is, applyEdit as cr, applyNavigationEdits as Ps, baseComponentLibraries as xs, componentArgumentSourcePrefix as Os, componentBadge as Vo, computeSizeClass as Rs, corePackage as so, createDescriptorCatalog as Ds, diagnoseNavigationRegions as Es, effectiveNavigation as dr, effectivePackages as ur, elementNodeId as oe, findComponentDescriptor as lo, findLayoutTypeDescriptor as Jo, inspect as co, isCanvas as ut, isDockPanel as Fs, isExternalComponent as qe, isGrid as uo, isPackageSelectionValid as As, isPanel as jt, isStackPanel as po, isThemeCompatible as Ms, isWrapPanel as _s, matchComponentQuery as $s, normalizeToolbarButton as Ls, packagesOfKind as Qo, rankFrequentlyUsedComponents as Bs, resolveComponentName as Tt, resolveEffectiveConfiguration as pr, resolveIconLibraries as js, resolvePackageDependencies as Us, resolveTemplateChain as mo, resolveToolbarButton as Ws, setApplicationLogo as zs, switchRegionMode as mr, toComponentCatalog as en, toolbarButtonFromItem as ho, validateToolbarButtons as Ks, validateValue as dn } from "@cratis/scene.engine";
|
|
11
11
|
import { Fragment as ae, jsx as a, jsxs as b } from "react/jsx-runtime";
|
|
12
12
|
import { ErrorBoundary as He, IconButton as Ie, Tabs as qs } from "@cratis/components/Common";
|
|
13
13
|
import { ColorScheme as Gs, ComponentName as Hs, LayoutConfigProvider as hr, LayoutMode as Vs, LayoutName as Js, TemplatePreviewState as at, applyTemplatePreviewState as Qs, composeApplicationScreen as Ys, composeScreenElement as Zs, defaultApplicationChrome as Xs, defaultBlueprint as fr, defaultBlueprintName as gr, effectiveShellOf as vr, externalComponent as fo, foundationSamples as el, previewProfile as tl, resolveElementComponentNames as go } from "@cratis/scene.blueprint.default";
|
|
@@ -15,7 +15,7 @@ import { IconAdapterProvider as br, SceneElementView as vo, SceneNavigationModel
|
|
|
15
15
|
import { Toolbar as dl, ToolbarFolder as ul } from "@cratis/components/Toolbar";
|
|
16
16
|
import { PrototypeLayout as Ze } from "@cratis/scene";
|
|
17
17
|
import { FileUploadHandlerProvider as pl, QuillLoaderProvider as ml, primeReactPackage as Sr, primeReactThemes as Yo, usePrimeReactTheme as hl } from "@cratis/scene.primereact";
|
|
18
|
-
import { FaAlignJustify as Zo, FaAlignLeft as fl, FaAngleDoubleRight as un, FaArrowsAltH as gl, FaBars as st, FaBell as vl, FaBolt as bl, FaBookmark as yl, FaBorderAll as wl, FaCalendarAlt as Xo, FaCaretSquareDown as ei, FaChartBar as Cr, FaCheckSquare as ti, FaClock as kl, FaClone as Sl, FaCode as Cl, FaCog as ni, FaColumns as pn, FaCommentAlt as Nl, FaCommentDots as Nr, FaCompass as Tl, FaCreditCard as Il, FaCube as Pl, FaDatabase as
|
|
18
|
+
import { FaAlignJustify as Zo, FaAlignLeft as fl, FaAngleDoubleRight as un, FaArrowsAltH as gl, FaBars as st, FaBell as vl, FaBolt as bl, FaBookmark as yl, FaBorderAll as wl, FaCalendarAlt as Xo, FaCaretSquareDown as ei, FaChartBar as Cr, FaCheckSquare as ti, FaClock as kl, FaClone as Sl, FaCode as Cl, FaCog as ni, FaColumns as pn, FaCommentAlt as Nl, FaCommentDots as Nr, FaCompass as Tl, FaCreditCard as Il, FaCube as Pl, FaDatabase as xl, FaDesktop as Fn, FaEdit as mn, FaEllipsisH as Ol, FaExclamationCircle as hn, FaExpandArrowsAlt as Rl, FaFileAlt as An, FaFileUpload as Dl, FaFilter as oi, FaFolderOpen as ii, FaFont as ri, FaGripLines as Be, FaGripLinesVertical as El, FaGripVertical as Fl, FaHashtag as ai, FaHeading as Ut, FaHistory as Al, FaHourglassHalf as Ml, FaIdBadge as _l, FaImage as Tr, FaImages as si, FaInfoCircle as $l, FaKeyboard as Ir, FaLayerGroup as Ll, FaLink as Bl, FaList as Pr, FaListAlt as fn, FaListOl as gn, FaLock as jl, FaMask as li, FaMobileAlt as Ul, FaMousePointer as Wt, FaObjectGroup as Wl, FaPaintBrush as zl, FaPalette as vn, FaPen as Kl, FaPercent as ql, FaPlay as Gl, FaProjectDiagram as Hl, FaPuzzlePiece as xr, FaRedo as Vl, FaRegCheckCircle as Jl, FaRegCircle as bn, FaRegSquare as bo, FaSave as Ql, FaSearch as ci, FaShapes as Or, FaSitemap as yn, FaSlidersH as Mn, FaSpinner as di, FaSquare as Yl, FaStar as Zl, FaStepForward as wn, FaStickyNote as Xl, FaStream as ec, FaTable as pt, FaTag as Ot, FaTerminal as tc, FaTh as ui, FaThLarge as Rr, FaThList as yo, FaToggleOn as Dr, FaTools as nc, FaTrash as oc, FaTree as _n, FaUndo as ic, FaUser as rc, FaUserCircle as ac, FaVectorSquare as sc, FaWindowMaximize as mt, FaWindowRestore as lc } from "react-icons/fa";
|
|
19
19
|
import "@cratis/scene.primereact/primeReactTheme.css";
|
|
20
20
|
import { LuChevronLeft as cc, LuChevronRight as dc, LuCopy as uc, LuCornerDownRight as pc, LuLink as mc, LuLock as Er, LuPanelLeft as hc, LuPlus as fc, LuTrash2 as gc, LuZap as vc } from "react-icons/lu";
|
|
21
21
|
import { PrimeReactProvider as bc } from "@primereact/core/config";
|
|
@@ -28,8 +28,8 @@ import { styles as Nc } from "@primereact/styles/breadcrumb";
|
|
|
28
28
|
import { styles as Tc } from "@primereact/styles/button";
|
|
29
29
|
import { styles as Ic } from "@primereact/styles/buttongroup";
|
|
30
30
|
import { styles as Pc } from "@primereact/styles/card";
|
|
31
|
-
import { styles as
|
|
32
|
-
import { styles as
|
|
31
|
+
import { styles as xc } from "@primereact/styles/carousel";
|
|
32
|
+
import { styles as Oc } from "@primereact/styles/checkbox";
|
|
33
33
|
import { styles as Rc } from "@primereact/styles/checkboxgroup";
|
|
34
34
|
import { styles as Dc } from "@primereact/styles/chip";
|
|
35
35
|
import { styles as Ec } from "@primereact/styles/compare";
|
|
@@ -81,8 +81,8 @@ import { styles as Nd } from "@primereact/styles/speeddial";
|
|
|
81
81
|
import { styles as Td } from "@primereact/styles/splitter";
|
|
82
82
|
import { styles as Id } from "@primereact/styles/stepper";
|
|
83
83
|
import { styles as Pd } from "@primereact/styles/tabs";
|
|
84
|
-
import { styles as
|
|
85
|
-
import { styles as
|
|
84
|
+
import { styles as xd } from "@primereact/styles/tag";
|
|
85
|
+
import { styles as Od } from "@primereact/styles/terminal";
|
|
86
86
|
import { styles as Rd } from "@primereact/styles/textarea";
|
|
87
87
|
import { styles as Dd } from "@primereact/styles/timeline";
|
|
88
88
|
import { styles as Ed } from "@primereact/styles/toast";
|
|
@@ -231,13 +231,13 @@ function Br(e, t) {
|
|
|
231
231
|
if (r != null && typeof r == "object") return au(r, n, o, i);
|
|
232
232
|
const s = o[mi], l = typeof o.legacyType == "string" && o.legacyType !== "" ? o[pi] : void 0, c = l ?? (jt(e) ? tu(Lr(e)) : t(qe(e) ? e.componentName : "")), u = qe(e) ? e.componentName : "", { [pi]: d, [mi]: p, [Ve]: m, [Je]: h, ...g } = o, f = {};
|
|
233
233
|
for (const C of s?.topKeys ?? []) C in g && (f[C] = g[C], delete g[C]);
|
|
234
|
-
const v = me(m, s?.position.x ?? 0), w = me(h, s?.position.y ?? 0), P = n.name ?? "",
|
|
234
|
+
const v = me(m, s?.position.x ?? 0), w = me(h, s?.position.y ?? 0), P = n.name ?? "", x = s?.emptyName === !0 && P === (l ?? "");
|
|
235
235
|
return {
|
|
236
236
|
...ru(n, s),
|
|
237
237
|
...f,
|
|
238
238
|
_derivedTypeId: c ?? "externalComponent",
|
|
239
239
|
id: n.id,
|
|
240
|
-
...
|
|
240
|
+
...x ? {} : { name: P },
|
|
241
241
|
componentName: c ? c.slice(c.lastIndexOf(".") + 1) : $r(u),
|
|
242
242
|
properties: {
|
|
243
243
|
...g,
|
|
@@ -355,7 +355,7 @@ function Wr(e, t, n, o = 0, i = null) {
|
|
|
355
355
|
return c ? [u, ...Wr(l, t, n, o + 1, s)] : [u];
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
|
-
var
|
|
358
|
+
var Oe = /* @__PURE__ */ (function(e) {
|
|
359
359
|
return e.MoveUp = "moveUp", e.MoveDown = "moveDown", e.Outdent = "outdent", e.Indent = "indent", e;
|
|
360
360
|
})({});
|
|
361
361
|
function lu(e, t, n, o) {
|
|
@@ -363,19 +363,19 @@ function lu(e, t, n, o) {
|
|
|
363
363
|
if (!i) return;
|
|
364
364
|
const r = i.parent === null ? null : o.idOf(i.parent);
|
|
365
365
|
switch (n) {
|
|
366
|
-
case
|
|
366
|
+
case Oe.MoveUp:
|
|
367
367
|
return i.index > 0 ? {
|
|
368
368
|
nodeId: t,
|
|
369
369
|
targetParentId: r,
|
|
370
370
|
index: i.index - 1
|
|
371
371
|
} : void 0;
|
|
372
|
-
case
|
|
372
|
+
case Oe.MoveDown:
|
|
373
373
|
return i.index < i.siblings.length - 1 ? {
|
|
374
374
|
nodeId: t,
|
|
375
375
|
targetParentId: r,
|
|
376
376
|
index: i.index + 1
|
|
377
377
|
} : void 0;
|
|
378
|
-
case
|
|
378
|
+
case Oe.Outdent: {
|
|
379
379
|
if (i.parent === null) return;
|
|
380
380
|
const s = ke(e, o.idOf(i.parent), o);
|
|
381
381
|
return {
|
|
@@ -384,7 +384,7 @@ function lu(e, t, n, o) {
|
|
|
384
384
|
index: s.index + 1
|
|
385
385
|
};
|
|
386
386
|
}
|
|
387
|
-
case
|
|
387
|
+
case Oe.Indent: {
|
|
388
388
|
const s = i.index > 0 ? i.siblings[i.index - 1] : void 0;
|
|
389
389
|
return !s || !o.acceptsChildren(s) ? void 0 : {
|
|
390
390
|
nodeId: t,
|
|
@@ -477,17 +477,17 @@ function uu({ row: e, adapter: t, strings: n, isSelected: o, isFocusable: i, dro
|
|
|
477
477
|
});
|
|
478
478
|
}
|
|
479
479
|
var hi = {
|
|
480
|
-
ArrowUp:
|
|
481
|
-
ArrowDown:
|
|
482
|
-
ArrowLeft:
|
|
483
|
-
ArrowRight:
|
|
480
|
+
ArrowUp: Oe.MoveUp,
|
|
481
|
+
ArrowDown: Oe.MoveDown,
|
|
482
|
+
ArrowLeft: Oe.Outdent,
|
|
483
|
+
ArrowRight: Oe.Indent
|
|
484
484
|
};
|
|
485
485
|
function Kr({ roots: e, adapter: t, strings: n, selectedId: o, onSelect: i, onEdit: r, onRemove: s }) {
|
|
486
486
|
const [l, c] = z(() => new Set(e.flatMap((I) => [t.idOf(I), ...t.childrenOf(I).map((N) => t.idOf(N))]))), [u, d] = z(o), [p, m] = z(), [h, g] = z(), [f, v] = z(""), w = L(() => Wr(e, l, t), [
|
|
487
487
|
e,
|
|
488
488
|
l,
|
|
489
489
|
t
|
|
490
|
-
]), P = w.some((I) => I.id === u) ? u : w[0]?.id,
|
|
490
|
+
]), P = w.some((I) => I.id === u) ? u : w[0]?.id, x = U((I) => c((N) => {
|
|
491
491
|
const E = new Set(N);
|
|
492
492
|
return E.delete(I) || E.add(I), E;
|
|
493
493
|
}), []), C = U((I) => {
|
|
@@ -522,10 +522,10 @@ function Kr({ roots: e, adapter: t, strings: n, selectedId: o, onSelect: i, onEd
|
|
|
522
522
|
I.preventDefault(), k(w[w.length - 1]?.id);
|
|
523
523
|
break;
|
|
524
524
|
case "ArrowRight":
|
|
525
|
-
I.preventDefault(), B.hasChildren && !B.isExpanded ?
|
|
525
|
+
I.preventDefault(), B.hasChildren && !B.isExpanded ? x(N) : k(w[E + 1]?.parentId === N ? w[E + 1].id : void 0);
|
|
526
526
|
break;
|
|
527
527
|
case "ArrowLeft":
|
|
528
|
-
I.preventDefault(), B.isExpanded ?
|
|
528
|
+
I.preventDefault(), B.isExpanded ? x(N) : k(B.parentId ?? void 0);
|
|
529
529
|
break;
|
|
530
530
|
case "Enter":
|
|
531
531
|
case " ":
|
|
@@ -559,7 +559,7 @@ function Kr({ roots: e, adapter: t, strings: n, selectedId: o, onSelect: i, onEd
|
|
|
559
559
|
onSelect: (N) => {
|
|
560
560
|
d(N), i(N);
|
|
561
561
|
},
|
|
562
|
-
onToggle:
|
|
562
|
+
onToggle: x,
|
|
563
563
|
onKeyDown: y,
|
|
564
564
|
onDragStart: m,
|
|
565
565
|
onDragOver: T,
|
|
@@ -739,7 +739,7 @@ var ku = (e, t) => {
|
|
|
739
739
|
})
|
|
740
740
|
]
|
|
741
741
|
});
|
|
742
|
-
}, Un =
|
|
742
|
+
}, Un = Os;
|
|
743
743
|
function Cu(e, t) {
|
|
744
744
|
return `${Un}${e}.${t}`;
|
|
745
745
|
}
|
|
@@ -845,11 +845,11 @@ var Tu = ({ component: e, descriptor: t, controller: n, environment: o, strings:
|
|
|
845
845
|
children: c.diagnostic
|
|
846
846
|
})]
|
|
847
847
|
});
|
|
848
|
-
},
|
|
848
|
+
}, xu = "commandForm", Wn = "command", Hr = (e) => e.slice(e.lastIndexOf(":") + 1) === xu;
|
|
849
849
|
function Vr(e, t) {
|
|
850
|
-
return e.flatMap((n) => [...qe(n) && Hr(n.componentName) ? [
|
|
850
|
+
return e.flatMap((n) => [...qe(n) && Hr(n.componentName) ? [Ou(n, t)] : [], ...Vr(Zt(n), t)]);
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function Ou(e, t) {
|
|
853
853
|
const n = e.properties?.[Wn], o = typeof n == "string" ? n : "";
|
|
854
854
|
return {
|
|
855
855
|
elementId: e.id,
|
|
@@ -903,10 +903,10 @@ var Du = ({ controller: e, slices: t, strings: n, disabled: o }) => {
|
|
|
903
903
|
function Eu(e) {
|
|
904
904
|
return {
|
|
905
905
|
columns: [{
|
|
906
|
-
index:
|
|
906
|
+
index: 1,
|
|
907
907
|
width: De(1)
|
|
908
908
|
}, {
|
|
909
|
-
index:
|
|
909
|
+
index: 2,
|
|
910
910
|
width: De(1)
|
|
911
911
|
}],
|
|
912
912
|
placements: e.map((t, n) => No(t.name, n)),
|
|
@@ -914,22 +914,46 @@ function Eu(e) {
|
|
|
914
914
|
rowGap: De(12, we.Pixels)
|
|
915
915
|
};
|
|
916
916
|
}
|
|
917
|
-
function
|
|
918
|
-
const t = e.layout
|
|
917
|
+
function Fu(e) {
|
|
918
|
+
const t = e.layout;
|
|
919
|
+
if (!(t !== void 0 && (t.columns.some((o) => o.index < 1) || t.placements.some((o) => o.row < 1 || o.column < 1)))) return e;
|
|
920
|
+
const n = (o) => ({
|
|
921
|
+
...o,
|
|
922
|
+
row: o.row + 1,
|
|
923
|
+
column: o.column + 1
|
|
924
|
+
});
|
|
919
925
|
return {
|
|
920
926
|
...e,
|
|
921
927
|
layout: {
|
|
922
928
|
...t,
|
|
923
|
-
|
|
929
|
+
columns: t.columns.map((o) => ({
|
|
930
|
+
...o,
|
|
931
|
+
index: o.index + 1
|
|
932
|
+
})),
|
|
933
|
+
placements: t.placements.map(n)
|
|
924
934
|
},
|
|
925
|
-
fields: e.fields.map((o
|
|
935
|
+
fields: e.fields.map((o) => o.placement ? {
|
|
926
936
|
...o,
|
|
927
|
-
placement: n
|
|
937
|
+
placement: n(o.placement)
|
|
938
|
+
} : o)
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
function It(e) {
|
|
942
|
+
const t = Fu(e), n = t.layout ?? Eu(t.fields), o = t.fields.map((i, r) => Jr(n, i.name) ?? i.placement ?? No(i.name, r));
|
|
943
|
+
return {
|
|
944
|
+
...t,
|
|
945
|
+
layout: {
|
|
946
|
+
...n,
|
|
947
|
+
placements: o
|
|
948
|
+
},
|
|
949
|
+
fields: t.fields.map((i, r) => ({
|
|
950
|
+
...i,
|
|
951
|
+
placement: o[r]
|
|
928
952
|
}))
|
|
929
953
|
};
|
|
930
954
|
}
|
|
931
|
-
function
|
|
932
|
-
const o = It(e), i =
|
|
955
|
+
function Au(e, t, n) {
|
|
956
|
+
const o = It(e), i = _u(n(Jr(o.layout, t) ?? No(t, o.fields.findIndex((r) => r.name === t))));
|
|
933
957
|
return {
|
|
934
958
|
...o,
|
|
935
959
|
layout: {
|
|
@@ -942,7 +966,7 @@ function Fu(e, t, n) {
|
|
|
942
966
|
} : r)
|
|
943
967
|
};
|
|
944
968
|
}
|
|
945
|
-
function
|
|
969
|
+
function Mu(e, t, n) {
|
|
946
970
|
const o = It(e), i = o.layout.columns.some((r) => r.index === t) ? o.layout.columns.map((r) => r.index === t ? {
|
|
947
971
|
...r,
|
|
948
972
|
width: n
|
|
@@ -974,17 +998,17 @@ function Jr(e, t) {
|
|
|
974
998
|
function No(e, t) {
|
|
975
999
|
return {
|
|
976
1000
|
field: e,
|
|
977
|
-
row: Math.floor(t / 2),
|
|
978
|
-
column: t % 2,
|
|
1001
|
+
row: Math.floor(t / 2) + 1,
|
|
1002
|
+
column: t % 2 + 1,
|
|
979
1003
|
rowSpan: 1,
|
|
980
1004
|
columnSpan: 1
|
|
981
1005
|
};
|
|
982
1006
|
}
|
|
983
|
-
function
|
|
1007
|
+
function _u(e) {
|
|
984
1008
|
return {
|
|
985
1009
|
...e,
|
|
986
|
-
row: Math.max(
|
|
987
|
-
column: Math.max(
|
|
1010
|
+
row: Math.max(1, e.row),
|
|
1011
|
+
column: Math.max(1, e.column),
|
|
988
1012
|
rowSpan: Math.max(1, e.rowSpan ?? 1),
|
|
989
1013
|
columnSpan: Math.max(1, e.columnSpan ?? 1)
|
|
990
1014
|
};
|
|
@@ -997,21 +1021,21 @@ function zn(e) {
|
|
|
997
1021
|
fields: e.inputs.map((t) => ({ name: t.name }))
|
|
998
1022
|
};
|
|
999
1023
|
}
|
|
1000
|
-
function
|
|
1024
|
+
function $u(e, t) {
|
|
1001
1025
|
return It({
|
|
1002
1026
|
...e,
|
|
1003
1027
|
generationMode: he.Manual,
|
|
1004
|
-
fields:
|
|
1028
|
+
fields: Lu(t)
|
|
1005
1029
|
});
|
|
1006
1030
|
}
|
|
1007
|
-
function
|
|
1031
|
+
function Lu(e) {
|
|
1008
1032
|
return e.inputs.map((t) => ({
|
|
1009
1033
|
name: t.name,
|
|
1010
1034
|
sourceProperty: t.name,
|
|
1011
1035
|
label: t.name
|
|
1012
1036
|
}));
|
|
1013
1037
|
}
|
|
1014
|
-
function
|
|
1038
|
+
function Bu(e, t) {
|
|
1015
1039
|
return e.generationMode ? e.generationMode : t !== void 0 && e.fields.length === t.inputs.length && e.fields.every((n, o) => n.name === t.inputs[o]?.name && !n.sourceProperty && !n.composeUsing && !n.label && !n.placement) ? he.Auto : he.Manual;
|
|
1016
1040
|
}
|
|
1017
1041
|
function gi(e, t, n) {
|
|
@@ -1020,19 +1044,19 @@ function gi(e, t, n) {
|
|
|
1020
1044
|
fields: e.fields.map((o, i) => i === t ? n : o)
|
|
1021
1045
|
};
|
|
1022
1046
|
}
|
|
1023
|
-
function
|
|
1047
|
+
function ju(e, t) {
|
|
1024
1048
|
return t ? e.find((n) => n.forCommand === kt(t)) : void 0;
|
|
1025
1049
|
}
|
|
1026
|
-
var
|
|
1050
|
+
var Uu = St, Ee = /* @__PURE__ */ (function(e) {
|
|
1027
1051
|
return e.AutoMapped = "autoMapped", e.Renamed = "renamed", e.Composed = "composed", e.Broken = "broken", e;
|
|
1028
1052
|
})({});
|
|
1029
|
-
function
|
|
1053
|
+
function Wu(e, t) {
|
|
1030
1054
|
return e.fields.map((n) => ({
|
|
1031
1055
|
field: n,
|
|
1032
|
-
kind:
|
|
1056
|
+
kind: zu(n, t)
|
|
1033
1057
|
}));
|
|
1034
1058
|
}
|
|
1035
|
-
function
|
|
1059
|
+
function zu(e, t) {
|
|
1036
1060
|
if (e.composeUsing) return Ee.Composed;
|
|
1037
1061
|
const n = e.sourceProperty ?? e.name;
|
|
1038
1062
|
return t.includes(n) ? e.sourceProperty ? Ee.Renamed : Ee.AutoMapped : Ee.Broken;
|
|
@@ -1040,8 +1064,8 @@ function Wu(e, t) {
|
|
|
1040
1064
|
var ze = /* @__PURE__ */ (function(e) {
|
|
1041
1065
|
return e.None = "none", e.ViaQuery = "viaQuery", e.FromItem = "fromItem", e;
|
|
1042
1066
|
})({});
|
|
1043
|
-
function
|
|
1044
|
-
return e ?
|
|
1067
|
+
function Ku(e) {
|
|
1068
|
+
return e ? qu(e) ? {
|
|
1045
1069
|
kind: ze.ViaQuery,
|
|
1046
1070
|
queryName: e.queryName,
|
|
1047
1071
|
parameterNames: Object.keys(e.parameterBindings)
|
|
@@ -1053,26 +1077,26 @@ function zu(e) {
|
|
|
1053
1077
|
parameterNames: []
|
|
1054
1078
|
};
|
|
1055
1079
|
}
|
|
1056
|
-
function
|
|
1080
|
+
function qu(e) {
|
|
1057
1081
|
return "queryName" in e;
|
|
1058
1082
|
}
|
|
1059
|
-
var
|
|
1083
|
+
var Gu = {
|
|
1060
1084
|
[Ee.AutoMapped]: "Auto-mapped",
|
|
1061
1085
|
[Ee.Renamed]: "Renamed",
|
|
1062
1086
|
[Ee.Composed]: "Composed",
|
|
1063
1087
|
[Ee.Broken]: "Broken"
|
|
1064
|
-
},
|
|
1088
|
+
}, Hu = {
|
|
1065
1089
|
[ze.None]: "No populate source",
|
|
1066
1090
|
[ze.ViaQuery]: "Populate via query",
|
|
1067
1091
|
[ze.FromItem]: "Populate from item"
|
|
1068
1092
|
};
|
|
1069
|
-
function
|
|
1070
|
-
const o =
|
|
1093
|
+
function Vu({ form: e, commandProperties: t, onFieldSelected: n }) {
|
|
1094
|
+
const o = Ku(e.populateSource), i = Wu(e, t);
|
|
1071
1095
|
return /* @__PURE__ */ b("div", {
|
|
1072
1096
|
className: "studio-editor-form-designer",
|
|
1073
1097
|
children: [/* @__PURE__ */ b("div", {
|
|
1074
1098
|
className: "studio-editor-form-designer-populate-source",
|
|
1075
|
-
children: [/* @__PURE__ */ a("span", { children:
|
|
1099
|
+
children: [/* @__PURE__ */ a("span", { children: Hu[o.kind] }), o.kind === ze.ViaQuery && /* @__PURE__ */ b("span", {
|
|
1076
1100
|
className: "studio-editor-form-designer-populate-source-detail",
|
|
1077
1101
|
children: [o.queryName, o.parameterNames.length > 0 && ` by ${o.parameterNames.join(", ")}`]
|
|
1078
1102
|
})]
|
|
@@ -1088,7 +1112,7 @@ function Hu({ form: e, commandProperties: t, onFieldSelected: n }) {
|
|
|
1088
1112
|
}),
|
|
1089
1113
|
/* @__PURE__ */ a("span", {
|
|
1090
1114
|
className: "studio-editor-form-designer-field-kind",
|
|
1091
|
-
children:
|
|
1115
|
+
children: Gu[s]
|
|
1092
1116
|
}),
|
|
1093
1117
|
r.sourceProperty && /* @__PURE__ */ b("span", {
|
|
1094
1118
|
className: "studio-editor-form-designer-field-detail",
|
|
@@ -1103,18 +1127,18 @@ function Hu({ form: e, commandProperties: t, onFieldSelected: n }) {
|
|
|
1103
1127
|
})]
|
|
1104
1128
|
});
|
|
1105
1129
|
}
|
|
1106
|
-
var
|
|
1130
|
+
var Ju = ({ form: e, strings: t, onChange: n }) => {
|
|
1107
1131
|
const o = It(e), i = o.layout;
|
|
1108
1132
|
return /* @__PURE__ */ b("div", {
|
|
1109
1133
|
className: "studio-editor-properties__form-layout",
|
|
1110
1134
|
children: [
|
|
1111
1135
|
/* @__PURE__ */ b("fieldset", { children: [/* @__PURE__ */ a("legend", { children: t.columns }), i.columns.map((r) => /* @__PURE__ */ b("div", {
|
|
1112
1136
|
className: "studio-editor-properties__form-layout-row",
|
|
1113
|
-
children: [/* @__PURE__ */ a("span", { children: t.column(r.index
|
|
1114
|
-
name: t.column(r.index
|
|
1137
|
+
children: [/* @__PURE__ */ a("span", { children: t.column(r.index) }), /* @__PURE__ */ a(Kt, {
|
|
1138
|
+
name: t.column(r.index),
|
|
1115
1139
|
value: r.width ?? De(),
|
|
1116
1140
|
strings: t,
|
|
1117
|
-
onChange: (s) => n(
|
|
1141
|
+
onChange: (s) => n(Mu(o, r.index, s))
|
|
1118
1142
|
})]
|
|
1119
1143
|
}, r.index))] }),
|
|
1120
1144
|
/* @__PURE__ */ b("fieldset", { children: [
|
|
@@ -1140,22 +1164,23 @@ var Vu = ({ form: e, strings: t, onChange: n }) => {
|
|
|
1140
1164
|
] }),
|
|
1141
1165
|
/* @__PURE__ */ b("fieldset", { children: [/* @__PURE__ */ a("legend", { children: t.placements }), o.fields.map((r) => {
|
|
1142
1166
|
const s = i.placements.find((l) => l.field === r.name) ?? r.placement;
|
|
1143
|
-
return /* @__PURE__ */ b("fieldset", { children: [/* @__PURE__ */ a("legend", { children: r.label || r.name }), /* @__PURE__ */ a(
|
|
1167
|
+
return /* @__PURE__ */ b("fieldset", { children: [/* @__PURE__ */ a("legend", { children: r.label || r.name }), /* @__PURE__ */ a(Qu, {
|
|
1144
1168
|
placement: s,
|
|
1145
1169
|
strings: t,
|
|
1146
|
-
onChange: (l) => n(
|
|
1170
|
+
onChange: (l) => n(Au(o, r.name, () => l))
|
|
1147
1171
|
})] }, r.name);
|
|
1148
1172
|
})] })
|
|
1149
1173
|
]
|
|
1150
1174
|
});
|
|
1151
|
-
},
|
|
1175
|
+
}, Qu = ({ placement: e, strings: t, onChange: n }) => /* @__PURE__ */ b(ae, { children: [
|
|
1152
1176
|
/* @__PURE__ */ a(Rt, {
|
|
1153
1177
|
label: t.row,
|
|
1154
1178
|
value: e.row,
|
|
1155
1179
|
onChange: (o) => n({
|
|
1156
1180
|
...e,
|
|
1157
1181
|
row: o
|
|
1158
|
-
})
|
|
1182
|
+
}),
|
|
1183
|
+
minimum: 1
|
|
1159
1184
|
}),
|
|
1160
1185
|
/* @__PURE__ */ a(Rt, {
|
|
1161
1186
|
label: t.columnPlacement,
|
|
@@ -1163,7 +1188,8 @@ var Vu = ({ form: e, strings: t, onChange: n }) => {
|
|
|
1163
1188
|
onChange: (o) => n({
|
|
1164
1189
|
...e,
|
|
1165
1190
|
column: o
|
|
1166
|
-
})
|
|
1191
|
+
}),
|
|
1192
|
+
minimum: 1
|
|
1167
1193
|
}),
|
|
1168
1194
|
/* @__PURE__ */ a(Rt, {
|
|
1169
1195
|
label: t.rowSpan,
|
|
@@ -1225,8 +1251,8 @@ function vi(e, t) {
|
|
|
1225
1251
|
value: Number.isFinite(n) ? n : 0
|
|
1226
1252
|
};
|
|
1227
1253
|
}
|
|
1228
|
-
var
|
|
1229
|
-
const s = t?.inputs.map((c) => c.name) ?? e.fields.map((c) => c.sourceProperty ?? c.name), l =
|
|
1254
|
+
var Yu = ({ form: e, slice: t, idPrefix: n, strings: o, disabled: i, onChange: r }) => {
|
|
1255
|
+
const s = t?.inputs.map((c) => c.name) ?? e.fields.map((c) => c.sourceProperty ?? c.name), l = Bu(e, t) === he.Auto;
|
|
1230
1256
|
return /* @__PURE__ */ b("fieldset", {
|
|
1231
1257
|
className: "studio-editor-properties__form",
|
|
1232
1258
|
disabled: i,
|
|
@@ -1234,7 +1260,7 @@ var Qu = ({ form: e, slice: t, idPrefix: n, strings: o, disabled: i, onChange: r
|
|
|
1234
1260
|
/* @__PURE__ */ a("legend", { children: e.name }),
|
|
1235
1261
|
/* @__PURE__ */ b("label", { children: [/* @__PURE__ */ a("span", { children: o.mode }), /* @__PURE__ */ b("select", {
|
|
1236
1262
|
value: l ? he.Auto : he.Manual,
|
|
1237
|
-
onChange: (c) => t && r(c.target.value === he.Auto ? zn(t) :
|
|
1263
|
+
onChange: (c) => t && r(c.target.value === he.Auto ? zn(t) : $u(e, t)),
|
|
1238
1264
|
children: [/* @__PURE__ */ a("option", {
|
|
1239
1265
|
value: he.Auto,
|
|
1240
1266
|
children: o.auto
|
|
@@ -1243,7 +1269,7 @@ var Qu = ({ form: e, slice: t, idPrefix: n, strings: o, disabled: i, onChange: r
|
|
|
1243
1269
|
children: o.manual
|
|
1244
1270
|
})]
|
|
1245
1271
|
})] }),
|
|
1246
|
-
/* @__PURE__ */ a(
|
|
1272
|
+
/* @__PURE__ */ a(Vu, {
|
|
1247
1273
|
form: e,
|
|
1248
1274
|
commandProperties: s
|
|
1249
1275
|
}),
|
|
@@ -1271,15 +1297,15 @@ var Qu = ({ form: e, slice: t, idPrefix: n, strings: o, disabled: i, onChange: r
|
|
|
1271
1297
|
children: s.map((c) => /* @__PURE__ */ a("option", { value: c }, c))
|
|
1272
1298
|
})]
|
|
1273
1299
|
}),
|
|
1274
|
-
!l && /* @__PURE__ */ a(
|
|
1300
|
+
!l && /* @__PURE__ */ a(Ju, {
|
|
1275
1301
|
form: e,
|
|
1276
1302
|
strings: o,
|
|
1277
1303
|
onChange: r
|
|
1278
1304
|
})
|
|
1279
1305
|
]
|
|
1280
1306
|
});
|
|
1281
|
-
},
|
|
1282
|
-
const u = i.properties.commandForm, d =
|
|
1307
|
+
}, Zu = ({ elementId: e, command: t, slices: n, forms: o, strings: i, disabled: r, onCommandChange: s, onFormChange: l, onFormCreate: c }) => {
|
|
1308
|
+
const u = i.properties.commandForm, d = Uu(n, t), p = ju(o, d), m = t !== void 0 && t !== "" && !d;
|
|
1283
1309
|
return /* @__PURE__ */ b("fieldset", {
|
|
1284
1310
|
className: "studio-editor-query studio-editor-properties__command-form",
|
|
1285
1311
|
disabled: r,
|
|
@@ -1317,7 +1343,7 @@ var Qu = ({ form: e, slice: t, idPrefix: n, strings: o, disabled: i, onChange: r
|
|
|
1317
1343
|
onClick: () => c(d),
|
|
1318
1344
|
children: u.createForm(d.name)
|
|
1319
1345
|
}),
|
|
1320
|
-
d && p && /* @__PURE__ */ a(
|
|
1346
|
+
d && p && /* @__PURE__ */ a(Yu, {
|
|
1321
1347
|
form: p,
|
|
1322
1348
|
slice: d,
|
|
1323
1349
|
idPrefix: `${e}-form`,
|
|
@@ -1327,8 +1353,8 @@ var Qu = ({ form: e, slice: t, idPrefix: n, strings: o, disabled: i, onChange: r
|
|
|
1327
1353
|
})
|
|
1328
1354
|
]
|
|
1329
1355
|
});
|
|
1330
|
-
},
|
|
1331
|
-
const i = (c, u) => o(e.map((d, p) => p === c ?
|
|
1356
|
+
}, Xu = ({ outlets: e, disabled: t, strings: n, onChange: o }) => {
|
|
1357
|
+
const i = (c, u) => o(e.map((d, p) => p === c ? ep(u) : d)), r = (c) => o(e.filter((u, d) => d !== c)), s = (c, u) => o(tp(e, c, u)), l = () => o([...e, { name: np(e, n.newOutletName) }]);
|
|
1332
1358
|
return /* @__PURE__ */ b("section", {
|
|
1333
1359
|
className: "studio-editor-outlets",
|
|
1334
1360
|
children: [
|
|
@@ -1385,17 +1411,17 @@ var Qu = ({ form: e, slice: t, idPrefix: n, strings: o, disabled: i, onChange: r
|
|
|
1385
1411
|
]
|
|
1386
1412
|
});
|
|
1387
1413
|
};
|
|
1388
|
-
function
|
|
1414
|
+
function ep(e) {
|
|
1389
1415
|
return {
|
|
1390
1416
|
name: e.name,
|
|
1391
1417
|
...e.description ? { description: e.description } : {}
|
|
1392
1418
|
};
|
|
1393
1419
|
}
|
|
1394
|
-
function
|
|
1420
|
+
function tp(e, t, n) {
|
|
1395
1421
|
const o = [...e], [i] = o.splice(t, 1);
|
|
1396
1422
|
return i && o.splice(n, 0, i), o;
|
|
1397
1423
|
}
|
|
1398
|
-
function
|
|
1424
|
+
function np(e, t) {
|
|
1399
1425
|
const n = new Set(e.map((o) => o.name));
|
|
1400
1426
|
if (!n.has(t)) return t;
|
|
1401
1427
|
for (let o = 2; ; o++) {
|
|
@@ -1403,24 +1429,24 @@ function tp(e, t) {
|
|
|
1403
1429
|
if (!n.has(i)) return i;
|
|
1404
1430
|
}
|
|
1405
1431
|
}
|
|
1406
|
-
function
|
|
1432
|
+
function op(e, t, n, o) {
|
|
1407
1433
|
const i = n.flatMap((s) => s.screens ?? []).find((s) => s.screenTemplate === e);
|
|
1408
1434
|
if (!i) return;
|
|
1409
1435
|
const r = en(n.map((s) => s.manifest));
|
|
1410
1436
|
return Qs(go(Zs(i), o, r), t);
|
|
1411
1437
|
}
|
|
1412
|
-
function
|
|
1438
|
+
function ip(e, t) {
|
|
1413
1439
|
return t.find((n) => n.name === e && n.kind === lr.ScreenTemplate);
|
|
1414
1440
|
}
|
|
1415
1441
|
var ft = /* @__PURE__ */ (function(e) {
|
|
1416
1442
|
return e.Desktop = "desktop", e.Tablet = "tablet", e.Phone = "phone", e;
|
|
1417
|
-
})({}),
|
|
1418
|
-
const [s, l] = z(at.Populated), [c, u] = z(ft.Desktop), { bundles: d, profile: p, registry: m, designTime: h } = t.runtime, g = L(() =>
|
|
1443
|
+
})({}), rp = ({ templateName: e, environment: t, strings: n, disabled: o, onApply: i, onDiscard: r }) => {
|
|
1444
|
+
const [s, l] = z(at.Populated), [c, u] = z(ft.Desktop), { bundles: d, profile: p, registry: m, designTime: h } = t.runtime, g = L(() => op(e, s, d, p), [
|
|
1419
1445
|
e,
|
|
1420
1446
|
s,
|
|
1421
1447
|
d,
|
|
1422
1448
|
p
|
|
1423
|
-
]), f =
|
|
1449
|
+
]), f = ip(e, h.host.templates);
|
|
1424
1450
|
return /* @__PURE__ */ b("section", {
|
|
1425
1451
|
className: "studio-editor-template-preview",
|
|
1426
1452
|
"aria-label": n.preview(e),
|
|
@@ -1530,7 +1556,7 @@ var ft = /* @__PURE__ */ (function(e) {
|
|
|
1530
1556
|
children: c
|
|
1531
1557
|
}, c))]
|
|
1532
1558
|
})] }),
|
|
1533
|
-
/* @__PURE__ */ a(
|
|
1559
|
+
/* @__PURE__ */ a(Xu, {
|
|
1534
1560
|
outlets: s.outlets ?? [],
|
|
1535
1561
|
disabled: o,
|
|
1536
1562
|
strings: n.properties.outlets,
|
|
@@ -1539,16 +1565,16 @@ var ft = /* @__PURE__ */ (function(e) {
|
|
|
1539
1565
|
]
|
|
1540
1566
|
});
|
|
1541
1567
|
}
|
|
1542
|
-
return /* @__PURE__ */ a(
|
|
1568
|
+
return /* @__PURE__ */ a(ap, {
|
|
1543
1569
|
controller: e,
|
|
1544
1570
|
environment: t,
|
|
1545
1571
|
strings: n,
|
|
1546
1572
|
disabled: o
|
|
1547
1573
|
});
|
|
1548
|
-
},
|
|
1574
|
+
}, ap = ({ controller: e, environment: t, strings: n, disabled: o }) => {
|
|
1549
1575
|
const i = n.properties.templates, [r, s] = z(), l = e.document.screens.find((g) => g.name === ge);
|
|
1550
1576
|
if (!l) return null;
|
|
1551
|
-
const c = (g) => e.setScreenTemplate(t.runtime.bundles.flatMap((f) => f.screenTemplates ?? []).find((f) => f.name === g), i.choose), u = L(() =>
|
|
1577
|
+
const c = (g) => e.setScreenTemplate(t.runtime.bundles.flatMap((f) => f.screenTemplates ?? []).find((f) => f.name === g), i.choose), u = L(() => sp(Is({ blueprints: es(t.runtime.bundles) }, Za({
|
|
1552
1578
|
bundles: t.runtime.bundles,
|
|
1553
1579
|
profile: t.runtime.profile,
|
|
1554
1580
|
scope: t.templateScope
|
|
@@ -1568,7 +1594,7 @@ var ft = /* @__PURE__ */ (function(e) {
|
|
|
1568
1594
|
className: "studio-editor-properties__templates",
|
|
1569
1595
|
children: [
|
|
1570
1596
|
/* @__PURE__ */ a("strong", { children: i.label }),
|
|
1571
|
-
r && /* @__PURE__ */ a(
|
|
1597
|
+
r && /* @__PURE__ */ a(rp, {
|
|
1572
1598
|
templateName: r,
|
|
1573
1599
|
environment: t,
|
|
1574
1600
|
strings: i,
|
|
@@ -1594,7 +1620,7 @@ var ft = /* @__PURE__ */ (function(e) {
|
|
|
1594
1620
|
]
|
|
1595
1621
|
});
|
|
1596
1622
|
};
|
|
1597
|
-
function
|
|
1623
|
+
function sp(e) {
|
|
1598
1624
|
const t = (n) => n.map((o) => ({
|
|
1599
1625
|
...o,
|
|
1600
1626
|
templates: o.templates.filter((i) => i.kind === lr.ScreenTemplate)
|
|
@@ -1611,8 +1637,8 @@ function bi(e) {
|
|
|
1611
1637
|
const t = Object.fromEntries(Object.entries(e).filter(([, n]) => n !== void 0 && n !== ""));
|
|
1612
1638
|
return Object.keys(t).length > 0 ? t : void 0;
|
|
1613
1639
|
}
|
|
1614
|
-
var
|
|
1615
|
-
const r = (u, d) => i(e.map((p, m) => m === u ?
|
|
1640
|
+
var lp = ({ templates: e, referencedTemplates: t, disabled: n, strings: o, onChange: i }) => {
|
|
1641
|
+
const r = (u, d) => i(e.map((p, m) => m === u ? dp(d) : p)), s = (u) => i(e.filter((d, p) => p !== u)), l = (u, d) => i(up(e, u, d)), c = () => i([...e, cp(pp(e, o.newTemplateName))]);
|
|
1616
1642
|
return /* @__PURE__ */ b("section", {
|
|
1617
1643
|
className: "studio-editor-dialog-templates",
|
|
1618
1644
|
children: [
|
|
@@ -1681,14 +1707,14 @@ var sp = ({ templates: e, referencedTemplates: t, disabled: n, strings: o, onCha
|
|
|
1681
1707
|
]
|
|
1682
1708
|
});
|
|
1683
1709
|
};
|
|
1684
|
-
function
|
|
1710
|
+
function cp(e) {
|
|
1685
1711
|
return {
|
|
1686
1712
|
name: e,
|
|
1687
1713
|
slots: [{ name: "content" }],
|
|
1688
1714
|
behaviors: []
|
|
1689
1715
|
};
|
|
1690
1716
|
}
|
|
1691
|
-
function
|
|
1717
|
+
function dp(e) {
|
|
1692
1718
|
return {
|
|
1693
1719
|
name: e.name,
|
|
1694
1720
|
slots: e.slots.length > 0 ? e.slots : [{ name: "content" }],
|
|
@@ -1700,11 +1726,11 @@ function cp(e) {
|
|
|
1700
1726
|
...e.metadata ? { metadata: e.metadata } : {}
|
|
1701
1727
|
};
|
|
1702
1728
|
}
|
|
1703
|
-
function
|
|
1729
|
+
function up(e, t, n) {
|
|
1704
1730
|
const o = [...e], [i] = o.splice(t, 1);
|
|
1705
1731
|
return i && o.splice(n, 0, i), o;
|
|
1706
1732
|
}
|
|
1707
|
-
function
|
|
1733
|
+
function pp(e, t) {
|
|
1708
1734
|
const n = new Set(e.map((o) => o.name));
|
|
1709
1735
|
if (!n.has(t)) return t;
|
|
1710
1736
|
for (let o = 2; ; o++) {
|
|
@@ -1712,14 +1738,14 @@ function up(e, t) {
|
|
|
1712
1738
|
if (!n.has(i)) return i;
|
|
1713
1739
|
}
|
|
1714
1740
|
}
|
|
1715
|
-
var
|
|
1741
|
+
var mp = ({ controller: e, strings: t, disabled: n }) => /* @__PURE__ */ a(lp, {
|
|
1716
1742
|
templates: e.document.dialogTemplates,
|
|
1717
|
-
referencedTemplates:
|
|
1743
|
+
referencedTemplates: hp(e.document),
|
|
1718
1744
|
disabled: n,
|
|
1719
1745
|
strings: t.properties.dialogTemplates,
|
|
1720
1746
|
onChange: (o) => e.setDialogTemplates(o, t.properties.dialogTemplates.label)
|
|
1721
1747
|
});
|
|
1722
|
-
function
|
|
1748
|
+
function hp(e) {
|
|
1723
1749
|
const t = /* @__PURE__ */ new Set();
|
|
1724
1750
|
return gt(e.screens, t), gt(e.screenTemplates, t), gt(e.instanceContributions, t), t;
|
|
1725
1751
|
}
|
|
@@ -1733,13 +1759,13 @@ function gt(e, t) {
|
|
|
1733
1759
|
typeof n.dialog == "string" && n.dialog.length > 0 && t.add(n.dialog);
|
|
1734
1760
|
for (const o of Object.values(n)) gt(o, t);
|
|
1735
1761
|
}
|
|
1736
|
-
var
|
|
1762
|
+
var fp = (e, t, n = !1) => ({
|
|
1737
1763
|
kind: Q.ChangeLayoutType,
|
|
1738
1764
|
nodeId: e,
|
|
1739
1765
|
to: t,
|
|
1740
1766
|
...n ? { acceptLoss: !0 } : {}
|
|
1741
1767
|
});
|
|
1742
|
-
function
|
|
1768
|
+
function gp(e, t, n) {
|
|
1743
1769
|
if (t) return { kind: "applied" };
|
|
1744
1770
|
const o = n.find((i) => i.code === hs.LossyConversionNotAccepted);
|
|
1745
1771
|
return o ? {
|
|
@@ -1754,11 +1780,11 @@ function fp(e, t, n) {
|
|
|
1754
1780
|
diagnostics: [...n]
|
|
1755
1781
|
};
|
|
1756
1782
|
}
|
|
1757
|
-
var
|
|
1783
|
+
var vp = ({ inspection: e, controller: t, strings: n, disabled: o }) => {
|
|
1758
1784
|
const i = n.properties, [r, s] = z(), l = Jo(t.context.catalog, e.typeId), c = l?.capabilities.convertibleTo ?? [];
|
|
1759
1785
|
if (!l || c.length === 0) return null;
|
|
1760
1786
|
const u = (d) => {
|
|
1761
|
-
const p = t.tryApply(d, i.changeLayout), m =
|
|
1787
|
+
const p = t.tryApply(d, i.changeLayout), m = gp(d, p.applied, p.diagnostics);
|
|
1762
1788
|
s(m.kind === "confirm" ? {
|
|
1763
1789
|
lost: m.lost,
|
|
1764
1790
|
edit: m.edit
|
|
@@ -1769,7 +1795,7 @@ var gp = ({ inspection: e, controller: t, strings: n, disabled: o }) => {
|
|
|
1769
1795
|
children: [/* @__PURE__ */ b("label", { children: [/* @__PURE__ */ a("span", { children: i.layoutType }), /* @__PURE__ */ b("select", {
|
|
1770
1796
|
value: e.typeId,
|
|
1771
1797
|
disabled: o,
|
|
1772
|
-
onChange: (d) => u(
|
|
1798
|
+
onChange: (d) => u(fp(e.nodeId, d.target.value)),
|
|
1773
1799
|
children: [/* @__PURE__ */ a("option", {
|
|
1774
1800
|
value: e.typeId,
|
|
1775
1801
|
children: l.label
|
|
@@ -1800,7 +1826,7 @@ var gp = ({ inspection: e, controller: t, strings: n, disabled: o }) => {
|
|
|
1800
1826
|
})]
|
|
1801
1827
|
});
|
|
1802
1828
|
};
|
|
1803
|
-
function
|
|
1829
|
+
function bp(e, t, n, o = {}) {
|
|
1804
1830
|
const i = {
|
|
1805
1831
|
component: t,
|
|
1806
1832
|
path: n,
|
|
@@ -1814,7 +1840,7 @@ function vp(e, t, n, o = {}) {
|
|
|
1814
1840
|
property: i
|
|
1815
1841
|
};
|
|
1816
1842
|
}
|
|
1817
|
-
function
|
|
1843
|
+
function yp(e, t, n) {
|
|
1818
1844
|
return {
|
|
1819
1845
|
kind: Q.UnexposeProperty,
|
|
1820
1846
|
owner: e,
|
|
@@ -1822,24 +1848,24 @@ function bp(e, t, n) {
|
|
|
1822
1848
|
path: n
|
|
1823
1849
|
};
|
|
1824
1850
|
}
|
|
1825
|
-
var
|
|
1851
|
+
var wp = (e, t, n, o) => e.exposures.some((i) => i.owner === t && i.properties.some((r) => r.component === n && r.path === o)), kp = [
|
|
1826
1852
|
be.Add,
|
|
1827
1853
|
be.Remove,
|
|
1828
1854
|
be.Reorder,
|
|
1829
1855
|
be.EditFields
|
|
1830
|
-
],
|
|
1856
|
+
], Sp = ({ inspection: e, componentId: t, controller: n, strings: o, authoringTemplate: i }) => {
|
|
1831
1857
|
const r = o.properties;
|
|
1832
1858
|
if (i === void 0) return null;
|
|
1833
1859
|
const s = e.properties.filter((l) => l.descriptor.valueType !== G.Object && l.descriptor.group !== "Placement");
|
|
1834
1860
|
return s.length === 0 ? null : /* @__PURE__ */ b("section", {
|
|
1835
1861
|
className: "studio-editor-properties__exposure",
|
|
1836
1862
|
children: [/* @__PURE__ */ a("strong", { children: r.exposure }), /* @__PURE__ */ a("ul", { children: s.map((l) => {
|
|
1837
|
-
const c = l.descriptor.path, u =
|
|
1863
|
+
const c = l.descriptor.path, u = wp(n.document, i, t, c), d = l.descriptor.valueType === G.Collection;
|
|
1838
1864
|
return /* @__PURE__ */ a("li", { children: /* @__PURE__ */ b("label", { children: [
|
|
1839
1865
|
/* @__PURE__ */ a("input", {
|
|
1840
1866
|
type: "checkbox",
|
|
1841
1867
|
checked: u,
|
|
1842
|
-
onChange: (p) => n.apply(p.target.checked ?
|
|
1868
|
+
onChange: (p) => n.apply(p.target.checked ? bp(i, t, c, d ? { operations: kp } : {}) : yp(i, t, c), u ? r.unexposeProperty : r.exposeProperty)
|
|
1843
1869
|
}),
|
|
1844
1870
|
/* @__PURE__ */ a("span", { children: l.descriptor.label }),
|
|
1845
1871
|
u && /* @__PURE__ */ a("em", { children: r.exposedToScopes })
|
|
@@ -1900,7 +1926,7 @@ function wi(e, t) {
|
|
|
1900
1926
|
};
|
|
1901
1927
|
}
|
|
1902
1928
|
var To = ({ registry: e, property: t, context: n, componentId: o, onChange: i, diagnostics: r, presentation: s = "field" }) => {
|
|
1903
|
-
const l = s === "popover", { descriptor: c } = t, u = `pe-${o}-${c.path}`.replace(/[^A-Za-z0-9_-]/g, "-"), d = e.resolve(c), p = Ha(t), { editor: m, failed: h } = wi(e, d?.id), { editor: g } = wi(e, p ? "bindingExpression" : void 0), f = n.strings.editors, v = !t.editable || c.readOnly === !0, w = t.editable ? c.readOnly === !0 ? f.readOnly : void 0 : t.reason ?? f.inherited, P = t.effectiveValue,
|
|
1929
|
+
const l = s === "popover", { descriptor: c } = t, u = `pe-${o}-${c.path}`.replace(/[^A-Za-z0-9_-]/g, "-"), d = e.resolve(c), p = Ha(t), { editor: m, failed: h } = wi(e, d?.id), { editor: g } = wi(e, p ? "bindingExpression" : void 0), f = n.strings.editors, v = !t.editable || c.readOnly === !0, w = t.editable ? c.readOnly === !0 ? f.readOnly : void 0 : t.reason ?? f.inherited, P = t.effectiveValue, x = Cp(t, r), C = P == null || !Ko(c) ? void 0 : dn(c, P) ?? Kn(c, P), k = C !== void 0 && dn(c, P) !== void 0 ? ts(c, P) : void 0, y = k !== void 0 && dn(c, k) === void 0, T = (E) => i(t, E), A = p && Qa(P), I = c.valueType === "boolean", N = Ko(c);
|
|
1904
1930
|
return /* @__PURE__ */ b("div", {
|
|
1905
1931
|
className: `studio-editor-field${I ? " studio-editor-field--inline" : ""}`,
|
|
1906
1932
|
"data-property": c.path,
|
|
@@ -1951,7 +1977,7 @@ var To = ({ registry: e, property: t, context: n, componentId: o, onChange: i, d
|
|
|
1951
1977
|
disabled: v,
|
|
1952
1978
|
...l ? { inline: !0 } : {},
|
|
1953
1979
|
...w ? { readOnlyReason: w } : {},
|
|
1954
|
-
...
|
|
1980
|
+
...x ? { problem: x } : {}
|
|
1955
1981
|
})
|
|
1956
1982
|
}, o) : h ? /* @__PURE__ */ a("p", {
|
|
1957
1983
|
className: "studio-editor-binding__missing",
|
|
@@ -1983,17 +2009,17 @@ var To = ({ registry: e, property: t, context: n, componentId: o, onChange: i, d
|
|
|
1983
2009
|
"data-reason": !0,
|
|
1984
2010
|
children: w
|
|
1985
2011
|
}),
|
|
1986
|
-
|
|
2012
|
+
x && /* @__PURE__ */ a("p", {
|
|
1987
2013
|
id: `${u}-problem`,
|
|
1988
2014
|
className: "studio-editor-field__problem",
|
|
1989
2015
|
role: "alert",
|
|
1990
|
-
"data-code":
|
|
1991
|
-
children:
|
|
2016
|
+
"data-code": x.code,
|
|
2017
|
+
children: x.message
|
|
1992
2018
|
})
|
|
1993
2019
|
]
|
|
1994
2020
|
});
|
|
1995
2021
|
};
|
|
1996
|
-
function
|
|
2022
|
+
function Cp(e, t) {
|
|
1997
2023
|
const n = t.find((o) => o.path === e.descriptor.path && o.severity === "error");
|
|
1998
2024
|
return n ? {
|
|
1999
2025
|
code: n.code,
|
|
@@ -2114,7 +2140,7 @@ var Zr = {
|
|
|
2114
2140
|
}
|
|
2115
2141
|
}, Fe = /* @__PURE__ */ (function(e) {
|
|
2116
2142
|
return e.NotJson = "notJson", e.WrongShape = "wrongShape", e.MissingScreen = "missingScreen", e.MissingTemplate = "missingTemplate", e;
|
|
2117
|
-
})({}),
|
|
2143
|
+
})({}), Np = [
|
|
2118
2144
|
"layouts",
|
|
2119
2145
|
"screenTemplates",
|
|
2120
2146
|
"dialogTemplates",
|
|
@@ -2133,7 +2159,7 @@ function Xr(e, t) {
|
|
|
2133
2159
|
};
|
|
2134
2160
|
}
|
|
2135
2161
|
const o = n;
|
|
2136
|
-
if (!o || typeof o != "object" ||
|
|
2162
|
+
if (!o || typeof o != "object" || Np.some((r) => !Array.isArray(o[r]))) return {
|
|
2137
2163
|
readable: !1,
|
|
2138
2164
|
problem: Fe.WrongShape
|
|
2139
2165
|
};
|
|
@@ -2157,7 +2183,7 @@ var te = /* @__PURE__ */ (function(e) {
|
|
|
2157
2183
|
})({}), ki = {
|
|
2158
2184
|
Compact: "Compact",
|
|
2159
2185
|
Regular: "Regular"
|
|
2160
|
-
},
|
|
2186
|
+
}, Tp = {
|
|
2161
2187
|
ariaLabel: "Icon",
|
|
2162
2188
|
picker: {
|
|
2163
2189
|
placeholder: "Choose an icon",
|
|
@@ -2187,7 +2213,7 @@ var te = /* @__PURE__ */ (function(e) {
|
|
|
2187
2213
|
"catalog-unavailable": "The icons of {library} could not be read, so they cannot be checked. Try again in a moment."
|
|
2188
2214
|
},
|
|
2189
2215
|
notAllowed: "This icon is not available for this field. Choose one of the icons the field offers."
|
|
2190
|
-
},
|
|
2216
|
+
}, Ip = {
|
|
2191
2217
|
inspectorTitle: "Inspector",
|
|
2192
2218
|
windowLabel: "Screen editor",
|
|
2193
2219
|
stopped: {
|
|
@@ -2282,7 +2308,7 @@ var te = /* @__PURE__ */ (function(e) {
|
|
|
2282
2308
|
exposedToScopes: "Screens can change this",
|
|
2283
2309
|
itemsLabel: "Items",
|
|
2284
2310
|
addItem: "Add item",
|
|
2285
|
-
icon:
|
|
2311
|
+
icon: Tp,
|
|
2286
2312
|
structured: er,
|
|
2287
2313
|
editors: Zr,
|
|
2288
2314
|
templates: {
|
|
@@ -2521,7 +2547,7 @@ var te = /* @__PURE__ */ (function(e) {
|
|
|
2521
2547
|
[te.NoChange]: "It is already there."
|
|
2522
2548
|
}
|
|
2523
2549
|
};
|
|
2524
|
-
function
|
|
2550
|
+
function Pp(e, t) {
|
|
2525
2551
|
const n = e?.query, o = n !== null && typeof n == "object" && "queryId" in n ? n.queryId : void 0;
|
|
2526
2552
|
return typeof o == "string" ? t.find((i) => i.id === o)?.resultFields ?? [] : [];
|
|
2527
2553
|
}
|
|
@@ -2535,7 +2561,7 @@ function Io(e) {
|
|
|
2535
2561
|
...t.navigationModule !== void 0 ? { navigationModule: t.navigationModule } : {},
|
|
2536
2562
|
queryCandidates: n.queryCandidates,
|
|
2537
2563
|
availableSources: n.availableSources,
|
|
2538
|
-
fields:
|
|
2564
|
+
fields: Pp(u, n.queryCandidates),
|
|
2539
2565
|
colorTokens: d?.colorTokens ?? [],
|
|
2540
2566
|
icons: {
|
|
2541
2567
|
catalog: p.icons,
|
|
@@ -2567,11 +2593,11 @@ function Io(e) {
|
|
|
2567
2593
|
} : g,
|
|
2568
2594
|
structured: h.structured ?? er,
|
|
2569
2595
|
icon: h.icon,
|
|
2570
|
-
iconPicker: h.iconPickerLabels ??
|
|
2596
|
+
iconPicker: h.iconPickerLabels ?? Ip.properties.iconPickerLabels ?? {}
|
|
2571
2597
|
}
|
|
2572
2598
|
};
|
|
2573
2599
|
}
|
|
2574
|
-
function
|
|
2600
|
+
function xp(e, t, n) {
|
|
2575
2601
|
return {
|
|
2576
2602
|
...e,
|
|
2577
2603
|
session: {
|
|
@@ -2609,7 +2635,7 @@ function Op(e) {
|
|
|
2609
2635
|
return "undescribed";
|
|
2610
2636
|
}
|
|
2611
2637
|
}
|
|
2612
|
-
var
|
|
2638
|
+
var Rp = class {
|
|
2613
2639
|
#e = /* @__PURE__ */ new Map();
|
|
2614
2640
|
#n = /* @__PURE__ */ new Map();
|
|
2615
2641
|
#t = /* @__PURE__ */ new Map();
|
|
@@ -2659,8 +2685,8 @@ var xp = class {
|
|
|
2659
2685
|
} : void 0;
|
|
2660
2686
|
}
|
|
2661
2687
|
};
|
|
2662
|
-
function
|
|
2663
|
-
const e = new
|
|
2688
|
+
function Dp() {
|
|
2689
|
+
const e = new Rp();
|
|
2664
2690
|
e.register(Y.Text, async () => (await import("./TextEditor-BEH-9K1S.js")).TextEditor), e.register(Y.Number, async () => (await import("./NumberEditor-Cyo9_23Z.js")).NumberEditor), e.register(Y.Boolean, async () => (await import("./BooleanEditor-eC1yCpz0.js")).BooleanEditor), e.register(Y.Enum, async () => (await import("./EnumEditor-DNnnf9i3.js")).EnumEditor), e.register(Y.Select, async () => (await import("./SelectEditor-CY6dlYWi.js")).SelectEditor), e.register(Y.Color, async () => (await import("./ColorEditor-Cc6Xq8pW.js")).ColorEditor), e.register(Y.Icon, async () => (await import("./IconEditor-C0ibqn-e.js")).IconEditor), e.register(Y.List, async () => (await import("./ListEditor-CfFPVVJ4.js")).ListEditor), e.register(Y.Reference, async () => (await import("./ReferenceEditor-CTguqJZC.js")).ReferenceEditor), e.register(Y.NavigationTarget, async () => (await import("./NavigationTargetEditor-C53kuCBJ.js")).NavigationTargetEditor), e.register(Y.RenderingSlot, async () => (await import("./RenderingSlotEditor-D0ppEIOx.js")).RenderingSlotEditor), e.register(Y.Slice, async () => (await import("./SliceEditor-BdiU5-Tg.js")).SliceEditor), e.register(Y.InheritanceMode, async () => (await import("./InheritanceModeEditor-CtdsACnc.js")).InheritanceModeEditor), e.register(Y.Field, async () => (await import("./FieldEditor-e6VpsD__.js")).FieldEditor), e.register(Y.ColumnList, async () => (await import("./ColumnListEditor-CmhQYS5b.js")).ColumnListEditor), e.register(Y.Template, async () => (await import("./TemplatePropertyEditor-CDKWG7m1.js")).TemplatePropertyEditor), e.register(Y.SampleData, async () => (await import("./ReferenceTargetEditors-Bx6dhIxY.js")).SampleDataEditor), e.register("object", async () => (await import("./StructuredPropertyEditor-B3lVjrHZ.js")).StructuredPropertyEditor), e.register("collection", async () => (await import("./CollectionEditor-C7eX8Hw7.js")).CollectionEditor);
|
|
2665
2691
|
for (const t of [
|
|
2666
2692
|
Y.StringList,
|
|
@@ -2680,11 +2706,11 @@ function Rp() {
|
|
|
2680
2706
|
]) e.register(t, async () => (await import("./SummaryEditor-C5wP1uIH.js")).SummaryEditor);
|
|
2681
2707
|
return e;
|
|
2682
2708
|
}
|
|
2683
|
-
var nn =
|
|
2709
|
+
var nn = Dp(), Po = "presentation", xo = "arguments", Dt = (e) => typeof e == "string" ? e : "";
|
|
2684
2710
|
function ea(e, t = "") {
|
|
2685
2711
|
const n = Dt(e?.command);
|
|
2686
2712
|
if (n === "") return;
|
|
2687
|
-
const o = Array.isArray(e?.arguments) ? e[
|
|
2713
|
+
const o = Array.isArray(e?.arguments) ? e[xo] : [], i = Object.fromEntries(o.map((s) => [Dt(s.name), Dt(s.source)]).filter(([s]) => s !== "")), r = Dt(e?.[Po]);
|
|
2688
2714
|
return {
|
|
2689
2715
|
sliceId: n,
|
|
2690
2716
|
sliceName: t,
|
|
@@ -2692,20 +2718,20 @@ function ea(e, t = "") {
|
|
|
2692
2718
|
presentation: Object.values(fe).includes(r) ? r : fe.None
|
|
2693
2719
|
};
|
|
2694
2720
|
}
|
|
2695
|
-
function
|
|
2721
|
+
function Ep(e) {
|
|
2696
2722
|
return {
|
|
2697
2723
|
command: e.sliceId,
|
|
2698
2724
|
[Po]: e.presentation,
|
|
2699
|
-
[
|
|
2725
|
+
[xo]: Object.entries(e.inputs).filter(([, t]) => t.trim() !== "").map(([t, n]) => ({
|
|
2700
2726
|
id: t,
|
|
2701
2727
|
name: t,
|
|
2702
2728
|
source: n.trim()
|
|
2703
2729
|
}))
|
|
2704
2730
|
};
|
|
2705
2731
|
}
|
|
2706
|
-
function
|
|
2732
|
+
function Fp(e, t) {
|
|
2707
2733
|
const n = oe(e);
|
|
2708
|
-
return Object.entries(
|
|
2734
|
+
return Object.entries(Ep(t)).map(([o, i]) => ({
|
|
2709
2735
|
kind: Q.SetProperty,
|
|
2710
2736
|
nodeId: n,
|
|
2711
2737
|
path: o,
|
|
@@ -2718,12 +2744,12 @@ var Z = /* @__PURE__ */ (function(e) {
|
|
|
2718
2744
|
kind: Z.None,
|
|
2719
2745
|
target: ""
|
|
2720
2746
|
};
|
|
2721
|
-
function
|
|
2722
|
-
const t = e?.find((n) => n.name === qn)?.bindings.find((n) =>
|
|
2723
|
-
return t ?
|
|
2747
|
+
function Ap(e) {
|
|
2748
|
+
const t = e?.find((n) => n.name === qn)?.bindings.find((n) => $p(n.trigger))?.actions[0];
|
|
2749
|
+
return t ? _p(t) : ta;
|
|
2724
2750
|
}
|
|
2725
2751
|
function Si(e, t) {
|
|
2726
|
-
const n = (e ?? []).filter((r) => r.name !== qn), o =
|
|
2752
|
+
const n = (e ?? []).filter((r) => r.name !== qn), o = Mp(t), i = o ? [...n, {
|
|
2727
2753
|
name: qn,
|
|
2728
2754
|
bindings: [{
|
|
2729
2755
|
trigger: { kind: ar.Click },
|
|
@@ -2732,7 +2758,7 @@ function Si(e, t) {
|
|
|
2732
2758
|
}] : n;
|
|
2733
2759
|
return i.length > 0 ? i : void 0;
|
|
2734
2760
|
}
|
|
2735
|
-
function
|
|
2761
|
+
function Mp(e) {
|
|
2736
2762
|
if (e.target !== "")
|
|
2737
2763
|
switch (e.kind) {
|
|
2738
2764
|
case Z.Navigate:
|
|
@@ -2754,7 +2780,7 @@ function Ap(e) {
|
|
|
2754
2780
|
return;
|
|
2755
2781
|
}
|
|
2756
2782
|
}
|
|
2757
|
-
function
|
|
2783
|
+
function _p(e) {
|
|
2758
2784
|
switch (e.kind) {
|
|
2759
2785
|
case lt.Navigate:
|
|
2760
2786
|
return {
|
|
@@ -2775,14 +2801,14 @@ function Mp(e) {
|
|
|
2775
2801
|
return ta;
|
|
2776
2802
|
}
|
|
2777
2803
|
}
|
|
2778
|
-
function
|
|
2804
|
+
function $p(e) {
|
|
2779
2805
|
return e?.kind === ar.Click;
|
|
2780
2806
|
}
|
|
2781
|
-
var
|
|
2782
|
-
const l =
|
|
2807
|
+
var Lp = ({ behaviors: e, targets: t, destinations: n, slices: o, strings: i, disabled: r, onChange: s }) => {
|
|
2808
|
+
const l = Ap(e), [c, u] = z(Z.None), d = l.kind === Z.None ? {
|
|
2783
2809
|
kind: c,
|
|
2784
2810
|
target: ""
|
|
2785
|
-
} : l, p =
|
|
2811
|
+
} : l, p = Bp(d.kind, t, n, o), m = d.target !== "" && !p.some((f) => f.value === d.target), h = (f) => {
|
|
2786
2812
|
u(f), l.kind !== Z.None && s(Si(e, {
|
|
2787
2813
|
kind: Z.None,
|
|
2788
2814
|
target: ""
|
|
@@ -2850,7 +2876,7 @@ var $p = ({ behaviors: e, targets: t, destinations: n, slices: o, strings: i, di
|
|
|
2850
2876
|
]
|
|
2851
2877
|
});
|
|
2852
2878
|
};
|
|
2853
|
-
function
|
|
2879
|
+
function Bp(e, t, n, o) {
|
|
2854
2880
|
switch (e) {
|
|
2855
2881
|
case Z.Navigate:
|
|
2856
2882
|
return n.map((i) => ({
|
|
@@ -2871,7 +2897,7 @@ function Lp(e, t, n, o) {
|
|
|
2871
2897
|
return [];
|
|
2872
2898
|
}
|
|
2873
2899
|
}
|
|
2874
|
-
var
|
|
2900
|
+
var Oo = {
|
|
2875
2901
|
toolbarLabel: (e) => `Actions for ${e}`,
|
|
2876
2902
|
slotName: (e) => `slot: ${e}`,
|
|
2877
2903
|
titleField: "Title",
|
|
@@ -2983,7 +3009,7 @@ var xo = {
|
|
|
2983
3009
|
}, on = /* @__PURE__ */ (function(e) {
|
|
2984
3010
|
return e.Elements = "elements", e.Collection = "collection", e.Region = "region", e;
|
|
2985
3011
|
})({}), na = (e) => "rejected" in e;
|
|
2986
|
-
function
|
|
3012
|
+
function jp(e, t) {
|
|
2987
3013
|
switch (e.availability) {
|
|
2988
3014
|
case void 0:
|
|
2989
3015
|
return !0;
|
|
@@ -2995,7 +3021,7 @@ function Bp(e, t) {
|
|
|
2995
3021
|
}
|
|
2996
3022
|
var Ro = sl;
|
|
2997
3023
|
function Et(e, t) {
|
|
2998
|
-
if (!
|
|
3024
|
+
if (!jp(e, t)) return {
|
|
2999
3025
|
visible: !1,
|
|
3000
3026
|
enabled: !1
|
|
3001
3027
|
};
|
|
@@ -3031,10 +3057,10 @@ var Do = (e, t, n) => e.flatMap((o) => {
|
|
|
3031
3057
|
...o,
|
|
3032
3058
|
children: Do(o.children, t, n)
|
|
3033
3059
|
} : o];
|
|
3034
|
-
}),
|
|
3060
|
+
}), Up = (e) => Object.fromEntries(Object.entries(e).filter(([, t]) => t !== void 0)), Ft = (e, t, n) => Do(e, t, (o) => Up({
|
|
3035
3061
|
...o,
|
|
3036
3062
|
...n
|
|
3037
|
-
})),
|
|
3063
|
+
})), Wp = (e, t) => Do(e, t, () => {
|
|
3038
3064
|
});
|
|
3039
3065
|
function Qt(e, t) {
|
|
3040
3066
|
for (const n of e) {
|
|
@@ -3050,7 +3076,7 @@ function Ct(e, t) {
|
|
|
3050
3076
|
if (o) return o;
|
|
3051
3077
|
}
|
|
3052
3078
|
}
|
|
3053
|
-
function
|
|
3079
|
+
function zp(e, t, n) {
|
|
3054
3080
|
const o = Ct(e, t);
|
|
3055
3081
|
if (!o) return [...e];
|
|
3056
3082
|
const i = o.findIndex((l) => l.id === t);
|
|
@@ -3072,7 +3098,7 @@ var oa = (e, t) => ({
|
|
|
3072
3098
|
id: t(),
|
|
3073
3099
|
...e.children ? { children: e.children.map((n) => oa(n, t)) } : {}
|
|
3074
3100
|
});
|
|
3075
|
-
function
|
|
3101
|
+
function Kp(e, t, n) {
|
|
3076
3102
|
const o = Qt(e, t), i = Ct(e, t);
|
|
3077
3103
|
if (!o || !i) return { items: [...e] };
|
|
3078
3104
|
const r = oa(o, n), s = i.findIndex((c) => c.id === t) + 1, l = [
|
|
@@ -3085,18 +3111,18 @@ function zp(e, t, n) {
|
|
|
3085
3111
|
copy: r
|
|
3086
3112
|
};
|
|
3087
3113
|
}
|
|
3088
|
-
var
|
|
3114
|
+
var qp = () => ({
|
|
3089
3115
|
application: { regions: [] },
|
|
3090
3116
|
modules: []
|
|
3091
|
-
}), Ci = (e) => e.navigation ??
|
|
3117
|
+
}), Ci = (e) => e.navigation ?? qp(), Gp = (e, t) => ({
|
|
3092
3118
|
...e,
|
|
3093
3119
|
navigation: t
|
|
3094
3120
|
});
|
|
3095
|
-
function
|
|
3121
|
+
function Hp(e, t, n) {
|
|
3096
3122
|
return (t === void 0 ? e.application.regions : e.modules.find((o) => o.module === t)?.regions ?? []).find((o) => o.region === n)?.items ?? [];
|
|
3097
3123
|
}
|
|
3098
|
-
var
|
|
3099
|
-
function
|
|
3124
|
+
var Vp = (e) => e;
|
|
3125
|
+
function Jp(e, t) {
|
|
3100
3126
|
if (!t?.module) return;
|
|
3101
3127
|
const n = e.modules.find((r) => r.id === t.module);
|
|
3102
3128
|
if (!n) return t.module;
|
|
@@ -3110,13 +3136,13 @@ function Vp(e, t) {
|
|
|
3110
3136
|
return [n.name, ...o].join(" › ");
|
|
3111
3137
|
}
|
|
3112
3138
|
function ia(e) {
|
|
3113
|
-
const { region: t, module: n, navigation: o, structure: i, newId: r, slots: s, startingLabel: l, strings: c } = e, u = dr(i, o, n, t), d =
|
|
3114
|
-
const k =
|
|
3115
|
-
|
|
3139
|
+
const { region: t, module: n, navigation: o, structure: i, newId: r, slots: s, startingLabel: l, strings: c } = e, u = dr(i, o, n, t), d = Hp(o, n, t), p = Es(i, o, { slots: [...s] }), m = (x) => `${n ?? "application"}:${t}:${x}`, h = [], g = (x, C) => {
|
|
3140
|
+
const k = x.filter((y) => !y.readOnly);
|
|
3141
|
+
x.forEach((y) => {
|
|
3116
3142
|
const T = Qt(d, y.id)?.target ?? (y.target ? {
|
|
3117
3143
|
module: y.target.module,
|
|
3118
3144
|
...y.target.feature ? { feature: y.target.feature } : {}
|
|
3119
|
-
} : void 0), A = y.readOnly ? -1 : k.indexOf(y), I =
|
|
3145
|
+
} : void 0), A = y.readOnly ? -1 : k.indexOf(y), I = Jp(i, T), N = p.filter((E) => E.entry === m(y.id)).map((E) => ({
|
|
3120
3146
|
code: E.code,
|
|
3121
3147
|
message: E.message
|
|
3122
3148
|
}));
|
|
@@ -3147,22 +3173,22 @@ function ia(e) {
|
|
|
3147
3173
|
});
|
|
3148
3174
|
};
|
|
3149
3175
|
g(u.items);
|
|
3150
|
-
const f = t, v = (
|
|
3151
|
-
label:
|
|
3176
|
+
const f = t, v = (x, C, k, y = {}) => C.rejected ? { rejected: C.rejected } : {
|
|
3177
|
+
label: x,
|
|
3152
3178
|
edits: [],
|
|
3153
3179
|
navigationEdits: C.edits,
|
|
3154
3180
|
...k ? { select: k } : {},
|
|
3155
3181
|
...y
|
|
3156
|
-
}, w = (
|
|
3182
|
+
}, w = (x) => ({ edits: [{
|
|
3157
3183
|
kind: Ho.SetRegionItems,
|
|
3158
3184
|
...n !== void 0 ? { module: n } : {},
|
|
3159
3185
|
region: t,
|
|
3160
|
-
items:
|
|
3161
|
-
}] }), P = (
|
|
3186
|
+
items: x
|
|
3187
|
+
}] }), P = (x) => {
|
|
3162
3188
|
const C = r(), k = Ts(o, n, t, {
|
|
3163
3189
|
id: C,
|
|
3164
3190
|
title: l
|
|
3165
|
-
},
|
|
3191
|
+
}, x), y = k.edits.some((T) => T.kind === Ho.SetRegionMode);
|
|
3166
3192
|
return v("Add", k, { itemId: C }, {
|
|
3167
3193
|
renameNext: !0,
|
|
3168
3194
|
...y ? { notice: c.extendsNotice } : {}
|
|
@@ -3179,43 +3205,43 @@ function ia(e) {
|
|
|
3179
3205
|
region: {
|
|
3180
3206
|
region: f,
|
|
3181
3207
|
...n !== void 0 ? { module: n } : {},
|
|
3182
|
-
...u.mode ? { mode:
|
|
3208
|
+
...u.mode ? { mode: Vp(u.mode) } : {}
|
|
3183
3209
|
},
|
|
3184
|
-
add: (
|
|
3185
|
-
act: (
|
|
3186
|
-
switch (
|
|
3210
|
+
add: (x) => x === M.addItem ? P() : { rejected: x },
|
|
3211
|
+
act: (x, C) => {
|
|
3212
|
+
switch (x) {
|
|
3187
3213
|
case M.addSubItem:
|
|
3188
3214
|
return C.parentId !== void 0 ? { rejected: "subItemOfSubItem" } : P(C.id);
|
|
3189
3215
|
case M.moveEarlier:
|
|
3190
3216
|
case M.moveLater: {
|
|
3191
|
-
const k = C.index + (
|
|
3192
|
-
return !y || k < 0 || k >= y.length ? { rejected: "noWhere" } : v("Move", w(
|
|
3217
|
+
const k = C.index + (x === M.moveEarlier ? -1 : 1), y = Ct(d, C.id);
|
|
3218
|
+
return !y || k < 0 || k >= y.length ? { rejected: "noWhere" } : v("Move", w(zp(d, C.id, k)), { itemId: C.id });
|
|
3193
3219
|
}
|
|
3194
3220
|
case M.duplicate: {
|
|
3195
|
-
const k =
|
|
3196
|
-
return k.copy ? v("Duplicate", w(k.items), { itemId: k.copy.id }) : { rejected:
|
|
3221
|
+
const k = Kp(d, C.id, r);
|
|
3222
|
+
return k.copy ? v("Duplicate", w(k.items), { itemId: k.copy.id }) : { rejected: x };
|
|
3197
3223
|
}
|
|
3198
3224
|
case M.delete: {
|
|
3199
3225
|
const k = Ct(d, C.id) ?? [], y = k.findIndex((A) => A.id === C.id), T = k[y + 1] ?? k[y - 1];
|
|
3200
|
-
return v("Remove", w(
|
|
3226
|
+
return v("Remove", w(Wp(d, C.id)), { itemId: T?.id ?? null });
|
|
3201
3227
|
}
|
|
3202
3228
|
default:
|
|
3203
|
-
return { rejected:
|
|
3229
|
+
return { rejected: x };
|
|
3204
3230
|
}
|
|
3205
3231
|
},
|
|
3206
|
-
rename: (
|
|
3207
|
-
choice: (
|
|
3232
|
+
rename: (x, C) => v("Rename", w(Ft(d, x.id, { title: C })), { itemId: x.id }),
|
|
3233
|
+
choice: (x, C) => {
|
|
3208
3234
|
const k = Qt(d, C.id);
|
|
3209
3235
|
if (k) {
|
|
3210
|
-
if (
|
|
3236
|
+
if (x === M.target) return {
|
|
3211
3237
|
property: Nn("target", "Navigate to", "navigationItemTarget", k.target),
|
|
3212
|
-
plan: (y) => v("Link", w(Ft(d, C.id, { target:
|
|
3238
|
+
plan: (y) => v("Link", w(Ft(d, C.id, { target: Qp(y) ? y : void 0 })), { itemId: C.id })
|
|
3213
3239
|
};
|
|
3214
|
-
if (
|
|
3240
|
+
if (x === M.slot) return {
|
|
3215
3241
|
property: Nn("slot", "Render into slot", "renderingSlot", k.slot ?? "content"),
|
|
3216
3242
|
plan: (y) => v("Change", w(Ft(d, C.id, { slot: typeof y == "string" && y !== "content" ? y : void 0 })), { itemId: C.id })
|
|
3217
3243
|
};
|
|
3218
|
-
if (
|
|
3244
|
+
if (x === "icon") return {
|
|
3219
3245
|
property: Nn("icon", "Icon", "icon", k.icon),
|
|
3220
3246
|
plan: (y) => v("Change", w(Ft(d, C.id, { icon: typeof y == "string" && y !== "" ? y : void 0 })), { itemId: C.id })
|
|
3221
3247
|
};
|
|
@@ -3224,7 +3250,7 @@ function ia(e) {
|
|
|
3224
3250
|
readOnlyActions: () => n === void 0 ? [] : [{
|
|
3225
3251
|
id: "overrideHere",
|
|
3226
3252
|
label: c.overrideHere,
|
|
3227
|
-
plan: () => v("Override", mr(o, n, t,
|
|
3253
|
+
plan: () => v("Override", mr(o, n, t, xe.Override, { copy: !0 }))
|
|
3228
3254
|
}, {
|
|
3229
3255
|
id: "editAtApplication",
|
|
3230
3256
|
label: c.editAtApplication,
|
|
@@ -3236,7 +3262,7 @@ function ia(e) {
|
|
|
3236
3262
|
}]
|
|
3237
3263
|
};
|
|
3238
3264
|
}
|
|
3239
|
-
var
|
|
3265
|
+
var Qp = (e) => typeof e == "object" && e !== null && typeof e.module == "string";
|
|
3240
3266
|
function Nn(e, t, n, o) {
|
|
3241
3267
|
return {
|
|
3242
3268
|
descriptor: {
|
|
@@ -3253,7 +3279,7 @@ function Nn(e, t, n, o) {
|
|
|
3253
3279
|
};
|
|
3254
3280
|
}
|
|
3255
3281
|
var Nt = () => globalThis.crypto.randomUUID(), Ni = (e) => typeof e == "string" ? e : "";
|
|
3256
|
-
function
|
|
3282
|
+
function Yp({ componentId: e, property: t, newId: n, startingLabel: o, startingDestination: i }) {
|
|
3257
3283
|
const r = t.descriptor.path, s = t.items ?? [], l = s.filter((h) => h.editable), c = new Set(t.operations ?? []), u = {
|
|
3258
3284
|
component: e,
|
|
3259
3285
|
path: r
|
|
@@ -3398,9 +3424,9 @@ function aa(e, t, n, o = {}, i = {}) {
|
|
|
3398
3424
|
slots: i
|
|
3399
3425
|
};
|
|
3400
3426
|
}
|
|
3401
|
-
var
|
|
3427
|
+
var Zp = (e, t) => e.descriptor.valueType === "number" && typeof t == "string" ? t.trim() === "" ? void 0 : Number(t) : t;
|
|
3402
3428
|
function Gn(e, t, n) {
|
|
3403
|
-
const o =
|
|
3429
|
+
const o = Zp(t, n);
|
|
3404
3430
|
return t.editTarget === fs.Instance ? o === void 0 ? {
|
|
3405
3431
|
kind: Q.ResetInstanceValue,
|
|
3406
3432
|
component: e,
|
|
@@ -3428,7 +3454,7 @@ function sa(e, t, n) {
|
|
|
3428
3454
|
const { button: i, converted: r } = Ls(new Xt(e), o);
|
|
3429
3455
|
return r && i.slice ? { slice: i.slice } : void 0;
|
|
3430
3456
|
}
|
|
3431
|
-
function
|
|
3457
|
+
function Xp(e, t) {
|
|
3432
3458
|
return [{
|
|
3433
3459
|
kind: Q.SetProperty,
|
|
3434
3460
|
nodeId: oe(e),
|
|
@@ -3440,7 +3466,7 @@ function Zp(e, t) {
|
|
|
3440
3466
|
path: "target"
|
|
3441
3467
|
}];
|
|
3442
3468
|
}
|
|
3443
|
-
function
|
|
3469
|
+
function em(e, t) {
|
|
3444
3470
|
const n = structuredClone(e);
|
|
3445
3471
|
return Hn(n, t), n;
|
|
3446
3472
|
}
|
|
@@ -3461,7 +3487,7 @@ var Vn = (e) => typeof e == "string" ? e : "", rn = { [M.addButton]: {
|
|
|
3461
3487
|
isUnlinked: (e, t) => Vn(t.slice) === "" && Vn(t.target) === "" && t.destination === void 0,
|
|
3462
3488
|
startingProperties: { kind: "Action" }
|
|
3463
3489
|
} };
|
|
3464
|
-
function
|
|
3490
|
+
function tm({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i, startingLabel: r, structure: s }) {
|
|
3465
3491
|
const l = rn[t];
|
|
3466
3492
|
if (!l) return;
|
|
3467
3493
|
const c = e.slots?.[l.slot] ?? [], u = c.map((m, h) => {
|
|
@@ -3524,7 +3550,7 @@ function em({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i
|
|
|
3524
3550
|
};
|
|
3525
3551
|
}
|
|
3526
3552
|
case M.duplicate:
|
|
3527
|
-
return p(
|
|
3553
|
+
return p(em(g, i), h.index + 1, "Duplicate");
|
|
3528
3554
|
case M.delete: {
|
|
3529
3555
|
const f = c[h.index + 1] ?? c[h.index - 1];
|
|
3530
3556
|
return {
|
|
@@ -3563,7 +3589,7 @@ function em({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i
|
|
|
3563
3589
|
readOnlyActions: () => []
|
|
3564
3590
|
};
|
|
3565
3591
|
}
|
|
3566
|
-
function
|
|
3592
|
+
function nm(e) {
|
|
3567
3593
|
const { roots: t, catalog: n, selectedId: o, selectedItemId: i } = e;
|
|
3568
3594
|
if (!o) return;
|
|
3569
3595
|
const r = We(t, o);
|
|
@@ -3588,14 +3614,14 @@ function Ii(e, t, n, o, i) {
|
|
|
3588
3614
|
let p;
|
|
3589
3615
|
if (d.itemsPath !== void 0) {
|
|
3590
3616
|
const h = s(t.id)?.properties.find((g) => g.descriptor.path === d.itemsPath);
|
|
3591
|
-
p = h &&
|
|
3617
|
+
p = h && Yp({
|
|
3592
3618
|
componentId: t.id,
|
|
3593
3619
|
property: h,
|
|
3594
3620
|
newId: c,
|
|
3595
3621
|
startingLabel: u.item,
|
|
3596
3622
|
...e.startingDestination ? { startingDestination: e.startingDestination } : {}
|
|
3597
3623
|
});
|
|
3598
|
-
} else rn[n] ? p =
|
|
3624
|
+
} else rn[n] ? p = tm({
|
|
3599
3625
|
component: t,
|
|
3600
3626
|
addActionId: n,
|
|
3601
3627
|
ownershipOf: l,
|
|
@@ -3614,18 +3640,18 @@ function Ii(e, t, n, o, i) {
|
|
|
3614
3640
|
...m ? { selected: m } : {}
|
|
3615
3641
|
};
|
|
3616
3642
|
}
|
|
3617
|
-
function
|
|
3643
|
+
function om({ controller: e, environment: t, strings: n, startingLabels: o, startingDestination: i, otherSource: r }) {
|
|
3618
3644
|
const [s, l] = z(0), [c, u] = z(""), [d, p] = z("");
|
|
3619
3645
|
le(() => {
|
|
3620
3646
|
if (d === "") return;
|
|
3621
3647
|
const N = setTimeout(() => p(""), 4e3);
|
|
3622
3648
|
return () => clearTimeout(N);
|
|
3623
3649
|
}, [d]);
|
|
3624
|
-
const { document: m, composition: h, context: g, selectedId: f, ownershipOf: v, selectedItemId: w, navigation: P, navigationModule:
|
|
3650
|
+
const { document: m, composition: h, context: g, selectedId: f, ownershipOf: v, selectedItemId: w, navigation: P, navigationModule: x, structure: C } = e, k = t.navigation?.slots ?? t.propertyEditors?.slots ?? im, y = U((N) => {
|
|
3625
3651
|
const E = an(N.componentName);
|
|
3626
3652
|
return E ? ia({
|
|
3627
3653
|
region: E,
|
|
3628
|
-
module:
|
|
3654
|
+
module: x,
|
|
3629
3655
|
navigation: P,
|
|
3630
3656
|
structure: C,
|
|
3631
3657
|
newId: Nt,
|
|
@@ -3641,7 +3667,7 @@ function nm({ controller: e, environment: t, strings: n, startingLabels: o, star
|
|
|
3641
3667
|
}
|
|
3642
3668
|
}) : r?.(N, w);
|
|
3643
3669
|
}, [
|
|
3644
|
-
|
|
3670
|
+
x,
|
|
3645
3671
|
P,
|
|
3646
3672
|
C,
|
|
3647
3673
|
k,
|
|
@@ -3649,7 +3675,7 @@ function nm({ controller: e, environment: t, strings: n, startingLabels: o, star
|
|
|
3649
3675
|
n,
|
|
3650
3676
|
r,
|
|
3651
3677
|
w
|
|
3652
|
-
]), T = L(() =>
|
|
3678
|
+
]), T = L(() => nm({
|
|
3653
3679
|
roots: h.roots,
|
|
3654
3680
|
catalog: g.catalog,
|
|
3655
3681
|
selectedId: f,
|
|
@@ -3733,7 +3759,7 @@ function nm({ controller: e, environment: t, strings: n, startingLabels: o, star
|
|
|
3733
3759
|
}, [w, e])
|
|
3734
3760
|
};
|
|
3735
3761
|
}
|
|
3736
|
-
var
|
|
3762
|
+
var im = ["content"];
|
|
3737
3763
|
function an(e) {
|
|
3738
3764
|
const t = e.slice(e.lastIndexOf(":") + 1).toLowerCase();
|
|
3739
3765
|
return t === "topbar" ? qo.Topbar : t === "sidebar" ? qo.Sidebar : void 0;
|
|
@@ -3741,10 +3767,10 @@ function an(e) {
|
|
|
3741
3767
|
var la = (e) => ({
|
|
3742
3768
|
content: e.mainArea,
|
|
3743
3769
|
aside: e.sidePanel
|
|
3744
|
-
}),
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3770
|
+
}), rm = [
|
|
3771
|
+
xe.Inherit,
|
|
3772
|
+
xe.Extend,
|
|
3773
|
+
xe.Override
|
|
3748
3774
|
], At = (e, t, n, o, i, r, s) => ({
|
|
3749
3775
|
descriptor: {
|
|
3750
3776
|
path: e,
|
|
@@ -3759,7 +3785,7 @@ var la = (e) => ({
|
|
|
3759
3785
|
editable: r,
|
|
3760
3786
|
...s ? { reason: s } : {}
|
|
3761
3787
|
}), Pi = ({ controller: e, environment: t, strings: n }) => {
|
|
3762
|
-
const o = (n.designMode ??
|
|
3788
|
+
const o = (n.designMode ?? Oo).navigation, { selection: i, selectedItemId: r, navigation: s, structure: l, navigationModule: c } = e, u = i && "componentName" in i ? an(String(i.componentName)) : void 0, [d, p] = z(!1), m = L(() => So(t.availableSources), [t.availableSources]);
|
|
3763
3789
|
if (!u) return null;
|
|
3764
3790
|
const h = t.navigation?.slots ?? t.propertyEditors?.slots ?? ["content"], g = ia({
|
|
3765
3791
|
region: u,
|
|
@@ -3777,7 +3803,7 @@ var la = (e) => ({
|
|
|
3777
3803
|
application: o.application,
|
|
3778
3804
|
mainArea: "Main area"
|
|
3779
3805
|
}
|
|
3780
|
-
}), f = l.modules.find((S) => S.id === c)?.name ?? c, v = f ?? o.application, w = o.regionName[u], P = r ? g.items.find((S) => S.id === r) : void 0,
|
|
3806
|
+
}), f = l.modules.find((S) => S.id === c)?.name ?? c, v = f ?? o.application, w = o.regionName[u], P = r ? g.items.find((S) => S.id === r) : void 0, x = t.propertyEditors?.registry ?? nn, C = Io({
|
|
3781
3807
|
controller: e,
|
|
3782
3808
|
environment: t,
|
|
3783
3809
|
strings: n,
|
|
@@ -3791,7 +3817,7 @@ var la = (e) => ({
|
|
|
3791
3817
|
$.rejected || $.edits.length === 0 || e.applyNavigationEdits($.edits, "Region mode");
|
|
3792
3818
|
}, T = (S) => {
|
|
3793
3819
|
if (S !== k) {
|
|
3794
|
-
if (k ===
|
|
3820
|
+
if (k === xe.Inherit && S === xe.Override) {
|
|
3795
3821
|
p(!0);
|
|
3796
3822
|
return;
|
|
3797
3823
|
}
|
|
@@ -3857,7 +3883,7 @@ var la = (e) => ({
|
|
|
3857
3883
|
At("slot", o.renderIntoSlot, G.String, "renderingSlot", P.values.slot, A, o.inheritedFromApplication),
|
|
3858
3884
|
At("icon", o.icon, G.String, "icon", P.values.icon, A, o.inheritedFromApplication)
|
|
3859
3885
|
].map((S) => /* @__PURE__ */ a(To, {
|
|
3860
|
-
registry:
|
|
3886
|
+
registry: x,
|
|
3861
3887
|
property: S,
|
|
3862
3888
|
context: C,
|
|
3863
3889
|
componentId: P.id,
|
|
@@ -3882,7 +3908,7 @@ var la = (e) => ({
|
|
|
3882
3908
|
className: "studio-editor-mode-cards",
|
|
3883
3909
|
role: "radiogroup",
|
|
3884
3910
|
"aria-label": o.modeTitle(w, v),
|
|
3885
|
-
children:
|
|
3911
|
+
children: rm.map((S) => /* @__PURE__ */ b("button", {
|
|
3886
3912
|
type: "button",
|
|
3887
3913
|
role: "radio",
|
|
3888
3914
|
"aria-checked": S === k,
|
|
@@ -3903,7 +3929,7 @@ var la = (e) => ({
|
|
|
3903
3929
|
autoFocus: !0,
|
|
3904
3930
|
"data-answer": "copy",
|
|
3905
3931
|
onClick: () => {
|
|
3906
|
-
p(!1), y(
|
|
3932
|
+
p(!1), y(xe.Override, !0);
|
|
3907
3933
|
},
|
|
3908
3934
|
children: o.copyYes
|
|
3909
3935
|
}),
|
|
@@ -3911,7 +3937,7 @@ var la = (e) => ({
|
|
|
3911
3937
|
type: "button",
|
|
3912
3938
|
"data-answer": "empty",
|
|
3913
3939
|
onClick: () => {
|
|
3914
|
-
p(!1), y(
|
|
3940
|
+
p(!1), y(xe.Override);
|
|
3915
3941
|
},
|
|
3916
3942
|
children: o.copyNo
|
|
3917
3943
|
})
|
|
@@ -3943,9 +3969,9 @@ var la = (e) => ({
|
|
|
3943
3969
|
})
|
|
3944
3970
|
] })
|
|
3945
3971
|
});
|
|
3946
|
-
},
|
|
3947
|
-
function
|
|
3948
|
-
const n =
|
|
3972
|
+
}, am = (e) => e.slots?.items ?? [];
|
|
3973
|
+
function xi(e, t) {
|
|
3974
|
+
const n = am(t).flatMap((r) => {
|
|
3949
3975
|
const { id: s, properties: l } = r, c = ho(s, l);
|
|
3950
3976
|
return c ? [c] : [];
|
|
3951
3977
|
});
|
|
@@ -3958,8 +3984,8 @@ function Oi(e, t) {
|
|
|
3958
3984
|
button: r.button
|
|
3959
3985
|
}));
|
|
3960
3986
|
}
|
|
3961
|
-
var
|
|
3962
|
-
const o = (t.designMode ??
|
|
3987
|
+
var sm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), lm = (e) => /(^|:)toolbar$/.test(String(e.componentName ?? "")), cm = ({ controller: e, strings: t, element: n }) => {
|
|
3988
|
+
const o = (t.designMode ?? Oo).toolbar, { structure: i } = e, r = sm(n), s = lm(n), l = n.properties ?? {}, c = L(() => {
|
|
3963
3989
|
if (!r || i.modules.length === 0) return;
|
|
3964
3990
|
const g = ho(n.id, l);
|
|
3965
3991
|
if (!g) return;
|
|
@@ -3973,12 +3999,12 @@ var am = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), sm = (e)
|
|
|
3973
3999
|
i,
|
|
3974
4000
|
n,
|
|
3975
4001
|
l
|
|
3976
|
-
]), u = L(() => i.modules.length === 0 ? [] : r ? [] : s ?
|
|
4002
|
+
]), u = L(() => i.modules.length === 0 ? [] : r ? [] : s ? xi(i, n) : [], [
|
|
3977
4003
|
r,
|
|
3978
4004
|
s,
|
|
3979
4005
|
i,
|
|
3980
4006
|
n
|
|
3981
|
-
]), d = L(() => !r || i.modules.length === 0 ? [] :
|
|
4007
|
+
]), d = L(() => !r || i.modules.length === 0 ? [] : xi(i, { slots: { items: [n] } }), [
|
|
3982
4008
|
r,
|
|
3983
4009
|
i,
|
|
3984
4010
|
n
|
|
@@ -4017,7 +4043,7 @@ var am = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), sm = (e)
|
|
|
4017
4043
|
children: [o.upgradeNote(p.slice), /* @__PURE__ */ a("button", {
|
|
4018
4044
|
type: "button",
|
|
4019
4045
|
"data-action": "upgrade",
|
|
4020
|
-
onClick: () => e.applyAll(
|
|
4046
|
+
onClick: () => e.applyAll(Xp(n.id, p.slice), o.upgrade),
|
|
4021
4047
|
children: o.upgrade
|
|
4022
4048
|
})]
|
|
4023
4049
|
}),
|
|
@@ -4032,7 +4058,7 @@ var am = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), sm = (e)
|
|
|
4032
4058
|
label: t.properties.diagnostics
|
|
4033
4059
|
})]
|
|
4034
4060
|
});
|
|
4035
|
-
},
|
|
4061
|
+
}, dm = (e, t) => e.find((n) => n.component === t), um = /* @__PURE__ */ new Set([xo]), pm = ({ controller: e, environment: t, strings: n, ownership: o, authoringTemplate: i }) => {
|
|
4036
4062
|
const { inspection: r, selectedId: s, selection: l } = e, c = n.properties, u = L(() => So(t.availableSources), [t.availableSources]), d = L(() => Xi(e.document, e.composition.roots, e.context, t.availableSources, t.queryCandidates), [
|
|
4037
4063
|
e.document,
|
|
4038
4064
|
e.composition.roots,
|
|
@@ -4063,7 +4089,7 @@ var am = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), sm = (e)
|
|
|
4063
4089
|
strings: n,
|
|
4064
4090
|
disabled: !1
|
|
4065
4091
|
}),
|
|
4066
|
-
/* @__PURE__ */ a(
|
|
4092
|
+
/* @__PURE__ */ a(mp, {
|
|
4067
4093
|
controller: e,
|
|
4068
4094
|
strings: n,
|
|
4069
4095
|
disabled: !1
|
|
@@ -4084,7 +4110,7 @@ var am = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), sm = (e)
|
|
|
4084
4110
|
strings: n
|
|
4085
4111
|
})
|
|
4086
4112
|
});
|
|
4087
|
-
const p = Ja(e.composition.roots, s), m = mu(r.properties, p, l.properties), { runtime: h } = t, g =
|
|
4113
|
+
const p = Ja(e.composition.roots, s), m = mu(r.properties, p, l.properties), { runtime: h } = t, g = dm(e.context.catalog.components, r.typeId), f = g ? h.packageDescriptorOf(g) : void 0, v = (S) => !!f && h.designTime.propertyEditor(f, S.descriptor).contribution !== void 0, w = t.propertyEditors?.registry ?? nn, P = [...r.diagnostics, ...e.diagnostics], x = vu(m, r.typeId, (S) => um.has(S.descriptor.path) || v(S)), C = bu(x), k = {
|
|
4088
4114
|
controller: e,
|
|
4089
4115
|
environment: t,
|
|
4090
4116
|
strings: n,
|
|
@@ -4117,7 +4143,7 @@ var am = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), sm = (e)
|
|
|
4117
4143
|
environment: t,
|
|
4118
4144
|
strings: n
|
|
4119
4145
|
}),
|
|
4120
|
-
l && /* @__PURE__ */ a(
|
|
4146
|
+
l && /* @__PURE__ */ a(cm, {
|
|
4121
4147
|
controller: e,
|
|
4122
4148
|
strings: n,
|
|
4123
4149
|
element: l
|
|
@@ -4126,7 +4152,7 @@ var am = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), sm = (e)
|
|
|
4126
4152
|
diagnostics: ss(P),
|
|
4127
4153
|
label: c.diagnostics
|
|
4128
4154
|
}),
|
|
4129
|
-
/* @__PURE__ */ a(
|
|
4155
|
+
/* @__PURE__ */ a(vp, {
|
|
4130
4156
|
inspection: r,
|
|
4131
4157
|
controller: e,
|
|
4132
4158
|
strings: n,
|
|
@@ -4178,7 +4204,7 @@ var am = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), sm = (e)
|
|
|
4178
4204
|
}), S.properties.map((F) => /* @__PURE__ */ a(To, {
|
|
4179
4205
|
registry: w,
|
|
4180
4206
|
property: F,
|
|
4181
|
-
context:
|
|
4207
|
+
context: xp(y, k, F),
|
|
4182
4208
|
componentId: s,
|
|
4183
4209
|
onChange: e.setProperty,
|
|
4184
4210
|
diagnostics: P
|
|
@@ -4191,9 +4217,9 @@ var am = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), sm = (e)
|
|
|
4191
4217
|
strings: n,
|
|
4192
4218
|
disabled: o !== void 0 && o !== "local",
|
|
4193
4219
|
suggestSource: (S) => S === "id" || S.endsWith("Id") ? "row.id" : void 0,
|
|
4194
|
-
onChange: (S) => S && e.applyAll(
|
|
4220
|
+
onChange: (S) => S && e.applyAll(Fp(s, S), n.properties.action.label)
|
|
4195
4221
|
}),
|
|
4196
|
-
I && /* @__PURE__ */ a(
|
|
4222
|
+
I && /* @__PURE__ */ a(Zu, {
|
|
4197
4223
|
elementId: s,
|
|
4198
4224
|
command: typeof B?.command == "string" ? B.command : void 0,
|
|
4199
4225
|
slices: t.stateChangeSlices,
|
|
@@ -4206,7 +4232,7 @@ var am = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), sm = (e)
|
|
|
4206
4232
|
onFormChange: (S) => e.setScreenForms(N.map((F) => F.forCommand === S.forCommand ? S : F), n.properties.forms.label),
|
|
4207
4233
|
onFormCreate: (S) => e.setScreenForms([...N, zn(S)], n.properties.commandForm.createForm(S.name))
|
|
4208
4234
|
}),
|
|
4209
|
-
A && /* @__PURE__ */ a(
|
|
4235
|
+
A && /* @__PURE__ */ a(Lp, {
|
|
4210
4236
|
behaviors: l.behaviors,
|
|
4211
4237
|
targets: ls(t, e.document),
|
|
4212
4238
|
destinations: t.destinations,
|
|
@@ -4215,7 +4241,7 @@ var am = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), sm = (e)
|
|
|
4215
4241
|
disabled: E,
|
|
4216
4242
|
onChange: (S) => e.setElementBehaviors(s, S, n.properties.toolbarButton.label)
|
|
4217
4243
|
}, s),
|
|
4218
|
-
/* @__PURE__ */ a(
|
|
4244
|
+
/* @__PURE__ */ a(Sp, {
|
|
4219
4245
|
inspection: r,
|
|
4220
4246
|
componentId: s,
|
|
4221
4247
|
controller: e,
|
|
@@ -4250,7 +4276,7 @@ var am = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), sm = (e)
|
|
|
4250
4276
|
tabs: [{
|
|
4251
4277
|
id: Sn.Properties,
|
|
4252
4278
|
label: e.propertiesTab,
|
|
4253
|
-
content: /* @__PURE__ */ a(
|
|
4279
|
+
content: /* @__PURE__ */ a(pm, {
|
|
4254
4280
|
controller: t,
|
|
4255
4281
|
environment: n,
|
|
4256
4282
|
strings: e,
|
|
@@ -4266,7 +4292,7 @@ var am = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), sm = (e)
|
|
|
4266
4292
|
});
|
|
4267
4293
|
}, Xe = /* @__PURE__ */ (function(e) {
|
|
4268
4294
|
return e.Panel = "Panel", e.StackPanel = "StackPanel", e.WrapPanel = "WrapPanel", e.Grid = "Grid", e.Canvas = "Canvas", e;
|
|
4269
|
-
})({}),
|
|
4295
|
+
})({}), mm = [
|
|
4270
4296
|
{
|
|
4271
4297
|
item: W.Stack,
|
|
4272
4298
|
type: "Stack",
|
|
@@ -4306,13 +4332,13 @@ var am = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), sm = (e)
|
|
|
4306
4332
|
panel: Xe.Canvas,
|
|
4307
4333
|
arrangement: J.Freeform
|
|
4308
4334
|
}
|
|
4309
|
-
],
|
|
4335
|
+
], hm = /* @__PURE__ */ new Set([
|
|
4310
4336
|
"column",
|
|
4311
4337
|
"screenShell",
|
|
4312
4338
|
"shell"
|
|
4313
4339
|
]);
|
|
4314
|
-
var
|
|
4315
|
-
function
|
|
4340
|
+
var fm = (e) => e.slice(e.lastIndexOf(":") + 1), da = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase()).trim(), gm = (e) => e.split(".").map((t) => da(t)).join(" "), vm = ms.Layout;
|
|
4341
|
+
function bm(e, t, n = {}) {
|
|
4316
4342
|
const o = t.map((r) => ({
|
|
4317
4343
|
key: `layout:${r.item}`,
|
|
4318
4344
|
label: r.label,
|
|
@@ -4320,15 +4346,15 @@ function vm(e, t, n = {}) {
|
|
|
4320
4346
|
component: r.item,
|
|
4321
4347
|
displayName: r.label
|
|
4322
4348
|
}),
|
|
4323
|
-
category:
|
|
4349
|
+
category: vm,
|
|
4324
4350
|
keywords: [],
|
|
4325
4351
|
payload: {
|
|
4326
4352
|
kind: "layout",
|
|
4327
4353
|
item: r.item
|
|
4328
4354
|
}
|
|
4329
4355
|
})), i = e.flatMap((r) => {
|
|
4330
|
-
const s = new Map((r.descriptors ?? []).map((l) => [
|
|
4331
|
-
return r.components.filter((l) => !
|
|
4356
|
+
const s = new Map((r.descriptors ?? []).map((l) => [fm(l.component), l]));
|
|
4357
|
+
return r.components.filter((l) => !hm.has(l)).map((l) => {
|
|
4332
4358
|
const c = s.get(l), u = c?.displayName ?? da(l);
|
|
4333
4359
|
return {
|
|
4334
4360
|
key: `${r.package}:${l}`,
|
|
@@ -4341,7 +4367,7 @@ function vm(e, t, n = {}) {
|
|
|
4341
4367
|
category: c?.category?.trim() || "Other",
|
|
4342
4368
|
keywords: c?.keywords ?? [],
|
|
4343
4369
|
package: r.package,
|
|
4344
|
-
packageTitle: n[r.package] ??
|
|
4370
|
+
packageTitle: n[r.package] ?? gm(r.package),
|
|
4345
4371
|
payload: {
|
|
4346
4372
|
kind: "component",
|
|
4347
4373
|
componentName: l,
|
|
@@ -4353,7 +4379,7 @@ function vm(e, t, n = {}) {
|
|
|
4353
4379
|
return [...o, ...i];
|
|
4354
4380
|
}
|
|
4355
4381
|
var ua = "frequent";
|
|
4356
|
-
function
|
|
4382
|
+
function ym({ entries: e, usage: t, query: n, groups: o, frequentTitle: i }) {
|
|
4357
4383
|
const r = n.trim().length > 0, s = (m) => ({
|
|
4358
4384
|
entry: m,
|
|
4359
4385
|
match: $s({
|
|
@@ -4387,11 +4413,11 @@ function bm({ entries: e, usage: t, query: n, groups: o, frequentTitle: i }) {
|
|
|
4387
4413
|
});
|
|
4388
4414
|
}), d;
|
|
4389
4415
|
}
|
|
4390
|
-
var
|
|
4416
|
+
var wm = (e) => e.filter((t) => t.expanded).flatMap((t) => t.rows.map((n) => ({
|
|
4391
4417
|
group: t,
|
|
4392
4418
|
row: n
|
|
4393
4419
|
})));
|
|
4394
|
-
function
|
|
4420
|
+
function km(e, t) {
|
|
4395
4421
|
const n = [];
|
|
4396
4422
|
let o = 0;
|
|
4397
4423
|
for (const [i, r] of [...t].sort((s, l) => s[0] - l[0]))
|
|
@@ -4407,13 +4433,13 @@ function wm(e, t) {
|
|
|
4407
4433
|
marked: !1
|
|
4408
4434
|
}), n;
|
|
4409
4435
|
}
|
|
4410
|
-
var
|
|
4436
|
+
var Oi = "cratis.studio.componentUsage.v1", Ri = "cratis.studio.componentGroups.v1", Pe = (e) => {
|
|
4411
4437
|
try {
|
|
4412
4438
|
return e();
|
|
4413
4439
|
} catch {
|
|
4414
4440
|
return;
|
|
4415
4441
|
}
|
|
4416
|
-
},
|
|
4442
|
+
}, Sm = () => Pe(() => typeof window < "u" ? window.localStorage : void 0), Di = (e) => {
|
|
4417
4443
|
const t = Pe(() => JSON.parse(e ?? "null"));
|
|
4418
4444
|
if (t === null || typeof t != "object" || Array.isArray(t)) return {};
|
|
4419
4445
|
const n = {};
|
|
@@ -4422,12 +4448,12 @@ var xi = "cratis.studio.componentUsage.v1", Ri = "cratis.studio.componentGroups.
|
|
|
4422
4448
|
last: typeof i.last == "number" && Number.isFinite(i.last) ? i.last : 0
|
|
4423
4449
|
});
|
|
4424
4450
|
return n;
|
|
4425
|
-
},
|
|
4451
|
+
}, Cm = (e) => {
|
|
4426
4452
|
const t = Pe(() => JSON.parse(e ?? "null"));
|
|
4427
4453
|
return t === null || typeof t != "object" || Array.isArray(t) ? {} : Object.fromEntries(Object.entries(t).filter((n) => typeof n[1] == "boolean"));
|
|
4428
4454
|
};
|
|
4429
|
-
function
|
|
4430
|
-
const n = t ? `${t}:${
|
|
4455
|
+
function Nm(e = Sm(), t) {
|
|
4456
|
+
const n = t ? `${t}:${Oi}` : Oi, o = t ? `${t}:${Ri}` : Ri;
|
|
4431
4457
|
let i, r;
|
|
4432
4458
|
return {
|
|
4433
4459
|
readUsage: () => i ??= Di(e ? Pe(() => e.getItem(n)) : void 0),
|
|
@@ -4443,7 +4469,7 @@ function Cm(e = km(), t) {
|
|
|
4443
4469
|
const u = JSON.stringify(i);
|
|
4444
4470
|
return e && Pe(() => e.setItem(n, u)), i;
|
|
4445
4471
|
},
|
|
4446
|
-
readGroups: () => r ??=
|
|
4472
|
+
readGroups: () => r ??= Cm(e ? Pe(() => e.getItem(o)) : void 0),
|
|
4447
4473
|
writeGroups: (s) => {
|
|
4448
4474
|
r = { ...s };
|
|
4449
4475
|
const l = JSON.stringify(r);
|
|
@@ -4459,12 +4485,12 @@ function ma(e, t, n) {
|
|
|
4459
4485
|
const o = document.createElement("div");
|
|
4460
4486
|
o.className = "studio-drag-preview", n && o.append(n.cloneNode(!0)), o.append(Object.assign(document.createElement("span"), { textContent: t })), document.body.append(o), e.dataTransfer.setDragImage(o, 14, 14), setTimeout(() => o.remove(), 0);
|
|
4461
4487
|
}
|
|
4462
|
-
var
|
|
4488
|
+
var Tm = (e, t, n) => {
|
|
4463
4489
|
e.dataTransfer.setData(Ao, JSON.stringify(t)), e.dataTransfer.effectAllowed = "copyMove", n && ma(e, n, e.currentTarget instanceof Element ? e.currentTarget.querySelector("svg") : null);
|
|
4464
|
-
},
|
|
4490
|
+
}, Im = (e, t, n) => {
|
|
4465
4491
|
e.dataTransfer.setData(pa, t), e.dataTransfer.effectAllowed = "move", ma(e, n);
|
|
4466
|
-
},
|
|
4467
|
-
function
|
|
4492
|
+
}, Pm = (e) => e.dataTransfer.getData("application/x-studio-element") || void 0, Jn = (e) => e.dataTransfer.types.includes(pa), Mt = (e) => Om(e) || Jn(e);
|
|
4493
|
+
function xm(e) {
|
|
4468
4494
|
try {
|
|
4469
4495
|
const t = JSON.parse(e.dataTransfer.getData(Ao));
|
|
4470
4496
|
return Fo(t) ? t : void 0;
|
|
@@ -4472,7 +4498,7 @@ function Pm(e) {
|
|
|
4472
4498
|
return;
|
|
4473
4499
|
}
|
|
4474
4500
|
}
|
|
4475
|
-
var Om = (e) => e.dataTransfer.types.includes(Ao),
|
|
4501
|
+
var Om = (e) => e.dataTransfer.types.includes(Ao), Rm = {
|
|
4476
4502
|
heading: "Components",
|
|
4477
4503
|
filterPlaceholder: "Filter components...",
|
|
4478
4504
|
filterLabel: "Filter components",
|
|
@@ -4481,8 +4507,8 @@ var Om = (e) => e.dataTransfer.types.includes(Ao), xm = {
|
|
|
4481
4507
|
nothingMatches: "No component matches.",
|
|
4482
4508
|
viaKeyword: (e, t, n) => `...${e} matches "${t}" via keyword "${n}"`,
|
|
4483
4509
|
addLabel: (e) => `Add ${e}`
|
|
4484
|
-
},
|
|
4485
|
-
const [r, s] = z(""), [l, c] = z(() => t.readGroups()), u = V(null), d = V(null), p = us(), m = L(() => ({ ...t.readUsage() }), [t, i]), h = L(() =>
|
|
4510
|
+
}, Dm = "★", Em = ({ entries: e, memory: t, strings: n = Rm, onAdd: o, usageVersion: i = 0 }) => {
|
|
4511
|
+
const [r, s] = z(""), [l, c] = z(() => t.readGroups()), u = V(null), d = V(null), p = us(), m = L(() => ({ ...t.readUsage() }), [t, i]), h = L(() => ym({
|
|
4486
4512
|
entries: e,
|
|
4487
4513
|
usage: m,
|
|
4488
4514
|
query: r,
|
|
@@ -4517,11 +4543,11 @@ var Om = (e) => e.dataTransfer.types.includes(Ao), xm = {
|
|
|
4517
4543
|
if (A) return;
|
|
4518
4544
|
I.indexOf(T) <= 0 ? u.current?.focus() : w(T, -1);
|
|
4519
4545
|
} else y.key === "Escape" && A && r !== "" && (y.stopPropagation(), s(""));
|
|
4520
|
-
},
|
|
4521
|
-
|
|
4546
|
+
}, x = (y, T) => {
|
|
4547
|
+
Tm(T, y.payload, y.label), T.currentTarget.closest('[data-cratis-part="toolbar-folder-panel"]')?.setAttribute("data-dragging", "");
|
|
4522
4548
|
}, C = (y) => {
|
|
4523
4549
|
y.currentTarget.closest('[data-cratis-part="toolbar-folder-panel"]')?.removeAttribute("data-dragging");
|
|
4524
|
-
}, k =
|
|
4550
|
+
}, k = wm(h);
|
|
4525
4551
|
return /* @__PURE__ */ b("div", {
|
|
4526
4552
|
ref: d,
|
|
4527
4553
|
className: "studio-component-picker",
|
|
@@ -4565,7 +4591,7 @@ var Om = (e) => e.dataTransfer.types.includes(Ao), xm = {
|
|
|
4565
4591
|
"aria-hidden": "true",
|
|
4566
4592
|
children: y.frequent ? /* @__PURE__ */ a("span", {
|
|
4567
4593
|
className: "studio-component-picker__star",
|
|
4568
|
-
children:
|
|
4594
|
+
children: Dm
|
|
4569
4595
|
}) : y.expanded ? "▼" : "▶"
|
|
4570
4596
|
}),
|
|
4571
4597
|
/* @__PURE__ */ a("span", {
|
|
@@ -4589,7 +4615,7 @@ var Om = (e) => e.dataTransfer.types.includes(Ao), xm = {
|
|
|
4589
4615
|
className: "studio-component-picker__row",
|
|
4590
4616
|
title: n.addLabel(T.label),
|
|
4591
4617
|
onClick: () => o(T),
|
|
4592
|
-
onDragStart: (I) =>
|
|
4618
|
+
onDragStart: (I) => x(T, I),
|
|
4593
4619
|
onDragEnd: C,
|
|
4594
4620
|
children: [
|
|
4595
4621
|
/* @__PURE__ */ a("span", {
|
|
@@ -4601,7 +4627,7 @@ var Om = (e) => e.dataTransfer.types.includes(Ao), xm = {
|
|
|
4601
4627
|
className: "studio-component-picker__label",
|
|
4602
4628
|
children: [/* @__PURE__ */ a("span", {
|
|
4603
4629
|
className: "studio-component-picker__name",
|
|
4604
|
-
children:
|
|
4630
|
+
children: km(T.label, A.ranges).map((I, N) => I.marked ? /* @__PURE__ */ a("mark", { children: I.text }, N) : /* @__PURE__ */ a("span", { children: I.text }, N))
|
|
4605
4631
|
}), A.via === "keyword" && A.keyword && /* @__PURE__ */ a("span", {
|
|
4606
4632
|
className: "studio-component-picker__hint",
|
|
4607
4633
|
children: n.viaKeyword(T.badge, r.trim(), A.keyword)
|
|
@@ -4627,14 +4653,14 @@ var Om = (e) => e.dataTransfer.types.includes(Ao), xm = {
|
|
|
4627
4653
|
})
|
|
4628
4654
|
]
|
|
4629
4655
|
});
|
|
4630
|
-
},
|
|
4656
|
+
}, Fm = ({ entries: e, memory: t, icon: n, title: o, closeLabel: i, strings: r, usageVersion: s, onAdd: l }) => /* @__PURE__ */ a(ul, {
|
|
4631
4657
|
className: "studio-palette-folder studio-palette-folder--picker",
|
|
4632
4658
|
icon: n,
|
|
4633
4659
|
title: o,
|
|
4634
4660
|
heading: o,
|
|
4635
4661
|
closeLabel: i,
|
|
4636
4662
|
presentation: "drawer",
|
|
4637
|
-
children: /* @__PURE__ */ a(
|
|
4663
|
+
children: /* @__PURE__ */ a(Em, {
|
|
4638
4664
|
entries: e,
|
|
4639
4665
|
memory: t,
|
|
4640
4666
|
usageVersion: s,
|
|
@@ -4643,7 +4669,7 @@ var Om = (e) => e.dataTransfer.types.includes(Ao), xm = {
|
|
|
4643
4669
|
})
|
|
4644
4670
|
});
|
|
4645
4671
|
function ha({ strings: e, layoutLabels: t, icons: n, paletteSources: o, onAdd: i, memory: r }) {
|
|
4646
|
-
const s = L(() => r ??
|
|
4672
|
+
const s = L(() => r ?? Nm(), [r]), [l, c] = z(0), u = L(() => bm(o, mm.map((p) => ({
|
|
4647
4673
|
item: p.item,
|
|
4648
4674
|
label: t[p.item]
|
|
4649
4675
|
})), e.packageTitles), [
|
|
@@ -4654,7 +4680,7 @@ function ha({ strings: e, layoutLabels: t, icons: n, paletteSources: o, onAdd: i
|
|
|
4654
4680
|
s.recordAdded(p), c((m) => m + 1);
|
|
4655
4681
|
}, [s]);
|
|
4656
4682
|
return {
|
|
4657
|
-
palette: /* @__PURE__ */ a(
|
|
4683
|
+
palette: /* @__PURE__ */ a(Fm, {
|
|
4658
4684
|
entries: u,
|
|
4659
4685
|
memory: s,
|
|
4660
4686
|
usageVersion: l,
|
|
@@ -4678,14 +4704,14 @@ var Ei = {
|
|
|
4678
4704
|
value: 1
|
|
4679
4705
|
};
|
|
4680
4706
|
function Yt(e, t, n, o = [], i = {}) {
|
|
4681
|
-
const r =
|
|
4707
|
+
const r = Am(e, i);
|
|
4682
4708
|
return {
|
|
4683
4709
|
...ra(t, n),
|
|
4684
4710
|
children: o,
|
|
4685
4711
|
...r
|
|
4686
4712
|
};
|
|
4687
4713
|
}
|
|
4688
|
-
function
|
|
4714
|
+
function Am(e, t) {
|
|
4689
4715
|
switch (e) {
|
|
4690
4716
|
case W.Stack:
|
|
4691
4717
|
return {
|
|
@@ -4718,7 +4744,7 @@ function Fm(e, t) {
|
|
|
4718
4744
|
return {};
|
|
4719
4745
|
}
|
|
4720
4746
|
}
|
|
4721
|
-
function
|
|
4747
|
+
function Mm(e) {
|
|
4722
4748
|
const t = e.indexOf(":");
|
|
4723
4749
|
return t > 0 ? {
|
|
4724
4750
|
package: e.slice(0, t),
|
|
@@ -4728,8 +4754,8 @@ function Am(e) {
|
|
|
4728
4754
|
name: e
|
|
4729
4755
|
};
|
|
4730
4756
|
}
|
|
4731
|
-
function
|
|
4732
|
-
const { package: o, name: i } =
|
|
4757
|
+
function _m(e, t, n) {
|
|
4758
|
+
const { package: o, name: i } = Mm(e);
|
|
4733
4759
|
if (o !== void 0) return ur(t).includes(o) && n[o]?.includes(i) ? {
|
|
4734
4760
|
package: o,
|
|
4735
4761
|
name: i
|
|
@@ -4740,7 +4766,7 @@ function Mm(e, t, n) {
|
|
|
4740
4766
|
name: r.name
|
|
4741
4767
|
} : void 0;
|
|
4742
4768
|
}
|
|
4743
|
-
function
|
|
4769
|
+
function $m(e, t, n) {
|
|
4744
4770
|
const o = new Set(ur(t)), i = (r) => {
|
|
4745
4771
|
if (Array.isArray(r)) {
|
|
4746
4772
|
const u = r.map(i);
|
|
@@ -4768,7 +4794,7 @@ function fa(e, t) {
|
|
|
4768
4794
|
const o = Xr(n, e.authoringTemplate);
|
|
4769
4795
|
return o.readable ? {
|
|
4770
4796
|
opened: !0,
|
|
4771
|
-
subject: { document: t ?
|
|
4797
|
+
subject: { document: t ? $m(o.document, t.profile, t.packages) : o.document }
|
|
4772
4798
|
} : {
|
|
4773
4799
|
opened: !1,
|
|
4774
4800
|
problem: o.problem
|
|
@@ -4776,10 +4802,10 @@ function fa(e, t) {
|
|
|
4776
4802
|
}
|
|
4777
4803
|
return {
|
|
4778
4804
|
opened: !0,
|
|
4779
|
-
subject: { document:
|
|
4805
|
+
subject: { document: Lm(e) }
|
|
4780
4806
|
};
|
|
4781
4807
|
}
|
|
4782
|
-
function
|
|
4808
|
+
function Lm(e) {
|
|
4783
4809
|
return e.authoringTemplate !== void 0 ? Vd(e.authoringTemplate, Yt(W.Stack, qd, "Template")) : Hd(Yt(W.Stack, Gd, "Screen"), e.screenTemplate);
|
|
4784
4810
|
}
|
|
4785
4811
|
var ga = ({ placement: e, children: t }) => /* @__PURE__ */ a("div", {
|
|
@@ -4834,8 +4860,8 @@ var ga = ({ placement: e, children: t }) => /* @__PURE__ */ a("div", {
|
|
|
4834
4860
|
} catch {
|
|
4835
4861
|
return;
|
|
4836
4862
|
}
|
|
4837
|
-
},
|
|
4838
|
-
function
|
|
4863
|
+
}, Bm = () => Gt(() => typeof window < "u" ? window.localStorage : void 0);
|
|
4864
|
+
function jm(e = Bm()) {
|
|
4839
4865
|
return {
|
|
4840
4866
|
read: (t) => e ? Ai(Gt(() => e.getItem(`${Qn}:${t}`)) ?? null) : void 0,
|
|
4841
4867
|
write: (t, n) => {
|
|
@@ -4878,22 +4904,22 @@ function ya(e) {
|
|
|
4878
4904
|
var Mi = {
|
|
4879
4905
|
width: 900,
|
|
4880
4906
|
height: 640
|
|
4881
|
-
},
|
|
4907
|
+
}, Um = (e) => !!e && Number.isFinite(e.width) && Number.isFinite(e.height) && e.width > 0 && e.height > 0;
|
|
4882
4908
|
function wa(e) {
|
|
4883
4909
|
return _o(sn[Ge.Desktop], e);
|
|
4884
4910
|
}
|
|
4885
|
-
function
|
|
4911
|
+
function Wm(e) {
|
|
4886
4912
|
return !!e && e.width === Mi.width && e.height === Mi.height;
|
|
4887
4913
|
}
|
|
4888
|
-
function
|
|
4889
|
-
const n =
|
|
4890
|
-
return
|
|
4914
|
+
function zm(e, t) {
|
|
4915
|
+
const n = Wm(e.saved) ? void 0 : e.saved;
|
|
4916
|
+
return Km([
|
|
4891
4917
|
e.remembered,
|
|
4892
4918
|
n,
|
|
4893
4919
|
e.lastUsed
|
|
4894
|
-
].find(
|
|
4920
|
+
].find(Um) ?? wa(t), t);
|
|
4895
4921
|
}
|
|
4896
|
-
function
|
|
4922
|
+
function Km(e, t) {
|
|
4897
4923
|
return {
|
|
4898
4924
|
width: Math.round(Math.min(e.width, t.width)),
|
|
4899
4925
|
height: Math.round(Math.min(e.height, t.height))
|
|
@@ -4909,7 +4935,7 @@ var ka = ({ environment: e, children: t }) => {
|
|
|
4909
4935
|
loader: e.richText,
|
|
4910
4936
|
children: n
|
|
4911
4937
|
}) : n;
|
|
4912
|
-
},
|
|
4938
|
+
}, qm = ({ controls: e }) => /* @__PURE__ */ a("div", {
|
|
4913
4939
|
className: "studio-window-title-bar",
|
|
4914
4940
|
role: "toolbar",
|
|
4915
4941
|
children: /* @__PURE__ */ a("div", {
|
|
@@ -4917,18 +4943,18 @@ var ka = ({ environment: e, children: t }) => {
|
|
|
4917
4943
|
children: e
|
|
4918
4944
|
})
|
|
4919
4945
|
});
|
|
4920
|
-
function
|
|
4946
|
+
function Gm(e, t) {
|
|
4921
4947
|
return Object.values(Ge).find((n) => {
|
|
4922
4948
|
const o = _o(sn[n], t);
|
|
4923
4949
|
return o.width === e.width && o.height === e.height;
|
|
4924
4950
|
});
|
|
4925
4951
|
}
|
|
4926
|
-
function
|
|
4952
|
+
function Hm(e) {
|
|
4927
4953
|
const t = ya(e);
|
|
4928
4954
|
return Rs(t.width, t.height);
|
|
4929
4955
|
}
|
|
4930
|
-
var
|
|
4931
|
-
const r =
|
|
4956
|
+
var Vm = ({ windowSize: e, available: t, strings: n, shell: o, onResize: i }) => {
|
|
4957
|
+
const r = Gm(e, t), s = ya(e), l = Hm(e), c = (u, d, p) => /* @__PURE__ */ a(Ie, {
|
|
4932
4958
|
icon: d,
|
|
4933
4959
|
"aria-label": p,
|
|
4934
4960
|
"aria-pressed": r === u,
|
|
@@ -4965,7 +4991,7 @@ var Hm = ({ windowSize: e, available: t, strings: n, shell: o, onResize: i }) =>
|
|
|
4965
4991
|
]
|
|
4966
4992
|
});
|
|
4967
4993
|
};
|
|
4968
|
-
function
|
|
4994
|
+
function Jm(e, t) {
|
|
4969
4995
|
const n = e.bundles.filter((o) => o.manifest.kind === dt.Blueprint).map((o) => ({
|
|
4970
4996
|
manifest: o.manifest,
|
|
4971
4997
|
layouts: o.layouts,
|
|
@@ -5011,16 +5037,16 @@ function Sa(e, t, n) {
|
|
|
5011
5037
|
options: {
|
|
5012
5038
|
profile: e.compositionProfile,
|
|
5013
5039
|
catalog: e.packages,
|
|
5014
|
-
templateLibrary:
|
|
5040
|
+
templateLibrary: Jm(e, t),
|
|
5015
5041
|
chrome: (o, i) => i === Hs.FullPageShell ? {} : Xs()
|
|
5016
5042
|
}
|
|
5017
5043
|
};
|
|
5018
5044
|
}
|
|
5019
|
-
function
|
|
5045
|
+
function Qm(e, t) {
|
|
5020
5046
|
const { application: n, options: o } = Sa(e, t, fo($o, "text", { text: "" }));
|
|
5021
5047
|
return vr(n, n.screens[0], o);
|
|
5022
5048
|
}
|
|
5023
|
-
function
|
|
5049
|
+
function Ym(e, t) {
|
|
5024
5050
|
const { application: n, options: o } = Sa(e, t, fo($o, "text", { text: "" })), i = n.screens[0];
|
|
5025
5051
|
return {
|
|
5026
5052
|
element: Ys(n, i, o).element,
|
|
@@ -5030,26 +5056,26 @@ function Qm(e, t) {
|
|
|
5030
5056
|
function Lo(e) {
|
|
5031
5057
|
return e.screen ?? e.slice ?? e.dialog ?? "";
|
|
5032
5058
|
}
|
|
5033
|
-
function
|
|
5059
|
+
function Zm(e) {
|
|
5034
5060
|
return e.kind !== rr.External && e.dialog === void 0 && Lo(e) !== "";
|
|
5035
5061
|
}
|
|
5036
|
-
function
|
|
5062
|
+
function Xm(e, t) {
|
|
5037
5063
|
return fo("studio-shell-peek", "text", { text: t.replace("{name}", Lo(e)) });
|
|
5038
5064
|
}
|
|
5039
5065
|
var Ae = /* @__PURE__ */ (function(e) {
|
|
5040
5066
|
return e.Screen = "screen", e.ScreenTemplate = "screenTemplate", e.DialogTemplate = "dialogTemplate", e.TheShell = "theShell", e;
|
|
5041
5067
|
})({});
|
|
5042
|
-
function
|
|
5068
|
+
function eh(e, t, n) {
|
|
5043
5069
|
return t === void 0 ? Ae.Screen : (e.dialogTemplates ?? []).some((o) => o.name === t) ? Ae.DialogTemplate : t === n ? Ae.TheShell : Ae.ScreenTemplate;
|
|
5044
5070
|
}
|
|
5045
|
-
var
|
|
5071
|
+
var th = (e) => e === Ae.Screen || e === Ae.ScreenTemplate, nh = (e) => e !== Ae.TheShell, oh = "studio.screenEditor.showApplicationShell.v1", Yn = (e) => {
|
|
5046
5072
|
try {
|
|
5047
5073
|
return e();
|
|
5048
5074
|
} catch {
|
|
5049
5075
|
return;
|
|
5050
5076
|
}
|
|
5051
|
-
},
|
|
5052
|
-
function
|
|
5077
|
+
}, ih = () => Yn(() => typeof window < "u" ? window.localStorage : void 0), _i = (e) => `${oh}:${e === Ae.DialogTemplate ? "dialog" : "screen"}`;
|
|
5078
|
+
function rh(e = ih()) {
|
|
5053
5079
|
return {
|
|
5054
5080
|
read: (t) => {
|
|
5055
5081
|
const n = e ? Yn(() => e.getItem(_i(t))) : void 0;
|
|
@@ -5060,9 +5086,9 @@ function ih(e = oh()) {
|
|
|
5060
5086
|
}
|
|
5061
5087
|
};
|
|
5062
5088
|
}
|
|
5063
|
-
var
|
|
5089
|
+
var ah = () => {
|
|
5064
5090
|
};
|
|
5065
|
-
function
|
|
5091
|
+
function sh(e, t, n, o = lh) {
|
|
5066
5092
|
const { layouts: i, screenTemplates: r, dialogTemplates: s } = e, l = L(() => ({
|
|
5067
5093
|
layouts: i,
|
|
5068
5094
|
screenTemplates: r,
|
|
@@ -5071,11 +5097,11 @@ function ah(e, t, n, o = sh) {
|
|
|
5071
5097
|
i,
|
|
5072
5098
|
r,
|
|
5073
5099
|
s
|
|
5074
|
-
]), c = L(() =>
|
|
5100
|
+
]), c = L(() => Qm(t, l).name, [t, l]), u = eh(e, n, c), [d, p] = z(() => o.read(u)), [m, h] = z();
|
|
5075
5101
|
le(() => {
|
|
5076
5102
|
p(o.read(u)), h(void 0);
|
|
5077
5103
|
}, [o, u]);
|
|
5078
|
-
const g =
|
|
5104
|
+
const g = nh(u), f = g && (d ?? th(u)), v = L(() => f ? Ym(t, l) : void 0, [
|
|
5079
5105
|
f,
|
|
5080
5106
|
t,
|
|
5081
5107
|
l
|
|
@@ -5087,8 +5113,8 @@ function ah(e, t, n, o = sh) {
|
|
|
5087
5113
|
u,
|
|
5088
5114
|
o
|
|
5089
5115
|
]), P = U((C) => {
|
|
5090
|
-
|
|
5091
|
-
}, []),
|
|
5116
|
+
Zm(C) && h(C);
|
|
5117
|
+
}, []), x = U(() => h(void 0), []);
|
|
5092
5118
|
return {
|
|
5093
5119
|
available: g,
|
|
5094
5120
|
shown: f,
|
|
@@ -5096,11 +5122,11 @@ function ah(e, t, n, o = sh) {
|
|
|
5096
5122
|
frame: v,
|
|
5097
5123
|
peeking: f ? m : void 0,
|
|
5098
5124
|
peekingName: m ? Lo(m) : "",
|
|
5099
|
-
navigate: f ? P :
|
|
5100
|
-
back:
|
|
5125
|
+
navigate: f ? P : ah,
|
|
5126
|
+
back: x
|
|
5101
5127
|
};
|
|
5102
5128
|
}
|
|
5103
|
-
var
|
|
5129
|
+
var lh = rh();
|
|
5104
5130
|
function Bo(e) {
|
|
5105
5131
|
return e === void 0 ? "" : e.isDark ? "cratis-theme cratis-dark" : "cratis-theme cratis-light";
|
|
5106
5132
|
}
|
|
@@ -5139,7 +5165,7 @@ var Zn = ({ elementId: e, tone: t, text: n }) => /* @__PURE__ */ a("div", {
|
|
|
5139
5165
|
if (typeof o == "string" && o.length > 0) return o;
|
|
5140
5166
|
}
|
|
5141
5167
|
};
|
|
5142
|
-
function
|
|
5168
|
+
function ch({ kind: e, tag: t, element: n, slots: o, message: i }) {
|
|
5143
5169
|
const r = o.content ?? [], s = et(n, "header", "title", "summary") ?? n.name ?? n.componentName, l = et(n, "message", "detail", "text", "label"), c = () => {
|
|
5144
5170
|
switch (e) {
|
|
5145
5171
|
case re.Toast:
|
|
@@ -5217,7 +5243,7 @@ function lh({ kind: e, tag: t, element: n, slots: o, message: i }) {
|
|
|
5217
5243
|
}), c()]
|
|
5218
5244
|
});
|
|
5219
5245
|
}
|
|
5220
|
-
var Na = cs(void 0),
|
|
5246
|
+
var Na = cs(void 0), dh = () => {
|
|
5221
5247
|
const e = ds(Na);
|
|
5222
5248
|
return e ? /* @__PURE__ */ b("span", {
|
|
5223
5249
|
className: "studio-design-logo",
|
|
@@ -5234,7 +5260,7 @@ var Na = cs(void 0), ch = () => {
|
|
|
5234
5260
|
}, Tn = (e) => `data:image/svg+xml;utf8,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="320" height="200"><rect width="320" height="200" fill="hsl(${e} 40% 40%)"/></svg>`)}`, $i = [{
|
|
5235
5261
|
label: "Documents",
|
|
5236
5262
|
children: ["Work", "Home"]
|
|
5237
|
-
}],
|
|
5263
|
+
}], uh = [
|
|
5238
5264
|
"New",
|
|
5239
5265
|
"Open",
|
|
5240
5266
|
{ separator: !0 },
|
|
@@ -5488,7 +5514,7 @@ var Na = cs(void 0), ch = () => {
|
|
|
5488
5514
|
text: "Tooltip",
|
|
5489
5515
|
label: "Hover me"
|
|
5490
5516
|
},
|
|
5491
|
-
menu: { items:
|
|
5517
|
+
menu: { items: uh },
|
|
5492
5518
|
menubar: { items: [{
|
|
5493
5519
|
label: "File",
|
|
5494
5520
|
items: ["New", "Open"]
|
|
@@ -5730,15 +5756,15 @@ function Ia(e, t, n) {
|
|
|
5730
5756
|
for (const [s, l] of Object.entries(i)) l !== void 0 && (r[s] = l);
|
|
5731
5757
|
return r;
|
|
5732
5758
|
}
|
|
5733
|
-
function
|
|
5759
|
+
function ph(e, t, n) {
|
|
5734
5760
|
const o = Uo(e, t);
|
|
5735
5761
|
return o ? Object.keys(o).filter((i) => n?.[i] === void 0) : [];
|
|
5736
5762
|
}
|
|
5737
|
-
var
|
|
5763
|
+
var mh = (e) => {
|
|
5738
5764
|
const { width: t, height: n } = e.getBoundingClientRect();
|
|
5739
5765
|
return t > 0 && n > 0;
|
|
5740
|
-
}, Xn = (e) => Array.from(e.children).filter((t) => !t.hasAttribute("data-studio-placeholder-for")).some((t) =>
|
|
5741
|
-
function
|
|
5766
|
+
}, Xn = (e) => Array.from(e.children).filter((t) => !t.hasAttribute("data-studio-placeholder-for")).some((t) => mh(t) || getComputedStyle(t).display === "contents" && Xn(t)), hh = 150;
|
|
5767
|
+
function fh(e, t) {
|
|
5742
5768
|
const [n, o] = z(!0), i = V(!0);
|
|
5743
5769
|
return ye(() => {
|
|
5744
5770
|
const r = e.current;
|
|
@@ -5748,7 +5774,7 @@ function hh(e, t) {
|
|
|
5748
5774
|
};
|
|
5749
5775
|
let l;
|
|
5750
5776
|
const c = () => {
|
|
5751
|
-
clearTimeout(l), Xn(r) ? s(!0) : l = setTimeout(() => s(Xn(r)),
|
|
5777
|
+
clearTimeout(l), Xn(r) ? s(!0) : l = setTimeout(() => s(Xn(r)), hh);
|
|
5752
5778
|
}, u = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(c), d = () => {
|
|
5753
5779
|
u?.disconnect(), Array.from(r.children).forEach((m) => u?.observe(m));
|
|
5754
5780
|
}, p = new MutationObserver(() => {
|
|
@@ -5759,16 +5785,16 @@ function hh(e, t) {
|
|
|
5759
5785
|
};
|
|
5760
5786
|
}, [e, t]), n;
|
|
5761
5787
|
}
|
|
5762
|
-
var
|
|
5788
|
+
var gh = ({ element: e }) => e.name || e.componentName, vh = (e, t) => {
|
|
5763
5789
|
const n = V(e), o = V(0);
|
|
5764
5790
|
return n.current !== e && (n.current = e, t && (o.current += 1)), o.current;
|
|
5765
5791
|
};
|
|
5766
|
-
function
|
|
5792
|
+
function bh(e, t, n, o) {
|
|
5767
5793
|
const i = (r) => {
|
|
5768
5794
|
const s = V(null), l = L(() => ({
|
|
5769
5795
|
...r.element,
|
|
5770
5796
|
properties: Ia(e, r.element.componentName, r.element.properties)
|
|
5771
|
-
}), [r.element]), c = L(() =>
|
|
5797
|
+
}), [r.element]), c = L(() => ph(e, r.element.componentName, r.element.properties), [r.element]), u = Ta.has(vt(r.element.componentName)), d = e.startsWith(`${gr}:`), p = d ? void 0 : Ca[vt(r.element.componentName)], m = d && vt(r.element.componentName) === "topbar", [h, g] = z(), f = fh(s, r.element), v = gh(r), w = vh(r.element, h !== void 0);
|
|
5772
5798
|
return /* @__PURE__ */ b("span", {
|
|
5773
5799
|
ref: s,
|
|
5774
5800
|
"data-studio-element": r.element.id,
|
|
@@ -5782,7 +5808,7 @@ function vh(e, t, n, o) {
|
|
|
5782
5808
|
tone: Ht.Failed,
|
|
5783
5809
|
text: n.failedToDraw(v, h ?? "")
|
|
5784
5810
|
}),
|
|
5785
|
-
children: p ? /* @__PURE__ */ a(
|
|
5811
|
+
children: p ? /* @__PURE__ */ a(ch, {
|
|
5786
5812
|
kind: p,
|
|
5787
5813
|
tag: n.overlay(v),
|
|
5788
5814
|
element: l,
|
|
@@ -5790,7 +5816,7 @@ function vh(e, t, n, o) {
|
|
|
5790
5816
|
message: o
|
|
5791
5817
|
}) : m ? /* @__PURE__ */ b("div", {
|
|
5792
5818
|
className: "studio-design-topbar",
|
|
5793
|
-
children: [/* @__PURE__ */ a(
|
|
5819
|
+
children: [/* @__PURE__ */ a(dh, {}), yt(t, {
|
|
5794
5820
|
...r,
|
|
5795
5821
|
element: l
|
|
5796
5822
|
})]
|
|
@@ -5807,14 +5833,14 @@ function vh(e, t, n, o) {
|
|
|
5807
5833
|
};
|
|
5808
5834
|
return i.displayName = `DesignTime(${t.displayName ?? t.name ?? "Component"})`, i;
|
|
5809
5835
|
}
|
|
5810
|
-
function
|
|
5811
|
-
const n = Object.fromEntries(Object.entries(e).map(([i, r]) => [i,
|
|
5836
|
+
function yh(e, t) {
|
|
5837
|
+
const n = Object.fromEntries(Object.entries(e).map(([i, r]) => [i, bh(i, r, t, e["PrimeReact:message"])])), o = {};
|
|
5812
5838
|
return new Proxy(n, { get: (i, r) => {
|
|
5813
5839
|
if (typeof r == "string")
|
|
5814
|
-
return i[r] ?? (o[r] ??=
|
|
5840
|
+
return i[r] ?? (o[r] ??= wh(t));
|
|
5815
5841
|
} });
|
|
5816
5842
|
}
|
|
5817
|
-
var
|
|
5843
|
+
var wh = (e) => ({ element: t }) => yt("span", {
|
|
5818
5844
|
"data-studio-element": t.id,
|
|
5819
5845
|
style: { display: "contents" }
|
|
5820
5846
|
}, yt(Zn, {
|
|
@@ -5823,7 +5849,7 @@ var yh = (e) => ({ element: t }) => yt("span", {
|
|
|
5823
5849
|
text: e.unavailable(t.name || t.componentName)
|
|
5824
5850
|
})), Se = /* @__PURE__ */ (function(e) {
|
|
5825
5851
|
return e.Container = "container", e.Between = "between", e;
|
|
5826
|
-
})({}),
|
|
5852
|
+
})({}), kh = ({ feedback: e, deniedText: t }) => {
|
|
5827
5853
|
if (e.denied || !e.drop) return /* @__PURE__ */ a("div", {
|
|
5828
5854
|
className: "studio-screen-surface__denied",
|
|
5829
5855
|
"data-studio-drop-state": "denied",
|
|
@@ -5840,19 +5866,19 @@ var yh = (e) => ({ element: t }) => yt("span", {
|
|
|
5840
5866
|
"data-empty": n.region.isEmptyContainer,
|
|
5841
5867
|
style: n.rect
|
|
5842
5868
|
})] });
|
|
5843
|
-
},
|
|
5869
|
+
}, Sh = (e) => e.width > 0 && e.height > 0;
|
|
5844
5870
|
function Pa(e) {
|
|
5845
5871
|
const t = e.getBoundingClientRect();
|
|
5846
|
-
return
|
|
5872
|
+
return Sh(t) ? [t] : Array.from(e.children).flatMap(Pa);
|
|
5847
5873
|
}
|
|
5848
5874
|
function _e(e, t, n) {
|
|
5849
5875
|
const o = CSS.escape(t), i = [...Array.from(e.querySelectorAll(`[data-studio-element="${o}"]`)), ...Array.from(e.querySelectorAll(`[data-scene-id="${o}"]`))];
|
|
5850
5876
|
for (const r of i) {
|
|
5851
|
-
const s =
|
|
5877
|
+
const s = xa(r, n);
|
|
5852
5878
|
if (s) return s;
|
|
5853
5879
|
}
|
|
5854
5880
|
}
|
|
5855
|
-
function
|
|
5881
|
+
function xa(e, t) {
|
|
5856
5882
|
const n = Pa(e);
|
|
5857
5883
|
if (n.length === 0) return;
|
|
5858
5884
|
const o = Math.min(...n.map((l) => l.left)), i = Math.min(...n.map((l) => l.top)), r = Math.max(...n.map((l) => l.right)), s = Math.max(...n.map((l) => l.bottom));
|
|
@@ -5863,7 +5889,7 @@ function Oa(e, t) {
|
|
|
5863
5889
|
height: s - i
|
|
5864
5890
|
};
|
|
5865
5891
|
}
|
|
5866
|
-
var
|
|
5892
|
+
var Oa = (e, t) => e === t || !!e && !!t && e.left === t.left && e.top === t.top && e.width === t.width && e.height === t.height, Ch = (e, t) => e.length === t.length && e.every((n, o) => n.region.id === t[o].region.id && Oa(n.rect, t[o].rect)), Ra = Oa, Nh = ({ surface: e, markers: t }) => {
|
|
5867
5893
|
const [n, o] = z([]);
|
|
5868
5894
|
return ye(() => {
|
|
5869
5895
|
const i = e.current;
|
|
@@ -5875,7 +5901,7 @@ var xa = (e, t) => e === t || !!e && !!t && e.left === t.left && e.top === t.top
|
|
|
5875
5901
|
rect: c
|
|
5876
5902
|
}] : [];
|
|
5877
5903
|
});
|
|
5878
|
-
o((l) =>
|
|
5904
|
+
o((l) => Th(l, s) ? l : s);
|
|
5879
5905
|
}), /* @__PURE__ */ a(ae, { children: n.map((i) => /* @__PURE__ */ a("div", {
|
|
5880
5906
|
className: "studio-screen-surface__binding-source",
|
|
5881
5907
|
"data-binding-source": i.componentId,
|
|
@@ -5886,13 +5912,13 @@ var xa = (e, t) => e === t || !!e && !!t && e.left === t.left && e.top === t.top
|
|
|
5886
5912
|
})
|
|
5887
5913
|
}, `${i.componentId}:${i.label}`)) });
|
|
5888
5914
|
};
|
|
5889
|
-
function
|
|
5915
|
+
function Th(e, t) {
|
|
5890
5916
|
return e.length === t.length && e.every((n, o) => {
|
|
5891
5917
|
const i = t[o];
|
|
5892
5918
|
return n.componentId === i.componentId && n.label === i.label && Ra(n.rect, i.rect);
|
|
5893
5919
|
});
|
|
5894
5920
|
}
|
|
5895
|
-
function
|
|
5921
|
+
function Ih(e, t) {
|
|
5896
5922
|
return e ? Object.entries(e.inputs).flatMap(([n, o]) => {
|
|
5897
5923
|
const i = Nu(o);
|
|
5898
5924
|
return i ? [{
|
|
@@ -5901,14 +5927,14 @@ function Th(e, t) {
|
|
|
5901
5927
|
}] : [];
|
|
5902
5928
|
}) : [];
|
|
5903
5929
|
}
|
|
5904
|
-
function
|
|
5930
|
+
function Ph(e, t) {
|
|
5905
5931
|
const { selectedId: n, document: o, composition: i, context: r } = e;
|
|
5906
5932
|
return L(() => {
|
|
5907
5933
|
if (!n) return [];
|
|
5908
5934
|
const s = We(i.roots, n), l = ea(s?.properties);
|
|
5909
5935
|
if (!l) return [];
|
|
5910
5936
|
const c = Xi(o, i.roots, r, t.availableSources, t.queryCandidates);
|
|
5911
|
-
return
|
|
5937
|
+
return Ih(l, Gr(c.dataContextPaths, c.componentOutputs, n));
|
|
5912
5938
|
}, [
|
|
5913
5939
|
n,
|
|
5914
5940
|
o,
|
|
@@ -5918,7 +5944,7 @@ function Ih(e, t) {
|
|
|
5918
5944
|
t.queryCandidates
|
|
5919
5945
|
]);
|
|
5920
5946
|
}
|
|
5921
|
-
function
|
|
5947
|
+
function xh(e, t, n, o, i) {
|
|
5922
5948
|
const r = ke(e, n, t);
|
|
5923
5949
|
if (r)
|
|
5924
5950
|
return {
|
|
@@ -5929,17 +5955,17 @@ function Ph(e, t, n, o, i) {
|
|
|
5929
5955
|
}
|
|
5930
5956
|
var Ke = /* @__PURE__ */ (function(e) {
|
|
5931
5957
|
return e.Horizontal = "horizontal", e.Vertical = "vertical", e.None = "none", e;
|
|
5932
|
-
})({}), $t = ({ width: e, height: t }) => e * t, Oh = (e, t, n) => t >= e.left && t <= e.left + e.width && n >= e.top && n <= e.top + e.height,
|
|
5958
|
+
})({}), $t = ({ width: e, height: t }) => e * t, Oh = (e, t, n) => t >= e.left && t <= e.left + e.width && n >= e.top && n <= e.top + e.height, Rh = (e, t, n, o) => {
|
|
5933
5959
|
const i = Math.min(o, e.width / 4), r = Math.min(o, e.height / 4);
|
|
5934
5960
|
return t - e.left < i || e.left + e.width - t < i || n - e.top < r || e.top + e.height - n < r;
|
|
5935
5961
|
}, Li = ({ region: e, rect: t }, n, o) => e.axis === Ke.Vertical ? Math.abs(n - (t.left + t.width / 2)) : Math.abs(o - (t.top + t.height / 2));
|
|
5936
|
-
function
|
|
5962
|
+
function Dh(e, t, n, o = 6) {
|
|
5937
5963
|
const i = e.filter((u) => u.region.kind === Se.Container);
|
|
5938
5964
|
if (i.length === 0) return;
|
|
5939
5965
|
const r = i.map((u, d) => ({
|
|
5940
5966
|
placed: u,
|
|
5941
5967
|
order: d
|
|
5942
|
-
})).filter(({ placed: u }) => Oh(u.rect, t, n)).sort((u, d) => $t(u.placed.rect) - $t(d.placed.rect) || d.order - u.order).map(({ placed: u }) => u), s = r[0], l = s && r.length > 1 &&
|
|
5968
|
+
})).filter(({ placed: u }) => Oh(u.rect, t, n)).sort((u, d) => $t(u.placed.rect) - $t(d.placed.rect) || d.order - u.order).map(({ placed: u }) => u), s = r[0], l = s && r.length > 1 && Rh(s.rect, t, n, o) ? r[1] : s ?? [...i].sort((u, d) => $t(d.rect) - $t(u.rect))[0], c = e.filter((u) => u.region.kind === Se.Between && u.region.containerId === l.region.containerId);
|
|
5943
5969
|
return l.region.isEmptyContainer || c.length === 0 ? {
|
|
5944
5970
|
target: l,
|
|
5945
5971
|
container: l.rect
|
|
@@ -5948,8 +5974,8 @@ function Rh(e, t, n, o = 6) {
|
|
|
5948
5974
|
container: l.rect
|
|
5949
5975
|
};
|
|
5950
5976
|
}
|
|
5951
|
-
var
|
|
5952
|
-
function
|
|
5977
|
+
var Eh = (e, t) => e?.top === t?.top && e?.left === t?.left && e?.width === t?.width && e?.height === t?.height, Fh = (e, t) => !!e && e.denied === t.denied && e.drop?.target.region.id === t.drop?.target.region.id && Eh(e.drop?.target.rect, t.drop?.target.rect);
|
|
5978
|
+
function Ah(e, t, n) {
|
|
5953
5979
|
const [o, i] = z(), r = V(void 0);
|
|
5954
5980
|
r.current = o;
|
|
5955
5981
|
const [s, l] = z(), c = V(0), u = V(void 0), d = U(() => {
|
|
@@ -5969,7 +5995,7 @@ function Fh(e, t, n) {
|
|
|
5969
5995
|
const y = u.current, { region: T } = k.target;
|
|
5970
5996
|
if (!y || !T.containerId) return;
|
|
5971
5997
|
const A = T.kind === Se.Container ? g(T.containerId) : T.index;
|
|
5972
|
-
return
|
|
5998
|
+
return xh(n.composition.roots, n.adapter, y, T.containerId, A);
|
|
5973
5999
|
}, g = (k) => {
|
|
5974
6000
|
const y = [...n.composition.roots];
|
|
5975
6001
|
for (; y.length > 0; ) {
|
|
@@ -5979,7 +6005,7 @@ function Fh(e, t, n) {
|
|
|
5979
6005
|
}
|
|
5980
6006
|
return 0;
|
|
5981
6007
|
}, f = (k) => {
|
|
5982
|
-
const y = e.current.getBoundingClientRect(), T =
|
|
6008
|
+
const y = e.current.getBoundingClientRect(), T = Dh(t(), k.clientX - y.left, k.clientY - y.top), A = k.target.closest("[data-scene-id], [data-studio-element]"), I = A?.dataset.sceneId ?? A?.dataset.studioElement, N = !!I && n.ownershipOf(I) !== ne.Local;
|
|
5983
6009
|
if (!T || N) return { denied: !0 };
|
|
5984
6010
|
if (Jn(k)) {
|
|
5985
6011
|
const E = h(T), B = E ? n.validateMove(E) : te.NodeNotFound;
|
|
@@ -6008,14 +6034,14 @@ function Fh(e, t, n) {
|
|
|
6008
6034
|
onDragOver: (k) => {
|
|
6009
6035
|
if (!Mt(k) || (k.preventDefault(), p.current)) return;
|
|
6010
6036
|
const y = f(k);
|
|
6011
|
-
k.dataTransfer.dropEffect = y.denied ? "none" : Jn(k) ? "move" : "copy", i((T) =>
|
|
6037
|
+
k.dataTransfer.dropEffect = y.denied ? "none" : Jn(k) ? "move" : "copy", i((T) => Fh(T, y) ? T : y);
|
|
6012
6038
|
},
|
|
6013
6039
|
onDragLeave: (k) => {
|
|
6014
6040
|
Mt(k) && (c.current = Math.max(0, c.current - 1), c.current === 0 && i(void 0));
|
|
6015
6041
|
},
|
|
6016
6042
|
onDrop: (k) => {
|
|
6017
6043
|
if (!Mt(k)) return;
|
|
6018
|
-
const y =
|
|
6044
|
+
const y = Pm(k), T = xm(k), { drop: A, denied: I } = f(k), N = A && y ? h(A) : void 0, E = p.current;
|
|
6019
6045
|
if (k.preventDefault(), d(), p.current = !1, E || I || !A) return;
|
|
6020
6046
|
if (y) {
|
|
6021
6047
|
N && n.move(N, v(k, A));
|
|
@@ -6029,7 +6055,7 @@ function Fh(e, t, n) {
|
|
|
6029
6055
|
};
|
|
6030
6056
|
}
|
|
6031
6057
|
var nt = 3;
|
|
6032
|
-
function
|
|
6058
|
+
function Mh(e, t, n) {
|
|
6033
6059
|
const o = e.containerId === null ? t : n(e.containerId);
|
|
6034
6060
|
if (!o) return;
|
|
6035
6061
|
if (e.kind === Se.Container) return o;
|
|
@@ -6050,7 +6076,7 @@ function Ah(e, t, n) {
|
|
|
6050
6076
|
height: o.height
|
|
6051
6077
|
};
|
|
6052
6078
|
}
|
|
6053
|
-
function
|
|
6079
|
+
function _h(e, t, n) {
|
|
6054
6080
|
const [o, i] = z([]), [r, s] = z(), l = V([]), c = U(() => {
|
|
6055
6081
|
const d = e.current;
|
|
6056
6082
|
if (!d) return [];
|
|
@@ -6061,7 +6087,7 @@ function Mh(e, t, n) {
|
|
|
6061
6087
|
height: p.height
|
|
6062
6088
|
};
|
|
6063
6089
|
return t.flatMap((g) => {
|
|
6064
|
-
const f =
|
|
6090
|
+
const f = Mh(g, h, m);
|
|
6065
6091
|
return f ? [{
|
|
6066
6092
|
region: g,
|
|
6067
6093
|
rect: f
|
|
@@ -6071,7 +6097,7 @@ function Mh(e, t, n) {
|
|
|
6071
6097
|
const d = e.current;
|
|
6072
6098
|
if (!d) return;
|
|
6073
6099
|
const p = c();
|
|
6074
|
-
l.current = p, i((h) =>
|
|
6100
|
+
l.current = p, i((h) => Ch(h, p) ? h : p);
|
|
6075
6101
|
const m = n ? _e(d, n, d.getBoundingClientRect()) : void 0;
|
|
6076
6102
|
s((h) => Ra(h, m) ? h : m);
|
|
6077
6103
|
}, [
|
|
@@ -6110,7 +6136,7 @@ function Mh(e, t, n) {
|
|
|
6110
6136
|
var Ue = /* @__PURE__ */ (function(e) {
|
|
6111
6137
|
return e.NotShell = "notShell", e.Navigate = "navigate", e.Ignore = "ignore", e;
|
|
6112
6138
|
})({});
|
|
6113
|
-
function
|
|
6139
|
+
function $h(e, t) {
|
|
6114
6140
|
if (!t) return Ue.NotShell;
|
|
6115
6141
|
const n = e;
|
|
6116
6142
|
return !n || typeof n.closest != "function" || n.closest('[data-scene-id="composition"], [data-studio-element="composition"]') ? Ue.NotShell : n.closest("[data-scene-nav-item], [data-target-screen]") ? Ue.Navigate : Ue.Ignore;
|
|
@@ -6122,8 +6148,8 @@ var Bi = [
|
|
|
6122
6148
|
"mouseup",
|
|
6123
6149
|
"click",
|
|
6124
6150
|
"dblclick"
|
|
6125
|
-
],
|
|
6126
|
-
function
|
|
6151
|
+
], Lh = "[data-scene-id], [data-studio-element], [data-studio-placeholder-for]";
|
|
6152
|
+
function Bh(e, t, n = 0) {
|
|
6127
6153
|
const o = tn(t);
|
|
6128
6154
|
return {
|
|
6129
6155
|
select: e === "pointerdown" && n === 0 || e === "click",
|
|
@@ -6131,16 +6157,16 @@ function Lh(e, t, n = 0) {
|
|
|
6131
6157
|
cancelDefault: !o && e === "click"
|
|
6132
6158
|
};
|
|
6133
6159
|
}
|
|
6134
|
-
function
|
|
6135
|
-
const t = e, n = t && typeof t.closest == "function" ? t.closest(
|
|
6160
|
+
function jh(e) {
|
|
6161
|
+
const t = e, n = t && typeof t.closest == "function" ? t.closest(Lh) : null;
|
|
6136
6162
|
return n?.dataset.sceneId ?? n?.dataset.studioElement ?? n?.dataset.studioPlaceholderFor;
|
|
6137
6163
|
}
|
|
6138
|
-
var
|
|
6139
|
-
function
|
|
6140
|
-
const t = e, n = t && typeof t.closest == "function" ? t.closest(
|
|
6164
|
+
var Uh = "[data-scene-item], [data-scene-nav-item]";
|
|
6165
|
+
function Wh(e) {
|
|
6166
|
+
const t = e, n = t && typeof t.closest == "function" ? t.closest(Uh) : null;
|
|
6141
6167
|
return n?.dataset.sceneItem ?? n?.dataset.sceneNavItem;
|
|
6142
6168
|
}
|
|
6143
|
-
function
|
|
6169
|
+
function zh(e, t, n = !1) {
|
|
6144
6170
|
const o = V(t);
|
|
6145
6171
|
o.current = t;
|
|
6146
6172
|
const i = V(n);
|
|
@@ -6150,14 +6176,14 @@ function Wh(e, t, n = !1) {
|
|
|
6150
6176
|
const s = (l) => {
|
|
6151
6177
|
const c = l.target;
|
|
6152
6178
|
if (c?.closest?.(".studio-screen-surface__chrome")) return;
|
|
6153
|
-
const u =
|
|
6179
|
+
const u = $h(c, i.current);
|
|
6154
6180
|
if (u === Ue.Navigate) return;
|
|
6155
6181
|
if (u === Ue.Ignore) {
|
|
6156
6182
|
l.type === "click" && l.preventDefault(), l.stopPropagation();
|
|
6157
6183
|
return;
|
|
6158
6184
|
}
|
|
6159
|
-
const d =
|
|
6160
|
-
d.select && (tn(c) || r.focus({ preventScroll: !0 }), o.current(
|
|
6185
|
+
const d = Bh(l.type, c, l.button);
|
|
6186
|
+
d.select && (tn(c) || r.focus({ preventScroll: !0 }), o.current(jh(c), Wh(c))), d.cancelDefault && l.preventDefault(), d.swallow && l.stopPropagation();
|
|
6161
6187
|
};
|
|
6162
6188
|
for (const l of Bi) r.addEventListener(l, s, !0);
|
|
6163
6189
|
return () => {
|
|
@@ -6165,7 +6191,7 @@ function Wh(e, t, n = !1) {
|
|
|
6165
6191
|
};
|
|
6166
6192
|
}, [e]);
|
|
6167
6193
|
}
|
|
6168
|
-
var ji = 'button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])', Ui = 440,
|
|
6194
|
+
var ji = 'button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])', Ui = 440, Kh = ({ registry: e, property: t, context: n, componentId: o, anchor: i, opener: r, bounds: s, title: l, strings: c, onChange: u, onClose: d }) => {
|
|
6169
6195
|
const p = V(null);
|
|
6170
6196
|
le(() => ((p.current?.querySelector(ji) ?? p.current)?.focus({ preventScroll: !0 }), () => {
|
|
6171
6197
|
r.isConnected && r.focus({ preventScroll: !0 });
|
|
@@ -6214,7 +6240,7 @@ var ji = 'button:not(:disabled), [href], input:not(:disabled), select:not(:disab
|
|
|
6214
6240
|
})
|
|
6215
6241
|
});
|
|
6216
6242
|
};
|
|
6217
|
-
function
|
|
6243
|
+
function qh({ anchor: e, bounds: t, size: n, prefer: o, gap: i = 6 }) {
|
|
6218
6244
|
const r = e.top - i - n.height, s = e.top + e.height + i, l = r >= t.top, c = s + n.height <= t.top + t.height, u = o === "above" ? l || !c ? "above" : "below" : c || !l ? "below" : "above", d = u === "above" ? r : s, p = Math.max(t.top, Math.min(d, t.top + t.height - n.height));
|
|
6219
6245
|
return {
|
|
6220
6246
|
left: Math.max(t.left, Math.min(e.left, t.left + t.width - n.width)),
|
|
@@ -6227,27 +6253,27 @@ var Wi = [
|
|
|
6227
6253
|
M.slot,
|
|
6228
6254
|
M.slice,
|
|
6229
6255
|
M.emphasis
|
|
6230
|
-
],
|
|
6256
|
+
], Gh = [
|
|
6231
6257
|
M.moveEarlier,
|
|
6232
6258
|
M.moveLater,
|
|
6233
6259
|
M.addSubItem,
|
|
6234
6260
|
M.duplicate,
|
|
6235
6261
|
M.delete
|
|
6236
|
-
],
|
|
6262
|
+
], Hh = {
|
|
6237
6263
|
[M.target]: /* @__PURE__ */ a(mc, { "aria-hidden": "true" }),
|
|
6238
6264
|
[M.slot]: /* @__PURE__ */ a(hc, { "aria-hidden": "true" }),
|
|
6239
6265
|
[M.slice]: /* @__PURE__ */ a(vc, { "aria-hidden": "true" })
|
|
6240
|
-
},
|
|
6266
|
+
}, Vh = {
|
|
6241
6267
|
[M.moveEarlier]: /* @__PURE__ */ a(cc, { "aria-hidden": "true" }),
|
|
6242
6268
|
[M.moveLater]: /* @__PURE__ */ a(dc, { "aria-hidden": "true" }),
|
|
6243
6269
|
[M.addSubItem]: /* @__PURE__ */ a(pc, { "aria-hidden": "true" }),
|
|
6244
6270
|
[M.duplicate]: /* @__PURE__ */ a(uc, { "aria-hidden": "true" }),
|
|
6245
6271
|
[M.delete]: /* @__PURE__ */ a(gc, { "aria-hidden": "true" })
|
|
6246
|
-
},
|
|
6272
|
+
}, Jh = ({ subject: e, item: t, anchor: n, bounds: o, strings: i, renameToken: r, chipLabel: s, onRename: l, onAction: c, onChoice: u, readOnlyActions: d, onReadOnlyAction: p, onLeave: m }) => {
|
|
6247
6273
|
const h = V(null), g = V(null), [f, v] = z({
|
|
6248
6274
|
width: 380,
|
|
6249
6275
|
height: 100
|
|
6250
|
-
}), [w, P] = z(t.label), [
|
|
6276
|
+
}), [w, P] = z(t.label), [x, C] = z(0), k = e.mode.itemToolbar, y = k.some((R) => R.compact === !0), T = k.some((R) => Wi.includes(R.id)), A = k.find((R) => R.id === M.rename), I = A && Et(A, t);
|
|
6251
6277
|
le(() => {
|
|
6252
6278
|
P(t.label);
|
|
6253
6279
|
}, [t.id, t.label]), le(() => {
|
|
@@ -6259,7 +6285,7 @@ var Wi = [
|
|
|
6259
6285
|
height: R.height
|
|
6260
6286
|
});
|
|
6261
6287
|
});
|
|
6262
|
-
const N = e.source.kind === "elements" ? "above" : "below", E =
|
|
6288
|
+
const N = e.source.kind === "elements" ? "above" : "below", E = qh({
|
|
6263
6289
|
anchor: n,
|
|
6264
6290
|
bounds: o,
|
|
6265
6291
|
size: f,
|
|
@@ -6311,7 +6337,7 @@ var Wi = [
|
|
|
6311
6337
|
className: "studio-design-toolbar__text-action",
|
|
6312
6338
|
"data-action": X.id,
|
|
6313
6339
|
"data-roving": pe,
|
|
6314
|
-
tabIndex:
|
|
6340
|
+
tabIndex: x === pe ? 0 : -1,
|
|
6315
6341
|
onClick: () => p(X),
|
|
6316
6342
|
children: X.label
|
|
6317
6343
|
}, X.id))]
|
|
@@ -6322,9 +6348,9 @@ var Wi = [
|
|
|
6322
6348
|
const R = Qe++;
|
|
6323
6349
|
return {
|
|
6324
6350
|
"data-roving": R,
|
|
6325
|
-
tabIndex:
|
|
6351
|
+
tabIndex: x === R ? 0 : -1
|
|
6326
6352
|
};
|
|
6327
|
-
}, Ce = k.filter((R) => Wi.includes(R.id) && Et(R, t).visible), Ne =
|
|
6353
|
+
}, Ce = k.filter((R) => Wi.includes(R.id) && Et(R, t).visible), Ne = Gh.flatMap((R) => k.filter((X) => X.id === R)).filter((R) => Et(R, t).visible);
|
|
6328
6354
|
return /* @__PURE__ */ b("div", {
|
|
6329
6355
|
...ce,
|
|
6330
6356
|
children: [
|
|
@@ -6355,7 +6381,7 @@ var Wi = [
|
|
|
6355
6381
|
"aria-haspopup": "dialog",
|
|
6356
6382
|
...$e(),
|
|
6357
6383
|
onClick: (X) => u(R.id, X.currentTarget),
|
|
6358
|
-
children: [
|
|
6384
|
+
children: [Hh[R.id], /* @__PURE__ */ a("span", { children: s(R.id, t) })]
|
|
6359
6385
|
}, R.id))
|
|
6360
6386
|
}),
|
|
6361
6387
|
Ce.length > 0 && Ne.length > 0 && /* @__PURE__ */ a("span", {
|
|
@@ -6375,20 +6401,20 @@ var Wi = [
|
|
|
6375
6401
|
disabled: !X.enabled,
|
|
6376
6402
|
...$e(),
|
|
6377
6403
|
onClick: () => c(R.id),
|
|
6378
|
-
children:
|
|
6404
|
+
children: Vh[R.id]
|
|
6379
6405
|
}, R.id);
|
|
6380
6406
|
})
|
|
6381
6407
|
})
|
|
6382
6408
|
]
|
|
6383
6409
|
});
|
|
6384
|
-
},
|
|
6410
|
+
}, Qh = (e) => {
|
|
6385
6411
|
const t = CSS.escape(e);
|
|
6386
6412
|
return [
|
|
6387
6413
|
`[data-scene-nav-item="${t}"] > [data-scene-nav-link]`,
|
|
6388
6414
|
`[data-scene-nav-item="${t}"]`,
|
|
6389
6415
|
`[data-scene-item="${t}"]`
|
|
6390
6416
|
];
|
|
6391
|
-
}, Pn = (e, t) => e === t || !!e && !!t && e.left === t.left && e.top === t.top && e.width === t.width && e.height === t.height,
|
|
6417
|
+
}, Pn = (e, t) => e === t || !!e && !!t && e.left === t.left && e.top === t.top && e.width === t.width && e.height === t.height, Yh = (e, t) => Pn(e.surface, t.surface) && Pn(e.component, t.component) && Object.keys(t.items).length === Object.keys(e.items).length && Object.entries(t.items).every(([n, o]) => Pn(e.items[n], o));
|
|
6392
6418
|
function eo(e, t, n) {
|
|
6393
6419
|
const [o, i] = z(), r = U(() => {
|
|
6394
6420
|
const s = e.current, l = s ? t(s, s.getBoundingClientRect()) : void 0;
|
|
@@ -6428,12 +6454,12 @@ function eo(e, t, n) {
|
|
|
6428
6454
|
};
|
|
6429
6455
|
}, [e, r]), o;
|
|
6430
6456
|
}
|
|
6431
|
-
function
|
|
6457
|
+
function Zh(e, t) {
|
|
6432
6458
|
return eo(e, U((n, o) => {
|
|
6433
6459
|
if (!t) return;
|
|
6434
6460
|
const i = _e(n, t.componentId, o), r = n.querySelector(`[data-studio-element="${CSS.escape(t.componentId)}"]`) ?? n.querySelector(`[data-scene-id="${CSS.escape(t.componentId)}"]`), s = {};
|
|
6435
6461
|
for (const l of t.source.items) {
|
|
6436
|
-
const c = _e(n, l.id, o) ?? (r ?
|
|
6462
|
+
const c = _e(n, l.id, o) ?? (r ? Qh(l.id).map((u) => r.querySelector(u)).flatMap((u) => u ? [xa(u, o)] : []).find((u) => u !== void 0) : void 0);
|
|
6437
6463
|
c && (s[l.id] = c);
|
|
6438
6464
|
}
|
|
6439
6465
|
return {
|
|
@@ -6446,10 +6472,10 @@ function Yh(e, t) {
|
|
|
6446
6472
|
component: i,
|
|
6447
6473
|
items: s
|
|
6448
6474
|
};
|
|
6449
|
-
}, [t]),
|
|
6475
|
+
}, [t]), Yh);
|
|
6450
6476
|
}
|
|
6451
|
-
var
|
|
6452
|
-
const { subject: s } = t, l =
|
|
6477
|
+
var xn = 34, Xh = ({ surface: e, state: t, controller: n, environment: o, editorStrings: i, strings: r }) => {
|
|
6478
|
+
const { subject: s } = t, l = Zh(e, s), [c, u] = z(), d = o.propertyEditors?.registry ?? nn, p = L(() => So(o.availableSources), [o.availableSources]), m = U((F) => {
|
|
6453
6479
|
if (typeof F != "string" || F === "") return;
|
|
6454
6480
|
const $ = o.propertyEditors?.slices?.find((se) => se.id === F) ?? o.stateChangeSlices.find((se) => se.id === F), q = F.split(".");
|
|
6455
6481
|
return $?.name ?? q[q.length - 1];
|
|
@@ -6480,12 +6506,12 @@ var On = 34, Zh = ({ surface: e, state: t, controller: n, environment: o, editor
|
|
|
6480
6506
|
f,
|
|
6481
6507
|
e
|
|
6482
6508
|
]), !s || !l) return null;
|
|
6483
|
-
const { selected: v, source: w } = s, P = s.mode.addActions[0],
|
|
6509
|
+
const { selected: v, source: w } = s, P = s.mode.addActions[0], x = w.items.flatMap((F) => l.items[F.id] ? [l.items[F.id]] : []), C = x[x.length - 1], k = s.mode.itemToolbar.some((F) => F.compact === !0), y = C ?? l.component, T = y && P ? k || !C ? {
|
|
6484
6510
|
left: (C ?? y).left,
|
|
6485
6511
|
top: (C ? C.top + C.height : y.top) + 8
|
|
6486
6512
|
} : {
|
|
6487
6513
|
left: C.left + C.width + 8,
|
|
6488
|
-
top: C.top + (C.height -
|
|
6514
|
+
top: C.top + (C.height - xn) / 2
|
|
6489
6515
|
} : void 0, A = v ? l.items[v.id] : void 0, I = c && v && c.itemId === v.id ? w.choice(c.actionId, v) : void 0, N = () => u(void 0), E = () => Io({
|
|
6490
6516
|
controller: n,
|
|
6491
6517
|
environment: o,
|
|
@@ -6510,13 +6536,13 @@ var On = 34, Zh = ({ surface: e, state: t, controller: n, environment: o, editor
|
|
|
6510
6536
|
style: {
|
|
6511
6537
|
left: T.left,
|
|
6512
6538
|
top: T.top,
|
|
6513
|
-
width:
|
|
6514
|
-
height:
|
|
6539
|
+
width: xn,
|
|
6540
|
+
height: xn
|
|
6515
6541
|
},
|
|
6516
6542
|
onClick: () => t.add(P.id),
|
|
6517
6543
|
children: /* @__PURE__ */ a(fc, { "aria-hidden": "true" })
|
|
6518
6544
|
}),
|
|
6519
|
-
v && S && /* @__PURE__ */ a(
|
|
6545
|
+
v && S && /* @__PURE__ */ a(Jh, {
|
|
6520
6546
|
subject: s,
|
|
6521
6547
|
item: v,
|
|
6522
6548
|
anchor: S,
|
|
@@ -6535,12 +6561,12 @@ var On = 34, Zh = ({ surface: e, state: t, controller: n, environment: o, editor
|
|
|
6535
6561
|
onReadOnlyAction: (F) => t.perform(F.plan()),
|
|
6536
6562
|
onLeave: () => e.current?.focus({ preventScroll: !0 })
|
|
6537
6563
|
}, v.id),
|
|
6538
|
-
I && c && S && /* @__PURE__ */ a(
|
|
6564
|
+
I && c && S && /* @__PURE__ */ a(Kh, {
|
|
6539
6565
|
registry: d,
|
|
6540
6566
|
property: I.property,
|
|
6541
6567
|
context: E(),
|
|
6542
6568
|
componentId: v.id,
|
|
6543
|
-
anchor:
|
|
6569
|
+
anchor: ef(e, c.opener),
|
|
6544
6570
|
opener: c.opener,
|
|
6545
6571
|
bounds: l.surface,
|
|
6546
6572
|
title: s.mode.itemToolbar.find((F) => F.id === c.actionId)?.title ?? c.actionId,
|
|
@@ -6571,7 +6597,7 @@ var On = 34, Zh = ({ surface: e, state: t, controller: n, environment: o, editor
|
|
|
6571
6597
|
})
|
|
6572
6598
|
] });
|
|
6573
6599
|
};
|
|
6574
|
-
function
|
|
6600
|
+
function ef(e, t) {
|
|
6575
6601
|
const n = e.current?.getBoundingClientRect(), o = t.getBoundingClientRect();
|
|
6576
6602
|
return {
|
|
6577
6603
|
left: o.left - (n?.left ?? 0),
|
|
@@ -6591,14 +6617,14 @@ function Da(e, t) {
|
|
|
6591
6617
|
}] : [], ...Da(Zt(n), t)];
|
|
6592
6618
|
});
|
|
6593
6619
|
}
|
|
6594
|
-
var
|
|
6595
|
-
const o = eo(e, U((h, g) => _e(h, "composition", g), []),
|
|
6620
|
+
var tf = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width && e.height === t.height, Ki = "content", nf = (e, t) => e.length === t.length && e.every((n, o) => n.id === t[o].id && n.rect.left === t[o].rect.left && n.rect.top === t[o].rect.top && n.rect.width === t[o].rect.width && n.rect.height === t[o].rect.height), of = ({ surface: e, controller: t, strings: n }) => {
|
|
6621
|
+
const o = eo(e, U((h, g) => _e(h, "composition", g), []), tf), { composition: i, context: r, selectedId: s, navigation: l, navigationModule: c, structure: u } = t, d = L(() => Da(i.roots, r.catalog), [i.roots, r.catalog]), p = U((h, g) => d.flatMap((f) => {
|
|
6596
6622
|
const v = _e(h, f.id, g);
|
|
6597
6623
|
return v ? [{
|
|
6598
6624
|
...f,
|
|
6599
6625
|
rect: v
|
|
6600
6626
|
}] : [];
|
|
6601
|
-
}), [d]), m = eo(e, p,
|
|
6627
|
+
}), [d]), m = eo(e, p, nf);
|
|
6602
6628
|
return /* @__PURE__ */ b(ae, { children: [o && /* @__PURE__ */ a("div", {
|
|
6603
6629
|
className: "studio-design-slot",
|
|
6604
6630
|
"data-slot": Ki,
|
|
@@ -6652,9 +6678,9 @@ var ef = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width &
|
|
|
6652
6678
|
})
|
|
6653
6679
|
}, h);
|
|
6654
6680
|
})] });
|
|
6655
|
-
},
|
|
6681
|
+
}, rf = rl(), Lt = () => {
|
|
6656
6682
|
throw new Error("The screen is being designed; it does not navigate.");
|
|
6657
|
-
},
|
|
6683
|
+
}, af = ({ structure: e, navigation: t, module: n, logoLockedReason: o, onNavigate: i, peeking: r, children: s }) => {
|
|
6658
6684
|
const l = L(() => new Xt(e), [e]), c = L(() => ({
|
|
6659
6685
|
structure: l,
|
|
6660
6686
|
navigation: t
|
|
@@ -6688,7 +6714,7 @@ var ef = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width &
|
|
|
6688
6714
|
children: /* @__PURE__ */ a(nl, {
|
|
6689
6715
|
model: c,
|
|
6690
6716
|
children: /* @__PURE__ */ a(il, {
|
|
6691
|
-
invoker:
|
|
6717
|
+
invoker: rf,
|
|
6692
6718
|
warnEmptySlices: !0,
|
|
6693
6719
|
children: s
|
|
6694
6720
|
})
|
|
@@ -6698,11 +6724,11 @@ var ef = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width &
|
|
|
6698
6724
|
value: p,
|
|
6699
6725
|
children: g
|
|
6700
6726
|
}) : g;
|
|
6701
|
-
},
|
|
6727
|
+
}, sf = 'button, a[href], [role="button"], [role="radio"], [role="option"], [role="menuitem"]', lf = (e) => {
|
|
6702
6728
|
const t = e;
|
|
6703
|
-
return !!t && typeof t.closest == "function" && t.closest(
|
|
6729
|
+
return !!t && typeof t.closest == "function" && t.closest(sf) !== null;
|
|
6704
6730
|
};
|
|
6705
|
-
function
|
|
6731
|
+
function cf(e, t, n) {
|
|
6706
6732
|
const { subject: o } = t;
|
|
6707
6733
|
if (!o) return !1;
|
|
6708
6734
|
const i = tn(e.target), r = () => (e.preventDefault(), e.stopPropagation(), !0);
|
|
@@ -6710,7 +6736,7 @@ function lf(e, t, n) {
|
|
|
6710
6736
|
return t.deselect(), r();
|
|
6711
6737
|
const s = o.selected;
|
|
6712
6738
|
if (!s || i || s.readOnly) return !1;
|
|
6713
|
-
if (e.key === "Enter" && !e.altKey && !e.ctrlKey && !e.metaKey) return !
|
|
6739
|
+
if (e.key === "Enter" && !e.altKey && !e.ctrlKey && !e.metaKey) return !lf(e.target) && n() ? r() : !1;
|
|
6714
6740
|
if (e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
6715
6741
|
const l = e.key === "ArrowUp" || e.key === "ArrowLeft", c = e.key === "ArrowDown" || e.key === "ArrowRight";
|
|
6716
6742
|
if (l || c)
|
|
@@ -6732,20 +6758,20 @@ function Ea(e, t, n) {
|
|
|
6732
6758
|
...l ? { slots: l } : {}
|
|
6733
6759
|
} : e;
|
|
6734
6760
|
}
|
|
6735
|
-
var
|
|
6736
|
-
},
|
|
6761
|
+
var df = () => {
|
|
6762
|
+
}, uf = {
|
|
6737
6763
|
button: "Button",
|
|
6738
6764
|
item: "New item"
|
|
6739
|
-
},
|
|
6740
|
-
const c = V(null), { composition: u, dropRegions: d, selectedId: p } = e, { selectionRect: m, measureNow: h } =
|
|
6765
|
+
}, pf = ({ controller: e, environment: t, resolveBinding: n = df, configuration: o, strings: i, editorStrings: r, viewportHeight: s, shell: l }) => {
|
|
6766
|
+
const c = V(null), { composition: u, dropRegions: d, selectedId: p } = e, { selectionRect: m, measureNow: h } = _h(c, d, p), { feedback: g, draggedId: f, startMoving: v, endMoving: w, handlers: P } = Ah(c, h, e), [x, C] = z(), k = Ph(e, t), { document: y, context: T } = e, A = L(() => o ?? (y.instanceContributions.length > 0 ? pr(mo(y, T.scope), y.instanceContributions, T.catalog) : void 0), [
|
|
6741
6767
|
o,
|
|
6742
6768
|
y,
|
|
6743
6769
|
T
|
|
6744
|
-
]), I = r?.designMode ??
|
|
6770
|
+
]), I = r?.designMode ?? Oo, N = t.destinations[0], E = L(() => N ? { screen: N.id } : void 0, [N]), B = om({
|
|
6745
6771
|
controller: e,
|
|
6746
6772
|
environment: t,
|
|
6747
6773
|
strings: I,
|
|
6748
|
-
startingLabels:
|
|
6774
|
+
startingLabels: uf,
|
|
6749
6775
|
...E ? { startingDestination: E } : {}
|
|
6750
6776
|
});
|
|
6751
6777
|
ye(() => {
|
|
@@ -6759,12 +6785,12 @@ var cf = () => {
|
|
|
6759
6785
|
H.preventDefault(), l.back();
|
|
6760
6786
|
return;
|
|
6761
6787
|
}
|
|
6762
|
-
|
|
6788
|
+
cf(H, B, () => {
|
|
6763
6789
|
const ie = c.current?.querySelector(".studio-design-toolbar__title");
|
|
6764
6790
|
return ie?.focus({ preventScroll: !0 }), !!ie;
|
|
6765
6791
|
}) || !ko(H) || !e.selectedId || !e.canRemove(e.selectedId) || (H.preventDefault(), e.remove(e.selectedId));
|
|
6766
6792
|
}, F = !!e.selectedId && e.ownershipOf(e.selectedId) === ne.Local && e.canRemove(e.selectedId), $ = e.selection && (e.selection.name || e.selection.componentName) || "";
|
|
6767
|
-
|
|
6793
|
+
zh(c, (H, ie) => {
|
|
6768
6794
|
e.select(H), B.pointItem(H, ie);
|
|
6769
6795
|
}, l?.frame !== void 0);
|
|
6770
6796
|
const { setMeasurer: q } = e;
|
|
@@ -6792,17 +6818,17 @@ var cf = () => {
|
|
|
6792
6818
|
t.runtime.packages
|
|
6793
6819
|
]), ce = l?.peeking, Qe = r?.shellPeeking(l?.peekingName ?? "") ?? "", $e = L(() => {
|
|
6794
6820
|
const H = l?.frame;
|
|
6795
|
-
return H ? Ea(H.element, $o, ce ?
|
|
6821
|
+
return H ? Ea(H.element, $o, ce ? Xm(ce, Qe) : se) : se;
|
|
6796
6822
|
}, [
|
|
6797
6823
|
l?.frame,
|
|
6798
6824
|
se,
|
|
6799
6825
|
ce,
|
|
6800
6826
|
Qe
|
|
6801
|
-
]), Ce = L(() =>
|
|
6827
|
+
]), Ce = L(() => yh(t.runtime.registry, i), [t.runtime.registry, i]), Ne = L(() => jo(t.runtime), [t.runtime]), R = L(() => /* @__PURE__ */ a(br, {
|
|
6802
6828
|
registry: t.runtime.iconAdapters,
|
|
6803
6829
|
children: /* @__PURE__ */ a(hr, {
|
|
6804
6830
|
storage: null,
|
|
6805
|
-
children: /* @__PURE__ */ a(
|
|
6831
|
+
children: /* @__PURE__ */ a(af, {
|
|
6806
6832
|
structure: e.structure,
|
|
6807
6833
|
navigation: e.navigation,
|
|
6808
6834
|
module: e.navigationModule,
|
|
@@ -6830,7 +6856,7 @@ var cf = () => {
|
|
|
6830
6856
|
l?.navigate,
|
|
6831
6857
|
l?.peekingName,
|
|
6832
6858
|
ce
|
|
6833
|
-
]), X = s ??
|
|
6859
|
+
]), X = s ?? x, pe = {
|
|
6834
6860
|
...X === void 0 ? {} : { "--studio-surface-viewport-height": `${X}px` },
|
|
6835
6861
|
"--studio-empty-container-label": JSON.stringify(i.emptyContainer)
|
|
6836
6862
|
};
|
|
@@ -6863,25 +6889,25 @@ var cf = () => {
|
|
|
6863
6889
|
"aria-hidden": "true",
|
|
6864
6890
|
title: i.moveHandle($),
|
|
6865
6891
|
onDragStart: (H) => {
|
|
6866
|
-
v(e.selectedId),
|
|
6892
|
+
v(e.selectedId), Im(H, e.selectedId, $);
|
|
6867
6893
|
},
|
|
6868
6894
|
onDragEnd: w,
|
|
6869
6895
|
children: /* @__PURE__ */ a(Fl, { "aria-hidden": "true" })
|
|
6870
6896
|
}),
|
|
6871
|
-
g && /* @__PURE__ */ a(
|
|
6897
|
+
g && /* @__PURE__ */ a(kh, {
|
|
6872
6898
|
feedback: g,
|
|
6873
6899
|
deniedText: i.dropDenied
|
|
6874
6900
|
}),
|
|
6875
|
-
/* @__PURE__ */ a(
|
|
6901
|
+
/* @__PURE__ */ a(Nh, {
|
|
6876
6902
|
surface: c,
|
|
6877
6903
|
markers: k
|
|
6878
6904
|
}),
|
|
6879
|
-
/* @__PURE__ */ a(
|
|
6905
|
+
/* @__PURE__ */ a(of, {
|
|
6880
6906
|
surface: c,
|
|
6881
6907
|
controller: e,
|
|
6882
6908
|
strings: I
|
|
6883
6909
|
}),
|
|
6884
|
-
r && /* @__PURE__ */ a(
|
|
6910
|
+
r && /* @__PURE__ */ a(Xh, {
|
|
6885
6911
|
surface: c,
|
|
6886
6912
|
state: B,
|
|
6887
6913
|
controller: e,
|
|
@@ -6900,14 +6926,14 @@ var cf = () => {
|
|
|
6900
6926
|
})
|
|
6901
6927
|
});
|
|
6902
6928
|
}, qi = 40, Fa = ({ controller: e, environment: t, strings: n, window: o, authoringTemplate: i, deviceFrame: r = !1, saveFailure: s, onSave: l, isSaving: c = !1, onPreview: u }) => {
|
|
6903
|
-
const d =
|
|
6929
|
+
const d = sh(e.document, t.runtime, i), p = !!e.selectedId && e.canRemove(e.selectedId), m = /* @__PURE__ */ b(ae, { children: [
|
|
6904
6930
|
/* @__PURE__ */ a("span", {
|
|
6905
6931
|
className: "studio-screen-editor-window__state",
|
|
6906
6932
|
role: "status",
|
|
6907
6933
|
"data-dirty": e.isDirty ? "" : void 0,
|
|
6908
6934
|
children: e.isDirty ? n.unsavedChanges : n.allChangesSaved
|
|
6909
6935
|
}),
|
|
6910
|
-
/* @__PURE__ */ a(
|
|
6936
|
+
/* @__PURE__ */ a(Vm, {
|
|
6911
6937
|
windowSize: o.size,
|
|
6912
6938
|
available: o.available,
|
|
6913
6939
|
strings: n,
|
|
@@ -6977,7 +7003,7 @@ var cf = () => {
|
|
|
6977
7003
|
role: "group",
|
|
6978
7004
|
"aria-label": n.windowLabel,
|
|
6979
7005
|
children: [
|
|
6980
|
-
/* @__PURE__ */ a(
|
|
7006
|
+
/* @__PURE__ */ a(qm, { controls: m }),
|
|
6981
7007
|
s && /* @__PURE__ */ b("p", {
|
|
6982
7008
|
className: "studio-screen-editor-window__notice",
|
|
6983
7009
|
role: "alert",
|
|
@@ -7004,7 +7030,7 @@ var cf = () => {
|
|
|
7004
7030
|
onClick: d.back,
|
|
7005
7031
|
children: n.shellPeekBack
|
|
7006
7032
|
})]
|
|
7007
|
-
}), /* @__PURE__ */ a(
|
|
7033
|
+
}), /* @__PURE__ */ a(pf, {
|
|
7008
7034
|
controller: e,
|
|
7009
7035
|
environment: t,
|
|
7010
7036
|
resolveBinding: () => {
|
|
@@ -7019,7 +7045,7 @@ var cf = () => {
|
|
|
7019
7045
|
]
|
|
7020
7046
|
});
|
|
7021
7047
|
};
|
|
7022
|
-
function
|
|
7048
|
+
function mf(e, t, n) {
|
|
7023
7049
|
const o = e.screens.find((l) => l.name === ge);
|
|
7024
7050
|
if (!o || o.screenTemplate === t?.name) return e;
|
|
7025
7051
|
const i = o.screenTemplate, r = e.screens.map((l) => {
|
|
@@ -7030,28 +7056,28 @@ function pf(e, t, n) {
|
|
|
7030
7056
|
screenTemplate: t.name
|
|
7031
7057
|
} : u;
|
|
7032
7058
|
});
|
|
7033
|
-
let s = e.screenTemplates.filter((l) => !
|
|
7059
|
+
let s = e.screenTemplates.filter((l) => !hf(l, i, r, n));
|
|
7034
7060
|
return t && !s.some((l) => l.name === t.name) && (s = [...s, globalThis.structuredClone(t)]), {
|
|
7035
7061
|
...e,
|
|
7036
7062
|
screens: r,
|
|
7037
7063
|
screenTemplates: s
|
|
7038
7064
|
};
|
|
7039
7065
|
}
|
|
7040
|
-
function
|
|
7066
|
+
function hf(e, t, n, o) {
|
|
7041
7067
|
if (e.name !== t || n.some((r) => r.screenTemplate === t)) return !1;
|
|
7042
7068
|
const i = o.find((r) => r.name === t);
|
|
7043
7069
|
return i !== void 0 && JSON.stringify(i) === JSON.stringify(e);
|
|
7044
7070
|
}
|
|
7045
|
-
var
|
|
7071
|
+
var On = 16;
|
|
7046
7072
|
function Aa(e) {
|
|
7047
7073
|
if (e.length === 0) return {
|
|
7048
|
-
left:
|
|
7049
|
-
top:
|
|
7074
|
+
left: On,
|
|
7075
|
+
top: On
|
|
7050
7076
|
};
|
|
7051
7077
|
let t = 0;
|
|
7052
7078
|
const n = e.map((o) => o.bottom !== void 0 ? o.bottom : o.placement ? o.placement.top + (o.height ?? 40) : (t += o.height ?? 40, t));
|
|
7053
7079
|
return {
|
|
7054
|
-
left:
|
|
7080
|
+
left: On,
|
|
7055
7081
|
top: Math.max(...n) + 16
|
|
7056
7082
|
};
|
|
7057
7083
|
}
|
|
@@ -7073,14 +7099,14 @@ function _a(e) {
|
|
|
7073
7099
|
top: o
|
|
7074
7100
|
} : void 0;
|
|
7075
7101
|
}
|
|
7076
|
-
function
|
|
7102
|
+
function ff(e) {
|
|
7077
7103
|
const { [Ve]: t, [Je]: n, ...o } = e.properties ?? {};
|
|
7078
7104
|
return {
|
|
7079
7105
|
...e,
|
|
7080
7106
|
properties: o
|
|
7081
7107
|
};
|
|
7082
7108
|
}
|
|
7083
|
-
function
|
|
7109
|
+
function gf(e) {
|
|
7084
7110
|
if (e.targetParentId !== null)
|
|
7085
7111
|
return {
|
|
7086
7112
|
kind: Q.MoveNode,
|
|
@@ -7097,7 +7123,7 @@ function $a(e, t, n) {
|
|
|
7097
7123
|
element: n
|
|
7098
7124
|
};
|
|
7099
7125
|
}
|
|
7100
|
-
function
|
|
7126
|
+
function vf(e) {
|
|
7101
7127
|
return {
|
|
7102
7128
|
kind: Q.RemoveNode,
|
|
7103
7129
|
nodeId: oe(e)
|
|
@@ -7111,18 +7137,18 @@ var La = (e, t) => (e?.children ?? []).map((n) => {
|
|
|
7111
7137
|
bottom: o?.bottom
|
|
7112
7138
|
};
|
|
7113
7139
|
});
|
|
7114
|
-
function
|
|
7140
|
+
function bf(e, t, n, o) {
|
|
7115
7141
|
const i = We(e, t.nodeId);
|
|
7116
7142
|
if (!i || t.targetParentId === null) return;
|
|
7117
7143
|
const r = oo(e, t.nodeId), s = We(e, t.targetParentId), l = !!r && ut(r), c = !!s && ut(s);
|
|
7118
7144
|
if (!l && !c) return;
|
|
7119
|
-
const u = l && c && r.id === t.targetParentId, d = u ? r.children.findIndex((m) => m.id === t.nodeId) : t.index, p = c ? Ma(i, n ?? (u ? _a(i) : void 0) ?? Aa(La(s, o))) :
|
|
7145
|
+
const u = l && c && r.id === t.targetParentId, d = u ? r.children.findIndex((m) => m.id === t.nodeId) : t.index, p = c ? Ma(i, n ?? (u ? _a(i) : void 0) ?? Aa(La(s, o))) : ff(i);
|
|
7120
7146
|
return [{
|
|
7121
7147
|
kind: Q.RemoveNode,
|
|
7122
7148
|
nodeId: oe(t.nodeId)
|
|
7123
7149
|
}, $a(t.targetParentId, d, p)];
|
|
7124
7150
|
}
|
|
7125
|
-
function
|
|
7151
|
+
function yf(e) {
|
|
7126
7152
|
switch (e) {
|
|
7127
7153
|
case J.Row:
|
|
7128
7154
|
case J.Wrap:
|
|
@@ -7137,7 +7163,7 @@ function bf(e) {
|
|
|
7137
7163
|
}
|
|
7138
7164
|
}
|
|
7139
7165
|
function Gi(e, t, n, o) {
|
|
7140
|
-
const i = e ?? "screen", r =
|
|
7166
|
+
const i = e ?? "screen", r = yf(n), s = {
|
|
7141
7167
|
id: `${i}:container`,
|
|
7142
7168
|
kind: Se.Container,
|
|
7143
7169
|
containerId: e,
|
|
@@ -7156,7 +7182,7 @@ function Gi(e, t, n, o) {
|
|
|
7156
7182
|
...c < t.length ? { beforeId: o.idOf(t[c]) } : {}
|
|
7157
7183
|
}))];
|
|
7158
7184
|
}
|
|
7159
|
-
function
|
|
7185
|
+
function wf(e, t, n) {
|
|
7160
7186
|
const o = (i) => i.flatMap((r) => {
|
|
7161
7187
|
if (!n.acceptsChildren(r)) return [];
|
|
7162
7188
|
const s = n.childrenOf(r);
|
|
@@ -7164,7 +7190,7 @@ function yf(e, t, n) {
|
|
|
7164
7190
|
});
|
|
7165
7191
|
return [...Gi(null, e, t, n), ...o(e)];
|
|
7166
7192
|
}
|
|
7167
|
-
var
|
|
7193
|
+
var kf = class {
|
|
7168
7194
|
latest;
|
|
7169
7195
|
publish;
|
|
7170
7196
|
constructor(e, t) {
|
|
@@ -7177,7 +7203,7 @@ var wf = class {
|
|
|
7177
7203
|
return this.latest = e(this.latest), this.publish(this.latest), this.latest;
|
|
7178
7204
|
}
|
|
7179
7205
|
};
|
|
7180
|
-
function
|
|
7206
|
+
function Sf(e) {
|
|
7181
7207
|
return {
|
|
7182
7208
|
document: e,
|
|
7183
7209
|
undoable: [],
|
|
@@ -7187,7 +7213,7 @@ function kf(e) {
|
|
|
7187
7213
|
savedDocument: e
|
|
7188
7214
|
};
|
|
7189
7215
|
}
|
|
7190
|
-
function
|
|
7216
|
+
function Cf(e, t, n, o) {
|
|
7191
7217
|
const i = cr(e.document, t, n);
|
|
7192
7218
|
return i.applied ? {
|
|
7193
7219
|
...e,
|
|
@@ -7217,7 +7243,7 @@ function Te(e, t, n) {
|
|
|
7217
7243
|
isDirty: t !== e.savedDocument
|
|
7218
7244
|
};
|
|
7219
7245
|
}
|
|
7220
|
-
function
|
|
7246
|
+
function Nf(e, t, n, o) {
|
|
7221
7247
|
let i = e.document;
|
|
7222
7248
|
const r = [];
|
|
7223
7249
|
for (const s of t) {
|
|
@@ -7240,8 +7266,8 @@ function Cf(e, t, n, o) {
|
|
|
7240
7266
|
isDirty: i !== e.savedDocument
|
|
7241
7267
|
};
|
|
7242
7268
|
}
|
|
7243
|
-
var
|
|
7244
|
-
function
|
|
7269
|
+
var Tf = (e) => e.undoable.length > 0, If = (e) => e.redoable.length > 0;
|
|
7270
|
+
function Pf(e) {
|
|
7245
7271
|
const t = e.undoable[e.undoable.length - 1];
|
|
7246
7272
|
return t ? {
|
|
7247
7273
|
...e,
|
|
@@ -7255,7 +7281,7 @@ function If(e) {
|
|
|
7255
7281
|
isDirty: t.before !== e.savedDocument
|
|
7256
7282
|
} : e;
|
|
7257
7283
|
}
|
|
7258
|
-
function
|
|
7284
|
+
function xf(e) {
|
|
7259
7285
|
const t = e.redoable[e.redoable.length - 1];
|
|
7260
7286
|
return t ? {
|
|
7261
7287
|
...e,
|
|
@@ -7292,7 +7318,7 @@ function bt(e, t, n) {
|
|
|
7292
7318
|
Array.isArray(i) && bt(i, t, n);
|
|
7293
7319
|
}
|
|
7294
7320
|
}
|
|
7295
|
-
var to = (e) => e.id,
|
|
7321
|
+
var to = (e) => e.id, Rf = (e) => e.name || to(e), Df = (e) => {
|
|
7296
7322
|
switch (e) {
|
|
7297
7323
|
case W.Stack:
|
|
7298
7324
|
return J.Column;
|
|
@@ -7310,10 +7336,10 @@ var to = (e) => e.id, xf = (e) => e.name || to(e), Rf = (e) => {
|
|
|
7310
7336
|
return;
|
|
7311
7337
|
}
|
|
7312
7338
|
};
|
|
7313
|
-
function
|
|
7339
|
+
function Ef(e) {
|
|
7314
7340
|
return {
|
|
7315
7341
|
idOf: to,
|
|
7316
|
-
nameOf:
|
|
7342
|
+
nameOf: Rf,
|
|
7317
7343
|
childrenOf: Zt,
|
|
7318
7344
|
withChildren: (t, n) => jt(t) ? {
|
|
7319
7345
|
...t,
|
|
@@ -7324,13 +7350,13 @@ function Df(e) {
|
|
|
7324
7350
|
} : t,
|
|
7325
7351
|
acceptsChildren: (t) => jt(t),
|
|
7326
7352
|
ownershipOf: (t) => e(to(t)) ?? ne.Local,
|
|
7327
|
-
arrangementOf: (t) => jt(t) ?
|
|
7353
|
+
arrangementOf: (t) => jt(t) ? Df(Lr(t)) : void 0
|
|
7328
7354
|
};
|
|
7329
7355
|
}
|
|
7330
|
-
function
|
|
7356
|
+
function Ff(e) {
|
|
7331
7357
|
return e ? ut(e) ? J.Freeform : uo(e) ? J.Grid : po(e) ? e.orientation === ct.Horizontal ? J.Row : J.Column : J.Column : J.Column;
|
|
7332
7358
|
}
|
|
7333
|
-
var
|
|
7359
|
+
var Af = (e, t) => Math.max(0, Math.min(e, t));
|
|
7334
7360
|
function Vi(e, t, n) {
|
|
7335
7361
|
const o = ke(e, t.nodeId, n);
|
|
7336
7362
|
if (!o) return te.NodeNotFound;
|
|
@@ -7346,10 +7372,10 @@ function Vi(e, t, n) {
|
|
|
7346
7372
|
}
|
|
7347
7373
|
if ((o.parent === null ? null : n.idOf(o.parent)) === t.targetParentId) {
|
|
7348
7374
|
const r = i.length - 1;
|
|
7349
|
-
if (
|
|
7375
|
+
if (Af(t.index, r) === o.index) return te.NoChange;
|
|
7350
7376
|
}
|
|
7351
7377
|
}
|
|
7352
|
-
var
|
|
7378
|
+
var Mf = "composition";
|
|
7353
7379
|
function no(e, t) {
|
|
7354
7380
|
const n = e.screens.find((s) => s.name === ge), o = t !== void 0 ? $n(t, !0) : $n(void 0), i = mo(e, o).levels.filter((s) => s.kind === ys.ScreenTemplate).map((s) => s.owner), r = [];
|
|
7355
7381
|
for (const s of i) {
|
|
@@ -7358,12 +7384,12 @@ function no(e, t) {
|
|
|
7358
7384
|
for (const c of l.slots) r.push(...l.content?.[c.name] ?? []);
|
|
7359
7385
|
}
|
|
7360
7386
|
return (t === void 0 || o.kind === Vt.Screen) && r.push(...n?.slotContent.content ?? []), {
|
|
7361
|
-
element: Yt(W.Stack,
|
|
7387
|
+
element: Yt(W.Stack, Mf, "Composition", r),
|
|
7362
7388
|
roots: r,
|
|
7363
7389
|
templates: i
|
|
7364
7390
|
};
|
|
7365
7391
|
}
|
|
7366
|
-
function
|
|
7392
|
+
function _f(e) {
|
|
7367
7393
|
switch (e) {
|
|
7368
7394
|
case Go.Inherited:
|
|
7369
7395
|
return ne.Inherited;
|
|
@@ -7373,15 +7399,15 @@ function Mf(e) {
|
|
|
7373
7399
|
return ne.Local;
|
|
7374
7400
|
}
|
|
7375
7401
|
}
|
|
7376
|
-
function
|
|
7402
|
+
function $f(e, t, n) {
|
|
7377
7403
|
const o = /* @__PURE__ */ new Map();
|
|
7378
7404
|
for (const i of Va(t)) {
|
|
7379
7405
|
const r = co(e, oe(i), n);
|
|
7380
|
-
o.set(i, r ?
|
|
7406
|
+
o.set(i, r ? _f(r.provenance.kind) : ne.Inherited);
|
|
7381
7407
|
}
|
|
7382
7408
|
return (i) => o.get(i) ?? ne.Local;
|
|
7383
7409
|
}
|
|
7384
|
-
function
|
|
7410
|
+
function Lf(e) {
|
|
7385
7411
|
const [t, n] = z({
|
|
7386
7412
|
catalog: e,
|
|
7387
7413
|
times: 0
|
|
@@ -7399,10 +7425,10 @@ function $f(e) {
|
|
|
7399
7425
|
};
|
|
7400
7426
|
}, [e]), t.catalog === e ? t.times : 0;
|
|
7401
7427
|
}
|
|
7402
|
-
var
|
|
7428
|
+
var Bf = { modules: [] }, jf = (e, t) => oo(e, t)?.id;
|
|
7403
7429
|
function Ba(e, t, n, o) {
|
|
7404
|
-
const [i, r] = z(() =>
|
|
7405
|
-
s.current ??= new
|
|
7430
|
+
const [i, r] = z(() => Sf(e.document)), s = V(void 0);
|
|
7431
|
+
s.current ??= new kf(i, r);
|
|
7406
7432
|
const l = U((D) => s.current.commit(D), []), [c, u] = z(), [d, p] = z(), [m, h] = z(n.navigation?.module), g = V(void 0), f = U((D, j) => {
|
|
7407
7433
|
const _ = g.current?.(D), K = g.current?.(j);
|
|
7408
7434
|
return _ && K ? {
|
|
@@ -7411,7 +7437,7 @@ function Ba(e, t, n, o) {
|
|
|
7411
7437
|
} : void 0;
|
|
7412
7438
|
}, []), v = U((D) => {
|
|
7413
7439
|
g.current = D;
|
|
7414
|
-
}, []), w =
|
|
7440
|
+
}, []), w = Lf(n.runtime.icons), P = L(() => ({
|
|
7415
7441
|
catalog: n.runtime.catalog,
|
|
7416
7442
|
scope: $n(t, t !== void 0),
|
|
7417
7443
|
queryCandidates: [...n.queryCandidates],
|
|
@@ -7420,20 +7446,20 @@ function Ba(e, t, n, o) {
|
|
|
7420
7446
|
n,
|
|
7421
7447
|
t,
|
|
7422
7448
|
w
|
|
7423
|
-
]),
|
|
7449
|
+
]), x = L(() => no(i.document, t), [i.document, t]), C = L(() => $f(i.document, x.roots, P), [
|
|
7424
7450
|
i.document,
|
|
7425
|
-
|
|
7451
|
+
x,
|
|
7426
7452
|
P
|
|
7427
|
-
]), k = L(() =>
|
|
7428
|
-
|
|
7453
|
+
]), k = L(() => Ef(C), [C]), y = ht(i.document, t), T = L(() => wf(x.roots, Ff(y), k).filter((D) => D.containerId !== null), [
|
|
7454
|
+
x,
|
|
7429
7455
|
y,
|
|
7430
7456
|
k
|
|
7431
|
-
]), A = c ? We(
|
|
7457
|
+
]), A = c ? We(x.roots, c) : void 0, I = L(() => c ? co(i.document, oe(c), P) : void 0, [
|
|
7432
7458
|
i.document,
|
|
7433
7459
|
c,
|
|
7434
7460
|
P
|
|
7435
7461
|
]), N = U((D, j) => {
|
|
7436
|
-
const _ = s.current.current, K = l((ee) =>
|
|
7462
|
+
const _ = s.current.current, K = l((ee) => Cf(ee, D, P, j));
|
|
7437
7463
|
return {
|
|
7438
7464
|
applied: K.undoable.length > _.undoable.length || K.document !== _.document,
|
|
7439
7465
|
diagnostics: K.diagnostics
|
|
@@ -7441,18 +7467,18 @@ function Ba(e, t, n, o) {
|
|
|
7441
7467
|
}, [l, P]), E = U((D, j) => {
|
|
7442
7468
|
N(D, j);
|
|
7443
7469
|
}, [N]), B = U((D, j) => {
|
|
7444
|
-
const _ = s.current.current, K = l((ee) =>
|
|
7470
|
+
const _ = s.current.current, K = l((ee) => Nf(ee, D, P, j));
|
|
7445
7471
|
return {
|
|
7446
7472
|
applied: K.document !== _.document,
|
|
7447
7473
|
diagnostics: K.diagnostics
|
|
7448
7474
|
};
|
|
7449
7475
|
}, [l, P]), S = U((D, j) => {
|
|
7450
|
-
const _ = D ?? y?.id, K = _ ? We(
|
|
7476
|
+
const _ = D ?? y?.id, K = _ ? We(x.roots, _)?.children ?? [] : [];
|
|
7451
7477
|
return {
|
|
7452
7478
|
parent: _,
|
|
7453
7479
|
index: j ?? K.length
|
|
7454
7480
|
};
|
|
7455
|
-
}, [y,
|
|
7481
|
+
}, [y, x]), F = V(o);
|
|
7456
7482
|
F.current = o;
|
|
7457
7483
|
const $ = U((D, j, _, K, ee, de) => {
|
|
7458
7484
|
const Le = S(j, _);
|
|
@@ -7465,13 +7491,13 @@ function Ba(e, t, n, o) {
|
|
|
7465
7491
|
t,
|
|
7466
7492
|
f
|
|
7467
7493
|
]), q = U((D, j) => {
|
|
7468
|
-
const _ =
|
|
7469
|
-
if (K && !(K === te.NoChange && _ && D.targetParentId ===
|
|
7494
|
+
const _ = bf(x.roots, D, j, f), K = Vi(x.roots, D, k);
|
|
7495
|
+
if (K && !(K === te.NoChange && _ && D.targetParentId === jf(x.roots, D.nodeId))) return K;
|
|
7470
7496
|
if (_) return B(_, "Move").applied ? void 0 : te.NodeLocked;
|
|
7471
|
-
const ee =
|
|
7497
|
+
const ee = gf(D);
|
|
7472
7498
|
return ee ? N(ee, "Move").applied ? void 0 : te.NodeLocked : te.TargetNotContainer;
|
|
7473
7499
|
}, [
|
|
7474
|
-
|
|
7500
|
+
x,
|
|
7475
7501
|
k,
|
|
7476
7502
|
N,
|
|
7477
7503
|
B
|
|
@@ -7518,17 +7544,17 @@ function Ba(e, t, n, o) {
|
|
|
7518
7544
|
dialogTemplates: D
|
|
7519
7545
|
}, j));
|
|
7520
7546
|
}, [l]), Ce = U((D, j, _, K, ee) => {
|
|
7521
|
-
l((de) => Te(de, Hi(de.document, D, (Le) =>
|
|
7547
|
+
l((de) => Te(de, Hi(de.document, D, (Le) => Uf(Le, j, _, K)), ee));
|
|
7522
7548
|
}, [l]), Ne = U((D, j) => {
|
|
7523
7549
|
const _ = n.runtime.bundles.flatMap((K) => K.screenTemplates ?? []);
|
|
7524
|
-
l((K) => Te(K,
|
|
7550
|
+
l((K) => Te(K, mf(K.document, D, _), j));
|
|
7525
7551
|
}, [l, n.runtime.bundles]), R = U((D, j, _) => {
|
|
7526
7552
|
l((K) => Te(K, Hi(K.document, D, (ee) => {
|
|
7527
7553
|
j ? ee.behaviors = j : delete ee.behaviors;
|
|
7528
7554
|
}), _));
|
|
7529
|
-
}, [l]), X = L(() => Ci(i.document), [i.document]), pe = n.navigation?.structure ??
|
|
7555
|
+
}, [l]), X = L(() => Ci(i.document), [i.document]), pe = n.navigation?.structure ?? Bf, H = U((D, j) => {
|
|
7530
7556
|
const _ = Ps(Ci(s.current.current.document), D);
|
|
7531
|
-
return _.applied ? (l((K) => Te(K,
|
|
7557
|
+
return _.applied ? (l((K) => Te(K, Gp(K.document, _.model), j)), { applied: !0 }) : {
|
|
7532
7558
|
applied: !1,
|
|
7533
7559
|
rejected: _.rejected
|
|
7534
7560
|
};
|
|
@@ -7547,7 +7573,7 @@ function Ba(e, t, n, o) {
|
|
|
7547
7573
|
selectedItemId: d && d.componentId === c ? d.itemId : void 0,
|
|
7548
7574
|
selectItem: ie,
|
|
7549
7575
|
document: i.document,
|
|
7550
|
-
composition:
|
|
7576
|
+
composition: x,
|
|
7551
7577
|
context: P,
|
|
7552
7578
|
selectedId: c,
|
|
7553
7579
|
selection: A,
|
|
@@ -7562,15 +7588,15 @@ function Ba(e, t, n, o) {
|
|
|
7562
7588
|
tryApply: N,
|
|
7563
7589
|
applyAll: B,
|
|
7564
7590
|
move: q,
|
|
7565
|
-
validateMove: (D) => Vi(
|
|
7591
|
+
validateMove: (D) => Vi(x.roots, D, k),
|
|
7566
7592
|
insertComponent: (D, j, _, K) => $(aa(Nt(), D, D), j, _, "Add", K, D),
|
|
7567
7593
|
insertLayout: (D, j, _, K) => $(Yt(D, Nt(), D), j, _, "Add layout", K, `layout:${D}`),
|
|
7568
7594
|
remove: (D) => {
|
|
7569
|
-
if (!jn(
|
|
7570
|
-
const j = Ur(
|
|
7571
|
-
N(
|
|
7595
|
+
if (!jn(x.roots, D, k)) return;
|
|
7596
|
+
const j = Ur(x.roots, D, k);
|
|
7597
|
+
N(vf(D), "Remove").applied && u((_) => _ === D || _ === void 0 ? j : _);
|
|
7572
7598
|
},
|
|
7573
|
-
canRemove: (D) => jn(
|
|
7599
|
+
canRemove: (D) => jn(x.roots, D, k),
|
|
7574
7600
|
setProperty: (D, j) => c && E(Gn(c, D, j), "Change"),
|
|
7575
7601
|
setScreenForms: se,
|
|
7576
7602
|
setScreenTemplateOutlets: ce,
|
|
@@ -7583,21 +7609,21 @@ function Ba(e, t, n, o) {
|
|
|
7583
7609
|
l(Of);
|
|
7584
7610
|
},
|
|
7585
7611
|
undo: () => {
|
|
7586
|
-
l(
|
|
7612
|
+
l(Pf);
|
|
7587
7613
|
},
|
|
7588
7614
|
redo: () => {
|
|
7589
|
-
l(
|
|
7615
|
+
l(xf);
|
|
7590
7616
|
},
|
|
7591
|
-
canUndo:
|
|
7592
|
-
canRedo:
|
|
7617
|
+
canUndo: Tf(i),
|
|
7618
|
+
canRedo: If(i),
|
|
7593
7619
|
isDirty: i.isDirty
|
|
7594
7620
|
};
|
|
7595
7621
|
}
|
|
7596
|
-
function
|
|
7622
|
+
function Uf(e, t, n, o) {
|
|
7597
7623
|
const i = e.properties[t];
|
|
7598
|
-
Array.isArray(i) && (e.properties[t] = i.map((r) => ja(r) && r.id === n ?
|
|
7624
|
+
Array.isArray(i) && (e.properties[t] = i.map((r) => ja(r) && r.id === n ? Wf(r, o) : r));
|
|
7599
7625
|
}
|
|
7600
|
-
function
|
|
7626
|
+
function Wf(e, t) {
|
|
7601
7627
|
if (ja(e.values)) {
|
|
7602
7628
|
const o = { ...e.values };
|
|
7603
7629
|
return t ? o.destination = t : delete o.destination, {
|
|
@@ -7614,13 +7640,13 @@ function ja(e) {
|
|
|
7614
7640
|
var Ji = () => ({
|
|
7615
7641
|
width: window.innerWidth - 64,
|
|
7616
7642
|
height: window.innerHeight - 64
|
|
7617
|
-
}),
|
|
7643
|
+
}), dy = (e) => /* @__PURE__ */ a(va, {
|
|
7618
7644
|
strings: e.strings,
|
|
7619
7645
|
onClose: () => e.onDismiss?.(),
|
|
7620
|
-
children: /* @__PURE__ */ a(
|
|
7621
|
-
}),
|
|
7646
|
+
children: /* @__PURE__ */ a(zf, { ...e })
|
|
7647
|
+
}), zf = (e) => {
|
|
7622
7648
|
const t = L(() => fa(e.subject, e.environment.runtime), [e.subject, e.environment.runtime]);
|
|
7623
|
-
return t.opened ? /* @__PURE__ */ a(
|
|
7649
|
+
return t.opened ? /* @__PURE__ */ a(Kf, {
|
|
7624
7650
|
...e,
|
|
7625
7651
|
opened: t.subject
|
|
7626
7652
|
}, e.environment.runtime.id) : /* @__PURE__ */ a(ir, {
|
|
@@ -7634,8 +7660,8 @@ var Ji = () => ({
|
|
|
7634
7660
|
onClose: () => n.close()
|
|
7635
7661
|
})
|
|
7636
7662
|
});
|
|
7637
|
-
},
|
|
7638
|
-
const v = V(void 0), w = Ba(f, e.authoringTemplate, t, ($) => v.current?.($)), P = L(() => u ??
|
|
7663
|
+
}, Kf = ({ subject: e, environment: t, strings: n, layoutLabels: o, icons: i, paletteSources: r, sourceRect: s, initialSize: l, rememberWindowAs: c, windowMemory: u, centerOffsetX: d, renderPaletteHost: p, onClose: m, onBeforeClose: h, onPreview: g, opened: f }) => {
|
|
7664
|
+
const v = V(void 0), w = Ba(f, e.authoringTemplate, t, ($) => v.current?.($)), P = L(() => u ?? jm(), [u]), x = L(() => zm({
|
|
7639
7665
|
remembered: c ? P.read(c) : void 0,
|
|
7640
7666
|
saved: l,
|
|
7641
7667
|
lastUsed: P.readLastUsed()
|
|
@@ -7704,7 +7730,7 @@ var Ji = () => ({
|
|
|
7704
7730
|
v.current = S;
|
|
7705
7731
|
function F($) {
|
|
7706
7732
|
if (!Fo($)) return;
|
|
7707
|
-
const q = w.selection &&
|
|
7733
|
+
const q = w.selection && qf(w) ? w.selectedId : void 0;
|
|
7708
7734
|
$.kind === "layout" ? w.insertLayout($.item, q, void 0) : w.insertComponent(Mo($.componentName, $.package), q, void 0);
|
|
7709
7735
|
}
|
|
7710
7736
|
return /* @__PURE__ */ b(ka, {
|
|
@@ -7714,7 +7740,7 @@ var Ji = () => ({
|
|
|
7714
7740
|
children: B
|
|
7715
7741
|
}), /* @__PURE__ */ a(ir, {
|
|
7716
7742
|
sourceRect: s,
|
|
7717
|
-
initialSize:
|
|
7743
|
+
initialSize: x,
|
|
7718
7744
|
centerOffsetX: d,
|
|
7719
7745
|
canClose: A,
|
|
7720
7746
|
onClosed: k,
|
|
@@ -7753,11 +7779,11 @@ var Ji = () => ({
|
|
|
7753
7779
|
})]
|
|
7754
7780
|
});
|
|
7755
7781
|
};
|
|
7756
|
-
function
|
|
7782
|
+
function qf(e) {
|
|
7757
7783
|
return !!e.selection && "children" in e.selection;
|
|
7758
7784
|
}
|
|
7759
7785
|
var ot = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
|
|
7760
|
-
function
|
|
7786
|
+
function Gf(e, t) {
|
|
7761
7787
|
if (!t) return e;
|
|
7762
7788
|
const n = { ...e };
|
|
7763
7789
|
for (const [o, i] of Object.entries(t)) {
|
|
@@ -7773,118 +7799,118 @@ function qf(e, t) {
|
|
|
7773
7799
|
}
|
|
7774
7800
|
return n;
|
|
7775
7801
|
}
|
|
7776
|
-
var it = "p-anchored-overlay", Bt = "p-collapsible", Rn = "p-overlay-mask",
|
|
7802
|
+
var it = "p-anchored-overlay", Bt = "p-collapsible", Rn = "p-overlay-mask", O = (e, t) => ({ props: t ? {
|
|
7777
7803
|
styles: e,
|
|
7778
7804
|
motionProps: { name: t }
|
|
7779
|
-
} : { styles: e } }), ue = (e) => ({ props: { motionProps: { name: e } } }),
|
|
7780
|
-
"Accordion.Root":
|
|
7781
|
-
"AutoComplete.Root":
|
|
7805
|
+
} : { styles: e } }), ue = (e) => ({ props: { motionProps: { name: e } } }), Hf = {
|
|
7806
|
+
"Accordion.Root": O(yc, Bt),
|
|
7807
|
+
"AutoComplete.Root": O(wc),
|
|
7782
7808
|
"AutoComplete.Popup": ue(it),
|
|
7783
|
-
"Avatar.Root":
|
|
7784
|
-
AvatarGroup:
|
|
7785
|
-
Badge:
|
|
7786
|
-
"Breadcrumb.Root":
|
|
7787
|
-
Button:
|
|
7788
|
-
ButtonGroup:
|
|
7789
|
-
"Card.Root":
|
|
7790
|
-
"Carousel.Root":
|
|
7791
|
-
"Checkbox.Root":
|
|
7792
|
-
CheckboxGroup:
|
|
7793
|
-
"Chip.Root":
|
|
7794
|
-
"Compare.Root":
|
|
7795
|
-
"ContextMenu.Root":
|
|
7809
|
+
"Avatar.Root": O(kc),
|
|
7810
|
+
AvatarGroup: O(Sc),
|
|
7811
|
+
Badge: O(Cc),
|
|
7812
|
+
"Breadcrumb.Root": O(Nc),
|
|
7813
|
+
Button: O(Tc),
|
|
7814
|
+
ButtonGroup: O(Ic),
|
|
7815
|
+
"Card.Root": O(Pc),
|
|
7816
|
+
"Carousel.Root": O(xc),
|
|
7817
|
+
"Checkbox.Root": O(Oc),
|
|
7818
|
+
CheckboxGroup: O(Rc),
|
|
7819
|
+
"Chip.Root": O(Dc),
|
|
7820
|
+
"Compare.Root": O(Ec),
|
|
7821
|
+
"ContextMenu.Root": O(Fc),
|
|
7796
7822
|
"ContextMenu.Popup": ue(it),
|
|
7797
|
-
"DataTable.Root":
|
|
7798
|
-
"DataView.Root":
|
|
7799
|
-
"DatePicker.Root":
|
|
7823
|
+
"DataTable.Root": O(Ac),
|
|
7824
|
+
"DataView.Root": O(Mc),
|
|
7825
|
+
"DatePicker.Root": O(_c),
|
|
7800
7826
|
"DatePicker.Popup": ue(it),
|
|
7801
|
-
"Dialog.Root":
|
|
7827
|
+
"Dialog.Root": O($c),
|
|
7802
7828
|
"Dialog.Backdrop": ue(Rn),
|
|
7803
7829
|
"Dialog.Popup": ue("p-dialog"),
|
|
7804
|
-
Divider:
|
|
7805
|
-
"Drawer.Root":
|
|
7830
|
+
Divider: O(Lc),
|
|
7831
|
+
"Drawer.Root": O(Bc),
|
|
7806
7832
|
"Drawer.Backdrop": ue(Rn),
|
|
7807
7833
|
"Drawer.Popup": ue("p-drawer"),
|
|
7808
|
-
"Fieldset.Root":
|
|
7809
|
-
"FileUpload.Root":
|
|
7810
|
-
FloatLabel:
|
|
7811
|
-
Fluid:
|
|
7812
|
-
"Gallery.Root":
|
|
7813
|
-
"IconField.Root":
|
|
7814
|
-
IftaLabel:
|
|
7815
|
-
"Inplace.Root":
|
|
7816
|
-
"InputColor.Root":
|
|
7817
|
-
"InputGroup.Root":
|
|
7818
|
-
"InputNumber.Root":
|
|
7819
|
-
"InputOtp.Root":
|
|
7820
|
-
InputPassword:
|
|
7821
|
-
"InputTags.Root":
|
|
7822
|
-
InputText:
|
|
7823
|
-
"Knob.Root":
|
|
7824
|
-
Label:
|
|
7825
|
-
"Listbox.Root":
|
|
7826
|
-
"Menu.Root":
|
|
7834
|
+
"Fieldset.Root": O(jc, Bt),
|
|
7835
|
+
"FileUpload.Root": O(Uc),
|
|
7836
|
+
FloatLabel: O(Wc),
|
|
7837
|
+
Fluid: O(zc),
|
|
7838
|
+
"Gallery.Root": O(Kc),
|
|
7839
|
+
"IconField.Root": O(qc),
|
|
7840
|
+
IftaLabel: O(Gc),
|
|
7841
|
+
"Inplace.Root": O(Hc),
|
|
7842
|
+
"InputColor.Root": O(Vc),
|
|
7843
|
+
"InputGroup.Root": O(Jc),
|
|
7844
|
+
"InputNumber.Root": O(Qc),
|
|
7845
|
+
"InputOtp.Root": O(Yc),
|
|
7846
|
+
InputPassword: O(ud),
|
|
7847
|
+
"InputTags.Root": O(Zc),
|
|
7848
|
+
InputText: O(Xc),
|
|
7849
|
+
"Knob.Root": O(ed),
|
|
7850
|
+
Label: O(td),
|
|
7851
|
+
"Listbox.Root": O(nd),
|
|
7852
|
+
"Menu.Root": O(od),
|
|
7827
7853
|
"Menu.Popup": ue(it),
|
|
7828
|
-
"Message.Root":
|
|
7829
|
-
"MeterGroup.Root":
|
|
7830
|
-
NavigationMenu:
|
|
7831
|
-
"OrganizationChart.Root":
|
|
7832
|
-
OverlayBadge:
|
|
7833
|
-
"Paginator.Root":
|
|
7834
|
-
"Panel.Root":
|
|
7835
|
-
"Popover.Root":
|
|
7854
|
+
"Message.Root": O(id),
|
|
7855
|
+
"MeterGroup.Root": O(rd),
|
|
7856
|
+
NavigationMenu: O(ad),
|
|
7857
|
+
"OrganizationChart.Root": O(sd),
|
|
7858
|
+
OverlayBadge: O(ld),
|
|
7859
|
+
"Paginator.Root": O(cd),
|
|
7860
|
+
"Panel.Root": O(dd, Bt),
|
|
7861
|
+
"Popover.Root": O(pd),
|
|
7836
7862
|
"Popover.Popup": ue(it),
|
|
7837
|
-
"ProgressBar.Root":
|
|
7838
|
-
"ProgressSpinner.Root":
|
|
7839
|
-
"RadioButton.Root":
|
|
7840
|
-
RadioButtonGroup:
|
|
7841
|
-
"Rating.Root":
|
|
7842
|
-
"ScrollArea.Root":
|
|
7843
|
-
"Select.Root":
|
|
7863
|
+
"ProgressBar.Root": O(md),
|
|
7864
|
+
"ProgressSpinner.Root": O(hd),
|
|
7865
|
+
"RadioButton.Root": O(fd),
|
|
7866
|
+
RadioButtonGroup: O(gd),
|
|
7867
|
+
"Rating.Root": O(vd),
|
|
7868
|
+
"ScrollArea.Root": O(bd),
|
|
7869
|
+
"Select.Root": O(yd),
|
|
7844
7870
|
"Select.Popup": ue(it),
|
|
7845
|
-
"Sidebar.Root":
|
|
7846
|
-
"Sidebar.Layout":
|
|
7871
|
+
"Sidebar.Root": O(kd),
|
|
7872
|
+
"Sidebar.Layout": O(wd),
|
|
7847
7873
|
"Sidebar.Backdrop": ue(Rn),
|
|
7848
|
-
Skeleton:
|
|
7849
|
-
"Slider.Root":
|
|
7850
|
-
"SpeedDial.Root":
|
|
7851
|
-
"Splitter.Root":
|
|
7852
|
-
"Stepper.Root":
|
|
7853
|
-
"Tabs.Root":
|
|
7854
|
-
Tag:
|
|
7855
|
-
"Terminal.Root":
|
|
7856
|
-
Textarea:
|
|
7857
|
-
"Timeline.Root":
|
|
7858
|
-
"Toast.Root":
|
|
7859
|
-
"Toaster.Root":
|
|
7860
|
-
"ToggleButton.Root":
|
|
7861
|
-
ToggleButtonGroup:
|
|
7862
|
-
"ToggleSwitch.Root":
|
|
7863
|
-
"Toolbar.Root":
|
|
7864
|
-
"Tooltip.Root":
|
|
7874
|
+
Skeleton: O(Sd),
|
|
7875
|
+
"Slider.Root": O(Cd),
|
|
7876
|
+
"SpeedDial.Root": O(Nd),
|
|
7877
|
+
"Splitter.Root": O(Td),
|
|
7878
|
+
"Stepper.Root": O(Id, Bt),
|
|
7879
|
+
"Tabs.Root": O(Pd),
|
|
7880
|
+
Tag: O(xd),
|
|
7881
|
+
"Terminal.Root": O(Od),
|
|
7882
|
+
Textarea: O(Rd),
|
|
7883
|
+
"Timeline.Root": O(Dd),
|
|
7884
|
+
"Toast.Root": O(Ed),
|
|
7885
|
+
"Toaster.Root": O(Fd),
|
|
7886
|
+
"ToggleButton.Root": O(Ad),
|
|
7887
|
+
ToggleButtonGroup: O(Md),
|
|
7888
|
+
"ToggleSwitch.Root": O(_d),
|
|
7889
|
+
"Toolbar.Root": O($d),
|
|
7890
|
+
"Tooltip.Root": O(Ld),
|
|
7865
7891
|
"Tooltip.Popup": ue("p-tooltip"),
|
|
7866
|
-
"Tree.Root":
|
|
7867
|
-
},
|
|
7868
|
-
const o = hl(
|
|
7892
|
+
"Tree.Root": O(Bd)
|
|
7893
|
+
}, Vf = Yo.find((e) => e.name === "lara-light-blue") ?? Yo[0], uy = ({ defaults: e, theme: t, ...n }) => {
|
|
7894
|
+
const o = hl(Vf);
|
|
7869
7895
|
return /* @__PURE__ */ a(bc, {
|
|
7870
7896
|
...n,
|
|
7871
7897
|
theme: t ?? o?.theme,
|
|
7872
|
-
defaults:
|
|
7898
|
+
defaults: Gf(Hf, e)
|
|
7873
7899
|
});
|
|
7874
|
-
},
|
|
7900
|
+
}, py = (e) => /* @__PURE__ */ a(va, {
|
|
7875
7901
|
strings: e.strings,
|
|
7876
7902
|
onClose: e.onDismiss,
|
|
7877
|
-
children: /* @__PURE__ */ a(
|
|
7878
|
-
}),
|
|
7903
|
+
children: /* @__PURE__ */ a(Jf, { ...e })
|
|
7904
|
+
}), Jf = (e) => {
|
|
7879
7905
|
const t = L(() => fa(e.subject, e.environment.runtime), [e.subject, e.environment.runtime]);
|
|
7880
|
-
return t.opened ? /* @__PURE__ */ a(
|
|
7906
|
+
return t.opened ? /* @__PURE__ */ a(Qf, {
|
|
7881
7907
|
...e,
|
|
7882
7908
|
opened: t.subject
|
|
7883
7909
|
}, e.environment.runtime.id) : /* @__PURE__ */ a(ba, {
|
|
7884
7910
|
problem: t.problem,
|
|
7885
7911
|
strings: e.strings
|
|
7886
7912
|
});
|
|
7887
|
-
},
|
|
7913
|
+
}, Qf = ({ subject: e, environment: t, strings: n, layoutLabels: o, icons: i, paletteSources: r, initialSize: s, onChange: l, renderPaletteHost: c, opened: u }) => {
|
|
7888
7914
|
const d = V(void 0), p = Ba(u, e.authoringTemplate, t, (C) => d.current?.(C)), [m, h] = z(s ?? sn[Ge.Desktop]), [g, f] = z(!0), v = V(l);
|
|
7889
7915
|
v.current = l, le(() => {
|
|
7890
7916
|
const C = ht(p.document, e.authoringTemplate);
|
|
@@ -7906,14 +7932,14 @@ var it = "p-anchored-overlay", Bt = "p-collapsible", Rn = "p-overlay-mask", x =
|
|
|
7906
7932
|
if (!Fo(C)) return;
|
|
7907
7933
|
const k = p.selection, y = k && "children" in k ? p.selectedId : void 0;
|
|
7908
7934
|
C.kind === "layout" ? p.insertLayout(C.item, y, void 0) : p.insertComponent(Mo(C.componentName, C.package), y, void 0);
|
|
7909
|
-
}, [p]), { palette: P, recordInserted:
|
|
7935
|
+
}, [p]), { palette: P, recordInserted: x } = ha({
|
|
7910
7936
|
strings: n,
|
|
7911
7937
|
layoutLabels: o,
|
|
7912
7938
|
icons: i,
|
|
7913
7939
|
paletteSources: r,
|
|
7914
7940
|
onAdd: (C) => w(C.payload)
|
|
7915
7941
|
});
|
|
7916
|
-
return d.current =
|
|
7942
|
+
return d.current = x, /* @__PURE__ */ a(ka, {
|
|
7917
7943
|
environment: t,
|
|
7918
7944
|
children: /* @__PURE__ */ b("div", {
|
|
7919
7945
|
className: "studio-screen-editor-workspace",
|
|
@@ -7965,7 +7991,7 @@ var it = "p-anchored-overlay", Bt = "p-collapsible", Rn = "p-overlay-mask", x =
|
|
|
7965
7991
|
})
|
|
7966
7992
|
});
|
|
7967
7993
|
};
|
|
7968
|
-
function
|
|
7994
|
+
function Yf(e) {
|
|
7969
7995
|
const t = {
|
|
7970
7996
|
"row.id": "Guid",
|
|
7971
7997
|
"selection.id": "Guid"
|
|
@@ -7973,26 +7999,26 @@ function Qf(e) {
|
|
|
7973
7999
|
for (const n of e) for (const o of n.parameters) t[`route.${o.name}`] ??= o.type;
|
|
7974
8000
|
return t;
|
|
7975
8001
|
}
|
|
7976
|
-
var
|
|
7977
|
-
function
|
|
7978
|
-
return e.filter((t) =>
|
|
8002
|
+
var Zf = new Set(Object.values(bs)), Xf = new Set(Object.values(vs));
|
|
8003
|
+
function eg(e) {
|
|
8004
|
+
return e.filter((t) => Zf.has(t.resultShape) && t.origin.every((n) => Xf.has(n.kind))).map((t) => t);
|
|
7979
8005
|
}
|
|
7980
|
-
function
|
|
7981
|
-
const t =
|
|
8006
|
+
function my(e) {
|
|
8007
|
+
const t = eg(e.queryCandidates ?? []);
|
|
7982
8008
|
return {
|
|
7983
8009
|
runtime: e.runtime,
|
|
7984
8010
|
queryCandidates: t,
|
|
7985
8011
|
stateChangeSlices: e.stateChangeSlices ?? [],
|
|
7986
8012
|
destinations: e.destinations ?? [],
|
|
7987
|
-
availableSources:
|
|
8013
|
+
availableSources: Yf(t),
|
|
7988
8014
|
...e.richText === !1 ? {} : { richText: e.richText ?? jd },
|
|
7989
8015
|
...e.fileUpload ? { fileUpload: e.fileUpload } : {},
|
|
7990
8016
|
...e.templateScope ? { templateScope: e.templateScope } : {},
|
|
7991
8017
|
...e.navigation ? { navigation: e.navigation } : {}
|
|
7992
8018
|
};
|
|
7993
8019
|
}
|
|
7994
|
-
var
|
|
7995
|
-
function
|
|
8020
|
+
var tg = [.../* @__PURE__ */ new Set([...nn.ids, ...Object.values(Y)])];
|
|
8021
|
+
function ng(e, t) {
|
|
7996
8022
|
return cl({
|
|
7997
8023
|
bundles: e,
|
|
7998
8024
|
profile: t,
|
|
@@ -8001,23 +8027,23 @@ function tg(e, t) {
|
|
|
8001
8027
|
allowNetworkAssets: !1,
|
|
8002
8028
|
loadDesignTime: !0
|
|
8003
8029
|
}
|
|
8004
|
-
}, { hostEditorKinds: [...
|
|
8030
|
+
}, { hostEditorKinds: [...tg] });
|
|
8005
8031
|
}
|
|
8006
|
-
function
|
|
8032
|
+
function og(e) {
|
|
8007
8033
|
return e.flatMap((t) => t.iconLibrary ? [t.iconLibrary.catalog] : []);
|
|
8008
8034
|
}
|
|
8009
|
-
function
|
|
8035
|
+
function ig(e, t) {
|
|
8010
8036
|
const n = js(e, t.map((o) => o.manifest));
|
|
8011
|
-
return new Cs(n,
|
|
8037
|
+
return new Cs(n, og(t));
|
|
8012
8038
|
}
|
|
8013
|
-
function
|
|
8039
|
+
function rg(e) {
|
|
8014
8040
|
const t = tl([e]), n = t.packages.filter((o) => o !== "PrimeReact");
|
|
8015
8041
|
return n.splice(Math.max(n.indexOf(gr), 0), 0, "PrimeReact"), {
|
|
8016
8042
|
...t,
|
|
8017
8043
|
packages: n
|
|
8018
8044
|
};
|
|
8019
8045
|
}
|
|
8020
|
-
var
|
|
8046
|
+
var ag = [
|
|
8021
8047
|
"PrimeReact.Accordion",
|
|
8022
8048
|
"PrimeReact.AutoComplete",
|
|
8023
8049
|
"PrimeReact.Avatar",
|
|
@@ -8120,7 +8146,7 @@ var rg = [
|
|
|
8120
8146
|
"itemsControl",
|
|
8121
8147
|
"stackPanel",
|
|
8122
8148
|
"wrapPanel"
|
|
8123
|
-
],
|
|
8149
|
+
], sg = ["PrimeReact.Dialog"], lg = new Set(ag.filter((e) => !sg.includes(e))), cg = [
|
|
8124
8150
|
{
|
|
8125
8151
|
value: fe.None,
|
|
8126
8152
|
label: "Run directly"
|
|
@@ -8134,7 +8160,7 @@ var rg = [
|
|
|
8134
8160
|
label: "Ask in a drawer"
|
|
8135
8161
|
}
|
|
8136
8162
|
];
|
|
8137
|
-
function
|
|
8163
|
+
function dg(e) {
|
|
8138
8164
|
return !e.component.endsWith(":action") || e.properties.some((t) => t.path === "presentation") ? e : {
|
|
8139
8165
|
...e,
|
|
8140
8166
|
properties: [...e.properties, {
|
|
@@ -8143,13 +8169,13 @@ function cg(e) {
|
|
|
8143
8169
|
group: "Behavior",
|
|
8144
8170
|
valueType: G.Enum,
|
|
8145
8171
|
default: fe.None,
|
|
8146
|
-
choices:
|
|
8172
|
+
choices: cg,
|
|
8147
8173
|
description: "Whether the command runs straight away or first asks for its input in a dialog or a drawer."
|
|
8148
8174
|
}]
|
|
8149
8175
|
};
|
|
8150
8176
|
}
|
|
8151
|
-
var
|
|
8152
|
-
function Wo(e, t, n =
|
|
8177
|
+
var ug = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase()), pg = (e) => /ies$/i.test(e) ? `${e.slice(0, -3)}y` : /(ss|us)$/i.test(e) || !/s$/i.test(e) ? e : e.slice(0, -1), Ua = (e) => e !== null && typeof e == "object" && !Array.isArray(e);
|
|
8178
|
+
function Wo(e, t, n = ug(e)) {
|
|
8153
8179
|
const o = {
|
|
8154
8180
|
path: e,
|
|
8155
8181
|
label: n,
|
|
@@ -8161,7 +8187,7 @@ function Wo(e, t, n = dg(e)) {
|
|
|
8161
8187
|
} : typeof t == "boolean" ? {
|
|
8162
8188
|
...o,
|
|
8163
8189
|
valueType: G.Boolean
|
|
8164
|
-
} : Array.isArray(t) ?
|
|
8190
|
+
} : Array.isArray(t) ? hg(o, t) : Ua(t) ? {
|
|
8165
8191
|
...o,
|
|
8166
8192
|
valueType: G.Object,
|
|
8167
8193
|
properties: Wa(t),
|
|
@@ -8172,12 +8198,12 @@ function Wo(e, t, n = dg(e)) {
|
|
|
8172
8198
|
};
|
|
8173
8199
|
}
|
|
8174
8200
|
function Wa(e, t = []) {
|
|
8175
|
-
return Object.entries(e).filter(([n]) => !t.includes(n)).map(([n, o]) =>
|
|
8201
|
+
return Object.entries(e).filter(([n]) => !t.includes(n)).map(([n, o]) => mg(n, o));
|
|
8176
8202
|
}
|
|
8177
|
-
function
|
|
8203
|
+
function mg(e, t) {
|
|
8178
8204
|
return Wo(e, t);
|
|
8179
8205
|
}
|
|
8180
|
-
function
|
|
8206
|
+
function hg(e, t) {
|
|
8181
8207
|
if (t.length > 0 && t.every((o) => typeof o == "string")) return {
|
|
8182
8208
|
...e,
|
|
8183
8209
|
valueType: G.Json,
|
|
@@ -8194,17 +8220,17 @@ function mg(e, t) {
|
|
|
8194
8220
|
...e,
|
|
8195
8221
|
valueType: G.Collection,
|
|
8196
8222
|
item: {
|
|
8197
|
-
label:
|
|
8223
|
+
label: pg(e.label),
|
|
8198
8224
|
properties: Wa(n, ["id"]),
|
|
8199
8225
|
open: !0
|
|
8200
8226
|
}
|
|
8201
8227
|
};
|
|
8202
8228
|
}
|
|
8203
|
-
var
|
|
8204
|
-
function
|
|
8229
|
+
var fg = (e) => e.valueType === G.Json && e.editorKind === void 0;
|
|
8230
|
+
function gg(e) {
|
|
8205
8231
|
const t = Uo(e.component, e.component.slice(e.component.lastIndexOf(":") + 1));
|
|
8206
8232
|
if (!t) return e;
|
|
8207
|
-
const n = new Set(e.properties.map((r) => r.path)), o = e.properties.map((r) =>
|
|
8233
|
+
const n = new Set(e.properties.map((r) => r.path)), o = e.properties.map((r) => fg(r) && r.path in t ? vg(r, t[r.path]) : r), i = Object.entries(t).filter(([r]) => !n.has(r)).map(([r, s]) => ({
|
|
8208
8234
|
...Wo(r, s),
|
|
8209
8235
|
description: "Shown as sample content on the design surface until you set it."
|
|
8210
8236
|
}));
|
|
@@ -8213,7 +8239,7 @@ function fg(e) {
|
|
|
8213
8239
|
properties: [...o, ...i]
|
|
8214
8240
|
} : e;
|
|
8215
8241
|
}
|
|
8216
|
-
function
|
|
8242
|
+
function vg(e, t) {
|
|
8217
8243
|
const { editorKind: n, item: o, properties: i, choices: r, ...s } = e, l = Wo(e.path, t);
|
|
8218
8244
|
return {
|
|
8219
8245
|
...l,
|
|
@@ -8221,7 +8247,7 @@ function gg(e, t) {
|
|
|
8221
8247
|
valueType: l.valueType
|
|
8222
8248
|
};
|
|
8223
8249
|
}
|
|
8224
|
-
var Qi = "Placement",
|
|
8250
|
+
var Qi = "Placement", bg = [{
|
|
8225
8251
|
path: Ve,
|
|
8226
8252
|
label: "Left",
|
|
8227
8253
|
group: Qi,
|
|
@@ -8232,33 +8258,33 @@ var Qi = "Placement", vg = [{
|
|
|
8232
8258
|
group: Qi,
|
|
8233
8259
|
valueType: G.Number
|
|
8234
8260
|
}];
|
|
8235
|
-
function
|
|
8261
|
+
function yg(e) {
|
|
8236
8262
|
const t = new Set(e.properties.map((n) => n.path));
|
|
8237
8263
|
return {
|
|
8238
8264
|
...e,
|
|
8239
|
-
properties: [...e.properties, ...
|
|
8265
|
+
properties: [...e.properties, ...bg.filter((n) => !t.has(n.path))]
|
|
8240
8266
|
};
|
|
8241
8267
|
}
|
|
8242
|
-
var Yi = "PrimeReact",
|
|
8243
|
-
function
|
|
8268
|
+
var Yi = "PrimeReact", wg = 1;
|
|
8269
|
+
function kg(e, t, n) {
|
|
8244
8270
|
const o = en(e.map((p) => p.manifest)), i = e.flatMap((p) => p.descriptors ?? []), r = new Set(i.map((p) => p.component)), s = e.flatMap((p) => p.manifest.components.map((m) => ({
|
|
8245
8271
|
component: En(p.manifest.name, m),
|
|
8246
8272
|
displayName: m,
|
|
8247
8273
|
properties: []
|
|
8248
|
-
}))).filter((p) => !r.has(p.component)), l = [...i, ...s].map(
|
|
8274
|
+
}))).filter((p) => !r.has(p.component)), l = [...i, ...s].map(dg).map(gg).map(yg), c = [...l, ...Sg(l, o, t)], u = new Set(Object.values(o).flat()), d = new Map(l.map((p) => [p.component, p]));
|
|
8249
8275
|
return {
|
|
8250
|
-
id:
|
|
8276
|
+
id: wg++,
|
|
8251
8277
|
bundles: e,
|
|
8252
8278
|
registry: kr(e),
|
|
8253
8279
|
packages: o,
|
|
8254
8280
|
descriptors: c,
|
|
8255
8281
|
catalog: Ds(c),
|
|
8256
8282
|
profile: t,
|
|
8257
|
-
compositionProfile:
|
|
8283
|
+
compositionProfile: rg(t),
|
|
8258
8284
|
...n ? { appearance: n } : {},
|
|
8259
|
-
icons:
|
|
8285
|
+
icons: ig(t.packages, e),
|
|
8260
8286
|
iconAdapters: ll(e),
|
|
8261
|
-
designTime:
|
|
8287
|
+
designTime: ng(e, t),
|
|
8262
8288
|
packageDescriptorOf: (p) => {
|
|
8263
8289
|
if (p.component.includes(":")) return p;
|
|
8264
8290
|
const m = Tt(p.component, t, o);
|
|
@@ -8266,12 +8292,12 @@ function wg(e, t, n) {
|
|
|
8266
8292
|
},
|
|
8267
8293
|
isKnownComponent: (p) => u.has(p),
|
|
8268
8294
|
legacyTypeOf: (p) => {
|
|
8269
|
-
const m =
|
|
8270
|
-
return h !== void 0 &&
|
|
8295
|
+
const m = _m(p, t, o), h = m?.package === Yi ? `${Yi}.${$r(m.name)}` : void 0;
|
|
8296
|
+
return h !== void 0 && lg.has(h) ? h : void 0;
|
|
8271
8297
|
}
|
|
8272
8298
|
};
|
|
8273
8299
|
}
|
|
8274
|
-
function
|
|
8300
|
+
function Sg(e, t, n) {
|
|
8275
8301
|
const o = [];
|
|
8276
8302
|
for (const i of new Set(Object.values(t).flat())) {
|
|
8277
8303
|
const r = Tt(i, n, t), s = r && e.find((l) => l.component === En(r.package, r.name));
|
|
@@ -8282,7 +8308,7 @@ function kg(e, t, n) {
|
|
|
8282
8308
|
}
|
|
8283
8309
|
return o;
|
|
8284
8310
|
}
|
|
8285
|
-
var zo = "Cratis.Icons.Lucide",
|
|
8311
|
+
var zo = "Cratis.Icons.Lucide", Cg = {
|
|
8286
8312
|
name: zo,
|
|
8287
8313
|
version: "1.52.0",
|
|
8288
8314
|
kind: dt.IconLibrary,
|
|
@@ -8304,20 +8330,20 @@ var zo = "Cratis.Icons.Lucide", Sg = {
|
|
|
8304
8330
|
attributionUrl: "https://lucide.dev",
|
|
8305
8331
|
iconCount: 1858
|
|
8306
8332
|
}
|
|
8307
|
-
},
|
|
8333
|
+
}, Ng = {
|
|
8308
8334
|
library: zo,
|
|
8309
8335
|
loadEntries: async () => (await import("./catalog-CZx3FR-E.js")).default
|
|
8310
|
-
},
|
|
8336
|
+
}, Tg = Kd, Ig = {
|
|
8311
8337
|
library: zo,
|
|
8312
|
-
loadGlyph: async ({ key: e }) => (await
|
|
8313
|
-
},
|
|
8314
|
-
manifest:
|
|
8338
|
+
loadGlyph: async ({ key: e }) => (await Tg[e]?.())?.default
|
|
8339
|
+
}, Pg = {
|
|
8340
|
+
manifest: Cg,
|
|
8315
8341
|
components: {},
|
|
8316
8342
|
iconLibrary: {
|
|
8317
|
-
catalog:
|
|
8318
|
-
adapter:
|
|
8343
|
+
catalog: Ng,
|
|
8344
|
+
adapter: Ig
|
|
8319
8345
|
}
|
|
8320
|
-
},
|
|
8346
|
+
}, xg = [
|
|
8321
8347
|
Ud,
|
|
8322
8348
|
Wd,
|
|
8323
8349
|
zd
|
|
@@ -8328,11 +8354,11 @@ var zo = "Cratis.Icons.Lucide", Sg = {
|
|
|
8328
8354
|
Fr,
|
|
8329
8355
|
fr,
|
|
8330
8356
|
Mr,
|
|
8331
|
-
...
|
|
8332
|
-
|
|
8333
|
-
], Og = Pt.map((e) => e.manifest),
|
|
8334
|
-
function
|
|
8335
|
-
const t =
|
|
8357
|
+
...xg,
|
|
8358
|
+
Pg
|
|
8359
|
+
], Og = Pt.map((e) => e.manifest), hy = kr(Pt), fy = en(Og), gy = Pt.flatMap((e) => e.themes ?? []);
|
|
8360
|
+
function Rg(e) {
|
|
8361
|
+
const t = xs(e).map((i) => i.name), n = Qo(e, dt.Styling).map((i) => i.name), o = Qo(e, dt.Blueprint)[0];
|
|
8336
8362
|
return o ? [
|
|
8337
8363
|
...t,
|
|
8338
8364
|
...n,
|
|
@@ -8344,16 +8370,16 @@ var za = (e) => e === void 0 || e.activePack === "" && e.mappings.length === 0 ?
|
|
|
8344
8370
|
mappings: e.mappings.map((t) => ({ ...t })),
|
|
8345
8371
|
bindings: []
|
|
8346
8372
|
};
|
|
8347
|
-
function
|
|
8373
|
+
function Dg(e, t) {
|
|
8348
8374
|
return t.filter((n) => Ms(n, e));
|
|
8349
8375
|
}
|
|
8350
|
-
function
|
|
8376
|
+
function Eg(e, t) {
|
|
8351
8377
|
return [...new Set(Object.values(t).flat())].map((n) => Tt(n, e, t)).filter((n) => n !== void 0 && n.shadows.length > 0).sort((n, o) => n.name.localeCompare(o.name));
|
|
8352
8378
|
}
|
|
8353
8379
|
var Dn = /* @__PURE__ */ (function(e) {
|
|
8354
8380
|
return e.Fallback = "fallback", e.Explicit = "explicit", e.Automatic = "automatic", e;
|
|
8355
8381
|
})({});
|
|
8356
|
-
function
|
|
8382
|
+
function Fg(e) {
|
|
8357
8383
|
const t = [
|
|
8358
8384
|
so,
|
|
8359
8385
|
...e.packages,
|
|
@@ -8363,17 +8389,17 @@ function Eg(e) {
|
|
|
8363
8389
|
];
|
|
8364
8390
|
return [...new Set(t.filter((n) => n.length > 0))];
|
|
8365
8391
|
}
|
|
8366
|
-
function
|
|
8392
|
+
function Ag(e, t) {
|
|
8367
8393
|
return e.find((n) => n.manifest.name === t)?.manifest.layouts[0] ?? "";
|
|
8368
8394
|
}
|
|
8369
|
-
function
|
|
8395
|
+
function Mg(e, t) {
|
|
8370
8396
|
const n = e.root?.template;
|
|
8371
8397
|
if (!(n?.source !== ws.Blueprint || n.blueprint === void 0))
|
|
8372
8398
|
return t.find((o) => o.manifest.name === n.blueprint)?.manifest.layouts.includes(n.id) ? n.id : void 0;
|
|
8373
8399
|
}
|
|
8374
8400
|
var Ka = "UI Profile";
|
|
8375
8401
|
function qa(e, t) {
|
|
8376
|
-
const n = t.map((c) => c.manifest), o =
|
|
8402
|
+
const n = t.map((c) => c.manifest), o = Fg(e), i = Us(o, n), r = Mg(e, t) ?? Ag(t, e.shell), s = {
|
|
8377
8403
|
name: Ka,
|
|
8378
8404
|
targetPlatform: "web",
|
|
8379
8405
|
packages: i.packages,
|
|
@@ -8381,7 +8407,7 @@ function qa(e, t) {
|
|
|
8381
8407
|
...e.root ? { root: e.root } : {},
|
|
8382
8408
|
theme: e.theme.length > 0 ? e.theme : void 0,
|
|
8383
8409
|
sampleData: za(e.sampleData),
|
|
8384
|
-
appearance:
|
|
8410
|
+
appearance: _g(e),
|
|
8385
8411
|
...e.identity === void 0 ? {} : { identity: e.identity }
|
|
8386
8412
|
}, l = new Set(o);
|
|
8387
8413
|
return {
|
|
@@ -8399,13 +8425,13 @@ function qa(e, t) {
|
|
|
8399
8425
|
requiredBy: n.filter((d) => i.packages.includes(d.name) && d.dependencies.some((p) => p.name === c)).map((d) => d.name)
|
|
8400
8426
|
}] : [];
|
|
8401
8427
|
}),
|
|
8402
|
-
collisions:
|
|
8403
|
-
compatibleThemes:
|
|
8428
|
+
collisions: Eg(s, en(n)),
|
|
8429
|
+
compatibleThemes: Dg(s, t.flatMap((c) => c.themes ?? [])),
|
|
8404
8430
|
layout: r,
|
|
8405
8431
|
isValid: As(i)
|
|
8406
8432
|
};
|
|
8407
8433
|
}
|
|
8408
|
-
function
|
|
8434
|
+
function _g(e) {
|
|
8409
8435
|
const t = {
|
|
8410
8436
|
...e.colorScheme === "dark" ? { colorScheme: ps.Dark } : {},
|
|
8411
8437
|
...e.accent.length > 0 ? { accent: e.accent } : {},
|
|
@@ -8414,8 +8440,8 @@ function Mg(e) {
|
|
|
8414
8440
|
};
|
|
8415
8441
|
return Object.keys(t).length === 0 ? void 0 : t;
|
|
8416
8442
|
}
|
|
8417
|
-
function
|
|
8418
|
-
const t = e.map((s) => s.manifest), n =
|
|
8443
|
+
function $g(e) {
|
|
8444
|
+
const t = e.map((s) => s.manifest), n = Rg(t), o = n.find((s) => t.find((l) => l.name === s)?.kind === dt.Blueprint) ?? "", i = {
|
|
8419
8445
|
packages: n.filter((s) => s !== o && s !== so),
|
|
8420
8446
|
shell: o,
|
|
8421
8447
|
templatePacks: [],
|
|
@@ -8430,7 +8456,7 @@ function _g(e) {
|
|
|
8430
8456
|
theme: r?.name ?? ""
|
|
8431
8457
|
};
|
|
8432
8458
|
}
|
|
8433
|
-
function
|
|
8459
|
+
function Lg(e, t) {
|
|
8434
8460
|
return {
|
|
8435
8461
|
name: Ka,
|
|
8436
8462
|
targetPlatform: "web",
|
|
@@ -8440,11 +8466,11 @@ function $g(e, t) {
|
|
|
8440
8466
|
sampleData: za(t)
|
|
8441
8467
|
};
|
|
8442
8468
|
}
|
|
8443
|
-
function
|
|
8444
|
-
const i = e ?
|
|
8445
|
-
return
|
|
8469
|
+
function vy(e, t = Pt, n, o) {
|
|
8470
|
+
const i = e ? Lg(e, o) : qa($g(t), t).profile;
|
|
8471
|
+
return kg(t, i, n);
|
|
8446
8472
|
}
|
|
8447
|
-
function
|
|
8473
|
+
function Bg(e, t) {
|
|
8448
8474
|
const n = no(e), o = mo(e, {
|
|
8449
8475
|
kind: Vt.Screen,
|
|
8450
8476
|
name: ge
|
|
@@ -8454,8 +8480,8 @@ function Lg(e, t) {
|
|
|
8454
8480
|
configuration: i
|
|
8455
8481
|
};
|
|
8456
8482
|
}
|
|
8457
|
-
var
|
|
8458
|
-
const { element: i, configuration: r } = L(() =>
|
|
8483
|
+
var jg = ({ document: e, runtime: t, resolveBinding: n, registry: o = t.registry }) => {
|
|
8484
|
+
const { element: i, configuration: r } = L(() => Bg(e, t.catalog), [e, t.catalog]), s = L(() => go(i, t.compositionProfile, t.packages), [
|
|
8459
8485
|
i,
|
|
8460
8486
|
t.compositionProfile,
|
|
8461
8487
|
t.packages
|
|
@@ -8476,12 +8502,12 @@ var Bg = ({ document: e, runtime: t, resolveBinding: n, registry: o = t.registry
|
|
|
8476
8502
|
})
|
|
8477
8503
|
})
|
|
8478
8504
|
});
|
|
8479
|
-
},
|
|
8505
|
+
}, Ug = (e) => {
|
|
8480
8506
|
const t = vt(e);
|
|
8481
8507
|
return Ta.has(t) || t in Ca;
|
|
8482
|
-
},
|
|
8508
|
+
}, Wg = (e, t) => {
|
|
8483
8509
|
const n = (o) => {
|
|
8484
|
-
const i =
|
|
8510
|
+
const i = Ug(o.element.componentName), r = L(() => ({
|
|
8485
8511
|
...o.element,
|
|
8486
8512
|
properties: Ia(e, o.element.componentName, o.element.properties)
|
|
8487
8513
|
}), [o.element]);
|
|
@@ -8495,11 +8521,11 @@ var Bg = ({ document: e, runtime: t, resolveBinding: n, registry: o = t.registry
|
|
|
8495
8521
|
};
|
|
8496
8522
|
return n.displayName = `Miniature(${t.displayName ?? t.name ?? "Component"})`, n;
|
|
8497
8523
|
};
|
|
8498
|
-
function
|
|
8499
|
-
return Object.fromEntries(Object.entries(e).map(([t, n]) => [t,
|
|
8524
|
+
function zg(e) {
|
|
8525
|
+
return Object.fromEntries(Object.entries(e).map(([t, n]) => [t, Wg(t, n)]));
|
|
8500
8526
|
}
|
|
8501
|
-
var
|
|
8502
|
-
function
|
|
8527
|
+
var by = 240, yy = 112;
|
|
8528
|
+
function Kg(e, t = 240, n = Number.POSITIVE_INFINITY) {
|
|
8503
8529
|
const o = e && e.width > 0 && e.height > 0 ? e : wa({
|
|
8504
8530
|
width: 1 / 0,
|
|
8505
8531
|
height: 1 / 0
|
|
@@ -8512,7 +8538,7 @@ function zg(e, t = 240, n = Number.POSITIVE_INFINITY) {
|
|
|
8512
8538
|
scale: s
|
|
8513
8539
|
};
|
|
8514
8540
|
}
|
|
8515
|
-
function
|
|
8541
|
+
function qg(e, t = 240) {
|
|
8516
8542
|
const n = typeof IntersectionObserver < "u", [o, i] = z(!n);
|
|
8517
8543
|
return le(() => {
|
|
8518
8544
|
const r = e.current;
|
|
@@ -8525,23 +8551,23 @@ function Kg(e, t = 240) {
|
|
|
8525
8551
|
n
|
|
8526
8552
|
]), o;
|
|
8527
8553
|
}
|
|
8528
|
-
var
|
|
8554
|
+
var Gg = [
|
|
8529
8555
|
"#f66",
|
|
8530
8556
|
"#fa0",
|
|
8531
8557
|
"#3c3"
|
|
8532
|
-
],
|
|
8533
|
-
}, Zi = 16,
|
|
8534
|
-
const c = V(null), u =
|
|
8558
|
+
], Hg = () => {
|
|
8559
|
+
}, Zi = 16, wy = ({ document: e, runtime: t, windowSize: n, width: o, title: i, openTitle: r, onClick: s, placeholder: l }) => {
|
|
8560
|
+
const c = V(null), u = qg(c), d = L(() => Kg(n, o ?? 240, o === void 0 ? 112 : void 0), [
|
|
8535
8561
|
n?.width,
|
|
8536
8562
|
n?.height,
|
|
8537
8563
|
o
|
|
8538
|
-
]), p = L(() => jo(t), [t]), m = L(() =>
|
|
8564
|
+
]), p = L(() => jo(t), [t]), m = L(() => zg(t.registry), [t.registry]), h = {
|
|
8539
8565
|
width: d.width,
|
|
8540
8566
|
height: Zi + d.bodyHeight
|
|
8541
8567
|
}, g = /* @__PURE__ */ b(ae, { children: [/* @__PURE__ */ b("div", {
|
|
8542
8568
|
className: "screen-thumbnail__title-bar",
|
|
8543
8569
|
style: { height: Zi },
|
|
8544
|
-
children: [
|
|
8570
|
+
children: [Gg.map((v) => /* @__PURE__ */ a("span", {
|
|
8545
8571
|
className: "screen-thumbnail__light",
|
|
8546
8572
|
style: { borderColor: v }
|
|
8547
8573
|
}, v)), i && /* @__PURE__ */ a("span", {
|
|
@@ -8561,10 +8587,10 @@ var qg = [
|
|
|
8561
8587
|
"--studio-surface-viewport-height": `${d.canvasHeight}px`
|
|
8562
8588
|
},
|
|
8563
8589
|
"data-studio-viewport": "",
|
|
8564
|
-
children: /* @__PURE__ */ a(
|
|
8590
|
+
children: /* @__PURE__ */ a(jg, {
|
|
8565
8591
|
document: e,
|
|
8566
8592
|
runtime: t,
|
|
8567
|
-
resolveBinding:
|
|
8593
|
+
resolveBinding: Hg,
|
|
8568
8594
|
registry: m
|
|
8569
8595
|
})
|
|
8570
8596
|
}) : l
|
|
@@ -8590,32 +8616,32 @@ var qg = [
|
|
|
8590
8616
|
"aria-label": i,
|
|
8591
8617
|
children: g
|
|
8592
8618
|
});
|
|
8593
|
-
}, rt = /* @__PURE__ */ new Map(),
|
|
8594
|
-
function
|
|
8619
|
+
}, rt = /* @__PURE__ */ new Map(), Vg = 200;
|
|
8620
|
+
function ky(e) {
|
|
8595
8621
|
if (!e) return;
|
|
8596
8622
|
if (rt.has(e)) return rt.get(e);
|
|
8597
8623
|
const t = Xr(e), n = t.readable ? t.document : void 0;
|
|
8598
|
-
return rt.size >=
|
|
8624
|
+
return rt.size >= Vg && rt.delete(rt.keys().next().value), rt.set(e, n), n;
|
|
8599
8625
|
}
|
|
8600
|
-
var
|
|
8626
|
+
var Sy = {
|
|
8601
8627
|
[W.Stack]: "Stack",
|
|
8602
8628
|
[W.Row]: "Row",
|
|
8603
8629
|
[W.Grid]: "Grid",
|
|
8604
8630
|
[W.Container]: "Container",
|
|
8605
8631
|
[W.Wrap]: "Wrap",
|
|
8606
8632
|
[W.Canvas]: "Canvas"
|
|
8607
|
-
},
|
|
8633
|
+
}, Jg = {
|
|
8608
8634
|
[W.Stack]: st,
|
|
8609
8635
|
[W.Row]: El,
|
|
8610
8636
|
[W.Grid]: Rr,
|
|
8611
8637
|
[W.Container]: bo,
|
|
8612
8638
|
[W.Wrap]: yo,
|
|
8613
8639
|
[W.Canvas]: sc
|
|
8614
|
-
},
|
|
8640
|
+
}, Qg = {
|
|
8615
8641
|
text: fl,
|
|
8616
8642
|
button: Wt,
|
|
8617
8643
|
card: Il,
|
|
8618
|
-
data:
|
|
8644
|
+
data: xl,
|
|
8619
8645
|
action: bl,
|
|
8620
8646
|
section: Wl,
|
|
8621
8647
|
navigate: Tl,
|
|
@@ -8645,13 +8671,13 @@ var ky = {
|
|
|
8645
8671
|
knob: ql,
|
|
8646
8672
|
calendar: Xo,
|
|
8647
8673
|
colorPicker: vn,
|
|
8648
|
-
chips:
|
|
8674
|
+
chips: Ot,
|
|
8649
8675
|
autoComplete: ci,
|
|
8650
8676
|
treeSelect: _n,
|
|
8651
8677
|
editor: mn,
|
|
8652
8678
|
fileUpload: Dl,
|
|
8653
8679
|
splitButton: un,
|
|
8654
|
-
speedDial:
|
|
8680
|
+
speedDial: Ol,
|
|
8655
8681
|
buttonGroup: Be,
|
|
8656
8682
|
dataTable: pt,
|
|
8657
8683
|
dataView: ui,
|
|
@@ -8696,8 +8722,8 @@ var ky = {
|
|
|
8696
8722
|
carousel: si,
|
|
8697
8723
|
avatar: ac,
|
|
8698
8724
|
badge: yl,
|
|
8699
|
-
chip:
|
|
8700
|
-
tag:
|
|
8725
|
+
chip: Ot,
|
|
8726
|
+
tag: Ot,
|
|
8701
8727
|
progressBar: Ml,
|
|
8702
8728
|
progressSpinner: di,
|
|
8703
8729
|
skeleton: Yl,
|
|
@@ -8721,14 +8747,14 @@ var ky = {
|
|
|
8721
8747
|
calendarField: Xo,
|
|
8722
8748
|
colorPickerField: vn,
|
|
8723
8749
|
multiSelectField: gn,
|
|
8724
|
-
chipsField:
|
|
8750
|
+
chipsField: Ot,
|
|
8725
8751
|
radioButtonField: bn,
|
|
8726
8752
|
radioGroupField: bn,
|
|
8727
8753
|
confirmationDialog: hn,
|
|
8728
8754
|
busyIndicatorDialog: di,
|
|
8729
8755
|
commandDialog: mt,
|
|
8730
8756
|
stepperCommandDialog: wn,
|
|
8731
|
-
icon:
|
|
8757
|
+
icon: Or,
|
|
8732
8758
|
errorBoundary: hn,
|
|
8733
8759
|
objectContentEditor: mn,
|
|
8734
8760
|
objectNavigationalBar: yn,
|
|
@@ -8752,7 +8778,7 @@ var ky = {
|
|
|
8752
8778
|
themeSwitcher: vn,
|
|
8753
8779
|
layoutModeSwitcher: Fn,
|
|
8754
8780
|
arcPageHeader: Ut
|
|
8755
|
-
},
|
|
8781
|
+
}, Yg = [
|
|
8756
8782
|
[/dialog/i, mt],
|
|
8757
8783
|
[/table|grid/i, pt],
|
|
8758
8784
|
[/menu|bar$/i, st],
|
|
@@ -8765,35 +8791,35 @@ var ky = {
|
|
|
8765
8791
|
[/message|toast/i, Nr],
|
|
8766
8792
|
[/tree/i, _n],
|
|
8767
8793
|
[/page|screen/i, An]
|
|
8768
|
-
],
|
|
8769
|
-
[wr.manifest.name]:
|
|
8794
|
+
], Zg = (e) => Qg[e] ?? Yg.find(([t]) => t.test(e))?.[1] ?? xr, Xg = {
|
|
8795
|
+
[wr.manifest.name]: Or,
|
|
8770
8796
|
[Sr.manifest.name]: Dr,
|
|
8771
|
-
[Fr.manifest.name]:
|
|
8797
|
+
[Fr.manifest.name]: xr,
|
|
8772
8798
|
[fr.manifest.name]: yo,
|
|
8773
8799
|
[Mr.manifest.name]: Ut,
|
|
8774
8800
|
[Ar.manifest.name]: zl
|
|
8775
|
-
},
|
|
8801
|
+
}, ev = Pl, Cy = {
|
|
8776
8802
|
layout: (e) => {
|
|
8777
|
-
const t =
|
|
8803
|
+
const t = Jg[e];
|
|
8778
8804
|
return /* @__PURE__ */ a(t, { "aria-hidden": "true" });
|
|
8779
8805
|
},
|
|
8780
8806
|
component: (e) => {
|
|
8781
|
-
const t =
|
|
8807
|
+
const t = Zg(e);
|
|
8782
8808
|
return /* @__PURE__ */ a(t, { "aria-hidden": "true" });
|
|
8783
8809
|
},
|
|
8784
8810
|
drawer: {
|
|
8785
8811
|
layout: /* @__PURE__ */ a(Rr, { "aria-hidden": "true" }),
|
|
8786
8812
|
package: (e) => {
|
|
8787
|
-
const t =
|
|
8813
|
+
const t = Xg[e] ?? ev;
|
|
8788
8814
|
return /* @__PURE__ */ a(t, { "aria-hidden": "true" });
|
|
8789
8815
|
}
|
|
8790
8816
|
}
|
|
8791
|
-
},
|
|
8817
|
+
}, Ny = Pt.map((e) => ({
|
|
8792
8818
|
package: e.manifest.name,
|
|
8793
8819
|
components: e.manifest.components,
|
|
8794
8820
|
descriptors: e.descriptors ?? []
|
|
8795
8821
|
}));
|
|
8796
|
-
function
|
|
8822
|
+
function Ty(e, t, n) {
|
|
8797
8823
|
return e.map((o) => ({
|
|
8798
8824
|
type: o.type,
|
|
8799
8825
|
name: t[o.item],
|
|
@@ -8801,93 +8827,93 @@ function Ny(e, t, n) {
|
|
|
8801
8827
|
icon: n?.[o.item]
|
|
8802
8828
|
}));
|
|
8803
8829
|
}
|
|
8804
|
-
var
|
|
8830
|
+
var Iy = /* @__PURE__ */ (function(e) {
|
|
8805
8831
|
return e.Auto = "auto", e.Manual = "manual", e;
|
|
8806
8832
|
})({});
|
|
8807
|
-
function
|
|
8833
|
+
function Py(e) {
|
|
8808
8834
|
return [
|
|
8809
8835
|
{
|
|
8810
|
-
kind:
|
|
8836
|
+
kind: xt.DataContext,
|
|
8811
8837
|
label: "Data context"
|
|
8812
8838
|
},
|
|
8813
8839
|
{
|
|
8814
|
-
kind:
|
|
8840
|
+
kind: xt.QueryResult,
|
|
8815
8841
|
label: "Query result",
|
|
8816
8842
|
disabled: e.queryResults.length === 0
|
|
8817
8843
|
},
|
|
8818
8844
|
{
|
|
8819
|
-
kind:
|
|
8845
|
+
kind: xt.ComponentProperty,
|
|
8820
8846
|
label: "Component property",
|
|
8821
8847
|
disabled: e.componentOutputs.length === 0
|
|
8822
8848
|
},
|
|
8823
8849
|
{
|
|
8824
|
-
kind:
|
|
8850
|
+
kind: xt.Literal,
|
|
8825
8851
|
label: "Literal value"
|
|
8826
8852
|
}
|
|
8827
8853
|
];
|
|
8828
8854
|
}
|
|
8829
8855
|
export {
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8856
|
+
wv as BindingMode,
|
|
8857
|
+
kv as BindingNullBehavior,
|
|
8858
|
+
Sv as BindingSourceKind,
|
|
8859
|
+
Iy as CommandFormMode,
|
|
8860
|
+
Cv as DestinationKind,
|
|
8835
8861
|
W as LayoutItem,
|
|
8836
8862
|
ne as Ownership,
|
|
8837
|
-
|
|
8863
|
+
jg as PlayScreenView,
|
|
8838
8864
|
Fe as SceneDocumentProblem,
|
|
8839
8865
|
ka as ScreenEditorControlProviders,
|
|
8840
|
-
|
|
8841
|
-
|
|
8866
|
+
dy as ScreenEditorOverlay,
|
|
8867
|
+
uy as ScreenEditorPrimeReactProvider,
|
|
8842
8868
|
Fa as ScreenEditorWindow,
|
|
8843
|
-
|
|
8844
|
-
|
|
8869
|
+
py as ScreenEditorWorkspace,
|
|
8870
|
+
wy as ScreenThumbnail,
|
|
8845
8871
|
te as StructureEditRejection,
|
|
8846
|
-
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
8872
|
+
gv as StructuredValueEditor,
|
|
8873
|
+
dv as asList,
|
|
8874
|
+
Py as bindingSourceChoices,
|
|
8875
|
+
Bm as browserWindowSizeStorage,
|
|
8850
8876
|
kt as commandNameOf,
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
8858
|
-
|
|
8877
|
+
my as createScreenEditorEnvironment,
|
|
8878
|
+
kg as createScreenEditorRuntime,
|
|
8879
|
+
jm as createWindowSizeMemory,
|
|
8880
|
+
Jg as defaultLayoutIcons,
|
|
8881
|
+
Sy as defaultLayoutLabels,
|
|
8882
|
+
Cy as defaultPaletteIcons,
|
|
8883
|
+
Ny as defaultPaletteSources,
|
|
8884
|
+
Ip as defaultScreenEditorStrings,
|
|
8859
8885
|
er as defaultStructuredEditorStrings,
|
|
8860
8886
|
wa as defaultWindowSize,
|
|
8861
|
-
|
|
8862
|
-
|
|
8887
|
+
Km as fitWindowSize,
|
|
8888
|
+
lv as identified,
|
|
8863
8889
|
as as isCollectionOfRecords,
|
|
8864
|
-
|
|
8890
|
+
Wm as isLegacyDefaultWindow,
|
|
8865
8891
|
is as isObjectWithFields,
|
|
8866
|
-
|
|
8892
|
+
rv as isPrimitiveList,
|
|
8867
8893
|
ln as isRecord,
|
|
8868
|
-
|
|
8894
|
+
cv as isStringMap,
|
|
8869
8895
|
Ko as isStructured,
|
|
8870
|
-
|
|
8871
|
-
|
|
8896
|
+
sv as movedItem,
|
|
8897
|
+
uv as newItem,
|
|
8872
8898
|
nr as numberListEditorKind,
|
|
8873
8899
|
Xr as readSceneDocument,
|
|
8874
|
-
|
|
8875
|
-
|
|
8900
|
+
ky as readThumbnailDocument,
|
|
8901
|
+
zm as resolveInitialWindowSize,
|
|
8876
8902
|
ns as scalarEditorKind,
|
|
8877
|
-
|
|
8878
|
-
|
|
8903
|
+
Hf as screenEditorPrimeReactDefaults,
|
|
8904
|
+
vy as screenEditorRuntimeForProfile,
|
|
8879
8905
|
St as sliceNamedBy,
|
|
8880
8906
|
or as stringListEditorKind,
|
|
8881
8907
|
rs as stringMapEditorKind,
|
|
8882
8908
|
os as stringOrListEditorKind,
|
|
8883
8909
|
Kn as structuredProblem,
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
8910
|
+
Kg as thumbnailGeometry,
|
|
8911
|
+
yy as thumbnailMaxBodyHeight,
|
|
8912
|
+
by as thumbnailWidth,
|
|
8913
|
+
Ty as toLayoutContainerDescriptors,
|
|
8914
|
+
eg as toSceneCandidates,
|
|
8915
|
+
av as withField,
|
|
8890
8916
|
ts as withIdentities,
|
|
8891
|
-
|
|
8892
|
-
|
|
8917
|
+
pv as withItem,
|
|
8918
|
+
mv as withoutItem
|
|
8893
8919
|
};
|