@cratis/stage.runtime 5.1.2 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/App.d.ts +2 -1
- package/dist/src/SandboxActingUser.d.ts +2 -0
- package/dist/src/StageCommandForm.d.ts +4 -1
- package/dist/src/blueprint.d.ts +4 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +975 -871
- package/dist/src/readableValue.d.ts +2 -1
- package/dist/src/sandboxActingUser.d.ts +19 -0
- package/dist/src/stageFormSchema.d.ts +10 -1
- package/dist/src/stageSource.d.ts +5 -0
- package/package.json +1 -1
package/dist/src/index.js
CHANGED
|
@@ -5,31 +5,32 @@ import { NotesButton as r, NotesProvider as i } from "@cratis/showrunner.notes.r
|
|
|
5
5
|
import "@cratis/showrunner.notes.react/styles";
|
|
6
6
|
import { createContext as a, createElement as o, useCallback as s, useContext as c, useEffect as l, useId as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m, useSyncExternalStore as h } from "react";
|
|
7
7
|
import { BindingSourceKind as g, ColorScheme as _, DestinationKind as v, FormGenerationMode as y, FormWidthUnit as b, GuardOperator as x, InteractionActionKind as S, InteractionTriggerKind as C, LogoKind as w, Opens as T, OutletItemKind as E, OutletKind as D, PackageKind as O, ScreenFit as k, SlotRole as A, componentIconLibrary as ee } from "@cratis/scene.model";
|
|
8
|
-
import { InputSourceKind as te, InteractionStop as
|
|
9
|
-
import { CoreOutletItems as
|
|
10
|
-
import { ApplicationHost as
|
|
8
|
+
import { InputSourceKind as te, InteractionStop as ne, ShellDiagnosticCode as j, ShellOrigin as M, commandResponseContext as N, createBindingResolver as re, hostProfilePackages as ie, outletChainOf as ae, placementSlotsOf as P, resolveArgumentSource as oe, resolveBehaviors as se, resolveStringsInElement as ce, resolveStringsValue as le, resolveSubjectReference as ue, runActions as de, runBindings as fe, sliceRouteSegment as pe, validateBindingExpression as me, validateResponseBindings as he } from "@cratis/scene.engine";
|
|
9
|
+
import { CoreOutletItems as ge, CoreSliceDialog as _e, IconAdapterProvider as ve, InteractionScope as ye, OutletView as be, SceneElementView as xe, SceneNavigationContextInternal as Se, SceneOutletsProvider as Ce, SceneRouterProvider as we, SceneSlotRouteContext as Te, SliceCommandFieldsProvider as Ee, SliceDialogView as De, SliceInvokerProvider as Oe, attachmentFor as ke, componentRegistryKey as Ae, coreComponents as je, coreSlotShape as Me, createBrowserDispatcher as Ne, createIconAdapterRegistry as Pe, emptySceneRouteState as Fe, outletOfElement as Ie, parseRoutedSlotPath as Le, routedSlotPath as Re, sliceDialogParameters as ze, useInteractionScope as Be, useOptionalSceneNavigation as Ve, useOptionalSceneRouter as He, useSceneNavigation as Ue, useSceneOutlets as We, useSceneQueryParameters as Ge, useSceneSlots as Ke, useSceneTheme as qe, withQueryParameter as Je, withSlotClosed as Ye, withSlotOpened as Xe, withTabSelected as Ze } from "@cratis/scene.react";
|
|
10
|
+
import { ApplicationHost as Qe, ColorScheme as F, ComponentName as I, KanbanBoard as $e, LayoutThemeProvider as et, SlotName as L, blueprintPackageCatalog as tt, composeApplicationScreen as nt, defaultBlueprintComponents as rt, defaultBlueprintName as it, defaultBlueprintThemes as at, effectiveShellOf as ot, externalComponent as R, galleryScreenTemplates as st, layoutModes as ct, menuThemes as lt, navigationElement as ut, previewComponents as dt, previewProfile as ft, useLayoutConfig as pt } from "@cratis/scene.blueprint.default";
|
|
11
11
|
import "@cratis/components/tokens";
|
|
12
|
+
import "@cratis/components/Dialogs/styles";
|
|
12
13
|
import "@cratis/components/CommandForm/styles";
|
|
13
14
|
import "@cratis/components/Dropdown/styles";
|
|
14
15
|
import "@cratis/components/Common/styles";
|
|
15
16
|
import "@cratis/components/Display/styles";
|
|
16
17
|
import "@cratis/scene.blueprint.default/styles.css";
|
|
17
|
-
import { ObservableQueryFor as
|
|
18
|
-
import { resolveCommand as
|
|
19
|
-
import { Command as
|
|
20
|
-
import { DateOnly as
|
|
21
|
-
import { Fragment as
|
|
22
|
-
import { Button as
|
|
23
|
-
import { Dialog as
|
|
24
|
-
import { Message as
|
|
25
|
-
import { Slice as
|
|
26
|
-
import { createPortal as
|
|
27
|
-
import { CommandForm as
|
|
28
|
-
import { CalendarField as
|
|
29
|
-
import { cratisComponents as
|
|
30
|
-
import { dynamicIconImports as
|
|
18
|
+
import { ObservableQueryFor as mt, Paging as ht, QueryFor as gt } from "@cratis/arc/queries";
|
|
19
|
+
import { resolveCommand as _t, resolveExactQuery as vt } from "@cratis/scene.components";
|
|
20
|
+
import { Command as yt } from "@cratis/arc/commands";
|
|
21
|
+
import { DateOnly as bt, Guid as xt } from "@cratis/fundamentals";
|
|
22
|
+
import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
|
|
23
|
+
import { Button as H } from "@cratis/components/Common";
|
|
24
|
+
import { Dialog as St } from "@cratis/components/Dialogs";
|
|
25
|
+
import { Message as Ct } from "@cratis/components/Display";
|
|
26
|
+
import { Slice as wt } from "@cratis/arc.react/slices";
|
|
27
|
+
import { createPortal as Tt } from "react-dom";
|
|
28
|
+
import { CommandForm as Et, asCommandFormField as Dt, withCommandFormFieldBinding as Ot } from "@cratis/arc.react/commands";
|
|
29
|
+
import { CalendarField as kt, CheckboxField as At, DropdownField as jt, InputTextField as Mt, NumberField as Nt } from "@cratis/components/CommandForm";
|
|
30
|
+
import { cratisComponents as Pt, cratisComponentsPackageManifest as Ft } from "@cratis/scene.components/runtime";
|
|
31
|
+
import { dynamicIconImports as It } from "lucide-react/dynamic";
|
|
31
32
|
// src/stageSource.ts
|
|
32
|
-
function
|
|
33
|
+
function Lt(e) {
|
|
33
34
|
return {
|
|
34
35
|
scene: async () => e.scene,
|
|
35
36
|
routes: async () => e.routes,
|
|
@@ -37,24 +38,25 @@ function It(e) {
|
|
|
37
38
|
strings: async (t) => e.strings[t] ?? {}
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
|
-
var
|
|
41
|
+
var Rt = {
|
|
41
42
|
scene: "stage/scene",
|
|
42
43
|
routes: "stage/routes",
|
|
43
44
|
locales: "stage/locales",
|
|
44
45
|
modelReferences: "stage/model-references",
|
|
46
|
+
actingUser: "stage/sandbox/acting-user",
|
|
45
47
|
strings: (e) => `stage/strings/${encodeURIComponent(e)}`
|
|
46
|
-
},
|
|
47
|
-
function
|
|
48
|
-
return o(
|
|
48
|
+
}, zt = a(void 0);
|
|
49
|
+
function Bt({ source: e, children: t }) {
|
|
50
|
+
return o(zt.Provider, { value: e }, t);
|
|
49
51
|
}
|
|
50
|
-
function
|
|
51
|
-
let e = c(
|
|
52
|
+
function U() {
|
|
53
|
+
let e = c(zt);
|
|
52
54
|
if (!e) throw Error("A StageSourceProvider is required to render a Stage application.");
|
|
53
55
|
return e;
|
|
54
56
|
}
|
|
55
|
-
|
|
57
|
+
Rt.routes;
|
|
56
58
|
function Vt() {
|
|
57
|
-
let e =
|
|
59
|
+
let e = U(), [t, n] = m({
|
|
58
60
|
routes: void 0,
|
|
59
61
|
ready: !1
|
|
60
62
|
});
|
|
@@ -109,14 +111,14 @@ function Yt(e) {
|
|
|
109
111
|
Jt = e;
|
|
110
112
|
}
|
|
111
113
|
function Xt(e, t) {
|
|
112
|
-
let n =
|
|
113
|
-
return n === "ambiguous" && t && (n =
|
|
114
|
+
let n = vt(e);
|
|
115
|
+
return n === "ambiguous" && t && (n = vt(`${e}:${t.replace(/^\//, "").split("?")[0]}`)), Zt(n) ? n : t ? Jt?.(t) : void 0;
|
|
114
116
|
}
|
|
115
117
|
function Zt(e) {
|
|
116
|
-
return typeof e == "function" && (e.prototype instanceof
|
|
118
|
+
return typeof e == "function" && (e.prototype instanceof gt || e.prototype instanceof mt);
|
|
117
119
|
}
|
|
118
120
|
function Qt(e, t) {
|
|
119
|
-
e.setMicroservice(t.microservice), e.setApiBasePath(qt(t.apiBasePath)), e.setOrigin(t.origin ?? ""), e.setHttpHeadersCallback(t.httpHeadersCallback ?? (() => ({}))), e.paging =
|
|
121
|
+
e.setMicroservice(t.microservice), e.setApiBasePath(qt(t.apiBasePath)), e.setOrigin(t.origin ?? ""), e.setHttpHeadersCallback(t.httpHeadersCallback ?? (() => ({}))), e.paging = ht.noPaging;
|
|
120
122
|
}
|
|
121
123
|
function $t(e, t, n) {
|
|
122
124
|
let r = new e();
|
|
@@ -124,7 +126,7 @@ function $t(e, t, n) {
|
|
|
124
126
|
}
|
|
125
127
|
function en(e, t, n, r) {
|
|
126
128
|
let i = new e();
|
|
127
|
-
if (i instanceof
|
|
129
|
+
if (i instanceof mt) return Qt(i, n), i.subscribe(r, t);
|
|
128
130
|
}
|
|
129
131
|
// src/stageSession.ts
|
|
130
132
|
var tn = "stage.session.";
|
|
@@ -165,12 +167,12 @@ function on(e, t, n) {
|
|
|
165
167
|
e
|
|
166
168
|
]) {
|
|
167
169
|
if (!r) continue;
|
|
168
|
-
let t =
|
|
170
|
+
let t = _t(r);
|
|
169
171
|
if (sn(t) && !(r === e && n && new t().route.replace(/^\//, "") !== n.replace(/^\//, ""))) return t;
|
|
170
172
|
}
|
|
171
173
|
}
|
|
172
174
|
function sn(e) {
|
|
173
|
-
return typeof e == "function" && e.prototype instanceof
|
|
175
|
+
return typeof e == "function" && e.prototype instanceof yt;
|
|
174
176
|
}
|
|
175
177
|
function cn(e, t) {
|
|
176
178
|
return e.setApiBasePath(qt(t)), e;
|
|
@@ -232,12 +234,12 @@ function gn(e, t = {}) {
|
|
|
232
234
|
return n ? `/${encodeURIComponent(e)}?${n}` : `/${encodeURIComponent(e)}`;
|
|
233
235
|
}
|
|
234
236
|
function _n(e) {
|
|
235
|
-
return Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e != null && e !== "" && (typeof e != "object" || e instanceof
|
|
237
|
+
return Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e != null && e !== "" && (typeof e != "object" || e instanceof xt)).map(([e, t]) => [e, String(t)]));
|
|
236
238
|
}
|
|
237
239
|
// src/screenplayGuard.ts
|
|
238
240
|
function vn(...[e, t, n]) {
|
|
239
241
|
let r = n.subject?.() ?? n.resolve({ path: "item" });
|
|
240
|
-
return
|
|
242
|
+
return fe(e.map((e) => ({
|
|
241
243
|
...e,
|
|
242
244
|
binding: xn(e.binding, r)
|
|
243
245
|
})), t, n);
|
|
@@ -265,19 +267,19 @@ function xn(e, t) {
|
|
|
265
267
|
};
|
|
266
268
|
}
|
|
267
269
|
function Sn(e, t) {
|
|
268
|
-
return Cn(e) && typeof e.subject == "string" ?
|
|
270
|
+
return Cn(e) && typeof e.subject == "string" ? ue({ subject: e.subject }, t) : void 0;
|
|
269
271
|
}
|
|
270
272
|
function Cn(e) {
|
|
271
273
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
272
274
|
}
|
|
273
275
|
// src/stageData.tsx
|
|
274
|
-
var wn = "cratis.stage.data-changed", Tn = a(() => () => void 0), En =
|
|
276
|
+
var wn = "cratis.stage.data-changed", Tn = a(() => () => void 0), En = je["core:guarded-action"];
|
|
275
277
|
function Dn(e) {
|
|
276
278
|
return e.componentName === "core:guarded-action" || e.componentName === "core:action" && Array.isArray(e.properties.alternatives);
|
|
277
279
|
}
|
|
278
280
|
function On(e) {
|
|
279
281
|
let { dispatcher: t, attachments: n } = kn(), { item: r, refused: i, error: a } = An(e.element);
|
|
280
|
-
if (i) return /* @__PURE__ */
|
|
282
|
+
if (i) return /* @__PURE__ */ V("span", {
|
|
281
283
|
role: "alert",
|
|
282
284
|
children: ["STAGE-SCENE-ACTION-001: The action's data subject or command scope is unavailable.", a]
|
|
283
285
|
});
|
|
@@ -286,10 +288,10 @@ function On(e) {
|
|
|
286
288
|
path: "",
|
|
287
289
|
value: r
|
|
288
290
|
};
|
|
289
|
-
return /* @__PURE__ */
|
|
291
|
+
return /* @__PURE__ */ B(ye, {
|
|
290
292
|
dispatcher: t,
|
|
291
293
|
attachments: n,
|
|
292
|
-
children: /* @__PURE__ */
|
|
294
|
+
children: /* @__PURE__ */ B(En, {
|
|
293
295
|
...e,
|
|
294
296
|
slots: e.slots ?? {},
|
|
295
297
|
element: {
|
|
@@ -304,9 +306,9 @@ function On(e) {
|
|
|
304
306
|
});
|
|
305
307
|
}
|
|
306
308
|
function kn() {
|
|
307
|
-
let e = W(), t =
|
|
309
|
+
let e = W(), t = Be(), n = dn();
|
|
308
310
|
return {
|
|
309
|
-
dispatcher: t?.dispatcher ??
|
|
311
|
+
dispatcher: t?.dispatcher ?? Ne({
|
|
310
312
|
executeCommand: async (t, r) => {
|
|
311
313
|
let i = await n(t, r);
|
|
312
314
|
return i.isSuccess && e.refreshAfterCommand(), {
|
|
@@ -412,12 +414,12 @@ function zn({ routes: e, routesReady: t = !0, parameters: n = Rn, locale: r, loc
|
|
|
412
414
|
...n,
|
|
413
415
|
[e]: t
|
|
414
416
|
})), v(t ? e : (t) => t === e ? void 0 : t);
|
|
415
|
-
}, []),
|
|
417
|
+
}, []), ne = s((e) => {
|
|
416
418
|
g((t) => ({
|
|
417
419
|
...t,
|
|
418
420
|
[e]: void 0
|
|
419
421
|
})), v((t) => t === e ? void 0 : t);
|
|
420
|
-
}, []),
|
|
422
|
+
}, []), j = s((e, t, n) => {
|
|
421
423
|
S((r) => {
|
|
422
424
|
let i = q(r[e]) ? r[e] : {};
|
|
423
425
|
return {
|
|
@@ -425,27 +427,27 @@ function zn({ routes: e, routesReady: t = !0, parameters: n = Rn, locale: r, loc
|
|
|
425
427
|
[e]: Jn(i, t.split(".").filter(Boolean), n)
|
|
426
428
|
};
|
|
427
429
|
});
|
|
428
|
-
}, []),
|
|
430
|
+
}, []), M = s((e) => E((t) => ({
|
|
429
431
|
query: e,
|
|
430
432
|
version: t.version + 1
|
|
431
|
-
})), []), { settling:
|
|
433
|
+
})), []), { settling: N, refreshAfterCommand: ie, registerAwaitingQuery: ae } = Bn(M, p);
|
|
432
434
|
l(() => {
|
|
433
|
-
let e = () =>
|
|
435
|
+
let e = () => M(), t = (e) => M(e.detail?.query);
|
|
434
436
|
return globalThis.addEventListener(wn, e), globalThis.addEventListener("cratis.scene.refresh", t), () => {
|
|
435
437
|
globalThis.removeEventListener(wn, e), globalThis.removeEventListener("cratis.scene.refresh", t);
|
|
436
438
|
};
|
|
437
|
-
}, [
|
|
438
|
-
let
|
|
439
|
+
}, [M]);
|
|
440
|
+
let P = _ ? h[_] : void 0, se = s((e) => {
|
|
439
441
|
if (e === void 0) return;
|
|
440
|
-
if (typeof e == "string") return Xn(e,
|
|
441
|
-
let t = Gn(
|
|
442
|
+
if (typeof e == "string") return Xn(e, P, h, c, y, k, ee, r, i);
|
|
443
|
+
let t = Gn(P, c, y, {
|
|
442
444
|
...D,
|
|
443
445
|
...x
|
|
444
446
|
}, h);
|
|
445
|
-
if (!e.kind && e.path.startsWith("component.")) return
|
|
446
|
-
if (!e.kind) return Xn(e.path,
|
|
447
|
-
let n =
|
|
448
|
-
return n.length > 0 && console.warn(`Scene binding could not be resolved: ${n.map((e) => `${e.code}:${e.message}`).join("; ")}`),
|
|
447
|
+
if (!e.kind && e.path.startsWith("component.")) return oe(e.path, t);
|
|
448
|
+
if (!e.kind) return Xn(e.path, P, h, c, y, k, ee, r, i);
|
|
449
|
+
let n = me(e, t);
|
|
450
|
+
return n.length > 0 && console.warn(`Scene binding could not be resolved: ${n.map((e) => `${e.code}:${e.message}`).join("; ")}`), re(t)(e);
|
|
449
451
|
}, [
|
|
450
452
|
x,
|
|
451
453
|
r,
|
|
@@ -455,9 +457,9 @@ function zn({ routes: e, routesReady: t = !0, parameters: n = Rn, locale: r, loc
|
|
|
455
457
|
D,
|
|
456
458
|
c,
|
|
457
459
|
ee,
|
|
458
|
-
|
|
460
|
+
P,
|
|
459
461
|
h
|
|
460
|
-
]),
|
|
462
|
+
]), ce = s((e) => e ? oe(e, Gn(P, c, y, {
|
|
461
463
|
...D,
|
|
462
464
|
...x
|
|
463
465
|
}, h)) : void 0, [
|
|
@@ -465,16 +467,16 @@ function zn({ routes: e, routesReady: t = !0, parameters: n = Rn, locale: r, loc
|
|
|
465
467
|
y,
|
|
466
468
|
D,
|
|
467
469
|
c,
|
|
468
|
-
|
|
470
|
+
P,
|
|
469
471
|
h
|
|
470
|
-
]),
|
|
472
|
+
]), le = s((e, t) => w((n) => ({
|
|
471
473
|
...n,
|
|
472
474
|
[e]: t
|
|
473
|
-
})), []),
|
|
475
|
+
})), []), ue = s((e) => w((t) => {
|
|
474
476
|
if (!Object.prototype.hasOwnProperty.call(t, e)) return t;
|
|
475
477
|
let n = { ...t };
|
|
476
478
|
return delete n[e], n;
|
|
477
|
-
}), []),
|
|
479
|
+
}), []), de = f(() => Gn(void 0, c, {}, {}, {}).queryResults, [c]), fe = f(() => ({
|
|
478
480
|
locale: r,
|
|
479
481
|
locales: i,
|
|
480
482
|
screen: a,
|
|
@@ -483,53 +485,53 @@ function zn({ routes: e, routesReady: t = !0, parameters: n = Rn, locale: r, loc
|
|
|
483
485
|
parameters: k,
|
|
484
486
|
session: A,
|
|
485
487
|
queries: c,
|
|
486
|
-
selected:
|
|
488
|
+
selected: P,
|
|
487
489
|
selections: h,
|
|
488
490
|
selectRow: te,
|
|
489
|
-
clearSelection:
|
|
491
|
+
clearSelection: ne,
|
|
490
492
|
setState: (e, t) => b((n) => Jn(n, e.split(".").filter(Boolean), t)),
|
|
491
|
-
setComponentOutput:
|
|
492
|
-
publishComponentOutputs:
|
|
493
|
-
withdrawComponentOutputs:
|
|
494
|
-
queryResults:
|
|
495
|
-
refreshQuery:
|
|
496
|
-
refreshAfterCommand:
|
|
497
|
-
settling:
|
|
498
|
-
resolveBinding:
|
|
499
|
-
resolveArgument:
|
|
493
|
+
setComponentOutput: j,
|
|
494
|
+
publishComponentOutputs: le,
|
|
495
|
+
withdrawComponentOutputs: ue,
|
|
496
|
+
queryResults: de,
|
|
497
|
+
refreshQuery: M,
|
|
498
|
+
refreshAfterCommand: ie,
|
|
499
|
+
settling: N,
|
|
500
|
+
resolveBinding: se,
|
|
501
|
+
resolveArgument: ce,
|
|
500
502
|
registerQueryResult: O,
|
|
501
503
|
refreshVersion: T.version,
|
|
502
504
|
refreshQueryName: T.query
|
|
503
505
|
}), [
|
|
504
|
-
|
|
506
|
+
ne,
|
|
505
507
|
r,
|
|
506
508
|
i,
|
|
507
509
|
c,
|
|
508
|
-
|
|
509
|
-
P,
|
|
510
|
+
ie,
|
|
510
511
|
N,
|
|
512
|
+
M,
|
|
511
513
|
T.query,
|
|
512
514
|
T.version,
|
|
513
515
|
O,
|
|
514
|
-
ce,
|
|
515
516
|
le,
|
|
516
517
|
ue,
|
|
518
|
+
de,
|
|
519
|
+
ce,
|
|
517
520
|
se,
|
|
518
|
-
oe,
|
|
519
521
|
e,
|
|
520
522
|
t,
|
|
521
523
|
k,
|
|
522
524
|
A,
|
|
523
525
|
a,
|
|
524
526
|
te,
|
|
525
|
-
|
|
527
|
+
P,
|
|
526
528
|
h,
|
|
527
|
-
|
|
529
|
+
j
|
|
528
530
|
]);
|
|
529
|
-
return /* @__PURE__ */
|
|
530
|
-
value:
|
|
531
|
-
children: /* @__PURE__ */
|
|
532
|
-
value:
|
|
531
|
+
return /* @__PURE__ */ B(In.Provider, {
|
|
532
|
+
value: fe,
|
|
533
|
+
children: /* @__PURE__ */ B(Tn.Provider, {
|
|
534
|
+
value: ae,
|
|
533
535
|
children: o
|
|
534
536
|
})
|
|
535
537
|
});
|
|
@@ -579,7 +581,7 @@ function G(e) {
|
|
|
579
581
|
r ? a(Error(r)) : e.isReady !== !1 && (s = e.changeSet && Array.isArray(e.data) && e.data.length === 0 && Array.isArray(s) ? Gt(s, e.changeSet) : e.data, _(er(s)), y(""), x(!1));
|
|
580
582
|
};
|
|
581
583
|
if (!i) return a(/* @__PURE__ */ Error(`The modeled query “${e.name}” is not registered by this Stage.`)), () => n.abort();
|
|
582
|
-
let l = i.prototype instanceof
|
|
584
|
+
let l = i.prototype instanceof mt, u = () => Promise.resolve().then(() => $t(i, l ? {
|
|
583
585
|
...r,
|
|
584
586
|
waitForFirstResult: !0
|
|
585
587
|
} : r, o)).then(c).catch(a);
|
|
@@ -802,7 +804,7 @@ function or(e) {
|
|
|
802
804
|
}
|
|
803
805
|
// src/modelReferences.ts
|
|
804
806
|
async function sr(e, t = fetch) {
|
|
805
|
-
let n = await t(
|
|
807
|
+
let n = await t(Rt.modelReferences, { signal: e });
|
|
806
808
|
return n.ok ? await n.json() : void 0;
|
|
807
809
|
}
|
|
808
810
|
function cr(e, t, n) {
|
|
@@ -826,7 +828,7 @@ async function dr(e, t = fetch) {
|
|
|
826
828
|
} : ur;
|
|
827
829
|
}
|
|
828
830
|
function fr() {
|
|
829
|
-
let e =
|
|
831
|
+
let e = U(), [t, n] = m(ur);
|
|
830
832
|
return l(() => {
|
|
831
833
|
if (!e.notes) return;
|
|
832
834
|
let t = new AbortController();
|
|
@@ -894,7 +896,7 @@ function vr(e) {
|
|
|
894
896
|
// src/stageStructure.tsx
|
|
895
897
|
var yr = a({ screens: [] });
|
|
896
898
|
function br({ structure: e, screens: t, children: n }) {
|
|
897
|
-
return /* @__PURE__ */
|
|
899
|
+
return /* @__PURE__ */ B(yr.Provider, {
|
|
898
900
|
value: {
|
|
899
901
|
structure: e,
|
|
900
902
|
screens: t
|
|
@@ -904,21 +906,21 @@ function br({ structure: e, screens: t, children: n }) {
|
|
|
904
906
|
}
|
|
905
907
|
function xr({ screen: e, children: t }) {
|
|
906
908
|
let { structure: n, screens: r } = c(yr), i = _r(n, r.find((t) => t.name === e));
|
|
907
|
-
return i ? /* @__PURE__ */
|
|
909
|
+
return i ? /* @__PURE__ */ B(wt, {
|
|
908
910
|
module: i.module,
|
|
909
911
|
feature: i.feature,
|
|
910
912
|
slice: i.slice,
|
|
911
913
|
children: t
|
|
912
|
-
}) : /* @__PURE__ */
|
|
914
|
+
}) : /* @__PURE__ */ B(z, { children: t });
|
|
913
915
|
}
|
|
914
916
|
function Sr({ slice: e, children: t }) {
|
|
915
917
|
let { structure: n } = c(yr), r = gr(n, e);
|
|
916
|
-
return r ? /* @__PURE__ */
|
|
918
|
+
return r ? /* @__PURE__ */ B(wt, {
|
|
917
919
|
module: r.module,
|
|
918
920
|
feature: r.feature,
|
|
919
921
|
slice: r.slice,
|
|
920
922
|
children: t
|
|
921
|
-
}) : /* @__PURE__ */
|
|
923
|
+
}) : /* @__PURE__ */ B(z, { children: t });
|
|
922
924
|
}
|
|
923
925
|
// src/humanize.ts
|
|
924
926
|
var Cr = /[A-Z]+(?![a-z])|[A-Z]?[a-z]+\d*|\d+/g, wr = /* @__PURE__ */ new Set([
|
|
@@ -956,10 +958,14 @@ function kr(e) {
|
|
|
956
958
|
return !1;
|
|
957
959
|
}
|
|
958
960
|
}
|
|
959
|
-
function Y(e) {
|
|
961
|
+
function Y(e, t) {
|
|
960
962
|
if (!e) return [];
|
|
961
963
|
try {
|
|
962
|
-
|
|
964
|
+
let n = Ar(JSON.parse(e), 0), r = new Set(n.filter((e) => e.identity).map((e) => e.name));
|
|
965
|
+
return t && Ar(JSON.parse(t), 0).filter((e) => e.identity).forEach((e) => r.add(e.name)), r.size > 0 ? n.map((e) => e.identifier && !r.has(e.name) ? {
|
|
966
|
+
...e,
|
|
967
|
+
otherEntity: !0
|
|
968
|
+
} : e) : n;
|
|
963
969
|
} catch {
|
|
964
970
|
return [];
|
|
965
971
|
}
|
|
@@ -1142,7 +1148,7 @@ function ti(e) {
|
|
|
1142
1148
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1143
1149
|
}
|
|
1144
1150
|
// src/StageValueFields.tsx
|
|
1145
|
-
var ni =
|
|
1151
|
+
var ni = Dt((e) => /* @__PURE__ */ B(ri, {
|
|
1146
1152
|
descriptor: e.descriptor,
|
|
1147
1153
|
label: e.title ?? J(e.descriptor.name),
|
|
1148
1154
|
value: e.value,
|
|
@@ -1151,21 +1157,21 @@ var ni = Et((e) => /* @__PURE__ */ V(ri, {
|
|
|
1151
1157
|
invalid: e.invalid
|
|
1152
1158
|
}), { defaultValue: void 0 });
|
|
1153
1159
|
function ri({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
|
|
1154
|
-
return e.members ? /* @__PURE__ */
|
|
1160
|
+
return e.members ? /* @__PURE__ */ B(ii, {
|
|
1155
1161
|
descriptor: e,
|
|
1156
1162
|
label: t,
|
|
1157
1163
|
value: n,
|
|
1158
1164
|
onChange: r,
|
|
1159
1165
|
onBlur: i,
|
|
1160
1166
|
invalid: a
|
|
1161
|
-
}) : e.item ? /* @__PURE__ */
|
|
1167
|
+
}) : e.item ? /* @__PURE__ */ B(ai, {
|
|
1162
1168
|
descriptor: e,
|
|
1163
1169
|
label: t,
|
|
1164
1170
|
value: n,
|
|
1165
1171
|
onChange: r,
|
|
1166
1172
|
onBlur: i,
|
|
1167
1173
|
invalid: a
|
|
1168
|
-
}) : /* @__PURE__ */
|
|
1174
|
+
}) : /* @__PURE__ */ B(oi, {
|
|
1169
1175
|
descriptor: e,
|
|
1170
1176
|
label: t,
|
|
1171
1177
|
value: n,
|
|
@@ -1176,10 +1182,10 @@ function ri({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
|
|
|
1176
1182
|
}
|
|
1177
1183
|
function ii({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
|
|
1178
1184
|
let o = li(n) ? n : {};
|
|
1179
|
-
return /* @__PURE__ */
|
|
1185
|
+
return /* @__PURE__ */ V("fieldset", {
|
|
1180
1186
|
className: "stage-record-field",
|
|
1181
1187
|
"data-invalid": a ? "true" : void 0,
|
|
1182
|
-
children: [/* @__PURE__ */
|
|
1188
|
+
children: [/* @__PURE__ */ B("legend", { children: t }), (e.members ?? []).map((e) => /* @__PURE__ */ B(ri, {
|
|
1183
1189
|
descriptor: e,
|
|
1184
1190
|
label: J(e.name),
|
|
1185
1191
|
value: o[e.name],
|
|
@@ -1193,31 +1199,31 @@ function ii({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
|
|
|
1193
1199
|
}
|
|
1194
1200
|
function ai({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
|
|
1195
1201
|
let o = e.item, s = Array.isArray(n) ? n : [], c = (e) => r(e);
|
|
1196
|
-
return /* @__PURE__ */
|
|
1202
|
+
return /* @__PURE__ */ V("fieldset", {
|
|
1197
1203
|
className: "stage-list-field",
|
|
1198
1204
|
"data-invalid": a ? "true" : void 0,
|
|
1199
1205
|
children: [
|
|
1200
|
-
/* @__PURE__ */
|
|
1201
|
-
s.length === 0 && /* @__PURE__ */
|
|
1206
|
+
/* @__PURE__ */ B("legend", { children: t }),
|
|
1207
|
+
s.length === 0 && /* @__PURE__ */ B("p", {
|
|
1202
1208
|
className: "stage-note",
|
|
1203
1209
|
children: "Nothing added yet."
|
|
1204
1210
|
}),
|
|
1205
|
-
s.map((e, n) => /* @__PURE__ */
|
|
1211
|
+
s.map((e, n) => /* @__PURE__ */ V("div", {
|
|
1206
1212
|
className: "stage-list-field__row",
|
|
1207
|
-
children: [/* @__PURE__ */
|
|
1213
|
+
children: [/* @__PURE__ */ B(ri, {
|
|
1208
1214
|
descriptor: o,
|
|
1209
1215
|
label: `${t} ${n + 1}`,
|
|
1210
1216
|
value: e,
|
|
1211
1217
|
onBlur: i,
|
|
1212
1218
|
onChange: (e) => c(s.map((t, r) => r === n ? e : t))
|
|
1213
|
-
}), /* @__PURE__ */
|
|
1219
|
+
}), /* @__PURE__ */ B("button", {
|
|
1214
1220
|
type: "button",
|
|
1215
1221
|
"aria-label": `Remove ${t} ${n + 1}`,
|
|
1216
1222
|
onClick: () => c(s.filter((e, t) => t !== n)),
|
|
1217
1223
|
children: "Remove"
|
|
1218
1224
|
})]
|
|
1219
1225
|
}, n)),
|
|
1220
|
-
/* @__PURE__ */
|
|
1226
|
+
/* @__PURE__ */ B("button", {
|
|
1221
1227
|
type: "button",
|
|
1222
1228
|
"aria-label": `Add ${t}`,
|
|
1223
1229
|
onClick: () => c([...s, si(o)]),
|
|
@@ -1231,34 +1237,34 @@ function oi({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
|
|
|
1231
1237
|
"aria-invalid": a ? !0 : void 0,
|
|
1232
1238
|
onBlur: i
|
|
1233
1239
|
};
|
|
1234
|
-
if (e.options) return /* @__PURE__ */
|
|
1240
|
+
if (e.options) return /* @__PURE__ */ V("label", {
|
|
1235
1241
|
className: "stage-value-field",
|
|
1236
|
-
children: [/* @__PURE__ */
|
|
1242
|
+
children: [/* @__PURE__ */ B("span", { children: t }), /* @__PURE__ */ V("select", {
|
|
1237
1243
|
...o,
|
|
1238
1244
|
value: typeof n == "string" ? n : "",
|
|
1239
1245
|
onChange: (e) => r(e.target.value === "" ? void 0 : e.target.value),
|
|
1240
|
-
children: [/* @__PURE__ */
|
|
1246
|
+
children: [/* @__PURE__ */ B("option", {
|
|
1241
1247
|
value: "",
|
|
1242
1248
|
children: ""
|
|
1243
|
-
}), e.options.map((e) => /* @__PURE__ */
|
|
1249
|
+
}), e.options.map((e) => /* @__PURE__ */ B("option", {
|
|
1244
1250
|
value: e,
|
|
1245
1251
|
children: J(e)
|
|
1246
1252
|
}, e))]
|
|
1247
1253
|
})]
|
|
1248
1254
|
});
|
|
1249
1255
|
switch (e.type) {
|
|
1250
|
-
case "boolean": return /* @__PURE__ */
|
|
1256
|
+
case "boolean": return /* @__PURE__ */ V("label", {
|
|
1251
1257
|
className: "stage-value-field stage-value-field--check",
|
|
1252
|
-
children: [/* @__PURE__ */
|
|
1258
|
+
children: [/* @__PURE__ */ B("input", {
|
|
1253
1259
|
...o,
|
|
1254
1260
|
type: "checkbox",
|
|
1255
1261
|
checked: n === !0,
|
|
1256
1262
|
onChange: (e) => r(e.target.checked)
|
|
1257
|
-
}), /* @__PURE__ */
|
|
1263
|
+
}), /* @__PURE__ */ B("span", { children: t })]
|
|
1258
1264
|
});
|
|
1259
|
-
case "number": return /* @__PURE__ */
|
|
1265
|
+
case "number": return /* @__PURE__ */ V("label", {
|
|
1260
1266
|
className: "stage-value-field",
|
|
1261
|
-
children: [/* @__PURE__ */
|
|
1267
|
+
children: [/* @__PURE__ */ B("span", { children: t }), /* @__PURE__ */ B("input", {
|
|
1262
1268
|
...o,
|
|
1263
1269
|
type: "number",
|
|
1264
1270
|
step: "any",
|
|
@@ -1266,18 +1272,18 @@ function oi({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
|
|
|
1266
1272
|
onChange: (e) => r(e.target.value === "" ? void 0 : Number(e.target.value))
|
|
1267
1273
|
})]
|
|
1268
1274
|
});
|
|
1269
|
-
case "date": return /* @__PURE__ */
|
|
1275
|
+
case "date": return /* @__PURE__ */ V("label", {
|
|
1270
1276
|
className: "stage-value-field",
|
|
1271
|
-
children: [/* @__PURE__ */
|
|
1277
|
+
children: [/* @__PURE__ */ B("span", { children: t }), /* @__PURE__ */ B("input", {
|
|
1272
1278
|
...o,
|
|
1273
1279
|
type: e.withTime ? "datetime-local" : "date",
|
|
1274
1280
|
value: typeof n == "string" ? n.slice(0, e.withTime ? 16 : 10) : "",
|
|
1275
1281
|
onChange: (t) => r(t.target.value === "" ? void 0 : ci(t.target.value, e.withTime === !0))
|
|
1276
1282
|
})]
|
|
1277
1283
|
});
|
|
1278
|
-
default: return /* @__PURE__ */
|
|
1284
|
+
default: return /* @__PURE__ */ V("label", {
|
|
1279
1285
|
className: "stage-value-field",
|
|
1280
|
-
children: [/* @__PURE__ */
|
|
1286
|
+
children: [/* @__PURE__ */ B("span", { children: t }), /* @__PURE__ */ B("input", {
|
|
1281
1287
|
...o,
|
|
1282
1288
|
type: "text",
|
|
1283
1289
|
value: typeof n == "string" ? n : "",
|
|
@@ -1317,13 +1323,13 @@ function di(e) {
|
|
|
1317
1323
|
var fi = a(void 0);
|
|
1318
1324
|
function pi({ element: e, outputScope: t, children: n }) {
|
|
1319
1325
|
let r = f(() => new Set(ui(e).flatMap((e) => t ? [e, `${t}:${e}`] : [e])), [e, t]);
|
|
1320
|
-
return /* @__PURE__ */
|
|
1326
|
+
return /* @__PURE__ */ B(fi.Provider, {
|
|
1321
1327
|
value: r,
|
|
1322
1328
|
children: n
|
|
1323
1329
|
});
|
|
1324
1330
|
}
|
|
1325
1331
|
function mi({ children: e }) {
|
|
1326
|
-
return /* @__PURE__ */
|
|
1332
|
+
return /* @__PURE__ */ B(fi.Provider, {
|
|
1327
1333
|
value: void 0,
|
|
1328
1334
|
children: e
|
|
1329
1335
|
});
|
|
@@ -1333,8 +1339,8 @@ function hi() {
|
|
|
1333
1339
|
return f(() => {
|
|
1334
1340
|
let r = e ? Object.fromEntries(Object.entries(t).filter(([t]) => e.has(t))) : t, i = e ? Object.fromEntries(Object.entries(n).filter(([t]) => e.has(t))) : n;
|
|
1335
1341
|
return {
|
|
1336
|
-
selectableRows:
|
|
1337
|
-
selectedRows:
|
|
1342
|
+
selectableRows: Zi(r),
|
|
1343
|
+
selectedRows: Qi(i, r)
|
|
1338
1344
|
};
|
|
1339
1345
|
}, [
|
|
1340
1346
|
t,
|
|
@@ -1351,7 +1357,7 @@ function gi(e) {
|
|
|
1351
1357
|
ready: a,
|
|
1352
1358
|
publish: !1
|
|
1353
1359
|
}), s = typeof e.value == "string" ? e.value : "";
|
|
1354
|
-
return !a || o.error ? /* @__PURE__ */
|
|
1360
|
+
return !a || o.error ? /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B("input", {
|
|
1355
1361
|
id: e.id,
|
|
1356
1362
|
"aria-label": e.title,
|
|
1357
1363
|
"aria-invalid": e.invalid,
|
|
@@ -1360,10 +1366,10 @@ function gi(e) {
|
|
|
1360
1366
|
onBlur: e.onBlur,
|
|
1361
1367
|
required: e.required,
|
|
1362
1368
|
disabled: e.disabled
|
|
1363
|
-
}), o.error && /* @__PURE__ */
|
|
1369
|
+
}), o.error && /* @__PURE__ */ B("span", {
|
|
1364
1370
|
role: "alert",
|
|
1365
1371
|
children: o.error
|
|
1366
|
-
})] }) : /* @__PURE__ */
|
|
1372
|
+
})] }) : /* @__PURE__ */ B(vi, {
|
|
1367
1373
|
...e,
|
|
1368
1374
|
selected: s,
|
|
1369
1375
|
choices: _i(o.rows, e.reference),
|
|
@@ -1381,17 +1387,17 @@ function _i(e, t) {
|
|
|
1381
1387
|
}
|
|
1382
1388
|
function vi({ id: e, onChange: t, onBlur: n, invalid: r, title: i, required: a, disabled: o, selected: s, choices: c, loading: l }) {
|
|
1383
1389
|
let [u, d] = m(""), f = c.filter((e) => e.key === s || e.label.toLocaleLowerCase().includes(u.toLocaleLowerCase())), p = s !== "" && !c.some((e) => e.key === s);
|
|
1384
|
-
return /* @__PURE__ */
|
|
1390
|
+
return /* @__PURE__ */ V("div", {
|
|
1385
1391
|
className: "stage-reference-field",
|
|
1386
1392
|
children: [
|
|
1387
|
-
/* @__PURE__ */
|
|
1393
|
+
/* @__PURE__ */ B("input", {
|
|
1388
1394
|
type: "search",
|
|
1389
1395
|
"aria-label": `Filter ${i}`,
|
|
1390
1396
|
value: u,
|
|
1391
1397
|
onChange: (e) => d(e.target.value),
|
|
1392
1398
|
disabled: o || l
|
|
1393
1399
|
}),
|
|
1394
|
-
/* @__PURE__ */
|
|
1400
|
+
/* @__PURE__ */ V("select", {
|
|
1395
1401
|
id: e,
|
|
1396
1402
|
"aria-label": i,
|
|
1397
1403
|
"aria-invalid": r,
|
|
@@ -1401,21 +1407,21 @@ function vi({ id: e, onChange: t, onBlur: n, invalid: r, title: i, required: a,
|
|
|
1401
1407
|
required: a,
|
|
1402
1408
|
disabled: o || l,
|
|
1403
1409
|
children: [
|
|
1404
|
-
/* @__PURE__ */
|
|
1410
|
+
/* @__PURE__ */ V("option", {
|
|
1405
1411
|
value: "",
|
|
1406
1412
|
children: ["Choose ", i]
|
|
1407
1413
|
}),
|
|
1408
|
-
p && /* @__PURE__ */
|
|
1414
|
+
p && /* @__PURE__ */ B("option", {
|
|
1409
1415
|
value: s,
|
|
1410
1416
|
children: s
|
|
1411
1417
|
}),
|
|
1412
|
-
f.map((e) => /* @__PURE__ */
|
|
1418
|
+
f.map((e) => /* @__PURE__ */ B("option", {
|
|
1413
1419
|
value: e.key,
|
|
1414
1420
|
children: e.label
|
|
1415
1421
|
}, e.key))
|
|
1416
1422
|
]
|
|
1417
1423
|
}),
|
|
1418
|
-
/* @__PURE__ */
|
|
1424
|
+
/* @__PURE__ */ B(yi, {
|
|
1419
1425
|
loading: l,
|
|
1420
1426
|
empty: c.length === 0
|
|
1421
1427
|
})
|
|
@@ -1423,18 +1429,18 @@ function vi({ id: e, onChange: t, onBlur: n, invalid: r, title: i, required: a,
|
|
|
1423
1429
|
});
|
|
1424
1430
|
}
|
|
1425
1431
|
function yi({ loading: e, empty: t }) {
|
|
1426
|
-
return e ? /* @__PURE__ */
|
|
1432
|
+
return e ? /* @__PURE__ */ B("span", {
|
|
1427
1433
|
role: "status",
|
|
1428
1434
|
children: "Loading choices…"
|
|
1429
|
-
}) : t ? /* @__PURE__ */
|
|
1435
|
+
}) : t ? /* @__PURE__ */ B("span", { children: "No choices available" }) : null;
|
|
1430
1436
|
}
|
|
1431
1437
|
function bi(e, t, n) {
|
|
1432
|
-
return e?.reference ? /* @__PURE__ */
|
|
1438
|
+
return e?.reference ? /* @__PURE__ */ B(xi, {
|
|
1433
1439
|
...t,
|
|
1434
1440
|
reference: e.reference
|
|
1435
1441
|
}) : n;
|
|
1436
1442
|
}
|
|
1437
|
-
var xi =
|
|
1443
|
+
var xi = Dt(gi, { defaultValue: "" }), Si = {
|
|
1438
1444
|
messages: [],
|
|
1439
1445
|
complete: async (e, t) => t([], !1)
|
|
1440
1446
|
};
|
|
@@ -1450,14 +1456,14 @@ function Ci(e, t, n) {
|
|
|
1450
1456
|
targetType: () => void 0
|
|
1451
1457
|
};
|
|
1452
1458
|
return {
|
|
1453
|
-
messages:
|
|
1459
|
+
messages: he({
|
|
1454
1460
|
kind: "form",
|
|
1455
1461
|
command: i,
|
|
1456
1462
|
onSubmit: r
|
|
1457
1463
|
}, a).map((e) => e.message),
|
|
1458
1464
|
complete: async (e, t) => {
|
|
1459
|
-
let a =
|
|
1460
|
-
o.findings.length && n.onFindings?.(o.findings), t(o.findings.map((e) => e.detail), o.stop ===
|
|
1465
|
+
let a = N(n.context, i, e), o = await de(r, n.dispatcher, a);
|
|
1466
|
+
o.findings.length && n.onFindings?.(o.findings), t(o.findings.map((e) => e.detail), o.stop === ne.Navigated);
|
|
1461
1467
|
}
|
|
1462
1468
|
};
|
|
1463
1469
|
}
|
|
@@ -1473,25 +1479,25 @@ function Ei(e, t, n) {
|
|
|
1473
1479
|
} : Kr(e, t);
|
|
1474
1480
|
}
|
|
1475
1481
|
function Di(e, t) {
|
|
1476
|
-
let n = X(e, "schema") || t?.commandSchemas?.[X(e, "command")];
|
|
1482
|
+
let n = X(e, "schema") || t?.commandSchemas?.[X(e, "command")], r = t?.commandSchemas?.[X(e, "command")];
|
|
1477
1483
|
return {
|
|
1478
1484
|
schemaText: n,
|
|
1479
|
-
schema: f(() => Y(n ?? ""), [n]),
|
|
1485
|
+
schema: f(() => Y(n ?? "", r), [n, r]),
|
|
1480
1486
|
hasSchemaMetadata: typeof n == "string"
|
|
1481
1487
|
};
|
|
1482
1488
|
}
|
|
1483
1489
|
function Oi({ element: e, cancellable: n }) {
|
|
1484
|
-
let r = W(), i = c(t), a = c(wi), o = c(Ti), s = p(null), l = f(() =>
|
|
1490
|
+
let r = W(), i = c(t), a = c(wi), o = c(Ti), s = p(null), l = f(() => Fi(e), [e]), u = Ci(e, l, Be()), { schemaText: d, schema: h, hasSchemaMetadata: g } = Di(e, r.routes), _ = f(() => l ? Ii(l, h) : [], [l, h]), v = l ? on(l.command, X(e, "typeName"), X(e, "route")) : void 0, y = ji(e, l), b = ra(e, _, r.resolveArgument), x = ta(e, h, r), S = JSON.stringify(x ?? null), C = f(() => x, [S]), { selectableRows: w, selectedRows: T, rowAction: E, subjectValues: D } = Ei(e, hi(), d), O = f(() => Ui(h, r.parameters, T, D), [
|
|
1485
1491
|
h,
|
|
1486
1492
|
T,
|
|
1487
1493
|
r.parameters,
|
|
1488
1494
|
D
|
|
1489
|
-
]), k = f(() =>
|
|
1495
|
+
]), k = f(() => Wi(_, O), [_, O]), A = f(() => ({
|
|
1490
1496
|
...C,
|
|
1491
|
-
...
|
|
1497
|
+
...Hi(_, h, r.parameters, T, w, E),
|
|
1492
1498
|
...O,
|
|
1493
1499
|
...D,
|
|
1494
|
-
...
|
|
1500
|
+
...Vi(_, r.parameters)
|
|
1495
1501
|
}), [
|
|
1496
1502
|
C,
|
|
1497
1503
|
_,
|
|
@@ -1509,101 +1515,119 @@ function Oi({ element: e, cancellable: n }) {
|
|
|
1509
1515
|
O,
|
|
1510
1516
|
A,
|
|
1511
1517
|
b
|
|
1512
|
-
]), te = f(() => l ?
|
|
1518
|
+
]), te = f(() => l ? Li(l, k, h) : void 0, [
|
|
1513
1519
|
l,
|
|
1514
1520
|
k,
|
|
1515
1521
|
h
|
|
1516
|
-
]),
|
|
1522
|
+
]), ne = f(() => l ? ma(_, h) : [], [
|
|
1517
1523
|
l,
|
|
1518
1524
|
_,
|
|
1519
1525
|
h
|
|
1520
|
-
]),
|
|
1521
|
-
return l ? !v && !r.routesReady ? /* @__PURE__ */
|
|
1526
|
+
]), j = f(() => l ? ha(l.layout, _) : [], [l, _]), [M, N] = m([]);
|
|
1527
|
+
return l ? !v && !r.routesReady ? /* @__PURE__ */ V("p", {
|
|
1522
1528
|
className: "stage-note",
|
|
1523
1529
|
children: [
|
|
1524
1530
|
"The modeled command “",
|
|
1525
1531
|
l.command,
|
|
1526
1532
|
"” is waiting for Stage routes."
|
|
1527
1533
|
]
|
|
1528
|
-
}) : v ? _.length === 0 && !g && e.properties.parameterless !== !0 ? /* @__PURE__ */
|
|
1534
|
+
}) : v ? _.length === 0 && !g && e.properties.parameterless !== !0 ? /* @__PURE__ */ B(Pi, {
|
|
1529
1535
|
form: l,
|
|
1530
1536
|
messages: [`The modeled command “${l.command}” has no form fields or schema metadata, so Stage will not submit an empty command body.`]
|
|
1531
|
-
}) :
|
|
1537
|
+
}) : ne.length + u.messages.length > 0 ? /* @__PURE__ */ B(Pi, {
|
|
1532
1538
|
form: l,
|
|
1533
|
-
messages: [...
|
|
1534
|
-
}) : /* @__PURE__ */
|
|
1539
|
+
messages: [...ne, ...u.messages]
|
|
1540
|
+
}) : /* @__PURE__ */ B("section", {
|
|
1535
1541
|
ref: s,
|
|
1536
1542
|
className: "stage-command-form",
|
|
1537
1543
|
"data-command": l.command,
|
|
1538
1544
|
"data-generation-mode": l.generationMode,
|
|
1539
|
-
children: /* @__PURE__ */
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1545
|
+
children: /* @__PURE__ */ B(ki.Provider, {
|
|
1546
|
+
value: M.length > 0,
|
|
1547
|
+
children: /* @__PURE__ */ V(Et, {
|
|
1548
|
+
command: v,
|
|
1549
|
+
initialValues: A,
|
|
1550
|
+
currentValues: ee,
|
|
1551
|
+
validateOn: "both",
|
|
1552
|
+
validateAllFieldsOnChange: !0,
|
|
1553
|
+
exceptionDisplayComponent: Ai,
|
|
1554
|
+
onBeforeExecute: (e) => cn(e, i.apiBasePath),
|
|
1555
|
+
onFieldValidate: (e, t, n, r) => pa(_, h, t, r),
|
|
1556
|
+
onValidationFailure: (e) => N(fa(_, e)),
|
|
1557
|
+
onException: (e) => {
|
|
1558
|
+
e.length > 0 && N(e);
|
|
1559
|
+
},
|
|
1560
|
+
onFailed: (e) => N(un(l.command, e).messages),
|
|
1561
|
+
onSuccess: async (t) => {
|
|
1562
|
+
r.refreshAfterCommand();
|
|
1563
|
+
let n = (t, n) => {
|
|
1564
|
+
N(t), t.length || Ni(e, n, a);
|
|
1565
|
+
};
|
|
1566
|
+
try {
|
|
1567
|
+
await u.complete(t, n);
|
|
1568
|
+
} catch (e) {
|
|
1569
|
+
n([e instanceof Error ? e.message : String(e)], !1);
|
|
1570
|
+
}
|
|
1571
|
+
},
|
|
1572
|
+
children: [
|
|
1573
|
+
j.map((e) => /* @__PURE__ */ B("p", {
|
|
1574
|
+
role: "alert",
|
|
1575
|
+
className: "stage-form-error",
|
|
1576
|
+
children: e
|
|
1577
|
+
}, e)),
|
|
1578
|
+
te,
|
|
1579
|
+
M.map((e) => /* @__PURE__ */ B("p", {
|
|
1580
|
+
role: "alert",
|
|
1581
|
+
className: "stage-form-error",
|
|
1582
|
+
children: e
|
|
1583
|
+
}, e)),
|
|
1584
|
+
o ? Tt(/* @__PURE__ */ B(H, {
|
|
1585
|
+
type: "button",
|
|
1586
|
+
className: "scene-slice-dialog-submit",
|
|
1587
|
+
onClick: () => s.current?.querySelector("form")?.requestSubmit(),
|
|
1588
|
+
children: y
|
|
1589
|
+
}), o) : /* @__PURE__ */ B(Mi, {
|
|
1590
|
+
submitLabel: y,
|
|
1591
|
+
cancellable: n
|
|
1592
|
+
})
|
|
1593
|
+
]
|
|
1594
|
+
}, S)
|
|
1595
|
+
})
|
|
1596
|
+
}) : /* @__PURE__ */ V("p", {
|
|
1585
1597
|
className: "stage-note",
|
|
1586
1598
|
children: [
|
|
1587
1599
|
"The modeled command “",
|
|
1588
1600
|
l.command,
|
|
1589
1601
|
"” is not registered by this Stage."
|
|
1590
1602
|
]
|
|
1591
|
-
}) : /* @__PURE__ */
|
|
1603
|
+
}) : /* @__PURE__ */ B("p", {
|
|
1592
1604
|
className: "stage-note",
|
|
1593
1605
|
children: "This form is missing its command metadata."
|
|
1594
1606
|
});
|
|
1595
1607
|
}
|
|
1596
|
-
|
|
1608
|
+
var ki = a(!1);
|
|
1609
|
+
function Ai({ message: e }) {
|
|
1610
|
+
return c(ki) ? /* @__PURE__ */ B("span", {
|
|
1611
|
+
role: "status",
|
|
1612
|
+
className: "cratis-field-sr-only",
|
|
1613
|
+
children: e
|
|
1614
|
+
}) : /* @__PURE__ */ B("p", {
|
|
1615
|
+
role: "alert",
|
|
1616
|
+
className: "stage-form-error",
|
|
1617
|
+
children: e
|
|
1618
|
+
});
|
|
1619
|
+
}
|
|
1620
|
+
function ji(e, t) {
|
|
1597
1621
|
return X(e, "submitLabel") || t?.label || "Submit";
|
|
1598
1622
|
}
|
|
1599
|
-
function
|
|
1623
|
+
function Mi({ submitLabel: e, cancellable: t }) {
|
|
1600
1624
|
let n = c(wi);
|
|
1601
|
-
return /* @__PURE__ */
|
|
1625
|
+
return /* @__PURE__ */ V("div", {
|
|
1602
1626
|
className: "stage-command-form__actions",
|
|
1603
|
-
children: [/* @__PURE__ */
|
|
1627
|
+
children: [/* @__PURE__ */ B(H, {
|
|
1604
1628
|
type: "submit",
|
|
1605
1629
|
children: e
|
|
1606
|
-
}), t && n && /* @__PURE__ */
|
|
1630
|
+
}), t && n && /* @__PURE__ */ B(H, {
|
|
1607
1631
|
type: "button",
|
|
1608
1632
|
variant: "outline",
|
|
1609
1633
|
onClick: n,
|
|
@@ -1611,23 +1635,23 @@ function Ai({ submitLabel: e, cancellable: t }) {
|
|
|
1611
1635
|
})]
|
|
1612
1636
|
});
|
|
1613
1637
|
}
|
|
1614
|
-
function
|
|
1638
|
+
function Ni(e, t, n) {
|
|
1615
1639
|
let r = X(e, "navigateToScreen");
|
|
1616
1640
|
r && !t && pn(r, {}), n?.();
|
|
1617
1641
|
}
|
|
1618
|
-
function
|
|
1619
|
-
return /* @__PURE__ */
|
|
1642
|
+
function Pi({ form: e, messages: t }) {
|
|
1643
|
+
return /* @__PURE__ */ B("section", {
|
|
1620
1644
|
className: "stage-command-form",
|
|
1621
1645
|
"data-command": e.command,
|
|
1622
1646
|
"data-generation-mode": e.generationMode,
|
|
1623
|
-
children: t.map((e) => /* @__PURE__ */
|
|
1647
|
+
children: t.map((e) => /* @__PURE__ */ B("p", {
|
|
1624
1648
|
role: "alert",
|
|
1625
1649
|
className: "stage-form-error",
|
|
1626
1650
|
children: e
|
|
1627
1651
|
}, e))
|
|
1628
1652
|
});
|
|
1629
1653
|
}
|
|
1630
|
-
function
|
|
1654
|
+
function Fi(e) {
|
|
1631
1655
|
let t = X(e, "command");
|
|
1632
1656
|
if (!t) return;
|
|
1633
1657
|
let n = Array.isArray(e.properties.fields) ? e.properties.fields.filter(Z) : [];
|
|
@@ -1635,34 +1659,34 @@ function Ni(e) {
|
|
|
1635
1659
|
command: t,
|
|
1636
1660
|
label: X(e, "label") || J(t),
|
|
1637
1661
|
fields: n,
|
|
1638
|
-
generationMode:
|
|
1639
|
-
layout:
|
|
1662
|
+
generationMode: aa(e.properties.generationMode),
|
|
1663
|
+
layout: oa(e.properties.layout)
|
|
1640
1664
|
};
|
|
1641
1665
|
}
|
|
1642
|
-
function
|
|
1666
|
+
function Ii(e, t) {
|
|
1643
1667
|
return e.generationMode === y.Manual || e.fields.length > 0 ? e.fields : t.filter((e) => !e.unsupportedReason).map((e) => ({
|
|
1644
1668
|
name: e.name,
|
|
1645
1669
|
label: J(e.name)
|
|
1646
1670
|
}));
|
|
1647
1671
|
}
|
|
1648
|
-
function
|
|
1649
|
-
let r = e.layout, i = r ?
|
|
1650
|
-
if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) =>
|
|
1651
|
-
let a = new Map(t.map((e) => [e.name, e])), o =
|
|
1652
|
-
gridTemplateColumns: Array.from({ length: o }, (e, t) =>
|
|
1653
|
-
columnGap:
|
|
1654
|
-
rowGap:
|
|
1672
|
+
function Li(e, t, n) {
|
|
1673
|
+
let r = e.layout, i = r ? sa(r, t) : [];
|
|
1674
|
+
if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) => Ri(e, n));
|
|
1675
|
+
let a = new Map(t.map((e) => [e.name, e])), o = ca(r, i), s = {
|
|
1676
|
+
gridTemplateColumns: Array.from({ length: o }, (e, t) => la(t + 1, r.columns)).join(" "),
|
|
1677
|
+
columnGap: da(r.columnGap),
|
|
1678
|
+
rowGap: da(r.rowGap)
|
|
1655
1679
|
}, c = /* @__PURE__ */ new Set();
|
|
1656
|
-
return /* @__PURE__ */
|
|
1680
|
+
return /* @__PURE__ */ V("div", {
|
|
1657
1681
|
className: "stage-command-form__layout",
|
|
1658
1682
|
style: s,
|
|
1659
1683
|
children: [i.map((e) => {
|
|
1660
1684
|
let t = a.get(e.field);
|
|
1661
|
-
return t ? (c.add(t.name),
|
|
1662
|
-
}), t.filter((e) => !c.has(e.name)).map((e) =>
|
|
1685
|
+
return t ? (c.add(t.name), Ri(t, n, e)) : null;
|
|
1686
|
+
}), t.filter((e) => !c.has(e.name)).map((e) => Ri(e, n))]
|
|
1663
1687
|
});
|
|
1664
1688
|
}
|
|
1665
|
-
function
|
|
1689
|
+
function Ri(e, t, n) {
|
|
1666
1690
|
let r = e.sourceProperty ?? e.name, i = t.find((e) => e.name === r), a = e.label ?? e.name, o = (e) => e[r], s = i?.required ?? !0, c = bi(i, {
|
|
1667
1691
|
value: o,
|
|
1668
1692
|
fieldName: r,
|
|
@@ -1674,7 +1698,7 @@ function Ii(e, t, n) {
|
|
|
1674
1698
|
value: e,
|
|
1675
1699
|
label: J(e)
|
|
1676
1700
|
}));
|
|
1677
|
-
return /* @__PURE__ */
|
|
1701
|
+
return /* @__PURE__ */ B(jt, {
|
|
1678
1702
|
value: o,
|
|
1679
1703
|
fieldName: r,
|
|
1680
1704
|
title: a,
|
|
@@ -1684,7 +1708,7 @@ function Ii(e, t, n) {
|
|
|
1684
1708
|
optionLabel: "label"
|
|
1685
1709
|
});
|
|
1686
1710
|
}
|
|
1687
|
-
if (i?.members || i?.item) return /* @__PURE__ */
|
|
1711
|
+
if (i?.members || i?.item) return /* @__PURE__ */ B(ni, {
|
|
1688
1712
|
value: o,
|
|
1689
1713
|
fieldName: r,
|
|
1690
1714
|
title: a,
|
|
@@ -1692,19 +1716,19 @@ function Ii(e, t, n) {
|
|
|
1692
1716
|
descriptor: i
|
|
1693
1717
|
});
|
|
1694
1718
|
switch (i?.type ?? "text") {
|
|
1695
|
-
case "number": return /* @__PURE__ */
|
|
1719
|
+
case "number": return /* @__PURE__ */ B(Nt, {
|
|
1696
1720
|
value: o,
|
|
1697
1721
|
fieldName: r,
|
|
1698
1722
|
title: a,
|
|
1699
1723
|
required: s
|
|
1700
1724
|
});
|
|
1701
|
-
case "boolean": return /* @__PURE__ */
|
|
1725
|
+
case "boolean": return /* @__PURE__ */ B(At, {
|
|
1702
1726
|
value: o,
|
|
1703
1727
|
fieldName: r,
|
|
1704
1728
|
label: a,
|
|
1705
1729
|
required: s
|
|
1706
1730
|
});
|
|
1707
|
-
case "date": return /* @__PURE__ */
|
|
1731
|
+
case "date": return /* @__PURE__ */ B(zi, {
|
|
1708
1732
|
value: o,
|
|
1709
1733
|
fieldName: r,
|
|
1710
1734
|
title: a,
|
|
@@ -1713,15 +1737,15 @@ function Ii(e, t, n) {
|
|
|
1713
1737
|
isNonModal: !0,
|
|
1714
1738
|
showTime: i?.withTime
|
|
1715
1739
|
});
|
|
1716
|
-
default: return /* @__PURE__ */
|
|
1740
|
+
default: return /* @__PURE__ */ B(Mt, {
|
|
1717
1741
|
value: o,
|
|
1718
1742
|
fieldName: r,
|
|
1719
1743
|
title: a,
|
|
1720
1744
|
required: s
|
|
1721
1745
|
});
|
|
1722
1746
|
}
|
|
1723
|
-
})()), l =
|
|
1724
|
-
return /* @__PURE__ */
|
|
1747
|
+
})()), l = ua(n);
|
|
1748
|
+
return /* @__PURE__ */ B("span", {
|
|
1725
1749
|
className: "stage-command-form__field",
|
|
1726
1750
|
"data-field": e.name,
|
|
1727
1751
|
"data-row": n?.row,
|
|
@@ -1731,21 +1755,21 @@ function Ii(e, t, n) {
|
|
|
1731
1755
|
children: c
|
|
1732
1756
|
}, e.name);
|
|
1733
1757
|
}
|
|
1734
|
-
var
|
|
1758
|
+
var zi = Ot((e) => /* @__PURE__ */ B(kt, {
|
|
1735
1759
|
...e,
|
|
1736
|
-
currentValue: e.showTime ? e.currentValue :
|
|
1737
|
-
onValueChange: (t) => e.onValueChange?.(!e.showTime && t instanceof Date && !Number.isNaN(t.getTime()) ?
|
|
1760
|
+
currentValue: e.showTime ? e.currentValue : Bi(e.currentValue),
|
|
1761
|
+
onValueChange: (t) => e.onValueChange?.(!e.showTime && t instanceof Date && !Number.isNaN(t.getTime()) ? bt.fromDate(t) : t)
|
|
1738
1762
|
}));
|
|
1739
|
-
function
|
|
1740
|
-
if (e instanceof
|
|
1763
|
+
function Bi(e) {
|
|
1764
|
+
if (e instanceof bt) return e.toDate();
|
|
1741
1765
|
if (typeof e != "string") return e;
|
|
1742
1766
|
try {
|
|
1743
|
-
return
|
|
1767
|
+
return bt.parse(e).toDate();
|
|
1744
1768
|
} catch {
|
|
1745
1769
|
return null;
|
|
1746
1770
|
}
|
|
1747
1771
|
}
|
|
1748
|
-
function
|
|
1772
|
+
function Vi(e, t) {
|
|
1749
1773
|
let n = {};
|
|
1750
1774
|
for (let r of e) {
|
|
1751
1775
|
let e = r.sourceProperty ?? r.name, i = t[e];
|
|
@@ -1753,47 +1777,47 @@ function zi(e, t) {
|
|
|
1753
1777
|
}
|
|
1754
1778
|
return n;
|
|
1755
1779
|
}
|
|
1756
|
-
function
|
|
1780
|
+
function Hi(e, t, n, r = [], i = [], a = !1) {
|
|
1757
1781
|
let o = new Set(e.map((e) => e.sourceProperty ?? e.name)), s = t.some((e) => e.identity), c = {};
|
|
1758
1782
|
for (let e of t) {
|
|
1759
1783
|
if (!e.identifier || !e.required || o.has(e.name)) continue;
|
|
1760
|
-
if (a &&
|
|
1761
|
-
let t = n[e.name] ||
|
|
1784
|
+
if (a && Ji(e, i)) {
|
|
1785
|
+
let t = n[e.name] || qi(e, r);
|
|
1762
1786
|
t && (c[e.name] = t);
|
|
1763
1787
|
continue;
|
|
1764
1788
|
}
|
|
1765
|
-
let t = n[e.name] ||
|
|
1789
|
+
let t = n[e.name] || qi(e, r) || nn(e.identifier) || (e.identity || !s && !Ji(e, i) ? rn(e.identifier) : void 0);
|
|
1766
1790
|
t !== void 0 && (c[e.name] = t);
|
|
1767
1791
|
}
|
|
1768
1792
|
return c;
|
|
1769
1793
|
}
|
|
1770
|
-
function
|
|
1794
|
+
function Ui(e, t, n, r) {
|
|
1771
1795
|
return Object.fromEntries(e.filter((e) => e.reference).flatMap((e) => {
|
|
1772
|
-
let i = t[e.name] || r[e.name] ||
|
|
1796
|
+
let i = t[e.name] || r[e.name] || qi(e, n) || (Gi({
|
|
1773
1797
|
...e,
|
|
1774
1798
|
required: !0
|
|
1775
|
-
}, t) ?
|
|
1799
|
+
}, t) ? Ki(e, t) : void 0);
|
|
1776
1800
|
return i === void 0 ? [] : [[e.name, i]];
|
|
1777
1801
|
}));
|
|
1778
1802
|
}
|
|
1779
|
-
function
|
|
1803
|
+
function Wi(e, t) {
|
|
1780
1804
|
return e.filter((e) => !Object.hasOwn(t, e.sourceProperty ?? e.name));
|
|
1781
1805
|
}
|
|
1782
|
-
function
|
|
1783
|
-
return !e.identifier || !e.required ? !1 : e.identity === !0 ||
|
|
1806
|
+
function Gi(e, t) {
|
|
1807
|
+
return !e.identifier || !e.required ? !1 : e.identity === !0 || Ki(e, t) !== void 0;
|
|
1784
1808
|
}
|
|
1785
|
-
function
|
|
1809
|
+
function Ki(e, t) {
|
|
1786
1810
|
if (e.identifier) return t[e.name] || nn(e.identifier);
|
|
1787
1811
|
}
|
|
1788
|
-
function
|
|
1812
|
+
function qi(e, t) {
|
|
1789
1813
|
if (!e.identifier) return;
|
|
1790
1814
|
let n = new Set(t.map((t) => t[e.name]).filter((e) => typeof e == "string" && e !== ""));
|
|
1791
1815
|
return n.size === 1 ? [...n][0] : void 0;
|
|
1792
1816
|
}
|
|
1793
|
-
function
|
|
1794
|
-
return t.some((t) => Object.hasOwn(t, e.name));
|
|
1817
|
+
function Ji(e, t) {
|
|
1818
|
+
return !e.otherEntity && t.some((t) => Object.hasOwn(t, e.name));
|
|
1795
1819
|
}
|
|
1796
|
-
function
|
|
1820
|
+
function Yi(e, t) {
|
|
1797
1821
|
let n = e.id;
|
|
1798
1822
|
if (typeof n != "string" || n === "") return e;
|
|
1799
1823
|
let r = `${t.alias ?? ""} ${t.name ?? ""}`.match(/[A-Z][a-z0-9]+/g) ?? [], i = Object.fromEntries(r.map((e) => `${e.charAt(0).toLowerCase()}${e.slice(1)}Id`).filter((t) => !Object.hasOwn(e, t)).map((e) => [e, n]));
|
|
@@ -1802,25 +1826,25 @@ function qi(e, t) {
|
|
|
1802
1826
|
...e
|
|
1803
1827
|
};
|
|
1804
1828
|
}
|
|
1805
|
-
function
|
|
1806
|
-
return Object.values(e).flatMap((e) => e.rows.map((t) => [t,
|
|
1829
|
+
function Xi(e) {
|
|
1830
|
+
return Object.values(e).flatMap((e) => e.rows.map((t) => [t, Yi(t, e)]));
|
|
1807
1831
|
}
|
|
1808
|
-
function
|
|
1809
|
-
return
|
|
1832
|
+
function Zi(e) {
|
|
1833
|
+
return Xi(e).map(([, e]) => e);
|
|
1810
1834
|
}
|
|
1811
|
-
function
|
|
1812
|
-
let n = new Map(
|
|
1835
|
+
function Qi(e, t) {
|
|
1836
|
+
let n = new Map(Xi(t));
|
|
1813
1837
|
return Object.values(e).filter((e) => e !== void 0).map((e) => n.get(e) ?? e);
|
|
1814
1838
|
}
|
|
1815
|
-
function
|
|
1816
|
-
return e.filter((e) => e.identifier && e.required &&
|
|
1839
|
+
function $i(e, t, n, r) {
|
|
1840
|
+
return e.filter((e) => e.identifier && e.required && Ji(e, r)).filter((e) => !t[e.name] && qi(e, n) === void 0).map((e) => e.name);
|
|
1817
1841
|
}
|
|
1818
|
-
function
|
|
1842
|
+
function ea(e) {
|
|
1819
1843
|
let t = e.properties.populateSource;
|
|
1820
1844
|
return Z(t) ? t : void 0;
|
|
1821
1845
|
}
|
|
1822
|
-
function
|
|
1823
|
-
let r =
|
|
1846
|
+
function ta(e, t, n) {
|
|
1847
|
+
let r = ea(e), i = r?.queryName, a = Object.entries(r?.parameterBindings ?? {}).map(([e, r]) => [e, na(e, r?.path ?? e, t, n)]), o = Object.fromEntries(a.filter(([, e]) => e !== void 0 && e !== "")), s = !!i && n.routesReady && a.every(([, e]) => e !== void 0 && e !== ""), c = G({
|
|
1824
1848
|
scope: `populate:${X(e, "command")}`,
|
|
1825
1849
|
name: i,
|
|
1826
1850
|
route: i ? n.routes?.queries?.[i] : void 0,
|
|
@@ -1838,7 +1862,7 @@ function $i(e, t, n) {
|
|
|
1838
1862
|
return Object.keys(e).length > 0 ? e : void 0;
|
|
1839
1863
|
}, [u, t]);
|
|
1840
1864
|
}
|
|
1841
|
-
function
|
|
1865
|
+
function na(e, t, n, r) {
|
|
1842
1866
|
let i = r.parameters[t] ?? r.parameters[e];
|
|
1843
1867
|
if (i) return i;
|
|
1844
1868
|
let a = n.find((n) => n.name === t || n.name === e)?.identifier;
|
|
@@ -1846,52 +1870,52 @@ function ea(e, t, n, r) {
|
|
|
1846
1870
|
let o = r.resolveBinding({ path: t });
|
|
1847
1871
|
return typeof o == "string" || typeof o == "number" ? o : void 0;
|
|
1848
1872
|
}
|
|
1849
|
-
function
|
|
1850
|
-
let r = f(() =>
|
|
1873
|
+
function ra(e, t, n) {
|
|
1874
|
+
let r = f(() => ia(e, t), [e, t]), i = r.map((e) => n(e.source)), a = JSON.stringify(i);
|
|
1851
1875
|
return f(() => {
|
|
1852
1876
|
let e = Object.fromEntries(r.map((e, t) => [e.name, i[t]]).filter(([, e]) => e != null && e !== ""));
|
|
1853
1877
|
return Object.keys(e).length > 0 ? e : void 0;
|
|
1854
1878
|
}, [r, a]);
|
|
1855
1879
|
}
|
|
1856
|
-
function
|
|
1880
|
+
function ia(e, t) {
|
|
1857
1881
|
let n = e.properties.arguments;
|
|
1858
1882
|
if (!Array.isArray(n)) return [];
|
|
1859
1883
|
let r = new Set(t.map((e) => e.sourceProperty ?? e.name));
|
|
1860
1884
|
return n.filter((e) => typeof e == "object" && !!e && typeof e.name == "string" && typeof e.source == "string" && r.has(e.name));
|
|
1861
1885
|
}
|
|
1862
|
-
function
|
|
1886
|
+
function aa(e) {
|
|
1863
1887
|
return e === y.Manual ? y.Manual : y.Auto;
|
|
1864
1888
|
}
|
|
1865
|
-
function
|
|
1889
|
+
function oa(e) {
|
|
1866
1890
|
if (!Z(e)) return;
|
|
1867
1891
|
let t = e;
|
|
1868
1892
|
return {
|
|
1869
|
-
columns: Array.isArray(t.columns) ? t.columns.filter(
|
|
1870
|
-
placements: Array.isArray(t.placements) ? t.placements.filter(
|
|
1871
|
-
columnGap:
|
|
1872
|
-
rowGap:
|
|
1893
|
+
columns: Array.isArray(t.columns) ? t.columns.filter(ga) : [],
|
|
1894
|
+
placements: Array.isArray(t.placements) ? t.placements.filter(_a) : [],
|
|
1895
|
+
columnGap: va(t.columnGap) ? t.columnGap : void 0,
|
|
1896
|
+
rowGap: va(t.rowGap) ? t.rowGap : void 0
|
|
1873
1897
|
};
|
|
1874
1898
|
}
|
|
1875
|
-
function
|
|
1899
|
+
function sa(e, t) {
|
|
1876
1900
|
let n = new Map(e.placements.map((e) => [e.field, e]));
|
|
1877
|
-
for (let e of t) !n.has(e.name) &&
|
|
1901
|
+
for (let e of t) !n.has(e.name) && _a(e.placement) && n.set(e.name, e.placement);
|
|
1878
1902
|
return [...n.values()].sort((e, t) => e.row - t.row || e.column - t.column || e.field.localeCompare(t.field));
|
|
1879
1903
|
}
|
|
1880
|
-
function
|
|
1904
|
+
function ca(e, t) {
|
|
1881
1905
|
return Math.max(1, ...e.columns.map((e) => e.index), ...t.map((e) => e.column + (e.columnSpan ?? 1) - 1));
|
|
1882
1906
|
}
|
|
1883
|
-
function
|
|
1884
|
-
let n = t.find((t) => t.index === e), r =
|
|
1907
|
+
function la(e, t) {
|
|
1908
|
+
let n = t.find((t) => t.index === e), r = da(n?.width), i = da(n?.minWidth), a = da(n?.maxWidth);
|
|
1885
1909
|
return n?.width?.unit === b.Fraction && a ? `minmax(${i ?? "0"}, ${r ?? "1fr"})` : i || a ? `minmax(${i ?? "0"}, ${a && r ? `min(${r}, ${a})` : a ?? r ?? "1fr"})` : r ?? "1fr";
|
|
1886
1910
|
}
|
|
1887
|
-
function
|
|
1911
|
+
function ua(e) {
|
|
1888
1912
|
if (e) return {
|
|
1889
1913
|
gridColumn: `${e.column} / span ${e.columnSpan ?? 1}`,
|
|
1890
1914
|
gridRow: `${e.row} / span ${e.rowSpan ?? 1}`,
|
|
1891
|
-
width: e.width?.unit === b.Fraction ? void 0 :
|
|
1915
|
+
width: e.width?.unit === b.Fraction ? void 0 : da(e.width)
|
|
1892
1916
|
};
|
|
1893
1917
|
}
|
|
1894
|
-
function
|
|
1918
|
+
function da(e) {
|
|
1895
1919
|
if (e) switch (e.unit) {
|
|
1896
1920
|
case b.Fraction: return `${e.value ?? 1}fr`;
|
|
1897
1921
|
case b.Pixels: return `${e.value ?? 0}px`;
|
|
@@ -1899,65 +1923,77 @@ function la(e) {
|
|
|
1899
1923
|
case b.Auto: return "auto";
|
|
1900
1924
|
}
|
|
1901
1925
|
}
|
|
1902
|
-
function
|
|
1926
|
+
function fa(e, t) {
|
|
1903
1927
|
let n = (e, t) => !!e.members?.some((e) => e === t || e.startsWith(`${t}.`)), r = new Set(e.map((e) => t.find((t) => n(t, e.sourceProperty ?? e.name))).filter((e) => e !== void 0));
|
|
1904
1928
|
return [...new Set(t.filter((e) => !r.has(e)).map((e) => e.message))];
|
|
1905
1929
|
}
|
|
1906
|
-
function
|
|
1930
|
+
function pa(e, t, n, r) {
|
|
1907
1931
|
let i = e.find((e) => (e.sourceProperty ?? e.name) === n), a = t.find((e) => e.name === n);
|
|
1908
1932
|
if (a?.required ?? !0) return r == null || r === "" ? `${i?.label ?? n} is required` : a ? Ir(a, r, i?.label ?? n) : void 0;
|
|
1909
1933
|
}
|
|
1910
|
-
function
|
|
1934
|
+
function ma(e, t) {
|
|
1911
1935
|
let n = new Map(t.map((e) => [e.name, e]));
|
|
1912
1936
|
return e.flatMap((e) => {
|
|
1913
1937
|
let t = n.get(e.sourceProperty ?? e.name);
|
|
1914
1938
|
return t?.unsupportedReason ? [`The field “${e.label ?? e.name}” uses unsupported schema metadata: ${t.unsupportedReason}.`] : [];
|
|
1915
1939
|
});
|
|
1916
1940
|
}
|
|
1917
|
-
function
|
|
1941
|
+
function ha(e, t) {
|
|
1918
1942
|
if (!e) return [];
|
|
1919
|
-
let n =
|
|
1943
|
+
let n = sa(e, t).filter((e) => e.width?.unit === b.Fraction).map((e) => `The field “${e.field}” uses a fractional field width, which cannot be applied to an individual form control.`), r = e.columns.filter((e) => e.width?.unit === b.Fraction && !!e.maxWidth).map((e) => `Column ${e.index} combines a fractional width with maxWidth; Stage keeps the fractional track and ignores maxWidth for that column.`);
|
|
1920
1944
|
return [...n, ...r];
|
|
1921
1945
|
}
|
|
1922
1946
|
function X(e, t, n = "") {
|
|
1923
1947
|
let r = e.properties[t];
|
|
1924
1948
|
return typeof r == "string" ? r : n;
|
|
1925
1949
|
}
|
|
1926
|
-
function
|
|
1950
|
+
function ga(e) {
|
|
1927
1951
|
return Z(e) && typeof e.index == "number" && Number.isInteger(e.index) && e.index > 0;
|
|
1928
1952
|
}
|
|
1929
|
-
function
|
|
1953
|
+
function _a(e) {
|
|
1930
1954
|
return Z(e) && typeof e.field == "string" && typeof e.row == "number" && typeof e.column == "number" && e.row > 0 && e.column > 0;
|
|
1931
1955
|
}
|
|
1932
|
-
function
|
|
1956
|
+
function va(e) {
|
|
1933
1957
|
return Z(e) && Object.values(b).includes(e.unit);
|
|
1934
1958
|
}
|
|
1935
1959
|
function Z(e) {
|
|
1936
1960
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1937
1961
|
}
|
|
1938
1962
|
// src/readableValue.ts
|
|
1939
|
-
var
|
|
1940
|
-
function
|
|
1963
|
+
var ya = /^(\d{4})-(\d{2})-(\d{2})$/, ba = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?$/;
|
|
1964
|
+
function xa(e) {
|
|
1941
1965
|
if (typeof e == "boolean") return e ? "Yes" : "No";
|
|
1942
|
-
if (
|
|
1966
|
+
if (Array.isArray(e)) return Sa(e);
|
|
1967
|
+
if (typeof e == "string") return wa(e) ?? Ta(e);
|
|
1943
1968
|
}
|
|
1944
|
-
function
|
|
1945
|
-
|
|
1969
|
+
function Sa(e) {
|
|
1970
|
+
if (e.length === 0) return "";
|
|
1971
|
+
let t = e.map(Ca);
|
|
1972
|
+
return t.every((e) => e !== void 0) ? t.map((e) => xa(e) ?? String(e)).join(", ") : e.length === 1 ? "1 item" : `${e.length} items`;
|
|
1973
|
+
}
|
|
1974
|
+
function Ca(e) {
|
|
1975
|
+
if (typeof e != "object" || !e) return e ?? "";
|
|
1976
|
+
if (Array.isArray(e)) return;
|
|
1977
|
+
let t = Object.values(e);
|
|
1978
|
+
return t.length === 1 && (t[0] === null || typeof t[0] != "object") ? t[0] ?? "" : void 0;
|
|
1979
|
+
}
|
|
1980
|
+
function wa(e) {
|
|
1981
|
+
let t = ya.exec(e);
|
|
1946
1982
|
if (!t) return;
|
|
1947
1983
|
let n = new Date(2e3, Number(t[2]) - 1, Number(t[3]));
|
|
1948
1984
|
return n.setFullYear(Number(t[1])), Number.isNaN(n.getTime()) || n.getMonth() !== Number(t[2]) - 1 ? void 0 : n.toLocaleDateString();
|
|
1949
1985
|
}
|
|
1950
|
-
function
|
|
1951
|
-
if (!
|
|
1986
|
+
function Ta(e) {
|
|
1987
|
+
if (!ba.test(e)) return;
|
|
1952
1988
|
let t = new Date(e);
|
|
1953
1989
|
return Number.isNaN(t.getTime()) ? void 0 : t.toLocaleString();
|
|
1954
1990
|
}
|
|
1955
|
-
function
|
|
1956
|
-
let t =
|
|
1991
|
+
function Ea(e) {
|
|
1992
|
+
let t = Be(), n = p(void 0), r = f(() => se(ke(e.id, e.behaviors), C.DoubleClick), [e.behaviors, e.id]);
|
|
1957
1993
|
l(() => () => clearTimeout(n.current), []);
|
|
1958
1994
|
let i = s((e) => {
|
|
1959
1995
|
if (clearTimeout(n.current), n.current = void 0, !t) return;
|
|
1960
|
-
let i = (n) => n.path?.startsWith("item.") ?
|
|
1996
|
+
let i = (n) => n.path?.startsWith("item.") ? ue({ subject: n.path }, e) : t.context.resolve(n);
|
|
1961
1997
|
vn(r, t.dispatcher, {
|
|
1962
1998
|
...t.context,
|
|
1963
1999
|
subject: () => e,
|
|
@@ -1976,7 +2012,7 @@ function Sa(e) {
|
|
|
1976
2012
|
};
|
|
1977
2013
|
}
|
|
1978
2014
|
// src/stageSceneRouting.ts
|
|
1979
|
-
var
|
|
2015
|
+
var Da = {
|
|
1980
2016
|
routedSlots: {},
|
|
1981
2017
|
tabSlots: {},
|
|
1982
2018
|
filters: {},
|
|
@@ -1984,7 +2020,7 @@ var Ca = {
|
|
|
1984
2020
|
segmentScreens: {},
|
|
1985
2021
|
slotDefaults: {}
|
|
1986
2022
|
};
|
|
1987
|
-
function
|
|
2023
|
+
function Oa(e) {
|
|
1988
2024
|
let t = [...(e.layouts ?? []).flatMap((e) => e.slots ?? []), ...(e.screenTemplates ?? []).flatMap((e) => e.slots ?? [])], n = {};
|
|
1989
2025
|
for (let e of t) e.role !== A.Panel && (e.routed || (e.routedBy?.length ?? 0) > 0) && (n[e.name] = e.routedBy ?? []);
|
|
1990
2026
|
let r = [
|
|
@@ -1998,11 +2034,11 @@ function wa(e) {
|
|
|
1998
2034
|
...(e.outletLevels ?? []).flatMap((e) => [...(e.refinements ?? []).flatMap((e) => e.items ?? []), ...(e.contributions ?? []).flatMap((e) => e.items ?? [])]),
|
|
1999
2035
|
...(e.screens ?? []).flatMap((e) => (e.outletContributions ?? []).flatMap((e) => e.items ?? []))
|
|
2000
2036
|
], o = {};
|
|
2001
|
-
for (let e of
|
|
2037
|
+
for (let e of ka(a)) e.kind === E.Filter && (o[e.sets?.parameter ?? e.id] = e.sets?.query);
|
|
2002
2038
|
let s = {}, c = {};
|
|
2003
2039
|
for (let t of e.screens ?? []) {
|
|
2004
|
-
s[
|
|
2005
|
-
for (let e of Object.values(t.slotContent ?? {}).flat().flatMap(
|
|
2040
|
+
s[pe(t.name)] = t.name;
|
|
2041
|
+
for (let e of Object.values(t.slotContent ?? {}).flat().flatMap(Aa)) {
|
|
2006
2042
|
let t = e.properties ?? {};
|
|
2007
2043
|
e.componentName === "core:slot" && typeof t.shows == "string" && typeof t.name == "string" && (c[t.name] = t.shows);
|
|
2008
2044
|
}
|
|
@@ -2016,23 +2052,23 @@ function wa(e) {
|
|
|
2016
2052
|
slotDefaults: c
|
|
2017
2053
|
};
|
|
2018
2054
|
}
|
|
2019
|
-
function
|
|
2020
|
-
return e.flatMap((e) => e.kind === E.Group ? [e, ...
|
|
2055
|
+
function ka(e) {
|
|
2056
|
+
return e.flatMap((e) => e.kind === E.Group ? [e, ...ka(e.items ?? [])] : [e]);
|
|
2021
2057
|
}
|
|
2022
|
-
function
|
|
2058
|
+
function Aa(e) {
|
|
2023
2059
|
let t = e.slots ?? {};
|
|
2024
|
-
return [e, ...Object.values(t).flat().flatMap(
|
|
2060
|
+
return [e, ...Object.values(t).flat().flatMap(Aa)];
|
|
2025
2061
|
}
|
|
2026
|
-
var
|
|
2027
|
-
function
|
|
2028
|
-
let n = e.indexOf("?"), r = n < 0 ? e : e.slice(0, n), i = n < 0 ? "" : e.slice(n + 1), a = r.split("/").filter((e) => e.length > 0), o = a.findIndex((e) => e.startsWith(
|
|
2062
|
+
var ja = "@";
|
|
2063
|
+
function Ma(e, t) {
|
|
2064
|
+
let n = e.indexOf("?"), r = n < 0 ? e : e.slice(0, n), i = n < 0 ? "" : e.slice(n + 1), a = r.split("/").filter((e) => e.length > 0), o = a.findIndex((e) => e.startsWith(ja)), s = (o < 0 ? a : a.slice(0, o)).join("/"), c = {}, l = {};
|
|
2029
2065
|
for (let e = o; e >= 0 && e < a.length;) {
|
|
2030
2066
|
let n = e + 1;
|
|
2031
|
-
for (; n < a.length && !a[n].startsWith(
|
|
2067
|
+
for (; n < a.length && !a[n].startsWith(ja);) n++;
|
|
2032
2068
|
let r = decodeURIComponent(a[e].slice(1)), i = a.slice(e + 1, n).join("/"), o = r.indexOf(".");
|
|
2033
2069
|
if (o > 0) i && (l[r.slice(o + 1)] = decodeURIComponent(i));
|
|
2034
2070
|
else if (t.routedSlots[r]) {
|
|
2035
|
-
let e =
|
|
2071
|
+
let e = Le(i, t.routedSlots[r]), n = (e.segment ? t.segmentScreens[e.segment] : void 0) ?? t.slotDefaults[r];
|
|
2036
2072
|
c[r] = n ? {
|
|
2037
2073
|
...e,
|
|
2038
2074
|
screen: n
|
|
@@ -2052,14 +2088,14 @@ function Oa(e, t) {
|
|
|
2052
2088
|
}
|
|
2053
2089
|
};
|
|
2054
2090
|
}
|
|
2055
|
-
function
|
|
2056
|
-
let r = e ?? "", i = r.indexOf("?"), a = i < 0 ? r : r.slice(0, i), o = i < 0 ? "" : r.slice(i + 1), s = a.split("/").filter((e) => e.length > 0).map(
|
|
2091
|
+
function Na(e, t, n) {
|
|
2092
|
+
let r = e ?? "", i = r.indexOf("?"), a = i < 0 ? r : r.slice(0, i), o = i < 0 ? "" : r.slice(i + 1), s = a.split("/").filter((e) => e.length > 0).map(Pa);
|
|
2057
2093
|
for (let [e, r] of Object.entries(n.routedSlots)) {
|
|
2058
2094
|
let i = t.slots[e];
|
|
2059
|
-
i && s.push(`${
|
|
2095
|
+
i && s.push(`${ja}${encodeURIComponent(e)}`, ...Re(i, r).split("/").filter((e) => e.length > 0).map(Pa));
|
|
2060
2096
|
for (let [r, i] of Object.entries(n.tabSlots)) {
|
|
2061
2097
|
let n = t.tabs[r];
|
|
2062
|
-
i === e && n && s.push(`${
|
|
2098
|
+
i === e && n && s.push(`${ja}${encodeURIComponent(e)}.${encodeURIComponent(r)}`, Pa(encodeURIComponent(n)));
|
|
2063
2099
|
}
|
|
2064
2100
|
}
|
|
2065
2101
|
let c = new URLSearchParams(o);
|
|
@@ -2067,20 +2103,20 @@ function ka(e, t, n) {
|
|
|
2067
2103
|
let l = c.toString();
|
|
2068
2104
|
return l ? `${s.join("/")}?${l}` : s.join("/");
|
|
2069
2105
|
}
|
|
2070
|
-
function
|
|
2071
|
-
return e.startsWith(
|
|
2106
|
+
function Pa(e) {
|
|
2107
|
+
return e.startsWith(ja) ? `%40${e.slice(1)}` : e;
|
|
2072
2108
|
}
|
|
2073
|
-
var
|
|
2074
|
-
function
|
|
2075
|
-
let r = () => t === "hash" ? e.location.hash.replace(/^#\/?/, "") : `${e.location.pathname}${e.location.search}`.replace(/^\//, ""), i = (n) => t === "hash" ? `${e.location.pathname}${e.location.search}#/${n}` : `/${n}`, a = () => e.history.state?.[
|
|
2076
|
-
let o = a ? { [
|
|
2109
|
+
var Fa = "sceneNavigation";
|
|
2110
|
+
function Ia(e, t, n) {
|
|
2111
|
+
let r = () => t === "hash" ? e.location.hash.replace(/^#\/?/, "") : `${e.location.pathname}${e.location.search}`.replace(/^\//, ""), i = (n) => t === "hash" ? `${e.location.pathname}${e.location.search}#/${n}` : `/${n}`, a = () => e.history.state?.[Fa], o = (e) => e === void 0 ? void 0 : Ma(e, n).scene, s = Ma(r(), n).route, c, l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), d = () => l.forEach((e) => e()), f = (t, r, a) => {
|
|
2112
|
+
let o = a ? { [Fa]: a } : e.history.state, c = i(Na(r, s, n));
|
|
2077
2113
|
t === "push" ? e.history.pushState(o, "", c) : e.history.replaceState(o, "", c);
|
|
2078
2114
|
}, p = (e, t) => {
|
|
2079
2115
|
e !== s && (s = e, d(), t && f(t, o(r())));
|
|
2080
2116
|
}, m = () => {
|
|
2081
2117
|
c = void 0;
|
|
2082
|
-
let e =
|
|
2083
|
-
|
|
2118
|
+
let e = Ma(r(), n), t = La(s, e.route, n);
|
|
2119
|
+
Ra(t, s) || (s = t, d()), u.forEach((t) => t(e.scene, a()));
|
|
2084
2120
|
}, h = !1, g = () => {
|
|
2085
2121
|
h || (h = !0, e.addEventListener("popstate", m), t === "hash" && e.addEventListener("hashchange", m));
|
|
2086
2122
|
}, _ = () => {
|
|
@@ -2091,7 +2127,7 @@ function Ma(e, t, n) {
|
|
|
2091
2127
|
location: () => o(r()),
|
|
2092
2128
|
state: a,
|
|
2093
2129
|
push: (e) => {
|
|
2094
|
-
o(e.url) === o(r()) ? (e.dialog && !a()?.dialog && (c = a()), f("replace", e.url, e)) : (c = void 0, s =
|
|
2130
|
+
o(e.url) === o(r()) ? (e.dialog && !a()?.dialog && (c = a()), f("replace", e.url, e)) : (c = void 0, s = Fe, d(), f("push", e.url, e));
|
|
2095
2131
|
},
|
|
2096
2132
|
replace: (e) => f("replace", e.url, e),
|
|
2097
2133
|
back: () => {
|
|
@@ -2106,16 +2142,16 @@ function Ma(e, t, n) {
|
|
|
2106
2142
|
subscribe: (e) => (l.add(e), g(), () => {
|
|
2107
2143
|
l.delete(e), _();
|
|
2108
2144
|
}),
|
|
2109
|
-
openInSlot: (e, t) => p(
|
|
2110
|
-
closeSlot: (e) => p(s.slots[e] ?
|
|
2111
|
-
selectTab: (e, t) => p(s.tabs[e] === t ? s :
|
|
2112
|
-
setQueryParameter: (e, t) => p((s.query[e] ?? "") === (t ?? "") ? s :
|
|
2145
|
+
openInSlot: (e, t) => p(Xe(s, e, t), n.routedSlots[e] ? "push" : void 0),
|
|
2146
|
+
closeSlot: (e) => p(s.slots[e] ? Ye(s, e) : s, n.routedSlots[e] ? "push" : void 0),
|
|
2147
|
+
selectTab: (e, t) => p(s.tabs[e] === t ? s : Ze(s, e, t), n.tabSlots[e] ? "push" : void 0),
|
|
2148
|
+
setQueryParameter: (e, t) => p((s.query[e] ?? "") === (t ?? "") ? s : Je(s, e, t), n.pageRouted ? "replace" : void 0),
|
|
2113
2149
|
dispose: () => {
|
|
2114
2150
|
l.clear(), u.clear(), _();
|
|
2115
2151
|
}
|
|
2116
2152
|
};
|
|
2117
2153
|
}
|
|
2118
|
-
function
|
|
2154
|
+
function La(e, t, n) {
|
|
2119
2155
|
let r = Object.fromEntries(Object.entries(e.slots).filter(([e]) => !n.routedSlots[e])), i = Object.fromEntries(Object.entries(e.tabs).filter(([e]) => !n.tabSlots[e]));
|
|
2120
2156
|
return {
|
|
2121
2157
|
slots: {
|
|
@@ -2129,10 +2165,10 @@ function Na(e, t, n) {
|
|
|
2129
2165
|
query: n.pageRouted ? t.query : e.query
|
|
2130
2166
|
};
|
|
2131
2167
|
}
|
|
2132
|
-
function
|
|
2168
|
+
function Ra(e, t) {
|
|
2133
2169
|
return JSON.stringify(e) === JSON.stringify(t);
|
|
2134
2170
|
}
|
|
2135
|
-
function
|
|
2171
|
+
function za(e) {
|
|
2136
2172
|
let t = h(e.subscribe, e.getState, e.getState);
|
|
2137
2173
|
return f(() => ({
|
|
2138
2174
|
state: t,
|
|
@@ -2142,21 +2178,21 @@ function Fa(e) {
|
|
|
2142
2178
|
setQueryParameter: e.setQueryParameter
|
|
2143
2179
|
}), [e, t]);
|
|
2144
2180
|
}
|
|
2145
|
-
var
|
|
2146
|
-
function
|
|
2181
|
+
var Ba = a(Da);
|
|
2182
|
+
function Va(e, t, n) {
|
|
2147
2183
|
return Object.fromEntries(Object.entries(t).filter(([t, r]) => r !== "" && t in e.filters && (e.filters[t] === void 0 || e.filters[t] === n)));
|
|
2148
2184
|
}
|
|
2149
|
-
function
|
|
2150
|
-
let t = c(
|
|
2185
|
+
function Ha(e) {
|
|
2186
|
+
let t = c(Ba), n = Ge(), r = JSON.stringify(Va(t, n, e));
|
|
2151
2187
|
return f(() => JSON.parse(r), [r]);
|
|
2152
2188
|
}
|
|
2153
2189
|
// src/stageDialogScreens.ts
|
|
2154
|
-
var
|
|
2155
|
-
function
|
|
2190
|
+
var Ua = "Stage:confirmDialog", Wa = "ConfirmDialog";
|
|
2191
|
+
function Ga(e, t) {
|
|
2156
2192
|
let n = new Set(t.map((e) => e.name));
|
|
2157
2193
|
return e.map((t) => {
|
|
2158
|
-
if (t.screenTemplate !==
|
|
2159
|
-
let r =
|
|
2194
|
+
if (t.screenTemplate !== Wa || n.has(Wa)) return t;
|
|
2195
|
+
let r = Ka(t), i = e.find((e) => e.name !== t.name)?.name, a = R(`confirm-dialog-${t.name}`, Ua, {
|
|
2160
2196
|
title: t.name,
|
|
2161
2197
|
decisions: r,
|
|
2162
2198
|
home: i
|
|
@@ -2169,99 +2205,99 @@ function Va(e, t) {
|
|
|
2169
2205
|
};
|
|
2170
2206
|
});
|
|
2171
2207
|
}
|
|
2172
|
-
function
|
|
2208
|
+
function Ka(e) {
|
|
2173
2209
|
let t = [];
|
|
2174
|
-
for (let n of
|
|
2175
|
-
let r =
|
|
2210
|
+
for (let n of qa(Object.values(e.slotContent).flat())) {
|
|
2211
|
+
let r = Ja(n.properties.command);
|
|
2176
2212
|
r && !t.some((e) => e.command === r) && t.push({
|
|
2177
2213
|
command: r,
|
|
2178
|
-
label:
|
|
2179
|
-
navigateToScreen:
|
|
2180
|
-
typeName:
|
|
2181
|
-
route:
|
|
2214
|
+
label: Ja(n.properties.label),
|
|
2215
|
+
navigateToScreen: Ja(n.properties.navigateToScreen),
|
|
2216
|
+
typeName: Ja(n.properties.typeName),
|
|
2217
|
+
route: Ja(n.properties.route),
|
|
2182
2218
|
form: e.forms.find((e) => e.forCommand === r)
|
|
2183
2219
|
});
|
|
2184
2220
|
}
|
|
2185
2221
|
return t;
|
|
2186
2222
|
}
|
|
2187
|
-
function
|
|
2223
|
+
function qa(e) {
|
|
2188
2224
|
return e.flatMap((e) => {
|
|
2189
2225
|
let t = e;
|
|
2190
|
-
return t.componentName === "core:action" ? [t] :
|
|
2226
|
+
return t.componentName === "core:action" ? [t] : qa(Object.values(t.slots ?? {}).flat());
|
|
2191
2227
|
});
|
|
2192
2228
|
}
|
|
2193
|
-
function
|
|
2229
|
+
function Ja(e) {
|
|
2194
2230
|
return typeof e == "string" && e !== "" ? e : void 0;
|
|
2195
2231
|
}
|
|
2196
2232
|
// src/StageConfirmDialog.tsx
|
|
2197
|
-
function
|
|
2198
|
-
let { routes: t, parameters: n, queries: r, selections: i } = W(), [a, o] = m(), s = p(null), c = typeof e.properties.title == "string" ? e.properties.title : "", u = Array.isArray(e.properties.decisions) ? e.properties.decisions : [], d = typeof e.properties.home == "string" ? e.properties.home : void 0, f = u.find((e) => e.command === a), h =
|
|
2199
|
-
return l(() => s.current?.focus(), []), /* @__PURE__ */
|
|
2233
|
+
function Ya({ element: e }) {
|
|
2234
|
+
let { routes: t, parameters: n, queries: r, selections: i } = W(), [a, o] = m(), s = p(null), c = typeof e.properties.title == "string" ? e.properties.title : "", u = Array.isArray(e.properties.decisions) ? e.properties.decisions : [], d = typeof e.properties.home == "string" ? e.properties.home : void 0, f = u.find((e) => e.command === a), h = Qi(i, r);
|
|
2235
|
+
return l(() => s.current?.focus(), []), /* @__PURE__ */ V("section", {
|
|
2200
2236
|
className: "scene-slice-dialog stage-confirm-dialog",
|
|
2201
2237
|
role: "dialog",
|
|
2202
2238
|
"aria-label": J(c),
|
|
2203
|
-
"data-stage-component":
|
|
2239
|
+
"data-stage-component": Ua,
|
|
2204
2240
|
children: [
|
|
2205
|
-
/* @__PURE__ */
|
|
2241
|
+
/* @__PURE__ */ B("header", {
|
|
2206
2242
|
className: "scene-slice-dialog-header",
|
|
2207
|
-
children: /* @__PURE__ */
|
|
2243
|
+
children: /* @__PURE__ */ B("h2", {
|
|
2208
2244
|
className: "scene-slice-dialog-title",
|
|
2209
2245
|
children: J(c)
|
|
2210
2246
|
})
|
|
2211
2247
|
}),
|
|
2212
|
-
/* @__PURE__ */
|
|
2248
|
+
/* @__PURE__ */ B("div", {
|
|
2213
2249
|
className: "stage-confirm-dialog__decisions",
|
|
2214
|
-
children: u.map((e, t) => /* @__PURE__ */
|
|
2250
|
+
children: u.map((e, t) => /* @__PURE__ */ B("button", {
|
|
2215
2251
|
ref: t === 0 ? s : void 0,
|
|
2216
2252
|
type: "button",
|
|
2217
2253
|
className: t === 0 ? "scene-slice-dialog-submit stage-confirm-dialog__decision" : "scene-slice-dialog-cancel stage-confirm-dialog__decision",
|
|
2218
2254
|
"data-emphasis": t === 0 ? "primary" : "secondary",
|
|
2219
2255
|
"aria-pressed": e.command === a,
|
|
2220
2256
|
onClick: () => o(e.command),
|
|
2221
|
-
children:
|
|
2257
|
+
children: Za(e)
|
|
2222
2258
|
}, e.command))
|
|
2223
2259
|
}),
|
|
2224
|
-
f && /* @__PURE__ */
|
|
2225
|
-
/* @__PURE__ */
|
|
2260
|
+
f && /* @__PURE__ */ B(mi, { children: /* @__PURE__ */ B(Oi, { element: eo(f, t?.commandSchemas?.[f.command] ?? "", n, h) }, f.command) }),
|
|
2261
|
+
/* @__PURE__ */ B("footer", {
|
|
2226
2262
|
className: "scene-slice-dialog-footer",
|
|
2227
|
-
children: /* @__PURE__ */
|
|
2263
|
+
children: /* @__PURE__ */ B("button", {
|
|
2228
2264
|
type: "button",
|
|
2229
2265
|
className: "scene-slice-dialog-cancel stage-confirm-dialog__cancel",
|
|
2230
|
-
onClick: () =>
|
|
2266
|
+
onClick: () => Xa(u, d),
|
|
2231
2267
|
children: "Cancel"
|
|
2232
2268
|
})
|
|
2233
2269
|
})
|
|
2234
2270
|
]
|
|
2235
2271
|
});
|
|
2236
2272
|
}
|
|
2237
|
-
function
|
|
2273
|
+
function Xa(e, t) {
|
|
2238
2274
|
let n = new Set(e.map((e) => e.navigateToScreen).filter((e) => !!e)), r = n.size === 1 ? [...n][0] : t;
|
|
2239
2275
|
r && pn(r, {});
|
|
2240
2276
|
}
|
|
2241
|
-
function
|
|
2277
|
+
function Za(e) {
|
|
2242
2278
|
return e.label ?? J(e.command);
|
|
2243
2279
|
}
|
|
2244
|
-
function
|
|
2245
|
-
return !e.identifier || !e.required ? !1 : e.identity === !0 || !!t[e.name] ||
|
|
2280
|
+
function Qa(e, t, n) {
|
|
2281
|
+
return !e.identifier || !e.required ? !1 : e.identity === !0 || !!t[e.name] || qi(e, n) !== void 0;
|
|
2246
2282
|
}
|
|
2247
|
-
function
|
|
2283
|
+
function $a(e, t, n, r) {
|
|
2248
2284
|
let i = e.form?.fields ?? [], a = i.length > 0 ? i : t.filter((e) => !e.unsupportedReason).map((e) => ({
|
|
2249
2285
|
name: e.name,
|
|
2250
2286
|
label: e.name
|
|
2251
|
-
})), o = new Set(t.filter((e) =>
|
|
2287
|
+
})), o = new Set(t.filter((e) => Qa(e, n, r)).map((e) => e.name)), s = a.filter((e) => !o.has(e.sourceProperty ?? e.name)), c = new Set(s.map((e) => e.sourceProperty ?? e.name)), l = t.filter((e) => e.identifier && e.required && !o.has(e.name) && !c.has(e.name));
|
|
2252
2288
|
return [...s, ...l.map((e) => ({
|
|
2253
2289
|
name: e.name,
|
|
2254
2290
|
label: J(e.name)
|
|
2255
2291
|
}))];
|
|
2256
2292
|
}
|
|
2257
|
-
function
|
|
2258
|
-
let i =
|
|
2293
|
+
function eo(e, t, n, r) {
|
|
2294
|
+
let i = $a(e, Y(t), n, r);
|
|
2259
2295
|
return {
|
|
2260
2296
|
id: `confirm-${e.command}`,
|
|
2261
|
-
componentName:
|
|
2297
|
+
componentName: Ua,
|
|
2262
2298
|
properties: {
|
|
2263
2299
|
command: e.command,
|
|
2264
|
-
label:
|
|
2300
|
+
label: Za(e),
|
|
2265
2301
|
submitLabel: "Confirm",
|
|
2266
2302
|
typeName: e.typeName,
|
|
2267
2303
|
route: e.route,
|
|
@@ -2275,13 +2311,13 @@ function Xa(e, t, n, r) {
|
|
|
2275
2311
|
slots: {}
|
|
2276
2312
|
};
|
|
2277
2313
|
}
|
|
2278
|
-
function
|
|
2314
|
+
function to(e) {
|
|
2279
2315
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
2280
2316
|
}
|
|
2281
|
-
function
|
|
2317
|
+
function no(e, t) {
|
|
2282
2318
|
if (!Array.isArray(e) || !Array.isArray(t)) return;
|
|
2283
|
-
let n = new Map(e.filter(
|
|
2284
|
-
for (let e of t.filter(
|
|
2319
|
+
let n = new Map(e.filter(to).map((e) => [JSON.stringify(e.id), e.column]));
|
|
2320
|
+
for (let e of t.filter(to)) {
|
|
2285
2321
|
let t = JSON.stringify(e.id);
|
|
2286
2322
|
if (n.has(t) && n.get(t) !== e.column) return {
|
|
2287
2323
|
item: {
|
|
@@ -2292,9 +2328,9 @@ function Qa(e, t) {
|
|
|
2292
2328
|
};
|
|
2293
2329
|
}
|
|
2294
2330
|
}
|
|
2295
|
-
function
|
|
2331
|
+
function ro(e, t, n, r) {
|
|
2296
2332
|
if (!Array.isArray(e)) return;
|
|
2297
|
-
let i = e.filter(
|
|
2333
|
+
let i = e.filter(to).find((e) => JSON.stringify(e[n]) === JSON.stringify(t.item.id));
|
|
2298
2334
|
if (i !== void 0) return {
|
|
2299
2335
|
item: {
|
|
2300
2336
|
...i,
|
|
@@ -2304,12 +2340,12 @@ function $a(e, t, n, r) {
|
|
|
2304
2340
|
previous: t.previous
|
|
2305
2341
|
};
|
|
2306
2342
|
}
|
|
2307
|
-
function
|
|
2308
|
-
let n =
|
|
2343
|
+
function io(e, t) {
|
|
2344
|
+
let n = re({ dataContext: { item: e.item } });
|
|
2309
2345
|
return (r) => r.path === "value" ? e.value : r.path === "previous" ? e.previous : r.path === "item" || r.path?.startsWith("item.") ? n(r) : t(r);
|
|
2310
2346
|
}
|
|
2311
|
-
function
|
|
2312
|
-
let n =
|
|
2347
|
+
function ao(e, t) {
|
|
2348
|
+
let n = Be(), r = W(), { element: i, rowsProperty: a, idField: o, valueField: c } = e, l = f(() => se(ke(i.id, i.behaviors), C.Change), [i.behaviors, i.id]), u = p(void 0), d = p(!1), [h, g] = m(0), _ = p({
|
|
2313
2349
|
scope: n,
|
|
2314
2350
|
data: r,
|
|
2315
2351
|
element: i,
|
|
@@ -2322,14 +2358,14 @@ function to(e, t) {
|
|
|
2322
2358
|
bindings: l
|
|
2323
2359
|
};
|
|
2324
2360
|
let v = s((e, t) => {
|
|
2325
|
-
let { scope: n, data: r, element: i, bindings: s } = _.current, l =
|
|
2361
|
+
let { scope: n, data: r, element: i, bindings: s } = _.current, l = no(e, t);
|
|
2326
2362
|
if (!n || s.length === 0 || l === void 0) return;
|
|
2327
|
-
let u =
|
|
2363
|
+
let u = ro(i.properties[a], l, o, c);
|
|
2328
2364
|
if (u === void 0) return;
|
|
2329
2365
|
let d = {
|
|
2330
2366
|
...n.context,
|
|
2331
2367
|
subject: () => u.item,
|
|
2332
|
-
resolve:
|
|
2368
|
+
resolve: io(u, n.context.resolve)
|
|
2333
2369
|
}, f = !1, p = !1;
|
|
2334
2370
|
vn(s, {
|
|
2335
2371
|
...n.dispatcher,
|
|
@@ -2361,24 +2397,24 @@ function to(e, t) {
|
|
|
2361
2397
|
revision: h
|
|
2362
2398
|
};
|
|
2363
2399
|
}
|
|
2364
|
-
function
|
|
2365
|
-
let t = e.element, n = typeof t.properties.cardColumn == "string" ? t.properties.cardColumn : "column", r =
|
|
2400
|
+
function oo(e) {
|
|
2401
|
+
let t = e.element, n = typeof t.properties.cardColumn == "string" ? t.properties.cardColumn : "column", r = ao({
|
|
2366
2402
|
element: t,
|
|
2367
2403
|
rowsProperty: "cards",
|
|
2368
2404
|
idField: typeof t.properties.cardId == "string" ? t.properties.cardId : "id",
|
|
2369
2405
|
valueField: n
|
|
2370
|
-
}, e.bindingOutputs), i =
|
|
2371
|
-
return r.declared ? /* @__PURE__ */
|
|
2406
|
+
}, e.bindingOutputs), i = $e;
|
|
2407
|
+
return r.declared ? /* @__PURE__ */ B(i, {
|
|
2372
2408
|
...e,
|
|
2373
2409
|
interactions: {
|
|
2374
2410
|
...e.interactions,
|
|
2375
2411
|
onChange: r.onChange
|
|
2376
2412
|
},
|
|
2377
2413
|
bindingOutputs: r.outputs
|
|
2378
|
-
}, r.revision) : /* @__PURE__ */
|
|
2414
|
+
}, r.revision) : /* @__PURE__ */ B(i, { ...e });
|
|
2379
2415
|
}
|
|
2380
|
-
var
|
|
2381
|
-
function
|
|
2416
|
+
var so = Ae(it, I.KanbanBoard), co = "Stage:commandForm";
|
|
2417
|
+
function lo(e, t, n = {}) {
|
|
2382
2418
|
return {
|
|
2383
2419
|
id: e,
|
|
2384
2420
|
componentName: "",
|
|
@@ -2390,19 +2426,19 @@ function Q(e, t, n = "") {
|
|
|
2390
2426
|
let r = e.properties[t];
|
|
2391
2427
|
return typeof r == "string" ? r : n;
|
|
2392
2428
|
}
|
|
2393
|
-
function
|
|
2429
|
+
function uo(e, t, n) {
|
|
2394
2430
|
let r = typeof e == "number" && Number.isInteger(e) ? n && n.length === t?.length ? t?.[n.indexOf(e)] : t?.[e] : e;
|
|
2395
|
-
return typeof r == "string" && t?.includes(r) ? J(r) :
|
|
2431
|
+
return typeof r == "string" && t?.includes(r) ? J(r) : xa(e) ?? String(e ?? "");
|
|
2396
2432
|
}
|
|
2397
|
-
function
|
|
2433
|
+
function fo(e, t) {
|
|
2398
2434
|
let n = e.properties.queryArguments;
|
|
2399
|
-
if (!
|
|
2435
|
+
if (!vo(n)) return {
|
|
2400
2436
|
values: {},
|
|
2401
2437
|
ready: !0
|
|
2402
2438
|
};
|
|
2403
2439
|
let r = {}, i = !0;
|
|
2404
2440
|
for (let [e, a] of Object.entries(n)) {
|
|
2405
|
-
let n =
|
|
2441
|
+
let n = _o(a) ? t.resolveBinding(a) : a;
|
|
2406
2442
|
r[e] = n, (n == null || n === "") && (i = !1);
|
|
2407
2443
|
}
|
|
2408
2444
|
return {
|
|
@@ -2410,7 +2446,7 @@ function so(e, t) {
|
|
|
2410
2446
|
ready: i
|
|
2411
2447
|
};
|
|
2412
2448
|
}
|
|
2413
|
-
function
|
|
2449
|
+
function po(e, t) {
|
|
2414
2450
|
let n = (e.slots.columns ?? []).map((e) => {
|
|
2415
2451
|
let t = e.properties;
|
|
2416
2452
|
return {
|
|
@@ -2425,12 +2461,12 @@ function co(e, t) {
|
|
|
2425
2461
|
}));
|
|
2426
2462
|
return n.length > 0 ? n : r;
|
|
2427
2463
|
}
|
|
2428
|
-
function
|
|
2464
|
+
function mo(e, t) {
|
|
2429
2465
|
return e[t] ?? e.id ?? e.key;
|
|
2430
2466
|
}
|
|
2431
|
-
function
|
|
2432
|
-
let n = W(), r = Q(e, "query", Q(e, "typeName", e.id)), i = (Q(e, "query") ? n.routes?.queries?.[Q(e, "query")] : void 0) ?? Q(e, "route"), a =
|
|
2433
|
-
let t =
|
|
2467
|
+
function ho({ element: e, slots: t }) {
|
|
2468
|
+
let n = W(), r = Q(e, "query", Q(e, "typeName", e.id)), i = (Q(e, "query") ? n.routes?.queries?.[Q(e, "query")] : void 0) ?? Q(e, "route"), a = Ha(Q(e, "query") || void 0), o = f(() => {
|
|
2469
|
+
let t = fo(e, n);
|
|
2434
2470
|
return {
|
|
2435
2471
|
...t,
|
|
2436
2472
|
values: {
|
|
@@ -2448,10 +2484,10 @@ function uo({ element: e, slots: t }) {
|
|
|
2448
2484
|
route: i || void 0,
|
|
2449
2485
|
arguments: o.values,
|
|
2450
2486
|
ready: o.ready
|
|
2451
|
-
}), p =
|
|
2487
|
+
}), p = po(e, s), m = Q(e, "navigateOnRowClickToScreen"), h = Q(e, "navigateOnRowClickByParameter"), g = Q(e, "dataKey") || h || "id", _ = n.selections[e.id], v = h ? n.parameters[h] : void 0, y = Ea(e), b = (u || d) && s.length === 0 && !c;
|
|
2452
2488
|
l(() => {
|
|
2453
2489
|
if (!_) return;
|
|
2454
|
-
let t =
|
|
2490
|
+
let t = mo(_, g), r = t === void 0 ? void 0 : s.find((e) => mo(e, g) === t);
|
|
2455
2491
|
r && r !== _ ? n.selectRow(e.id, r) : !r && t !== void 0 && !u && n.clearSelection(e.id);
|
|
2456
2492
|
}, [
|
|
2457
2493
|
n,
|
|
@@ -2466,8 +2502,8 @@ function uo({ element: e, slots: t }) {
|
|
|
2466
2502
|
_ && n.clearSelection(e.id);
|
|
2467
2503
|
return;
|
|
2468
2504
|
}
|
|
2469
|
-
if (_ && String(
|
|
2470
|
-
let t = s.find((e) => String(
|
|
2505
|
+
if (_ && String(mo(_, g)) === v) return;
|
|
2506
|
+
let t = s.find((e) => String(mo(e, g)) === v);
|
|
2471
2507
|
t && n.selectRow(e.id, t);
|
|
2472
2508
|
}, [
|
|
2473
2509
|
n,
|
|
@@ -2478,8 +2514,8 @@ function uo({ element: e, slots: t }) {
|
|
|
2478
2514
|
s,
|
|
2479
2515
|
_
|
|
2480
2516
|
]);
|
|
2481
|
-
let
|
|
2482
|
-
let r =
|
|
2517
|
+
let x = (t) => {
|
|
2518
|
+
let r = mo(t, g);
|
|
2483
2519
|
if (h && r != null) {
|
|
2484
2520
|
let i = {
|
|
2485
2521
|
...m && m !== n.screen ? {} : n.parameters,
|
|
@@ -2488,10 +2524,10 @@ function uo({ element: e, slots: t }) {
|
|
|
2488
2524
|
m && m !== n.screen || n.selectRow(e.id, t), pn(m || n.screen, i);
|
|
2489
2525
|
} else n.selectRow(e.id, t);
|
|
2490
2526
|
};
|
|
2491
|
-
return !Q(e, "query") && !i && !Xt(r) ? /* @__PURE__ */
|
|
2527
|
+
return !Q(e, "query") && !i && !Xt(r) ? /* @__PURE__ */ V("section", {
|
|
2492
2528
|
className: "stage-table",
|
|
2493
2529
|
"data-scene-id": e.id,
|
|
2494
|
-
children: [/* @__PURE__ */
|
|
2530
|
+
children: [/* @__PURE__ */ V("p", {
|
|
2495
2531
|
className: "stage-note",
|
|
2496
2532
|
children: [
|
|
2497
2533
|
"No query is exposed for ",
|
|
@@ -2499,19 +2535,19 @@ function uo({ element: e, slots: t }) {
|
|
|
2499
2535
|
" yet."
|
|
2500
2536
|
]
|
|
2501
2537
|
}), t.columns]
|
|
2502
|
-
}) : /* @__PURE__ */
|
|
2538
|
+
}) : /* @__PURE__ */ V("section", {
|
|
2503
2539
|
className: "stage-table",
|
|
2504
2540
|
"data-scene-id": e.id,
|
|
2505
2541
|
children: [
|
|
2506
|
-
|
|
2542
|
+
b && /* @__PURE__ */ B(Ct, {
|
|
2507
2543
|
severity: "info",
|
|
2508
2544
|
text: "Loading…"
|
|
2509
2545
|
}),
|
|
2510
|
-
c && /* @__PURE__ */
|
|
2546
|
+
c && /* @__PURE__ */ B(Ct, {
|
|
2511
2547
|
severity: "error",
|
|
2512
2548
|
text: c
|
|
2513
2549
|
}),
|
|
2514
|
-
_ && /* @__PURE__ */
|
|
2550
|
+
_ && /* @__PURE__ */ B(H, {
|
|
2515
2551
|
type: "button",
|
|
2516
2552
|
size: "small",
|
|
2517
2553
|
onClick: () => {
|
|
@@ -2521,21 +2557,21 @@ function uo({ element: e, slots: t }) {
|
|
|
2521
2557
|
},
|
|
2522
2558
|
children: "Clear selection"
|
|
2523
2559
|
}),
|
|
2524
|
-
/* @__PURE__ */
|
|
2560
|
+
/* @__PURE__ */ V("table", {
|
|
2525
2561
|
"aria-label": Q(e, "label", Q(e, "typeName", "Results")),
|
|
2526
|
-
children: [/* @__PURE__ */
|
|
2562
|
+
children: [/* @__PURE__ */ B("thead", { children: /* @__PURE__ */ B("tr", { children: p.map((e) => /* @__PURE__ */ B("th", {
|
|
2527
2563
|
scope: "col",
|
|
2528
2564
|
children: e.label
|
|
2529
|
-
}, e.property)) }) }), /* @__PURE__ */
|
|
2565
|
+
}, e.property)) }) }), /* @__PURE__ */ V("tbody", { children: [s.map((e, t) => /* @__PURE__ */ B("tr", {
|
|
2530
2566
|
"aria-selected": _ === e,
|
|
2531
2567
|
tabIndex: 0,
|
|
2532
|
-
onClick: () => y.click(e, () =>
|
|
2568
|
+
onClick: () => y.click(e, () => x(e)),
|
|
2533
2569
|
onDoubleClick: y.doubleClick ? () => y.doubleClick?.(e) : void 0,
|
|
2534
2570
|
onKeyDown: (t) => {
|
|
2535
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
2571
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), x(e));
|
|
2536
2572
|
},
|
|
2537
|
-
children: p.map((t) => /* @__PURE__ */
|
|
2538
|
-
}, String(
|
|
2573
|
+
children: p.map((t) => /* @__PURE__ */ B("td", { children: uo(e[t.property], t.options, t.optionValues) }, t.property))
|
|
2574
|
+
}, String(mo(e, g) ?? t))), /* @__PURE__ */ B(go, {
|
|
2539
2575
|
rowCount: s.length,
|
|
2540
2576
|
columnCount: p.length,
|
|
2541
2577
|
loading: u,
|
|
@@ -2545,72 +2581,72 @@ function uo({ element: e, slots: t }) {
|
|
|
2545
2581
|
]
|
|
2546
2582
|
});
|
|
2547
2583
|
}
|
|
2548
|
-
function
|
|
2549
|
-
return e !== 0 || n || r ? null : /* @__PURE__ */
|
|
2584
|
+
function go({ rowCount: e, columnCount: t, loading: n, awaitingCommand: r }) {
|
|
2585
|
+
return e !== 0 || n || r ? null : /* @__PURE__ */ B("tr", { children: /* @__PURE__ */ B("td", {
|
|
2550
2586
|
colSpan: Math.max(t, 1),
|
|
2551
2587
|
children: "No records found"
|
|
2552
2588
|
}) });
|
|
2553
2589
|
}
|
|
2554
|
-
function
|
|
2555
|
-
return
|
|
2590
|
+
function _o(e) {
|
|
2591
|
+
return vo(e) && (typeof e.path == "string" || typeof e.kind == "string");
|
|
2556
2592
|
}
|
|
2557
|
-
function
|
|
2593
|
+
function vo(e) {
|
|
2558
2594
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
2559
2595
|
}
|
|
2560
|
-
function
|
|
2561
|
-
return Dn(e) ? /* @__PURE__ */
|
|
2596
|
+
function yo({ element: e, interactions: t, slots: n }) {
|
|
2597
|
+
return Dn(e) ? /* @__PURE__ */ B(On, {
|
|
2562
2598
|
element: e,
|
|
2563
2599
|
interactions: t
|
|
2564
|
-
}) : /* @__PURE__ */
|
|
2600
|
+
}) : /* @__PURE__ */ B(Co, {
|
|
2565
2601
|
element: e,
|
|
2566
2602
|
interactions: t,
|
|
2567
2603
|
slots: n
|
|
2568
2604
|
});
|
|
2569
2605
|
}
|
|
2570
|
-
function
|
|
2571
|
-
let { routes: t, parameters: n } = W(), r = Q(e, "schema") || t?.commandSchemas?.[Q(e, "command")], i = f(() => Y(r ?? ""), [r]),
|
|
2606
|
+
function bo(e) {
|
|
2607
|
+
let { routes: t, parameters: n } = W(), r = Q(e, "schema") || t?.commandSchemas?.[Q(e, "command")], i = t?.commandSchemas?.[Q(e, "command")], a = f(() => Y(r ?? "", i), [r, i]), o = Hr(e), s = Ur(e, r), { selectableRows: c, selectedRows: l } = hi(), u = Q(e, "generationMode").toLowerCase() !== "manual", d = xo(e, o, s, u), p = u ? So(e, r, a, n, o, s ? [] : c) : {};
|
|
2572
2608
|
return {
|
|
2573
2609
|
element: {
|
|
2574
2610
|
...e,
|
|
2575
2611
|
properties: {
|
|
2576
2612
|
...e.properties,
|
|
2577
|
-
...
|
|
2613
|
+
...p,
|
|
2578
2614
|
...r ? { schema: r } : {},
|
|
2579
|
-
createsEntity:
|
|
2580
|
-
rowAction:
|
|
2615
|
+
createsEntity: s,
|
|
2616
|
+
rowAction: d
|
|
2581
2617
|
}
|
|
2582
2618
|
},
|
|
2583
|
-
subject:
|
|
2584
|
-
properties:
|
|
2585
|
-
selectedRows:
|
|
2619
|
+
subject: o,
|
|
2620
|
+
properties: a,
|
|
2621
|
+
selectedRows: l
|
|
2586
2622
|
};
|
|
2587
2623
|
}
|
|
2588
|
-
function
|
|
2624
|
+
function xo(e, t, n, r) {
|
|
2589
2625
|
return n || t !== void 0 ? !1 : r || e.properties.rowAction === !0;
|
|
2590
2626
|
}
|
|
2591
|
-
function
|
|
2627
|
+
function So(e, t, n, r, i, a) {
|
|
2592
2628
|
let o = e.properties.fields;
|
|
2593
|
-
if (!Array.isArray(o) || o.length === 0) return
|
|
2629
|
+
if (!Array.isArray(o) || o.length === 0) return Bo(t, n, r, i, a);
|
|
2594
2630
|
if (a.length === 0 || i === "screen" || i === void 0 && e.properties.rowAction !== !0 && n.filter((e) => e.identifier).length > 1) return {};
|
|
2595
|
-
let s = new Set(n.filter((e) =>
|
|
2631
|
+
let s = new Set(n.filter((e) => Ro(e, i, a)).map((e) => e.name));
|
|
2596
2632
|
return {
|
|
2597
|
-
fields: o.filter((e) => !s.has(
|
|
2633
|
+
fields: o.filter((e) => !s.has(Eo(e))),
|
|
2598
2634
|
generationMode: "manual"
|
|
2599
2635
|
};
|
|
2600
2636
|
}
|
|
2601
|
-
function
|
|
2602
|
-
let { element: n, subject: r, properties: i, selectedRows: a } =
|
|
2603
|
-
return s ? c.length > 0 || Gr(r, l) ? /* @__PURE__ */
|
|
2637
|
+
function Co({ element: e, interactions: t }) {
|
|
2638
|
+
let { element: n, subject: r, properties: i, selectedRows: a } = bo(e), o = Q(n, "label") || J(Q(n, "command")), s = on(Q(n, "command"), Q(n, "typeName"), Q(n, "route")), c = wo(n, r), l = Wr(r, a);
|
|
2639
|
+
return s ? c.length > 0 || Gr(r, l) ? /* @__PURE__ */ B(H, {
|
|
2604
2640
|
type: "button",
|
|
2605
2641
|
"data-scene-id": n.id,
|
|
2606
2642
|
disabled: !0,
|
|
2607
2643
|
title: "Select a row first",
|
|
2608
2644
|
...t,
|
|
2609
2645
|
children: o
|
|
2610
|
-
}) : /* @__PURE__ */
|
|
2646
|
+
}) : /* @__PURE__ */ B(Oo, {
|
|
2611
2647
|
element: l ? Yr(n, i, l) : n,
|
|
2612
2648
|
label: o
|
|
2613
|
-
}) : /* @__PURE__ */
|
|
2649
|
+
}) : /* @__PURE__ */ B(H, {
|
|
2614
2650
|
type: "button",
|
|
2615
2651
|
"data-scene-id": n.id,
|
|
2616
2652
|
disabled: !0,
|
|
@@ -2619,42 +2655,42 @@ function yo({ element: e, interactions: t }) {
|
|
|
2619
2655
|
children: o
|
|
2620
2656
|
});
|
|
2621
2657
|
}
|
|
2622
|
-
function
|
|
2623
|
-
let { parameters: n } = W(),
|
|
2624
|
-
return !
|
|
2658
|
+
function wo(e, t) {
|
|
2659
|
+
let { parameters: n, routes: r } = W(), i = Q(e, "schema"), a = e.properties.fields, o = r?.commandSchemas?.[Q(e, "command")], s = f(() => Y(i, o), [i, o]), { selectableRows: c, selectedRows: l } = hi(), u = Array.isArray(a) ? a : [], d = To(e, u) ? new Set(u.map(Eo).filter((e) => e !== "")) : void 0;
|
|
2660
|
+
return !d || t !== void 0 || Ur(e, i) ? [] : $i(s.filter((e) => !d.has(e.name)), n, l, c);
|
|
2625
2661
|
}
|
|
2626
|
-
function
|
|
2662
|
+
function To(e, t) {
|
|
2627
2663
|
return t.length > 0 || e.properties.rowAction === !0 || Q(e, "generationMode").toLowerCase() === "manual";
|
|
2628
2664
|
}
|
|
2629
|
-
function
|
|
2630
|
-
return
|
|
2665
|
+
function Eo(e) {
|
|
2666
|
+
return vo(e) ? typeof e.sourceProperty == "string" && e.sourceProperty !== "" ? e.sourceProperty : typeof e.name == "string" ? e.name : "" : "";
|
|
2631
2667
|
}
|
|
2632
|
-
function
|
|
2668
|
+
function Do(e) {
|
|
2633
2669
|
let t = (e?.parentElement?.classList.contains("stage-toolbar-action") ? e.parentElement : e)?.previousElementSibling;
|
|
2634
2670
|
return t?.classList.contains("stage-action") === !0 || t?.classList.contains("stage-toolbar-action") === !0;
|
|
2635
2671
|
}
|
|
2636
|
-
function
|
|
2672
|
+
function Oo({ element: e, label: t }) {
|
|
2637
2673
|
let [n, r] = m(0), [i, a] = m(!1), [o, c] = m(!1), l = p(null);
|
|
2638
|
-
d(() => c(
|
|
2674
|
+
d(() => c(Do(l.current)));
|
|
2639
2675
|
let u = s(() => {
|
|
2640
2676
|
a(!1), r((e) => e + 1);
|
|
2641
|
-
}, []), f = /* @__PURE__ */
|
|
2677
|
+
}, []), f = /* @__PURE__ */ B(wi.Provider, {
|
|
2642
2678
|
value: u,
|
|
2643
|
-
children: /* @__PURE__ */
|
|
2679
|
+
children: /* @__PURE__ */ B(Oi, {
|
|
2644
2680
|
element: e,
|
|
2645
2681
|
cancellable: !0
|
|
2646
2682
|
}, n)
|
|
2647
2683
|
});
|
|
2648
|
-
return /* @__PURE__ */
|
|
2684
|
+
return /* @__PURE__ */ V("div", {
|
|
2649
2685
|
className: "stage-action",
|
|
2650
2686
|
"data-scene-id": e.id,
|
|
2651
2687
|
ref: l,
|
|
2652
|
-
children: [/* @__PURE__ */
|
|
2688
|
+
children: [/* @__PURE__ */ B(H, {
|
|
2653
2689
|
type: "button",
|
|
2654
2690
|
variant: Dr(Q(e, "emphasis"), o),
|
|
2655
2691
|
onClick: () => a(!0),
|
|
2656
2692
|
children: t
|
|
2657
|
-
}), /* @__PURE__ */
|
|
2693
|
+
}), /* @__PURE__ */ B(St, {
|
|
2658
2694
|
title: t,
|
|
2659
2695
|
visible: i,
|
|
2660
2696
|
onClose: () => a(!1),
|
|
@@ -2665,20 +2701,20 @@ function wo({ element: e, label: t }) {
|
|
|
2665
2701
|
})]
|
|
2666
2702
|
});
|
|
2667
2703
|
}
|
|
2668
|
-
function
|
|
2669
|
-
let t = e.element ??
|
|
2670
|
-
return /* @__PURE__ */
|
|
2704
|
+
function ko(e) {
|
|
2705
|
+
let t = e.element ?? lo("slice-dialog", {}), n = Ve(), r = ze(n?.currentDialogParameters);
|
|
2706
|
+
return /* @__PURE__ */ B(Sr, {
|
|
2671
2707
|
slice: Q(t, "slice") || r?.slice || Q(t, "command") || r?.command,
|
|
2672
|
-
children: /* @__PURE__ */
|
|
2708
|
+
children: /* @__PURE__ */ B(Ao, { ...e })
|
|
2673
2709
|
});
|
|
2674
2710
|
}
|
|
2675
|
-
function
|
|
2676
|
-
let t = e.element ??
|
|
2677
|
-
if (!l || !(u.some((e) => e.options || e.members || e.item) || u.some(v))) return e.element ? /* @__PURE__ */
|
|
2711
|
+
function Ao(e) {
|
|
2712
|
+
let t = e.element ?? lo("slice-dialog", {}), n = Ve(), { routes: r, parameters: i } = W(), a = ze(n?.currentDialogParameters), o = Q(t, "command") || a?.command || Q(t, "slice") || "", c = Q(t, "title") || a?.title || J(o), l = r?.commandSchemas?.[o], u = f(() => Y(l ?? ""), [l]), { selectableRows: d, selectedRows: p } = hi(), h = s(() => n?.closeDialog(), [n]), [g, _] = m(null), v = (e) => e.identifier && e.required && Ji(e, d) && qi(e, p) !== void 0;
|
|
2713
|
+
if (!l || !(u.some((e) => e.options || e.members || e.item) || u.some(v))) return e.element ? /* @__PURE__ */ B(_e, {
|
|
2678
2714
|
element: e.element,
|
|
2679
2715
|
slots: e.slots ?? {}
|
|
2680
|
-
}) : /* @__PURE__ */
|
|
2681
|
-
let y = u.filter((e) => !
|
|
2716
|
+
}) : /* @__PURE__ */ B(De, {});
|
|
2717
|
+
let y = u.filter((e) => !Gi(e, i) && !v(e)), b = lo(`slice-dialog-${o}`, {
|
|
2682
2718
|
command: o,
|
|
2683
2719
|
label: c,
|
|
2684
2720
|
schema: l,
|
|
@@ -2688,29 +2724,29 @@ function Eo(e) {
|
|
|
2688
2724
|
})),
|
|
2689
2725
|
generationMode: "manual"
|
|
2690
2726
|
});
|
|
2691
|
-
return /* @__PURE__ */
|
|
2727
|
+
return /* @__PURE__ */ V("section", {
|
|
2692
2728
|
className: "scene-slice-dialog",
|
|
2693
2729
|
"data-scene-slice-dialog": Q(t, "slice") || a?.slice,
|
|
2694
2730
|
"data-scene-command": o,
|
|
2695
2731
|
children: [
|
|
2696
|
-
/* @__PURE__ */
|
|
2732
|
+
/* @__PURE__ */ B("header", {
|
|
2697
2733
|
className: "scene-slice-dialog-header",
|
|
2698
|
-
children: /* @__PURE__ */
|
|
2734
|
+
children: /* @__PURE__ */ B("h2", {
|
|
2699
2735
|
className: "scene-slice-dialog-title",
|
|
2700
2736
|
children: c
|
|
2701
2737
|
})
|
|
2702
2738
|
}),
|
|
2703
|
-
/* @__PURE__ */
|
|
2739
|
+
/* @__PURE__ */ B(wi.Provider, {
|
|
2704
2740
|
value: h,
|
|
2705
|
-
children: /* @__PURE__ */
|
|
2741
|
+
children: /* @__PURE__ */ B(Ti.Provider, {
|
|
2706
2742
|
value: g,
|
|
2707
|
-
children: /* @__PURE__ */
|
|
2743
|
+
children: /* @__PURE__ */ B(Oi, { element: b })
|
|
2708
2744
|
})
|
|
2709
2745
|
}),
|
|
2710
|
-
/* @__PURE__ */
|
|
2746
|
+
/* @__PURE__ */ B("footer", {
|
|
2711
2747
|
ref: _,
|
|
2712
2748
|
className: "scene-slice-dialog-footer",
|
|
2713
|
-
children: /* @__PURE__ */
|
|
2749
|
+
children: /* @__PURE__ */ B("button", {
|
|
2714
2750
|
type: "button",
|
|
2715
2751
|
className: "scene-slice-dialog-cancel",
|
|
2716
2752
|
onClick: h,
|
|
@@ -2720,38 +2756,38 @@ function Eo(e) {
|
|
|
2720
2756
|
]
|
|
2721
2757
|
});
|
|
2722
2758
|
}
|
|
2723
|
-
var
|
|
2724
|
-
function
|
|
2759
|
+
var jo = "core:toolbarItem";
|
|
2760
|
+
function Mo({ element: e }) {
|
|
2725
2761
|
let t = {
|
|
2726
2762
|
kind: "button",
|
|
2727
2763
|
id: Q(e, "name", e.id),
|
|
2728
2764
|
title: Q(e, "label", Q(e, "name", e.id)),
|
|
2729
2765
|
...Q(e, "slice") ? { slice: Q(e, "slice") } : {},
|
|
2730
2766
|
...Q(e, "icon") ? { icon: Q(e, "icon") } : {}
|
|
2731
|
-
}, n =
|
|
2767
|
+
}, n = Ie(e.id, {
|
|
2732
2768
|
name: e.id,
|
|
2733
2769
|
kind: D.Actions,
|
|
2734
2770
|
items: [t]
|
|
2735
2771
|
}, void 0);
|
|
2736
|
-
return n ? /* @__PURE__ */
|
|
2772
|
+
return n ? /* @__PURE__ */ B(be, {
|
|
2737
2773
|
outlet: n,
|
|
2738
2774
|
elementId: e.id
|
|
2739
2775
|
}) : null;
|
|
2740
2776
|
}
|
|
2741
|
-
function
|
|
2742
|
-
let { element: t } = e, n =
|
|
2777
|
+
function No(e) {
|
|
2778
|
+
let { element: t } = e, n = We(), r = f(() => Ie(t.id, t.properties, n), [
|
|
2743
2779
|
n,
|
|
2744
2780
|
t.id,
|
|
2745
2781
|
t.properties
|
|
2746
2782
|
]);
|
|
2747
|
-
return !r || r.kind !== D.Actions || !r.items.some((e) =>
|
|
2783
|
+
return !r || r.kind !== D.Actions || !r.items.some((e) => Fo(t.id, e.item)) ? /* @__PURE__ */ B(ge, { ...e }) : /* @__PURE__ */ B("div", {
|
|
2748
2784
|
className: "stage-toolbar",
|
|
2749
2785
|
role: "toolbar",
|
|
2750
2786
|
"aria-label": r.name,
|
|
2751
2787
|
"data-scene-id": t.id,
|
|
2752
2788
|
"data-scene-outlet": r.name,
|
|
2753
|
-
children:
|
|
2754
|
-
let i = (e) => /* @__PURE__ */
|
|
2789
|
+
children: Po(r.items, (e) => Fo(t.id, e.item)).map((n) => {
|
|
2790
|
+
let i = (e) => /* @__PURE__ */ B(be, {
|
|
2755
2791
|
outlet: {
|
|
2756
2792
|
...r,
|
|
2757
2793
|
name: "",
|
|
@@ -2760,7 +2796,7 @@ function ko(e) {
|
|
|
2760
2796
|
item: t.properties.item,
|
|
2761
2797
|
elementId: `${t.id}.${e[0].item.id}`
|
|
2762
2798
|
}, e[0].item.id);
|
|
2763
|
-
return n.stage ? /* @__PURE__ */
|
|
2799
|
+
return n.stage ? /* @__PURE__ */ B(Io, {
|
|
2764
2800
|
element: n.stage,
|
|
2765
2801
|
slots: {},
|
|
2766
2802
|
interactions: e.interactions,
|
|
@@ -2769,7 +2805,7 @@ function ko(e) {
|
|
|
2769
2805
|
})
|
|
2770
2806
|
});
|
|
2771
2807
|
}
|
|
2772
|
-
function
|
|
2808
|
+
function Po(e, t) {
|
|
2773
2809
|
let n = [];
|
|
2774
2810
|
for (let r of e) {
|
|
2775
2811
|
let e = t(r), i = n.at(-1);
|
|
@@ -2780,12 +2816,12 @@ function Ao(e, t) {
|
|
|
2780
2816
|
}
|
|
2781
2817
|
return n;
|
|
2782
2818
|
}
|
|
2783
|
-
function
|
|
2819
|
+
function Fo(e, t) {
|
|
2784
2820
|
if (t.kind !== "button") return;
|
|
2785
2821
|
let n = t;
|
|
2786
2822
|
if (!(n.navigateTo || n.builtIn !== void 0 || !n.slice && !n.command) && n.opens !== T.None && n.opens !== T.Drawer && n.opens !== T.Slot) return {
|
|
2787
2823
|
id: `${e}.${n.id}`,
|
|
2788
|
-
componentName:
|
|
2824
|
+
componentName: jo,
|
|
2789
2825
|
properties: {
|
|
2790
2826
|
name: n.id,
|
|
2791
2827
|
kind: "Action",
|
|
@@ -2803,18 +2839,18 @@ function jo(e, t) {
|
|
|
2803
2839
|
slots: {}
|
|
2804
2840
|
};
|
|
2805
2841
|
}
|
|
2806
|
-
function
|
|
2842
|
+
function Io(e) {
|
|
2807
2843
|
let { element: t } = e;
|
|
2808
|
-
return Q(t, "slice") === "" ? /* @__PURE__ */
|
|
2844
|
+
return Q(t, "slice") === "" ? /* @__PURE__ */ B(zo, { ...e }) : /* @__PURE__ */ B(Lo, { ...e });
|
|
2809
2845
|
}
|
|
2810
|
-
function
|
|
2846
|
+
function Lo(e) {
|
|
2811
2847
|
let { element: t } = e, { routes: n, parameters: r } = W(), i = Q(t, "slice"), a = Q(t, "command") || i.split(".").at(-1) || "", o = n?.commandSchemas?.[a], s = f(() => Y(o ?? ""), [o]), { selectableRows: c, selectedRows: l } = hi();
|
|
2812
|
-
if ((kr(o ?? "") ? [] :
|
|
2848
|
+
if ((kr(o ?? "") ? [] : $i(s, r, l, c)).length === 0) return /* @__PURE__ */ B(z, { children: e.fallback ?? /* @__PURE__ */ B(Mo, { element: t }) });
|
|
2813
2849
|
let u = Q(t, "label", Q(t, "name", t.id));
|
|
2814
|
-
return /* @__PURE__ */
|
|
2850
|
+
return /* @__PURE__ */ B("span", {
|
|
2815
2851
|
className: "stage-toolbar-action",
|
|
2816
2852
|
"data-scene-toolbar-item": Q(t, "name", t.id),
|
|
2817
|
-
children: /* @__PURE__ */
|
|
2853
|
+
children: /* @__PURE__ */ B(H, {
|
|
2818
2854
|
type: "button",
|
|
2819
2855
|
"data-scene-id": t.id,
|
|
2820
2856
|
disabled: !0,
|
|
@@ -2824,11 +2860,11 @@ function No(e) {
|
|
|
2824
2860
|
})
|
|
2825
2861
|
});
|
|
2826
2862
|
}
|
|
2827
|
-
function
|
|
2828
|
-
return t !== "screen" && !!e.identifier && e.required &&
|
|
2863
|
+
function Ro(e, t, n) {
|
|
2864
|
+
return t !== "screen" && !!e.identifier && e.required && Ji(e, n);
|
|
2829
2865
|
}
|
|
2830
|
-
function
|
|
2831
|
-
let { element: t } = e, { routes: n, parameters: r } = W(), i = Q(t, "name", t.id), a = Q(t, "target"), o = Q(t, "label", i), s = n?.commandSchemas?.[a], c = f(() => Y(s ?? ""), [s]), l = Hr(t), u = f(() => l === void 0 && kr(s ?? ""), [s, l]), { selectableRows: d, selectedRows: p } = hi(), m = u ? [] : d, h = l === void 0 && !u ?
|
|
2866
|
+
function zo(e) {
|
|
2867
|
+
let { element: t } = e, { routes: n, parameters: r } = W(), i = Q(t, "name", t.id), a = Q(t, "target"), o = Q(t, "label", i), s = n?.commandSchemas?.[a], c = f(() => Y(s ?? ""), [s]), l = Hr(t), u = f(() => l === void 0 && kr(s ?? ""), [s, l]), { selectableRows: d, selectedRows: p } = hi(), m = u ? [] : d, h = l === void 0 && !u ? $i(c, r, p, m) : [], g = Bo(s, c, r, l, m), _ = u ? { createsEntity: !0 } : qr(t, l), v = {
|
|
2832
2868
|
...t,
|
|
2833
2869
|
componentName: "core:action",
|
|
2834
2870
|
properties: {
|
|
@@ -2839,48 +2875,48 @@ function Fo(e) {
|
|
|
2839
2875
|
..._
|
|
2840
2876
|
}
|
|
2841
2877
|
};
|
|
2842
|
-
return /* @__PURE__ */
|
|
2878
|
+
return /* @__PURE__ */ B("span", {
|
|
2843
2879
|
className: "stage-toolbar-action",
|
|
2844
2880
|
"data-scene-toolbar-item": i,
|
|
2845
|
-
children: h.length > 0 ? /* @__PURE__ */
|
|
2881
|
+
children: h.length > 0 ? /* @__PURE__ */ B(H, {
|
|
2846
2882
|
type: "button",
|
|
2847
2883
|
"data-scene-id": t.id,
|
|
2848
2884
|
disabled: !0,
|
|
2849
2885
|
title: "Select a row first",
|
|
2850
2886
|
...e.interactions,
|
|
2851
2887
|
children: o
|
|
2852
|
-
}) : /* @__PURE__ */
|
|
2888
|
+
}) : /* @__PURE__ */ B(yo, {
|
|
2853
2889
|
element: v,
|
|
2854
2890
|
interactions: e.interactions,
|
|
2855
2891
|
slots: e.slots
|
|
2856
2892
|
})
|
|
2857
2893
|
});
|
|
2858
2894
|
}
|
|
2859
|
-
function
|
|
2895
|
+
function Bo(e, t, n, r, i) {
|
|
2860
2896
|
return e ? {
|
|
2861
2897
|
schema: e,
|
|
2862
|
-
fields: t.filter((e) => !
|
|
2898
|
+
fields: t.filter((e) => !Gi(e, n) && !Ro(e, r, i)).map((e) => ({
|
|
2863
2899
|
name: e.name,
|
|
2864
2900
|
label: J(e.name)
|
|
2865
2901
|
})),
|
|
2866
2902
|
generationMode: "manual"
|
|
2867
2903
|
} : {};
|
|
2868
2904
|
}
|
|
2869
|
-
var
|
|
2870
|
-
...
|
|
2871
|
-
"core:table":
|
|
2872
|
-
"core:action":
|
|
2905
|
+
var Vo = {
|
|
2906
|
+
...je,
|
|
2907
|
+
"core:table": ho,
|
|
2908
|
+
"core:action": yo,
|
|
2873
2909
|
"core:guarded-action": On,
|
|
2874
|
-
"core:outletItems":
|
|
2875
|
-
[
|
|
2876
|
-
"core:sliceDialog":
|
|
2877
|
-
[
|
|
2878
|
-
[
|
|
2879
|
-
[
|
|
2910
|
+
"core:outletItems": No,
|
|
2911
|
+
[jo]: Io,
|
|
2912
|
+
"core:sliceDialog": ko,
|
|
2913
|
+
[co]: Oi,
|
|
2914
|
+
[Ua]: Ya,
|
|
2915
|
+
[so]: oo
|
|
2880
2916
|
};
|
|
2881
2917
|
// src/useStrings.ts
|
|
2882
|
-
function
|
|
2883
|
-
let e =
|
|
2918
|
+
function Ho() {
|
|
2919
|
+
let e = U(), [t, n] = m([]), [r, i] = m(""), [a, o] = m({});
|
|
2884
2920
|
return l(() => {
|
|
2885
2921
|
let t = new AbortController();
|
|
2886
2922
|
return e.locales(t.signal).then((e) => {
|
|
@@ -2901,11 +2937,11 @@ function Ro() {
|
|
|
2901
2937
|
dictionary: a
|
|
2902
2938
|
};
|
|
2903
2939
|
}
|
|
2904
|
-
var
|
|
2905
|
-
function
|
|
2906
|
-
return
|
|
2940
|
+
var Uo = /* @__PURE__ */ new Set(["core:table"]);
|
|
2941
|
+
function Wo(e) {
|
|
2942
|
+
return Go(e, /* @__PURE__ */ new Map(), void 0);
|
|
2907
2943
|
}
|
|
2908
|
-
function
|
|
2944
|
+
function Go(e, t, n) {
|
|
2909
2945
|
let r = e;
|
|
2910
2946
|
if (!r.slots) return e;
|
|
2911
2947
|
let i = !1, a = {};
|
|
@@ -2914,7 +2950,7 @@ function Vo(e, t, n) {
|
|
|
2914
2950
|
a[e] = o.map((e) => {
|
|
2915
2951
|
let t = e, n = $(t, "typeName");
|
|
2916
2952
|
t.componentName === "core:data" && n && (r.set(n, t), s = t);
|
|
2917
|
-
let a =
|
|
2953
|
+
let a = Go(qo(Ko(t, r), s), r, s);
|
|
2918
2954
|
return a !== e && (i = !0), a;
|
|
2919
2955
|
});
|
|
2920
2956
|
}
|
|
@@ -2923,8 +2959,8 @@ function Vo(e, t, n) {
|
|
|
2923
2959
|
slots: a
|
|
2924
2960
|
} : e;
|
|
2925
2961
|
}
|
|
2926
|
-
function
|
|
2927
|
-
if (!
|
|
2962
|
+
function Ko(e, t) {
|
|
2963
|
+
if (!Uo.has(e.componentName)) return e;
|
|
2928
2964
|
let n = $(e, "typeName"), r = n ? t.get(n) : void 0;
|
|
2929
2965
|
if (!r || e.properties.queryArguments !== void 0) return e;
|
|
2930
2966
|
let i = $(r, "by"), a = { ...e.properties }, o = $(r, "query");
|
|
@@ -2933,7 +2969,7 @@ function Ho(e, t) {
|
|
|
2933
2969
|
properties: a
|
|
2934
2970
|
};
|
|
2935
2971
|
}
|
|
2936
|
-
function
|
|
2972
|
+
function qo(e, t) {
|
|
2937
2973
|
if (!["core:guarded-action", "core:action"].includes(e.componentName) || !Array.isArray(e.properties?.alternatives) || !t || e.properties.itemQuery !== void 0) return e;
|
|
2938
2974
|
let n = { ...e.properties };
|
|
2939
2975
|
if (t.properties?.isCollection === !0) return n.itemSelection = !0, {
|
|
@@ -2951,7 +2987,7 @@ function $(e, t) {
|
|
|
2951
2987
|
return typeof n == "string" && n.length > 0 ? n : void 0;
|
|
2952
2988
|
}
|
|
2953
2989
|
// src/stageQueryBindings.tsx
|
|
2954
|
-
function
|
|
2990
|
+
function Jo(e) {
|
|
2955
2991
|
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
2956
2992
|
if (Array.isArray(e)) {
|
|
2957
2993
|
e.forEach(n);
|
|
@@ -2967,7 +3003,7 @@ function Wo(e) {
|
|
|
2967
3003
|
};
|
|
2968
3004
|
return r(e), [...t];
|
|
2969
3005
|
}
|
|
2970
|
-
function
|
|
3006
|
+
function Yo(e) {
|
|
2971
3007
|
let t = /* @__PURE__ */ new Map(), n = (e, t) => {
|
|
2972
3008
|
let n = e.properties?.[t];
|
|
2973
3009
|
return typeof n == "string" && n.length > 0 ? n : void 0;
|
|
@@ -2986,8 +3022,8 @@ function Go(e) {
|
|
|
2986
3022
|
};
|
|
2987
3023
|
return r(e), [...t.values()];
|
|
2988
3024
|
}
|
|
2989
|
-
function
|
|
2990
|
-
let { routes: t, routesReady: n, parameters: r, session: i } = W(), a = e.by ? r[e.by] || i[e.by] : void 0, o =
|
|
3025
|
+
function Xo({ source: e }) {
|
|
3026
|
+
let { routes: t, routesReady: n, parameters: r, session: i } = W(), a = e.by ? r[e.by] || i[e.by] : void 0, o = Ha(e.query), s = f(() => ({
|
|
2991
3027
|
...o,
|
|
2992
3028
|
...e.by ? a ? { [e.by]: a } : {} : {
|
|
2993
3029
|
...i,
|
|
@@ -3010,8 +3046,8 @@ function Ko({ source: e }) {
|
|
|
3010
3046
|
list: !0
|
|
3011
3047
|
}), null;
|
|
3012
3048
|
}
|
|
3013
|
-
function
|
|
3014
|
-
let { routes: t, routesReady: n, parameters: r, session: i } = W(), a =
|
|
3049
|
+
function Zo({ name: e }) {
|
|
3050
|
+
let { routes: t, routesReady: n, parameters: r, session: i } = W(), a = Ha(e), o = f(() => ({
|
|
3015
3051
|
...a,
|
|
3016
3052
|
...i,
|
|
3017
3053
|
...r
|
|
@@ -3029,59 +3065,59 @@ function qo({ name: e }) {
|
|
|
3029
3065
|
list: !0
|
|
3030
3066
|
}), null;
|
|
3031
3067
|
}
|
|
3032
|
-
function
|
|
3033
|
-
let t = f(() =>
|
|
3034
|
-
return /* @__PURE__ */
|
|
3068
|
+
function Qo({ element: e }) {
|
|
3069
|
+
let t = f(() => Jo(e), [e]), n = f(() => Yo(e), [e]);
|
|
3070
|
+
return /* @__PURE__ */ V(z, { children: [t.map((e) => /* @__PURE__ */ B(Zo, { name: e }, e)), n.map((e) => /* @__PURE__ */ B(Xo, { source: e }, e.typeName))] });
|
|
3035
3071
|
}
|
|
3036
3072
|
// src/stageThemeChoice.ts
|
|
3037
|
-
var
|
|
3038
|
-
function
|
|
3073
|
+
var $o = "cratis.stage.theme";
|
|
3074
|
+
function es() {
|
|
3039
3075
|
try {
|
|
3040
3076
|
return globalThis.localStorage ?? null;
|
|
3041
3077
|
} catch {
|
|
3042
3078
|
return null;
|
|
3043
3079
|
}
|
|
3044
3080
|
}
|
|
3045
|
-
function
|
|
3081
|
+
function ts() {
|
|
3046
3082
|
try {
|
|
3047
|
-
return
|
|
3083
|
+
return es()?.getItem("cratis.stage.theme") || void 0;
|
|
3048
3084
|
} catch {
|
|
3049
3085
|
return;
|
|
3050
3086
|
}
|
|
3051
3087
|
}
|
|
3052
|
-
function
|
|
3088
|
+
function ns(e) {
|
|
3053
3089
|
try {
|
|
3054
|
-
|
|
3090
|
+
es()?.setItem($o, e);
|
|
3055
3091
|
} catch {}
|
|
3056
3092
|
}
|
|
3057
3093
|
// src/screenTitle.ts
|
|
3058
|
-
var
|
|
3059
|
-
function
|
|
3094
|
+
var rs = "core:title", is = ["content", "main"];
|
|
3095
|
+
function as(e) {
|
|
3060
3096
|
let t = e;
|
|
3061
|
-
if (t.componentName !==
|
|
3097
|
+
if (t.componentName !== rs) return;
|
|
3062
3098
|
let n = t.properties?.text;
|
|
3063
3099
|
return typeof n == "string" && n.trim().length > 0 ? n : void 0;
|
|
3064
3100
|
}
|
|
3065
|
-
function
|
|
3101
|
+
function os(e) {
|
|
3066
3102
|
for (let t of e ?? []) {
|
|
3067
|
-
let e =
|
|
3103
|
+
let e = as(t);
|
|
3068
3104
|
if (e !== void 0) return e;
|
|
3069
3105
|
}
|
|
3070
3106
|
}
|
|
3071
|
-
function
|
|
3072
|
-
let t = e.slotContent ?? {}, n = [...
|
|
3107
|
+
function ss(e) {
|
|
3108
|
+
let t = e.slotContent ?? {}, n = [...is, ...Object.keys(t).filter((e) => !is.includes(e))];
|
|
3073
3109
|
for (let e of n) {
|
|
3074
|
-
let n =
|
|
3110
|
+
let n = os(t[e]);
|
|
3075
3111
|
if (n !== void 0) return n;
|
|
3076
3112
|
}
|
|
3077
3113
|
return Er(e.name);
|
|
3078
3114
|
}
|
|
3079
|
-
function
|
|
3115
|
+
function cs(e) {
|
|
3080
3116
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
3081
3117
|
for (let r of e.flatMap((e) => e.contributions ?? [])) {
|
|
3082
|
-
let e =
|
|
3118
|
+
let e = us(r);
|
|
3083
3119
|
if (!e) continue;
|
|
3084
|
-
let i =
|
|
3120
|
+
let i = fs(e);
|
|
3085
3121
|
t.has(i) || (t.add(i), n.push(e));
|
|
3086
3122
|
}
|
|
3087
3123
|
return n.map((e, t) => ({
|
|
@@ -3089,47 +3125,47 @@ function is(e) {
|
|
|
3089
3125
|
index: t
|
|
3090
3126
|
})).sort((e, t) => (e.entry.order ?? 2 ** 53 - 1) - (t.entry.order ?? 2 ** 53 - 1) || e.index - t.index).map(({ entry: e }) => e);
|
|
3091
3127
|
}
|
|
3092
|
-
function
|
|
3128
|
+
function ls(e) {
|
|
3093
3129
|
let t = {
|
|
3094
3130
|
label: "",
|
|
3095
3131
|
children: []
|
|
3096
3132
|
};
|
|
3097
3133
|
for (let n of e) {
|
|
3098
|
-
let e = n.hierarchy.reduce((e, t) =>
|
|
3099
|
-
(n.group ?
|
|
3134
|
+
let e = n.hierarchy.reduce((e, t) => ps(e, t, !1), t);
|
|
3135
|
+
(n.group ? ps(e, n.group, !0) : e).children.push(ms(n));
|
|
3100
3136
|
}
|
|
3101
3137
|
return t.children;
|
|
3102
3138
|
}
|
|
3103
|
-
function
|
|
3139
|
+
function us(e) {
|
|
3104
3140
|
if (e.contributionPointName !== "Navigation") return;
|
|
3105
3141
|
let t = e.content?.properties ?? {}, n = t.label, r = t.targetScreen;
|
|
3106
3142
|
if (typeof n != "string" || typeof r != "string") return;
|
|
3107
|
-
let i =
|
|
3143
|
+
let i = ds(t), a = e.order ?? (typeof t.order == "number" ? t.order : void 0), o = t.destination;
|
|
3108
3144
|
return {
|
|
3109
3145
|
label: n,
|
|
3110
3146
|
targetScreen: r,
|
|
3111
3147
|
hierarchy: i,
|
|
3112
3148
|
order: a,
|
|
3113
|
-
...
|
|
3114
|
-
id:
|
|
3115
|
-
group:
|
|
3116
|
-
icon:
|
|
3117
|
-
presentation:
|
|
3118
|
-
destination:
|
|
3149
|
+
...gs({
|
|
3150
|
+
id: hs(t.id),
|
|
3151
|
+
group: hs(t.group),
|
|
3152
|
+
icon: hs(t.icon),
|
|
3153
|
+
presentation: hs(t.presentation),
|
|
3154
|
+
destination: vs(o) && ys(o) ? o : void 0
|
|
3119
3155
|
})
|
|
3120
3156
|
};
|
|
3121
3157
|
}
|
|
3122
|
-
function
|
|
3158
|
+
function ds(e) {
|
|
3123
3159
|
return Array.isArray(e.hierarchy) ? e.hierarchy.filter((e) => typeof e == "string") : [];
|
|
3124
3160
|
}
|
|
3125
|
-
function
|
|
3161
|
+
function fs(e) {
|
|
3126
3162
|
return e.id === void 0 ? JSON.stringify([
|
|
3127
3163
|
e.hierarchy,
|
|
3128
3164
|
e.targetScreen,
|
|
3129
3165
|
e.label
|
|
3130
3166
|
]) : JSON.stringify(["id", e.id]);
|
|
3131
3167
|
}
|
|
3132
|
-
function
|
|
3168
|
+
function ps(e, t, n) {
|
|
3133
3169
|
let r = e.children.find((e) => e.screen === void 0 && e.section === !0 === n && e.label === t);
|
|
3134
3170
|
if (r) return r;
|
|
3135
3171
|
let i = n ? {
|
|
@@ -3142,12 +3178,12 @@ function ls(e, t, n) {
|
|
|
3142
3178
|
};
|
|
3143
3179
|
return e.children.push(i), i;
|
|
3144
3180
|
}
|
|
3145
|
-
function
|
|
3181
|
+
function ms(e) {
|
|
3146
3182
|
return {
|
|
3147
3183
|
label: e.label,
|
|
3148
|
-
...
|
|
3184
|
+
...gs({ id: e.id || void 0 }),
|
|
3149
3185
|
screen: e.targetScreen,
|
|
3150
|
-
...
|
|
3186
|
+
...gs({
|
|
3151
3187
|
icon: e.icon || void 0,
|
|
3152
3188
|
presentation: e.presentation || void 0,
|
|
3153
3189
|
destination: e.destination
|
|
@@ -3155,82 +3191,82 @@ function us(e) {
|
|
|
3155
3191
|
children: []
|
|
3156
3192
|
};
|
|
3157
3193
|
}
|
|
3158
|
-
function
|
|
3194
|
+
function hs(e) {
|
|
3159
3195
|
return typeof e == "string" ? e : void 0;
|
|
3160
3196
|
}
|
|
3161
|
-
function
|
|
3197
|
+
function gs(e) {
|
|
3162
3198
|
return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
|
|
3163
3199
|
}
|
|
3164
|
-
function
|
|
3200
|
+
function _s(e, t) {
|
|
3165
3201
|
for (let n of e) {
|
|
3166
3202
|
if (n.screen === t) return [n.label];
|
|
3167
|
-
let e =
|
|
3203
|
+
let e = _s(n.children, t);
|
|
3168
3204
|
if (e.length > 0) return n.section ? e : [n.label, ...e];
|
|
3169
3205
|
}
|
|
3170
3206
|
return [];
|
|
3171
3207
|
}
|
|
3172
|
-
function
|
|
3208
|
+
function vs(e) {
|
|
3173
3209
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
3174
3210
|
}
|
|
3175
|
-
function
|
|
3211
|
+
function ys(e) {
|
|
3176
3212
|
return e.slot !== void 0 || e.dialog !== void 0 || e.kind === "external" || e.kind === "dialog";
|
|
3177
3213
|
}
|
|
3178
|
-
function
|
|
3214
|
+
function bs(e, t, n) {
|
|
3179
3215
|
return e.filter((e) => !t.has(e.name)).map((e) => ({
|
|
3180
|
-
label:
|
|
3216
|
+
label: ss(e),
|
|
3181
3217
|
targetScreen: e.name,
|
|
3182
3218
|
hierarchy: e.path && e.path.length > 0 ? [...e.path] : [n]
|
|
3183
3219
|
}));
|
|
3184
3220
|
}
|
|
3185
3221
|
// src/blueprint.ts
|
|
3186
|
-
var
|
|
3187
|
-
function
|
|
3188
|
-
return
|
|
3222
|
+
var xs = "Stage:locale", Ss = "Stage:themeToggle", Cs = "Stage:notes", ws = "Stage:acting-user", Ts = "Cratis.Components", Es = "PrimeReact", Ds = /* @__PURE__ */ new Map();
|
|
3223
|
+
function Os(e) {
|
|
3224
|
+
return ft(e).packages.includes(Es);
|
|
3189
3225
|
}
|
|
3190
|
-
function
|
|
3191
|
-
|
|
3226
|
+
function ks(e, t) {
|
|
3227
|
+
Ds.set(e, t);
|
|
3192
3228
|
}
|
|
3193
|
-
function
|
|
3194
|
-
let t =
|
|
3229
|
+
function As(e) {
|
|
3230
|
+
let t = ft(e);
|
|
3195
3231
|
return {
|
|
3196
3232
|
...t,
|
|
3197
3233
|
name: e?.length ? t.name : "Stage",
|
|
3198
|
-
packages:
|
|
3199
|
-
baseline:
|
|
3200
|
-
catalog: { [
|
|
3234
|
+
packages: ie(t.packages, {
|
|
3235
|
+
baseline: Ts,
|
|
3236
|
+
catalog: { [it]: O.Blueprint }
|
|
3201
3237
|
})
|
|
3202
3238
|
};
|
|
3203
3239
|
}
|
|
3204
|
-
var
|
|
3205
|
-
...
|
|
3206
|
-
[
|
|
3240
|
+
var js = {
|
|
3241
|
+
...tt,
|
|
3242
|
+
[Ts]: Ft.components
|
|
3207
3243
|
};
|
|
3208
|
-
function
|
|
3209
|
-
let t = [...
|
|
3244
|
+
function Ms(e) {
|
|
3245
|
+
let t = [...Ds.values()].reduce((e, t) => ({
|
|
3210
3246
|
...e,
|
|
3211
3247
|
...t.components
|
|
3212
3248
|
}), {});
|
|
3213
3249
|
return {
|
|
3214
|
-
...
|
|
3215
|
-
...
|
|
3250
|
+
...je,
|
|
3251
|
+
...Pt,
|
|
3216
3252
|
...t,
|
|
3217
|
-
...
|
|
3218
|
-
...
|
|
3253
|
+
...rt,
|
|
3254
|
+
...dt,
|
|
3219
3255
|
...e
|
|
3220
3256
|
};
|
|
3221
3257
|
}
|
|
3222
|
-
function
|
|
3223
|
-
let t = Object.fromEntries([...
|
|
3258
|
+
function Ns(e) {
|
|
3259
|
+
let t = Object.fromEntries([...Ds].map(([e, t]) => [e, t.declared]));
|
|
3224
3260
|
return {
|
|
3225
3261
|
...e,
|
|
3226
|
-
...
|
|
3262
|
+
...js,
|
|
3227
3263
|
...t
|
|
3228
3264
|
};
|
|
3229
3265
|
}
|
|
3230
|
-
var
|
|
3231
|
-
function
|
|
3266
|
+
var Ps = "Stage:navigationTree";
|
|
3267
|
+
function Fs(e, t, n) {
|
|
3232
3268
|
let r = t?.title ?? "Cratis Stage";
|
|
3233
|
-
return
|
|
3269
|
+
return R(e, I.Logo, {
|
|
3234
3270
|
label: r,
|
|
3235
3271
|
initials: r.slice(0, 1).toUpperCase() || "S",
|
|
3236
3272
|
targetScreen: n,
|
|
@@ -3239,42 +3275,42 @@ function As(e, t, n) {
|
|
|
3239
3275
|
...t?.showName === void 0 ? {} : { showName: t.showName }
|
|
3240
3276
|
});
|
|
3241
3277
|
}
|
|
3242
|
-
function
|
|
3243
|
-
let
|
|
3244
|
-
return e.length > 1 &&
|
|
3278
|
+
function Is(e, t, n, r) {
|
|
3279
|
+
let i = [];
|
|
3280
|
+
return r && i.push(R("topbar-acting-user", ws, {})), e.length > 1 && i.push(R("topbar-locale", xs, {
|
|
3245
3281
|
locales: e,
|
|
3246
3282
|
locale: t
|
|
3247
|
-
})), n &&
|
|
3283
|
+
})), n && i.push(R("topbar-theme", Ss, {})), i;
|
|
3248
3284
|
}
|
|
3249
|
-
function
|
|
3250
|
-
let { regions: o = !1, showFooter: s = !0, showThemeSwitcher: c = !0 } = a,
|
|
3251
|
-
label:
|
|
3285
|
+
function Ls(e, t, n, r, i, a = {}) {
|
|
3286
|
+
let { regions: o = !1, showFooter: s = !0, showThemeSwitcher: c = !0, showActingUser: l = !1 } = a, u = e[0]?.name ?? "", d = i?.title ?? "Cratis Stage", f = cs(e), p = bs(e, new Set(f.map((e) => e.targetScreen)), "Other screens"), m = ls([...f, ...f.length > 0 ? p : []]), h = e.map((e, n) => ut({
|
|
3287
|
+
label: ss(e),
|
|
3252
3288
|
targetScreen: e.name,
|
|
3253
3289
|
icon: "pi pi-table",
|
|
3254
3290
|
group: "Screens",
|
|
3255
3291
|
order: n
|
|
3256
|
-
}, t)),
|
|
3257
|
-
nodes:
|
|
3292
|
+
}, t)), g = e.find((e) => e.name === t), _ = g ? ss(g) : Er(t), v = _s(ls(f), t), y = e.find((e) => e.name === t)?.path?.length ? _s(m, t) : [], b = v.length > 0 ? v : y, x = f.length > 0 ? R("menu-hierarchy", Ps, {
|
|
3293
|
+
nodes: m,
|
|
3258
3294
|
activeScreen: t
|
|
3259
|
-
}) :
|
|
3295
|
+
}) : R("menu-screens", I.Menu, {
|
|
3260
3296
|
title: "Screens",
|
|
3261
3297
|
label: "Screens"
|
|
3262
|
-
}, { items:
|
|
3298
|
+
}, { items: h }), S = [R("topbar-notes", Cs, {}), ...Is(n, r, c, l)], C = { regionNavigation: o };
|
|
3263
3299
|
return {
|
|
3264
|
-
[
|
|
3265
|
-
logo: [
|
|
3266
|
-
end:
|
|
3300
|
+
[L.Topbar]: [R("topbar", I.Topbar, C, {
|
|
3301
|
+
logo: [Fs("topbar-logo", i, u)],
|
|
3302
|
+
end: S
|
|
3267
3303
|
})],
|
|
3268
|
-
[
|
|
3269
|
-
...o ? {} : { [
|
|
3270
|
-
[
|
|
3271
|
-
homeTargetScreen:
|
|
3272
|
-
items: (
|
|
3304
|
+
[L.Sidebar]: [R("sidebar", I.Sidebar, C, { logo: [Fs("sidebar-logo", i, u)] })],
|
|
3305
|
+
...o ? {} : { [L.Menu]: [x] },
|
|
3306
|
+
[L.Breadcrumb]: [R("breadcrumb", I.Breadcrumb, {
|
|
3307
|
+
homeTargetScreen: u,
|
|
3308
|
+
items: (b.length > 0 ? b : [_]).map((e) => ({ label: e }))
|
|
3273
3309
|
})],
|
|
3274
|
-
...s ? { [
|
|
3275
|
-
[
|
|
3310
|
+
...s ? { [L.Footer]: [R("footer", I.Footer, { text: d })] } : {},
|
|
3311
|
+
[L.ConfigPanel]: [R(I.ConfigPanel, I.ConfigPanel, {
|
|
3276
3312
|
title: "Settings",
|
|
3277
|
-
themes:
|
|
3313
|
+
themes: at.map((e) => ({
|
|
3278
3314
|
name: e.name,
|
|
3279
3315
|
label: e.name,
|
|
3280
3316
|
isDark: e.isDark ?? !1
|
|
@@ -3282,11 +3318,11 @@ function Ms(e, t, n, r, i, a = {}) {
|
|
|
3282
3318
|
})]
|
|
3283
3319
|
};
|
|
3284
3320
|
}
|
|
3285
|
-
function
|
|
3321
|
+
function Rs(e) {
|
|
3286
3322
|
return `#/${encodeURIComponent(e)}`;
|
|
3287
3323
|
}
|
|
3288
3324
|
// src/externalRouteHref.ts
|
|
3289
|
-
function
|
|
3325
|
+
function zs(e) {
|
|
3290
3326
|
try {
|
|
3291
3327
|
let t = new URL(e ?? "");
|
|
3292
3328
|
return t.protocol === "http:" || t.protocol === "https:" ? e : void 0;
|
|
@@ -3295,11 +3331,11 @@ function Ps(e) {
|
|
|
3295
3331
|
}
|
|
3296
3332
|
}
|
|
3297
3333
|
// src/stageSlot.tsx
|
|
3298
|
-
function
|
|
3334
|
+
function Bs(e) {
|
|
3299
3335
|
return typeof e == "string" && e.length > 0 ? e : void 0;
|
|
3300
3336
|
}
|
|
3301
|
-
function
|
|
3302
|
-
let t =
|
|
3337
|
+
function Vs({ element: e }) {
|
|
3338
|
+
let t = Me(e.properties), n = c(Se), r = He(), i = Ke(), a = W(), o = Bs(e.properties.shows), s = Bs(e.properties.showsBy), u = Bs(e.properties.showsFromElement) ?? Bs(e.properties.showsFrom), d = t.routed || o ? r?.state.slots[t.name] : void 0, f = u ? a.selections[u] : void 0, p = f && s ? f[s] : void 0, m = p == null || p === "" ? void 0 : String(p);
|
|
3303
3339
|
l(() => {
|
|
3304
3340
|
if (!r || !o || !s || m === void 0) return;
|
|
3305
3341
|
let e = r.state.slots[t.name];
|
|
@@ -3320,56 +3356,56 @@ function Is({ element: e }) {
|
|
|
3320
3356
|
"data-scene-slot-screen": h,
|
|
3321
3357
|
"data-scene-slot-role": t.role,
|
|
3322
3358
|
"data-scene-slot-routed": t.routed ? "true" : void 0,
|
|
3323
|
-
"data-scene-slot-route": d ?
|
|
3324
|
-
}, b = /* @__PURE__ */
|
|
3359
|
+
"data-scene-slot-route": d ? Re(d, t.routedBy) : void 0
|
|
3360
|
+
}, b = /* @__PURE__ */ V(z, { children: [_ && h && /* @__PURE__ */ B("div", {
|
|
3325
3361
|
className: "scene-slot-bar",
|
|
3326
|
-
children: /* @__PURE__ */
|
|
3362
|
+
children: /* @__PURE__ */ B("button", {
|
|
3327
3363
|
type: "button",
|
|
3328
3364
|
className: "scene-slot-close",
|
|
3329
3365
|
"aria-label": "Close",
|
|
3330
3366
|
onClick: v,
|
|
3331
3367
|
children: "Close"
|
|
3332
3368
|
})
|
|
3333
|
-
}), g && i && h && (d ? /* @__PURE__ */
|
|
3369
|
+
}), g && i && h && (d ? /* @__PURE__ */ B(Hs, {
|
|
3334
3370
|
name: h,
|
|
3335
3371
|
screen: g,
|
|
3336
3372
|
registry: i.registry,
|
|
3337
3373
|
values: d.parameters
|
|
3338
|
-
}) : /* @__PURE__ */
|
|
3374
|
+
}) : /* @__PURE__ */ B(xr, {
|
|
3339
3375
|
screen: h,
|
|
3340
|
-
children: /* @__PURE__ */
|
|
3376
|
+
children: /* @__PURE__ */ B(pi, {
|
|
3341
3377
|
element: g,
|
|
3342
|
-
children: /* @__PURE__ */
|
|
3378
|
+
children: /* @__PURE__ */ B(xe, {
|
|
3343
3379
|
element: g,
|
|
3344
3380
|
registry: i.registry,
|
|
3345
3381
|
resolveBinding: a.resolveBinding
|
|
3346
3382
|
})
|
|
3347
3383
|
})
|
|
3348
3384
|
}))] });
|
|
3349
|
-
return t.role === A.Panel ? /* @__PURE__ */
|
|
3385
|
+
return t.role === A.Panel ? /* @__PURE__ */ B("aside", {
|
|
3350
3386
|
"aria-label": t.name,
|
|
3351
3387
|
...y,
|
|
3352
3388
|
children: b
|
|
3353
|
-
}) : /* @__PURE__ */
|
|
3389
|
+
}) : /* @__PURE__ */ B("div", {
|
|
3354
3390
|
...y,
|
|
3355
3391
|
children: b
|
|
3356
3392
|
});
|
|
3357
3393
|
}
|
|
3358
|
-
function
|
|
3394
|
+
function Hs({ name: e, screen: t, registry: n, values: r }) {
|
|
3359
3395
|
let i = W(), a = JSON.stringify({
|
|
3360
3396
|
...i.parameters,
|
|
3361
3397
|
...r
|
|
3362
3398
|
}), o = f(() => JSON.parse(a), [a]);
|
|
3363
|
-
return /* @__PURE__ */
|
|
3399
|
+
return /* @__PURE__ */ B(Te.Provider, {
|
|
3364
3400
|
value: r,
|
|
3365
|
-
children: /* @__PURE__ */
|
|
3401
|
+
children: /* @__PURE__ */ B(zn, {
|
|
3366
3402
|
routes: i.routes,
|
|
3367
3403
|
routesReady: i.routesReady,
|
|
3368
3404
|
parameters: o,
|
|
3369
3405
|
locale: i.locale,
|
|
3370
3406
|
locales: i.locales,
|
|
3371
3407
|
screen: e,
|
|
3372
|
-
children: /* @__PURE__ */
|
|
3408
|
+
children: /* @__PURE__ */ B(Us, {
|
|
3373
3409
|
name: e,
|
|
3374
3410
|
screen: t,
|
|
3375
3411
|
registry: n
|
|
@@ -3377,13 +3413,13 @@ function Ls({ name: e, screen: t, registry: n, values: r }) {
|
|
|
3377
3413
|
})
|
|
3378
3414
|
});
|
|
3379
3415
|
}
|
|
3380
|
-
function
|
|
3416
|
+
function Us({ name: e, screen: t, registry: n }) {
|
|
3381
3417
|
let r = W();
|
|
3382
|
-
return /* @__PURE__ */
|
|
3418
|
+
return /* @__PURE__ */ B(xr, {
|
|
3383
3419
|
screen: e,
|
|
3384
|
-
children: /* @__PURE__ */
|
|
3420
|
+
children: /* @__PURE__ */ V(pi, {
|
|
3385
3421
|
element: t,
|
|
3386
|
-
children: [/* @__PURE__ */
|
|
3422
|
+
children: [/* @__PURE__ */ B(Qo, { element: t }), /* @__PURE__ */ B(xe, {
|
|
3387
3423
|
element: t,
|
|
3388
3424
|
registry: n,
|
|
3389
3425
|
resolveBinding: r.resolveBinding,
|
|
@@ -3392,53 +3428,118 @@ function Rs({ name: e, screen: t, registry: n }) {
|
|
|
3392
3428
|
})
|
|
3393
3429
|
});
|
|
3394
3430
|
}
|
|
3431
|
+
// src/sandboxActingUser.ts
|
|
3432
|
+
async function Ws(e, t = fetch) {
|
|
3433
|
+
let n = await t(Rt.actingUser, {
|
|
3434
|
+
signal: e,
|
|
3435
|
+
credentials: "same-origin"
|
|
3436
|
+
});
|
|
3437
|
+
if (!n.ok) return;
|
|
3438
|
+
let r = await n.json();
|
|
3439
|
+
return r.enabled === !0 && Array.isArray(r.users) && r.users.length > 0 ? r : void 0;
|
|
3440
|
+
}
|
|
3441
|
+
async function Gs(e, t = fetch) {
|
|
3442
|
+
let n = await t(Rt.actingUser, {
|
|
3443
|
+
method: "PUT",
|
|
3444
|
+
credentials: "same-origin",
|
|
3445
|
+
headers: { "Content-Type": "application/json" },
|
|
3446
|
+
body: JSON.stringify({ name: e })
|
|
3447
|
+
});
|
|
3448
|
+
if (!n.ok) throw Error(`The sandbox could not change the acting user (${n.status}).`);
|
|
3449
|
+
}
|
|
3450
|
+
async function Ks(e, t, n) {
|
|
3451
|
+
e.selectActingUser && (await e.selectActingUser(t), n());
|
|
3452
|
+
}
|
|
3453
|
+
// src/SandboxActingUser.tsx
|
|
3454
|
+
function qs() {
|
|
3455
|
+
let e = U(), [t, n] = m(), [r, i] = m(!1), [a, o] = m("");
|
|
3456
|
+
if (l(() => {
|
|
3457
|
+
let t = new AbortController();
|
|
3458
|
+
return e.actingUser && e.selectActingUser && e.actingUser(t.signal).then((e) => {
|
|
3459
|
+
t.signal.aborted || n(e);
|
|
3460
|
+
}).catch(() => {}), () => t.abort();
|
|
3461
|
+
}, [e]), !t?.enabled || t.users.length === 0) return null;
|
|
3462
|
+
let s = async (t) => {
|
|
3463
|
+
i(!0), o("");
|
|
3464
|
+
try {
|
|
3465
|
+
await Ks(e, t || null, () => window.location.reload());
|
|
3466
|
+
} catch {
|
|
3467
|
+
o("The acting user could not be changed. Try again."), i(!1);
|
|
3468
|
+
}
|
|
3469
|
+
};
|
|
3470
|
+
return /* @__PURE__ */ V("label", {
|
|
3471
|
+
className: "stage-acting-user",
|
|
3472
|
+
children: [
|
|
3473
|
+
/* @__PURE__ */ B("span", { children: "Acting as " }),
|
|
3474
|
+
/* @__PURE__ */ V("select", {
|
|
3475
|
+
"aria-label": "Acting as",
|
|
3476
|
+
value: t.current ?? "",
|
|
3477
|
+
disabled: r,
|
|
3478
|
+
onChange: (e) => {
|
|
3479
|
+
s(e.target.value);
|
|
3480
|
+
},
|
|
3481
|
+
children: [/* @__PURE__ */ B("option", {
|
|
3482
|
+
value: "",
|
|
3483
|
+
children: "No acting user"
|
|
3484
|
+
}), t.users.map((e) => /* @__PURE__ */ V("option", {
|
|
3485
|
+
value: e.name,
|
|
3486
|
+
children: [e.displayName || e.name, e.personas.length ? ` (${e.personas.join(", ")})` : ""]
|
|
3487
|
+
}, e.name))]
|
|
3488
|
+
}),
|
|
3489
|
+
a && /* @__PURE__ */ B("span", {
|
|
3490
|
+
role: "alert",
|
|
3491
|
+
children: a
|
|
3492
|
+
})
|
|
3493
|
+
]
|
|
3494
|
+
});
|
|
3495
|
+
}
|
|
3395
3496
|
// src/StageChrome.tsx
|
|
3396
|
-
var
|
|
3497
|
+
var Js = a({
|
|
3397
3498
|
locales: [],
|
|
3398
3499
|
locale: "",
|
|
3399
3500
|
setLocale: () => void 0,
|
|
3400
3501
|
activity: ""
|
|
3401
3502
|
});
|
|
3402
|
-
function
|
|
3403
|
-
return /* @__PURE__ */
|
|
3503
|
+
function Ys({ state: e, children: t }) {
|
|
3504
|
+
return /* @__PURE__ */ B(Js.Provider, {
|
|
3404
3505
|
value: e,
|
|
3405
3506
|
children: t
|
|
3406
3507
|
});
|
|
3407
3508
|
}
|
|
3408
|
-
var
|
|
3409
|
-
function
|
|
3410
|
-
let { notesEnabled: e } = c(
|
|
3411
|
-
return e ? /* @__PURE__ */
|
|
3509
|
+
var Xs = "Stage:activity";
|
|
3510
|
+
function Zs() {
|
|
3511
|
+
let { notesEnabled: e } = c(Js);
|
|
3512
|
+
return e ? /* @__PURE__ */ B(r, { size: "small" }) : null;
|
|
3412
3513
|
}
|
|
3413
|
-
function
|
|
3414
|
-
let { locales: e, locale: t, setLocale: n } = c(
|
|
3415
|
-
return e.length < 2 ? null : /* @__PURE__ */
|
|
3514
|
+
function Qs() {
|
|
3515
|
+
let { locales: e, locale: t, setLocale: n } = c(Js);
|
|
3516
|
+
return e.length < 2 ? null : /* @__PURE__ */ B("select", {
|
|
3416
3517
|
className: "stage-locale",
|
|
3417
3518
|
"aria-label": "Locale",
|
|
3418
3519
|
value: t,
|
|
3419
3520
|
onChange: (e) => n(e.target.value),
|
|
3420
|
-
children: e.map((e) => /* @__PURE__ */
|
|
3521
|
+
children: e.map((e) => /* @__PURE__ */ B("option", {
|
|
3421
3522
|
value: e,
|
|
3422
3523
|
children: e
|
|
3423
3524
|
}, e))
|
|
3424
3525
|
});
|
|
3425
3526
|
}
|
|
3426
|
-
function
|
|
3427
|
-
let { config: t, setThemeName: n, setColorScheme: r } =
|
|
3527
|
+
function $s({ element: e }) {
|
|
3528
|
+
let { config: t, setThemeName: n, setColorScheme: r } = pt(), i = at.find((e) => e.name === t.themeName)?.isDark ?? t.colorScheme === F.Dark, a = at.find((e) => (e.isDark ?? !1) !== i);
|
|
3428
3529
|
if (!a) return null;
|
|
3429
3530
|
let o = i ? "Switch to a light theme" : "Switch to a dark theme";
|
|
3430
|
-
return /* @__PURE__ */
|
|
3531
|
+
return /* @__PURE__ */ B("div", {
|
|
3431
3532
|
className: "stage-theme-toggle",
|
|
3432
3533
|
"data-scene-id": e.id,
|
|
3433
|
-
children: /* @__PURE__ */
|
|
3534
|
+
children: /* @__PURE__ */ B("button", {
|
|
3434
3535
|
type: "button",
|
|
3435
3536
|
className: "stage-theme-toggle__button",
|
|
3436
3537
|
"aria-label": o,
|
|
3437
3538
|
title: o,
|
|
3438
3539
|
onClick: () => {
|
|
3439
|
-
|
|
3540
|
+
ns(a.name), n(a.name), r(a.isDark ? F.Dark : F.Light);
|
|
3440
3541
|
},
|
|
3441
|
-
children: /* @__PURE__ */
|
|
3542
|
+
children: /* @__PURE__ */ B("svg", {
|
|
3442
3543
|
width: "18",
|
|
3443
3544
|
height: "18",
|
|
3444
3545
|
viewBox: "0 0 24 24",
|
|
@@ -3448,43 +3549,43 @@ function Ws({ element: e }) {
|
|
|
3448
3549
|
strokeLinecap: "round",
|
|
3449
3550
|
strokeLinejoin: "round",
|
|
3450
3551
|
"aria-hidden": "true",
|
|
3451
|
-
children: i ? /* @__PURE__ */
|
|
3552
|
+
children: i ? /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B("circle", {
|
|
3452
3553
|
cx: "12",
|
|
3453
3554
|
cy: "12",
|
|
3454
3555
|
r: "4"
|
|
3455
|
-
}), /* @__PURE__ */
|
|
3556
|
+
}), /* @__PURE__ */ B("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41" })] }) : /* @__PURE__ */ B("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
|
|
3456
3557
|
})
|
|
3457
3558
|
})
|
|
3458
3559
|
});
|
|
3459
3560
|
}
|
|
3460
|
-
function
|
|
3561
|
+
function ec({ element: e }) {
|
|
3461
3562
|
let t = e.properties ?? {};
|
|
3462
|
-
return /* @__PURE__ */
|
|
3563
|
+
return /* @__PURE__ */ B("nav", {
|
|
3463
3564
|
className: "stage-navigation-tree",
|
|
3464
3565
|
"aria-label": "Navigation",
|
|
3465
3566
|
"data-scene-id": e.id,
|
|
3466
|
-
children: /* @__PURE__ */
|
|
3567
|
+
children: /* @__PURE__ */ B(tc, {
|
|
3467
3568
|
nodes: t.nodes ?? [],
|
|
3468
3569
|
activeScreen: t.activeScreen
|
|
3469
3570
|
})
|
|
3470
3571
|
});
|
|
3471
3572
|
}
|
|
3472
|
-
function
|
|
3473
|
-
return /* @__PURE__ */
|
|
3573
|
+
function tc({ nodes: e, activeScreen: t }) {
|
|
3574
|
+
return /* @__PURE__ */ B("ul", {
|
|
3474
3575
|
role: "tree",
|
|
3475
|
-
children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */
|
|
3576
|
+
children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */ V("li", {
|
|
3476
3577
|
role: "treeitem",
|
|
3477
3578
|
"aria-expanded": "true",
|
|
3478
|
-
children: [/* @__PURE__ */
|
|
3579
|
+
children: [/* @__PURE__ */ B("span", {
|
|
3479
3580
|
className: "stage-navigation-group",
|
|
3480
3581
|
children: e.label
|
|
3481
|
-
}), /* @__PURE__ */
|
|
3582
|
+
}), /* @__PURE__ */ B(tc, {
|
|
3482
3583
|
nodes: e.children,
|
|
3483
3584
|
activeScreen: t
|
|
3484
3585
|
})]
|
|
3485
|
-
}, e.label) : /* @__PURE__ */
|
|
3586
|
+
}, e.label) : /* @__PURE__ */ B("li", {
|
|
3486
3587
|
role: "treeitem",
|
|
3487
|
-
children: /* @__PURE__ */
|
|
3588
|
+
children: /* @__PURE__ */ B(nc, {
|
|
3488
3589
|
node: e,
|
|
3489
3590
|
screen: e.screen,
|
|
3490
3591
|
activeScreen: t
|
|
@@ -3492,11 +3593,11 @@ function Ks({ nodes: e, activeScreen: t }) {
|
|
|
3492
3593
|
}, `${e.screen}:${e.label}`))
|
|
3493
3594
|
});
|
|
3494
3595
|
}
|
|
3495
|
-
function
|
|
3496
|
-
let r = c(
|
|
3596
|
+
function nc({ node: e, screen: t, activeScreen: n }) {
|
|
3597
|
+
let r = c(Se), i = e.presentation === "icon" || e.presentation === "text" ? e.presentation : "both", a = e.destination, o = a?.kind === "external", s = a && r && !o && ys(a) ? (e) => {
|
|
3497
3598
|
e.preventDefault(), r.navigate(a);
|
|
3498
|
-
} : void 0, l = o ?
|
|
3499
|
-
return /* @__PURE__ */
|
|
3599
|
+
} : void 0, l = o ? zs(a.route) : Rs(t), u = o && l === void 0;
|
|
3600
|
+
return /* @__PURE__ */ V("a", {
|
|
3500
3601
|
href: l,
|
|
3501
3602
|
rel: o && !u ? "noreferrer" : void 0,
|
|
3502
3603
|
"aria-disabled": u ? "true" : void 0,
|
|
@@ -3505,23 +3606,23 @@ function qs({ node: e, screen: t, activeScreen: n }) {
|
|
|
3505
3606
|
"data-presentation": e.presentation,
|
|
3506
3607
|
"data-icon": e.icon,
|
|
3507
3608
|
onClick: s,
|
|
3508
|
-
children: [i !== "text" && e.icon && /* @__PURE__ */
|
|
3609
|
+
children: [i !== "text" && e.icon && /* @__PURE__ */ B("span", {
|
|
3509
3610
|
className: "stage-navigation-icon",
|
|
3510
3611
|
"aria-hidden": "true",
|
|
3511
3612
|
"data-icon-name": e.icon
|
|
3512
3613
|
}), i !== "icon" && e.label]
|
|
3513
3614
|
});
|
|
3514
3615
|
}
|
|
3515
|
-
function
|
|
3516
|
-
let { activity: e } = c(
|
|
3517
|
-
return e ? /* @__PURE__ */
|
|
3616
|
+
function rc() {
|
|
3617
|
+
let { activity: e } = c(Js);
|
|
3618
|
+
return e ? /* @__PURE__ */ B("p", {
|
|
3518
3619
|
className: "stage-activity",
|
|
3519
3620
|
role: "status",
|
|
3520
3621
|
children: e
|
|
3521
3622
|
}) : null;
|
|
3522
3623
|
}
|
|
3523
|
-
function
|
|
3524
|
-
let e =
|
|
3624
|
+
function ic() {
|
|
3625
|
+
let e = qe(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
|
|
3525
3626
|
return l(() => {
|
|
3526
3627
|
let r = e?.isDark ? "dark" : "light";
|
|
3527
3628
|
document.documentElement.setAttribute("data-scene-color-scheme", r), document.body.setAttribute("data-scene-color-scheme", r), document.body.style.backgroundColor = t ?? "", document.body.style.color = n ?? "";
|
|
@@ -3531,26 +3632,27 @@ function Ys() {
|
|
|
3531
3632
|
n
|
|
3532
3633
|
]), null;
|
|
3533
3634
|
}
|
|
3534
|
-
var
|
|
3535
|
-
[
|
|
3536
|
-
[
|
|
3537
|
-
[
|
|
3538
|
-
[
|
|
3539
|
-
[
|
|
3540
|
-
|
|
3635
|
+
var ac = {
|
|
3636
|
+
[Cs]: Zs,
|
|
3637
|
+
[ws]: qs,
|
|
3638
|
+
[xs]: Qs,
|
|
3639
|
+
[Ss]: $s,
|
|
3640
|
+
[Ps]: ec,
|
|
3641
|
+
[Xs]: rc,
|
|
3642
|
+
"core:slot": Vs
|
|
3541
3643
|
};
|
|
3542
3644
|
// src/stageResponseContracts.ts
|
|
3543
|
-
function
|
|
3645
|
+
function oc(e) {
|
|
3544
3646
|
return {
|
|
3545
3647
|
commandResponse: (t) => e?.commands[t] ?? void 0,
|
|
3546
|
-
targetType: (t, n) =>
|
|
3648
|
+
targetType: (t, n) => sc(e, t, n)
|
|
3547
3649
|
};
|
|
3548
3650
|
}
|
|
3549
|
-
function
|
|
3651
|
+
function sc(e, t, n) {
|
|
3550
3652
|
if (n.kind === "message") return { kind: "string" };
|
|
3551
|
-
if (n.kind === "argument") return
|
|
3653
|
+
if (n.kind === "argument") return cc(e, t, n.name);
|
|
3552
3654
|
}
|
|
3553
|
-
function
|
|
3655
|
+
function cc(e, t, n) {
|
|
3554
3656
|
switch (t.kind) {
|
|
3555
3657
|
case S.ExecuteCommand: return e?.commandInputs[t.command]?.[n] ?? void 0;
|
|
3556
3658
|
case S.Navigate: return e?.screenInputs[t.screen]?.[n] ?? void 0;
|
|
@@ -3558,13 +3660,13 @@ function $s(e, t, n) {
|
|
|
3558
3660
|
}
|
|
3559
3661
|
}
|
|
3560
3662
|
// src/stageShell.ts
|
|
3561
|
-
var
|
|
3663
|
+
var lc = [
|
|
3562
3664
|
"navigationMode",
|
|
3563
3665
|
"menuTheme",
|
|
3564
3666
|
"showFooter",
|
|
3565
3667
|
"showThemeSwitcher"
|
|
3566
|
-
],
|
|
3567
|
-
function
|
|
3668
|
+
], uc = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
3669
|
+
function dc(e, t, n = !1) {
|
|
3568
3670
|
let r = [], i = {
|
|
3569
3671
|
showFooter: !0,
|
|
3570
3672
|
showThemeSwitcher: !0,
|
|
@@ -3572,54 +3674,54 @@ function nc(e, t, n = !1) {
|
|
|
3572
3674
|
problems: r
|
|
3573
3675
|
};
|
|
3574
3676
|
for (let [e, n] of Object.entries(t.options ?? {})) {
|
|
3575
|
-
let a =
|
|
3677
|
+
let a = fc(i, t.name, e, n);
|
|
3576
3678
|
a && r.push(a);
|
|
3577
3679
|
}
|
|
3578
|
-
return
|
|
3680
|
+
return mc(i, e?.appearance, n), i;
|
|
3579
3681
|
}
|
|
3580
|
-
function
|
|
3581
|
-
if (!
|
|
3582
|
-
if (n === "navigationMode") return
|
|
3682
|
+
function fc(e, t, n, r) {
|
|
3683
|
+
if (!lc.includes(n)) return `The shell '${t}' has no option '${n}'; the options it understands are ${lc.join(", ")}.`;
|
|
3684
|
+
if (n === "navigationMode") return pc(n, r, ct, (t) => {
|
|
3583
3685
|
e.mode = t;
|
|
3584
3686
|
});
|
|
3585
|
-
if (n === "menuTheme") return
|
|
3687
|
+
if (n === "menuTheme") return pc(n, r, lt, (t) => {
|
|
3586
3688
|
e.menuTheme = t;
|
|
3587
3689
|
});
|
|
3588
3690
|
if (typeof r != "boolean") return `Option '${n}' is '${String(r)}'; expected true or false.`;
|
|
3589
3691
|
n === "showFooter" ? e.showFooter = r : e.showThemeSwitcher = r;
|
|
3590
3692
|
}
|
|
3591
|
-
function
|
|
3693
|
+
function pc(e, t, n, r) {
|
|
3592
3694
|
let i = n.find((e) => e === t);
|
|
3593
3695
|
if (!i) return `Option '${e}' is '${String(t)}'; expected one of ${n.join(", ")}.`;
|
|
3594
3696
|
r(i);
|
|
3595
3697
|
}
|
|
3596
|
-
function
|
|
3698
|
+
function mc(e, t, n) {
|
|
3597
3699
|
if (t?.colorScheme !== void 0) {
|
|
3598
3700
|
e.followsSystem = t.colorScheme === _.System;
|
|
3599
3701
|
let r = e.followsSystem ? n : t.colorScheme === _.Dark;
|
|
3600
|
-
e.colorScheme = r ?
|
|
3702
|
+
e.colorScheme = r ? F.Dark : F.Light, e.themeName = at.find((e) => (e.isDark ?? !1) === r)?.name, e.followsSystem || (e.showThemeSwitcher = !1);
|
|
3601
3703
|
}
|
|
3602
|
-
t?.accent !== void 0 && (
|
|
3704
|
+
t?.accent !== void 0 && (uc.test(t.accent) ? e.accent = t.accent : e.problems.push(`The accent '${t.accent}' is not a colour written as #rgb or #rrggbb.`));
|
|
3603
3705
|
}
|
|
3604
|
-
function
|
|
3706
|
+
function hc(e) {
|
|
3605
3707
|
return {
|
|
3606
3708
|
showFooter: e?.showFooter ?? !0,
|
|
3607
3709
|
showThemeSwitcher: e?.showThemeSwitcher ?? !0
|
|
3608
3710
|
};
|
|
3609
3711
|
}
|
|
3610
|
-
function
|
|
3712
|
+
function gc(e, t) {
|
|
3611
3713
|
if (e?.root === void 0) return [];
|
|
3612
3714
|
let n = /* @__PURE__ */ new Set([
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3715
|
+
j.RootTemplateUnknown,
|
|
3716
|
+
j.RootTemplateVersionNotSatisfied,
|
|
3717
|
+
j.RootTemplateNotApplicable,
|
|
3718
|
+
j.RootTemplateMissingContentSlot,
|
|
3719
|
+
j.RootTemplateCycle,
|
|
3720
|
+
j.RootTemplateBlueprintNotInstalled
|
|
3619
3721
|
]), r = t.diagnostics.filter((e) => n.has(e.code)).map((e) => e.message);
|
|
3620
|
-
return r.length === 0 && t.origin !==
|
|
3722
|
+
return r.length === 0 && t.origin !== M.Root && r.push(`The root template '${e.root.template.id}' did not resolve, so the application would not start in the shell it names.`), r;
|
|
3621
3723
|
}
|
|
3622
|
-
function
|
|
3724
|
+
function _c(e) {
|
|
3623
3725
|
let t = e.length === 4 ? [...e.slice(1)].map((e) => e + e).join("") : e.slice(1), [n, r, i] = [
|
|
3624
3726
|
0,
|
|
3625
3727
|
2,
|
|
@@ -3627,7 +3729,7 @@ function cc(e) {
|
|
|
3627
3729
|
].map((e) => parseInt(t.slice(e, e + 2), 16));
|
|
3628
3730
|
return (n * 299 + r * 587 + i * 114) / 1e3 >= 150 ? "#111827" : "#ffffff";
|
|
3629
3731
|
}
|
|
3630
|
-
function
|
|
3732
|
+
function vc(e, t) {
|
|
3631
3733
|
if (t === void 0) return e;
|
|
3632
3734
|
let n = t.length === 4 ? [...t.slice(1)].map((e) => e + e).join("") : t.slice(1), [r, i, a] = [
|
|
3633
3735
|
0,
|
|
@@ -3639,25 +3741,25 @@ function lc(e, t) {
|
|
|
3639
3741
|
tokens: {
|
|
3640
3742
|
...e.tokens,
|
|
3641
3743
|
"primary.color": t,
|
|
3642
|
-
"primary.contrastColor":
|
|
3744
|
+
"primary.contrastColor": _c(t),
|
|
3643
3745
|
"focus.ring": `0 0 0 2px rgb(${r} ${i} ${a} / 0.4)`
|
|
3644
3746
|
}
|
|
3645
3747
|
}));
|
|
3646
3748
|
}
|
|
3647
3749
|
// src/StageShellSettings.tsx
|
|
3648
|
-
var
|
|
3649
|
-
function
|
|
3750
|
+
var yc = "(prefers-color-scheme: dark)";
|
|
3751
|
+
function bc() {
|
|
3650
3752
|
return globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ?? !1;
|
|
3651
3753
|
}
|
|
3652
|
-
function
|
|
3653
|
-
let n = p(
|
|
3654
|
-
n.current =
|
|
3754
|
+
function xc({ settings: e, onSystemSchemeChange: t }) {
|
|
3755
|
+
let n = p(pt());
|
|
3756
|
+
n.current = pt();
|
|
3655
3757
|
let { mode: r, menuTheme: i, colorScheme: a, themeName: o } = e;
|
|
3656
3758
|
return l(() => {
|
|
3657
3759
|
let { setMode: e, setMenuTheme: t, setColorScheme: s, setThemeName: c } = n.current;
|
|
3658
3760
|
r !== void 0 && e(r), i !== void 0 && t(i);
|
|
3659
|
-
let l =
|
|
3660
|
-
l ? (c(l.name), s(l.isDark ?
|
|
3761
|
+
let l = at.find((e) => e.name === ts());
|
|
3762
|
+
l ? (c(l.name), s(l.isDark ? F.Dark : F.Light)) : (a !== void 0 && s(a), o !== void 0 && c(o));
|
|
3661
3763
|
}, [
|
|
3662
3764
|
r,
|
|
3663
3765
|
i,
|
|
@@ -3665,16 +3767,16 @@ function fc({ settings: e, onSystemSchemeChange: t }) {
|
|
|
3665
3767
|
o
|
|
3666
3768
|
]), l(() => {
|
|
3667
3769
|
if (!e.followsSystem || !globalThis.matchMedia || !t) return;
|
|
3668
|
-
let n = globalThis.matchMedia(
|
|
3770
|
+
let n = globalThis.matchMedia(yc), r = (e) => t(e.matches);
|
|
3669
3771
|
return n.addEventListener("change", r), () => n.removeEventListener("change", r);
|
|
3670
3772
|
}, [e.followsSystem, t]), null;
|
|
3671
3773
|
}
|
|
3672
3774
|
// src/stageNavigationModel.ts
|
|
3673
|
-
function
|
|
3775
|
+
function Sc(e) {
|
|
3674
3776
|
return (e?.application.outlets.some((e) => e.defaults.length > 0) ?? !1) || (e?.modules.length ?? 0) > 0;
|
|
3675
3777
|
}
|
|
3676
|
-
function
|
|
3677
|
-
let t = e.filter(
|
|
3778
|
+
function Cc(e) {
|
|
3779
|
+
let t = e.filter(wc), n = /* @__PURE__ */ new Map();
|
|
3678
3780
|
for (let e of t) {
|
|
3679
3781
|
let t = (e.path ?? []).join(".");
|
|
3680
3782
|
t.length > 0 && !n.has(t) && n.set(t, e.name);
|
|
@@ -3686,41 +3788,41 @@ function mc(e) {
|
|
|
3686
3788
|
return n.get(r) ?? i ?? (t.some((e) => e.name === r) ? r : void 0);
|
|
3687
3789
|
};
|
|
3688
3790
|
}
|
|
3689
|
-
function
|
|
3791
|
+
function wc(e) {
|
|
3690
3792
|
return e.fits === void 0 || e.fits.length === 0 || e.fits.includes(k.Page);
|
|
3691
3793
|
}
|
|
3692
|
-
function
|
|
3794
|
+
function Tc(e) {
|
|
3693
3795
|
return (t) => e.find((e) => e.name === t)?.path?.[0];
|
|
3694
3796
|
}
|
|
3695
|
-
function
|
|
3797
|
+
function Ec(e, t, n) {
|
|
3696
3798
|
let r = e.navigation ?? {
|
|
3697
3799
|
application: { outlets: [] },
|
|
3698
3800
|
modules: []
|
|
3699
3801
|
};
|
|
3700
3802
|
return {
|
|
3701
3803
|
structure: e.structure ?? { modules: [] },
|
|
3702
|
-
navigation: n ?
|
|
3703
|
-
screenFor:
|
|
3704
|
-
moduleOf:
|
|
3804
|
+
navigation: n ? Dc(r, n) : r,
|
|
3805
|
+
screenFor: Cc(e.screens),
|
|
3806
|
+
moduleOf: Tc(e.screens),
|
|
3705
3807
|
...t ? { isVisible: t } : {}
|
|
3706
3808
|
};
|
|
3707
3809
|
}
|
|
3708
|
-
function
|
|
3709
|
-
return typeof e == "string" ?
|
|
3810
|
+
function Dc(e, t) {
|
|
3811
|
+
return typeof e == "string" ? le(e, t) : Array.isArray(e) ? e.map((e) => Dc(e, t)) : typeof e == "object" && e ? Object.fromEntries(Object.entries(e).map(([e, n]) => [e, Dc(n, t)])) : e;
|
|
3710
3812
|
}
|
|
3711
3813
|
// src/stageSlices.ts
|
|
3712
|
-
function
|
|
3814
|
+
function Oc(e) {
|
|
3713
3815
|
return (t) => Y(e?.[t] ?? "").filter((e) => e.unsupportedReason === void 0 && !e.members && !e.item).map((e) => ({
|
|
3714
3816
|
name: e.name,
|
|
3715
3817
|
type: e.type === "text" || e.type === void 0 ? "string" : e.type,
|
|
3716
|
-
label:
|
|
3818
|
+
label: kc(e.name),
|
|
3717
3819
|
required: e.required
|
|
3718
3820
|
}));
|
|
3719
3821
|
}
|
|
3720
|
-
function
|
|
3822
|
+
function kc(e) {
|
|
3721
3823
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase());
|
|
3722
3824
|
}
|
|
3723
|
-
function
|
|
3825
|
+
function Ac(e, t, n) {
|
|
3724
3826
|
return { invoke: async (r, i, a) => {
|
|
3725
3827
|
let o = a ?? r.slice(r.lastIndexOf(".") + 1);
|
|
3726
3828
|
if (!on(o)) return {
|
|
@@ -3740,7 +3842,7 @@ function xc(e, t, n) {
|
|
|
3740
3842
|
} };
|
|
3741
3843
|
}
|
|
3742
3844
|
// src/withoutSeededSlots.ts
|
|
3743
|
-
function
|
|
3845
|
+
function jc(e, t) {
|
|
3744
3846
|
let n = /* @__PURE__ */ new Map();
|
|
3745
3847
|
for (let e of t) n.has(e.name) || n.set(e.name, e.slots.map((e) => e.name));
|
|
3746
3848
|
return e.map((e) => {
|
|
@@ -3757,9 +3859,9 @@ function Sc(e, t) {
|
|
|
3757
3859
|
});
|
|
3758
3860
|
}
|
|
3759
3861
|
// src/stageOutlets.tsx
|
|
3760
|
-
function
|
|
3862
|
+
function Mc(e) {
|
|
3761
3863
|
let t = new Map(e.screens.map((e) => [e.name, e]));
|
|
3762
|
-
return
|
|
3864
|
+
return Nc(e.structure).map((n) => {
|
|
3763
3865
|
let r = t.get(n.name), i = n.command ? Y(e.commandSchemas?.[n.command] ?? "").map((e) => e.identity ? {
|
|
3764
3866
|
name: e.name,
|
|
3765
3867
|
source: te.DataContext
|
|
@@ -3773,36 +3875,36 @@ function Cc(e) {
|
|
|
3773
3875
|
};
|
|
3774
3876
|
});
|
|
3775
3877
|
}
|
|
3776
|
-
function
|
|
3878
|
+
function Nc(e) {
|
|
3777
3879
|
let t = (e) => e.flatMap((e) => [...e.slices, ...t(e.features ?? [])]);
|
|
3778
3880
|
return (e?.modules ?? []).flatMap((e) => [...e.slices ?? [], ...t(e.features ?? [])]);
|
|
3779
3881
|
}
|
|
3780
|
-
function
|
|
3882
|
+
function Pc(e, t) {
|
|
3781
3883
|
let n = e.screens.find((e) => e.name === t);
|
|
3782
3884
|
if (!n) return { chain: [] };
|
|
3783
|
-
let { chain: r, contributors: i } =
|
|
3885
|
+
let { chain: r, contributors: i } = ae({
|
|
3784
3886
|
layouts: e.layouts,
|
|
3785
3887
|
screenTemplates: e.screenTemplates,
|
|
3786
3888
|
screens: e.screens,
|
|
3787
3889
|
navigation: e.navigation,
|
|
3788
3890
|
levels: e.outletLevels
|
|
3789
|
-
}, n.name), a = e.screenTemplates.find((e) => e.name === n.screenTemplate), o = e.layouts.find((e) => e.name === n.layout), s = Object.entries(n.slotContent ?? {}).filter(([, e]) => e.some((e) => e.componentName !== "core:slot")).map(([e]) => e), c =
|
|
3891
|
+
}, n.name), a = e.screenTemplates.find((e) => e.name === n.screenTemplate), o = e.layouts.find((e) => e.name === n.layout), s = Object.entries(n.slotContent ?? {}).filter(([, e]) => e.some((e) => e.componentName !== "core:slot")).map(([e]) => e), c = P([...o?.slots ?? [], ...a?.slots ?? []], s);
|
|
3790
3892
|
return {
|
|
3791
3893
|
chain: r,
|
|
3792
3894
|
contributors: i,
|
|
3793
|
-
slices:
|
|
3895
|
+
slices: Mc(e),
|
|
3794
3896
|
slots: c
|
|
3795
3897
|
};
|
|
3796
3898
|
}
|
|
3797
|
-
function
|
|
3798
|
-
let r = f(() =>
|
|
3799
|
-
return /* @__PURE__ */
|
|
3899
|
+
function Fc({ source: e, screen: t, children: n }) {
|
|
3900
|
+
let r = f(() => Pc(e, t), [e, t]);
|
|
3901
|
+
return /* @__PURE__ */ B(Ce, {
|
|
3800
3902
|
value: r,
|
|
3801
3903
|
children: n
|
|
3802
3904
|
});
|
|
3803
3905
|
}
|
|
3804
3906
|
// src/stageIcons.ts
|
|
3805
|
-
var
|
|
3907
|
+
var Ic = /* @__PURE__ */ new Map([
|
|
3806
3908
|
["chart", "chart-column"],
|
|
3807
3909
|
["add", "plus"],
|
|
3808
3910
|
["dollar", "dollar-sign"],
|
|
@@ -3810,23 +3912,23 @@ var Dc = /* @__PURE__ */ new Map([
|
|
|
3810
3912
|
["refresh", "refresh-cw"],
|
|
3811
3913
|
["invoice", "receipt-text"],
|
|
3812
3914
|
["batch", "layers"]
|
|
3813
|
-
]),
|
|
3915
|
+
]), Lc = (e) => e.trim().replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([a-zA-Z])([0-9]+)/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(), Rc = Pe([{
|
|
3814
3916
|
library: ee,
|
|
3815
3917
|
loadGlyph: async ({ key: e }) => {
|
|
3816
|
-
let t =
|
|
3817
|
-
if (Object.hasOwn(
|
|
3918
|
+
let t = Lc(e), n = Ic.get(t) ?? t;
|
|
3919
|
+
if (Object.hasOwn(It, n)) return (await It[n]())?.default;
|
|
3818
3920
|
}
|
|
3819
3921
|
}]);
|
|
3820
3922
|
// src/App.tsx
|
|
3821
|
-
function
|
|
3822
|
-
return
|
|
3923
|
+
function zc(e = {}) {
|
|
3924
|
+
return Ms({
|
|
3823
3925
|
...e,
|
|
3824
|
-
...
|
|
3825
|
-
...
|
|
3926
|
+
...Vo,
|
|
3927
|
+
...ac
|
|
3826
3928
|
});
|
|
3827
3929
|
}
|
|
3828
|
-
function
|
|
3829
|
-
return
|
|
3930
|
+
function Bc(e, t) {
|
|
3931
|
+
return R(`form-${e}-${t.name}`, co, {
|
|
3830
3932
|
command: t.forCommand,
|
|
3831
3933
|
label: t.name,
|
|
3832
3934
|
generationMode: t.generationMode,
|
|
@@ -3835,46 +3937,47 @@ function jc(e, t) {
|
|
|
3835
3937
|
onSubmit: t.onSubmit
|
|
3836
3938
|
});
|
|
3837
3939
|
}
|
|
3838
|
-
function
|
|
3940
|
+
function Vc(e, t) {
|
|
3839
3941
|
let n = e.screens[0];
|
|
3840
|
-
return
|
|
3841
|
-
profile:
|
|
3842
|
-
blueprintTemplates: t?.length ? [...
|
|
3942
|
+
return ot(e, n, {
|
|
3943
|
+
profile: As(e.uiProfiles),
|
|
3944
|
+
blueprintTemplates: t?.length ? [...st, ...t] : st
|
|
3843
3945
|
});
|
|
3844
3946
|
}
|
|
3845
|
-
function
|
|
3947
|
+
function Hc(e, t) {
|
|
3846
3948
|
return t ? e.map((e) => ({
|
|
3847
3949
|
...e,
|
|
3848
|
-
slotContent: Object.fromEntries(Object.entries(e.slotContent ?? {}).map(([e, n]) => [e, n.map((e) =>
|
|
3950
|
+
slotContent: Object.fromEntries(Object.entries(e.slotContent ?? {}).map(([e, n]) => [e, n.map((e) => ce(e, t))]))
|
|
3849
3951
|
})) : e;
|
|
3850
3952
|
}
|
|
3851
|
-
function
|
|
3852
|
-
let
|
|
3853
|
-
regions:
|
|
3953
|
+
function Uc(e, t, n, r, i, a, o = !0, s = !0, c = !1) {
|
|
3954
|
+
let l = {
|
|
3955
|
+
regions: Sc(e.navigation),
|
|
3854
3956
|
showFooter: o,
|
|
3855
|
-
showThemeSwitcher: s
|
|
3856
|
-
|
|
3957
|
+
showThemeSwitcher: s,
|
|
3958
|
+
showActingUser: c
|
|
3959
|
+
}, u = Hc(e.screens, i), d = Wc(e);
|
|
3857
3960
|
return {
|
|
3858
|
-
profile:
|
|
3859
|
-
catalog:
|
|
3860
|
-
blueprintTemplates: a?.length ? [...
|
|
3961
|
+
profile: As(e.uiProfiles),
|
|
3962
|
+
catalog: Ns(r),
|
|
3963
|
+
blueprintTemplates: a?.length ? [...st, ...a] : st,
|
|
3861
3964
|
namedTemplateOnly: !0,
|
|
3862
|
-
chrome: (e, r) => r ===
|
|
3863
|
-
form:
|
|
3864
|
-
trailing: [
|
|
3965
|
+
chrome: (e, r) => r === I.FullPageShell ? { [L.ConfigPanel]: Ls(u, e.name, t, n, d, l)[L.ConfigPanel] } : Ls(u, e.name, t, n, d, l),
|
|
3966
|
+
form: Bc,
|
|
3967
|
+
trailing: [R("activity", Xs)],
|
|
3865
3968
|
decorate: (e) => {
|
|
3866
|
-
let t =
|
|
3867
|
-
return i ?
|
|
3969
|
+
let t = Wo(or(e));
|
|
3970
|
+
return i ? ce(t, i) : t;
|
|
3868
3971
|
}
|
|
3869
3972
|
};
|
|
3870
3973
|
}
|
|
3871
|
-
function
|
|
3974
|
+
function Wc(e) {
|
|
3872
3975
|
let t = e.navigation?.application.logo;
|
|
3873
3976
|
if (t) return {
|
|
3874
3977
|
title: t.title,
|
|
3875
3978
|
image: t.image || void 0
|
|
3876
3979
|
};
|
|
3877
|
-
let n =
|
|
3980
|
+
let n = As(e.uiProfiles).identity;
|
|
3878
3981
|
if (!n?.name) return;
|
|
3879
3982
|
let r = n.logo;
|
|
3880
3983
|
return {
|
|
@@ -3884,22 +3987,22 @@ function Fc(e) {
|
|
|
3884
3987
|
showName: n.showName
|
|
3885
3988
|
};
|
|
3886
3989
|
}
|
|
3887
|
-
function
|
|
3888
|
-
let [o] =
|
|
3889
|
-
return
|
|
3990
|
+
function Gc(e, t, n, r, i, a) {
|
|
3991
|
+
let [o] = Ga([t], Kc(e));
|
|
3992
|
+
return nt(e, o, Uc(e, n, r, i, void 0, a)).element;
|
|
3890
3993
|
}
|
|
3891
|
-
function
|
|
3994
|
+
function Kc(e) {
|
|
3892
3995
|
return [...e.screenTemplates ?? [], ...e.dialogTemplates ?? []];
|
|
3893
3996
|
}
|
|
3894
|
-
function
|
|
3997
|
+
function qc() {
|
|
3895
3998
|
try {
|
|
3896
3999
|
return globalThis.localStorage ?? null;
|
|
3897
4000
|
} catch {
|
|
3898
4001
|
return null;
|
|
3899
4002
|
}
|
|
3900
4003
|
}
|
|
3901
|
-
function
|
|
3902
|
-
let o =
|
|
4004
|
+
function Jc({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: i, routing: a = "hash" } = {}) {
|
|
4005
|
+
let o = U(), [s, c] = m(), [u, d] = m(""), p = f(() => zc(e), [e, s]), h = Vt(), g = Ho();
|
|
3903
4006
|
return l(() => {
|
|
3904
4007
|
let e = new AbortController();
|
|
3905
4008
|
return o.scene(e.signal).then((e) => c(r?.length ? {
|
|
@@ -3908,10 +4011,10 @@ function zc({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
|
|
|
3908
4011
|
} : e)).catch((t) => {
|
|
3909
4012
|
e.signal.aborted || d(t instanceof Error ? t.message : String(t));
|
|
3910
4013
|
}), () => e.abort();
|
|
3911
|
-
}, [o, r]), u ? /* @__PURE__ */
|
|
4014
|
+
}, [o, r]), u ? /* @__PURE__ */ V("main", {
|
|
3912
4015
|
className: "stage-message",
|
|
3913
|
-
children: [/* @__PURE__ */
|
|
3914
|
-
}) : s ? /* @__PURE__ */
|
|
4016
|
+
children: [/* @__PURE__ */ B("h1", { children: "Unable to render this Stage" }), /* @__PURE__ */ B("p", { children: u })]
|
|
4017
|
+
}) : s ? /* @__PURE__ */ B(Yc, {
|
|
3915
4018
|
scene: s,
|
|
3916
4019
|
registry: p,
|
|
3917
4020
|
routing: a,
|
|
@@ -3920,29 +4023,29 @@ function zc({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
|
|
|
3920
4023
|
packageCatalog: t,
|
|
3921
4024
|
screenTemplates: n,
|
|
3922
4025
|
isVisible: i
|
|
3923
|
-
}) : /* @__PURE__ */
|
|
4026
|
+
}) : /* @__PURE__ */ B("main", {
|
|
3924
4027
|
className: "stage-message",
|
|
3925
|
-
children: /* @__PURE__ */
|
|
4028
|
+
children: /* @__PURE__ */ B("h1", { children: "Preparing the Stage" })
|
|
3926
4029
|
});
|
|
3927
4030
|
}
|
|
3928
|
-
function
|
|
3929
|
-
let d = f(() =>
|
|
4031
|
+
function Yc({ scene: e, registry: t, routing: n, routeState: r, strings: a, packageCatalog: o, screenTemplates: c, isVisible: u }) {
|
|
4032
|
+
let d = f(() => Oa(e), [e]), p = f(() => {
|
|
3930
4033
|
if (hn(n), n === "path") {
|
|
3931
4034
|
let e = /^#\/(.+)$/.exec(globalThis.location.hash);
|
|
3932
4035
|
e && globalThis.history.replaceState(null, "", `/${e[1]}`);
|
|
3933
4036
|
}
|
|
3934
|
-
return
|
|
4037
|
+
return Ia(window, n, d);
|
|
3935
4038
|
}, [n, d]);
|
|
3936
4039
|
l(() => () => p.dispose(), [p]);
|
|
3937
|
-
let h =
|
|
4040
|
+
let h = za(p), g = p.history, [_, v] = m(bc), y = fr(), b = e.screens[0]?.name ?? "", x = f(() => As(e.uiProfiles), [e]), S = f(() => b ? Vc(e, c) : void 0, [
|
|
3938
4041
|
e,
|
|
3939
4042
|
c,
|
|
3940
4043
|
b
|
|
3941
|
-
]), C = f(() => S ?
|
|
4044
|
+
]), C = f(() => S ? gc(x, S) : [], [x, S]), w = f(() => S ? dc(x, S, _) : void 0, [
|
|
3942
4045
|
x,
|
|
3943
4046
|
S,
|
|
3944
4047
|
_
|
|
3945
|
-
]), T = f(() =>
|
|
4048
|
+
]), T = f(() => vc(at, w?.accent), [w?.accent]), { showFooter: E, showThemeSwitcher: D } = hc(w), O = U(), k = !!O.actingUser && !!O.selectActingUser, A = f(() => Uc(e, a.locales, a.locale, o, a.dictionary, c, E, D, k), [
|
|
3946
4049
|
e,
|
|
3947
4050
|
a.locales,
|
|
3948
4051
|
a.locale,
|
|
@@ -3950,43 +4053,44 @@ function Bc({ scene: e, registry: t, routing: n, routeState: r, strings: a, pack
|
|
|
3950
4053
|
o,
|
|
3951
4054
|
c,
|
|
3952
4055
|
E,
|
|
3953
|
-
D
|
|
3954
|
-
|
|
4056
|
+
D,
|
|
4057
|
+
k
|
|
4058
|
+
]), ee = s((e) => v(e), []), te = f(() => Ec(e, u, a.dictionary), [
|
|
3955
4059
|
e,
|
|
3956
4060
|
u,
|
|
3957
4061
|
a.dictionary
|
|
3958
|
-
]),
|
|
4062
|
+
]), ne = f(() => ({
|
|
3959
4063
|
...e,
|
|
3960
|
-
screens:
|
|
4064
|
+
screens: Ga(jc(e.screens, [
|
|
3961
4065
|
...e.screenTemplates,
|
|
3962
4066
|
...e.dialogTemplates ?? [],
|
|
3963
|
-
...
|
|
4067
|
+
...st,
|
|
3964
4068
|
...c ?? []
|
|
3965
|
-
]),
|
|
4069
|
+
]), Kc(e))
|
|
3966
4070
|
}), [e, c]);
|
|
3967
|
-
if (!b) return /* @__PURE__ */
|
|
4071
|
+
if (!b) return /* @__PURE__ */ V("main", {
|
|
3968
4072
|
className: "stage-message",
|
|
3969
|
-
children: [/* @__PURE__ */
|
|
4073
|
+
children: [/* @__PURE__ */ B("h1", { children: "Nothing to show yet" }), /* @__PURE__ */ B("p", { children: "This model has no slice carrying a command or a read model, so there is no screen to render." })]
|
|
3970
4074
|
});
|
|
3971
|
-
if (C.length > 0) return /* @__PURE__ */
|
|
4075
|
+
if (C.length > 0) return /* @__PURE__ */ V("main", {
|
|
3972
4076
|
className: "stage-message",
|
|
3973
4077
|
role: "alert",
|
|
3974
4078
|
"data-stage-startup-problem": "root-template",
|
|
3975
4079
|
children: [
|
|
3976
|
-
/* @__PURE__ */
|
|
3977
|
-
/* @__PURE__ */
|
|
3978
|
-
/* @__PURE__ */
|
|
4080
|
+
/* @__PURE__ */ B("h1", { children: "Unable to start this Stage" }),
|
|
4081
|
+
/* @__PURE__ */ B("p", { children: "The ui profile's root template cannot be the application's shell." }),
|
|
4082
|
+
/* @__PURE__ */ B("ul", { children: C.map((e) => /* @__PURE__ */ B("li", { children: e }, e)) })
|
|
3979
4083
|
]
|
|
3980
4084
|
});
|
|
3981
|
-
let
|
|
3982
|
-
application:
|
|
3983
|
-
composition:
|
|
3984
|
-
navigationModel:
|
|
4085
|
+
let j = /* @__PURE__ */ B(Qe, {
|
|
4086
|
+
application: ne,
|
|
4087
|
+
composition: A,
|
|
4088
|
+
navigationModel: te,
|
|
3985
4089
|
registry: t,
|
|
3986
4090
|
initialScreen: b,
|
|
3987
4091
|
history: g,
|
|
3988
|
-
layoutConfigStorage:
|
|
3989
|
-
scope: (t, n) => /* @__PURE__ */
|
|
4092
|
+
layoutConfigStorage: qc(),
|
|
4093
|
+
scope: (t, n) => /* @__PURE__ */ B(Xc, {
|
|
3990
4094
|
scene: e,
|
|
3991
4095
|
notes: y,
|
|
3992
4096
|
routeState: r,
|
|
@@ -3994,36 +4098,36 @@ function Bc({ scene: e, registry: t, routing: n, routeState: r, strings: a, pack
|
|
|
3994
4098
|
navigation: t,
|
|
3995
4099
|
themes: T,
|
|
3996
4100
|
shellSettings: w,
|
|
3997
|
-
onSystemSchemeChange:
|
|
4101
|
+
onSystemSchemeChange: ee,
|
|
3998
4102
|
children: n
|
|
3999
4103
|
}),
|
|
4000
|
-
renderScreen: (e, n) => /* @__PURE__ */
|
|
4104
|
+
renderScreen: (e, n) => /* @__PURE__ */ B($c, {
|
|
4001
4105
|
element: e,
|
|
4002
4106
|
configuration: n,
|
|
4003
4107
|
registry: t
|
|
4004
4108
|
}),
|
|
4005
|
-
renderDialog: () => /* @__PURE__ */
|
|
4006
|
-
renderDialogTemplate: (e, n, r) => /* @__PURE__ */
|
|
4109
|
+
renderDialog: () => /* @__PURE__ */ B(ko, {}),
|
|
4110
|
+
renderDialogTemplate: (e, n, r) => /* @__PURE__ */ B(el, {
|
|
4007
4111
|
template: e,
|
|
4008
4112
|
content: n,
|
|
4009
4113
|
registry: t,
|
|
4010
4114
|
strings: a,
|
|
4011
4115
|
close: () => r.closeDialog()
|
|
4012
4116
|
})
|
|
4013
|
-
}),
|
|
4117
|
+
}), M = /* @__PURE__ */ B(Ba.Provider, {
|
|
4014
4118
|
value: d,
|
|
4015
|
-
children: /* @__PURE__ */
|
|
4119
|
+
children: /* @__PURE__ */ B(we, {
|
|
4016
4120
|
router: h,
|
|
4017
|
-
children:
|
|
4121
|
+
children: j
|
|
4018
4122
|
})
|
|
4019
4123
|
});
|
|
4020
|
-
return y.enabled ? /* @__PURE__ */
|
|
4124
|
+
return y.enabled ? /* @__PURE__ */ B(i, {
|
|
4021
4125
|
enabled: !0,
|
|
4022
4126
|
knownSlices: hr(e.structure),
|
|
4023
|
-
children:
|
|
4024
|
-
}) :
|
|
4127
|
+
children: M
|
|
4128
|
+
}) : M;
|
|
4025
4129
|
}
|
|
4026
|
-
function
|
|
4130
|
+
function Xc({ scene: e, notes: t, routeState: n, strings: r, navigation: i, themes: a, shellSettings: o, onSystemSchemeChange: s, children: c }) {
|
|
4027
4131
|
let [u, d] = m(""), { navigate: f } = i;
|
|
4028
4132
|
return l(() => d(""), [i.currentScreen, i.currentDialog]), l(() => {
|
|
4029
4133
|
let e = (e) => {
|
|
@@ -4040,39 +4144,39 @@ function Vc({ scene: e, notes: t, routeState: n, strings: r, navigation: i, them
|
|
|
4040
4144
|
r && (r.dialog === void 0 ? r.screen !== void 0 && !e.screens.some((e) => e.name === r.screen) ? d(`The modeled screen “${r.screen}” is not available.`) : f(r) : e.dialogTemplates?.some((e) => e.name === r.dialog) ? f(r) : d(`The modeled dialog “${r.dialog}” is not available in this Stage runtime.`));
|
|
4041
4145
|
};
|
|
4042
4146
|
return globalThis.addEventListener("cratis.scene.navigate", t), () => globalThis.removeEventListener("cratis.scene.navigate", t);
|
|
4043
|
-
}, [f, e]), /* @__PURE__ */
|
|
4044
|
-
registry:
|
|
4045
|
-
children: /* @__PURE__ */
|
|
4147
|
+
}, [f, e]), /* @__PURE__ */ B(ve, {
|
|
4148
|
+
registry: Rc,
|
|
4149
|
+
children: /* @__PURE__ */ V(et, {
|
|
4046
4150
|
themes: a,
|
|
4047
4151
|
children: [
|
|
4048
|
-
o && /* @__PURE__ */
|
|
4152
|
+
o && /* @__PURE__ */ B(xc, {
|
|
4049
4153
|
settings: o,
|
|
4050
4154
|
onSystemSchemeChange: s
|
|
4051
4155
|
}),
|
|
4052
|
-
/* @__PURE__ */
|
|
4053
|
-
/* @__PURE__ */
|
|
4156
|
+
/* @__PURE__ */ B(ic, {}),
|
|
4157
|
+
/* @__PURE__ */ B(Qc, {
|
|
4054
4158
|
scene: e,
|
|
4055
4159
|
screen: i.primaryScreen,
|
|
4056
4160
|
notes: t
|
|
4057
4161
|
}),
|
|
4058
|
-
/* @__PURE__ */
|
|
4162
|
+
/* @__PURE__ */ B(zn, {
|
|
4059
4163
|
routes: n.routes,
|
|
4060
4164
|
routesReady: n.ready,
|
|
4061
4165
|
parameters: i.currentParameters,
|
|
4062
4166
|
locale: r.locale,
|
|
4063
4167
|
locales: r.locales,
|
|
4064
4168
|
screen: i.primaryScreen ?? e.screens[0]?.name ?? "",
|
|
4065
|
-
children: /* @__PURE__ */
|
|
4169
|
+
children: /* @__PURE__ */ B(Zc, {
|
|
4066
4170
|
activity: u,
|
|
4067
4171
|
notesEnabled: t.enabled,
|
|
4068
4172
|
routesReady: n.ready,
|
|
4069
4173
|
scene: e,
|
|
4070
4174
|
setActivity: d,
|
|
4071
4175
|
strings: r,
|
|
4072
|
-
children: /* @__PURE__ */
|
|
4176
|
+
children: /* @__PURE__ */ B(br, {
|
|
4073
4177
|
structure: e.structure,
|
|
4074
4178
|
screens: e.screens,
|
|
4075
|
-
children: /* @__PURE__ */
|
|
4179
|
+
children: /* @__PURE__ */ B(Fc, {
|
|
4076
4180
|
source: e,
|
|
4077
4181
|
screen: i.primaryScreen,
|
|
4078
4182
|
children: c
|
|
@@ -4084,12 +4188,12 @@ function Vc({ scene: e, notes: t, routeState: n, strings: r, navigation: i, them
|
|
|
4084
4188
|
})
|
|
4085
4189
|
});
|
|
4086
4190
|
}
|
|
4087
|
-
function
|
|
4088
|
-
let s = W(), c =
|
|
4191
|
+
function Zc({ activity: e, notesEnabled: t, routesReady: n, scene: r, setActivity: i, strings: a, children: o }) {
|
|
4192
|
+
let s = W(), c = Ue(), l = dn(), u = f(() => Ac(l, n, s.refreshAfterCommand), [
|
|
4089
4193
|
l,
|
|
4090
4194
|
n,
|
|
4091
4195
|
s.refreshAfterCommand
|
|
4092
|
-
]), d = f(() =>
|
|
4196
|
+
]), d = f(() => Oc(r.commandSchemas), [r.commandSchemas]), p = Ne({
|
|
4093
4197
|
executeCommand: async (e, t) => {
|
|
4094
4198
|
let r = on(e);
|
|
4095
4199
|
if (!r && !n) return i(`The modeled command “${e}” is waiting for Stage routes.`), {
|
|
@@ -4125,7 +4229,7 @@ function Hc({ activity: e, notesEnabled: t, routesReady: n, scene: r, setActivit
|
|
|
4125
4229
|
refreshQuery: async (e) => s.refreshQuery(e),
|
|
4126
4230
|
raise: async (e) => i(`The modeled trigger “${e}” is not available in this Stage runtime.`)
|
|
4127
4231
|
});
|
|
4128
|
-
return /* @__PURE__ */
|
|
4232
|
+
return /* @__PURE__ */ B(Ys, {
|
|
4129
4233
|
state: {
|
|
4130
4234
|
locales: a.locales,
|
|
4131
4235
|
locale: a.locale,
|
|
@@ -4133,16 +4237,16 @@ function Hc({ activity: e, notesEnabled: t, routesReady: n, scene: r, setActivit
|
|
|
4133
4237
|
activity: e,
|
|
4134
4238
|
notesEnabled: t
|
|
4135
4239
|
},
|
|
4136
|
-
children: /* @__PURE__ */
|
|
4240
|
+
children: /* @__PURE__ */ B(Oe, {
|
|
4137
4241
|
invoker: u,
|
|
4138
|
-
children: /* @__PURE__ */
|
|
4242
|
+
children: /* @__PURE__ */ B(Ee, {
|
|
4139
4243
|
fieldsFor: d,
|
|
4140
|
-
children: /* @__PURE__ */
|
|
4244
|
+
children: /* @__PURE__ */ B(ye, {
|
|
4141
4245
|
dispatcher: p,
|
|
4142
4246
|
context: {
|
|
4143
4247
|
resolve: s.resolveBinding,
|
|
4144
4248
|
localize: (e) => a.dictionary[e] ?? e,
|
|
4145
|
-
responseContracts:
|
|
4249
|
+
responseContracts: oc(r.responseContracts)
|
|
4146
4250
|
},
|
|
4147
4251
|
attachments: [],
|
|
4148
4252
|
onFindings: (e) => i(e.map((e) => e.detail).join(" ")),
|
|
@@ -4152,20 +4256,20 @@ function Hc({ activity: e, notesEnabled: t, routesReady: n, scene: r, setActivit
|
|
|
4152
4256
|
})
|
|
4153
4257
|
});
|
|
4154
4258
|
}
|
|
4155
|
-
function
|
|
4259
|
+
function Qc({ scene: e, screen: t, notes: r }) {
|
|
4156
4260
|
return n({
|
|
4157
4261
|
screen: vr(e.screens.find((e) => e.name === t)),
|
|
4158
4262
|
values: { modelReferences: r.modelReferences }
|
|
4159
4263
|
}), null;
|
|
4160
4264
|
}
|
|
4161
|
-
function
|
|
4162
|
-
let r = W(), i = tr(), a =
|
|
4163
|
-
return /* @__PURE__ */
|
|
4265
|
+
function $c({ element: e, configuration: t, registry: n }) {
|
|
4266
|
+
let r = W(), i = tr(), a = Ve();
|
|
4267
|
+
return /* @__PURE__ */ B(xr, {
|
|
4164
4268
|
screen: a?.primaryScreen,
|
|
4165
|
-
children: /* @__PURE__ */
|
|
4269
|
+
children: /* @__PURE__ */ V(pi, {
|
|
4166
4270
|
element: e,
|
|
4167
4271
|
outputScope: i.scope,
|
|
4168
|
-
children: [/* @__PURE__ */
|
|
4272
|
+
children: [/* @__PURE__ */ B(Qo, { element: e }), /* @__PURE__ */ B(xe, {
|
|
4169
4273
|
element: e,
|
|
4170
4274
|
registry: n,
|
|
4171
4275
|
resolveBinding: r.resolveBinding,
|
|
@@ -4176,27 +4280,27 @@ function Wc({ element: e, configuration: t, registry: n }) {
|
|
|
4176
4280
|
})
|
|
4177
4281
|
});
|
|
4178
4282
|
}
|
|
4179
|
-
function
|
|
4180
|
-
let a = W(), o = tr(), s =
|
|
4283
|
+
function el({ template: e, content: t, registry: n, strings: r, close: i }) {
|
|
4284
|
+
let a = W(), o = tr(), s = ce(t, r.dictionary);
|
|
4181
4285
|
return l(() => {
|
|
4182
4286
|
let e = (e) => {
|
|
4183
4287
|
e.key === "Escape" && i();
|
|
4184
4288
|
};
|
|
4185
4289
|
return globalThis.addEventListener("keydown", e), () => globalThis.removeEventListener("keydown", e);
|
|
4186
|
-
}, [i]), /* @__PURE__ */
|
|
4290
|
+
}, [i]), /* @__PURE__ */ B("div", {
|
|
4187
4291
|
className: "stage-dialog-backdrop",
|
|
4188
|
-
children: /* @__PURE__ */
|
|
4292
|
+
children: /* @__PURE__ */ V("section", {
|
|
4189
4293
|
role: "dialog",
|
|
4190
4294
|
"aria-modal": "true",
|
|
4191
4295
|
"aria-label": e.displayName ?? e.name,
|
|
4192
4296
|
className: "stage-dialog",
|
|
4193
|
-
children: [/* @__PURE__ */
|
|
4297
|
+
children: [/* @__PURE__ */ B("button", {
|
|
4194
4298
|
type: "button",
|
|
4195
4299
|
onClick: i,
|
|
4196
4300
|
children: "Close"
|
|
4197
|
-
}), /* @__PURE__ */
|
|
4301
|
+
}), /* @__PURE__ */ B(pi, {
|
|
4198
4302
|
element: s,
|
|
4199
|
-
children: /* @__PURE__ */
|
|
4303
|
+
children: /* @__PURE__ */ B(xe, {
|
|
4200
4304
|
element: s,
|
|
4201
4305
|
registry: n,
|
|
4202
4306
|
resolveBinding: a.resolveBinding,
|
|
@@ -4207,4 +4311,4 @@ function Gc({ template: e, content: t, registry: n, strings: r, close: i }) {
|
|
|
4207
4311
|
})
|
|
4208
4312
|
});
|
|
4209
4313
|
}
|
|
4210
|
-
export {
|
|
4314
|
+
export { Jc as App, Jc as StageApplication, Oi as StageCommandForm, zn as StageDataProvider, On as StageGuardedAction, Bt as StageSourceProvider, Gc as composeStageScreen, Ac as createStageSliceInvoker, Wn as dataChanged, ln as executeRegisteredCommand, sr as fetchModelReferences, Kt as hostedBasePath, Os as listsPrimeReact, cr as modelReferenceFor, lr as modelReferenceMap, $t as performQuery, Ws as readSandboxActingUser, dr as readStageNotes, Yt as registerQueryRouteResolver, ks as registerStageLibrary, on as registeredCommand, Xt as registeredQuery, Oc as sliceFieldsFrom, zc as stageApplicationRegistry, Uc as stageComposition, e as stageDarkSelector, Rt as stageEndpoints, Vc as stageShellOf, Lt as staticStageSource, en as subscribeQuery, dn as useStageCommandExecutor, W as useStageData, G as useStageQuery, U as useStageSource, Gs as writeSandboxActingUser };
|