@cratis/event-models 0.224.0 → 0.225.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,22 +1,22 @@
|
|
|
1
1
|
import { c as Ja, d as Qa, f as ze, l as tr, m as oo, p as Ya, s as Xa, t as nr, u as Xt } from "./defaultStructuredEditorStrings-Ch1I0Lci.js";
|
|
2
2
|
import { t as or } from "./QueryBindingEditor-MTd0R7iQ.js";
|
|
3
3
|
import { i as Za, n as es, r as ts, t as ns } from "./toTemplateSources-Chd2UNJQ.js";
|
|
4
|
-
import { _ as os, a as
|
|
4
|
+
import { _ as os, a as hv, c as Ho, d as ir, f as is, g as fv, h as rs, i as as, l as gv, m as ss, n as vv, o as ln, p as rr, r as ls, s as bv, t as yv, u as wv, v as kv, y as Sv } from "./structuredValue-vqCZttsk.js";
|
|
5
5
|
import { a as we, n as cs, r as ds } from "./iconDiagnostics-Ds4CnqD0.js";
|
|
6
|
-
import { t as
|
|
7
|
-
import { createContext as us, createElement as
|
|
6
|
+
import { t as Tv } from "./StructuredValueEditor-DUSATTWd.js";
|
|
7
|
+
import { createContext as us, createElement as wt, useCallback as z, useContext as ps, useEffect as ce, useId as ms, useLayoutEffect as Se, useMemo as U, useRef as V, useState as j } from "react";
|
|
8
8
|
import { Fragment as le, jsx as a, jsxs as b } from "react/jsx-runtime";
|
|
9
|
-
import { BindingMode as
|
|
10
|
-
import { ApplicationStructureIndex as Zt, EffectiveIconCatalog as Ts, NavigationEditKind as Ko, TemplateCatalogKind as cr, ToolbarDiagnosticSeverity as Is, addNavItem as Ps, applicableTemplates as xs, applyEdit as dr, applyNavigationEdits as Os, baseComponentLibraries as Ds, componentArgumentSourcePrefix as Rs, componentBadge as Vo, computeSizeClass as
|
|
9
|
+
import { BindingMode as Ov, BindingNullBehavior as Dv, BindingSourceKind as Rv, BindingSourceKind as xt, CollectionOperation as ke, ColorScheme as hs, ComponentCategory as fs, DestinationKind as Fv, DestinationKind as ar, DiagnosticCode as gs, EditTarget as vs, EditingScopeKind as Vt, FlowContainerKind as cn, FormGenerationMode as ge, FormWidthUnit as Ce, GridUnitType as bs, HorizontalAlignment as io, InteractionActionKind as lt, InteractionTriggerKind as sr, NavigationRegionKind as Go, NavigationRegionMode as De, Orientation as ct, PackageKind as dt, PropertyEditorKind as X, PropertyValueType as K, ProvenanceKind as qo, QueryOriginKind as ys, QueryResultShape as ws, SceneEditKind as Y, SceneNodeKind as ks, TemplateReferenceSource as Ss, TemplateScope as Cs, ValueSource as lr, VerticalAlignment as ro, Visibility as ao, componentCategories as Ns } from "@cratis/scene.model";
|
|
10
|
+
import { ApplicationStructureIndex as Zt, EffectiveIconCatalog as Ts, NavigationEditKind as Ko, TemplateCatalogKind as cr, ToolbarDiagnosticSeverity as Is, addNavItem as Ps, applicableTemplates as xs, applyEdit as dr, applyNavigationEdits as Os, baseComponentLibraries as Ds, componentArgumentSourcePrefix as Rs, componentBadge as Vo, computeSizeClass as Fs, corePackage as so, createDescriptorCatalog as Es, diagnoseNavigationRegions as Ms, effectiveNavigation as ur, effectivePackages as pr, elementNodeId as re, findComponentDescriptor as lo, findLayoutTypeDescriptor as Jo, inspect as co, isCanvas as ut, isDockPanel as As, isExternalComponent as qe, isGrid as uo, isPackageSelectionValid as _s, isPanel as jt, isStackPanel as po, isThemeCompatible as $s, isWrapPanel as Ls, matchComponentQuery as Bs, normalizeToolbarButton as js, packagesOfKind as Qo, rankFrequentlyUsedComponents as Us, resolveComponentName as Tt, resolveEffectiveConfiguration as mr, resolveIconLibraries as Ws, resolvePackageDependencies as zs, resolveTemplateChain as mo, resolveToolbarButton as Hs, setApplicationLogo as Gs, switchRegionMode as hr, toComponentCatalog as en, toolbarButtonFromItem as ho, validateToolbarButtons as qs, validateValue as dn } from "@cratis/scene.engine";
|
|
11
11
|
import { ErrorBoundary as Ve, IconButton as xe, Tabs as Ks } from "@cratis/components/Common";
|
|
12
12
|
import { ColorScheme as Vs, ComponentName as Js, LayoutConfigProvider as fr, LayoutMode as Qs, LayoutName as Ys, TemplatePreviewState as at, applyTemplatePreviewState as Xs, composeApplicationScreen as Zs, composeScreenElement as el, defaultApplicationChrome as tl, defaultBlueprint as gr, defaultBlueprintName as vr, effectiveShellOf as br, externalComponent as fo, foundationSamples as nl, previewProfile as ol, resolveElementComponentNames as go } from "@cratis/scene.blueprint.default";
|
|
13
|
-
import { IconAdapterProvider as yr, SceneElementView as vo, SceneNavigationModelProvider as il, SceneNavigationProvider as rl, SceneThemeProvider as wr, SliceInvokerProvider as al, componentRegistryKey as
|
|
13
|
+
import { IconAdapterProvider as yr, SceneElementView as vo, SceneNavigationModelProvider as il, SceneNavigationProvider as rl, SceneThemeProvider as wr, SliceInvokerProvider as al, componentRegistryKey as Fn, corePackage as kr, createDryRunInvoker as sl, itemEditableRule as ll, itemInheritedReason as cl, mergeIconAdapters as dl, mergePackageRegistries as Sr, resolveDesignTimeHost as ul } from "@cratis/scene.react";
|
|
14
14
|
import { Toolbar as pl, ToolbarFolder as ml } from "@cratis/components/Toolbar";
|
|
15
15
|
import { PrototypeLayout as Xe } from "@cratis/scene";
|
|
16
16
|
import { FileUploadHandlerProvider as hl, QuillLoaderProvider as fl, primeReactPackage as Cr, primeReactThemes as Yo, usePrimeReactTheme as gl } from "@cratis/scene.primereact";
|
|
17
|
-
import { FaAlignJustify as Xo, FaAlignLeft as vl, FaAngleDoubleRight as un, FaArrowsAltH as bl, FaBars as st, FaBell as yl, FaBolt as wl, FaBookmark as kl, FaBorderAll as Sl, FaCalendarAlt as Zo, FaCaretSquareDown as ei, FaChartBar as Nr, FaCheckSquare as ti, FaClock as Cl, FaClone as Nl, FaCode as Tl, FaCog as ni, FaColumns as pn, FaCommentAlt as Il, FaCommentDots as Tr, FaCompass as Pl, FaCreditCard as xl, FaCube as Ol, FaDatabase as Dl, FaDesktop as
|
|
17
|
+
import { FaAlignJustify as Xo, FaAlignLeft as vl, FaAngleDoubleRight as un, FaArrowsAltH as bl, FaBars as st, FaBell as yl, FaBolt as wl, FaBookmark as kl, FaBorderAll as Sl, FaCalendarAlt as Zo, FaCaretSquareDown as ei, FaChartBar as Nr, FaCheckSquare as ti, FaClock as Cl, FaClone as Nl, FaCode as Tl, FaCog as ni, FaColumns as pn, FaCommentAlt as Il, FaCommentDots as Tr, FaCompass as Pl, FaCreditCard as xl, FaCube as Ol, FaDatabase as Dl, FaDesktop as En, FaEdit as mn, FaEllipsisH as Rl, FaExclamationCircle as hn, FaExpandArrowsAlt as Fl, FaFileAlt as Mn, FaFileUpload as El, FaFilter as oi, FaFolderOpen as ii, FaFont as ri, FaGripLines as je, FaGripLinesVertical as Ml, FaGripVertical as Al, FaHashtag as ai, FaHeading as Ut, FaHistory as _l, FaHourglassHalf as $l, FaIdBadge as Ll, FaImage as Ir, FaImages as si, FaInfoCircle as Bl, FaKeyboard as Pr, FaLayerGroup as jl, FaLink as Ul, FaList as xr, FaListAlt as fn, FaListOl as gn, FaLock as Wl, FaMask as li, FaMobileAlt as zl, FaMousePointer as Wt, FaObjectGroup as Hl, FaPaintBrush as Gl, FaPalette as vn, FaPen as ql, FaPercent as Kl, FaPlay as Vl, FaProjectDiagram as Jl, FaPuzzlePiece as Or, FaRedo as Ql, FaRegCheckCircle as Yl, FaRegCircle as bn, FaRegSquare as bo, FaSave as Xl, FaSearch as ci, FaShapes as Dr, FaSitemap as yn, FaSlidersH as An, FaSpinner as di, FaSquare as Zl, FaStar as ec, FaStepForward as wn, FaStickyNote as tc, FaStream as nc, FaTable as mt, FaTag as Ot, FaTerminal as oc, FaTh as ui, FaThLarge as Rr, FaThList as yo, FaToggleOn as Fr, FaTools as ic, FaTrash as rc, FaTree as _n, FaUndo as ac, FaUser as sc, FaUserCircle as lc, FaVectorSquare as cc, FaWindowMaximize as ht, FaWindowRestore as dc } from "react-icons/fa";
|
|
18
18
|
import "@cratis/scene.primereact/primeReactTheme.css";
|
|
19
|
-
import { LuChevronLeft as uc, LuChevronRight as pc, LuCopy as mc, LuCornerDownRight as hc, LuLink as fc, LuLock as
|
|
19
|
+
import { LuChevronLeft as uc, LuChevronRight as pc, LuCopy as mc, LuCornerDownRight as hc, LuLink as fc, LuLock as Er, LuPanelLeft as gc, LuPlus as vc, LuTrash2 as bc, LuZap as yc } from "react-icons/lu";
|
|
20
20
|
import { PrimeReactProvider as wc } from "@primereact/core/config";
|
|
21
21
|
import { styles as kc } from "@primereact/styles/accordion";
|
|
22
22
|
import { styles as Sc } from "@primereact/styles/autocomplete";
|
|
@@ -29,8 +29,8 @@ import { styles as xc } from "@primereact/styles/buttongroup";
|
|
|
29
29
|
import { styles as Oc } from "@primereact/styles/card";
|
|
30
30
|
import { styles as Dc } from "@primereact/styles/carousel";
|
|
31
31
|
import { styles as Rc } from "@primereact/styles/checkbox";
|
|
32
|
-
import { styles as
|
|
33
|
-
import { styles as
|
|
32
|
+
import { styles as Fc } from "@primereact/styles/checkboxgroup";
|
|
33
|
+
import { styles as Ec } from "@primereact/styles/chip";
|
|
34
34
|
import { styles as Mc } from "@primereact/styles/compare";
|
|
35
35
|
import { styles as Ac } from "@primereact/styles/contextmenu";
|
|
36
36
|
import { styles as _c } from "@primereact/styles/datatable";
|
|
@@ -82,8 +82,8 @@ import { styles as xd } from "@primereact/styles/stepper";
|
|
|
82
82
|
import { styles as Od } from "@primereact/styles/tabs";
|
|
83
83
|
import { styles as Dd } from "@primereact/styles/tag";
|
|
84
84
|
import { styles as Rd } from "@primereact/styles/terminal";
|
|
85
|
-
import { styles as
|
|
86
|
-
import { styles as
|
|
85
|
+
import { styles as Fd } from "@primereact/styles/textarea";
|
|
86
|
+
import { styles as Ed } from "@primereact/styles/timeline";
|
|
87
87
|
import { styles as Md } from "@primereact/styles/toast";
|
|
88
88
|
import { styles as Ad } from "@primereact/styles/toaster";
|
|
89
89
|
import { styles as _d } from "@primereact/styles/togglebutton";
|
|
@@ -180,7 +180,7 @@ var Qd = (e) => e ? {
|
|
|
180
180
|
close: () => {
|
|
181
181
|
P();
|
|
182
182
|
}
|
|
183
|
-
}, I = e.left + e.width / 2, N = e.top + e.height / 2, R = g.width / 2 + T - y.width / 2, B = g.height / 2 - y.height / 2, S = `${I - R}px ${N - B}px`,
|
|
183
|
+
}, I = e.left + e.width / 2, N = e.top + e.height / 2, R = g.width / 2 + T - y.width / 2, B = g.height / 2 - y.height / 2, S = `${I - R}px ${N - B}px`, E = [
|
|
184
184
|
"prototype-editor-overlay-content",
|
|
185
185
|
l === "visible" ? "prototype-editor-overlay-content--visible" : "",
|
|
186
186
|
l === "closing" ? "prototype-editor-overlay-content--closing" : ""
|
|
@@ -190,7 +190,7 @@ var Qd = (e) => e ? {
|
|
|
190
190
|
"data-testid": "studio-screen-editor-backdrop",
|
|
191
191
|
onClick: P,
|
|
192
192
|
children: [/* @__PURE__ */ b("div", {
|
|
193
|
-
className:
|
|
193
|
+
className: E,
|
|
194
194
|
"data-testid": "studio-screen-editor-frame",
|
|
195
195
|
style: {
|
|
196
196
|
transformOrigin: S,
|
|
@@ -253,7 +253,7 @@ function tu(e, t, n) {
|
|
|
253
253
|
}]
|
|
254
254
|
};
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function ft(e, t) {
|
|
257
257
|
return (t === void 0 ? e.screens.find((n) => n.name === be)?.slotContent : e.screenTemplates.find((n) => n.name === t)?.content)?.[Jt]?.[0];
|
|
258
258
|
}
|
|
259
259
|
function $n(e, t = !1) {
|
|
@@ -439,7 +439,7 @@ var ie = /* @__PURE__ */ (function(e) {
|
|
|
439
439
|
})({}), $e = /* @__PURE__ */ (function(e) {
|
|
440
440
|
return e.Select = "select", e.Configure = "configure", e.Move = "move", e.Resize = "resize", e.Restyle = "restyle", e.Insert = "insert", e.Delete = "delete", e;
|
|
441
441
|
})({});
|
|
442
|
-
function
|
|
442
|
+
function kt(e, t) {
|
|
443
443
|
switch (e) {
|
|
444
444
|
case ie.Local:
|
|
445
445
|
return !0;
|
|
@@ -451,7 +451,7 @@ function wt(e, t) {
|
|
|
451
451
|
}
|
|
452
452
|
function jn(e, t, n) {
|
|
453
453
|
const o = Ne(e, t, n);
|
|
454
|
-
return !!o && o.parent !== null &&
|
|
454
|
+
return !!o && o.parent !== null && kt(n.ownershipOf(o.node), $e.Delete);
|
|
455
455
|
}
|
|
456
456
|
function zr(e, t, n) {
|
|
457
457
|
const o = Ne(e, t, n);
|
|
@@ -540,7 +540,7 @@ var Gr = ({ ownership: e, label: t }) => e === ie.Local ? null : /* @__PURE__ */
|
|
|
540
540
|
children: t
|
|
541
541
|
});
|
|
542
542
|
function bu({ row: e, adapter: t, strings: n, isSelected: o, isFocusable: i, dropZone: r, onSelect: s, onToggle: l, onKeyDown: c, onDragStart: u, onDragOver: d, onDrop: p, onDragEnd: h }) {
|
|
543
|
-
const f = t.ownershipOf(e.node), g =
|
|
543
|
+
const f = t.ownershipOf(e.node), g = kt(f, $e.Move) && (t.isMovable?.(e.node) ?? !0), m = t.detailOf?.(e.node), v = t.problemsOf?.(e.node) ?? 0;
|
|
544
544
|
return /* @__PURE__ */ b("li", {
|
|
545
545
|
role: "treeitem",
|
|
546
546
|
"aria-level": e.depth + 1,
|
|
@@ -723,33 +723,33 @@ function Tu(e) {
|
|
|
723
723
|
}
|
|
724
724
|
var ve = /* @__PURE__ */ (function(e) {
|
|
725
725
|
return e.None = "none", e.Modal = "modal", e.Drawer = "drawer", e;
|
|
726
|
-
})({}),
|
|
727
|
-
function
|
|
726
|
+
})({}), St = (e) => e.commandName ?? e.name;
|
|
727
|
+
function pt(e, t) {
|
|
728
728
|
if (typeof t != "string" || t === "") return;
|
|
729
729
|
const n = e.find((i) => i.id === t);
|
|
730
730
|
if (n) return n;
|
|
731
|
-
const o = e.filter((i) =>
|
|
731
|
+
const o = e.filter((i) => St(i) === t);
|
|
732
732
|
return o.length === 1 ? o[0] : void 0;
|
|
733
733
|
}
|
|
734
|
-
var
|
|
734
|
+
var Fe = /* @__PURE__ */ (function(e) {
|
|
735
735
|
return e.MissingSlice = "missingSlice", e.UnmappedInput = "unmappedInput", e.UnknownInput = "unknownInput", e.UnknownSource = "unknownSource", e;
|
|
736
736
|
})({});
|
|
737
737
|
function Iu(e, t, n) {
|
|
738
|
-
const o =
|
|
739
|
-
if (!o) return [{ kind:
|
|
738
|
+
const o = pt(t, e.sliceId);
|
|
739
|
+
if (!o) return [{ kind: Fe.MissingSlice }];
|
|
740
740
|
const i = [];
|
|
741
741
|
for (const r of o.inputs) {
|
|
742
742
|
const s = e.inputs[r.name]?.trim();
|
|
743
743
|
s ? n.has(s) || i.push({
|
|
744
|
-
kind:
|
|
744
|
+
kind: Fe.UnknownSource,
|
|
745
745
|
input: r.name
|
|
746
746
|
}) : r.required && i.push({
|
|
747
|
-
kind:
|
|
747
|
+
kind: Fe.UnmappedInput,
|
|
748
748
|
input: r.name
|
|
749
749
|
});
|
|
750
750
|
}
|
|
751
751
|
for (const r of Object.keys(e.inputs)) o.inputs.some((s) => s.name === r) || i.push({
|
|
752
|
-
kind:
|
|
752
|
+
kind: Fe.UnknownInput,
|
|
753
753
|
input: r
|
|
754
754
|
});
|
|
755
755
|
return i;
|
|
@@ -763,17 +763,17 @@ function Pu(e, t) {
|
|
|
763
763
|
var xu = (e, t) => {
|
|
764
764
|
const n = e.input ?? "";
|
|
765
765
|
switch (e.kind) {
|
|
766
|
-
case
|
|
766
|
+
case Fe.MissingSlice:
|
|
767
767
|
return t.missingSlice;
|
|
768
|
-
case
|
|
768
|
+
case Fe.UnmappedInput:
|
|
769
769
|
return t.unmappedInput(n);
|
|
770
|
-
case
|
|
770
|
+
case Fe.UnknownInput:
|
|
771
771
|
return t.unknownInput(n);
|
|
772
|
-
case
|
|
772
|
+
case Fe.UnknownSource:
|
|
773
773
|
return t.unknownSource(n);
|
|
774
774
|
}
|
|
775
775
|
}, Ou = ({ action: e, slices: t, sources: n, strings: o, disabled: i, suggestSource: r, onChange: s }) => {
|
|
776
|
-
const l = o.properties.action, c = e ?
|
|
776
|
+
const l = o.properties.action, c = e ? pt(t, e.sliceId) : void 0, u = e ? Iu(e, t, new Set(n.map((d) => d.path))) : [];
|
|
777
777
|
return /* @__PURE__ */ b("fieldset", {
|
|
778
778
|
className: "studio-editor-query",
|
|
779
779
|
disabled: i,
|
|
@@ -874,24 +874,44 @@ function Ru(e) {
|
|
|
874
874
|
const t = e.slice(Un.length), n = t.indexOf(".");
|
|
875
875
|
return n > 0 ? t.slice(0, n) : void 0;
|
|
876
876
|
}
|
|
877
|
+
function Fu(e, t) {
|
|
878
|
+
const n = pt(t.stateChangeSlices, e.properties.command);
|
|
879
|
+
return n ? { properties: n.inputs.map((o) => ({
|
|
880
|
+
name: o.name,
|
|
881
|
+
type: o.type
|
|
882
|
+
})) } : void 0;
|
|
883
|
+
}
|
|
877
884
|
function Co(e, t, n, o, i) {
|
|
878
|
-
|
|
885
|
+
const r = Fu(e, o);
|
|
886
|
+
let s = !1;
|
|
887
|
+
const l = {
|
|
879
888
|
element: e,
|
|
880
889
|
root: n.composition.element,
|
|
881
|
-
screen: n.document.screens.find((
|
|
890
|
+
screen: n.document.screens.find((c) => c.name === be),
|
|
882
891
|
descriptor: t,
|
|
883
892
|
profile: o.runtime.profile,
|
|
884
893
|
bundles: o.runtime.bundles,
|
|
885
894
|
permissions: {},
|
|
886
|
-
capabilities: {},
|
|
895
|
+
capabilities: r ? { "commandForm.generateFields": !0 } : {},
|
|
887
896
|
diagnostics: [],
|
|
888
|
-
|
|
889
|
-
|
|
897
|
+
commandMetadata: r,
|
|
898
|
+
submitEdits: (c) => {
|
|
899
|
+
n.applyAll(c, i);
|
|
890
900
|
},
|
|
891
|
-
submitAction: (
|
|
892
|
-
|
|
901
|
+
submitAction: (c, u) => {
|
|
902
|
+
if (u.length === 0 && !s) {
|
|
903
|
+
s = !0;
|
|
904
|
+
try {
|
|
905
|
+
o.runtime.designTime.runAction(t, c, l);
|
|
906
|
+
} finally {
|
|
907
|
+
s = !1;
|
|
908
|
+
}
|
|
909
|
+
return;
|
|
910
|
+
}
|
|
911
|
+
n.applyAll(u, i);
|
|
893
912
|
}
|
|
894
913
|
};
|
|
914
|
+
return l;
|
|
895
915
|
}
|
|
896
916
|
var Eu = ({ component: e, descriptor: t, controller: n, environment: o, strings: i, disabled: r }) => {
|
|
897
917
|
const [s, l] = j([]), { designTime: c, packageDescriptorOf: u } = o.runtime, d = u(t);
|
|
@@ -917,7 +937,7 @@ var Eu = ({ component: e, descriptor: t, controller: n, environment: o, strings:
|
|
|
917
937
|
})
|
|
918
938
|
]
|
|
919
939
|
});
|
|
920
|
-
},
|
|
940
|
+
}, Mu = ({ component: e, descriptor: t, properties: n, controller: o, environment: i, strings: r, disabled: s }) => {
|
|
921
941
|
const { designTime: l, packageDescriptorOf: c } = i.runtime, u = c(t), d = n.flatMap((p) => {
|
|
922
942
|
const h = l.propertyEditor(u, p.descriptor).contribution;
|
|
923
943
|
return h ? [{
|
|
@@ -943,7 +963,7 @@ var Eu = ({ component: e, descriptor: t, controller: n, environment: o, strings:
|
|
|
943
963
|
})
|
|
944
964
|
}, p.descriptor.path))]
|
|
945
965
|
});
|
|
946
|
-
},
|
|
966
|
+
}, Au = ({ component: e, descriptor: t, controller: n, environment: o, strings: i }) => {
|
|
947
967
|
const { designTime: r, packageDescriptorOf: s } = o.runtime, l = s(t), c = r.designer(l), u = c.contribution;
|
|
948
968
|
if (!u && !c.diagnostic) return null;
|
|
949
969
|
const d = `${c.package ?? ""}:${l.editorKind ?? ""}`;
|
|
@@ -962,19 +982,19 @@ var Eu = ({ component: e, descriptor: t, controller: n, environment: o, strings:
|
|
|
962
982
|
children: c.diagnostic
|
|
963
983
|
})]
|
|
964
984
|
});
|
|
965
|
-
},
|
|
985
|
+
}, _u = "commandForm", Wn = "command", Jr = (e) => e.slice(e.lastIndexOf(":") + 1) === _u;
|
|
966
986
|
function Qr(e, t) {
|
|
967
|
-
return e.flatMap((n) => [...qe(n) && Jr(n.componentName) ? [
|
|
987
|
+
return e.flatMap((n) => [...qe(n) && Jr(n.componentName) ? [$u(n, t)] : [], ...Qr(Xt(n), t)]);
|
|
968
988
|
}
|
|
969
|
-
function
|
|
989
|
+
function $u(e, t) {
|
|
970
990
|
const n = e.properties?.[Wn], o = typeof n == "string" ? n : "";
|
|
971
991
|
return {
|
|
972
992
|
elementId: e.id,
|
|
973
993
|
command: o,
|
|
974
|
-
commandName:
|
|
994
|
+
commandName: pt(t, o) ? St(pt(t, o)) : void 0
|
|
975
995
|
};
|
|
976
996
|
}
|
|
977
|
-
function
|
|
997
|
+
function Lu(e, t) {
|
|
978
998
|
return t ? {
|
|
979
999
|
kind: Y.SetProperty,
|
|
980
1000
|
nodeId: re(e),
|
|
@@ -986,7 +1006,7 @@ function $u(e, t) {
|
|
|
986
1006
|
path: Wn
|
|
987
1007
|
};
|
|
988
1008
|
}
|
|
989
|
-
var
|
|
1009
|
+
var Bu = ({ controller: e, slices: t, strings: n, disabled: o }) => {
|
|
990
1010
|
const i = e.document.screens.find((c) => c.name === be), r = i?.forms ?? [];
|
|
991
1011
|
if (!i) return null;
|
|
992
1012
|
const s = n.properties.forms, l = new Set(Qr(e.composition.roots, t).map((c) => c.commandName));
|
|
@@ -1013,25 +1033,25 @@ var Lu = ({ controller: e, slices: t, strings: n, disabled: o }) => {
|
|
|
1013
1033
|
}) })
|
|
1014
1034
|
]
|
|
1015
1035
|
});
|
|
1016
|
-
},
|
|
1036
|
+
}, Ee = (e = 1, t = Ce.Fraction) => t === Ce.Auto ? { unit: t } : {
|
|
1017
1037
|
unit: t,
|
|
1018
1038
|
value: e
|
|
1019
1039
|
};
|
|
1020
|
-
function
|
|
1040
|
+
function ju(e) {
|
|
1021
1041
|
return {
|
|
1022
1042
|
columns: [{
|
|
1023
1043
|
index: 1,
|
|
1024
|
-
width:
|
|
1044
|
+
width: Ee(1)
|
|
1025
1045
|
}, {
|
|
1026
1046
|
index: 2,
|
|
1027
|
-
width:
|
|
1047
|
+
width: Ee(1)
|
|
1028
1048
|
}],
|
|
1029
1049
|
placements: e.map((t, n) => No(t.name, n)),
|
|
1030
|
-
columnGap:
|
|
1031
|
-
rowGap:
|
|
1050
|
+
columnGap: Ee(16, Ce.Pixels),
|
|
1051
|
+
rowGap: Ee(12, Ce.Pixels)
|
|
1032
1052
|
};
|
|
1033
1053
|
}
|
|
1034
|
-
function
|
|
1054
|
+
function Uu(e) {
|
|
1035
1055
|
const t = e.layout;
|
|
1036
1056
|
if (!(t !== void 0 && (t.columns.some((o) => o.index < 1) || t.placements.some((o) => o.row < 1 || o.column < 1)))) return e;
|
|
1037
1057
|
const n = (o) => ({
|
|
@@ -1056,7 +1076,7 @@ function ju(e) {
|
|
|
1056
1076
|
};
|
|
1057
1077
|
}
|
|
1058
1078
|
function It(e) {
|
|
1059
|
-
const t =
|
|
1079
|
+
const t = Uu(e), n = t.layout ?? ju(t.fields), o = t.fields.map((i, r) => Yr(n, i.name) ?? i.placement ?? No(i.name, r));
|
|
1060
1080
|
return {
|
|
1061
1081
|
...t,
|
|
1062
1082
|
layout: {
|
|
@@ -1069,8 +1089,8 @@ function It(e) {
|
|
|
1069
1089
|
}))
|
|
1070
1090
|
};
|
|
1071
1091
|
}
|
|
1072
|
-
function
|
|
1073
|
-
const o = It(e), i =
|
|
1092
|
+
function Wu(e, t, n) {
|
|
1093
|
+
const o = It(e), i = Hu(n(Yr(o.layout, t) ?? No(t, o.fields.findIndex((r) => r.name === t))));
|
|
1074
1094
|
return {
|
|
1075
1095
|
...o,
|
|
1076
1096
|
layout: {
|
|
@@ -1083,7 +1103,7 @@ function Uu(e, t, n) {
|
|
|
1083
1103
|
} : r)
|
|
1084
1104
|
};
|
|
1085
1105
|
}
|
|
1086
|
-
function
|
|
1106
|
+
function zu(e, t, n) {
|
|
1087
1107
|
const o = It(e), i = o.layout.columns.some((r) => r.index === t) ? o.layout.columns.map((r) => r.index === t ? {
|
|
1088
1108
|
...r,
|
|
1089
1109
|
width: n
|
|
@@ -1121,7 +1141,7 @@ function No(e, t) {
|
|
|
1121
1141
|
columnSpan: 1
|
|
1122
1142
|
};
|
|
1123
1143
|
}
|
|
1124
|
-
function
|
|
1144
|
+
function Hu(e) {
|
|
1125
1145
|
return {
|
|
1126
1146
|
...e,
|
|
1127
1147
|
row: Math.max(1, e.row),
|
|
@@ -1132,27 +1152,27 @@ function zu(e) {
|
|
|
1132
1152
|
}
|
|
1133
1153
|
function zn(e) {
|
|
1134
1154
|
return {
|
|
1135
|
-
name:
|
|
1136
|
-
forCommand:
|
|
1155
|
+
name: St(e),
|
|
1156
|
+
forCommand: St(e),
|
|
1137
1157
|
generationMode: ge.Auto,
|
|
1138
1158
|
fields: e.inputs.map((t) => ({ name: t.name }))
|
|
1139
1159
|
};
|
|
1140
1160
|
}
|
|
1141
|
-
function
|
|
1161
|
+
function Gu(e, t) {
|
|
1142
1162
|
return It({
|
|
1143
1163
|
...e,
|
|
1144
1164
|
generationMode: ge.Manual,
|
|
1145
|
-
fields:
|
|
1165
|
+
fields: qu(t)
|
|
1146
1166
|
});
|
|
1147
1167
|
}
|
|
1148
|
-
function
|
|
1168
|
+
function qu(e) {
|
|
1149
1169
|
return e.inputs.map((t) => ({
|
|
1150
1170
|
name: t.name,
|
|
1151
1171
|
sourceProperty: t.name,
|
|
1152
1172
|
label: t.name
|
|
1153
1173
|
}));
|
|
1154
1174
|
}
|
|
1155
|
-
function
|
|
1175
|
+
function Ku(e, t) {
|
|
1156
1176
|
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) ? ge.Auto : ge.Manual;
|
|
1157
1177
|
}
|
|
1158
1178
|
function bi(e, t, n) {
|
|
@@ -1161,19 +1181,19 @@ function bi(e, t, n) {
|
|
|
1161
1181
|
fields: e.fields.map((o, i) => i === t ? n : o)
|
|
1162
1182
|
};
|
|
1163
1183
|
}
|
|
1164
|
-
function
|
|
1165
|
-
return t ? e.find((n) => n.forCommand ===
|
|
1184
|
+
function Vu(e, t) {
|
|
1185
|
+
return t ? e.find((n) => n.forCommand === St(t)) : void 0;
|
|
1166
1186
|
}
|
|
1167
|
-
var
|
|
1187
|
+
var Ju = pt, Me = /* @__PURE__ */ (function(e) {
|
|
1168
1188
|
return e.AutoMapped = "autoMapped", e.Renamed = "renamed", e.Composed = "composed", e.Broken = "broken", e;
|
|
1169
1189
|
})({});
|
|
1170
|
-
function
|
|
1190
|
+
function Qu(e, t) {
|
|
1171
1191
|
return e.fields.map((n) => ({
|
|
1172
1192
|
field: n,
|
|
1173
|
-
kind:
|
|
1193
|
+
kind: Yu(n, t)
|
|
1174
1194
|
}));
|
|
1175
1195
|
}
|
|
1176
|
-
function
|
|
1196
|
+
function Yu(e, t) {
|
|
1177
1197
|
if (e.composeUsing) return Me.Composed;
|
|
1178
1198
|
const n = e.sourceProperty ?? e.name;
|
|
1179
1199
|
return t.includes(n) ? e.sourceProperty ? Me.Renamed : Me.AutoMapped : Me.Broken;
|
|
@@ -1181,8 +1201,8 @@ function Qu(e, t) {
|
|
|
1181
1201
|
var He = /* @__PURE__ */ (function(e) {
|
|
1182
1202
|
return e.None = "none", e.ViaQuery = "viaQuery", e.FromItem = "fromItem", e;
|
|
1183
1203
|
})({});
|
|
1184
|
-
function
|
|
1185
|
-
return e ?
|
|
1204
|
+
function Xu(e) {
|
|
1205
|
+
return e ? Zu(e) ? {
|
|
1186
1206
|
kind: He.ViaQuery,
|
|
1187
1207
|
queryName: e.queryName,
|
|
1188
1208
|
parameterNames: Object.keys(e.parameterBindings)
|
|
@@ -1194,26 +1214,26 @@ function Yu(e) {
|
|
|
1194
1214
|
parameterNames: []
|
|
1195
1215
|
};
|
|
1196
1216
|
}
|
|
1197
|
-
function
|
|
1217
|
+
function Zu(e) {
|
|
1198
1218
|
return "queryName" in e;
|
|
1199
1219
|
}
|
|
1200
|
-
var
|
|
1220
|
+
var ep = {
|
|
1201
1221
|
[Me.AutoMapped]: "Auto-mapped",
|
|
1202
1222
|
[Me.Renamed]: "Renamed",
|
|
1203
1223
|
[Me.Composed]: "Composed",
|
|
1204
1224
|
[Me.Broken]: "Broken"
|
|
1205
|
-
},
|
|
1225
|
+
}, tp = {
|
|
1206
1226
|
[He.None]: "No populate source",
|
|
1207
1227
|
[He.ViaQuery]: "Populate via query",
|
|
1208
1228
|
[He.FromItem]: "Populate from item"
|
|
1209
1229
|
};
|
|
1210
|
-
function
|
|
1211
|
-
const o =
|
|
1230
|
+
function np({ form: e, commandProperties: t, onFieldSelected: n }) {
|
|
1231
|
+
const o = Xu(e.populateSource), i = Qu(e, t);
|
|
1212
1232
|
return /* @__PURE__ */ b("div", {
|
|
1213
1233
|
className: "studio-editor-form-designer",
|
|
1214
1234
|
children: [/* @__PURE__ */ b("div", {
|
|
1215
1235
|
className: "studio-editor-form-designer-populate-source",
|
|
1216
|
-
children: [/* @__PURE__ */ a("span", { children:
|
|
1236
|
+
children: [/* @__PURE__ */ a("span", { children: tp[o.kind] }), o.kind === He.ViaQuery && /* @__PURE__ */ b("span", {
|
|
1217
1237
|
className: "studio-editor-form-designer-populate-source-detail",
|
|
1218
1238
|
children: [o.queryName, o.parameterNames.length > 0 && ` by ${o.parameterNames.join(", ")}`]
|
|
1219
1239
|
})]
|
|
@@ -1229,7 +1249,7 @@ function tp({ form: e, commandProperties: t, onFieldSelected: n }) {
|
|
|
1229
1249
|
}),
|
|
1230
1250
|
/* @__PURE__ */ a("span", {
|
|
1231
1251
|
className: "studio-editor-form-designer-field-kind",
|
|
1232
|
-
children:
|
|
1252
|
+
children: ep[s]
|
|
1233
1253
|
}),
|
|
1234
1254
|
r.sourceProperty && /* @__PURE__ */ b("span", {
|
|
1235
1255
|
className: "studio-editor-form-designer-field-detail",
|
|
@@ -1244,7 +1264,7 @@ function tp({ form: e, commandProperties: t, onFieldSelected: n }) {
|
|
|
1244
1264
|
})]
|
|
1245
1265
|
});
|
|
1246
1266
|
}
|
|
1247
|
-
var
|
|
1267
|
+
var op = ({ form: e, strings: t, onChange: n }) => {
|
|
1248
1268
|
const o = It(e), i = o.layout;
|
|
1249
1269
|
return /* @__PURE__ */ b("div", {
|
|
1250
1270
|
className: "studio-editor-properties__form-layout",
|
|
@@ -1253,9 +1273,9 @@ var np = ({ form: e, strings: t, onChange: n }) => {
|
|
|
1253
1273
|
className: "studio-editor-properties__form-layout-row",
|
|
1254
1274
|
children: [/* @__PURE__ */ a("span", { children: t.column(r.index) }), /* @__PURE__ */ a(Ht, {
|
|
1255
1275
|
name: t.column(r.index),
|
|
1256
|
-
value: r.width ??
|
|
1276
|
+
value: r.width ?? Ee(),
|
|
1257
1277
|
strings: t,
|
|
1258
|
-
onChange: (s) => n(
|
|
1278
|
+
onChange: (s) => n(zu(o, r.index, s))
|
|
1259
1279
|
})]
|
|
1260
1280
|
}, r.index))] }),
|
|
1261
1281
|
/* @__PURE__ */ b("fieldset", { children: [
|
|
@@ -1264,7 +1284,7 @@ var np = ({ form: e, strings: t, onChange: n }) => {
|
|
|
1264
1284
|
className: "studio-editor-properties__form-layout-row",
|
|
1265
1285
|
children: [/* @__PURE__ */ a("span", { children: t.columnGap }), /* @__PURE__ */ a(Ht, {
|
|
1266
1286
|
name: t.columnGap,
|
|
1267
|
-
value: i.columnGap ??
|
|
1287
|
+
value: i.columnGap ?? Ee(0, Ce.Pixels),
|
|
1268
1288
|
strings: t,
|
|
1269
1289
|
onChange: (r) => n(vi(o, "columnGap", r))
|
|
1270
1290
|
})]
|
|
@@ -1273,7 +1293,7 @@ var np = ({ form: e, strings: t, onChange: n }) => {
|
|
|
1273
1293
|
className: "studio-editor-properties__form-layout-row",
|
|
1274
1294
|
children: [/* @__PURE__ */ a("span", { children: t.rowGap }), /* @__PURE__ */ a(Ht, {
|
|
1275
1295
|
name: t.rowGap,
|
|
1276
|
-
value: i.rowGap ??
|
|
1296
|
+
value: i.rowGap ?? Ee(0, Ce.Pixels),
|
|
1277
1297
|
strings: t,
|
|
1278
1298
|
onChange: (r) => n(vi(o, "rowGap", r))
|
|
1279
1299
|
})]
|
|
@@ -1281,15 +1301,15 @@ var np = ({ form: e, strings: t, onChange: n }) => {
|
|
|
1281
1301
|
] }),
|
|
1282
1302
|
/* @__PURE__ */ b("fieldset", { children: [/* @__PURE__ */ a("legend", { children: t.placements }), o.fields.map((r) => {
|
|
1283
1303
|
const s = i.placements.find((l) => l.field === r.name) ?? r.placement;
|
|
1284
|
-
return /* @__PURE__ */ b("fieldset", { children: [/* @__PURE__ */ a("legend", { children: r.label || r.name }), /* @__PURE__ */ a(
|
|
1304
|
+
return /* @__PURE__ */ b("fieldset", { children: [/* @__PURE__ */ a("legend", { children: r.label || r.name }), /* @__PURE__ */ a(ip, {
|
|
1285
1305
|
placement: s,
|
|
1286
1306
|
strings: t,
|
|
1287
|
-
onChange: (l) => n(
|
|
1307
|
+
onChange: (l) => n(Wu(o, r.name, () => l))
|
|
1288
1308
|
})] }, r.name);
|
|
1289
1309
|
})] })
|
|
1290
1310
|
]
|
|
1291
1311
|
});
|
|
1292
|
-
},
|
|
1312
|
+
}, ip = ({ placement: e, strings: t, onChange: n }) => /* @__PURE__ */ b(le, { children: [
|
|
1293
1313
|
/* @__PURE__ */ a(Dt, {
|
|
1294
1314
|
label: t.row,
|
|
1295
1315
|
value: e.row,
|
|
@@ -1328,7 +1348,7 @@ var np = ({ form: e, strings: t, onChange: n }) => {
|
|
|
1328
1348
|
}),
|
|
1329
1349
|
/* @__PURE__ */ b("label", { children: [/* @__PURE__ */ a("span", { children: t.fieldWidth }), /* @__PURE__ */ a(Ht, {
|
|
1330
1350
|
name: t.fieldWidth,
|
|
1331
|
-
value: e.width ??
|
|
1351
|
+
value: e.width ?? Ee(),
|
|
1332
1352
|
strings: t,
|
|
1333
1353
|
onChange: (o) => n({
|
|
1334
1354
|
...e,
|
|
@@ -1368,8 +1388,8 @@ function yi(e, t) {
|
|
|
1368
1388
|
value: Number.isFinite(n) ? n : 0
|
|
1369
1389
|
};
|
|
1370
1390
|
}
|
|
1371
|
-
var
|
|
1372
|
-
const s = t?.inputs.map((c) => c.name) ?? e.fields.map((c) => c.sourceProperty ?? c.name), l =
|
|
1391
|
+
var rp = ({ form: e, slice: t, idPrefix: n, strings: o, disabled: i, onChange: r }) => {
|
|
1392
|
+
const s = t?.inputs.map((c) => c.name) ?? e.fields.map((c) => c.sourceProperty ?? c.name), l = Ku(e, t) === ge.Auto;
|
|
1373
1393
|
return /* @__PURE__ */ b("fieldset", {
|
|
1374
1394
|
className: "studio-editor-properties__form",
|
|
1375
1395
|
disabled: i,
|
|
@@ -1377,7 +1397,7 @@ var ip = ({ form: e, slice: t, idPrefix: n, strings: o, disabled: i, onChange: r
|
|
|
1377
1397
|
/* @__PURE__ */ a("legend", { children: e.name }),
|
|
1378
1398
|
/* @__PURE__ */ b("label", { children: [/* @__PURE__ */ a("span", { children: o.mode }), /* @__PURE__ */ b("select", {
|
|
1379
1399
|
value: l ? ge.Auto : ge.Manual,
|
|
1380
|
-
onChange: (c) => t && r(c.target.value === ge.Auto ? zn(t) :
|
|
1400
|
+
onChange: (c) => t && r(c.target.value === ge.Auto ? zn(t) : Gu(e, t)),
|
|
1381
1401
|
children: [/* @__PURE__ */ a("option", {
|
|
1382
1402
|
value: ge.Auto,
|
|
1383
1403
|
children: o.auto
|
|
@@ -1386,7 +1406,7 @@ var ip = ({ form: e, slice: t, idPrefix: n, strings: o, disabled: i, onChange: r
|
|
|
1386
1406
|
children: o.manual
|
|
1387
1407
|
})]
|
|
1388
1408
|
})] }),
|
|
1389
|
-
/* @__PURE__ */ a(
|
|
1409
|
+
/* @__PURE__ */ a(np, {
|
|
1390
1410
|
form: e,
|
|
1391
1411
|
commandProperties: s
|
|
1392
1412
|
}),
|
|
@@ -1414,15 +1434,15 @@ var ip = ({ form: e, slice: t, idPrefix: n, strings: o, disabled: i, onChange: r
|
|
|
1414
1434
|
children: s.map((c) => /* @__PURE__ */ a("option", { value: c }, c))
|
|
1415
1435
|
})]
|
|
1416
1436
|
}),
|
|
1417
|
-
!l && /* @__PURE__ */ a(
|
|
1437
|
+
!l && /* @__PURE__ */ a(op, {
|
|
1418
1438
|
form: e,
|
|
1419
1439
|
strings: o,
|
|
1420
1440
|
onChange: r
|
|
1421
1441
|
})
|
|
1422
1442
|
]
|
|
1423
1443
|
});
|
|
1424
|
-
},
|
|
1425
|
-
const u = i.properties.commandForm, d =
|
|
1444
|
+
}, ap = ({ elementId: e, command: t, slices: n, forms: o, strings: i, disabled: r, onCommandChange: s, onFormChange: l, onFormCreate: c }) => {
|
|
1445
|
+
const u = i.properties.commandForm, d = Ju(n, t), p = Vu(o, d), h = t !== void 0 && t !== "" && !d;
|
|
1426
1446
|
return /* @__PURE__ */ b("fieldset", {
|
|
1427
1447
|
className: "studio-editor-query studio-editor-properties__command-form",
|
|
1428
1448
|
disabled: r,
|
|
@@ -1460,7 +1480,7 @@ var ip = ({ form: e, slice: t, idPrefix: n, strings: o, disabled: i, onChange: r
|
|
|
1460
1480
|
onClick: () => c(d),
|
|
1461
1481
|
children: u.createForm(d.name)
|
|
1462
1482
|
}),
|
|
1463
|
-
d && p && /* @__PURE__ */ a(
|
|
1483
|
+
d && p && /* @__PURE__ */ a(rp, {
|
|
1464
1484
|
form: p,
|
|
1465
1485
|
slice: d,
|
|
1466
1486
|
idPrefix: `${e}-form`,
|
|
@@ -1470,8 +1490,8 @@ var ip = ({ form: e, slice: t, idPrefix: n, strings: o, disabled: i, onChange: r
|
|
|
1470
1490
|
})
|
|
1471
1491
|
]
|
|
1472
1492
|
});
|
|
1473
|
-
},
|
|
1474
|
-
const i = (c, u) => o(e.map((d, p) => p === c ?
|
|
1493
|
+
}, sp = ({ outlets: e, disabled: t, strings: n, onChange: o }) => {
|
|
1494
|
+
const i = (c, u) => o(e.map((d, p) => p === c ? lp(u) : d)), r = (c) => o(e.filter((u, d) => d !== c)), s = (c, u) => o(cp(e, c, u)), l = () => o([...e, { name: dp(e, n.newOutletName) }]);
|
|
1475
1495
|
return /* @__PURE__ */ b("section", {
|
|
1476
1496
|
className: "studio-editor-outlets",
|
|
1477
1497
|
children: [
|
|
@@ -1528,17 +1548,17 @@ var ip = ({ form: e, slice: t, idPrefix: n, strings: o, disabled: i, onChange: r
|
|
|
1528
1548
|
]
|
|
1529
1549
|
});
|
|
1530
1550
|
};
|
|
1531
|
-
function
|
|
1551
|
+
function lp(e) {
|
|
1532
1552
|
return {
|
|
1533
1553
|
name: e.name,
|
|
1534
1554
|
...e.description ? { description: e.description } : {}
|
|
1535
1555
|
};
|
|
1536
1556
|
}
|
|
1537
|
-
function
|
|
1557
|
+
function cp(e, t, n) {
|
|
1538
1558
|
const o = [...e], [i] = o.splice(t, 1);
|
|
1539
1559
|
return i && o.splice(n, 0, i), o;
|
|
1540
1560
|
}
|
|
1541
|
-
function
|
|
1561
|
+
function dp(e, t) {
|
|
1542
1562
|
const n = new Set(e.map((o) => o.name));
|
|
1543
1563
|
if (!n.has(t)) return t;
|
|
1544
1564
|
for (let o = 2; ; o++) {
|
|
@@ -1546,24 +1566,24 @@ function cp(e, t) {
|
|
|
1546
1566
|
if (!n.has(i)) return i;
|
|
1547
1567
|
}
|
|
1548
1568
|
}
|
|
1549
|
-
function
|
|
1569
|
+
function up(e, t, n, o) {
|
|
1550
1570
|
const i = n.flatMap((s) => s.screens ?? []).find((s) => s.screenTemplate === e);
|
|
1551
1571
|
if (!i) return;
|
|
1552
1572
|
const r = en(n.map((s) => s.manifest));
|
|
1553
1573
|
return Xs(go(el(i), o, r), t);
|
|
1554
1574
|
}
|
|
1555
|
-
function
|
|
1575
|
+
function pp(e, t) {
|
|
1556
1576
|
return t.find((n) => n.name === e && n.kind === cr.ScreenTemplate);
|
|
1557
1577
|
}
|
|
1558
|
-
var
|
|
1578
|
+
var gt = /* @__PURE__ */ (function(e) {
|
|
1559
1579
|
return e.Desktop = "desktop", e.Tablet = "tablet", e.Phone = "phone", e;
|
|
1560
|
-
})({}),
|
|
1561
|
-
const [s, l] = j(at.Populated), [c, u] = j(
|
|
1580
|
+
})({}), mp = ({ templateName: e, environment: t, strings: n, disabled: o, onApply: i, onDiscard: r }) => {
|
|
1581
|
+
const [s, l] = j(at.Populated), [c, u] = j(gt.Desktop), { bundles: d, profile: p, registry: h, designTime: f } = t.runtime, g = U(() => up(e, s, d, p), [
|
|
1562
1582
|
e,
|
|
1563
1583
|
s,
|
|
1564
1584
|
d,
|
|
1565
1585
|
p
|
|
1566
|
-
]), m =
|
|
1586
|
+
]), m = pp(e, f.host.templates);
|
|
1567
1587
|
return /* @__PURE__ */ b("section", {
|
|
1568
1588
|
className: "studio-editor-template-preview",
|
|
1569
1589
|
"aria-label": n.preview(e),
|
|
@@ -1580,7 +1600,7 @@ var ft = /* @__PURE__ */ (function(e) {
|
|
|
1580
1600
|
})] }), /* @__PURE__ */ b("label", { children: [/* @__PURE__ */ a("span", { children: n.previewSize }), /* @__PURE__ */ a("select", {
|
|
1581
1601
|
value: c,
|
|
1582
1602
|
onChange: (v) => u(v.target.value),
|
|
1583
|
-
children: Object.values(
|
|
1603
|
+
children: Object.values(gt).map((v) => /* @__PURE__ */ a("option", {
|
|
1584
1604
|
value: v,
|
|
1585
1605
|
children: n.previewSizes[v]
|
|
1586
1606
|
}, v))
|
|
@@ -1673,7 +1693,7 @@ var ft = /* @__PURE__ */ (function(e) {
|
|
|
1673
1693
|
children: c
|
|
1674
1694
|
}, c))]
|
|
1675
1695
|
})] }),
|
|
1676
|
-
/* @__PURE__ */ a(
|
|
1696
|
+
/* @__PURE__ */ a(sp, {
|
|
1677
1697
|
outlets: s.outlets ?? [],
|
|
1678
1698
|
disabled: o,
|
|
1679
1699
|
strings: n.properties.outlets,
|
|
@@ -1682,16 +1702,16 @@ var ft = /* @__PURE__ */ (function(e) {
|
|
|
1682
1702
|
]
|
|
1683
1703
|
});
|
|
1684
1704
|
}
|
|
1685
|
-
return /* @__PURE__ */ a(
|
|
1705
|
+
return /* @__PURE__ */ a(hp, {
|
|
1686
1706
|
controller: e,
|
|
1687
1707
|
environment: t,
|
|
1688
1708
|
strings: n,
|
|
1689
1709
|
disabled: o
|
|
1690
1710
|
});
|
|
1691
|
-
},
|
|
1711
|
+
}, hp = ({ controller: e, environment: t, strings: n, disabled: o }) => {
|
|
1692
1712
|
const i = n.properties.templates, [r, s] = j(), l = e.document.screens.find((g) => g.name === be);
|
|
1693
1713
|
if (!l) return null;
|
|
1694
|
-
const c = (g) => e.setScreenTemplate(t.runtime.bundles.flatMap((m) => m.screenTemplates ?? []).find((m) => m.name === g), i.choose), u = U(() =>
|
|
1714
|
+
const c = (g) => e.setScreenTemplate(t.runtime.bundles.flatMap((m) => m.screenTemplates ?? []).find((m) => m.name === g), i.choose), u = U(() => fp(xs({ blueprints: ns(t.runtime.bundles) }, es({
|
|
1695
1715
|
bundles: t.runtime.bundles,
|
|
1696
1716
|
profile: t.runtime.profile,
|
|
1697
1717
|
scope: t.templateScope
|
|
@@ -1711,7 +1731,7 @@ var ft = /* @__PURE__ */ (function(e) {
|
|
|
1711
1731
|
className: "studio-editor-properties__templates",
|
|
1712
1732
|
children: [
|
|
1713
1733
|
/* @__PURE__ */ a("strong", { children: i.label }),
|
|
1714
|
-
r && /* @__PURE__ */ a(
|
|
1734
|
+
r && /* @__PURE__ */ a(mp, {
|
|
1715
1735
|
templateName: r,
|
|
1716
1736
|
environment: t,
|
|
1717
1737
|
strings: i,
|
|
@@ -1737,7 +1757,7 @@ var ft = /* @__PURE__ */ (function(e) {
|
|
|
1737
1757
|
]
|
|
1738
1758
|
});
|
|
1739
1759
|
};
|
|
1740
|
-
function
|
|
1760
|
+
function fp(e) {
|
|
1741
1761
|
const t = (n) => n.map((o) => ({
|
|
1742
1762
|
...o,
|
|
1743
1763
|
templates: o.templates.filter((i) => i.kind === cr.ScreenTemplate)
|
|
@@ -1754,8 +1774,8 @@ function wi(e) {
|
|
|
1754
1774
|
const t = Object.fromEntries(Object.entries(e).filter(([, n]) => n !== void 0 && n !== ""));
|
|
1755
1775
|
return Object.keys(t).length > 0 ? t : void 0;
|
|
1756
1776
|
}
|
|
1757
|
-
var
|
|
1758
|
-
const r = (u, d) => i(e.map((p, h) => h === u ?
|
|
1777
|
+
var gp = ({ templates: e, referencedTemplates: t, disabled: n, strings: o, onChange: i }) => {
|
|
1778
|
+
const r = (u, d) => i(e.map((p, h) => h === u ? bp(d) : p)), s = (u) => i(e.filter((d, p) => p !== u)), l = (u, d) => i(yp(e, u, d)), c = () => i([...e, vp(wp(e, o.newTemplateName))]);
|
|
1759
1779
|
return /* @__PURE__ */ b("section", {
|
|
1760
1780
|
className: "studio-editor-dialog-templates",
|
|
1761
1781
|
children: [
|
|
@@ -1824,14 +1844,14 @@ var fp = ({ templates: e, referencedTemplates: t, disabled: n, strings: o, onCha
|
|
|
1824
1844
|
]
|
|
1825
1845
|
});
|
|
1826
1846
|
};
|
|
1827
|
-
function
|
|
1847
|
+
function vp(e) {
|
|
1828
1848
|
return {
|
|
1829
1849
|
name: e,
|
|
1830
1850
|
slots: [{ name: "content" }],
|
|
1831
1851
|
behaviors: []
|
|
1832
1852
|
};
|
|
1833
1853
|
}
|
|
1834
|
-
function
|
|
1854
|
+
function bp(e) {
|
|
1835
1855
|
return {
|
|
1836
1856
|
name: e.name,
|
|
1837
1857
|
slots: e.slots.length > 0 ? e.slots : [{ name: "content" }],
|
|
@@ -1843,11 +1863,11 @@ function vp(e) {
|
|
|
1843
1863
|
...e.metadata ? { metadata: e.metadata } : {}
|
|
1844
1864
|
};
|
|
1845
1865
|
}
|
|
1846
|
-
function
|
|
1866
|
+
function yp(e, t, n) {
|
|
1847
1867
|
const o = [...e], [i] = o.splice(t, 1);
|
|
1848
1868
|
return i && o.splice(n, 0, i), o;
|
|
1849
1869
|
}
|
|
1850
|
-
function
|
|
1870
|
+
function wp(e, t) {
|
|
1851
1871
|
const n = new Set(e.map((o) => o.name));
|
|
1852
1872
|
if (!n.has(t)) return t;
|
|
1853
1873
|
for (let o = 2; ; o++) {
|
|
@@ -1855,34 +1875,34 @@ function yp(e, t) {
|
|
|
1855
1875
|
if (!n.has(i)) return i;
|
|
1856
1876
|
}
|
|
1857
1877
|
}
|
|
1858
|
-
var
|
|
1878
|
+
var kp = ({ controller: e, strings: t, disabled: n }) => /* @__PURE__ */ a(gp, {
|
|
1859
1879
|
templates: e.document.dialogTemplates,
|
|
1860
|
-
referencedTemplates:
|
|
1880
|
+
referencedTemplates: Sp(e.document),
|
|
1861
1881
|
disabled: n,
|
|
1862
1882
|
strings: t.properties.dialogTemplates,
|
|
1863
1883
|
onChange: (o) => e.setDialogTemplates(o, t.properties.dialogTemplates.label)
|
|
1864
1884
|
});
|
|
1865
|
-
function
|
|
1885
|
+
function Sp(e) {
|
|
1866
1886
|
const t = /* @__PURE__ */ new Set();
|
|
1867
|
-
return
|
|
1887
|
+
return vt(e.screens, t), vt(e.screenTemplates, t), vt(e.instanceContributions, t), t;
|
|
1868
1888
|
}
|
|
1869
|
-
function
|
|
1889
|
+
function vt(e, t) {
|
|
1870
1890
|
if (!e || typeof e != "object") return;
|
|
1871
1891
|
if (Array.isArray(e)) {
|
|
1872
|
-
for (const o of e)
|
|
1892
|
+
for (const o of e) vt(o, t);
|
|
1873
1893
|
return;
|
|
1874
1894
|
}
|
|
1875
1895
|
const n = e;
|
|
1876
1896
|
typeof n.dialog == "string" && n.dialog.length > 0 && t.add(n.dialog);
|
|
1877
|
-
for (const o of Object.values(n))
|
|
1897
|
+
for (const o of Object.values(n)) vt(o, t);
|
|
1878
1898
|
}
|
|
1879
|
-
var
|
|
1899
|
+
var Cp = (e, t, n = !1) => ({
|
|
1880
1900
|
kind: Y.ChangeLayoutType,
|
|
1881
1901
|
nodeId: e,
|
|
1882
1902
|
to: t,
|
|
1883
1903
|
...n ? { acceptLoss: !0 } : {}
|
|
1884
1904
|
});
|
|
1885
|
-
function
|
|
1905
|
+
function Np(e, t, n) {
|
|
1886
1906
|
if (t) return { kind: "applied" };
|
|
1887
1907
|
const o = n.find((i) => i.code === gs.LossyConversionNotAccepted);
|
|
1888
1908
|
return o ? {
|
|
@@ -1897,11 +1917,11 @@ function Cp(e, t, n) {
|
|
|
1897
1917
|
diagnostics: [...n]
|
|
1898
1918
|
};
|
|
1899
1919
|
}
|
|
1900
|
-
var
|
|
1920
|
+
var Tp = ({ inspection: e, controller: t, strings: n, disabled: o }) => {
|
|
1901
1921
|
const i = n.properties, [r, s] = j(), l = Jo(t.context.catalog, e.typeId), c = l?.capabilities.convertibleTo ?? [];
|
|
1902
1922
|
if (!l || c.length === 0) return null;
|
|
1903
1923
|
const u = (d) => {
|
|
1904
|
-
const p = t.tryApply(d, i.changeLayout), h =
|
|
1924
|
+
const p = t.tryApply(d, i.changeLayout), h = Np(d, p.applied, p.diagnostics);
|
|
1905
1925
|
s(h.kind === "confirm" ? {
|
|
1906
1926
|
lost: h.lost,
|
|
1907
1927
|
edit: h.edit
|
|
@@ -1912,7 +1932,7 @@ var Np = ({ inspection: e, controller: t, strings: n, disabled: o }) => {
|
|
|
1912
1932
|
children: [/* @__PURE__ */ b("label", { children: [/* @__PURE__ */ a("span", { children: i.layoutType }), /* @__PURE__ */ b("select", {
|
|
1913
1933
|
value: e.typeId,
|
|
1914
1934
|
disabled: o,
|
|
1915
|
-
onChange: (d) => u(
|
|
1935
|
+
onChange: (d) => u(Cp(e.nodeId, d.target.value)),
|
|
1916
1936
|
children: [/* @__PURE__ */ a("option", {
|
|
1917
1937
|
value: e.typeId,
|
|
1918
1938
|
children: l.label
|
|
@@ -1943,7 +1963,7 @@ var Np = ({ inspection: e, controller: t, strings: n, disabled: o }) => {
|
|
|
1943
1963
|
})]
|
|
1944
1964
|
});
|
|
1945
1965
|
};
|
|
1946
|
-
var
|
|
1966
|
+
var Ip = ({ location: e, strings: t }) => {
|
|
1947
1967
|
const n = t.properties.location, [o, i] = j(), [r, s] = j(""), [l, c] = j(), [u, d] = j(!1);
|
|
1948
1968
|
if (!e) return null;
|
|
1949
1969
|
const p = o?.featureId ?? e.currentFeatureId, h = o?.path ?? e.path, f = e.features.filter((m) => m.id !== p), g = async () => {
|
|
@@ -2015,7 +2035,7 @@ var Tp = ({ location: e, strings: t }) => {
|
|
|
2015
2035
|
]
|
|
2016
2036
|
});
|
|
2017
2037
|
};
|
|
2018
|
-
function
|
|
2038
|
+
function Pp(e, t, n, o = {}) {
|
|
2019
2039
|
const i = {
|
|
2020
2040
|
component: t,
|
|
2021
2041
|
path: n,
|
|
@@ -2029,7 +2049,7 @@ function Ip(e, t, n, o = {}) {
|
|
|
2029
2049
|
property: i
|
|
2030
2050
|
};
|
|
2031
2051
|
}
|
|
2032
|
-
function
|
|
2052
|
+
function xp(e, t, n) {
|
|
2033
2053
|
return {
|
|
2034
2054
|
kind: Y.UnexposeProperty,
|
|
2035
2055
|
owner: e,
|
|
@@ -2037,24 +2057,24 @@ function Pp(e, t, n) {
|
|
|
2037
2057
|
path: n
|
|
2038
2058
|
};
|
|
2039
2059
|
}
|
|
2040
|
-
var
|
|
2060
|
+
var Op = (e, t, n, o) => e.exposures.some((i) => i.owner === t && i.properties.some((r) => r.component === n && r.path === o)), Dp = [
|
|
2041
2061
|
ke.Add,
|
|
2042
2062
|
ke.Remove,
|
|
2043
2063
|
ke.Reorder,
|
|
2044
2064
|
ke.EditFields
|
|
2045
|
-
],
|
|
2065
|
+
], Rp = ({ inspection: e, componentId: t, controller: n, strings: o, authoringTemplate: i }) => {
|
|
2046
2066
|
const r = o.properties;
|
|
2047
2067
|
if (i === void 0) return null;
|
|
2048
2068
|
const s = e.properties.filter((l) => l.descriptor.valueType !== K.Object && l.descriptor.group !== "Placement");
|
|
2049
2069
|
return s.length === 0 ? null : /* @__PURE__ */ b("section", {
|
|
2050
2070
|
className: "studio-editor-properties__exposure",
|
|
2051
2071
|
children: [/* @__PURE__ */ a("strong", { children: r.exposure }), /* @__PURE__ */ a("ul", { children: s.map((l) => {
|
|
2052
|
-
const c = l.descriptor.path, u =
|
|
2072
|
+
const c = l.descriptor.path, u = Op(n.document, i, t, c), d = l.descriptor.valueType === K.Collection;
|
|
2053
2073
|
return /* @__PURE__ */ a("li", { children: /* @__PURE__ */ b("label", { children: [
|
|
2054
2074
|
/* @__PURE__ */ a("input", {
|
|
2055
2075
|
type: "checkbox",
|
|
2056
2076
|
checked: u,
|
|
2057
|
-
onChange: (p) => n.apply(p.target.checked ?
|
|
2077
|
+
onChange: (p) => n.apply(p.target.checked ? Pp(i, t, c, d ? { operations: Dp } : {}) : xp(i, t, c), u ? r.unexposeProperty : r.exposeProperty)
|
|
2058
2078
|
}),
|
|
2059
2079
|
/* @__PURE__ */ a("span", { children: l.descriptor.label }),
|
|
2060
2080
|
u && /* @__PURE__ */ a("em", { children: r.exposedToScopes })
|
|
@@ -2115,7 +2135,7 @@ function Si(e, t) {
|
|
|
2115
2135
|
};
|
|
2116
2136
|
}
|
|
2117
2137
|
var To = ({ registry: e, property: t, context: n, componentId: o, onChange: i, diagnostics: r, presentation: s = "field" }) => {
|
|
2118
|
-
const l = s === "popover", { descriptor: c } = t, u = `pe-${o}-${c.path}`.replace(/[^A-Za-z0-9_-]/g, "-"), d = e.resolve(c), p = Ja(t), { editor: h, failed: f } = Si(e, d?.id), { editor: g } = Si(e, p ? "bindingExpression" : void 0), m = n.strings.editors, v = !t.editable || c.readOnly === !0, w = t.editable ? c.readOnly === !0 ? m.readOnly : void 0 : t.reason ?? m.inherited, P = t.effectiveValue, x =
|
|
2138
|
+
const l = s === "popover", { descriptor: c } = t, u = `pe-${o}-${c.path}`.replace(/[^A-Za-z0-9_-]/g, "-"), d = e.resolve(c), p = Ja(t), { editor: h, failed: f } = Si(e, d?.id), { editor: g } = Si(e, p ? "bindingExpression" : void 0), m = n.strings.editors, v = !t.editable || c.readOnly === !0, w = t.editable ? c.readOnly === !0 ? m.readOnly : void 0 : t.reason ?? m.inherited, P = t.effectiveValue, x = Fp(t, r), C = P == null || !Ho(c) ? void 0 : dn(c, P) ?? Hn(c, P), k = C !== void 0 && dn(c, P) !== void 0 ? os(c, P) : void 0, y = k !== void 0 && dn(c, k) === void 0, T = (R) => i(t, R), M = p && Xa(P), I = c.valueType === "boolean", N = Ho(c);
|
|
2119
2139
|
return /* @__PURE__ */ b("div", {
|
|
2120
2140
|
className: `studio-editor-field${I ? " studio-editor-field--inline" : ""}`,
|
|
2121
2141
|
"data-property": c.path,
|
|
@@ -2208,7 +2228,7 @@ var To = ({ registry: e, property: t, context: n, componentId: o, onChange: i, d
|
|
|
2208
2228
|
]
|
|
2209
2229
|
});
|
|
2210
2230
|
};
|
|
2211
|
-
function
|
|
2231
|
+
function Fp(e, t) {
|
|
2212
2232
|
const n = t.find((o) => o.path === e.descriptor.path && o.severity === "error");
|
|
2213
2233
|
return n ? {
|
|
2214
2234
|
code: n.code,
|
|
@@ -2372,7 +2392,7 @@ var oe = /* @__PURE__ */ (function(e) {
|
|
|
2372
2392
|
})({}), Ci = {
|
|
2373
2393
|
Compact: "Compact",
|
|
2374
2394
|
Regular: "Regular"
|
|
2375
|
-
},
|
|
2395
|
+
}, Mp = {
|
|
2376
2396
|
ariaLabel: "Icon",
|
|
2377
2397
|
picker: {
|
|
2378
2398
|
placeholder: "Choose an icon",
|
|
@@ -2402,7 +2422,7 @@ var oe = /* @__PURE__ */ (function(e) {
|
|
|
2402
2422
|
"catalog-unavailable": "The icons of {library} could not be read, so they cannot be checked. Try again in a moment."
|
|
2403
2423
|
},
|
|
2404
2424
|
notAllowed: "This icon is not available for this field. Choose one of the icons the field offers."
|
|
2405
|
-
},
|
|
2425
|
+
}, Ap = {
|
|
2406
2426
|
inspectorTitle: "Inspector",
|
|
2407
2427
|
windowLabel: "Screen editor",
|
|
2408
2428
|
stopped: {
|
|
@@ -2506,7 +2526,7 @@ var oe = /* @__PURE__ */ (function(e) {
|
|
|
2506
2526
|
exposedToScopes: "Screens can change this",
|
|
2507
2527
|
itemsLabel: "Items",
|
|
2508
2528
|
addItem: "Add item",
|
|
2509
|
-
icon:
|
|
2529
|
+
icon: Mp,
|
|
2510
2530
|
structured: nr,
|
|
2511
2531
|
editors: ea,
|
|
2512
2532
|
templates: {
|
|
@@ -2542,9 +2562,9 @@ var oe = /* @__PURE__ */ (function(e) {
|
|
|
2542
2562
|
},
|
|
2543
2563
|
previewSize: "Size",
|
|
2544
2564
|
previewSizes: {
|
|
2545
|
-
[
|
|
2546
|
-
[
|
|
2547
|
-
[
|
|
2565
|
+
[gt.Desktop]: "Desktop",
|
|
2566
|
+
[gt.Tablet]: "Tablet",
|
|
2567
|
+
[gt.Phone]: "Phone"
|
|
2548
2568
|
},
|
|
2549
2569
|
previewFailed: "The preview could not be drawn.",
|
|
2550
2570
|
noPreview: "This template has no preview.",
|
|
@@ -2745,7 +2765,7 @@ var oe = /* @__PURE__ */ (function(e) {
|
|
|
2745
2765
|
[oe.NoChange]: "It is already there."
|
|
2746
2766
|
}
|
|
2747
2767
|
};
|
|
2748
|
-
function
|
|
2768
|
+
function _p(e, t) {
|
|
2749
2769
|
const n = e?.query, o = n !== null && typeof n == "object" && "queryId" in n ? n.queryId : void 0;
|
|
2750
2770
|
return typeof o == "string" ? t.find((i) => i.id === o)?.resultFields ?? [] : [];
|
|
2751
2771
|
}
|
|
@@ -2759,7 +2779,7 @@ function Io(e) {
|
|
|
2759
2779
|
...t.navigationModule !== void 0 ? { navigationModule: t.navigationModule } : {},
|
|
2760
2780
|
queryCandidates: n.queryCandidates,
|
|
2761
2781
|
availableSources: n.availableSources,
|
|
2762
|
-
fields:
|
|
2782
|
+
fields: _p(u, n.queryCandidates),
|
|
2763
2783
|
colorTokens: d?.colorTokens ?? [],
|
|
2764
2784
|
icons: {
|
|
2765
2785
|
catalog: p.icons,
|
|
@@ -2791,11 +2811,11 @@ function Io(e) {
|
|
|
2791
2811
|
} : g,
|
|
2792
2812
|
structured: f.structured ?? nr,
|
|
2793
2813
|
icon: f.icon,
|
|
2794
|
-
iconPicker: f.iconPickerLabels ??
|
|
2814
|
+
iconPicker: f.iconPickerLabels ?? Ap.properties.iconPickerLabels ?? {}
|
|
2795
2815
|
}
|
|
2796
2816
|
};
|
|
2797
2817
|
}
|
|
2798
|
-
function
|
|
2818
|
+
function $p(e, t, n) {
|
|
2799
2819
|
return {
|
|
2800
2820
|
...e,
|
|
2801
2821
|
session: {
|
|
@@ -2807,7 +2827,7 @@ function _p(e, t, n) {
|
|
|
2807
2827
|
}
|
|
2808
2828
|
};
|
|
2809
2829
|
}
|
|
2810
|
-
function
|
|
2830
|
+
function Lp(e) {
|
|
2811
2831
|
switch (e.valueType) {
|
|
2812
2832
|
case K.String:
|
|
2813
2833
|
return "text";
|
|
@@ -2833,7 +2853,7 @@ function $p(e) {
|
|
|
2833
2853
|
return "undescribed";
|
|
2834
2854
|
}
|
|
2835
2855
|
}
|
|
2836
|
-
var
|
|
2856
|
+
var Bp = class {
|
|
2837
2857
|
#e = /* @__PURE__ */ new Map();
|
|
2838
2858
|
#n = /* @__PURE__ */ new Map();
|
|
2839
2859
|
#t = /* @__PURE__ */ new Map();
|
|
@@ -2876,15 +2896,15 @@ var Lp = class {
|
|
|
2876
2896
|
id: e.editorKind,
|
|
2877
2897
|
tier: "package"
|
|
2878
2898
|
};
|
|
2879
|
-
const n =
|
|
2899
|
+
const n = Lp(e);
|
|
2880
2900
|
return n !== void 0 && this.#e.has(n) ? {
|
|
2881
2901
|
id: n,
|
|
2882
2902
|
tier: "default"
|
|
2883
2903
|
} : void 0;
|
|
2884
2904
|
}
|
|
2885
2905
|
};
|
|
2886
|
-
function
|
|
2887
|
-
const e = new
|
|
2906
|
+
function jp() {
|
|
2907
|
+
const e = new Bp();
|
|
2888
2908
|
e.register(X.Text, async () => (await import("./TextEditor-BEH-9K1S.js")).TextEditor), e.register(X.Number, async () => (await import("./NumberEditor-Cyo9_23Z.js")).NumberEditor), e.register(X.Boolean, async () => (await import("./BooleanEditor-eC1yCpz0.js")).BooleanEditor), e.register(X.Enum, async () => (await import("./EnumEditor-DNnnf9i3.js")).EnumEditor), e.register(X.Select, async () => (await import("./SelectEditor-CY6dlYWi.js")).SelectEditor), e.register(X.Color, async () => (await import("./ColorEditor-Cc6Xq8pW.js")).ColorEditor), e.register(X.Icon, async () => (await import("./IconEditor-qXyGbGEX.js")).IconEditor), e.register(X.List, async () => (await import("./ListEditor-CfFPVVJ4.js")).ListEditor), e.register(X.Reference, async () => (await import("./ReferenceEditor-CTguqJZC.js")).ReferenceEditor), e.register(X.NavigationTarget, async () => (await import("./NavigationTargetEditor-C53kuCBJ.js")).NavigationTargetEditor), e.register(X.RenderingSlot, async () => (await import("./RenderingSlotEditor-D0ppEIOx.js")).RenderingSlotEditor), e.register(X.Slice, async () => (await import("./SliceEditor-BdiU5-Tg.js")).SliceEditor), e.register(X.InheritanceMode, async () => (await import("./InheritanceModeEditor-CtdsACnc.js")).InheritanceModeEditor), e.register(X.Field, async () => (await import("./FieldEditor-e6VpsD__.js")).FieldEditor), e.register(X.ColumnList, async () => (await import("./ColumnListEditor-CmhQYS5b.js")).ColumnListEditor), e.register(X.Template, async () => (await import("./TemplatePropertyEditor-JGA5uEfP.js")).TemplatePropertyEditor), e.register(X.SampleData, async () => (await import("./ReferenceTargetEditors-Bx6dhIxY.js")).SampleDataEditor), e.register("object", async () => (await import("./StructuredPropertyEditor-Bd-8GBgK.js")).StructuredPropertyEditor), e.register("collection", async () => (await import("./CollectionEditor-DoTQJiqE.js")).CollectionEditor);
|
|
2889
2909
|
for (const t of [
|
|
2890
2910
|
X.StringList,
|
|
@@ -2904,7 +2924,7 @@ function Bp() {
|
|
|
2904
2924
|
]) e.register(t, async () => (await import("./SummaryEditor-C5wP1uIH.js")).SummaryEditor);
|
|
2905
2925
|
return e;
|
|
2906
2926
|
}
|
|
2907
|
-
var nn =
|
|
2927
|
+
var nn = jp(), Po = "presentation", xo = "arguments", Rt = (e) => typeof e == "string" ? e : "";
|
|
2908
2928
|
function na(e, t = "") {
|
|
2909
2929
|
const n = Rt(e?.command);
|
|
2910
2930
|
if (n === "") return;
|
|
@@ -2916,7 +2936,7 @@ function na(e, t = "") {
|
|
|
2916
2936
|
presentation: Object.values(ve).includes(r) ? r : ve.None
|
|
2917
2937
|
};
|
|
2918
2938
|
}
|
|
2919
|
-
function
|
|
2939
|
+
function Up(e) {
|
|
2920
2940
|
return {
|
|
2921
2941
|
command: e.sliceId,
|
|
2922
2942
|
[Po]: e.presentation,
|
|
@@ -2927,9 +2947,9 @@ function jp(e) {
|
|
|
2927
2947
|
}))
|
|
2928
2948
|
};
|
|
2929
2949
|
}
|
|
2930
|
-
function
|
|
2950
|
+
function Wp(e, t) {
|
|
2931
2951
|
const n = re(e);
|
|
2932
|
-
return Object.entries(
|
|
2952
|
+
return Object.entries(Up(t)).map(([o, i]) => ({
|
|
2933
2953
|
kind: Y.SetProperty,
|
|
2934
2954
|
nodeId: n,
|
|
2935
2955
|
path: o,
|
|
@@ -2942,12 +2962,12 @@ var Z = /* @__PURE__ */ (function(e) {
|
|
|
2942
2962
|
kind: Z.None,
|
|
2943
2963
|
target: ""
|
|
2944
2964
|
};
|
|
2945
|
-
function
|
|
2946
|
-
const t = e?.find((n) => n.name === Gn)?.bindings.find((n) =>
|
|
2947
|
-
return t ?
|
|
2965
|
+
function zp(e) {
|
|
2966
|
+
const t = e?.find((n) => n.name === Gn)?.bindings.find((n) => qp(n.trigger))?.actions[0];
|
|
2967
|
+
return t ? Gp(t) : oa;
|
|
2948
2968
|
}
|
|
2949
2969
|
function Ni(e, t) {
|
|
2950
|
-
const n = (e ?? []).filter((r) => r.name !== Gn), o =
|
|
2970
|
+
const n = (e ?? []).filter((r) => r.name !== Gn), o = Hp(t), i = o ? [...n, {
|
|
2951
2971
|
name: Gn,
|
|
2952
2972
|
bindings: [{
|
|
2953
2973
|
trigger: { kind: sr.Click },
|
|
@@ -2956,7 +2976,7 @@ function Ni(e, t) {
|
|
|
2956
2976
|
}] : n;
|
|
2957
2977
|
return i.length > 0 ? i : void 0;
|
|
2958
2978
|
}
|
|
2959
|
-
function
|
|
2979
|
+
function Hp(e) {
|
|
2960
2980
|
if (e.target !== "")
|
|
2961
2981
|
switch (e.kind) {
|
|
2962
2982
|
case Z.Navigate:
|
|
@@ -2978,7 +2998,7 @@ function zp(e) {
|
|
|
2978
2998
|
return;
|
|
2979
2999
|
}
|
|
2980
3000
|
}
|
|
2981
|
-
function
|
|
3001
|
+
function Gp(e) {
|
|
2982
3002
|
switch (e.kind) {
|
|
2983
3003
|
case lt.Navigate:
|
|
2984
3004
|
return {
|
|
@@ -2999,14 +3019,14 @@ function Hp(e) {
|
|
|
2999
3019
|
return oa;
|
|
3000
3020
|
}
|
|
3001
3021
|
}
|
|
3002
|
-
function
|
|
3022
|
+
function qp(e) {
|
|
3003
3023
|
return e?.kind === sr.Click;
|
|
3004
3024
|
}
|
|
3005
|
-
var
|
|
3006
|
-
const l =
|
|
3025
|
+
var Kp = ({ behaviors: e, targets: t, destinations: n, slices: o, strings: i, disabled: r, onChange: s }) => {
|
|
3026
|
+
const l = zp(e), [c, u] = j(Z.None), d = l.kind === Z.None ? {
|
|
3007
3027
|
kind: c,
|
|
3008
3028
|
target: ""
|
|
3009
|
-
} : l, p =
|
|
3029
|
+
} : l, p = Vp(d.kind, t, n, o), h = d.target !== "" && !p.some((m) => m.value === d.target), f = (m) => {
|
|
3010
3030
|
u(m), l.kind !== Z.None && s(Ni(e, {
|
|
3011
3031
|
kind: Z.None,
|
|
3012
3032
|
target: ""
|
|
@@ -3074,7 +3094,7 @@ var qp = ({ behaviors: e, targets: t, destinations: n, slices: o, strings: i, di
|
|
|
3074
3094
|
]
|
|
3075
3095
|
});
|
|
3076
3096
|
};
|
|
3077
|
-
function
|
|
3097
|
+
function Vp(e, t, n, o) {
|
|
3078
3098
|
switch (e) {
|
|
3079
3099
|
case Z.Navigate:
|
|
3080
3100
|
return n.map((i) => ({
|
|
@@ -3207,7 +3227,7 @@ var Oo = {
|
|
|
3207
3227
|
}, on = /* @__PURE__ */ (function(e) {
|
|
3208
3228
|
return e.Elements = "elements", e.Collection = "collection", e.Region = "region", e;
|
|
3209
3229
|
})({}), ia = (e) => "rejected" in e;
|
|
3210
|
-
function
|
|
3230
|
+
function Jp(e, t) {
|
|
3211
3231
|
switch (e.availability) {
|
|
3212
3232
|
case void 0:
|
|
3213
3233
|
return !0;
|
|
@@ -3218,8 +3238,8 @@ function Vp(e, t) {
|
|
|
3218
3238
|
}
|
|
3219
3239
|
}
|
|
3220
3240
|
var Do = cl;
|
|
3221
|
-
function
|
|
3222
|
-
if (!
|
|
3241
|
+
function Ft(e, t) {
|
|
3242
|
+
if (!Jp(e, t)) return {
|
|
3223
3243
|
visible: !1,
|
|
3224
3244
|
enabled: !1
|
|
3225
3245
|
};
|
|
@@ -3255,10 +3275,10 @@ var Ro = (e, t, n) => e.flatMap((o) => {
|
|
|
3255
3275
|
...o,
|
|
3256
3276
|
children: Ro(o.children, t, n)
|
|
3257
3277
|
} : o];
|
|
3258
|
-
}),
|
|
3278
|
+
}), Qp = (e) => Object.fromEntries(Object.entries(e).filter(([, t]) => t !== void 0)), Et = (e, t, n) => Ro(e, t, (o) => Qp({
|
|
3259
3279
|
...o,
|
|
3260
3280
|
...n
|
|
3261
|
-
})),
|
|
3281
|
+
})), Yp = (e, t) => Ro(e, t, () => {
|
|
3262
3282
|
});
|
|
3263
3283
|
function Qt(e, t) {
|
|
3264
3284
|
for (const n of e) {
|
|
@@ -3274,21 +3294,21 @@ function Ct(e, t) {
|
|
|
3274
3294
|
if (o) return o;
|
|
3275
3295
|
}
|
|
3276
3296
|
}
|
|
3277
|
-
function
|
|
3297
|
+
function Xp(e, t, n) {
|
|
3278
3298
|
const o = Ct(e, t);
|
|
3279
3299
|
if (!o) return [...e];
|
|
3280
3300
|
const i = o.findIndex((l) => l.id === t);
|
|
3281
3301
|
if (i < 0 || n < 0 || n >= o.length || i === n) return [...e];
|
|
3282
3302
|
const r = [...o], [s] = r.splice(i, 1);
|
|
3283
|
-
return r.splice(n, 0, s), o === e ? r :
|
|
3303
|
+
return r.splice(n, 0, s), o === e ? r : Fo(e, o, r);
|
|
3284
3304
|
}
|
|
3285
|
-
function
|
|
3305
|
+
function Fo(e, t, n) {
|
|
3286
3306
|
return e.map((o) => o.children === t ? {
|
|
3287
3307
|
...o,
|
|
3288
3308
|
children: n
|
|
3289
3309
|
} : o.children ? {
|
|
3290
3310
|
...o,
|
|
3291
|
-
children:
|
|
3311
|
+
children: Fo(o.children, t, n)
|
|
3292
3312
|
} : o);
|
|
3293
3313
|
}
|
|
3294
3314
|
var ra = (e, t) => ({
|
|
@@ -3296,7 +3316,7 @@ var ra = (e, t) => ({
|
|
|
3296
3316
|
id: t(),
|
|
3297
3317
|
...e.children ? { children: e.children.map((n) => ra(n, t)) } : {}
|
|
3298
3318
|
});
|
|
3299
|
-
function
|
|
3319
|
+
function Zp(e, t, n) {
|
|
3300
3320
|
const o = Qt(e, t), i = Ct(e, t);
|
|
3301
3321
|
if (!o || !i) return { items: [...e] };
|
|
3302
3322
|
const r = ra(o, n), s = i.findIndex((c) => c.id === t) + 1, l = [
|
|
@@ -3305,22 +3325,22 @@ function Xp(e, t, n) {
|
|
|
3305
3325
|
...i.slice(s)
|
|
3306
3326
|
];
|
|
3307
3327
|
return {
|
|
3308
|
-
items: i === e ? l :
|
|
3328
|
+
items: i === e ? l : Fo(e, i, l),
|
|
3309
3329
|
copy: r
|
|
3310
3330
|
};
|
|
3311
3331
|
}
|
|
3312
|
-
var
|
|
3332
|
+
var em = () => ({
|
|
3313
3333
|
application: { regions: [] },
|
|
3314
3334
|
modules: []
|
|
3315
|
-
}), Ti = (e) => e.navigation ??
|
|
3335
|
+
}), Ti = (e) => e.navigation ?? em(), tm = (e, t) => ({
|
|
3316
3336
|
...e,
|
|
3317
3337
|
navigation: t
|
|
3318
3338
|
});
|
|
3319
|
-
function
|
|
3339
|
+
function nm(e, t, n) {
|
|
3320
3340
|
return (t === void 0 ? e.application.regions : e.modules.find((o) => o.module === t)?.regions ?? []).find((o) => o.region === n)?.items ?? [];
|
|
3321
3341
|
}
|
|
3322
|
-
var
|
|
3323
|
-
function
|
|
3342
|
+
var om = (e) => e;
|
|
3343
|
+
function im(e, t) {
|
|
3324
3344
|
if (!t?.module) return;
|
|
3325
3345
|
const n = e.modules.find((r) => r.id === t.module);
|
|
3326
3346
|
if (!n) return t.module;
|
|
@@ -3334,13 +3354,13 @@ function om(e, t) {
|
|
|
3334
3354
|
return [n.name, ...o].join(" › ");
|
|
3335
3355
|
}
|
|
3336
3356
|
function aa(e) {
|
|
3337
|
-
const { region: t, module: n, navigation: o, structure: i, newId: r, slots: s, startingLabel: l, strings: c } = e, u = ur(i, o, n, t), d =
|
|
3357
|
+
const { region: t, module: n, navigation: o, structure: i, newId: r, slots: s, startingLabel: l, strings: c } = e, u = ur(i, o, n, t), d = nm(o, n, t), p = Ms(i, o, { slots: [...s] }), h = (x) => `${n ?? "application"}:${t}:${x}`, f = [], g = (x, C) => {
|
|
3338
3358
|
const k = x.filter((y) => !y.readOnly);
|
|
3339
3359
|
x.forEach((y) => {
|
|
3340
3360
|
const T = Qt(d, y.id)?.target ?? (y.target ? {
|
|
3341
3361
|
module: y.target.module,
|
|
3342
3362
|
...y.target.feature ? { feature: y.target.feature } : {}
|
|
3343
|
-
} : void 0), M = y.readOnly ? -1 : k.indexOf(y), I =
|
|
3363
|
+
} : void 0), M = y.readOnly ? -1 : k.indexOf(y), I = im(i, T), N = p.filter((R) => R.entry === h(y.id)).map((R) => ({
|
|
3344
3364
|
code: R.code,
|
|
3345
3365
|
message: R.message
|
|
3346
3366
|
}));
|
|
@@ -3403,7 +3423,7 @@ function aa(e) {
|
|
|
3403
3423
|
region: {
|
|
3404
3424
|
region: m,
|
|
3405
3425
|
...n !== void 0 ? { module: n } : {},
|
|
3406
|
-
...u.mode ? { mode:
|
|
3426
|
+
...u.mode ? { mode: om(u.mode) } : {}
|
|
3407
3427
|
},
|
|
3408
3428
|
add: (x) => x === _.addItem ? P() : { rejected: x },
|
|
3409
3429
|
act: (x, C) => {
|
|
@@ -3413,35 +3433,35 @@ function aa(e) {
|
|
|
3413
3433
|
case _.moveEarlier:
|
|
3414
3434
|
case _.moveLater: {
|
|
3415
3435
|
const k = C.index + (x === _.moveEarlier ? -1 : 1), y = Ct(d, C.id);
|
|
3416
|
-
return !y || k < 0 || k >= y.length ? { rejected: "noWhere" } : v("Move", w(
|
|
3436
|
+
return !y || k < 0 || k >= y.length ? { rejected: "noWhere" } : v("Move", w(Xp(d, C.id, k)), { itemId: C.id });
|
|
3417
3437
|
}
|
|
3418
3438
|
case _.duplicate: {
|
|
3419
|
-
const k =
|
|
3439
|
+
const k = Zp(d, C.id, r);
|
|
3420
3440
|
return k.copy ? v("Duplicate", w(k.items), { itemId: k.copy.id }) : { rejected: x };
|
|
3421
3441
|
}
|
|
3422
3442
|
case _.delete: {
|
|
3423
3443
|
const k = Ct(d, C.id) ?? [], y = k.findIndex((M) => M.id === C.id), T = k[y + 1] ?? k[y - 1];
|
|
3424
|
-
return v("Remove", w(
|
|
3444
|
+
return v("Remove", w(Yp(d, C.id)), { itemId: T?.id ?? null });
|
|
3425
3445
|
}
|
|
3426
3446
|
default:
|
|
3427
3447
|
return { rejected: x };
|
|
3428
3448
|
}
|
|
3429
3449
|
},
|
|
3430
|
-
rename: (x, C) => v("Rename", w(
|
|
3450
|
+
rename: (x, C) => v("Rename", w(Et(d, x.id, { title: C })), { itemId: x.id }),
|
|
3431
3451
|
choice: (x, C) => {
|
|
3432
3452
|
const k = Qt(d, C.id);
|
|
3433
3453
|
if (k) {
|
|
3434
3454
|
if (x === _.target) return {
|
|
3435
3455
|
property: Nn("target", "Navigate to", "navigationItemTarget", k.target),
|
|
3436
|
-
plan: (y) => v("Link", w(
|
|
3456
|
+
plan: (y) => v("Link", w(Et(d, C.id, { target: rm(y) ? y : void 0 })), { itemId: C.id })
|
|
3437
3457
|
};
|
|
3438
3458
|
if (x === _.slot) return {
|
|
3439
3459
|
property: Nn("slot", "Render into slot", "renderingSlot", k.slot ?? "content"),
|
|
3440
|
-
plan: (y) => v("Change", w(
|
|
3460
|
+
plan: (y) => v("Change", w(Et(d, C.id, { slot: typeof y == "string" && y !== "content" ? y : void 0 })), { itemId: C.id })
|
|
3441
3461
|
};
|
|
3442
3462
|
if (x === "icon") return {
|
|
3443
3463
|
property: Nn("icon", "Icon", "icon", k.icon),
|
|
3444
|
-
plan: (y) => v("Change", w(
|
|
3464
|
+
plan: (y) => v("Change", w(Et(d, C.id, { icon: typeof y == "string" && y !== "" ? y : void 0 })), { itemId: C.id })
|
|
3445
3465
|
};
|
|
3446
3466
|
}
|
|
3447
3467
|
},
|
|
@@ -3460,7 +3480,7 @@ function aa(e) {
|
|
|
3460
3480
|
}]
|
|
3461
3481
|
};
|
|
3462
3482
|
}
|
|
3463
|
-
var
|
|
3483
|
+
var rm = (e) => typeof e == "object" && e !== null && typeof e.module == "string";
|
|
3464
3484
|
function Nn(e, t, n, o) {
|
|
3465
3485
|
return {
|
|
3466
3486
|
descriptor: {
|
|
@@ -3477,7 +3497,7 @@ function Nn(e, t, n, o) {
|
|
|
3477
3497
|
};
|
|
3478
3498
|
}
|
|
3479
3499
|
var Nt = () => globalThis.crypto.randomUUID(), Ii = (e) => typeof e == "string" ? e : "";
|
|
3480
|
-
function
|
|
3500
|
+
function am({ componentId: e, property: t, newId: n, startingLabel: o, startingDestination: i }) {
|
|
3481
3501
|
const r = t.descriptor.path, s = t.items ?? [], l = s.filter((f) => f.editable), c = new Set(t.operations ?? []), u = {
|
|
3482
3502
|
component: e,
|
|
3483
3503
|
path: r
|
|
@@ -3622,9 +3642,9 @@ function la(e, t, n, o = {}, i = {}) {
|
|
|
3622
3642
|
slots: i
|
|
3623
3643
|
};
|
|
3624
3644
|
}
|
|
3625
|
-
var
|
|
3645
|
+
var sm = (e, t) => e.descriptor.valueType === "number" && typeof t == "string" ? t.trim() === "" ? void 0 : Number(t) : t;
|
|
3626
3646
|
function qn(e, t, n) {
|
|
3627
|
-
const o =
|
|
3647
|
+
const o = sm(t, n);
|
|
3628
3648
|
return t.editTarget === vs.Instance ? o === void 0 ? {
|
|
3629
3649
|
kind: Y.ResetInstanceValue,
|
|
3630
3650
|
component: e,
|
|
@@ -3652,7 +3672,7 @@ function ca(e, t, n) {
|
|
|
3652
3672
|
const { button: i, converted: r } = js(new Zt(e), o);
|
|
3653
3673
|
return r && i.slice ? { slice: i.slice } : void 0;
|
|
3654
3674
|
}
|
|
3655
|
-
function
|
|
3675
|
+
function lm(e, t) {
|
|
3656
3676
|
return [{
|
|
3657
3677
|
kind: Y.SetProperty,
|
|
3658
3678
|
nodeId: re(e),
|
|
@@ -3664,7 +3684,7 @@ function sm(e, t) {
|
|
|
3664
3684
|
path: "target"
|
|
3665
3685
|
}];
|
|
3666
3686
|
}
|
|
3667
|
-
function
|
|
3687
|
+
function cm(e, t) {
|
|
3668
3688
|
const n = structuredClone(e);
|
|
3669
3689
|
return Kn(n, t), n;
|
|
3670
3690
|
}
|
|
@@ -3685,7 +3705,7 @@ var Vn = (e) => typeof e == "string" ? e : "", rn = { [_.addButton]: {
|
|
|
3685
3705
|
isUnlinked: (e, t) => Vn(t.slice) === "" && Vn(t.target) === "" && t.destination === void 0,
|
|
3686
3706
|
startingProperties: { kind: "Action" }
|
|
3687
3707
|
} };
|
|
3688
|
-
function
|
|
3708
|
+
function dm({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i, startingLabel: r, structure: s }) {
|
|
3689
3709
|
const l = rn[t];
|
|
3690
3710
|
if (!l) return;
|
|
3691
3711
|
const c = e.slots?.[l.slot] ?? [], u = c.map((h, f) => {
|
|
@@ -3748,7 +3768,7 @@ function cm({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i
|
|
|
3748
3768
|
};
|
|
3749
3769
|
}
|
|
3750
3770
|
case _.duplicate:
|
|
3751
|
-
return p(
|
|
3771
|
+
return p(cm(g, i), f.index + 1, "Duplicate");
|
|
3752
3772
|
case _.delete: {
|
|
3753
3773
|
const m = c[f.index + 1] ?? c[f.index - 1];
|
|
3754
3774
|
return {
|
|
@@ -3787,7 +3807,7 @@ function cm({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i
|
|
|
3787
3807
|
readOnlyActions: () => []
|
|
3788
3808
|
};
|
|
3789
3809
|
}
|
|
3790
|
-
function
|
|
3810
|
+
function um(e) {
|
|
3791
3811
|
const { roots: t, catalog: n, selectedId: o, selectedItemId: i } = e;
|
|
3792
3812
|
if (!o) return;
|
|
3793
3813
|
const r = ze(t, o);
|
|
@@ -3812,14 +3832,14 @@ function xi(e, t, n, o, i) {
|
|
|
3812
3832
|
let p;
|
|
3813
3833
|
if (d.itemsPath !== void 0) {
|
|
3814
3834
|
const f = s(t.id)?.properties.find((g) => g.descriptor.path === d.itemsPath);
|
|
3815
|
-
p = f &&
|
|
3835
|
+
p = f && am({
|
|
3816
3836
|
componentId: t.id,
|
|
3817
3837
|
property: f,
|
|
3818
3838
|
newId: c,
|
|
3819
3839
|
startingLabel: u.item,
|
|
3820
3840
|
...e.startingDestination ? { startingDestination: e.startingDestination } : {}
|
|
3821
3841
|
});
|
|
3822
|
-
} else rn[n] ? p =
|
|
3842
|
+
} else rn[n] ? p = dm({
|
|
3823
3843
|
component: t,
|
|
3824
3844
|
addActionId: n,
|
|
3825
3845
|
ownershipOf: l,
|
|
@@ -3838,14 +3858,14 @@ function xi(e, t, n, o, i) {
|
|
|
3838
3858
|
...h ? { selected: h } : {}
|
|
3839
3859
|
};
|
|
3840
3860
|
}
|
|
3841
|
-
function
|
|
3861
|
+
function pm({ controller: e, environment: t, strings: n, startingLabels: o, startingDestination: i, otherSource: r }) {
|
|
3842
3862
|
const [s, l] = j(0), [c, u] = j(""), [d, p] = j("");
|
|
3843
3863
|
ce(() => {
|
|
3844
3864
|
if (d === "") return;
|
|
3845
3865
|
const N = setTimeout(() => p(""), 4e3);
|
|
3846
3866
|
return () => clearTimeout(N);
|
|
3847
3867
|
}, [d]);
|
|
3848
|
-
const { document: h, composition: f, context: g, selectedId: m, ownershipOf: v, selectedItemId: w, navigation: P, navigationModule: x, structure: C } = e, k = t.navigation?.slots ?? t.propertyEditors?.slots ??
|
|
3868
|
+
const { document: h, composition: f, context: g, selectedId: m, ownershipOf: v, selectedItemId: w, navigation: P, navigationModule: x, structure: C } = e, k = t.navigation?.slots ?? t.propertyEditors?.slots ?? mm, y = z((N) => {
|
|
3849
3869
|
const R = an(N.componentName);
|
|
3850
3870
|
return R ? aa({
|
|
3851
3871
|
region: R,
|
|
@@ -3873,7 +3893,7 @@ function um({ controller: e, environment: t, strings: n, startingLabels: o, star
|
|
|
3873
3893
|
n,
|
|
3874
3894
|
r,
|
|
3875
3895
|
w
|
|
3876
|
-
]), T = U(() =>
|
|
3896
|
+
]), T = U(() => um({
|
|
3877
3897
|
roots: f.roots,
|
|
3878
3898
|
catalog: g.catalog,
|
|
3879
3899
|
selectedId: m,
|
|
@@ -3905,7 +3925,7 @@ function um({ controller: e, environment: t, strings: n, startingLabels: o, star
|
|
|
3905
3925
|
if (!B.applied)
|
|
3906
3926
|
return u(n.announce.refused("rejected" in B && B.rejected || "diagnostics" in B && B.diagnostics[0]?.message || N.label)), !1;
|
|
3907
3927
|
const { select: S } = N;
|
|
3908
|
-
return S?.elementId !== void 0 && e.select(S.elementId), S?.itemId !== void 0 && e.selectItem(S.itemId === null ? void 0 : T?.componentId ?? m, S.itemId === null ? void 0 : S.itemId), N.notice && (u(N.notice), p(N.notice)), N.renameNext && l((
|
|
3928
|
+
return S?.elementId !== void 0 && e.select(S.elementId), S?.itemId !== void 0 && e.selectItem(S.itemId === null ? void 0 : T?.componentId ?? m, S.itemId === null ? void 0 : S.itemId), N.notice && (u(N.notice), p(N.notice)), N.renameNext && l((E) => E + 1), R && !N.notice && u(R(N)), !0;
|
|
3909
3929
|
}, [
|
|
3910
3930
|
e,
|
|
3911
3931
|
n,
|
|
@@ -3957,7 +3977,7 @@ function um({ controller: e, environment: t, strings: n, startingLabels: o, star
|
|
|
3957
3977
|
}, [w, e])
|
|
3958
3978
|
};
|
|
3959
3979
|
}
|
|
3960
|
-
var
|
|
3980
|
+
var mm = ["content"];
|
|
3961
3981
|
function an(e) {
|
|
3962
3982
|
const t = e.slice(e.lastIndexOf(":") + 1).toLowerCase();
|
|
3963
3983
|
return t === "topbar" ? Go.Topbar : t === "sidebar" ? Go.Sidebar : void 0;
|
|
@@ -3965,7 +3985,7 @@ function an(e) {
|
|
|
3965
3985
|
var da = (e) => ({
|
|
3966
3986
|
content: e.mainArea,
|
|
3967
3987
|
aside: e.sidePanel
|
|
3968
|
-
}),
|
|
3988
|
+
}), hm = [
|
|
3969
3989
|
De.Inherit,
|
|
3970
3990
|
De.Extend,
|
|
3971
3991
|
De.Override
|
|
@@ -4010,8 +4030,8 @@ var da = (e) => ({
|
|
|
4010
4030
|
inCanvas: !1,
|
|
4011
4031
|
bindingScope: h,
|
|
4012
4032
|
slotNames: da(o)
|
|
4013
|
-
}), k = g.region?.mode, y = (S,
|
|
4014
|
-
const $ = hr(s, c, u, S, { copy:
|
|
4033
|
+
}), k = g.region?.mode, y = (S, E = !1) => {
|
|
4034
|
+
const $ = hr(s, c, u, S, { copy: E });
|
|
4015
4035
|
$.rejected || $.edits.length === 0 || e.applyNavigationEdits($.edits, "Region mode");
|
|
4016
4036
|
}, T = (S) => {
|
|
4017
4037
|
if (S !== k) {
|
|
@@ -4023,28 +4043,28 @@ var da = (e) => ({
|
|
|
4023
4043
|
}
|
|
4024
4044
|
}, M = P ? !P.readOnly : !1, I = (S) => {
|
|
4025
4045
|
!S || "rejected" in S || S.navigationEdits && e.applyNavigationEdits(S.navigationEdits, S.label);
|
|
4026
|
-
}, N = (S,
|
|
4046
|
+
}, N = (S, E) => {
|
|
4027
4047
|
if (P)
|
|
4028
4048
|
switch (S.descriptor.path) {
|
|
4029
4049
|
case "label":
|
|
4030
|
-
typeof
|
|
4050
|
+
typeof E == "string" && E !== "" && I(g.rename(P, E));
|
|
4031
4051
|
break;
|
|
4032
4052
|
case "target":
|
|
4033
|
-
I(g.choice("target", P)?.plan(
|
|
4053
|
+
I(g.choice("target", P)?.plan(E));
|
|
4034
4054
|
break;
|
|
4035
4055
|
case "slot":
|
|
4036
|
-
I(g.choice("slot", P)?.plan(
|
|
4056
|
+
I(g.choice("slot", P)?.plan(E));
|
|
4037
4057
|
break;
|
|
4038
4058
|
case "icon":
|
|
4039
|
-
I(g.choice("icon", P)?.plan(
|
|
4059
|
+
I(g.choice("icon", P)?.plan(E));
|
|
4040
4060
|
}
|
|
4041
4061
|
}, R = s.application.logo, B = (S) => {
|
|
4042
|
-
const
|
|
4062
|
+
const E = Gs(s, c, {
|
|
4043
4063
|
image: R?.image ?? "",
|
|
4044
4064
|
title: R?.title ?? "",
|
|
4045
4065
|
...S
|
|
4046
4066
|
});
|
|
4047
|
-
|
|
4067
|
+
E.rejected || e.applyNavigationEdits(E.edits, "Logo");
|
|
4048
4068
|
};
|
|
4049
4069
|
return /* @__PURE__ */ a("section", {
|
|
4050
4070
|
className: "studio-editor-properties__navigation",
|
|
@@ -4106,7 +4126,7 @@ var da = (e) => ({
|
|
|
4106
4126
|
className: "studio-editor-mode-cards",
|
|
4107
4127
|
role: "radiogroup",
|
|
4108
4128
|
"aria-label": o.modeTitle(w, v),
|
|
4109
|
-
children:
|
|
4129
|
+
children: hm.map((S) => /* @__PURE__ */ b("button", {
|
|
4110
4130
|
type: "button",
|
|
4111
4131
|
role: "radio",
|
|
4112
4132
|
"aria-checked": S === k,
|
|
@@ -4167,9 +4187,9 @@ var da = (e) => ({
|
|
|
4167
4187
|
})
|
|
4168
4188
|
] })
|
|
4169
4189
|
});
|
|
4170
|
-
},
|
|
4190
|
+
}, fm = (e) => e.slots?.items ?? [];
|
|
4171
4191
|
function Di(e, t) {
|
|
4172
|
-
const n =
|
|
4192
|
+
const n = fm(t).flatMap((r) => {
|
|
4173
4193
|
const { id: s, properties: l } = r, c = ho(s, l);
|
|
4174
4194
|
return c ? [c] : [];
|
|
4175
4195
|
});
|
|
@@ -4182,8 +4202,8 @@ function Di(e, t) {
|
|
|
4182
4202
|
button: r.button
|
|
4183
4203
|
}));
|
|
4184
4204
|
}
|
|
4185
|
-
var
|
|
4186
|
-
const o = (t.designMode ?? Oo).toolbar, { structure: i } = e, r =
|
|
4205
|
+
var gm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), vm = (e) => /(^|:)toolbar$/.test(String(e.componentName ?? "")), bm = ({ controller: e, strings: t, element: n }) => {
|
|
4206
|
+
const o = (t.designMode ?? Oo).toolbar, { structure: i } = e, r = gm(n), s = vm(n), l = n.properties ?? {}, c = U(() => {
|
|
4187
4207
|
if (!r || i.modules.length === 0) return;
|
|
4188
4208
|
const g = ho(n.id, l);
|
|
4189
4209
|
if (!g) return;
|
|
@@ -4241,7 +4261,7 @@ var fm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), gm = (e)
|
|
|
4241
4261
|
children: [o.upgradeNote(p.slice), /* @__PURE__ */ a("button", {
|
|
4242
4262
|
type: "button",
|
|
4243
4263
|
"data-action": "upgrade",
|
|
4244
|
-
onClick: () => e.applyAll(
|
|
4264
|
+
onClick: () => e.applyAll(lm(n.id, p.slice), o.upgrade),
|
|
4245
4265
|
children: o.upgrade
|
|
4246
4266
|
})]
|
|
4247
4267
|
}),
|
|
@@ -4256,7 +4276,7 @@ var fm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), gm = (e)
|
|
|
4256
4276
|
label: t.properties.diagnostics
|
|
4257
4277
|
})]
|
|
4258
4278
|
});
|
|
4259
|
-
},
|
|
4279
|
+
}, ym = (e, t) => e.find((n) => n.component === t), wm = /* @__PURE__ */ new Set([xo]), km = ({ controller: e, environment: t, strings: n, ownership: o, authoringTemplate: i }) => {
|
|
4260
4280
|
const { inspection: r, selectedId: s, selection: l } = e, c = n.properties, u = U(() => So(t.availableSources), [t.availableSources]), d = U(() => tr(e.document, e.composition.roots, e.context, t.availableSources, t.queryCandidates), [
|
|
4261
4281
|
e.document,
|
|
4262
4282
|
e.composition.roots,
|
|
@@ -4281,7 +4301,7 @@ var fm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), gm = (e)
|
|
|
4281
4301
|
className: "studio-editor-properties__header",
|
|
4282
4302
|
children: /* @__PURE__ */ a("strong", { children: c.screenLabel })
|
|
4283
4303
|
}),
|
|
4284
|
-
/* @__PURE__ */ a(
|
|
4304
|
+
/* @__PURE__ */ a(Ip, {
|
|
4285
4305
|
location: t.location,
|
|
4286
4306
|
strings: n
|
|
4287
4307
|
}),
|
|
@@ -4291,12 +4311,12 @@ var fm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), gm = (e)
|
|
|
4291
4311
|
strings: n,
|
|
4292
4312
|
disabled: !1
|
|
4293
4313
|
}),
|
|
4294
|
-
/* @__PURE__ */ a(
|
|
4314
|
+
/* @__PURE__ */ a(kp, {
|
|
4295
4315
|
controller: e,
|
|
4296
4316
|
strings: n,
|
|
4297
4317
|
disabled: !1
|
|
4298
4318
|
}),
|
|
4299
|
-
/* @__PURE__ */ a(
|
|
4319
|
+
/* @__PURE__ */ a(Bu, {
|
|
4300
4320
|
controller: e,
|
|
4301
4321
|
slices: t.stateChangeSlices,
|
|
4302
4322
|
strings: n,
|
|
@@ -4312,7 +4332,7 @@ var fm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), gm = (e)
|
|
|
4312
4332
|
strings: n
|
|
4313
4333
|
})
|
|
4314
4334
|
});
|
|
4315
|
-
const p = Ya(e.composition.roots, s), h = wu(r.properties, p, l.properties), { runtime: f } = t, g =
|
|
4335
|
+
const p = Ya(e.composition.roots, s), h = wu(r.properties, p, l.properties), { runtime: f } = t, g = ym(e.context.catalog.components, r.typeId), m = g ? f.packageDescriptorOf(g) : void 0, v = (S) => !!m && f.designTime.propertyEditor(m, S.descriptor).contribution !== void 0, w = t.propertyEditors?.registry ?? nn, P = [...r.diagnostics, ...e.diagnostics], x = Nu(h, r.typeId, (S) => wm.has(S.descriptor.path) || v(S)), C = Tu(x), k = {
|
|
4316
4336
|
controller: e,
|
|
4317
4337
|
environment: t,
|
|
4318
4338
|
strings: n,
|
|
@@ -4345,7 +4365,7 @@ var fm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), gm = (e)
|
|
|
4345
4365
|
environment: t,
|
|
4346
4366
|
strings: n
|
|
4347
4367
|
}),
|
|
4348
|
-
l && /* @__PURE__ */ a(
|
|
4368
|
+
l && /* @__PURE__ */ a(bm, {
|
|
4349
4369
|
controller: e,
|
|
4350
4370
|
strings: n,
|
|
4351
4371
|
element: l
|
|
@@ -4354,7 +4374,7 @@ var fm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), gm = (e)
|
|
|
4354
4374
|
diagnostics: cs(P),
|
|
4355
4375
|
label: c.diagnostics
|
|
4356
4376
|
}),
|
|
4357
|
-
/* @__PURE__ */ a(
|
|
4377
|
+
/* @__PURE__ */ a(Tp, {
|
|
4358
4378
|
inspection: r,
|
|
4359
4379
|
controller: e,
|
|
4360
4380
|
strings: n,
|
|
@@ -4368,7 +4388,7 @@ var fm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), gm = (e)
|
|
|
4368
4388
|
authoringTemplate: i
|
|
4369
4389
|
}),
|
|
4370
4390
|
g && qe(l) && /* @__PURE__ */ b(le, { children: [
|
|
4371
|
-
/* @__PURE__ */ a(
|
|
4391
|
+
/* @__PURE__ */ a(Au, {
|
|
4372
4392
|
component: l,
|
|
4373
4393
|
descriptor: g,
|
|
4374
4394
|
controller: e,
|
|
@@ -4383,7 +4403,7 @@ var fm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), gm = (e)
|
|
|
4383
4403
|
strings: n,
|
|
4384
4404
|
disabled: o !== void 0 && o !== "local"
|
|
4385
4405
|
}),
|
|
4386
|
-
/* @__PURE__ */ a(
|
|
4406
|
+
/* @__PURE__ */ a(Mu, {
|
|
4387
4407
|
component: l,
|
|
4388
4408
|
descriptor: g,
|
|
4389
4409
|
properties: r.properties.filter((S) => !Kr(r.typeId, S.descriptor.path)),
|
|
@@ -4403,14 +4423,14 @@ var fm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), gm = (e)
|
|
|
4403
4423
|
children: [/* @__PURE__ */ a("h4", {
|
|
4404
4424
|
className: "studio-editor-properties__group-title",
|
|
4405
4425
|
children: S.name
|
|
4406
|
-
}), S.properties.map((
|
|
4426
|
+
}), S.properties.map((E) => /* @__PURE__ */ a(To, {
|
|
4407
4427
|
registry: w,
|
|
4408
|
-
property:
|
|
4409
|
-
context:
|
|
4428
|
+
property: E,
|
|
4429
|
+
context: $p(y, k, E),
|
|
4410
4430
|
componentId: s,
|
|
4411
4431
|
onChange: e.setProperty,
|
|
4412
4432
|
diagnostics: P
|
|
4413
|
-
}, `${s}:${
|
|
4433
|
+
}, `${s}:${E.descriptor.path}`))]
|
|
4414
4434
|
}, S.name)),
|
|
4415
4435
|
T && /* @__PURE__ */ a(Ou, {
|
|
4416
4436
|
action: na(B, t.stateChangeSlices.find((S) => S.id === B?.command)?.name ?? ""),
|
|
@@ -4419,9 +4439,9 @@ var fm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), gm = (e)
|
|
|
4419
4439
|
strings: n,
|
|
4420
4440
|
disabled: o !== void 0 && o !== "local",
|
|
4421
4441
|
suggestSource: (S) => S === "id" || S.endsWith("Id") ? "row.id" : void 0,
|
|
4422
|
-
onChange: (S) => S && e.applyAll(
|
|
4442
|
+
onChange: (S) => S && e.applyAll(Wp(s, S), n.properties.action.label)
|
|
4423
4443
|
}),
|
|
4424
|
-
I && /* @__PURE__ */ a(
|
|
4444
|
+
I && /* @__PURE__ */ a(ap, {
|
|
4425
4445
|
elementId: s,
|
|
4426
4446
|
command: typeof B?.command == "string" ? B.command : void 0,
|
|
4427
4447
|
slices: t.stateChangeSlices,
|
|
@@ -4429,12 +4449,12 @@ var fm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), gm = (e)
|
|
|
4429
4449
|
strings: n,
|
|
4430
4450
|
disabled: R,
|
|
4431
4451
|
onCommandChange: (S) => {
|
|
4432
|
-
e.applyAll([
|
|
4452
|
+
e.applyAll([Lu(s, S)], n.properties.commandForm.label).applied && S && !N.some((E) => E.forCommand === S.name) && e.setScreenForms([...N, zn(S)], n.properties.commandForm.createForm(S.name));
|
|
4433
4453
|
},
|
|
4434
|
-
onFormChange: (S) => e.setScreenForms(N.map((
|
|
4454
|
+
onFormChange: (S) => e.setScreenForms(N.map((E) => E.forCommand === S.forCommand ? S : E), n.properties.forms.label),
|
|
4435
4455
|
onFormCreate: (S) => e.setScreenForms([...N, zn(S)], n.properties.commandForm.createForm(S.name))
|
|
4436
4456
|
}),
|
|
4437
|
-
M && /* @__PURE__ */ a(
|
|
4457
|
+
M && /* @__PURE__ */ a(Kp, {
|
|
4438
4458
|
behaviors: l.behaviors,
|
|
4439
4459
|
targets: ds(t, e.document),
|
|
4440
4460
|
destinations: t.destinations,
|
|
@@ -4443,7 +4463,7 @@ var fm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), gm = (e)
|
|
|
4443
4463
|
disabled: R,
|
|
4444
4464
|
onChange: (S) => e.setElementBehaviors(s, S, n.properties.toolbarButton.label)
|
|
4445
4465
|
}, s),
|
|
4446
|
-
/* @__PURE__ */ a(
|
|
4466
|
+
/* @__PURE__ */ a(Rp, {
|
|
4447
4467
|
inspection: r,
|
|
4448
4468
|
componentId: s,
|
|
4449
4469
|
controller: e,
|
|
@@ -4478,7 +4498,7 @@ var fm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), gm = (e)
|
|
|
4478
4498
|
tabs: [{
|
|
4479
4499
|
id: Sn.Properties,
|
|
4480
4500
|
label: e.propertiesTab,
|
|
4481
|
-
content: /* @__PURE__ */ a(
|
|
4501
|
+
content: /* @__PURE__ */ a(km, {
|
|
4482
4502
|
controller: t,
|
|
4483
4503
|
environment: n,
|
|
4484
4504
|
strings: e,
|
|
@@ -4496,7 +4516,7 @@ var fm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), gm = (e)
|
|
|
4496
4516
|
return e.Row = "row", e.Column = "column", e.Grid = "grid", e.Wrap = "wrap", e.Freeform = "freeform", e.Grouping = "grouping", e;
|
|
4497
4517
|
})({}), Ze = /* @__PURE__ */ (function(e) {
|
|
4498
4518
|
return e.Panel = "Panel", e.StackPanel = "StackPanel", e.WrapPanel = "WrapPanel", e.Grid = "Grid", e.Canvas = "Canvas", e;
|
|
4499
|
-
})({}),
|
|
4519
|
+
})({}), Sm = [
|
|
4500
4520
|
{
|
|
4501
4521
|
item: H.Stack,
|
|
4502
4522
|
type: "Stack",
|
|
@@ -4536,13 +4556,13 @@ var fm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), gm = (e)
|
|
|
4536
4556
|
panel: Ze.Canvas,
|
|
4537
4557
|
arrangement: Q.Freeform
|
|
4538
4558
|
}
|
|
4539
|
-
],
|
|
4559
|
+
], Cm = /* @__PURE__ */ new Set([
|
|
4540
4560
|
"column",
|
|
4541
4561
|
"screenShell",
|
|
4542
4562
|
"shell"
|
|
4543
4563
|
]);
|
|
4544
|
-
var
|
|
4545
|
-
function
|
|
4564
|
+
var Nm = (e) => e.slice(e.lastIndexOf(":") + 1), pa = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase()).trim(), Tm = (e) => e.split(".").map((t) => pa(t)).join(" "), Im = fs.Layout;
|
|
4565
|
+
function Pm(e, t, n = {}) {
|
|
4546
4566
|
const o = t.map((r) => ({
|
|
4547
4567
|
key: `layout:${r.item}`,
|
|
4548
4568
|
label: r.label,
|
|
@@ -4550,15 +4570,15 @@ function Im(e, t, n = {}) {
|
|
|
4550
4570
|
component: r.item,
|
|
4551
4571
|
displayName: r.label
|
|
4552
4572
|
}),
|
|
4553
|
-
category:
|
|
4573
|
+
category: Im,
|
|
4554
4574
|
keywords: [],
|
|
4555
4575
|
payload: {
|
|
4556
4576
|
kind: "layout",
|
|
4557
4577
|
item: r.item
|
|
4558
4578
|
}
|
|
4559
4579
|
})), i = e.flatMap((r) => {
|
|
4560
|
-
const s = new Map((r.descriptors ?? []).map((l) => [
|
|
4561
|
-
return r.components.filter((l) => !
|
|
4580
|
+
const s = new Map((r.descriptors ?? []).map((l) => [Nm(l.component), l]));
|
|
4581
|
+
return r.components.filter((l) => !Cm.has(l)).map((l) => {
|
|
4562
4582
|
const c = s.get(l), u = c?.displayName ?? pa(l);
|
|
4563
4583
|
return {
|
|
4564
4584
|
key: `${r.package}:${l}`,
|
|
@@ -4571,7 +4591,7 @@ function Im(e, t, n = {}) {
|
|
|
4571
4591
|
category: c?.category?.trim() || "Other",
|
|
4572
4592
|
keywords: c?.keywords ?? [],
|
|
4573
4593
|
package: r.package,
|
|
4574
|
-
packageTitle: n[r.package] ??
|
|
4594
|
+
packageTitle: n[r.package] ?? Tm(r.package),
|
|
4575
4595
|
payload: {
|
|
4576
4596
|
kind: "component",
|
|
4577
4597
|
componentName: l,
|
|
@@ -4583,7 +4603,7 @@ function Im(e, t, n = {}) {
|
|
|
4583
4603
|
return [...o, ...i];
|
|
4584
4604
|
}
|
|
4585
4605
|
var ma = "frequent";
|
|
4586
|
-
function
|
|
4606
|
+
function xm({ entries: e, usage: t, query: n, groups: o, frequentTitle: i }) {
|
|
4587
4607
|
const r = n.trim().length > 0, s = (h) => ({
|
|
4588
4608
|
entry: h,
|
|
4589
4609
|
match: Bs({
|
|
@@ -4617,11 +4637,11 @@ function Pm({ entries: e, usage: t, query: n, groups: o, frequentTitle: i }) {
|
|
|
4617
4637
|
});
|
|
4618
4638
|
}), d;
|
|
4619
4639
|
}
|
|
4620
|
-
var
|
|
4640
|
+
var Om = (e) => e.filter((t) => t.expanded).flatMap((t) => t.rows.map((n) => ({
|
|
4621
4641
|
group: t,
|
|
4622
4642
|
row: n
|
|
4623
4643
|
})));
|
|
4624
|
-
function
|
|
4644
|
+
function Dm(e, t) {
|
|
4625
4645
|
const n = [];
|
|
4626
4646
|
let o = 0;
|
|
4627
4647
|
for (const [i, r] of [...t].sort((s, l) => s[0] - l[0]))
|
|
@@ -4637,13 +4657,13 @@ function Om(e, t) {
|
|
|
4637
4657
|
marked: !1
|
|
4638
4658
|
}), n;
|
|
4639
4659
|
}
|
|
4640
|
-
var Ri = "cratis.studio.componentUsage.v1",
|
|
4660
|
+
var Ri = "cratis.studio.componentUsage.v1", Fi = "cratis.studio.componentGroups.v1", Oe = (e) => {
|
|
4641
4661
|
try {
|
|
4642
4662
|
return e();
|
|
4643
4663
|
} catch {
|
|
4644
4664
|
return;
|
|
4645
4665
|
}
|
|
4646
|
-
},
|
|
4666
|
+
}, Rm = () => Oe(() => typeof window < "u" ? window.localStorage : void 0), Ei = (e) => {
|
|
4647
4667
|
const t = Oe(() => JSON.parse(e ?? "null"));
|
|
4648
4668
|
if (t === null || typeof t != "object" || Array.isArray(t)) return {};
|
|
4649
4669
|
const n = {};
|
|
@@ -4652,17 +4672,17 @@ var Ri = "cratis.studio.componentUsage.v1", Ei = "cratis.studio.componentGroups.
|
|
|
4652
4672
|
last: typeof i.last == "number" && Number.isFinite(i.last) ? i.last : 0
|
|
4653
4673
|
});
|
|
4654
4674
|
return n;
|
|
4655
|
-
},
|
|
4675
|
+
}, Fm = (e) => {
|
|
4656
4676
|
const t = Oe(() => JSON.parse(e ?? "null"));
|
|
4657
4677
|
return t === null || typeof t != "object" || Array.isArray(t) ? {} : Object.fromEntries(Object.entries(t).filter((n) => typeof n[1] == "boolean"));
|
|
4658
4678
|
};
|
|
4659
|
-
function Em(e =
|
|
4660
|
-
const n = t ? `${t}:${Ri}` : Ri, o = t ? `${t}:${
|
|
4679
|
+
function Em(e = Rm(), t) {
|
|
4680
|
+
const n = t ? `${t}:${Ri}` : Ri, o = t ? `${t}:${Fi}` : Fi;
|
|
4661
4681
|
let i, r;
|
|
4662
4682
|
return {
|
|
4663
|
-
readUsage: () => i ??=
|
|
4683
|
+
readUsage: () => i ??= Ei(e ? Oe(() => e.getItem(n)) : void 0),
|
|
4664
4684
|
recordAdded: (s, l = Date.now()) => {
|
|
4665
|
-
const c = i ??=
|
|
4685
|
+
const c = i ??= Ei(e ? Oe(() => e.getItem(n)) : void 0);
|
|
4666
4686
|
i = {
|
|
4667
4687
|
...c,
|
|
4668
4688
|
[s]: {
|
|
@@ -4673,7 +4693,7 @@ function Em(e = Dm(), t) {
|
|
|
4673
4693
|
const u = JSON.stringify(i);
|
|
4674
4694
|
return e && Oe(() => e.setItem(n, u)), i;
|
|
4675
4695
|
},
|
|
4676
|
-
readGroups: () => r ??=
|
|
4696
|
+
readGroups: () => r ??= Fm(e ? Oe(() => e.getItem(o)) : void 0),
|
|
4677
4697
|
writeGroups: (s) => {
|
|
4678
4698
|
r = { ...s };
|
|
4679
4699
|
const l = JSON.stringify(r);
|
|
@@ -4681,7 +4701,7 @@ function Em(e = Dm(), t) {
|
|
|
4681
4701
|
}
|
|
4682
4702
|
};
|
|
4683
4703
|
}
|
|
4684
|
-
var
|
|
4704
|
+
var Eo = (e) => {
|
|
4685
4705
|
const t = e;
|
|
4686
4706
|
return !!t && (t.kind === "layout" && typeof t.item == "string" || t.kind === "component" && typeof t.componentName == "string" && typeof t.package == "string");
|
|
4687
4707
|
}, Mo = "application/x-studio-palette-item", ha = "application/x-studio-element";
|
|
@@ -4689,20 +4709,20 @@ function fa(e, t, n) {
|
|
|
4689
4709
|
const o = document.createElement("div");
|
|
4690
4710
|
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);
|
|
4691
4711
|
}
|
|
4692
|
-
var
|
|
4712
|
+
var Mm = (e, t, n) => {
|
|
4693
4713
|
e.dataTransfer.setData(Mo, JSON.stringify(t)), e.dataTransfer.effectAllowed = "copyMove", n && fa(e, n, e.currentTarget instanceof Element ? e.currentTarget.querySelector("svg") : null);
|
|
4694
|
-
},
|
|
4714
|
+
}, Am = (e, t, n) => {
|
|
4695
4715
|
e.dataTransfer.setData(ha, t), e.dataTransfer.effectAllowed = "move", fa(e, n);
|
|
4696
|
-
},
|
|
4697
|
-
function
|
|
4716
|
+
}, _m = (e) => e.dataTransfer.getData("application/x-studio-element") || void 0, Jn = (e) => e.dataTransfer.types.includes(ha), At = (e) => Lm(e) || Jn(e);
|
|
4717
|
+
function $m(e) {
|
|
4698
4718
|
try {
|
|
4699
4719
|
const t = JSON.parse(e.dataTransfer.getData(Mo));
|
|
4700
|
-
return
|
|
4720
|
+
return Eo(t) ? t : void 0;
|
|
4701
4721
|
} catch {
|
|
4702
4722
|
return;
|
|
4703
4723
|
}
|
|
4704
4724
|
}
|
|
4705
|
-
var
|
|
4725
|
+
var Lm = (e) => e.dataTransfer.types.includes(Mo), Bm = {
|
|
4706
4726
|
heading: "Components",
|
|
4707
4727
|
filterPlaceholder: "Filter components...",
|
|
4708
4728
|
filterLabel: "Filter components",
|
|
@@ -4711,8 +4731,8 @@ var $m = (e) => e.dataTransfer.types.includes(Mo), Lm = {
|
|
|
4711
4731
|
nothingMatches: "No component matches.",
|
|
4712
4732
|
viaKeyword: (e, t, n) => `...${e} matches "${t}" via keyword "${n}"`,
|
|
4713
4733
|
addLabel: (e) => `Add ${e}`
|
|
4714
|
-
},
|
|
4715
|
-
const [r, s] = j(""), [l, c] = j(() => t.readGroups()), u = V(null), d = V(null), p = ms(), h = U(() => ({ ...t.readUsage() }), [t, i]), f = U(() =>
|
|
4734
|
+
}, jm = "★", Um = ({ entries: e, memory: t, strings: n = Bm, onAdd: o, usageVersion: i = 0 }) => {
|
|
4735
|
+
const [r, s] = j(""), [l, c] = j(() => t.readGroups()), u = V(null), d = V(null), p = ms(), h = U(() => ({ ...t.readUsage() }), [t, i]), f = U(() => xm({
|
|
4716
4736
|
entries: e,
|
|
4717
4737
|
usage: h,
|
|
4718
4738
|
query: r,
|
|
@@ -4748,10 +4768,10 @@ var $m = (e) => e.dataTransfer.types.includes(Mo), Lm = {
|
|
|
4748
4768
|
I.indexOf(T) <= 0 ? u.current?.focus() : w(T, -1);
|
|
4749
4769
|
} else y.key === "Escape" && M && r !== "" && (y.stopPropagation(), s(""));
|
|
4750
4770
|
}, x = (y, T) => {
|
|
4751
|
-
|
|
4771
|
+
Mm(T, y.payload, y.label), T.currentTarget.closest('[data-cratis-part="toolbar-folder-panel"]')?.setAttribute("data-dragging", "");
|
|
4752
4772
|
}, C = (y) => {
|
|
4753
4773
|
y.currentTarget.closest('[data-cratis-part="toolbar-folder-panel"]')?.removeAttribute("data-dragging");
|
|
4754
|
-
}, k =
|
|
4774
|
+
}, k = Om(f);
|
|
4755
4775
|
return /* @__PURE__ */ b("div", {
|
|
4756
4776
|
ref: d,
|
|
4757
4777
|
className: "studio-component-picker",
|
|
@@ -4795,7 +4815,7 @@ var $m = (e) => e.dataTransfer.types.includes(Mo), Lm = {
|
|
|
4795
4815
|
"aria-hidden": "true",
|
|
4796
4816
|
children: y.frequent ? /* @__PURE__ */ a("span", {
|
|
4797
4817
|
className: "studio-component-picker__star",
|
|
4798
|
-
children:
|
|
4818
|
+
children: jm
|
|
4799
4819
|
}) : y.expanded ? "▼" : "▶"
|
|
4800
4820
|
}),
|
|
4801
4821
|
/* @__PURE__ */ a("span", {
|
|
@@ -4831,7 +4851,7 @@ var $m = (e) => e.dataTransfer.types.includes(Mo), Lm = {
|
|
|
4831
4851
|
className: "studio-component-picker__label",
|
|
4832
4852
|
children: [/* @__PURE__ */ a("span", {
|
|
4833
4853
|
className: "studio-component-picker__name",
|
|
4834
|
-
children:
|
|
4854
|
+
children: Dm(T.label, M.ranges).map((I, N) => I.marked ? /* @__PURE__ */ a("mark", { children: I.text }, N) : /* @__PURE__ */ a("span", { children: I.text }, N))
|
|
4835
4855
|
}), M.via === "keyword" && M.keyword && /* @__PURE__ */ a("span", {
|
|
4836
4856
|
className: "studio-component-picker__hint",
|
|
4837
4857
|
children: n.viaKeyword(T.badge, r.trim(), M.keyword)
|
|
@@ -4857,14 +4877,14 @@ var $m = (e) => e.dataTransfer.types.includes(Mo), Lm = {
|
|
|
4857
4877
|
})
|
|
4858
4878
|
]
|
|
4859
4879
|
});
|
|
4860
|
-
},
|
|
4880
|
+
}, Wm = ({ entries: e, memory: t, icon: n, title: o, closeLabel: i, strings: r, usageVersion: s, onAdd: l }) => /* @__PURE__ */ a(ml, {
|
|
4861
4881
|
className: "studio-palette-folder studio-palette-folder--picker",
|
|
4862
4882
|
icon: n,
|
|
4863
4883
|
title: o,
|
|
4864
4884
|
heading: o,
|
|
4865
4885
|
closeLabel: i,
|
|
4866
4886
|
presentation: "drawer",
|
|
4867
|
-
children: /* @__PURE__ */ a(
|
|
4887
|
+
children: /* @__PURE__ */ a(Um, {
|
|
4868
4888
|
entries: e,
|
|
4869
4889
|
memory: t,
|
|
4870
4890
|
usageVersion: s,
|
|
@@ -4873,7 +4893,7 @@ var $m = (e) => e.dataTransfer.types.includes(Mo), Lm = {
|
|
|
4873
4893
|
})
|
|
4874
4894
|
});
|
|
4875
4895
|
function ga({ strings: e, layoutLabels: t, icons: n, paletteSources: o, onAdd: i, memory: r }) {
|
|
4876
|
-
const s = U(() => r ?? Em(), [r]), [l, c] = j(0), u = U(() =>
|
|
4896
|
+
const s = U(() => r ?? Em(), [r]), [l, c] = j(0), u = U(() => Pm(o, Sm.map((p) => ({
|
|
4877
4897
|
item: p.item,
|
|
4878
4898
|
label: t[p.item]
|
|
4879
4899
|
})), e.packageTitles), [
|
|
@@ -4884,7 +4904,7 @@ function ga({ strings: e, layoutLabels: t, icons: n, paletteSources: o, onAdd: i
|
|
|
4884
4904
|
s.recordAdded(p), c((h) => h + 1);
|
|
4885
4905
|
}, [s]);
|
|
4886
4906
|
return {
|
|
4887
|
-
palette: /* @__PURE__ */ a(
|
|
4907
|
+
palette: /* @__PURE__ */ a(Wm, {
|
|
4888
4908
|
entries: u,
|
|
4889
4909
|
memory: s,
|
|
4890
4910
|
usageVersion: l,
|
|
@@ -4908,14 +4928,14 @@ var Mi = {
|
|
|
4908
4928
|
value: 1
|
|
4909
4929
|
};
|
|
4910
4930
|
function Yt(e, t, n, o = [], i = {}) {
|
|
4911
|
-
const r =
|
|
4931
|
+
const r = zm(e, i);
|
|
4912
4932
|
return {
|
|
4913
4933
|
...sa(t, n),
|
|
4914
4934
|
children: o,
|
|
4915
4935
|
...r
|
|
4916
4936
|
};
|
|
4917
4937
|
}
|
|
4918
|
-
function
|
|
4938
|
+
function zm(e, t) {
|
|
4919
4939
|
switch (e) {
|
|
4920
4940
|
case H.Stack:
|
|
4921
4941
|
return {
|
|
@@ -4948,7 +4968,7 @@ function Wm(e, t) {
|
|
|
4948
4968
|
return {};
|
|
4949
4969
|
}
|
|
4950
4970
|
}
|
|
4951
|
-
function
|
|
4971
|
+
function Hm(e) {
|
|
4952
4972
|
const t = e.indexOf(":");
|
|
4953
4973
|
return t > 0 ? {
|
|
4954
4974
|
package: e.slice(0, t),
|
|
@@ -4958,8 +4978,8 @@ function zm(e) {
|
|
|
4958
4978
|
name: e
|
|
4959
4979
|
};
|
|
4960
4980
|
}
|
|
4961
|
-
function
|
|
4962
|
-
const { package: o, name: i } =
|
|
4981
|
+
function Gm(e, t, n) {
|
|
4982
|
+
const { package: o, name: i } = Hm(e);
|
|
4963
4983
|
if (o !== void 0) return pr(t).includes(o) && n[o]?.includes(i) ? {
|
|
4964
4984
|
package: o,
|
|
4965
4985
|
name: i
|
|
@@ -4970,7 +4990,7 @@ function Hm(e, t, n) {
|
|
|
4970
4990
|
name: r.name
|
|
4971
4991
|
} : void 0;
|
|
4972
4992
|
}
|
|
4973
|
-
function
|
|
4993
|
+
function qm(e, t, n) {
|
|
4974
4994
|
const o = new Set(pr(t)), i = (r) => {
|
|
4975
4995
|
if (Array.isArray(r)) {
|
|
4976
4996
|
const u = r.map(i);
|
|
@@ -4998,7 +5018,7 @@ function va(e, t) {
|
|
|
4998
5018
|
const o = ta(n, e.authoringTemplate);
|
|
4999
5019
|
return o.readable ? {
|
|
5000
5020
|
opened: !0,
|
|
5001
|
-
subject: { document: t ?
|
|
5021
|
+
subject: { document: t ? qm(o.document, t.profile, t.packages) : o.document }
|
|
5002
5022
|
} : {
|
|
5003
5023
|
opened: !1,
|
|
5004
5024
|
problem: o.problem
|
|
@@ -5006,10 +5026,10 @@ function va(e, t) {
|
|
|
5006
5026
|
}
|
|
5007
5027
|
return {
|
|
5008
5028
|
opened: !0,
|
|
5009
|
-
subject: { document:
|
|
5029
|
+
subject: { document: Km(e) }
|
|
5010
5030
|
};
|
|
5011
5031
|
}
|
|
5012
|
-
function
|
|
5032
|
+
function Km(e) {
|
|
5013
5033
|
return e.authoringTemplate !== void 0 ? tu(e.authoringTemplate, Yt(H.Stack, Xd, "Template")) : eu(Yt(H.Stack, Zd, "Screen"), e.screenTemplate);
|
|
5014
5034
|
}
|
|
5015
5035
|
var ba = ({ placement: e, children: t }) => /* @__PURE__ */ a("div", {
|
|
@@ -5064,8 +5084,8 @@ var ba = ({ placement: e, children: t }) => /* @__PURE__ */ a("div", {
|
|
|
5064
5084
|
} catch {
|
|
5065
5085
|
return;
|
|
5066
5086
|
}
|
|
5067
|
-
},
|
|
5068
|
-
function
|
|
5087
|
+
}, Vm = () => qt(() => typeof window < "u" ? window.localStorage : void 0);
|
|
5088
|
+
function Jm(e = Vm()) {
|
|
5069
5089
|
return {
|
|
5070
5090
|
read: (t) => e ? _i(qt(() => e.getItem(`${Qn}:${t}`)) ?? null) : void 0,
|
|
5071
5091
|
write: (t, n) => {
|
|
@@ -5108,22 +5128,22 @@ function ka(e) {
|
|
|
5108
5128
|
var $i = {
|
|
5109
5129
|
width: 900,
|
|
5110
5130
|
height: 640
|
|
5111
|
-
},
|
|
5131
|
+
}, Qm = (e) => !!e && Number.isFinite(e.width) && Number.isFinite(e.height) && e.width > 0 && e.height > 0;
|
|
5112
5132
|
function Sa(e) {
|
|
5113
5133
|
return _o(sn[Ke.Desktop], e);
|
|
5114
5134
|
}
|
|
5115
|
-
function
|
|
5135
|
+
function Ym(e) {
|
|
5116
5136
|
return !!e && e.width === $i.width && e.height === $i.height;
|
|
5117
5137
|
}
|
|
5118
|
-
function
|
|
5119
|
-
const n =
|
|
5120
|
-
return
|
|
5138
|
+
function Xm(e, t) {
|
|
5139
|
+
const n = Ym(e.saved) ? void 0 : e.saved;
|
|
5140
|
+
return Zm([
|
|
5121
5141
|
e.remembered,
|
|
5122
5142
|
n,
|
|
5123
5143
|
e.lastUsed
|
|
5124
|
-
].find(
|
|
5144
|
+
].find(Qm) ?? Sa(t), t);
|
|
5125
5145
|
}
|
|
5126
|
-
function
|
|
5146
|
+
function Zm(e, t) {
|
|
5127
5147
|
return {
|
|
5128
5148
|
width: Math.round(Math.min(e.width, t.width)),
|
|
5129
5149
|
height: Math.round(Math.min(e.height, t.height))
|
|
@@ -5139,7 +5159,7 @@ var Ca = ({ environment: e, children: t }) => {
|
|
|
5139
5159
|
loader: e.richText,
|
|
5140
5160
|
children: n
|
|
5141
5161
|
}) : n;
|
|
5142
|
-
},
|
|
5162
|
+
}, eh = ({ controls: e }) => /* @__PURE__ */ a("div", {
|
|
5143
5163
|
className: "studio-window-title-bar",
|
|
5144
5164
|
role: "toolbar",
|
|
5145
5165
|
children: /* @__PURE__ */ a("div", {
|
|
@@ -5147,18 +5167,18 @@ var Ca = ({ environment: e, children: t }) => {
|
|
|
5147
5167
|
children: e
|
|
5148
5168
|
})
|
|
5149
5169
|
});
|
|
5150
|
-
function
|
|
5170
|
+
function th(e, t) {
|
|
5151
5171
|
return Object.values(Ke).find((n) => {
|
|
5152
5172
|
const o = _o(sn[n], t);
|
|
5153
5173
|
return o.width === e.width && o.height === e.height;
|
|
5154
5174
|
});
|
|
5155
5175
|
}
|
|
5156
|
-
function
|
|
5176
|
+
function nh(e) {
|
|
5157
5177
|
const t = ka(e);
|
|
5158
|
-
return
|
|
5178
|
+
return Fs(t.width, t.height);
|
|
5159
5179
|
}
|
|
5160
|
-
var
|
|
5161
|
-
const r =
|
|
5180
|
+
var oh = ({ windowSize: e, available: t, strings: n, shell: o, onResize: i }) => {
|
|
5181
|
+
const r = th(e, t), s = ka(e), l = nh(e), c = (u, d, p) => /* @__PURE__ */ a(xe, {
|
|
5162
5182
|
icon: d,
|
|
5163
5183
|
"aria-label": p,
|
|
5164
5184
|
"aria-pressed": r === u,
|
|
@@ -5172,10 +5192,10 @@ var nh = ({ windowSize: e, available: t, strings: n, shell: o, onResize: i }) =>
|
|
|
5172
5192
|
role: "group",
|
|
5173
5193
|
"aria-label": n.sizeClass(l.width, l.height),
|
|
5174
5194
|
children: [
|
|
5175
|
-
c(Ke.Desktop, /* @__PURE__ */ a(
|
|
5195
|
+
c(Ke.Desktop, /* @__PURE__ */ a(En, { "aria-hidden": "true" }), n.desktopPreview),
|
|
5176
5196
|
c(Ke.Mobile, /* @__PURE__ */ a(zl, { "aria-hidden": "true" }), n.mobilePreview),
|
|
5177
5197
|
o && /* @__PURE__ */ a(xe, {
|
|
5178
|
-
icon: /* @__PURE__ */ a(
|
|
5198
|
+
icon: /* @__PURE__ */ a(ht, { "aria-hidden": "true" }),
|
|
5179
5199
|
"aria-label": o.shown ? n.hideApplicationShell : n.showApplicationShell,
|
|
5180
5200
|
"aria-pressed": o.shown,
|
|
5181
5201
|
title: o.shown ? n.hideApplicationShell : n.showApplicationShell,
|
|
@@ -5195,7 +5215,7 @@ var nh = ({ windowSize: e, available: t, strings: n, shell: o, onResize: i }) =>
|
|
|
5195
5215
|
]
|
|
5196
5216
|
});
|
|
5197
5217
|
};
|
|
5198
|
-
function
|
|
5218
|
+
function ih(e, t) {
|
|
5199
5219
|
const n = e.bundles.filter((o) => o.manifest.kind === dt.Blueprint).map((o) => ({
|
|
5200
5220
|
manifest: o.manifest,
|
|
5201
5221
|
layouts: o.layouts,
|
|
@@ -5241,16 +5261,16 @@ function Na(e, t, n) {
|
|
|
5241
5261
|
options: {
|
|
5242
5262
|
profile: e.compositionProfile,
|
|
5243
5263
|
catalog: e.packages,
|
|
5244
|
-
templateLibrary:
|
|
5264
|
+
templateLibrary: ih(e, t),
|
|
5245
5265
|
chrome: (o, i) => i === Js.FullPageShell ? {} : tl()
|
|
5246
5266
|
}
|
|
5247
5267
|
};
|
|
5248
5268
|
}
|
|
5249
|
-
function
|
|
5269
|
+
function rh(e, t) {
|
|
5250
5270
|
const { application: n, options: o } = Na(e, t, fo($o, "text", { text: "" }));
|
|
5251
5271
|
return br(n, n.screens[0], o);
|
|
5252
5272
|
}
|
|
5253
|
-
function
|
|
5273
|
+
function ah(e, t) {
|
|
5254
5274
|
const { application: n, options: o } = Na(e, t, fo($o, "text", { text: "" })), i = n.screens[0];
|
|
5255
5275
|
return {
|
|
5256
5276
|
element: Zs(n, i, o).element,
|
|
@@ -5260,26 +5280,26 @@ function rh(e, t) {
|
|
|
5260
5280
|
function Lo(e) {
|
|
5261
5281
|
return e.screen ?? e.slice ?? e.dialog ?? "";
|
|
5262
5282
|
}
|
|
5263
|
-
function
|
|
5283
|
+
function sh(e) {
|
|
5264
5284
|
return e.kind !== ar.External && e.dialog === void 0 && Lo(e) !== "";
|
|
5265
5285
|
}
|
|
5266
|
-
function
|
|
5286
|
+
function lh(e, t) {
|
|
5267
5287
|
return fo("studio-shell-peek", "text", { text: t.replace("{name}", Lo(e)) });
|
|
5268
5288
|
}
|
|
5269
5289
|
var _e = /* @__PURE__ */ (function(e) {
|
|
5270
5290
|
return e.Screen = "screen", e.ScreenTemplate = "screenTemplate", e.DialogTemplate = "dialogTemplate", e.TheShell = "theShell", e;
|
|
5271
5291
|
})({});
|
|
5272
|
-
function
|
|
5292
|
+
function ch(e, t, n) {
|
|
5273
5293
|
return t === void 0 ? _e.Screen : (e.dialogTemplates ?? []).some((o) => o.name === t) ? _e.DialogTemplate : t === n ? _e.TheShell : _e.ScreenTemplate;
|
|
5274
5294
|
}
|
|
5275
|
-
var
|
|
5295
|
+
var dh = (e) => e === _e.Screen || e === _e.ScreenTemplate, uh = (e) => e !== _e.TheShell, ph = "studio.screenEditor.showApplicationShell.v1", Yn = (e) => {
|
|
5276
5296
|
try {
|
|
5277
5297
|
return e();
|
|
5278
5298
|
} catch {
|
|
5279
5299
|
return;
|
|
5280
5300
|
}
|
|
5281
|
-
},
|
|
5282
|
-
function
|
|
5301
|
+
}, mh = () => Yn(() => typeof window < "u" ? window.localStorage : void 0), Li = (e) => `${ph}:${e === _e.DialogTemplate ? "dialog" : "screen"}`;
|
|
5302
|
+
function hh(e = mh()) {
|
|
5283
5303
|
return {
|
|
5284
5304
|
read: (t) => {
|
|
5285
5305
|
const n = e ? Yn(() => e.getItem(Li(t))) : void 0;
|
|
@@ -5290,9 +5310,9 @@ function mh(e = ph()) {
|
|
|
5290
5310
|
}
|
|
5291
5311
|
};
|
|
5292
5312
|
}
|
|
5293
|
-
var
|
|
5313
|
+
var fh = () => {
|
|
5294
5314
|
};
|
|
5295
|
-
function
|
|
5315
|
+
function gh(e, t, n, o = vh) {
|
|
5296
5316
|
const { layouts: i, screenTemplates: r, dialogTemplates: s } = e, l = U(() => ({
|
|
5297
5317
|
layouts: i,
|
|
5298
5318
|
screenTemplates: r,
|
|
@@ -5301,11 +5321,11 @@ function fh(e, t, n, o = gh) {
|
|
|
5301
5321
|
i,
|
|
5302
5322
|
r,
|
|
5303
5323
|
s
|
|
5304
|
-
]), c = U(() =>
|
|
5324
|
+
]), c = U(() => rh(t, l).name, [t, l]), u = ch(e, n, c), [d, p] = j(() => o.read(u)), [h, f] = j();
|
|
5305
5325
|
ce(() => {
|
|
5306
5326
|
p(o.read(u)), f(void 0);
|
|
5307
5327
|
}, [o, u]);
|
|
5308
|
-
const g =
|
|
5328
|
+
const g = uh(u), m = g && (d ?? dh(u)), v = U(() => m ? ah(t, l) : void 0, [
|
|
5309
5329
|
m,
|
|
5310
5330
|
t,
|
|
5311
5331
|
l
|
|
@@ -5317,7 +5337,7 @@ function fh(e, t, n, o = gh) {
|
|
|
5317
5337
|
u,
|
|
5318
5338
|
o
|
|
5319
5339
|
]), P = z((C) => {
|
|
5320
|
-
|
|
5340
|
+
sh(C) && f(C);
|
|
5321
5341
|
}, []), x = z(() => f(void 0), []);
|
|
5322
5342
|
return {
|
|
5323
5343
|
available: g,
|
|
@@ -5326,11 +5346,11 @@ function fh(e, t, n, o = gh) {
|
|
|
5326
5346
|
frame: v,
|
|
5327
5347
|
peeking: m ? h : void 0,
|
|
5328
5348
|
peekingName: h ? Lo(h) : "",
|
|
5329
|
-
navigate: m ? P :
|
|
5349
|
+
navigate: m ? P : fh,
|
|
5330
5350
|
back: x
|
|
5331
5351
|
};
|
|
5332
5352
|
}
|
|
5333
|
-
var
|
|
5353
|
+
var vh = hh();
|
|
5334
5354
|
function Bo(e) {
|
|
5335
5355
|
return e === void 0 ? "" : e.isDark ? "cratis-theme cratis-dark" : "cratis-theme cratis-light";
|
|
5336
5356
|
}
|
|
@@ -5369,11 +5389,11 @@ var Xn = ({ elementId: e, tone: t, text: n }) => /* @__PURE__ */ a("div", {
|
|
|
5369
5389
|
if (typeof o == "string" && o.length > 0) return o;
|
|
5370
5390
|
}
|
|
5371
5391
|
};
|
|
5372
|
-
function
|
|
5392
|
+
function bh({ kind: e, tag: t, element: n, slots: o, message: i }) {
|
|
5373
5393
|
const r = o.content ?? [], s = et(n, "header", "title", "summary") ?? n.name ?? n.componentName, l = et(n, "message", "detail", "text", "label"), c = () => {
|
|
5374
5394
|
switch (e) {
|
|
5375
5395
|
case se.Toast:
|
|
5376
|
-
return i ?
|
|
5396
|
+
return i ? wt(i, {
|
|
5377
5397
|
element: {
|
|
5378
5398
|
...n,
|
|
5379
5399
|
componentName: "message",
|
|
@@ -5447,7 +5467,7 @@ function vh({ kind: e, tag: t, element: n, slots: o, message: i }) {
|
|
|
5447
5467
|
}), c()]
|
|
5448
5468
|
});
|
|
5449
5469
|
}
|
|
5450
|
-
var Ia = us(void 0),
|
|
5470
|
+
var Ia = us(void 0), yh = () => {
|
|
5451
5471
|
const e = ps(Ia);
|
|
5452
5472
|
return e ? /* @__PURE__ */ b("span", {
|
|
5453
5473
|
className: "studio-design-logo",
|
|
@@ -5456,7 +5476,7 @@ var Ia = us(void 0), bh = () => {
|
|
|
5456
5476
|
children: [/* @__PURE__ */ a("span", {
|
|
5457
5477
|
className: "studio-design-logo__title",
|
|
5458
5478
|
children: e.title
|
|
5459
|
-
}), e.locked && /* @__PURE__ */ a(
|
|
5479
|
+
}), e.locked && /* @__PURE__ */ a(Er, {
|
|
5460
5480
|
className: "studio-design-logo__lock",
|
|
5461
5481
|
"aria-hidden": "true"
|
|
5462
5482
|
})]
|
|
@@ -5464,7 +5484,7 @@ var Ia = us(void 0), bh = () => {
|
|
|
5464
5484
|
}, 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>`)}`, Bi = [{
|
|
5465
5485
|
label: "Documents",
|
|
5466
5486
|
children: ["Work", "Home"]
|
|
5467
|
-
}],
|
|
5487
|
+
}], wh = [
|
|
5468
5488
|
"New",
|
|
5469
5489
|
"Open",
|
|
5470
5490
|
{ separator: !0 },
|
|
@@ -5718,7 +5738,7 @@ var Ia = us(void 0), bh = () => {
|
|
|
5718
5738
|
text: "Tooltip",
|
|
5719
5739
|
label: "Hover me"
|
|
5720
5740
|
},
|
|
5721
|
-
menu: { items:
|
|
5741
|
+
menu: { items: wh },
|
|
5722
5742
|
menubar: { items: [{
|
|
5723
5743
|
label: "File",
|
|
5724
5744
|
items: ["New", "Open"]
|
|
@@ -5952,7 +5972,7 @@ var Ia = us(void 0), bh = () => {
|
|
|
5952
5972
|
"navigate",
|
|
5953
5973
|
"errorBoundary",
|
|
5954
5974
|
"toolbarSeparator"
|
|
5955
|
-
]),
|
|
5975
|
+
]), bt = (e) => e.slice(e.lastIndexOf(":") + 1), Uo = (e, t) => In[e] ?? In[t] ?? In[bt(t)];
|
|
5956
5976
|
function xa(e, t, n) {
|
|
5957
5977
|
const o = Uo(e, t), i = n ?? {};
|
|
5958
5978
|
if (!o) return { ...i };
|
|
@@ -5960,15 +5980,15 @@ function xa(e, t, n) {
|
|
|
5960
5980
|
for (const [s, l] of Object.entries(i)) l !== void 0 && (r[s] = l);
|
|
5961
5981
|
return r;
|
|
5962
5982
|
}
|
|
5963
|
-
function
|
|
5983
|
+
function kh(e, t, n) {
|
|
5964
5984
|
const o = Uo(e, t);
|
|
5965
5985
|
return o ? Object.keys(o).filter((i) => n?.[i] === void 0) : [];
|
|
5966
5986
|
}
|
|
5967
|
-
var
|
|
5987
|
+
var Sh = (e) => {
|
|
5968
5988
|
const { width: t, height: n } = e.getBoundingClientRect();
|
|
5969
5989
|
return t > 0 && n > 0;
|
|
5970
|
-
}, Zn = (e) => Array.from(e.children).filter((t) => !t.hasAttribute("data-studio-placeholder-for")).some((t) =>
|
|
5971
|
-
function
|
|
5990
|
+
}, Zn = (e) => Array.from(e.children).filter((t) => !t.hasAttribute("data-studio-placeholder-for")).some((t) => Sh(t) || getComputedStyle(t).display === "contents" && Zn(t)), Ch = 150;
|
|
5991
|
+
function Nh(e, t) {
|
|
5972
5992
|
const [n, o] = j(!0), i = V(!0);
|
|
5973
5993
|
return Se(() => {
|
|
5974
5994
|
const r = e.current;
|
|
@@ -5978,7 +5998,7 @@ function Ch(e, t) {
|
|
|
5978
5998
|
};
|
|
5979
5999
|
let l;
|
|
5980
6000
|
const c = () => {
|
|
5981
|
-
clearTimeout(l), Zn(r) ? s(!0) : l = setTimeout(() => s(Zn(r)),
|
|
6001
|
+
clearTimeout(l), Zn(r) ? s(!0) : l = setTimeout(() => s(Zn(r)), Ch);
|
|
5982
6002
|
}, u = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(c), d = () => {
|
|
5983
6003
|
u?.disconnect(), Array.from(r.children).forEach((h) => u?.observe(h));
|
|
5984
6004
|
}, p = new MutationObserver(() => {
|
|
@@ -5989,16 +6009,16 @@ function Ch(e, t) {
|
|
|
5989
6009
|
};
|
|
5990
6010
|
}, [e, t]), n;
|
|
5991
6011
|
}
|
|
5992
|
-
var
|
|
6012
|
+
var Th = ({ element: e }) => e.name || e.componentName, Ih = (e, t) => {
|
|
5993
6013
|
const n = V(e), o = V(0);
|
|
5994
6014
|
return n.current !== e && (n.current = e, t && (o.current += 1)), o.current;
|
|
5995
6015
|
};
|
|
5996
|
-
function
|
|
6016
|
+
function Ph(e, t, n, o) {
|
|
5997
6017
|
const i = (r) => {
|
|
5998
6018
|
const s = V(null), l = U(() => ({
|
|
5999
6019
|
...r.element,
|
|
6000
6020
|
properties: xa(e, r.element.componentName, r.element.properties)
|
|
6001
|
-
}), [r.element]), c = U(() =>
|
|
6021
|
+
}), [r.element]), c = U(() => kh(e, r.element.componentName, r.element.properties), [r.element]), u = Pa.has(bt(r.element.componentName)), d = e.startsWith(`${vr}:`), p = d ? void 0 : Ta[bt(r.element.componentName)], h = d && bt(r.element.componentName) === "topbar", [f, g] = j(), m = Nh(s, r.element), v = Th(r), w = Ih(r.element, f !== void 0);
|
|
6002
6022
|
return /* @__PURE__ */ b("span", {
|
|
6003
6023
|
ref: s,
|
|
6004
6024
|
"data-studio-element": r.element.id,
|
|
@@ -6012,7 +6032,7 @@ function Ih(e, t, n, o) {
|
|
|
6012
6032
|
tone: Kt.Failed,
|
|
6013
6033
|
text: n.failedToDraw(v, f ?? "")
|
|
6014
6034
|
}),
|
|
6015
|
-
children: p ? /* @__PURE__ */ a(
|
|
6035
|
+
children: p ? /* @__PURE__ */ a(bh, {
|
|
6016
6036
|
kind: p,
|
|
6017
6037
|
tag: n.overlay(v),
|
|
6018
6038
|
element: l,
|
|
@@ -6020,11 +6040,11 @@ function Ih(e, t, n, o) {
|
|
|
6020
6040
|
message: o
|
|
6021
6041
|
}) : h ? /* @__PURE__ */ b("div", {
|
|
6022
6042
|
className: "studio-design-topbar",
|
|
6023
|
-
children: [/* @__PURE__ */ a(
|
|
6043
|
+
children: [/* @__PURE__ */ a(yh, {}), wt(t, {
|
|
6024
6044
|
...r,
|
|
6025
6045
|
element: l
|
|
6026
6046
|
})]
|
|
6027
|
-
}) :
|
|
6047
|
+
}) : wt(t, {
|
|
6028
6048
|
...r,
|
|
6029
6049
|
element: l
|
|
6030
6050
|
})
|
|
@@ -6037,23 +6057,23 @@ function Ih(e, t, n, o) {
|
|
|
6037
6057
|
};
|
|
6038
6058
|
return i.displayName = `DesignTime(${t.displayName ?? t.name ?? "Component"})`, i;
|
|
6039
6059
|
}
|
|
6040
|
-
function
|
|
6041
|
-
const n = Object.fromEntries(Object.entries(e).map(([i, r]) => [i,
|
|
6060
|
+
function xh(e, t) {
|
|
6061
|
+
const n = Object.fromEntries(Object.entries(e).map(([i, r]) => [i, Ph(i, r, t, e["PrimeReact:message"])])), o = {};
|
|
6042
6062
|
return new Proxy(n, { get: (i, r) => {
|
|
6043
6063
|
if (typeof r == "string")
|
|
6044
|
-
return i[r] ?? (o[r] ??=
|
|
6064
|
+
return i[r] ?? (o[r] ??= Oh(t));
|
|
6045
6065
|
} });
|
|
6046
6066
|
}
|
|
6047
|
-
var
|
|
6067
|
+
var Oh = (e) => ({ element: t }) => wt("span", {
|
|
6048
6068
|
"data-studio-element": t.id,
|
|
6049
6069
|
style: { display: "contents" }
|
|
6050
|
-
},
|
|
6070
|
+
}, wt(Xn, {
|
|
6051
6071
|
elementId: t.id,
|
|
6052
6072
|
tone: Kt.Failed,
|
|
6053
6073
|
text: e.unavailable(t.name || t.componentName)
|
|
6054
6074
|
})), Te = /* @__PURE__ */ (function(e) {
|
|
6055
6075
|
return e.Container = "container", e.Between = "between", e;
|
|
6056
|
-
})({}),
|
|
6076
|
+
})({}), Dh = ({ feedback: e, deniedText: t }) => {
|
|
6057
6077
|
if (e.denied || !e.drop) return /* @__PURE__ */ a("div", {
|
|
6058
6078
|
className: "studio-screen-surface__denied",
|
|
6059
6079
|
"data-studio-drop-state": "denied",
|
|
@@ -6070,10 +6090,10 @@ var xh = (e) => ({ element: t }) => yt("span", {
|
|
|
6070
6090
|
"data-empty": n.region.isEmptyContainer,
|
|
6071
6091
|
style: n.rect
|
|
6072
6092
|
})] });
|
|
6073
|
-
},
|
|
6093
|
+
}, Rh = (e) => e.width > 0 && e.height > 0;
|
|
6074
6094
|
function Oa(e) {
|
|
6075
6095
|
const t = e.getBoundingClientRect();
|
|
6076
|
-
return
|
|
6096
|
+
return Rh(t) ? [t] : Array.from(e.children).flatMap(Oa);
|
|
6077
6097
|
}
|
|
6078
6098
|
function Le(e, t, n) {
|
|
6079
6099
|
const o = CSS.escape(t), i = [...Array.from(e.querySelectorAll(`[data-studio-element="${o}"]`)), ...Array.from(e.querySelectorAll(`[data-scene-id="${o}"]`))];
|
|
@@ -6093,7 +6113,7 @@ function Da(e, t) {
|
|
|
6093
6113
|
height: s - i
|
|
6094
6114
|
};
|
|
6095
6115
|
}
|
|
6096
|
-
var Ra = (e, t) => e === t || !!e && !!t && e.left === t.left && e.top === t.top && e.width === t.width && e.height === t.height,
|
|
6116
|
+
var Ra = (e, t) => e === t || !!e && !!t && e.left === t.left && e.top === t.top && e.width === t.width && e.height === t.height, Fh = (e, t) => e.length === t.length && e.every((n, o) => n.region.id === t[o].region.id && Ra(n.rect, t[o].rect)), Fa = Ra, Eh = ({ surface: e, markers: t }) => {
|
|
6097
6117
|
const [n, o] = j([]);
|
|
6098
6118
|
return Se(() => {
|
|
6099
6119
|
const i = e.current;
|
|
@@ -6105,7 +6125,7 @@ var Ra = (e, t) => e === t || !!e && !!t && e.left === t.left && e.top === t.top
|
|
|
6105
6125
|
rect: c
|
|
6106
6126
|
}] : [];
|
|
6107
6127
|
});
|
|
6108
|
-
o((l) =>
|
|
6128
|
+
o((l) => Mh(l, s) ? l : s);
|
|
6109
6129
|
}), /* @__PURE__ */ a(le, { children: n.map((i) => /* @__PURE__ */ a("div", {
|
|
6110
6130
|
className: "studio-screen-surface__binding-source",
|
|
6111
6131
|
"data-binding-source": i.componentId,
|
|
@@ -6116,13 +6136,13 @@ var Ra = (e, t) => e === t || !!e && !!t && e.left === t.left && e.top === t.top
|
|
|
6116
6136
|
})
|
|
6117
6137
|
}, `${i.componentId}:${i.label}`)) });
|
|
6118
6138
|
};
|
|
6119
|
-
function
|
|
6139
|
+
function Mh(e, t) {
|
|
6120
6140
|
return e.length === t.length && e.every((n, o) => {
|
|
6121
6141
|
const i = t[o];
|
|
6122
|
-
return n.componentId === i.componentId && n.label === i.label &&
|
|
6142
|
+
return n.componentId === i.componentId && n.label === i.label && Fa(n.rect, i.rect);
|
|
6123
6143
|
});
|
|
6124
6144
|
}
|
|
6125
|
-
function
|
|
6145
|
+
function Ah(e, t) {
|
|
6126
6146
|
return e ? Object.entries(e.inputs).flatMap(([n, o]) => {
|
|
6127
6147
|
const i = Ru(o);
|
|
6128
6148
|
return i ? [{
|
|
@@ -6131,14 +6151,14 @@ function Mh(e, t) {
|
|
|
6131
6151
|
}] : [];
|
|
6132
6152
|
}) : [];
|
|
6133
6153
|
}
|
|
6134
|
-
function
|
|
6154
|
+
function _h(e, t) {
|
|
6135
6155
|
const { selectedId: n, document: o, composition: i, context: r } = e;
|
|
6136
6156
|
return U(() => {
|
|
6137
6157
|
if (!n) return [];
|
|
6138
6158
|
const s = ze(i.roots, n), l = na(s?.properties);
|
|
6139
6159
|
if (!l) return [];
|
|
6140
6160
|
const c = tr(o, i.roots, r, t.availableSources, t.queryCandidates);
|
|
6141
|
-
return
|
|
6161
|
+
return Ah(l, Vr(c.dataContextPaths, c.componentOutputs, n));
|
|
6142
6162
|
}, [
|
|
6143
6163
|
n,
|
|
6144
6164
|
o,
|
|
@@ -6148,7 +6168,7 @@ function Ah(e, t) {
|
|
|
6148
6168
|
t.queryCandidates
|
|
6149
6169
|
]);
|
|
6150
6170
|
}
|
|
6151
|
-
function
|
|
6171
|
+
function $h(e, t, n, o, i) {
|
|
6152
6172
|
const r = Ne(e, n, t);
|
|
6153
6173
|
if (r)
|
|
6154
6174
|
return {
|
|
@@ -6159,17 +6179,17 @@ function _h(e, t, n, o, i) {
|
|
|
6159
6179
|
}
|
|
6160
6180
|
var Ge = /* @__PURE__ */ (function(e) {
|
|
6161
6181
|
return e.Horizontal = "horizontal", e.Vertical = "vertical", e.None = "none", e;
|
|
6162
|
-
})({}), $t = ({ width: e, height: t }) => e * t,
|
|
6182
|
+
})({}), $t = ({ width: e, height: t }) => e * t, Lh = (e, t, n) => t >= e.left && t <= e.left + e.width && n >= e.top && n <= e.top + e.height, Bh = (e, t, n, o) => {
|
|
6163
6183
|
const i = Math.min(o, e.width / 4), r = Math.min(o, e.height / 4);
|
|
6164
6184
|
return t - e.left < i || e.left + e.width - t < i || n - e.top < r || e.top + e.height - n < r;
|
|
6165
6185
|
}, ji = ({ region: e, rect: t }, n, o) => e.axis === Ge.Vertical ? Math.abs(n - (t.left + t.width / 2)) : Math.abs(o - (t.top + t.height / 2));
|
|
6166
|
-
function
|
|
6186
|
+
function jh(e, t, n, o = 6) {
|
|
6167
6187
|
const i = e.filter((u) => u.region.kind === Te.Container);
|
|
6168
6188
|
if (i.length === 0) return;
|
|
6169
6189
|
const r = i.map((u, d) => ({
|
|
6170
6190
|
placed: u,
|
|
6171
6191
|
order: d
|
|
6172
|
-
})).filter(({ placed: u }) =>
|
|
6192
|
+
})).filter(({ placed: u }) => Lh(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 && Bh(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 === Te.Between && u.region.containerId === l.region.containerId);
|
|
6173
6193
|
return l.region.isEmptyContainer || c.length === 0 ? {
|
|
6174
6194
|
target: l,
|
|
6175
6195
|
container: l.rect
|
|
@@ -6178,8 +6198,8 @@ function Bh(e, t, n, o = 6) {
|
|
|
6178
6198
|
container: l.rect
|
|
6179
6199
|
};
|
|
6180
6200
|
}
|
|
6181
|
-
var
|
|
6182
|
-
function
|
|
6201
|
+
var Uh = (e, t) => e?.top === t?.top && e?.left === t?.left && e?.width === t?.width && e?.height === t?.height, Wh = (e, t) => !!e && e.denied === t.denied && e.drop?.target.region.id === t.drop?.target.region.id && Uh(e.drop?.target.rect, t.drop?.target.rect);
|
|
6202
|
+
function zh(e, t, n) {
|
|
6183
6203
|
const [o, i] = j(), r = V(void 0);
|
|
6184
6204
|
r.current = o;
|
|
6185
6205
|
const [s, l] = j(), c = V(0), u = V(void 0), d = z(() => {
|
|
@@ -6199,7 +6219,7 @@ function Wh(e, t, n) {
|
|
|
6199
6219
|
const y = u.current, { region: T } = k.target;
|
|
6200
6220
|
if (!y || !T.containerId) return;
|
|
6201
6221
|
const M = T.kind === Te.Container ? g(T.containerId) : T.index;
|
|
6202
|
-
return
|
|
6222
|
+
return $h(n.composition.roots, n.adapter, y, T.containerId, M);
|
|
6203
6223
|
}, g = (k) => {
|
|
6204
6224
|
const y = [...n.composition.roots];
|
|
6205
6225
|
for (; y.length > 0; ) {
|
|
@@ -6209,7 +6229,7 @@ function Wh(e, t, n) {
|
|
|
6209
6229
|
}
|
|
6210
6230
|
return 0;
|
|
6211
6231
|
}, m = (k) => {
|
|
6212
|
-
const y = e.current.getBoundingClientRect(), T =
|
|
6232
|
+
const y = e.current.getBoundingClientRect(), T = jh(t(), k.clientX - y.left, k.clientY - y.top), M = k.target.closest("[data-scene-id], [data-studio-element]"), I = M?.dataset.sceneId ?? M?.dataset.studioElement, N = !!I && n.ownershipOf(I) !== ie.Local;
|
|
6213
6233
|
if (!T || N) return { denied: !0 };
|
|
6214
6234
|
if (Jn(k)) {
|
|
6215
6235
|
const R = f(T), B = R ? n.validateMove(R) : oe.NodeNotFound;
|
|
@@ -6238,28 +6258,28 @@ function Wh(e, t, n) {
|
|
|
6238
6258
|
onDragOver: (k) => {
|
|
6239
6259
|
if (!At(k) || (k.preventDefault(), p.current)) return;
|
|
6240
6260
|
const y = m(k);
|
|
6241
|
-
k.dataTransfer.dropEffect = y.denied ? "none" : Jn(k) ? "move" : "copy", i((T) =>
|
|
6261
|
+
k.dataTransfer.dropEffect = y.denied ? "none" : Jn(k) ? "move" : "copy", i((T) => Wh(T, y) ? T : y);
|
|
6242
6262
|
},
|
|
6243
6263
|
onDragLeave: (k) => {
|
|
6244
6264
|
At(k) && (c.current = Math.max(0, c.current - 1), c.current === 0 && i(void 0));
|
|
6245
6265
|
},
|
|
6246
6266
|
onDrop: (k) => {
|
|
6247
6267
|
if (!At(k)) return;
|
|
6248
|
-
const y =
|
|
6268
|
+
const y = _m(k), T = $m(k), { drop: M, denied: I } = m(k), N = M && y ? f(M) : void 0, R = p.current;
|
|
6249
6269
|
if (k.preventDefault(), d(), p.current = !1, R || I || !M) return;
|
|
6250
6270
|
if (y) {
|
|
6251
6271
|
N && n.move(N, v(k, M));
|
|
6252
6272
|
return;
|
|
6253
6273
|
}
|
|
6254
6274
|
if (!T) return;
|
|
6255
|
-
const { region: B } = M.target, S = B.containerId ?? void 0,
|
|
6256
|
-
T.kind === "layout" ? n.insertLayout(T.item, S,
|
|
6275
|
+
const { region: B } = M.target, S = B.containerId ?? void 0, E = B.kind === Te.Container ? void 0 : B.index, $ = v(k, M);
|
|
6276
|
+
T.kind === "layout" ? n.insertLayout(T.item, S, E, $) : n.insertComponent(Ao(T.componentName, T.package), S, E, $);
|
|
6257
6277
|
}
|
|
6258
6278
|
}
|
|
6259
6279
|
};
|
|
6260
6280
|
}
|
|
6261
6281
|
var nt = 3;
|
|
6262
|
-
function
|
|
6282
|
+
function Hh(e, t, n) {
|
|
6263
6283
|
const o = e.containerId === null ? t : n(e.containerId);
|
|
6264
6284
|
if (!o) return;
|
|
6265
6285
|
if (e.kind === Te.Container) return o;
|
|
@@ -6280,7 +6300,7 @@ function zh(e, t, n) {
|
|
|
6280
6300
|
height: o.height
|
|
6281
6301
|
};
|
|
6282
6302
|
}
|
|
6283
|
-
function
|
|
6303
|
+
function Gh(e, t, n) {
|
|
6284
6304
|
const [o, i] = j([]), [r, s] = j(), l = V([]), c = z(() => {
|
|
6285
6305
|
const d = e.current;
|
|
6286
6306
|
if (!d) return [];
|
|
@@ -6291,7 +6311,7 @@ function Hh(e, t, n) {
|
|
|
6291
6311
|
height: p.height
|
|
6292
6312
|
};
|
|
6293
6313
|
return t.flatMap((g) => {
|
|
6294
|
-
const m =
|
|
6314
|
+
const m = Hh(g, f, h);
|
|
6295
6315
|
return m ? [{
|
|
6296
6316
|
region: g,
|
|
6297
6317
|
rect: m
|
|
@@ -6301,9 +6321,9 @@ function Hh(e, t, n) {
|
|
|
6301
6321
|
const d = e.current;
|
|
6302
6322
|
if (!d) return;
|
|
6303
6323
|
const p = c();
|
|
6304
|
-
l.current = p, i((f) =>
|
|
6324
|
+
l.current = p, i((f) => Fh(f, p) ? f : p);
|
|
6305
6325
|
const h = n ? Le(d, n, d.getBoundingClientRect()) : void 0;
|
|
6306
|
-
s((f) =>
|
|
6326
|
+
s((f) => Fa(f, h) ? f : h);
|
|
6307
6327
|
}, [
|
|
6308
6328
|
e,
|
|
6309
6329
|
c,
|
|
@@ -6340,7 +6360,7 @@ function Hh(e, t, n) {
|
|
|
6340
6360
|
var We = /* @__PURE__ */ (function(e) {
|
|
6341
6361
|
return e.NotShell = "notShell", e.Navigate = "navigate", e.Ignore = "ignore", e;
|
|
6342
6362
|
})({});
|
|
6343
|
-
function
|
|
6363
|
+
function qh(e, t) {
|
|
6344
6364
|
if (!t) return We.NotShell;
|
|
6345
6365
|
const n = e;
|
|
6346
6366
|
return !n || typeof n.closest != "function" || n.closest('[data-scene-id="composition"], [data-studio-element="composition"]') ? We.NotShell : n.closest("[data-scene-nav-item], [data-target-screen]") ? We.Navigate : We.Ignore;
|
|
@@ -6352,8 +6372,8 @@ var Ui = [
|
|
|
6352
6372
|
"mouseup",
|
|
6353
6373
|
"click",
|
|
6354
6374
|
"dblclick"
|
|
6355
|
-
],
|
|
6356
|
-
function
|
|
6375
|
+
], Kh = "[data-scene-id], [data-studio-element], [data-studio-placeholder-for]";
|
|
6376
|
+
function Vh(e, t, n = 0) {
|
|
6357
6377
|
const o = tn(t);
|
|
6358
6378
|
return {
|
|
6359
6379
|
select: e === "pointerdown" && n === 0 || e === "click",
|
|
@@ -6361,16 +6381,16 @@ function Kh(e, t, n = 0) {
|
|
|
6361
6381
|
cancelDefault: !o && e === "click"
|
|
6362
6382
|
};
|
|
6363
6383
|
}
|
|
6364
|
-
function
|
|
6365
|
-
const t = e, n = t && typeof t.closest == "function" ? t.closest(
|
|
6384
|
+
function Jh(e) {
|
|
6385
|
+
const t = e, n = t && typeof t.closest == "function" ? t.closest(Kh) : null;
|
|
6366
6386
|
return n?.dataset.sceneId ?? n?.dataset.studioElement ?? n?.dataset.studioPlaceholderFor;
|
|
6367
6387
|
}
|
|
6368
|
-
var
|
|
6369
|
-
function
|
|
6370
|
-
const t = e, n = t && typeof t.closest == "function" ? t.closest(
|
|
6388
|
+
var Qh = "[data-scene-item], [data-scene-nav-item]";
|
|
6389
|
+
function Yh(e) {
|
|
6390
|
+
const t = e, n = t && typeof t.closest == "function" ? t.closest(Qh) : null;
|
|
6371
6391
|
return n?.dataset.sceneItem ?? n?.dataset.sceneNavItem;
|
|
6372
6392
|
}
|
|
6373
|
-
function
|
|
6393
|
+
function Xh(e, t, n = !1) {
|
|
6374
6394
|
const o = V(t);
|
|
6375
6395
|
o.current = t;
|
|
6376
6396
|
const i = V(n);
|
|
@@ -6380,14 +6400,14 @@ function Yh(e, t, n = !1) {
|
|
|
6380
6400
|
const s = (l) => {
|
|
6381
6401
|
const c = l.target;
|
|
6382
6402
|
if (c?.closest?.(".studio-screen-surface__chrome")) return;
|
|
6383
|
-
const u =
|
|
6403
|
+
const u = qh(c, i.current);
|
|
6384
6404
|
if (u === We.Navigate) return;
|
|
6385
6405
|
if (u === We.Ignore) {
|
|
6386
6406
|
l.type === "click" && l.preventDefault(), l.stopPropagation();
|
|
6387
6407
|
return;
|
|
6388
6408
|
}
|
|
6389
|
-
const d =
|
|
6390
|
-
d.select && (tn(c) || r.focus({ preventScroll: !0 }), o.current(
|
|
6409
|
+
const d = Vh(l.type, c, l.button);
|
|
6410
|
+
d.select && (tn(c) || r.focus({ preventScroll: !0 }), o.current(Jh(c), Yh(c))), d.cancelDefault && l.preventDefault(), d.swallow && l.stopPropagation();
|
|
6391
6411
|
};
|
|
6392
6412
|
for (const l of Ui) r.addEventListener(l, s, !0);
|
|
6393
6413
|
return () => {
|
|
@@ -6395,7 +6415,7 @@ function Yh(e, t, n = !1) {
|
|
|
6395
6415
|
};
|
|
6396
6416
|
}, [e]);
|
|
6397
6417
|
}
|
|
6398
|
-
var Wi = 'button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])', zi = 440,
|
|
6418
|
+
var Wi = 'button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])', zi = 440, Zh = ({ registry: e, property: t, context: n, componentId: o, anchor: i, opener: r, bounds: s, title: l, strings: c, onChange: u, onClose: d }) => {
|
|
6399
6419
|
const p = V(null);
|
|
6400
6420
|
ce(() => ((p.current?.querySelector(Wi) ?? p.current)?.focus({ preventScroll: !0 }), () => {
|
|
6401
6421
|
r.isConnected && r.focus({ preventScroll: !0 });
|
|
@@ -6444,7 +6464,7 @@ var Wi = 'button:not(:disabled), [href], input:not(:disabled), select:not(:disab
|
|
|
6444
6464
|
})
|
|
6445
6465
|
});
|
|
6446
6466
|
};
|
|
6447
|
-
function
|
|
6467
|
+
function ef({ anchor: e, bounds: t, size: n, prefer: o, gap: i = 6 }) {
|
|
6448
6468
|
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));
|
|
6449
6469
|
return {
|
|
6450
6470
|
left: Math.max(t.left, Math.min(e.left, t.left + t.width - n.width)),
|
|
@@ -6457,27 +6477,27 @@ var Hi = [
|
|
|
6457
6477
|
_.slot,
|
|
6458
6478
|
_.slice,
|
|
6459
6479
|
_.emphasis
|
|
6460
|
-
],
|
|
6480
|
+
], tf = [
|
|
6461
6481
|
_.moveEarlier,
|
|
6462
6482
|
_.moveLater,
|
|
6463
6483
|
_.addSubItem,
|
|
6464
6484
|
_.duplicate,
|
|
6465
6485
|
_.delete
|
|
6466
|
-
],
|
|
6486
|
+
], nf = {
|
|
6467
6487
|
[_.target]: /* @__PURE__ */ a(fc, { "aria-hidden": "true" }),
|
|
6468
6488
|
[_.slot]: /* @__PURE__ */ a(gc, { "aria-hidden": "true" }),
|
|
6469
6489
|
[_.slice]: /* @__PURE__ */ a(yc, { "aria-hidden": "true" })
|
|
6470
|
-
},
|
|
6490
|
+
}, of = {
|
|
6471
6491
|
[_.moveEarlier]: /* @__PURE__ */ a(uc, { "aria-hidden": "true" }),
|
|
6472
6492
|
[_.moveLater]: /* @__PURE__ */ a(pc, { "aria-hidden": "true" }),
|
|
6473
6493
|
[_.addSubItem]: /* @__PURE__ */ a(hc, { "aria-hidden": "true" }),
|
|
6474
6494
|
[_.duplicate]: /* @__PURE__ */ a(mc, { "aria-hidden": "true" }),
|
|
6475
6495
|
[_.delete]: /* @__PURE__ */ a(bc, { "aria-hidden": "true" })
|
|
6476
|
-
},
|
|
6496
|
+
}, rf = ({ 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: h }) => {
|
|
6477
6497
|
const f = V(null), g = V(null), [m, v] = j({
|
|
6478
6498
|
width: 380,
|
|
6479
6499
|
height: 100
|
|
6480
|
-
}), [w, P] = j(t.label), [x, C] = j(0), k = e.mode.itemToolbar, y = k.some((D) => D.compact === !0), T = k.some((D) => Hi.includes(D.id)), M = k.find((D) => D.id === _.rename), I = M &&
|
|
6500
|
+
}), [w, P] = j(t.label), [x, C] = j(0), k = e.mode.itemToolbar, y = k.some((D) => D.compact === !0), T = k.some((D) => Hi.includes(D.id)), M = k.find((D) => D.id === _.rename), I = M && Ft(M, t);
|
|
6481
6501
|
ce(() => {
|
|
6482
6502
|
P(t.label);
|
|
6483
6503
|
}, [t.id, t.label]), ce(() => {
|
|
@@ -6489,7 +6509,7 @@ var Hi = [
|
|
|
6489
6509
|
height: D.height
|
|
6490
6510
|
});
|
|
6491
6511
|
});
|
|
6492
|
-
const N = e.source.kind === "elements" ? "above" : "below", R =
|
|
6512
|
+
const N = e.source.kind === "elements" ? "above" : "below", R = ef({
|
|
6493
6513
|
anchor: n,
|
|
6494
6514
|
bounds: o,
|
|
6495
6515
|
size: m,
|
|
@@ -6497,7 +6517,7 @@ var Hi = [
|
|
|
6497
6517
|
}), B = V(!1), S = () => {
|
|
6498
6518
|
const D = w.trim();
|
|
6499
6519
|
D !== "" && D !== t.label ? l(D) : P(t.label);
|
|
6500
|
-
},
|
|
6520
|
+
}, E = (D) => {
|
|
6501
6521
|
D.key === "Enter" && (D.preventDefault(), S(), B.current = !0, h()), D.key === "Escape" && (D.preventDefault(), D.stopPropagation(), P(t.label), B.current = !0, h());
|
|
6502
6522
|
}, $ = () => {
|
|
6503
6523
|
if (B.current) {
|
|
@@ -6535,7 +6555,7 @@ var Hi = [
|
|
|
6535
6555
|
"data-read-only": "true",
|
|
6536
6556
|
children: [/* @__PURE__ */ b("span", {
|
|
6537
6557
|
className: "studio-design-toolbar__reason",
|
|
6538
|
-
children: [/* @__PURE__ */ a(
|
|
6558
|
+
children: [/* @__PURE__ */ a(Er, { "aria-hidden": "true" }), /* @__PURE__ */ a("span", { children: D })]
|
|
6539
6559
|
}), d.map((ee, he) => /* @__PURE__ */ a("button", {
|
|
6540
6560
|
type: "button",
|
|
6541
6561
|
className: "studio-design-toolbar__text-action",
|
|
@@ -6554,7 +6574,7 @@ var Hi = [
|
|
|
6554
6574
|
"data-roving": D,
|
|
6555
6575
|
tabIndex: x === D ? 0 : -1
|
|
6556
6576
|
};
|
|
6557
|
-
}, ue = k.filter((D) => Hi.includes(D.id) &&
|
|
6577
|
+
}, ue = k.filter((D) => Hi.includes(D.id) && Ft(D, t).visible), Ie = tf.flatMap((D) => k.filter((ee) => ee.id === D)).filter((D) => Ft(D, t).visible);
|
|
6558
6578
|
return /* @__PURE__ */ b("div", {
|
|
6559
6579
|
...ne,
|
|
6560
6580
|
children: [
|
|
@@ -6567,7 +6587,7 @@ var Hi = [
|
|
|
6567
6587
|
"data-action": "rename",
|
|
6568
6588
|
onChange: (D) => P(D.target.value),
|
|
6569
6589
|
onBlur: $,
|
|
6570
|
-
onKeyDown:
|
|
6590
|
+
onKeyDown: E,
|
|
6571
6591
|
onFocus: (D) => D.currentTarget.select()
|
|
6572
6592
|
}),
|
|
6573
6593
|
I?.visible && T && /* @__PURE__ */ a("span", {
|
|
@@ -6585,7 +6605,7 @@ var Hi = [
|
|
|
6585
6605
|
"aria-haspopup": "dialog",
|
|
6586
6606
|
...me(),
|
|
6587
6607
|
onClick: (ee) => u(D.id, ee.currentTarget),
|
|
6588
|
-
children: [
|
|
6608
|
+
children: [nf[D.id], /* @__PURE__ */ a("span", { children: s(D.id, t) })]
|
|
6589
6609
|
}, D.id))
|
|
6590
6610
|
}),
|
|
6591
6611
|
ue.length > 0 && Ie.length > 0 && /* @__PURE__ */ a("span", {
|
|
@@ -6595,7 +6615,7 @@ var Hi = [
|
|
|
6595
6615
|
Ie.length > 0 && /* @__PURE__ */ a("div", {
|
|
6596
6616
|
className: "studio-design-toolbar__actions",
|
|
6597
6617
|
children: Ie.map((D) => {
|
|
6598
|
-
const ee =
|
|
6618
|
+
const ee = Ft(D, t);
|
|
6599
6619
|
return /* @__PURE__ */ a("button", {
|
|
6600
6620
|
type: "button",
|
|
6601
6621
|
className: "studio-design-toolbar__button",
|
|
@@ -6605,20 +6625,20 @@ var Hi = [
|
|
|
6605
6625
|
disabled: !ee.enabled,
|
|
6606
6626
|
...me(),
|
|
6607
6627
|
onClick: () => c(D.id),
|
|
6608
|
-
children:
|
|
6628
|
+
children: of[D.id]
|
|
6609
6629
|
}, D.id);
|
|
6610
6630
|
})
|
|
6611
6631
|
})
|
|
6612
6632
|
]
|
|
6613
6633
|
});
|
|
6614
|
-
},
|
|
6634
|
+
}, af = (e) => {
|
|
6615
6635
|
const t = CSS.escape(e);
|
|
6616
6636
|
return [
|
|
6617
6637
|
`[data-scene-nav-item="${t}"] > [data-scene-nav-link]`,
|
|
6618
6638
|
`[data-scene-nav-item="${t}"]`,
|
|
6619
6639
|
`[data-scene-item="${t}"]`
|
|
6620
6640
|
];
|
|
6621
|
-
}, Pn = (e, t) => e === t || !!e && !!t && e.left === t.left && e.top === t.top && e.width === t.width && e.height === t.height,
|
|
6641
|
+
}, Pn = (e, t) => e === t || !!e && !!t && e.left === t.left && e.top === t.top && e.width === t.width && e.height === t.height, sf = (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));
|
|
6622
6642
|
function eo(e, t, n) {
|
|
6623
6643
|
const [o, i] = j(), r = z(() => {
|
|
6624
6644
|
const s = e.current, l = s ? t(s, s.getBoundingClientRect()) : void 0;
|
|
@@ -6658,12 +6678,12 @@ function eo(e, t, n) {
|
|
|
6658
6678
|
};
|
|
6659
6679
|
}, [e, r]), o;
|
|
6660
6680
|
}
|
|
6661
|
-
function
|
|
6681
|
+
function lf(e, t) {
|
|
6662
6682
|
return eo(e, z((n, o) => {
|
|
6663
6683
|
if (!t) return;
|
|
6664
6684
|
const i = Le(n, t.componentId, o), r = n.querySelector(`[data-studio-element="${CSS.escape(t.componentId)}"]`) ?? n.querySelector(`[data-scene-id="${CSS.escape(t.componentId)}"]`), s = {};
|
|
6665
6685
|
for (const l of t.source.items) {
|
|
6666
|
-
const c = Le(n, l.id, o) ?? (r ?
|
|
6686
|
+
const c = Le(n, l.id, o) ?? (r ? af(l.id).map((u) => r.querySelector(u)).flatMap((u) => u ? [Da(u, o)] : []).find((u) => u !== void 0) : void 0);
|
|
6667
6687
|
c && (s[l.id] = c);
|
|
6668
6688
|
}
|
|
6669
6689
|
return {
|
|
@@ -6676,17 +6696,17 @@ function sf(e, t) {
|
|
|
6676
6696
|
component: i,
|
|
6677
6697
|
items: s
|
|
6678
6698
|
};
|
|
6679
|
-
}, [t]),
|
|
6699
|
+
}, [t]), sf);
|
|
6680
6700
|
}
|
|
6681
|
-
var xn = 34,
|
|
6682
|
-
const { subject: s } = t, l =
|
|
6683
|
-
if (typeof
|
|
6684
|
-
const $ = o.propertyEditors?.slices?.find((q) => q.id ===
|
|
6701
|
+
var xn = 34, cf = ({ surface: e, state: t, controller: n, environment: o, editorStrings: i, strings: r }) => {
|
|
6702
|
+
const { subject: s } = t, l = lf(e, s), [c, u] = j(), d = o.propertyEditors?.registry ?? nn, p = U(() => So(o.availableSources), [o.availableSources]), h = z((E) => {
|
|
6703
|
+
if (typeof E != "string" || E === "") return;
|
|
6704
|
+
const $ = o.propertyEditors?.slices?.find((q) => q.id === E) ?? o.stateChangeSlices.find((q) => q.id === E), A = E.split(".");
|
|
6685
6705
|
return $?.name ?? A[A.length - 1];
|
|
6686
|
-
}, [o]), f = z((
|
|
6687
|
-
const A = $.chips?.[
|
|
6706
|
+
}, [o]), f = z((E, $) => {
|
|
6707
|
+
const A = $.chips?.[E];
|
|
6688
6708
|
if (A !== void 0 && A !== "") return A;
|
|
6689
|
-
switch (
|
|
6709
|
+
switch (E) {
|
|
6690
6710
|
case _.slice:
|
|
6691
6711
|
return h($.values.slice) ?? r.chooseSlice;
|
|
6692
6712
|
case _.emphasis:
|
|
@@ -6699,8 +6719,8 @@ var xn = 34, lf = ({ surface: e, state: t, controller: n, environment: o, editor
|
|
|
6699
6719
|
}, [h, r]), g = s?.selected?.parentId !== void 0 && l !== void 0 && l.items[s.selected.id] === void 0, m = s?.selected?.parentId;
|
|
6700
6720
|
if (ce(() => {
|
|
6701
6721
|
if (!g || !m) return;
|
|
6702
|
-
const
|
|
6703
|
-
|
|
6722
|
+
const E = e.current?.querySelector(`[data-scene-nav-item="${CSS.escape(m)}"] > [data-scene-nav-link]`);
|
|
6723
|
+
E && (E.focus({ preventScroll: !0 }), E.dispatchEvent(new KeyboardEvent("keydown", {
|
|
6704
6724
|
key: "ArrowRight",
|
|
6705
6725
|
bubbles: !0,
|
|
6706
6726
|
cancelable: !0
|
|
@@ -6710,7 +6730,7 @@ var xn = 34, lf = ({ surface: e, state: t, controller: n, environment: o, editor
|
|
|
6710
6730
|
m,
|
|
6711
6731
|
e
|
|
6712
6732
|
]), !s || !l) return null;
|
|
6713
|
-
const { selected: v, source: w } = s, P = s.mode.addActions[0], x = w.items.flatMap((
|
|
6733
|
+
const { selected: v, source: w } = s, P = s.mode.addActions[0], x = w.items.flatMap((E) => l.items[E.id] ? [l.items[E.id]] : []), C = x[x.length - 1], k = s.mode.itemToolbar.some((E) => E.compact === !0), y = C ?? l.component, T = y && P ? k || !C ? {
|
|
6714
6734
|
left: (C ?? y).left,
|
|
6715
6735
|
top: (C ? C.top + C.height : y.top) + 8
|
|
6716
6736
|
} : {
|
|
@@ -6725,7 +6745,7 @@ var xn = 34, lf = ({ surface: e, state: t, controller: n, environment: o, editor
|
|
|
6725
6745
|
inCanvas: !1,
|
|
6726
6746
|
bindingScope: p,
|
|
6727
6747
|
slotNames: da(r.navigation)
|
|
6728
|
-
}), B = (
|
|
6748
|
+
}), B = (E, $) => {
|
|
6729
6749
|
if (!I) return;
|
|
6730
6750
|
const A = I.plan($);
|
|
6731
6751
|
ia(A) || u(void 0), t.perform(A);
|
|
@@ -6746,7 +6766,7 @@ var xn = 34, lf = ({ surface: e, state: t, controller: n, environment: o, editor
|
|
|
6746
6766
|
onClick: () => t.add(P.id),
|
|
6747
6767
|
children: /* @__PURE__ */ a(vc, { "aria-hidden": "true" })
|
|
6748
6768
|
}),
|
|
6749
|
-
v && S && /* @__PURE__ */ a(
|
|
6769
|
+
v && S && /* @__PURE__ */ a(rf, {
|
|
6750
6770
|
subject: s,
|
|
6751
6771
|
item: v,
|
|
6752
6772
|
anchor: S,
|
|
@@ -6754,26 +6774,26 @@ var xn = 34, lf = ({ surface: e, state: t, controller: n, environment: o, editor
|
|
|
6754
6774
|
strings: r,
|
|
6755
6775
|
renameToken: t.renameToken,
|
|
6756
6776
|
chipLabel: f,
|
|
6757
|
-
onRename: (
|
|
6758
|
-
onAction: (
|
|
6759
|
-
onChoice: (
|
|
6760
|
-
actionId:
|
|
6777
|
+
onRename: (E) => t.rename(v, E),
|
|
6778
|
+
onAction: (E) => t.act(E, v),
|
|
6779
|
+
onChoice: (E, $) => u((A) => A && A.actionId === E && A.itemId === v.id ? void 0 : {
|
|
6780
|
+
actionId: E,
|
|
6761
6781
|
itemId: v.id,
|
|
6762
6782
|
opener: $
|
|
6763
6783
|
}),
|
|
6764
6784
|
readOnlyActions: w.readOnlyActions(v),
|
|
6765
|
-
onReadOnlyAction: (
|
|
6785
|
+
onReadOnlyAction: (E) => t.perform(E.plan()),
|
|
6766
6786
|
onLeave: () => e.current?.focus({ preventScroll: !0 })
|
|
6767
6787
|
}, v.id),
|
|
6768
|
-
I && c && S && /* @__PURE__ */ a(
|
|
6788
|
+
I && c && S && /* @__PURE__ */ a(Zh, {
|
|
6769
6789
|
registry: d,
|
|
6770
6790
|
property: I.property,
|
|
6771
6791
|
context: R(),
|
|
6772
6792
|
componentId: v.id,
|
|
6773
|
-
anchor:
|
|
6793
|
+
anchor: df(e, c.opener),
|
|
6774
6794
|
opener: c.opener,
|
|
6775
6795
|
bounds: l.surface,
|
|
6776
|
-
title: s.mode.itemToolbar.find((
|
|
6796
|
+
title: s.mode.itemToolbar.find((E) => E.id === c.actionId)?.title ?? c.actionId,
|
|
6777
6797
|
strings: r,
|
|
6778
6798
|
onChange: B,
|
|
6779
6799
|
onClose: N
|
|
@@ -6801,7 +6821,7 @@ var xn = 34, lf = ({ surface: e, state: t, controller: n, environment: o, editor
|
|
|
6801
6821
|
})
|
|
6802
6822
|
] });
|
|
6803
6823
|
};
|
|
6804
|
-
function
|
|
6824
|
+
function df(e, t) {
|
|
6805
6825
|
const n = e.current?.getBoundingClientRect(), o = t.getBoundingClientRect();
|
|
6806
6826
|
return {
|
|
6807
6827
|
left: o.left - (n?.left ?? 0),
|
|
@@ -6811,24 +6831,24 @@ function cf(e, t) {
|
|
|
6811
6831
|
};
|
|
6812
6832
|
}
|
|
6813
6833
|
var Gi = 6;
|
|
6814
|
-
function
|
|
6834
|
+
function Ea(e, t) {
|
|
6815
6835
|
return e.flatMap((n) => {
|
|
6816
6836
|
const o = qe(n) ? n.componentName : void 0, i = o ? lo(t, o) : void 0, r = i?.designMode, s = o ? an(o) : void 0;
|
|
6817
6837
|
return [...r && r.addActions.length > 0 && (s !== void 0 || r.itemsPath !== void 0 || rn[r.addActions[0].id] !== void 0) ? [{
|
|
6818
6838
|
id: n.id,
|
|
6819
6839
|
name: i?.displayName ?? i?.component ?? "",
|
|
6820
6840
|
...s ? { region: s } : {}
|
|
6821
|
-
}] : [], ...
|
|
6841
|
+
}] : [], ...Ea(Xt(n), t)];
|
|
6822
6842
|
});
|
|
6823
6843
|
}
|
|
6824
|
-
var
|
|
6825
|
-
const o = eo(e, z((f, g) => Le(f, "composition", g), []),
|
|
6844
|
+
var uf = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width && e.height === t.height, qi = "content", pf = (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), mf = ({ surface: e, controller: t, strings: n }) => {
|
|
6845
|
+
const o = eo(e, z((f, g) => Le(f, "composition", g), []), uf), { composition: i, context: r, selectedId: s, navigation: l, navigationModule: c, structure: u } = t, d = U(() => Ea(i.roots, r.catalog), [i.roots, r.catalog]), p = z((f, g) => d.flatMap((m) => {
|
|
6826
6846
|
const v = Le(f, m.id, g);
|
|
6827
6847
|
return v ? [{
|
|
6828
6848
|
...m,
|
|
6829
6849
|
rect: v
|
|
6830
6850
|
}] : [];
|
|
6831
|
-
}), [d]), h = eo(e, p,
|
|
6851
|
+
}), [d]), h = eo(e, p, pf);
|
|
6832
6852
|
return /* @__PURE__ */ b(le, { children: [o && /* @__PURE__ */ a("div", {
|
|
6833
6853
|
className: "studio-design-slot",
|
|
6834
6854
|
"data-slot": qi,
|
|
@@ -6882,9 +6902,9 @@ var df = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width &
|
|
|
6882
6902
|
})
|
|
6883
6903
|
}, f);
|
|
6884
6904
|
})] });
|
|
6885
|
-
},
|
|
6905
|
+
}, hf = sl(), Lt = () => {
|
|
6886
6906
|
throw new Error("The screen is being designed; it does not navigate.");
|
|
6887
|
-
},
|
|
6907
|
+
}, ff = ({ structure: e, navigation: t, module: n, logoLockedReason: o, onNavigate: i, peeking: r, children: s }) => {
|
|
6888
6908
|
const l = U(() => new Zt(e), [e]), c = U(() => ({
|
|
6889
6909
|
structure: l,
|
|
6890
6910
|
navigation: t
|
|
@@ -6918,7 +6938,7 @@ var df = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width &
|
|
|
6918
6938
|
children: /* @__PURE__ */ a(il, {
|
|
6919
6939
|
model: c,
|
|
6920
6940
|
children: /* @__PURE__ */ a(al, {
|
|
6921
|
-
invoker:
|
|
6941
|
+
invoker: hf,
|
|
6922
6942
|
warnEmptySlices: !0,
|
|
6923
6943
|
children: s
|
|
6924
6944
|
})
|
|
@@ -6928,11 +6948,11 @@ var df = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width &
|
|
|
6928
6948
|
value: p,
|
|
6929
6949
|
children: g
|
|
6930
6950
|
}) : g;
|
|
6931
|
-
},
|
|
6951
|
+
}, gf = 'button, a[href], [role="button"], [role="radio"], [role="option"], [role="menuitem"]', vf = (e) => {
|
|
6932
6952
|
const t = e;
|
|
6933
|
-
return !!t && typeof t.closest == "function" && t.closest(
|
|
6953
|
+
return !!t && typeof t.closest == "function" && t.closest(gf) !== null;
|
|
6934
6954
|
};
|
|
6935
|
-
function
|
|
6955
|
+
function bf(e, t, n) {
|
|
6936
6956
|
const { subject: o } = t;
|
|
6937
6957
|
if (!o) return !1;
|
|
6938
6958
|
const i = tn(e.target), r = () => (e.preventDefault(), e.stopPropagation(), !0);
|
|
@@ -6940,7 +6960,7 @@ function vf(e, t, n) {
|
|
|
6940
6960
|
return t.deselect(), r();
|
|
6941
6961
|
const s = o.selected;
|
|
6942
6962
|
if (!s || i || s.readOnly) return !1;
|
|
6943
|
-
if (e.key === "Enter" && !e.altKey && !e.ctrlKey && !e.metaKey) return !
|
|
6963
|
+
if (e.key === "Enter" && !e.altKey && !e.ctrlKey && !e.metaKey) return !vf(e.target) && n() ? r() : !1;
|
|
6944
6964
|
if (e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
6945
6965
|
const l = e.key === "ArrowUp" || e.key === "ArrowLeft", c = e.key === "ArrowDown" || e.key === "ArrowRight";
|
|
6946
6966
|
if (l || c)
|
|
@@ -6962,20 +6982,20 @@ function Ma(e, t, n) {
|
|
|
6962
6982
|
...l ? { slots: l } : {}
|
|
6963
6983
|
} : e;
|
|
6964
6984
|
}
|
|
6965
|
-
var
|
|
6966
|
-
},
|
|
6985
|
+
var yf = () => {
|
|
6986
|
+
}, wf = {
|
|
6967
6987
|
button: "Button",
|
|
6968
6988
|
item: "New item"
|
|
6969
|
-
},
|
|
6970
|
-
const c = V(null), { composition: u, dropRegions: d, selectedId: p } = e, { selectionRect: h, measureNow: f } =
|
|
6989
|
+
}, kf = ({ controller: e, environment: t, resolveBinding: n = yf, configuration: o, strings: i, editorStrings: r, viewportHeight: s, shell: l }) => {
|
|
6990
|
+
const c = V(null), { composition: u, dropRegions: d, selectedId: p } = e, { selectionRect: h, measureNow: f } = Gh(c, d, p), { feedback: g, draggedId: m, startMoving: v, endMoving: w, handlers: P } = zh(c, f, e), [x, C] = j(), k = _h(e, t), { document: y, context: T } = e, M = U(() => o ?? (y.instanceContributions.length > 0 ? mr(mo(y, T.scope), y.instanceContributions, T.catalog) : void 0), [
|
|
6971
6991
|
o,
|
|
6972
6992
|
y,
|
|
6973
6993
|
T
|
|
6974
|
-
]), I = r?.designMode ?? Oo, N = t.destinations[0], R = U(() => N ? { screen: N.id } : void 0, [N]), B =
|
|
6994
|
+
]), I = r?.designMode ?? Oo, N = t.destinations[0], R = U(() => N ? { screen: N.id } : void 0, [N]), B = pm({
|
|
6975
6995
|
controller: e,
|
|
6976
6996
|
environment: t,
|
|
6977
6997
|
strings: I,
|
|
6978
|
-
startingLabels:
|
|
6998
|
+
startingLabels: wf,
|
|
6979
6999
|
...R ? { startingDestination: R } : {}
|
|
6980
7000
|
});
|
|
6981
7001
|
Se(() => {
|
|
@@ -6989,26 +7009,26 @@ var bf = () => {
|
|
|
6989
7009
|
J.preventDefault(), l.back();
|
|
6990
7010
|
return;
|
|
6991
7011
|
}
|
|
6992
|
-
|
|
7012
|
+
bf(J, B, () => {
|
|
6993
7013
|
const ae = c.current?.querySelector(".studio-design-toolbar__title");
|
|
6994
7014
|
return ae?.focus({ preventScroll: !0 }), !!ae;
|
|
6995
7015
|
}) || !ko(J) || !e.selectedId || !e.canRemove(e.selectedId) || (J.preventDefault(), e.remove(e.selectedId));
|
|
6996
|
-
},
|
|
6997
|
-
|
|
7016
|
+
}, E = !!e.selectedId && e.ownershipOf(e.selectedId) === ie.Local && e.canRemove(e.selectedId), $ = e.selection && (e.selection.name || e.selection.componentName) || "";
|
|
7017
|
+
Xh(c, (J, ae) => {
|
|
6998
7018
|
e.select(J), B.pointItem(J, ae);
|
|
6999
7019
|
}, l?.frame !== void 0);
|
|
7000
7020
|
const { setMeasurer: A } = e;
|
|
7001
7021
|
ce(() => (A((J) => {
|
|
7002
7022
|
const ae = c.current;
|
|
7003
7023
|
if (!ae) return;
|
|
7004
|
-
const
|
|
7024
|
+
const F = ae.getBoundingClientRect(), W = ae.querySelector(`[data-studio-element="${CSS.escape(J)}"]`)?.closest("[data-scene-placement]")?.getBoundingClientRect();
|
|
7005
7025
|
if (W && W.width > 0 && W.height > 0) return {
|
|
7006
|
-
left: W.left -
|
|
7007
|
-
top: W.top -
|
|
7026
|
+
left: W.left - F.left,
|
|
7027
|
+
top: W.top - F.top,
|
|
7008
7028
|
width: W.width,
|
|
7009
7029
|
height: W.height
|
|
7010
7030
|
};
|
|
7011
|
-
const L = Le(ae, J,
|
|
7031
|
+
const L = Le(ae, J, F);
|
|
7012
7032
|
return L && {
|
|
7013
7033
|
left: L.left,
|
|
7014
7034
|
top: L.top,
|
|
@@ -7022,17 +7042,17 @@ var bf = () => {
|
|
|
7022
7042
|
t.runtime.packages
|
|
7023
7043
|
]), ne = l?.peeking, ye = r?.shellPeeking(l?.peekingName ?? "") ?? "", me = U(() => {
|
|
7024
7044
|
const J = l?.frame;
|
|
7025
|
-
return J ? Ma(J.element, $o, ne ?
|
|
7045
|
+
return J ? Ma(J.element, $o, ne ? lh(ne, ye) : q) : q;
|
|
7026
7046
|
}, [
|
|
7027
7047
|
l?.frame,
|
|
7028
7048
|
q,
|
|
7029
7049
|
ne,
|
|
7030
7050
|
ye
|
|
7031
|
-
]), ue = U(() =>
|
|
7051
|
+
]), ue = U(() => xh(t.runtime.registry, i), [t.runtime.registry, i]), Ie = U(() => jo(t.runtime), [t.runtime]), D = U(() => /* @__PURE__ */ a(yr, {
|
|
7032
7052
|
registry: t.runtime.iconAdapters,
|
|
7033
7053
|
children: /* @__PURE__ */ a(fr, {
|
|
7034
7054
|
storage: null,
|
|
7035
|
-
children: /* @__PURE__ */ a(
|
|
7055
|
+
children: /* @__PURE__ */ a(ff, {
|
|
7036
7056
|
structure: e.structure,
|
|
7037
7057
|
navigation: e.navigation,
|
|
7038
7058
|
module: e.navigationModule,
|
|
@@ -7083,7 +7103,7 @@ var bf = () => {
|
|
|
7083
7103
|
"data-moving": m === e.selectedId ? "true" : void 0,
|
|
7084
7104
|
style: h
|
|
7085
7105
|
}),
|
|
7086
|
-
h &&
|
|
7106
|
+
h && E && /* @__PURE__ */ a("div", {
|
|
7087
7107
|
className: "studio-screen-surface__grip",
|
|
7088
7108
|
style: {
|
|
7089
7109
|
left: h.left,
|
|
@@ -7093,12 +7113,12 @@ var bf = () => {
|
|
|
7093
7113
|
"aria-hidden": "true",
|
|
7094
7114
|
title: i.moveHandle($),
|
|
7095
7115
|
onDragStart: (J) => {
|
|
7096
|
-
v(e.selectedId),
|
|
7116
|
+
v(e.selectedId), Am(J, e.selectedId, $);
|
|
7097
7117
|
},
|
|
7098
7118
|
onDragEnd: w,
|
|
7099
7119
|
children: /* @__PURE__ */ a(Al, { "aria-hidden": "true" })
|
|
7100
7120
|
}),
|
|
7101
|
-
g && /* @__PURE__ */ a(
|
|
7121
|
+
g && /* @__PURE__ */ a(Dh, {
|
|
7102
7122
|
feedback: g,
|
|
7103
7123
|
deniedText: i.dropDenied
|
|
7104
7124
|
}),
|
|
@@ -7106,12 +7126,12 @@ var bf = () => {
|
|
|
7106
7126
|
surface: c,
|
|
7107
7127
|
markers: k
|
|
7108
7128
|
}),
|
|
7109
|
-
/* @__PURE__ */ a(
|
|
7129
|
+
/* @__PURE__ */ a(mf, {
|
|
7110
7130
|
surface: c,
|
|
7111
7131
|
controller: e,
|
|
7112
7132
|
strings: I
|
|
7113
7133
|
}),
|
|
7114
|
-
r && /* @__PURE__ */ a(
|
|
7134
|
+
r && /* @__PURE__ */ a(cf, {
|
|
7115
7135
|
surface: c,
|
|
7116
7136
|
state: B,
|
|
7117
7137
|
controller: e,
|
|
@@ -7130,14 +7150,14 @@ var bf = () => {
|
|
|
7130
7150
|
})
|
|
7131
7151
|
});
|
|
7132
7152
|
}, Ki = 40, Aa = ({ controller: e, environment: t, strings: n, window: o, authoringTemplate: i, deviceFrame: r = !1, saveFailure: s, onSave: l, isSaving: c = !1, onPreview: u }) => {
|
|
7133
|
-
const d =
|
|
7153
|
+
const d = gh(e.document, t.runtime, i), p = !!e.selectedId && e.canRemove(e.selectedId), h = /* @__PURE__ */ b(le, { children: [
|
|
7134
7154
|
/* @__PURE__ */ a("span", {
|
|
7135
7155
|
className: "studio-screen-editor-window__state",
|
|
7136
7156
|
role: "status",
|
|
7137
7157
|
"data-dirty": e.isDirty ? "" : void 0,
|
|
7138
7158
|
children: e.isDirty ? n.unsavedChanges : n.allChangesSaved
|
|
7139
7159
|
}),
|
|
7140
|
-
/* @__PURE__ */ a(
|
|
7160
|
+
/* @__PURE__ */ a(oh, {
|
|
7141
7161
|
windowSize: o.size,
|
|
7142
7162
|
available: o.available,
|
|
7143
7163
|
strings: n,
|
|
@@ -7207,7 +7227,7 @@ var bf = () => {
|
|
|
7207
7227
|
role: "group",
|
|
7208
7228
|
"aria-label": n.windowLabel,
|
|
7209
7229
|
children: [
|
|
7210
|
-
/* @__PURE__ */ a(
|
|
7230
|
+
/* @__PURE__ */ a(eh, { controls: h }),
|
|
7211
7231
|
s && /* @__PURE__ */ b("p", {
|
|
7212
7232
|
className: "studio-screen-editor-window__notice",
|
|
7213
7233
|
role: "alert",
|
|
@@ -7234,7 +7254,7 @@ var bf = () => {
|
|
|
7234
7254
|
onClick: d.back,
|
|
7235
7255
|
children: n.shellPeekBack
|
|
7236
7256
|
})]
|
|
7237
|
-
}), /* @__PURE__ */ a(
|
|
7257
|
+
}), /* @__PURE__ */ a(kf, {
|
|
7238
7258
|
controller: e,
|
|
7239
7259
|
environment: t,
|
|
7240
7260
|
resolveBinding: () => {
|
|
@@ -7249,7 +7269,7 @@ var bf = () => {
|
|
|
7249
7269
|
]
|
|
7250
7270
|
});
|
|
7251
7271
|
};
|
|
7252
|
-
function
|
|
7272
|
+
function Sf(e, t, n) {
|
|
7253
7273
|
const o = e.screens.find((l) => l.name === be);
|
|
7254
7274
|
if (!o || o.screenTemplate === t?.name) return e;
|
|
7255
7275
|
const i = o.screenTemplate, r = e.screens.map((l) => {
|
|
@@ -7260,14 +7280,14 @@ function kf(e, t, n) {
|
|
|
7260
7280
|
screenTemplate: t.name
|
|
7261
7281
|
} : u;
|
|
7262
7282
|
});
|
|
7263
|
-
let s = e.screenTemplates.filter((l) => !
|
|
7283
|
+
let s = e.screenTemplates.filter((l) => !Cf(l, i, r, n));
|
|
7264
7284
|
return t && !s.some((l) => l.name === t.name) && (s = [...s, globalThis.structuredClone(t)]), {
|
|
7265
7285
|
...e,
|
|
7266
7286
|
screens: r,
|
|
7267
7287
|
screenTemplates: s
|
|
7268
7288
|
};
|
|
7269
7289
|
}
|
|
7270
|
-
function
|
|
7290
|
+
function Cf(e, t, n, o) {
|
|
7271
7291
|
if (e.name !== t || n.some((r) => r.screenTemplate === t)) return !1;
|
|
7272
7292
|
const i = o.find((r) => r.name === t);
|
|
7273
7293
|
return i !== void 0 && JSON.stringify(i) === JSON.stringify(e);
|
|
@@ -7303,14 +7323,14 @@ function La(e) {
|
|
|
7303
7323
|
top: o
|
|
7304
7324
|
} : void 0;
|
|
7305
7325
|
}
|
|
7306
|
-
function
|
|
7326
|
+
function Nf(e) {
|
|
7307
7327
|
const { [Je]: t, [Qe]: n, ...o } = e.properties ?? {};
|
|
7308
7328
|
return {
|
|
7309
7329
|
...e,
|
|
7310
7330
|
properties: o
|
|
7311
7331
|
};
|
|
7312
7332
|
}
|
|
7313
|
-
function
|
|
7333
|
+
function Tf(e) {
|
|
7314
7334
|
if (e.targetParentId !== null)
|
|
7315
7335
|
return {
|
|
7316
7336
|
kind: Y.MoveNode,
|
|
@@ -7327,7 +7347,7 @@ function Ba(e, t, n) {
|
|
|
7327
7347
|
element: n
|
|
7328
7348
|
};
|
|
7329
7349
|
}
|
|
7330
|
-
function
|
|
7350
|
+
function If(e) {
|
|
7331
7351
|
return {
|
|
7332
7352
|
kind: Y.RemoveNode,
|
|
7333
7353
|
nodeId: re(e)
|
|
@@ -7341,18 +7361,18 @@ var ja = (e, t) => (e?.children ?? []).map((n) => {
|
|
|
7341
7361
|
bottom: o?.bottom
|
|
7342
7362
|
};
|
|
7343
7363
|
});
|
|
7344
|
-
function
|
|
7364
|
+
function Pf(e, t, n, o) {
|
|
7345
7365
|
const i = ze(e, t.nodeId);
|
|
7346
7366
|
if (!i || t.targetParentId === null) return;
|
|
7347
7367
|
const r = oo(e, t.nodeId), s = ze(e, t.targetParentId), l = !!r && ut(r), c = !!s && ut(s);
|
|
7348
7368
|
if (!l && !c) return;
|
|
7349
|
-
const u = l && c && r.id === t.targetParentId, d = u ? r.children.findIndex((h) => h.id === t.nodeId) : t.index, p = c ? $a(i, n ?? (u ? La(i) : void 0) ?? _a(ja(s, o))) :
|
|
7369
|
+
const u = l && c && r.id === t.targetParentId, d = u ? r.children.findIndex((h) => h.id === t.nodeId) : t.index, p = c ? $a(i, n ?? (u ? La(i) : void 0) ?? _a(ja(s, o))) : Nf(i);
|
|
7350
7370
|
return [{
|
|
7351
7371
|
kind: Y.RemoveNode,
|
|
7352
7372
|
nodeId: re(t.nodeId)
|
|
7353
7373
|
}, Ba(t.targetParentId, d, p)];
|
|
7354
7374
|
}
|
|
7355
|
-
function
|
|
7375
|
+
function xf(e) {
|
|
7356
7376
|
switch (e) {
|
|
7357
7377
|
case Q.Row:
|
|
7358
7378
|
case Q.Wrap:
|
|
@@ -7367,7 +7387,7 @@ function Pf(e) {
|
|
|
7367
7387
|
}
|
|
7368
7388
|
}
|
|
7369
7389
|
function Vi(e, t, n, o) {
|
|
7370
|
-
const i = e ?? "screen", r =
|
|
7390
|
+
const i = e ?? "screen", r = xf(n), s = {
|
|
7371
7391
|
id: `${i}:container`,
|
|
7372
7392
|
kind: Te.Container,
|
|
7373
7393
|
containerId: e,
|
|
@@ -7386,15 +7406,15 @@ function Vi(e, t, n, o) {
|
|
|
7386
7406
|
...c < t.length ? { beforeId: o.idOf(t[c]) } : {}
|
|
7387
7407
|
}))];
|
|
7388
7408
|
}
|
|
7389
|
-
function
|
|
7409
|
+
function Of(e, t, n) {
|
|
7390
7410
|
const o = (i) => i.flatMap((r) => {
|
|
7391
7411
|
if (!n.acceptsChildren(r)) return [];
|
|
7392
7412
|
const s = n.childrenOf(r);
|
|
7393
|
-
return [...
|
|
7413
|
+
return [...kt(n.ownershipOf(r), $e.Insert) ? Vi(n.idOf(r), s, n.arrangementOf(r), n) : [], ...o(s)];
|
|
7394
7414
|
});
|
|
7395
7415
|
return [...Vi(null, e, t, n), ...o(e)];
|
|
7396
7416
|
}
|
|
7397
|
-
var
|
|
7417
|
+
var Df = class {
|
|
7398
7418
|
latest;
|
|
7399
7419
|
publish;
|
|
7400
7420
|
constructor(e, t) {
|
|
@@ -7407,7 +7427,7 @@ var Of = class {
|
|
|
7407
7427
|
return this.latest = e(this.latest), this.publish(this.latest), this.latest;
|
|
7408
7428
|
}
|
|
7409
7429
|
};
|
|
7410
|
-
function
|
|
7430
|
+
function Rf(e) {
|
|
7411
7431
|
return {
|
|
7412
7432
|
document: e,
|
|
7413
7433
|
undoable: [],
|
|
@@ -7417,7 +7437,7 @@ function Df(e) {
|
|
|
7417
7437
|
savedDocument: e
|
|
7418
7438
|
};
|
|
7419
7439
|
}
|
|
7420
|
-
function
|
|
7440
|
+
function Ff(e, t, n, o) {
|
|
7421
7441
|
const i = dr(e.document, t, n);
|
|
7422
7442
|
return i.applied ? {
|
|
7423
7443
|
...e,
|
|
@@ -7470,8 +7490,8 @@ function Ef(e, t, n, o) {
|
|
|
7470
7490
|
isDirty: i !== e.savedDocument
|
|
7471
7491
|
};
|
|
7472
7492
|
}
|
|
7473
|
-
var
|
|
7474
|
-
function
|
|
7493
|
+
var Mf = (e) => e.undoable.length > 0, Af = (e) => e.redoable.length > 0;
|
|
7494
|
+
function _f(e) {
|
|
7475
7495
|
const t = e.undoable[e.undoable.length - 1];
|
|
7476
7496
|
return t ? {
|
|
7477
7497
|
...e,
|
|
@@ -7485,7 +7505,7 @@ function Af(e) {
|
|
|
7485
7505
|
isDirty: t.before !== e.savedDocument
|
|
7486
7506
|
} : e;
|
|
7487
7507
|
}
|
|
7488
|
-
function
|
|
7508
|
+
function $f(e) {
|
|
7489
7509
|
const t = e.redoable[e.redoable.length - 1];
|
|
7490
7510
|
return t ? {
|
|
7491
7511
|
...e,
|
|
@@ -7499,7 +7519,7 @@ function _f(e) {
|
|
|
7499
7519
|
isDirty: t.before !== e.savedDocument
|
|
7500
7520
|
} : e;
|
|
7501
7521
|
}
|
|
7502
|
-
function
|
|
7522
|
+
function Lf(e) {
|
|
7503
7523
|
return {
|
|
7504
7524
|
...e,
|
|
7505
7525
|
savedDocument: e.document,
|
|
@@ -7508,21 +7528,21 @@ function $f(e) {
|
|
|
7508
7528
|
}
|
|
7509
7529
|
function Ji(e, t, n) {
|
|
7510
7530
|
const o = globalThis.structuredClone(e);
|
|
7511
|
-
for (const i of [o.screenTemplates, o.dialogTemplates]) for (const r of i) for (const s of Object.values(r.content ?? {}))
|
|
7531
|
+
for (const i of [o.screenTemplates, o.dialogTemplates]) for (const r of i) for (const s of Object.values(r.content ?? {})) yt(s, t, n);
|
|
7512
7532
|
for (const i of o.screens) {
|
|
7513
|
-
for (const r of Object.values(i.slotContent))
|
|
7514
|
-
for (const r of i.contributions)
|
|
7533
|
+
for (const r of Object.values(i.slotContent)) yt(r, t, n);
|
|
7534
|
+
for (const r of i.contributions) yt([r.content], t, n);
|
|
7515
7535
|
}
|
|
7516
7536
|
return o;
|
|
7517
7537
|
}
|
|
7518
|
-
function
|
|
7538
|
+
function yt(e, t, n) {
|
|
7519
7539
|
for (const o of e) {
|
|
7520
|
-
o.id === t && n(o),
|
|
7540
|
+
o.id === t && n(o), yt(Object.values(o.slots ?? {}).flat(), t, n);
|
|
7521
7541
|
const i = o.children;
|
|
7522
|
-
Array.isArray(i) &&
|
|
7542
|
+
Array.isArray(i) && yt(i, t, n);
|
|
7523
7543
|
}
|
|
7524
7544
|
}
|
|
7525
|
-
var to = (e) => e.id,
|
|
7545
|
+
var to = (e) => e.id, Bf = (e) => e.name || to(e), jf = (e) => {
|
|
7526
7546
|
switch (e) {
|
|
7527
7547
|
case H.Stack:
|
|
7528
7548
|
return Q.Column;
|
|
@@ -7540,10 +7560,10 @@ var to = (e) => e.id, Lf = (e) => e.name || to(e), Bf = (e) => {
|
|
|
7540
7560
|
return;
|
|
7541
7561
|
}
|
|
7542
7562
|
};
|
|
7543
|
-
function
|
|
7563
|
+
function Uf(e) {
|
|
7544
7564
|
return {
|
|
7545
7565
|
idOf: to,
|
|
7546
|
-
nameOf:
|
|
7566
|
+
nameOf: Bf,
|
|
7547
7567
|
childrenOf: Xt,
|
|
7548
7568
|
withChildren: (t, n) => jt(t) ? {
|
|
7549
7569
|
...t,
|
|
@@ -7554,32 +7574,32 @@ function jf(e) {
|
|
|
7554
7574
|
} : t,
|
|
7555
7575
|
acceptsChildren: (t) => jt(t),
|
|
7556
7576
|
ownershipOf: (t) => e(to(t)) ?? ie.Local,
|
|
7557
|
-
arrangementOf: (t) => jt(t) ?
|
|
7577
|
+
arrangementOf: (t) => jt(t) ? jf(jr(t)) : void 0
|
|
7558
7578
|
};
|
|
7559
7579
|
}
|
|
7560
|
-
function
|
|
7580
|
+
function Wf(e) {
|
|
7561
7581
|
return e ? ut(e) ? Q.Freeform : uo(e) ? Q.Grid : po(e) && e.orientation === ct.Horizontal ? Q.Row : Q.Column : Q.Column;
|
|
7562
7582
|
}
|
|
7563
|
-
var
|
|
7583
|
+
var zf = (e, t) => Math.max(0, Math.min(e, t));
|
|
7564
7584
|
function Qi(e, t, n) {
|
|
7565
7585
|
const o = Ne(e, t.nodeId, n);
|
|
7566
7586
|
if (!o) return oe.NodeNotFound;
|
|
7567
|
-
if (!
|
|
7587
|
+
if (!kt(n.ownershipOf(o.node), $e.Move)) return oe.NodeLocked;
|
|
7568
7588
|
let i = e;
|
|
7569
7589
|
if (t.targetParentId !== null) {
|
|
7570
7590
|
const r = Ne(e, t.targetParentId, n);
|
|
7571
7591
|
if (!r) return oe.TargetNotFound;
|
|
7572
7592
|
if (Wr(o.node, t.targetParentId, n)) return oe.WouldCreateCycle;
|
|
7573
7593
|
if (!n.acceptsChildren(r.node)) return oe.TargetNotContainer;
|
|
7574
|
-
if (!
|
|
7594
|
+
if (!kt(n.ownershipOf(r.node), $e.Insert)) return oe.TargetLocked;
|
|
7575
7595
|
i = n.childrenOf(r.node);
|
|
7576
7596
|
}
|
|
7577
7597
|
if ((o.parent === null ? null : n.idOf(o.parent)) === t.targetParentId) {
|
|
7578
7598
|
const r = i.length - 1;
|
|
7579
|
-
if (
|
|
7599
|
+
if (zf(t.index, r) === o.index) return oe.NoChange;
|
|
7580
7600
|
}
|
|
7581
7601
|
}
|
|
7582
|
-
var
|
|
7602
|
+
var Hf = "composition";
|
|
7583
7603
|
function no(e, t) {
|
|
7584
7604
|
const n = e.screens.find((s) => s.name === be), o = t !== void 0 ? $n(t, !0) : $n(void 0), i = mo(e, o).levels.filter((s) => s.kind === ks.ScreenTemplate).map((s) => s.owner), r = [];
|
|
7585
7605
|
for (const s of i) {
|
|
@@ -7588,12 +7608,12 @@ function no(e, t) {
|
|
|
7588
7608
|
for (const c of l.slots) r.push(...l.content?.[c.name] ?? []);
|
|
7589
7609
|
}
|
|
7590
7610
|
return (t === void 0 || o.kind === Vt.Screen) && r.push(...n?.slotContent.content ?? []), {
|
|
7591
|
-
element: Yt(H.Stack,
|
|
7611
|
+
element: Yt(H.Stack, Hf, "Composition", r),
|
|
7592
7612
|
roots: r,
|
|
7593
7613
|
templates: i
|
|
7594
7614
|
};
|
|
7595
7615
|
}
|
|
7596
|
-
function
|
|
7616
|
+
function Gf(e) {
|
|
7597
7617
|
switch (e) {
|
|
7598
7618
|
case qo.Inherited:
|
|
7599
7619
|
return ie.Inherited;
|
|
@@ -7603,15 +7623,15 @@ function Hf(e) {
|
|
|
7603
7623
|
return ie.Local;
|
|
7604
7624
|
}
|
|
7605
7625
|
}
|
|
7606
|
-
function
|
|
7626
|
+
function qf(e, t, n) {
|
|
7607
7627
|
const o = /* @__PURE__ */ new Map();
|
|
7608
7628
|
for (const i of Qa(t)) {
|
|
7609
7629
|
const r = co(e, re(i), n);
|
|
7610
|
-
o.set(i, r ?
|
|
7630
|
+
o.set(i, r ? Gf(r.provenance.kind) : ie.Inherited);
|
|
7611
7631
|
}
|
|
7612
7632
|
return (i) => o.get(i) ?? ie.Local;
|
|
7613
7633
|
}
|
|
7614
|
-
function
|
|
7634
|
+
function Kf(e) {
|
|
7615
7635
|
const [t, n] = j({
|
|
7616
7636
|
catalog: e,
|
|
7617
7637
|
times: 0
|
|
@@ -7629,19 +7649,19 @@ function qf(e) {
|
|
|
7629
7649
|
};
|
|
7630
7650
|
}, [e]), t.catalog === e ? t.times : 0;
|
|
7631
7651
|
}
|
|
7632
|
-
var
|
|
7652
|
+
var Vf = { modules: [] }, Jf = (e, t) => oo(e, t)?.id;
|
|
7633
7653
|
function Ua(e, t, n, o) {
|
|
7634
|
-
const [i, r] = j(() =>
|
|
7635
|
-
s.current ??= new
|
|
7636
|
-
const l = z((
|
|
7637
|
-
const L = g.current?.(
|
|
7654
|
+
const [i, r] = j(() => Rf(e.document)), s = V(void 0);
|
|
7655
|
+
s.current ??= new Df(i, r);
|
|
7656
|
+
const l = z((F) => s.current.commit(F), []), [c, u] = j(), [d, p] = j(), [h, f] = j(n.navigation?.module), g = V(void 0), m = z((F, W) => {
|
|
7657
|
+
const L = g.current?.(F), G = g.current?.(W);
|
|
7638
7658
|
return L && G ? {
|
|
7639
7659
|
height: L.height,
|
|
7640
7660
|
bottom: L.top + L.height - G.top
|
|
7641
7661
|
} : void 0;
|
|
7642
|
-
}, []), v = z((
|
|
7643
|
-
g.current =
|
|
7644
|
-
}, []), w =
|
|
7662
|
+
}, []), v = z((F) => {
|
|
7663
|
+
g.current = F;
|
|
7664
|
+
}, []), w = Kf(n.runtime.icons), P = U(() => ({
|
|
7645
7665
|
catalog: n.runtime.catalog,
|
|
7646
7666
|
scope: $n(t, t !== void 0),
|
|
7647
7667
|
queryCandidates: [...n.queryCandidates],
|
|
@@ -7650,11 +7670,11 @@ function Ua(e, t, n, o) {
|
|
|
7650
7670
|
n,
|
|
7651
7671
|
t,
|
|
7652
7672
|
w
|
|
7653
|
-
]), x = U(() => no(i.document, t), [i.document, t]), C = U(() =>
|
|
7673
|
+
]), x = U(() => no(i.document, t), [i.document, t]), C = U(() => qf(i.document, x.roots, P), [
|
|
7654
7674
|
i.document,
|
|
7655
7675
|
x,
|
|
7656
7676
|
P
|
|
7657
|
-
]), k = U(() =>
|
|
7677
|
+
]), k = U(() => Uf(C), [C]), y = ft(i.document, t), T = U(() => Of(x.roots, Wf(y), k).filter((F) => F.containerId !== null), [
|
|
7658
7678
|
x,
|
|
7659
7679
|
y,
|
|
7660
7680
|
k
|
|
@@ -7662,63 +7682,63 @@ function Ua(e, t, n, o) {
|
|
|
7662
7682
|
i.document,
|
|
7663
7683
|
c,
|
|
7664
7684
|
P
|
|
7665
|
-
]), N = z((
|
|
7666
|
-
const L = s.current.current, G = l((te) =>
|
|
7685
|
+
]), N = z((F, W) => {
|
|
7686
|
+
const L = s.current.current, G = l((te) => Ff(te, F, P, W));
|
|
7667
7687
|
return {
|
|
7668
7688
|
applied: G.undoable.length > L.undoable.length || G.document !== L.document,
|
|
7669
7689
|
diagnostics: G.diagnostics
|
|
7670
7690
|
};
|
|
7671
|
-
}, [l, P]), R = z((
|
|
7672
|
-
N(
|
|
7673
|
-
}, [N]), B = z((
|
|
7674
|
-
const L = s.current.current, G = l((te) => Ef(te,
|
|
7691
|
+
}, [l, P]), R = z((F, W) => {
|
|
7692
|
+
N(F, W);
|
|
7693
|
+
}, [N]), B = z((F, W) => {
|
|
7694
|
+
const L = s.current.current, G = l((te) => Ef(te, F, P, W));
|
|
7675
7695
|
return {
|
|
7676
7696
|
applied: G.document !== L.document,
|
|
7677
7697
|
diagnostics: G.diagnostics
|
|
7678
7698
|
};
|
|
7679
|
-
}, [l, P]), S = z((
|
|
7680
|
-
const L =
|
|
7699
|
+
}, [l, P]), S = z((F, W) => {
|
|
7700
|
+
const L = F ?? y?.id, G = L ? ze(x.roots, L)?.children ?? [] : [];
|
|
7681
7701
|
return {
|
|
7682
7702
|
parent: L,
|
|
7683
7703
|
index: W ?? G.length
|
|
7684
7704
|
};
|
|
7685
|
-
}, [y, x]),
|
|
7686
|
-
|
|
7687
|
-
const $ = z((
|
|
7705
|
+
}, [y, x]), E = V(o);
|
|
7706
|
+
E.current = o;
|
|
7707
|
+
const $ = z((F, W, L, G, te, de) => {
|
|
7688
7708
|
const Be = S(W, L);
|
|
7689
7709
|
if (!Be.parent) return;
|
|
7690
|
-
const Ye = ze(no(s.current.current.document, t).roots, Be.parent), Va = Ye && ut(Ye) ? $a(
|
|
7691
|
-
N(Ba(Be.parent, Be.index, Va), G).applied && (u(
|
|
7710
|
+
const Ye = ze(no(s.current.current.document, t).roots, Be.parent), Va = Ye && ut(Ye) ? $a(F, te ?? _a(ja(Ye, m))) : F;
|
|
7711
|
+
N(Ba(Be.parent, Be.index, Va), G).applied && (u(F.id), de && E.current?.(de));
|
|
7692
7712
|
}, [
|
|
7693
7713
|
N,
|
|
7694
7714
|
S,
|
|
7695
7715
|
t,
|
|
7696
7716
|
m
|
|
7697
|
-
]), A = z((
|
|
7698
|
-
const L =
|
|
7699
|
-
if (G && !(G === oe.NoChange && L &&
|
|
7717
|
+
]), A = z((F, W) => {
|
|
7718
|
+
const L = Pf(x.roots, F, W, m), G = Qi(x.roots, F, k);
|
|
7719
|
+
if (G && !(G === oe.NoChange && L && F.targetParentId === Jf(x.roots, F.nodeId))) return G;
|
|
7700
7720
|
if (L) return B(L, "Move").applied ? void 0 : oe.NodeLocked;
|
|
7701
|
-
const te =
|
|
7721
|
+
const te = Tf(F);
|
|
7702
7722
|
return te ? N(te, "Move").applied ? void 0 : oe.NodeLocked : oe.TargetNotContainer;
|
|
7703
7723
|
}, [
|
|
7704
7724
|
x,
|
|
7705
7725
|
k,
|
|
7706
7726
|
N,
|
|
7707
7727
|
B
|
|
7708
|
-
]), q = z((
|
|
7728
|
+
]), q = z((F, W) => {
|
|
7709
7729
|
l((L) => {
|
|
7710
7730
|
const G = L.document.screens.map((te) => te.name === "Screen" ? {
|
|
7711
7731
|
...te,
|
|
7712
|
-
forms:
|
|
7732
|
+
forms: F
|
|
7713
7733
|
} : te);
|
|
7714
7734
|
return Pe(L, {
|
|
7715
7735
|
...L.document,
|
|
7716
7736
|
screens: G
|
|
7717
7737
|
}, W);
|
|
7718
7738
|
});
|
|
7719
|
-
}, [l]), ne = z((
|
|
7739
|
+
}, [l]), ne = z((F, W, L) => {
|
|
7720
7740
|
l((G) => {
|
|
7721
|
-
const te = G.document.screenTemplates.map((de) => de.name ===
|
|
7741
|
+
const te = G.document.screenTemplates.map((de) => de.name === F ? {
|
|
7722
7742
|
...de,
|
|
7723
7743
|
outlets: W
|
|
7724
7744
|
} : de);
|
|
@@ -7727,10 +7747,10 @@ function Ua(e, t, n, o) {
|
|
|
7727
7747
|
screenTemplates: te
|
|
7728
7748
|
}, L);
|
|
7729
7749
|
});
|
|
7730
|
-
}, [l]), ye = z((
|
|
7750
|
+
}, [l]), ye = z((F, W, L) => {
|
|
7731
7751
|
l((G) => {
|
|
7732
7752
|
const te = G.document.screenTemplates.map((de) => {
|
|
7733
|
-
if (de.name !==
|
|
7753
|
+
if (de.name !== F) return de;
|
|
7734
7754
|
const { metadata: Be, ...Ye } = de;
|
|
7735
7755
|
return W ? {
|
|
7736
7756
|
...Ye,
|
|
@@ -7742,29 +7762,29 @@ function Ua(e, t, n, o) {
|
|
|
7742
7762
|
screenTemplates: te
|
|
7743
7763
|
}, L);
|
|
7744
7764
|
});
|
|
7745
|
-
}, [l]), me = z((
|
|
7765
|
+
}, [l]), me = z((F, W) => {
|
|
7746
7766
|
l((L) => Pe(L, {
|
|
7747
7767
|
...L.document,
|
|
7748
|
-
dialogTemplates:
|
|
7768
|
+
dialogTemplates: F
|
|
7749
7769
|
}, W));
|
|
7750
|
-
}, [l]), ue = z((
|
|
7751
|
-
l((de) => Pe(de, Ji(de.document,
|
|
7752
|
-
}, [l]), Ie = z((
|
|
7770
|
+
}, [l]), ue = z((F, W, L, G, te) => {
|
|
7771
|
+
l((de) => Pe(de, Ji(de.document, F, (Be) => Qf(Be, W, L, G)), te));
|
|
7772
|
+
}, [l]), Ie = z((F, W) => {
|
|
7753
7773
|
const L = n.runtime.bundles.flatMap((G) => G.screenTemplates ?? []);
|
|
7754
|
-
l((G) => Pe(G,
|
|
7755
|
-
}, [l, n.runtime.bundles]), D = z((
|
|
7756
|
-
l((G) => Pe(G, Ji(G.document,
|
|
7774
|
+
l((G) => Pe(G, Sf(G.document, F, L), W));
|
|
7775
|
+
}, [l, n.runtime.bundles]), D = z((F, W, L) => {
|
|
7776
|
+
l((G) => Pe(G, Ji(G.document, F, (te) => {
|
|
7757
7777
|
W ? te.behaviors = W : delete te.behaviors;
|
|
7758
7778
|
}), L));
|
|
7759
|
-
}, [l]), ee = U(() => Ti(i.document), [i.document]), he = n.navigation?.structure ??
|
|
7760
|
-
const L = Os(Ti(s.current.current.document),
|
|
7761
|
-
return L.applied ? (l((G) => Pe(G,
|
|
7779
|
+
}, [l]), ee = U(() => Ti(i.document), [i.document]), he = n.navigation?.structure ?? Vf, J = z((F, W) => {
|
|
7780
|
+
const L = Os(Ti(s.current.current.document), F);
|
|
7781
|
+
return L.applied ? (l((G) => Pe(G, tm(G.document, L.model), W)), { applied: !0 }) : {
|
|
7762
7782
|
applied: !1,
|
|
7763
7783
|
rejected: L.rejected
|
|
7764
7784
|
};
|
|
7765
|
-
}, [l]), ae = z((
|
|
7766
|
-
p(
|
|
7767
|
-
componentId:
|
|
7785
|
+
}, [l]), ae = z((F, W) => {
|
|
7786
|
+
p(F && W ? {
|
|
7787
|
+
componentId: F,
|
|
7768
7788
|
itemId: W
|
|
7769
7789
|
} : void 0);
|
|
7770
7790
|
}, []);
|
|
@@ -7792,16 +7812,16 @@ function Ua(e, t, n, o) {
|
|
|
7792
7812
|
tryApply: N,
|
|
7793
7813
|
applyAll: B,
|
|
7794
7814
|
move: A,
|
|
7795
|
-
validateMove: (
|
|
7796
|
-
insertComponent: (
|
|
7797
|
-
insertLayout: (
|
|
7798
|
-
remove: (
|
|
7799
|
-
if (!jn(x.roots,
|
|
7800
|
-
const W = zr(x.roots,
|
|
7801
|
-
N(
|
|
7815
|
+
validateMove: (F) => Qi(x.roots, F, k),
|
|
7816
|
+
insertComponent: (F, W, L, G) => $(la(Nt(), F, F), W, L, "Add", G, F),
|
|
7817
|
+
insertLayout: (F, W, L, G) => $(Yt(F, Nt(), F), W, L, "Add layout", G, `layout:${F}`),
|
|
7818
|
+
remove: (F) => {
|
|
7819
|
+
if (!jn(x.roots, F, k)) return;
|
|
7820
|
+
const W = zr(x.roots, F, k);
|
|
7821
|
+
N(If(F), "Remove").applied && u((L) => L === F || L === void 0 ? W : L);
|
|
7802
7822
|
},
|
|
7803
|
-
canRemove: (
|
|
7804
|
-
setProperty: (
|
|
7823
|
+
canRemove: (F) => jn(x.roots, F, k),
|
|
7824
|
+
setProperty: (F, W) => c && R(qn(c, F, W), "Change"),
|
|
7805
7825
|
setScreenForms: q,
|
|
7806
7826
|
setScreenTemplateOutlets: ne,
|
|
7807
7827
|
setScreenTemplateMetadata: ye,
|
|
@@ -7810,24 +7830,24 @@ function Ua(e, t, n, o) {
|
|
|
7810
7830
|
setElementBehaviors: D,
|
|
7811
7831
|
setScreenTemplate: Ie,
|
|
7812
7832
|
markSaved: () => {
|
|
7813
|
-
l(
|
|
7833
|
+
l(Lf);
|
|
7814
7834
|
},
|
|
7815
7835
|
undo: () => {
|
|
7816
|
-
l(
|
|
7836
|
+
l(_f);
|
|
7817
7837
|
},
|
|
7818
7838
|
redo: () => {
|
|
7819
|
-
l(
|
|
7839
|
+
l($f);
|
|
7820
7840
|
},
|
|
7821
|
-
canUndo:
|
|
7822
|
-
canRedo:
|
|
7841
|
+
canUndo: Mf(i),
|
|
7842
|
+
canRedo: Af(i),
|
|
7823
7843
|
isDirty: i.isDirty
|
|
7824
7844
|
};
|
|
7825
7845
|
}
|
|
7826
|
-
function
|
|
7846
|
+
function Qf(e, t, n, o) {
|
|
7827
7847
|
const i = e.properties[t];
|
|
7828
|
-
Array.isArray(i) && (e.properties[t] = i.map((r) => Wa(r) && r.id === n ?
|
|
7848
|
+
Array.isArray(i) && (e.properties[t] = i.map((r) => Wa(r) && r.id === n ? Yf(r, o) : r));
|
|
7829
7849
|
}
|
|
7830
|
-
function
|
|
7850
|
+
function Yf(e, t) {
|
|
7831
7851
|
if (Wa(e.values)) {
|
|
7832
7852
|
const o = { ...e.values };
|
|
7833
7853
|
return t ? o.destination = t : delete o.destination, {
|
|
@@ -7844,13 +7864,13 @@ function Wa(e) {
|
|
|
7844
7864
|
var Yi = () => ({
|
|
7845
7865
|
width: window.innerWidth - 64,
|
|
7846
7866
|
height: window.innerHeight - 64
|
|
7847
|
-
}),
|
|
7867
|
+
}), by = (e) => /* @__PURE__ */ a(ya, {
|
|
7848
7868
|
strings: e.strings,
|
|
7849
7869
|
onClose: () => e.onDismiss?.(),
|
|
7850
|
-
children: /* @__PURE__ */ a(
|
|
7851
|
-
}),
|
|
7870
|
+
children: /* @__PURE__ */ a(Xf, { ...e })
|
|
7871
|
+
}), Xf = (e) => {
|
|
7852
7872
|
const t = U(() => va(e.subject, e.environment.runtime), [e.subject, e.environment.runtime]);
|
|
7853
|
-
return t.opened ? /* @__PURE__ */ a(
|
|
7873
|
+
return t.opened ? /* @__PURE__ */ a(Zf, {
|
|
7854
7874
|
...e,
|
|
7855
7875
|
opened: t.subject
|
|
7856
7876
|
}, e.environment.runtime.id) : /* @__PURE__ */ a($r, {
|
|
@@ -7864,8 +7884,8 @@ var Yi = () => ({
|
|
|
7864
7884
|
onClose: () => n.close()
|
|
7865
7885
|
})
|
|
7866
7886
|
});
|
|
7867
|
-
},
|
|
7868
|
-
const v = V(void 0), w = Ua(m, e.authoringTemplate, t, ($) => v.current?.($)), P = U(() => u ??
|
|
7887
|
+
}, Zf = ({ 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: h, onBeforeClose: f, onPreview: g, opened: m }) => {
|
|
7888
|
+
const v = V(void 0), w = Ua(m, e.authoringTemplate, t, ($) => v.current?.($)), P = U(() => u ?? Jm(), [u]), x = U(() => Xm({
|
|
7869
7889
|
remembered: c ? P.read(c) : void 0,
|
|
7870
7890
|
saved: l,
|
|
7871
7891
|
lastUsed: P.readLastUsed()
|
|
@@ -7873,7 +7893,7 @@ var Yi = () => ({
|
|
|
7873
7893
|
c && P.write(c, $);
|
|
7874
7894
|
}, [P, c]), k = z(($) => {
|
|
7875
7895
|
C($);
|
|
7876
|
-
const A =
|
|
7896
|
+
const A = ft(w.document, e.authoringTemplate);
|
|
7877
7897
|
h({
|
|
7878
7898
|
document: w.document,
|
|
7879
7899
|
legacyElements: zt(A, t.runtime.legacyTypeOf),
|
|
@@ -7889,7 +7909,7 @@ var Yi = () => ({
|
|
|
7889
7909
|
e.authoringTemplate
|
|
7890
7910
|
]), [y, T] = j(), M = z(async ($) => {
|
|
7891
7911
|
C($);
|
|
7892
|
-
const A =
|
|
7912
|
+
const A = ft(w.document, e.authoringTemplate), q = {
|
|
7893
7913
|
document: w.document,
|
|
7894
7914
|
legacyElements: zt(A, t.runtime.legacyTypeOf),
|
|
7895
7915
|
windowSize: $,
|
|
@@ -7907,7 +7927,7 @@ var Yi = () => ({
|
|
|
7907
7927
|
if (!(!f || !w.isDirty)) {
|
|
7908
7928
|
N(!0);
|
|
7909
7929
|
try {
|
|
7910
|
-
const A =
|
|
7930
|
+
const A = ft(w.document, e.authoringTemplate), q = await f({
|
|
7911
7931
|
document: w.document,
|
|
7912
7932
|
legacyElements: zt(A, t.runtime.legacyTypeOf),
|
|
7913
7933
|
windowSize: $,
|
|
@@ -7929,12 +7949,12 @@ var Yi = () => ({
|
|
|
7929
7949
|
layoutLabels: o,
|
|
7930
7950
|
icons: i,
|
|
7931
7951
|
paletteSources: r,
|
|
7932
|
-
onAdd: ($) =>
|
|
7952
|
+
onAdd: ($) => E($.payload)
|
|
7933
7953
|
});
|
|
7934
7954
|
v.current = S;
|
|
7935
|
-
function
|
|
7936
|
-
if (!
|
|
7937
|
-
const A = w.selection &&
|
|
7955
|
+
function E($) {
|
|
7956
|
+
if (!Eo($)) return;
|
|
7957
|
+
const A = w.selection && eg(w) ? w.selectedId : void 0;
|
|
7938
7958
|
$.kind === "layout" ? w.insertLayout($.item, A, void 0) : w.insertComponent(Ao($.componentName, $.package), A, void 0);
|
|
7939
7959
|
}
|
|
7940
7960
|
return /* @__PURE__ */ b(Ca, {
|
|
@@ -7983,11 +8003,11 @@ var Yi = () => ({
|
|
|
7983
8003
|
})]
|
|
7984
8004
|
});
|
|
7985
8005
|
};
|
|
7986
|
-
function
|
|
8006
|
+
function eg(e) {
|
|
7987
8007
|
return !!e.selection && "children" in e.selection;
|
|
7988
8008
|
}
|
|
7989
8009
|
var ot = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
|
|
7990
|
-
function
|
|
8010
|
+
function tg(e, t) {
|
|
7991
8011
|
if (!t) return e;
|
|
7992
8012
|
const n = { ...e };
|
|
7993
8013
|
for (const [o, i] of Object.entries(t)) {
|
|
@@ -8006,7 +8026,7 @@ function eg(e, t) {
|
|
|
8006
8026
|
var it = "p-anchored-overlay", Bt = "p-collapsible", Dn = "p-overlay-mask", O = (e, t) => ({ props: t ? {
|
|
8007
8027
|
styles: e,
|
|
8008
8028
|
motionProps: { name: t }
|
|
8009
|
-
} : { styles: e } }), pe = (e) => ({ props: { motionProps: { name: e } } }),
|
|
8029
|
+
} : { styles: e } }), pe = (e) => ({ props: { motionProps: { name: e } } }), ng = {
|
|
8010
8030
|
"Accordion.Root": O(kc, Bt),
|
|
8011
8031
|
"AutoComplete.Root": O(Sc),
|
|
8012
8032
|
"AutoComplete.Popup": pe(it),
|
|
@@ -8019,8 +8039,8 @@ var it = "p-anchored-overlay", Bt = "p-collapsible", Dn = "p-overlay-mask", O =
|
|
|
8019
8039
|
"Card.Root": O(Oc),
|
|
8020
8040
|
"Carousel.Root": O(Dc),
|
|
8021
8041
|
"Checkbox.Root": O(Rc),
|
|
8022
|
-
CheckboxGroup: O(
|
|
8023
|
-
"Chip.Root": O(
|
|
8042
|
+
CheckboxGroup: O(Fc),
|
|
8043
|
+
"Chip.Root": O(Ec),
|
|
8024
8044
|
"Compare.Root": O(Mc),
|
|
8025
8045
|
"ContextMenu.Root": O(Ac),
|
|
8026
8046
|
"ContextMenu.Popup": pe(it),
|
|
@@ -8083,8 +8103,8 @@ var it = "p-anchored-overlay", Bt = "p-collapsible", Dn = "p-overlay-mask", O =
|
|
|
8083
8103
|
"Tabs.Root": O(Od),
|
|
8084
8104
|
Tag: O(Dd),
|
|
8085
8105
|
"Terminal.Root": O(Rd),
|
|
8086
|
-
Textarea: O(
|
|
8087
|
-
"Timeline.Root": O(
|
|
8106
|
+
Textarea: O(Fd),
|
|
8107
|
+
"Timeline.Root": O(Ed),
|
|
8088
8108
|
"Toast.Root": O(Md),
|
|
8089
8109
|
"Toaster.Root": O(Ad),
|
|
8090
8110
|
"ToggleButton.Root": O(_d),
|
|
@@ -8094,30 +8114,30 @@ var it = "p-anchored-overlay", Bt = "p-collapsible", Dn = "p-overlay-mask", O =
|
|
|
8094
8114
|
"Tooltip.Root": O(jd),
|
|
8095
8115
|
"Tooltip.Popup": pe("p-tooltip"),
|
|
8096
8116
|
"Tree.Root": O(Ud)
|
|
8097
|
-
},
|
|
8098
|
-
const o = gl(
|
|
8117
|
+
}, og = Yo.find((e) => e.name === "lara-light-blue") ?? Yo[0], yy = ({ defaults: e, theme: t, ...n }) => {
|
|
8118
|
+
const o = gl(og);
|
|
8099
8119
|
return /* @__PURE__ */ a(wc, {
|
|
8100
8120
|
...n,
|
|
8101
8121
|
theme: t ?? o?.theme,
|
|
8102
|
-
defaults:
|
|
8122
|
+
defaults: tg(ng, e)
|
|
8103
8123
|
});
|
|
8104
|
-
},
|
|
8124
|
+
}, wy = (e) => /* @__PURE__ */ a(ya, {
|
|
8105
8125
|
strings: e.strings,
|
|
8106
8126
|
onClose: e.onDismiss,
|
|
8107
|
-
children: /* @__PURE__ */ a(
|
|
8108
|
-
}),
|
|
8127
|
+
children: /* @__PURE__ */ a(ig, { ...e })
|
|
8128
|
+
}), ig = (e) => {
|
|
8109
8129
|
const t = U(() => va(e.subject, e.environment.runtime), [e.subject, e.environment.runtime]);
|
|
8110
|
-
return t.opened ? /* @__PURE__ */ a(
|
|
8130
|
+
return t.opened ? /* @__PURE__ */ a(rg, {
|
|
8111
8131
|
...e,
|
|
8112
8132
|
opened: t.subject
|
|
8113
8133
|
}, e.environment.runtime.id) : /* @__PURE__ */ a(wa, {
|
|
8114
8134
|
problem: t.problem,
|
|
8115
8135
|
strings: e.strings
|
|
8116
8136
|
});
|
|
8117
|
-
},
|
|
8137
|
+
}, rg = ({ subject: e, environment: t, strings: n, layoutLabels: o, icons: i, paletteSources: r, initialSize: s, onChange: l, renderPaletteHost: c, opened: u }) => {
|
|
8118
8138
|
const d = V(void 0), p = Ua(u, e.authoringTemplate, t, (C) => d.current?.(C)), [h, f] = j(s ?? sn[Ke.Desktop]), [g, m] = j(!0), v = V(l);
|
|
8119
8139
|
v.current = l, ce(() => {
|
|
8120
|
-
const C =
|
|
8140
|
+
const C = ft(p.document, e.authoringTemplate);
|
|
8121
8141
|
v.current?.({
|
|
8122
8142
|
document: p.document,
|
|
8123
8143
|
legacyElements: zt(C, t.runtime.legacyTypeOf),
|
|
@@ -8133,7 +8153,7 @@ var it = "p-anchored-overlay", Bt = "p-collapsible", Dn = "p-overlay-mask", O =
|
|
|
8133
8153
|
t.runtime.legacyTypeOf
|
|
8134
8154
|
]);
|
|
8135
8155
|
const w = z((C) => {
|
|
8136
|
-
if (!
|
|
8156
|
+
if (!Eo(C)) return;
|
|
8137
8157
|
const k = p.selection, y = k && "children" in k ? p.selectedId : void 0;
|
|
8138
8158
|
C.kind === "layout" ? p.insertLayout(C.item, y, void 0) : p.insertComponent(Ao(C.componentName, C.package), y, void 0);
|
|
8139
8159
|
}, [p]), { palette: P, recordInserted: x } = ga({
|
|
@@ -8195,7 +8215,7 @@ var it = "p-anchored-overlay", Bt = "p-collapsible", Dn = "p-overlay-mask", O =
|
|
|
8195
8215
|
})
|
|
8196
8216
|
});
|
|
8197
8217
|
};
|
|
8198
|
-
function
|
|
8218
|
+
function ag(e) {
|
|
8199
8219
|
const t = {
|
|
8200
8220
|
"row.id": "Guid",
|
|
8201
8221
|
"selection.id": "Guid"
|
|
@@ -8203,18 +8223,18 @@ function rg(e) {
|
|
|
8203
8223
|
for (const n of e) for (const o of n.parameters) t[`route.${o.name}`] ??= o.type;
|
|
8204
8224
|
return t;
|
|
8205
8225
|
}
|
|
8206
|
-
var
|
|
8207
|
-
function
|
|
8208
|
-
return e.filter((t) =>
|
|
8226
|
+
var sg = new Set(Object.values(ws)), lg = new Set(Object.values(ys));
|
|
8227
|
+
function cg(e) {
|
|
8228
|
+
return e.filter((t) => sg.has(t.resultShape) && t.origin.every((n) => lg.has(n.kind))).map((t) => t);
|
|
8209
8229
|
}
|
|
8210
|
-
function
|
|
8211
|
-
const t =
|
|
8230
|
+
function ky(e) {
|
|
8231
|
+
const t = cg(e.queryCandidates ?? []);
|
|
8212
8232
|
return {
|
|
8213
8233
|
runtime: e.runtime,
|
|
8214
8234
|
queryCandidates: t,
|
|
8215
8235
|
stateChangeSlices: e.stateChangeSlices ?? [],
|
|
8216
8236
|
destinations: e.destinations ?? [],
|
|
8217
|
-
availableSources:
|
|
8237
|
+
availableSources: ag(t),
|
|
8218
8238
|
...e.richText === !1 ? {} : { richText: e.richText ?? Wd },
|
|
8219
8239
|
...e.fileUpload ? { fileUpload: e.fileUpload } : {},
|
|
8220
8240
|
...e.templateScope ? { templateScope: e.templateScope } : {},
|
|
@@ -8222,8 +8242,8 @@ function wy(e) {
|
|
|
8222
8242
|
...e.location ? { location: e.location } : {}
|
|
8223
8243
|
};
|
|
8224
8244
|
}
|
|
8225
|
-
var
|
|
8226
|
-
function
|
|
8245
|
+
var dg = [.../* @__PURE__ */ new Set([...nn.ids, ...Object.values(X)])];
|
|
8246
|
+
function ug(e, t) {
|
|
8227
8247
|
return ul({
|
|
8228
8248
|
bundles: e,
|
|
8229
8249
|
profile: t,
|
|
@@ -8232,23 +8252,23 @@ function dg(e, t) {
|
|
|
8232
8252
|
allowNetworkAssets: !1,
|
|
8233
8253
|
loadDesignTime: !0
|
|
8234
8254
|
}
|
|
8235
|
-
}, { hostEditorKinds: [...
|
|
8255
|
+
}, { hostEditorKinds: [...dg] });
|
|
8236
8256
|
}
|
|
8237
|
-
function
|
|
8257
|
+
function pg(e) {
|
|
8238
8258
|
return e.flatMap((t) => t.iconLibrary ? [t.iconLibrary.catalog] : []);
|
|
8239
8259
|
}
|
|
8240
|
-
function
|
|
8260
|
+
function mg(e, t) {
|
|
8241
8261
|
const n = Ws(e, t.map((o) => o.manifest));
|
|
8242
|
-
return new Ts(n,
|
|
8262
|
+
return new Ts(n, pg(t));
|
|
8243
8263
|
}
|
|
8244
|
-
function
|
|
8264
|
+
function hg(e) {
|
|
8245
8265
|
const t = ol([e]), n = t.packages.filter((o) => o !== "PrimeReact");
|
|
8246
8266
|
return n.splice(Math.max(n.indexOf(vr), 0), 0, "PrimeReact"), {
|
|
8247
8267
|
...t,
|
|
8248
8268
|
packages: n
|
|
8249
8269
|
};
|
|
8250
8270
|
}
|
|
8251
|
-
var
|
|
8271
|
+
var fg = [
|
|
8252
8272
|
"PrimeReact.Accordion",
|
|
8253
8273
|
"PrimeReact.AutoComplete",
|
|
8254
8274
|
"PrimeReact.Avatar",
|
|
@@ -8351,7 +8371,7 @@ var hg = [
|
|
|
8351
8371
|
"itemsControl",
|
|
8352
8372
|
"stackPanel",
|
|
8353
8373
|
"wrapPanel"
|
|
8354
|
-
],
|
|
8374
|
+
], gg = ["PrimeReact.Dialog"], vg = new Set(fg.filter((e) => !gg.includes(e))), bg = [
|
|
8355
8375
|
{
|
|
8356
8376
|
value: ve.None,
|
|
8357
8377
|
label: "Run directly"
|
|
@@ -8365,7 +8385,7 @@ var hg = [
|
|
|
8365
8385
|
label: "Ask in a drawer"
|
|
8366
8386
|
}
|
|
8367
8387
|
];
|
|
8368
|
-
function
|
|
8388
|
+
function yg(e) {
|
|
8369
8389
|
return !e.component.endsWith(":action") || e.properties.some((t) => t.path === "presentation") ? e : {
|
|
8370
8390
|
...e,
|
|
8371
8391
|
properties: [...e.properties, {
|
|
@@ -8374,13 +8394,13 @@ function bg(e) {
|
|
|
8374
8394
|
group: "Behavior",
|
|
8375
8395
|
valueType: K.Enum,
|
|
8376
8396
|
default: ve.None,
|
|
8377
|
-
choices:
|
|
8397
|
+
choices: bg,
|
|
8378
8398
|
description: "Whether the command runs straight away or first asks for its input in a dialog or a drawer."
|
|
8379
8399
|
}]
|
|
8380
8400
|
};
|
|
8381
8401
|
}
|
|
8382
|
-
var
|
|
8383
|
-
function Wo(e, t, n =
|
|
8402
|
+
var wg = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase()), kg = (e) => /ies$/i.test(e) ? `${e.slice(0, -3)}y` : /(ss|us)$/i.test(e) || !/s$/i.test(e) ? e : e.slice(0, -1), za = (e) => e !== null && typeof e == "object" && !Array.isArray(e);
|
|
8403
|
+
function Wo(e, t, n = wg(e)) {
|
|
8384
8404
|
const o = {
|
|
8385
8405
|
path: e,
|
|
8386
8406
|
label: n,
|
|
@@ -8392,7 +8412,7 @@ function Wo(e, t, n = yg(e)) {
|
|
|
8392
8412
|
} : typeof t == "boolean" ? {
|
|
8393
8413
|
...o,
|
|
8394
8414
|
valueType: K.Boolean
|
|
8395
|
-
} : Array.isArray(t) ?
|
|
8415
|
+
} : Array.isArray(t) ? Cg(o, t) : za(t) ? {
|
|
8396
8416
|
...o,
|
|
8397
8417
|
valueType: K.Object,
|
|
8398
8418
|
properties: Ha(t),
|
|
@@ -8403,12 +8423,12 @@ function Wo(e, t, n = yg(e)) {
|
|
|
8403
8423
|
};
|
|
8404
8424
|
}
|
|
8405
8425
|
function Ha(e, t = []) {
|
|
8406
|
-
return Object.entries(e).filter(([n]) => !t.includes(n)).map(([n, o]) =>
|
|
8426
|
+
return Object.entries(e).filter(([n]) => !t.includes(n)).map(([n, o]) => Sg(n, o));
|
|
8407
8427
|
}
|
|
8408
|
-
function
|
|
8428
|
+
function Sg(e, t) {
|
|
8409
8429
|
return Wo(e, t);
|
|
8410
8430
|
}
|
|
8411
|
-
function
|
|
8431
|
+
function Cg(e, t) {
|
|
8412
8432
|
if (t.length > 0 && t.every((o) => typeof o == "string")) return {
|
|
8413
8433
|
...e,
|
|
8414
8434
|
valueType: K.Json,
|
|
@@ -8425,17 +8445,17 @@ function Sg(e, t) {
|
|
|
8425
8445
|
...e,
|
|
8426
8446
|
valueType: K.Collection,
|
|
8427
8447
|
item: {
|
|
8428
|
-
label:
|
|
8448
|
+
label: kg(e.label),
|
|
8429
8449
|
properties: Ha(n, ["id"]),
|
|
8430
8450
|
open: !0
|
|
8431
8451
|
}
|
|
8432
8452
|
};
|
|
8433
8453
|
}
|
|
8434
|
-
var
|
|
8435
|
-
function
|
|
8454
|
+
var Ng = (e) => e.valueType === K.Json && e.editorKind === void 0;
|
|
8455
|
+
function Tg(e) {
|
|
8436
8456
|
const t = Uo(e.component, e.component.slice(e.component.lastIndexOf(":") + 1));
|
|
8437
8457
|
if (!t) return e;
|
|
8438
|
-
const n = new Set(e.properties.map((r) => r.path)), o = e.properties.map((r) =>
|
|
8458
|
+
const n = new Set(e.properties.map((r) => r.path)), o = e.properties.map((r) => Ng(r) && r.path in t ? Ig(r, t[r.path]) : r), i = Object.entries(t).filter(([r]) => !n.has(r)).map(([r, s]) => ({
|
|
8439
8459
|
...Wo(r, s),
|
|
8440
8460
|
description: "Shown as sample content on the design surface until you set it."
|
|
8441
8461
|
}));
|
|
@@ -8444,7 +8464,7 @@ function Ng(e) {
|
|
|
8444
8464
|
properties: [...o, ...i]
|
|
8445
8465
|
} : e;
|
|
8446
8466
|
}
|
|
8447
|
-
function
|
|
8467
|
+
function Ig(e, t) {
|
|
8448
8468
|
const { editorKind: n, item: o, properties: i, choices: r, ...s } = e, l = Wo(e.path, t);
|
|
8449
8469
|
return {
|
|
8450
8470
|
...l,
|
|
@@ -8452,7 +8472,7 @@ function Tg(e, t) {
|
|
|
8452
8472
|
valueType: l.valueType
|
|
8453
8473
|
};
|
|
8454
8474
|
}
|
|
8455
|
-
var Xi = "Placement",
|
|
8475
|
+
var Xi = "Placement", Pg = [{
|
|
8456
8476
|
path: Je,
|
|
8457
8477
|
label: "Left",
|
|
8458
8478
|
group: Xi,
|
|
@@ -8463,49 +8483,49 @@ var Xi = "Placement", Ig = [{
|
|
|
8463
8483
|
group: Xi,
|
|
8464
8484
|
valueType: K.Number
|
|
8465
8485
|
}];
|
|
8466
|
-
function
|
|
8486
|
+
function xg(e) {
|
|
8467
8487
|
const t = new Set(e.properties.map((n) => n.path));
|
|
8468
8488
|
return {
|
|
8469
8489
|
...e,
|
|
8470
|
-
properties: [...e.properties, ...
|
|
8490
|
+
properties: [...e.properties, ...Pg.filter((n) => !t.has(n.path))]
|
|
8471
8491
|
};
|
|
8472
8492
|
}
|
|
8473
|
-
var Zi = "PrimeReact",
|
|
8474
|
-
function
|
|
8493
|
+
var Zi = "PrimeReact", Og = 1;
|
|
8494
|
+
function Dg(e, t, n) {
|
|
8475
8495
|
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((h) => ({
|
|
8476
|
-
component:
|
|
8496
|
+
component: Fn(p.manifest.name, h),
|
|
8477
8497
|
displayName: h,
|
|
8478
8498
|
properties: []
|
|
8479
|
-
}))).filter((p) => !r.has(p.component)), l = [...i, ...s].map(
|
|
8499
|
+
}))).filter((p) => !r.has(p.component)), l = [...i, ...s].map(yg).map(Tg).map(xg), c = [...l, ...Rg(l, o, t)], u = new Set(Object.values(o).flat()), d = new Map(l.map((p) => [p.component, p]));
|
|
8480
8500
|
return {
|
|
8481
|
-
id:
|
|
8501
|
+
id: Og++,
|
|
8482
8502
|
bundles: e,
|
|
8483
8503
|
registry: Sr(e),
|
|
8484
8504
|
packages: o,
|
|
8485
8505
|
descriptors: c,
|
|
8486
|
-
catalog:
|
|
8506
|
+
catalog: Es(c),
|
|
8487
8507
|
profile: t,
|
|
8488
|
-
compositionProfile:
|
|
8508
|
+
compositionProfile: hg(t),
|
|
8489
8509
|
...n ? { appearance: n } : {},
|
|
8490
|
-
icons:
|
|
8510
|
+
icons: mg(t.packages, e),
|
|
8491
8511
|
iconAdapters: dl(e),
|
|
8492
|
-
designTime:
|
|
8512
|
+
designTime: ug(e, t),
|
|
8493
8513
|
packageDescriptorOf: (p) => {
|
|
8494
8514
|
if (p.component.includes(":")) return p;
|
|
8495
8515
|
const h = Tt(p.component, t, o);
|
|
8496
|
-
return (h && d.get(
|
|
8516
|
+
return (h && d.get(Fn(h.package, h.name))) ?? p;
|
|
8497
8517
|
},
|
|
8498
8518
|
isKnownComponent: (p) => u.has(p),
|
|
8499
8519
|
legacyTypeOf: (p) => {
|
|
8500
|
-
const h =
|
|
8501
|
-
return f !== void 0 &&
|
|
8520
|
+
const h = Gm(p, t, o), f = h?.package === Zi ? `${Zi}.${Br(h.name)}` : void 0;
|
|
8521
|
+
return f !== void 0 && vg.has(f) ? f : void 0;
|
|
8502
8522
|
}
|
|
8503
8523
|
};
|
|
8504
8524
|
}
|
|
8505
|
-
function
|
|
8525
|
+
function Rg(e, t, n) {
|
|
8506
8526
|
const o = [];
|
|
8507
8527
|
for (const i of new Set(Object.values(t).flat())) {
|
|
8508
|
-
const r = Tt(i, n, t), s = r && e.find((l) => l.component ===
|
|
8528
|
+
const r = Tt(i, n, t), s = r && e.find((l) => l.component === Fn(r.package, r.name));
|
|
8509
8529
|
s && o.push({
|
|
8510
8530
|
...s,
|
|
8511
8531
|
component: i
|
|
@@ -8513,7 +8533,7 @@ function Dg(e, t, n) {
|
|
|
8513
8533
|
}
|
|
8514
8534
|
return o;
|
|
8515
8535
|
}
|
|
8516
|
-
var zo = "Cratis.Icons.Lucide",
|
|
8536
|
+
var zo = "Cratis.Icons.Lucide", Fg = {
|
|
8517
8537
|
name: zo,
|
|
8518
8538
|
version: "1.52.0",
|
|
8519
8539
|
kind: dt.IconLibrary,
|
|
@@ -8538,17 +8558,17 @@ var zo = "Cratis.Icons.Lucide", Rg = {
|
|
|
8538
8558
|
}, Eg = {
|
|
8539
8559
|
library: zo,
|
|
8540
8560
|
loadEntries: async () => (await import("./catalog-CZx3FR-E.js")).default
|
|
8541
|
-
},
|
|
8561
|
+
}, Mg = qd, Ag = {
|
|
8542
8562
|
library: zo,
|
|
8543
|
-
loadGlyph: async ({ key: e }) => (await
|
|
8544
|
-
},
|
|
8545
|
-
manifest:
|
|
8563
|
+
loadGlyph: async ({ key: e }) => (await Mg[e]?.())?.default
|
|
8564
|
+
}, _g = {
|
|
8565
|
+
manifest: Fg,
|
|
8546
8566
|
components: {},
|
|
8547
8567
|
iconLibrary: {
|
|
8548
8568
|
catalog: Eg,
|
|
8549
|
-
adapter:
|
|
8569
|
+
adapter: Ag
|
|
8550
8570
|
}
|
|
8551
|
-
},
|
|
8571
|
+
}, $g = [
|
|
8552
8572
|
zd,
|
|
8553
8573
|
Hd,
|
|
8554
8574
|
Gd
|
|
@@ -8559,10 +8579,10 @@ var zo = "Cratis.Icons.Lucide", Rg = {
|
|
|
8559
8579
|
Mr,
|
|
8560
8580
|
gr,
|
|
8561
8581
|
_r,
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
],
|
|
8565
|
-
function
|
|
8582
|
+
...$g,
|
|
8583
|
+
_g
|
|
8584
|
+
], Lg = Pt.map((e) => e.manifest), Sy = Sr(Pt), Cy = en(Lg), Ny = Pt.flatMap((e) => e.themes ?? []);
|
|
8585
|
+
function Bg(e) {
|
|
8566
8586
|
const t = Ds(e).map((i) => i.name), n = Qo(e, dt.Styling).map((i) => i.name), o = Qo(e, dt.Blueprint)[0];
|
|
8567
8587
|
return o ? [
|
|
8568
8588
|
...t,
|
|
@@ -8575,16 +8595,16 @@ var Ga = (e) => e === void 0 || e.activePack === "" && e.mappings.length === 0 ?
|
|
|
8575
8595
|
mappings: e.mappings.map((t) => ({ ...t })),
|
|
8576
8596
|
bindings: []
|
|
8577
8597
|
};
|
|
8578
|
-
function
|
|
8598
|
+
function jg(e, t) {
|
|
8579
8599
|
return t.filter((n) => $s(n, e));
|
|
8580
8600
|
}
|
|
8581
|
-
function
|
|
8601
|
+
function Ug(e, t) {
|
|
8582
8602
|
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));
|
|
8583
8603
|
}
|
|
8584
8604
|
var Rn = /* @__PURE__ */ (function(e) {
|
|
8585
8605
|
return e.Fallback = "fallback", e.Explicit = "explicit", e.Automatic = "automatic", e;
|
|
8586
8606
|
})({});
|
|
8587
|
-
function
|
|
8607
|
+
function Wg(e) {
|
|
8588
8608
|
const t = [
|
|
8589
8609
|
so,
|
|
8590
8610
|
...e.packages,
|
|
@@ -8594,17 +8614,17 @@ function Ug(e) {
|
|
|
8594
8614
|
];
|
|
8595
8615
|
return [...new Set(t.filter((n) => n.length > 0))];
|
|
8596
8616
|
}
|
|
8597
|
-
function
|
|
8617
|
+
function zg(e, t) {
|
|
8598
8618
|
return e.find((n) => n.manifest.name === t)?.manifest.layouts[0] ?? "";
|
|
8599
8619
|
}
|
|
8600
|
-
function
|
|
8620
|
+
function Hg(e, t) {
|
|
8601
8621
|
const n = e.root?.template;
|
|
8602
8622
|
if (!(n?.source !== Ss.Blueprint || n.blueprint === void 0))
|
|
8603
8623
|
return t.find((o) => o.manifest.name === n.blueprint)?.manifest.layouts.includes(n.id) ? n.id : void 0;
|
|
8604
8624
|
}
|
|
8605
8625
|
var qa = "UI Profile";
|
|
8606
8626
|
function Ka(e, t) {
|
|
8607
|
-
const n = t.map((c) => c.manifest), o =
|
|
8627
|
+
const n = t.map((c) => c.manifest), o = Wg(e), i = zs(o, n), r = Hg(e, t) ?? zg(t, e.shell), s = {
|
|
8608
8628
|
name: qa,
|
|
8609
8629
|
targetPlatform: "web",
|
|
8610
8630
|
packages: i.packages,
|
|
@@ -8612,7 +8632,7 @@ function Ka(e, t) {
|
|
|
8612
8632
|
...e.root ? { root: e.root } : {},
|
|
8613
8633
|
theme: e.theme.length > 0 ? e.theme : void 0,
|
|
8614
8634
|
sampleData: Ga(e.sampleData),
|
|
8615
|
-
appearance:
|
|
8635
|
+
appearance: Gg(e),
|
|
8616
8636
|
...e.identity === void 0 ? {} : { identity: e.identity }
|
|
8617
8637
|
}, l = new Set(o);
|
|
8618
8638
|
return {
|
|
@@ -8630,13 +8650,13 @@ function Ka(e, t) {
|
|
|
8630
8650
|
requiredBy: n.filter((d) => i.packages.includes(d.name) && d.dependencies.some((p) => p.name === c)).map((d) => d.name)
|
|
8631
8651
|
}] : [];
|
|
8632
8652
|
}),
|
|
8633
|
-
collisions:
|
|
8634
|
-
compatibleThemes:
|
|
8653
|
+
collisions: Ug(s, en(n)),
|
|
8654
|
+
compatibleThemes: jg(s, t.flatMap((c) => c.themes ?? [])),
|
|
8635
8655
|
layout: r,
|
|
8636
8656
|
isValid: _s(i)
|
|
8637
8657
|
};
|
|
8638
8658
|
}
|
|
8639
|
-
function
|
|
8659
|
+
function Gg(e) {
|
|
8640
8660
|
const t = {
|
|
8641
8661
|
...e.colorScheme === "dark" ? { colorScheme: hs.Dark } : {},
|
|
8642
8662
|
...e.accent.length > 0 ? { accent: e.accent } : {},
|
|
@@ -8645,8 +8665,8 @@ function Hg(e) {
|
|
|
8645
8665
|
};
|
|
8646
8666
|
return Object.keys(t).length === 0 ? void 0 : t;
|
|
8647
8667
|
}
|
|
8648
|
-
function
|
|
8649
|
-
const t = e.map((s) => s.manifest), n =
|
|
8668
|
+
function qg(e) {
|
|
8669
|
+
const t = e.map((s) => s.manifest), n = Bg(t), o = n.find((s) => t.find((l) => l.name === s)?.kind === dt.Blueprint) ?? "", i = {
|
|
8650
8670
|
packages: n.filter((s) => s !== o && s !== so),
|
|
8651
8671
|
shell: o,
|
|
8652
8672
|
templatePacks: [],
|
|
@@ -8661,7 +8681,7 @@ function Gg(e) {
|
|
|
8661
8681
|
theme: r?.name ?? ""
|
|
8662
8682
|
};
|
|
8663
8683
|
}
|
|
8664
|
-
function
|
|
8684
|
+
function Kg(e, t) {
|
|
8665
8685
|
return {
|
|
8666
8686
|
name: qa,
|
|
8667
8687
|
targetPlatform: "web",
|
|
@@ -8671,11 +8691,11 @@ function qg(e, t) {
|
|
|
8671
8691
|
sampleData: Ga(t)
|
|
8672
8692
|
};
|
|
8673
8693
|
}
|
|
8674
|
-
function
|
|
8675
|
-
const i = e ?
|
|
8676
|
-
return
|
|
8694
|
+
function Ty(e, t = Pt, n, o) {
|
|
8695
|
+
const i = e ? Kg(e, o) : Ka(qg(t), t).profile;
|
|
8696
|
+
return Dg(t, i, n);
|
|
8677
8697
|
}
|
|
8678
|
-
function
|
|
8698
|
+
function Vg(e, t) {
|
|
8679
8699
|
const n = no(e), o = mo(e, {
|
|
8680
8700
|
kind: Vt.Screen,
|
|
8681
8701
|
name: be
|
|
@@ -8685,8 +8705,8 @@ function Kg(e, t) {
|
|
|
8685
8705
|
configuration: i
|
|
8686
8706
|
};
|
|
8687
8707
|
}
|
|
8688
|
-
var
|
|
8689
|
-
const { element: i, configuration: r } = U(() =>
|
|
8708
|
+
var Jg = ({ document: e, runtime: t, resolveBinding: n, registry: o = t.registry }) => {
|
|
8709
|
+
const { element: i, configuration: r } = U(() => Vg(e, t.catalog), [e, t.catalog]), s = U(() => go(i, t.compositionProfile, t.packages), [
|
|
8690
8710
|
i,
|
|
8691
8711
|
t.compositionProfile,
|
|
8692
8712
|
t.packages
|
|
@@ -8707,12 +8727,12 @@ var Vg = ({ document: e, runtime: t, resolveBinding: n, registry: o = t.registry
|
|
|
8707
8727
|
})
|
|
8708
8728
|
})
|
|
8709
8729
|
});
|
|
8710
|
-
},
|
|
8711
|
-
const t =
|
|
8730
|
+
}, Qg = (e) => {
|
|
8731
|
+
const t = bt(e);
|
|
8712
8732
|
return Pa.has(t) || t in Ta;
|
|
8713
|
-
},
|
|
8733
|
+
}, Yg = (e, t) => {
|
|
8714
8734
|
const n = (o) => {
|
|
8715
|
-
const i =
|
|
8735
|
+
const i = Qg(o.element.componentName), r = U(() => ({
|
|
8716
8736
|
...o.element,
|
|
8717
8737
|
properties: xa(e, o.element.componentName, o.element.properties)
|
|
8718
8738
|
}), [o.element]);
|
|
@@ -8726,11 +8746,11 @@ var Vg = ({ document: e, runtime: t, resolveBinding: n, registry: o = t.registry
|
|
|
8726
8746
|
};
|
|
8727
8747
|
return n.displayName = `Miniature(${t.displayName ?? t.name ?? "Component"})`, n;
|
|
8728
8748
|
};
|
|
8729
|
-
function
|
|
8730
|
-
return Object.fromEntries(Object.entries(e).map(([t, n]) => [t,
|
|
8749
|
+
function Xg(e) {
|
|
8750
|
+
return Object.fromEntries(Object.entries(e).map(([t, n]) => [t, Yg(t, n)]));
|
|
8731
8751
|
}
|
|
8732
|
-
var
|
|
8733
|
-
function
|
|
8752
|
+
var Iy = 240, Py = 112;
|
|
8753
|
+
function Zg(e, t = 240, n = Number.POSITIVE_INFINITY) {
|
|
8734
8754
|
const o = e && e.width > 0 && e.height > 0 ? e : Sa({
|
|
8735
8755
|
width: 1 / 0,
|
|
8736
8756
|
height: 1 / 0
|
|
@@ -8743,7 +8763,7 @@ function Xg(e, t = 240, n = Number.POSITIVE_INFINITY) {
|
|
|
8743
8763
|
scale: s
|
|
8744
8764
|
};
|
|
8745
8765
|
}
|
|
8746
|
-
function
|
|
8766
|
+
function ev(e, t = 240) {
|
|
8747
8767
|
const n = typeof IntersectionObserver < "u", [o, i] = j(!n);
|
|
8748
8768
|
return ce(() => {
|
|
8749
8769
|
const r = e.current;
|
|
@@ -8756,23 +8776,23 @@ function Zg(e, t = 240) {
|
|
|
8756
8776
|
n
|
|
8757
8777
|
]), o;
|
|
8758
8778
|
}
|
|
8759
|
-
var
|
|
8779
|
+
var tv = [
|
|
8760
8780
|
"#f66",
|
|
8761
8781
|
"#fa0",
|
|
8762
8782
|
"#3c3"
|
|
8763
|
-
],
|
|
8764
|
-
}, er = 16,
|
|
8765
|
-
const c = V(null), u =
|
|
8783
|
+
], nv = () => {
|
|
8784
|
+
}, er = 16, xy = ({ document: e, runtime: t, windowSize: n, width: o, title: i, openTitle: r, onClick: s, placeholder: l }) => {
|
|
8785
|
+
const c = V(null), u = ev(c), d = U(() => Zg(n, o ?? 240, o === void 0 ? 112 : void 0), [
|
|
8766
8786
|
n?.width,
|
|
8767
8787
|
n?.height,
|
|
8768
8788
|
o
|
|
8769
|
-
]), p = U(() => jo(t), [t]), h = U(() =>
|
|
8789
|
+
]), p = U(() => jo(t), [t]), h = U(() => Xg(t.registry), [t.registry]), f = {
|
|
8770
8790
|
width: d.width,
|
|
8771
8791
|
height: er + d.bodyHeight
|
|
8772
8792
|
}, g = /* @__PURE__ */ b(le, { children: [/* @__PURE__ */ b("div", {
|
|
8773
8793
|
className: "screen-thumbnail__title-bar",
|
|
8774
8794
|
style: { height: er },
|
|
8775
|
-
children: [
|
|
8795
|
+
children: [tv.map((v) => /* @__PURE__ */ a("span", {
|
|
8776
8796
|
className: "screen-thumbnail__light",
|
|
8777
8797
|
style: { borderColor: v }
|
|
8778
8798
|
}, v)), i && /* @__PURE__ */ a("span", {
|
|
@@ -8792,10 +8812,10 @@ var ev = [
|
|
|
8792
8812
|
"--studio-surface-viewport-height": `${d.canvasHeight}px`
|
|
8793
8813
|
},
|
|
8794
8814
|
"data-studio-viewport": "",
|
|
8795
|
-
children: /* @__PURE__ */ a(
|
|
8815
|
+
children: /* @__PURE__ */ a(Jg, {
|
|
8796
8816
|
document: e,
|
|
8797
8817
|
runtime: t,
|
|
8798
|
-
resolveBinding:
|
|
8818
|
+
resolveBinding: nv,
|
|
8799
8819
|
registry: h
|
|
8800
8820
|
})
|
|
8801
8821
|
}) : l
|
|
@@ -8821,28 +8841,28 @@ var ev = [
|
|
|
8821
8841
|
"aria-label": i,
|
|
8822
8842
|
children: g
|
|
8823
8843
|
});
|
|
8824
|
-
}, rt = /* @__PURE__ */ new Map(),
|
|
8825
|
-
function
|
|
8844
|
+
}, rt = /* @__PURE__ */ new Map(), ov = 200;
|
|
8845
|
+
function Oy(e) {
|
|
8826
8846
|
if (!e) return;
|
|
8827
8847
|
if (rt.has(e)) return rt.get(e);
|
|
8828
8848
|
const t = ta(e), n = t.readable ? t.document : void 0;
|
|
8829
|
-
return rt.size >=
|
|
8849
|
+
return rt.size >= ov && rt.delete(rt.keys().next().value), rt.set(e, n), n;
|
|
8830
8850
|
}
|
|
8831
|
-
var
|
|
8851
|
+
var Dy = {
|
|
8832
8852
|
[H.Stack]: "Stack",
|
|
8833
8853
|
[H.Row]: "Row",
|
|
8834
8854
|
[H.Grid]: "Grid",
|
|
8835
8855
|
[H.Container]: "Container",
|
|
8836
8856
|
[H.Wrap]: "Wrap",
|
|
8837
8857
|
[H.Canvas]: "Canvas"
|
|
8838
|
-
},
|
|
8858
|
+
}, iv = {
|
|
8839
8859
|
[H.Stack]: st,
|
|
8840
8860
|
[H.Row]: Ml,
|
|
8841
8861
|
[H.Grid]: Rr,
|
|
8842
8862
|
[H.Container]: bo,
|
|
8843
8863
|
[H.Wrap]: yo,
|
|
8844
8864
|
[H.Canvas]: cc
|
|
8845
|
-
},
|
|
8865
|
+
}, rv = {
|
|
8846
8866
|
text: vl,
|
|
8847
8867
|
button: Wt,
|
|
8848
8868
|
card: xl,
|
|
@@ -8851,7 +8871,7 @@ var Oy = {
|
|
|
8851
8871
|
section: Hl,
|
|
8852
8872
|
navigate: Pl,
|
|
8853
8873
|
title: Ut,
|
|
8854
|
-
table:
|
|
8874
|
+
table: mt,
|
|
8855
8875
|
summary: fn,
|
|
8856
8876
|
field: Pr,
|
|
8857
8877
|
code: Tl,
|
|
@@ -8870,7 +8890,7 @@ var Oy = {
|
|
|
8870
8890
|
checkbox: ti,
|
|
8871
8891
|
multiStateCheckbox: Yl,
|
|
8872
8892
|
radioButton: bn,
|
|
8873
|
-
toggleSwitch:
|
|
8893
|
+
toggleSwitch: Fr,
|
|
8874
8894
|
slider: An,
|
|
8875
8895
|
rating: ec,
|
|
8876
8896
|
knob: Kl,
|
|
@@ -8880,11 +8900,11 @@ var Oy = {
|
|
|
8880
8900
|
autoComplete: ci,
|
|
8881
8901
|
treeSelect: _n,
|
|
8882
8902
|
editor: mn,
|
|
8883
|
-
fileUpload:
|
|
8903
|
+
fileUpload: El,
|
|
8884
8904
|
splitButton: un,
|
|
8885
8905
|
speedDial: Rl,
|
|
8886
8906
|
buttonGroup: je,
|
|
8887
|
-
dataTable:
|
|
8907
|
+
dataTable: mt,
|
|
8888
8908
|
dataView: ui,
|
|
8889
8909
|
dataScroller: nc,
|
|
8890
8910
|
tree: _n,
|
|
@@ -8900,11 +8920,11 @@ var Oy = {
|
|
|
8900
8920
|
fieldset: Sl,
|
|
8901
8921
|
divider: je,
|
|
8902
8922
|
splitter: pn,
|
|
8903
|
-
scrollPanel:
|
|
8923
|
+
scrollPanel: Fl,
|
|
8904
8924
|
tabView: ii,
|
|
8905
8925
|
toolbar: ic,
|
|
8906
8926
|
stepper: wn,
|
|
8907
|
-
dialog:
|
|
8927
|
+
dialog: ht,
|
|
8908
8928
|
confirmDialog: hn,
|
|
8909
8929
|
overlayPanel: dc,
|
|
8910
8930
|
sidebar: pn,
|
|
@@ -8937,12 +8957,12 @@ var Oy = {
|
|
|
8937
8957
|
inplace: mn,
|
|
8938
8958
|
terminal: oc,
|
|
8939
8959
|
page: Mn,
|
|
8940
|
-
dataPage:
|
|
8960
|
+
dataPage: mt,
|
|
8941
8961
|
formElement: fn,
|
|
8942
8962
|
singleResult: Ll,
|
|
8943
8963
|
queryInputForm: oi,
|
|
8944
8964
|
commandForm: fn,
|
|
8945
|
-
observableDataTable:
|
|
8965
|
+
observableDataTable: mt,
|
|
8946
8966
|
inputTextField: ri,
|
|
8947
8967
|
numberField: ai,
|
|
8948
8968
|
checkboxField: ti,
|
|
@@ -8957,7 +8977,7 @@ var Oy = {
|
|
|
8957
8977
|
radioGroupField: bn,
|
|
8958
8978
|
confirmationDialog: hn,
|
|
8959
8979
|
busyIndicatorDialog: di,
|
|
8960
|
-
commandDialog:
|
|
8980
|
+
commandDialog: ht,
|
|
8961
8981
|
stepperCommandDialog: wn,
|
|
8962
8982
|
icon: Dr,
|
|
8963
8983
|
errorBoundary: hn,
|
|
@@ -8969,8 +8989,8 @@ var Oy = {
|
|
|
8969
8989
|
toolbarButton: Wt,
|
|
8970
8990
|
toolbarGroup: je,
|
|
8971
8991
|
toolbarSeparator: je,
|
|
8972
|
-
appShell:
|
|
8973
|
-
fullPageShell:
|
|
8992
|
+
appShell: En,
|
|
8993
|
+
fullPageShell: ht,
|
|
8974
8994
|
topbar: st,
|
|
8975
8995
|
menuItem: Ul,
|
|
8976
8996
|
footer: je,
|
|
@@ -8981,11 +9001,11 @@ var Oy = {
|
|
|
8981
9001
|
logo: tc,
|
|
8982
9002
|
userMenu: sc,
|
|
8983
9003
|
themeSwitcher: vn,
|
|
8984
|
-
layoutModeSwitcher:
|
|
9004
|
+
layoutModeSwitcher: En,
|
|
8985
9005
|
arcPageHeader: Ut
|
|
8986
|
-
},
|
|
8987
|
-
[/dialog/i,
|
|
8988
|
-
[/table|grid/i,
|
|
9006
|
+
}, av = [
|
|
9007
|
+
[/dialog/i, ht],
|
|
9008
|
+
[/table|grid/i, mt],
|
|
8989
9009
|
[/menu|bar$/i, st],
|
|
8990
9010
|
[/chart/i, Nr],
|
|
8991
9011
|
[/field|input/i, Pr],
|
|
@@ -8996,30 +9016,30 @@ var Oy = {
|
|
|
8996
9016
|
[/message|toast/i, Tr],
|
|
8997
9017
|
[/tree/i, _n],
|
|
8998
9018
|
[/page|screen/i, Mn]
|
|
8999
|
-
],
|
|
9019
|
+
], sv = (e) => rv[e] ?? av.find(([t]) => t.test(e))?.[1] ?? Or, lv = {
|
|
9000
9020
|
[kr.manifest.name]: Dr,
|
|
9001
|
-
[Cr.manifest.name]:
|
|
9021
|
+
[Cr.manifest.name]: Fr,
|
|
9002
9022
|
[Mr.manifest.name]: Or,
|
|
9003
9023
|
[gr.manifest.name]: yo,
|
|
9004
9024
|
[_r.manifest.name]: Ut,
|
|
9005
9025
|
[Ar.manifest.name]: Gl
|
|
9006
|
-
},
|
|
9026
|
+
}, cv = Ol, Ry = {
|
|
9007
9027
|
layout: (e) => {
|
|
9008
|
-
const t =
|
|
9028
|
+
const t = iv[e];
|
|
9009
9029
|
return /* @__PURE__ */ a(t, { "aria-hidden": "true" });
|
|
9010
9030
|
},
|
|
9011
9031
|
component: (e) => {
|
|
9012
|
-
const t =
|
|
9032
|
+
const t = sv(e);
|
|
9013
9033
|
return /* @__PURE__ */ a(t, { "aria-hidden": "true" });
|
|
9014
9034
|
},
|
|
9015
9035
|
drawer: {
|
|
9016
9036
|
layout: /* @__PURE__ */ a(Rr, { "aria-hidden": "true" }),
|
|
9017
9037
|
package: (e) => {
|
|
9018
|
-
const t =
|
|
9038
|
+
const t = lv[e] ?? cv;
|
|
9019
9039
|
return /* @__PURE__ */ a(t, { "aria-hidden": "true" });
|
|
9020
9040
|
}
|
|
9021
9041
|
}
|
|
9022
|
-
},
|
|
9042
|
+
}, Fy = Pt.map((e) => ({
|
|
9023
9043
|
package: e.manifest.name,
|
|
9024
9044
|
components: e.manifest.components,
|
|
9025
9045
|
descriptors: e.descriptors ?? []
|
|
@@ -9032,10 +9052,10 @@ function Ey(e, t, n) {
|
|
|
9032
9052
|
icon: n?.[o.item]
|
|
9033
9053
|
}));
|
|
9034
9054
|
}
|
|
9035
|
-
var
|
|
9055
|
+
var My = /* @__PURE__ */ (function(e) {
|
|
9036
9056
|
return e.Auto = "auto", e.Manual = "manual", e;
|
|
9037
9057
|
})({});
|
|
9038
|
-
function
|
|
9058
|
+
function Ay(e) {
|
|
9039
9059
|
return [
|
|
9040
9060
|
{
|
|
9041
9061
|
kind: xt.DataContext,
|
|
@@ -9058,68 +9078,68 @@ function My(e) {
|
|
|
9058
9078
|
];
|
|
9059
9079
|
}
|
|
9060
9080
|
export {
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9081
|
+
Ov as BindingMode,
|
|
9082
|
+
Dv as BindingNullBehavior,
|
|
9083
|
+
Rv as BindingSourceKind,
|
|
9084
|
+
My as CommandFormMode,
|
|
9085
|
+
Fv as DestinationKind,
|
|
9066
9086
|
Q as LayoutArrangement,
|
|
9067
9087
|
H as LayoutItem,
|
|
9068
9088
|
ie as Ownership,
|
|
9069
|
-
|
|
9089
|
+
Jg as PlayScreenView,
|
|
9070
9090
|
Ae as SceneDocumentProblem,
|
|
9071
9091
|
Ca as ScreenEditorControlProviders,
|
|
9072
|
-
|
|
9073
|
-
|
|
9092
|
+
by as ScreenEditorOverlay,
|
|
9093
|
+
yy as ScreenEditorPrimeReactProvider,
|
|
9074
9094
|
Aa as ScreenEditorWindow,
|
|
9075
|
-
|
|
9076
|
-
|
|
9095
|
+
wy as ScreenEditorWorkspace,
|
|
9096
|
+
xy as ScreenThumbnail,
|
|
9077
9097
|
oe as StructureEditRejection,
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9098
|
+
Tv as StructuredValueEditor,
|
|
9099
|
+
yv as asList,
|
|
9100
|
+
Ay as bindingSourceChoices,
|
|
9101
|
+
Vm as browserWindowSizeStorage,
|
|
9102
|
+
St as commandNameOf,
|
|
9103
|
+
ky as createScreenEditorEnvironment,
|
|
9104
|
+
Dg as createScreenEditorRuntime,
|
|
9105
|
+
Jm as createWindowSizeMemory,
|
|
9106
|
+
iv as defaultLayoutIcons,
|
|
9107
|
+
Dy as defaultLayoutLabels,
|
|
9108
|
+
Ry as defaultPaletteIcons,
|
|
9109
|
+
Fy as defaultPaletteSources,
|
|
9110
|
+
Ap as defaultScreenEditorStrings,
|
|
9091
9111
|
nr as defaultStructuredEditorStrings,
|
|
9092
9112
|
Sa as defaultWindowSize,
|
|
9093
|
-
|
|
9094
|
-
|
|
9113
|
+
Zm as fitWindowSize,
|
|
9114
|
+
vv as identified,
|
|
9095
9115
|
ls as isCollectionOfRecords,
|
|
9096
|
-
|
|
9116
|
+
Ym as isLegacyDefaultWindow,
|
|
9097
9117
|
as as isObjectWithFields,
|
|
9098
|
-
|
|
9118
|
+
hv as isPrimitiveList,
|
|
9099
9119
|
ln as isRecord,
|
|
9100
|
-
|
|
9120
|
+
bv as isStringMap,
|
|
9101
9121
|
Ho as isStructured,
|
|
9102
|
-
|
|
9103
|
-
|
|
9122
|
+
gv as movedItem,
|
|
9123
|
+
wv as newItem,
|
|
9104
9124
|
ir as numberListEditorKind,
|
|
9105
9125
|
ta as readSceneDocument,
|
|
9106
|
-
|
|
9107
|
-
|
|
9126
|
+
Oy as readThumbnailDocument,
|
|
9127
|
+
Xm as resolveInitialWindowSize,
|
|
9108
9128
|
is as scalarEditorKind,
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9129
|
+
ng as screenEditorPrimeReactDefaults,
|
|
9130
|
+
Ty as screenEditorRuntimeForProfile,
|
|
9131
|
+
pt as sliceNamedBy,
|
|
9112
9132
|
rr as stringListEditorKind,
|
|
9113
9133
|
ss as stringMapEditorKind,
|
|
9114
9134
|
rs as stringOrListEditorKind,
|
|
9115
9135
|
Hn as structuredProblem,
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9136
|
+
Zg as thumbnailGeometry,
|
|
9137
|
+
Py as thumbnailMaxBodyHeight,
|
|
9138
|
+
Iy as thumbnailWidth,
|
|
9119
9139
|
Ey as toLayoutContainerDescriptors,
|
|
9120
|
-
|
|
9121
|
-
|
|
9140
|
+
cg as toSceneCandidates,
|
|
9141
|
+
fv as withField,
|
|
9122
9142
|
os as withIdentities,
|
|
9123
|
-
|
|
9124
|
-
|
|
9143
|
+
kv as withItem,
|
|
9144
|
+
Sv as withoutItem
|
|
9125
9145
|
};
|