@cratis/stage.runtime 4.203.0 → 4.204.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/externalRouteHref.d.ts +2 -0
- package/dist/src/index.js +619 -583
- package/dist/src/navigationTree.d.ts +8 -0
- package/dist/src/primereact.js +2 -3
- package/dist/src/stageScreenTables.d.ts +27 -0
- package/dist/{stageDarkSelector-DjqhPYDU.js → stageDarkSelector-DAwb43-P.js} +1 -2
- package/dist/styledPrimeReact.js +1 -2
- package/package.json +2 -2
- package/dist/src/standaloneScreenTemplates.d.ts +0 -15
package/dist/src/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./app.css";
|
|
2
|
-
import { t as e } from "../stageDarkSelector-
|
|
2
|
+
import { t as e } from "../stageDarkSelector-DAwb43-P.js";
|
|
3
3
|
import { createContext as t, createElement as n, useCallback as r, useContext as i, useEffect as a, useId as o, useMemo as s, useRef as c, useState as l } from "react";
|
|
4
4
|
import { ColorScheme as u, DestinationKind as d, FormGenerationMode as f, FormWidthUnit as p, InteractionTriggerKind as m, LogoKind as h, PackageKind as g, componentIconLibrary as _ } from "@cratis/scene.model";
|
|
5
5
|
import { ShellDiagnosticCode as v, ShellOrigin as y, createBindingResolver as b, hostProfilePackages as x, resolveArgumentSource as S, resolveBehaviors as C, resolveStringsInElement as w, resolveStringsValue as ee, runBindings as te, validateBindingExpression as ne } from "@cratis/scene.engine";
|
|
6
|
-
import { CoreSliceDialog as T, CoreToolbarItem as E, IconAdapterProvider as re, InteractionScope as D, SceneElementView as
|
|
7
|
-
import { ApplicationHost as
|
|
6
|
+
import { CoreSliceDialog as T, CoreToolbarItem as E, IconAdapterProvider as re, InteractionScope as D, SceneElementView as O, SceneNavigationContextInternal as k, SliceCommandFieldsProvider as ie, SliceDialogView as ae, SliceInvokerProvider as oe, attachmentFor as se, coreComponents as ce, createBrowserDispatcher as A, createBrowserSceneHistory as le, createHashSceneHistory as ue, createIconAdapterRegistry as j, sliceDialogParameters as de, useInteractionScope as fe, useOptionalSceneNavigation as pe, useSceneNavigation as me, useSceneOutlets as he, useSceneTheme as ge } from "@cratis/scene.react";
|
|
7
|
+
import { ApplicationHost as _e, ColorScheme as ve, ComponentName as M, LayoutThemeProvider as ye, SlotName as N, blueprintPackageCatalog as be, composeApplicationScreen as xe, defaultBlueprintComponents as Se, defaultBlueprintName as Ce, defaultBlueprintThemes as we, effectiveShellOf as Te, externalComponent as P, galleryScreenTemplates as F, layoutModes as Ee, menuThemes as De, navigationElement as Oe, previewComponents as ke, previewProfile as Ae, useLayoutConfig as je } from "@cratis/scene.blueprint.default";
|
|
8
8
|
import "@cratis/components/tokens";
|
|
9
9
|
import "@cratis/components/CommandForm/styles";
|
|
10
10
|
import "@cratis/components/Dropdown/styles";
|
|
@@ -25,7 +25,7 @@ import { CommandForm as Ge, asCommandFormField as Ke, withCommandFormFieldBindin
|
|
|
25
25
|
import { CalendarField as Je, CheckboxField as Ye, DropdownField as Xe, InputTextField as Ze, NumberField as Qe } from "@cratis/components/CommandForm";
|
|
26
26
|
import { cratisComponents as $e, cratisComponentsPackageManifest as et } from "@cratis/scene.components/runtime";
|
|
27
27
|
import { dynamicIconImports as tt } from "lucide-react/dynamic";
|
|
28
|
-
|
|
28
|
+
// src/stageSource.ts
|
|
29
29
|
function nt(e) {
|
|
30
30
|
return {
|
|
31
31
|
scene: async () => e.scene,
|
|
@@ -69,8 +69,7 @@ function st() {
|
|
|
69
69
|
}), () => t.abort();
|
|
70
70
|
}, [e]), t;
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
//#region src/applyQueryChangeSet.ts
|
|
72
|
+
// src/applyQueryChangeSet.ts
|
|
74
73
|
function ct(e) {
|
|
75
74
|
return typeof e == "object" && e && "id" in e ? e.id : void 0;
|
|
76
75
|
}
|
|
@@ -87,8 +86,7 @@ function dt(e, t) {
|
|
|
87
86
|
let n = new Set(t.removed.map((e) => JSON.stringify(e)));
|
|
88
87
|
return [...e.filter((e) => !n.has(JSON.stringify(e))), ...t.added];
|
|
89
88
|
}
|
|
90
|
-
|
|
91
|
-
//#region src/hostedBasePath.ts
|
|
89
|
+
// src/hostedBasePath.ts
|
|
92
90
|
function ft() {
|
|
93
91
|
let e = globalThis.document?.baseURI ?? globalThis.location?.href;
|
|
94
92
|
if (!e) return "";
|
|
@@ -101,8 +99,7 @@ function ft() {
|
|
|
101
99
|
function pt(e) {
|
|
102
100
|
return e || ft();
|
|
103
101
|
}
|
|
104
|
-
|
|
105
|
-
//#region src/queryExecutor.ts
|
|
102
|
+
// src/queryExecutor.ts
|
|
106
103
|
var mt;
|
|
107
104
|
function ht(e) {
|
|
108
105
|
mt = e;
|
|
@@ -199,8 +196,7 @@ function jt(e, t) {
|
|
|
199
196
|
function Mt(e, t) {
|
|
200
197
|
if (e.startsWith(Ct) && z(t)) return wt(t, e.slice(5));
|
|
201
198
|
}
|
|
202
|
-
|
|
203
|
-
//#region src/stageSession.ts
|
|
199
|
+
// src/stageSession.ts
|
|
204
200
|
var Nt = "stage.session.";
|
|
205
201
|
function Pt(e) {
|
|
206
202
|
try {
|
|
@@ -231,8 +227,7 @@ function It() {
|
|
|
231
227
|
} catch {}
|
|
232
228
|
return e;
|
|
233
229
|
}
|
|
234
|
-
|
|
235
|
-
//#region src/stageData.tsx
|
|
230
|
+
// src/stageData.tsx
|
|
236
231
|
var Lt = "cratis.stage.data-changed", Rt = t({
|
|
237
232
|
locale: "",
|
|
238
233
|
locales: [],
|
|
@@ -263,7 +258,7 @@ var Lt = "cratis.stage.data-changed", Rt = t({
|
|
|
263
258
|
3e3
|
|
264
259
|
], Bt = {};
|
|
265
260
|
function Vt({ routes: e, routesReady: t = !0, parameters: n = Bt, locale: i, locales: o, screen: u, children: d }) {
|
|
266
|
-
let [f, p] = l({}), [m, h] = l(0), [g, _] = l({}), [v, y] = l(), [x, C] = l({}), [w, ee] = l({}), [te, T] = l({}), [E, re] = l({ version: 0 }), D = s(() => qt(te), [te]),
|
|
261
|
+
let [f, p] = l({}), [m, h] = l(0), [g, _] = l({}), [v, y] = l(), [x, C] = l({}), [w, ee] = l({}), [te, T] = l({}), [E, re] = l({ version: 0 }), D = s(() => qt(te), [te]), O = r((e, t) => {
|
|
267
262
|
p((n) => {
|
|
268
263
|
if (!t) {
|
|
269
264
|
let { [e]: t, ...r } = n;
|
|
@@ -274,27 +269,27 @@ function Vt({ routes: e, routesReady: t = !0, parameters: n = Bt, locale: i, loc
|
|
|
274
269
|
[e]: t
|
|
275
270
|
};
|
|
276
271
|
});
|
|
277
|
-
}, []),
|
|
272
|
+
}, []), k = n, ie = s(() => It(), [m]), ae = s(() => ({
|
|
278
273
|
name: u,
|
|
279
274
|
keys: {
|
|
280
|
-
...
|
|
275
|
+
...ie,
|
|
281
276
|
...n
|
|
282
277
|
}
|
|
283
278
|
}), [
|
|
284
279
|
n,
|
|
285
280
|
u,
|
|
286
|
-
|
|
287
|
-
]),
|
|
281
|
+
ie
|
|
282
|
+
]), oe = r((e, t) => {
|
|
288
283
|
_((n) => ({
|
|
289
284
|
...n,
|
|
290
285
|
[e]: t
|
|
291
286
|
})), y(t ? e : (t) => t === e ? void 0 : t);
|
|
292
|
-
}, []),
|
|
287
|
+
}, []), se = r((e) => {
|
|
293
288
|
_((t) => ({
|
|
294
289
|
...t,
|
|
295
290
|
[e]: void 0
|
|
296
291
|
})), y((t) => t === e ? void 0 : t);
|
|
297
|
-
}, []),
|
|
292
|
+
}, []), ce = r((e, t, n) => {
|
|
298
293
|
ee((r) => {
|
|
299
294
|
let i = U(r[e]) ? r[e] : {};
|
|
300
295
|
return {
|
|
@@ -302,28 +297,28 @@ function Vt({ routes: e, routesReady: t = !0, parameters: n = Bt, locale: i, loc
|
|
|
302
297
|
[e]: Kt(i, t.split(".").filter(Boolean), n)
|
|
303
298
|
};
|
|
304
299
|
});
|
|
305
|
-
}, []),
|
|
300
|
+
}, []), A = r((e) => re((t) => ({
|
|
306
301
|
query: e,
|
|
307
302
|
version: t.version + 1
|
|
308
|
-
})), []),
|
|
309
|
-
h((e) => e + 1),
|
|
310
|
-
for (let e of zt)
|
|
311
|
-
}, [
|
|
312
|
-
a(() => () =>
|
|
313
|
-
let e = () =>
|
|
303
|
+
})), []), le = c([]), ue = r(() => {
|
|
304
|
+
h((e) => e + 1), A();
|
|
305
|
+
for (let e of zt) le.current.push(setTimeout(() => A(), e));
|
|
306
|
+
}, [A]);
|
|
307
|
+
a(() => () => le.current.forEach(clearTimeout), []), a(() => {
|
|
308
|
+
let e = () => A(), t = (e) => A(e.detail?.query);
|
|
314
309
|
return globalThis.addEventListener(Lt, e), globalThis.addEventListener("cratis.scene.refresh", t), () => {
|
|
315
310
|
globalThis.removeEventListener(Lt, e), globalThis.removeEventListener("cratis.scene.refresh", t);
|
|
316
311
|
};
|
|
317
|
-
}, [
|
|
318
|
-
let
|
|
312
|
+
}, [A]);
|
|
313
|
+
let j = v ? g[v] : void 0, de = r((e) => {
|
|
319
314
|
if (e === void 0 || typeof e != "string" && e.path === "$guard") return;
|
|
320
|
-
if (typeof e == "string") return Jt(e,
|
|
321
|
-
let t = Ut(
|
|
315
|
+
if (typeof e == "string") return Jt(e, j, g, f, x, k, ae, i, o);
|
|
316
|
+
let t = Ut(j, f, x, {
|
|
322
317
|
...D,
|
|
323
318
|
...w
|
|
324
319
|
}, g);
|
|
325
320
|
if (!e.kind && e.path.startsWith("component.")) return S(e.path, t);
|
|
326
|
-
if (!e.kind) return Jt(e.path,
|
|
321
|
+
if (!e.kind) return Jt(e.path, j, g, f, x, k, ae, i, o);
|
|
327
322
|
let n = ne(e, t);
|
|
328
323
|
return n.length > 0 && console.warn(`Scene binding could not be resolved: ${n.map((e) => `${e.code}:${e.message}`).join("; ")}`), b(t)(e);
|
|
329
324
|
}, [
|
|
@@ -331,13 +326,13 @@ function Vt({ routes: e, routesReady: t = !0, parameters: n = Bt, locale: i, loc
|
|
|
331
326
|
i,
|
|
332
327
|
o,
|
|
333
328
|
x,
|
|
334
|
-
|
|
329
|
+
k,
|
|
335
330
|
D,
|
|
336
331
|
f,
|
|
337
|
-
|
|
338
|
-
|
|
332
|
+
ae,
|
|
333
|
+
j,
|
|
339
334
|
g
|
|
340
|
-
]),
|
|
335
|
+
]), fe = r((e) => e ? S(e, Ut(j, f, x, {
|
|
341
336
|
...D,
|
|
342
337
|
...w
|
|
343
338
|
}, g)) : void 0, [
|
|
@@ -345,67 +340,67 @@ function Vt({ routes: e, routesReady: t = !0, parameters: n = Bt, locale: i, loc
|
|
|
345
340
|
x,
|
|
346
341
|
D,
|
|
347
342
|
f,
|
|
348
|
-
|
|
343
|
+
j,
|
|
349
344
|
g
|
|
350
|
-
]),
|
|
345
|
+
]), pe = r((e, t) => T((n) => ({
|
|
351
346
|
...n,
|
|
352
347
|
[e]: t
|
|
353
|
-
})), []),
|
|
348
|
+
})), []), me = r((e) => T((t) => {
|
|
354
349
|
if (!Object.prototype.hasOwnProperty.call(t, e)) return t;
|
|
355
350
|
let n = { ...t };
|
|
356
351
|
return delete n[e], n;
|
|
357
|
-
}), []),
|
|
352
|
+
}), []), he = s(() => Ut(void 0, f, {}, {}, {}).queryResults, [f]), ge = s(() => ({
|
|
358
353
|
locale: i,
|
|
359
354
|
locales: o,
|
|
360
355
|
screen: u,
|
|
361
356
|
routes: e,
|
|
362
357
|
routesReady: t,
|
|
363
|
-
parameters:
|
|
364
|
-
session:
|
|
358
|
+
parameters: k,
|
|
359
|
+
session: ie,
|
|
365
360
|
queries: f,
|
|
366
|
-
selected:
|
|
361
|
+
selected: j,
|
|
367
362
|
selections: g,
|
|
368
|
-
selectRow:
|
|
369
|
-
clearSelection:
|
|
363
|
+
selectRow: oe,
|
|
364
|
+
clearSelection: se,
|
|
370
365
|
setState: (e, t) => C((n) => Kt(n, e.split(".").filter(Boolean), t)),
|
|
371
|
-
setComponentOutput:
|
|
372
|
-
publishComponentOutputs:
|
|
373
|
-
withdrawComponentOutputs:
|
|
374
|
-
queryResults:
|
|
375
|
-
refreshQuery:
|
|
376
|
-
refreshAfterCommand:
|
|
377
|
-
resolveBinding:
|
|
378
|
-
resolveArgument:
|
|
379
|
-
registerQueryResult:
|
|
366
|
+
setComponentOutput: ce,
|
|
367
|
+
publishComponentOutputs: pe,
|
|
368
|
+
withdrawComponentOutputs: me,
|
|
369
|
+
queryResults: he,
|
|
370
|
+
refreshQuery: A,
|
|
371
|
+
refreshAfterCommand: ue,
|
|
372
|
+
resolveBinding: de,
|
|
373
|
+
resolveArgument: fe,
|
|
374
|
+
registerQueryResult: O,
|
|
380
375
|
refreshVersion: E.version,
|
|
381
376
|
refreshQueryName: E.query
|
|
382
377
|
}), [
|
|
383
|
-
|
|
378
|
+
se,
|
|
384
379
|
i,
|
|
385
380
|
o,
|
|
386
381
|
f,
|
|
387
|
-
|
|
388
|
-
|
|
382
|
+
ue,
|
|
383
|
+
A,
|
|
389
384
|
E.query,
|
|
390
385
|
E.version,
|
|
391
|
-
|
|
386
|
+
O,
|
|
387
|
+
pe,
|
|
392
388
|
me,
|
|
393
389
|
he,
|
|
394
|
-
ge,
|
|
395
|
-
pe,
|
|
396
390
|
fe,
|
|
391
|
+
de,
|
|
397
392
|
e,
|
|
398
393
|
t,
|
|
399
|
-
|
|
400
|
-
|
|
394
|
+
k,
|
|
395
|
+
ie,
|
|
401
396
|
u,
|
|
402
|
-
|
|
403
|
-
|
|
397
|
+
oe,
|
|
398
|
+
j,
|
|
404
399
|
g,
|
|
405
|
-
|
|
400
|
+
ce
|
|
406
401
|
]);
|
|
407
402
|
return /* @__PURE__ */ I(Rt.Provider, {
|
|
408
|
-
value:
|
|
403
|
+
value: ge,
|
|
409
404
|
children: d
|
|
410
405
|
});
|
|
411
406
|
}
|
|
@@ -428,11 +423,7 @@ function V(e) {
|
|
|
428
423
|
}, o = [], c = (e) => {
|
|
429
424
|
if (b.current !== t || n.signal.aborted) return;
|
|
430
425
|
let r = Zt(e);
|
|
431
|
-
|
|
432
|
-
a(Error(r));
|
|
433
|
-
return;
|
|
434
|
-
}
|
|
435
|
-
e.isReady !== !1 && (o = e.changeSet && Array.isArray(e.data) && e.data.length === 0 && Array.isArray(o) ? dt(o, e.changeSet) : e.data, p(Qt(o)), h(""), _(!1));
|
|
426
|
+
r ? a(Error(r)) : e.isReady !== !1 && (o = e.changeSet && Array.isArray(e.data) && e.data.length === 0 && Array.isArray(o) ? dt(o, e.changeSet) : e.data, p(Qt(o)), h(""), _(!1));
|
|
436
427
|
};
|
|
437
428
|
if (!i) return a(/* @__PURE__ */ Error(`The modeled query “${e.name}” is not registered by this Stage.`)), () => n.abort();
|
|
438
429
|
let l = i.prototype instanceof Ne, u = () => Promise.resolve().then(() => yt(i, l ? {
|
|
@@ -471,11 +462,7 @@ function V(e) {
|
|
|
471
462
|
e.name,
|
|
472
463
|
e.scope
|
|
473
464
|
]), a(() => {
|
|
474
|
-
|
|
475
|
-
d(e.scope, void 0);
|
|
476
|
-
return;
|
|
477
|
-
}
|
|
478
|
-
d(e.scope, {
|
|
465
|
+
C ? d(e.scope, {
|
|
479
466
|
name: e.name,
|
|
480
467
|
list: e.list,
|
|
481
468
|
alias: e.alias,
|
|
@@ -484,7 +471,7 @@ function V(e) {
|
|
|
484
471
|
loading: g,
|
|
485
472
|
error: m,
|
|
486
473
|
arguments: JSON.parse(w)
|
|
487
|
-
});
|
|
474
|
+
}) : d(e.scope, void 0);
|
|
488
475
|
}, [
|
|
489
476
|
C,
|
|
490
477
|
w,
|
|
@@ -599,14 +586,12 @@ function H(e, t) {
|
|
|
599
586
|
function U(e) {
|
|
600
587
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
601
588
|
}
|
|
602
|
-
|
|
603
|
-
//#region src/stageComponentOutputs.ts
|
|
589
|
+
// src/stageComponentOutputs.ts
|
|
604
590
|
function $t() {
|
|
605
591
|
let e = o(), { publishComponentOutputs: t, withdrawComponentOutputs: n } = B();
|
|
606
592
|
return a(() => () => n(e), [e, n]), r((n) => t(e, n), [t, e]);
|
|
607
593
|
}
|
|
608
|
-
|
|
609
|
-
//#region src/commandExecutor.ts
|
|
594
|
+
// src/commandExecutor.ts
|
|
610
595
|
function W(e, t, n) {
|
|
611
596
|
for (let r of [
|
|
612
597
|
t,
|
|
@@ -656,8 +641,7 @@ function an() {
|
|
|
656
641
|
let e = i(Me);
|
|
657
642
|
return r((t, n) => nn(t, n, e), [e]);
|
|
658
643
|
}
|
|
659
|
-
|
|
660
|
-
//#region src/stageNavigation.ts
|
|
644
|
+
// src/stageNavigation.ts
|
|
661
645
|
function on(e, t = {}) {
|
|
662
646
|
let n = new URLSearchParams(Object.entries(t).filter(([, e]) => e !== "")).toString();
|
|
663
647
|
return n ? `#/${encodeURIComponent(e)}?${n}` : `#/${encodeURIComponent(e)}`;
|
|
@@ -684,8 +668,7 @@ function ln(e, t = {}) {
|
|
|
684
668
|
function un(e) {
|
|
685
669
|
return Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e != null && e !== "" && (typeof e != "object" || e instanceof Ue)).map(([e, t]) => [e, String(t)]));
|
|
686
670
|
}
|
|
687
|
-
|
|
688
|
-
//#region src/stageFormSchema.ts
|
|
671
|
+
// src/stageFormSchema.ts
|
|
689
672
|
var dn = 8;
|
|
690
673
|
function K(e) {
|
|
691
674
|
if (!e) return [];
|
|
@@ -779,8 +762,7 @@ function yn(e, t) {
|
|
|
779
762
|
function bn(e) {
|
|
780
763
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
781
764
|
}
|
|
782
|
-
|
|
783
|
-
//#region src/StageValueFields.tsx
|
|
765
|
+
// src/StageValueFields.tsx
|
|
784
766
|
var xn = Ke((e) => /* @__PURE__ */ I(Sn, {
|
|
785
767
|
descriptor: e.descriptor,
|
|
786
768
|
label: e.title ?? q(e.descriptor.name),
|
|
@@ -936,31 +918,69 @@ function Dn(e, t) {
|
|
|
936
918
|
function On(e) {
|
|
937
919
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
938
920
|
}
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
921
|
+
// src/stageScreenTables.tsx
|
|
922
|
+
function kn(e) {
|
|
923
|
+
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
924
|
+
let r = e;
|
|
925
|
+
if (r.componentName !== "core:outlet") {
|
|
926
|
+
r.componentName === "core:table" && t.add(r.id);
|
|
927
|
+
for (let e of Object.values(r.slots ?? {})) e.forEach(n);
|
|
928
|
+
}
|
|
929
|
+
};
|
|
930
|
+
return n(e), [...t];
|
|
931
|
+
}
|
|
932
|
+
var An = t(void 0);
|
|
933
|
+
function jn({ element: e, children: t }) {
|
|
934
|
+
let n = s(() => new Set(kn(e)), [e]);
|
|
935
|
+
return /* @__PURE__ */ I(An.Provider, {
|
|
936
|
+
value: n,
|
|
937
|
+
children: t
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
function Mn({ children: e }) {
|
|
941
|
+
return /* @__PURE__ */ I(An.Provider, {
|
|
942
|
+
value: void 0,
|
|
943
|
+
children: e
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
function Nn() {
|
|
947
|
+
let e = i(An), { queries: t, selections: n } = B();
|
|
948
|
+
return s(() => {
|
|
949
|
+
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;
|
|
950
|
+
return {
|
|
951
|
+
selectableRows: Qn(r),
|
|
952
|
+
selectedRows: $n(i, r)
|
|
953
|
+
};
|
|
954
|
+
}, [
|
|
955
|
+
t,
|
|
956
|
+
n,
|
|
957
|
+
e
|
|
958
|
+
]);
|
|
959
|
+
}
|
|
960
|
+
// src/StageCommandForm.tsx
|
|
961
|
+
var Pn = t(void 0), Fn = t(null);
|
|
962
|
+
function In({ element: e }) {
|
|
963
|
+
let t = B(), n = i(Me), r = i(Pn), a = i(Fn), o = c(null), u = s(() => Rn(e), [e]), d = s(() => gr(e), [e]), f = typeof e.properties.schema == "string", p = s(() => u ? zn(u, d) : [], [u, d]), m = u ? W(u.command, Y(e, "typeName"), Y(e, "route")) : void 0, h = Y(e, "submitLabel") || "Submit", g = ir(e, p, t.resolveArgument), _ = nr(e, d, t), v = JSON.stringify(_ ?? null), y = s(() => _, [v]), { selectableRows: b, selectedRows: x } = Nn(), S = e.properties.rowAction === !0, C = s(() => ({
|
|
944
964
|
...y,
|
|
945
|
-
...
|
|
946
|
-
...
|
|
965
|
+
...Gn(p, d, t.parameters, x, b, S),
|
|
966
|
+
...Wn(p, t.parameters)
|
|
947
967
|
}), [
|
|
948
968
|
y,
|
|
949
969
|
p,
|
|
950
970
|
d,
|
|
951
971
|
t.parameters,
|
|
952
|
-
b,
|
|
953
972
|
x,
|
|
973
|
+
b,
|
|
954
974
|
S
|
|
955
|
-
]), w = s(() => u ?
|
|
975
|
+
]), w = s(() => u ? Bn(u, p, d) : void 0, [
|
|
956
976
|
u,
|
|
957
977
|
p,
|
|
958
978
|
d
|
|
959
|
-
]), ee = s(() => u ?
|
|
979
|
+
]), ee = s(() => u ? mr(p, d) : [], [
|
|
960
980
|
u,
|
|
961
981
|
p,
|
|
962
982
|
d
|
|
963
|
-
]), te = s(() => u ?
|
|
983
|
+
]), te = s(() => u ? hr(u.layout, p) : [], [u, p]), [ne, T] = l([]);
|
|
964
984
|
return u ? !m && !t.routesReady ? /* @__PURE__ */ L("p", {
|
|
965
985
|
className: "stage-note",
|
|
966
986
|
children: [
|
|
@@ -968,10 +988,10 @@ function jn({ element: e }) {
|
|
|
968
988
|
u.command,
|
|
969
989
|
"” is waiting for Stage routes."
|
|
970
990
|
]
|
|
971
|
-
}) : m ? p.length === 0 && !f && e.properties.parameterless !== !0 ? /* @__PURE__ */ I(
|
|
991
|
+
}) : m ? p.length === 0 && !f && e.properties.parameterless !== !0 ? /* @__PURE__ */ I(Ln, {
|
|
972
992
|
form: u,
|
|
973
993
|
messages: [`The modeled command “${u.command}” has no form fields or schema metadata, so Stage will not submit an empty command body.`]
|
|
974
|
-
}) : ee.length > 0 ? /* @__PURE__ */ I(
|
|
994
|
+
}) : ee.length > 0 ? /* @__PURE__ */ I(Ln, {
|
|
975
995
|
form: u,
|
|
976
996
|
messages: ee
|
|
977
997
|
}) : /* @__PURE__ */ I("section", {
|
|
@@ -986,8 +1006,8 @@ function jn({ element: e }) {
|
|
|
986
1006
|
validateOn: "both",
|
|
987
1007
|
validateAllFieldsOnChange: !0,
|
|
988
1008
|
onBeforeExecute: (e) => tn(e, n.apiBasePath),
|
|
989
|
-
onFieldValidate: (e, t, n, r) =>
|
|
990
|
-
onValidationFailure: (e) => T(
|
|
1009
|
+
onFieldValidate: (e, t, n, r) => pr(p, d, t, r),
|
|
1010
|
+
onValidationFailure: (e) => T(fr(p, e)),
|
|
991
1011
|
onException: (e) => T(e),
|
|
992
1012
|
onFailed: (e) => T(rn(u.command, e).messages),
|
|
993
1013
|
onSuccess: () => {
|
|
@@ -1031,7 +1051,7 @@ function jn({ element: e }) {
|
|
|
1031
1051
|
children: "This form is missing its command metadata."
|
|
1032
1052
|
});
|
|
1033
1053
|
}
|
|
1034
|
-
function
|
|
1054
|
+
function Ln({ form: e, messages: t }) {
|
|
1035
1055
|
return /* @__PURE__ */ I("section", {
|
|
1036
1056
|
className: "stage-command-form",
|
|
1037
1057
|
"data-command": e.command,
|
|
@@ -1043,7 +1063,7 @@ function Mn({ form: e, messages: t }) {
|
|
|
1043
1063
|
}, e))
|
|
1044
1064
|
});
|
|
1045
1065
|
}
|
|
1046
|
-
function
|
|
1066
|
+
function Rn(e) {
|
|
1047
1067
|
let t = Y(e, "command");
|
|
1048
1068
|
if (!t) return;
|
|
1049
1069
|
let n = Array.isArray(e.properties.fields) ? e.properties.fields.filter(X) : [];
|
|
@@ -1051,21 +1071,21 @@ function Nn(e) {
|
|
|
1051
1071
|
command: t,
|
|
1052
1072
|
label: Y(e, "label", t),
|
|
1053
1073
|
fields: n,
|
|
1054
|
-
generationMode:
|
|
1055
|
-
layout:
|
|
1074
|
+
generationMode: or(e.properties.generationMode),
|
|
1075
|
+
layout: sr(e.properties.layout)
|
|
1056
1076
|
};
|
|
1057
1077
|
}
|
|
1058
|
-
function
|
|
1078
|
+
function zn(e, t) {
|
|
1059
1079
|
return e.generationMode === f.Manual || e.fields.length > 0 ? e.fields : t.filter((e) => !e.unsupportedReason).map((e) => ({
|
|
1060
1080
|
name: e.name,
|
|
1061
1081
|
label: q(e.name)
|
|
1062
1082
|
}));
|
|
1063
1083
|
}
|
|
1064
|
-
function
|
|
1065
|
-
let r = e.layout, i = r ?
|
|
1066
|
-
if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) =>
|
|
1067
|
-
let a = new Map(t.map((e) => [e.name, e])), o =
|
|
1068
|
-
gridTemplateColumns: Array.from({ length: o }, (e, t) =>
|
|
1084
|
+
function Bn(e, t, n) {
|
|
1085
|
+
let r = e.layout, i = r ? cr(r, t) : [];
|
|
1086
|
+
if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) => Vn(e, n));
|
|
1087
|
+
let a = new Map(t.map((e) => [e.name, e])), o = lr(r, i), s = {
|
|
1088
|
+
gridTemplateColumns: Array.from({ length: o }, (e, t) => ur(t + 1, r.columns)).join(" "),
|
|
1069
1089
|
columnGap: J(r.columnGap),
|
|
1070
1090
|
rowGap: J(r.rowGap)
|
|
1071
1091
|
}, c = /* @__PURE__ */ new Set();
|
|
@@ -1074,11 +1094,11 @@ function Fn(e, t, n) {
|
|
|
1074
1094
|
style: s,
|
|
1075
1095
|
children: [i.map((e) => {
|
|
1076
1096
|
let t = a.get(e.field);
|
|
1077
|
-
return t ? (c.add(t.name),
|
|
1078
|
-
}), t.filter((e) => !c.has(e.name)).map((e) =>
|
|
1097
|
+
return t ? (c.add(t.name), Vn(t, n, e)) : null;
|
|
1098
|
+
}), t.filter((e) => !c.has(e.name)).map((e) => Vn(e, n))]
|
|
1079
1099
|
});
|
|
1080
1100
|
}
|
|
1081
|
-
function
|
|
1101
|
+
function Vn(e, t, n) {
|
|
1082
1102
|
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 = (() => {
|
|
1083
1103
|
if (i?.options) {
|
|
1084
1104
|
let e = i.options.map((e) => ({
|
|
@@ -1115,7 +1135,7 @@ function In(e, t, n) {
|
|
|
1115
1135
|
label: a,
|
|
1116
1136
|
required: s
|
|
1117
1137
|
});
|
|
1118
|
-
case "date": return /* @__PURE__ */ I(
|
|
1138
|
+
case "date": return /* @__PURE__ */ I(Hn, {
|
|
1119
1139
|
value: o,
|
|
1120
1140
|
fieldName: r,
|
|
1121
1141
|
title: a,
|
|
@@ -1130,7 +1150,7 @@ function In(e, t, n) {
|
|
|
1130
1150
|
required: s
|
|
1131
1151
|
});
|
|
1132
1152
|
}
|
|
1133
|
-
})(), l =
|
|
1153
|
+
})(), l = dr(n);
|
|
1134
1154
|
return /* @__PURE__ */ I("span", {
|
|
1135
1155
|
className: "stage-command-form__field",
|
|
1136
1156
|
"data-field": e.name,
|
|
@@ -1141,12 +1161,12 @@ function In(e, t, n) {
|
|
|
1141
1161
|
children: c
|
|
1142
1162
|
}, e.name);
|
|
1143
1163
|
}
|
|
1144
|
-
var
|
|
1164
|
+
var Hn = qe((e) => /* @__PURE__ */ I(Je, {
|
|
1145
1165
|
...e,
|
|
1146
|
-
currentValue: e.showTime ? e.currentValue :
|
|
1166
|
+
currentValue: e.showTime ? e.currentValue : Un(e.currentValue),
|
|
1147
1167
|
onValueChange: (t) => e.onValueChange?.(!e.showTime && t instanceof Date && !Number.isNaN(t.getTime()) ? He.fromDate(t) : t)
|
|
1148
1168
|
}));
|
|
1149
|
-
function
|
|
1169
|
+
function Un(e) {
|
|
1150
1170
|
if (e instanceof He) return e.toDate();
|
|
1151
1171
|
if (typeof e != "string") return e;
|
|
1152
1172
|
try {
|
|
@@ -1155,7 +1175,7 @@ function Rn(e) {
|
|
|
1155
1175
|
return null;
|
|
1156
1176
|
}
|
|
1157
1177
|
}
|
|
1158
|
-
function
|
|
1178
|
+
function Wn(e, t) {
|
|
1159
1179
|
let n = {};
|
|
1160
1180
|
for (let r of e) {
|
|
1161
1181
|
let e = r.sourceProperty ?? r.name, i = t[e];
|
|
@@ -1163,35 +1183,35 @@ function zn(e, t) {
|
|
|
1163
1183
|
}
|
|
1164
1184
|
return n;
|
|
1165
1185
|
}
|
|
1166
|
-
function
|
|
1186
|
+
function Gn(e, t, n, r = [], i = [], a = !1) {
|
|
1167
1187
|
let o = new Set(e.map((e) => e.sourceProperty ?? e.name)), s = t.some((e) => e.identity), c = {};
|
|
1168
1188
|
for (let e of t) {
|
|
1169
1189
|
if (!e.identifier || !e.required || o.has(e.name)) continue;
|
|
1170
|
-
if (a &&
|
|
1171
|
-
let t = n[e.name] ||
|
|
1190
|
+
if (a && Yn(e, i)) {
|
|
1191
|
+
let t = n[e.name] || Jn(e, r);
|
|
1172
1192
|
t && (c[e.name] = t);
|
|
1173
1193
|
continue;
|
|
1174
1194
|
}
|
|
1175
|
-
let t = n[e.name] ||
|
|
1195
|
+
let t = n[e.name] || Jn(e, r) || Pt(e.identifier) || (e.identity || !s && !Yn(e, i) ? Ft(e.identifier) : void 0);
|
|
1176
1196
|
t !== void 0 && (c[e.name] = t);
|
|
1177
1197
|
}
|
|
1178
1198
|
return c;
|
|
1179
1199
|
}
|
|
1180
|
-
function
|
|
1181
|
-
return !e.identifier || !e.required ? !1 : e.identity === !0 ||
|
|
1200
|
+
function Kn(e, t) {
|
|
1201
|
+
return !e.identifier || !e.required ? !1 : e.identity === !0 || qn(e, t) !== void 0;
|
|
1182
1202
|
}
|
|
1183
|
-
function
|
|
1203
|
+
function qn(e, t) {
|
|
1184
1204
|
if (e.identifier) return t[e.name] || Pt(e.identifier);
|
|
1185
1205
|
}
|
|
1186
|
-
function
|
|
1206
|
+
function Jn(e, t) {
|
|
1187
1207
|
if (!e.identifier) return;
|
|
1188
1208
|
let n = new Set(t.map((t) => t[e.name]).filter((e) => typeof e == "string" && e !== ""));
|
|
1189
1209
|
return n.size === 1 ? [...n][0] : void 0;
|
|
1190
1210
|
}
|
|
1191
|
-
function
|
|
1211
|
+
function Yn(e, t) {
|
|
1192
1212
|
return t.some((t) => Object.hasOwn(t, e.name));
|
|
1193
1213
|
}
|
|
1194
|
-
function
|
|
1214
|
+
function Xn(e, t) {
|
|
1195
1215
|
let n = e.id;
|
|
1196
1216
|
if (typeof n != "string" || n === "") return e;
|
|
1197
1217
|
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]));
|
|
@@ -1200,25 +1220,25 @@ function Gn(e, t) {
|
|
|
1200
1220
|
...e
|
|
1201
1221
|
};
|
|
1202
1222
|
}
|
|
1203
|
-
function
|
|
1204
|
-
return Object.values(e).flatMap((e) => e.rows.map((t) => [t,
|
|
1223
|
+
function Zn(e) {
|
|
1224
|
+
return Object.values(e).flatMap((e) => e.rows.map((t) => [t, Xn(t, e)]));
|
|
1205
1225
|
}
|
|
1206
|
-
function
|
|
1207
|
-
return
|
|
1226
|
+
function Qn(e) {
|
|
1227
|
+
return Zn(e).map(([, e]) => e);
|
|
1208
1228
|
}
|
|
1209
|
-
function
|
|
1210
|
-
let n = new Map(
|
|
1229
|
+
function $n(e, t) {
|
|
1230
|
+
let n = new Map(Zn(t));
|
|
1211
1231
|
return Object.values(e).filter((e) => e !== void 0).map((e) => n.get(e) ?? e);
|
|
1212
1232
|
}
|
|
1213
|
-
function
|
|
1214
|
-
return e.filter((e) => e.identifier && e.required &&
|
|
1233
|
+
function er(e, t, n, r) {
|
|
1234
|
+
return e.filter((e) => e.identifier && e.required && Yn(e, r)).filter((e) => !t[e.name] && Jn(e, n) === void 0).map((e) => e.name);
|
|
1215
1235
|
}
|
|
1216
|
-
function
|
|
1236
|
+
function tr(e) {
|
|
1217
1237
|
let t = e.properties.populateSource;
|
|
1218
1238
|
return X(t) ? t : void 0;
|
|
1219
1239
|
}
|
|
1220
|
-
function
|
|
1221
|
-
let r =
|
|
1240
|
+
function nr(e, t, n) {
|
|
1241
|
+
let r = tr(e), i = r?.queryName, a = Object.entries(r?.parameterBindings ?? {}).map(([e, r]) => [e, rr(e, r?.path ?? e, t, n)]), o = Object.fromEntries(a.filter(([, e]) => e !== void 0 && e !== "")), c = !!i && n.routesReady && a.every(([, e]) => e !== void 0 && e !== ""), l = V({
|
|
1222
1242
|
scope: `populate:${Y(e, "command")}`,
|
|
1223
1243
|
name: i,
|
|
1224
1244
|
route: i ? n.routes?.queries?.[i] : void 0,
|
|
@@ -1236,7 +1256,7 @@ function Zn(e, t, n) {
|
|
|
1236
1256
|
return Object.keys(e).length > 0 ? e : void 0;
|
|
1237
1257
|
}, [d, t]);
|
|
1238
1258
|
}
|
|
1239
|
-
function
|
|
1259
|
+
function rr(e, t, n, r) {
|
|
1240
1260
|
let i = r.parameters[t] ?? r.parameters[e];
|
|
1241
1261
|
if (i) return i;
|
|
1242
1262
|
let a = n.find((n) => n.name === t || n.name === e)?.identifier;
|
|
@@ -1244,45 +1264,45 @@ function Qn(e, t, n, r) {
|
|
|
1244
1264
|
let o = r.resolveBinding({ path: t });
|
|
1245
1265
|
return typeof o == "string" || typeof o == "number" ? o : void 0;
|
|
1246
1266
|
}
|
|
1247
|
-
function
|
|
1248
|
-
let r = s(() =>
|
|
1267
|
+
function ir(e, t, n) {
|
|
1268
|
+
let r = s(() => ar(e, t), [e, t]), i = r.map((e) => n(e.source)), a = JSON.stringify(i);
|
|
1249
1269
|
return s(() => {
|
|
1250
1270
|
let e = Object.fromEntries(r.map((e, t) => [e.name, i[t]]).filter(([, e]) => e != null && e !== ""));
|
|
1251
1271
|
return Object.keys(e).length > 0 ? e : void 0;
|
|
1252
1272
|
}, [r, a]);
|
|
1253
1273
|
}
|
|
1254
|
-
function
|
|
1274
|
+
function ar(e, t) {
|
|
1255
1275
|
let n = e.properties.arguments;
|
|
1256
1276
|
if (!Array.isArray(n)) return [];
|
|
1257
1277
|
let r = new Set(t.map((e) => e.sourceProperty ?? e.name));
|
|
1258
1278
|
return n.filter((e) => typeof e == "object" && !!e && typeof e.name == "string" && typeof e.source == "string" && r.has(e.name));
|
|
1259
1279
|
}
|
|
1260
|
-
function
|
|
1280
|
+
function or(e) {
|
|
1261
1281
|
return e === f.Manual ? f.Manual : f.Auto;
|
|
1262
1282
|
}
|
|
1263
|
-
function
|
|
1283
|
+
function sr(e) {
|
|
1264
1284
|
if (!X(e)) return;
|
|
1265
1285
|
let t = e;
|
|
1266
1286
|
return {
|
|
1267
|
-
columns: Array.isArray(t.columns) ? t.columns.filter(
|
|
1268
|
-
placements: Array.isArray(t.placements) ? t.placements.filter(
|
|
1269
|
-
columnGap:
|
|
1270
|
-
rowGap:
|
|
1287
|
+
columns: Array.isArray(t.columns) ? t.columns.filter(_r) : [],
|
|
1288
|
+
placements: Array.isArray(t.placements) ? t.placements.filter(vr) : [],
|
|
1289
|
+
columnGap: yr(t.columnGap) ? t.columnGap : void 0,
|
|
1290
|
+
rowGap: yr(t.rowGap) ? t.rowGap : void 0
|
|
1271
1291
|
};
|
|
1272
1292
|
}
|
|
1273
|
-
function
|
|
1293
|
+
function cr(e, t) {
|
|
1274
1294
|
let n = new Map(e.placements.map((e) => [e.field, e]));
|
|
1275
|
-
for (let e of t) !n.has(e.name) &&
|
|
1295
|
+
for (let e of t) !n.has(e.name) && vr(e.placement) && n.set(e.name, e.placement);
|
|
1276
1296
|
return [...n.values()].sort((e, t) => e.row - t.row || e.column - t.column || e.field.localeCompare(t.field));
|
|
1277
1297
|
}
|
|
1278
|
-
function
|
|
1298
|
+
function lr(e, t) {
|
|
1279
1299
|
return Math.max(1, ...e.columns.map((e) => e.index), ...t.map((e) => e.column + (e.columnSpan ?? 1) - 1));
|
|
1280
1300
|
}
|
|
1281
|
-
function
|
|
1301
|
+
function ur(e, t) {
|
|
1282
1302
|
let n = t.find((t) => t.index === e), r = J(n?.width), i = J(n?.minWidth), a = J(n?.maxWidth);
|
|
1283
1303
|
return n?.width?.unit === p.Fraction && a ? `minmax(${i ?? "0"}, ${r ?? "1fr"})` : i || a ? `minmax(${i ?? "0"}, ${a && r ? `min(${r}, ${a})` : a ?? r ?? "1fr"})` : r ?? "1fr";
|
|
1284
1304
|
}
|
|
1285
|
-
function
|
|
1305
|
+
function dr(e) {
|
|
1286
1306
|
if (e) return {
|
|
1287
1307
|
gridColumn: `${e.column} / span ${e.columnSpan ?? 1}`,
|
|
1288
1308
|
gridRow: `${e.row} / span ${e.rowSpan ?? 1}`,
|
|
@@ -1297,61 +1317,60 @@ function J(e) {
|
|
|
1297
1317
|
case p.Auto: return "auto";
|
|
1298
1318
|
}
|
|
1299
1319
|
}
|
|
1300
|
-
function
|
|
1320
|
+
function fr(e, t) {
|
|
1301
1321
|
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));
|
|
1302
1322
|
return [...new Set(t.filter((e) => !r.has(e)).map((e) => e.message))];
|
|
1303
1323
|
}
|
|
1304
|
-
function
|
|
1324
|
+
function pr(e, t, n, r) {
|
|
1305
1325
|
let i = e.find((e) => (e.sourceProperty ?? e.name) === n), a = t.find((e) => e.name === n);
|
|
1306
1326
|
if (a?.required ?? !0) return r == null || r === "" ? `${i?.label ?? n} is required` : a ? _n(a, r, i?.label ?? n) : void 0;
|
|
1307
1327
|
}
|
|
1308
|
-
function
|
|
1328
|
+
function mr(e, t) {
|
|
1309
1329
|
let n = new Map(t.map((e) => [e.name, e]));
|
|
1310
1330
|
return e.flatMap((e) => {
|
|
1311
1331
|
let t = n.get(e.sourceProperty ?? e.name);
|
|
1312
1332
|
return t?.unsupportedReason ? [`The field “${e.label ?? e.name}” uses unsupported schema metadata: ${t.unsupportedReason}.`] : [];
|
|
1313
1333
|
});
|
|
1314
1334
|
}
|
|
1315
|
-
function
|
|
1335
|
+
function hr(e, t) {
|
|
1316
1336
|
if (!e) return [];
|
|
1317
|
-
let n =
|
|
1337
|
+
let n = cr(e, t).filter((e) => e.width?.unit === p.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 === p.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.`);
|
|
1318
1338
|
return [...n, ...r];
|
|
1319
1339
|
}
|
|
1320
|
-
function
|
|
1340
|
+
function gr(e) {
|
|
1321
1341
|
return K(Y(e, "schema"));
|
|
1322
1342
|
}
|
|
1323
1343
|
function Y(e, t, n = "") {
|
|
1324
1344
|
let r = e.properties[t];
|
|
1325
1345
|
return typeof r == "string" ? r : n;
|
|
1326
1346
|
}
|
|
1327
|
-
function
|
|
1347
|
+
function _r(e) {
|
|
1328
1348
|
return X(e) && typeof e.index == "number" && Number.isInteger(e.index) && e.index > 0;
|
|
1329
1349
|
}
|
|
1330
|
-
function
|
|
1350
|
+
function vr(e) {
|
|
1331
1351
|
return X(e) && typeof e.field == "string" && typeof e.row == "number" && typeof e.column == "number" && e.row > 0 && e.column > 0;
|
|
1332
1352
|
}
|
|
1333
|
-
function
|
|
1353
|
+
function yr(e) {
|
|
1334
1354
|
return X(e) && Object.values(p).includes(e.unit);
|
|
1335
1355
|
}
|
|
1336
1356
|
function X(e) {
|
|
1337
1357
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1338
1358
|
}
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
function hr(e) {
|
|
1359
|
+
// src/StageGuardedAction.tsx
|
|
1360
|
+
function br(e) {
|
|
1342
1361
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1343
1362
|
}
|
|
1344
|
-
function
|
|
1363
|
+
function xr(e, t) {
|
|
1345
1364
|
let n = e.properties[t];
|
|
1346
1365
|
return typeof n == "string" ? n : "";
|
|
1347
1366
|
}
|
|
1348
|
-
function
|
|
1367
|
+
function Sr(e) {
|
|
1349
1368
|
return e.componentName === "core:action" && (Array.isArray(e.properties.alternatives) || e.properties.otherwise !== void 0);
|
|
1350
1369
|
}
|
|
1351
|
-
function
|
|
1352
|
-
let t = B(), n =
|
|
1370
|
+
function Cr(e) {
|
|
1371
|
+
let t = B(), n = xr(e, "itemQuery"), r = (n ? t.routes?.queries?.[n] : void 0) ?? xr(e, "itemRoute"), i = br(e.properties.itemArguments) ? e.properties.itemArguments : {}, a = {}, o = !0;
|
|
1353
1372
|
for (let [e, n] of Object.entries(i)) {
|
|
1354
|
-
let r =
|
|
1373
|
+
let r = br(n) && (typeof n.path == "string" || typeof n.kind == "string") ? t.resolveBinding(n) : n;
|
|
1355
1374
|
a[e] = r, (r == null || r === "") && (o = !1);
|
|
1356
1375
|
}
|
|
1357
1376
|
let s = e.properties.itemSelection === !0, c = Object.values(t.selections).filter((e) => e !== void 0), l = V({
|
|
@@ -1370,11 +1389,11 @@ function vr(e) {
|
|
|
1370
1389
|
item: l.rows.length === 1 ? l.rows[0] : void 0
|
|
1371
1390
|
};
|
|
1372
1391
|
}
|
|
1373
|
-
function
|
|
1392
|
+
function wr(e, t) {
|
|
1374
1393
|
return Object.fromEntries(Object.entries(e.arguments ?? {}).map(([e, n]) => [e, Mt(xt(n) ?? "", t)]));
|
|
1375
1394
|
}
|
|
1376
|
-
function
|
|
1377
|
-
let n = B(), r =
|
|
1395
|
+
function Tr({ element: e, interactions: t }) {
|
|
1396
|
+
let n = B(), r = Cr(e), i = an(), [a, o] = l([]), [c, u] = l(!1), d = xr(e, "label"), f = s(() => Array.isArray(e.properties.alternatives) ? e.properties.alternatives : [], [e]), p = br(e.properties.otherwise) ? e.properties.otherwise : void 0, m = f.map((e) => e.condition), h = !p || p.outcome === "Hidden" || p.outcome === "Execute" && !!p.command;
|
|
1378
1397
|
if (!kt(m) || !h || !r.hasSource) {
|
|
1379
1398
|
let n = r.hasSource ? `${St}: “${d}” has a guard this Stage cannot evaluate, so it stays unavailable.` : `${St}: “${d}” has no data subject to evaluate its guard against.`;
|
|
1380
1399
|
return /* @__PURE__ */ L("div", {
|
|
@@ -1399,10 +1418,10 @@ function br({ element: e, interactions: t }) {
|
|
|
1399
1418
|
let v = _.command, y = W(v), b = r.item, x = async () => {
|
|
1400
1419
|
if (!y) return;
|
|
1401
1420
|
u(!0);
|
|
1402
|
-
let t = await i(v,
|
|
1421
|
+
let t = await i(v, wr(_, b));
|
|
1403
1422
|
if (u(!1), o(t.messages), !t.isSuccess) return;
|
|
1404
1423
|
n.refreshAfterCommand();
|
|
1405
|
-
let r =
|
|
1424
|
+
let r = xr(e, "navigateToScreen"), a = xr(e, "navigateByParameter"), s = a ? Mt(`item.${a}`, b) : void 0;
|
|
1406
1425
|
r && G(r, a && s != null ? { [a]: String(s) } : {});
|
|
1407
1426
|
};
|
|
1408
1427
|
return /* @__PURE__ */ L("div", {
|
|
@@ -1423,8 +1442,8 @@ function br({ element: e, interactions: t }) {
|
|
|
1423
1442
|
}, e))]
|
|
1424
1443
|
});
|
|
1425
1444
|
}
|
|
1426
|
-
function
|
|
1427
|
-
let t =
|
|
1445
|
+
function Er(e) {
|
|
1446
|
+
let t = fe(), n = c(void 0), i = s(() => C(se(e.id, e.behaviors), m.DoubleClick), [e.behaviors, e.id]);
|
|
1428
1447
|
a(() => () => clearTimeout(n.current), []);
|
|
1429
1448
|
let o = r((e) => {
|
|
1430
1449
|
if (clearTimeout(n.current), n.current = void 0, !t) return;
|
|
@@ -1438,25 +1457,20 @@ function xr(e) {
|
|
|
1438
1457
|
}, [i, t]);
|
|
1439
1458
|
return {
|
|
1440
1459
|
click: r((e, t) => {
|
|
1441
|
-
|
|
1442
|
-
t();
|
|
1443
|
-
return;
|
|
1444
|
-
}
|
|
1445
|
-
clearTimeout(n.current), n.current = setTimeout(() => {
|
|
1460
|
+
i.length === 0 ? t() : (clearTimeout(n.current), n.current = setTimeout(() => {
|
|
1446
1461
|
n.current = void 0, t();
|
|
1447
|
-
}, 250);
|
|
1462
|
+
}, 250));
|
|
1448
1463
|
}, [i.length]),
|
|
1449
1464
|
doubleClick: i.length > 0 ? o : void 0
|
|
1450
1465
|
};
|
|
1451
1466
|
}
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
function wr(e, t) {
|
|
1467
|
+
// src/stageDialogScreens.ts
|
|
1468
|
+
var Dr = "Stage:confirmDialog", Or = "ConfirmDialog";
|
|
1469
|
+
function kr(e, t) {
|
|
1456
1470
|
let n = new Set(t.map((e) => e.name));
|
|
1457
1471
|
return e.map((t) => {
|
|
1458
|
-
if (t.screenTemplate !==
|
|
1459
|
-
let r =
|
|
1472
|
+
if (t.screenTemplate !== Or || n.has(Or)) return t;
|
|
1473
|
+
let r = Ar(t), i = e.find((e) => e.name !== t.name)?.name, a = P(`confirm-dialog-${t.name}`, Dr, {
|
|
1460
1474
|
title: t.name,
|
|
1461
1475
|
decisions: r,
|
|
1462
1476
|
home: i
|
|
@@ -1469,39 +1483,38 @@ function wr(e, t) {
|
|
|
1469
1483
|
};
|
|
1470
1484
|
});
|
|
1471
1485
|
}
|
|
1472
|
-
function
|
|
1486
|
+
function Ar(e) {
|
|
1473
1487
|
let t = [];
|
|
1474
|
-
for (let n of
|
|
1475
|
-
let r =
|
|
1488
|
+
for (let n of jr(Object.values(e.slotContent).flat())) {
|
|
1489
|
+
let r = Mr(n.properties.command);
|
|
1476
1490
|
r && !t.some((e) => e.command === r) && t.push({
|
|
1477
1491
|
command: r,
|
|
1478
|
-
label:
|
|
1479
|
-
navigateToScreen:
|
|
1480
|
-
typeName:
|
|
1481
|
-
route:
|
|
1492
|
+
label: Mr(n.properties.label),
|
|
1493
|
+
navigateToScreen: Mr(n.properties.navigateToScreen),
|
|
1494
|
+
typeName: Mr(n.properties.typeName),
|
|
1495
|
+
route: Mr(n.properties.route),
|
|
1482
1496
|
form: e.forms.find((e) => e.forCommand === r)
|
|
1483
1497
|
});
|
|
1484
1498
|
}
|
|
1485
1499
|
return t;
|
|
1486
1500
|
}
|
|
1487
|
-
function
|
|
1501
|
+
function jr(e) {
|
|
1488
1502
|
return e.flatMap((e) => {
|
|
1489
1503
|
let t = e;
|
|
1490
|
-
return t.componentName === "core:action" ? [t] :
|
|
1504
|
+
return t.componentName === "core:action" ? [t] : jr(Object.values(t.slots ?? {}).flat());
|
|
1491
1505
|
});
|
|
1492
1506
|
}
|
|
1493
|
-
function
|
|
1507
|
+
function Mr(e) {
|
|
1494
1508
|
return typeof e == "string" && e !== "" ? e : void 0;
|
|
1495
1509
|
}
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
let { routes: t, parameters: n, queries: r, selections: i } = B(), [o, s] = l(), u = c(null), d = typeof e.properties.title == "string" ? e.properties.title : "", f = Array.isArray(e.properties.decisions) ? e.properties.decisions : [], p = typeof e.properties.home == "string" ? e.properties.home : void 0, m = f.find((e) => e.command === o), h = Jn(i, r);
|
|
1510
|
+
// src/StageConfirmDialog.tsx
|
|
1511
|
+
function Nr({ element: e }) {
|
|
1512
|
+
let { routes: t, parameters: n, queries: r, selections: i } = B(), [o, s] = l(), u = c(null), d = typeof e.properties.title == "string" ? e.properties.title : "", f = Array.isArray(e.properties.decisions) ? e.properties.decisions : [], p = typeof e.properties.home == "string" ? e.properties.home : void 0, m = f.find((e) => e.command === o), h = $n(i, r);
|
|
1500
1513
|
return a(() => u.current?.focus(), []), /* @__PURE__ */ L("section", {
|
|
1501
1514
|
className: "scene-slice-dialog stage-confirm-dialog",
|
|
1502
1515
|
role: "dialog",
|
|
1503
1516
|
"aria-label": q(d),
|
|
1504
|
-
"data-stage-component":
|
|
1517
|
+
"data-stage-component": Dr,
|
|
1505
1518
|
children: [
|
|
1506
1519
|
/* @__PURE__ */ I("header", {
|
|
1507
1520
|
className: "scene-slice-dialog-header",
|
|
@@ -1519,50 +1532,50 @@ function Or({ element: e }) {
|
|
|
1519
1532
|
"data-emphasis": t === 0 ? "primary" : "secondary",
|
|
1520
1533
|
"aria-pressed": e.command === o,
|
|
1521
1534
|
onClick: () => s(e.command),
|
|
1522
|
-
children:
|
|
1535
|
+
children: Fr(e)
|
|
1523
1536
|
}, e.command))
|
|
1524
1537
|
}),
|
|
1525
|
-
m && /* @__PURE__ */ I(
|
|
1538
|
+
m && /* @__PURE__ */ I(Mn, { children: /* @__PURE__ */ I(In, { element: Rr(m, t?.commandSchemas?.[m.command] ?? "", n, h) }, m.command) }),
|
|
1526
1539
|
/* @__PURE__ */ I("footer", {
|
|
1527
1540
|
className: "scene-slice-dialog-footer",
|
|
1528
1541
|
children: /* @__PURE__ */ I("button", {
|
|
1529
1542
|
type: "button",
|
|
1530
1543
|
className: "scene-slice-dialog-cancel stage-confirm-dialog__cancel",
|
|
1531
|
-
onClick: () =>
|
|
1544
|
+
onClick: () => Pr(f, p),
|
|
1532
1545
|
children: "Cancel"
|
|
1533
1546
|
})
|
|
1534
1547
|
})
|
|
1535
1548
|
]
|
|
1536
1549
|
});
|
|
1537
1550
|
}
|
|
1538
|
-
function
|
|
1551
|
+
function Pr(e, t) {
|
|
1539
1552
|
let n = new Set(e.map((e) => e.navigateToScreen).filter((e) => !!e)), r = n.size === 1 ? [...n][0] : t;
|
|
1540
1553
|
r && G(r, {});
|
|
1541
1554
|
}
|
|
1542
|
-
function
|
|
1555
|
+
function Fr(e) {
|
|
1543
1556
|
return e.label ?? q(e.command);
|
|
1544
1557
|
}
|
|
1545
|
-
function
|
|
1546
|
-
return !e.identifier || !e.required ? !1 : e.identity === !0 || !!t[e.name] ||
|
|
1558
|
+
function Ir(e, t, n) {
|
|
1559
|
+
return !e.identifier || !e.required ? !1 : e.identity === !0 || !!t[e.name] || Jn(e, n) !== void 0;
|
|
1547
1560
|
}
|
|
1548
|
-
function
|
|
1561
|
+
function Lr(e, t, n, r) {
|
|
1549
1562
|
let i = e.form?.fields ?? [], a = i.length > 0 ? i : t.filter((e) => !e.unsupportedReason).map((e) => ({
|
|
1550
1563
|
name: e.name,
|
|
1551
1564
|
label: e.name
|
|
1552
|
-
})), o = new Set(t.filter((e) =>
|
|
1565
|
+
})), o = new Set(t.filter((e) => Ir(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));
|
|
1553
1566
|
return [...s, ...l.map((e) => ({
|
|
1554
1567
|
name: e.name,
|
|
1555
1568
|
label: q(e.name)
|
|
1556
1569
|
}))];
|
|
1557
1570
|
}
|
|
1558
|
-
function
|
|
1559
|
-
let i =
|
|
1571
|
+
function Rr(e, t, n, r) {
|
|
1572
|
+
let i = Lr(e, K(t), n, r);
|
|
1560
1573
|
return {
|
|
1561
1574
|
id: `confirm-${e.command}`,
|
|
1562
|
-
componentName:
|
|
1575
|
+
componentName: Dr,
|
|
1563
1576
|
properties: {
|
|
1564
1577
|
command: e.command,
|
|
1565
|
-
label:
|
|
1578
|
+
label: Fr(e),
|
|
1566
1579
|
submitLabel: "Confirm",
|
|
1567
1580
|
typeName: e.typeName,
|
|
1568
1581
|
route: e.route,
|
|
@@ -1576,10 +1589,9 @@ function Nr(e, t, n, r) {
|
|
|
1576
1589
|
slots: {}
|
|
1577
1590
|
};
|
|
1578
1591
|
}
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
function Fr(e, t, n = {}) {
|
|
1592
|
+
// src/stageComponents.tsx
|
|
1593
|
+
var zr = "Stage:commandForm";
|
|
1594
|
+
function Br(e, t, n = {}) {
|
|
1583
1595
|
return {
|
|
1584
1596
|
id: e,
|
|
1585
1597
|
componentName: "",
|
|
@@ -1591,19 +1603,19 @@ function Z(e, t, n = "") {
|
|
|
1591
1603
|
let r = e.properties[t];
|
|
1592
1604
|
return typeof r == "string" ? r : n;
|
|
1593
1605
|
}
|
|
1594
|
-
function
|
|
1606
|
+
function Vr(e, t, n) {
|
|
1595
1607
|
let r = typeof e == "number" && Number.isInteger(e) ? n && n.length === t?.length ? t?.[n.indexOf(e)] : t?.[e] : e;
|
|
1596
1608
|
return typeof r == "string" && t?.includes(r) ? q(r) : String(e ?? "");
|
|
1597
1609
|
}
|
|
1598
|
-
function
|
|
1610
|
+
function Hr(e, t) {
|
|
1599
1611
|
let n = e.properties.queryArguments;
|
|
1600
|
-
if (!
|
|
1612
|
+
if (!Kr(n)) return {
|
|
1601
1613
|
values: {},
|
|
1602
1614
|
ready: !0
|
|
1603
1615
|
};
|
|
1604
1616
|
let r = {}, i = !0;
|
|
1605
1617
|
for (let [e, a] of Object.entries(n)) {
|
|
1606
|
-
let n =
|
|
1618
|
+
let n = Gr(a) ? t.resolveBinding(a) : a;
|
|
1607
1619
|
r[e] = n, (n == null || n === "") && (i = !1);
|
|
1608
1620
|
}
|
|
1609
1621
|
return {
|
|
@@ -1611,7 +1623,7 @@ function Lr(e, t) {
|
|
|
1611
1623
|
ready: i
|
|
1612
1624
|
};
|
|
1613
1625
|
}
|
|
1614
|
-
function
|
|
1626
|
+
function Ur(e, t) {
|
|
1615
1627
|
let n = (e.slots.columns ?? []).map((e) => {
|
|
1616
1628
|
let t = e.properties;
|
|
1617
1629
|
return {
|
|
@@ -1629,22 +1641,18 @@ function Rr(e, t) {
|
|
|
1629
1641
|
function Q(e, t) {
|
|
1630
1642
|
return e[t] ?? e.id ?? e.key;
|
|
1631
1643
|
}
|
|
1632
|
-
function
|
|
1633
|
-
let n = B(), r = Z(e, "query", Z(e, "typeName", e.id)), i = (Z(e, "query") ? n.routes?.queries?.[Z(e, "query")] : void 0) ?? Z(e, "route"), o = s(() =>
|
|
1644
|
+
function Wr({ element: e, slots: t }) {
|
|
1645
|
+
let n = B(), r = Z(e, "query", Z(e, "typeName", e.id)), i = (Z(e, "query") ? n.routes?.queries?.[Z(e, "query")] : void 0) ?? Z(e, "route"), o = s(() => Hr(e, n), [n, e]), { rows: c, error: l, loading: u } = V({
|
|
1634
1646
|
scope: e.id,
|
|
1635
1647
|
name: r,
|
|
1636
1648
|
route: i || void 0,
|
|
1637
1649
|
arguments: o.values,
|
|
1638
1650
|
ready: o.ready
|
|
1639
|
-
}), d =
|
|
1651
|
+
}), d = Ur(e, c), f = Z(e, "navigateOnRowClickToScreen"), p = Z(e, "navigateOnRowClickByParameter"), m = Z(e, "dataKey") || p || "id", h = n.selections[e.id], g = p ? n.parameters[p] : void 0, _ = Er(e);
|
|
1640
1652
|
a(() => {
|
|
1641
1653
|
if (!h) return;
|
|
1642
1654
|
let t = Q(h, m), r = t === void 0 ? void 0 : c.find((e) => Q(e, m) === t);
|
|
1643
|
-
|
|
1644
|
-
n.selectRow(e.id, r);
|
|
1645
|
-
return;
|
|
1646
|
-
}
|
|
1647
|
-
!r && t !== void 0 && !u && n.clearSelection(e.id);
|
|
1655
|
+
r && r !== h ? n.selectRow(e.id, r) : !r && t !== void 0 && !u && n.clearSelection(e.id);
|
|
1648
1656
|
}, [
|
|
1649
1657
|
n,
|
|
1650
1658
|
m,
|
|
@@ -1677,10 +1685,8 @@ function zr({ element: e, slots: t }) {
|
|
|
1677
1685
|
...f && f !== n.screen ? {} : n.parameters,
|
|
1678
1686
|
[p]: String(r)
|
|
1679
1687
|
};
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
}
|
|
1683
|
-
n.selectRow(e.id, t);
|
|
1688
|
+
f && f !== n.screen || n.selectRow(e.id, t), G(f || n.screen, i);
|
|
1689
|
+
} else n.selectRow(e.id, t);
|
|
1684
1690
|
};
|
|
1685
1691
|
return !Z(e, "query") && !i && !gt(r) ? /* @__PURE__ */ L("section", {
|
|
1686
1692
|
className: "stage-table",
|
|
@@ -1728,7 +1734,7 @@ function zr({ element: e, slots: t }) {
|
|
|
1728
1734
|
onKeyDown: (t) => {
|
|
1729
1735
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), v(e));
|
|
1730
1736
|
},
|
|
1731
|
-
children: d.map((t) => /* @__PURE__ */ I("td", { children:
|
|
1737
|
+
children: d.map((t) => /* @__PURE__ */ I("td", { children: Vr(e[t.property], t.options, t.optionValues) }, t.property))
|
|
1732
1738
|
}, String(Q(e, m) ?? t))), c.length === 0 && !u && /* @__PURE__ */ I("tr", { children: /* @__PURE__ */ I("td", {
|
|
1733
1739
|
colSpan: Math.max(d.length, 1),
|
|
1734
1740
|
children: "No records found"
|
|
@@ -1737,25 +1743,32 @@ function zr({ element: e, slots: t }) {
|
|
|
1737
1743
|
]
|
|
1738
1744
|
});
|
|
1739
1745
|
}
|
|
1740
|
-
function
|
|
1741
|
-
return
|
|
1746
|
+
function Gr(e) {
|
|
1747
|
+
return Kr(e) && (typeof e.path == "string" || typeof e.kind == "string");
|
|
1742
1748
|
}
|
|
1743
|
-
function
|
|
1749
|
+
function Kr(e) {
|
|
1744
1750
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1745
1751
|
}
|
|
1746
|
-
function
|
|
1747
|
-
return
|
|
1752
|
+
function qr({ element: e, interactions: t, slots: n }) {
|
|
1753
|
+
return Sr(e) ? /* @__PURE__ */ I(Tr, {
|
|
1748
1754
|
element: e,
|
|
1749
1755
|
interactions: t
|
|
1750
|
-
}) : /* @__PURE__ */ I(
|
|
1756
|
+
}) : /* @__PURE__ */ I(Jr, {
|
|
1751
1757
|
element: e,
|
|
1752
1758
|
interactions: t,
|
|
1753
1759
|
slots: n
|
|
1754
1760
|
});
|
|
1755
1761
|
}
|
|
1756
|
-
function
|
|
1757
|
-
let n = Z(e, "label", Z(e, "command"));
|
|
1758
|
-
return
|
|
1762
|
+
function Jr({ element: e, interactions: t }) {
|
|
1763
|
+
let n = Z(e, "label", Z(e, "command")), r = W(Z(e, "command"), Z(e, "typeName"), Z(e, "route")), i = Yr(e);
|
|
1764
|
+
return r ? i.length > 0 ? /* @__PURE__ */ I(R, {
|
|
1765
|
+
type: "button",
|
|
1766
|
+
"data-scene-id": e.id,
|
|
1767
|
+
disabled: !0,
|
|
1768
|
+
title: "Select a row first",
|
|
1769
|
+
...t,
|
|
1770
|
+
children: n
|
|
1771
|
+
}) : /* @__PURE__ */ I(Zr, {
|
|
1759
1772
|
element: e,
|
|
1760
1773
|
label: n
|
|
1761
1774
|
}) : /* @__PURE__ */ I(R, {
|
|
@@ -1767,12 +1780,19 @@ function Ur({ element: e, interactions: t }) {
|
|
|
1767
1780
|
children: n
|
|
1768
1781
|
});
|
|
1769
1782
|
}
|
|
1770
|
-
function
|
|
1783
|
+
function Yr(e) {
|
|
1784
|
+
let { parameters: t } = B(), n = Z(e, "schema"), r = e.properties.fields, i = Z(e, "generationMode").toLowerCase(), a = s(() => K(n), [n]), { selectableRows: o, selectedRows: c } = Nn(), l = Array.isArray(r) ? r : [], u = l.length > 0 || i === "manual" ? new Set(l.map(Xr).filter((e) => e !== "")) : void 0;
|
|
1785
|
+
return u ? er(a.filter((e) => !u.has(e.name)), t, c, o) : [];
|
|
1786
|
+
}
|
|
1787
|
+
function Xr(e) {
|
|
1788
|
+
return Kr(e) ? typeof e.sourceProperty == "string" && e.sourceProperty !== "" ? e.sourceProperty : typeof e.name == "string" ? e.name : "" : "";
|
|
1789
|
+
}
|
|
1790
|
+
function Zr({ element: e, label: t }) {
|
|
1771
1791
|
let [n, i] = l(0), [a, o] = l(!1), s = r(() => {
|
|
1772
1792
|
o(!1), i((e) => e + 1);
|
|
1773
|
-
}, []), c = /* @__PURE__ */ I(
|
|
1793
|
+
}, []), c = /* @__PURE__ */ I(Pn.Provider, {
|
|
1774
1794
|
value: s,
|
|
1775
|
-
children: /* @__PURE__ */ I(
|
|
1795
|
+
children: /* @__PURE__ */ I(In, { element: e }, n)
|
|
1776
1796
|
});
|
|
1777
1797
|
return /* @__PURE__ */ L("div", {
|
|
1778
1798
|
className: "stage-action",
|
|
@@ -1791,17 +1811,17 @@ function Wr({ element: e, label: t }) {
|
|
|
1791
1811
|
})]
|
|
1792
1812
|
});
|
|
1793
1813
|
}
|
|
1794
|
-
function
|
|
1795
|
-
let t = e.element ??
|
|
1796
|
-
if (!
|
|
1814
|
+
function Qr(e) {
|
|
1815
|
+
let t = e.element ?? Br("slice-dialog", {}), n = pe(), { routes: i, parameters: a } = B(), o = de(n?.currentDialogParameters), c = Z(t, "command") || o?.command || Z(t, "slice") || "", u = Z(t, "title") || o?.title || c, d = i?.commandSchemas?.[c], f = s(() => K(d ?? ""), [d]), { selectableRows: p, selectedRows: m } = Nn(), h = r(() => n?.closeDialog(), [n]), [g, _] = l(null), v = (e) => e.identifier && e.required && Yn(e, p) && Jn(e, m) !== void 0;
|
|
1816
|
+
if (!d || !(f.some((e) => e.options || e.members || e.item) || f.some(v))) return e.element ? /* @__PURE__ */ I(T, {
|
|
1797
1817
|
element: e.element,
|
|
1798
1818
|
slots: e.slots ?? {}
|
|
1799
|
-
}) : /* @__PURE__ */ I(
|
|
1800
|
-
let
|
|
1801
|
-
command:
|
|
1802
|
-
label:
|
|
1803
|
-
schema:
|
|
1804
|
-
fields:
|
|
1819
|
+
}) : /* @__PURE__ */ I(ae, {});
|
|
1820
|
+
let y = f.filter((e) => !Kn(e, a) && !v(e)), b = Br(`slice-dialog-${c}`, {
|
|
1821
|
+
command: c,
|
|
1822
|
+
label: u,
|
|
1823
|
+
schema: d,
|
|
1824
|
+
fields: y.map((e) => ({
|
|
1805
1825
|
name: e.name,
|
|
1806
1826
|
label: q(e.name)
|
|
1807
1827
|
})),
|
|
@@ -1809,44 +1829,44 @@ function Gr(e) {
|
|
|
1809
1829
|
});
|
|
1810
1830
|
return /* @__PURE__ */ L("section", {
|
|
1811
1831
|
className: "scene-slice-dialog",
|
|
1812
|
-
"data-scene-slice-dialog": Z(t, "slice") ||
|
|
1813
|
-
"data-scene-command":
|
|
1832
|
+
"data-scene-slice-dialog": Z(t, "slice") || o?.slice,
|
|
1833
|
+
"data-scene-command": c,
|
|
1814
1834
|
children: [
|
|
1815
1835
|
/* @__PURE__ */ I("header", {
|
|
1816
1836
|
className: "scene-slice-dialog-header",
|
|
1817
1837
|
children: /* @__PURE__ */ I("h2", {
|
|
1818
1838
|
className: "scene-slice-dialog-title",
|
|
1819
|
-
children:
|
|
1839
|
+
children: u
|
|
1820
1840
|
})
|
|
1821
1841
|
}),
|
|
1822
|
-
/* @__PURE__ */ I(
|
|
1823
|
-
value:
|
|
1824
|
-
children: /* @__PURE__ */ I(
|
|
1825
|
-
value:
|
|
1826
|
-
children: /* @__PURE__ */ I(
|
|
1842
|
+
/* @__PURE__ */ I(Pn.Provider, {
|
|
1843
|
+
value: h,
|
|
1844
|
+
children: /* @__PURE__ */ I(Fn.Provider, {
|
|
1845
|
+
value: g,
|
|
1846
|
+
children: /* @__PURE__ */ I(In, { element: b })
|
|
1827
1847
|
})
|
|
1828
1848
|
}),
|
|
1829
1849
|
/* @__PURE__ */ I("footer", {
|
|
1830
|
-
ref:
|
|
1850
|
+
ref: _,
|
|
1831
1851
|
className: "scene-slice-dialog-footer",
|
|
1832
1852
|
children: /* @__PURE__ */ I("button", {
|
|
1833
1853
|
type: "button",
|
|
1834
1854
|
className: "scene-slice-dialog-cancel",
|
|
1835
|
-
onClick:
|
|
1855
|
+
onClick: h,
|
|
1836
1856
|
children: "Cancel"
|
|
1837
1857
|
})
|
|
1838
1858
|
})
|
|
1839
1859
|
]
|
|
1840
1860
|
});
|
|
1841
1861
|
}
|
|
1842
|
-
function
|
|
1862
|
+
function $r(e) {
|
|
1843
1863
|
let { element: t } = e;
|
|
1844
|
-
return Z(t, "slice") === "" ? Z(t, "kind").toLowerCase() === "action" ? /* @__PURE__ */ I(
|
|
1864
|
+
return Z(t, "slice") === "" ? Z(t, "kind").toLowerCase() === "action" ? /* @__PURE__ */ I(ti, { ...e }) : /* @__PURE__ */ I(E, { ...e }) : /* @__PURE__ */ I(ei, { ...e });
|
|
1845
1865
|
}
|
|
1846
|
-
function
|
|
1847
|
-
let { element: t } = e, { routes: n, parameters: r
|
|
1848
|
-
if (
|
|
1849
|
-
let
|
|
1866
|
+
function ei(e) {
|
|
1867
|
+
let { element: t } = e, { routes: n, parameters: r } = B(), i = Z(t, "slice"), a = Z(t, "command") || i.split(".").at(-1) || "", o = n?.commandSchemas?.[a], c = s(() => K(o ?? ""), [o]), { selectableRows: l, selectedRows: u } = Nn();
|
|
1868
|
+
if (er(c, r, u, l).length === 0) return /* @__PURE__ */ I(E, { ...e });
|
|
1869
|
+
let d = Z(t, "label", Z(t, "name", t.id));
|
|
1850
1870
|
return /* @__PURE__ */ I("span", {
|
|
1851
1871
|
className: "stage-toolbar-action",
|
|
1852
1872
|
"data-scene-toolbar-item": Z(t, "name", t.id),
|
|
@@ -1856,57 +1876,56 @@ function qr(e) {
|
|
|
1856
1876
|
disabled: !0,
|
|
1857
1877
|
title: "Select a row first",
|
|
1858
1878
|
...e.interactions,
|
|
1859
|
-
children:
|
|
1879
|
+
children: d
|
|
1860
1880
|
})
|
|
1861
1881
|
});
|
|
1862
1882
|
}
|
|
1863
|
-
function
|
|
1864
|
-
let { element: t } = e, { routes: n, parameters: r
|
|
1865
|
-
schema:
|
|
1866
|
-
fields:
|
|
1883
|
+
function ti(e) {
|
|
1884
|
+
let { element: t } = e, { routes: n, parameters: r } = B(), i = Z(t, "name", t.id), a = Z(t, "target"), o = Z(t, "label", i), c = n?.commandSchemas?.[a], l = s(() => K(c ?? ""), [c]), { selectableRows: u, selectedRows: d } = Nn(), f = er(l, r, d, u), p = l.filter((e) => !Kn(e, r) && !(e.identifier && e.required && Yn(e, u))), m = c ? {
|
|
1885
|
+
schema: c,
|
|
1886
|
+
fields: p.map((e) => ({
|
|
1867
1887
|
name: e.name,
|
|
1868
1888
|
label: q(e.name)
|
|
1869
1889
|
})),
|
|
1870
1890
|
generationMode: "manual"
|
|
1871
|
-
} : {},
|
|
1891
|
+
} : {}, h = {
|
|
1872
1892
|
...t,
|
|
1873
1893
|
componentName: "core:action",
|
|
1874
1894
|
properties: {
|
|
1875
|
-
command:
|
|
1876
|
-
label:
|
|
1895
|
+
command: a,
|
|
1896
|
+
label: o,
|
|
1877
1897
|
rowAction: !0,
|
|
1878
|
-
...
|
|
1898
|
+
...m
|
|
1879
1899
|
}
|
|
1880
1900
|
};
|
|
1881
1901
|
return /* @__PURE__ */ I("span", {
|
|
1882
1902
|
className: "stage-toolbar-action",
|
|
1883
|
-
"data-scene-toolbar-item":
|
|
1884
|
-
children:
|
|
1903
|
+
"data-scene-toolbar-item": i,
|
|
1904
|
+
children: f.length > 0 ? /* @__PURE__ */ I(R, {
|
|
1885
1905
|
type: "button",
|
|
1886
1906
|
"data-scene-id": t.id,
|
|
1887
1907
|
disabled: !0,
|
|
1888
1908
|
title: "Select a row first",
|
|
1889
1909
|
...e.interactions,
|
|
1890
|
-
children:
|
|
1891
|
-
}) : /* @__PURE__ */ I(
|
|
1892
|
-
element:
|
|
1910
|
+
children: o
|
|
1911
|
+
}) : /* @__PURE__ */ I(qr, {
|
|
1912
|
+
element: h,
|
|
1893
1913
|
interactions: e.interactions,
|
|
1894
1914
|
slots: e.slots
|
|
1895
1915
|
})
|
|
1896
1916
|
});
|
|
1897
1917
|
}
|
|
1898
|
-
var
|
|
1899
|
-
...
|
|
1900
|
-
"core:table":
|
|
1901
|
-
"core:action":
|
|
1902
|
-
"core:toolbarItem":
|
|
1903
|
-
"core:sliceDialog":
|
|
1904
|
-
[
|
|
1905
|
-
[
|
|
1918
|
+
var ni = {
|
|
1919
|
+
...ce,
|
|
1920
|
+
"core:table": Wr,
|
|
1921
|
+
"core:action": qr,
|
|
1922
|
+
"core:toolbarItem": $r,
|
|
1923
|
+
"core:sliceDialog": Qr,
|
|
1924
|
+
[zr]: In,
|
|
1925
|
+
[Dr]: Nr
|
|
1906
1926
|
};
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
function Xr() {
|
|
1927
|
+
// src/useStrings.ts
|
|
1928
|
+
function ri() {
|
|
1910
1929
|
let e = ot(), [t, n] = l([]), [r, i] = l(""), [o, s] = l({});
|
|
1911
1930
|
return a(() => {
|
|
1912
1931
|
let t = new AbortController();
|
|
@@ -1928,11 +1947,11 @@ function Xr() {
|
|
|
1928
1947
|
dictionary: o
|
|
1929
1948
|
};
|
|
1930
1949
|
}
|
|
1931
|
-
var
|
|
1932
|
-
function
|
|
1933
|
-
return
|
|
1950
|
+
var ii = /* @__PURE__ */ new Set(["core:table"]);
|
|
1951
|
+
function ai(e) {
|
|
1952
|
+
return oi(e, /* @__PURE__ */ new Map(), void 0);
|
|
1934
1953
|
}
|
|
1935
|
-
function
|
|
1954
|
+
function oi(e, t, n) {
|
|
1936
1955
|
let r = e;
|
|
1937
1956
|
if (!r.slots) return e;
|
|
1938
1957
|
let i = !1, a = {};
|
|
@@ -1941,7 +1960,7 @@ function $r(e, t, n) {
|
|
|
1941
1960
|
a[e] = o.map((e) => {
|
|
1942
1961
|
let t = e, n = $(t, "typeName");
|
|
1943
1962
|
t.componentName === "core:data" && n && (r.set(n, t), s = t);
|
|
1944
|
-
let a =
|
|
1963
|
+
let a = oi(ci(si(t, r), s), r, s);
|
|
1945
1964
|
return a !== e && (i = !0), a;
|
|
1946
1965
|
});
|
|
1947
1966
|
}
|
|
@@ -1950,8 +1969,8 @@ function $r(e, t, n) {
|
|
|
1950
1969
|
slots: a
|
|
1951
1970
|
} : e;
|
|
1952
1971
|
}
|
|
1953
|
-
function
|
|
1954
|
-
if (!
|
|
1972
|
+
function si(e, t) {
|
|
1973
|
+
if (!ii.has(e.componentName)) return e;
|
|
1955
1974
|
let n = $(e, "typeName"), r = n ? t.get(n) : void 0;
|
|
1956
1975
|
if (!r || e.properties.queryArguments !== void 0) return e;
|
|
1957
1976
|
let i = $(r, "by"), a = { ...e.properties }, o = $(r, "query");
|
|
@@ -1960,7 +1979,7 @@ function ei(e, t) {
|
|
|
1960
1979
|
properties: a
|
|
1961
1980
|
};
|
|
1962
1981
|
}
|
|
1963
|
-
function
|
|
1982
|
+
function ci(e, t) {
|
|
1964
1983
|
if (e.componentName !== "core:action" || !Array.isArray(e.properties?.alternatives) || !t || e.properties.itemQuery !== void 0) return e;
|
|
1965
1984
|
let n = { ...e.properties };
|
|
1966
1985
|
if (t.properties?.isCollection === !0) return n.itemSelection = !0, {
|
|
@@ -1977,9 +1996,8 @@ function $(e, t) {
|
|
|
1977
1996
|
let n = e.properties?.[t];
|
|
1978
1997
|
return typeof n == "string" && n.length > 0 ? n : void 0;
|
|
1979
1998
|
}
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
function ni(e) {
|
|
1999
|
+
// src/stageQueryBindings.tsx
|
|
2000
|
+
function li(e) {
|
|
1983
2001
|
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
1984
2002
|
if (Array.isArray(e)) {
|
|
1985
2003
|
e.forEach(n);
|
|
@@ -1987,11 +2005,7 @@ function ni(e) {
|
|
|
1987
2005
|
}
|
|
1988
2006
|
if (typeof e != "object" || !e) return;
|
|
1989
2007
|
let r = e;
|
|
1990
|
-
|
|
1991
|
-
t.add(r.query);
|
|
1992
|
-
return;
|
|
1993
|
-
}
|
|
1994
|
-
Object.values(r).forEach(n);
|
|
2008
|
+
r.kind === "queryResult" && typeof r.query == "string" && r.query.length > 0 ? t.add(r.query) : Object.values(r).forEach(n);
|
|
1995
2009
|
}, r = (e) => {
|
|
1996
2010
|
let t = e;
|
|
1997
2011
|
t.properties && Object.values(t.properties).forEach(n);
|
|
@@ -1999,7 +2013,7 @@ function ni(e) {
|
|
|
1999
2013
|
};
|
|
2000
2014
|
return r(e), [...t];
|
|
2001
2015
|
}
|
|
2002
|
-
function
|
|
2016
|
+
function ui(e) {
|
|
2003
2017
|
let t = /* @__PURE__ */ new Map(), n = (e, t) => {
|
|
2004
2018
|
let n = e.properties?.[t];
|
|
2005
2019
|
return typeof n == "string" && n.length > 0 ? n : void 0;
|
|
@@ -2018,7 +2032,7 @@ function ri(e) {
|
|
|
2018
2032
|
};
|
|
2019
2033
|
return r(e), [...t.values()];
|
|
2020
2034
|
}
|
|
2021
|
-
function
|
|
2035
|
+
function di({ source: e }) {
|
|
2022
2036
|
let { routes: t, routesReady: n, parameters: r, session: i } = B(), a = e.by ? r[e.by] || i[e.by] : void 0, o = s(() => e.by ? a ? { [e.by]: a } : {} : {
|
|
2023
2037
|
...i,
|
|
2024
2038
|
...r
|
|
@@ -2038,7 +2052,7 @@ function ii({ source: e }) {
|
|
|
2038
2052
|
list: !0
|
|
2039
2053
|
}), null;
|
|
2040
2054
|
}
|
|
2041
|
-
function
|
|
2055
|
+
function fi({ name: e }) {
|
|
2042
2056
|
let { routes: t, routesReady: n, parameters: r, session: i } = B(), a = s(() => ({
|
|
2043
2057
|
...i,
|
|
2044
2058
|
...r
|
|
@@ -2052,116 +2066,143 @@ function ai({ name: e }) {
|
|
|
2052
2066
|
list: !0
|
|
2053
2067
|
}), null;
|
|
2054
2068
|
}
|
|
2055
|
-
function
|
|
2056
|
-
let t = s(() =>
|
|
2057
|
-
return /* @__PURE__ */ L(Re, { children: [t.map((e) => /* @__PURE__ */ I(
|
|
2069
|
+
function pi({ element: e }) {
|
|
2070
|
+
let t = s(() => li(e), [e]), n = s(() => ui(e), [e]);
|
|
2071
|
+
return /* @__PURE__ */ L(Re, { children: [t.map((e) => /* @__PURE__ */ I(fi, { name: e }, e)), n.map((e) => /* @__PURE__ */ I(di, { source: e }, e.typeName))] });
|
|
2058
2072
|
}
|
|
2059
|
-
function
|
|
2073
|
+
function mi(e) {
|
|
2060
2074
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
2061
|
-
for (let r of e)
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
o,
|
|
2067
|
-
a,
|
|
2068
|
-
i
|
|
2069
|
-
]);
|
|
2070
|
-
if (t.has(s)) continue;
|
|
2071
|
-
t.add(s);
|
|
2072
|
-
let c = e.order ?? (typeof r.order == "number" ? r.order : void 0), l = ui(r.destination) ? r.destination : void 0;
|
|
2073
|
-
n.push({
|
|
2074
|
-
label: i,
|
|
2075
|
-
targetScreen: a,
|
|
2076
|
-
hierarchy: o,
|
|
2077
|
-
order: c,
|
|
2078
|
-
...typeof r.icon == "string" ? { icon: r.icon } : {},
|
|
2079
|
-
...typeof r.presentation == "string" ? { presentation: r.presentation } : {},
|
|
2080
|
-
...l && di(l) ? { destination: l } : {}
|
|
2081
|
-
});
|
|
2075
|
+
for (let r of e.flatMap((e) => e.contributions ?? [])) {
|
|
2076
|
+
let e = gi(r);
|
|
2077
|
+
if (!e) continue;
|
|
2078
|
+
let i = _i(e);
|
|
2079
|
+
t.has(i) || (t.add(i), n.push(e));
|
|
2082
2080
|
}
|
|
2083
2081
|
return n.map((e, t) => ({
|
|
2084
2082
|
entry: e,
|
|
2085
2083
|
index: t
|
|
2086
2084
|
})).sort((e, t) => (e.entry.order ?? 2 ** 53 - 1) - (t.entry.order ?? 2 ** 53 - 1) || e.index - t.index).map(({ entry: e }) => e);
|
|
2087
2085
|
}
|
|
2088
|
-
function
|
|
2086
|
+
function hi(e) {
|
|
2089
2087
|
let t = {
|
|
2090
2088
|
label: "",
|
|
2091
2089
|
children: []
|
|
2092
2090
|
};
|
|
2093
2091
|
for (let n of e) {
|
|
2094
|
-
let e = t;
|
|
2095
|
-
|
|
2096
|
-
let n = e.children.find((e) => e.screen === void 0 && e.label === t);
|
|
2097
|
-
n || (n = {
|
|
2098
|
-
label: t,
|
|
2099
|
-
children: []
|
|
2100
|
-
}, e.children.push(n)), e = n;
|
|
2101
|
-
}
|
|
2102
|
-
e.children.push({
|
|
2103
|
-
label: n.label,
|
|
2104
|
-
screen: n.targetScreen,
|
|
2105
|
-
...n.icon ? { icon: n.icon } : {},
|
|
2106
|
-
...n.presentation ? { presentation: n.presentation } : {},
|
|
2107
|
-
...n.destination ? { destination: n.destination } : {},
|
|
2108
|
-
children: []
|
|
2109
|
-
});
|
|
2092
|
+
let e = n.hierarchy.reduce((e, t) => vi(e, t, !1), t);
|
|
2093
|
+
(n.group ? vi(e, n.group, !0) : e).children.push(yi(n));
|
|
2110
2094
|
}
|
|
2111
2095
|
return t.children;
|
|
2112
2096
|
}
|
|
2113
|
-
function
|
|
2097
|
+
function gi(e) {
|
|
2098
|
+
if (e.contributionPointName !== "Navigation") return;
|
|
2099
|
+
let t = e.content?.properties ?? {}, n = t.label, r = t.targetScreen;
|
|
2100
|
+
if (typeof n != "string" || typeof r != "string") return;
|
|
2101
|
+
let i = Array.isArray(t.hierarchy) ? t.hierarchy.filter((e) => typeof e == "string") : [], a = e.order ?? (typeof t.order == "number" ? t.order : void 0), o = t.destination;
|
|
2102
|
+
return {
|
|
2103
|
+
label: n,
|
|
2104
|
+
targetScreen: r,
|
|
2105
|
+
hierarchy: i,
|
|
2106
|
+
order: a,
|
|
2107
|
+
...xi({
|
|
2108
|
+
id: bi(t.id),
|
|
2109
|
+
group: bi(t.group),
|
|
2110
|
+
icon: bi(t.icon),
|
|
2111
|
+
presentation: bi(t.presentation),
|
|
2112
|
+
destination: Ci(o) && wi(o) ? o : void 0
|
|
2113
|
+
})
|
|
2114
|
+
};
|
|
2115
|
+
}
|
|
2116
|
+
function _i(e) {
|
|
2117
|
+
return e.id === void 0 ? JSON.stringify([
|
|
2118
|
+
e.hierarchy,
|
|
2119
|
+
e.targetScreen,
|
|
2120
|
+
e.label
|
|
2121
|
+
]) : JSON.stringify(["id", e.id]);
|
|
2122
|
+
}
|
|
2123
|
+
function vi(e, t, n) {
|
|
2124
|
+
let r = e.children.find((e) => e.screen === void 0 && e.section === !0 === n && e.label === t);
|
|
2125
|
+
if (r) return r;
|
|
2126
|
+
let i = n ? {
|
|
2127
|
+
label: t,
|
|
2128
|
+
section: !0,
|
|
2129
|
+
children: []
|
|
2130
|
+
} : {
|
|
2131
|
+
label: t,
|
|
2132
|
+
children: []
|
|
2133
|
+
};
|
|
2134
|
+
return e.children.push(i), i;
|
|
2135
|
+
}
|
|
2136
|
+
function yi(e) {
|
|
2137
|
+
return {
|
|
2138
|
+
label: e.label,
|
|
2139
|
+
...xi({ id: e.id || void 0 }),
|
|
2140
|
+
screen: e.targetScreen,
|
|
2141
|
+
...xi({
|
|
2142
|
+
icon: e.icon || void 0,
|
|
2143
|
+
presentation: e.presentation || void 0,
|
|
2144
|
+
destination: e.destination
|
|
2145
|
+
}),
|
|
2146
|
+
children: []
|
|
2147
|
+
};
|
|
2148
|
+
}
|
|
2149
|
+
function bi(e) {
|
|
2150
|
+
return typeof e == "string" ? e : void 0;
|
|
2151
|
+
}
|
|
2152
|
+
function xi(e) {
|
|
2153
|
+
return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
|
|
2154
|
+
}
|
|
2155
|
+
function Si(e, t) {
|
|
2114
2156
|
for (let n of e) {
|
|
2115
2157
|
if (n.screen === t) return [n.label];
|
|
2116
|
-
let e =
|
|
2117
|
-
if (e.length > 0) return [n.label, ...e];
|
|
2158
|
+
let e = Si(n.children, t);
|
|
2159
|
+
if (e.length > 0) return n.section ? e : [n.label, ...e];
|
|
2118
2160
|
}
|
|
2119
2161
|
return [];
|
|
2120
2162
|
}
|
|
2121
|
-
function
|
|
2163
|
+
function Ci(e) {
|
|
2122
2164
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
2123
2165
|
}
|
|
2124
|
-
function
|
|
2166
|
+
function wi(e) {
|
|
2125
2167
|
return e.outlet !== void 0 || e.dialog !== void 0 || e.kind === "external" || e.kind === "dialog";
|
|
2126
2168
|
}
|
|
2127
|
-
function
|
|
2169
|
+
function Ti(e, t, n) {
|
|
2128
2170
|
return e.filter((e) => !t.has(e.name)).map((e) => ({
|
|
2129
2171
|
label: e.name,
|
|
2130
2172
|
targetScreen: e.name,
|
|
2131
2173
|
hierarchy: e.path && e.path.length > 0 ? [...e.path] : [n]
|
|
2132
2174
|
}));
|
|
2133
2175
|
}
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
return Ae(e).packages.includes(gi);
|
|
2176
|
+
// src/blueprint.ts
|
|
2177
|
+
var Ei = "Stage:locale", Di = "Stage:themeToggle", Oi = "Cratis.Components", ki = "PrimeReact", Ai = /* @__PURE__ */ new Map();
|
|
2178
|
+
function ji(e) {
|
|
2179
|
+
return Ae(e).packages.includes(ki);
|
|
2139
2180
|
}
|
|
2140
|
-
function
|
|
2141
|
-
|
|
2181
|
+
function Mi(e, t) {
|
|
2182
|
+
Ai.set(e, t);
|
|
2142
2183
|
}
|
|
2143
|
-
function
|
|
2184
|
+
function Ni(e) {
|
|
2144
2185
|
let t = Ae(e);
|
|
2145
2186
|
return {
|
|
2146
2187
|
...t,
|
|
2147
2188
|
name: e?.length ? t.name : "Stage",
|
|
2148
2189
|
packages: x(t.packages, {
|
|
2149
|
-
baseline:
|
|
2190
|
+
baseline: Oi,
|
|
2150
2191
|
catalog: { [Ce]: g.Blueprint }
|
|
2151
2192
|
})
|
|
2152
2193
|
};
|
|
2153
2194
|
}
|
|
2154
|
-
var
|
|
2195
|
+
var Pi = {
|
|
2155
2196
|
...be,
|
|
2156
|
-
[
|
|
2197
|
+
[Oi]: et.components
|
|
2157
2198
|
};
|
|
2158
|
-
function
|
|
2159
|
-
let t = [...
|
|
2199
|
+
function Fi(e) {
|
|
2200
|
+
let t = [...Ai.values()].reduce((e, t) => ({
|
|
2160
2201
|
...e,
|
|
2161
2202
|
...t.components
|
|
2162
2203
|
}), {});
|
|
2163
2204
|
return {
|
|
2164
|
-
...
|
|
2205
|
+
...ce,
|
|
2165
2206
|
...$e,
|
|
2166
2207
|
...t,
|
|
2167
2208
|
...Se,
|
|
@@ -2169,18 +2210,18 @@ function Si(e) {
|
|
|
2169
2210
|
...e
|
|
2170
2211
|
};
|
|
2171
2212
|
}
|
|
2172
|
-
function
|
|
2173
|
-
let t = Object.fromEntries([...
|
|
2213
|
+
function Ii(e) {
|
|
2214
|
+
let t = Object.fromEntries([...Ai].map(([e, t]) => [e, t.declared]));
|
|
2174
2215
|
return {
|
|
2175
2216
|
...e,
|
|
2176
|
-
...
|
|
2217
|
+
...Pi,
|
|
2177
2218
|
...t
|
|
2178
2219
|
};
|
|
2179
2220
|
}
|
|
2180
|
-
var
|
|
2181
|
-
function
|
|
2221
|
+
var Li = "Stage:navigationTree";
|
|
2222
|
+
function Ri(e, t, n) {
|
|
2182
2223
|
let r = t?.title ?? "Cratis Stage";
|
|
2183
|
-
return
|
|
2224
|
+
return P(e, M.Logo, {
|
|
2184
2225
|
label: r,
|
|
2185
2226
|
initials: r.slice(0, 1).toUpperCase() || "S",
|
|
2186
2227
|
targetScreen: n,
|
|
@@ -2189,40 +2230,40 @@ function Ti(e, t, n) {
|
|
|
2189
2230
|
...t?.showName === void 0 ? {} : { showName: t.showName }
|
|
2190
2231
|
});
|
|
2191
2232
|
}
|
|
2192
|
-
function
|
|
2193
|
-
let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l =
|
|
2233
|
+
function zi(e, t, n, r, i, a = !1, o = !0) {
|
|
2234
|
+
let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l = mi(e), u = Ti(e, new Set(l.map((e) => e.targetScreen)), "Other screens"), d = hi([...l, ...l.length > 0 ? u : []]), f = e.map((e, n) => Oe({
|
|
2194
2235
|
label: e.name,
|
|
2195
2236
|
targetScreen: e.name,
|
|
2196
2237
|
icon: "pi pi-table",
|
|
2197
2238
|
group: "Screens",
|
|
2198
2239
|
order: n
|
|
2199
|
-
}, t)), p =
|
|
2240
|
+
}, t)), p = Si(hi(l), t), m = e.find((e) => e.name === t)?.path?.length ? Si(d, t) : [], h = p.length > 0 ? p : m, g = l.length > 0 ? P("menu-hierarchy", Li, {
|
|
2200
2241
|
nodes: d,
|
|
2201
2242
|
activeScreen: t
|
|
2202
|
-
}) :
|
|
2243
|
+
}) : P("menu-screens", M.Menu, {
|
|
2203
2244
|
title: "Screens",
|
|
2204
2245
|
label: "Screens"
|
|
2205
2246
|
}, { items: f }), _ = [];
|
|
2206
|
-
n.length > 1 && _.push(
|
|
2247
|
+
n.length > 1 && _.push(P("topbar-locale", Ei, {
|
|
2207
2248
|
locales: n,
|
|
2208
2249
|
locale: r
|
|
2209
|
-
})), _.push(
|
|
2250
|
+
})), _.push(P("topbar-theme", Di, { label: "Theme" }));
|
|
2210
2251
|
let v = { regionNavigation: a };
|
|
2211
2252
|
return {
|
|
2212
|
-
[N.Topbar]: [
|
|
2213
|
-
logo: [
|
|
2253
|
+
[N.Topbar]: [P("topbar", M.Topbar, v, {
|
|
2254
|
+
logo: [Ri("topbar-logo", i, s)],
|
|
2214
2255
|
end: _
|
|
2215
2256
|
})],
|
|
2216
|
-
[N.Sidebar]: [
|
|
2257
|
+
[N.Sidebar]: [P("sidebar", M.Sidebar, v, { logo: [Ri("sidebar-logo", i, s)] })],
|
|
2217
2258
|
...a ? {} : { [N.Menu]: [g] },
|
|
2218
|
-
[N.Breadcrumb]: [
|
|
2259
|
+
[N.Breadcrumb]: [P("breadcrumb", M.Breadcrumb, {
|
|
2219
2260
|
homeTargetScreen: s,
|
|
2220
2261
|
items: (h.length > 0 ? h : [t]).map((e) => ({ label: e }))
|
|
2221
2262
|
})],
|
|
2222
|
-
...o ? { [N.Footer]: [
|
|
2223
|
-
[N.ConfigPanel]: [
|
|
2263
|
+
...o ? { [N.Footer]: [P("footer", M.Footer, { text: `${c} · rendered from your model` })] } : {},
|
|
2264
|
+
[N.ConfigPanel]: [P(M.ConfigPanel, M.ConfigPanel, {
|
|
2224
2265
|
title: "Settings",
|
|
2225
|
-
themes:
|
|
2266
|
+
themes: we.map((e) => ({
|
|
2226
2267
|
name: e.name,
|
|
2227
2268
|
label: e.name,
|
|
2228
2269
|
isDark: e.isDark ?? !1
|
|
@@ -2230,26 +2271,34 @@ function Ei(e, t, n, r, i, a = !1, o = !0) {
|
|
|
2230
2271
|
})]
|
|
2231
2272
|
};
|
|
2232
2273
|
}
|
|
2233
|
-
function
|
|
2274
|
+
function Bi(e) {
|
|
2234
2275
|
return `#/${encodeURIComponent(e)}`;
|
|
2235
2276
|
}
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2277
|
+
// src/externalRouteHref.ts
|
|
2278
|
+
function Vi(e) {
|
|
2279
|
+
try {
|
|
2280
|
+
let t = new URL(e ?? "");
|
|
2281
|
+
return t.protocol === "http:" || t.protocol === "https:" ? e : void 0;
|
|
2282
|
+
} catch {
|
|
2283
|
+
return;
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
// src/StageChrome.tsx
|
|
2287
|
+
var Hi = t({
|
|
2239
2288
|
locales: [],
|
|
2240
2289
|
locale: "",
|
|
2241
2290
|
setLocale: () => void 0,
|
|
2242
2291
|
activity: ""
|
|
2243
2292
|
});
|
|
2244
|
-
function
|
|
2245
|
-
return /* @__PURE__ */ I(
|
|
2293
|
+
function Ui({ state: e, children: t }) {
|
|
2294
|
+
return /* @__PURE__ */ I(Hi.Provider, {
|
|
2246
2295
|
value: e,
|
|
2247
2296
|
children: t
|
|
2248
2297
|
});
|
|
2249
2298
|
}
|
|
2250
|
-
var
|
|
2251
|
-
function
|
|
2252
|
-
let { locales: e, locale: t, setLocale: n } = i(
|
|
2299
|
+
var Wi = "Stage:activity";
|
|
2300
|
+
function Gi() {
|
|
2301
|
+
let { locales: e, locale: t, setLocale: n } = i(Hi);
|
|
2253
2302
|
return e.length < 2 ? null : /* @__PURE__ */ I("select", {
|
|
2254
2303
|
className: "stage-locale",
|
|
2255
2304
|
"aria-label": "Locale",
|
|
@@ -2261,8 +2310,8 @@ function ji() {
|
|
|
2261
2310
|
}, e))
|
|
2262
2311
|
});
|
|
2263
2312
|
}
|
|
2264
|
-
function
|
|
2265
|
-
let { config: t, setThemeName: n, setColorScheme: r } = je(), i = typeof e.properties.label == "string" ? e.properties.label : "Theme", a =
|
|
2313
|
+
function Ki({ element: e }) {
|
|
2314
|
+
let { config: t, setThemeName: n, setColorScheme: r } = je(), i = typeof e.properties.label == "string" ? e.properties.label : "Theme", a = we.find((e) => e.name === t.themeName)?.isDark ?? t.colorScheme === ve.Dark, o = we.find((e) => (e.isDark ?? !1) !== a);
|
|
2266
2315
|
if (!o) return null;
|
|
2267
2316
|
let s = a ? "Switch to a light theme" : "Switch to a dark theme";
|
|
2268
2317
|
return /* @__PURE__ */ L("div", {
|
|
@@ -2277,7 +2326,7 @@ function Mi({ element: e }) {
|
|
|
2277
2326
|
"aria-label": s,
|
|
2278
2327
|
title: s,
|
|
2279
2328
|
onClick: () => {
|
|
2280
|
-
n(o.name), r(o.isDark ?
|
|
2329
|
+
n(o.name), r(o.isDark ? ve.Dark : ve.Light);
|
|
2281
2330
|
},
|
|
2282
2331
|
children: /* @__PURE__ */ I("svg", {
|
|
2283
2332
|
width: "18",
|
|
@@ -2298,19 +2347,19 @@ function Mi({ element: e }) {
|
|
|
2298
2347
|
})]
|
|
2299
2348
|
});
|
|
2300
2349
|
}
|
|
2301
|
-
function
|
|
2350
|
+
function qi({ element: e }) {
|
|
2302
2351
|
let t = e.properties ?? {};
|
|
2303
2352
|
return /* @__PURE__ */ I("nav", {
|
|
2304
2353
|
className: "stage-navigation-tree",
|
|
2305
2354
|
"aria-label": "Navigation",
|
|
2306
2355
|
"data-scene-id": e.id,
|
|
2307
|
-
children: /* @__PURE__ */ I(
|
|
2356
|
+
children: /* @__PURE__ */ I(Ji, {
|
|
2308
2357
|
nodes: t.nodes ?? [],
|
|
2309
2358
|
activeScreen: t.activeScreen
|
|
2310
2359
|
})
|
|
2311
2360
|
});
|
|
2312
2361
|
}
|
|
2313
|
-
function
|
|
2362
|
+
function Ji({ nodes: e, activeScreen: t }) {
|
|
2314
2363
|
return /* @__PURE__ */ I("ul", {
|
|
2315
2364
|
role: "tree",
|
|
2316
2365
|
children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */ L("li", {
|
|
@@ -2319,13 +2368,13 @@ function Pi({ nodes: e, activeScreen: t }) {
|
|
|
2319
2368
|
children: [/* @__PURE__ */ I("span", {
|
|
2320
2369
|
className: "stage-navigation-group",
|
|
2321
2370
|
children: e.label
|
|
2322
|
-
}), /* @__PURE__ */ I(
|
|
2371
|
+
}), /* @__PURE__ */ I(Ji, {
|
|
2323
2372
|
nodes: e.children,
|
|
2324
2373
|
activeScreen: t
|
|
2325
2374
|
})]
|
|
2326
2375
|
}, e.label) : /* @__PURE__ */ I("li", {
|
|
2327
2376
|
role: "treeitem",
|
|
2328
|
-
children: /* @__PURE__ */ I(
|
|
2377
|
+
children: /* @__PURE__ */ I(Yi, {
|
|
2329
2378
|
node: e,
|
|
2330
2379
|
screen: e.screen,
|
|
2331
2380
|
activeScreen: t
|
|
@@ -2333,13 +2382,14 @@ function Pi({ nodes: e, activeScreen: t }) {
|
|
|
2333
2382
|
}, `${e.screen}:${e.label}`))
|
|
2334
2383
|
});
|
|
2335
2384
|
}
|
|
2336
|
-
function
|
|
2337
|
-
let r = i(
|
|
2385
|
+
function Yi({ node: e, screen: t, activeScreen: n }) {
|
|
2386
|
+
let r = i(k), a = e.presentation === "icon" || e.presentation === "text" ? e.presentation : "both", o = e.destination, s = o?.kind === "external", c = o && r && !s && wi(o) ? (e) => {
|
|
2338
2387
|
e.preventDefault(), r.navigate(o);
|
|
2339
|
-
} : void 0;
|
|
2388
|
+
} : void 0, l = s ? Vi(o.route) : Bi(t), u = s && l === void 0;
|
|
2340
2389
|
return /* @__PURE__ */ L("a", {
|
|
2341
|
-
href:
|
|
2342
|
-
rel: s ? "noreferrer" : void 0,
|
|
2390
|
+
href: l,
|
|
2391
|
+
rel: s && !u ? "noreferrer" : void 0,
|
|
2392
|
+
"aria-disabled": u ? "true" : void 0,
|
|
2343
2393
|
"aria-current": t === n ? "page" : void 0,
|
|
2344
2394
|
"aria-label": a === "icon" ? e.label : void 0,
|
|
2345
2395
|
"data-presentation": e.presentation,
|
|
@@ -2352,8 +2402,8 @@ function Fi({ node: e, screen: t, activeScreen: n }) {
|
|
|
2352
2402
|
}), a !== "icon" && e.label]
|
|
2353
2403
|
});
|
|
2354
2404
|
}
|
|
2355
|
-
function
|
|
2356
|
-
let t = typeof e.properties.name == "string" ? e.properties.name : "", n = i(
|
|
2405
|
+
function Xi({ element: e }) {
|
|
2406
|
+
let t = typeof e.properties.name == "string" ? e.properties.name : "", n = i(k), r = he(), a = B(), o = n?.outlets[t], s = o && r ? r.screens[o] : void 0, c = e.properties.closable === !0;
|
|
2357
2407
|
return /* @__PURE__ */ L("div", {
|
|
2358
2408
|
"data-scene-outlet": t,
|
|
2359
2409
|
"data-scene-outlet-screen": o,
|
|
@@ -2366,23 +2416,26 @@ function Ii({ element: e }) {
|
|
|
2366
2416
|
onClick: () => n?.closeOutlet(t),
|
|
2367
2417
|
children: "Close"
|
|
2368
2418
|
})
|
|
2369
|
-
}), s && r && /* @__PURE__ */ I(
|
|
2419
|
+
}), s && r && /* @__PURE__ */ I(jn, {
|
|
2370
2420
|
element: s,
|
|
2371
|
-
|
|
2372
|
-
|
|
2421
|
+
children: /* @__PURE__ */ I(O, {
|
|
2422
|
+
element: s,
|
|
2423
|
+
registry: r.registry,
|
|
2424
|
+
resolveBinding: a.resolveBinding
|
|
2425
|
+
})
|
|
2373
2426
|
})]
|
|
2374
2427
|
});
|
|
2375
2428
|
}
|
|
2376
|
-
function
|
|
2377
|
-
let { activity: e } = i(
|
|
2429
|
+
function Zi() {
|
|
2430
|
+
let { activity: e } = i(Hi);
|
|
2378
2431
|
return e ? /* @__PURE__ */ I("p", {
|
|
2379
2432
|
className: "stage-activity",
|
|
2380
2433
|
role: "status",
|
|
2381
2434
|
children: e
|
|
2382
2435
|
}) : null;
|
|
2383
2436
|
}
|
|
2384
|
-
function
|
|
2385
|
-
let e =
|
|
2437
|
+
function Qi() {
|
|
2438
|
+
let e = ge(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
|
|
2386
2439
|
return a(() => {
|
|
2387
2440
|
let r = e?.isDark ? "dark" : "light";
|
|
2388
2441
|
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 ?? "";
|
|
@@ -2392,45 +2445,40 @@ function Ri() {
|
|
|
2392
2445
|
n
|
|
2393
2446
|
]), null;
|
|
2394
2447
|
}
|
|
2395
|
-
var
|
|
2396
|
-
[
|
|
2397
|
-
[
|
|
2398
|
-
[
|
|
2399
|
-
[
|
|
2400
|
-
"core:outlet":
|
|
2401
|
-
},
|
|
2448
|
+
var $i = {
|
|
2449
|
+
[Ei]: Gi,
|
|
2450
|
+
[Di]: Ki,
|
|
2451
|
+
[Li]: qi,
|
|
2452
|
+
[Wi]: Zi,
|
|
2453
|
+
"core:outlet": Xi
|
|
2454
|
+
}, ea = [
|
|
2402
2455
|
"navigationMode",
|
|
2403
2456
|
"menuTheme",
|
|
2404
2457
|
"showFooter"
|
|
2405
|
-
],
|
|
2406
|
-
function
|
|
2458
|
+
], ta = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
2459
|
+
function na(e, t, n = !1) {
|
|
2407
2460
|
let r = [], i = t.options ?? {}, a = {
|
|
2408
2461
|
showFooter: !0,
|
|
2409
2462
|
followsSystem: !1,
|
|
2410
2463
|
problems: r
|
|
2411
2464
|
};
|
|
2412
|
-
for (let [e, n] of Object.entries(i)) {
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
} else if (e === "menuTheme") {
|
|
2421
|
-
let e = De.find((e) => e === n);
|
|
2422
|
-
e ? a.menuTheme = e : r.push(`Option 'menuTheme' is '${String(n)}'; expected one of ${De.join(", ")}.`);
|
|
2423
|
-
} else typeof n == "boolean" ? a.showFooter = n : r.push(`Option 'showFooter' is '${String(n)}'; expected true or false.`);
|
|
2424
|
-
}
|
|
2465
|
+
for (let [e, n] of Object.entries(i)) if (!ea.includes(e)) r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${ea.join(", ")}.`);
|
|
2466
|
+
else if (e === "navigationMode") {
|
|
2467
|
+
let e = Ee.find((e) => e === n);
|
|
2468
|
+
e ? a.mode = e : r.push(`Option 'navigationMode' is '${String(n)}'; expected one of ${Ee.join(", ")}.`);
|
|
2469
|
+
} else if (e === "menuTheme") {
|
|
2470
|
+
let e = De.find((e) => e === n);
|
|
2471
|
+
e ? a.menuTheme = e : r.push(`Option 'menuTheme' is '${String(n)}'; expected one of ${De.join(", ")}.`);
|
|
2472
|
+
} else typeof n == "boolean" ? a.showFooter = n : r.push(`Option 'showFooter' is '${String(n)}'; expected true or false.`);
|
|
2425
2473
|
let o = e?.appearance;
|
|
2426
2474
|
if (o?.colorScheme !== void 0) {
|
|
2427
2475
|
a.followsSystem = o.colorScheme === u.System;
|
|
2428
2476
|
let e = a.followsSystem ? n : o.colorScheme === u.Dark;
|
|
2429
|
-
a.colorScheme = e ?
|
|
2477
|
+
a.colorScheme = e ? ve.Dark : ve.Light, a.themeName = we.find((t) => (t.isDark ?? !1) === e)?.name;
|
|
2430
2478
|
}
|
|
2431
|
-
return o?.accent !== void 0 && (
|
|
2479
|
+
return o?.accent !== void 0 && (ta.test(o.accent) ? a.accent = o.accent : r.push(`The accent '${o.accent}' is not a colour written as #rgb or #rrggbb.`)), a;
|
|
2432
2480
|
}
|
|
2433
|
-
function
|
|
2481
|
+
function ra(e, t) {
|
|
2434
2482
|
if (e?.root === void 0) return [];
|
|
2435
2483
|
let n = /* @__PURE__ */ new Set([
|
|
2436
2484
|
v.RootTemplateUnknown,
|
|
@@ -2442,7 +2490,7 @@ function Ui(e, t) {
|
|
|
2442
2490
|
]), r = t.diagnostics.filter((e) => n.has(e.code)).map((e) => e.message);
|
|
2443
2491
|
return r.length === 0 && t.origin !== y.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;
|
|
2444
2492
|
}
|
|
2445
|
-
function
|
|
2493
|
+
function ia(e) {
|
|
2446
2494
|
let t = e.length === 4 ? [...e.slice(1)].map((e) => e + e).join("") : e.slice(1), [n, r, i] = [
|
|
2447
2495
|
0,
|
|
2448
2496
|
2,
|
|
@@ -2450,7 +2498,7 @@ function Wi(e) {
|
|
|
2450
2498
|
].map((e) => parseInt(t.slice(e, e + 2), 16));
|
|
2451
2499
|
return (n * 299 + r * 587 + i * 114) / 1e3 >= 150 ? "#111827" : "#ffffff";
|
|
2452
2500
|
}
|
|
2453
|
-
function
|
|
2501
|
+
function aa(e, t) {
|
|
2454
2502
|
if (t === void 0) return e;
|
|
2455
2503
|
let n = t.length === 4 ? [...t.slice(1)].map((e) => e + e).join("") : t.slice(1), [r, i, a] = [
|
|
2456
2504
|
0,
|
|
@@ -2462,18 +2510,17 @@ function Gi(e, t) {
|
|
|
2462
2510
|
tokens: {
|
|
2463
2511
|
...e.tokens,
|
|
2464
2512
|
"primary.color": t,
|
|
2465
|
-
"primary.contrastColor":
|
|
2513
|
+
"primary.contrastColor": ia(t),
|
|
2466
2514
|
"focus.ring": `0 0 0 2px rgb(${r} ${i} ${a} / 0.4)`
|
|
2467
2515
|
}
|
|
2468
2516
|
}));
|
|
2469
2517
|
}
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
function qi() {
|
|
2518
|
+
// src/StageShellSettings.tsx
|
|
2519
|
+
var oa = "(prefers-color-scheme: dark)";
|
|
2520
|
+
function sa() {
|
|
2474
2521
|
return globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ?? !1;
|
|
2475
2522
|
}
|
|
2476
|
-
function
|
|
2523
|
+
function ca({ settings: e, onSystemSchemeChange: t }) {
|
|
2477
2524
|
let n = c(je());
|
|
2478
2525
|
n.current = je();
|
|
2479
2526
|
let { mode: r, menuTheme: i, colorScheme: o, themeName: s } = e;
|
|
@@ -2487,16 +2534,15 @@ function Ji({ settings: e, onSystemSchemeChange: t }) {
|
|
|
2487
2534
|
s
|
|
2488
2535
|
]), a(() => {
|
|
2489
2536
|
if (!e.followsSystem || !globalThis.matchMedia || !t) return;
|
|
2490
|
-
let n = globalThis.matchMedia(
|
|
2537
|
+
let n = globalThis.matchMedia(oa), r = (e) => t(e.matches);
|
|
2491
2538
|
return n.addEventListener("change", r), () => n.removeEventListener("change", r);
|
|
2492
2539
|
}, [e.followsSystem, t]), null;
|
|
2493
2540
|
}
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
function Yi(e) {
|
|
2541
|
+
// src/stageNavigationModel.ts
|
|
2542
|
+
function la(e) {
|
|
2497
2543
|
return (e?.application.regions.length ?? 0) > 0 || (e?.modules.length ?? 0) > 0;
|
|
2498
2544
|
}
|
|
2499
|
-
function
|
|
2545
|
+
function ua(e) {
|
|
2500
2546
|
let t = /* @__PURE__ */ new Map();
|
|
2501
2547
|
for (let n of e) {
|
|
2502
2548
|
let e = (n.path ?? []).join(".");
|
|
@@ -2509,39 +2555,38 @@ function Xi(e) {
|
|
|
2509
2555
|
return t.get(r) ?? i ?? (e.some((e) => e.name === r) ? r : void 0);
|
|
2510
2556
|
};
|
|
2511
2557
|
}
|
|
2512
|
-
function
|
|
2558
|
+
function da(e) {
|
|
2513
2559
|
return (t) => e.find((e) => e.name === t)?.path?.[0];
|
|
2514
2560
|
}
|
|
2515
|
-
function
|
|
2561
|
+
function fa(e, t, n) {
|
|
2516
2562
|
let r = e.navigation ?? {
|
|
2517
2563
|
application: { regions: [] },
|
|
2518
2564
|
modules: []
|
|
2519
2565
|
};
|
|
2520
2566
|
return {
|
|
2521
2567
|
structure: e.structure ?? { modules: [] },
|
|
2522
|
-
navigation: n ?
|
|
2523
|
-
screenFor:
|
|
2524
|
-
moduleOf:
|
|
2568
|
+
navigation: n ? pa(r, n) : r,
|
|
2569
|
+
screenFor: ua(e.screens),
|
|
2570
|
+
moduleOf: da(e.screens),
|
|
2525
2571
|
...t ? { isVisible: t } : {}
|
|
2526
2572
|
};
|
|
2527
2573
|
}
|
|
2528
|
-
function
|
|
2529
|
-
return typeof e == "string" ? ee(e, t) : Array.isArray(e) ? e.map((e) =>
|
|
2574
|
+
function pa(e, t) {
|
|
2575
|
+
return typeof e == "string" ? ee(e, t) : Array.isArray(e) ? e.map((e) => pa(e, t)) : typeof e == "object" && e ? Object.fromEntries(Object.entries(e).map(([e, n]) => [e, pa(n, t)])) : e;
|
|
2530
2576
|
}
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
function ea(e) {
|
|
2577
|
+
// src/stageSlices.ts
|
|
2578
|
+
function ma(e) {
|
|
2534
2579
|
return (t) => K(e?.[t] ?? "").filter((e) => e.unsupportedReason === void 0 && !e.members && !e.item).map((e) => ({
|
|
2535
2580
|
name: e.name,
|
|
2536
2581
|
type: e.type === "text" || e.type === void 0 ? "string" : e.type,
|
|
2537
|
-
label:
|
|
2582
|
+
label: ha(e.name),
|
|
2538
2583
|
required: e.required
|
|
2539
2584
|
}));
|
|
2540
2585
|
}
|
|
2541
|
-
function
|
|
2586
|
+
function ha(e) {
|
|
2542
2587
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase());
|
|
2543
2588
|
}
|
|
2544
|
-
function
|
|
2589
|
+
function ga(e, t, n) {
|
|
2545
2590
|
return { invoke: async (r, i, a) => {
|
|
2546
2591
|
let o = a ?? r.slice(r.lastIndexOf(".") + 1);
|
|
2547
2592
|
if (!W(o)) return {
|
|
@@ -2560,21 +2605,8 @@ function na(e, t, n) {
|
|
|
2560
2605
|
};
|
|
2561
2606
|
} };
|
|
2562
2607
|
}
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
function ra(e) {
|
|
2566
|
-
let t = new Set(e.map((e) => e.name));
|
|
2567
|
-
return e.map((e) => {
|
|
2568
|
-
let n = e.fitsSlot, r = n?.includes(".") ? n.slice(0, n.lastIndexOf(".")) : void 0;
|
|
2569
|
-
return r !== void 0 && r !== e.name && t.has(r) ? {
|
|
2570
|
-
...e,
|
|
2571
|
-
fitsSlot: "content"
|
|
2572
|
-
} : e;
|
|
2573
|
-
});
|
|
2574
|
-
}
|
|
2575
|
-
//#endregion
|
|
2576
|
-
//#region src/withoutSeededSlots.ts
|
|
2577
|
-
function ia(e, t) {
|
|
2608
|
+
// src/withoutSeededSlots.ts
|
|
2609
|
+
function _a(e, t) {
|
|
2578
2610
|
let n = /* @__PURE__ */ new Map();
|
|
2579
2611
|
for (let e of t) n.has(e.name) || n.set(e.name, e.slots.map((e) => e.name));
|
|
2580
2612
|
return e.map((e) => {
|
|
@@ -2590,9 +2622,8 @@ function ia(e, t) {
|
|
|
2590
2622
|
};
|
|
2591
2623
|
});
|
|
2592
2624
|
}
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
var aa = /* @__PURE__ */ new Map([
|
|
2625
|
+
// src/stageIcons.ts
|
|
2626
|
+
var va = /* @__PURE__ */ new Map([
|
|
2596
2627
|
["chart", "chart-column"],
|
|
2597
2628
|
["add", "plus"],
|
|
2598
2629
|
["dollar", "dollar-sign"],
|
|
@@ -2600,24 +2631,23 @@ var aa = /* @__PURE__ */ new Map([
|
|
|
2600
2631
|
["refresh", "refresh-cw"],
|
|
2601
2632
|
["invoice", "receipt-text"],
|
|
2602
2633
|
["batch", "layers"]
|
|
2603
|
-
]),
|
|
2634
|
+
]), ya = (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(), ba = j([{
|
|
2604
2635
|
library: _,
|
|
2605
2636
|
loadGlyph: async ({ key: e }) => {
|
|
2606
|
-
let t =
|
|
2637
|
+
let t = ya(e), n = va.get(t) ?? t;
|
|
2607
2638
|
if (Object.hasOwn(tt, n)) return (await tt[n]())?.default;
|
|
2608
2639
|
}
|
|
2609
2640
|
}]);
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
return Si({
|
|
2641
|
+
// src/App.tsx
|
|
2642
|
+
function xa(e = {}) {
|
|
2643
|
+
return Fi({
|
|
2614
2644
|
...e,
|
|
2615
|
-
...
|
|
2616
|
-
|
|
2645
|
+
...ni,
|
|
2646
|
+
...$i
|
|
2617
2647
|
});
|
|
2618
2648
|
}
|
|
2619
|
-
function
|
|
2620
|
-
return
|
|
2649
|
+
function Sa(e, t) {
|
|
2650
|
+
return P(`form-${e}-${t.name}`, zr, {
|
|
2621
2651
|
command: t.forCommand,
|
|
2622
2652
|
label: t.name,
|
|
2623
2653
|
generationMode: t.generationMode,
|
|
@@ -2625,35 +2655,36 @@ function la(e, t) {
|
|
|
2625
2655
|
fields: t.fields
|
|
2626
2656
|
});
|
|
2627
2657
|
}
|
|
2628
|
-
function
|
|
2658
|
+
function Ca(e, t) {
|
|
2629
2659
|
let n = e.screens[0];
|
|
2630
|
-
return
|
|
2631
|
-
profile:
|
|
2632
|
-
blueprintTemplates:
|
|
2660
|
+
return Te(e, n, {
|
|
2661
|
+
profile: Ni(e.uiProfiles),
|
|
2662
|
+
blueprintTemplates: t?.length ? [...F, ...t] : F
|
|
2633
2663
|
});
|
|
2634
2664
|
}
|
|
2635
|
-
function
|
|
2636
|
-
let s =
|
|
2665
|
+
function wa(e, t, n, r, i, a, o = !0) {
|
|
2666
|
+
let s = la(e.navigation), c = Ta(e);
|
|
2637
2667
|
return {
|
|
2638
|
-
profile:
|
|
2639
|
-
catalog:
|
|
2640
|
-
blueprintTemplates:
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2668
|
+
profile: Ni(e.uiProfiles),
|
|
2669
|
+
catalog: Ii(r),
|
|
2670
|
+
blueprintTemplates: a?.length ? [...F, ...a] : F,
|
|
2671
|
+
namedTemplateOnly: !0,
|
|
2672
|
+
chrome: (r, i) => i === M.FullPageShell ? { [N.ConfigPanel]: zi(e.screens, r.name, t, n, c, s, o)[N.ConfigPanel] } : zi(e.screens, r.name, t, n, c, s, o),
|
|
2673
|
+
form: Sa,
|
|
2674
|
+
trailing: [P("activity", Wi)],
|
|
2644
2675
|
decorate: (e) => {
|
|
2645
|
-
let t =
|
|
2676
|
+
let t = ai(e);
|
|
2646
2677
|
return i ? w(t, i) : t;
|
|
2647
2678
|
}
|
|
2648
2679
|
};
|
|
2649
2680
|
}
|
|
2650
|
-
function
|
|
2681
|
+
function Ta(e) {
|
|
2651
2682
|
let t = e.navigation?.application.logo;
|
|
2652
2683
|
if (t) return {
|
|
2653
2684
|
title: t.title,
|
|
2654
2685
|
image: t.image || void 0
|
|
2655
2686
|
};
|
|
2656
|
-
let n =
|
|
2687
|
+
let n = Ni(e.uiProfiles).identity;
|
|
2657
2688
|
if (!n?.name) return;
|
|
2658
2689
|
let r = n.logo;
|
|
2659
2690
|
return {
|
|
@@ -2663,22 +2694,22 @@ function fa(e) {
|
|
|
2663
2694
|
showName: n.showName
|
|
2664
2695
|
};
|
|
2665
2696
|
}
|
|
2666
|
-
function
|
|
2667
|
-
let [o] =
|
|
2668
|
-
return xe(e, o,
|
|
2697
|
+
function Ea(e, t, n, r, i, a) {
|
|
2698
|
+
let [o] = kr([t], Da(e));
|
|
2699
|
+
return xe(e, o, wa(e, n, r, i, void 0, a)).element;
|
|
2669
2700
|
}
|
|
2670
|
-
function
|
|
2701
|
+
function Da(e) {
|
|
2671
2702
|
return [...e.screenTemplates ?? [], ...e.dialogTemplates ?? []];
|
|
2672
2703
|
}
|
|
2673
|
-
function
|
|
2704
|
+
function Oa() {
|
|
2674
2705
|
try {
|
|
2675
2706
|
return globalThis.localStorage ?? null;
|
|
2676
2707
|
} catch {
|
|
2677
2708
|
return null;
|
|
2678
2709
|
}
|
|
2679
2710
|
}
|
|
2680
|
-
function
|
|
2681
|
-
let c = ot(), [u, d] = l(), [f, p] = l(""), m = s(() =>
|
|
2711
|
+
function ka({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: i, routing: o = "hash" } = {}) {
|
|
2712
|
+
let c = ot(), [u, d] = l(), [f, p] = l(""), m = s(() => xa(e), [e, u]), h = st(), g = ri();
|
|
2682
2713
|
return a(() => {
|
|
2683
2714
|
let e = new AbortController();
|
|
2684
2715
|
return c.scene(e.signal).then((e) => d(r?.length ? {
|
|
@@ -2690,7 +2721,7 @@ function ga({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
|
|
|
2690
2721
|
}, [c, r]), f ? /* @__PURE__ */ L("main", {
|
|
2691
2722
|
className: "stage-message",
|
|
2692
2723
|
children: [/* @__PURE__ */ I("h1", { children: "Unable to render this Stage" }), /* @__PURE__ */ I("p", { children: f })]
|
|
2693
|
-
}) : u ? /* @__PURE__ */ I(
|
|
2724
|
+
}) : u ? /* @__PURE__ */ I(Aa, {
|
|
2694
2725
|
scene: u,
|
|
2695
2726
|
registry: m,
|
|
2696
2727
|
routing: o,
|
|
@@ -2704,20 +2735,20 @@ function ga({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
|
|
|
2704
2735
|
children: /* @__PURE__ */ I("h1", { children: "Preparing the Stage" })
|
|
2705
2736
|
});
|
|
2706
2737
|
}
|
|
2707
|
-
function
|
|
2738
|
+
function Aa({ scene: e, registry: t, routing: n, routeState: i, strings: a, packageCatalog: o, screenTemplates: c, isVisible: u }) {
|
|
2708
2739
|
let d = s(() => {
|
|
2709
|
-
if (cn(n), n === "hash") return
|
|
2740
|
+
if (cn(n), n === "hash") return ue();
|
|
2710
2741
|
let e = /^#\/(.+)$/.exec(globalThis.location.hash);
|
|
2711
|
-
return e && globalThis.history.replaceState(null, "", `/${e[1]}`),
|
|
2712
|
-
}, [n]), [f, p] = l(
|
|
2742
|
+
return e && globalThis.history.replaceState(null, "", `/${e[1]}`), le(window, "/");
|
|
2743
|
+
}, [n]), [f, p] = l(sa), m = e.screens[0]?.name ?? "", h = s(() => Ni(e.uiProfiles), [e]), g = s(() => m ? Ca(e, c) : void 0, [
|
|
2713
2744
|
e,
|
|
2714
2745
|
c,
|
|
2715
2746
|
m
|
|
2716
|
-
]), _ = s(() => g ?
|
|
2747
|
+
]), _ = s(() => g ? ra(h, g) : [], [h, g]), v = s(() => g ? na(h, g, f) : void 0, [
|
|
2717
2748
|
h,
|
|
2718
2749
|
g,
|
|
2719
2750
|
f
|
|
2720
|
-
]), y = s(() =>
|
|
2751
|
+
]), y = s(() => aa(we, v?.accent), [v?.accent]), b = v?.showFooter ?? !0, x = s(() => wa(e, a.locales, a.locale, o, a.dictionary, c, b), [
|
|
2721
2752
|
e,
|
|
2722
2753
|
a.locales,
|
|
2723
2754
|
a.locale,
|
|
@@ -2725,18 +2756,18 @@ function _a({ scene: e, registry: t, routing: n, routeState: i, strings: a, pack
|
|
|
2725
2756
|
o,
|
|
2726
2757
|
c,
|
|
2727
2758
|
b
|
|
2728
|
-
]), S = r((e) => p(e), []), C = s(() =>
|
|
2759
|
+
]), S = r((e) => p(e), []), C = s(() => fa(e, u, a.dictionary), [
|
|
2729
2760
|
e,
|
|
2730
2761
|
u,
|
|
2731
2762
|
a.dictionary
|
|
2732
2763
|
]), w = s(() => ({
|
|
2733
2764
|
...e,
|
|
2734
|
-
screens:
|
|
2765
|
+
screens: kr(_a(e.screens, [
|
|
2735
2766
|
...e.screenTemplates,
|
|
2736
2767
|
...e.dialogTemplates ?? [],
|
|
2737
|
-
...
|
|
2768
|
+
...F,
|
|
2738
2769
|
...c ?? []
|
|
2739
|
-
]),
|
|
2770
|
+
]), Da(e))
|
|
2740
2771
|
}), [e, c]);
|
|
2741
2772
|
return m ? _.length > 0 ? /* @__PURE__ */ L("main", {
|
|
2742
2773
|
className: "stage-message",
|
|
@@ -2747,15 +2778,15 @@ function _a({ scene: e, registry: t, routing: n, routeState: i, strings: a, pack
|
|
|
2747
2778
|
/* @__PURE__ */ I("p", { children: "The ui profile's root template cannot be the application's shell." }),
|
|
2748
2779
|
/* @__PURE__ */ I("ul", { children: _.map((e) => /* @__PURE__ */ I("li", { children: e }, e)) })
|
|
2749
2780
|
]
|
|
2750
|
-
}) : /* @__PURE__ */ I(
|
|
2781
|
+
}) : /* @__PURE__ */ I(_e, {
|
|
2751
2782
|
application: w,
|
|
2752
2783
|
composition: x,
|
|
2753
2784
|
navigationModel: C,
|
|
2754
2785
|
registry: t,
|
|
2755
2786
|
initialScreen: m,
|
|
2756
2787
|
history: d,
|
|
2757
|
-
layoutConfigStorage:
|
|
2758
|
-
scope: (t, n) => /* @__PURE__ */ I(
|
|
2788
|
+
layoutConfigStorage: Oa(),
|
|
2789
|
+
scope: (t, n) => /* @__PURE__ */ I(ja, {
|
|
2759
2790
|
scene: e,
|
|
2760
2791
|
routeState: i,
|
|
2761
2792
|
strings: a,
|
|
@@ -2765,13 +2796,13 @@ function _a({ scene: e, registry: t, routing: n, routeState: i, strings: a, pack
|
|
|
2765
2796
|
onSystemSchemeChange: S,
|
|
2766
2797
|
children: n
|
|
2767
2798
|
}),
|
|
2768
|
-
renderScreen: (e, n) => /* @__PURE__ */ I(
|
|
2799
|
+
renderScreen: (e, n) => /* @__PURE__ */ I(Na, {
|
|
2769
2800
|
element: e,
|
|
2770
2801
|
configuration: n,
|
|
2771
2802
|
registry: t
|
|
2772
2803
|
}),
|
|
2773
|
-
renderDialog: () => /* @__PURE__ */ I(
|
|
2774
|
-
renderDialogTemplate: (e, n, r) => /* @__PURE__ */ I(
|
|
2804
|
+
renderDialog: () => /* @__PURE__ */ I(Qr, {}),
|
|
2805
|
+
renderDialogTemplate: (e, n, r) => /* @__PURE__ */ I(Pa, {
|
|
2775
2806
|
template: e,
|
|
2776
2807
|
content: n,
|
|
2777
2808
|
registry: t,
|
|
@@ -2783,7 +2814,7 @@ function _a({ scene: e, registry: t, routing: n, routeState: i, strings: a, pack
|
|
|
2783
2814
|
children: [/* @__PURE__ */ I("h1", { children: "Nothing to show yet" }), /* @__PURE__ */ I("p", { children: "This model has no slice carrying a command or a read model, so there is no screen to render." })]
|
|
2784
2815
|
});
|
|
2785
2816
|
}
|
|
2786
|
-
function
|
|
2817
|
+
function ja({ scene: e, routeState: t, strings: n, navigation: r, themes: i, shellSettings: o, onSystemSchemeChange: s, children: c }) {
|
|
2787
2818
|
let [u, f] = l(""), { navigate: p } = r;
|
|
2788
2819
|
return a(() => f(""), [r.currentScreen, r.currentDialog]), a(() => {
|
|
2789
2820
|
let e = (e) => {
|
|
@@ -2801,15 +2832,15 @@ function va({ scene: e, routeState: t, strings: n, navigation: r, themes: i, she
|
|
|
2801
2832
|
};
|
|
2802
2833
|
return globalThis.addEventListener("cratis.scene.navigate", t), () => globalThis.removeEventListener("cratis.scene.navigate", t);
|
|
2803
2834
|
}, [p, e]), /* @__PURE__ */ I(re, {
|
|
2804
|
-
registry:
|
|
2835
|
+
registry: ba,
|
|
2805
2836
|
children: /* @__PURE__ */ L(ye, {
|
|
2806
2837
|
themes: i,
|
|
2807
2838
|
children: [
|
|
2808
|
-
o && /* @__PURE__ */ I(
|
|
2839
|
+
o && /* @__PURE__ */ I(ca, {
|
|
2809
2840
|
settings: o,
|
|
2810
2841
|
onSystemSchemeChange: s
|
|
2811
2842
|
}),
|
|
2812
|
-
/* @__PURE__ */ I(
|
|
2843
|
+
/* @__PURE__ */ I(Qi, {}),
|
|
2813
2844
|
/* @__PURE__ */ I(Vt, {
|
|
2814
2845
|
routes: t.routes,
|
|
2815
2846
|
routesReady: t.ready,
|
|
@@ -2817,7 +2848,7 @@ function va({ scene: e, routeState: t, strings: n, navigation: r, themes: i, she
|
|
|
2817
2848
|
locale: n.locale,
|
|
2818
2849
|
locales: n.locales,
|
|
2819
2850
|
screen: r.primaryScreen ?? e.screens[0]?.name ?? "",
|
|
2820
|
-
children: /* @__PURE__ */ I(
|
|
2851
|
+
children: /* @__PURE__ */ I(Ma, {
|
|
2821
2852
|
activity: u,
|
|
2822
2853
|
routesReady: t.ready,
|
|
2823
2854
|
scene: e,
|
|
@@ -2830,12 +2861,12 @@ function va({ scene: e, routeState: t, strings: n, navigation: r, themes: i, she
|
|
|
2830
2861
|
})
|
|
2831
2862
|
});
|
|
2832
2863
|
}
|
|
2833
|
-
function
|
|
2834
|
-
let o = B(), c =
|
|
2864
|
+
function Ma({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i, children: a }) {
|
|
2865
|
+
let o = B(), c = me(), l = an(), u = s(() => ga(l, t, o.refreshAfterCommand), [
|
|
2835
2866
|
l,
|
|
2836
2867
|
t,
|
|
2837
2868
|
o.refreshAfterCommand
|
|
2838
|
-
]), f = s(() =>
|
|
2869
|
+
]), f = s(() => ma(n.commandSchemas), [n.commandSchemas]), p = A({
|
|
2839
2870
|
executeCommand: async (e, n) => {
|
|
2840
2871
|
let i = W(e);
|
|
2841
2872
|
if (!i && !t) return r(`The modeled command “${e}” is waiting for Stage routes.`), {
|
|
@@ -2871,16 +2902,16 @@ function ya({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
|
|
|
2871
2902
|
refreshQuery: async (e) => o.refreshQuery(e),
|
|
2872
2903
|
raise: async (e) => r(`The modeled trigger “${e}” is not available in this Stage runtime.`)
|
|
2873
2904
|
});
|
|
2874
|
-
return /* @__PURE__ */ I(
|
|
2905
|
+
return /* @__PURE__ */ I(Ui, {
|
|
2875
2906
|
state: {
|
|
2876
2907
|
locales: i.locales,
|
|
2877
2908
|
locale: i.locale,
|
|
2878
2909
|
setLocale: i.setLocale,
|
|
2879
2910
|
activity: e
|
|
2880
2911
|
},
|
|
2881
|
-
children: /* @__PURE__ */ I(
|
|
2912
|
+
children: /* @__PURE__ */ I(oe, {
|
|
2882
2913
|
invoker: u,
|
|
2883
|
-
children: /* @__PURE__ */ I(
|
|
2914
|
+
children: /* @__PURE__ */ I(ie, {
|
|
2884
2915
|
fieldsFor: f,
|
|
2885
2916
|
children: /* @__PURE__ */ I(D, {
|
|
2886
2917
|
dispatcher: p,
|
|
@@ -2896,18 +2927,21 @@ function ya({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
|
|
|
2896
2927
|
})
|
|
2897
2928
|
});
|
|
2898
2929
|
}
|
|
2899
|
-
function
|
|
2930
|
+
function Na({ element: e, configuration: t, registry: n }) {
|
|
2900
2931
|
let r = B(), i = $t();
|
|
2901
|
-
return /* @__PURE__ */ L(
|
|
2932
|
+
return /* @__PURE__ */ L(jn, {
|
|
2902
2933
|
element: e,
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2934
|
+
children: [/* @__PURE__ */ I(pi, { element: e }), /* @__PURE__ */ I(O, {
|
|
2935
|
+
element: e,
|
|
2936
|
+
registry: n,
|
|
2937
|
+
resolveBinding: r.resolveBinding,
|
|
2938
|
+
queryResults: r.queryResults,
|
|
2939
|
+
onComponentOutputsChanged: i,
|
|
2940
|
+
configuration: t
|
|
2941
|
+
})]
|
|
2942
|
+
});
|
|
2943
|
+
}
|
|
2944
|
+
function Pa({ template: e, content: t, registry: n, strings: r, close: i }) {
|
|
2911
2945
|
let o = B(), s = $t(), c = w(t, r.dictionary);
|
|
2912
2946
|
return a(() => {
|
|
2913
2947
|
let e = (e) => {
|
|
@@ -2925,15 +2959,17 @@ function xa({ template: e, content: t, registry: n, strings: r, close: i }) {
|
|
|
2925
2959
|
type: "button",
|
|
2926
2960
|
onClick: i,
|
|
2927
2961
|
children: "Close"
|
|
2928
|
-
}), /* @__PURE__ */ I(
|
|
2962
|
+
}), /* @__PURE__ */ I(jn, {
|
|
2929
2963
|
element: c,
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2964
|
+
children: /* @__PURE__ */ I(O, {
|
|
2965
|
+
element: c,
|
|
2966
|
+
registry: n,
|
|
2967
|
+
resolveBinding: o.resolveBinding,
|
|
2968
|
+
queryResults: o.queryResults,
|
|
2969
|
+
onComponentOutputsChanged: s
|
|
2970
|
+
})
|
|
2934
2971
|
})]
|
|
2935
2972
|
})
|
|
2936
2973
|
});
|
|
2937
2974
|
}
|
|
2938
|
-
|
|
2939
|
-
export { ga as App, ga as StageApplication, jn as StageCommandForm, Vt as StageDataProvider, br as StageGuardedAction, at as StageSourceProvider, pa as composeStageScreen, na as createStageSliceInvoker, Ht as dataChanged, nn as executeRegisteredCommand, ft as hostedBasePath, vi as listsPrimeReact, yt as performQuery, ht as registerQueryRouteResolver, yi as registerStageLibrary, W as registeredCommand, gt as registeredQuery, ea as sliceFieldsFrom, ca as stageApplicationRegistry, da as stageComposition, e as stageDarkSelector, rt as stageEndpoints, ua as stageShellOf, nt as staticStageSource, bt as subscribeQuery, an as useStageCommandExecutor, B as useStageData, V as useStageQuery, ot as useStageSource };
|
|
2975
|
+
export { ka as App, ka as StageApplication, In as StageCommandForm, Vt as StageDataProvider, Tr as StageGuardedAction, at as StageSourceProvider, Ea as composeStageScreen, ga as createStageSliceInvoker, Ht as dataChanged, nn as executeRegisteredCommand, ft as hostedBasePath, ji as listsPrimeReact, yt as performQuery, ht as registerQueryRouteResolver, Mi as registerStageLibrary, W as registeredCommand, gt as registeredQuery, ma as sliceFieldsFrom, xa as stageApplicationRegistry, wa as stageComposition, e as stageDarkSelector, rt as stageEndpoints, Ca as stageShellOf, nt as staticStageSource, bt as subscribeQuery, an as useStageCommandExecutor, B as useStageData, V as useStageQuery, ot as useStageSource };
|