@golemui/gui-shared 1.1.1-rc.0 → 1.1.1-rc.2
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 +17 -0
- package/index.js +23 -366
- package/index.umd.cjs +1 -1
- package/internals.js +162 -757
- package/internals.umd.cjs +1 -1
- package/lib/dx/__tests__/helpers.d.ts +1 -1
- package/lib/dx/formDef.domain.d.ts +8 -33
- package/lib/dx/formDefs.d.ts +7 -0
- package/lib/dx/gui.d.ts +281 -52
- package/lib/dx/guiDependencyTypes.d.ts +14 -0
- package/lib/dx/index.d.ts +12 -11
- package/lib/dx/registry.d.ts +26 -0
- package/lib/dx/resolveFormInput.d.ts +7 -20
- package/lib/dx/shortcuts/accordion/accordion.domain.d.ts +1 -3
- package/lib/dx/shortcuts/accordion/guiAccordion.impl.d.ts +1 -1
- package/lib/dx/shortcuts/accordion/register.d.ts +4 -2
- package/lib/dx/shortcuts/actions/actions.domain.d.ts +1 -2
- package/lib/dx/shortcuts/actions/guiActions.impl.d.ts +1 -1
- package/lib/dx/shortcuts/actions/register.d.ts +3 -1
- package/lib/dx/shortcuts/alert/alert.domain.d.ts +1 -2
- package/lib/dx/shortcuts/alert/guiAlert.impl.d.ts +1 -1
- package/lib/dx/shortcuts/alert/register.d.ts +4 -2
- package/lib/dx/shortcuts/calendar/calendar.domain.d.ts +1 -3
- package/lib/dx/shortcuts/calendar/guiCalendar.impl.d.ts +1 -1
- package/lib/dx/shortcuts/calendar/register.d.ts +4 -2
- package/lib/dx/shortcuts/checkbox/checkbox.domain.d.ts +1 -3
- package/lib/dx/shortcuts/checkbox/guiCheckbox.impl.d.ts +1 -1
- package/lib/dx/shortcuts/checkbox/register.d.ts +4 -2
- package/lib/dx/shortcuts/currency/currency.domain.d.ts +1 -3
- package/lib/dx/shortcuts/currency/guiCurrency.impl.d.ts +1 -1
- package/lib/dx/shortcuts/currency/register.d.ts +4 -2
- package/lib/dx/shortcuts/custom-action/customAction.domain.d.ts +1 -2
- package/lib/dx/shortcuts/custom-action/guiCustomAction.impl.d.ts +1 -1
- package/lib/dx/shortcuts/custom-action/register.d.ts +4 -2
- package/lib/dx/shortcuts/custom-display/customDisplay.domain.d.ts +1 -2
- package/lib/dx/shortcuts/custom-display/guiCustomDisplay.impl.d.ts +1 -1
- package/lib/dx/shortcuts/custom-display/register.d.ts +4 -2
- package/lib/dx/shortcuts/custom-input/customInput.domain.d.ts +1 -2
- package/lib/dx/shortcuts/custom-input/guiCustomInput.impl.d.ts +1 -1
- package/lib/dx/shortcuts/custom-input/register.d.ts +4 -2
- package/lib/dx/shortcuts/custom-layout/customLayout.domain.d.ts +1 -3
- package/lib/dx/shortcuts/custom-layout/guiCustomLayout.impl.d.ts +1 -2
- package/lib/dx/shortcuts/custom-layout/register.d.ts +4 -2
- package/lib/dx/shortcuts/date-input/dateInput.domain.d.ts +1 -3
- package/lib/dx/shortcuts/date-input/guiDateInput.impl.d.ts +1 -1
- package/lib/dx/shortcuts/date-input/register.d.ts +4 -2
- package/lib/dx/shortcuts/date-picker/datePicker.domain.d.ts +1 -3
- package/lib/dx/shortcuts/date-picker/guiDatePicker.impl.d.ts +1 -1
- package/lib/dx/shortcuts/date-picker/register.d.ts +4 -2
- package/lib/dx/shortcuts/date-time-calendar/dateTimeCalendar.domain.d.ts +1 -3
- package/lib/dx/shortcuts/date-time-calendar/guiDateTimeCalendar.impl.d.ts +1 -1
- package/lib/dx/shortcuts/date-time-calendar/register.d.ts +4 -2
- package/lib/dx/shortcuts/date-time-input/dateTimeInput.domain.d.ts +1 -3
- package/lib/dx/shortcuts/date-time-input/guiDateTimeInput.impl.d.ts +1 -1
- package/lib/dx/shortcuts/date-time-input/register.d.ts +4 -2
- package/lib/dx/shortcuts/date-time-picker/dateTimePicker.domain.d.ts +1 -3
- package/lib/dx/shortcuts/date-time-picker/guiDateTimePicker.impl.d.ts +1 -1
- package/lib/dx/shortcuts/date-time-picker/register.d.ts +4 -2
- package/lib/dx/shortcuts/display/display.domain.d.ts +1 -2
- package/lib/dx/shortcuts/display/guiDisplay.impl.d.ts +1 -1
- package/lib/dx/shortcuts/display/register.d.ts +4 -2
- package/lib/dx/shortcuts/dropdown/dropdown.domain.d.ts +1 -2
- package/lib/dx/shortcuts/dropdown/guiDropdown.impl.d.ts +1 -1
- package/lib/dx/shortcuts/dropdown/register.d.ts +4 -2
- package/lib/dx/shortcuts/inputs/gslInputSubtypes.d.ts +3 -3
- package/lib/dx/shortcuts/inputs/guiBooleanInput.impl.d.ts +1 -1
- package/lib/dx/shortcuts/inputs/guiNumberInput.impl.d.ts +1 -1
- package/lib/dx/shortcuts/inputs/guiTextInput.impl.d.ts +1 -1
- package/lib/dx/shortcuts/inputs/inputSensibleDefaults.service.d.ts +1 -1
- package/lib/dx/shortcuts/inputs/inputs.domain.d.ts +1 -3
- package/lib/dx/shortcuts/inputs/register.d.ts +4 -2
- package/lib/dx/shortcuts/layouts/guiFlex.impl.d.ts +1 -1
- package/lib/dx/shortcuts/layouts/layouts.domain.d.ts +1 -3
- package/lib/dx/shortcuts/layouts/register.d.ts +4 -2
- package/lib/dx/shortcuts/list/guiList.impl.d.ts +1 -1
- package/lib/dx/shortcuts/list/list.domain.d.ts +1 -2
- package/lib/dx/shortcuts/list/register.d.ts +4 -2
- package/lib/dx/shortcuts/markdown/guiMarkdown.impl.d.ts +1 -1
- package/lib/dx/shortcuts/markdown/markdown.domain.d.ts +1 -3
- package/lib/dx/shortcuts/markdown/register.d.ts +4 -2
- package/lib/dx/shortcuts/markdown-text/guiMarkdownText.impl.d.ts +1 -1
- package/lib/dx/shortcuts/markdown-text/markdownText.domain.d.ts +1 -2
- package/lib/dx/shortcuts/markdown-text/register.d.ts +4 -2
- package/lib/dx/shortcuts/password/guiPassword.impl.d.ts +1 -1
- package/lib/dx/shortcuts/password/password.domain.d.ts +1 -3
- package/lib/dx/shortcuts/password/register.d.ts +4 -2
- package/lib/dx/shortcuts/radiogroup/guiRadiogroup.impl.d.ts +1 -1
- package/lib/dx/shortcuts/radiogroup/radiogroup.domain.d.ts +1 -2
- package/lib/dx/shortcuts/radiogroup/register.d.ts +4 -2
- package/lib/dx/shortcuts/range-calendar/guiRangeCalendar.impl.d.ts +1 -1
- package/lib/dx/shortcuts/range-calendar/rangeCalendar.domain.d.ts +1 -3
- package/lib/dx/shortcuts/range-calendar/register.d.ts +4 -2
- package/lib/dx/shortcuts/range-date-input/guiRangeDateInput.impl.d.ts +1 -1
- package/lib/dx/shortcuts/range-date-input/rangeDateInput.domain.d.ts +1 -3
- package/lib/dx/shortcuts/range-date-input/register.d.ts +4 -2
- package/lib/dx/shortcuts/range-date-picker/guiRangeDatePicker.impl.d.ts +1 -1
- package/lib/dx/shortcuts/range-date-picker/rangeDatePicker.domain.d.ts +1 -3
- package/lib/dx/shortcuts/range-date-picker/register.d.ts +4 -2
- package/lib/dx/shortcuts/range-date-time-calendar/guiRangeDateTimeCalendar.impl.d.ts +1 -1
- package/lib/dx/shortcuts/range-date-time-calendar/rangeDateTimeCalendar.domain.d.ts +1 -3
- package/lib/dx/shortcuts/range-date-time-calendar/register.d.ts +4 -2
- package/lib/dx/shortcuts/range-date-time-input/guiRangeDateTimeInput.impl.d.ts +1 -1
- package/lib/dx/shortcuts/range-date-time-input/rangeDateTimeInput.domain.d.ts +1 -3
- package/lib/dx/shortcuts/range-date-time-input/register.d.ts +4 -2
- package/lib/dx/shortcuts/range-date-time-picker/guiRangeDateTimePicker.impl.d.ts +1 -1
- package/lib/dx/shortcuts/range-date-time-picker/rangeDateTimePicker.domain.d.ts +1 -3
- package/lib/dx/shortcuts/range-date-time-picker/register.d.ts +4 -2
- package/lib/dx/shortcuts/range-time-input/guiRangeTimeInput.impl.d.ts +1 -1
- package/lib/dx/shortcuts/range-time-input/rangeTimeInput.domain.d.ts +1 -3
- package/lib/dx/shortcuts/range-time-input/register.d.ts +4 -2
- package/lib/dx/shortcuts/range-time-picker/guiRangeTimePicker.impl.d.ts +1 -1
- package/lib/dx/shortcuts/range-time-picker/rangeTimePicker.domain.d.ts +1 -3
- package/lib/dx/shortcuts/range-time-picker/register.d.ts +4 -2
- package/lib/dx/shortcuts/repeater/guiRepeater.impl.d.ts +1 -1
- package/lib/dx/shortcuts/repeater/register.d.ts +5 -3
- package/lib/dx/shortcuts/repeater/repeater.domain.d.ts +1 -4
- package/lib/dx/shortcuts/scopes/gslStates.impl.d.ts +1 -1
- package/lib/dx/shortcuts/scopes/gslTag.impl.d.ts +1 -1
- package/lib/dx/shortcuts/select/guiSelect.impl.d.ts +1 -1
- package/lib/dx/shortcuts/select/register.d.ts +4 -2
- package/lib/dx/shortcuts/select/select.domain.d.ts +1 -2
- package/lib/dx/shortcuts/tabs/guiTabs.impl.d.ts +1 -1
- package/lib/dx/shortcuts/tabs/register.d.ts +4 -2
- package/lib/dx/shortcuts/tabs/tabs.domain.d.ts +1 -3
- package/lib/dx/shortcuts/tags/guiTags.impl.d.ts +1 -1
- package/lib/dx/shortcuts/tags/register.d.ts +4 -2
- package/lib/dx/shortcuts/tags/tags.domain.d.ts +1 -3
- package/lib/dx/shortcuts/textarea/guiTextarea.impl.d.ts +1 -1
- package/lib/dx/shortcuts/textarea/register.d.ts +4 -2
- package/lib/dx/shortcuts/textarea/textarea.domain.d.ts +1 -3
- package/lib/dx/shortcuts/time-input/guiTimeInput.impl.d.ts +1 -1
- package/lib/dx/shortcuts/time-input/register.d.ts +4 -2
- package/lib/dx/shortcuts/time-input/timeInput.domain.d.ts +1 -3
- package/lib/dx/shortcuts/time-picker/guiTimePicker.impl.d.ts +1 -1
- package/lib/dx/shortcuts/time-picker/register.d.ts +4 -2
- package/lib/dx/shortcuts/time-picker/timePicker.domain.d.ts +1 -3
- package/lib/shared.d.ts +3 -0
- package/lib/widgets.d.ts +1 -1
- package/package.json +7 -3
- package/{register-De8Y1vW5.js → resolveFormInput-CsFeoGjz.js} +1402 -1387
- package/resolveFormInput-UcmQ-kme.cjs +1 -0
- package/lib/dx/core/defineShortcutType.d.ts +0 -39
- package/lib/dx/core/dx.domain.d.ts +0 -79
- package/lib/dx/core/dxBase.types.d.ts +0 -128
- package/lib/dx/core/dxPropsHelper.d.ts +0 -9
- package/lib/dx/core/dxUtilityTypes.d.ts +0 -40
- package/lib/dx/core/dxValidatorHelper.d.ts +0 -31
- package/lib/dx/core/eventWiring.service.d.ts +0 -34
- package/lib/dx/core/itemTypeRegistry.d.ts +0 -94
- package/lib/dx/core/itemWalker.service.d.ts +0 -31
- package/lib/dx/core/selectorNormalizer.service.d.ts +0 -15
- package/lib/dx/core/selectorResolver.service.d.ts +0 -11
- package/lib/dx/core/sharedSensibleDefaults.service.d.ts +0 -35
- package/lib/dx/core/stateExpansion.service.d.ts +0 -31
- package/lib/dx/core/widgetMapper.service.d.ts +0 -13
- package/lib/dx/core/widgetMerger.service.d.ts +0 -14
- package/lib/dx/core/withForm.d.ts +0 -8
- package/lib/dx/dx.service.d.ts +0 -36
- package/lib/dx/registerAll.d.ts +0 -0
- package/lib/dx/shortcuts/scopes/scopeChain.d.ts +0 -132
- package/lib/utils/objectUtils.service.d.ts +0 -11
- package/register-B3CJMfX9.cjs +0 -1
package/internals.js
CHANGED
|
@@ -1,781 +1,186 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "@golemui/core";
|
|
1
|
+
import { _ as c, a as p, b as y, c as m, d as T, e as B, f as D, h as U, i as b, j as I, k as C, l as R, m as k, n as P, o as f, p as x, q as w, r as A, s as h, t as L, u as S, v as F, w as M, x as O, y as j, z as G, A as v, B as z, C as H, D as N, E as V, F as K, G as W, H as q, I as E, J, K as Q, L as X, M as Y, N as Z, O as $, P as aa, Q as sa, R as ea, S as ia, T as ga, U as ta, V as la, W as _a, X as ua, Y as ra, Z as na, $ as oa, a0 as da, a1 as ca, a2 as pa, a3 as ya, a4 as ma, a5 as Ta, a6 as Ba, a7 as Da, a8 as Ua, a9 as ba, aa as Ia, ab as Ca, ac as Ra, ad as ka, ae as Pa, af as fa, ag as xa, ah as wa, ai as Aa, aj as ha, ak as La, al as Sa, am as Fa, an as Ma, ao as Oa, ap as ja, aq as Ga, ar as va, as as za, at as Ha, au as Na, av as Va, aw as Ka, ax as Wa, ay as qa, az as Ea, aA as Ja, aB as Qa, aC as Xa, aD as Ya, aE as Za, aF as $a, aG as as, aH as ss, aI as es, aJ as is, aK as gs, aL as ts, aM as ls, aN as _s, aO as us, aP as rs, aQ as ns, aR as os, aS as ds, aT as cs, aU as ps, aV as ys, aW as ms, aX as Ts, aY as Bs, aZ as Ds, a_ as Us, a$ as bs, b0 as Is, b1 as Cs, b2 as Rs, b3 as ks, b4 as Ps, b5 as fs, b6 as xs, b7 as ws, b8 as As, b9 as hs, ba as Ls, bb as Ss, bc as Fs } from "./resolveFormInput-CsFeoGjz.js";
|
|
2
|
+
import { createGslSelector as Os, extractWidgetProps as js, isDxDefinitions as Gs, processAutoLabel as vs, processAutoPlaceholder as zs } from "@golemui/dx";
|
|
4
3
|
import "@golemui/gui-validators";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import "@golemui/core";
|
|
5
|
+
function l(a, ...s) {
|
|
6
|
+
return s.map((e) => ({
|
|
7
|
+
...e,
|
|
8
|
+
targetState: a
|
|
9
9
|
}));
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function _(a, ...s) {
|
|
12
12
|
return {
|
|
13
13
|
kind: "aggregated",
|
|
14
|
-
matcher: (
|
|
15
|
-
children:
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
const U = {
|
|
19
|
-
INPUTS: /* @__PURE__ */ new Set([
|
|
20
|
-
"INPUTS",
|
|
21
|
-
"TEXTAREA",
|
|
22
|
-
"PASSWORD",
|
|
23
|
-
"SELECT",
|
|
24
|
-
"DROPDOWN",
|
|
25
|
-
"RADIOGROUP",
|
|
26
|
-
"CHECKBOX",
|
|
27
|
-
"CALENDAR",
|
|
28
|
-
"DATE_TIME_CALENDAR",
|
|
29
|
-
"DATE_TIME_PICKER",
|
|
30
|
-
"DATE_INPUT",
|
|
31
|
-
"DATE_PICKER",
|
|
32
|
-
"RANGE_CALENDAR",
|
|
33
|
-
"RANGE_DATE_INPUT",
|
|
34
|
-
"RANGE_DATE_TIME_INPUT",
|
|
35
|
-
"RANGE_DATE_TIME_CALENDAR",
|
|
36
|
-
"RANGE_DATE_TIME_PICKER",
|
|
37
|
-
"RANGE_TIME_INPUT",
|
|
38
|
-
"RANGE_DATE_PICKER",
|
|
39
|
-
"RANGE_TIME_PICKER",
|
|
40
|
-
"TIME_INPUT",
|
|
41
|
-
"TIME_PICKER",
|
|
42
|
-
"DATE_TIME_INPUT",
|
|
43
|
-
"CURRENCY",
|
|
44
|
-
"MARKDOWN",
|
|
45
|
-
"LIST",
|
|
46
|
-
"CUSTOM_INPUT",
|
|
47
|
-
"REPEATER",
|
|
48
|
-
"TAGS"
|
|
49
|
-
]),
|
|
50
|
-
ACTIONS: /* @__PURE__ */ new Set(["ACTIONS", "CUSTOM_ACTION"]),
|
|
51
|
-
DISPLAYS: /* @__PURE__ */ new Set(["DISPLAYS", "ALERTS", "MARKDOWN_TEXTS", "CUSTOM_DISPLAY"]),
|
|
52
|
-
LAYOUTS: /* @__PURE__ */ new Set(["LAYOUTS", "TABS", "ACCORDION", "CUSTOM_LAYOUT"])
|
|
53
|
-
};
|
|
54
|
-
function L(r, e) {
|
|
55
|
-
const t = U[r];
|
|
56
|
-
return t ? t.has(e) : r === e;
|
|
57
|
-
}
|
|
58
|
-
class F {
|
|
59
|
-
resolve(e, t) {
|
|
60
|
-
const a = [];
|
|
61
|
-
for (const n of t)
|
|
62
|
-
n.kind === "aggregated" ? this.collectFromAggregated(n, e, a) : this.collectFromLeaf(n, e, a);
|
|
63
|
-
const s = this.rollUpSensibleDefaults(a);
|
|
64
|
-
return {
|
|
65
|
-
leafSelectors: a,
|
|
66
|
-
sensibleDefaults: s
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
collectFromAggregated(e, t, a) {
|
|
70
|
-
if (e.matcher(t))
|
|
71
|
-
for (const s of e.children)
|
|
72
|
-
this.collectFromLeaf(s, t, a);
|
|
73
|
-
}
|
|
74
|
-
collectFromLeaf(e, t, a) {
|
|
75
|
-
L(e.selectorType, t.itemType ?? "") && e.matcher(t) && a.push(e);
|
|
76
|
-
}
|
|
77
|
-
rollUpSensibleDefaults(e) {
|
|
78
|
-
const t = /* @__PURE__ */ new Map(), a = (n, i) => {
|
|
79
|
-
const o = t.get(n) ?? [];
|
|
80
|
-
o.push(i), t.set(n, o);
|
|
81
|
-
};
|
|
82
|
-
for (const n of e) {
|
|
83
|
-
const i = U[n.selectorType];
|
|
84
|
-
if (i)
|
|
85
|
-
for (const o of i) a(o, n);
|
|
86
|
-
else
|
|
87
|
-
a(n.selectorType, n);
|
|
88
|
-
}
|
|
89
|
-
const s = {};
|
|
90
|
-
for (const [n, i] of t)
|
|
91
|
-
A(n) && (s[n] = m(n).rollUpSensibleDefaults(i));
|
|
92
|
-
return s;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
const W = new F();
|
|
96
|
-
class z {
|
|
97
|
-
/**
|
|
98
|
-
* Deep merges two objects, with right taking precedence over left when properties conflict.
|
|
99
|
-
* Arrays are replaced, not merged.
|
|
100
|
-
* @param left - The base object
|
|
101
|
-
* @param right - The object whose properties take precedence
|
|
102
|
-
* @returns A new merged object
|
|
103
|
-
*/
|
|
104
|
-
deepMerge(e, t) {
|
|
105
|
-
if (t == null)
|
|
106
|
-
return e;
|
|
107
|
-
if (e == null || typeof e != "object" || typeof t != "object" || Array.isArray(e) || Array.isArray(t))
|
|
108
|
-
return t;
|
|
109
|
-
const a = { ...e };
|
|
110
|
-
for (const s in t)
|
|
111
|
-
Object.prototype.hasOwnProperty.call(t, s) && (typeof t[s] == "object" && !Array.isArray(t[s]) && t[s] !== null && typeof e[s] == "object" && !Array.isArray(e[s]) && e[s] !== null ? a[s] = this.deepMerge(e[s], t[s]) : a[s] = t[s]);
|
|
112
|
-
return a;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
const G = new z();
|
|
116
|
-
class K {
|
|
117
|
-
constructor(e) {
|
|
118
|
-
this.objectUtils = e;
|
|
119
|
-
}
|
|
120
|
-
merge(e, t, a) {
|
|
121
|
-
let s = {}, n = null;
|
|
122
|
-
typeof e == "function" && (n = e);
|
|
123
|
-
const i = this.collectDecorators(a);
|
|
124
|
-
for (const l of i) {
|
|
125
|
-
if (n != null) {
|
|
126
|
-
n = this.composeRuntimeFunctions(n, l);
|
|
127
|
-
continue;
|
|
128
|
-
}
|
|
129
|
-
if (typeof l == "function") {
|
|
130
|
-
const u = l({
|
|
131
|
-
...s,
|
|
132
|
-
...typeof e == "function" ? {} : e
|
|
133
|
-
});
|
|
134
|
-
if (typeof u == "function") {
|
|
135
|
-
n = this.createPromotedFunction(
|
|
136
|
-
s,
|
|
137
|
-
e,
|
|
138
|
-
u,
|
|
139
|
-
t,
|
|
140
|
-
a
|
|
141
|
-
);
|
|
142
|
-
continue;
|
|
143
|
-
}
|
|
144
|
-
s = this.objectUtils.deepMerge(s, u);
|
|
145
|
-
} else
|
|
146
|
-
s = this.objectUtils.deepMerge(s, l);
|
|
147
|
-
}
|
|
148
|
-
if (n != null)
|
|
149
|
-
return {
|
|
150
|
-
kind: "dynamic",
|
|
151
|
-
fn: this.wrapWithSensibleDefaults(n, s, t, a)
|
|
152
|
-
};
|
|
153
|
-
const o = this.objectUtils.deepMerge(e, s);
|
|
154
|
-
return { kind: "static", def: this.applySensibleDefaults({ ...o }, t, a) };
|
|
155
|
-
}
|
|
156
|
-
// ── Collect all decorators in priority order ──
|
|
157
|
-
collectDecorators(e) {
|
|
158
|
-
const t = [];
|
|
159
|
-
for (const a of e.leafSelectors) {
|
|
160
|
-
const s = a.config;
|
|
161
|
-
s.override != null && t.push(s.override);
|
|
162
|
-
}
|
|
163
|
-
return t;
|
|
164
|
-
}
|
|
165
|
-
// ── Apply sensible defaults via registry ──
|
|
166
|
-
applySensibleDefaults(e, t, a) {
|
|
167
|
-
if (!A(t)) return e;
|
|
168
|
-
const s = a.sensibleDefaults[t] ?? {};
|
|
169
|
-
return m(t).applySensibleDefaults(e, s);
|
|
170
|
-
}
|
|
171
|
-
// ── Create promoted FunctionWidget ──
|
|
172
|
-
createPromotedFunction(e, t, a, s, n) {
|
|
173
|
-
return (i) => {
|
|
174
|
-
const o = a(i);
|
|
175
|
-
let c = this.objectUtils.deepMerge(e, o);
|
|
176
|
-
return c = this.objectUtils.deepMerge(c, t), this.applySensibleDefaults(c, s, n);
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
// ── Wrap runtime function with accumulated static decorators and sensible defaults ──
|
|
180
|
-
wrapWithSensibleDefaults(e, t, a, s) {
|
|
181
|
-
return (n) => {
|
|
182
|
-
let i = e(n);
|
|
183
|
-
return Object.keys(t).length > 0 && (i = this.objectUtils.deepMerge(t, i)), this.applySensibleDefaults(i, a, s);
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
// ── Compose two runtime functions ──
|
|
187
|
-
composeRuntimeFunctions(e, t) {
|
|
188
|
-
return typeof t == "function" ? (a) => {
|
|
189
|
-
const s = e(a), n = t(s);
|
|
190
|
-
return typeof n == "function" ? n(a) : this.objectUtils.deepMerge(n, s);
|
|
191
|
-
} : (a) => {
|
|
192
|
-
const s = e(a);
|
|
193
|
-
return this.objectUtils.deepMerge(s, t);
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
const $ = new K(G);
|
|
198
|
-
class Y {
|
|
199
|
-
mapToWidget(e, t) {
|
|
200
|
-
if (e.kind === "dynamic") {
|
|
201
|
-
const a = e.fn;
|
|
202
|
-
return ((s) => {
|
|
203
|
-
const n = a(s);
|
|
204
|
-
return this.mapStaticDef(n, t);
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
return this.mapStaticDef(e.def, t);
|
|
208
|
-
}
|
|
209
|
-
mapStaticDef(e, t) {
|
|
210
|
-
const a = m(t).mapToWidget(e);
|
|
211
|
-
return this.applyBaseWidgetFields(a, e);
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Injects BaseWidget-level fields that all widget types share.
|
|
215
|
-
* Centralized here so individual mappers don't need to repeat the pattern.
|
|
216
|
-
*/
|
|
217
|
-
applyBaseWidgetFields(e, t) {
|
|
218
|
-
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;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
const V = new Y();
|
|
222
|
-
class H {
|
|
223
|
-
/**
|
|
224
|
-
* Ensures the output is always a uniform GslSelector[] of aggregated selectors.
|
|
225
|
-
*
|
|
226
|
-
* Callers can pass flat leaf selectors (single styling rules) or pre-grouped
|
|
227
|
-
* aggregated selectors. This method separates them into two buckets, then wraps
|
|
228
|
-
* any bare leaves into a catch-all aggregated selector so downstream code only
|
|
229
|
-
* deals with one shape.
|
|
230
|
-
*/
|
|
231
|
-
normalizeSelectors(e) {
|
|
232
|
-
const t = Array.isArray(e) ? e : [e], a = [], s = [];
|
|
233
|
-
for (const n of t)
|
|
234
|
-
n.kind === "leaf" ? s.push(n) : a.push(n);
|
|
235
|
-
return s.length > 0 && a.unshift({
|
|
236
|
-
kind: "aggregated",
|
|
237
|
-
matcher: () => !0,
|
|
238
|
-
children: s
|
|
239
|
-
}), a;
|
|
240
|
-
}
|
|
241
|
-
extractFormConfig() {
|
|
242
|
-
return {
|
|
243
|
-
suppressAutomaticStack: !1
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
const X = new H(), q = {
|
|
248
|
-
input: /* @__PURE__ */ new Set(["disabled", "readonly", "label", "validator", "size"]),
|
|
249
|
-
action: /* @__PURE__ */ new Set(["disabled", "label", "size"]),
|
|
250
|
-
layout: /* @__PURE__ */ new Set(["size"]),
|
|
251
|
-
display: /* @__PURE__ */ new Set([])
|
|
252
|
-
}, S = {
|
|
253
|
-
onChange: "change",
|
|
254
|
-
onLoad: "load",
|
|
255
|
-
onFilter: "filter",
|
|
256
|
-
onClick: "click"
|
|
257
|
-
};
|
|
258
|
-
class J {
|
|
259
|
-
/**
|
|
260
|
-
* Extracts `states` from a merge result, combining with state-targeted
|
|
261
|
-
* GSL leaf selectors from `_gslStates`.
|
|
262
|
-
*
|
|
263
|
-
* Returns a cleaned merge result (no states) and accumulated state data.
|
|
264
|
-
*/
|
|
265
|
-
extractFromMergeResult(e, t) {
|
|
266
|
-
const a = {};
|
|
267
|
-
for (const o of t) {
|
|
268
|
-
const c = o.targetState, l = o.config, u = l.override && typeof l.override != "function" ? l.override : l;
|
|
269
|
-
a[c] = {
|
|
270
|
-
...a[c] || {},
|
|
271
|
-
...u
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
if (e.kind === "dynamic") {
|
|
275
|
-
const o = e.fn;
|
|
276
|
-
return {
|
|
277
|
-
cleanedResult: { kind: "dynamic", fn: (l) => {
|
|
278
|
-
const u = o(l), { states: p, ...g } = u;
|
|
279
|
-
return g;
|
|
280
|
-
} },
|
|
281
|
-
stateData: { stateOverrides: a }
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
const { states: s, ...n } = e.def, i = {};
|
|
285
|
-
for (const [o, c] of Object.entries(a))
|
|
286
|
-
i[o] = { ...c };
|
|
287
|
-
if (s)
|
|
288
|
-
for (const [o, c] of Object.entries(
|
|
289
|
-
s
|
|
290
|
-
))
|
|
291
|
-
i[o] = { ...i[o] || {}, ...c };
|
|
292
|
-
return {
|
|
293
|
-
cleanedResult: { kind: "static", def: n },
|
|
294
|
-
stateData: { stateOverrides: i }
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
/**
|
|
298
|
-
* Applies state overrides to a core widget. Each override produces:
|
|
299
|
-
* - `visible: true/false` → `include: { in }` / `exclude: { from }`
|
|
300
|
-
* - Core suffixable props → `'prop.stateName': value` at widget root
|
|
301
|
-
* - Event handlers → `on: { 'eventType.stateName': eventId }` with registry wiring
|
|
302
|
-
* - Custom props → `props: { 'prop.stateName': value }`
|
|
303
|
-
*/
|
|
304
|
-
applyToWidget(e, t, a, s) {
|
|
305
|
-
const { stateOverrides: n } = t;
|
|
306
|
-
if (Object.keys(n).length === 0)
|
|
307
|
-
return e;
|
|
308
|
-
const i = { ...e }, o = e.kind, c = q[o] || /* @__PURE__ */ new Set();
|
|
309
|
-
e.props && (i.props = { ...e.props }), e.on && (i.on = { ...e.on });
|
|
310
|
-
for (const [l, u] of Object.entries(n))
|
|
311
|
-
for (const [p, g] of Object.entries(u))
|
|
312
|
-
p === "visible" ? this.applyVisibility(i, l, g) : S[p] ? this.applyStateEvent(i, l, p, g, a, s) : c.has(p) ? i[`${p}.${l}`] = g : (i.props || (i.props = {}), i.props[`${p}.${l}`] = g);
|
|
313
|
-
return i;
|
|
314
|
-
}
|
|
315
|
-
hasStateData(e) {
|
|
316
|
-
return Object.keys(e.stateOverrides).length > 0;
|
|
317
|
-
}
|
|
318
|
-
// ── Visibility helpers ──
|
|
319
|
-
applyVisibility(e, t, a) {
|
|
320
|
-
if (a) {
|
|
321
|
-
const s = e.include?.in || [];
|
|
322
|
-
e.include = { ...e.include || {}, in: [...s, t] };
|
|
323
|
-
} else {
|
|
324
|
-
const s = e.exclude?.from || [];
|
|
325
|
-
e.exclude = { ...e.exclude || {}, from: [...s, t] };
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
// ── State-suffixed event helpers ──
|
|
329
|
-
applyStateEvent(e, t, a, s, n, i) {
|
|
330
|
-
const o = S[a];
|
|
331
|
-
if (e.on || (e.on = {}), typeof s == "function") {
|
|
332
|
-
const c = v(s);
|
|
333
|
-
if (c != null)
|
|
334
|
-
e.on[`${o}.${t}`] = c;
|
|
335
|
-
else {
|
|
336
|
-
const l = i.next();
|
|
337
|
-
n.set(l, s), e.on[`${o}.${t}`] = l;
|
|
338
|
-
}
|
|
339
|
-
} else typeof s == "string" && (e.on[`${o}.${t}`] = s);
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
const Q = new J();
|
|
343
|
-
function Z() {
|
|
344
|
-
let r = 0;
|
|
345
|
-
return { next: () => `event_${r++}` };
|
|
346
|
-
}
|
|
347
|
-
class ee {
|
|
348
|
-
constructor(e, t, a, s, n) {
|
|
349
|
-
this.resolver = e, this.merger = t, this.mapper = a, this.eventWiring = s, this.stateExpansion = n;
|
|
350
|
-
}
|
|
351
|
-
walkAndMap(e, t, a) {
|
|
352
|
-
const s = /* @__PURE__ */ new Map(), n = Z(), i = { value: 0 }, o = /* @__PURE__ */ new Set();
|
|
353
|
-
return { widgets: this.walkItems(
|
|
354
|
-
e,
|
|
355
|
-
t,
|
|
356
|
-
s,
|
|
357
|
-
a,
|
|
358
|
-
n,
|
|
359
|
-
i,
|
|
360
|
-
o
|
|
361
|
-
), eventRegistry: s };
|
|
362
|
-
}
|
|
363
|
-
walkItems(e, t, a, s, n, i, o) {
|
|
364
|
-
return e.flatMap((c) => {
|
|
365
|
-
if (c.type !== "ITEMS")
|
|
366
|
-
throw new Error("Unexpected gui shortcut type");
|
|
367
|
-
return c.items.map((l) => this.processItem(
|
|
368
|
-
l,
|
|
369
|
-
c.itemType,
|
|
370
|
-
c.tags,
|
|
371
|
-
t,
|
|
372
|
-
a,
|
|
373
|
-
s,
|
|
374
|
-
n,
|
|
375
|
-
i,
|
|
376
|
-
o
|
|
377
|
-
));
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
processItem(e, t, a, s, n, i, o, c, l) {
|
|
381
|
-
const u = t, p = m(t), g = p.parseEntry(e), y = this.buildBaseDef(g), C = this.buildDecoratorForMatching(y, u, a), T = this.resolver.resolve(C, s), O = T.leafSelectors.filter((d) => d.targetState != null), M = {
|
|
382
|
-
leafSelectors: T.leafSelectors.filter((d) => d.targetState == null),
|
|
383
|
-
sensibleDefaults: T.sensibleDefaults
|
|
384
|
-
};
|
|
385
|
-
let _ = this.merger.merge(y, u, M);
|
|
386
|
-
p.afterMerge && (_ = p.afterMerge(_, {
|
|
387
|
-
eventRegistry: n,
|
|
388
|
-
formConfig: i,
|
|
389
|
-
eventIdGenerator: o
|
|
390
|
-
})), _ = this.eventWiring.wireInputLayoutEvents(
|
|
391
|
-
_,
|
|
392
|
-
n,
|
|
393
|
-
o
|
|
394
|
-
);
|
|
395
|
-
const { cleanedResult: D, stateData: h } = this.stateExpansion.extractFromMergeResult(
|
|
396
|
-
_,
|
|
397
|
-
O
|
|
398
|
-
);
|
|
399
|
-
let f;
|
|
400
|
-
if (p.buildCustomWidget) {
|
|
401
|
-
const d = this.buildCustomWidgetContext(
|
|
402
|
-
g.children,
|
|
403
|
-
s,
|
|
404
|
-
n,
|
|
405
|
-
i,
|
|
406
|
-
o,
|
|
407
|
-
c,
|
|
408
|
-
l
|
|
409
|
-
);
|
|
410
|
-
f = this.buildCustomWidget(p, D, d);
|
|
411
|
-
} else
|
|
412
|
-
f = this.mapper.mapToWidget(D, u);
|
|
413
|
-
if (typeof f != "function") {
|
|
414
|
-
const d = f;
|
|
415
|
-
d.uid || (d.path && !l.has(d.path) ? (d.uid = d.path, l.add(d.path)) : d.uid = `dx_${c.value++}`);
|
|
416
|
-
}
|
|
417
|
-
if (this.stateExpansion.hasStateData(h))
|
|
418
|
-
if (typeof f == "function") {
|
|
419
|
-
const d = f;
|
|
420
|
-
f = ((P) => {
|
|
421
|
-
const w = d(P);
|
|
422
|
-
return this.stateExpansion.applyToWidget(
|
|
423
|
-
w,
|
|
424
|
-
h,
|
|
425
|
-
n,
|
|
426
|
-
o
|
|
427
|
-
);
|
|
428
|
-
});
|
|
429
|
-
} else
|
|
430
|
-
f = this.stateExpansion.applyToWidget(
|
|
431
|
-
f,
|
|
432
|
-
h,
|
|
433
|
-
n,
|
|
434
|
-
o
|
|
435
|
-
);
|
|
436
|
-
return f;
|
|
437
|
-
}
|
|
438
|
-
buildCustomWidgetContext(e, t, a, s, n, i, o) {
|
|
439
|
-
return {
|
|
440
|
-
children: e,
|
|
441
|
-
mapStaticDef: (c, l) => this.mapper.mapStaticDef(c, l),
|
|
442
|
-
walkChildren: (c) => this.walkItems(
|
|
443
|
-
c,
|
|
444
|
-
t,
|
|
445
|
-
a,
|
|
446
|
-
s,
|
|
447
|
-
n,
|
|
448
|
-
i,
|
|
449
|
-
o
|
|
450
|
-
)
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
buildCustomWidget(e, t, a) {
|
|
454
|
-
return e.buildCustomWidget(t, a);
|
|
455
|
-
}
|
|
456
|
-
/**
|
|
457
|
-
* Resolves the base definition from a parsed entry, injecting the path for keyed entries.
|
|
458
|
-
* For runtime (function) providers, wraps them to inject the path at evaluation time.
|
|
459
|
-
*/
|
|
460
|
-
buildBaseDef(e) {
|
|
461
|
-
const t = e.baseDef;
|
|
462
|
-
return typeof t == "function" ? (a) => {
|
|
463
|
-
const s = x(a), n = t(s);
|
|
464
|
-
return e.path != null ? { ...n, path: e.path } : n;
|
|
465
|
-
} : e.path != null ? { ...t, path: e.path } : t;
|
|
466
|
-
}
|
|
467
|
-
buildDecoratorForMatching(e, t, a) {
|
|
468
|
-
if (typeof e == "function")
|
|
469
|
-
return { itemType: t, tags: [...a] };
|
|
470
|
-
const s = [...a, ..."tags" in e && e.tags ? e.tags : []], n = "uid" in e ? e.uid : void 0, i = "type" in e ? e.type : void 0;
|
|
471
|
-
return { itemType: t, tags: s, uid: n, type: i };
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
class te {
|
|
475
|
-
constructor(e, t) {
|
|
476
|
-
this.selectorNormalizer = e, this.walker = t;
|
|
477
|
-
}
|
|
478
|
-
processDxFacade(e, t = [], a) {
|
|
479
|
-
const { defs: s, gslSelectors: n, formConfig: i } = this.prepareForm(
|
|
480
|
-
e,
|
|
481
|
-
t,
|
|
482
|
-
a
|
|
483
|
-
), { widgets: o, eventRegistry: c } = this.walker.walkAndMap(
|
|
484
|
-
s,
|
|
485
|
-
n,
|
|
486
|
-
i
|
|
487
|
-
), l = o[0];
|
|
488
|
-
return this.buildResult({ form: l }, c, i);
|
|
489
|
-
}
|
|
490
|
-
/**
|
|
491
|
-
* Normalizes raw form definitions and applies form-level defaults.
|
|
492
|
-
*
|
|
493
|
-
* Steps:
|
|
494
|
-
* 1. Normalize definitions — ensure a flat array; convert bare functions to display widgets.
|
|
495
|
-
* 2. Normalize selectors — convert mixed leaf/aggregated selectors into a uniform
|
|
496
|
-
* aggregated shape, and extract form-level config (see {@link FormConfig}).
|
|
497
|
-
* 3. Auto-stack — unless suppressed, wrap all definitions in a synthetic root
|
|
498
|
-
* flex column layout so the form renders as a single vertical container.
|
|
499
|
-
*/
|
|
500
|
-
prepareForm(e, t, a) {
|
|
501
|
-
const n = (Array.isArray(e) ? [...e] : [e]).map(
|
|
502
|
-
(c) => typeof c == "function" ? B(c) : c
|
|
503
|
-
), i = this.selectorNormalizer.normalizeSelectors(t), o = {
|
|
504
|
-
...this.selectorNormalizer.extractFormConfig(),
|
|
505
|
-
...a
|
|
506
|
-
};
|
|
507
|
-
if (!o.suppressAutomaticStack) {
|
|
508
|
-
const c = {
|
|
509
|
-
def: { uid: "#root", direction: "column", widgetName: "flex" },
|
|
510
|
-
children: n
|
|
511
|
-
};
|
|
512
|
-
return {
|
|
513
|
-
defs: [{ type: "ITEMS", itemType: N.LAYOUTS, items: [c], tags: [] }],
|
|
514
|
-
gslSelectors: i,
|
|
515
|
-
formConfig: o
|
|
516
|
-
};
|
|
517
|
-
}
|
|
518
|
-
return { defs: n, gslSelectors: i, formConfig: o };
|
|
519
|
-
}
|
|
520
|
-
/**
|
|
521
|
-
* Converts DX `$`-separated state names to core's `:`-separated names.
|
|
522
|
-
* E.g. `{ register$adult: 'expr' }` → `{ 'register:adult': 'expr' }`.
|
|
523
|
-
*/
|
|
524
|
-
convertStateNames(e) {
|
|
525
|
-
const t = {};
|
|
526
|
-
for (const [a, s] of Object.entries(e))
|
|
527
|
-
t[a.replace(/\$/g, ":")] = s;
|
|
528
|
-
return t;
|
|
529
|
-
}
|
|
530
|
-
buildResult(e, t, a) {
|
|
531
|
-
a.states && Object.keys(a.states).length > 0 && (e = {
|
|
532
|
-
...e,
|
|
533
|
-
states: this.convertStateNames(a.states)
|
|
534
|
-
});
|
|
535
|
-
const s = { form: e };
|
|
536
|
-
return t.size > 0 && (s.events = (n) => {
|
|
537
|
-
const i = t.get(n.name);
|
|
538
|
-
if (i) {
|
|
539
|
-
const o = (l) => {
|
|
540
|
-
if (l && typeof l == "object" && "path" in l && !("type" in l)) {
|
|
541
|
-
const { path: u, ...p } = l;
|
|
542
|
-
for (const [g, y] of Object.entries(p))
|
|
543
|
-
n.callback({
|
|
544
|
-
type: "OVERRIDE_WIDGET_PROP",
|
|
545
|
-
payload: { path: u, prop: g, value: y }
|
|
546
|
-
});
|
|
547
|
-
} else
|
|
548
|
-
n.callback(l);
|
|
549
|
-
}, c = {
|
|
550
|
-
...n,
|
|
551
|
-
callback: o,
|
|
552
|
-
update: o
|
|
553
|
-
};
|
|
554
|
-
i(c);
|
|
555
|
-
}
|
|
556
|
-
}), a.dependencies && (s.dependencies = a.dependencies), a.functions && (s.functions = a.functions), a.widgetLoaders && (s.widgetLoaders = a.widgetLoaders), a.validateOn && (s.validateOn = a.validateOn), a.itemRenderers && (s.itemRenderers = a.itemRenderers), s;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
const se = new ee(
|
|
560
|
-
W,
|
|
561
|
-
$,
|
|
562
|
-
V,
|
|
563
|
-
j,
|
|
564
|
-
Q
|
|
565
|
-
), ae = new te(X, se);
|
|
566
|
-
function k(r) {
|
|
567
|
-
return typeof r == "function" ? !0 : Array.isArray(r) ? r.length === 0 || r.every(I) : I(r);
|
|
568
|
-
}
|
|
569
|
-
function I(r) {
|
|
570
|
-
if (typeof r == "function") return !0;
|
|
571
|
-
if (r === null || typeof r != "object") return !1;
|
|
572
|
-
const e = r;
|
|
573
|
-
return e.type === "ITEMS" && typeof e.itemType == "string";
|
|
574
|
-
}
|
|
575
|
-
function ne(r) {
|
|
576
|
-
if (!r || typeof r != "object" || Array.isArray(r))
|
|
577
|
-
return;
|
|
578
|
-
const e = r.form;
|
|
579
|
-
if (k(e))
|
|
580
|
-
throw new Error(
|
|
581
|
-
"[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."
|
|
582
|
-
);
|
|
583
|
-
}
|
|
584
|
-
const E = Object.freeze({}), ie = Object.freeze({}), R = /* @__PURE__ */ new WeakMap();
|
|
585
|
-
function b(r, e) {
|
|
586
|
-
return r == null ? e : typeof r == "object" ? r : {};
|
|
587
|
-
}
|
|
588
|
-
function de(r, e, t) {
|
|
589
|
-
if (!k(r))
|
|
590
|
-
return ne(r), { formDef: r };
|
|
591
|
-
const a = b(r, E), s = b(e, E), n = b(t, ie);
|
|
592
|
-
let i = R.get(a);
|
|
593
|
-
i || (i = /* @__PURE__ */ new WeakMap(), R.set(a, i));
|
|
594
|
-
let o = i.get(s);
|
|
595
|
-
o || (o = /* @__PURE__ */ new WeakMap(), i.set(s, o));
|
|
596
|
-
const c = o.get(n);
|
|
597
|
-
if (c) return c;
|
|
598
|
-
const l = ae.processDxFacade(
|
|
599
|
-
r,
|
|
600
|
-
e,
|
|
601
|
-
t
|
|
602
|
-
), u = {
|
|
603
|
-
formDef: l.form,
|
|
604
|
-
formEvent: l.events,
|
|
605
|
-
dependencies: l.dependencies,
|
|
606
|
-
functions: l.functions,
|
|
607
|
-
widgetLoaders: l.widgetLoaders,
|
|
608
|
-
validateOn: l.validateOn,
|
|
609
|
-
itemRenderers: l.itemRenderers
|
|
14
|
+
matcher: (e) => e.tags?.includes(a) ?? !1,
|
|
15
|
+
children: s
|
|
610
16
|
};
|
|
611
|
-
return o.set(n, u), u;
|
|
612
17
|
}
|
|
613
|
-
class
|
|
614
|
-
create(
|
|
18
|
+
class i {
|
|
19
|
+
create(s) {
|
|
615
20
|
return {
|
|
616
|
-
states:
|
|
21
|
+
states: s.states,
|
|
617
22
|
form: {
|
|
618
23
|
uid: "gui-root-uid",
|
|
619
24
|
type: "flex",
|
|
620
25
|
kind: "layout",
|
|
621
|
-
children:
|
|
26
|
+
children: s.form
|
|
622
27
|
}
|
|
623
28
|
};
|
|
624
29
|
}
|
|
625
30
|
}
|
|
626
|
-
function
|
|
627
|
-
return new
|
|
31
|
+
function u() {
|
|
32
|
+
return new i();
|
|
628
33
|
}
|
|
629
|
-
const
|
|
630
|
-
function
|
|
631
|
-
if (
|
|
632
|
-
return
|
|
633
|
-
const
|
|
634
|
-
return Object.defineProperty(
|
|
635
|
-
value:
|
|
34
|
+
const r = (a) => a !== null && typeof a == "object" && Object.prototype.hasOwnProperty.call(a, "label") && Object.prototype.hasOwnProperty.call(a, "value");
|
|
35
|
+
function n(a, s) {
|
|
36
|
+
if (a != null && typeof a == "object" && "__rid" in a)
|
|
37
|
+
return a.__rid;
|
|
38
|
+
const e = s();
|
|
39
|
+
return Object.defineProperty(a, "__rid", {
|
|
40
|
+
value: e,
|
|
636
41
|
enumerable: !1,
|
|
637
42
|
configurable: !1
|
|
638
|
-
}),
|
|
43
|
+
}), e;
|
|
639
44
|
}
|
|
640
45
|
export {
|
|
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
|
-
|
|
686
|
-
|
|
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
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
46
|
+
c as _gslAccordionByUid,
|
|
47
|
+
p as _gslAccordions,
|
|
48
|
+
y as _gslActionByUid,
|
|
49
|
+
m as _gslActions,
|
|
50
|
+
T as _gslAlertByUid,
|
|
51
|
+
B as _gslAlerts,
|
|
52
|
+
D as _gslBooleanInputs,
|
|
53
|
+
U as _gslCalendarByUid,
|
|
54
|
+
b as _gslCalendars,
|
|
55
|
+
I as _gslCheckboxByUid,
|
|
56
|
+
C as _gslCheckboxes,
|
|
57
|
+
R as _gslCurrencies,
|
|
58
|
+
k as _gslCurrencyByUid,
|
|
59
|
+
P as _gslCustomActionByUid,
|
|
60
|
+
f as _gslCustomActions,
|
|
61
|
+
x as _gslCustomDisplayByUid,
|
|
62
|
+
w as _gslCustomDisplays,
|
|
63
|
+
A as _gslCustomInputByUid,
|
|
64
|
+
h as _gslCustomInputs,
|
|
65
|
+
L as _gslCustomLayoutByUid,
|
|
66
|
+
S as _gslCustomLayouts,
|
|
67
|
+
F as _gslDateInputByUid,
|
|
68
|
+
M as _gslDateInputs,
|
|
69
|
+
O as _gslDatePickerByUid,
|
|
70
|
+
j as _gslDatePickers,
|
|
71
|
+
G as _gslDateTimeCalendarByUid,
|
|
72
|
+
v as _gslDateTimeCalendars,
|
|
73
|
+
z as _gslDateTimeInputByUid,
|
|
74
|
+
H as _gslDateTimeInputs,
|
|
75
|
+
N as _gslDateTimePickerByUid,
|
|
76
|
+
V as _gslDateTimePickers,
|
|
77
|
+
K as _gslDisplayByUid,
|
|
78
|
+
W as _gslDisplays,
|
|
79
|
+
q as _gslDropdownByUid,
|
|
80
|
+
E as _gslDropdowns,
|
|
81
|
+
J as _gslInputByUid,
|
|
82
|
+
Q as _gslInputs,
|
|
83
|
+
X as _gslLayoutByUid,
|
|
84
|
+
Y as _gslLayouts,
|
|
85
|
+
Z as _gslListByUid,
|
|
86
|
+
$ as _gslLists,
|
|
87
|
+
aa as _gslMarkdownByUid,
|
|
88
|
+
sa as _gslMarkdownTextByUid,
|
|
89
|
+
ea as _gslMarkdownTexts,
|
|
90
|
+
ia as _gslMarkdowns,
|
|
91
|
+
ga as _gslNumberInputs,
|
|
92
|
+
ta as _gslPasswordByUid,
|
|
93
|
+
la as _gslPasswords,
|
|
94
|
+
_a as _gslRadiogroupByUid,
|
|
95
|
+
ua as _gslRadiogroups,
|
|
96
|
+
ra as _gslRangeCalendarByUid,
|
|
97
|
+
na as _gslRangeCalendars,
|
|
98
|
+
oa as _gslRangeDateInputByUid,
|
|
99
|
+
da as _gslRangeDateInputs,
|
|
100
|
+
ca as _gslRangeDatePickerByUid,
|
|
101
|
+
pa as _gslRangeDatePickers,
|
|
102
|
+
ya as _gslRangeDateTimeCalendarByUid,
|
|
103
|
+
ma as _gslRangeDateTimeCalendars,
|
|
104
|
+
Ta as _gslRangeDateTimeInputByUid,
|
|
105
|
+
Ba as _gslRangeDateTimeInputs,
|
|
106
|
+
Da as _gslRangeDateTimePickerByUid,
|
|
107
|
+
Ua as _gslRangeDateTimePickers,
|
|
108
|
+
ba as _gslRangeTimeInputByUid,
|
|
109
|
+
Ia as _gslRangeTimeInputs,
|
|
110
|
+
Ca as _gslRangeTimePickerByUid,
|
|
111
|
+
Ra as _gslRangeTimePickers,
|
|
112
|
+
ka as _gslRepeaterByUid,
|
|
113
|
+
Pa as _gslRepeaters,
|
|
114
|
+
fa as _gslSelectByUid,
|
|
115
|
+
xa as _gslSelects,
|
|
116
|
+
l as _gslStates,
|
|
117
|
+
wa as _gslTabs,
|
|
118
|
+
Aa as _gslTabsByUid,
|
|
119
|
+
_ as _gslTag,
|
|
120
|
+
ha as _gslTags,
|
|
121
|
+
La as _gslTagsByUid,
|
|
122
|
+
Sa as _gslTextInputs,
|
|
123
|
+
Fa as _gslTextareaByUid,
|
|
124
|
+
Ma as _gslTextareas,
|
|
125
|
+
Oa as _gslTimeInputByUid,
|
|
126
|
+
ja as _gslTimeInputs,
|
|
127
|
+
Ga as _gslTimePickerByUid,
|
|
128
|
+
va as _gslTimePickers,
|
|
129
|
+
za as _guiAccordion,
|
|
130
|
+
Ha as _guiAlert,
|
|
131
|
+
Na as _guiBooleanInput,
|
|
132
|
+
Va as _guiButton,
|
|
133
|
+
Ka as _guiCalendar,
|
|
134
|
+
Wa as _guiCheckbox,
|
|
135
|
+
qa as _guiCurrency,
|
|
136
|
+
Ea as _guiCustomAction,
|
|
137
|
+
Ja as _guiCustomDisplay,
|
|
138
|
+
Qa as _guiCustomInput,
|
|
139
|
+
Xa as _guiCustomLayout,
|
|
140
|
+
Ya as _guiDateInput,
|
|
141
|
+
Za as _guiDatePicker,
|
|
142
|
+
$a as _guiDateTimeCalendar,
|
|
143
|
+
as as _guiDateTimeInput,
|
|
144
|
+
ss as _guiDateTimePicker,
|
|
145
|
+
es as _guiDisplay,
|
|
146
|
+
is as _guiDropdown,
|
|
147
|
+
gs as _guiFlex,
|
|
148
|
+
ts as _guiGrid,
|
|
149
|
+
ls as _guiHorizontalFlex,
|
|
150
|
+
_s as _guiHorizontalGrid,
|
|
151
|
+
us as _guiList,
|
|
152
|
+
rs as _guiMarkdown,
|
|
153
|
+
ns as _guiMarkdownText,
|
|
154
|
+
os as _guiNumberInput,
|
|
155
|
+
ds as _guiPassword,
|
|
156
|
+
cs as _guiRadiogroup,
|
|
157
|
+
ps as _guiRangeCalendar,
|
|
158
|
+
ys as _guiRangeDateInput,
|
|
159
|
+
ms as _guiRangeDatePicker,
|
|
160
|
+
Ts as _guiRangeDateTimeCalendar,
|
|
161
|
+
Bs as _guiRangeDateTimeInput,
|
|
162
|
+
Ds as _guiRangeDateTimePicker,
|
|
163
|
+
Us as _guiRangeTimeInput,
|
|
164
|
+
bs as _guiRangeTimePicker,
|
|
165
|
+
Is as _guiRepeater,
|
|
166
|
+
Cs as _guiSelect,
|
|
167
|
+
Rs as _guiTabs,
|
|
168
|
+
ks as _guiTags,
|
|
169
|
+
Ps as _guiTextInput,
|
|
170
|
+
fs as _guiTextarea,
|
|
171
|
+
xs as _guiTimeInput,
|
|
767
172
|
ws as _guiTimePicker,
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
173
|
+
As as _guiVerticalFlex,
|
|
174
|
+
hs as _guiVerticalGrid,
|
|
175
|
+
Os as createGslSelector,
|
|
176
|
+
Ls as defineShortcutType,
|
|
772
177
|
js as extractWidgetProps,
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
178
|
+
Ss as formDefs,
|
|
179
|
+
n as getItemKey,
|
|
180
|
+
u as golemForm,
|
|
181
|
+
Gs as isDxDefinitions,
|
|
182
|
+
r as isOption,
|
|
183
|
+
vs as processAutoLabel,
|
|
184
|
+
zs as processAutoPlaceholder,
|
|
185
|
+
Fs as resolveFormInput
|
|
781
186
|
};
|