@golemui/gui-shared 1.0.0-rc.3 → 1.0.0-rc.4
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/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/index.js +1 -1
- package/index.umd.cjs +1 -1
- package/internals.js +244 -230
- package/internals.umd.cjs +1 -1
- package/lib/dx/core/dxBase.types.d.ts +24 -4
- package/lib/dx/core/eventWiring.service.d.ts +13 -0
- package/lib/dx/shortcuts/custom-action/customAction.domain.d.ts +1 -1
- package/package.json +4 -3
- package/{register-U82VDtZw.js → register-BxVKv9Qh.js} +226 -209
- package/register-dBzdQbWZ.cjs +1 -0
- package/register-xqotLLz5.cjs +0 -1
package/internals.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { aF as I, aG as
|
|
2
|
-
import { X as
|
|
1
|
+
import { aF as I, aG as m, aH as M, ah as B, aI as j, aJ as L } from "./register-BxVKv9Qh.js";
|
|
2
|
+
import { X as me, W as he, L as Se, K as be, R as Te, Q as De, d as Ae, x as Oe, w as Ue, l as Ie, k as Ee, q as Re, r as we, a0 as ve, $ as xe, a2 as Ce, a1 as ke, Z as Me, Y as Be, a4 as je, a3 as Le, z as Pe, y as Ne, B as Fe, A as We, P as ze, O as Ge, h as $e, g as Ke, a as Ye, _ as Ve, N as He, M as Xe, v as qe, u as Je, t as Qe, T as Ze, S as et, s as tt, c as st, p as at, o as nt, j as rt, i as ot, D as it, C as lt, F as ct, E as ut, H as pt, G as dt, J as ft, I as gt, f as yt, e as _t, U as mt, V as ht, aK as St, aL as bt, b as Tt, n as Dt, m as At, a6 as Ot, ag as Ut, aC as It, aj as Et, as as Rt, ay as wt, av as vt, ai as xt, ae as Ct, ak as kt, a5 as Mt, ar as Bt, aq as jt, aA as Lt, ad as Pt, aa as Nt, ac as Ft, a9 as Wt, at as zt, au as Gt, af as $t, aD as Kt, aw as Yt, az as Vt, ap as Ht, ao as Xt, an as qt, am as Jt, aB as Qt, a7 as Zt, al as es, aE as ts, ax as ss, ab as as, a8 as ns, aM as rs, aN as os, aO as is, aP as ls, aQ as cs } from "./register-BxVKv9Qh.js";
|
|
3
3
|
import "@golemui/core";
|
|
4
4
|
import "@golemui/gui-validators";
|
|
5
|
-
function
|
|
5
|
+
function ce(o, ...e) {
|
|
6
6
|
return e.map((t) => ({
|
|
7
7
|
...t,
|
|
8
|
-
targetState:
|
|
8
|
+
targetState: o
|
|
9
9
|
}));
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function ue(o, ...e) {
|
|
12
12
|
return {
|
|
13
13
|
kind: "aggregated",
|
|
14
|
-
matcher: (t) => t.tags?.includes(
|
|
14
|
+
matcher: (t) => t.tags?.includes(o) ?? !1,
|
|
15
15
|
children: e
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const E = {
|
|
19
19
|
INPUTS: /* @__PURE__ */ new Set([
|
|
20
20
|
"INPUTS",
|
|
21
21
|
"TEXTAREA",
|
|
@@ -41,11 +41,11 @@ const R = {
|
|
|
41
41
|
DISPLAYS: /* @__PURE__ */ new Set(["DISPLAYS", "ALERTS", "MARKDOWN_TEXTS", "CUSTOM_DISPLAY"]),
|
|
42
42
|
LAYOUTS: /* @__PURE__ */ new Set(["LAYOUTS", "TABS", "ACCORDION", "CUSTOM_LAYOUT"])
|
|
43
43
|
};
|
|
44
|
-
function
|
|
45
|
-
const t =
|
|
46
|
-
return t ? t.has(e) :
|
|
44
|
+
function P(o, e) {
|
|
45
|
+
const t = E[o];
|
|
46
|
+
return t ? t.has(e) : o === e;
|
|
47
47
|
}
|
|
48
|
-
class
|
|
48
|
+
class N {
|
|
49
49
|
resolve(e, t) {
|
|
50
50
|
const a = [];
|
|
51
51
|
for (const n of t)
|
|
@@ -62,28 +62,28 @@ class P {
|
|
|
62
62
|
this.collectFromLeaf(s, t, a);
|
|
63
63
|
}
|
|
64
64
|
collectFromLeaf(e, t, a) {
|
|
65
|
-
|
|
65
|
+
P(e.selectorType, t.itemType ?? "") && e.matcher(t) && a.push(e);
|
|
66
66
|
}
|
|
67
67
|
rollUpSensibleDefaults(e) {
|
|
68
68
|
const t = /* @__PURE__ */ new Map(), a = (n, r) => {
|
|
69
|
-
const
|
|
70
|
-
|
|
69
|
+
const i = t.get(n) ?? [];
|
|
70
|
+
i.push(r), t.set(n, i);
|
|
71
71
|
};
|
|
72
72
|
for (const n of e) {
|
|
73
|
-
const r =
|
|
73
|
+
const r = E[n.selectorType];
|
|
74
74
|
if (r)
|
|
75
|
-
for (const
|
|
75
|
+
for (const i of r) a(i, n);
|
|
76
76
|
else
|
|
77
77
|
a(n.selectorType, n);
|
|
78
78
|
}
|
|
79
79
|
const s = {};
|
|
80
80
|
for (const [n, r] of t)
|
|
81
|
-
I(n) && (s[n] =
|
|
81
|
+
I(n) && (s[n] = m(n).rollUpSensibleDefaults(r));
|
|
82
82
|
return s;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
const
|
|
86
|
-
class
|
|
85
|
+
const F = new N();
|
|
86
|
+
class W {
|
|
87
87
|
/**
|
|
88
88
|
* Deep merges two objects, with right taking precedence over left when properties conflict.
|
|
89
89
|
* Arrays are replaced, not merged.
|
|
@@ -102,8 +102,8 @@ class F {
|
|
|
102
102
|
return a;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
const
|
|
106
|
-
class
|
|
105
|
+
const z = new W();
|
|
106
|
+
class G {
|
|
107
107
|
constructor(e) {
|
|
108
108
|
this.objectUtils = e;
|
|
109
109
|
}
|
|
@@ -140,8 +140,8 @@ class W {
|
|
|
140
140
|
kind: "dynamic",
|
|
141
141
|
fn: this.wrapWithSensibleDefaults(n, s, t, a)
|
|
142
142
|
};
|
|
143
|
-
const
|
|
144
|
-
return { kind: "static", def: this.applySensibleDefaults({ ...
|
|
143
|
+
const i = this.objectUtils.deepMerge(e, s);
|
|
144
|
+
return { kind: "static", def: this.applySensibleDefaults({ ...i }, t, a) };
|
|
145
145
|
}
|
|
146
146
|
// ── Collect all decorators in priority order ──
|
|
147
147
|
collectDecorators(e) {
|
|
@@ -156,13 +156,13 @@ class W {
|
|
|
156
156
|
applySensibleDefaults(e, t, a) {
|
|
157
157
|
if (!I(t)) return e;
|
|
158
158
|
const s = a.sensibleDefaults[t] ?? {};
|
|
159
|
-
return
|
|
159
|
+
return m(t).applySensibleDefaults(e, s);
|
|
160
160
|
}
|
|
161
161
|
// ── Create promoted FunctionWidget ──
|
|
162
162
|
createPromotedFunction(e, t, a, s, n) {
|
|
163
163
|
return (r) => {
|
|
164
|
-
const
|
|
165
|
-
let l = this.objectUtils.deepMerge(e,
|
|
164
|
+
const i = a(r);
|
|
165
|
+
let l = this.objectUtils.deepMerge(e, i);
|
|
166
166
|
return l = this.objectUtils.deepMerge(l, t), this.applySensibleDefaults(l, s, n);
|
|
167
167
|
};
|
|
168
168
|
}
|
|
@@ -184,8 +184,8 @@ class W {
|
|
|
184
184
|
};
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
const
|
|
188
|
-
class
|
|
187
|
+
const $ = new G(z);
|
|
188
|
+
class K {
|
|
189
189
|
mapToWidget(e, t) {
|
|
190
190
|
if (e.kind === "dynamic") {
|
|
191
191
|
const a = e.fn;
|
|
@@ -197,7 +197,7 @@ class G {
|
|
|
197
197
|
return this.mapStaticDef(e.def, t);
|
|
198
198
|
}
|
|
199
199
|
mapStaticDef(e, t) {
|
|
200
|
-
const a =
|
|
200
|
+
const a = m(t).mapToWidget(e);
|
|
201
201
|
return this.applyBaseWidgetFields(a, e);
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
@@ -208,8 +208,8 @@ class G {
|
|
|
208
208
|
return t.size != null && (e.size = t.size), t.defaultValue != null && e.kind === "input" && (e.defaultValue = t.defaultValue), t.on != null && (e.on = t.on), t.include != null && (e.include = t.include), t.exclude != null && (e.exclude = t.exclude), e;
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
const
|
|
212
|
-
class
|
|
211
|
+
const Y = new K();
|
|
212
|
+
class V {
|
|
213
213
|
/**
|
|
214
214
|
* Ensures the output is always a uniform GslSelector[] of aggregated selectors.
|
|
215
215
|
*
|
|
@@ -234,18 +234,18 @@ class $ {
|
|
|
234
234
|
};
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
-
const
|
|
237
|
+
const H = new V(), X = {
|
|
238
238
|
input: /* @__PURE__ */ new Set(["disabled", "readonly", "label", "validator", "size"]),
|
|
239
239
|
action: /* @__PURE__ */ new Set(["disabled", "label", "size"]),
|
|
240
240
|
layout: /* @__PURE__ */ new Set(["size"]),
|
|
241
241
|
display: /* @__PURE__ */ new Set([])
|
|
242
|
-
},
|
|
242
|
+
}, D = {
|
|
243
243
|
onChange: "change",
|
|
244
244
|
onLoad: "load",
|
|
245
245
|
onFilter: "filter",
|
|
246
246
|
onClick: "click"
|
|
247
247
|
};
|
|
248
|
-
class
|
|
248
|
+
class q {
|
|
249
249
|
/**
|
|
250
250
|
* Extracts `states` from a merge result, combining with state-targeted
|
|
251
251
|
* GSL leaf selectors from `_gslStates`.
|
|
@@ -254,31 +254,31 @@ class H {
|
|
|
254
254
|
*/
|
|
255
255
|
extractFromMergeResult(e, t) {
|
|
256
256
|
const a = {};
|
|
257
|
-
for (const
|
|
258
|
-
const l =
|
|
257
|
+
for (const i of t) {
|
|
258
|
+
const l = i.targetState, c = i.config, u = c.override && typeof c.override != "function" ? c.override : c;
|
|
259
259
|
a[l] = {
|
|
260
260
|
...a[l] || {},
|
|
261
261
|
...u
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
264
|
if (e.kind === "dynamic") {
|
|
265
|
-
const
|
|
265
|
+
const i = e.fn;
|
|
266
266
|
return {
|
|
267
267
|
cleanedResult: { kind: "dynamic", fn: (c) => {
|
|
268
|
-
const u =
|
|
268
|
+
const u = i(c), { states: p, ...f } = u;
|
|
269
269
|
return f;
|
|
270
270
|
} },
|
|
271
271
|
stateData: { stateOverrides: a }
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
const { states: s, ...n } = e.def, r = {};
|
|
275
|
-
for (const [
|
|
276
|
-
r[
|
|
275
|
+
for (const [i, l] of Object.entries(a))
|
|
276
|
+
r[i] = { ...l };
|
|
277
277
|
if (s)
|
|
278
|
-
for (const [
|
|
278
|
+
for (const [i, l] of Object.entries(
|
|
279
279
|
s
|
|
280
280
|
))
|
|
281
|
-
r[
|
|
281
|
+
r[i] = { ...r[i] || {}, ...l };
|
|
282
282
|
return {
|
|
283
283
|
cleanedResult: { kind: "static", def: n },
|
|
284
284
|
stateData: { stateOverrides: r }
|
|
@@ -295,11 +295,11 @@ class H {
|
|
|
295
295
|
const { stateOverrides: n } = t;
|
|
296
296
|
if (Object.keys(n).length === 0)
|
|
297
297
|
return e;
|
|
298
|
-
const r = { ...e },
|
|
298
|
+
const r = { ...e }, i = e.kind, l = X[i] || /* @__PURE__ */ new Set();
|
|
299
299
|
e.props && (r.props = { ...e.props }), e.on && (r.on = { ...e.on });
|
|
300
300
|
for (const [c, u] of Object.entries(n))
|
|
301
301
|
for (const [p, f] of Object.entries(u))
|
|
302
|
-
p === "visible" ? this.applyVisibility(r, c, f) :
|
|
302
|
+
p === "visible" ? this.applyVisibility(r, c, f) : D[p] ? this.applyStateEvent(r, c, p, f, a, s) : l.has(p) ? r[`${p}.${c}`] = f : (r.props || (r.props = {}), r.props[`${p}.${c}`] = f);
|
|
303
303
|
return r;
|
|
304
304
|
}
|
|
305
305
|
hasStateData(e) {
|
|
@@ -317,24 +317,29 @@ class H {
|
|
|
317
317
|
}
|
|
318
318
|
// ── State-suffixed event helpers ──
|
|
319
319
|
applyStateEvent(e, t, a, s, n, r) {
|
|
320
|
-
const
|
|
320
|
+
const i = D[a];
|
|
321
321
|
if (e.on || (e.on = {}), typeof s == "function") {
|
|
322
|
-
const l =
|
|
323
|
-
|
|
324
|
-
|
|
322
|
+
const l = M(s);
|
|
323
|
+
if (l != null)
|
|
324
|
+
e.on[`${i}.${t}`] = l;
|
|
325
|
+
else {
|
|
326
|
+
const c = r.next();
|
|
327
|
+
n.set(c, s), e.on[`${i}.${t}`] = c;
|
|
328
|
+
}
|
|
329
|
+
} else typeof s == "string" && (e.on[`${i}.${t}`] = s);
|
|
325
330
|
}
|
|
326
331
|
}
|
|
327
|
-
const
|
|
328
|
-
function
|
|
329
|
-
let
|
|
330
|
-
return { next: () => `event_${
|
|
332
|
+
const J = new q();
|
|
333
|
+
function Q() {
|
|
334
|
+
let o = 0;
|
|
335
|
+
return { next: () => `event_${o++}` };
|
|
331
336
|
}
|
|
332
|
-
class
|
|
337
|
+
class Z {
|
|
333
338
|
constructor(e, t, a, s, n) {
|
|
334
339
|
this.resolver = e, this.merger = t, this.mapper = a, this.eventWiring = s, this.stateExpansion = n;
|
|
335
340
|
}
|
|
336
341
|
walkAndMap(e, t, a) {
|
|
337
|
-
const s = /* @__PURE__ */ new Map(), n =
|
|
342
|
+
const s = /* @__PURE__ */ new Map(), n = Q(), r = { value: 0 }, i = /* @__PURE__ */ new Set();
|
|
338
343
|
return { widgets: this.walkItems(
|
|
339
344
|
e,
|
|
340
345
|
t,
|
|
@@ -342,10 +347,10 @@ class J {
|
|
|
342
347
|
a,
|
|
343
348
|
n,
|
|
344
349
|
r,
|
|
345
|
-
|
|
350
|
+
i
|
|
346
351
|
), eventRegistry: s };
|
|
347
352
|
}
|
|
348
|
-
walkItems(e, t, a, s, n, r,
|
|
353
|
+
walkItems(e, t, a, s, n, r, i) {
|
|
349
354
|
return e.flatMap((l) => {
|
|
350
355
|
if (l.type !== "ITEMS")
|
|
351
356
|
throw new Error("Unexpected gui shortcut type");
|
|
@@ -358,28 +363,28 @@ class J {
|
|
|
358
363
|
s,
|
|
359
364
|
n,
|
|
360
365
|
r,
|
|
361
|
-
|
|
366
|
+
i
|
|
362
367
|
));
|
|
363
368
|
});
|
|
364
369
|
}
|
|
365
|
-
processItem(e, t, a, s, n, r,
|
|
366
|
-
const u = t, p =
|
|
367
|
-
leafSelectors:
|
|
368
|
-
sensibleDefaults:
|
|
370
|
+
processItem(e, t, a, s, n, r, i, l, c) {
|
|
371
|
+
const u = t, p = m(t), f = p.parseEntry(e), _ = this.buildBaseDef(f), w = this.buildDecoratorForMatching(_, u, a), h = this.resolver.resolve(w, s), v = h.leafSelectors.filter((d) => d.targetState != null), x = {
|
|
372
|
+
leafSelectors: h.leafSelectors.filter((d) => d.targetState == null),
|
|
373
|
+
sensibleDefaults: h.sensibleDefaults
|
|
369
374
|
};
|
|
370
|
-
let y = this.merger.merge(_, u,
|
|
375
|
+
let y = this.merger.merge(_, u, x);
|
|
371
376
|
p.afterMerge && (y = p.afterMerge(y, {
|
|
372
377
|
eventRegistry: n,
|
|
373
378
|
formConfig: r,
|
|
374
|
-
eventIdGenerator:
|
|
379
|
+
eventIdGenerator: i
|
|
375
380
|
})), y = this.eventWiring.wireInputLayoutEvents(
|
|
376
381
|
y,
|
|
377
382
|
n,
|
|
378
|
-
|
|
383
|
+
i
|
|
379
384
|
);
|
|
380
|
-
const { cleanedResult:
|
|
385
|
+
const { cleanedResult: T, stateData: S } = this.stateExpansion.extractFromMergeResult(
|
|
381
386
|
y,
|
|
382
|
-
|
|
387
|
+
v
|
|
383
388
|
);
|
|
384
389
|
let g;
|
|
385
390
|
if (p.buildCustomWidget) {
|
|
@@ -388,13 +393,13 @@ class J {
|
|
|
388
393
|
s,
|
|
389
394
|
n,
|
|
390
395
|
r,
|
|
391
|
-
|
|
396
|
+
i,
|
|
392
397
|
l,
|
|
393
398
|
c
|
|
394
399
|
);
|
|
395
|
-
g = this.buildCustomWidget(p,
|
|
400
|
+
g = this.buildCustomWidget(p, T, d);
|
|
396
401
|
} else
|
|
397
|
-
g = this.mapper.mapToWidget(
|
|
402
|
+
g = this.mapper.mapToWidget(T, u);
|
|
398
403
|
if (typeof g != "function") {
|
|
399
404
|
const d = g;
|
|
400
405
|
d.uid || (d.path && !c.has(d.path) ? (d.uid = d.path, c.add(d.path)) : d.uid = `dx_${l.value++}`);
|
|
@@ -402,13 +407,13 @@ class J {
|
|
|
402
407
|
if (this.stateExpansion.hasStateData(S))
|
|
403
408
|
if (typeof g == "function") {
|
|
404
409
|
const d = g;
|
|
405
|
-
g = ((
|
|
406
|
-
const
|
|
410
|
+
g = ((C) => {
|
|
411
|
+
const k = d(C);
|
|
407
412
|
return this.stateExpansion.applyToWidget(
|
|
408
|
-
|
|
413
|
+
k,
|
|
409
414
|
S,
|
|
410
415
|
n,
|
|
411
|
-
|
|
416
|
+
i
|
|
412
417
|
);
|
|
413
418
|
});
|
|
414
419
|
} else
|
|
@@ -416,11 +421,11 @@ class J {
|
|
|
416
421
|
g,
|
|
417
422
|
S,
|
|
418
423
|
n,
|
|
419
|
-
|
|
424
|
+
i
|
|
420
425
|
);
|
|
421
426
|
return g;
|
|
422
427
|
}
|
|
423
|
-
buildCustomWidgetContext(e, t, a, s, n, r,
|
|
428
|
+
buildCustomWidgetContext(e, t, a, s, n, r, i) {
|
|
424
429
|
return {
|
|
425
430
|
children: e,
|
|
426
431
|
mapStaticDef: (l, c) => this.mapper.mapStaticDef(l, c),
|
|
@@ -431,7 +436,7 @@ class J {
|
|
|
431
436
|
s,
|
|
432
437
|
n,
|
|
433
438
|
r,
|
|
434
|
-
|
|
439
|
+
i
|
|
435
440
|
)
|
|
436
441
|
};
|
|
437
442
|
}
|
|
@@ -456,7 +461,7 @@ class J {
|
|
|
456
461
|
return { itemType: t, tags: s, uid: n, type: r };
|
|
457
462
|
}
|
|
458
463
|
}
|
|
459
|
-
class
|
|
464
|
+
class ee {
|
|
460
465
|
constructor(e, t) {
|
|
461
466
|
this.selectorNormalizer = e, this.walker = t;
|
|
462
467
|
}
|
|
@@ -465,11 +470,11 @@ class Q {
|
|
|
465
470
|
e,
|
|
466
471
|
t,
|
|
467
472
|
a
|
|
468
|
-
), { widgets:
|
|
473
|
+
), { widgets: i, eventRegistry: l } = this.walker.walkAndMap(
|
|
469
474
|
s,
|
|
470
475
|
n,
|
|
471
476
|
r
|
|
472
|
-
), c =
|
|
477
|
+
), c = i[0];
|
|
473
478
|
return this.buildResult({ form: c }, l, r);
|
|
474
479
|
}
|
|
475
480
|
/**
|
|
@@ -484,23 +489,23 @@ class Q {
|
|
|
484
489
|
*/
|
|
485
490
|
prepareForm(e, t, a) {
|
|
486
491
|
const n = (Array.isArray(e) ? [...e] : [e]).map(
|
|
487
|
-
(l) => typeof l == "function" ?
|
|
488
|
-
), r = this.selectorNormalizer.normalizeSelectors(t),
|
|
492
|
+
(l) => typeof l == "function" ? B(l) : l
|
|
493
|
+
), r = this.selectorNormalizer.normalizeSelectors(t), i = {
|
|
489
494
|
...this.selectorNormalizer.extractFormConfig(),
|
|
490
495
|
...a
|
|
491
496
|
};
|
|
492
|
-
if (!
|
|
497
|
+
if (!i.suppressAutomaticStack) {
|
|
493
498
|
const l = {
|
|
494
499
|
def: { uid: "#root", direction: "column", widgetName: "flex" },
|
|
495
500
|
children: n
|
|
496
501
|
};
|
|
497
502
|
return {
|
|
498
|
-
defs: [{ type: "ITEMS", itemType:
|
|
503
|
+
defs: [{ type: "ITEMS", itemType: j.LAYOUTS, items: [l], tags: [] }],
|
|
499
504
|
gslSelectors: r,
|
|
500
|
-
formConfig:
|
|
505
|
+
formConfig: i
|
|
501
506
|
};
|
|
502
507
|
}
|
|
503
|
-
return { defs: n, gslSelectors: r, formConfig:
|
|
508
|
+
return { defs: n, gslSelectors: r, formConfig: i };
|
|
504
509
|
}
|
|
505
510
|
/**
|
|
506
511
|
* Converts DX `$`-separated state names to core's `:`-separated names.
|
|
@@ -521,7 +526,7 @@ class Q {
|
|
|
521
526
|
return t.size > 0 && (s.events = (n) => {
|
|
522
527
|
const r = t.get(n.name);
|
|
523
528
|
if (r) {
|
|
524
|
-
const
|
|
529
|
+
const i = (c) => {
|
|
525
530
|
if (c && typeof c == "object" && "path" in c && !("type" in c)) {
|
|
526
531
|
const { path: u, ...p } = c;
|
|
527
532
|
for (const [f, _] of Object.entries(p))
|
|
@@ -533,46 +538,55 @@ class Q {
|
|
|
533
538
|
n.callback(c);
|
|
534
539
|
}, l = {
|
|
535
540
|
...n,
|
|
536
|
-
callback:
|
|
537
|
-
update:
|
|
541
|
+
callback: i,
|
|
542
|
+
update: i
|
|
538
543
|
};
|
|
539
544
|
r(l);
|
|
540
545
|
}
|
|
541
546
|
}), a.dependencies && (s.dependencies = a.dependencies), a.widgetLoaders && (s.widgetLoaders = a.widgetLoaders), a.validateOn && (s.validateOn = a.validateOn), a.itemRenderers && (s.itemRenderers = a.itemRenderers), s;
|
|
542
547
|
}
|
|
543
548
|
}
|
|
544
|
-
const
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
),
|
|
551
|
-
function
|
|
552
|
-
return typeof
|
|
549
|
+
const te = new Z(
|
|
550
|
+
F,
|
|
551
|
+
$,
|
|
552
|
+
Y,
|
|
553
|
+
L,
|
|
554
|
+
J
|
|
555
|
+
), se = new ee(H, te);
|
|
556
|
+
function R(o) {
|
|
557
|
+
return typeof o == "function" ? !0 : Array.isArray(o) ? o.length === 0 || o.every(A) : A(o);
|
|
553
558
|
}
|
|
554
|
-
function A(
|
|
555
|
-
if (typeof
|
|
556
|
-
if (
|
|
557
|
-
const e =
|
|
559
|
+
function A(o) {
|
|
560
|
+
if (typeof o == "function") return !0;
|
|
561
|
+
if (o === null || typeof o != "object") return !1;
|
|
562
|
+
const e = o;
|
|
558
563
|
return e.type === "ITEMS" && typeof e.itemType == "string";
|
|
559
564
|
}
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
565
|
+
function ae(o) {
|
|
566
|
+
if (!o || typeof o != "object" || Array.isArray(o))
|
|
567
|
+
return;
|
|
568
|
+
const e = o.form;
|
|
569
|
+
if (R(e))
|
|
570
|
+
throw new Error(
|
|
571
|
+
"[GolemUI] The gui.* form definition was wrapped in an extra `{ form: ... }` object, so its fields were never resolved. Pass the gui.* array DIRECTLY as formDef (`config={{ formDef: form }}`) and put any named `states` in `formConfig`: `config={{ formDef: form, formConfig: { states } }}`. Do NOT wrap them as a `{ form: [...] }` object."
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
const O = Object.freeze({}), ne = Object.freeze({}), U = /* @__PURE__ */ new WeakMap();
|
|
575
|
+
function b(o, e) {
|
|
576
|
+
return o == null ? e : typeof o == "object" ? o : {};
|
|
563
577
|
}
|
|
564
|
-
function
|
|
565
|
-
if (!
|
|
566
|
-
return { formDef:
|
|
567
|
-
const a = b(
|
|
578
|
+
function pe(o, e, t) {
|
|
579
|
+
if (!R(o))
|
|
580
|
+
return ae(o), { formDef: o };
|
|
581
|
+
const a = b(o, O), s = b(e, O), n = b(t, ne);
|
|
568
582
|
let r = U.get(a);
|
|
569
583
|
r || (r = /* @__PURE__ */ new WeakMap(), U.set(a, r));
|
|
570
|
-
let
|
|
571
|
-
|
|
572
|
-
const l =
|
|
584
|
+
let i = r.get(s);
|
|
585
|
+
i || (i = /* @__PURE__ */ new WeakMap(), r.set(s, i));
|
|
586
|
+
const l = i.get(n);
|
|
573
587
|
if (l) return l;
|
|
574
|
-
const c =
|
|
575
|
-
|
|
588
|
+
const c = se.processDxFacade(
|
|
589
|
+
o,
|
|
576
590
|
e,
|
|
577
591
|
t
|
|
578
592
|
), u = {
|
|
@@ -583,9 +597,9 @@ function ce(i, e, t) {
|
|
|
583
597
|
validateOn: c.validateOn,
|
|
584
598
|
itemRenderers: c.itemRenderers
|
|
585
599
|
};
|
|
586
|
-
return
|
|
600
|
+
return i.set(n, u), u;
|
|
587
601
|
}
|
|
588
|
-
class
|
|
602
|
+
class re {
|
|
589
603
|
create(e) {
|
|
590
604
|
return {
|
|
591
605
|
states: e.states,
|
|
@@ -598,129 +612,129 @@ class ae {
|
|
|
598
612
|
};
|
|
599
613
|
}
|
|
600
614
|
}
|
|
601
|
-
function
|
|
602
|
-
return new
|
|
615
|
+
function de() {
|
|
616
|
+
return new re();
|
|
603
617
|
}
|
|
604
|
-
const
|
|
605
|
-
function
|
|
606
|
-
if (
|
|
607
|
-
return
|
|
618
|
+
const fe = (o) => o !== null && typeof o == "object" && Object.prototype.hasOwnProperty.call(o, "label") && Object.prototype.hasOwnProperty.call(o, "value");
|
|
619
|
+
function ge(o, e) {
|
|
620
|
+
if (o != null && typeof o == "object" && "__rid" in o)
|
|
621
|
+
return o.__rid;
|
|
608
622
|
const t = e();
|
|
609
|
-
return Object.defineProperty(
|
|
623
|
+
return Object.defineProperty(o, "__rid", {
|
|
610
624
|
value: t,
|
|
611
625
|
enumerable: !1,
|
|
612
626
|
configurable: !1
|
|
613
627
|
}), t;
|
|
614
628
|
}
|
|
615
629
|
export {
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
+
me as _gslAccordionByUid,
|
|
631
|
+
he as _gslAccordions,
|
|
632
|
+
Se as _gslActionByUid,
|
|
633
|
+
be as _gslActions,
|
|
634
|
+
Te as _gslAlertByUid,
|
|
635
|
+
De as _gslAlerts,
|
|
636
|
+
Ae as _gslBooleanInputs,
|
|
637
|
+
Oe as _gslCalendarByUid,
|
|
638
|
+
Ue as _gslCalendars,
|
|
639
|
+
Ie as _gslCheckboxByUid,
|
|
640
|
+
Ee as _gslCheckboxes,
|
|
641
|
+
Re as _gslCurrencies,
|
|
642
|
+
we as _gslCurrencyByUid,
|
|
643
|
+
ve as _gslCustomActionByUid,
|
|
630
644
|
xe as _gslCustomActions,
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
645
|
+
Ce as _gslCustomDisplayByUid,
|
|
646
|
+
ke as _gslCustomDisplays,
|
|
647
|
+
Me as _gslCustomInputByUid,
|
|
648
|
+
Be as _gslCustomInputs,
|
|
649
|
+
je as _gslCustomLayoutByUid,
|
|
650
|
+
Le as _gslCustomLayouts,
|
|
651
|
+
Pe as _gslDateInputByUid,
|
|
652
|
+
Ne as _gslDateInputs,
|
|
653
|
+
Fe as _gslDatePickerByUid,
|
|
654
|
+
We as _gslDatePickers,
|
|
655
|
+
ze as _gslDisplayByUid,
|
|
656
|
+
Ge as _gslDisplays,
|
|
657
|
+
$e as _gslDropdownByUid,
|
|
658
|
+
Ke as _gslDropdowns,
|
|
659
|
+
Ye as _gslInputByUid,
|
|
660
|
+
Ve as _gslInputs,
|
|
661
|
+
He as _gslLayoutByUid,
|
|
662
|
+
Xe as _gslLayouts,
|
|
663
|
+
qe as _gslListByUid,
|
|
664
|
+
Je as _gslLists,
|
|
665
|
+
Qe as _gslMarkdownByUid,
|
|
666
|
+
Ze as _gslMarkdownTextByUid,
|
|
667
|
+
et as _gslMarkdownTexts,
|
|
668
|
+
tt as _gslMarkdowns,
|
|
669
|
+
st as _gslNumberInputs,
|
|
670
|
+
at as _gslPasswordByUid,
|
|
671
|
+
nt as _gslPasswords,
|
|
672
|
+
rt as _gslRadiogroupByUid,
|
|
673
|
+
ot as _gslRadiogroups,
|
|
674
|
+
it as _gslRangeCalendarByUid,
|
|
675
|
+
lt as _gslRangeCalendars,
|
|
676
|
+
ct as _gslRangeDateInputByUid,
|
|
677
|
+
ut as _gslRangeDateInputs,
|
|
678
|
+
pt as _gslRangeDatePickerByUid,
|
|
679
|
+
dt as _gslRangeDatePickers,
|
|
680
|
+
ft as _gslRepeaterByUid,
|
|
681
|
+
gt as _gslRepeaters,
|
|
682
|
+
yt as _gslSelectByUid,
|
|
683
|
+
_t as _gslSelects,
|
|
684
|
+
ce as _gslStates,
|
|
685
|
+
mt as _gslTabs,
|
|
686
|
+
ht as _gslTabsByUid,
|
|
687
|
+
ue as _gslTag,
|
|
688
|
+
St as _gslTags,
|
|
689
|
+
bt as _gslTagsByUid,
|
|
690
|
+
Tt as _gslTextInputs,
|
|
691
|
+
Dt as _gslTextareaByUid,
|
|
692
|
+
At as _gslTextareas,
|
|
693
|
+
Ot as _guiAccordion,
|
|
694
|
+
Ut as _guiAlert,
|
|
695
|
+
It as _guiBooleanInput,
|
|
696
|
+
Et as _guiButton,
|
|
697
|
+
Rt as _guiCalendar,
|
|
698
|
+
wt as _guiCheckbox,
|
|
699
|
+
vt as _guiCurrency,
|
|
686
700
|
xt as _guiCustomAction,
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
701
|
+
Ct as _guiCustomDisplay,
|
|
702
|
+
kt as _guiCustomInput,
|
|
703
|
+
Mt as _guiCustomLayout,
|
|
704
|
+
Bt as _guiDateInput,
|
|
705
|
+
jt as _guiDatePicker,
|
|
706
|
+
B as _guiDisplay,
|
|
707
|
+
Lt as _guiDropdown,
|
|
708
|
+
Pt as _guiFlex,
|
|
709
|
+
Nt as _guiGrid,
|
|
710
|
+
Ft as _guiHorizontalFlex,
|
|
711
|
+
Wt as _guiHorizontalGrid,
|
|
712
|
+
zt as _guiList,
|
|
713
|
+
Gt as _guiMarkdown,
|
|
714
|
+
$t as _guiMarkdownText,
|
|
715
|
+
Kt as _guiNumberInput,
|
|
716
|
+
Yt as _guiPassword,
|
|
717
|
+
Vt as _guiRadiogroup,
|
|
718
|
+
Ht as _guiRangeCalendar,
|
|
719
|
+
Xt as _guiRangeDateInput,
|
|
720
|
+
qt as _guiRangeDatePicker,
|
|
721
|
+
Jt as _guiRepeater,
|
|
722
|
+
Qt as _guiSelect,
|
|
723
|
+
Zt as _guiTabs,
|
|
724
|
+
es as _guiTags,
|
|
725
|
+
ts as _guiTextInput,
|
|
726
|
+
ss as _guiTextarea,
|
|
727
|
+
as as _guiVerticalFlex,
|
|
728
|
+
ns as _guiVerticalGrid,
|
|
729
|
+
rs as createGslSelector,
|
|
730
|
+
os as defineShortcutType,
|
|
731
|
+
is as extractWidgetProps,
|
|
732
|
+
se as formDefs,
|
|
733
|
+
ge as getItemKey,
|
|
734
|
+
de as golemForm,
|
|
735
|
+
R as isDxDefinitions,
|
|
736
|
+
fe as isOption,
|
|
737
|
+
ls as processAutoLabel,
|
|
738
|
+
cs as processAutoPlaceholder,
|
|
739
|
+
pe as resolveFormInput
|
|
726
740
|
};
|