@cratis/event-models 0.263.0 → 0.263.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,10 +4,10 @@ import { i as ui, n as Es, r as As, t as Fs } from "./toTemplateSources-BhsOzMx1
|
|
|
4
4
|
import { _ as Ms, a as ay, c as pi, d as Rr, f as Ls, g as sy, h as Bs, i as js, l as ly, m as Us, n as cy, o as wn, p as Dr, r as zs, s as dy, t as uy, u as py, v as my, y as hy } from "./structuredValue-vqCZttsk.js";
|
|
5
5
|
import { a as ye, n as Ws, r as Ks } from "./iconDiagnostics-Ds4CnqD0.js";
|
|
6
6
|
import { t as vy } from "./StructuredValueEditor-DUSATTWd.js";
|
|
7
|
-
import { Component as Hs, createContext as Gs, createElement as Je, useCallback as
|
|
8
|
-
import { Fragment as
|
|
7
|
+
import { Component as Hs, createContext as Gs, createElement as Je, useCallback as H, useContext as qs, useEffect as ie, useId as Vs, useLayoutEffect as Te, useMemo as j, useRef as J, useState as M } from "react";
|
|
8
|
+
import { Fragment as re, jsx as a, jsxs as b } from "react/jsx-runtime";
|
|
9
9
|
import { BindingMode as ky, BindingNullBehavior as Sy, BindingSourceKind as Cy, BindingSourceKind as Bt, CollectionOperation as ke, ColorScheme as Js, ComponentCategory as Qs, CornerStyle as kn, DestinationKind as Ty, DestinationKind as _r, DiagnosticCode as Ys, EditTarget as Zs, EditingScopeKind as an, FlowContainerKind as Sn, FormGenerationMode as ve, FormWidthUnit as Ne, GridUnitType as ko, HorizontalAlignment as So, InteractionActionKind as ht, InteractionTriggerKind as $r, LogoKind as Cn, NavigationRegionKind as gt, NavigationRegionMode as $e, Orientation as ft, PackageKind as Qe, PropertyEditorKind as X, PropertyValueType as q, ProvenanceKind as mi, QueryOriginKind as Xs, QueryResultShape as el, SceneEditKind as Z, SceneNodeKind as tl, TemplateReferenceSource as Dt, TemplateScope as St, ValueSource as Er, VerticalAlignment as Co, Visibility as To, componentCategories as nl } from "@cratis/scene.model";
|
|
10
|
-
import { ApplicationStructureIndex as dn, EffectiveIconCatalog as ol, NavigationEditKind as hi, TemplateCatalogKind as Ar, ToolbarDiagnosticSeverity as il, addNavItem as rl, applicableTemplates as al, applyEdit as Fr, applyNavigationEdits as sl, baseComponentLibraries as ll, componentArgumentSourcePrefix as cl, componentBadge as fi, computeSizeClass as dl, corePackage as No, createDescriptorCatalog as ul, diagnoseNavigationRegions as pl, effectiveNavigation as Mr, effectivePackages as Lr, elementNodeId as
|
|
10
|
+
import { ApplicationStructureIndex as dn, EffectiveIconCatalog as ol, NavigationEditKind as hi, TemplateCatalogKind as Ar, ToolbarDiagnosticSeverity as il, addNavItem as rl, applicableTemplates as al, applyEdit as Fr, applyNavigationEdits as sl, baseComponentLibraries as ll, componentArgumentSourcePrefix as cl, componentBadge as fi, computeSizeClass as dl, corePackage as No, createDescriptorCatalog as ul, diagnoseNavigationRegions as pl, effectiveNavigation as Mr, effectivePackages as Lr, elementNodeId as ae, findComponentDescriptor as Io, findLayoutTypeDescriptor as gi, inspect as Po, isCanvas as vt, isDockPanel as ml, isExternalComponent as Ye, isGrid as Oo, isPackageSelectionValid as hl, isPanel as Yt, isStackPanel as xo, isThemeCompatible as fl, isWrapPanel as gl, matchComponentQuery as vl, navigationModes as bl, normalizeNavigationMode as yl, normalizeToolbarButton as wl, packagesOfKind as vi, rankFrequentlyUsedComponents as kl, resolveComponentName as Mt, resolveEffectiveConfiguration as Br, resolveIconLibraries as Sl, resolvePackageDependencies as Cl, resolveScreenTemplates as Tl, resolveTemplateChain as Ro, resolveToolbarButton as Nl, screenTemplateNodeId as Il, setApplicationLogo as Pl, slotNodeId as Ol, switchRegionMode as jr, toComponentCatalog as un, toolbarButtonFromItem as Do, validateToolbarButtons as xl, validateValue as Tn } from "@cratis/scene.engine";
|
|
11
11
|
import { ErrorBoundary as wt, IconButton as we, Tabs as Rl } from "@cratis/components/Common";
|
|
12
12
|
import { ColorScheme as Ur, ComponentName as Dl, LayoutConfigProvider as zr, LayoutMode as _o, LayoutName as _l, TemplatePreviewState as pt, applyTemplatePreviewState as $l, colorSchemes as El, composeApplicationScreen as Al, composeScreenElement as Fl, defaultApplicationChrome as Ml, defaultBlueprint as Wr, defaultBlueprintName as Kr, effectiveShellOf as Hr, externalComponent as $o, foundationSamples as Ll, layoutModes as Gr, previewProfile as Bl, resolveElementComponentNames as Eo } from "@cratis/scene.blueprint.default";
|
|
13
13
|
import { IconAdapterProvider as qr, SceneElementView as Ao, SceneNavigationModelProvider as jl, SceneNavigationProvider as Ul, SceneThemeProvider as Vr, SliceInvokerProvider as zl, componentRegistryKey as _t, corePackage as Jr, createDryRunInvoker as Wl, itemEditableRule as Kl, itemInheritedReason as Hl, mergeIconAdapters as Gl, mergePackageRegistries as Qr, resolveDesignTimeHost as ql } from "@cratis/scene.react";
|
|
@@ -133,52 +133,52 @@ var ju = (e) => e ? {
|
|
|
133
133
|
"se",
|
|
134
134
|
"sw"
|
|
135
135
|
], da = ({ sourceRect: e, initialSize: t, centerOffsetX: n = 0, children: o, renderInspector: i, canClose: r, onClosed: s }) => {
|
|
136
|
-
const [l, c] =
|
|
136
|
+
const [l, c] = M("entering"), [u, d] = M(() => ju(t)), p = J(u);
|
|
137
137
|
p.current = u;
|
|
138
|
-
const [m, h] =
|
|
138
|
+
const [m, h] = M(!1), [f, v] = M(() => ({
|
|
139
139
|
width: window.innerWidth,
|
|
140
140
|
height: window.innerHeight
|
|
141
141
|
}));
|
|
142
|
-
|
|
142
|
+
ie(() => {
|
|
143
143
|
const N = () => v({
|
|
144
144
|
width: window.innerWidth,
|
|
145
145
|
height: window.innerHeight
|
|
146
146
|
});
|
|
147
147
|
return window.addEventListener("resize", N), () => window.removeEventListener("resize", N);
|
|
148
148
|
}, []);
|
|
149
|
-
const g =
|
|
150
|
-
|
|
149
|
+
const g = H(() => h((N) => !N), []), k = J(null);
|
|
150
|
+
ie(() => {
|
|
151
151
|
const N = requestAnimationFrame(() => c("visible"));
|
|
152
152
|
return () => cancelAnimationFrame(N);
|
|
153
153
|
}, []);
|
|
154
|
-
const
|
|
154
|
+
const x = H(async (N = !1) => {
|
|
155
155
|
!N && r && !await r(p.current) || (c("closing"), setTimeout(() => s(p.current), 300));
|
|
156
|
-
}, [r, s]),
|
|
157
|
-
|
|
156
|
+
}, [r, s]), O = (N, z) => {
|
|
157
|
+
z.stopPropagation(), z.preventDefault(), k.current = {
|
|
158
158
|
direction: N,
|
|
159
|
-
startX:
|
|
160
|
-
startY:
|
|
159
|
+
startX: z.clientX,
|
|
160
|
+
startY: z.clientY,
|
|
161
161
|
startWidth: u.width,
|
|
162
162
|
startHeight: u.height
|
|
163
|
-
},
|
|
164
|
-
}, y =
|
|
165
|
-
const
|
|
166
|
-
if (!
|
|
167
|
-
const { direction: Q } =
|
|
168
|
-
let
|
|
163
|
+
}, z.target.setPointerCapture(z.pointerId);
|
|
164
|
+
}, y = H((N) => {
|
|
165
|
+
const z = k.current;
|
|
166
|
+
if (!z) return;
|
|
167
|
+
const { direction: Q } = z;
|
|
168
|
+
let pe = z.startWidth, ce = z.startHeight;
|
|
169
169
|
if (Q.includes("e") || Q.includes("w")) {
|
|
170
|
-
const
|
|
171
|
-
|
|
170
|
+
const me = Q.includes("e") ? N.clientX - z.startX : z.startX - N.clientX;
|
|
171
|
+
pe = Math.max(Lu, z.startWidth + me * 2);
|
|
172
172
|
}
|
|
173
173
|
if (Q.includes("s") || Q.includes("n")) {
|
|
174
|
-
const
|
|
175
|
-
|
|
174
|
+
const me = Q.includes("s") ? N.clientY - z.startY : z.startY - N.clientY;
|
|
175
|
+
ce = Math.max(Bu, z.startHeight + me * 2);
|
|
176
176
|
}
|
|
177
177
|
d({
|
|
178
|
-
width:
|
|
179
|
-
height:
|
|
178
|
+
width: pe,
|
|
179
|
+
height: ce
|
|
180
180
|
});
|
|
181
|
-
}, []), S =
|
|
181
|
+
}, []), S = H(() => {
|
|
182
182
|
k.current = null;
|
|
183
183
|
}, []), w = Mu(u, f, n - (m ? 360 / 2 : 0)), T = w.offsetX, E = {
|
|
184
184
|
size: u,
|
|
@@ -186,27 +186,27 @@ var ju = (e) => e ? {
|
|
|
186
186
|
isInspectorOpen: m,
|
|
187
187
|
toggleInspector: g,
|
|
188
188
|
close: () => {
|
|
189
|
-
|
|
189
|
+
x();
|
|
190
190
|
},
|
|
191
191
|
closeWithoutSaving: () => {
|
|
192
|
-
|
|
192
|
+
x(!0);
|
|
193
193
|
}
|
|
194
|
-
}, I = e.left + e.width / 2, C = e.top + e.height / 2, $ = f.width / 2 + T - w.width / 2,
|
|
194
|
+
}, I = e.left + e.width / 2, C = e.top + e.height / 2, $ = f.width / 2 + T - w.width / 2, U = f.height / 2 - w.height / 2, D = `${I - $}px ${C - U}px`, F = [
|
|
195
195
|
"prototype-editor-overlay-content",
|
|
196
196
|
l === "visible" ? "prototype-editor-overlay-content--visible" : "",
|
|
197
197
|
l === "closing" ? "prototype-editor-overlay-content--closing" : ""
|
|
198
|
-
].join(" "),
|
|
198
|
+
].join(" "), L = ["prototype-editor-overlay-backdrop", l === "visible" ? "prototype-editor-overlay-backdrop--visible" : ""].join(" ");
|
|
199
199
|
return /* @__PURE__ */ b("div", {
|
|
200
|
-
className:
|
|
200
|
+
className: L,
|
|
201
201
|
"data-testid": "studio-screen-editor-backdrop",
|
|
202
202
|
onClick: () => {
|
|
203
|
-
|
|
203
|
+
x();
|
|
204
204
|
},
|
|
205
205
|
children: [/* @__PURE__ */ b("div", {
|
|
206
|
-
className:
|
|
206
|
+
className: F,
|
|
207
207
|
"data-testid": "studio-screen-editor-frame",
|
|
208
208
|
style: {
|
|
209
|
-
transformOrigin:
|
|
209
|
+
transformOrigin: D,
|
|
210
210
|
width: w.width,
|
|
211
211
|
height: w.height,
|
|
212
212
|
marginLeft: -(w.width / 2) + T,
|
|
@@ -216,7 +216,7 @@ var ju = (e) => e ? {
|
|
|
216
216
|
onPointerDown: (N) => N.stopPropagation(),
|
|
217
217
|
children: [l === "visible" && Uu.map((N) => /* @__PURE__ */ a("div", {
|
|
218
218
|
className: `prototype-editor-overlay-resize prototype-editor-overlay-resize--${N}`,
|
|
219
|
-
onPointerDown: (
|
|
219
|
+
onPointerDown: (z) => O(N, z),
|
|
220
220
|
onPointerMove: y,
|
|
221
221
|
onPointerUp: S,
|
|
222
222
|
onPointerCancel: S
|
|
@@ -234,7 +234,7 @@ var ju = (e) => e ? {
|
|
|
234
234
|
}, $t = {
|
|
235
235
|
name: "StudioScreen",
|
|
236
236
|
slots: [{ name: "content" }]
|
|
237
|
-
}, Ze = "content",
|
|
237
|
+
}, Ze = "content", le = "Screen", zu = "template-root", Wu = "screen-root", ua = () => ({
|
|
238
238
|
layouts: [$t],
|
|
239
239
|
screenTemplates: [],
|
|
240
240
|
dialogTemplates: [],
|
|
@@ -246,7 +246,7 @@ function Ku(e, t) {
|
|
|
246
246
|
return {
|
|
247
247
|
...ua(),
|
|
248
248
|
screens: [{
|
|
249
|
-
name:
|
|
249
|
+
name: le,
|
|
250
250
|
layout: $t.name,
|
|
251
251
|
slotContent: { [Ze]: [e] },
|
|
252
252
|
forms: [],
|
|
@@ -267,7 +267,7 @@ function Hu(e, t, n) {
|
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
269
|
function Nt(e, t) {
|
|
270
|
-
return (t === void 0 ? e.screens.find((n) => n.name ===
|
|
270
|
+
return (t === void 0 ? e.screens.find((n) => n.name === le)?.slotContent : e.screenTemplates.find((n) => n.name === t)?.content)?.[Ze]?.[0];
|
|
271
271
|
}
|
|
272
272
|
function Zn(e, t = !1) {
|
|
273
273
|
return t && e !== void 0 ? {
|
|
@@ -276,7 +276,7 @@ function Zn(e, t = !1) {
|
|
|
276
276
|
layout: $t.name
|
|
277
277
|
} : {
|
|
278
278
|
kind: an.Screen,
|
|
279
|
-
name:
|
|
279
|
+
name: le
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
282
|
function It(e, t) {
|
|
@@ -284,7 +284,7 @@ function It(e, t) {
|
|
|
284
284
|
...e,
|
|
285
285
|
screens: e.screens.map((n) => n.name === t ? {
|
|
286
286
|
...n,
|
|
287
|
-
name:
|
|
287
|
+
name: le
|
|
288
288
|
} : n.name === "Screen" ? {
|
|
289
289
|
...n,
|
|
290
290
|
name: t
|
|
@@ -293,7 +293,7 @@ function It(e, t) {
|
|
|
293
293
|
}
|
|
294
294
|
function b0(e) {
|
|
295
295
|
const t = e.screens.map((n) => n.name);
|
|
296
|
-
return [...t.filter((n) => n ===
|
|
296
|
+
return [...t.filter((n) => n === le), ...t.filter((n) => n !== le)];
|
|
297
297
|
}
|
|
298
298
|
var An = (e, t) => typeof t == "string" ? Object.values(e).find((n) => n === t) : void 0, Gu = (e) => {
|
|
299
299
|
const t = e;
|
|
@@ -334,15 +334,15 @@ function Vu(e) {
|
|
|
334
334
|
};
|
|
335
335
|
return qu(t, e, 0), delete t.zIndex, t;
|
|
336
336
|
}
|
|
337
|
-
var Ju = Object.keys(Xn),
|
|
337
|
+
var Ju = Object.keys(Xn), G = /* @__PURE__ */ (function(e) {
|
|
338
338
|
return e.Stack = "stack", e.Row = "row", e.Grid = "grid", e.Container = "container", e.Wrap = "wrap", e.Canvas = "canvas", e;
|
|
339
339
|
})({}), Qu = "StudioLayout", Yu = {
|
|
340
|
-
Stack:
|
|
341
|
-
Row:
|
|
342
|
-
Grid:
|
|
343
|
-
Container:
|
|
344
|
-
Wrap:
|
|
345
|
-
Canvas:
|
|
340
|
+
Stack: G.Stack,
|
|
341
|
+
Row: G.Row,
|
|
342
|
+
Grid: G.Grid,
|
|
343
|
+
Container: G.Container,
|
|
344
|
+
Wrap: G.Wrap,
|
|
345
|
+
Canvas: G.Canvas
|
|
346
346
|
};
|
|
347
347
|
function Zu(e) {
|
|
348
348
|
const t = Object.entries(Yu).find(([, n]) => n === e)?.[0] ?? "Container";
|
|
@@ -362,10 +362,10 @@ function eo(e) {
|
|
|
362
362
|
return Array.isArray(e) ? e.filter((t) => t !== null).map(eo) : e !== null && typeof e == "object" ? Object.fromEntries(Object.entries(e).filter(([, t]) => t !== null).map(([t, n]) => [t, eo(n)])) : e;
|
|
363
363
|
}
|
|
364
364
|
function ma(e) {
|
|
365
|
-
if (vt(e)) return
|
|
366
|
-
if (Oo(e)) return
|
|
365
|
+
if (vt(e)) return G.Canvas;
|
|
366
|
+
if (Oo(e)) return G.Grid;
|
|
367
367
|
if (!ml(e))
|
|
368
|
-
return xo(e) ? e.orientation === ft.Horizontal ?
|
|
368
|
+
return xo(e) ? e.orientation === ft.Horizontal ? G.Row : G.Stack : gl(e) ? G.Wrap : G.Container;
|
|
369
369
|
}
|
|
370
370
|
function en(e, t = () => {
|
|
371
371
|
}) {
|
|
@@ -377,13 +377,13 @@ function ha(e, t) {
|
|
|
377
377
|
if (r != null && typeof r == "object") return op(r, n, o, i);
|
|
378
378
|
const s = o[Fi], l = typeof o.legacyType == "string" && o.legacyType !== "" ? o[Ai] : void 0, c = l ?? (Yt(e) ? Zu(ma(e)) : t(Ye(e) ? e.componentName : "")), u = Ye(e) ? e.componentName : "", { [Ai]: d, [Fi]: p, [et]: m, [tt]: h, ...f } = o, v = {};
|
|
379
379
|
for (const y of s?.topKeys ?? []) y in f && (v[y] = f[y], delete f[y]);
|
|
380
|
-
const g = ge(m, s?.position.x ?? 0), k = ge(h, s?.position.y ?? 0),
|
|
380
|
+
const g = ge(m, s?.position.x ?? 0), k = ge(h, s?.position.y ?? 0), x = n.name ?? "", O = s?.emptyName === !0 && x === (l ?? "");
|
|
381
381
|
return {
|
|
382
382
|
...np(n, s),
|
|
383
383
|
...v,
|
|
384
384
|
_derivedTypeId: c ?? "externalComponent",
|
|
385
385
|
id: n.id,
|
|
386
|
-
...
|
|
386
|
+
...O ? {} : { name: x },
|
|
387
387
|
componentName: c ? c.slice(c.lastIndexOf(".") + 1) : pa(u),
|
|
388
388
|
properties: {
|
|
389
389
|
...f,
|
|
@@ -463,18 +463,18 @@ function Ie(e, t, n, o = null) {
|
|
|
463
463
|
function fa(e, t, n) {
|
|
464
464
|
return n.idOf(e) === t ? !0 : n.childrenOf(e).some((o) => fa(o, t, n));
|
|
465
465
|
}
|
|
466
|
-
var
|
|
466
|
+
var oe = /* @__PURE__ */ (function(e) {
|
|
467
467
|
return e.Local = "local", e.Inherited = "inherited", e.ConfigurableInherited = "configurableInherited", e;
|
|
468
468
|
})({}), Le = /* @__PURE__ */ (function(e) {
|
|
469
469
|
return e.Select = "select", e.Configure = "configure", e.Move = "move", e.Resize = "resize", e.Restyle = "restyle", e.Insert = "insert", e.Delete = "delete", e;
|
|
470
470
|
})({});
|
|
471
471
|
function Et(e, t) {
|
|
472
472
|
switch (e) {
|
|
473
|
-
case
|
|
473
|
+
case oe.Local:
|
|
474
474
|
return !0;
|
|
475
|
-
case
|
|
475
|
+
case oe.ConfigurableInherited:
|
|
476
476
|
return t === Le.Select || t === Le.Configure;
|
|
477
|
-
case
|
|
477
|
+
case oe.Inherited:
|
|
478
478
|
return t === Le.Select;
|
|
479
479
|
}
|
|
480
480
|
}
|
|
@@ -563,7 +563,7 @@ function sp(e, t, n) {
|
|
|
563
563
|
const o = e / t;
|
|
564
564
|
return o < 0.25 ? We.Before : o > 0.75 || !n ? o < 0.5 ? We.Before : We.After : We.Inside;
|
|
565
565
|
}
|
|
566
|
-
var ba = ({ ownership: e, label: t }) => e ===
|
|
566
|
+
var ba = ({ ownership: e, label: t }) => e === oe.Local ? null : /* @__PURE__ */ a("span", {
|
|
567
567
|
className: "studio-editor-ownership-badge",
|
|
568
568
|
"data-ownership": e,
|
|
569
569
|
children: t
|
|
@@ -629,29 +629,29 @@ var Mi = {
|
|
|
629
629
|
ArrowRight: Ee.Indent
|
|
630
630
|
};
|
|
631
631
|
function ya({ roots: e, adapter: t, strings: n, selectedId: o, onSelect: i, onEdit: r, onRemove: s }) {
|
|
632
|
-
const [l, c] =
|
|
632
|
+
const [l, c] = M(() => new Set(e.flatMap((I) => [t.idOf(I), ...t.childrenOf(I).map((C) => t.idOf(C))]))), [u, d] = M(o), [p, m] = M(), [h, f] = M(), [v, g] = M(""), k = j(() => va(e, l, t), [
|
|
633
633
|
e,
|
|
634
634
|
l,
|
|
635
635
|
t
|
|
636
|
-
]),
|
|
636
|
+
]), x = k.some((I) => I.id === u) ? u : k[0]?.id, O = H((I) => c((C) => {
|
|
637
637
|
const $ = new Set(C);
|
|
638
638
|
return $.delete(I) || $.add(I), $;
|
|
639
|
-
}), []), y =
|
|
639
|
+
}), []), y = H((I) => {
|
|
640
640
|
if (!I) return;
|
|
641
641
|
const C = r(I);
|
|
642
642
|
g(C ? n.rejection[C] : n.moved), !C && I.targetParentId && c(($) => new Set($).add(I.targetParentId));
|
|
643
643
|
}, [r, n]), S = (I) => {
|
|
644
644
|
I && (d(I), requestAnimationFrame(() => document.querySelector(`[data-row-id="${CSS.escape(I)}"]`)?.focus()));
|
|
645
645
|
}, w = (I, C) => {
|
|
646
|
-
const $ = k.findIndex((
|
|
646
|
+
const $ = k.findIndex((D) => D.id === C), U = k[$];
|
|
647
647
|
if (I.altKey && Mi[I.key]) {
|
|
648
648
|
I.preventDefault(), y(rp(e, C, Mi[I.key], t)), S(C);
|
|
649
649
|
return;
|
|
650
650
|
}
|
|
651
651
|
if (Bo(I) && s && to(e, C, t)) {
|
|
652
652
|
I.preventDefault();
|
|
653
|
-
const
|
|
654
|
-
s(C), S(
|
|
653
|
+
const D = ga(e, C, t);
|
|
654
|
+
s(C), S(D);
|
|
655
655
|
return;
|
|
656
656
|
}
|
|
657
657
|
switch (I.key) {
|
|
@@ -668,10 +668,10 @@ function ya({ roots: e, adapter: t, strings: n, selectedId: o, onSelect: i, onEd
|
|
|
668
668
|
I.preventDefault(), S(k[k.length - 1]?.id);
|
|
669
669
|
break;
|
|
670
670
|
case "ArrowRight":
|
|
671
|
-
I.preventDefault(),
|
|
671
|
+
I.preventDefault(), U.hasChildren && !U.isExpanded ? O(C) : S(k[$ + 1]?.parentId === C ? k[$ + 1].id : void 0);
|
|
672
672
|
break;
|
|
673
673
|
case "ArrowLeft":
|
|
674
|
-
I.preventDefault(),
|
|
674
|
+
I.preventDefault(), U.isExpanded ? O(C) : S(U.parentId ?? void 0);
|
|
675
675
|
break;
|
|
676
676
|
case "Enter":
|
|
677
677
|
case " ":
|
|
@@ -680,10 +680,10 @@ function ya({ roots: e, adapter: t, strings: n, selectedId: o, onSelect: i, onEd
|
|
|
680
680
|
}, T = (I, C) => {
|
|
681
681
|
if (!p) return;
|
|
682
682
|
I.preventDefault();
|
|
683
|
-
const $ = I.currentTarget.getBoundingClientRect(),
|
|
683
|
+
const $ = I.currentTarget.getBoundingClientRect(), U = k.find((D) => D.id === C);
|
|
684
684
|
f({
|
|
685
685
|
id: C,
|
|
686
|
-
zone: sp(I.clientY - $.top, $.height, !!
|
|
686
|
+
zone: sp(I.clientY - $.top, $.height, !!U && t.acceptsChildren(U.node))
|
|
687
687
|
});
|
|
688
688
|
}, E = (I, C) => {
|
|
689
689
|
I.preventDefault(), p && h?.id === C && y(ap(e, p, C, h.zone, t)), m(void 0), f(void 0);
|
|
@@ -691,7 +691,7 @@ function ya({ roots: e, adapter: t, strings: n, selectedId: o, onSelect: i, onEd
|
|
|
691
691
|
return k.length === 0 ? /* @__PURE__ */ a("p", {
|
|
692
692
|
className: "studio-editor-structure-empty",
|
|
693
693
|
children: n.structureEmpty
|
|
694
|
-
}) : /* @__PURE__ */ b(
|
|
694
|
+
}) : /* @__PURE__ */ b(re, { children: [/* @__PURE__ */ a("ul", {
|
|
695
695
|
role: "tree",
|
|
696
696
|
"aria-label": n.structureLabel,
|
|
697
697
|
className: "studio-editor-structure-tree",
|
|
@@ -700,12 +700,12 @@ function ya({ roots: e, adapter: t, strings: n, selectedId: o, onSelect: i, onEd
|
|
|
700
700
|
adapter: t,
|
|
701
701
|
strings: n,
|
|
702
702
|
isSelected: I.id === o,
|
|
703
|
-
isFocusable: I.id ===
|
|
703
|
+
isFocusable: I.id === x,
|
|
704
704
|
dropZone: h?.id === I.id ? h.zone : void 0,
|
|
705
705
|
onSelect: (C) => {
|
|
706
706
|
d(C), i(C);
|
|
707
707
|
},
|
|
708
|
-
onToggle:
|
|
708
|
+
onToggle: O,
|
|
709
709
|
onKeyDown: w,
|
|
710
710
|
onDragStart: m,
|
|
711
711
|
onDragOver: T,
|
|
@@ -834,7 +834,7 @@ var bp = (e, t) => {
|
|
|
834
834
|
}, d.id))
|
|
835
835
|
]
|
|
836
836
|
})] }),
|
|
837
|
-
e && c && /* @__PURE__ */ b(
|
|
837
|
+
e && c && /* @__PURE__ */ b(re, { children: [/* @__PURE__ */ b("div", {
|
|
838
838
|
className: "studio-editor-query__group",
|
|
839
839
|
children: [/* @__PURE__ */ a("strong", { children: l.inputs }), c.inputs.map((d) => /* @__PURE__ */ b("label", { children: [/* @__PURE__ */ b("span", { children: [l.sourceFor(d.name), d.required ? " *" : ""] }), /* @__PURE__ */ b("select", {
|
|
840
840
|
value: e.inputs[d.name] ?? "",
|
|
@@ -916,7 +916,7 @@ function mn(e, t, n, o, i) {
|
|
|
916
916
|
const l = {
|
|
917
917
|
element: e,
|
|
918
918
|
root: n.composition.element,
|
|
919
|
-
screen: n.document.screens.find((c) => c.name ===
|
|
919
|
+
screen: n.document.screens.find((c) => c.name === le),
|
|
920
920
|
descriptor: t,
|
|
921
921
|
profile: o.runtime.profile,
|
|
922
922
|
bundles: o.runtime.bundles,
|
|
@@ -956,11 +956,11 @@ function Uo(e, t, n = []) {
|
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
958
|
var Cp = ({ component: e, descriptor: t, controller: n, environment: o, strings: i, disabled: r }) => {
|
|
959
|
-
const [s, l] =
|
|
959
|
+
const [s, l] = M([]), { designTime: c, packageDescriptorOf: u } = o.runtime, d = u(t);
|
|
960
960
|
if ((d.actions ?? []).length === 0) return null;
|
|
961
961
|
const p = (g) => mn(e, d, n, o, g), m = c.actions(d, p(i.properties.designTimeActions)), h = Uo(d, o, m.map((g) => g.diagnostic)) !== void 0, f = h ? [] : m.flatMap((g) => g.diagnostic ? [g.diagnostic] : []), v = (g, k) => {
|
|
962
|
-
const
|
|
963
|
-
l(
|
|
962
|
+
const x = c.runAction(d, g, p(k));
|
|
963
|
+
l(x.diagnostics);
|
|
964
964
|
};
|
|
965
965
|
return /* @__PURE__ */ b("section", {
|
|
966
966
|
className: "studio-editor-properties__actions",
|
|
@@ -1048,17 +1048,17 @@ function Op(e, t) {
|
|
|
1048
1048
|
function xp(e, t) {
|
|
1049
1049
|
return t ? {
|
|
1050
1050
|
kind: Z.SetProperty,
|
|
1051
|
-
nodeId:
|
|
1051
|
+
nodeId: ae(e),
|
|
1052
1052
|
path: oo,
|
|
1053
1053
|
value: t.id
|
|
1054
1054
|
} : {
|
|
1055
1055
|
kind: Z.ResetProperty,
|
|
1056
|
-
nodeId:
|
|
1056
|
+
nodeId: ae(e),
|
|
1057
1057
|
path: oo
|
|
1058
1058
|
};
|
|
1059
1059
|
}
|
|
1060
1060
|
var Rp = ({ controller: e, slices: t, strings: n, disabled: o }) => {
|
|
1061
|
-
const i = e.document.screens.find((c) => c.name ===
|
|
1061
|
+
const i = e.document.screens.find((c) => c.name === le), r = i?.forms ?? [];
|
|
1062
1062
|
if (!i) return null;
|
|
1063
1063
|
const s = n.properties.forms, l = new Set(Ca(e.composition.roots, t).map((c) => c.commandName));
|
|
1064
1064
|
return /* @__PURE__ */ b("section", {
|
|
@@ -1360,7 +1360,7 @@ var Vp = ({ form: e, strings: t, onChange: n }) => {
|
|
|
1360
1360
|
})] })
|
|
1361
1361
|
]
|
|
1362
1362
|
});
|
|
1363
|
-
}, Jp = ({ placement: e, strings: t, onChange: n }) => /* @__PURE__ */ b(
|
|
1363
|
+
}, Jp = ({ placement: e, strings: t, onChange: n }) => /* @__PURE__ */ b(re, { children: [
|
|
1364
1364
|
/* @__PURE__ */ a(Ut, {
|
|
1365
1365
|
label: t.row,
|
|
1366
1366
|
value: e.row,
|
|
@@ -1651,7 +1651,7 @@ function rm(e, t) {
|
|
|
1651
1651
|
var Pt = /* @__PURE__ */ (function(e) {
|
|
1652
1652
|
return e.Desktop = "desktop", e.Tablet = "tablet", e.Phone = "phone", e;
|
|
1653
1653
|
})({}), am = ({ templateName: e, environment: t, strings: n, disabled: o, onApply: i, onDiscard: r }) => {
|
|
1654
|
-
const [s, l] =
|
|
1654
|
+
const [s, l] = M(pt.Populated), [c, u] = M(Pt.Desktop), { bundles: d, profile: p, registry: m, designTime: h } = t.runtime, f = j(() => im(e, s, d, p), [
|
|
1655
1655
|
e,
|
|
1656
1656
|
s,
|
|
1657
1657
|
d,
|
|
@@ -1704,8 +1704,8 @@ var Pt = /* @__PURE__ */ (function(e) {
|
|
|
1704
1704
|
children: [
|
|
1705
1705
|
/* @__PURE__ */ a("dt", { children: n.provenanceLabel }),
|
|
1706
1706
|
/* @__PURE__ */ a("dd", { children: `${v.package} ${v.packageVersion}` }),
|
|
1707
|
-
v.license && /* @__PURE__ */ b(
|
|
1708
|
-
v.attribution?.notice && /* @__PURE__ */ b(
|
|
1707
|
+
v.license && /* @__PURE__ */ b(re, { children: [/* @__PURE__ */ a("dt", { children: n.license }), /* @__PURE__ */ a("dd", { children: v.license })] }),
|
|
1708
|
+
v.attribution?.notice && /* @__PURE__ */ b(re, { children: [/* @__PURE__ */ a("dt", { children: n.attribution }), /* @__PURE__ */ a("dd", { children: v.attribution.notice })] }),
|
|
1709
1709
|
/* @__PURE__ */ a("dt", { children: n.compatibility }),
|
|
1710
1710
|
/* @__PURE__ */ a("dd", { children: v.compatible ? n.compatible : n.incompatible })
|
|
1711
1711
|
]
|
|
@@ -1801,9 +1801,9 @@ var Pt = /* @__PURE__ */ (function(e) {
|
|
|
1801
1801
|
disabled: o
|
|
1802
1802
|
});
|
|
1803
1803
|
}, sm = ({ controller: e, environment: t, strings: n, disabled: o }) => {
|
|
1804
|
-
const i = n.properties.templates, [r, s] =
|
|
1804
|
+
const i = n.properties.templates, [r, s] = M(), l = e.document.screens.find((g) => g.name === le);
|
|
1805
1805
|
if (!l) return null;
|
|
1806
|
-
const c = t.ownTemplates ?? [], u = (g) => e.setScreenTemplate([...c, ...t.runtime.bundles.flatMap((k) => k.screenTemplates ?? [])].find((k) => k.name === g), i.choose), d =
|
|
1806
|
+
const c = t.ownTemplates ?? [], u = (g) => e.setScreenTemplate([...c, ...t.runtime.bundles.flatMap((k) => k.screenTemplates ?? [])].find((k) => k.name === g), i.choose), d = j(() => lm(al({
|
|
1807
1807
|
...c.length > 0 ? { own: Xp(c) } : {},
|
|
1808
1808
|
blueprints: Fs(t.runtime.bundles)
|
|
1809
1809
|
}, Es({
|
|
@@ -2018,7 +2018,7 @@ function vm(e, t, n) {
|
|
|
2018
2018
|
};
|
|
2019
2019
|
}
|
|
2020
2020
|
var bm = ({ inspection: e, controller: t, strings: n, disabled: o }) => {
|
|
2021
|
-
const i = n.properties, [r, s] =
|
|
2021
|
+
const i = n.properties, [r, s] = M(), l = gi(t.context.catalog, e.typeId), c = l?.capabilities.convertibleTo ?? [];
|
|
2022
2022
|
if (!l || c.length === 0) return null;
|
|
2023
2023
|
const u = (d) => {
|
|
2024
2024
|
const p = t.tryApply(d, i.changeLayout), m = vm(d, p.applied, p.diagnostics);
|
|
@@ -2064,7 +2064,7 @@ var bm = ({ inspection: e, controller: t, strings: n, disabled: o }) => {
|
|
|
2064
2064
|
});
|
|
2065
2065
|
};
|
|
2066
2066
|
var ym = ({ location: e, strings: t }) => {
|
|
2067
|
-
const n = t.properties.location, [o, i] =
|
|
2067
|
+
const n = t.properties.location, [o, i] = M(), [r, s] = M(""), [l, c] = M(), [u, d] = M(!1);
|
|
2068
2068
|
if (!e) return null;
|
|
2069
2069
|
const p = o?.featureId ?? e.currentFeatureId, m = o?.path ?? e.path, h = e.features.filter((v) => v.id !== p), f = async () => {
|
|
2070
2070
|
const v = e.features.find((k) => k.id === r);
|
|
@@ -2208,8 +2208,8 @@ function ro(e, t, n = e.label) {
|
|
|
2208
2208
|
}
|
|
2209
2209
|
}
|
|
2210
2210
|
function Wi(e, t) {
|
|
2211
|
-
const [n, o] =
|
|
2212
|
-
return
|
|
2211
|
+
const [n, o] = M(), i = t ? e.loadedOf(t) : void 0;
|
|
2212
|
+
return ie(() => {
|
|
2213
2213
|
if (!t || e.loadedOf(t)) return;
|
|
2214
2214
|
let r = !0;
|
|
2215
2215
|
return e.load(t).then(() => {
|
|
@@ -2235,7 +2235,7 @@ function Wi(e, t) {
|
|
|
2235
2235
|
};
|
|
2236
2236
|
}
|
|
2237
2237
|
var Wo = ({ registry: e, property: t, context: n, componentId: o, onChange: i, diagnostics: r, presentation: s = "field" }) => {
|
|
2238
|
-
const l = s === "popover", { descriptor: c } = t, u = `pe-${o}-${c.path}`.replace(/[^A-Za-z0-9_-]/g, "-"), d = e.resolve(c), p = Rs(t), { editor: m, failed: h } = Wi(e, d?.id), { editor: f } = Wi(e, p ? "bindingExpression" : void 0), v = n.strings.editors, g = !t.editable || c.readOnly === !0, k = t.editable ? c.readOnly === !0 ? v.readOnly : void 0 : t.reason ?? v.inherited,
|
|
2238
|
+
const l = s === "popover", { descriptor: c } = t, u = `pe-${o}-${c.path}`.replace(/[^A-Za-z0-9_-]/g, "-"), d = e.resolve(c), p = Rs(t), { editor: m, failed: h } = Wi(e, d?.id), { editor: f } = Wi(e, p ? "bindingExpression" : void 0), v = n.strings.editors, g = !t.editable || c.readOnly === !0, k = t.editable ? c.readOnly === !0 ? v.readOnly : void 0 : t.reason ?? v.inherited, x = t.effectiveValue, O = Nm(t, r), y = x == null || !pi(c) ? void 0 : Tn(c, x) ?? ro(c, x), S = y !== void 0 && Tn(c, x) !== void 0 ? Ms(c, x) : void 0, w = S !== void 0 && Tn(c, S) === void 0, T = ($) => i(t, $), E = p && $s(x), I = c.valueType === "boolean", C = pi(c);
|
|
2239
2239
|
return /* @__PURE__ */ b("div", {
|
|
2240
2240
|
className: `studio-editor-field${I ? " studio-editor-field--inline" : ""}`,
|
|
2241
2241
|
"data-property": c.path,
|
|
@@ -2279,14 +2279,14 @@ var Wo = ({ registry: e, property: t, context: n, componentId: o, onChange: i, d
|
|
|
2279
2279
|
}),
|
|
2280
2280
|
children: /* @__PURE__ */ a(m, {
|
|
2281
2281
|
id: u,
|
|
2282
|
-
value:
|
|
2282
|
+
value: x,
|
|
2283
2283
|
onChange: T,
|
|
2284
2284
|
descriptor: c,
|
|
2285
2285
|
context: n,
|
|
2286
2286
|
disabled: g,
|
|
2287
2287
|
...l ? { inline: !0 } : {},
|
|
2288
2288
|
...k ? { readOnlyReason: k } : {},
|
|
2289
|
-
...
|
|
2289
|
+
...O ? { problem: O } : {}
|
|
2290
2290
|
})
|
|
2291
2291
|
}, o) : h ? /* @__PURE__ */ a("p", {
|
|
2292
2292
|
className: "studio-editor-binding__missing",
|
|
@@ -2318,12 +2318,12 @@ var Wo = ({ registry: e, property: t, context: n, componentId: o, onChange: i, d
|
|
|
2318
2318
|
"data-reason": !0,
|
|
2319
2319
|
children: k
|
|
2320
2320
|
}),
|
|
2321
|
-
|
|
2321
|
+
O && /* @__PURE__ */ a("p", {
|
|
2322
2322
|
id: `${u}-problem`,
|
|
2323
2323
|
className: "studio-editor-field__problem",
|
|
2324
2324
|
role: "alert",
|
|
2325
|
-
"data-code":
|
|
2326
|
-
children:
|
|
2325
|
+
"data-code": O.code,
|
|
2326
|
+
children: O.message
|
|
2327
2327
|
})
|
|
2328
2328
|
]
|
|
2329
2329
|
});
|
|
@@ -2560,14 +2560,14 @@ var te = /* @__PURE__ */ (function(e) {
|
|
|
2560
2560
|
typeLabel: "Type",
|
|
2561
2561
|
ownershipLabel: "Source",
|
|
2562
2562
|
ownership: {
|
|
2563
|
-
[
|
|
2564
|
-
[
|
|
2565
|
-
[
|
|
2563
|
+
[oe.Local]: "This screen",
|
|
2564
|
+
[oe.Inherited]: "Inherited",
|
|
2565
|
+
[oe.ConfigurableInherited]: "Inherited, configurable"
|
|
2566
2566
|
},
|
|
2567
2567
|
ownershipHint: {
|
|
2568
|
-
[
|
|
2569
|
-
[
|
|
2570
|
-
[
|
|
2568
|
+
[oe.Local]: "Authored on this screen. You can move, resize and change it.",
|
|
2569
|
+
[oe.Inherited]: "Inherited from a template. It can be inspected here but not changed; open the template to edit it.",
|
|
2570
|
+
[oe.ConfigurableInherited]: "Inherited from a template that exposes some of its settings to this screen. The structure stays locked."
|
|
2571
2571
|
},
|
|
2572
2572
|
surface: {
|
|
2573
2573
|
emptyContainer: "Empty - drop a component here",
|
|
@@ -3056,7 +3056,7 @@ function Em(e) {
|
|
|
3056
3056
|
};
|
|
3057
3057
|
}
|
|
3058
3058
|
function Am(e, t) {
|
|
3059
|
-
const n =
|
|
3059
|
+
const n = ae(e);
|
|
3060
3060
|
return Object.entries(Em(t)).map(([o, i]) => ({
|
|
3061
3061
|
kind: Z.SetProperty,
|
|
3062
3062
|
nodeId: n,
|
|
@@ -3131,7 +3131,7 @@ function Bm(e) {
|
|
|
3131
3131
|
return e?.kind === $r.Click;
|
|
3132
3132
|
}
|
|
3133
3133
|
var jm = ({ behaviors: e, targets: t, destinations: n, slices: o, strings: i, disabled: r, onChange: s }) => {
|
|
3134
|
-
const l = Fm(e), [c, u] =
|
|
3134
|
+
const l = Fm(e), [c, u] = M(ee.None), d = l.kind === ee.None ? {
|
|
3135
3135
|
kind: c,
|
|
3136
3136
|
target: ""
|
|
3137
3137
|
} : l, p = Um(d.kind, t, n, o), m = d.target !== "" && !p.some((v) => v.value === d.target), h = (v) => {
|
|
@@ -3320,7 +3320,7 @@ var fn = {
|
|
|
3320
3320
|
removed: (e) => `Removed ${e}`,
|
|
3321
3321
|
refused: (e) => `Not possible: ${e}`
|
|
3322
3322
|
}
|
|
3323
|
-
},
|
|
3323
|
+
}, A = {
|
|
3324
3324
|
addItem: "addItem",
|
|
3325
3325
|
addButton: "addButton",
|
|
3326
3326
|
rename: "rename",
|
|
@@ -3353,17 +3353,17 @@ function Wt(e, t) {
|
|
|
3353
3353
|
enabled: !1
|
|
3354
3354
|
};
|
|
3355
3355
|
switch (e.id) {
|
|
3356
|
-
case
|
|
3356
|
+
case A.moveEarlier:
|
|
3357
3357
|
return {
|
|
3358
3358
|
visible: !0,
|
|
3359
3359
|
enabled: t.index > 0
|
|
3360
3360
|
};
|
|
3361
|
-
case
|
|
3361
|
+
case A.moveLater:
|
|
3362
3362
|
return {
|
|
3363
3363
|
visible: !0,
|
|
3364
3364
|
enabled: t.index < t.count - 1
|
|
3365
3365
|
};
|
|
3366
|
-
case
|
|
3366
|
+
case A.addSubItem:
|
|
3367
3367
|
return {
|
|
3368
3368
|
visible: !0,
|
|
3369
3369
|
enabled: t.parentId === void 0
|
|
@@ -3463,9 +3463,9 @@ function Ym(e, t) {
|
|
|
3463
3463
|
return [n.name, ...o].join(" › ");
|
|
3464
3464
|
}
|
|
3465
3465
|
function Yo(e) {
|
|
3466
|
-
const { region: t, module: n, navigation: o, structure: i, newId: r, slots: s, startingLabel: l, strings: c } = e, u = Mr(i, o, n, t), d = Jm(o, n, t), p = pl(i, o, { slots: [...s] }), m = (
|
|
3467
|
-
const S =
|
|
3468
|
-
|
|
3466
|
+
const { region: t, module: n, navigation: o, structure: i, newId: r, slots: s, startingLabel: l, strings: c } = e, u = Mr(i, o, n, t), d = Jm(o, n, t), p = pl(i, o, { slots: [...s] }), m = (O) => `${n ?? "application"}:${t}:${O}`, h = [], f = (O, y) => {
|
|
3467
|
+
const S = O.filter((w) => !w.readOnly);
|
|
3468
|
+
O.forEach((w) => {
|
|
3469
3469
|
const T = sn(d, w.id)?.target ?? (w.target ? {
|
|
3470
3470
|
module: w.target.module,
|
|
3471
3471
|
...w.target.feature ? { feature: w.target.feature } : {}
|
|
@@ -3500,22 +3500,22 @@ function Yo(e) {
|
|
|
3500
3500
|
});
|
|
3501
3501
|
};
|
|
3502
3502
|
f(u.items);
|
|
3503
|
-
const v = t, g = (
|
|
3504
|
-
label:
|
|
3503
|
+
const v = t, g = (O, y, S, w = {}) => y.rejected ? { rejected: y.rejected } : {
|
|
3504
|
+
label: O,
|
|
3505
3505
|
edits: [],
|
|
3506
3506
|
navigationEdits: y.edits,
|
|
3507
3507
|
...S ? { select: S } : {},
|
|
3508
3508
|
...w
|
|
3509
|
-
}, k = (
|
|
3509
|
+
}, k = (O) => ({ edits: [{
|
|
3510
3510
|
kind: hi.SetRegionItems,
|
|
3511
3511
|
...n !== void 0 ? { module: n } : {},
|
|
3512
3512
|
region: t,
|
|
3513
|
-
items:
|
|
3514
|
-
}] }),
|
|
3513
|
+
items: O
|
|
3514
|
+
}] }), x = (O) => {
|
|
3515
3515
|
const y = r(), S = rl(o, n, t, {
|
|
3516
3516
|
id: y,
|
|
3517
3517
|
title: l
|
|
3518
|
-
},
|
|
3518
|
+
}, O), w = S.edits.some((T) => T.kind === hi.SetRegionMode);
|
|
3519
3519
|
return g("Add", S, { itemId: y }, {
|
|
3520
3520
|
renameNext: !0,
|
|
3521
3521
|
...w ? { notice: c.extendsNotice } : {}
|
|
@@ -3534,41 +3534,41 @@ function Yo(e) {
|
|
|
3534
3534
|
...n !== void 0 ? { module: n } : {},
|
|
3535
3535
|
...u.mode ? { mode: Qm(u.mode) } : {}
|
|
3536
3536
|
},
|
|
3537
|
-
add: (
|
|
3538
|
-
act: (
|
|
3539
|
-
switch (
|
|
3540
|
-
case
|
|
3541
|
-
return y.parentId !== void 0 ? { rejected: "subItemOfSubItem" } :
|
|
3542
|
-
case
|
|
3543
|
-
case
|
|
3544
|
-
const S = y.index + (
|
|
3537
|
+
add: (O) => O === A.addItem ? x() : { rejected: O },
|
|
3538
|
+
act: (O, y) => {
|
|
3539
|
+
switch (O) {
|
|
3540
|
+
case A.addSubItem:
|
|
3541
|
+
return y.parentId !== void 0 ? { rejected: "subItemOfSubItem" } : x(y.id);
|
|
3542
|
+
case A.moveEarlier:
|
|
3543
|
+
case A.moveLater: {
|
|
3544
|
+
const S = y.index + (O === A.moveEarlier ? -1 : 1), w = Ft(d, y.id);
|
|
3545
3545
|
return !w || S < 0 || S >= w.length ? { rejected: "noWhere" } : g("Move", k(Hm(d, y.id, S)), { itemId: y.id });
|
|
3546
3546
|
}
|
|
3547
|
-
case
|
|
3547
|
+
case A.duplicate: {
|
|
3548
3548
|
const S = Gm(d, y.id, r);
|
|
3549
|
-
return S.copy ? g("Duplicate", k(S.items), { itemId: S.copy.id }) : { rejected:
|
|
3549
|
+
return S.copy ? g("Duplicate", k(S.items), { itemId: S.copy.id }) : { rejected: O };
|
|
3550
3550
|
}
|
|
3551
|
-
case
|
|
3551
|
+
case A.delete: {
|
|
3552
3552
|
const S = Ft(d, y.id) ?? [], w = S.findIndex((E) => E.id === y.id), T = S[w + 1] ?? S[w - 1];
|
|
3553
3553
|
return g("Remove", k(Km(d, y.id)), { itemId: T?.id ?? null });
|
|
3554
3554
|
}
|
|
3555
3555
|
default:
|
|
3556
|
-
return { rejected:
|
|
3556
|
+
return { rejected: O };
|
|
3557
3557
|
}
|
|
3558
3558
|
},
|
|
3559
|
-
rename: (
|
|
3560
|
-
choice: (
|
|
3559
|
+
rename: (O, y) => g("Rename", k(Kt(d, O.id, { title: y })), { itemId: O.id }),
|
|
3560
|
+
choice: (O, y) => {
|
|
3561
3561
|
const S = sn(d, y.id);
|
|
3562
3562
|
if (S) {
|
|
3563
|
-
if (
|
|
3563
|
+
if (O === A.target) return {
|
|
3564
3564
|
property: Ln("target", "Navigate to", "navigationItemTarget", S.target),
|
|
3565
3565
|
plan: (w) => g("Link", k(Kt(d, y.id, { target: Zm(w) ? w : void 0 })), { itemId: y.id })
|
|
3566
3566
|
};
|
|
3567
|
-
if (
|
|
3567
|
+
if (O === A.slot) return {
|
|
3568
3568
|
property: Ln("slot", "Render into slot", "renderingSlot", S.slot ?? "content"),
|
|
3569
3569
|
plan: (w) => g("Change", k(Kt(d, y.id, { slot: typeof w == "string" && w !== "content" ? w : void 0 })), { itemId: y.id })
|
|
3570
3570
|
};
|
|
3571
|
-
if (
|
|
3571
|
+
if (O === "icon") return {
|
|
3572
3572
|
property: Ln("icon", "Icon", "icon", S.icon),
|
|
3573
3573
|
plan: (w) => g("Change", k(Kt(d, y.id, { icon: typeof w == "string" && w !== "" ? w : void 0 })), { itemId: y.id })
|
|
3574
3574
|
};
|
|
@@ -3627,7 +3627,7 @@ function Xm({ componentId: e, property: t, newId: n, startingLabel: o, startingD
|
|
|
3627
3627
|
kind: gn.Collection,
|
|
3628
3628
|
items: d,
|
|
3629
3629
|
add: (h) => {
|
|
3630
|
-
if (h !==
|
|
3630
|
+
if (h !== A.addItem) return { rejected: h };
|
|
3631
3631
|
const f = m(ke.Add);
|
|
3632
3632
|
if (f) return f;
|
|
3633
3633
|
const v = t.descriptor.item?.properties.some((k) => k.path === "destination" && k.constraints?.required === !0) === !0;
|
|
@@ -3653,11 +3653,11 @@ function Xm({ componentId: e, property: t, newId: n, startingLabel: o, startingD
|
|
|
3653
3653
|
},
|
|
3654
3654
|
act: (h, f) => {
|
|
3655
3655
|
switch (h) {
|
|
3656
|
-
case
|
|
3657
|
-
case
|
|
3656
|
+
case A.moveEarlier:
|
|
3657
|
+
case A.moveLater: {
|
|
3658
3658
|
const v = m(ke.Reorder);
|
|
3659
3659
|
if (v) return v;
|
|
3660
|
-
const g = f.index + (h ===
|
|
3660
|
+
const g = f.index + (h === A.moveEarlier ? -1 : 1);
|
|
3661
3661
|
return g < 0 || g >= l.length ? { rejected: "noWhere" } : {
|
|
3662
3662
|
label: "Move",
|
|
3663
3663
|
edits: [{
|
|
@@ -3669,10 +3669,10 @@ function Xm({ componentId: e, property: t, newId: n, startingLabel: o, startingD
|
|
|
3669
3669
|
select: { itemId: f.id }
|
|
3670
3670
|
};
|
|
3671
3671
|
}
|
|
3672
|
-
case
|
|
3672
|
+
case A.duplicate: {
|
|
3673
3673
|
const v = m(ke.Add);
|
|
3674
3674
|
if (v) return v;
|
|
3675
|
-
const g = n(), k = s.find((
|
|
3675
|
+
const g = n(), k = s.find((x) => x.id === f.id);
|
|
3676
3676
|
return {
|
|
3677
3677
|
label: "Duplicate",
|
|
3678
3678
|
edits: [{
|
|
@@ -3687,7 +3687,7 @@ function Xm({ componentId: e, property: t, newId: n, startingLabel: o, startingD
|
|
|
3687
3687
|
select: { itemId: g }
|
|
3688
3688
|
};
|
|
3689
3689
|
}
|
|
3690
|
-
case
|
|
3690
|
+
case A.delete: {
|
|
3691
3691
|
const v = m(ke.Remove);
|
|
3692
3692
|
if (v) return v;
|
|
3693
3693
|
const g = l[f.index + 1] ?? l[f.index - 1];
|
|
@@ -3765,11 +3765,11 @@ function so(e, t, n) {
|
|
|
3765
3765
|
value: o
|
|
3766
3766
|
} : o === void 0 ? {
|
|
3767
3767
|
kind: Z.ResetProperty,
|
|
3768
|
-
nodeId:
|
|
3768
|
+
nodeId: ae(e),
|
|
3769
3769
|
path: t.descriptor.path
|
|
3770
3770
|
} : {
|
|
3771
3771
|
kind: Z.SetProperty,
|
|
3772
|
-
nodeId:
|
|
3772
|
+
nodeId: ae(e),
|
|
3773
3773
|
path: t.descriptor.path,
|
|
3774
3774
|
value: o
|
|
3775
3775
|
};
|
|
@@ -3784,12 +3784,12 @@ function $a(e, t, n) {
|
|
|
3784
3784
|
function th(e, t) {
|
|
3785
3785
|
return [{
|
|
3786
3786
|
kind: Z.SetProperty,
|
|
3787
|
-
nodeId:
|
|
3787
|
+
nodeId: ae(e),
|
|
3788
3788
|
path: "slice",
|
|
3789
3789
|
value: t
|
|
3790
3790
|
}, {
|
|
3791
3791
|
kind: Z.ResetProperty,
|
|
3792
|
-
nodeId:
|
|
3792
|
+
nodeId: ae(e),
|
|
3793
3793
|
path: "target"
|
|
3794
3794
|
}];
|
|
3795
3795
|
}
|
|
@@ -3807,7 +3807,7 @@ function lo(e, t) {
|
|
|
3807
3807
|
typeof n.id == "string" && n.properties !== null && typeof n.properties == "object" && (n.id = t());
|
|
3808
3808
|
for (const [o, i] of Object.entries(n)) o !== "properties" && lo(i, t);
|
|
3809
3809
|
}
|
|
3810
|
-
var co = (e) => typeof e == "string" ? e : "", vn = { [
|
|
3810
|
+
var co = (e) => typeof e == "string" ? e : "", vn = { [A.addButton]: {
|
|
3811
3811
|
slot: "items",
|
|
3812
3812
|
componentName: "core:toolbarItem",
|
|
3813
3813
|
labelProperty: "label",
|
|
@@ -3818,7 +3818,7 @@ function oh({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i
|
|
|
3818
3818
|
const l = vn[t];
|
|
3819
3819
|
if (!l) return;
|
|
3820
3820
|
const c = e.slots?.[l.slot] ?? [], u = c.map((m, h) => {
|
|
3821
|
-
const f = m.id, v = m.properties ?? {}, g = n(f) !==
|
|
3821
|
+
const f = m.id, v = m.properties ?? {}, g = n(f) !== oe.Local, k = s ? $a(s, f, v) : void 0;
|
|
3822
3822
|
return {
|
|
3823
3823
|
id: f,
|
|
3824
3824
|
label: co(v[l.labelProperty]),
|
|
@@ -3832,7 +3832,7 @@ function oh({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i
|
|
|
3832
3832
|
} : v,
|
|
3833
3833
|
unlinked: k ? !1 : l.isUnlinked(f, v)
|
|
3834
3834
|
};
|
|
3835
|
-
}), d =
|
|
3835
|
+
}), d = ae(e.id), p = (m, h, f) => ({
|
|
3836
3836
|
label: f,
|
|
3837
3837
|
edits: [{
|
|
3838
3838
|
kind: Z.InsertNode,
|
|
@@ -3848,7 +3848,7 @@ function oh({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i
|
|
|
3848
3848
|
items: u,
|
|
3849
3849
|
add: (m) => {
|
|
3850
3850
|
if (m !== t) return { rejected: m };
|
|
3851
|
-
if (n(e.id) !==
|
|
3851
|
+
if (n(e.id) !== oe.Local) return { rejected: "inherited" };
|
|
3852
3852
|
const h = ue(i(), l.componentName, l.componentName, {
|
|
3853
3853
|
...l.startingProperties,
|
|
3854
3854
|
[l.labelProperty]: r
|
|
@@ -3861,14 +3861,14 @@ function oh({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i
|
|
|
3861
3861
|
act: (m, h) => {
|
|
3862
3862
|
const f = c[h.index];
|
|
3863
3863
|
switch (m) {
|
|
3864
|
-
case
|
|
3865
|
-
case
|
|
3866
|
-
const v = h.index + (m ===
|
|
3864
|
+
case A.moveEarlier:
|
|
3865
|
+
case A.moveLater: {
|
|
3866
|
+
const v = h.index + (m === A.moveEarlier ? -1 : 1);
|
|
3867
3867
|
return v < 0 || v >= c.length ? { rejected: "noWhere" } : {
|
|
3868
3868
|
label: "Move",
|
|
3869
3869
|
edits: [{
|
|
3870
3870
|
kind: Z.MoveNode,
|
|
3871
|
-
nodeId:
|
|
3871
|
+
nodeId: ae(h.id),
|
|
3872
3872
|
target: d,
|
|
3873
3873
|
slot: l.slot,
|
|
3874
3874
|
index: v
|
|
@@ -3876,15 +3876,15 @@ function oh({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i
|
|
|
3876
3876
|
select: { elementId: h.id }
|
|
3877
3877
|
};
|
|
3878
3878
|
}
|
|
3879
|
-
case
|
|
3879
|
+
case A.duplicate:
|
|
3880
3880
|
return p(nh(f, i), h.index + 1, "Duplicate");
|
|
3881
|
-
case
|
|
3881
|
+
case A.delete: {
|
|
3882
3882
|
const v = c[h.index + 1] ?? c[h.index - 1];
|
|
3883
3883
|
return {
|
|
3884
3884
|
label: "Remove",
|
|
3885
3885
|
edits: [{
|
|
3886
3886
|
kind: Z.RemoveNode,
|
|
3887
|
-
nodeId:
|
|
3887
|
+
nodeId: ae(h.id)
|
|
3888
3888
|
}],
|
|
3889
3889
|
select: { elementId: v ? v.id : e.id }
|
|
3890
3890
|
};
|
|
@@ -3902,7 +3902,7 @@ function oh({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i
|
|
|
3902
3902
|
} : { rejected: "rename" };
|
|
3903
3903
|
},
|
|
3904
3904
|
choice: (m, h) => {
|
|
3905
|
-
const f = m ===
|
|
3905
|
+
const f = m === A.slice ? "slice" : m === A.emphasis ? "emphasis" : void 0, v = f ? o(h.id)?.properties.find((g) => g.descriptor.path === f) : void 0;
|
|
3906
3906
|
if (v)
|
|
3907
3907
|
return {
|
|
3908
3908
|
property: v,
|
|
@@ -3968,18 +3968,18 @@ function Ji(e, t, n, o, i) {
|
|
|
3968
3968
|
};
|
|
3969
3969
|
}
|
|
3970
3970
|
function rh({ controller: e, environment: t, strings: n, startingLabels: o, startingDestination: i, otherSource: r }) {
|
|
3971
|
-
const [s, l] =
|
|
3972
|
-
|
|
3971
|
+
const [s, l] = M(0), [c, u] = M(""), [d, p] = M("");
|
|
3972
|
+
ie(() => {
|
|
3973
3973
|
if (d === "") return;
|
|
3974
3974
|
const C = setTimeout(() => p(""), 4e3);
|
|
3975
3975
|
return () => clearTimeout(C);
|
|
3976
3976
|
}, [d]);
|
|
3977
|
-
const { document: m, composition: h, context: f, selectedId: v, ownershipOf: g, selectedItemId: k, navigation:
|
|
3977
|
+
const { document: m, composition: h, context: f, selectedId: v, ownershipOf: g, selectedItemId: k, navigation: x, navigationModule: O, structure: y } = e, S = t.navigation?.slots ?? t.propertyEditors?.slots ?? ah, w = H((C) => {
|
|
3978
3978
|
const $ = bn(C.componentName);
|
|
3979
3979
|
return $ ? Yo({
|
|
3980
3980
|
region: $,
|
|
3981
|
-
module:
|
|
3982
|
-
navigation:
|
|
3981
|
+
module: O,
|
|
3982
|
+
navigation: x,
|
|
3983
3983
|
structure: y,
|
|
3984
3984
|
newId: yt,
|
|
3985
3985
|
slots: S,
|
|
@@ -3994,22 +3994,22 @@ function rh({ controller: e, environment: t, strings: n, startingLabels: o, star
|
|
|
3994
3994
|
}
|
|
3995
3995
|
}) : r?.(C, k);
|
|
3996
3996
|
}, [
|
|
3997
|
-
P,
|
|
3998
3997
|
O,
|
|
3998
|
+
x,
|
|
3999
3999
|
y,
|
|
4000
4000
|
S,
|
|
4001
4001
|
o,
|
|
4002
4002
|
n,
|
|
4003
4003
|
r,
|
|
4004
4004
|
k
|
|
4005
|
-
]), T =
|
|
4005
|
+
]), T = j(() => ih({
|
|
4006
4006
|
roots: h.roots,
|
|
4007
4007
|
catalog: f.catalog,
|
|
4008
4008
|
selectedId: v,
|
|
4009
4009
|
selectedItemId: k,
|
|
4010
4010
|
ownershipOf: g,
|
|
4011
4011
|
newId: yt,
|
|
4012
|
-
inspect: (C) => Po(m,
|
|
4012
|
+
inspect: (C) => Po(m, ae(C), f),
|
|
4013
4013
|
startingLabels: o,
|
|
4014
4014
|
structure: y,
|
|
4015
4015
|
...i ? { startingDestination: i } : {},
|
|
@@ -4025,16 +4025,16 @@ function rh({ controller: e, environment: t, strings: n, startingLabels: o, star
|
|
|
4025
4025
|
i,
|
|
4026
4026
|
y,
|
|
4027
4027
|
w
|
|
4028
|
-
]), E = e.selectItem, I =
|
|
4028
|
+
]), E = e.selectItem, I = H((C, $) => {
|
|
4029
4029
|
if (qo(C))
|
|
4030
4030
|
return u(n.announce.refused(C.rejected)), !1;
|
|
4031
4031
|
if (C.editAtApplication)
|
|
4032
4032
|
return e.setNavigationModule(void 0), e.selectItem(void 0, void 0), !0;
|
|
4033
|
-
const
|
|
4034
|
-
if (!
|
|
4035
|
-
return u(n.announce.refused("rejected" in
|
|
4036
|
-
const { select:
|
|
4037
|
-
return
|
|
4033
|
+
const U = C.navigationEdits ? e.applyNavigationEdits(C.navigationEdits, C.label) : e.applyAll(C.edits, C.label);
|
|
4034
|
+
if (!U.applied)
|
|
4035
|
+
return u(n.announce.refused("rejected" in U && U.rejected || "diagnostics" in U && U.diagnostics[0]?.message || C.label)), !1;
|
|
4036
|
+
const { select: D } = C;
|
|
4037
|
+
return D?.elementId !== void 0 && e.select(D.elementId), D?.itemId !== void 0 && e.selectItem(D.itemId === null ? void 0 : T?.componentId ?? v, D.itemId === null ? void 0 : D.itemId), C.notice && (u(C.notice), p(C.notice)), C.renameNext && l((F) => F + 1), $ && !C.notice && u($(C)), !0;
|
|
4038
4038
|
}, [
|
|
4039
4039
|
e,
|
|
4040
4040
|
n,
|
|
@@ -4048,7 +4048,7 @@ function rh({ controller: e, environment: t, strings: n, startingLabels: o, star
|
|
|
4048
4048
|
notice: d,
|
|
4049
4049
|
pointItem: E,
|
|
4050
4050
|
perform: I,
|
|
4051
|
-
add:
|
|
4051
|
+
add: H((C) => {
|
|
4052
4052
|
if (!T) return !1;
|
|
4053
4053
|
const $ = T.source.kind === gn.Elements ? o.button : o.item;
|
|
4054
4054
|
return I(T.source.add(C), () => n.announce.added($));
|
|
@@ -4058,19 +4058,19 @@ function rh({ controller: e, environment: t, strings: n, startingLabels: o, star
|
|
|
4058
4058
|
n,
|
|
4059
4059
|
o
|
|
4060
4060
|
]),
|
|
4061
|
-
act:
|
|
4061
|
+
act: H((C, $) => {
|
|
4062
4062
|
if (!T) return !1;
|
|
4063
|
-
const
|
|
4063
|
+
const U = $.label;
|
|
4064
4064
|
return I(T.source.act(C, $), () => {
|
|
4065
4065
|
switch (C) {
|
|
4066
|
-
case
|
|
4067
|
-
return n.announce.moved(
|
|
4068
|
-
case
|
|
4069
|
-
return n.announce.moved(
|
|
4070
|
-
case
|
|
4071
|
-
return n.announce.duplicated(
|
|
4072
|
-
case
|
|
4073
|
-
return n.announce.removed(
|
|
4066
|
+
case A.moveEarlier:
|
|
4067
|
+
return n.announce.moved(U, $.index, $.count);
|
|
4068
|
+
case A.moveLater:
|
|
4069
|
+
return n.announce.moved(U, $.index + 2, $.count);
|
|
4070
|
+
case A.duplicate:
|
|
4071
|
+
return n.announce.duplicated(U);
|
|
4072
|
+
case A.delete:
|
|
4073
|
+
return n.announce.removed(U);
|
|
4074
4074
|
default:
|
|
4075
4075
|
return "";
|
|
4076
4076
|
}
|
|
@@ -4080,8 +4080,8 @@ function rh({ controller: e, environment: t, strings: n, startingLabels: o, star
|
|
|
4080
4080
|
I,
|
|
4081
4081
|
n
|
|
4082
4082
|
]),
|
|
4083
|
-
rename:
|
|
4084
|
-
deselect:
|
|
4083
|
+
rename: H((C, $) => T ? I(T.source.rename(C, $)) : !1, [T, I]),
|
|
4084
|
+
deselect: H(() => {
|
|
4085
4085
|
k !== void 0 ? e.selectItem(void 0, void 0) : e.select(void 0);
|
|
4086
4086
|
}, [k, e])
|
|
4087
4087
|
};
|
|
@@ -4112,7 +4112,7 @@ var Ea = (e) => ({
|
|
|
4112
4112
|
editable: r,
|
|
4113
4113
|
...s ? { reason: s } : {}
|
|
4114
4114
|
}), uo = ({ controller: e, environment: t, strings: n, region: o, itemId: i }) => {
|
|
4115
|
-
const r = (n.designMode ?? fn).navigation, { selection: s, navigation: l, structure: c, navigationModule: u } = e, d = o ? i : e.selectedItemId, p = o ?? (s && "componentName" in s ? bn(String(s.componentName)) : void 0), [m, h] =
|
|
4115
|
+
const r = (n.designMode ?? fn).navigation, { selection: s, navigation: l, structure: c, navigationModule: u } = e, d = o ? i : e.selectedItemId, p = o ?? (s && "componentName" in s ? bn(String(s.componentName)) : void 0), [m, h] = M(!1), f = j(() => jo(t.availableSources), [t.availableSources]);
|
|
4116
4116
|
if (!p) return null;
|
|
4117
4117
|
const v = t.navigation?.slots ?? t.propertyEditors?.slots ?? ["content"], g = Yo({
|
|
4118
4118
|
region: p,
|
|
@@ -4130,7 +4130,7 @@ var Ea = (e) => ({
|
|
|
4130
4130
|
application: r.application,
|
|
4131
4131
|
mainArea: "Main area"
|
|
4132
4132
|
}
|
|
4133
|
-
}), k = c.modules.find((N) => N.id === u)?.name ?? u,
|
|
4133
|
+
}), k = c.modules.find((N) => N.id === u)?.name ?? u, x = k ?? r.application, O = r.regionName[p], y = d ? g.items.find((N) => N.id === d) : void 0, S = t.propertyEditors?.registry ?? hn, w = Ko({
|
|
4134
4134
|
controller: e,
|
|
4135
4135
|
environment: t,
|
|
4136
4136
|
strings: n,
|
|
@@ -4139,8 +4139,8 @@ var Ea = (e) => ({
|
|
|
4139
4139
|
inCanvas: !1,
|
|
4140
4140
|
bindingScope: f,
|
|
4141
4141
|
slotNames: Ea(r)
|
|
4142
|
-
}), T = g.region?.mode, E = (N,
|
|
4143
|
-
const Q = jr(l, u, p, N, { copy:
|
|
4142
|
+
}), T = g.region?.mode, E = (N, z = !1) => {
|
|
4143
|
+
const Q = jr(l, u, p, N, { copy: z });
|
|
4144
4144
|
Q.rejected || Q.edits.length === 0 || e.applyNavigationEdits(Q.edits, "Region mode");
|
|
4145
4145
|
}, I = (N) => {
|
|
4146
4146
|
if (N !== T) {
|
|
@@ -4152,55 +4152,55 @@ var Ea = (e) => ({
|
|
|
4152
4152
|
}
|
|
4153
4153
|
}, C = y ? !y.readOnly : !1, $ = (N) => {
|
|
4154
4154
|
!N || "rejected" in N || N.navigationEdits && e.applyNavigationEdits(N.navigationEdits, N.label);
|
|
4155
|
-
},
|
|
4155
|
+
}, U = (N, z) => {
|
|
4156
4156
|
if (y)
|
|
4157
4157
|
switch (N.descriptor.path) {
|
|
4158
4158
|
case "label":
|
|
4159
|
-
typeof
|
|
4159
|
+
typeof z == "string" && z !== "" && $(g.rename(y, z));
|
|
4160
4160
|
break;
|
|
4161
4161
|
case "target":
|
|
4162
|
-
$(g.choice("target", y)?.plan(
|
|
4162
|
+
$(g.choice("target", y)?.plan(z));
|
|
4163
4163
|
break;
|
|
4164
4164
|
case "slot":
|
|
4165
|
-
$(g.choice("slot", y)?.plan(
|
|
4165
|
+
$(g.choice("slot", y)?.plan(z));
|
|
4166
4166
|
break;
|
|
4167
4167
|
case "icon":
|
|
4168
|
-
$(g.choice("icon", y)?.plan(
|
|
4168
|
+
$(g.choice("icon", y)?.plan(z));
|
|
4169
4169
|
}
|
|
4170
|
-
},
|
|
4170
|
+
}, D = (() => {
|
|
4171
4171
|
if (!y) return [];
|
|
4172
4172
|
const N = [];
|
|
4173
|
-
for (let
|
|
4174
|
-
N.unshift(
|
|
4175
|
-
const Q =
|
|
4173
|
+
for (let z = y; ; ) {
|
|
4174
|
+
N.unshift(z.label);
|
|
4175
|
+
const Q = z.parentId ? g.items.find((pe) => pe.id === z.parentId) : void 0;
|
|
4176
4176
|
if (!Q) break;
|
|
4177
|
-
|
|
4177
|
+
z = Q;
|
|
4178
4178
|
}
|
|
4179
|
-
return [y.readOnly ? r.application :
|
|
4180
|
-
})(),
|
|
4181
|
-
const
|
|
4182
|
-
image:
|
|
4183
|
-
title:
|
|
4179
|
+
return [y.readOnly ? r.application : x, ...N];
|
|
4180
|
+
})(), F = l.application.logo, L = (N) => {
|
|
4181
|
+
const z = Pl(l, u, {
|
|
4182
|
+
image: F?.image ?? "",
|
|
4183
|
+
title: F?.title ?? "",
|
|
4184
4184
|
...N
|
|
4185
4185
|
});
|
|
4186
|
-
|
|
4186
|
+
z.rejected || e.applyNavigationEdits(z.edits, "Logo");
|
|
4187
4187
|
};
|
|
4188
4188
|
return /* @__PURE__ */ a("section", {
|
|
4189
4189
|
className: "studio-editor-properties__navigation",
|
|
4190
4190
|
"data-region": p,
|
|
4191
4191
|
"data-scope": u ?? "application",
|
|
4192
|
-
children: y ? /* @__PURE__ */ b(
|
|
4192
|
+
children: y ? /* @__PURE__ */ b(re, { children: [
|
|
4193
4193
|
/* @__PURE__ */ b("header", {
|
|
4194
4194
|
className: "studio-editor-properties__header",
|
|
4195
4195
|
children: [
|
|
4196
4196
|
/* @__PURE__ */ a("strong", { children: r.navigationItem }),
|
|
4197
4197
|
/* @__PURE__ */ a("span", {
|
|
4198
4198
|
className: `studio-editor-chip${y.readOnly ? " studio-editor-chip--inherited" : ""}`,
|
|
4199
|
-
children: y.readOnly ? r.inheritedReadOnly : r.definedIn(
|
|
4199
|
+
children: y.readOnly ? r.inheritedReadOnly : r.definedIn(x)
|
|
4200
4200
|
}),
|
|
4201
4201
|
/* @__PURE__ */ a("span", {
|
|
4202
4202
|
className: "studio-editor-chip",
|
|
4203
|
-
children:
|
|
4203
|
+
children: O
|
|
4204
4204
|
})
|
|
4205
4205
|
]
|
|
4206
4206
|
}),
|
|
@@ -4211,11 +4211,11 @@ var Ea = (e) => ({
|
|
|
4211
4211
|
}),
|
|
4212
4212
|
/* @__PURE__ */ b("p", {
|
|
4213
4213
|
className: "studio-editor-properties__hint",
|
|
4214
|
-
"data-navigation-hierarchy":
|
|
4214
|
+
"data-navigation-hierarchy": D.join(" › "),
|
|
4215
4215
|
children: [
|
|
4216
4216
|
/* @__PURE__ */ a("strong", { children: r.hierarchy }),
|
|
4217
4217
|
" ",
|
|
4218
|
-
|
|
4218
|
+
D.join(" › ")
|
|
4219
4219
|
]
|
|
4220
4220
|
}),
|
|
4221
4221
|
y.problems?.map((N) => /* @__PURE__ */ a("p", {
|
|
@@ -4233,27 +4233,27 @@ var Ea = (e) => ({
|
|
|
4233
4233
|
property: N,
|
|
4234
4234
|
context: w,
|
|
4235
4235
|
componentId: y.id,
|
|
4236
|
-
onChange:
|
|
4236
|
+
onChange: U,
|
|
4237
4237
|
diagnostics: []
|
|
4238
4238
|
}, `${y.id}-${N.descriptor.path}`))
|
|
4239
|
-
] }) : /* @__PURE__ */ b(
|
|
4239
|
+
] }) : /* @__PURE__ */ b(re, { children: [
|
|
4240
4240
|
/* @__PURE__ */ a("header", {
|
|
4241
4241
|
className: "studio-editor-properties__header",
|
|
4242
|
-
children: /* @__PURE__ */ a("strong", { children: r.modeTitle(
|
|
4242
|
+
children: /* @__PURE__ */ a("strong", { children: r.modeTitle(O, x) })
|
|
4243
4243
|
}),
|
|
4244
4244
|
/* @__PURE__ */ a("p", {
|
|
4245
4245
|
className: "studio-editor-properties__hint",
|
|
4246
4246
|
children: g.regionTag?.long
|
|
4247
4247
|
}),
|
|
4248
|
-
u !== void 0 && /* @__PURE__ */ b(
|
|
4248
|
+
u !== void 0 && /* @__PURE__ */ b(re, { children: [
|
|
4249
4249
|
/* @__PURE__ */ a("p", {
|
|
4250
4250
|
className: "studio-editor-properties__hint",
|
|
4251
|
-
children: r.modeDescription(
|
|
4251
|
+
children: r.modeDescription(O)
|
|
4252
4252
|
}),
|
|
4253
4253
|
/* @__PURE__ */ a("div", {
|
|
4254
4254
|
className: "studio-editor-mode-cards",
|
|
4255
4255
|
role: "radiogroup",
|
|
4256
|
-
"aria-label": r.modeTitle(
|
|
4256
|
+
"aria-label": r.modeTitle(O, x),
|
|
4257
4257
|
children: sh.map((N) => /* @__PURE__ */ b("button", {
|
|
4258
4258
|
type: "button",
|
|
4259
4259
|
role: "radio",
|
|
@@ -4297,15 +4297,15 @@ var Ea = (e) => ({
|
|
|
4297
4297
|
/* @__PURE__ */ a("legend", { children: r.logo }),
|
|
4298
4298
|
/* @__PURE__ */ b("label", { children: [r.logoTitle, /* @__PURE__ */ a("input", {
|
|
4299
4299
|
type: "text",
|
|
4300
|
-
value:
|
|
4300
|
+
value: F?.title ?? "",
|
|
4301
4301
|
disabled: u !== void 0,
|
|
4302
|
-
onChange: (N) =>
|
|
4302
|
+
onChange: (N) => L({ title: N.target.value })
|
|
4303
4303
|
})] }),
|
|
4304
4304
|
/* @__PURE__ */ b("label", { children: [r.logoImage, /* @__PURE__ */ a("input", {
|
|
4305
4305
|
type: "text",
|
|
4306
|
-
value:
|
|
4306
|
+
value: F?.image ?? "",
|
|
4307
4307
|
disabled: u !== void 0,
|
|
4308
|
-
onChange: (N) =>
|
|
4308
|
+
onChange: (N) => L({ image: N.target.value })
|
|
4309
4309
|
})] }),
|
|
4310
4310
|
u !== void 0 && /* @__PURE__ */ a("p", {
|
|
4311
4311
|
className: "studio-editor-properties__hint",
|
|
@@ -4331,7 +4331,7 @@ var Ea = (e) => ({
|
|
|
4331
4331
|
inherited: "inherited",
|
|
4332
4332
|
notLinked: "not linked"
|
|
4333
4333
|
}, ch = [gt.Topbar, gt.Sidebar], dh = ({ controller: e, environment: t, strings: n }) => {
|
|
4334
|
-
const o = lh, i = (n.designMode ?? fn).navigation, [r, s] =
|
|
4334
|
+
const o = lh, i = (n.designMode ?? fn).navigation, [r, s] = M(gt.Topbar), [l, c] = M(), { navigation: u, structure: d, navigationModule: p } = e;
|
|
4335
4335
|
if (!t.navigation) return null;
|
|
4336
4336
|
const m = t.navigation.slots ?? t.propertyEditors?.slots ?? ["content"], h = Yo({
|
|
4337
4337
|
region: r,
|
|
@@ -4351,9 +4351,9 @@ var Ea = (e) => ({
|
|
|
4351
4351
|
}
|
|
4352
4352
|
}), f = h.items.find((y) => y.id === l), v = f !== void 0 && !f.readOnly, g = (y) => {
|
|
4353
4353
|
qo(y) || !y.navigationEdits || e.applyNavigationEdits(y.navigationEdits, y.label).applied && y.select?.itemId !== void 0 && c(y.select.itemId === null ? void 0 : y.select.itemId);
|
|
4354
|
-
}, k = (y, S) => g(h.act(y, S)),
|
|
4354
|
+
}, k = (y, S) => g(h.act(y, S)), x = (y) => {
|
|
4355
4355
|
c(void 0), e.setNavigationModule(y === "" ? void 0 : y);
|
|
4356
|
-
},
|
|
4356
|
+
}, O = (y) => {
|
|
4357
4357
|
c(void 0), s(y);
|
|
4358
4358
|
};
|
|
4359
4359
|
return /* @__PURE__ */ b("section", {
|
|
@@ -4375,7 +4375,7 @@ var Ea = (e) => ({
|
|
|
4375
4375
|
children: [o.level, /* @__PURE__ */ b("select", {
|
|
4376
4376
|
"data-shell-level": !0,
|
|
4377
4377
|
value: p ?? "",
|
|
4378
|
-
onChange: (y) =>
|
|
4378
|
+
onChange: (y) => x(y.target.value),
|
|
4379
4379
|
children: [/* @__PURE__ */ a("option", {
|
|
4380
4380
|
value: "",
|
|
4381
4381
|
children: i.application
|
|
@@ -4394,7 +4394,7 @@ var Ea = (e) => ({
|
|
|
4394
4394
|
role: "tab",
|
|
4395
4395
|
"aria-selected": y === r,
|
|
4396
4396
|
"data-shell-region": y,
|
|
4397
|
-
onClick: () =>
|
|
4397
|
+
onClick: () => O(y),
|
|
4398
4398
|
children: i.regionName[y]
|
|
4399
4399
|
}, y))
|
|
4400
4400
|
}),
|
|
@@ -4438,39 +4438,39 @@ var Ea = (e) => ({
|
|
|
4438
4438
|
/* @__PURE__ */ a("button", {
|
|
4439
4439
|
type: "button",
|
|
4440
4440
|
"data-shell-action": "addItem",
|
|
4441
|
-
onClick: () => g(h.add(
|
|
4441
|
+
onClick: () => g(h.add(A.addItem)),
|
|
4442
4442
|
children: o.add
|
|
4443
4443
|
}),
|
|
4444
4444
|
f && v && f.parentId === void 0 && r === gt.Sidebar && /* @__PURE__ */ a("button", {
|
|
4445
4445
|
type: "button",
|
|
4446
4446
|
"data-shell-action": "addSubItem",
|
|
4447
|
-
onClick: () => k(
|
|
4447
|
+
onClick: () => k(A.addSubItem, f),
|
|
4448
4448
|
children: o.addSub
|
|
4449
4449
|
}),
|
|
4450
4450
|
f && v && /* @__PURE__ */ a("button", {
|
|
4451
4451
|
type: "button",
|
|
4452
4452
|
"data-shell-action": "moveEarlier",
|
|
4453
4453
|
disabled: f.index <= 0,
|
|
4454
|
-
onClick: () => k(
|
|
4454
|
+
onClick: () => k(A.moveEarlier, f),
|
|
4455
4455
|
children: o.earlier
|
|
4456
4456
|
}),
|
|
4457
4457
|
f && v && /* @__PURE__ */ a("button", {
|
|
4458
4458
|
type: "button",
|
|
4459
4459
|
"data-shell-action": "moveLater",
|
|
4460
4460
|
disabled: f.index >= f.count - 1,
|
|
4461
|
-
onClick: () => k(
|
|
4461
|
+
onClick: () => k(A.moveLater, f),
|
|
4462
4462
|
children: o.later
|
|
4463
4463
|
}),
|
|
4464
4464
|
f && v && /* @__PURE__ */ a("button", {
|
|
4465
4465
|
type: "button",
|
|
4466
4466
|
"data-shell-action": "duplicate",
|
|
4467
|
-
onClick: () => k(
|
|
4467
|
+
onClick: () => k(A.duplicate, f),
|
|
4468
4468
|
children: o.duplicate
|
|
4469
4469
|
}),
|
|
4470
4470
|
f && v && /* @__PURE__ */ a("button", {
|
|
4471
4471
|
type: "button",
|
|
4472
4472
|
"data-shell-action": "delete",
|
|
4473
|
-
onClick: () => k(
|
|
4473
|
+
onClick: () => k(A.delete, f),
|
|
4474
4474
|
children: o.remove
|
|
4475
4475
|
})
|
|
4476
4476
|
]
|
|
@@ -4500,7 +4500,7 @@ function Qi(e, t) {
|
|
|
4500
4500
|
}));
|
|
4501
4501
|
}
|
|
4502
4502
|
var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e) => /(^|:)toolbar$/.test(String(e.componentName ?? "")), hh = ({ controller: e, strings: t, element: n }) => {
|
|
4503
|
-
const o = (t.designMode ?? fn).toolbar, { structure: i } = e, r = ph(n), s = mh(n), l = n.properties ?? {}, c =
|
|
4503
|
+
const o = (t.designMode ?? fn).toolbar, { structure: i } = e, r = ph(n), s = mh(n), l = n.properties ?? {}, c = j(() => {
|
|
4504
4504
|
if (!r || i.modules.length === 0) return;
|
|
4505
4505
|
const f = Do(n.id, l);
|
|
4506
4506
|
if (!f) return;
|
|
@@ -4514,16 +4514,16 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
|
|
|
4514
4514
|
i,
|
|
4515
4515
|
n,
|
|
4516
4516
|
l
|
|
4517
|
-
]), u =
|
|
4517
|
+
]), u = j(() => i.modules.length === 0 ? [] : r ? [] : s ? Qi(i, n) : [], [
|
|
4518
4518
|
r,
|
|
4519
4519
|
s,
|
|
4520
4520
|
i,
|
|
4521
4521
|
n
|
|
4522
|
-
]), d =
|
|
4522
|
+
]), d = j(() => !r || i.modules.length === 0 ? [] : Qi(i, { slots: { items: [n] } }), [
|
|
4523
4523
|
r,
|
|
4524
4524
|
i,
|
|
4525
4525
|
n
|
|
4526
|
-
]), p =
|
|
4526
|
+
]), p = j(() => r ? $a(i, n.id, l) : void 0, [
|
|
4527
4527
|
r,
|
|
4528
4528
|
i,
|
|
4529
4529
|
n,
|
|
@@ -4534,7 +4534,7 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
|
|
|
4534
4534
|
return /* @__PURE__ */ b("section", {
|
|
4535
4535
|
className: "studio-editor-properties__toolbar-button",
|
|
4536
4536
|
"data-section": "toolbarButton",
|
|
4537
|
-
children: [r && c && /* @__PURE__ */ b(
|
|
4537
|
+
children: [r && c && /* @__PURE__ */ b(re, { children: [
|
|
4538
4538
|
/* @__PURE__ */ a("strong", {
|
|
4539
4539
|
className: "studio-editor-properties__button-title",
|
|
4540
4540
|
children: o.toolbarButton
|
|
@@ -4574,7 +4574,7 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
|
|
|
4574
4574
|
})]
|
|
4575
4575
|
});
|
|
4576
4576
|
}, fh = (e, t) => e.find((n) => n.component === t), gh = /* @__PURE__ */ new Set([Go]), vh = ({ controller: e, environment: t, strings: n, ownership: o, authoringTemplate: i }) => {
|
|
4577
|
-
const { inspection: r, selectedId: s, selection: l } = e, c = n.properties, u =
|
|
4577
|
+
const { inspection: r, selectedId: s, selection: l } = e, c = n.properties, u = j(() => jo(t.availableSources), [t.availableSources]), d = j(() => Pr(e.document, e.composition.roots, e.context, t.availableSources, t.queryCandidates), [
|
|
4578
4578
|
e.document,
|
|
4579
4579
|
e.composition.roots,
|
|
4580
4580
|
e.context,
|
|
@@ -4634,16 +4634,16 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
|
|
|
4634
4634
|
strings: n
|
|
4635
4635
|
})
|
|
4636
4636
|
});
|
|
4637
|
-
const p = _s(e.composition.roots, s), m = dp(r.properties, p, l.properties), { runtime: h } = t, f = fh(e.context.catalog.components, r.typeId), v = f ? h.packageDescriptorOf(f) : void 0, g = (
|
|
4637
|
+
const p = _s(e.composition.roots, s), m = dp(r.properties, p, l.properties), { runtime: h } = t, f = fh(e.context.catalog.components, r.typeId), v = f ? h.packageDescriptorOf(f) : void 0, g = (D) => !!v && h.designTime.propertyEditor(v, D.descriptor).contribution !== void 0, k = t.propertyEditors?.registry ?? hn, x = [...r.diagnostics, ...e.diagnostics], O = hp(m, r.typeId, (D) => gh.has(D.descriptor.path) || g(D)), y = fp(O), S = {
|
|
4638
4638
|
controller: e,
|
|
4639
4639
|
environment: t,
|
|
4640
4640
|
strings: n,
|
|
4641
4641
|
ownership: o,
|
|
4642
4642
|
...i ? { authoringTemplate: i } : {},
|
|
4643
|
-
diagnostics:
|
|
4643
|
+
diagnostics: x,
|
|
4644
4644
|
inCanvas: p,
|
|
4645
4645
|
bindingScope: u
|
|
4646
|
-
}, w = Ko(S), T = r.typeId.endsWith("action"), E = r.typeId.endsWith("toolbarButton"), I = Sa(r.typeId), C = e.document.screens.find((
|
|
4646
|
+
}, w = Ko(S), T = r.typeId.endsWith("action"), E = r.typeId.endsWith("toolbarButton"), I = Sa(r.typeId), C = e.document.screens.find((D) => D.name === "Screen")?.forms ?? [], $ = o !== void 0 && o !== "local", U = l.properties;
|
|
4647
4647
|
return /* @__PURE__ */ b("div", {
|
|
4648
4648
|
className: "studio-editor-properties",
|
|
4649
4649
|
children: [
|
|
@@ -4673,7 +4673,7 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
|
|
|
4673
4673
|
element: l
|
|
4674
4674
|
}),
|
|
4675
4675
|
/* @__PURE__ */ a(xr, {
|
|
4676
|
-
diagnostics: Ws(
|
|
4676
|
+
diagnostics: Ws(x),
|
|
4677
4677
|
label: c.diagnostics
|
|
4678
4678
|
}),
|
|
4679
4679
|
/* @__PURE__ */ a(bm, {
|
|
@@ -4689,7 +4689,7 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
|
|
|
4689
4689
|
disabled: o !== void 0 && o !== "local",
|
|
4690
4690
|
authoringTemplate: i
|
|
4691
4691
|
}),
|
|
4692
|
-
f && Ye(l) && /* @__PURE__ */ b(
|
|
4692
|
+
f && Ye(l) && /* @__PURE__ */ b(re, { children: [
|
|
4693
4693
|
/* @__PURE__ */ a(Ip, {
|
|
4694
4694
|
descriptor: f,
|
|
4695
4695
|
component: l,
|
|
@@ -4715,7 +4715,7 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
|
|
|
4715
4715
|
/* @__PURE__ */ a(Tp, {
|
|
4716
4716
|
component: l,
|
|
4717
4717
|
descriptor: f,
|
|
4718
|
-
properties: r.properties.filter((
|
|
4718
|
+
properties: r.properties.filter((D) => !wa(r.typeId, D.descriptor.path)),
|
|
4719
4719
|
controller: e,
|
|
4720
4720
|
environment: t,
|
|
4721
4721
|
strings: n,
|
|
@@ -4726,42 +4726,42 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
|
|
|
4726
4726
|
className: "studio-editor-properties-empty",
|
|
4727
4727
|
children: c.noProperties
|
|
4728
4728
|
}),
|
|
4729
|
-
y.map((
|
|
4729
|
+
y.map((D) => /* @__PURE__ */ b("section", {
|
|
4730
4730
|
className: "studio-editor-properties__group",
|
|
4731
|
-
"aria-label":
|
|
4731
|
+
"aria-label": D.name,
|
|
4732
4732
|
children: [/* @__PURE__ */ a("h4", {
|
|
4733
4733
|
className: "studio-editor-properties__group-title",
|
|
4734
|
-
children:
|
|
4735
|
-
}),
|
|
4734
|
+
children: D.name
|
|
4735
|
+
}), D.properties.map((F) => /* @__PURE__ */ a(Wo, {
|
|
4736
4736
|
registry: k,
|
|
4737
|
-
property:
|
|
4738
|
-
context: Rm(w, S,
|
|
4737
|
+
property: F,
|
|
4738
|
+
context: Rm(w, S, F),
|
|
4739
4739
|
componentId: s,
|
|
4740
4740
|
onChange: e.setProperty,
|
|
4741
|
-
diagnostics:
|
|
4742
|
-
}, `${s}:${
|
|
4743
|
-
},
|
|
4741
|
+
diagnostics: x
|
|
4742
|
+
}, `${s}:${F.descriptor.path}`))]
|
|
4743
|
+
}, D.name)),
|
|
4744
4744
|
T && /* @__PURE__ */ a(yp, {
|
|
4745
|
-
action: xa(
|
|
4745
|
+
action: xa(U, t.stateChangeSlices.find((D) => D.id === U?.command)?.name ?? ""),
|
|
4746
4746
|
slices: t.stateChangeSlices,
|
|
4747
4747
|
sources: ka(Object.keys(t.availableSources), d.componentOutputs, s),
|
|
4748
4748
|
strings: n,
|
|
4749
4749
|
disabled: o !== void 0 && o !== "local",
|
|
4750
|
-
suggestSource: (
|
|
4751
|
-
onChange: (
|
|
4750
|
+
suggestSource: (D) => D === "id" || D.endsWith("Id") ? "row.id" : void 0,
|
|
4751
|
+
onChange: (D) => D && e.applyAll(Am(s, D), n.properties.action.label)
|
|
4752
4752
|
}),
|
|
4753
4753
|
I && /* @__PURE__ */ a(Yp, {
|
|
4754
4754
|
elementId: s,
|
|
4755
|
-
command: typeof
|
|
4755
|
+
command: typeof U?.command == "string" ? U.command : void 0,
|
|
4756
4756
|
slices: t.stateChangeSlices,
|
|
4757
4757
|
forms: C,
|
|
4758
4758
|
strings: n,
|
|
4759
4759
|
disabled: $,
|
|
4760
|
-
onCommandChange: (
|
|
4761
|
-
e.applyAll([xp(s,
|
|
4760
|
+
onCommandChange: (D) => {
|
|
4761
|
+
e.applyAll([xp(s, D)], n.properties.commandForm.label).applied && D && !C.some((F) => F.forCommand === D.name) && e.setScreenForms([...C, io(D)], n.properties.commandForm.createForm(D.name));
|
|
4762
4762
|
},
|
|
4763
|
-
onFormChange: (
|
|
4764
|
-
onFormCreate: (
|
|
4763
|
+
onFormChange: (D) => e.setScreenForms(C.map((F) => F.forCommand === D.forCommand ? D : F), n.properties.forms.label),
|
|
4764
|
+
onFormCreate: (D) => e.setScreenForms([...C, io(D)], n.properties.commandForm.createForm(D.name))
|
|
4765
4765
|
}),
|
|
4766
4766
|
E && /* @__PURE__ */ a(jm, {
|
|
4767
4767
|
behaviors: l.behaviors,
|
|
@@ -4770,7 +4770,7 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
|
|
|
4770
4770
|
slices: t.stateChangeSlices,
|
|
4771
4771
|
strings: n.properties.toolbarButton,
|
|
4772
4772
|
disabled: $,
|
|
4773
|
-
onChange: (
|
|
4773
|
+
onChange: (D) => e.setElementBehaviors(s, D, n.properties.toolbarButton.label)
|
|
4774
4774
|
}, s),
|
|
4775
4775
|
/* @__PURE__ */ a(Tm, {
|
|
4776
4776
|
inspection: r,
|
|
@@ -4782,7 +4782,7 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
|
|
|
4782
4782
|
]
|
|
4783
4783
|
});
|
|
4784
4784
|
}, Aa = ({ strings: e, controller: t, environment: n, authoringTemplate: o, structure: i, onClose: r }) => {
|
|
4785
|
-
const [s, l] =
|
|
4785
|
+
const [s, l] = M(Fn.Properties), c = t.selectedId ? t.ownershipOf(t.selectedId) : void 0;
|
|
4786
4786
|
return /* @__PURE__ */ b("section", {
|
|
4787
4787
|
className: "studio-editor-inspector",
|
|
4788
4788
|
"aria-label": e.inspectorTitle,
|
|
@@ -4827,40 +4827,40 @@ var ph = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), mh = (e)
|
|
|
4827
4827
|
return e.Panel = "Panel", e.StackPanel = "StackPanel", e.WrapPanel = "WrapPanel", e.Grid = "Grid", e.Canvas = "Canvas", e;
|
|
4828
4828
|
})({}), bh = [
|
|
4829
4829
|
{
|
|
4830
|
-
item:
|
|
4830
|
+
item: G.Stack,
|
|
4831
4831
|
type: "Stack",
|
|
4832
4832
|
panel: rt.StackPanel,
|
|
4833
4833
|
flowKind: Sn.Column,
|
|
4834
4834
|
arrangement: Y.Column
|
|
4835
4835
|
},
|
|
4836
4836
|
{
|
|
4837
|
-
item:
|
|
4837
|
+
item: G.Row,
|
|
4838
4838
|
type: "Row",
|
|
4839
4839
|
panel: rt.StackPanel,
|
|
4840
4840
|
flowKind: Sn.Row,
|
|
4841
4841
|
arrangement: Y.Row
|
|
4842
4842
|
},
|
|
4843
4843
|
{
|
|
4844
|
-
item:
|
|
4844
|
+
item: G.Grid,
|
|
4845
4845
|
type: "Grid",
|
|
4846
4846
|
panel: rt.Grid,
|
|
4847
4847
|
flowKind: Sn.Grid,
|
|
4848
4848
|
arrangement: Y.Grid
|
|
4849
4849
|
},
|
|
4850
4850
|
{
|
|
4851
|
-
item:
|
|
4851
|
+
item: G.Container,
|
|
4852
4852
|
type: "Container",
|
|
4853
4853
|
panel: rt.Panel,
|
|
4854
4854
|
arrangement: Y.Grouping
|
|
4855
4855
|
},
|
|
4856
4856
|
{
|
|
4857
|
-
item:
|
|
4857
|
+
item: G.Wrap,
|
|
4858
4858
|
type: "Wrap",
|
|
4859
4859
|
panel: rt.WrapPanel,
|
|
4860
4860
|
arrangement: Y.Wrap
|
|
4861
4861
|
},
|
|
4862
4862
|
{
|
|
4863
|
-
item:
|
|
4863
|
+
item: G.Canvas,
|
|
4864
4864
|
type: "Canvas",
|
|
4865
4865
|
panel: rt.Canvas,
|
|
4866
4866
|
arrangement: Y.Freeform
|
|
@@ -5041,7 +5041,7 @@ var Eh = (e) => e.dataTransfer.types.includes(Xo), Ah = {
|
|
|
5041
5041
|
viaKeyword: (e, t, n) => `...${e} matches "${t}" via keyword "${n}"`,
|
|
5042
5042
|
addLabel: (e) => `Add ${e}`
|
|
5043
5043
|
}, Fh = "★", Mh = ({ entries: e, memory: t, strings: n = Ah, onAdd: o, usageVersion: i = 0 }) => {
|
|
5044
|
-
const [r, s] =
|
|
5044
|
+
const [r, s] = M(""), [l, c] = M(() => t.readGroups()), u = J(null), d = J(null), p = Vs(), m = j(() => ({ ...t.readUsage() }), [t, i]), h = j(() => Th({
|
|
5045
5045
|
entries: e,
|
|
5046
5046
|
usage: m,
|
|
5047
5047
|
query: r,
|
|
@@ -5053,7 +5053,7 @@ var Eh = (e) => e.dataTransfer.types.includes(Xo), Ah = {
|
|
|
5053
5053
|
r,
|
|
5054
5054
|
l,
|
|
5055
5055
|
n.frequentlyUsed
|
|
5056
|
-
]), f = r.trim().length > 0, v =
|
|
5056
|
+
]), f = r.trim().length > 0, v = H((w) => {
|
|
5057
5057
|
f || c((T) => {
|
|
5058
5058
|
const E = {
|
|
5059
5059
|
...T,
|
|
@@ -5064,7 +5064,7 @@ var Eh = (e) => e.dataTransfer.types.includes(Xo), Ah = {
|
|
|
5064
5064
|
}, [f, t]), g = () => [...d.current?.querySelectorAll("[data-picker-focus]") ?? []], k = (w, T) => {
|
|
5065
5065
|
const E = g(), I = w ? E.indexOf(w) : -1;
|
|
5066
5066
|
E[Math.min(Math.max(I + T, 0), E.length - 1)]?.focus();
|
|
5067
|
-
},
|
|
5067
|
+
}, x = (w) => {
|
|
5068
5068
|
const T = w.target, E = T === u.current;
|
|
5069
5069
|
if (w.key === "/" && !E)
|
|
5070
5070
|
w.preventDefault(), u.current?.focus();
|
|
@@ -5076,7 +5076,7 @@ var Eh = (e) => e.dataTransfer.types.includes(Xo), Ah = {
|
|
|
5076
5076
|
if (E) return;
|
|
5077
5077
|
I.indexOf(T) <= 0 ? u.current?.focus() : k(T, -1);
|
|
5078
5078
|
} else w.key === "Escape" && E && r !== "" && (w.stopPropagation(), s(""));
|
|
5079
|
-
},
|
|
5079
|
+
}, O = (w, T) => {
|
|
5080
5080
|
Rh(T, w.payload, w.label), T.currentTarget.closest('[data-cratis-part="toolbar-folder-panel"]')?.setAttribute("data-dragging", "");
|
|
5081
5081
|
}, y = (w) => {
|
|
5082
5082
|
w.currentTarget.closest('[data-cratis-part="toolbar-folder-panel"]')?.removeAttribute("data-dragging");
|
|
@@ -5086,7 +5086,7 @@ var Eh = (e) => e.dataTransfer.types.includes(Xo), Ah = {
|
|
|
5086
5086
|
className: "studio-component-picker",
|
|
5087
5087
|
role: "region",
|
|
5088
5088
|
"aria-label": n.heading,
|
|
5089
|
-
onKeyDown:
|
|
5089
|
+
onKeyDown: x,
|
|
5090
5090
|
children: [
|
|
5091
5091
|
/* @__PURE__ */ a("input", {
|
|
5092
5092
|
ref: u,
|
|
@@ -5148,7 +5148,7 @@ var Eh = (e) => e.dataTransfer.types.includes(Xo), Ah = {
|
|
|
5148
5148
|
className: "studio-component-picker__row",
|
|
5149
5149
|
title: n.addLabel(T.label),
|
|
5150
5150
|
onClick: () => o(T),
|
|
5151
|
-
onDragStart: (I) =>
|
|
5151
|
+
onDragStart: (I) => O(T, I),
|
|
5152
5152
|
onDragEnd: y,
|
|
5153
5153
|
children: [
|
|
5154
5154
|
/* @__PURE__ */ a("span", {
|
|
@@ -5202,14 +5202,14 @@ var Eh = (e) => e.dataTransfer.types.includes(Xo), Ah = {
|
|
|
5202
5202
|
})
|
|
5203
5203
|
});
|
|
5204
5204
|
function ja({ strings: e, layoutLabels: t, icons: n, paletteSources: o, onAdd: i, memory: r }) {
|
|
5205
|
-
const s =
|
|
5205
|
+
const s = j(() => r ?? xh(), [r]), [l, c] = M(0), u = j(() => Ch(o, bh.map((p) => ({
|
|
5206
5206
|
item: p.item,
|
|
5207
5207
|
label: t[p.item]
|
|
5208
5208
|
})), e.packageTitles), [
|
|
5209
5209
|
o,
|
|
5210
5210
|
t,
|
|
5211
5211
|
e.packageTitles
|
|
5212
|
-
]), d =
|
|
5212
|
+
]), d = H((p) => {
|
|
5213
5213
|
s.recordAdded(p), c((m) => m + 1);
|
|
5214
5214
|
}, [s]);
|
|
5215
5215
|
return {
|
|
@@ -5246,17 +5246,17 @@ function Pe(e, t, n, o = [], i = {}) {
|
|
|
5246
5246
|
}
|
|
5247
5247
|
function Bh(e, t) {
|
|
5248
5248
|
switch (e) {
|
|
5249
|
-
case
|
|
5249
|
+
case G.Stack:
|
|
5250
5250
|
return {
|
|
5251
5251
|
orientation: ft.Vertical,
|
|
5252
5252
|
spacing: 8
|
|
5253
5253
|
};
|
|
5254
|
-
case
|
|
5254
|
+
case G.Row:
|
|
5255
5255
|
return {
|
|
5256
5256
|
orientation: ft.Horizontal,
|
|
5257
5257
|
spacing: 8
|
|
5258
5258
|
};
|
|
5259
|
-
case
|
|
5259
|
+
case G.Grid:
|
|
5260
5260
|
return {
|
|
5261
5261
|
rows: [],
|
|
5262
5262
|
columns: [{
|
|
@@ -5269,11 +5269,11 @@ function Bh(e, t) {
|
|
|
5269
5269
|
maximumWidth: Number.POSITIVE_INFINITY
|
|
5270
5270
|
}]
|
|
5271
5271
|
};
|
|
5272
|
-
case
|
|
5272
|
+
case G.Wrap:
|
|
5273
5273
|
return { orientation: ft.Horizontal };
|
|
5274
|
-
case
|
|
5274
|
+
case G.Canvas:
|
|
5275
5275
|
return { extent: t };
|
|
5276
|
-
case
|
|
5276
|
+
case G.Container:
|
|
5277
5277
|
return {};
|
|
5278
5278
|
}
|
|
5279
5279
|
}
|
|
@@ -5378,7 +5378,7 @@ function Kh(e, t, n, o) {
|
|
|
5378
5378
|
}
|
|
5379
5379
|
}
|
|
5380
5380
|
function Hh(e) {
|
|
5381
|
-
return e.authoringTemplate !== void 0 ? Hu(e.authoringTemplate, Pe(
|
|
5381
|
+
return e.authoringTemplate !== void 0 ? Hu(e.authoringTemplate, Pe(G.Stack, zu, "Template")) : Ku(Pe(G.Stack, Wu, "Screen"), e.screenTemplate);
|
|
5382
5382
|
}
|
|
5383
5383
|
var za = ({ placement: e, children: t }) => /* @__PURE__ */ a("div", {
|
|
5384
5384
|
className: "studio-screen-editor-palette-host",
|
|
@@ -5487,7 +5487,7 @@ var Xh = async (e) => {
|
|
|
5487
5487
|
}
|
|
5488
5488
|
}
|
|
5489
5489
|
}, ef = ({ error: e, context: t, componentStack: n, onRecover: o, onClose: i, layout: r = "fixed", strings: s = Wa }) => {
|
|
5490
|
-
const [l, c] =
|
|
5490
|
+
const [l, c] = M("none"), u = e instanceof Error ? e : new Error(String(e)), d = t.component ?? ti(n), p = j(() => Ka(e, t, n), [
|
|
5491
5491
|
e,
|
|
5492
5492
|
t,
|
|
5493
5493
|
n
|
|
@@ -5499,7 +5499,7 @@ var Xh = async (e) => {
|
|
|
5499
5499
|
...Object.entries(t.details ?? {}),
|
|
5500
5500
|
[s.error, ln(u.message || u.name)]
|
|
5501
5501
|
];
|
|
5502
|
-
|
|
5502
|
+
ie(() => {
|
|
5503
5503
|
if (!i) return;
|
|
5504
5504
|
const f = (v) => {
|
|
5505
5505
|
v.key === "Escape" && !v.defaultPrevented && i();
|
|
@@ -5625,7 +5625,7 @@ var Xh = async (e) => {
|
|
|
5625
5625
|
attempt: e.attempt + 1
|
|
5626
5626
|
}));
|
|
5627
5627
|
};
|
|
5628
|
-
}, nf = ({ children: e }) => /* @__PURE__ */ a(
|
|
5628
|
+
}, nf = ({ children: e }) => /* @__PURE__ */ a(re, { children: e }), Ha = ({ strings: e, subject: t, onClose: n, children: o }) => /* @__PURE__ */ a(tf, {
|
|
5629
5629
|
layout: "fixed",
|
|
5630
5630
|
onClose: n,
|
|
5631
5631
|
strings: {
|
|
@@ -5864,7 +5864,7 @@ function Qa(e, t, n) {
|
|
|
5864
5864
|
screenTemplates: t.screenTemplates,
|
|
5865
5865
|
dialogTemplates: t.dialogTemplates ?? [],
|
|
5866
5866
|
screens: [{
|
|
5867
|
-
name:
|
|
5867
|
+
name: le,
|
|
5868
5868
|
layout: e.profile.layout || _l.AppShell,
|
|
5869
5869
|
slotContent: { content: [n] },
|
|
5870
5870
|
forms: [],
|
|
@@ -5930,7 +5930,7 @@ function Pf(e = If()) {
|
|
|
5930
5930
|
var Of = () => {
|
|
5931
5931
|
};
|
|
5932
5932
|
function xf(e, t, n, o = Rf, i = !1) {
|
|
5933
|
-
const { layouts: r, screenTemplates: s, dialogTemplates: l } = e, c =
|
|
5933
|
+
const { layouts: r, screenTemplates: s, dialogTemplates: l } = e, c = j(() => ({
|
|
5934
5934
|
layouts: r,
|
|
5935
5935
|
screenTemplates: s,
|
|
5936
5936
|
dialogTemplates: l
|
|
@@ -5938,44 +5938,44 @@ function xf(e, t, n, o = Rf, i = !1) {
|
|
|
5938
5938
|
r,
|
|
5939
5939
|
s,
|
|
5940
5940
|
l
|
|
5941
|
-
]), u =
|
|
5942
|
-
|
|
5941
|
+
]), u = j(() => gf(t, c).name, [t, c]), d = wf(e, n, u), [p, m] = M(() => o.read(d)), [h, f] = M(() => o.readTemplate(d)), [v, g] = M();
|
|
5942
|
+
ie(() => {
|
|
5943
5943
|
m(o.read(d)), f(o.readTemplate(d)), g(void 0);
|
|
5944
5944
|
}, [o, d]);
|
|
5945
|
-
const k = Cf(d),
|
|
5946
|
-
|
|
5945
|
+
const k = Cf(d), x = k && (p ?? kf(d)), O = j(() => x ? vf(t, c) : void 0, [
|
|
5946
|
+
x,
|
|
5947
5947
|
t,
|
|
5948
5948
|
c
|
|
5949
|
-
]), y =
|
|
5950
|
-
const C = !
|
|
5949
|
+
]), y = H(() => {
|
|
5950
|
+
const C = !x;
|
|
5951
5951
|
m(C), g(void 0), o.write(d, C);
|
|
5952
5952
|
}, [
|
|
5953
|
-
|
|
5953
|
+
x,
|
|
5954
5954
|
d,
|
|
5955
5955
|
o
|
|
5956
|
-
]), S = rr(d) && i, w = !rr(d) || (h ?? Sf(d)), T =
|
|
5956
|
+
]), S = rr(d) && i, w = !rr(d) || (h ?? Sf(d)), T = H(() => {
|
|
5957
5957
|
const C = !w;
|
|
5958
5958
|
f(C), o.writeTemplate(d, C);
|
|
5959
5959
|
}, [
|
|
5960
5960
|
w,
|
|
5961
5961
|
d,
|
|
5962
5962
|
o
|
|
5963
|
-
]), E =
|
|
5963
|
+
]), E = H((C) => {
|
|
5964
5964
|
bf(C) && g(C);
|
|
5965
|
-
}, []), I =
|
|
5965
|
+
}, []), I = H(() => g(void 0), []);
|
|
5966
5966
|
return {
|
|
5967
5967
|
available: k,
|
|
5968
|
-
shown:
|
|
5968
|
+
shown: x,
|
|
5969
5969
|
toggle: y,
|
|
5970
5970
|
template: {
|
|
5971
5971
|
available: S,
|
|
5972
5972
|
shown: w,
|
|
5973
5973
|
toggle: T
|
|
5974
5974
|
},
|
|
5975
|
-
frame:
|
|
5976
|
-
peeking:
|
|
5975
|
+
frame: O,
|
|
5976
|
+
peeking: x ? v : void 0,
|
|
5977
5977
|
peekingName: v ? ii(v) : "",
|
|
5978
|
-
navigate:
|
|
5978
|
+
navigate: x ? E : Of,
|
|
5979
5979
|
back: I
|
|
5980
5980
|
};
|
|
5981
5981
|
}
|
|
@@ -5996,22 +5996,22 @@ var fo = ({ elementId: e, tone: t, text: n }) => /* @__PURE__ */ a("div", {
|
|
|
5996
5996
|
children: n
|
|
5997
5997
|
}), rn = /* @__PURE__ */ (function(e) {
|
|
5998
5998
|
return e.Empty = "empty", e.Failed = "failed", e.Declaration = "declaration", e;
|
|
5999
|
-
})({}),
|
|
5999
|
+
})({}), se = /* @__PURE__ */ (function(e) {
|
|
6000
6000
|
return e.Window = "window", e.Toast = "toast", e.Tooltip = "tooltip", e.Mask = "mask", e.Busy = "busy", e;
|
|
6001
6001
|
})({}), Za = {
|
|
6002
|
-
dialog:
|
|
6003
|
-
confirmDialog:
|
|
6004
|
-
confirmationDialog:
|
|
6005
|
-
sliceDialog:
|
|
6006
|
-
commandDialog:
|
|
6007
|
-
stepperCommandDialog:
|
|
6008
|
-
dialogFrame:
|
|
6009
|
-
overlayPanel:
|
|
6010
|
-
sidebar:
|
|
6011
|
-
toast:
|
|
6012
|
-
tooltip:
|
|
6013
|
-
blockUI:
|
|
6014
|
-
busyIndicatorDialog:
|
|
6002
|
+
dialog: se.Window,
|
|
6003
|
+
confirmDialog: se.Window,
|
|
6004
|
+
confirmationDialog: se.Window,
|
|
6005
|
+
sliceDialog: se.Window,
|
|
6006
|
+
commandDialog: se.Window,
|
|
6007
|
+
stepperCommandDialog: se.Window,
|
|
6008
|
+
dialogFrame: se.Window,
|
|
6009
|
+
overlayPanel: se.Window,
|
|
6010
|
+
sidebar: se.Window,
|
|
6011
|
+
toast: se.Toast,
|
|
6012
|
+
tooltip: se.Tooltip,
|
|
6013
|
+
blockUI: se.Mask,
|
|
6014
|
+
busyIndicatorDialog: se.Busy
|
|
6015
6015
|
}, at = (e, ...t) => {
|
|
6016
6016
|
for (const n of t) {
|
|
6017
6017
|
const o = e.properties?.[n];
|
|
@@ -6021,7 +6021,7 @@ var fo = ({ elementId: e, tone: t, text: n }) => /* @__PURE__ */ a("div", {
|
|
|
6021
6021
|
function Df({ kind: e, tag: t, element: n, slots: o, message: i }) {
|
|
6022
6022
|
const r = o.content ?? [], s = at(n, "header", "title", "summary") ?? n.name ?? n.componentName, l = at(n, "message", "detail", "text", "label"), c = () => {
|
|
6023
6023
|
switch (e) {
|
|
6024
|
-
case
|
|
6024
|
+
case se.Toast:
|
|
6025
6025
|
return i ? Je(i, {
|
|
6026
6026
|
element: {
|
|
6027
6027
|
...n,
|
|
@@ -6036,7 +6036,7 @@ function Df({ kind: e, tag: t, element: n, slots: o, message: i }) {
|
|
|
6036
6036
|
className: "studio-overlay-preview__body",
|
|
6037
6037
|
children: s
|
|
6038
6038
|
});
|
|
6039
|
-
case
|
|
6039
|
+
case se.Tooltip:
|
|
6040
6040
|
return /* @__PURE__ */ b("div", {
|
|
6041
6041
|
className: "studio-overlay-preview__tooltip",
|
|
6042
6042
|
children: [/* @__PURE__ */ a("span", {
|
|
@@ -6048,7 +6048,7 @@ function Df({ kind: e, tag: t, element: n, slots: o, message: i }) {
|
|
|
6048
6048
|
children: at(n, "text") ?? s
|
|
6049
6049
|
})]
|
|
6050
6050
|
});
|
|
6051
|
-
case
|
|
6051
|
+
case se.Mask:
|
|
6052
6052
|
return /* @__PURE__ */ b("div", {
|
|
6053
6053
|
className: "studio-overlay-preview__masked",
|
|
6054
6054
|
children: [/* @__PURE__ */ a("div", {
|
|
@@ -6062,7 +6062,7 @@ function Df({ kind: e, tag: t, element: n, slots: o, message: i }) {
|
|
|
6062
6062
|
})
|
|
6063
6063
|
})]
|
|
6064
6064
|
});
|
|
6065
|
-
case
|
|
6065
|
+
case se.Busy:
|
|
6066
6066
|
return /* @__PURE__ */ b("div", {
|
|
6067
6067
|
className: "studio-overlay-preview__busy",
|
|
6068
6068
|
children: [/* @__PURE__ */ a("i", {
|
|
@@ -6618,7 +6618,7 @@ var Af = (e) => {
|
|
|
6618
6618
|
return t > 0 && n > 0;
|
|
6619
6619
|
}, go = (e) => Array.from(e.children).filter((t) => !t.hasAttribute("data-studio-placeholder-for")).some((t) => Af(t) || getComputedStyle(t).display === "contents" && go(t)), Ff = 150;
|
|
6620
6620
|
function Mf(e, t) {
|
|
6621
|
-
const [n, o] =
|
|
6621
|
+
const [n, o] = M(!0), i = J(!0);
|
|
6622
6622
|
return Te(() => {
|
|
6623
6623
|
const r = e.current;
|
|
6624
6624
|
if (!r) return;
|
|
@@ -6644,10 +6644,10 @@ var Lf = ({ element: e }) => e.name || e.componentName, Bf = (e, t) => {
|
|
|
6644
6644
|
};
|
|
6645
6645
|
function jf(e, t, n, o) {
|
|
6646
6646
|
const i = (r) => {
|
|
6647
|
-
const s = J(null), l =
|
|
6647
|
+
const s = J(null), l = j(() => ({
|
|
6648
6648
|
...r.element,
|
|
6649
6649
|
properties: ts(e, r.element.componentName, r.element.properties)
|
|
6650
|
-
}), [r.element]), c =
|
|
6650
|
+
}), [r.element]), c = j(() => Ef(e, r.element.componentName, r.element.properties), [r.element]), u = es.has(xt(r.element.componentName)), d = e.startsWith(`${Kr}:`), p = d ? void 0 : Za[xt(r.element.componentName)], m = d && xt(r.element.componentName) === "topbar", [h, f] = M(), v = Mf(s, r.element), g = Lf(r), k = Bf(r.element, h !== void 0);
|
|
6651
6651
|
return /* @__PURE__ */ b("span", {
|
|
6652
6652
|
ref: s,
|
|
6653
6653
|
"data-studio-element": r.element.id,
|
|
@@ -6655,7 +6655,7 @@ function jf(e, t, n, o) {
|
|
|
6655
6655
|
"data-studio-sample": c.length > 0 ? c.join(" ") : void 0,
|
|
6656
6656
|
title: c.length > 0 ? n.sampleContent(c) : void 0,
|
|
6657
6657
|
children: [/* @__PURE__ */ a(wt, {
|
|
6658
|
-
onError: (
|
|
6658
|
+
onError: (x) => f(x instanceof Error ? x.message : String(x)),
|
|
6659
6659
|
fallback: /* @__PURE__ */ a(fo, {
|
|
6660
6660
|
elementId: r.element.id,
|
|
6661
6661
|
tone: rn.Failed,
|
|
@@ -6816,7 +6816,7 @@ var Yf = (e) => ({ element: t }) => Je("span", {
|
|
|
6816
6816
|
children: t
|
|
6817
6817
|
});
|
|
6818
6818
|
const { target: n, container: o } = e.drop;
|
|
6819
|
-
return /* @__PURE__ */ b(
|
|
6819
|
+
return /* @__PURE__ */ b(re, { children: [/* @__PURE__ */ a("div", {
|
|
6820
6820
|
className: "studio-screen-surface__drop-container",
|
|
6821
6821
|
"data-studio-drop-state": "container",
|
|
6822
6822
|
style: o
|
|
@@ -6850,7 +6850,7 @@ function rs(e, t) {
|
|
|
6850
6850
|
};
|
|
6851
6851
|
}
|
|
6852
6852
|
var as = (e, t) => e === t || !!e && !!t && e.left === t.left && e.top === t.top && e.width === t.width && e.height === t.height, eg = (e, t) => e.length === t.length && e.every((n, o) => n.region.id === t[o].region.id && as(n.rect, t[o].rect)), ss = as, tg = ({ surface: e, markers: t }) => {
|
|
6853
|
-
const [n, o] =
|
|
6853
|
+
const [n, o] = M([]);
|
|
6854
6854
|
return Te(() => {
|
|
6855
6855
|
const i = e.current;
|
|
6856
6856
|
if (!i) return;
|
|
@@ -6862,7 +6862,7 @@ var as = (e, t) => e === t || !!e && !!t && e.left === t.left && e.top === t.top
|
|
|
6862
6862
|
}] : [];
|
|
6863
6863
|
});
|
|
6864
6864
|
o((l) => ng(l, s) ? l : s);
|
|
6865
|
-
}), /* @__PURE__ */ a(
|
|
6865
|
+
}), /* @__PURE__ */ a(re, { children: n.map((i) => /* @__PURE__ */ a("div", {
|
|
6866
6866
|
className: "studio-screen-surface__binding-source",
|
|
6867
6867
|
"data-binding-source": i.componentId,
|
|
6868
6868
|
style: i.rect,
|
|
@@ -6889,7 +6889,7 @@ function og(e, t) {
|
|
|
6889
6889
|
}
|
|
6890
6890
|
function ig(e, t) {
|
|
6891
6891
|
const { selectedId: n, document: o, composition: i, context: r } = e;
|
|
6892
|
-
return
|
|
6892
|
+
return j(() => {
|
|
6893
6893
|
if (!n) return [];
|
|
6894
6894
|
const s = Ge(i.roots, n), l = xa(s?.properties);
|
|
6895
6895
|
if (!l) return [];
|
|
@@ -6936,20 +6936,20 @@ function lg(e, t, n, o = 6) {
|
|
|
6936
6936
|
}
|
|
6937
6937
|
var cg = (e, t) => e?.top === t?.top && e?.left === t?.left && e?.width === t?.width && e?.height === t?.height, dg = (e, t) => !!e && e.denied === t.denied && e.drop?.target.region.id === t.drop?.target.region.id && cg(e.drop?.target.rect, t.drop?.target.rect);
|
|
6938
6938
|
function ug(e, t, n) {
|
|
6939
|
-
const [o, i] =
|
|
6939
|
+
const [o, i] = M(), r = J(void 0);
|
|
6940
6940
|
r.current = o;
|
|
6941
|
-
const [s, l] =
|
|
6941
|
+
const [s, l] = M(), c = J(0), u = J(void 0), d = H(() => {
|
|
6942
6942
|
c.current = 0, u.current = void 0, l(void 0), i(void 0);
|
|
6943
6943
|
}, []), p = J(!1);
|
|
6944
|
-
|
|
6944
|
+
ie(() => {
|
|
6945
6945
|
const S = (w) => {
|
|
6946
6946
|
w.key !== "Escape" || !u.current && !c.current && !r.current || (p.current = !0, d());
|
|
6947
6947
|
};
|
|
6948
6948
|
return window.addEventListener("keydown", S, !0), () => window.removeEventListener("keydown", S, !0);
|
|
6949
|
-
}, [d]),
|
|
6949
|
+
}, [d]), ie(() => (window.addEventListener("dragend", d), window.addEventListener("drop", d), () => {
|
|
6950
6950
|
window.removeEventListener("dragend", d), window.removeEventListener("drop", d);
|
|
6951
6951
|
}), [d]);
|
|
6952
|
-
const m =
|
|
6952
|
+
const m = H((S) => {
|
|
6953
6953
|
u.current = S, l(S);
|
|
6954
6954
|
}, []), h = (S) => {
|
|
6955
6955
|
const w = u.current, { region: T } = S.target;
|
|
@@ -6965,11 +6965,11 @@ function ug(e, t, n) {
|
|
|
6965
6965
|
}
|
|
6966
6966
|
return 0;
|
|
6967
6967
|
}, v = (S) => {
|
|
6968
|
-
const w = e.current.getBoundingClientRect(), T = lg(t(), S.clientX - w.left, S.clientY - w.top), E = S.target.closest("[data-scene-id], [data-studio-element]"), I = E?.dataset.sceneId ?? E?.dataset.studioElement, C = !!I && n.ownershipOf(I) !==
|
|
6968
|
+
const w = e.current.getBoundingClientRect(), T = lg(t(), S.clientX - w.left, S.clientY - w.top), E = S.target.closest("[data-scene-id], [data-studio-element]"), I = E?.dataset.sceneId ?? E?.dataset.studioElement, C = !!I && n.ownershipOf(I) !== oe.Local;
|
|
6969
6969
|
if (!T || C) return { denied: !0 };
|
|
6970
6970
|
if (po(S)) {
|
|
6971
|
-
const $ = h(T),
|
|
6972
|
-
if (
|
|
6971
|
+
const $ = h(T), U = $ ? n.validateMove($) : te.NodeNotFound;
|
|
6972
|
+
if (U && U !== te.NoChange) return { denied: !0 };
|
|
6973
6973
|
}
|
|
6974
6974
|
return {
|
|
6975
6975
|
drop: T,
|
|
@@ -7008,8 +7008,8 @@ function ug(e, t, n) {
|
|
|
7008
7008
|
return;
|
|
7009
7009
|
}
|
|
7010
7010
|
if (!T) return;
|
|
7011
|
-
const { region:
|
|
7012
|
-
T.kind === "layout" ? n.insertLayout(T.item,
|
|
7011
|
+
const { region: U } = E.target, D = U.containerId ?? void 0, F = U.kind === Oe.Container ? void 0 : U.index, L = g(S, E);
|
|
7012
|
+
T.kind === "layout" ? n.insertLayout(T.item, D, F, L) : n.insertComponent(ei(T.componentName, T.package), D, F, L);
|
|
7013
7013
|
}
|
|
7014
7014
|
}
|
|
7015
7015
|
};
|
|
@@ -7037,7 +7037,7 @@ function pg(e, t, n) {
|
|
|
7037
7037
|
};
|
|
7038
7038
|
}
|
|
7039
7039
|
function mg(e, t, n) {
|
|
7040
|
-
const [o, i] =
|
|
7040
|
+
const [o, i] = M([]), [r, s] = M(), l = J([]), c = H(() => {
|
|
7041
7041
|
const d = e.current;
|
|
7042
7042
|
if (!d) return [];
|
|
7043
7043
|
const p = d.getBoundingClientRect(), m = (f) => Be(d, f, p), h = {
|
|
@@ -7053,7 +7053,7 @@ function mg(e, t, n) {
|
|
|
7053
7053
|
rect: v
|
|
7054
7054
|
}] : [];
|
|
7055
7055
|
});
|
|
7056
|
-
}, [e, t]), u =
|
|
7056
|
+
}, [e, t]), u = H(() => {
|
|
7057
7057
|
const d = e.current;
|
|
7058
7058
|
if (!d) return;
|
|
7059
7059
|
const p = c();
|
|
@@ -7130,7 +7130,7 @@ function wg(e, t, n = !1) {
|
|
|
7130
7130
|
const o = J(t);
|
|
7131
7131
|
o.current = t;
|
|
7132
7132
|
const i = J(n);
|
|
7133
|
-
i.current = n,
|
|
7133
|
+
i.current = n, ie(() => {
|
|
7134
7134
|
const r = e.current;
|
|
7135
7135
|
if (!r) return;
|
|
7136
7136
|
const s = (l) => {
|
|
@@ -7153,9 +7153,9 @@ function wg(e, t, n = !1) {
|
|
|
7153
7153
|
}
|
|
7154
7154
|
var pr = 'button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])', mr = 440, kg = ({ registry: e, property: t, context: n, componentId: o, anchor: i, opener: r, bounds: s, title: l, strings: c, onChange: u, onClose: d }) => {
|
|
7155
7155
|
const p = J(null);
|
|
7156
|
-
|
|
7156
|
+
ie(() => ((p.current?.querySelector(pr) ?? p.current)?.focus({ preventScroll: !0 }), () => {
|
|
7157
7157
|
r.isConnected && r.focus({ preventScroll: !0 });
|
|
7158
|
-
}), [r]),
|
|
7158
|
+
}), [r]), ie(() => {
|
|
7159
7159
|
const f = (v) => {
|
|
7160
7160
|
const g = v.target;
|
|
7161
7161
|
p.current?.contains(g) || r.contains(g) || d();
|
|
@@ -7209,40 +7209,40 @@ function Sg({ anchor: e, bounds: t, size: n, prefer: o, gap: i = 6 }) {
|
|
|
7209
7209
|
};
|
|
7210
7210
|
}
|
|
7211
7211
|
var hr = [
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7212
|
+
A.target,
|
|
7213
|
+
A.slot,
|
|
7214
|
+
A.slice,
|
|
7215
|
+
A.emphasis
|
|
7216
7216
|
], Cg = [
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7217
|
+
A.moveEarlier,
|
|
7218
|
+
A.moveLater,
|
|
7219
|
+
A.addSubItem,
|
|
7220
|
+
A.duplicate,
|
|
7221
|
+
A.delete
|
|
7222
7222
|
], Tg = {
|
|
7223
|
-
[
|
|
7224
|
-
[
|
|
7225
|
-
[
|
|
7223
|
+
[A.target]: /* @__PURE__ */ a(Yc, { "aria-hidden": "true" }),
|
|
7224
|
+
[A.slot]: /* @__PURE__ */ a(Zc, { "aria-hidden": "true" }),
|
|
7225
|
+
[A.slice]: /* @__PURE__ */ a(td, { "aria-hidden": "true" })
|
|
7226
7226
|
}, Ng = {
|
|
7227
|
-
[
|
|
7228
|
-
[
|
|
7229
|
-
[
|
|
7230
|
-
[
|
|
7231
|
-
[
|
|
7227
|
+
[A.moveEarlier]: /* @__PURE__ */ a(qc, { "aria-hidden": "true" }),
|
|
7228
|
+
[A.moveLater]: /* @__PURE__ */ a(Vc, { "aria-hidden": "true" }),
|
|
7229
|
+
[A.addSubItem]: /* @__PURE__ */ a(Qc, { "aria-hidden": "true" }),
|
|
7230
|
+
[A.duplicate]: /* @__PURE__ */ a(Jc, { "aria-hidden": "true" }),
|
|
7231
|
+
[A.delete]: /* @__PURE__ */ a(ed, { "aria-hidden": "true" })
|
|
7232
7232
|
}, Ig = ({ subject: e, item: t, anchor: n, bounds: o, strings: i, renameToken: r, chipLabel: s, onRename: l, onAction: c, onChoice: u, readOnlyActions: d, onReadOnlyAction: p, onLeave: m }) => {
|
|
7233
|
-
const h = J(null), f = J(null), [v, g] =
|
|
7233
|
+
const h = J(null), f = J(null), [v, g] = M({
|
|
7234
7234
|
width: 380,
|
|
7235
7235
|
height: 100
|
|
7236
|
-
}), [k,
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
}, [t.id, t.label]),
|
|
7236
|
+
}), [k, x] = M(t.label), [O, y] = M(0), S = e.mode.itemToolbar, w = S.some((_) => _.compact === !0), T = S.some((_) => hr.includes(_.id)), E = S.find((_) => _.id === A.rename), I = E && Wt(E, t);
|
|
7237
|
+
ie(() => {
|
|
7238
|
+
x(t.label);
|
|
7239
|
+
}, [t.id, t.label]), ie(() => {
|
|
7240
7240
|
r === 0 || !f.current || (f.current.focus({ preventScroll: !0 }), f.current.select());
|
|
7241
7241
|
}, [r, t.id]), Te(() => {
|
|
7242
|
-
const
|
|
7243
|
-
|
|
7244
|
-
width:
|
|
7245
|
-
height:
|
|
7242
|
+
const _ = h.current?.getBoundingClientRect();
|
|
7243
|
+
_ && (Math.round(_.width) !== Math.round(v.width) || Math.round(_.height) !== Math.round(v.height)) && g({
|
|
7244
|
+
width: _.width,
|
|
7245
|
+
height: _.height
|
|
7246
7246
|
});
|
|
7247
7247
|
});
|
|
7248
7248
|
const C = e.source.kind === "elements" ? "above" : "below", $ = Sg({
|
|
@@ -7250,26 +7250,26 @@ var hr = [
|
|
|
7250
7250
|
bounds: o,
|
|
7251
7251
|
size: v,
|
|
7252
7252
|
prefer: C
|
|
7253
|
-
}),
|
|
7254
|
-
const
|
|
7255
|
-
|
|
7256
|
-
},
|
|
7257
|
-
|
|
7258
|
-
},
|
|
7259
|
-
if (
|
|
7260
|
-
|
|
7253
|
+
}), U = J(!1), D = () => {
|
|
7254
|
+
const _ = k.trim();
|
|
7255
|
+
_ !== "" && _ !== t.label ? l(_) : x(t.label);
|
|
7256
|
+
}, F = (_) => {
|
|
7257
|
+
_.key === "Enter" && (_.preventDefault(), D(), U.current = !0, m()), _.key === "Escape" && (_.preventDefault(), _.stopPropagation(), x(t.label), U.current = !0, m());
|
|
7258
|
+
}, L = () => {
|
|
7259
|
+
if (U.current) {
|
|
7260
|
+
U.current = !1;
|
|
7261
7261
|
return;
|
|
7262
7262
|
}
|
|
7263
|
-
|
|
7264
|
-
}, N = () => Array.from(h.current?.querySelectorAll("[data-roving]:not(:disabled)") ?? []),
|
|
7265
|
-
if (
|
|
7266
|
-
const
|
|
7263
|
+
D();
|
|
7264
|
+
}, N = () => Array.from(h.current?.querySelectorAll("[data-roving]:not(:disabled)") ?? []), z = (_) => {
|
|
7265
|
+
if (_.target instanceof HTMLInputElement) return;
|
|
7266
|
+
const ne = N(), fe = ne.indexOf(_.target);
|
|
7267
7267
|
if (fe < 0) return;
|
|
7268
|
-
const
|
|
7269
|
-
if (
|
|
7270
|
-
|
|
7271
|
-
const
|
|
7272
|
-
y(Number(
|
|
7268
|
+
const je = _.key === "ArrowRight" || _.key === "ArrowDown" ? fe + 1 : _.key === "ArrowLeft" || _.key === "ArrowUp" ? fe - 1 : _.key === "Home" ? 0 : _.key === "End" ? ne.length - 1 : void 0;
|
|
7269
|
+
if (je === void 0 || _.altKey) return;
|
|
7270
|
+
_.preventDefault();
|
|
7271
|
+
const nt = ne[(je + ne.length) % ne.length];
|
|
7272
|
+
y(Number(nt.dataset.roving)), nt.focus();
|
|
7273
7273
|
}, Q = {
|
|
7274
7274
|
ref: h,
|
|
7275
7275
|
role: "toolbar",
|
|
@@ -7282,35 +7282,35 @@ var hr = [
|
|
|
7282
7282
|
left: $.left,
|
|
7283
7283
|
top: $.top
|
|
7284
7284
|
},
|
|
7285
|
-
onKeyDown:
|
|
7285
|
+
onKeyDown: z
|
|
7286
7286
|
};
|
|
7287
7287
|
if (t.readOnly) {
|
|
7288
|
-
const
|
|
7288
|
+
const _ = t.origin ? i.inheritedFrom(t.origin) : i.readOnlyReasons[t.readOnlyReason ?? ""] ?? t.readOnlyReason ?? "";
|
|
7289
7289
|
return /* @__PURE__ */ b("div", {
|
|
7290
7290
|
...Q,
|
|
7291
7291
|
"data-read-only": "true",
|
|
7292
7292
|
children: [/* @__PURE__ */ b("span", {
|
|
7293
7293
|
className: "studio-design-toolbar__reason",
|
|
7294
|
-
children: [/* @__PURE__ */ a(aa, { "aria-hidden": "true" }), /* @__PURE__ */ a("span", { children:
|
|
7295
|
-
}), d.map((
|
|
7294
|
+
children: [/* @__PURE__ */ a(aa, { "aria-hidden": "true" }), /* @__PURE__ */ a("span", { children: _ })]
|
|
7295
|
+
}), d.map((ne, fe) => /* @__PURE__ */ a("button", {
|
|
7296
7296
|
type: "button",
|
|
7297
7297
|
className: "studio-design-toolbar__text-action",
|
|
7298
|
-
"data-action":
|
|
7298
|
+
"data-action": ne.id,
|
|
7299
7299
|
"data-roving": fe,
|
|
7300
|
-
tabIndex:
|
|
7301
|
-
onClick: () => p(
|
|
7302
|
-
children:
|
|
7303
|
-
},
|
|
7300
|
+
tabIndex: O === fe ? 0 : -1,
|
|
7301
|
+
onClick: () => p(ne),
|
|
7302
|
+
children: ne.label
|
|
7303
|
+
}, ne.id))]
|
|
7304
7304
|
});
|
|
7305
7305
|
}
|
|
7306
|
-
let
|
|
7307
|
-
const
|
|
7308
|
-
const
|
|
7306
|
+
let pe = 0;
|
|
7307
|
+
const ce = () => {
|
|
7308
|
+
const _ = pe++;
|
|
7309
7309
|
return {
|
|
7310
|
-
"data-roving":
|
|
7311
|
-
tabIndex:
|
|
7310
|
+
"data-roving": _,
|
|
7311
|
+
tabIndex: O === _ ? 0 : -1
|
|
7312
7312
|
};
|
|
7313
|
-
},
|
|
7313
|
+
}, me = S.filter((_) => hr.includes(_.id) && Wt(_, t).visible), xe = Cg.flatMap((_) => S.filter((ne) => ne.id === _)).filter((_) => Wt(_, t).visible);
|
|
7314
7314
|
return /* @__PURE__ */ b("div", {
|
|
7315
7315
|
...Q,
|
|
7316
7316
|
children: [
|
|
@@ -7321,48 +7321,48 @@ var hr = [
|
|
|
7321
7321
|
value: k,
|
|
7322
7322
|
"aria-label": i.titleField,
|
|
7323
7323
|
"data-action": "rename",
|
|
7324
|
-
onChange: (
|
|
7325
|
-
onBlur:
|
|
7326
|
-
onKeyDown:
|
|
7327
|
-
onFocus: (
|
|
7324
|
+
onChange: (_) => x(_.target.value),
|
|
7325
|
+
onBlur: L,
|
|
7326
|
+
onKeyDown: F,
|
|
7327
|
+
onFocus: (_) => _.currentTarget.select()
|
|
7328
7328
|
}),
|
|
7329
7329
|
I?.visible && T && /* @__PURE__ */ a("span", {
|
|
7330
7330
|
className: "studio-design-toolbar__divider",
|
|
7331
7331
|
"aria-hidden": "true"
|
|
7332
7332
|
}),
|
|
7333
|
-
|
|
7333
|
+
me.length > 0 && /* @__PURE__ */ a("div", {
|
|
7334
7334
|
className: "studio-design-toolbar__chips",
|
|
7335
|
-
children:
|
|
7335
|
+
children: me.map((_) => /* @__PURE__ */ b("button", {
|
|
7336
7336
|
type: "button",
|
|
7337
7337
|
className: "studio-design-toolbar__chip",
|
|
7338
|
-
"data-action":
|
|
7339
|
-
title:
|
|
7340
|
-
"data-unlinked":
|
|
7338
|
+
"data-action": _.id,
|
|
7339
|
+
title: _.title,
|
|
7340
|
+
"data-unlinked": _.id !== A.emphasis && t.unlinked && _.id !== A.slot ? "true" : void 0,
|
|
7341
7341
|
"aria-haspopup": "dialog",
|
|
7342
|
-
...
|
|
7343
|
-
onClick: (
|
|
7344
|
-
children: [Tg[
|
|
7345
|
-
},
|
|
7342
|
+
...ce(),
|
|
7343
|
+
onClick: (ne) => u(_.id, ne.currentTarget),
|
|
7344
|
+
children: [Tg[_.id], /* @__PURE__ */ a("span", { children: s(_.id, t) })]
|
|
7345
|
+
}, _.id))
|
|
7346
7346
|
}),
|
|
7347
|
-
|
|
7347
|
+
me.length > 0 && xe.length > 0 && /* @__PURE__ */ a("span", {
|
|
7348
7348
|
className: "studio-design-toolbar__divider",
|
|
7349
7349
|
"aria-hidden": "true"
|
|
7350
7350
|
}),
|
|
7351
7351
|
xe.length > 0 && /* @__PURE__ */ a("div", {
|
|
7352
7352
|
className: "studio-design-toolbar__actions",
|
|
7353
|
-
children: xe.map((
|
|
7354
|
-
const
|
|
7353
|
+
children: xe.map((_) => {
|
|
7354
|
+
const ne = Wt(_, t);
|
|
7355
7355
|
return /* @__PURE__ */ a("button", {
|
|
7356
7356
|
type: "button",
|
|
7357
7357
|
className: "studio-design-toolbar__button",
|
|
7358
|
-
"data-action":
|
|
7359
|
-
title:
|
|
7360
|
-
"aria-label":
|
|
7361
|
-
disabled: !
|
|
7362
|
-
...
|
|
7363
|
-
onClick: () => c(
|
|
7364
|
-
children: Ng[
|
|
7365
|
-
},
|
|
7358
|
+
"data-action": _.id,
|
|
7359
|
+
title: _.title,
|
|
7360
|
+
"aria-label": _.title,
|
|
7361
|
+
disabled: !ne.enabled,
|
|
7362
|
+
...ce(),
|
|
7363
|
+
onClick: () => c(_.id),
|
|
7364
|
+
children: Ng[_.id]
|
|
7365
|
+
}, _.id);
|
|
7366
7366
|
})
|
|
7367
7367
|
})
|
|
7368
7368
|
]
|
|
@@ -7376,7 +7376,7 @@ var hr = [
|
|
|
7376
7376
|
];
|
|
7377
7377
|
}, Un = (e, t) => e === t || !!e && !!t && e.left === t.left && e.top === t.top && e.width === t.width && e.height === t.height, Og = (e, t) => Un(e.surface, t.surface) && Un(e.component, t.component) && Object.keys(t.items).length === Object.keys(e.items).length && Object.entries(t.items).every(([n, o]) => Un(e.items[n], o));
|
|
7378
7378
|
function vo(e, t, n) {
|
|
7379
|
-
const [o, i] =
|
|
7379
|
+
const [o, i] = M(), r = H(() => {
|
|
7380
7380
|
const s = e.current, l = s ? t(s, s.getBoundingClientRect()) : void 0;
|
|
7381
7381
|
i((c) => c === void 0 || l === void 0 ? l : n(c, l) ? c : l);
|
|
7382
7382
|
}, [
|
|
@@ -7415,7 +7415,7 @@ function vo(e, t, n) {
|
|
|
7415
7415
|
}, [e, r]), o;
|
|
7416
7416
|
}
|
|
7417
7417
|
function xg(e, t) {
|
|
7418
|
-
return vo(e,
|
|
7418
|
+
return vo(e, H((n, o) => {
|
|
7419
7419
|
if (!t) return;
|
|
7420
7420
|
const i = Be(n, t.componentId, o), r = n.querySelector(`[data-studio-element="${CSS.escape(t.componentId)}"]`) ?? n.querySelector(`[data-scene-id="${CSS.escape(t.componentId)}"]`), s = {};
|
|
7421
7421
|
for (const l of t.source.items) {
|
|
@@ -7435,28 +7435,28 @@ function xg(e, t) {
|
|
|
7435
7435
|
}, [t]), Og);
|
|
7436
7436
|
}
|
|
7437
7437
|
var zn = 34, Rg = ({ surface: e, state: t, controller: n, environment: o, editorStrings: i, strings: r }) => {
|
|
7438
|
-
const { subject: s } = t, l = xg(e, s), [c, u] =
|
|
7439
|
-
if (typeof
|
|
7440
|
-
const
|
|
7441
|
-
return
|
|
7442
|
-
}, [o]), h =
|
|
7443
|
-
const N =
|
|
7438
|
+
const { subject: s } = t, l = xg(e, s), [c, u] = M(), d = o.propertyEditors?.registry ?? hn, p = j(() => jo(o.availableSources), [o.availableSources]), m = H((F) => {
|
|
7439
|
+
if (typeof F != "string" || F === "") return;
|
|
7440
|
+
const L = o.propertyEditors?.slices?.find((z) => z.id === F) ?? o.stateChangeSlices.find((z) => z.id === F), N = F.split(".");
|
|
7441
|
+
return L?.name ?? N[N.length - 1];
|
|
7442
|
+
}, [o]), h = H((F, L) => {
|
|
7443
|
+
const N = L.chips?.[F];
|
|
7444
7444
|
if (N !== void 0 && N !== "") return N;
|
|
7445
|
-
switch (
|
|
7446
|
-
case
|
|
7447
|
-
return m(
|
|
7448
|
-
case
|
|
7449
|
-
return r.emphasis[String(
|
|
7450
|
-
case
|
|
7451
|
-
return typeof
|
|
7445
|
+
switch (F) {
|
|
7446
|
+
case A.slice:
|
|
7447
|
+
return m(L.values.slice) ?? r.chooseSlice;
|
|
7448
|
+
case A.emphasis:
|
|
7449
|
+
return r.emphasis[String(L.values.emphasis ?? "secondary").toLowerCase()] ?? String(L.values.emphasis ?? "");
|
|
7450
|
+
case A.slot:
|
|
7451
|
+
return typeof L.values.slot == "string" && L.values.slot !== "" ? L.values.slot : r.mainArea;
|
|
7452
7452
|
default:
|
|
7453
7453
|
return r.notLinked;
|
|
7454
7454
|
}
|
|
7455
7455
|
}, [m, r]), f = s?.selected?.parentId !== void 0 && l !== void 0 && l.items[s.selected.id] === void 0, v = s?.selected?.parentId;
|
|
7456
|
-
if (
|
|
7456
|
+
if (ie(() => {
|
|
7457
7457
|
if (!f || !v) return;
|
|
7458
|
-
const
|
|
7459
|
-
|
|
7458
|
+
const F = e.current?.querySelector(`[data-scene-nav-item="${CSS.escape(v)}"] > [data-scene-nav-link]`);
|
|
7459
|
+
F && (F.focus({ preventScroll: !0 }), F.dispatchEvent(new KeyboardEvent("keydown", {
|
|
7460
7460
|
key: "ArrowRight",
|
|
7461
7461
|
bubbles: !0,
|
|
7462
7462
|
cancelable: !0
|
|
@@ -7466,7 +7466,7 @@ var zn = 34, Rg = ({ surface: e, state: t, controller: n, environment: o, editor
|
|
|
7466
7466
|
v,
|
|
7467
7467
|
e
|
|
7468
7468
|
]), !s || !l) return null;
|
|
7469
|
-
const { selected: g, source: k } = s,
|
|
7469
|
+
const { selected: g, source: k } = s, x = s.mode.addActions[0], O = k.items.flatMap((F) => l.items[F.id] ? [l.items[F.id]] : []), y = O[O.length - 1], S = s.mode.itemToolbar.some((F) => F.compact === !0), w = y ?? l.component, T = w && x ? S || !y ? {
|
|
7470
7470
|
left: (y ?? w).left,
|
|
7471
7471
|
top: (y ? y.top + y.height : w.top) + 8
|
|
7472
7472
|
} : {
|
|
@@ -7481,47 +7481,47 @@ var zn = 34, Rg = ({ surface: e, state: t, controller: n, environment: o, editor
|
|
|
7481
7481
|
inCanvas: !1,
|
|
7482
7482
|
bindingScope: p,
|
|
7483
7483
|
slotNames: Ea(r.navigation)
|
|
7484
|
-
}),
|
|
7484
|
+
}), U = (F, L) => {
|
|
7485
7485
|
if (!I) return;
|
|
7486
|
-
const N = I.plan(
|
|
7486
|
+
const N = I.plan(L);
|
|
7487
7487
|
qo(N) || u(void 0), t.perform(N);
|
|
7488
|
-
},
|
|
7489
|
-
return /* @__PURE__ */ b(
|
|
7490
|
-
T &&
|
|
7488
|
+
}, D = E;
|
|
7489
|
+
return /* @__PURE__ */ b(re, { children: [
|
|
7490
|
+
T && x && /* @__PURE__ */ a("button", {
|
|
7491
7491
|
type: "button",
|
|
7492
7492
|
className: "studio-design-add",
|
|
7493
|
-
"data-action":
|
|
7494
|
-
"aria-label":
|
|
7495
|
-
title:
|
|
7493
|
+
"data-action": x.id,
|
|
7494
|
+
"aria-label": x.label,
|
|
7495
|
+
title: x.label,
|
|
7496
7496
|
style: {
|
|
7497
7497
|
left: T.left,
|
|
7498
7498
|
top: T.top,
|
|
7499
7499
|
width: zn,
|
|
7500
7500
|
height: zn
|
|
7501
7501
|
},
|
|
7502
|
-
onClick: () => t.add(
|
|
7502
|
+
onClick: () => t.add(x.id),
|
|
7503
7503
|
children: /* @__PURE__ */ a(Xc, { "aria-hidden": "true" })
|
|
7504
7504
|
}),
|
|
7505
|
-
g &&
|
|
7505
|
+
g && D && /* @__PURE__ */ a(Ig, {
|
|
7506
7506
|
subject: s,
|
|
7507
7507
|
item: g,
|
|
7508
|
-
anchor:
|
|
7508
|
+
anchor: D,
|
|
7509
7509
|
bounds: l.surface,
|
|
7510
7510
|
strings: r,
|
|
7511
7511
|
renameToken: t.renameToken,
|
|
7512
7512
|
chipLabel: h,
|
|
7513
|
-
onRename: (
|
|
7514
|
-
onAction: (
|
|
7515
|
-
onChoice: (
|
|
7516
|
-
actionId:
|
|
7513
|
+
onRename: (F) => t.rename(g, F),
|
|
7514
|
+
onAction: (F) => t.act(F, g),
|
|
7515
|
+
onChoice: (F, L) => u((N) => N && N.actionId === F && N.itemId === g.id ? void 0 : {
|
|
7516
|
+
actionId: F,
|
|
7517
7517
|
itemId: g.id,
|
|
7518
|
-
opener:
|
|
7518
|
+
opener: L
|
|
7519
7519
|
}),
|
|
7520
7520
|
readOnlyActions: k.readOnlyActions(g),
|
|
7521
|
-
onReadOnlyAction: (
|
|
7521
|
+
onReadOnlyAction: (F) => t.perform(F.plan()),
|
|
7522
7522
|
onLeave: () => e.current?.focus({ preventScroll: !0 })
|
|
7523
7523
|
}, g.id),
|
|
7524
|
-
I && c &&
|
|
7524
|
+
I && c && D && /* @__PURE__ */ a(kg, {
|
|
7525
7525
|
registry: d,
|
|
7526
7526
|
property: I.property,
|
|
7527
7527
|
context: $(),
|
|
@@ -7529,9 +7529,9 @@ var zn = 34, Rg = ({ surface: e, state: t, controller: n, environment: o, editor
|
|
|
7529
7529
|
anchor: Dg(e, c.opener),
|
|
7530
7530
|
opener: c.opener,
|
|
7531
7531
|
bounds: l.surface,
|
|
7532
|
-
title: s.mode.itemToolbar.find((
|
|
7532
|
+
title: s.mode.itemToolbar.find((F) => F.id === c.actionId)?.title ?? c.actionId,
|
|
7533
7533
|
strings: r,
|
|
7534
|
-
onChange:
|
|
7534
|
+
onChange: U,
|
|
7535
7535
|
onClose: C
|
|
7536
7536
|
}),
|
|
7537
7537
|
g && E && s.source.kind === "region" && /* @__PURE__ */ a("div", {
|
|
@@ -7578,14 +7578,14 @@ function ls(e, t) {
|
|
|
7578
7578
|
});
|
|
7579
7579
|
}
|
|
7580
7580
|
var _g = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width && e.height === t.height, gr = "content", $g = (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), Eg = ({ surface: e, controller: t, strings: n }) => {
|
|
7581
|
-
const o = vo(e,
|
|
7581
|
+
const o = vo(e, H((h, f) => Be(h, "composition", f), []), _g), { composition: i, context: r, selectedId: s, navigation: l, navigationModule: c, structure: u } = t, d = j(() => ls(i.roots, r.catalog), [i.roots, r.catalog]), p = H((h, f) => d.flatMap((v) => {
|
|
7582
7582
|
const g = Be(h, v.id, f);
|
|
7583
7583
|
return g ? [{
|
|
7584
7584
|
...v,
|
|
7585
7585
|
rect: g
|
|
7586
7586
|
}] : [];
|
|
7587
7587
|
}), [d]), m = vo(e, p, $g);
|
|
7588
|
-
return /* @__PURE__ */ b(
|
|
7588
|
+
return /* @__PURE__ */ b(re, { children: [o && /* @__PURE__ */ a("div", {
|
|
7589
7589
|
className: "studio-design-slot",
|
|
7590
7590
|
"data-slot": gr,
|
|
7591
7591
|
"aria-hidden": "true",
|
|
@@ -7641,10 +7641,10 @@ var _g = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width &
|
|
|
7641
7641
|
}, Ag = Wl(), Jt = () => {
|
|
7642
7642
|
throw new Error("The screen is being designed; it does not navigate.");
|
|
7643
7643
|
}, Fg = ({ structure: e, navigation: t, module: n, logoLockedReason: o, onNavigate: i, peeking: r, children: s }) => {
|
|
7644
|
-
const l =
|
|
7644
|
+
const l = j(() => new dn(e), [e]), c = j(() => ({
|
|
7645
7645
|
structure: l,
|
|
7646
7646
|
navigation: t
|
|
7647
|
-
}), [l, t]), u = n === void 0 ? void 0 : l.firstFeatureId(n) ?? `${n}.`, d = r || u, p =
|
|
7647
|
+
}), [l, t]), u = n === void 0 ? void 0 : l.firstFeatureId(n) ?? `${n}.`, d = r || u, p = j(() => d === void 0 && i === void 0 ? void 0 : {
|
|
7648
7648
|
currentScreen: d ?? "",
|
|
7649
7649
|
primaryScreen: d ?? "",
|
|
7650
7650
|
outlets: {},
|
|
@@ -7659,7 +7659,7 @@ var _g = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width &
|
|
|
7659
7659
|
closeDialog: Jt,
|
|
7660
7660
|
closeOutlet: Jt,
|
|
7661
7661
|
back: Jt
|
|
7662
|
-
}, [d, i]), m = t.application.logo, h =
|
|
7662
|
+
}, [d, i]), m = t.application.logo, h = j(() => m ? {
|
|
7663
7663
|
title: m.title,
|
|
7664
7664
|
locked: n !== void 0,
|
|
7665
7665
|
lockedReason: o
|
|
@@ -7668,7 +7668,7 @@ var _g = (e, t) => e.left === t.left && e.top === t.top && e.width === t.width &
|
|
|
7668
7668
|
n,
|
|
7669
7669
|
o
|
|
7670
7670
|
]);
|
|
7671
|
-
if (e.modules.length === 0 && !i) return /* @__PURE__ */ a(
|
|
7671
|
+
if (e.modules.length === 0 && !i) return /* @__PURE__ */ a(re, { children: s });
|
|
7672
7672
|
const f = /* @__PURE__ */ a(Xa.Provider, {
|
|
7673
7673
|
value: h,
|
|
7674
7674
|
children: /* @__PURE__ */ a(jl, {
|
|
@@ -7700,9 +7700,9 @@ function Bg(e, t, n) {
|
|
|
7700
7700
|
if (e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
7701
7701
|
const l = e.key === "ArrowUp" || e.key === "ArrowLeft", c = e.key === "ArrowDown" || e.key === "ArrowRight";
|
|
7702
7702
|
if (l || c)
|
|
7703
|
-
return t.act(l ?
|
|
7703
|
+
return t.act(l ? A.moveEarlier : A.moveLater, s), r();
|
|
7704
7704
|
}
|
|
7705
|
-
return Bo(e) ? (t.act(
|
|
7705
|
+
return Bo(e) ? (t.act(A.delete, s), r()) : !1;
|
|
7706
7706
|
}
|
|
7707
7707
|
function cs(e, t, n) {
|
|
7708
7708
|
if (e.id === t) return n;
|
|
@@ -7783,7 +7783,7 @@ function Kg(e, t = /* @__PURE__ */ new Set()) {
|
|
|
7783
7783
|
property: l.name,
|
|
7784
7784
|
label: l.label ?? l.name
|
|
7785
7785
|
}));
|
|
7786
|
-
return Pe(
|
|
7786
|
+
return Pe(G.Stack, i, `Form ${r}`, [
|
|
7787
7787
|
ue(`${i}-title`, r, "core:text", { text: vr(r) }),
|
|
7788
7788
|
...s.length > 0 ? [ue(`${i}-fields`, `${r} fields`, "core:summary", { typeName: r }, { fields: s })] : [],
|
|
7789
7789
|
ue(`${i}-send`, r, "core:button", { label: vr(r) })
|
|
@@ -7799,7 +7799,7 @@ function ps(e, t) {
|
|
|
7799
7799
|
}
|
|
7800
7800
|
var ms = (e, t) => He(e) ? Math.max(0, t - 1) : t, hs = (e, t, n) => {
|
|
7801
7801
|
const o = ue(`${Hg}${t}`, t, "core:text", { text: `slot: ${t}` });
|
|
7802
|
-
return Pe(
|
|
7802
|
+
return Pe(G.Stack, us(t), t, [...n ? [o] : [], ...e.content?.[t] ?? []]);
|
|
7803
7803
|
}, br = (e) => ({
|
|
7804
7804
|
unitType: ko.Star,
|
|
7805
7805
|
value: e
|
|
@@ -7818,10 +7818,10 @@ function fs(e, t, n, o) {
|
|
|
7818
7818
|
if (s.length === 0) return;
|
|
7819
7819
|
const l = r.kind === "Row" ? "row" : "column";
|
|
7820
7820
|
return r.kind !== "Row" ? {
|
|
7821
|
-
...Pe(
|
|
7821
|
+
...Pe(G.Stack, `template-flow:${l}-${[...n].join("-")}`, l, s.map((c) => c.element)),
|
|
7822
7822
|
spacing: r.gap ?? 8
|
|
7823
7823
|
} : {
|
|
7824
|
-
...Pe(
|
|
7824
|
+
...Pe(G.Grid, `template-flow:${l}-${[...n].join("-")}`, l, s.map((c, u) => ({
|
|
7825
7825
|
...c.element,
|
|
7826
7826
|
properties: {
|
|
7827
7827
|
...c.element.properties,
|
|
@@ -7848,29 +7848,31 @@ function Yg(e, t = !0) {
|
|
|
7848
7848
|
}
|
|
7849
7849
|
var gs = "composition";
|
|
7850
7850
|
function bo(e, t) {
|
|
7851
|
-
const n = e.screens.find((
|
|
7851
|
+
const n = e.screens.find((c) => c.name === le), o = t !== void 0 ? Zn(t, !0) : Zn(void 0), i = Ro(e, o).levels.filter((c) => c.kind === tl.ScreenTemplate).map((c) => c.owner), r = [];
|
|
7852
7852
|
let s;
|
|
7853
|
-
for (const
|
|
7854
|
-
const
|
|
7855
|
-
if (
|
|
7856
|
-
if (
|
|
7857
|
-
const
|
|
7858
|
-
r.push(...
|
|
7853
|
+
for (const c of i) {
|
|
7854
|
+
const u = e.screenTemplates.find((d) => d.name === c);
|
|
7855
|
+
if (u) {
|
|
7856
|
+
if (c === t && Jg(u)) {
|
|
7857
|
+
const d = Yg(u);
|
|
7858
|
+
r.push(...d.elements), s = d.entry;
|
|
7859
7859
|
continue;
|
|
7860
7860
|
}
|
|
7861
|
-
for (const
|
|
7861
|
+
for (const d of u.slots) r.push(...u.content?.[d.name] ?? []);
|
|
7862
7862
|
}
|
|
7863
7863
|
}
|
|
7864
|
+
const l = r.length;
|
|
7864
7865
|
if (t === void 0 || o.kind === an.Screen) {
|
|
7865
|
-
const
|
|
7866
|
-
r.push(...
|
|
7867
|
-
for (const [
|
|
7868
|
-
for (const [
|
|
7866
|
+
const c = n?.slotContent ?? {}, u = n?.native?.slots ?? {};
|
|
7867
|
+
r.push(...c.content ?? [], ...Kn(u[Ze], Ze));
|
|
7868
|
+
for (const [d, p] of Object.entries(c)) d !== "content" && r.push(...p, ...Kn(u[d], d));
|
|
7869
|
+
for (const [d, p] of Object.entries(u)) d !== "content" && !(d in c) && r.push(...Kn(p, d));
|
|
7869
7870
|
r.push(...Kg(n?.forms, Zg(r)));
|
|
7870
7871
|
}
|
|
7871
7872
|
return {
|
|
7872
|
-
element: Pe(
|
|
7873
|
+
element: Pe(G.Stack, gs, "Composition", r),
|
|
7873
7874
|
roots: r,
|
|
7875
|
+
own: r.slice(l),
|
|
7874
7876
|
templates: i,
|
|
7875
7877
|
...s ? { entry: s } : {}
|
|
7876
7878
|
};
|
|
@@ -7882,21 +7884,19 @@ function Zg(e) {
|
|
|
7882
7884
|
};
|
|
7883
7885
|
return e.forEach(n), t;
|
|
7884
7886
|
}
|
|
7885
|
-
function Xg(e
|
|
7886
|
-
|
|
7887
|
-
const n = e.roots.filter((o) => t(o.id) === ne.Local);
|
|
7888
|
-
return Pe(H.Stack, gs, "Composition", n);
|
|
7887
|
+
function Xg(e) {
|
|
7888
|
+
return e.templates.length === 0 ? e.element : Pe(G.Stack, gs, "Composition", e.own);
|
|
7889
7889
|
}
|
|
7890
7890
|
var ev = () => {
|
|
7891
7891
|
}, tv = {
|
|
7892
7892
|
button: "Button",
|
|
7893
7893
|
item: "New item"
|
|
7894
7894
|
}, nv = ({ controller: e, environment: t, resolveBinding: n = ev, configuration: o, strings: i, editorStrings: r, viewportHeight: s, shell: l }) => {
|
|
7895
|
-
const c = J(null), { composition: u, dropRegions: d, selectedId: p } = e, { selectionRect: m, measureNow: h } = mg(c, d, p), { feedback: f, draggedId: v, startMoving: g, endMoving: k, handlers:
|
|
7895
|
+
const c = J(null), { composition: u, dropRegions: d, selectedId: p } = e, { selectionRect: m, measureNow: h } = mg(c, d, p), { feedback: f, draggedId: v, startMoving: g, endMoving: k, handlers: x } = ug(c, h, e), [O, y] = M(), S = ig(e, t), { document: w, context: T } = e, E = j(() => o ?? (w.instanceContributions.length > 0 ? Br(Ro(w, T.scope), w.instanceContributions, T.catalog) : void 0), [
|
|
7896
7896
|
o,
|
|
7897
7897
|
w,
|
|
7898
7898
|
T
|
|
7899
|
-
]), I = r?.designMode ?? fn, C = t.destinations[0], $ =
|
|
7899
|
+
]), I = r?.designMode ?? fn, C = t.destinations[0], $ = j(() => C ? { screen: C.id } : void 0, [C]), U = rh({
|
|
7900
7900
|
controller: e,
|
|
7901
7901
|
environment: t,
|
|
7902
7902
|
strings: I,
|
|
@@ -7904,60 +7904,56 @@ var ev = () => {
|
|
|
7904
7904
|
...$ ? { startingDestination: $ } : {}
|
|
7905
7905
|
});
|
|
7906
7906
|
Te(() => {
|
|
7907
|
-
const
|
|
7908
|
-
if (s !== void 0 || !
|
|
7909
|
-
const
|
|
7910
|
-
return y(
|
|
7907
|
+
const P = c.current?.closest("[data-studio-viewport]") ?? c.current?.parentElement;
|
|
7908
|
+
if (s !== void 0 || !P || typeof ResizeObserver > "u") return;
|
|
7909
|
+
const B = new ResizeObserver(() => y(P.clientHeight));
|
|
7910
|
+
return y(P.clientHeight), B.observe(P), () => B.disconnect();
|
|
7911
7911
|
}, [s]);
|
|
7912
|
-
const
|
|
7913
|
-
if (
|
|
7914
|
-
|
|
7912
|
+
const D = (P) => {
|
|
7913
|
+
if (P.key === "Escape" && l?.peeking) {
|
|
7914
|
+
P.preventDefault(), l.back();
|
|
7915
7915
|
return;
|
|
7916
7916
|
}
|
|
7917
|
-
Bg(
|
|
7918
|
-
const
|
|
7919
|
-
return
|
|
7920
|
-
}) || !Bo(
|
|
7921
|
-
},
|
|
7922
|
-
wg(c, (
|
|
7923
|
-
e.select(
|
|
7917
|
+
Bg(P, U, () => {
|
|
7918
|
+
const B = c.current?.querySelector(".studio-design-toolbar__title");
|
|
7919
|
+
return B?.focus({ preventScroll: !0 }), !!B;
|
|
7920
|
+
}) || !Bo(P) || !e.selectedId || !e.canRemove(e.selectedId) || (P.preventDefault(), e.remove(e.selectedId));
|
|
7921
|
+
}, F = !!e.selectedId && e.ownershipOf(e.selectedId) === oe.Local && e.canRemove(e.selectedId), L = e.selection && (e.selection.name || e.selection.componentName) || "";
|
|
7922
|
+
wg(c, (P, B) => {
|
|
7923
|
+
e.select(P), U.pointItem(P, B);
|
|
7924
7924
|
}, l?.frame !== void 0);
|
|
7925
7925
|
const { setMeasurer: N } = e;
|
|
7926
|
-
|
|
7927
|
-
const
|
|
7928
|
-
if (!
|
|
7929
|
-
const
|
|
7930
|
-
if (
|
|
7931
|
-
left:
|
|
7932
|
-
top:
|
|
7926
|
+
ie(() => (N((P) => {
|
|
7927
|
+
const B = c.current;
|
|
7928
|
+
if (!B) return;
|
|
7929
|
+
const W = B.getBoundingClientRect(), K = B.querySelector(`[data-studio-element="${CSS.escape(P)}"]`)?.closest("[data-scene-placement]")?.getBoundingClientRect();
|
|
7930
|
+
if (K && K.width > 0 && K.height > 0) return {
|
|
7931
|
+
left: K.left - W.left,
|
|
7932
|
+
top: K.top - W.top,
|
|
7933
|
+
width: K.width,
|
|
7934
|
+
height: K.height
|
|
7935
|
+
};
|
|
7936
|
+
const V = Be(B, P, W);
|
|
7937
|
+
return V && {
|
|
7938
|
+
left: V.left,
|
|
7939
|
+
top: V.top,
|
|
7933
7940
|
width: V.width,
|
|
7934
7941
|
height: V.height
|
|
7935
7942
|
};
|
|
7936
|
-
const ie = Be(M, A, G);
|
|
7937
|
-
return ie && {
|
|
7938
|
-
left: ie.left,
|
|
7939
|
-
top: ie.top,
|
|
7940
|
-
width: ie.width,
|
|
7941
|
-
height: ie.height
|
|
7942
|
-
};
|
|
7943
7943
|
}), () => N(void 0)), [N]);
|
|
7944
|
-
const
|
|
7944
|
+
const z = l !== void 0 && l.template.available && !l.template.shown, Q = j(() => z ? Xg(u) : u.element, [z, u]), pe = j(() => Eo(Q, t.runtime.compositionProfile, t.runtime.packages), [
|
|
7945
7945
|
Q,
|
|
7946
|
-
u,
|
|
7947
|
-
W
|
|
7948
|
-
]), he = U(() => Eo(me, t.runtime.compositionProfile, t.runtime.packages), [
|
|
7949
|
-
me,
|
|
7950
7946
|
t.runtime.compositionProfile,
|
|
7951
7947
|
t.runtime.packages
|
|
7952
|
-
]), ce = l?.peeking,
|
|
7953
|
-
const
|
|
7954
|
-
return
|
|
7948
|
+
]), ce = l?.peeking, me = r?.shellPeeking(l?.peekingName ?? "") ?? "", xe = j(() => {
|
|
7949
|
+
const P = l?.frame;
|
|
7950
|
+
return P ? cs(P.element, oi, ce ? yf(ce, me) : pe) : pe;
|
|
7955
7951
|
}, [
|
|
7956
7952
|
l?.frame,
|
|
7957
|
-
|
|
7953
|
+
pe,
|
|
7958
7954
|
ce,
|
|
7959
|
-
|
|
7960
|
-
]),
|
|
7955
|
+
me
|
|
7956
|
+
]), _ = j(() => Qf(t.runtime.registry, i), [t.runtime.registry, i]), ne = j(() => ai(t.runtime), [t.runtime]), fe = j(() => /* @__PURE__ */ a(qr, {
|
|
7961
7957
|
registry: t.runtime.iconAdapters,
|
|
7962
7958
|
children: /* @__PURE__ */ a(zr, {
|
|
7963
7959
|
storage: null,
|
|
@@ -7969,16 +7965,16 @@ var ev = () => {
|
|
|
7969
7965
|
onNavigate: l?.frame ? l.navigate : void 0,
|
|
7970
7966
|
peeking: ce ? l?.peekingName : void 0,
|
|
7971
7967
|
children: /* @__PURE__ */ a(Ao, {
|
|
7972
|
-
element:
|
|
7973
|
-
registry:
|
|
7968
|
+
element: xe,
|
|
7969
|
+
registry: _,
|
|
7974
7970
|
resolveBinding: n,
|
|
7975
7971
|
configuration: E
|
|
7976
7972
|
})
|
|
7977
7973
|
})
|
|
7978
7974
|
})
|
|
7979
7975
|
}), [
|
|
7980
|
-
|
|
7981
|
-
|
|
7976
|
+
xe,
|
|
7977
|
+
_,
|
|
7982
7978
|
t.runtime.iconAdapters,
|
|
7983
7979
|
n,
|
|
7984
7980
|
E,
|
|
@@ -7989,22 +7985,22 @@ var ev = () => {
|
|
|
7989
7985
|
l?.navigate,
|
|
7990
7986
|
l?.peekingName,
|
|
7991
7987
|
ce
|
|
7992
|
-
]), je = s ??
|
|
7988
|
+
]), je = s ?? O, nt = {
|
|
7993
7989
|
...je === void 0 ? {} : { "--studio-surface-viewport-height": `${je}px` },
|
|
7994
7990
|
"--studio-empty-container-label": JSON.stringify(i.emptyContainer)
|
|
7995
7991
|
};
|
|
7996
7992
|
return /* @__PURE__ */ a(Vr, {
|
|
7997
|
-
theme:
|
|
7998
|
-
className: `studio-profile-theme studio-screen-surface-theme ${ri(
|
|
7993
|
+
theme: ne,
|
|
7994
|
+
className: `studio-profile-theme studio-screen-surface-theme ${ri(ne)}`,
|
|
7999
7995
|
children: /* @__PURE__ */ b("div", {
|
|
8000
7996
|
ref: c,
|
|
8001
7997
|
className: "studio-screen-surface",
|
|
8002
|
-
style:
|
|
7998
|
+
style: nt,
|
|
8003
7999
|
"data-studio-dragging": f ? "true" : void 0,
|
|
8004
|
-
onKeyDown:
|
|
8000
|
+
onKeyDown: D,
|
|
8005
8001
|
tabIndex: -1,
|
|
8006
|
-
...
|
|
8007
|
-
children: [
|
|
8002
|
+
...x,
|
|
8003
|
+
children: [fe, /* @__PURE__ */ b("div", {
|
|
8008
8004
|
className: "studio-screen-surface__chrome",
|
|
8009
8005
|
children: [
|
|
8010
8006
|
m && /* @__PURE__ */ a("div", {
|
|
@@ -8012,7 +8008,7 @@ var ev = () => {
|
|
|
8012
8008
|
"data-moving": v === e.selectedId ? "true" : void 0,
|
|
8013
8009
|
style: m
|
|
8014
8010
|
}),
|
|
8015
|
-
m &&
|
|
8011
|
+
m && F && /* @__PURE__ */ a("div", {
|
|
8016
8012
|
className: "studio-screen-surface__grip",
|
|
8017
8013
|
style: {
|
|
8018
8014
|
left: m.left,
|
|
@@ -8020,9 +8016,9 @@ var ev = () => {
|
|
|
8020
8016
|
},
|
|
8021
8017
|
draggable: !0,
|
|
8022
8018
|
"aria-hidden": "true",
|
|
8023
|
-
title: i.moveHandle(
|
|
8024
|
-
onDragStart: (
|
|
8025
|
-
g(e.selectedId), Dh(
|
|
8019
|
+
title: i.moveHandle(L),
|
|
8020
|
+
onDragStart: (P) => {
|
|
8021
|
+
g(e.selectedId), Dh(P, e.selectedId, L);
|
|
8026
8022
|
},
|
|
8027
8023
|
onDragEnd: k,
|
|
8028
8024
|
children: /* @__PURE__ */ a(vc, { "aria-hidden": "true" })
|
|
@@ -8042,7 +8038,7 @@ var ev = () => {
|
|
|
8042
8038
|
}),
|
|
8043
8039
|
r && /* @__PURE__ */ a(Rg, {
|
|
8044
8040
|
surface: c,
|
|
8045
|
-
state:
|
|
8041
|
+
state: U,
|
|
8046
8042
|
controller: e,
|
|
8047
8043
|
environment: t,
|
|
8048
8044
|
editorStrings: r,
|
|
@@ -8059,7 +8055,7 @@ var ev = () => {
|
|
|
8059
8055
|
})
|
|
8060
8056
|
});
|
|
8061
8057
|
}, yr = 40, vs = ({ controller: e, environment: t, strings: n, window: o, authoringTemplate: i, deviceFrame: r = !1, saveFailure: s, onKeepEditing: l, onDiscard: c, onSave: u, isSaving: d = !1, onPreview: p }) => {
|
|
8062
|
-
const m = xf(e.document, t.runtime, i, void 0, e.composition.templates.length > 0), h = !!e.selectedId && e.canRemove(e.selectedId), f = /* @__PURE__ */ b(
|
|
8058
|
+
const m = xf(e.document, t.runtime, i, void 0, e.composition.templates.length > 0), h = !!e.selectedId && e.canRemove(e.selectedId), f = /* @__PURE__ */ b(re, { children: [
|
|
8063
8059
|
/* @__PURE__ */ a("span", {
|
|
8064
8060
|
className: "studio-screen-editor-window__state",
|
|
8065
8061
|
role: "status",
|
|
@@ -8177,7 +8173,7 @@ var ev = () => {
|
|
|
8177
8173
|
});
|
|
8178
8174
|
};
|
|
8179
8175
|
function ov(e, t, n) {
|
|
8180
|
-
const o = e.screens.find((l) => l.name ===
|
|
8176
|
+
const o = e.screens.find((l) => l.name === le);
|
|
8181
8177
|
if (!o || o.screenTemplate === t?.name) return e;
|
|
8182
8178
|
const i = o.screenTemplate, r = e.screens.map((l) => {
|
|
8183
8179
|
if (l !== o) return l;
|
|
@@ -8241,15 +8237,15 @@ function av(e, t) {
|
|
|
8241
8237
|
if (e.targetParentId !== null)
|
|
8242
8238
|
return {
|
|
8243
8239
|
kind: Z.MoveNode,
|
|
8244
|
-
nodeId:
|
|
8245
|
-
target: ps(e.targetParentId, t) ??
|
|
8240
|
+
nodeId: ae(e.nodeId),
|
|
8241
|
+
target: ps(e.targetParentId, t) ?? ae(e.targetParentId),
|
|
8246
8242
|
index: ms(e.targetParentId, e.index)
|
|
8247
8243
|
};
|
|
8248
8244
|
}
|
|
8249
8245
|
function ks(e, t, n, o) {
|
|
8250
8246
|
return {
|
|
8251
8247
|
kind: Z.InsertNode,
|
|
8252
|
-
target: ps(e, o) ??
|
|
8248
|
+
target: ps(e, o) ?? ae(e),
|
|
8253
8249
|
index: ms(e, t),
|
|
8254
8250
|
element: n
|
|
8255
8251
|
};
|
|
@@ -8257,7 +8253,7 @@ function ks(e, t, n, o) {
|
|
|
8257
8253
|
function sv(e) {
|
|
8258
8254
|
return {
|
|
8259
8255
|
kind: Z.RemoveNode,
|
|
8260
|
-
nodeId:
|
|
8256
|
+
nodeId: ae(e)
|
|
8261
8257
|
};
|
|
8262
8258
|
}
|
|
8263
8259
|
var Ss = (e, t) => (e?.children ?? []).map((n) => {
|
|
@@ -8276,7 +8272,7 @@ function lv(e, t, n, o) {
|
|
|
8276
8272
|
const u = l && c && r.id === t.targetParentId, d = u ? r.children.findIndex((m) => m.id === t.nodeId) : t.index, p = c ? ys(i, n ?? (u ? ws(i) : void 0) ?? bs(Ss(s, o))) : rv(i);
|
|
8277
8273
|
return [{
|
|
8278
8274
|
kind: Z.RemoveNode,
|
|
8279
|
-
nodeId:
|
|
8275
|
+
nodeId: ae(t.nodeId)
|
|
8280
8276
|
}, ks(t.targetParentId, d, p)];
|
|
8281
8277
|
}
|
|
8282
8278
|
function cv(e) {
|
|
@@ -8451,17 +8447,17 @@ function Rt(e, t, n) {
|
|
|
8451
8447
|
}
|
|
8452
8448
|
var yo = (e) => e.id, wv = (e) => e.name || yo(e), kv = (e) => {
|
|
8453
8449
|
switch (e) {
|
|
8454
|
-
case
|
|
8450
|
+
case G.Stack:
|
|
8455
8451
|
return Y.Column;
|
|
8456
|
-
case
|
|
8452
|
+
case G.Row:
|
|
8457
8453
|
return Y.Row;
|
|
8458
|
-
case
|
|
8454
|
+
case G.Grid:
|
|
8459
8455
|
return Y.Grid;
|
|
8460
|
-
case
|
|
8456
|
+
case G.Wrap:
|
|
8461
8457
|
return Y.Wrap;
|
|
8462
|
-
case
|
|
8458
|
+
case G.Canvas:
|
|
8463
8459
|
return Y.Freeform;
|
|
8464
|
-
case
|
|
8460
|
+
case G.Container:
|
|
8465
8461
|
return Y.Grouping;
|
|
8466
8462
|
case void 0:
|
|
8467
8463
|
return;
|
|
@@ -8480,7 +8476,7 @@ function Sv(e) {
|
|
|
8480
8476
|
slots: { children: n }
|
|
8481
8477
|
} : t,
|
|
8482
8478
|
acceptsChildren: (t) => Yt(t),
|
|
8483
|
-
ownershipOf: (t) => e(yo(t)) ??
|
|
8479
|
+
ownershipOf: (t) => e(yo(t)) ?? oe.Local,
|
|
8484
8480
|
arrangementOf: (t) => Yt(t) ? kv(ma(t)) : void 0
|
|
8485
8481
|
};
|
|
8486
8482
|
}
|
|
@@ -8509,31 +8505,31 @@ function Sr(e, t, n) {
|
|
|
8509
8505
|
function Nv(e) {
|
|
8510
8506
|
switch (e) {
|
|
8511
8507
|
case mi.Inherited:
|
|
8512
|
-
return
|
|
8508
|
+
return oe.Inherited;
|
|
8513
8509
|
case mi.ConfigurableInherited:
|
|
8514
|
-
return
|
|
8510
|
+
return oe.ConfigurableInherited;
|
|
8515
8511
|
default:
|
|
8516
|
-
return
|
|
8512
|
+
return oe.Local;
|
|
8517
8513
|
}
|
|
8518
8514
|
}
|
|
8519
8515
|
function Iv(e, t, n) {
|
|
8520
8516
|
const o = /* @__PURE__ */ new Map();
|
|
8521
8517
|
for (const i of Ds(t)) {
|
|
8522
8518
|
if (He(i)) {
|
|
8523
|
-
o.set(i,
|
|
8519
|
+
o.set(i, oe.Local);
|
|
8524
8520
|
continue;
|
|
8525
8521
|
}
|
|
8526
|
-
const r = Po(e,
|
|
8527
|
-
o.set(i, r ? Nv(r.provenance.kind) :
|
|
8522
|
+
const r = Po(e, ae(i), n);
|
|
8523
|
+
o.set(i, r ? Nv(r.provenance.kind) : oe.Inherited);
|
|
8528
8524
|
}
|
|
8529
|
-
return (i) => o.get(i) ??
|
|
8525
|
+
return (i) => o.get(i) ?? oe.Local;
|
|
8530
8526
|
}
|
|
8531
8527
|
function Pv(e) {
|
|
8532
|
-
const [t, n] =
|
|
8528
|
+
const [t, n] = M({
|
|
8533
8529
|
catalog: e,
|
|
8534
8530
|
times: 0
|
|
8535
8531
|
});
|
|
8536
|
-
return
|
|
8532
|
+
return ie(() => {
|
|
8537
8533
|
let o = !0;
|
|
8538
8534
|
const i = () => {
|
|
8539
8535
|
o && n((r) => ({
|
|
@@ -8547,23 +8543,23 @@ function Pv(e) {
|
|
|
8547
8543
|
}, [e]), t.catalog === e ? t.times : 0;
|
|
8548
8544
|
}
|
|
8549
8545
|
function Ov(e, t) {
|
|
8550
|
-
|
|
8546
|
+
j(() => t?.(e), [e, t]), ie(() => t?.(e), [e, t]);
|
|
8551
8547
|
}
|
|
8552
8548
|
var xv = { modules: [] }, Rv = (e, t) => wo(e, t)?.id;
|
|
8553
8549
|
function Cs(e, t, n, o) {
|
|
8554
|
-
const [i, r] =
|
|
8550
|
+
const [i, r] = M(() => pv(e.document)), s = J(void 0);
|
|
8555
8551
|
s.current ??= new uv(i, r);
|
|
8556
|
-
const l =
|
|
8557
|
-
const
|
|
8558
|
-
return
|
|
8559
|
-
height:
|
|
8560
|
-
bottom:
|
|
8552
|
+
const l = H((P) => s.current.commit(P), []), [c, u] = M(), [d, p] = M(), [m, h] = M(n.navigation?.module), f = J(void 0), v = H((P, B) => {
|
|
8553
|
+
const W = f.current?.(P), K = f.current?.(B);
|
|
8554
|
+
return W && K ? {
|
|
8555
|
+
height: W.height,
|
|
8556
|
+
bottom: W.top + W.height - K.top
|
|
8561
8557
|
} : void 0;
|
|
8562
|
-
}, []), g =
|
|
8563
|
-
f.current =
|
|
8558
|
+
}, []), g = H((P) => {
|
|
8559
|
+
f.current = P;
|
|
8564
8560
|
}, []), k = Pv(n.runtime.icons);
|
|
8565
8561
|
Ov(n.stateChangeSlices, n.registerDesignTimeCommands);
|
|
8566
|
-
const
|
|
8562
|
+
const x = j(() => ({
|
|
8567
8563
|
catalog: n.runtime.catalog,
|
|
8568
8564
|
scope: Zn(t, t !== void 0),
|
|
8569
8565
|
queryCandidates: [...n.queryCandidates],
|
|
@@ -8572,141 +8568,141 @@ function Cs(e, t, n, o) {
|
|
|
8572
8568
|
n,
|
|
8573
8569
|
t,
|
|
8574
8570
|
k
|
|
8575
|
-
]),
|
|
8571
|
+
]), O = j(() => bo(i.document, t), [i.document, t]), y = j(() => Iv(i.document, O.roots, x), [
|
|
8576
8572
|
i.document,
|
|
8577
|
-
|
|
8578
|
-
|
|
8579
|
-
]), S =
|
|
8580
|
-
|
|
8573
|
+
O,
|
|
8574
|
+
x
|
|
8575
|
+
]), S = j(() => Sv(y), [y]), w = Nt(i.document, t), T = j(() => dv(O.roots, Cv(w), S).filter((P) => P.containerId !== null), [
|
|
8576
|
+
O,
|
|
8581
8577
|
w,
|
|
8582
8578
|
S
|
|
8583
|
-
]), E = c ? Ge(
|
|
8579
|
+
]), E = c ? Ge(O.roots, c) : void 0, I = j(() => c ? Po(i.document, ae(c), x) : void 0, [
|
|
8584
8580
|
i.document,
|
|
8585
8581
|
c,
|
|
8586
|
-
|
|
8587
|
-
]), C =
|
|
8588
|
-
const
|
|
8582
|
+
x
|
|
8583
|
+
]), C = H((P, B) => {
|
|
8584
|
+
const W = s.current.current, K = l((V) => mv(V, P, x, B));
|
|
8589
8585
|
return {
|
|
8590
|
-
applied:
|
|
8591
|
-
diagnostics:
|
|
8586
|
+
applied: K.undoable.length > W.undoable.length || K.document !== W.document,
|
|
8587
|
+
diagnostics: K.diagnostics
|
|
8592
8588
|
};
|
|
8593
|
-
}, [l,
|
|
8594
|
-
C(
|
|
8595
|
-
}, [C]),
|
|
8596
|
-
const
|
|
8589
|
+
}, [l, x]), $ = H((P, B) => {
|
|
8590
|
+
C(P, B);
|
|
8591
|
+
}, [C]), U = H((P, B) => {
|
|
8592
|
+
const W = s.current.current, K = l((V) => hv(V, P, x, B));
|
|
8597
8593
|
return {
|
|
8598
|
-
applied:
|
|
8599
|
-
diagnostics:
|
|
8594
|
+
applied: K.document !== W.document,
|
|
8595
|
+
diagnostics: K.diagnostics
|
|
8600
8596
|
};
|
|
8601
|
-
}, [l,
|
|
8602
|
-
const
|
|
8597
|
+
}, [l, x]), D = H((P, B) => {
|
|
8598
|
+
const W = P ?? w?.id ?? O.entry, K = W ? Ge(O.roots, W)?.children ?? [] : [];
|
|
8603
8599
|
return {
|
|
8604
|
-
parent:
|
|
8605
|
-
index:
|
|
8600
|
+
parent: W,
|
|
8601
|
+
index: B ?? K.length
|
|
8606
8602
|
};
|
|
8607
|
-
}, [w,
|
|
8608
|
-
|
|
8609
|
-
const
|
|
8610
|
-
const Ue =
|
|
8603
|
+
}, [w, O]), F = J(o);
|
|
8604
|
+
F.current = o;
|
|
8605
|
+
const L = H((P, B, W, K, V, de) => {
|
|
8606
|
+
const Ue = D(B, W);
|
|
8611
8607
|
if (!Ue.parent) return;
|
|
8612
|
-
const ot = Ge(bo(s.current.current.document, t).roots, Ue.parent), xs = ot && vt(ot) ? ys(
|
|
8613
|
-
C(ks(Ue.parent, Ue.index, xs, t),
|
|
8608
|
+
const ot = Ge(bo(s.current.current.document, t).roots, Ue.parent), xs = ot && vt(ot) ? ys(P, V ?? bs(Ss(ot, v))) : P;
|
|
8609
|
+
C(ks(Ue.parent, Ue.index, xs, t), K).applied && (u(P.id), de && F.current?.(de));
|
|
8614
8610
|
}, [
|
|
8615
8611
|
C,
|
|
8616
|
-
|
|
8612
|
+
D,
|
|
8617
8613
|
t,
|
|
8618
8614
|
v
|
|
8619
|
-
]), N =
|
|
8620
|
-
if (He(
|
|
8621
|
-
const
|
|
8622
|
-
if (
|
|
8623
|
-
if (
|
|
8624
|
-
const V = av(
|
|
8615
|
+
]), N = H((P, B) => {
|
|
8616
|
+
if (He(P.nodeId)) return te.NodeLocked;
|
|
8617
|
+
const W = lv(O.roots, P, B, v), K = Sr(O.roots, P, S);
|
|
8618
|
+
if (K && !(K === te.NoChange && W && P.targetParentId === Rv(O.roots, P.nodeId))) return K;
|
|
8619
|
+
if (W) return U(W, "Move").applied ? void 0 : te.NodeLocked;
|
|
8620
|
+
const V = av(P, t);
|
|
8625
8621
|
return V ? C(V, "Move").applied ? void 0 : te.NodeLocked : te.TargetNotContainer;
|
|
8626
8622
|
}, [
|
|
8627
|
-
|
|
8623
|
+
O,
|
|
8628
8624
|
S,
|
|
8629
8625
|
C,
|
|
8630
|
-
|
|
8626
|
+
U,
|
|
8631
8627
|
t
|
|
8632
|
-
]),
|
|
8633
|
-
l((
|
|
8634
|
-
const
|
|
8628
|
+
]), z = H((P, B) => {
|
|
8629
|
+
l((W) => {
|
|
8630
|
+
const K = W.document.screens.map((V) => V.name === "Screen" ? {
|
|
8635
8631
|
...V,
|
|
8636
|
-
forms:
|
|
8632
|
+
forms: P
|
|
8637
8633
|
} : V);
|
|
8638
|
-
return De(
|
|
8639
|
-
...
|
|
8640
|
-
screens:
|
|
8641
|
-
},
|
|
8634
|
+
return De(W, {
|
|
8635
|
+
...W.document,
|
|
8636
|
+
screens: K
|
|
8637
|
+
}, B);
|
|
8642
8638
|
});
|
|
8643
|
-
}, [l]), Q =
|
|
8644
|
-
l((
|
|
8645
|
-
const V =
|
|
8646
|
-
...
|
|
8647
|
-
outlets:
|
|
8648
|
-
} :
|
|
8649
|
-
return De(
|
|
8650
|
-
...
|
|
8639
|
+
}, [l]), Q = H((P, B, W) => {
|
|
8640
|
+
l((K) => {
|
|
8641
|
+
const V = K.document.screenTemplates.map((de) => de.name === P ? {
|
|
8642
|
+
...de,
|
|
8643
|
+
outlets: B
|
|
8644
|
+
} : de);
|
|
8645
|
+
return De(K, {
|
|
8646
|
+
...K.document,
|
|
8651
8647
|
screenTemplates: V
|
|
8652
|
-
},
|
|
8648
|
+
}, W);
|
|
8653
8649
|
});
|
|
8654
|
-
}, [l]),
|
|
8655
|
-
l((
|
|
8656
|
-
const V =
|
|
8657
|
-
if (
|
|
8658
|
-
const { metadata: Ue, ...ot } =
|
|
8659
|
-
return
|
|
8650
|
+
}, [l]), pe = H((P, B, W) => {
|
|
8651
|
+
l((K) => {
|
|
8652
|
+
const V = K.document.screenTemplates.map((de) => {
|
|
8653
|
+
if (de.name !== P) return de;
|
|
8654
|
+
const { metadata: Ue, ...ot } = de;
|
|
8655
|
+
return B ? {
|
|
8660
8656
|
...ot,
|
|
8661
|
-
metadata:
|
|
8657
|
+
metadata: B
|
|
8662
8658
|
} : ot;
|
|
8663
8659
|
});
|
|
8664
|
-
return De(
|
|
8665
|
-
...
|
|
8660
|
+
return De(K, {
|
|
8661
|
+
...K.document,
|
|
8666
8662
|
screenTemplates: V
|
|
8667
|
-
},
|
|
8663
|
+
}, W);
|
|
8668
8664
|
});
|
|
8669
|
-
}, [l]),
|
|
8670
|
-
l((
|
|
8671
|
-
...
|
|
8672
|
-
dialogTemplates:
|
|
8673
|
-
},
|
|
8674
|
-
}, [l]),
|
|
8675
|
-
l((
|
|
8676
|
-
}, [l]), xe =
|
|
8677
|
-
const
|
|
8678
|
-
l((
|
|
8665
|
+
}, [l]), ce = H((P, B) => {
|
|
8666
|
+
l((W) => De(W, {
|
|
8667
|
+
...W.document,
|
|
8668
|
+
dialogTemplates: P
|
|
8669
|
+
}, B));
|
|
8670
|
+
}, [l]), me = H((P, B, W, K, V) => {
|
|
8671
|
+
l((de) => De(de, kr(de.document, P, (Ue) => Dv(Ue, B, W, K)), V));
|
|
8672
|
+
}, [l]), xe = H((P, B) => {
|
|
8673
|
+
const W = [...n.runtime.bundles.flatMap((K) => K.screenTemplates ?? []), ...n.ownTemplates ?? []];
|
|
8674
|
+
l((K) => De(K, ov(K.document, P, W), B));
|
|
8679
8675
|
}, [
|
|
8680
8676
|
l,
|
|
8681
8677
|
n.runtime.bundles,
|
|
8682
8678
|
n.ownTemplates
|
|
8683
|
-
]),
|
|
8684
|
-
l((
|
|
8685
|
-
|
|
8686
|
-
}),
|
|
8687
|
-
}, [l]),
|
|
8688
|
-
const
|
|
8689
|
-
return
|
|
8679
|
+
]), _ = H((P, B, W) => {
|
|
8680
|
+
l((K) => De(K, kr(K.document, P, (V) => {
|
|
8681
|
+
B ? V.behaviors = B : delete V.behaviors;
|
|
8682
|
+
}), W));
|
|
8683
|
+
}, [l]), ne = j(() => Gi(i.document), [i.document]), fe = n.navigation?.structure ?? xv, je = H((P, B) => {
|
|
8684
|
+
const W = sl(Gi(s.current.current.document), P);
|
|
8685
|
+
return W.applied ? (l((K) => De(K, Vm(K.document, W.model), B)), { applied: !0 }) : {
|
|
8690
8686
|
applied: !1,
|
|
8691
|
-
rejected:
|
|
8687
|
+
rejected: W.rejected
|
|
8692
8688
|
};
|
|
8693
|
-
}, [l]),
|
|
8694
|
-
p(
|
|
8695
|
-
componentId:
|
|
8696
|
-
itemId:
|
|
8689
|
+
}, [l]), nt = H((P, B) => {
|
|
8690
|
+
p(P && B ? {
|
|
8691
|
+
componentId: P,
|
|
8692
|
+
itemId: B
|
|
8697
8693
|
} : void 0);
|
|
8698
8694
|
}, []);
|
|
8699
8695
|
return {
|
|
8700
|
-
navigation:
|
|
8696
|
+
navigation: ne,
|
|
8701
8697
|
structure: fe,
|
|
8702
8698
|
navigationModule: m,
|
|
8703
|
-
applyNavigationEdits:
|
|
8699
|
+
applyNavigationEdits: je,
|
|
8704
8700
|
setNavigationModule: h,
|
|
8705
8701
|
selectedItemId: d && d.componentId === c ? d.itemId : void 0,
|
|
8706
|
-
selectItem:
|
|
8702
|
+
selectItem: nt,
|
|
8707
8703
|
document: i.document,
|
|
8708
|
-
composition:
|
|
8709
|
-
context:
|
|
8704
|
+
composition: O,
|
|
8705
|
+
context: x,
|
|
8710
8706
|
selectedId: c,
|
|
8711
8707
|
selection: E,
|
|
8712
8708
|
inspection: I,
|
|
@@ -8718,24 +8714,24 @@ function Cs(e, t, n, o) {
|
|
|
8718
8714
|
setMeasurer: g,
|
|
8719
8715
|
apply: $,
|
|
8720
8716
|
tryApply: C,
|
|
8721
|
-
applyAll:
|
|
8717
|
+
applyAll: U,
|
|
8722
8718
|
move: N,
|
|
8723
|
-
validateMove: (
|
|
8724
|
-
insertComponent: (
|
|
8725
|
-
insertLayout: (
|
|
8726
|
-
remove: (
|
|
8727
|
-
if (He(
|
|
8728
|
-
const
|
|
8729
|
-
C(sv(
|
|
8719
|
+
validateMove: (P) => He(P.nodeId) ? te.NodeLocked : Sr(O.roots, P, S),
|
|
8720
|
+
insertComponent: (P, B, W, K) => L(ue(yt(), P, P), B, W, "Add", K, P),
|
|
8721
|
+
insertLayout: (P, B, W, K) => L(Pe(P, yt(), P), B, W, "Add layout", K, `layout:${P}`),
|
|
8722
|
+
remove: (P) => {
|
|
8723
|
+
if (He(P) || !to(O.roots, P, S)) return;
|
|
8724
|
+
const B = ga(O.roots, P, S);
|
|
8725
|
+
C(sv(P), "Remove").applied && u((W) => W === P || W === void 0 ? B : W);
|
|
8730
8726
|
},
|
|
8731
|
-
canRemove: (
|
|
8732
|
-
setProperty: (
|
|
8733
|
-
setScreenForms:
|
|
8727
|
+
canRemove: (P) => !He(P) && to(O.roots, P, S),
|
|
8728
|
+
setProperty: (P, B) => c && $(so(c, P, B), "Change"),
|
|
8729
|
+
setScreenForms: z,
|
|
8734
8730
|
setScreenTemplateOutlets: Q,
|
|
8735
|
-
setScreenTemplateMetadata:
|
|
8736
|
-
setDialogTemplates:
|
|
8737
|
-
setCollectionItemDestination:
|
|
8738
|
-
setElementBehaviors:
|
|
8731
|
+
setScreenTemplateMetadata: pe,
|
|
8732
|
+
setDialogTemplates: ce,
|
|
8733
|
+
setCollectionItemDestination: me,
|
|
8734
|
+
setElementBehaviors: _,
|
|
8739
8735
|
setScreenTemplate: xe,
|
|
8740
8736
|
markSaved: () => {
|
|
8741
8737
|
l(yv);
|
|
@@ -8778,7 +8774,7 @@ var Cr = () => ({
|
|
|
8778
8774
|
onClose: () => e.onDismiss?.(),
|
|
8779
8775
|
children: /* @__PURE__ */ a($v, { ...e })
|
|
8780
8776
|
}), $v = (e) => {
|
|
8781
|
-
const t =
|
|
8777
|
+
const t = j(() => Ua(e.subject, e.environment.runtime), [e.subject, e.environment.runtime]);
|
|
8782
8778
|
return t.opened ? /* @__PURE__ */ a(Ev, {
|
|
8783
8779
|
...e,
|
|
8784
8780
|
opened: t.subject
|
|
@@ -8794,19 +8790,19 @@ var Cr = () => ({
|
|
|
8794
8790
|
})
|
|
8795
8791
|
});
|
|
8796
8792
|
}, Ev = ({ subject: e, environment: t, strings: n, layoutLabels: o, icons: i, paletteSources: r, sourceRect: s, initialSize: l, rememberWindowAs: c, windowMemory: u, centerOffsetX: d, renderPaletteHost: p, onClose: m, onBeforeClose: h, onPreview: f, opened: v }) => {
|
|
8797
|
-
const g = J(void 0), k = Cs(v, e.authoringTemplate, t, (
|
|
8798
|
-
remembered: c ?
|
|
8793
|
+
const g = J(void 0), k = Cs(v, e.authoringTemplate, t, (L) => g.current?.(L)), x = j(() => u ?? rf(), [u]), O = j(() => lf({
|
|
8794
|
+
remembered: c ? x.read(c) : void 0,
|
|
8799
8795
|
saved: l,
|
|
8800
|
-
lastUsed:
|
|
8801
|
-
}, Cr()), []), y =
|
|
8802
|
-
c &&
|
|
8803
|
-
}, [
|
|
8804
|
-
y(
|
|
8796
|
+
lastUsed: x.readLastUsed()
|
|
8797
|
+
}, Cr()), []), y = H((L) => {
|
|
8798
|
+
c && x.write(c, L);
|
|
8799
|
+
}, [x, c]), S = H((L) => {
|
|
8800
|
+
y(L);
|
|
8805
8801
|
const N = Nt(k.document, e.authoringTemplate);
|
|
8806
8802
|
m({
|
|
8807
8803
|
document: It(k.document, e.screen),
|
|
8808
8804
|
legacyElements: en(N, t.runtime.legacyTypeOf),
|
|
8809
|
-
windowSize:
|
|
8805
|
+
windowSize: L,
|
|
8810
8806
|
layout: nn(N),
|
|
8811
8807
|
changed: k.isDirty
|
|
8812
8808
|
});
|
|
@@ -8817,15 +8813,15 @@ var Cr = () => ({
|
|
|
8817
8813
|
y,
|
|
8818
8814
|
e.authoringTemplate,
|
|
8819
8815
|
e.screen
|
|
8820
|
-
]), [w, T] =
|
|
8821
|
-
y(
|
|
8822
|
-
const N = Nt(k.document, e.authoringTemplate),
|
|
8816
|
+
]), [w, T] = M(), E = H(async (L) => {
|
|
8817
|
+
y(L);
|
|
8818
|
+
const N = Nt(k.document, e.authoringTemplate), z = {
|
|
8823
8819
|
document: It(k.document, e.screen),
|
|
8824
8820
|
legacyElements: en(N, t.runtime.legacyTypeOf),
|
|
8825
|
-
windowSize:
|
|
8821
|
+
windowSize: L,
|
|
8826
8822
|
layout: nn(N),
|
|
8827
8823
|
changed: k.isDirty
|
|
8828
|
-
}, Q = await h?.(
|
|
8824
|
+
}, Q = await h?.(z);
|
|
8829
8825
|
return T(Q), !Q;
|
|
8830
8826
|
}, [
|
|
8831
8827
|
k,
|
|
@@ -8834,18 +8830,18 @@ var Cr = () => ({
|
|
|
8834
8830
|
y,
|
|
8835
8831
|
e.authoringTemplate,
|
|
8836
8832
|
e.screen
|
|
8837
|
-
]), [I, C] =
|
|
8833
|
+
]), [I, C] = M(!1), $ = H(async (L) => {
|
|
8838
8834
|
if (!(!h || !k.isDirty)) {
|
|
8839
8835
|
C(!0);
|
|
8840
8836
|
try {
|
|
8841
|
-
const N = Nt(k.document, e.authoringTemplate),
|
|
8837
|
+
const N = Nt(k.document, e.authoringTemplate), z = await h({
|
|
8842
8838
|
document: It(k.document, e.screen),
|
|
8843
8839
|
legacyElements: en(N, t.runtime.legacyTypeOf),
|
|
8844
|
-
windowSize:
|
|
8840
|
+
windowSize: L,
|
|
8845
8841
|
layout: nn(N),
|
|
8846
8842
|
changed: !0
|
|
8847
8843
|
});
|
|
8848
|
-
T(
|
|
8844
|
+
T(z), z || k.markSaved();
|
|
8849
8845
|
} finally {
|
|
8850
8846
|
C(!1);
|
|
8851
8847
|
}
|
|
@@ -8856,36 +8852,36 @@ var Cr = () => ({
|
|
|
8856
8852
|
h,
|
|
8857
8853
|
e.authoringTemplate,
|
|
8858
8854
|
e.screen
|
|
8859
|
-
]), { palette:
|
|
8855
|
+
]), { palette: U, recordInserted: D } = ja({
|
|
8860
8856
|
strings: n,
|
|
8861
8857
|
layoutLabels: o,
|
|
8862
8858
|
icons: i,
|
|
8863
8859
|
paletteSources: r,
|
|
8864
|
-
onAdd: (
|
|
8860
|
+
onAdd: (L) => F(L.payload)
|
|
8865
8861
|
});
|
|
8866
|
-
g.current =
|
|
8867
|
-
function L
|
|
8868
|
-
if (!Zo(
|
|
8862
|
+
g.current = D;
|
|
8863
|
+
function F(L) {
|
|
8864
|
+
if (!Zo(L)) return;
|
|
8869
8865
|
const N = k.selection && Av(k) ? k.selectedId : void 0;
|
|
8870
|
-
|
|
8866
|
+
L.kind === "layout" ? k.insertLayout(L.item, N, void 0) : k.insertComponent(ei(L.componentName, L.package), N, void 0);
|
|
8871
8867
|
}
|
|
8872
8868
|
return /* @__PURE__ */ b(Ja, {
|
|
8873
8869
|
environment: t,
|
|
8874
|
-
children: [p ? p(
|
|
8870
|
+
children: [p ? p(U) : /* @__PURE__ */ a(za, {
|
|
8875
8871
|
placement: "floating",
|
|
8876
|
-
children:
|
|
8872
|
+
children: U
|
|
8877
8873
|
}), /* @__PURE__ */ a(da, {
|
|
8878
8874
|
sourceRect: s,
|
|
8879
|
-
initialSize:
|
|
8875
|
+
initialSize: O,
|
|
8880
8876
|
centerOffsetX: d,
|
|
8881
8877
|
canClose: E,
|
|
8882
8878
|
onClosed: S,
|
|
8883
|
-
renderInspector: (
|
|
8879
|
+
renderInspector: (L) => /* @__PURE__ */ a(Aa, {
|
|
8884
8880
|
strings: n,
|
|
8885
8881
|
controller: k,
|
|
8886
8882
|
environment: t,
|
|
8887
8883
|
authoringTemplate: e.authoringTemplate,
|
|
8888
|
-
onClose:
|
|
8884
|
+
onClose: L.toggleInspector,
|
|
8889
8885
|
structure: /* @__PURE__ */ a(ya, {
|
|
8890
8886
|
roots: k.composition.roots,
|
|
8891
8887
|
adapter: k.adapter,
|
|
@@ -8896,20 +8892,20 @@ var Cr = () => ({
|
|
|
8896
8892
|
onRemove: k.remove
|
|
8897
8893
|
})
|
|
8898
8894
|
}),
|
|
8899
|
-
children: (
|
|
8895
|
+
children: (L) => /* @__PURE__ */ a(vs, {
|
|
8900
8896
|
controller: k,
|
|
8901
8897
|
environment: t,
|
|
8902
8898
|
strings: n,
|
|
8903
8899
|
window: {
|
|
8904
|
-
...
|
|
8900
|
+
...L,
|
|
8905
8901
|
available: Cr()
|
|
8906
8902
|
},
|
|
8907
8903
|
authoringTemplate: e.authoringTemplate,
|
|
8908
8904
|
saveFailure: w,
|
|
8909
8905
|
onKeepEditing: () => T(void 0),
|
|
8910
|
-
onDiscard:
|
|
8906
|
+
onDiscard: L.closeWithoutSaving,
|
|
8911
8907
|
onSave: h ? () => {
|
|
8912
|
-
$(
|
|
8908
|
+
$(L.size);
|
|
8913
8909
|
} : void 0,
|
|
8914
8910
|
isSaving: I,
|
|
8915
8911
|
onPreview: f
|
|
@@ -8937,97 +8933,97 @@ function Fv(e, t) {
|
|
|
8937
8933
|
}
|
|
8938
8934
|
return n;
|
|
8939
8935
|
}
|
|
8940
|
-
var dt = "p-anchored-overlay", Qt = "p-collapsible", Gn = "p-overlay-mask",
|
|
8936
|
+
var dt = "p-anchored-overlay", Qt = "p-collapsible", Gn = "p-overlay-mask", R = (e, t) => ({ props: t ? {
|
|
8941
8937
|
styles: e,
|
|
8942
8938
|
motionProps: { name: t }
|
|
8943
|
-
} : { styles: e } }),
|
|
8944
|
-
"Accordion.Root":
|
|
8945
|
-
"AutoComplete.Root":
|
|
8946
|
-
"AutoComplete.Popup":
|
|
8947
|
-
"Avatar.Root":
|
|
8948
|
-
AvatarGroup:
|
|
8949
|
-
Badge:
|
|
8950
|
-
"Breadcrumb.Root":
|
|
8951
|
-
Button:
|
|
8952
|
-
ButtonGroup:
|
|
8953
|
-
"Card.Root":
|
|
8954
|
-
"Carousel.Root":
|
|
8955
|
-
"Checkbox.Root":
|
|
8956
|
-
CheckboxGroup:
|
|
8957
|
-
"Chip.Root":
|
|
8958
|
-
"Compare.Root":
|
|
8959
|
-
"ContextMenu.Root":
|
|
8960
|
-
"ContextMenu.Popup":
|
|
8961
|
-
"DataTable.Root":
|
|
8962
|
-
"DataView.Root":
|
|
8963
|
-
"DatePicker.Root":
|
|
8964
|
-
"DatePicker.Popup":
|
|
8965
|
-
"Dialog.Root":
|
|
8966
|
-
"Dialog.Backdrop":
|
|
8967
|
-
"Dialog.Popup":
|
|
8968
|
-
Divider:
|
|
8969
|
-
"Drawer.Root":
|
|
8970
|
-
"Drawer.Backdrop":
|
|
8971
|
-
"Drawer.Popup":
|
|
8972
|
-
"Fieldset.Root":
|
|
8973
|
-
"FileUpload.Root":
|
|
8974
|
-
FloatLabel:
|
|
8975
|
-
Fluid:
|
|
8976
|
-
"Gallery.Root":
|
|
8977
|
-
"IconField.Root":
|
|
8978
|
-
IftaLabel:
|
|
8979
|
-
"Inplace.Root":
|
|
8980
|
-
"InputColor.Root":
|
|
8981
|
-
"InputGroup.Root":
|
|
8982
|
-
"InputNumber.Root":
|
|
8983
|
-
"InputOtp.Root":
|
|
8984
|
-
InputPassword:
|
|
8985
|
-
"InputTags.Root":
|
|
8986
|
-
InputText:
|
|
8987
|
-
"Knob.Root":
|
|
8988
|
-
Label:
|
|
8989
|
-
"Listbox.Root":
|
|
8990
|
-
"Menu.Root":
|
|
8991
|
-
"Menu.Popup":
|
|
8992
|
-
"Message.Root":
|
|
8993
|
-
"MeterGroup.Root":
|
|
8994
|
-
NavigationMenu:
|
|
8995
|
-
"OrganizationChart.Root":
|
|
8996
|
-
OverlayBadge:
|
|
8997
|
-
"Paginator.Root":
|
|
8998
|
-
"Panel.Root":
|
|
8999
|
-
"Popover.Root":
|
|
9000
|
-
"Popover.Popup":
|
|
9001
|
-
"ProgressBar.Root":
|
|
9002
|
-
"ProgressSpinner.Root":
|
|
9003
|
-
"RadioButton.Root":
|
|
9004
|
-
RadioButtonGroup:
|
|
9005
|
-
"Rating.Root":
|
|
9006
|
-
"ScrollArea.Root":
|
|
9007
|
-
"Select.Root":
|
|
9008
|
-
"Select.Popup":
|
|
9009
|
-
"Sidebar.Root":
|
|
9010
|
-
"Sidebar.Layout":
|
|
9011
|
-
"Sidebar.Backdrop":
|
|
9012
|
-
Skeleton:
|
|
9013
|
-
"Slider.Root":
|
|
9014
|
-
"SpeedDial.Root":
|
|
9015
|
-
"Splitter.Root":
|
|
9016
|
-
"Stepper.Root":
|
|
9017
|
-
"Tabs.Root":
|
|
9018
|
-
Tag:
|
|
9019
|
-
"Terminal.Root":
|
|
9020
|
-
Textarea:
|
|
9021
|
-
"Timeline.Root":
|
|
9022
|
-
"Toast.Root":
|
|
9023
|
-
"Toaster.Root":
|
|
9024
|
-
"ToggleButton.Root":
|
|
9025
|
-
ToggleButtonGroup:
|
|
9026
|
-
"ToggleSwitch.Root":
|
|
9027
|
-
"Toolbar.Root":
|
|
9028
|
-
"Tooltip.Root":
|
|
9029
|
-
"Tooltip.Popup":
|
|
9030
|
-
"Tree.Root":
|
|
8939
|
+
} : { styles: e } }), he = (e) => ({ props: { motionProps: { name: e } } }), Mv = {
|
|
8940
|
+
"Accordion.Root": R(od, Qt),
|
|
8941
|
+
"AutoComplete.Root": R(id),
|
|
8942
|
+
"AutoComplete.Popup": he(dt),
|
|
8943
|
+
"Avatar.Root": R(rd),
|
|
8944
|
+
AvatarGroup: R(ad),
|
|
8945
|
+
Badge: R(sd),
|
|
8946
|
+
"Breadcrumb.Root": R(ld),
|
|
8947
|
+
Button: R(cd),
|
|
8948
|
+
ButtonGroup: R(dd),
|
|
8949
|
+
"Card.Root": R(ud),
|
|
8950
|
+
"Carousel.Root": R(pd),
|
|
8951
|
+
"Checkbox.Root": R(md),
|
|
8952
|
+
CheckboxGroup: R(hd),
|
|
8953
|
+
"Chip.Root": R(fd),
|
|
8954
|
+
"Compare.Root": R(gd),
|
|
8955
|
+
"ContextMenu.Root": R(vd),
|
|
8956
|
+
"ContextMenu.Popup": he(dt),
|
|
8957
|
+
"DataTable.Root": R(bd),
|
|
8958
|
+
"DataView.Root": R(yd),
|
|
8959
|
+
"DatePicker.Root": R(wd),
|
|
8960
|
+
"DatePicker.Popup": he(dt),
|
|
8961
|
+
"Dialog.Root": R(kd),
|
|
8962
|
+
"Dialog.Backdrop": he(Gn),
|
|
8963
|
+
"Dialog.Popup": he("p-dialog"),
|
|
8964
|
+
Divider: R(Sd),
|
|
8965
|
+
"Drawer.Root": R(Cd),
|
|
8966
|
+
"Drawer.Backdrop": he(Gn),
|
|
8967
|
+
"Drawer.Popup": he("p-drawer"),
|
|
8968
|
+
"Fieldset.Root": R(Td, Qt),
|
|
8969
|
+
"FileUpload.Root": R(Nd),
|
|
8970
|
+
FloatLabel: R(Id),
|
|
8971
|
+
Fluid: R(Pd),
|
|
8972
|
+
"Gallery.Root": R(Od),
|
|
8973
|
+
"IconField.Root": R(xd),
|
|
8974
|
+
IftaLabel: R(Rd),
|
|
8975
|
+
"Inplace.Root": R(Dd),
|
|
8976
|
+
"InputColor.Root": R(_d),
|
|
8977
|
+
"InputGroup.Root": R($d),
|
|
8978
|
+
"InputNumber.Root": R(Ed),
|
|
8979
|
+
"InputOtp.Root": R(Ad),
|
|
8980
|
+
InputPassword: R(Jd),
|
|
8981
|
+
"InputTags.Root": R(Fd),
|
|
8982
|
+
InputText: R(Md),
|
|
8983
|
+
"Knob.Root": R(Ld),
|
|
8984
|
+
Label: R(Bd),
|
|
8985
|
+
"Listbox.Root": R(jd),
|
|
8986
|
+
"Menu.Root": R(Ud),
|
|
8987
|
+
"Menu.Popup": he(dt),
|
|
8988
|
+
"Message.Root": R(zd),
|
|
8989
|
+
"MeterGroup.Root": R(Wd),
|
|
8990
|
+
NavigationMenu: R(Kd),
|
|
8991
|
+
"OrganizationChart.Root": R(Hd),
|
|
8992
|
+
OverlayBadge: R(Gd),
|
|
8993
|
+
"Paginator.Root": R(qd),
|
|
8994
|
+
"Panel.Root": R(Vd, Qt),
|
|
8995
|
+
"Popover.Root": R(Qd),
|
|
8996
|
+
"Popover.Popup": he(dt),
|
|
8997
|
+
"ProgressBar.Root": R(Yd),
|
|
8998
|
+
"ProgressSpinner.Root": R(Zd),
|
|
8999
|
+
"RadioButton.Root": R(Xd),
|
|
9000
|
+
RadioButtonGroup: R(eu),
|
|
9001
|
+
"Rating.Root": R(tu),
|
|
9002
|
+
"ScrollArea.Root": R(nu),
|
|
9003
|
+
"Select.Root": R(ou),
|
|
9004
|
+
"Select.Popup": he(dt),
|
|
9005
|
+
"Sidebar.Root": R(ru),
|
|
9006
|
+
"Sidebar.Layout": R(iu),
|
|
9007
|
+
"Sidebar.Backdrop": he(Gn),
|
|
9008
|
+
Skeleton: R(au),
|
|
9009
|
+
"Slider.Root": R(su),
|
|
9010
|
+
"SpeedDial.Root": R(lu),
|
|
9011
|
+
"Splitter.Root": R(cu),
|
|
9012
|
+
"Stepper.Root": R(du, Qt),
|
|
9013
|
+
"Tabs.Root": R(uu),
|
|
9014
|
+
Tag: R(pu),
|
|
9015
|
+
"Terminal.Root": R(mu),
|
|
9016
|
+
Textarea: R(hu),
|
|
9017
|
+
"Timeline.Root": R(fu),
|
|
9018
|
+
"Toast.Root": R(gu),
|
|
9019
|
+
"Toaster.Root": R(vu),
|
|
9020
|
+
"ToggleButton.Root": R(bu),
|
|
9021
|
+
ToggleButtonGroup: R(yu),
|
|
9022
|
+
"ToggleSwitch.Root": R(wu),
|
|
9023
|
+
"Toolbar.Root": R(ku),
|
|
9024
|
+
"Tooltip.Root": R(Su),
|
|
9025
|
+
"Tooltip.Popup": he("p-tooltip"),
|
|
9026
|
+
"Tree.Root": R(Cu)
|
|
9031
9027
|
}, Lv = bi.find((e) => e.name === "lara-light-blue") ?? bi[0], k0 = ({ defaults: e, theme: t, ...n }) => {
|
|
9032
9028
|
const o = Zl(Lv);
|
|
9033
9029
|
return /* @__PURE__ */ a(nd, {
|
|
@@ -9041,7 +9037,7 @@ var dt = "p-anchored-overlay", Qt = "p-collapsible", Gn = "p-overlay-mask", x =
|
|
|
9041
9037
|
onClose: e.onDismiss,
|
|
9042
9038
|
children: /* @__PURE__ */ a(Bv, { ...e })
|
|
9043
9039
|
}), Bv = (e) => {
|
|
9044
|
-
const t =
|
|
9040
|
+
const t = j(() => Ua(e.subject, e.environment.runtime), [e.subject, e.environment.runtime]);
|
|
9045
9041
|
return t.opened ? /* @__PURE__ */ a(jv, {
|
|
9046
9042
|
...e,
|
|
9047
9043
|
opened: t.subject
|
|
@@ -9050,8 +9046,8 @@ var dt = "p-anchored-overlay", Qt = "p-collapsible", Gn = "p-overlay-mask", x =
|
|
|
9050
9046
|
strings: e.strings
|
|
9051
9047
|
});
|
|
9052
9048
|
}, jv = ({ subject: e, environment: t, strings: n, layoutLabels: o, icons: i, paletteSources: r, initialSize: s, onChange: l, renderPaletteHost: c, opened: u }) => {
|
|
9053
|
-
const d = J(void 0), p = Cs(u, e.authoringTemplate, t, (y) => d.current?.(y)), [m, h] =
|
|
9054
|
-
g.current = l,
|
|
9049
|
+
const d = J(void 0), p = Cs(u, e.authoringTemplate, t, (y) => d.current?.(y)), [m, h] = M(s ?? yn[Xe.Desktop]), [f, v] = M(!0), g = J(l);
|
|
9050
|
+
g.current = l, ie(() => {
|
|
9055
9051
|
const y = Nt(p.document, e.authoringTemplate);
|
|
9056
9052
|
g.current?.({
|
|
9057
9053
|
document: It(p.document, e.screen),
|
|
@@ -9068,25 +9064,25 @@ var dt = "p-anchored-overlay", Qt = "p-collapsible", Gn = "p-overlay-mask", x =
|
|
|
9068
9064
|
e.screen,
|
|
9069
9065
|
t.runtime.legacyTypeOf
|
|
9070
9066
|
]);
|
|
9071
|
-
const k =
|
|
9067
|
+
const k = H((y) => {
|
|
9072
9068
|
if (!Zo(y)) return;
|
|
9073
9069
|
const S = p.selection, w = S && "children" in S ? p.selectedId : void 0;
|
|
9074
9070
|
y.kind === "layout" ? p.insertLayout(y.item, w, void 0) : p.insertComponent(ei(y.componentName, y.package), w, void 0);
|
|
9075
|
-
}, [p]), { palette:
|
|
9071
|
+
}, [p]), { palette: x, recordInserted: O } = ja({
|
|
9076
9072
|
strings: n,
|
|
9077
9073
|
layoutLabels: o,
|
|
9078
9074
|
icons: i,
|
|
9079
9075
|
paletteSources: r,
|
|
9080
9076
|
onAdd: (y) => k(y.payload)
|
|
9081
9077
|
});
|
|
9082
|
-
return d.current =
|
|
9078
|
+
return d.current = O, /* @__PURE__ */ a(Ja, {
|
|
9083
9079
|
environment: t,
|
|
9084
9080
|
children: /* @__PURE__ */ b("div", {
|
|
9085
9081
|
className: "studio-screen-editor-workspace",
|
|
9086
9082
|
children: [
|
|
9087
|
-
c ? c(
|
|
9083
|
+
c ? c(x) : /* @__PURE__ */ a(za, {
|
|
9088
9084
|
placement: "inline",
|
|
9089
|
-
children:
|
|
9085
|
+
children: x
|
|
9090
9086
|
}),
|
|
9091
9087
|
/* @__PURE__ */ a("div", {
|
|
9092
9088
|
className: "studio-screen-editor-workspace__stage",
|
|
@@ -9747,7 +9743,7 @@ function P0(e, t = kt, n, o, i) {
|
|
|
9747
9743
|
function Bb(e, t) {
|
|
9748
9744
|
const n = bo(e), o = Ro(e, {
|
|
9749
9745
|
kind: an.Screen,
|
|
9750
|
-
name:
|
|
9746
|
+
name: le
|
|
9751
9747
|
}), i = e.instanceContributions.length > 0 ? Br(o, e.instanceContributions, t) : void 0;
|
|
9752
9748
|
return {
|
|
9753
9749
|
element: n.element,
|
|
@@ -9755,11 +9751,11 @@ function Bb(e, t) {
|
|
|
9755
9751
|
};
|
|
9756
9752
|
}
|
|
9757
9753
|
var jb = ({ document: e, runtime: t, resolveBinding: n, registry: o = t.registry }) => {
|
|
9758
|
-
const { element: i, configuration: r } =
|
|
9754
|
+
const { element: i, configuration: r } = j(() => Bb(e, t.catalog), [e, t.catalog]), s = j(() => Eo(i, t.compositionProfile, t.packages), [
|
|
9759
9755
|
i,
|
|
9760
9756
|
t.compositionProfile,
|
|
9761
9757
|
t.packages
|
|
9762
|
-
]), l =
|
|
9758
|
+
]), l = j(() => ai(t), [t]);
|
|
9763
9759
|
return /* @__PURE__ */ a(Vr, {
|
|
9764
9760
|
theme: l,
|
|
9765
9761
|
className: `studio-profile-theme ${ri(l)}`,
|
|
@@ -9781,7 +9777,7 @@ var jb = ({ document: e, runtime: t, resolveBinding: n, registry: o = t.registry
|
|
|
9781
9777
|
return es.has(t) || t in Za;
|
|
9782
9778
|
}, zb = (e, t) => {
|
|
9783
9779
|
const n = (o) => {
|
|
9784
|
-
const i = Ub(o.element.componentName), r =
|
|
9780
|
+
const i = Ub(o.element.componentName), r = j(() => ({
|
|
9785
9781
|
...o.element,
|
|
9786
9782
|
properties: ts(e, o.element.componentName, o.element.properties)
|
|
9787
9783
|
}), [o.element]);
|
|
@@ -9813,8 +9809,8 @@ function Kb(e, t = 240, n = Number.POSITIVE_INFINITY) {
|
|
|
9813
9809
|
};
|
|
9814
9810
|
}
|
|
9815
9811
|
function Hb(e, t = 240) {
|
|
9816
|
-
const n = typeof IntersectionObserver < "u", [o, i] =
|
|
9817
|
-
return
|
|
9812
|
+
const n = typeof IntersectionObserver < "u", [o, i] = M(!n);
|
|
9813
|
+
return ie(() => {
|
|
9818
9814
|
const r = e.current;
|
|
9819
9815
|
if (!r || !n) return;
|
|
9820
9816
|
const s = new IntersectionObserver((l) => i(l.some((c) => c.isIntersecting)), { rootMargin: `${t}px` });
|
|
@@ -9831,14 +9827,14 @@ var Gb = [
|
|
|
9831
9827
|
"#3c3"
|
|
9832
9828
|
], qb = () => {
|
|
9833
9829
|
}, Ir = 16, R0 = ({ document: e, runtime: t, windowSize: n, width: o, title: i, openTitle: r, onClick: s, placeholder: l }) => {
|
|
9834
|
-
const c = J(null), u = Hb(c), d =
|
|
9830
|
+
const c = J(null), u = Hb(c), d = j(() => Kb(n, o ?? 240, o === void 0 ? 112 : void 0), [
|
|
9835
9831
|
n?.width,
|
|
9836
9832
|
n?.height,
|
|
9837
9833
|
o
|
|
9838
|
-
]), p =
|
|
9834
|
+
]), p = j(() => ai(t), [t]), m = j(() => Wb(t.registry), [t.registry]), h = {
|
|
9839
9835
|
width: d.width,
|
|
9840
9836
|
height: Ir + d.bodyHeight
|
|
9841
|
-
}, f = /* @__PURE__ */ b(
|
|
9837
|
+
}, f = /* @__PURE__ */ b(re, { children: [/* @__PURE__ */ b("div", {
|
|
9842
9838
|
className: "screen-thumbnail__title-bar",
|
|
9843
9839
|
style: { height: Ir },
|
|
9844
9840
|
children: [Gb.map((g) => /* @__PURE__ */ a("span", {
|
|
@@ -9904,7 +9900,7 @@ function Jb(e) {
|
|
|
9904
9900
|
...t,
|
|
9905
9901
|
layouts: t.layouts.length > 0 ? t.layouts : [$t],
|
|
9906
9902
|
screens: [{
|
|
9907
|
-
name:
|
|
9903
|
+
name: le,
|
|
9908
9904
|
layout: t.layouts[0]?.name ?? $t.name,
|
|
9909
9905
|
screenTemplate: n.name,
|
|
9910
9906
|
slotContent: {},
|
|
@@ -9914,19 +9910,19 @@ function Jb(e) {
|
|
|
9914
9910
|
};
|
|
9915
9911
|
}
|
|
9916
9912
|
var _0 = {
|
|
9917
|
-
[
|
|
9918
|
-
[
|
|
9919
|
-
[
|
|
9920
|
-
[
|
|
9921
|
-
[
|
|
9922
|
-
[
|
|
9913
|
+
[G.Stack]: "Stack",
|
|
9914
|
+
[G.Row]: "Row",
|
|
9915
|
+
[G.Grid]: "Grid",
|
|
9916
|
+
[G.Container]: "Container",
|
|
9917
|
+
[G.Wrap]: "Wrap",
|
|
9918
|
+
[G.Canvas]: "Canvas"
|
|
9923
9919
|
}, Qb = {
|
|
9924
|
-
[
|
|
9925
|
-
[
|
|
9926
|
-
[
|
|
9927
|
-
[
|
|
9928
|
-
[
|
|
9929
|
-
[
|
|
9920
|
+
[G.Stack]: mt,
|
|
9921
|
+
[G.Row]: gc,
|
|
9922
|
+
[G.Grid]: Mo,
|
|
9923
|
+
[G.Container]: Fo,
|
|
9924
|
+
[G.Wrap]: Lo,
|
|
9925
|
+
[G.Canvas]: Hc
|
|
9930
9926
|
}, Yb = {
|
|
9931
9927
|
text: Xl,
|
|
9932
9928
|
button: Xt,
|
|
@@ -10149,8 +10145,8 @@ export {
|
|
|
10149
10145
|
F0 as CommandFormMode,
|
|
10150
10146
|
Ty as DestinationKind,
|
|
10151
10147
|
Y as LayoutArrangement,
|
|
10152
|
-
|
|
10153
|
-
|
|
10148
|
+
G as LayoutItem,
|
|
10149
|
+
oe as Ownership,
|
|
10154
10150
|
jb as PlayScreenView,
|
|
10155
10151
|
Se as SceneDocumentProblem,
|
|
10156
10152
|
Ja as ScreenEditorControlProviders,
|