@cratis/stage.runtime 4.186.0 → 4.187.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/StageCommandForm.d.ts +24 -0
- package/dist/src/index.js +741 -681
- package/dist/src/stageComponentOutputs.d.ts +10 -0
- package/dist/src/stageComponents.d.ts +3 -1
- package/dist/src/stageData.d.ts +15 -4
- package/dist/src/stageDataSources.d.ts +3 -3
- package/dist/src/stageFormSchema.d.ts +5 -0
- package/dist/src/stageSession.d.ts +25 -0
- package/package.json +1 -1
package/dist/src/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import "./app.css";
|
|
2
|
-
import { createContext as e, createElement as t, useCallback as n, useContext as r, useEffect as i,
|
|
3
|
-
import { ColorScheme as
|
|
4
|
-
import { ShellDiagnosticCode as
|
|
5
|
-
import { CoreSliceDialog as
|
|
6
|
-
import { ApplicationHost as
|
|
2
|
+
import { createContext as e, createElement as t, useCallback as n, useContext as r, useEffect as i, useId as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
3
|
+
import { ColorScheme as l, DestinationKind as u, FormGenerationMode as d, FormWidthUnit as f, InteractionTriggerKind as p } from "@cratis/scene.model";
|
|
4
|
+
import { ShellDiagnosticCode as m, ShellOrigin as h, createBindingResolver as g, resolveArgumentSource as _, resolveBehaviors as v, resolveStringsInElement as y, runBindings as b, validateBindingExpression as x } from "@cratis/scene.engine";
|
|
5
|
+
import { CoreSliceDialog as S, CoreToolbarItem as C, InteractionScope as ee, SceneElementView as w, SceneNavigationContextInternal as te, SliceCommandFieldsProvider as ne, SliceDialogView as re, SliceInvokerProvider as T, attachmentFor as ie, coreComponents as E, createBrowserDispatcher as ae, createHashSceneHistory as D, sliceDialogParameters as O, useInteractionScope as oe, useOptionalSceneNavigation as se, useSceneNavigation as ce, useSceneOutlets as le, useSceneTheme as k } from "@cratis/scene.react";
|
|
6
|
+
import { ApplicationHost as ue, ColorScheme as A, ComponentName as j, LayoutThemeProvider as de, SlotName as M, blueprintPackageCatalog as fe, composeApplicationScreen as pe, defaultBlueprintComponents as me, defaultBlueprintName as he, defaultBlueprintThemes as ge, effectiveShellOf as _e, externalComponent as N, galleryScreenTemplates as ve, layoutModes as ye, menuThemes as be, navigationElement as xe, previewComponents as Se, previewProfile as Ce, useLayoutConfig as we } from "@cratis/scene.blueprint.default";
|
|
7
7
|
import "@cratis/scene.blueprint.default/styles.css";
|
|
8
|
-
import { Globals as
|
|
9
|
-
import { ServerSentEventQueryConnection as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { Button as
|
|
12
|
-
import { PrimeDialog as
|
|
13
|
-
import { ArcContext as
|
|
14
|
-
import { Command as
|
|
15
|
-
import { resolveCommand as
|
|
16
|
-
import { CommandForm as
|
|
17
|
-
import { CalendarField as
|
|
18
|
-
import
|
|
8
|
+
import { Globals as Te } from "@cratis/arc";
|
|
9
|
+
import { ServerSentEventQueryConnection as Ee } from "@cratis/arc/queries";
|
|
10
|
+
import { Fragment as De, jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
11
|
+
import { Button as I } from "primereact/button";
|
|
12
|
+
import { PrimeDialog as Oe, PrimeMessage as ke, primeReactComponents as Ae, primeReactPackageManifest as je } from "@cratis/scene.primereact";
|
|
13
|
+
import { ArcContext as Me } from "@cratis/arc.react";
|
|
14
|
+
import { Command as Ne } from "@cratis/arc/commands";
|
|
15
|
+
import { resolveCommand as Pe } from "@cratis/scene.components";
|
|
16
|
+
import { CommandForm as Fe, asCommandFormField as Ie } from "@cratis/arc.react/commands";
|
|
17
|
+
import { CalendarField as Le, CheckboxField as Re, DropdownField as ze, InputTextField as Be, NumberField as Ve } from "@cratis/components/CommandForm";
|
|
18
|
+
import He from "@primeuix/themes/lara";
|
|
19
19
|
//#region src/stageSource.ts
|
|
20
|
-
function
|
|
20
|
+
function Ue(e) {
|
|
21
21
|
return {
|
|
22
22
|
scene: async () => e.scene,
|
|
23
23
|
routes: async () => e.routes,
|
|
@@ -25,23 +25,23 @@ function Ve(e) {
|
|
|
25
25
|
strings: async (t) => e.strings[t] ?? {}
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
var
|
|
28
|
+
var We = {
|
|
29
29
|
scene: "stage/scene",
|
|
30
30
|
routes: "stage/routes",
|
|
31
31
|
locales: "stage/locales",
|
|
32
32
|
strings: (e) => `stage/strings/${encodeURIComponent(e)}`
|
|
33
|
-
},
|
|
34
|
-
function
|
|
35
|
-
return t(
|
|
33
|
+
}, Ge = e(void 0);
|
|
34
|
+
function Ke({ source: e, children: n }) {
|
|
35
|
+
return t(Ge.Provider, { value: e }, n);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
let e = r(
|
|
37
|
+
function L() {
|
|
38
|
+
let e = r(Ge);
|
|
39
39
|
if (!e) throw Error("A StageSourceProvider is required to render a Stage application.");
|
|
40
40
|
return e;
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
function
|
|
44
|
-
let e =
|
|
42
|
+
We.routes;
|
|
43
|
+
function qe() {
|
|
44
|
+
let e = L(), [t, n] = c({
|
|
45
45
|
routes: void 0,
|
|
46
46
|
ready: !1
|
|
47
47
|
});
|
|
@@ -60,14 +60,14 @@ function Ke() {
|
|
|
60
60
|
}), () => t.abort();
|
|
61
61
|
}, [e]), t;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function Je(e) {
|
|
64
64
|
if (R(e)) return typeof e.subject == "string" ? e.subject : typeof e.path == "string" ? e.path : void 0;
|
|
65
65
|
}
|
|
66
|
-
var
|
|
66
|
+
var Ye = "STAGE-SCENE-ACTION-001", Xe = "item.";
|
|
67
67
|
function R(e) {
|
|
68
68
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Ze(e, t) {
|
|
71
71
|
let n = e;
|
|
72
72
|
for (let e of t.split(".").filter(Boolean)) {
|
|
73
73
|
if (!R(n)) return;
|
|
@@ -75,20 +75,20 @@ function Xe(e, t) {
|
|
|
75
75
|
}
|
|
76
76
|
return n;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Qe(e) {
|
|
79
79
|
return e === null || [
|
|
80
80
|
"string",
|
|
81
81
|
"number",
|
|
82
82
|
"boolean"
|
|
83
83
|
].includes(typeof e);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function $e(e, t) {
|
|
86
86
|
if (typeof e == "number") return t[e];
|
|
87
87
|
if (typeof e == "string") return t.find((t) => t.toLowerCase() === e.toLowerCase());
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function et(e, t, n, r) {
|
|
90
90
|
if (r !== void 0 && (t === "Equal" || t === "NotEqual")) {
|
|
91
|
-
let i =
|
|
91
|
+
let i = $e(e, r), a = typeof n == "string" ? r.find((e) => e.toLowerCase() === n.toLowerCase()) : void 0;
|
|
92
92
|
return i === void 0 || a === void 0 ? !1 : t === "Equal" ? i === a : i !== a;
|
|
93
93
|
}
|
|
94
94
|
switch (t) {
|
|
@@ -103,46 +103,79 @@ function $e(e, t, n, r) {
|
|
|
103
103
|
default: return;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function tt(e, t) {
|
|
107
107
|
if (R(e)) {
|
|
108
108
|
if (e.kind === "comparison") {
|
|
109
|
-
let n =
|
|
110
|
-
if (typeof n != "string" || !n.startsWith(
|
|
109
|
+
let n = Je(e.left);
|
|
110
|
+
if (typeof n != "string" || !n.startsWith(Xe) || typeof e.operator != "string" || !Qe(e.right)) return;
|
|
111
111
|
let r = Array.isArray(e.enumeration) && e.enumeration.every((e) => typeof e == "string") ? e.enumeration : void 0;
|
|
112
|
-
return
|
|
112
|
+
return et(Ze(t, n.slice(5)), e.operator, e.right, r);
|
|
113
113
|
}
|
|
114
114
|
if (e.kind === "logical") {
|
|
115
|
-
let n =
|
|
115
|
+
let n = tt(e.left, t), r = tt(e.right, t);
|
|
116
116
|
return n === void 0 || r === void 0 ? void 0 : e.operator === "And" ? n && r : e.operator === "Or" ? n || r : void 0;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
return e.every((e) =>
|
|
122
|
-
}
|
|
123
|
-
function nt(e, t) {
|
|
124
|
-
if (tt(e)) return e.findIndex((e) => et(e, t) === !0);
|
|
120
|
+
function nt(e) {
|
|
121
|
+
return e.every((e) => tt(e, {}) !== void 0);
|
|
125
122
|
}
|
|
126
123
|
function rt(e, t) {
|
|
124
|
+
if (nt(e)) return e.findIndex((e) => tt(e, t) === !0);
|
|
125
|
+
}
|
|
126
|
+
function it(e, t) {
|
|
127
127
|
if (!R(e) || !Array.isArray(e.alternatives) || !R(t)) return;
|
|
128
|
-
let n =
|
|
128
|
+
let n = rt(e.alternatives, t);
|
|
129
129
|
if (n !== void 0) {
|
|
130
130
|
if (e.kind === "firstMatch" && typeof e.index == "number") return n === e.index;
|
|
131
131
|
if (e.kind === "otherwise") return n === -1;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
if (e.startsWith(
|
|
134
|
+
function at(e, t) {
|
|
135
|
+
if (e.startsWith(Xe) && R(t)) return Ze(t, e.slice(5));
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/stageSession.ts
|
|
139
|
+
var ot = "stage.session.";
|
|
140
|
+
function st(e) {
|
|
141
|
+
try {
|
|
142
|
+
return globalThis.localStorage?.getItem(`stage.session.${e}`) || void 0;
|
|
143
|
+
} catch {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function ct(e) {
|
|
148
|
+
let t = st(e);
|
|
149
|
+
if (t) return t;
|
|
150
|
+
let n = globalThis.crypto.randomUUID();
|
|
151
|
+
try {
|
|
152
|
+
globalThis.localStorage?.setItem(`${ot}${e}`, n);
|
|
153
|
+
} catch {}
|
|
154
|
+
return n;
|
|
155
|
+
}
|
|
156
|
+
function lt() {
|
|
157
|
+
let e = {};
|
|
158
|
+
try {
|
|
159
|
+
let t = globalThis.localStorage;
|
|
160
|
+
for (let n = 0; t && n < t.length; n++) {
|
|
161
|
+
let r = t.key(n) ?? "";
|
|
162
|
+
if (!r.startsWith("stage.session.")) continue;
|
|
163
|
+
let i = r.slice(14), a = t.getItem(r);
|
|
164
|
+
i && a && (e[i.charAt(0).toLowerCase() + i.slice(1)] = a);
|
|
165
|
+
}
|
|
166
|
+
} catch {}
|
|
167
|
+
return e;
|
|
136
168
|
}
|
|
137
169
|
//#endregion
|
|
138
170
|
//#region src/stageData.tsx
|
|
139
|
-
var
|
|
171
|
+
var ut = "cratis.stage.data-changed", dt = e({
|
|
140
172
|
locale: "",
|
|
141
173
|
locales: [],
|
|
142
174
|
screen: "",
|
|
143
175
|
routes: void 0,
|
|
144
176
|
routesReady: !0,
|
|
145
177
|
parameters: {},
|
|
178
|
+
session: {},
|
|
146
179
|
queries: {},
|
|
147
180
|
selected: void 0,
|
|
148
181
|
selections: {},
|
|
@@ -151,6 +184,7 @@ var at = "stage.session.", ot = "cratis.stage.data-changed", st = e({
|
|
|
151
184
|
setState: () => void 0,
|
|
152
185
|
setComponentOutput: () => void 0,
|
|
153
186
|
publishComponentOutputs: () => void 0,
|
|
187
|
+
withdrawComponentOutputs: () => void 0,
|
|
154
188
|
queryResults: {},
|
|
155
189
|
refreshQuery: () => void 0,
|
|
156
190
|
refreshAfterCommand: () => void 0,
|
|
@@ -158,13 +192,13 @@ var at = "stage.session.", ot = "cratis.stage.data-changed", st = e({
|
|
|
158
192
|
resolveArgument: () => void 0,
|
|
159
193
|
registerQueryResult: () => void 0,
|
|
160
194
|
refreshVersion: 0
|
|
161
|
-
}),
|
|
195
|
+
}), ft = [
|
|
162
196
|
500,
|
|
163
197
|
1500,
|
|
164
198
|
3e3
|
|
165
|
-
],
|
|
166
|
-
function
|
|
167
|
-
let [f, p] =
|
|
199
|
+
], pt = {};
|
|
200
|
+
function mt({ routes: e, routesReady: t = !0, parameters: r = pt, locale: a, locales: l, screen: u, children: d }) {
|
|
201
|
+
let [f, p] = c({}), [m, h] = c(0), [v, y] = c({}), [b, S] = c(), [C, ee] = c({}), [w, te] = c({}), [ne, re] = c({}), [T, ie] = c({ version: 0 }), E = o(() => bt(ne), [ne]), ae = n((e, t) => {
|
|
168
202
|
p((n) => {
|
|
169
203
|
if (!t) {
|
|
170
204
|
let { [e]: t, ...r } = n;
|
|
@@ -175,128 +209,146 @@ function ut({ routes: e, routesReady: t = !0, parameters: r = lt, locale: c, loc
|
|
|
175
209
|
[e]: t
|
|
176
210
|
};
|
|
177
211
|
});
|
|
178
|
-
}, []), O =
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
212
|
+
}, []), D = r, O = o(() => lt(), [m]), oe = o(() => ({
|
|
213
|
+
name: u,
|
|
214
|
+
keys: {
|
|
215
|
+
...O,
|
|
216
|
+
...r
|
|
217
|
+
}
|
|
218
|
+
}), [
|
|
219
|
+
r,
|
|
220
|
+
u,
|
|
221
|
+
O
|
|
222
|
+
]), se = n((e, t) => {
|
|
182
223
|
y((n) => ({
|
|
183
224
|
...n,
|
|
184
225
|
[e]: t
|
|
185
226
|
})), S(t ? e : (t) => t === e ? void 0 : t);
|
|
186
|
-
}, []),
|
|
227
|
+
}, []), ce = n((e) => {
|
|
187
228
|
y((t) => ({
|
|
188
229
|
...t,
|
|
189
230
|
[e]: void 0
|
|
190
231
|
})), S((t) => t === e ? void 0 : t);
|
|
191
|
-
}, []),
|
|
192
|
-
|
|
232
|
+
}, []), le = n((e, t, n) => {
|
|
233
|
+
te((r) => {
|
|
193
234
|
let i = H(r[e]) ? r[e] : {};
|
|
194
235
|
return {
|
|
195
236
|
...r,
|
|
196
|
-
[e]:
|
|
237
|
+
[e]: yt(i, t.split(".").filter(Boolean), n)
|
|
197
238
|
};
|
|
198
239
|
});
|
|
199
|
-
}, []), k = n((e) =>
|
|
240
|
+
}, []), k = n((e) => ie((t) => ({
|
|
200
241
|
query: e,
|
|
201
242
|
version: t.version + 1
|
|
202
|
-
})), []),
|
|
203
|
-
|
|
204
|
-
for (let e of
|
|
243
|
+
})), []), ue = s([]), A = n(() => {
|
|
244
|
+
h((e) => e + 1), k();
|
|
245
|
+
for (let e of ft) ue.current.push(setTimeout(() => k(), e));
|
|
205
246
|
}, [k]);
|
|
206
|
-
i(() => () =>
|
|
247
|
+
i(() => () => ue.current.forEach(clearTimeout), []), i(() => {
|
|
207
248
|
let e = () => k(), t = (e) => k(e.detail?.query);
|
|
208
|
-
return globalThis.addEventListener(
|
|
209
|
-
globalThis.removeEventListener(
|
|
249
|
+
return globalThis.addEventListener(ut, e), globalThis.addEventListener("cratis.scene.refresh", t), () => {
|
|
250
|
+
globalThis.removeEventListener(ut, e), globalThis.removeEventListener("cratis.scene.refresh", t);
|
|
210
251
|
};
|
|
211
252
|
}, [k]);
|
|
212
|
-
let
|
|
253
|
+
let j = b ? v[b] : void 0, de = n((e) => {
|
|
213
254
|
if (e === void 0 || typeof e != "string" && e.path === "$guard") return;
|
|
214
|
-
if (typeof e == "string") return
|
|
215
|
-
let t =
|
|
255
|
+
if (typeof e == "string") return xt(e, j, v, f, C, D, oe, a, l);
|
|
256
|
+
let t = gt(j, f, C, {
|
|
216
257
|
...E,
|
|
217
|
-
...
|
|
258
|
+
...w
|
|
218
259
|
}, v);
|
|
219
|
-
if (!e.kind && e.path.startsWith("component.")) return
|
|
220
|
-
if (!e.kind) return
|
|
221
|
-
let n =
|
|
222
|
-
return n.length > 0 && console.warn(`Scene binding could not be resolved: ${n.map((e) => `${e.code}:${e.message}`).join("; ")}`),
|
|
260
|
+
if (!e.kind && e.path.startsWith("component.")) return _(e.path, t);
|
|
261
|
+
if (!e.kind) return xt(e.path, j, v, f, C, D, oe, a, l);
|
|
262
|
+
let n = x(e, t);
|
|
263
|
+
return n.length > 0 && console.warn(`Scene binding could not be resolved: ${n.map((e) => `${e.code}:${e.message}`).join("; ")}`), g(t)(e);
|
|
223
264
|
}, [
|
|
224
|
-
|
|
225
|
-
|
|
265
|
+
w,
|
|
266
|
+
a,
|
|
226
267
|
l,
|
|
227
268
|
C,
|
|
228
|
-
|
|
269
|
+
D,
|
|
229
270
|
E,
|
|
230
271
|
f,
|
|
231
|
-
|
|
232
|
-
|
|
272
|
+
oe,
|
|
273
|
+
j,
|
|
233
274
|
v
|
|
234
|
-
]), M = n((e) => e ?
|
|
275
|
+
]), M = n((e) => e ? _(e, gt(j, f, C, {
|
|
235
276
|
...E,
|
|
236
|
-
...
|
|
277
|
+
...w
|
|
237
278
|
}, v)) : void 0, [
|
|
238
|
-
|
|
279
|
+
w,
|
|
239
280
|
C,
|
|
240
281
|
E,
|
|
241
282
|
f,
|
|
242
|
-
|
|
283
|
+
j,
|
|
243
284
|
v
|
|
244
|
-
]),
|
|
245
|
-
|
|
285
|
+
]), fe = n((e, t) => re((n) => ({
|
|
286
|
+
...n,
|
|
287
|
+
[e]: t
|
|
288
|
+
})), []), pe = n((e) => re((t) => {
|
|
289
|
+
if (!Object.prototype.hasOwnProperty.call(t, e)) return t;
|
|
290
|
+
let n = { ...t };
|
|
291
|
+
return delete n[e], n;
|
|
292
|
+
}), []), me = o(() => gt(void 0, f, {}, {}, {}).queryResults, [f]), he = o(() => ({
|
|
293
|
+
locale: a,
|
|
246
294
|
locales: l,
|
|
247
295
|
screen: u,
|
|
248
296
|
routes: e,
|
|
249
297
|
routesReady: t,
|
|
250
|
-
parameters:
|
|
298
|
+
parameters: D,
|
|
299
|
+
session: O,
|
|
251
300
|
queries: f,
|
|
252
|
-
selected:
|
|
301
|
+
selected: j,
|
|
253
302
|
selections: v,
|
|
254
|
-
selectRow:
|
|
255
|
-
clearSelection:
|
|
256
|
-
setState: (e, t) =>
|
|
257
|
-
setComponentOutput:
|
|
258
|
-
publishComponentOutputs:
|
|
259
|
-
|
|
303
|
+
selectRow: se,
|
|
304
|
+
clearSelection: ce,
|
|
305
|
+
setState: (e, t) => ee((n) => yt(n, e.split(".").filter(Boolean), t)),
|
|
306
|
+
setComponentOutput: le,
|
|
307
|
+
publishComponentOutputs: fe,
|
|
308
|
+
withdrawComponentOutputs: pe,
|
|
309
|
+
queryResults: me,
|
|
260
310
|
refreshQuery: k,
|
|
261
|
-
refreshAfterCommand:
|
|
262
|
-
resolveBinding:
|
|
311
|
+
refreshAfterCommand: A,
|
|
312
|
+
resolveBinding: de,
|
|
263
313
|
resolveArgument: M,
|
|
264
|
-
registerQueryResult:
|
|
265
|
-
refreshVersion:
|
|
266
|
-
refreshQueryName:
|
|
314
|
+
registerQueryResult: ae,
|
|
315
|
+
refreshVersion: T.version,
|
|
316
|
+
refreshQueryName: T.query
|
|
267
317
|
}), [
|
|
268
|
-
|
|
269
|
-
|
|
318
|
+
ce,
|
|
319
|
+
a,
|
|
270
320
|
l,
|
|
271
321
|
f,
|
|
272
|
-
|
|
322
|
+
A,
|
|
273
323
|
k,
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
324
|
+
T.query,
|
|
325
|
+
T.version,
|
|
326
|
+
ae,
|
|
327
|
+
fe,
|
|
328
|
+
pe,
|
|
329
|
+
me,
|
|
279
330
|
M,
|
|
280
|
-
|
|
331
|
+
de,
|
|
281
332
|
e,
|
|
282
333
|
t,
|
|
334
|
+
D,
|
|
283
335
|
O,
|
|
284
336
|
u,
|
|
285
|
-
|
|
286
|
-
|
|
337
|
+
se,
|
|
338
|
+
j,
|
|
287
339
|
v,
|
|
288
|
-
|
|
340
|
+
le
|
|
289
341
|
]);
|
|
290
|
-
return /* @__PURE__ */
|
|
291
|
-
value:
|
|
342
|
+
return /* @__PURE__ */ P(dt.Provider, {
|
|
343
|
+
value: he,
|
|
292
344
|
children: d
|
|
293
345
|
});
|
|
294
346
|
}
|
|
295
|
-
var z = () => r(
|
|
347
|
+
var z = () => r(dt);
|
|
296
348
|
function B(e) {
|
|
297
|
-
let { refreshQueryName: t, refreshVersion: r, registerQueryResult: a } = z(),
|
|
298
|
-
|
|
299
|
-
}, [
|
|
349
|
+
let { refreshQueryName: t, refreshVersion: r, registerQueryResult: a } = z(), o = e.publish !== !1, l = n((e, t) => {
|
|
350
|
+
o && a(e, t);
|
|
351
|
+
}, [o, a]), [u, d] = c([]), [f, p] = c(""), [m, h] = c(!1), [g, _] = c(0), v = s(0), y = s(!1), b = e.ready ?? !0, x = !!e.route && b, S = JSON.stringify(e.arguments ?? {});
|
|
300
352
|
return i(() => {
|
|
301
353
|
if (!x || !e.route) {
|
|
302
354
|
v.current += 1, d([]), p(""), h(!1), l(e.scope, void 0);
|
|
@@ -304,7 +356,7 @@ function B(e) {
|
|
|
304
356
|
}
|
|
305
357
|
let t = v.current + 1;
|
|
306
358
|
v.current = t;
|
|
307
|
-
let n = new AbortController(), r = JSON.parse(S), i =
|
|
359
|
+
let n = new AbortController(), r = JSON.parse(S), i = wt(e.route, r);
|
|
308
360
|
h(!0), p("");
|
|
309
361
|
let a = () => {
|
|
310
362
|
fetch(i, {
|
|
@@ -314,36 +366,36 @@ function B(e) {
|
|
|
314
366
|
if (!e.ok) throw Error(`The query answered ${e.status}.`);
|
|
315
367
|
return e.json();
|
|
316
368
|
}).then((e) => {
|
|
317
|
-
v.current !== t || n.signal.aborted || (d(
|
|
369
|
+
v.current !== t || n.signal.aborted || (d(At(e)), p(""));
|
|
318
370
|
}).catch((e) => {
|
|
319
371
|
v.current !== t || n.signal.aborted || (d([]), p(e instanceof Error ? e.message : String(e)));
|
|
320
372
|
}).finally(() => {
|
|
321
373
|
v.current === t && !n.signal.aborted && h(!1);
|
|
322
374
|
});
|
|
323
375
|
};
|
|
324
|
-
if (
|
|
376
|
+
if (Dt(e.route)) {
|
|
325
377
|
y.current = !0;
|
|
326
|
-
let e = new
|
|
378
|
+
let e = new Ee(new URL(Ot(i), globalThis.location.href)), r = !1, o = () => {
|
|
327
379
|
r || v.current !== t || n.signal.aborted || (r = !0, y.current = !1, e.disconnect(), a());
|
|
328
|
-
}, s =
|
|
380
|
+
}, s = Te.eventSourceFactory;
|
|
329
381
|
if (!s && typeof EventSource > "u") o();
|
|
330
382
|
else {
|
|
331
383
|
let r;
|
|
332
|
-
|
|
384
|
+
Te.eventSourceFactory = (e) => r = s ? s(e) : new EventSource(e);
|
|
333
385
|
try {
|
|
334
386
|
e.connect((e) => {
|
|
335
387
|
if (v.current !== t || n.signal.aborted) return;
|
|
336
|
-
let r =
|
|
337
|
-
r ? (d([]), p(r)) : (d(
|
|
388
|
+
let r = kt(e);
|
|
389
|
+
r ? (d([]), p(r)) : (d(At(e)), p("")), h(!1);
|
|
338
390
|
});
|
|
339
391
|
} finally {
|
|
340
|
-
|
|
392
|
+
Te.eventSourceFactory = s;
|
|
341
393
|
}
|
|
342
394
|
let i = r;
|
|
343
395
|
if (i) {
|
|
344
396
|
let e = i.onerror;
|
|
345
397
|
i.onerror = function(t) {
|
|
346
|
-
e?.call(this, t), i.readyState ===
|
|
398
|
+
e?.call(this, t), i.readyState === Et && o();
|
|
347
399
|
};
|
|
348
400
|
} else o();
|
|
349
401
|
}
|
|
@@ -403,29 +455,29 @@ function B(e) {
|
|
|
403
455
|
}
|
|
404
456
|
};
|
|
405
457
|
}
|
|
406
|
-
function
|
|
407
|
-
globalThis.dispatchEvent(new CustomEvent(
|
|
458
|
+
function ht() {
|
|
459
|
+
globalThis.dispatchEvent(new CustomEvent(ut));
|
|
408
460
|
}
|
|
409
|
-
function
|
|
461
|
+
function gt(e, t, n, r, i) {
|
|
410
462
|
let a = Object.entries(t).sort(([, e], [, t]) => Number(e.list === !0) - Number(t.list === !0));
|
|
411
463
|
return {
|
|
412
464
|
dataContext: e,
|
|
413
465
|
queryResults: Object.fromEntries(a.flatMap(([e, t]) => {
|
|
414
|
-
let n = t.list ? t.rows :
|
|
466
|
+
let n = t.list ? t.rows : _t(t.rows);
|
|
415
467
|
return [
|
|
416
468
|
[e, n],
|
|
417
469
|
...t.name ? [[t.name, n]] : [],
|
|
418
470
|
...t.alias ? [[t.alias, n]] : []
|
|
419
471
|
];
|
|
420
472
|
})),
|
|
421
|
-
componentOutputs:
|
|
473
|
+
componentOutputs: vt(r, i),
|
|
422
474
|
state: n
|
|
423
475
|
};
|
|
424
476
|
}
|
|
425
|
-
function
|
|
477
|
+
function _t(e) {
|
|
426
478
|
return e.length === 1 ? e[0] : e;
|
|
427
479
|
}
|
|
428
|
-
function
|
|
480
|
+
function vt(e, t) {
|
|
429
481
|
let n = { ...e };
|
|
430
482
|
for (let [e, r] of Object.entries(t)) r && (n[e] = {
|
|
431
483
|
...r,
|
|
@@ -433,61 +485,56 @@ function mt(e, t) {
|
|
|
433
485
|
});
|
|
434
486
|
return n;
|
|
435
487
|
}
|
|
436
|
-
function
|
|
488
|
+
function yt(e, t, n) {
|
|
437
489
|
let [r, ...i] = t;
|
|
438
490
|
return r ? i.length === 0 ? {
|
|
439
491
|
...e,
|
|
440
492
|
[r]: n
|
|
441
493
|
} : {
|
|
442
494
|
...e,
|
|
443
|
-
[r]:
|
|
495
|
+
[r]: yt(H(e[r]) ? e[r] : {}, i, n)
|
|
444
496
|
} : e;
|
|
445
497
|
}
|
|
446
|
-
function
|
|
498
|
+
function bt(e) {
|
|
499
|
+
let t = {};
|
|
500
|
+
for (let n of Object.values(e)) for (let [e, r] of Object.entries(n)) t[e] = {
|
|
501
|
+
...t[e],
|
|
502
|
+
...r
|
|
503
|
+
};
|
|
504
|
+
return t;
|
|
505
|
+
}
|
|
506
|
+
function xt(e, t, n, r, i, a, o, s, c) {
|
|
447
507
|
if (!e) return;
|
|
448
508
|
let l = e.replace(/^\$\.?/, "").split(".").filter(Boolean);
|
|
449
|
-
if (l.length !== 0) return l[0] === "screen" ? l.length === 1 ? { name: o } : V(
|
|
509
|
+
if (l.length !== 0) return l[0] === "screen" ? l.length === 1 ? { name: o.name } : V(o, l.slice(1)) : l[0] === "locale" ? s : l[0] === "locales" ? c : l[0] === "query" ? Ct(r, l[1], l.slice(2).join(".")) : l[0] === "data" || l[0] === "selected" || l[0] === "current" ? St(l.slice(1).join("."), t, n) : l[0] === "state" ? V(i, l.slice(1)) : l[0] === "parameters" ? l.length === 1 ? a : a[l[1]] : V(t, l) ?? Ct(r, void 0, l.join(".")) ?? V(i, l);
|
|
450
510
|
}
|
|
451
|
-
function
|
|
511
|
+
function St(e, t, n) {
|
|
452
512
|
let r = e?.split(".").filter(Boolean) ?? [];
|
|
453
513
|
return r.length > 0 && Object.hasOwn(n, r[0]) ? V(n[r[0]], r.slice(1)) : r.length === 0 ? t : V(t, r);
|
|
454
514
|
}
|
|
455
|
-
function
|
|
515
|
+
function Ct(e, t, n) {
|
|
456
516
|
let r = Object.entries(e).filter(([e, n]) => t ? n.name === t || e === t : !n.list).map(([, e]) => e.rows);
|
|
457
517
|
if (r.length === 0) return;
|
|
458
518
|
let i = r.flat(), a = n?.split(".").filter(Boolean) ?? [];
|
|
459
519
|
return a.length === 0 ? i : i.length === 1 ? V(i[0], a) : i.map((e) => V(e, a));
|
|
460
520
|
}
|
|
461
|
-
function
|
|
462
|
-
let e = {};
|
|
463
|
-
try {
|
|
464
|
-
let t = globalThis.localStorage;
|
|
465
|
-
for (let n = 0; t && n < t.length; n++) {
|
|
466
|
-
let r = t.key(n) ?? "";
|
|
467
|
-
if (!r.startsWith("stage.session.")) continue;
|
|
468
|
-
let i = r.slice(14), a = t.getItem(r);
|
|
469
|
-
i && a && (e[i.charAt(0).toLowerCase() + i.slice(1)] = a);
|
|
470
|
-
}
|
|
471
|
-
} catch {}
|
|
472
|
-
return e;
|
|
473
|
-
}
|
|
474
|
-
function bt(e, t) {
|
|
521
|
+
function wt(e, t) {
|
|
475
522
|
let [n, r = ""] = e.replace(/^\//, "").split("?"), i = new URLSearchParams(r);
|
|
476
523
|
for (let [e, n] of Object.entries(t)) n != null && n !== "" && i.set(e, String(n));
|
|
477
524
|
let a = i.toString();
|
|
478
525
|
return a ? `${n}?${a}` : n;
|
|
479
526
|
}
|
|
480
|
-
var
|
|
481
|
-
function
|
|
482
|
-
return new URLSearchParams(e.split("?")[1] ?? "").get(
|
|
527
|
+
var Tt = "waitForFirstResult", Et = 2;
|
|
528
|
+
function Dt(e) {
|
|
529
|
+
return new URLSearchParams(e.split("?")[1] ?? "").get(Tt) === "true";
|
|
483
530
|
}
|
|
484
|
-
function
|
|
531
|
+
function Ot(e) {
|
|
485
532
|
let [t, n = ""] = e.split("?"), r = new URLSearchParams(n);
|
|
486
|
-
r.delete(
|
|
533
|
+
r.delete(Tt);
|
|
487
534
|
let i = r.toString();
|
|
488
535
|
return i ? `${t}?${i}` : t;
|
|
489
536
|
}
|
|
490
|
-
function
|
|
537
|
+
function kt(e) {
|
|
491
538
|
if (!H(e)) return "";
|
|
492
539
|
if (e.isAuthorized === !1) return "The query answered 403.";
|
|
493
540
|
if (e.isValid === !1 || e.hasExceptions === !0) {
|
|
@@ -496,7 +543,7 @@ function Tt(e) {
|
|
|
496
543
|
}
|
|
497
544
|
return "";
|
|
498
545
|
}
|
|
499
|
-
function
|
|
546
|
+
function At(e) {
|
|
500
547
|
let t = H(e) && "data" in e ? e.data : e;
|
|
501
548
|
return Array.isArray(t) ? t.filter(H) : H(t) ? [t] : [];
|
|
502
549
|
}
|
|
@@ -512,6 +559,12 @@ function H(e) {
|
|
|
512
559
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
513
560
|
}
|
|
514
561
|
//#endregion
|
|
562
|
+
//#region src/stageComponentOutputs.ts
|
|
563
|
+
function jt() {
|
|
564
|
+
let e = a(), { publishComponentOutputs: t, withdrawComponentOutputs: r } = z();
|
|
565
|
+
return i(() => () => r(e), [e, r]), n((n) => t(e, n), [t, e]);
|
|
566
|
+
}
|
|
567
|
+
//#endregion
|
|
515
568
|
//#region src/commandExecutor.ts
|
|
516
569
|
function U(e, t, n) {
|
|
517
570
|
for (let r of [
|
|
@@ -520,14 +573,14 @@ function U(e, t, n) {
|
|
|
520
573
|
e
|
|
521
574
|
]) {
|
|
522
575
|
if (!r) continue;
|
|
523
|
-
let t =
|
|
524
|
-
if (
|
|
576
|
+
let t = Pe(r);
|
|
577
|
+
if (Mt(t) && !(r === e && n && new t().route.replace(/^\//, "") !== n.replace(/^\//, ""))) return t;
|
|
525
578
|
}
|
|
526
579
|
}
|
|
527
|
-
function
|
|
528
|
-
return typeof e == "function" && e.prototype instanceof
|
|
580
|
+
function Mt(e) {
|
|
581
|
+
return typeof e == "function" && e.prototype instanceof Ne;
|
|
529
582
|
}
|
|
530
|
-
function
|
|
583
|
+
function Nt() {
|
|
531
584
|
let e = globalThis.document?.baseURI ?? globalThis.location?.href;
|
|
532
585
|
if (!e) return "";
|
|
533
586
|
try {
|
|
@@ -536,7 +589,7 @@ function Ot() {
|
|
|
536
589
|
return "";
|
|
537
590
|
}
|
|
538
591
|
}
|
|
539
|
-
async function
|
|
592
|
+
async function Pt(e, t, n) {
|
|
540
593
|
let r = U(e);
|
|
541
594
|
if (!r) return {
|
|
542
595
|
isSuccess: !1,
|
|
@@ -544,11 +597,11 @@ async function kt(e, t, n) {
|
|
|
544
597
|
messages: [`The modeled command “${e}” is not registered by this Stage.`]
|
|
545
598
|
};
|
|
546
599
|
let i = new r();
|
|
547
|
-
i.setMicroservice(n.microservice), i.setApiBasePath(n.apiBasePath
|
|
600
|
+
i.setMicroservice(n.microservice), i.setApiBasePath(n.apiBasePath || Nt()), i.setOrigin(n.origin ?? ""), i.setHttpHeadersCallback(n.httpHeadersCallback ?? (() => ({})));
|
|
548
601
|
for (let e of i.propertyDescriptors) Object.prototype.hasOwnProperty.call(t, e.name) && Reflect.set(i, e.name, t[e.name]);
|
|
549
|
-
return
|
|
602
|
+
return Ft(e, await i.execute());
|
|
550
603
|
}
|
|
551
|
-
function
|
|
604
|
+
function Ft(e, t) {
|
|
552
605
|
let n = t.isSuccess && t.isAuthorized && t.isValid && !t.hasExceptions, r = t.isValid ? [] : t.validationResults.flatMap((e) => (e.members.length > 0 ? e.members : [""]).map((t) => ({
|
|
553
606
|
member: t,
|
|
554
607
|
message: e.message
|
|
@@ -564,52 +617,53 @@ function At(e, t) {
|
|
|
564
617
|
messages: n || i.length > 0 ? i : [`“${e}” was not accepted.`]
|
|
565
618
|
};
|
|
566
619
|
}
|
|
567
|
-
function
|
|
568
|
-
let e = r(
|
|
569
|
-
return n((t, n) =>
|
|
620
|
+
function It() {
|
|
621
|
+
let e = r(Me);
|
|
622
|
+
return n((t, n) => Pt(t, n, e), [e]);
|
|
570
623
|
}
|
|
571
624
|
//#endregion
|
|
572
625
|
//#region src/stageNavigation.ts
|
|
573
|
-
function
|
|
626
|
+
function Lt(e, t = {}) {
|
|
574
627
|
let n = new URLSearchParams(Object.entries(t).filter(([, e]) => e !== "")).toString();
|
|
575
628
|
return n ? `#/${encodeURIComponent(e)}?${n}` : `#/${encodeURIComponent(e)}`;
|
|
576
629
|
}
|
|
577
630
|
function W(e, t = {}) {
|
|
578
631
|
if (!globalThis.location) return;
|
|
579
|
-
let n =
|
|
632
|
+
let n = Lt(e, t);
|
|
580
633
|
globalThis.location.hash !== n && (globalThis.location.hash = n);
|
|
581
634
|
}
|
|
582
|
-
function
|
|
635
|
+
function Rt(e) {
|
|
583
636
|
return Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e != null && e !== "" && typeof e != "object").map(([e, t]) => [e, String(t)]));
|
|
584
637
|
}
|
|
585
638
|
//#endregion
|
|
586
639
|
//#region src/stageFormSchema.ts
|
|
587
|
-
var
|
|
588
|
-
function
|
|
640
|
+
var zt = 8;
|
|
641
|
+
function Bt(e) {
|
|
589
642
|
if (!e) return [];
|
|
590
643
|
try {
|
|
591
|
-
return
|
|
644
|
+
return Vt(JSON.parse(e), 0);
|
|
592
645
|
} catch {
|
|
593
646
|
return [];
|
|
594
647
|
}
|
|
595
648
|
}
|
|
596
|
-
function
|
|
597
|
-
let n = Object.prototype.hasOwnProperty.call(e, "required"), r = Array.isArray(e.required) ? new Set(e.required.filter((e) => typeof e == "string")) : /* @__PURE__ */ new Set(), i =
|
|
598
|
-
return Object.entries(i).map(([e, i]) =>
|
|
649
|
+
function Vt(e, t) {
|
|
650
|
+
let n = Object.prototype.hasOwnProperty.call(e, "required"), r = Array.isArray(e.required) ? new Set(e.required.filter((e) => typeof e == "string")) : /* @__PURE__ */ new Set(), i = Yt(e.properties) ? e.properties : {};
|
|
651
|
+
return Object.entries(i).map(([e, i]) => Ht(e, i, !n || r.has(e), t));
|
|
599
652
|
}
|
|
600
|
-
function
|
|
653
|
+
function Ht(e, t, n, r) {
|
|
601
654
|
return {
|
|
602
655
|
name: e,
|
|
603
656
|
identifier: t?.format === "uuid" && typeof t["x-concept"] == "string" ? t["x-concept"] : void 0,
|
|
657
|
+
...t?.["x-identity"] === !0 ? { identity: !0 } : {},
|
|
604
658
|
required: n,
|
|
605
|
-
...
|
|
659
|
+
...Ut(t, r)
|
|
606
660
|
};
|
|
607
661
|
}
|
|
608
|
-
function
|
|
662
|
+
function Ut(e, t) {
|
|
609
663
|
let n = e?.type;
|
|
610
664
|
if (Array.isArray(n)) {
|
|
611
665
|
let r = n.filter((e) => e !== "null");
|
|
612
|
-
return r.length === 1 ?
|
|
666
|
+
return r.length === 1 ? Ut({
|
|
613
667
|
...e,
|
|
614
668
|
type: r[0]
|
|
615
669
|
}, t) : { unsupportedReason: `union type ${JSON.stringify(n)}` };
|
|
@@ -620,8 +674,8 @@ function Rt(e, t) {
|
|
|
620
674
|
type: "date",
|
|
621
675
|
withTime: e.format === "date-time"
|
|
622
676
|
};
|
|
623
|
-
if (n === "array") return
|
|
624
|
-
if (n === "object") return
|
|
677
|
+
if (n === "array") return Wt(e, t);
|
|
678
|
+
if (n === "object") return Gt(e, t);
|
|
625
679
|
if (n === void 0 || n === "string") {
|
|
626
680
|
let t = Array.isArray(e?.enum) ? e.enum.filter((e) => typeof e == "string") : [];
|
|
627
681
|
return t.length > 0 ? {
|
|
@@ -631,54 +685,54 @@ function Rt(e, t) {
|
|
|
631
685
|
}
|
|
632
686
|
return { unsupportedReason: `type ${String(n)}` };
|
|
633
687
|
}
|
|
634
|
-
function
|
|
688
|
+
function Wt(e, t) {
|
|
635
689
|
let n = { unsupportedReason: "array fields are not supported by the native Stage command form" };
|
|
636
|
-
if (t >=
|
|
637
|
-
let r =
|
|
690
|
+
if (t >= zt || e?.items === void 0) return n;
|
|
691
|
+
let r = Ht("", e.items, !0, t + 1);
|
|
638
692
|
return r.unsupportedReason || r.item ? n : { item: r };
|
|
639
693
|
}
|
|
640
|
-
function
|
|
694
|
+
function Gt(e, t) {
|
|
641
695
|
let n = { unsupportedReason: "object fields are not supported by the native Stage command form" };
|
|
642
|
-
if (t >=
|
|
643
|
-
let r =
|
|
696
|
+
if (t >= zt || !Yt(e?.properties) || Object.keys(e.properties).length === 0) return n;
|
|
697
|
+
let r = Vt(e, t + 1), i = r.find((e) => e.unsupportedReason);
|
|
644
698
|
return i ? { unsupportedReason: `its member “${i.name}” is not supported: ${i.unsupportedReason}` } : { members: r };
|
|
645
699
|
}
|
|
646
700
|
function G(e) {
|
|
647
701
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").toLowerCase();
|
|
648
702
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
649
703
|
}
|
|
650
|
-
function
|
|
704
|
+
function Kt(e, t, n) {
|
|
651
705
|
if (t != null) {
|
|
652
|
-
if (e.members &&
|
|
706
|
+
if (e.members && Yt(t)) for (let r of e.members) {
|
|
653
707
|
let e = t[r.name], i = G(r.name);
|
|
654
|
-
if (
|
|
708
|
+
if (qt(e)) {
|
|
655
709
|
if (r.required) return `${n}: ${i} is required`;
|
|
656
710
|
continue;
|
|
657
711
|
}
|
|
658
|
-
let a =
|
|
712
|
+
let a = Kt(r, e, `${n} ${i.toLowerCase()}`);
|
|
659
713
|
if (a) return a;
|
|
660
714
|
}
|
|
661
715
|
if (e.item && Array.isArray(t)) for (let [r, i] of t.entries()) {
|
|
662
|
-
let t =
|
|
716
|
+
let t = qt(i) ? `${n} ${r + 1} is required` : Kt(e.item, i, `${n} ${r + 1}`);
|
|
663
717
|
if (t) return t;
|
|
664
718
|
}
|
|
665
719
|
}
|
|
666
720
|
}
|
|
667
|
-
function
|
|
721
|
+
function qt(e) {
|
|
668
722
|
return e == null || e === "";
|
|
669
723
|
}
|
|
670
|
-
function
|
|
671
|
-
return t == null ? t : e.options ? typeof t == "number" ? e.options[t] ?? t : typeof t == "string" ? e.options.find((e) => e.toLowerCase() === t.toLowerCase()) ?? t : t : e.members &&
|
|
724
|
+
function Jt(e, t) {
|
|
725
|
+
return t == null ? t : e.options ? typeof t == "number" ? e.options[t] ?? t : typeof t == "string" ? e.options.find((e) => e.toLowerCase() === t.toLowerCase()) ?? t : t : e.members && Yt(t) ? Object.fromEntries(Object.entries(t).map(([t, n]) => {
|
|
672
726
|
let r = e.members?.find((e) => e.name === t);
|
|
673
|
-
return [t, r ?
|
|
674
|
-
})) : e.item && Array.isArray(t) ? t.map((t) =>
|
|
727
|
+
return [t, r ? Jt(r, n) : n];
|
|
728
|
+
})) : e.item && Array.isArray(t) ? t.map((t) => Jt(e.item, t)) : t;
|
|
675
729
|
}
|
|
676
|
-
function
|
|
730
|
+
function Yt(e) {
|
|
677
731
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
678
732
|
}
|
|
679
733
|
//#endregion
|
|
680
734
|
//#region src/StageValueFields.tsx
|
|
681
|
-
var
|
|
735
|
+
var Xt = Ie((e) => /* @__PURE__ */ P(Zt, {
|
|
682
736
|
descriptor: e.descriptor,
|
|
683
737
|
label: e.title ?? G(e.descriptor.name),
|
|
684
738
|
value: e.value,
|
|
@@ -686,22 +740,22 @@ var Gt = Pe((e) => /* @__PURE__ */ F(Kt, {
|
|
|
686
740
|
onBlur: e.onBlur,
|
|
687
741
|
invalid: e.invalid
|
|
688
742
|
}), { defaultValue: void 0 });
|
|
689
|
-
function
|
|
690
|
-
return e.members ? /* @__PURE__ */
|
|
743
|
+
function Zt({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
|
|
744
|
+
return e.members ? /* @__PURE__ */ P(Qt, {
|
|
691
745
|
descriptor: e,
|
|
692
746
|
label: t,
|
|
693
747
|
value: n,
|
|
694
748
|
onChange: r,
|
|
695
749
|
onBlur: i,
|
|
696
750
|
invalid: a
|
|
697
|
-
}) : e.item ? /* @__PURE__ */
|
|
751
|
+
}) : e.item ? /* @__PURE__ */ P($t, {
|
|
698
752
|
descriptor: e,
|
|
699
753
|
label: t,
|
|
700
754
|
value: n,
|
|
701
755
|
onChange: r,
|
|
702
756
|
onBlur: i,
|
|
703
757
|
invalid: a
|
|
704
|
-
}) : /* @__PURE__ */
|
|
758
|
+
}) : /* @__PURE__ */ P(en, {
|
|
705
759
|
descriptor: e,
|
|
706
760
|
label: t,
|
|
707
761
|
value: n,
|
|
@@ -710,12 +764,12 @@ function Kt({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
|
|
|
710
764
|
invalid: a
|
|
711
765
|
});
|
|
712
766
|
}
|
|
713
|
-
function
|
|
714
|
-
let o =
|
|
715
|
-
return /* @__PURE__ */
|
|
767
|
+
function Qt({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
|
|
768
|
+
let o = rn(n) ? n : {};
|
|
769
|
+
return /* @__PURE__ */ F("fieldset", {
|
|
716
770
|
className: "stage-record-field",
|
|
717
771
|
"data-invalid": a ? "true" : void 0,
|
|
718
|
-
children: [/* @__PURE__ */
|
|
772
|
+
children: [/* @__PURE__ */ P("legend", { children: t }), (e.members ?? []).map((e) => /* @__PURE__ */ P(Zt, {
|
|
719
773
|
descriptor: e,
|
|
720
774
|
label: G(e.name),
|
|
721
775
|
value: o[e.name],
|
|
@@ -727,74 +781,74 @@ function qt({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
|
|
|
727
781
|
}, e.name))]
|
|
728
782
|
});
|
|
729
783
|
}
|
|
730
|
-
function
|
|
784
|
+
function $t({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
|
|
731
785
|
let o = e.item, s = Array.isArray(n) ? n : [], c = (e) => r(e);
|
|
732
|
-
return /* @__PURE__ */
|
|
786
|
+
return /* @__PURE__ */ F("fieldset", {
|
|
733
787
|
className: "stage-list-field",
|
|
734
788
|
"data-invalid": a ? "true" : void 0,
|
|
735
789
|
children: [
|
|
736
|
-
/* @__PURE__ */
|
|
737
|
-
s.length === 0 && /* @__PURE__ */
|
|
790
|
+
/* @__PURE__ */ P("legend", { children: t }),
|
|
791
|
+
s.length === 0 && /* @__PURE__ */ P("p", {
|
|
738
792
|
className: "stage-note",
|
|
739
793
|
children: "Nothing added yet."
|
|
740
794
|
}),
|
|
741
|
-
s.map((e, n) => /* @__PURE__ */
|
|
795
|
+
s.map((e, n) => /* @__PURE__ */ F("div", {
|
|
742
796
|
className: "stage-list-field__row",
|
|
743
|
-
children: [/* @__PURE__ */
|
|
797
|
+
children: [/* @__PURE__ */ P(Zt, {
|
|
744
798
|
descriptor: o,
|
|
745
799
|
label: `${t} ${n + 1}`,
|
|
746
800
|
value: e,
|
|
747
801
|
onBlur: i,
|
|
748
802
|
onChange: (e) => c(s.map((t, r) => r === n ? e : t))
|
|
749
|
-
}), /* @__PURE__ */
|
|
803
|
+
}), /* @__PURE__ */ P("button", {
|
|
750
804
|
type: "button",
|
|
751
805
|
"aria-label": `Remove ${t} ${n + 1}`,
|
|
752
806
|
onClick: () => c(s.filter((e, t) => t !== n)),
|
|
753
807
|
children: "Remove"
|
|
754
808
|
})]
|
|
755
809
|
}, n)),
|
|
756
|
-
/* @__PURE__ */
|
|
810
|
+
/* @__PURE__ */ P("button", {
|
|
757
811
|
type: "button",
|
|
758
812
|
"aria-label": `Add ${t}`,
|
|
759
|
-
onClick: () => c([...s,
|
|
813
|
+
onClick: () => c([...s, tn(o)]),
|
|
760
814
|
children: "Add"
|
|
761
815
|
})
|
|
762
816
|
]
|
|
763
817
|
});
|
|
764
818
|
}
|
|
765
|
-
function
|
|
819
|
+
function en({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
|
|
766
820
|
let o = {
|
|
767
821
|
"aria-invalid": a ? !0 : void 0,
|
|
768
822
|
onBlur: i
|
|
769
823
|
};
|
|
770
|
-
if (e.options) return /* @__PURE__ */
|
|
824
|
+
if (e.options) return /* @__PURE__ */ F("label", {
|
|
771
825
|
className: "stage-value-field",
|
|
772
|
-
children: [/* @__PURE__ */
|
|
826
|
+
children: [/* @__PURE__ */ P("span", { children: t }), /* @__PURE__ */ F("select", {
|
|
773
827
|
...o,
|
|
774
828
|
value: typeof n == "string" ? n : "",
|
|
775
829
|
onChange: (e) => r(e.target.value === "" ? void 0 : e.target.value),
|
|
776
|
-
children: [/* @__PURE__ */
|
|
830
|
+
children: [/* @__PURE__ */ P("option", {
|
|
777
831
|
value: "",
|
|
778
832
|
children: ""
|
|
779
|
-
}), e.options.map((e) => /* @__PURE__ */
|
|
833
|
+
}), e.options.map((e) => /* @__PURE__ */ P("option", {
|
|
780
834
|
value: e,
|
|
781
835
|
children: G(e)
|
|
782
836
|
}, e))]
|
|
783
837
|
})]
|
|
784
838
|
});
|
|
785
839
|
switch (e.type) {
|
|
786
|
-
case "boolean": return /* @__PURE__ */
|
|
840
|
+
case "boolean": return /* @__PURE__ */ F("label", {
|
|
787
841
|
className: "stage-value-field stage-value-field--check",
|
|
788
|
-
children: [/* @__PURE__ */
|
|
842
|
+
children: [/* @__PURE__ */ P("input", {
|
|
789
843
|
...o,
|
|
790
844
|
type: "checkbox",
|
|
791
845
|
checked: n === !0,
|
|
792
846
|
onChange: (e) => r(e.target.checked)
|
|
793
|
-
}), /* @__PURE__ */
|
|
847
|
+
}), /* @__PURE__ */ P("span", { children: t })]
|
|
794
848
|
});
|
|
795
|
-
case "number": return /* @__PURE__ */
|
|
849
|
+
case "number": return /* @__PURE__ */ F("label", {
|
|
796
850
|
className: "stage-value-field",
|
|
797
|
-
children: [/* @__PURE__ */
|
|
851
|
+
children: [/* @__PURE__ */ P("span", { children: t }), /* @__PURE__ */ P("input", {
|
|
798
852
|
...o,
|
|
799
853
|
type: "number",
|
|
800
854
|
step: "any",
|
|
@@ -802,18 +856,18 @@ function Yt({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
|
|
|
802
856
|
onChange: (e) => r(e.target.value === "" ? void 0 : Number(e.target.value))
|
|
803
857
|
})]
|
|
804
858
|
});
|
|
805
|
-
case "date": return /* @__PURE__ */
|
|
859
|
+
case "date": return /* @__PURE__ */ F("label", {
|
|
806
860
|
className: "stage-value-field",
|
|
807
|
-
children: [/* @__PURE__ */
|
|
861
|
+
children: [/* @__PURE__ */ P("span", { children: t }), /* @__PURE__ */ P("input", {
|
|
808
862
|
...o,
|
|
809
863
|
type: e.withTime ? "datetime-local" : "date",
|
|
810
864
|
value: typeof n == "string" ? n.slice(0, e.withTime ? 16 : 10) : "",
|
|
811
|
-
onChange: (t) => r(t.target.value === "" ? void 0 :
|
|
865
|
+
onChange: (t) => r(t.target.value === "" ? void 0 : nn(t.target.value, e.withTime === !0))
|
|
812
866
|
})]
|
|
813
867
|
});
|
|
814
|
-
default: return /* @__PURE__ */
|
|
868
|
+
default: return /* @__PURE__ */ F("label", {
|
|
815
869
|
className: "stage-value-field",
|
|
816
|
-
children: [/* @__PURE__ */
|
|
870
|
+
children: [/* @__PURE__ */ P("span", { children: t }), /* @__PURE__ */ P("input", {
|
|
817
871
|
...o,
|
|
818
872
|
type: "text",
|
|
819
873
|
value: typeof n == "string" ? n : "",
|
|
@@ -822,114 +876,114 @@ function Yt({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
|
|
|
822
876
|
});
|
|
823
877
|
}
|
|
824
878
|
}
|
|
825
|
-
function
|
|
879
|
+
function tn(e) {
|
|
826
880
|
return e.members ? {} : void 0;
|
|
827
881
|
}
|
|
828
|
-
function
|
|
882
|
+
function nn(e, t) {
|
|
829
883
|
if (!t) return e;
|
|
830
884
|
let n = new Date(e);
|
|
831
885
|
return Number.isNaN(n.getTime()) ? e : n.toISOString();
|
|
832
886
|
}
|
|
833
|
-
function
|
|
887
|
+
function rn(e) {
|
|
834
888
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
835
889
|
}
|
|
836
890
|
//#endregion
|
|
837
891
|
//#region src/StageCommandForm.tsx
|
|
838
|
-
var
|
|
839
|
-
function
|
|
840
|
-
let t = z(), n = r(
|
|
892
|
+
var an = e(void 0);
|
|
893
|
+
function on({ element: e }) {
|
|
894
|
+
let t = z(), n = r(an), i = o(() => cn(e), [e]), a = o(() => An(e), [e]), s = typeof e.properties.schema == "string", l = o(() => i ? ln(i, a) : [], [i, a]), u = i ? U(i.command, q(e, "typeName"), q(e, "route")) : void 0, d = yn(e, l, t.resolveArgument), f = _n(e, a, t), p = JSON.stringify(f ?? null), m = o(() => f, [p]), h = o(() => ({
|
|
841
895
|
...m,
|
|
842
|
-
...
|
|
843
|
-
...
|
|
896
|
+
...pn(l, a, t.parameters),
|
|
897
|
+
...fn(l, t.parameters)
|
|
844
898
|
}), [
|
|
845
899
|
m,
|
|
846
900
|
l,
|
|
847
|
-
|
|
901
|
+
a,
|
|
848
902
|
t.parameters
|
|
849
|
-
]), g =
|
|
903
|
+
]), g = o(() => i ? un(i, l, a) : void 0, [
|
|
850
904
|
i,
|
|
851
905
|
l,
|
|
852
|
-
|
|
853
|
-
]), _ =
|
|
906
|
+
a
|
|
907
|
+
]), _ = o(() => i ? On(l, a) : [], [
|
|
854
908
|
i,
|
|
855
909
|
l,
|
|
856
|
-
|
|
857
|
-
]), v =
|
|
858
|
-
return i ? !u && !t.routesReady ? /* @__PURE__ */
|
|
910
|
+
a
|
|
911
|
+
]), v = o(() => i ? kn(i.layout, l) : [], [i, l]), [y, b] = c([]);
|
|
912
|
+
return i ? !u && !t.routesReady ? /* @__PURE__ */ F("p", {
|
|
859
913
|
className: "stage-note",
|
|
860
914
|
children: [
|
|
861
915
|
"The modeled command “",
|
|
862
916
|
i.command,
|
|
863
917
|
"” is waiting for Stage routes."
|
|
864
918
|
]
|
|
865
|
-
}) : u ? l.length === 0 && !
|
|
919
|
+
}) : u ? l.length === 0 && !s && e.properties.parameterless !== !0 ? /* @__PURE__ */ P(sn, {
|
|
866
920
|
form: i,
|
|
867
921
|
messages: [`The modeled command “${i.command}” has no form fields or schema metadata, so Stage will not submit an empty command body.`]
|
|
868
|
-
}) : _.length > 0 ? /* @__PURE__ */
|
|
922
|
+
}) : _.length > 0 ? /* @__PURE__ */ P(sn, {
|
|
869
923
|
form: i,
|
|
870
924
|
messages: _
|
|
871
|
-
}) : /* @__PURE__ */
|
|
925
|
+
}) : /* @__PURE__ */ P("section", {
|
|
872
926
|
className: "stage-command-form",
|
|
873
927
|
"data-command": i.command,
|
|
874
928
|
"data-generation-mode": i.generationMode,
|
|
875
|
-
children: /* @__PURE__ */
|
|
929
|
+
children: /* @__PURE__ */ F(Fe, {
|
|
876
930
|
command: u,
|
|
877
931
|
initialValues: h,
|
|
878
932
|
currentValues: d,
|
|
879
933
|
validateOn: "both",
|
|
880
934
|
validateAllFieldsOnChange: !0,
|
|
881
|
-
onFieldValidate: (e, t, n, r) =>
|
|
935
|
+
onFieldValidate: (e, t, n, r) => Dn(l, a, t, r),
|
|
882
936
|
onValidationFailure: (e) => b(e.map((e) => e.message)),
|
|
883
937
|
onException: (e) => b(e),
|
|
884
|
-
onFailed: (e) => b(
|
|
938
|
+
onFailed: (e) => b(Ft(i.command, e).messages),
|
|
885
939
|
onSuccess: () => {
|
|
886
940
|
b([]), t.refreshAfterCommand();
|
|
887
941
|
let r = q(e, "navigateToScreen");
|
|
888
942
|
r && W(r, {}), n?.();
|
|
889
943
|
},
|
|
890
944
|
children: [
|
|
891
|
-
v.map((e) => /* @__PURE__ */
|
|
945
|
+
v.map((e) => /* @__PURE__ */ P("p", {
|
|
892
946
|
role: "alert",
|
|
893
947
|
className: "stage-form-error",
|
|
894
948
|
children: e
|
|
895
949
|
}, e)),
|
|
896
950
|
g,
|
|
897
|
-
y.map((e) => /* @__PURE__ */
|
|
951
|
+
y.map((e) => /* @__PURE__ */ P("p", {
|
|
898
952
|
role: "alert",
|
|
899
953
|
className: "stage-form-error",
|
|
900
954
|
children: e
|
|
901
955
|
}, e)),
|
|
902
|
-
/* @__PURE__ */
|
|
956
|
+
/* @__PURE__ */ F("button", {
|
|
903
957
|
type: "submit",
|
|
904
958
|
children: ["Execute ", i.label]
|
|
905
959
|
})
|
|
906
960
|
]
|
|
907
961
|
}, p)
|
|
908
|
-
}) : /* @__PURE__ */
|
|
962
|
+
}) : /* @__PURE__ */ F("p", {
|
|
909
963
|
className: "stage-note",
|
|
910
964
|
children: [
|
|
911
965
|
"The modeled command “",
|
|
912
966
|
i.command,
|
|
913
967
|
"” is not registered by this Stage."
|
|
914
968
|
]
|
|
915
|
-
}) : /* @__PURE__ */
|
|
969
|
+
}) : /* @__PURE__ */ P("p", {
|
|
916
970
|
className: "stage-note",
|
|
917
971
|
children: "This form is missing its command metadata."
|
|
918
972
|
});
|
|
919
973
|
}
|
|
920
|
-
function
|
|
921
|
-
return /* @__PURE__ */
|
|
974
|
+
function sn({ form: e, messages: t }) {
|
|
975
|
+
return /* @__PURE__ */ P("section", {
|
|
922
976
|
className: "stage-command-form",
|
|
923
977
|
"data-command": e.command,
|
|
924
978
|
"data-generation-mode": e.generationMode,
|
|
925
|
-
children: t.map((e) => /* @__PURE__ */
|
|
979
|
+
children: t.map((e) => /* @__PURE__ */ P("p", {
|
|
926
980
|
role: "alert",
|
|
927
981
|
className: "stage-form-error",
|
|
928
982
|
children: e
|
|
929
983
|
}, e))
|
|
930
984
|
});
|
|
931
985
|
}
|
|
932
|
-
function
|
|
986
|
+
function cn(e) {
|
|
933
987
|
let t = q(e, "command");
|
|
934
988
|
if (!t) return;
|
|
935
989
|
let n = Array.isArray(e.properties.fields) ? e.properties.fields.filter(J) : [];
|
|
@@ -937,41 +991,41 @@ function nn(e) {
|
|
|
937
991
|
command: t,
|
|
938
992
|
label: q(e, "label", t),
|
|
939
993
|
fields: n,
|
|
940
|
-
generationMode:
|
|
941
|
-
layout:
|
|
994
|
+
generationMode: xn(e.properties.generationMode),
|
|
995
|
+
layout: Sn(e.properties.layout)
|
|
942
996
|
};
|
|
943
997
|
}
|
|
944
|
-
function
|
|
945
|
-
return e.generationMode ===
|
|
998
|
+
function ln(e, t) {
|
|
999
|
+
return e.generationMode === d.Manual || e.fields.length > 0 ? e.fields : t.filter((e) => !e.unsupportedReason).map((e) => ({
|
|
946
1000
|
name: e.name,
|
|
947
1001
|
label: e.name
|
|
948
1002
|
}));
|
|
949
1003
|
}
|
|
950
|
-
function
|
|
951
|
-
let r = e.layout, i = r ?
|
|
952
|
-
if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) =>
|
|
953
|
-
let a = new Map(t.map((e) => [e.name, e])), o =
|
|
954
|
-
gridTemplateColumns: Array.from({ length: o }, (e, t) =>
|
|
1004
|
+
function un(e, t, n) {
|
|
1005
|
+
let r = e.layout, i = r ? Cn(r, t) : [];
|
|
1006
|
+
if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) => dn(e, n));
|
|
1007
|
+
let a = new Map(t.map((e) => [e.name, e])), o = wn(r, i), s = {
|
|
1008
|
+
gridTemplateColumns: Array.from({ length: o }, (e, t) => Tn(t + 1, r.columns)).join(" "),
|
|
955
1009
|
columnGap: K(r.columnGap),
|
|
956
1010
|
rowGap: K(r.rowGap)
|
|
957
1011
|
}, c = /* @__PURE__ */ new Set();
|
|
958
|
-
return /* @__PURE__ */
|
|
1012
|
+
return /* @__PURE__ */ F("div", {
|
|
959
1013
|
className: "stage-command-form__layout",
|
|
960
1014
|
style: s,
|
|
961
1015
|
children: [i.map((e) => {
|
|
962
1016
|
let t = a.get(e.field);
|
|
963
|
-
return t ? (c.add(t.name),
|
|
964
|
-
}), t.filter((e) => !c.has(e.name)).map((e) =>
|
|
1017
|
+
return t ? (c.add(t.name), dn(t, n, e)) : null;
|
|
1018
|
+
}), t.filter((e) => !c.has(e.name)).map((e) => dn(e, n))]
|
|
965
1019
|
});
|
|
966
1020
|
}
|
|
967
|
-
function
|
|
1021
|
+
function dn(e, t, n) {
|
|
968
1022
|
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 = (() => {
|
|
969
1023
|
if (i?.options) {
|
|
970
1024
|
let e = i.options.map((e) => ({
|
|
971
1025
|
value: e,
|
|
972
1026
|
label: G(e)
|
|
973
1027
|
}));
|
|
974
|
-
return /* @__PURE__ */
|
|
1028
|
+
return /* @__PURE__ */ P(ze, {
|
|
975
1029
|
value: o,
|
|
976
1030
|
fieldName: r,
|
|
977
1031
|
title: a,
|
|
@@ -981,7 +1035,7 @@ function on(e, t, n) {
|
|
|
981
1035
|
optionLabel: "label"
|
|
982
1036
|
});
|
|
983
1037
|
}
|
|
984
|
-
if (i?.members || i?.item) return /* @__PURE__ */
|
|
1038
|
+
if (i?.members || i?.item) return /* @__PURE__ */ P(Xt, {
|
|
985
1039
|
value: o,
|
|
986
1040
|
fieldName: r,
|
|
987
1041
|
title: a,
|
|
@@ -989,34 +1043,34 @@ function on(e, t, n) {
|
|
|
989
1043
|
descriptor: i
|
|
990
1044
|
});
|
|
991
1045
|
switch (i?.type ?? "text") {
|
|
992
|
-
case "number": return /* @__PURE__ */
|
|
1046
|
+
case "number": return /* @__PURE__ */ P(Ve, {
|
|
993
1047
|
value: o,
|
|
994
1048
|
fieldName: r,
|
|
995
1049
|
title: a,
|
|
996
1050
|
required: s
|
|
997
1051
|
});
|
|
998
|
-
case "boolean": return /* @__PURE__ */
|
|
1052
|
+
case "boolean": return /* @__PURE__ */ P(Re, {
|
|
999
1053
|
value: o,
|
|
1000
1054
|
fieldName: r,
|
|
1001
1055
|
label: a,
|
|
1002
1056
|
required: s
|
|
1003
1057
|
});
|
|
1004
|
-
case "date": return /* @__PURE__ */
|
|
1058
|
+
case "date": return /* @__PURE__ */ P(Le, {
|
|
1005
1059
|
value: o,
|
|
1006
1060
|
fieldName: r,
|
|
1007
1061
|
title: a,
|
|
1008
1062
|
required: s,
|
|
1009
1063
|
showIcon: !0
|
|
1010
1064
|
});
|
|
1011
|
-
default: return /* @__PURE__ */
|
|
1065
|
+
default: return /* @__PURE__ */ P(Be, {
|
|
1012
1066
|
value: o,
|
|
1013
1067
|
fieldName: r,
|
|
1014
1068
|
title: a,
|
|
1015
1069
|
required: s
|
|
1016
1070
|
});
|
|
1017
1071
|
}
|
|
1018
|
-
})(), l =
|
|
1019
|
-
return /* @__PURE__ */
|
|
1072
|
+
})(), l = En(n);
|
|
1073
|
+
return /* @__PURE__ */ P("span", {
|
|
1020
1074
|
className: "stage-command-form__field",
|
|
1021
1075
|
"data-field": e.name,
|
|
1022
1076
|
"data-row": n?.row,
|
|
@@ -1026,7 +1080,7 @@ function on(e, t, n) {
|
|
|
1026
1080
|
children: c
|
|
1027
1081
|
}, e.name);
|
|
1028
1082
|
}
|
|
1029
|
-
function
|
|
1083
|
+
function fn(e, t) {
|
|
1030
1084
|
let n = {};
|
|
1031
1085
|
for (let r of e) {
|
|
1032
1086
|
let e = r.sourceProperty ?? r.name, i = t[e];
|
|
@@ -1034,28 +1088,27 @@ function sn(e, t) {
|
|
|
1034
1088
|
}
|
|
1035
1089
|
return n;
|
|
1036
1090
|
}
|
|
1037
|
-
function
|
|
1038
|
-
let r = new Set(e.map((e) => e.sourceProperty ?? e.name)), i = {};
|
|
1039
|
-
for (let e of t)
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
let t = `${at}${e}`;
|
|
1044
|
-
try {
|
|
1045
|
-
let e = globalThis.localStorage?.getItem(t);
|
|
1046
|
-
if (e) return e;
|
|
1047
|
-
let n = globalThis.crypto.randomUUID();
|
|
1048
|
-
return globalThis.localStorage?.setItem(t, n), n;
|
|
1049
|
-
} catch {
|
|
1050
|
-
return globalThis.crypto.randomUUID();
|
|
1091
|
+
function pn(e, t, n) {
|
|
1092
|
+
let r = new Set(e.map((e) => e.sourceProperty ?? e.name)), i = t.some((e) => e.identity), a = {};
|
|
1093
|
+
for (let e of t) {
|
|
1094
|
+
if (!e.identifier || !e.required || r.has(e.name)) continue;
|
|
1095
|
+
let t = hn(e, n) ?? (e.identity || !i ? ct(e.identifier) : void 0);
|
|
1096
|
+
t !== void 0 && (a[e.name] = t);
|
|
1051
1097
|
}
|
|
1098
|
+
return a;
|
|
1099
|
+
}
|
|
1100
|
+
function mn(e, t) {
|
|
1101
|
+
return !e.identifier || !e.required ? !1 : e.identity === !0 || hn(e, t) !== void 0;
|
|
1052
1102
|
}
|
|
1053
|
-
function
|
|
1103
|
+
function hn(e, t) {
|
|
1104
|
+
if (e.identifier) return t[e.name] || st(e.identifier);
|
|
1105
|
+
}
|
|
1106
|
+
function gn(e) {
|
|
1054
1107
|
let t = e.properties.populateSource;
|
|
1055
1108
|
return J(t) ? t : void 0;
|
|
1056
1109
|
}
|
|
1057
|
-
function
|
|
1058
|
-
let r =
|
|
1110
|
+
function _n(e, t, n) {
|
|
1111
|
+
let r = gn(e), i = r?.queryName, a = Object.entries(r?.parameterBindings ?? {}).map(([e, r]) => [e, vn(e, r?.path ?? e, t, n)]), s = Object.fromEntries(a.filter(([, e]) => e !== void 0 && e !== "")), c = !!i && n.routesReady && a.every(([, e]) => e !== void 0 && e !== ""), l = B({
|
|
1059
1112
|
scope: `populate:${q(e, "command")}`,
|
|
1060
1113
|
name: i,
|
|
1061
1114
|
route: i ? n.routes?.queries[i] : void 0,
|
|
@@ -1063,128 +1116,128 @@ function dn(e, t, n) {
|
|
|
1063
1116
|
ready: c,
|
|
1064
1117
|
publish: !1
|
|
1065
1118
|
}), u = r?.itemBinding ? n.resolveBinding(r.itemBinding) ?? n.selected : void 0, d = i ? l.rows[0] : J(u) ? u : void 0;
|
|
1066
|
-
return
|
|
1119
|
+
return o(() => {
|
|
1067
1120
|
if (!d) return;
|
|
1068
1121
|
let e = {};
|
|
1069
1122
|
for (let n of t) {
|
|
1070
1123
|
let t = d[n.name] ?? d[n.name.charAt(0).toLowerCase() + n.name.slice(1)];
|
|
1071
|
-
t != null && (e[n.name] =
|
|
1124
|
+
t != null && (e[n.name] = Jt(n, t));
|
|
1072
1125
|
}
|
|
1073
1126
|
return Object.keys(e).length > 0 ? e : void 0;
|
|
1074
1127
|
}, [d, t]);
|
|
1075
1128
|
}
|
|
1076
|
-
function
|
|
1129
|
+
function vn(e, t, n, r) {
|
|
1077
1130
|
let i = r.parameters[t] ?? r.parameters[e];
|
|
1078
1131
|
if (i) return i;
|
|
1079
1132
|
let a = n.find((n) => n.name === t || n.name === e)?.identifier;
|
|
1080
|
-
if (a) return
|
|
1133
|
+
if (a) return ct(a);
|
|
1081
1134
|
let o = r.resolveBinding({ path: t });
|
|
1082
1135
|
return typeof o == "string" || typeof o == "number" ? o : void 0;
|
|
1083
1136
|
}
|
|
1084
|
-
function
|
|
1085
|
-
let r =
|
|
1086
|
-
return
|
|
1137
|
+
function yn(e, t, n) {
|
|
1138
|
+
let r = o(() => bn(e, t), [e, t]), i = r.map((e) => n(e.source)), a = JSON.stringify(i);
|
|
1139
|
+
return o(() => {
|
|
1087
1140
|
let e = Object.fromEntries(r.map((e, t) => [e.name, i[t]]).filter(([, e]) => e != null && e !== ""));
|
|
1088
1141
|
return Object.keys(e).length > 0 ? e : void 0;
|
|
1089
|
-
}, [r,
|
|
1142
|
+
}, [r, a]);
|
|
1090
1143
|
}
|
|
1091
|
-
function
|
|
1144
|
+
function bn(e, t) {
|
|
1092
1145
|
let n = e.properties.arguments;
|
|
1093
1146
|
if (!Array.isArray(n)) return [];
|
|
1094
1147
|
let r = new Set(t.map((e) => e.sourceProperty ?? e.name));
|
|
1095
1148
|
return n.filter((e) => typeof e == "object" && !!e && typeof e.name == "string" && typeof e.source == "string" && r.has(e.name));
|
|
1096
1149
|
}
|
|
1097
|
-
function
|
|
1098
|
-
return e ===
|
|
1150
|
+
function xn(e) {
|
|
1151
|
+
return e === d.Manual ? d.Manual : d.Auto;
|
|
1099
1152
|
}
|
|
1100
|
-
function
|
|
1153
|
+
function Sn(e) {
|
|
1101
1154
|
if (!J(e)) return;
|
|
1102
1155
|
let t = e;
|
|
1103
1156
|
return {
|
|
1104
|
-
columns: Array.isArray(t.columns) ? t.columns.filter(
|
|
1105
|
-
placements: Array.isArray(t.placements) ? t.placements.filter(
|
|
1106
|
-
columnGap:
|
|
1107
|
-
rowGap:
|
|
1157
|
+
columns: Array.isArray(t.columns) ? t.columns.filter(jn) : [],
|
|
1158
|
+
placements: Array.isArray(t.placements) ? t.placements.filter(Mn) : [],
|
|
1159
|
+
columnGap: Nn(t.columnGap) ? t.columnGap : void 0,
|
|
1160
|
+
rowGap: Nn(t.rowGap) ? t.rowGap : void 0
|
|
1108
1161
|
};
|
|
1109
1162
|
}
|
|
1110
|
-
function
|
|
1163
|
+
function Cn(e, t) {
|
|
1111
1164
|
let n = new Map(e.placements.map((e) => [e.field, e]));
|
|
1112
|
-
for (let e of t) !n.has(e.name) &&
|
|
1165
|
+
for (let e of t) !n.has(e.name) && Mn(e.placement) && n.set(e.name, e.placement);
|
|
1113
1166
|
return [...n.values()].sort((e, t) => e.row - t.row || e.column - t.column || e.field.localeCompare(t.field));
|
|
1114
1167
|
}
|
|
1115
|
-
function
|
|
1168
|
+
function wn(e, t) {
|
|
1116
1169
|
return Math.max(1, ...e.columns.map((e) => e.index), ...t.map((e) => e.column + (e.columnSpan ?? 1) - 1));
|
|
1117
1170
|
}
|
|
1118
|
-
function
|
|
1171
|
+
function Tn(e, t) {
|
|
1119
1172
|
let n = t.find((t) => t.index === e), r = K(n?.width), i = K(n?.minWidth), a = K(n?.maxWidth);
|
|
1120
|
-
return n?.width?.unit ===
|
|
1173
|
+
return n?.width?.unit === f.Fraction && a ? `minmax(${i ?? "0"}, ${r ?? "1fr"})` : i || a ? `minmax(${i ?? "0"}, ${a && r ? `min(${r}, ${a})` : a ?? r ?? "1fr"})` : r ?? "1fr";
|
|
1121
1174
|
}
|
|
1122
|
-
function
|
|
1175
|
+
function En(e) {
|
|
1123
1176
|
if (e) return {
|
|
1124
1177
|
gridColumn: `${e.column} / span ${e.columnSpan ?? 1}`,
|
|
1125
1178
|
gridRow: `${e.row} / span ${e.rowSpan ?? 1}`,
|
|
1126
|
-
width: e.width?.unit ===
|
|
1179
|
+
width: e.width?.unit === f.Fraction ? void 0 : K(e.width)
|
|
1127
1180
|
};
|
|
1128
1181
|
}
|
|
1129
1182
|
function K(e) {
|
|
1130
1183
|
if (e) switch (e.unit) {
|
|
1131
|
-
case
|
|
1132
|
-
case
|
|
1133
|
-
case
|
|
1134
|
-
case
|
|
1184
|
+
case f.Fraction: return `${e.value ?? 1}fr`;
|
|
1185
|
+
case f.Pixels: return `${e.value ?? 0}px`;
|
|
1186
|
+
case f.Percent: return `${e.value ?? 100}%`;
|
|
1187
|
+
case f.Auto: return "auto";
|
|
1135
1188
|
}
|
|
1136
1189
|
}
|
|
1137
|
-
function
|
|
1190
|
+
function Dn(e, t, n, r) {
|
|
1138
1191
|
let i = e.find((e) => (e.sourceProperty ?? e.name) === n), a = t.find((e) => e.name === n);
|
|
1139
|
-
if (a?.required ?? !0) return r == null || r === "" ? `${i?.label ?? n} is required` : a ?
|
|
1192
|
+
if (a?.required ?? !0) return r == null || r === "" ? `${i?.label ?? n} is required` : a ? Kt(a, r, i?.label ?? n) : void 0;
|
|
1140
1193
|
}
|
|
1141
|
-
function
|
|
1194
|
+
function On(e, t) {
|
|
1142
1195
|
let n = new Map(t.map((e) => [e.name, e]));
|
|
1143
1196
|
return e.flatMap((e) => {
|
|
1144
1197
|
let t = n.get(e.sourceProperty ?? e.name);
|
|
1145
1198
|
return t?.unsupportedReason ? [`The field “${e.label ?? e.name}” uses unsupported schema metadata: ${t.unsupportedReason}.`] : [];
|
|
1146
1199
|
});
|
|
1147
1200
|
}
|
|
1148
|
-
function
|
|
1201
|
+
function kn(e, t) {
|
|
1149
1202
|
if (!e) return [];
|
|
1150
|
-
let n =
|
|
1203
|
+
let n = Cn(e, t).filter((e) => e.width?.unit === f.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 === f.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.`);
|
|
1151
1204
|
return [...n, ...r];
|
|
1152
1205
|
}
|
|
1153
|
-
function
|
|
1154
|
-
return
|
|
1206
|
+
function An(e) {
|
|
1207
|
+
return Bt(q(e, "schema"));
|
|
1155
1208
|
}
|
|
1156
1209
|
function q(e, t, n = "") {
|
|
1157
1210
|
let r = e.properties[t];
|
|
1158
1211
|
return typeof r == "string" ? r : n;
|
|
1159
1212
|
}
|
|
1160
|
-
function
|
|
1213
|
+
function jn(e) {
|
|
1161
1214
|
return J(e) && typeof e.index == "number" && Number.isInteger(e.index) && e.index > 0;
|
|
1162
1215
|
}
|
|
1163
|
-
function
|
|
1216
|
+
function Mn(e) {
|
|
1164
1217
|
return J(e) && typeof e.field == "string" && typeof e.row == "number" && typeof e.column == "number" && e.row > 0 && e.column > 0;
|
|
1165
1218
|
}
|
|
1166
|
-
function
|
|
1167
|
-
return J(e) && Object.values(
|
|
1219
|
+
function Nn(e) {
|
|
1220
|
+
return J(e) && Object.values(f).includes(e.unit);
|
|
1168
1221
|
}
|
|
1169
1222
|
function J(e) {
|
|
1170
1223
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1171
1224
|
}
|
|
1172
1225
|
//#endregion
|
|
1173
1226
|
//#region src/StageGuardedAction.tsx
|
|
1174
|
-
function
|
|
1227
|
+
function Pn(e) {
|
|
1175
1228
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1176
1229
|
}
|
|
1177
1230
|
function Y(e, t) {
|
|
1178
1231
|
let n = e.properties[t];
|
|
1179
1232
|
return typeof n == "string" ? n : "";
|
|
1180
1233
|
}
|
|
1181
|
-
function
|
|
1234
|
+
function Fn(e) {
|
|
1182
1235
|
return e.componentName === "core:action" && (Array.isArray(e.properties.alternatives) || e.properties.otherwise !== void 0);
|
|
1183
1236
|
}
|
|
1184
|
-
function
|
|
1185
|
-
let t = z(), n = Y(e, "itemQuery"), r = (n ? t.routes?.queries[n] : void 0) ?? Y(e, "itemRoute"), i =
|
|
1237
|
+
function In(e) {
|
|
1238
|
+
let t = z(), n = Y(e, "itemQuery"), r = (n ? t.routes?.queries[n] : void 0) ?? Y(e, "itemRoute"), i = Pn(e.properties.itemArguments) ? e.properties.itemArguments : {}, a = {}, o = !0;
|
|
1186
1239
|
for (let [e, n] of Object.entries(i)) {
|
|
1187
|
-
let r =
|
|
1240
|
+
let r = Pn(n) ? t.resolveBinding(n) : n;
|
|
1188
1241
|
a[e] = r, (r == null || r === "") && (o = !1);
|
|
1189
1242
|
}
|
|
1190
1243
|
let s = B({
|
|
@@ -1200,23 +1253,23 @@ function An(e) {
|
|
|
1200
1253
|
item: s.rows.length === 1 ? s.rows[0] : void 0
|
|
1201
1254
|
};
|
|
1202
1255
|
}
|
|
1203
|
-
function
|
|
1204
|
-
return Object.fromEntries(Object.entries(e.arguments ?? {}).map(([e, n]) => [e,
|
|
1256
|
+
function Ln(e, t) {
|
|
1257
|
+
return Object.fromEntries(Object.entries(e.arguments ?? {}).map(([e, n]) => [e, at(Je(n) ?? "", t)]));
|
|
1205
1258
|
}
|
|
1206
|
-
function
|
|
1207
|
-
let n = z(), r =
|
|
1208
|
-
if (!
|
|
1209
|
-
let n = r.hasSource ? `${
|
|
1210
|
-
return /* @__PURE__ */
|
|
1259
|
+
function Rn({ element: e, interactions: t }) {
|
|
1260
|
+
let n = z(), r = In(e), i = It(), [a, s] = c([]), [l, u] = c(!1), d = Y(e, "label"), f = o(() => Array.isArray(e.properties.alternatives) ? e.properties.alternatives : [], [e]), p = Pn(e.properties.otherwise) ? e.properties.otherwise : void 0, m = f.map((e) => e.condition), h = !p || p.outcome === "Hidden" || p.outcome === "Execute" && !!p.command;
|
|
1261
|
+
if (!nt(m) || !h || !r.hasSource) {
|
|
1262
|
+
let n = r.hasSource ? `${Ye}: “${d}” has a guard this Stage cannot evaluate, so it stays unavailable.` : `${Ye}: “${d}” has no data subject to evaluate its guard against.`;
|
|
1263
|
+
return /* @__PURE__ */ F("div", {
|
|
1211
1264
|
className: "stage-guarded-action",
|
|
1212
1265
|
"data-scene-id": e.id,
|
|
1213
|
-
children: [/* @__PURE__ */
|
|
1266
|
+
children: [/* @__PURE__ */ P(I, {
|
|
1214
1267
|
type: "button",
|
|
1215
1268
|
disabled: !0,
|
|
1216
1269
|
title: n,
|
|
1217
1270
|
...t,
|
|
1218
1271
|
children: d
|
|
1219
|
-
}), /* @__PURE__ */
|
|
1272
|
+
}), /* @__PURE__ */ P("p", {
|
|
1220
1273
|
role: "alert",
|
|
1221
1274
|
className: "stage-form-error",
|
|
1222
1275
|
children: n
|
|
@@ -1224,64 +1277,64 @@ function Mn({ element: e, interactions: t }) {
|
|
|
1224
1277
|
});
|
|
1225
1278
|
}
|
|
1226
1279
|
if (!r.item) return null;
|
|
1227
|
-
let g =
|
|
1280
|
+
let g = rt(m, r.item), _ = g !== void 0 && g >= 0 ? f[g] : p?.outcome === "Execute" ? p : void 0;
|
|
1228
1281
|
if (!_?.command) return null;
|
|
1229
1282
|
let v = _.command, y = U(v), b = r.item, x = async () => {
|
|
1230
1283
|
if (!y) return;
|
|
1231
1284
|
u(!0);
|
|
1232
|
-
let t = await i(v,
|
|
1233
|
-
if (u(!1),
|
|
1285
|
+
let t = await i(v, Ln(_, b));
|
|
1286
|
+
if (u(!1), s(t.messages), !t.isSuccess) return;
|
|
1234
1287
|
n.refreshAfterCommand();
|
|
1235
|
-
let r = Y(e, "navigateToScreen"), a = Y(e, "navigateByParameter"), o = a ?
|
|
1288
|
+
let r = Y(e, "navigateToScreen"), a = Y(e, "navigateByParameter"), o = a ? at(`item.${a}`, b) : void 0;
|
|
1236
1289
|
r && W(r, a && o != null ? { [a]: String(o) } : {});
|
|
1237
1290
|
};
|
|
1238
|
-
return /* @__PURE__ */
|
|
1291
|
+
return /* @__PURE__ */ F("div", {
|
|
1239
1292
|
className: "stage-guarded-action",
|
|
1240
1293
|
"data-scene-id": e.id,
|
|
1241
1294
|
"data-command": v,
|
|
1242
|
-
children: [/* @__PURE__ */
|
|
1295
|
+
children: [/* @__PURE__ */ P(I, {
|
|
1243
1296
|
...t,
|
|
1244
1297
|
type: "button",
|
|
1245
1298
|
disabled: !y || l,
|
|
1246
1299
|
title: y ? void 0 : "This command is not exposed as an API yet",
|
|
1247
1300
|
onClick: () => void x(),
|
|
1248
1301
|
children: d
|
|
1249
|
-
}),
|
|
1302
|
+
}), a.map((e) => /* @__PURE__ */ P("p", {
|
|
1250
1303
|
role: "alert",
|
|
1251
1304
|
className: "stage-form-error",
|
|
1252
1305
|
children: e
|
|
1253
1306
|
}, e))]
|
|
1254
1307
|
});
|
|
1255
1308
|
}
|
|
1256
|
-
function
|
|
1257
|
-
let t =
|
|
1309
|
+
function zn(e) {
|
|
1310
|
+
let t = oe(), r = s(void 0), a = o(() => v(ie(e.id, e.behaviors), p.DoubleClick), [e.behaviors, e.id]);
|
|
1258
1311
|
i(() => () => clearTimeout(r.current), []);
|
|
1259
1312
|
let c = n((e) => {
|
|
1260
1313
|
if (clearTimeout(r.current), r.current = void 0, !t) return;
|
|
1261
|
-
let n = (n) => n.path === "$guard" ?
|
|
1262
|
-
|
|
1314
|
+
let n = (n) => n.path === "$guard" ? it(n.value, e) : n.path?.startsWith("item.") ? at(n.path, e) : t.context.resolve(n);
|
|
1315
|
+
b(a, t.dispatcher, {
|
|
1263
1316
|
...t.context,
|
|
1264
1317
|
resolve: n
|
|
1265
1318
|
}).then((e) => {
|
|
1266
1319
|
e.findings.length > 0 && t.onFindings?.(e.findings);
|
|
1267
1320
|
});
|
|
1268
|
-
}, [
|
|
1321
|
+
}, [a, t]);
|
|
1269
1322
|
return {
|
|
1270
1323
|
click: n((e, t) => {
|
|
1271
|
-
if (
|
|
1324
|
+
if (a.length === 0) {
|
|
1272
1325
|
t();
|
|
1273
1326
|
return;
|
|
1274
1327
|
}
|
|
1275
1328
|
clearTimeout(r.current), r.current = setTimeout(() => {
|
|
1276
1329
|
r.current = void 0, t();
|
|
1277
1330
|
}, 250);
|
|
1278
|
-
}, [
|
|
1279
|
-
doubleClick:
|
|
1331
|
+
}, [a.length]),
|
|
1332
|
+
doubleClick: a.length > 0 ? c : void 0
|
|
1280
1333
|
};
|
|
1281
1334
|
}
|
|
1282
1335
|
//#endregion
|
|
1283
1336
|
//#region src/stageComponents.tsx
|
|
1284
|
-
var
|
|
1337
|
+
var Bn = "Stage:commandForm";
|
|
1285
1338
|
function X(e, t, n = {}) {
|
|
1286
1339
|
return {
|
|
1287
1340
|
id: e,
|
|
@@ -1294,15 +1347,15 @@ function Z(e, t, n = "") {
|
|
|
1294
1347
|
let r = e.properties[t];
|
|
1295
1348
|
return typeof r == "string" ? r : n;
|
|
1296
1349
|
}
|
|
1297
|
-
function
|
|
1350
|
+
function Vn(e, t) {
|
|
1298
1351
|
let n = e.properties.queryArguments;
|
|
1299
|
-
if (!
|
|
1352
|
+
if (!Gn(n)) return {
|
|
1300
1353
|
values: {},
|
|
1301
1354
|
ready: !0
|
|
1302
1355
|
};
|
|
1303
1356
|
let r = {}, i = !0;
|
|
1304
1357
|
for (let [e, a] of Object.entries(n)) {
|
|
1305
|
-
let n =
|
|
1358
|
+
let n = Wn(a) ? t.resolveBinding(a) : a;
|
|
1306
1359
|
r[e] = n, (n == null || n === "") && (i = !1);
|
|
1307
1360
|
}
|
|
1308
1361
|
return {
|
|
@@ -1310,7 +1363,7 @@ function Fn(e, t) {
|
|
|
1310
1363
|
ready: i
|
|
1311
1364
|
};
|
|
1312
1365
|
}
|
|
1313
|
-
function
|
|
1366
|
+
function Hn(e, t) {
|
|
1314
1367
|
let n = (e.slots.columns ?? []).map((e) => {
|
|
1315
1368
|
let t = e.properties;
|
|
1316
1369
|
return {
|
|
@@ -1326,14 +1379,14 @@ function In(e, t) {
|
|
|
1326
1379
|
function Q(e, t) {
|
|
1327
1380
|
return e[t] ?? e.id ?? e.key;
|
|
1328
1381
|
}
|
|
1329
|
-
function
|
|
1330
|
-
let n = z(), r = Z(e, "query", Z(e, "typeName", e.id)),
|
|
1382
|
+
function Un({ element: e, slots: t }) {
|
|
1383
|
+
let n = z(), r = Z(e, "query", Z(e, "typeName", e.id)), a = (Z(e, "query") ? n.routes?.queries[Z(e, "query")] : void 0) ?? Z(e, "route"), s = o(() => Vn(e, n), [n, e]), { rows: c, error: l, loading: u } = B({
|
|
1331
1384
|
scope: e.id,
|
|
1332
1385
|
name: r,
|
|
1333
|
-
route:
|
|
1386
|
+
route: a || void 0,
|
|
1334
1387
|
arguments: s.values,
|
|
1335
1388
|
ready: s.ready
|
|
1336
|
-
}), d =
|
|
1389
|
+
}), d = Hn(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, _ = zn(e);
|
|
1337
1390
|
i(() => {
|
|
1338
1391
|
if (!h) return;
|
|
1339
1392
|
let t = Q(h, m), r = t === void 0 ? void 0 : c.find((e) => Q(e, m) === t);
|
|
@@ -1379,25 +1432,25 @@ function Ln({ element: e, slots: t }) {
|
|
|
1379
1432
|
}
|
|
1380
1433
|
n.selectRow(e.id, t);
|
|
1381
1434
|
};
|
|
1382
|
-
return
|
|
1435
|
+
return a ? /* @__PURE__ */ F("section", {
|
|
1383
1436
|
className: "stage-table",
|
|
1384
1437
|
"data-scene-id": e.id,
|
|
1385
1438
|
children: [
|
|
1386
|
-
u && /* @__PURE__ */
|
|
1439
|
+
u && /* @__PURE__ */ P(ke, {
|
|
1387
1440
|
element: X(`${e.id}-loading`, {
|
|
1388
1441
|
severity: "info",
|
|
1389
1442
|
text: "Loading…"
|
|
1390
1443
|
}),
|
|
1391
1444
|
slots: {}
|
|
1392
1445
|
}),
|
|
1393
|
-
l && /* @__PURE__ */
|
|
1446
|
+
l && /* @__PURE__ */ P(ke, {
|
|
1394
1447
|
element: X(`${e.id}-error`, {
|
|
1395
1448
|
severity: "error",
|
|
1396
1449
|
text: l
|
|
1397
1450
|
}),
|
|
1398
1451
|
slots: {}
|
|
1399
1452
|
}),
|
|
1400
|
-
h && /* @__PURE__ */
|
|
1453
|
+
h && /* @__PURE__ */ P(I, {
|
|
1401
1454
|
type: "button",
|
|
1402
1455
|
size: "small",
|
|
1403
1456
|
onClick: () => {
|
|
@@ -1407,12 +1460,12 @@ function Ln({ element: e, slots: t }) {
|
|
|
1407
1460
|
},
|
|
1408
1461
|
children: "Clear selection"
|
|
1409
1462
|
}),
|
|
1410
|
-
/* @__PURE__ */
|
|
1463
|
+
/* @__PURE__ */ F("table", {
|
|
1411
1464
|
"aria-label": Z(e, "label", Z(e, "typeName", "Results")),
|
|
1412
|
-
children: [/* @__PURE__ */
|
|
1465
|
+
children: [/* @__PURE__ */ P("thead", { children: /* @__PURE__ */ P("tr", { children: d.map((e) => /* @__PURE__ */ P("th", {
|
|
1413
1466
|
scope: "col",
|
|
1414
1467
|
children: e.label
|
|
1415
|
-
}, e.property)) }) }), /* @__PURE__ */
|
|
1468
|
+
}, e.property)) }) }), /* @__PURE__ */ F("tbody", { children: [c.map((e, t) => /* @__PURE__ */ P("tr", {
|
|
1416
1469
|
"aria-selected": h === e,
|
|
1417
1470
|
tabIndex: 0,
|
|
1418
1471
|
onClick: () => _.click(e, () => v(e)),
|
|
@@ -1420,17 +1473,17 @@ function Ln({ element: e, slots: t }) {
|
|
|
1420
1473
|
onKeyDown: (t) => {
|
|
1421
1474
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), v(e));
|
|
1422
1475
|
},
|
|
1423
|
-
children: d.map((t) => /* @__PURE__ */
|
|
1424
|
-
}, String(Q(e, m) ?? t))), c.length === 0 && !u && /* @__PURE__ */
|
|
1476
|
+
children: d.map((t) => /* @__PURE__ */ P("td", { children: String(e[t.property] ?? "") }, t.property))
|
|
1477
|
+
}, String(Q(e, m) ?? t))), c.length === 0 && !u && /* @__PURE__ */ P("tr", { children: /* @__PURE__ */ P("td", {
|
|
1425
1478
|
colSpan: Math.max(d.length, 1),
|
|
1426
1479
|
children: "No records found"
|
|
1427
1480
|
}) })] })]
|
|
1428
1481
|
})
|
|
1429
1482
|
]
|
|
1430
|
-
}) : /* @__PURE__ */
|
|
1483
|
+
}) : /* @__PURE__ */ F("section", {
|
|
1431
1484
|
className: "stage-table",
|
|
1432
1485
|
"data-scene-id": e.id,
|
|
1433
|
-
children: [/* @__PURE__ */
|
|
1486
|
+
children: [/* @__PURE__ */ F("p", {
|
|
1434
1487
|
className: "stage-note",
|
|
1435
1488
|
children: [
|
|
1436
1489
|
"No query is exposed for ",
|
|
@@ -1440,28 +1493,28 @@ function Ln({ element: e, slots: t }) {
|
|
|
1440
1493
|
}), t.columns]
|
|
1441
1494
|
});
|
|
1442
1495
|
}
|
|
1443
|
-
function
|
|
1444
|
-
return
|
|
1496
|
+
function Wn(e) {
|
|
1497
|
+
return Gn(e) && (typeof e.path == "string" || typeof e.kind == "string");
|
|
1445
1498
|
}
|
|
1446
|
-
function
|
|
1499
|
+
function Gn(e) {
|
|
1447
1500
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1448
1501
|
}
|
|
1449
|
-
function
|
|
1450
|
-
return
|
|
1502
|
+
function Kn({ element: e, interactions: t, slots: n }) {
|
|
1503
|
+
return Fn(e) ? /* @__PURE__ */ P(Rn, {
|
|
1451
1504
|
element: e,
|
|
1452
1505
|
interactions: t
|
|
1453
|
-
}) : /* @__PURE__ */
|
|
1506
|
+
}) : /* @__PURE__ */ P(qn, {
|
|
1454
1507
|
element: e,
|
|
1455
1508
|
interactions: t,
|
|
1456
1509
|
slots: n
|
|
1457
1510
|
});
|
|
1458
1511
|
}
|
|
1459
|
-
function
|
|
1512
|
+
function qn({ element: e, interactions: t }) {
|
|
1460
1513
|
let n = Z(e, "label", Z(e, "command"));
|
|
1461
|
-
return U(Z(e, "command"), Z(e, "typeName"), Z(e, "route")) ? /* @__PURE__ */
|
|
1514
|
+
return U(Z(e, "command"), Z(e, "typeName"), Z(e, "route")) ? /* @__PURE__ */ P(Jn, {
|
|
1462
1515
|
element: e,
|
|
1463
1516
|
label: n
|
|
1464
|
-
}) : /* @__PURE__ */
|
|
1517
|
+
}) : /* @__PURE__ */ P(I, {
|
|
1465
1518
|
type: "button",
|
|
1466
1519
|
"data-scene-id": e.id,
|
|
1467
1520
|
disabled: !0,
|
|
@@ -1470,15 +1523,15 @@ function Vn({ element: e, interactions: t }) {
|
|
|
1470
1523
|
children: n
|
|
1471
1524
|
});
|
|
1472
1525
|
}
|
|
1473
|
-
function
|
|
1474
|
-
let [r, i] =
|
|
1526
|
+
function Jn({ element: e, label: t }) {
|
|
1527
|
+
let [r, i] = c(0), a = n(() => i((e) => e + 1), []), o = /* @__PURE__ */ P(an.Provider, {
|
|
1475
1528
|
value: a,
|
|
1476
|
-
children: /* @__PURE__ */
|
|
1529
|
+
children: /* @__PURE__ */ P(on, { element: e })
|
|
1477
1530
|
});
|
|
1478
|
-
return /* @__PURE__ */
|
|
1531
|
+
return /* @__PURE__ */ P("div", {
|
|
1479
1532
|
className: "stage-action",
|
|
1480
1533
|
"data-scene-id": e.id,
|
|
1481
|
-
children: /* @__PURE__ */
|
|
1534
|
+
children: /* @__PURE__ */ P(Oe, {
|
|
1482
1535
|
element: X(e.id, {
|
|
1483
1536
|
visible: !1,
|
|
1484
1537
|
header: t,
|
|
@@ -1488,53 +1541,53 @@ function Hn({ element: e, label: t }) {
|
|
|
1488
1541
|
}, r)
|
|
1489
1542
|
});
|
|
1490
1543
|
}
|
|
1491
|
-
function
|
|
1492
|
-
let t = e.element ?? X("slice-dialog", {}), r =
|
|
1493
|
-
if (!
|
|
1544
|
+
function Yn(e) {
|
|
1545
|
+
let t = e.element ?? X("slice-dialog", {}), r = se(), { routes: i, parameters: a } = z(), s = O(r?.currentDialogParameters), c = Z(t, "command") || s?.command || Z(t, "slice") || "", l = Z(t, "title") || s?.title || c, u = i?.commandSchemas?.[c], d = o(() => Bt(u ?? ""), [u]), f = n(() => r?.closeDialog(), [r]);
|
|
1546
|
+
if (!u || !d.some((e) => e.options || e.members || e.item)) return e.element ? /* @__PURE__ */ P(S, {
|
|
1494
1547
|
element: e.element,
|
|
1495
1548
|
slots: e.slots ?? {}
|
|
1496
|
-
}) : /* @__PURE__ */
|
|
1497
|
-
let
|
|
1498
|
-
command:
|
|
1499
|
-
label:
|
|
1500
|
-
schema:
|
|
1501
|
-
fields:
|
|
1549
|
+
}) : /* @__PURE__ */ P(re, {});
|
|
1550
|
+
let p = d.filter((e) => !mn(e, a)), m = X(`slice-dialog-${c}`, {
|
|
1551
|
+
command: c,
|
|
1552
|
+
label: l,
|
|
1553
|
+
schema: u,
|
|
1554
|
+
fields: p.map((e) => ({
|
|
1502
1555
|
name: e.name,
|
|
1503
1556
|
label: G(e.name)
|
|
1504
1557
|
})),
|
|
1505
1558
|
generationMode: "manual"
|
|
1506
1559
|
});
|
|
1507
|
-
return /* @__PURE__ */
|
|
1560
|
+
return /* @__PURE__ */ F("section", {
|
|
1508
1561
|
className: "scene-slice-dialog",
|
|
1509
|
-
"data-scene-slice-dialog": Z(t, "slice") ||
|
|
1510
|
-
"data-scene-command":
|
|
1562
|
+
"data-scene-slice-dialog": Z(t, "slice") || s?.slice,
|
|
1563
|
+
"data-scene-command": c,
|
|
1511
1564
|
children: [
|
|
1512
|
-
/* @__PURE__ */
|
|
1565
|
+
/* @__PURE__ */ P("header", {
|
|
1513
1566
|
className: "scene-slice-dialog-header",
|
|
1514
|
-
children: /* @__PURE__ */
|
|
1567
|
+
children: /* @__PURE__ */ P("h2", {
|
|
1515
1568
|
className: "scene-slice-dialog-title",
|
|
1516
|
-
children:
|
|
1569
|
+
children: l
|
|
1517
1570
|
})
|
|
1518
1571
|
}),
|
|
1519
|
-
/* @__PURE__ */
|
|
1520
|
-
value:
|
|
1521
|
-
children: /* @__PURE__ */
|
|
1572
|
+
/* @__PURE__ */ P(an.Provider, {
|
|
1573
|
+
value: f,
|
|
1574
|
+
children: /* @__PURE__ */ P(on, { element: m })
|
|
1522
1575
|
}),
|
|
1523
|
-
/* @__PURE__ */
|
|
1576
|
+
/* @__PURE__ */ P("footer", {
|
|
1524
1577
|
className: "scene-slice-dialog-footer",
|
|
1525
|
-
children: /* @__PURE__ */
|
|
1578
|
+
children: /* @__PURE__ */ P("button", {
|
|
1526
1579
|
type: "button",
|
|
1527
1580
|
className: "scene-slice-dialog-cancel",
|
|
1528
|
-
onClick:
|
|
1581
|
+
onClick: f,
|
|
1529
1582
|
children: "Cancel"
|
|
1530
1583
|
})
|
|
1531
1584
|
})
|
|
1532
1585
|
]
|
|
1533
1586
|
});
|
|
1534
1587
|
}
|
|
1535
|
-
function
|
|
1588
|
+
function Xn(e) {
|
|
1536
1589
|
let { element: t } = e;
|
|
1537
|
-
if (Z(t, "kind").toLowerCase() !== "action" || Z(t, "slice") !== "") return /* @__PURE__ */
|
|
1590
|
+
if (Z(t, "kind").toLowerCase() !== "action" || Z(t, "slice") !== "") return /* @__PURE__ */ P(C, { ...e });
|
|
1538
1591
|
let n = Z(t, "name", t.id), r = {
|
|
1539
1592
|
...t,
|
|
1540
1593
|
componentName: "core:action",
|
|
@@ -1543,28 +1596,28 @@ function Wn(e) {
|
|
|
1543
1596
|
label: Z(t, "label", n)
|
|
1544
1597
|
}
|
|
1545
1598
|
};
|
|
1546
|
-
return /* @__PURE__ */
|
|
1599
|
+
return /* @__PURE__ */ P("span", {
|
|
1547
1600
|
className: "stage-toolbar-action",
|
|
1548
1601
|
"data-scene-toolbar-item": n,
|
|
1549
|
-
children: /* @__PURE__ */
|
|
1602
|
+
children: /* @__PURE__ */ P(Kn, {
|
|
1550
1603
|
element: r,
|
|
1551
1604
|
interactions: e.interactions,
|
|
1552
1605
|
slots: e.slots
|
|
1553
1606
|
})
|
|
1554
1607
|
});
|
|
1555
1608
|
}
|
|
1556
|
-
var
|
|
1557
|
-
...
|
|
1558
|
-
"core:table":
|
|
1559
|
-
"core:action":
|
|
1560
|
-
"core:toolbarItem":
|
|
1561
|
-
"core:sliceDialog":
|
|
1562
|
-
[
|
|
1609
|
+
var Zn = {
|
|
1610
|
+
...E,
|
|
1611
|
+
"core:table": Un,
|
|
1612
|
+
"core:action": Kn,
|
|
1613
|
+
"core:toolbarItem": Xn,
|
|
1614
|
+
"core:sliceDialog": Yn,
|
|
1615
|
+
[Bn]: on
|
|
1563
1616
|
};
|
|
1564
1617
|
//#endregion
|
|
1565
1618
|
//#region src/useStrings.ts
|
|
1566
|
-
function
|
|
1567
|
-
let e =
|
|
1619
|
+
function Qn() {
|
|
1620
|
+
let e = L(), [t, n] = c([]), [r, a] = c(""), [o, s] = c({});
|
|
1568
1621
|
return i(() => {
|
|
1569
1622
|
let t = new AbortController();
|
|
1570
1623
|
return e.locales(t.signal).then((e) => {
|
|
@@ -1573,7 +1626,7 @@ function Kn() {
|
|
|
1573
1626
|
}, [e]), i(() => {
|
|
1574
1627
|
if (!r) return;
|
|
1575
1628
|
let t = new AbortController();
|
|
1576
|
-
return e.strings(r, t.signal).then(
|
|
1629
|
+
return e.strings(r, t.signal).then(s).catch(() => s({})), () => t.abort();
|
|
1577
1630
|
}, [r, e]), {
|
|
1578
1631
|
locales: t,
|
|
1579
1632
|
locale: r,
|
|
@@ -1581,11 +1634,11 @@ function Kn() {
|
|
|
1581
1634
|
dictionary: o
|
|
1582
1635
|
};
|
|
1583
1636
|
}
|
|
1584
|
-
var
|
|
1585
|
-
function
|
|
1586
|
-
return
|
|
1637
|
+
var $n = /* @__PURE__ */ new Set(["core:table"]);
|
|
1638
|
+
function er(e) {
|
|
1639
|
+
return tr(e, /* @__PURE__ */ new Map(), void 0);
|
|
1587
1640
|
}
|
|
1588
|
-
function
|
|
1641
|
+
function tr(e, t, n) {
|
|
1589
1642
|
let r = e;
|
|
1590
1643
|
if (!r.slots) return e;
|
|
1591
1644
|
let i = !1, a = {};
|
|
@@ -1594,7 +1647,7 @@ function Yn(e, t, n) {
|
|
|
1594
1647
|
a[e] = o.map((e) => {
|
|
1595
1648
|
let t = e, n = $(t, "typeName");
|
|
1596
1649
|
t.componentName === "core:data" && n && (r.set(n, t), s = t);
|
|
1597
|
-
let a =
|
|
1650
|
+
let a = tr(rr(nr(t, r), s), r, s);
|
|
1598
1651
|
return a !== e && (i = !0), a;
|
|
1599
1652
|
});
|
|
1600
1653
|
}
|
|
@@ -1603,20 +1656,20 @@ function Yn(e, t, n) {
|
|
|
1603
1656
|
slots: a
|
|
1604
1657
|
} : e;
|
|
1605
1658
|
}
|
|
1606
|
-
function
|
|
1607
|
-
if (
|
|
1659
|
+
function nr(e, t) {
|
|
1660
|
+
if (!$n.has(e.componentName)) return e;
|
|
1608
1661
|
let n = $(e, "typeName"), r = n ? t.get(n) : void 0;
|
|
1609
1662
|
if (!r || e.properties.queryArguments !== void 0) return e;
|
|
1610
1663
|
let i = $(r, "by"), a = { ...e.properties }, o = $(r, "query");
|
|
1611
|
-
return o && (a.query = o), !$(e, "route") && $(r, "route") && (a.route = r.properties.route), i && (a.by = i, a.queryArguments = { [i]: { path: `
|
|
1664
|
+
return o && (a.query = o), !$(e, "route") && $(r, "route") && (a.route = r.properties.route), i && (a.by = i, a.queryArguments = { [i]: { path: `screen.keys.${i}` } }), {
|
|
1612
1665
|
...e,
|
|
1613
1666
|
properties: a
|
|
1614
1667
|
};
|
|
1615
1668
|
}
|
|
1616
|
-
function
|
|
1669
|
+
function rr(e, t) {
|
|
1617
1670
|
if (e.componentName !== "core:action" || !Array.isArray(e.properties?.alternatives) || !t || t.properties?.isCollection === !0 || e.properties.itemQuery !== void 0) return e;
|
|
1618
1671
|
let n = { ...e.properties }, r = $(t, "query"), i = $(t, "by");
|
|
1619
|
-
return r && (n.itemQuery = r), $(t, "route") && (n.itemRoute = t.properties.route), n.itemArguments = i ? { [i]: { path: `
|
|
1672
|
+
return r && (n.itemQuery = r), $(t, "route") && (n.itemRoute = t.properties.route), n.itemArguments = i ? { [i]: { path: `screen.keys.${i}` } } : {}, {
|
|
1620
1673
|
...e,
|
|
1621
1674
|
properties: n
|
|
1622
1675
|
};
|
|
@@ -1627,7 +1680,7 @@ function $(e, t) {
|
|
|
1627
1680
|
}
|
|
1628
1681
|
//#endregion
|
|
1629
1682
|
//#region src/stageQueryBindings.tsx
|
|
1630
|
-
function
|
|
1683
|
+
function ir(e) {
|
|
1631
1684
|
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
1632
1685
|
if (Array.isArray(e)) {
|
|
1633
1686
|
e.forEach(n);
|
|
@@ -1647,7 +1700,7 @@ function Qn(e) {
|
|
|
1647
1700
|
};
|
|
1648
1701
|
return r(e), [...t];
|
|
1649
1702
|
}
|
|
1650
|
-
function
|
|
1703
|
+
function ar(e) {
|
|
1651
1704
|
let t = /* @__PURE__ */ new Map(), n = (e, t) => {
|
|
1652
1705
|
let n = e.properties?.[t];
|
|
1653
1706
|
return typeof n == "string" && n.length > 0 ? n : void 0;
|
|
@@ -1666,10 +1719,14 @@ function $n(e) {
|
|
|
1666
1719
|
};
|
|
1667
1720
|
return r(e), [...t.values()];
|
|
1668
1721
|
}
|
|
1669
|
-
function
|
|
1670
|
-
let { routes: t, routesReady: n, parameters: r } = z(),
|
|
1671
|
-
i,
|
|
1722
|
+
function or({ source: e }) {
|
|
1723
|
+
let { routes: t, routesReady: n, parameters: r, session: i } = z(), a = e.by ? r[e.by] || i[e.by] : void 0, s = o(() => e.by ? a ? { [e.by]: a } : {} : {
|
|
1724
|
+
...i,
|
|
1725
|
+
...r
|
|
1726
|
+
}, [
|
|
1727
|
+
a,
|
|
1672
1728
|
r,
|
|
1729
|
+
i,
|
|
1673
1730
|
e.by
|
|
1674
1731
|
]);
|
|
1675
1732
|
return B({
|
|
@@ -1677,27 +1734,30 @@ function er({ source: e }) {
|
|
|
1677
1734
|
name: e.query,
|
|
1678
1735
|
alias: e.typeName,
|
|
1679
1736
|
route: t?.queries[e.query] ?? e.route,
|
|
1680
|
-
arguments:
|
|
1681
|
-
ready: n && (!e.by || !!
|
|
1737
|
+
arguments: s,
|
|
1738
|
+
ready: n && (!e.by || !!a),
|
|
1682
1739
|
list: !0
|
|
1683
1740
|
}), null;
|
|
1684
1741
|
}
|
|
1685
|
-
function
|
|
1686
|
-
let { routes: t, routesReady: n, parameters: r } = z(),
|
|
1742
|
+
function sr({ name: e }) {
|
|
1743
|
+
let { routes: t, routesReady: n, parameters: r, session: i } = z(), a = o(() => ({
|
|
1744
|
+
...i,
|
|
1745
|
+
...r
|
|
1746
|
+
}), [r, i]);
|
|
1687
1747
|
return B({
|
|
1688
1748
|
scope: `binding:${e}`,
|
|
1689
1749
|
name: e,
|
|
1690
1750
|
route: t?.queries[e],
|
|
1691
|
-
arguments:
|
|
1751
|
+
arguments: a,
|
|
1692
1752
|
ready: n,
|
|
1693
1753
|
list: !0
|
|
1694
1754
|
}), null;
|
|
1695
1755
|
}
|
|
1696
|
-
function
|
|
1697
|
-
let t =
|
|
1698
|
-
return /* @__PURE__ */
|
|
1756
|
+
function cr({ element: e }) {
|
|
1757
|
+
let t = o(() => ir(e), [e]), n = o(() => ar(e), [e]);
|
|
1758
|
+
return /* @__PURE__ */ F(De, { children: [t.map((e) => /* @__PURE__ */ P(sr, { name: e }, e)), n.map((e) => /* @__PURE__ */ P(or, { source: e }, e.typeName))] });
|
|
1699
1759
|
}
|
|
1700
|
-
function
|
|
1760
|
+
function lr(e) {
|
|
1701
1761
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
1702
1762
|
for (let r of e) for (let e of r.contributions ?? []) {
|
|
1703
1763
|
if (e.contributionPointName !== "Navigation") continue;
|
|
@@ -1710,7 +1770,7 @@ function rr(e) {
|
|
|
1710
1770
|
]);
|
|
1711
1771
|
if (t.has(s)) continue;
|
|
1712
1772
|
t.add(s);
|
|
1713
|
-
let c = e.order ?? (typeof r.order == "number" ? r.order : void 0), l =
|
|
1773
|
+
let c = e.order ?? (typeof r.order == "number" ? r.order : void 0), l = fr(r.destination) ? r.destination : void 0;
|
|
1714
1774
|
n.push({
|
|
1715
1775
|
label: i,
|
|
1716
1776
|
targetScreen: a,
|
|
@@ -1718,7 +1778,7 @@ function rr(e) {
|
|
|
1718
1778
|
order: c,
|
|
1719
1779
|
...typeof r.icon == "string" ? { icon: r.icon } : {},
|
|
1720
1780
|
...typeof r.presentation == "string" ? { presentation: r.presentation } : {},
|
|
1721
|
-
...l &&
|
|
1781
|
+
...l && pr(l) ? { destination: l } : {}
|
|
1722
1782
|
});
|
|
1723
1783
|
}
|
|
1724
1784
|
return n.map((e, t) => ({
|
|
@@ -1726,7 +1786,7 @@ function rr(e) {
|
|
|
1726
1786
|
index: t
|
|
1727
1787
|
})).sort((e, t) => (e.entry.order ?? 2 ** 53 - 1) - (t.entry.order ?? 2 ** 53 - 1) || e.index - t.index).map(({ entry: e }) => e);
|
|
1728
1788
|
}
|
|
1729
|
-
function
|
|
1789
|
+
function ur(e) {
|
|
1730
1790
|
let t = {
|
|
1731
1791
|
label: "",
|
|
1732
1792
|
children: []
|
|
@@ -1751,21 +1811,21 @@ function ir(e) {
|
|
|
1751
1811
|
}
|
|
1752
1812
|
return t.children;
|
|
1753
1813
|
}
|
|
1754
|
-
function
|
|
1814
|
+
function dr(e, t) {
|
|
1755
1815
|
for (let n of e) {
|
|
1756
1816
|
if (n.screen === t) return [n.label];
|
|
1757
|
-
let e =
|
|
1817
|
+
let e = dr(n.children, t);
|
|
1758
1818
|
if (e.length > 0) return [n.label, ...e];
|
|
1759
1819
|
}
|
|
1760
1820
|
return [];
|
|
1761
1821
|
}
|
|
1762
|
-
function
|
|
1822
|
+
function fr(e) {
|
|
1763
1823
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1764
1824
|
}
|
|
1765
|
-
function
|
|
1825
|
+
function pr(e) {
|
|
1766
1826
|
return e.outlet !== void 0 || e.dialog !== void 0 || e.kind === "external" || e.kind === "dialog";
|
|
1767
1827
|
}
|
|
1768
|
-
function
|
|
1828
|
+
function mr(e, t, n) {
|
|
1769
1829
|
return e.filter((e) => !t.has(e.name)).map((e) => ({
|
|
1770
1830
|
label: e.name,
|
|
1771
1831
|
targetScreen: e.name,
|
|
@@ -1774,77 +1834,77 @@ function cr(e, t, n) {
|
|
|
1774
1834
|
}
|
|
1775
1835
|
//#endregion
|
|
1776
1836
|
//#region src/blueprint.ts
|
|
1777
|
-
var
|
|
1778
|
-
function
|
|
1779
|
-
let t =
|
|
1780
|
-
return n.splice(Math.max(n.indexOf(
|
|
1837
|
+
var hr = "Stage:locale";
|
|
1838
|
+
function gr(e) {
|
|
1839
|
+
let t = Ce(e), n = t.packages.filter((e) => e !== "PrimeReact");
|
|
1840
|
+
return n.splice(Math.max(n.indexOf(he), 0), 0, "PrimeReact"), {
|
|
1781
1841
|
...t,
|
|
1782
1842
|
name: e?.length ? t.name : "Stage",
|
|
1783
1843
|
packages: n
|
|
1784
1844
|
};
|
|
1785
1845
|
}
|
|
1786
|
-
var
|
|
1787
|
-
...
|
|
1788
|
-
PrimeReact:
|
|
1846
|
+
var _r = {
|
|
1847
|
+
...fe,
|
|
1848
|
+
PrimeReact: je.components
|
|
1789
1849
|
};
|
|
1790
|
-
function
|
|
1850
|
+
function vr(e) {
|
|
1791
1851
|
return {
|
|
1792
|
-
...
|
|
1793
|
-
...
|
|
1794
|
-
...
|
|
1795
|
-
...
|
|
1852
|
+
...E,
|
|
1853
|
+
...Ae,
|
|
1854
|
+
...me,
|
|
1855
|
+
...Se,
|
|
1796
1856
|
...e
|
|
1797
1857
|
};
|
|
1798
1858
|
}
|
|
1799
|
-
function
|
|
1859
|
+
function yr(e) {
|
|
1800
1860
|
return e ? {
|
|
1801
1861
|
...e,
|
|
1802
|
-
...
|
|
1803
|
-
} :
|
|
1862
|
+
..._r
|
|
1863
|
+
} : _r;
|
|
1804
1864
|
}
|
|
1805
|
-
var
|
|
1806
|
-
function
|
|
1807
|
-
return
|
|
1865
|
+
var br = "Stage:navigationTree";
|
|
1866
|
+
function xr(e, t, n) {
|
|
1867
|
+
return N(e, j.Logo, {
|
|
1808
1868
|
label: t,
|
|
1809
1869
|
initials: t.slice(0, 1).toUpperCase() || "S",
|
|
1810
1870
|
targetScreen: "",
|
|
1811
1871
|
...n ? { lightImageUrl: n } : {}
|
|
1812
1872
|
});
|
|
1813
1873
|
}
|
|
1814
|
-
function
|
|
1815
|
-
let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l =
|
|
1874
|
+
function Sr(e, t, n, r, i, a = !1, o = !0) {
|
|
1875
|
+
let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l = lr(e), u = mr(e, new Set(l.map((e) => e.targetScreen)), "Other screens"), d = ur([...l, ...l.length > 0 ? u : []]), f = e.map((e, n) => xe({
|
|
1816
1876
|
label: e.name,
|
|
1817
1877
|
targetScreen: e.name,
|
|
1818
1878
|
icon: "pi pi-table",
|
|
1819
1879
|
group: "Screens",
|
|
1820
1880
|
order: n
|
|
1821
|
-
}, t)), p =
|
|
1881
|
+
}, t)), p = dr(ur(l), t), m = e.find((e) => e.name === t)?.path?.length ? dr(d, t) : [], h = p.length > 0 ? p : m, g = l.length > 0 ? N("menu-hierarchy", br, {
|
|
1822
1882
|
nodes: d,
|
|
1823
1883
|
activeScreen: t
|
|
1824
|
-
}) :
|
|
1884
|
+
}) : N("menu-screens", j.Menu, {
|
|
1825
1885
|
title: "Screens",
|
|
1826
1886
|
label: "Screens"
|
|
1827
1887
|
}, { items: f }), _ = [];
|
|
1828
|
-
n.length > 1 && _.push(
|
|
1888
|
+
n.length > 1 && _.push(N("topbar-locale", hr, {
|
|
1829
1889
|
locales: n,
|
|
1830
1890
|
locale: r
|
|
1831
|
-
})), _.push(
|
|
1891
|
+
})), _.push(N("topbar-theme", j.ThemeSwitcher, { label: "Theme" }));
|
|
1832
1892
|
let v = { regionNavigation: a };
|
|
1833
1893
|
return {
|
|
1834
|
-
[
|
|
1835
|
-
logo: [
|
|
1894
|
+
[M.Topbar]: [N("topbar", j.Topbar, v, {
|
|
1895
|
+
logo: [xr("topbar-logo", c, i?.image)],
|
|
1836
1896
|
end: _
|
|
1837
1897
|
})],
|
|
1838
|
-
[
|
|
1839
|
-
...a ? {} : { [
|
|
1840
|
-
[
|
|
1898
|
+
[M.Sidebar]: [N("sidebar", j.Sidebar, v, { logo: [xr("sidebar-logo", c, i?.image)] })],
|
|
1899
|
+
...a ? {} : { [M.Menu]: [g] },
|
|
1900
|
+
[M.Breadcrumb]: [N("breadcrumb", j.Breadcrumb, {
|
|
1841
1901
|
homeTargetScreen: s,
|
|
1842
1902
|
items: (h.length > 0 ? h : [t]).map((e) => ({ label: e }))
|
|
1843
1903
|
})],
|
|
1844
|
-
...o ? { [
|
|
1845
|
-
[
|
|
1904
|
+
...o ? { [M.Footer]: [N("footer", j.Footer, { text: `${c} · rendered from your model` })] } : {},
|
|
1905
|
+
[M.ConfigPanel]: [N(j.ConfigPanel, j.ConfigPanel, {
|
|
1846
1906
|
title: "Settings",
|
|
1847
|
-
themes:
|
|
1907
|
+
themes: ge.map((e) => ({
|
|
1848
1908
|
name: e.name,
|
|
1849
1909
|
label: e.name,
|
|
1850
1910
|
isDark: e.isDark ?? !1
|
|
@@ -1852,65 +1912,65 @@ function gr(e, t, n, r, i, a = !1, o = !0) {
|
|
|
1852
1912
|
})]
|
|
1853
1913
|
};
|
|
1854
1914
|
}
|
|
1855
|
-
function
|
|
1915
|
+
function Cr(e) {
|
|
1856
1916
|
return `#/${encodeURIComponent(e)}`;
|
|
1857
1917
|
}
|
|
1858
1918
|
//#endregion
|
|
1859
1919
|
//#region src/StageChrome.tsx
|
|
1860
|
-
var
|
|
1920
|
+
var wr = e({
|
|
1861
1921
|
locales: [],
|
|
1862
1922
|
locale: "",
|
|
1863
1923
|
setLocale: () => void 0,
|
|
1864
1924
|
activity: ""
|
|
1865
1925
|
});
|
|
1866
|
-
function
|
|
1867
|
-
return /* @__PURE__ */
|
|
1926
|
+
function Tr({ state: e, children: t }) {
|
|
1927
|
+
return /* @__PURE__ */ P(wr.Provider, {
|
|
1868
1928
|
value: e,
|
|
1869
1929
|
children: t
|
|
1870
1930
|
});
|
|
1871
1931
|
}
|
|
1872
|
-
var
|
|
1873
|
-
function
|
|
1874
|
-
let { locales: e, locale: t, setLocale: n } = r(
|
|
1875
|
-
return e.length < 2 ? null : /* @__PURE__ */
|
|
1932
|
+
var Er = "Stage:activity";
|
|
1933
|
+
function Dr() {
|
|
1934
|
+
let { locales: e, locale: t, setLocale: n } = r(wr);
|
|
1935
|
+
return e.length < 2 ? null : /* @__PURE__ */ P("select", {
|
|
1876
1936
|
className: "stage-locale",
|
|
1877
1937
|
"aria-label": "Locale",
|
|
1878
1938
|
value: t,
|
|
1879
1939
|
onChange: (e) => n(e.target.value),
|
|
1880
|
-
children: e.map((e) => /* @__PURE__ */
|
|
1940
|
+
children: e.map((e) => /* @__PURE__ */ P("option", {
|
|
1881
1941
|
value: e,
|
|
1882
1942
|
children: e
|
|
1883
1943
|
}, e))
|
|
1884
1944
|
});
|
|
1885
1945
|
}
|
|
1886
|
-
function
|
|
1946
|
+
function Or({ element: e }) {
|
|
1887
1947
|
let t = e.properties ?? {};
|
|
1888
|
-
return /* @__PURE__ */
|
|
1948
|
+
return /* @__PURE__ */ P("nav", {
|
|
1889
1949
|
className: "stage-navigation-tree",
|
|
1890
1950
|
"aria-label": "Navigation",
|
|
1891
1951
|
"data-scene-id": e.id,
|
|
1892
|
-
children: /* @__PURE__ */
|
|
1952
|
+
children: /* @__PURE__ */ P(kr, {
|
|
1893
1953
|
nodes: t.nodes ?? [],
|
|
1894
1954
|
activeScreen: t.activeScreen
|
|
1895
1955
|
})
|
|
1896
1956
|
});
|
|
1897
1957
|
}
|
|
1898
|
-
function
|
|
1899
|
-
return /* @__PURE__ */
|
|
1958
|
+
function kr({ nodes: e, activeScreen: t }) {
|
|
1959
|
+
return /* @__PURE__ */ P("ul", {
|
|
1900
1960
|
role: "tree",
|
|
1901
|
-
children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */
|
|
1961
|
+
children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */ F("li", {
|
|
1902
1962
|
role: "treeitem",
|
|
1903
1963
|
"aria-expanded": "true",
|
|
1904
|
-
children: [/* @__PURE__ */
|
|
1964
|
+
children: [/* @__PURE__ */ P("span", {
|
|
1905
1965
|
className: "stage-navigation-group",
|
|
1906
1966
|
children: e.label
|
|
1907
|
-
}), /* @__PURE__ */
|
|
1967
|
+
}), /* @__PURE__ */ P(kr, {
|
|
1908
1968
|
nodes: e.children,
|
|
1909
1969
|
activeScreen: t
|
|
1910
1970
|
})]
|
|
1911
|
-
}, e.label) : /* @__PURE__ */
|
|
1971
|
+
}, e.label) : /* @__PURE__ */ P("li", {
|
|
1912
1972
|
role: "treeitem",
|
|
1913
|
-
children: /* @__PURE__ */
|
|
1973
|
+
children: /* @__PURE__ */ P(Ar, {
|
|
1914
1974
|
node: e,
|
|
1915
1975
|
screen: e.screen,
|
|
1916
1976
|
activeScreen: t
|
|
@@ -1918,56 +1978,56 @@ function Cr({ nodes: e, activeScreen: t }) {
|
|
|
1918
1978
|
}, `${e.screen}:${e.label}`))
|
|
1919
1979
|
});
|
|
1920
1980
|
}
|
|
1921
|
-
function
|
|
1922
|
-
let i = r(
|
|
1981
|
+
function Ar({ node: e, screen: t, activeScreen: n }) {
|
|
1982
|
+
let i = r(te), a = e.presentation === "icon" || e.presentation === "text" ? e.presentation : "both", o = e.destination, s = o?.kind === "external" && o.route !== void 0, c = o && i && !s && pr(o) ? (e) => {
|
|
1923
1983
|
e.preventDefault(), i.navigate(o);
|
|
1924
1984
|
} : void 0;
|
|
1925
|
-
return /* @__PURE__ */
|
|
1926
|
-
href: s ? o.route :
|
|
1985
|
+
return /* @__PURE__ */ F("a", {
|
|
1986
|
+
href: s ? o.route : Cr(t),
|
|
1927
1987
|
rel: s ? "noreferrer" : void 0,
|
|
1928
1988
|
"aria-current": t === n ? "page" : void 0,
|
|
1929
1989
|
"aria-label": a === "icon" ? e.label : void 0,
|
|
1930
1990
|
"data-presentation": e.presentation,
|
|
1931
1991
|
"data-icon": e.icon,
|
|
1932
1992
|
onClick: c,
|
|
1933
|
-
children: [a !== "text" && e.icon && /* @__PURE__ */
|
|
1993
|
+
children: [a !== "text" && e.icon && /* @__PURE__ */ P("span", {
|
|
1934
1994
|
className: "stage-navigation-icon",
|
|
1935
1995
|
"aria-hidden": "true",
|
|
1936
1996
|
"data-icon-name": e.icon
|
|
1937
1997
|
}), a !== "icon" && e.label]
|
|
1938
1998
|
});
|
|
1939
1999
|
}
|
|
1940
|
-
function
|
|
1941
|
-
let t = typeof e.properties.name == "string" ? e.properties.name : "", n = r(
|
|
1942
|
-
return /* @__PURE__ */
|
|
2000
|
+
function jr({ element: e }) {
|
|
2001
|
+
let t = typeof e.properties.name == "string" ? e.properties.name : "", n = r(te), i = le(), a = z(), o = n?.outlets[t], s = o && i ? i.screens[o] : void 0, c = e.properties.closable === !0;
|
|
2002
|
+
return /* @__PURE__ */ F("div", {
|
|
1943
2003
|
"data-scene-outlet": t,
|
|
1944
2004
|
"data-scene-outlet-screen": o,
|
|
1945
|
-
children: [c && o && /* @__PURE__ */
|
|
2005
|
+
children: [c && o && /* @__PURE__ */ P("div", {
|
|
1946
2006
|
className: "scene-outlet-bar",
|
|
1947
|
-
children: /* @__PURE__ */
|
|
2007
|
+
children: /* @__PURE__ */ P("button", {
|
|
1948
2008
|
type: "button",
|
|
1949
2009
|
className: "scene-outlet-close",
|
|
1950
2010
|
"aria-label": "Close",
|
|
1951
2011
|
onClick: () => n?.closeOutlet(t),
|
|
1952
2012
|
children: "Close"
|
|
1953
2013
|
})
|
|
1954
|
-
}), s && i && /* @__PURE__ */
|
|
2014
|
+
}), s && i && /* @__PURE__ */ P(w, {
|
|
1955
2015
|
element: s,
|
|
1956
2016
|
registry: i.registry,
|
|
1957
2017
|
resolveBinding: a.resolveBinding
|
|
1958
2018
|
})]
|
|
1959
2019
|
});
|
|
1960
2020
|
}
|
|
1961
|
-
function
|
|
1962
|
-
let { activity: e } = r(
|
|
1963
|
-
return e ? /* @__PURE__ */
|
|
2021
|
+
function Mr() {
|
|
2022
|
+
let { activity: e } = r(wr);
|
|
2023
|
+
return e ? /* @__PURE__ */ P("p", {
|
|
1964
2024
|
className: "stage-activity",
|
|
1965
2025
|
role: "status",
|
|
1966
2026
|
children: e
|
|
1967
2027
|
}) : null;
|
|
1968
2028
|
}
|
|
1969
|
-
function
|
|
1970
|
-
let e =
|
|
2029
|
+
function Nr() {
|
|
2030
|
+
let e = k(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
|
|
1971
2031
|
return i(() => {
|
|
1972
2032
|
let r = e?.isDark ? "dark" : "light";
|
|
1973
2033
|
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 ?? "";
|
|
@@ -1977,56 +2037,56 @@ function Dr() {
|
|
|
1977
2037
|
n
|
|
1978
2038
|
]), null;
|
|
1979
2039
|
}
|
|
1980
|
-
var
|
|
1981
|
-
[
|
|
1982
|
-
[
|
|
1983
|
-
[
|
|
1984
|
-
"core:outlet":
|
|
1985
|
-
},
|
|
2040
|
+
var Pr = {
|
|
2041
|
+
[hr]: Dr,
|
|
2042
|
+
[br]: Or,
|
|
2043
|
+
[Er]: Mr,
|
|
2044
|
+
"core:outlet": jr
|
|
2045
|
+
}, Fr = [
|
|
1986
2046
|
"navigationMode",
|
|
1987
2047
|
"menuTheme",
|
|
1988
2048
|
"showFooter"
|
|
1989
|
-
],
|
|
1990
|
-
function
|
|
2049
|
+
], Ir = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
2050
|
+
function Lr(e, t, n = !1) {
|
|
1991
2051
|
let r = [], i = t.options ?? {}, a = {
|
|
1992
2052
|
showFooter: !0,
|
|
1993
2053
|
followsSystem: !1,
|
|
1994
2054
|
problems: r
|
|
1995
2055
|
};
|
|
1996
2056
|
for (let [e, n] of Object.entries(i)) {
|
|
1997
|
-
if (!
|
|
1998
|
-
r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${
|
|
2057
|
+
if (!Fr.includes(e)) {
|
|
2058
|
+
r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${Fr.join(", ")}.`);
|
|
1999
2059
|
continue;
|
|
2000
2060
|
}
|
|
2001
2061
|
if (e === "navigationMode") {
|
|
2002
|
-
let e =
|
|
2003
|
-
e ? a.mode = e : r.push(`Option 'navigationMode' is '${String(n)}'; expected one of ${
|
|
2062
|
+
let e = ye.find((e) => e === n);
|
|
2063
|
+
e ? a.mode = e : r.push(`Option 'navigationMode' is '${String(n)}'; expected one of ${ye.join(", ")}.`);
|
|
2004
2064
|
} else if (e === "menuTheme") {
|
|
2005
|
-
let e =
|
|
2006
|
-
e ? a.menuTheme = e : r.push(`Option 'menuTheme' is '${String(n)}'; expected one of ${
|
|
2065
|
+
let e = be.find((e) => e === n);
|
|
2066
|
+
e ? a.menuTheme = e : r.push(`Option 'menuTheme' is '${String(n)}'; expected one of ${be.join(", ")}.`);
|
|
2007
2067
|
} else typeof n == "boolean" ? a.showFooter = n : r.push(`Option 'showFooter' is '${String(n)}'; expected true or false.`);
|
|
2008
2068
|
}
|
|
2009
2069
|
let o = e?.appearance;
|
|
2010
2070
|
if (o?.colorScheme !== void 0) {
|
|
2011
|
-
a.followsSystem = o.colorScheme ===
|
|
2012
|
-
let e = a.followsSystem ? n : o.colorScheme ===
|
|
2013
|
-
a.colorScheme = e ?
|
|
2071
|
+
a.followsSystem = o.colorScheme === l.System;
|
|
2072
|
+
let e = a.followsSystem ? n : o.colorScheme === l.Dark;
|
|
2073
|
+
a.colorScheme = e ? A.Dark : A.Light, a.themeName = ge.find((t) => (t.isDark ?? !1) === e)?.name;
|
|
2014
2074
|
}
|
|
2015
|
-
return o?.accent !== void 0 && (
|
|
2075
|
+
return o?.accent !== void 0 && (Ir.test(o.accent) ? a.accent = o.accent : r.push(`The accent '${o.accent}' is not a colour written as #rgb or #rrggbb.`)), a;
|
|
2016
2076
|
}
|
|
2017
|
-
function
|
|
2077
|
+
function Rr(e, t) {
|
|
2018
2078
|
if (e?.root === void 0) return [];
|
|
2019
2079
|
let n = /* @__PURE__ */ new Set([
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2080
|
+
m.RootTemplateUnknown,
|
|
2081
|
+
m.RootTemplateVersionNotSatisfied,
|
|
2082
|
+
m.RootTemplateNotApplicable,
|
|
2083
|
+
m.RootTemplateMissingContentSlot,
|
|
2084
|
+
m.RootTemplateCycle,
|
|
2085
|
+
m.RootTemplateBlueprintNotInstalled
|
|
2026
2086
|
]), r = t.diagnostics.filter((e) => n.has(e.code)).map((e) => e.message);
|
|
2027
|
-
return r.length === 0 && t.origin !==
|
|
2087
|
+
return r.length === 0 && t.origin !== h.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;
|
|
2028
2088
|
}
|
|
2029
|
-
function
|
|
2089
|
+
function zr(e) {
|
|
2030
2090
|
let t = e.length === 4 ? [...e.slice(1)].map((e) => e + e).join("") : e.slice(1), [n, r, i] = [
|
|
2031
2091
|
0,
|
|
2032
2092
|
2,
|
|
@@ -2034,7 +2094,7 @@ function Nr(e) {
|
|
|
2034
2094
|
].map((e) => parseInt(t.slice(e, e + 2), 16));
|
|
2035
2095
|
return (n * 299 + r * 587 + i * 114) / 1e3 >= 150 ? "#111827" : "#ffffff";
|
|
2036
2096
|
}
|
|
2037
|
-
function
|
|
2097
|
+
function Br(e, t) {
|
|
2038
2098
|
if (t === void 0) return e;
|
|
2039
2099
|
let n = t.length === 4 ? [...t.slice(1)].map((e) => e + e).join("") : t.slice(1), [r, i, a] = [
|
|
2040
2100
|
0,
|
|
@@ -2046,41 +2106,41 @@ function Pr(e, t) {
|
|
|
2046
2106
|
tokens: {
|
|
2047
2107
|
...e.tokens,
|
|
2048
2108
|
"primary.color": t,
|
|
2049
|
-
"primary.contrastColor":
|
|
2109
|
+
"primary.contrastColor": zr(t),
|
|
2050
2110
|
"focus.ring": `0 0 0 2px rgb(${r} ${i} ${a} / 0.4)`
|
|
2051
2111
|
}
|
|
2052
2112
|
}));
|
|
2053
2113
|
}
|
|
2054
2114
|
//#endregion
|
|
2055
2115
|
//#region src/StageShellSettings.tsx
|
|
2056
|
-
var
|
|
2057
|
-
function
|
|
2116
|
+
var Vr = "(prefers-color-scheme: dark)";
|
|
2117
|
+
function Hr() {
|
|
2058
2118
|
return globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ?? !1;
|
|
2059
2119
|
}
|
|
2060
|
-
function
|
|
2061
|
-
let n =
|
|
2062
|
-
n.current =
|
|
2063
|
-
let { mode: r, menuTheme: a, colorScheme:
|
|
2120
|
+
function Ur({ settings: e, onSystemSchemeChange: t }) {
|
|
2121
|
+
let n = s(we());
|
|
2122
|
+
n.current = we();
|
|
2123
|
+
let { mode: r, menuTheme: a, colorScheme: o, themeName: c } = e;
|
|
2064
2124
|
return i(() => {
|
|
2065
|
-
let { setMode: e, setMenuTheme: t, setColorScheme: i, setThemeName:
|
|
2066
|
-
r !== void 0 && e(r), a !== void 0 && t(a),
|
|
2125
|
+
let { setMode: e, setMenuTheme: t, setColorScheme: i, setThemeName: s } = n.current;
|
|
2126
|
+
r !== void 0 && e(r), a !== void 0 && t(a), o !== void 0 && i(o), c !== void 0 && s(c);
|
|
2067
2127
|
}, [
|
|
2068
2128
|
r,
|
|
2069
2129
|
a,
|
|
2070
|
-
|
|
2130
|
+
o,
|
|
2071
2131
|
c
|
|
2072
2132
|
]), i(() => {
|
|
2073
2133
|
if (!e.followsSystem || !globalThis.matchMedia || !t) return;
|
|
2074
|
-
let n = globalThis.matchMedia(
|
|
2134
|
+
let n = globalThis.matchMedia(Vr), r = (e) => t(e.matches);
|
|
2075
2135
|
return n.addEventListener("change", r), () => n.removeEventListener("change", r);
|
|
2076
2136
|
}, [e.followsSystem, t]), null;
|
|
2077
2137
|
}
|
|
2078
2138
|
//#endregion
|
|
2079
2139
|
//#region src/stageNavigationModel.ts
|
|
2080
|
-
function
|
|
2140
|
+
function Wr(e) {
|
|
2081
2141
|
return (e?.application.regions.length ?? 0) > 0 || (e?.modules.length ?? 0) > 0;
|
|
2082
2142
|
}
|
|
2083
|
-
function
|
|
2143
|
+
function Gr(e) {
|
|
2084
2144
|
let t = /* @__PURE__ */ new Map();
|
|
2085
2145
|
for (let n of e) {
|
|
2086
2146
|
let e = (n.path ?? []).join(".");
|
|
@@ -2093,35 +2153,35 @@ function zr(e) {
|
|
|
2093
2153
|
return t.get(r) ?? i ?? (e.some((e) => e.name === r) ? r : void 0);
|
|
2094
2154
|
};
|
|
2095
2155
|
}
|
|
2096
|
-
function
|
|
2156
|
+
function Kr(e) {
|
|
2097
2157
|
return (t) => e.find((e) => e.name === t)?.path?.[0];
|
|
2098
2158
|
}
|
|
2099
|
-
function
|
|
2159
|
+
function qr(e, t) {
|
|
2100
2160
|
return {
|
|
2101
2161
|
structure: e.structure ?? { modules: [] },
|
|
2102
2162
|
navigation: e.navigation ?? {
|
|
2103
2163
|
application: { regions: [] },
|
|
2104
2164
|
modules: []
|
|
2105
2165
|
},
|
|
2106
|
-
screenFor:
|
|
2107
|
-
moduleOf:
|
|
2166
|
+
screenFor: Gr(e.screens),
|
|
2167
|
+
moduleOf: Kr(e.screens),
|
|
2108
2168
|
...t ? { isVisible: t } : {}
|
|
2109
2169
|
};
|
|
2110
2170
|
}
|
|
2111
2171
|
//#endregion
|
|
2112
2172
|
//#region src/stageSlices.ts
|
|
2113
|
-
function
|
|
2114
|
-
return (t) =>
|
|
2173
|
+
function Jr(e) {
|
|
2174
|
+
return (t) => Bt(e?.[t] ?? "").filter((e) => e.unsupportedReason === void 0 && !e.members && !e.item).map((e) => ({
|
|
2115
2175
|
name: e.name,
|
|
2116
2176
|
type: e.type === "text" || e.type === void 0 ? "string" : e.type,
|
|
2117
|
-
label:
|
|
2177
|
+
label: Yr(e.name),
|
|
2118
2178
|
required: e.required
|
|
2119
2179
|
}));
|
|
2120
2180
|
}
|
|
2121
|
-
function
|
|
2181
|
+
function Yr(e) {
|
|
2122
2182
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase());
|
|
2123
2183
|
}
|
|
2124
|
-
function
|
|
2184
|
+
function Xr(e, t, n) {
|
|
2125
2185
|
return { invoke: async (r, i, a) => {
|
|
2126
2186
|
let o = a ?? r.slice(r.lastIndexOf(".") + 1);
|
|
2127
2187
|
if (!U(o)) return {
|
|
@@ -2142,15 +2202,15 @@ function Wr(e, t, n) {
|
|
|
2142
2202
|
}
|
|
2143
2203
|
//#endregion
|
|
2144
2204
|
//#region src/App.tsx
|
|
2145
|
-
function
|
|
2146
|
-
return
|
|
2205
|
+
function Zr(e = {}) {
|
|
2206
|
+
return vr({
|
|
2147
2207
|
...e,
|
|
2148
|
-
...
|
|
2149
|
-
...
|
|
2208
|
+
...Zn,
|
|
2209
|
+
...Pr
|
|
2150
2210
|
});
|
|
2151
2211
|
}
|
|
2152
|
-
function
|
|
2153
|
-
return
|
|
2212
|
+
function Qr(e, t) {
|
|
2213
|
+
return N(`form-${e}-${t.name}`, Bn, {
|
|
2154
2214
|
command: t.forCommand,
|
|
2155
2215
|
label: t.name,
|
|
2156
2216
|
generationMode: t.generationMode,
|
|
@@ -2158,103 +2218,103 @@ function Kr(e, t) {
|
|
|
2158
2218
|
fields: t.fields
|
|
2159
2219
|
});
|
|
2160
2220
|
}
|
|
2161
|
-
function
|
|
2221
|
+
function $r(e, t) {
|
|
2162
2222
|
let n = e.screens[0];
|
|
2163
|
-
return
|
|
2164
|
-
profile:
|
|
2165
|
-
blueprintTemplates: t?.length ? [...
|
|
2223
|
+
return _e(e, n, {
|
|
2224
|
+
profile: gr(e.uiProfiles),
|
|
2225
|
+
blueprintTemplates: t?.length ? [...ve, ...t] : void 0
|
|
2166
2226
|
});
|
|
2167
2227
|
}
|
|
2168
|
-
function
|
|
2169
|
-
let s =
|
|
2228
|
+
function ei(e, t, n, r, i, a, o = !0) {
|
|
2229
|
+
let s = Wr(e.navigation), c = e.navigation?.application.logo ? {
|
|
2170
2230
|
title: e.navigation.application.logo.title,
|
|
2171
2231
|
image: e.navigation.application.logo.image || void 0
|
|
2172
2232
|
} : void 0;
|
|
2173
2233
|
return {
|
|
2174
|
-
profile:
|
|
2175
|
-
catalog:
|
|
2176
|
-
blueprintTemplates: a?.length ? [...
|
|
2177
|
-
chrome: (r, i) => i ===
|
|
2178
|
-
form:
|
|
2179
|
-
trailing: [
|
|
2234
|
+
profile: gr(e.uiProfiles),
|
|
2235
|
+
catalog: yr(r),
|
|
2236
|
+
blueprintTemplates: a?.length ? [...ve, ...a] : void 0,
|
|
2237
|
+
chrome: (r, i) => i === j.FullPageShell ? { [M.ConfigPanel]: Sr(e.screens, r.name, t, n, c, s, o)[M.ConfigPanel] } : Sr(e.screens, r.name, t, n, c, s, o),
|
|
2238
|
+
form: Qr,
|
|
2239
|
+
trailing: [N("activity", Er)],
|
|
2180
2240
|
decorate: (e) => {
|
|
2181
|
-
let t =
|
|
2182
|
-
return i ?
|
|
2241
|
+
let t = er(e);
|
|
2242
|
+
return i ? y(t, i) : t;
|
|
2183
2243
|
}
|
|
2184
2244
|
};
|
|
2185
2245
|
}
|
|
2186
|
-
function
|
|
2187
|
-
return
|
|
2246
|
+
function ti(e, t, n, r, i, a) {
|
|
2247
|
+
return pe(e, t, ei(e, n, r, i, void 0, a)).element;
|
|
2188
2248
|
}
|
|
2189
|
-
function
|
|
2249
|
+
function ni() {
|
|
2190
2250
|
try {
|
|
2191
2251
|
return globalThis.localStorage ?? null;
|
|
2192
2252
|
} catch {
|
|
2193
2253
|
return null;
|
|
2194
2254
|
}
|
|
2195
2255
|
}
|
|
2196
|
-
function
|
|
2197
|
-
let
|
|
2256
|
+
function ri({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: a } = {}) {
|
|
2257
|
+
let s = L(), l = o(() => Zr(e), [e]), [u, d] = c(), [f, p] = c(""), m = qe(), h = Qn();
|
|
2198
2258
|
return i(() => {
|
|
2199
2259
|
let e = new AbortController();
|
|
2200
|
-
return
|
|
2260
|
+
return s.scene(e.signal).then((e) => d(r?.length ? {
|
|
2201
2261
|
...e,
|
|
2202
2262
|
dialogTemplates: [...e.dialogTemplates ?? [], ...r.filter((t) => !e.dialogTemplates?.some((e) => e.name === t.name))]
|
|
2203
2263
|
} : e)).catch((t) => {
|
|
2204
2264
|
e.signal.aborted || p(t instanceof Error ? t.message : String(t));
|
|
2205
2265
|
}), () => e.abort();
|
|
2206
|
-
}, [
|
|
2266
|
+
}, [s, r]), f ? /* @__PURE__ */ F("main", {
|
|
2207
2267
|
className: "stage-message",
|
|
2208
|
-
children: [/* @__PURE__ */
|
|
2209
|
-
}) : u ? /* @__PURE__ */
|
|
2268
|
+
children: [/* @__PURE__ */ P("h1", { children: "Unable to render this Stage" }), /* @__PURE__ */ P("p", { children: f })]
|
|
2269
|
+
}) : u ? /* @__PURE__ */ P(ii, {
|
|
2210
2270
|
scene: u,
|
|
2211
2271
|
registry: l,
|
|
2212
2272
|
routeState: m,
|
|
2213
2273
|
strings: h,
|
|
2214
2274
|
packageCatalog: t,
|
|
2215
2275
|
screenTemplates: n,
|
|
2216
|
-
isVisible:
|
|
2217
|
-
}) : /* @__PURE__ */
|
|
2276
|
+
isVisible: a
|
|
2277
|
+
}) : /* @__PURE__ */ P("main", {
|
|
2218
2278
|
className: "stage-message",
|
|
2219
|
-
children: /* @__PURE__ */
|
|
2279
|
+
children: /* @__PURE__ */ P("h1", { children: "Preparing the Stage" })
|
|
2220
2280
|
});
|
|
2221
2281
|
}
|
|
2222
|
-
function
|
|
2223
|
-
let u =
|
|
2282
|
+
function ii({ scene: e, registry: t, routeState: r, strings: i, packageCatalog: a, screenTemplates: s, isVisible: l }) {
|
|
2283
|
+
let u = o(() => D(), []), [d, f] = c(Hr), p = e.screens[0]?.name ?? "", m = o(() => gr(e.uiProfiles), [e]), h = o(() => p ? $r(e, s) : void 0, [
|
|
2224
2284
|
e,
|
|
2225
|
-
|
|
2285
|
+
s,
|
|
2226
2286
|
p
|
|
2227
|
-
]), g =
|
|
2287
|
+
]), g = o(() => h ? Rr(m, h) : [], [m, h]), _ = o(() => h ? Lr(m, h, d) : void 0, [
|
|
2228
2288
|
m,
|
|
2229
2289
|
h,
|
|
2230
2290
|
d
|
|
2231
|
-
]), v =
|
|
2291
|
+
]), v = o(() => Br(ge, _?.accent), [_?.accent]), y = _?.showFooter ?? !0, b = o(() => ei(e, i.locales, i.locale, a, i.dictionary, s, y), [
|
|
2232
2292
|
e,
|
|
2233
2293
|
i.locales,
|
|
2234
2294
|
i.locale,
|
|
2235
2295
|
i.dictionary,
|
|
2236
|
-
|
|
2237
|
-
|
|
2296
|
+
a,
|
|
2297
|
+
s,
|
|
2238
2298
|
y
|
|
2239
|
-
]), x = n((e) => f(e), []), S =
|
|
2240
|
-
return p ? g.length > 0 ? /* @__PURE__ */
|
|
2299
|
+
]), x = n((e) => f(e), []), S = o(() => qr(e, l), [e, l]), C = e;
|
|
2300
|
+
return p ? g.length > 0 ? /* @__PURE__ */ F("main", {
|
|
2241
2301
|
className: "stage-message",
|
|
2242
2302
|
role: "alert",
|
|
2243
2303
|
"data-stage-startup-problem": "root-template",
|
|
2244
2304
|
children: [
|
|
2245
|
-
/* @__PURE__ */
|
|
2246
|
-
/* @__PURE__ */
|
|
2247
|
-
/* @__PURE__ */
|
|
2305
|
+
/* @__PURE__ */ P("h1", { children: "Unable to start this Stage" }),
|
|
2306
|
+
/* @__PURE__ */ P("p", { children: "The ui profile's root template cannot be the application's shell." }),
|
|
2307
|
+
/* @__PURE__ */ P("ul", { children: g.map((e) => /* @__PURE__ */ P("li", { children: e }, e)) })
|
|
2248
2308
|
]
|
|
2249
|
-
}) : /* @__PURE__ */
|
|
2309
|
+
}) : /* @__PURE__ */ P(ue, {
|
|
2250
2310
|
application: C,
|
|
2251
2311
|
composition: b,
|
|
2252
2312
|
navigationModel: S,
|
|
2253
2313
|
registry: t,
|
|
2254
2314
|
initialScreen: p,
|
|
2255
2315
|
history: u,
|
|
2256
|
-
layoutConfigStorage:
|
|
2257
|
-
scope: (t, n) => /* @__PURE__ */
|
|
2316
|
+
layoutConfigStorage: ni(),
|
|
2317
|
+
scope: (t, n) => /* @__PURE__ */ P(ai, {
|
|
2258
2318
|
scene: e,
|
|
2259
2319
|
routeState: r,
|
|
2260
2320
|
strings: i,
|
|
@@ -2264,26 +2324,26 @@ function Qr({ scene: e, registry: t, routeState: r, strings: i, packageCatalog:
|
|
|
2264
2324
|
onSystemSchemeChange: x,
|
|
2265
2325
|
children: n
|
|
2266
2326
|
}),
|
|
2267
|
-
renderScreen: (e, n) => /* @__PURE__ */
|
|
2327
|
+
renderScreen: (e, n) => /* @__PURE__ */ P(si, {
|
|
2268
2328
|
element: e,
|
|
2269
2329
|
configuration: n,
|
|
2270
2330
|
registry: t
|
|
2271
2331
|
}),
|
|
2272
|
-
renderDialog: () => /* @__PURE__ */
|
|
2273
|
-
renderDialogTemplate: (e, n, r) => /* @__PURE__ */
|
|
2332
|
+
renderDialog: () => /* @__PURE__ */ P(Yn, {}),
|
|
2333
|
+
renderDialogTemplate: (e, n, r) => /* @__PURE__ */ P(ci, {
|
|
2274
2334
|
template: e,
|
|
2275
2335
|
content: n,
|
|
2276
2336
|
registry: t,
|
|
2277
2337
|
strings: i,
|
|
2278
2338
|
close: () => r.closeDialog()
|
|
2279
2339
|
})
|
|
2280
|
-
}) : /* @__PURE__ */
|
|
2340
|
+
}) : /* @__PURE__ */ F("main", {
|
|
2281
2341
|
className: "stage-message",
|
|
2282
|
-
children: [/* @__PURE__ */
|
|
2342
|
+
children: [/* @__PURE__ */ P("h1", { children: "Nothing to show yet" }), /* @__PURE__ */ P("p", { children: "This model has no slice carrying a command or a read model, so there is no screen to render." })]
|
|
2283
2343
|
});
|
|
2284
2344
|
}
|
|
2285
|
-
function
|
|
2286
|
-
let [d, f] =
|
|
2345
|
+
function ai({ scene: e, routeState: t, strings: n, navigation: r, themes: a, shellSettings: o, onSystemSchemeChange: s, children: l }) {
|
|
2346
|
+
let [d, f] = c(""), { navigate: p } = r;
|
|
2287
2347
|
return i(() => f(""), [r.currentScreen, r.currentDialog]), i(() => {
|
|
2288
2348
|
let e = (e) => {
|
|
2289
2349
|
let t = e.detail;
|
|
@@ -2293,45 +2353,45 @@ function $r({ scene: e, routeState: t, strings: n, navigation: r, themes: a, she
|
|
|
2293
2353
|
}, []), i(() => {
|
|
2294
2354
|
let t = (t) => {
|
|
2295
2355
|
let n = t.detail, r = n.destination ?? (n.dialog ? {
|
|
2296
|
-
kind:
|
|
2356
|
+
kind: u.Dialog,
|
|
2297
2357
|
dialog: n.dialog
|
|
2298
2358
|
} : n.targetScreen ? { screen: n.targetScreen } : void 0);
|
|
2299
2359
|
r && (r.dialog === void 0 ? r.screen !== void 0 && !e.screens.some((e) => e.name === r.screen) ? f(`The modeled screen “${r.screen}” is not available.`) : p(r) : e.dialogTemplates?.some((e) => e.name === r.dialog) ? p(r) : f(`The modeled dialog “${r.dialog}” is not available in this Stage runtime.`));
|
|
2300
2360
|
};
|
|
2301
2361
|
return globalThis.addEventListener("cratis.scene.navigate", t), () => globalThis.removeEventListener("cratis.scene.navigate", t);
|
|
2302
|
-
}, [p, e]), /* @__PURE__ */
|
|
2362
|
+
}, [p, e]), /* @__PURE__ */ F(de, {
|
|
2303
2363
|
themes: a,
|
|
2304
2364
|
children: [
|
|
2305
|
-
o && /* @__PURE__ */
|
|
2365
|
+
o && /* @__PURE__ */ P(Ur, {
|
|
2306
2366
|
settings: o,
|
|
2307
|
-
onSystemSchemeChange:
|
|
2367
|
+
onSystemSchemeChange: s
|
|
2308
2368
|
}),
|
|
2309
|
-
/* @__PURE__ */
|
|
2310
|
-
/* @__PURE__ */
|
|
2369
|
+
/* @__PURE__ */ P(Nr, {}),
|
|
2370
|
+
/* @__PURE__ */ P(mt, {
|
|
2311
2371
|
routes: t.routes,
|
|
2312
2372
|
routesReady: t.ready,
|
|
2313
2373
|
parameters: r.currentParameters,
|
|
2314
2374
|
locale: n.locale,
|
|
2315
2375
|
locales: n.locales,
|
|
2316
2376
|
screen: r.primaryScreen ?? e.screens[0]?.name ?? "",
|
|
2317
|
-
children: /* @__PURE__ */
|
|
2377
|
+
children: /* @__PURE__ */ P(oi, {
|
|
2318
2378
|
activity: d,
|
|
2319
2379
|
routesReady: t.ready,
|
|
2320
2380
|
scene: e,
|
|
2321
2381
|
setActivity: f,
|
|
2322
2382
|
strings: n,
|
|
2323
|
-
children:
|
|
2383
|
+
children: l
|
|
2324
2384
|
})
|
|
2325
2385
|
})
|
|
2326
2386
|
]
|
|
2327
2387
|
});
|
|
2328
2388
|
}
|
|
2329
|
-
function
|
|
2330
|
-
let s = z(), c =
|
|
2331
|
-
|
|
2389
|
+
function oi({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i, children: a }) {
|
|
2390
|
+
let s = z(), c = ce(), l = It(), d = o(() => Xr(l, t, s.refreshAfterCommand), [
|
|
2391
|
+
l,
|
|
2332
2392
|
t,
|
|
2333
2393
|
s.refreshAfterCommand
|
|
2334
|
-
]), f =
|
|
2394
|
+
]), f = o(() => Jr(n.commandSchemas), [n.commandSchemas]), p = ae({
|
|
2335
2395
|
executeCommand: async (e, n) => {
|
|
2336
2396
|
let i = U(e);
|
|
2337
2397
|
if (!i && !t) return r(`The modeled command “${e}” is waiting for Stage routes.`), {
|
|
@@ -2342,7 +2402,7 @@ function ei({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
|
|
|
2342
2402
|
isSuccess: !1,
|
|
2343
2403
|
validationErrors: []
|
|
2344
2404
|
};
|
|
2345
|
-
let a = await
|
|
2405
|
+
let a = await l(e, n);
|
|
2346
2406
|
return a.messages.length > 0 && r(a.messages.join(" ")), a.isSuccess && s.refreshAfterCommand(), {
|
|
2347
2407
|
isSuccess: a.isSuccess,
|
|
2348
2408
|
validationErrors: a.validationErrors,
|
|
@@ -2350,13 +2410,13 @@ function ei({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
|
|
|
2350
2410
|
};
|
|
2351
2411
|
},
|
|
2352
2412
|
navigate: (e, t) => {
|
|
2353
|
-
n.screens.some((t) => t.name === e) ? W(e,
|
|
2413
|
+
n.screens.some((t) => t.name === e) ? W(e, Rt(t)) : r(`The modeled screen “${e}” is not available.`);
|
|
2354
2414
|
},
|
|
2355
2415
|
navigateBack: () => globalThis.history?.back(),
|
|
2356
2416
|
openDialog: async (e) => {
|
|
2357
2417
|
let t = n.dialogTemplates?.find((t) => t.name === e);
|
|
2358
2418
|
return t ? (c.navigate({
|
|
2359
|
-
kind:
|
|
2419
|
+
kind: u.Dialog,
|
|
2360
2420
|
dialog: t.name
|
|
2361
2421
|
}), { isConfirmed: !0 }) : (r(`The modeled dialog “${e}” is not available in this Stage runtime.`), { isConfirmed: !1 });
|
|
2362
2422
|
},
|
|
@@ -2367,18 +2427,18 @@ function ei({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
|
|
|
2367
2427
|
refreshQuery: async (e) => s.refreshQuery(e),
|
|
2368
2428
|
raise: async (e) => r(`The modeled trigger “${e}” is not available in this Stage runtime.`)
|
|
2369
2429
|
});
|
|
2370
|
-
return /* @__PURE__ */
|
|
2430
|
+
return /* @__PURE__ */ P(Tr, {
|
|
2371
2431
|
state: {
|
|
2372
2432
|
locales: i.locales,
|
|
2373
2433
|
locale: i.locale,
|
|
2374
2434
|
setLocale: i.setLocale,
|
|
2375
2435
|
activity: e
|
|
2376
2436
|
},
|
|
2377
|
-
children: /* @__PURE__ */
|
|
2437
|
+
children: /* @__PURE__ */ P(T, {
|
|
2378
2438
|
invoker: d,
|
|
2379
|
-
children: /* @__PURE__ */
|
|
2439
|
+
children: /* @__PURE__ */ P(ne, {
|
|
2380
2440
|
fieldsFor: f,
|
|
2381
|
-
children: /* @__PURE__ */
|
|
2441
|
+
children: /* @__PURE__ */ P(ee, {
|
|
2382
2442
|
dispatcher: p,
|
|
2383
2443
|
context: {
|
|
2384
2444
|
resolve: s.resolveBinding,
|
|
@@ -2386,56 +2446,56 @@ function ei({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
|
|
|
2386
2446
|
},
|
|
2387
2447
|
attachments: [],
|
|
2388
2448
|
onFindings: (e) => r(e.map((e) => e.detail).join(" ")),
|
|
2389
|
-
children:
|
|
2449
|
+
children: a
|
|
2390
2450
|
})
|
|
2391
2451
|
})
|
|
2392
2452
|
})
|
|
2393
2453
|
});
|
|
2394
2454
|
}
|
|
2395
|
-
function
|
|
2396
|
-
let r = z();
|
|
2397
|
-
return /* @__PURE__ */
|
|
2455
|
+
function si({ element: e, configuration: t, registry: n }) {
|
|
2456
|
+
let r = z(), i = jt();
|
|
2457
|
+
return /* @__PURE__ */ F(De, { children: [/* @__PURE__ */ P(cr, { element: e }), /* @__PURE__ */ P(w, {
|
|
2398
2458
|
element: e,
|
|
2399
2459
|
registry: n,
|
|
2400
2460
|
resolveBinding: r.resolveBinding,
|
|
2401
2461
|
queryResults: r.queryResults,
|
|
2402
|
-
onComponentOutputsChanged:
|
|
2462
|
+
onComponentOutputsChanged: i,
|
|
2403
2463
|
configuration: t
|
|
2404
2464
|
})] });
|
|
2405
2465
|
}
|
|
2406
|
-
function
|
|
2407
|
-
let o = z(), s =
|
|
2466
|
+
function ci({ template: e, content: t, registry: n, strings: r, close: a }) {
|
|
2467
|
+
let o = z(), s = jt(), c = y(t, r.dictionary);
|
|
2408
2468
|
return i(() => {
|
|
2409
2469
|
let e = (e) => {
|
|
2410
2470
|
e.key === "Escape" && a();
|
|
2411
2471
|
};
|
|
2412
2472
|
return globalThis.addEventListener("keydown", e), () => globalThis.removeEventListener("keydown", e);
|
|
2413
|
-
}, [a]), /* @__PURE__ */
|
|
2473
|
+
}, [a]), /* @__PURE__ */ P("div", {
|
|
2414
2474
|
className: "stage-dialog-backdrop",
|
|
2415
|
-
children: /* @__PURE__ */
|
|
2475
|
+
children: /* @__PURE__ */ F("section", {
|
|
2416
2476
|
role: "dialog",
|
|
2417
2477
|
"aria-modal": "true",
|
|
2418
2478
|
"aria-label": e.displayName ?? e.name,
|
|
2419
2479
|
className: "stage-dialog",
|
|
2420
|
-
children: [/* @__PURE__ */
|
|
2480
|
+
children: [/* @__PURE__ */ P("button", {
|
|
2421
2481
|
type: "button",
|
|
2422
2482
|
onClick: a,
|
|
2423
2483
|
children: "Close"
|
|
2424
|
-
}), /* @__PURE__ */
|
|
2425
|
-
element:
|
|
2484
|
+
}), /* @__PURE__ */ P(w, {
|
|
2485
|
+
element: c,
|
|
2426
2486
|
registry: n,
|
|
2427
2487
|
resolveBinding: o.resolveBinding,
|
|
2428
2488
|
queryResults: o.queryResults,
|
|
2429
|
-
onComponentOutputsChanged:
|
|
2489
|
+
onComponentOutputsChanged: s
|
|
2430
2490
|
})]
|
|
2431
2491
|
})
|
|
2432
2492
|
});
|
|
2433
2493
|
}
|
|
2434
2494
|
//#endregion
|
|
2435
2495
|
//#region src/stageTheme.ts
|
|
2436
|
-
var
|
|
2437
|
-
preset:
|
|
2438
|
-
options: { darkModeSelector:
|
|
2496
|
+
var li = "[data-scene-color-scheme='dark']", ui = {
|
|
2497
|
+
preset: He,
|
|
2498
|
+
options: { darkModeSelector: li }
|
|
2439
2499
|
};
|
|
2440
2500
|
//#endregion
|
|
2441
|
-
export {
|
|
2501
|
+
export { ri as App, ri as StageApplication, on as StageCommandForm, mt as StageDataProvider, Rn as StageGuardedAction, Ke as StageSourceProvider, ti as composeStageScreen, Xr as createStageSliceInvoker, ht as dataChanged, Pt as executeRegisteredCommand, U as registeredCommand, Jr as sliceFieldsFrom, Zr as stageApplicationRegistry, ei as stageComposition, li as stageDarkSelector, We as stageEndpoints, $r as stageShellOf, ui as stageTheme, Ue as staticStageSource, It as useStageCommandExecutor, z as useStageData, B as useStageQuery, L as useStageSource };
|