@golemui/gui-shared 0.13.1 → 0.13.3
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 +20 -0
- package/index.d.ts +11 -7
- package/index.js +233 -358
- package/index.umd.cjs +1 -1
- package/internals.js +12 -2
- package/internals.umd.cjs +1 -1
- package/lib/dx/__tests__/helpers.d.ts +0 -2
- package/lib/dx/core/dx.domain.d.ts +0 -1
- package/lib/dx/core/eventWiring.service.d.ts +1 -2
- package/lib/dx/dx.service.d.ts +2 -6
- package/lib/widgets.d.ts +1 -1
- package/package.json +5 -3
- package/resolveFormInput-B3y_InQZ.js +1550 -0
- package/resolveFormInput-CyAWrNF6.cjs +1 -0
- package/lib/utils/index.d.ts +0 -3
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as
|
|
2
|
-
import {
|
|
1
|
+
import { G as y, o as _, _ as p, a as E, b as S, c as U, d as h, e as A, f as M, g as k, h as B, i as D, j as R, k as P, l as w, m as N, n as x, p as b, q as L, r as C, s as G, t as F, u as Y, v as $, w as j, x as K, y as W, z as v, A as z, B as H, C as X, D as V, E as q, F as Q, H as Z, I as J, J as O, K as tt, L as et, M as st, N as nt, O as it, P as rt, Q as ot, R as at, S as ut, T as yt, U as ct, V as dt, W as pt, X as mt, Y as lt, Z as ft, $ as gt, a0 as Tt, a1 as It, a2 as _t } from "./resolveFormInput-B3y_InQZ.js";
|
|
2
|
+
import { a3 as le, a4 as fe, a5 as ge, a6 as Te, a7 as Ie, a8 as _e, a9 as Ee, aa as Se } from "./resolveFormInput-B3y_InQZ.js";
|
|
3
3
|
import "@golemui/core";
|
|
4
4
|
import "@golemui/gui-validators";
|
|
5
5
|
function Et(s, t, e) {
|
|
@@ -8,7 +8,7 @@ function Et(s, t, e) {
|
|
|
8
8
|
return {
|
|
9
9
|
items: [{ key: s, def: (i) => ({ type: "text", ...o(i) }) }],
|
|
10
10
|
type: "ITEMS",
|
|
11
|
-
itemType:
|
|
11
|
+
itemType: y.INPUTS,
|
|
12
12
|
tags: e ?? []
|
|
13
13
|
};
|
|
14
14
|
}
|
|
@@ -16,17 +16,17 @@ function Et(s, t, e) {
|
|
|
16
16
|
return {
|
|
17
17
|
items: [{ key: s, def: n }],
|
|
18
18
|
type: "ITEMS",
|
|
19
|
-
itemType:
|
|
19
|
+
itemType: y.INPUTS,
|
|
20
20
|
tags: e ?? []
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function St(s, t, e) {
|
|
24
24
|
if (typeof t == "function") {
|
|
25
25
|
const o = t;
|
|
26
26
|
return {
|
|
27
27
|
items: [{ key: s, def: (i) => ({ type: "number", ...o(i) }) }],
|
|
28
28
|
type: "ITEMS",
|
|
29
|
-
itemType:
|
|
29
|
+
itemType: y.INPUTS,
|
|
30
30
|
tags: e ?? []
|
|
31
31
|
};
|
|
32
32
|
}
|
|
@@ -34,17 +34,17 @@ function ht(s, t, e) {
|
|
|
34
34
|
return {
|
|
35
35
|
items: [{ key: s, def: n }],
|
|
36
36
|
type: "ITEMS",
|
|
37
|
-
itemType:
|
|
37
|
+
itemType: y.INPUTS,
|
|
38
38
|
tags: e ?? []
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Ut(s, t, e) {
|
|
42
42
|
if (typeof t == "function") {
|
|
43
43
|
const o = t;
|
|
44
44
|
return {
|
|
45
45
|
items: [{ key: s, def: (i) => ({ type: "boolean", ...o(i) }) }],
|
|
46
46
|
type: "ITEMS",
|
|
47
|
-
itemType:
|
|
47
|
+
itemType: y.INPUTS,
|
|
48
48
|
tags: e ?? []
|
|
49
49
|
};
|
|
50
50
|
}
|
|
@@ -52,11 +52,11 @@ function St(s, t, e) {
|
|
|
52
52
|
return {
|
|
53
53
|
items: [{ key: s, def: n }],
|
|
54
54
|
type: "ITEMS",
|
|
55
|
-
itemType:
|
|
55
|
+
itemType: y.INPUTS,
|
|
56
56
|
tags: e ?? []
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function ht(s, t, e) {
|
|
60
60
|
if (typeof t == "function") {
|
|
61
61
|
const r = t;
|
|
62
62
|
return { type: "ITEMS", itemType: "SELECT", items: [{ key: s, def: (a) => ({ type: "select", ...r(a) }) }], tags: e ?? [] };
|
|
@@ -64,7 +64,7 @@ function Ut(s, t, e) {
|
|
|
64
64
|
const n = { type: "select", ...t };
|
|
65
65
|
return { type: "ITEMS", itemType: "SELECT", items: [{ key: s, def: n }], tags: e ?? [] };
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function At(s, t, e) {
|
|
68
68
|
if (typeof t == "function") {
|
|
69
69
|
const r = t;
|
|
70
70
|
return { type: "ITEMS", itemType: "DROPDOWN", items: [{ key: s, def: (a) => ({
|
|
@@ -75,7 +75,7 @@ function kt(s, t, e) {
|
|
|
75
75
|
const n = { type: "dropdown", ...t };
|
|
76
76
|
return { type: "ITEMS", itemType: "DROPDOWN", items: [{ key: s, def: n }], tags: e ?? [] };
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Mt(s, t, e) {
|
|
79
79
|
if (typeof t == "function") {
|
|
80
80
|
const r = t;
|
|
81
81
|
return { type: "ITEMS", itemType: "RADIOGROUP", items: [{ key: s, def: (a) => ({ type: "radiogroup", ...r(a) }) }], tags: e ?? [] };
|
|
@@ -83,7 +83,7 @@ function At(s, t, e) {
|
|
|
83
83
|
const n = { type: "radiogroup", ...t };
|
|
84
84
|
return { type: "ITEMS", itemType: "RADIOGROUP", items: [{ key: s, def: n }], tags: e ?? [] };
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function kt(s, t, e) {
|
|
87
87
|
if (typeof t == "function") {
|
|
88
88
|
const r = t;
|
|
89
89
|
return { type: "ITEMS", itemType: "CHECKBOX", items: [{ key: s, def: (a) => ({ type: "checkbox", ...r(a) }) }], tags: e ?? [] };
|
|
@@ -107,7 +107,7 @@ function Dt(s, t, e) {
|
|
|
107
107
|
const n = { type: "password", ...t };
|
|
108
108
|
return { type: "ITEMS", itemType: "PASSWORD", items: [{ key: s, def: n }], tags: e ?? [] };
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function Rt(s, t, e) {
|
|
111
111
|
if (typeof t == "function") {
|
|
112
112
|
const r = t;
|
|
113
113
|
return { type: "ITEMS", itemType: "CURRENCY", items: [{ key: s, def: (a) => ({ type: "currency", ...r(a) }) }], tags: e ?? [] };
|
|
@@ -115,7 +115,7 @@ function Pt(s, t, e) {
|
|
|
115
115
|
const n = { type: "currency", ...t };
|
|
116
116
|
return { type: "ITEMS", itemType: "CURRENCY", items: [{ key: s, def: n }], tags: e ?? [] };
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function Pt(s, t, e) {
|
|
119
119
|
if (typeof t == "function") {
|
|
120
120
|
const r = t;
|
|
121
121
|
return { type: "ITEMS", itemType: "MARKDOWN", items: [{ key: s, def: (a) => ({ type: "markdown", ...r(a) }) }], tags: e ?? [] };
|
|
@@ -123,7 +123,7 @@ function wt(s, t, e) {
|
|
|
123
123
|
const n = { type: "markdown", ...t };
|
|
124
124
|
return { type: "ITEMS", itemType: "MARKDOWN", items: [{ key: s, def: n }], tags: e ?? [] };
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function wt(s, t, e) {
|
|
127
127
|
if (typeof t == "function") {
|
|
128
128
|
const r = t;
|
|
129
129
|
return { type: "ITEMS", itemType: "LIST", items: [{ key: s, def: (a) => ({ type: "list", ...r(a) }) }], tags: e ?? [] };
|
|
@@ -131,7 +131,7 @@ function Rt(s, t, e) {
|
|
|
131
131
|
const n = { type: "list", ...t };
|
|
132
132
|
return { type: "ITEMS", itemType: "LIST", items: [{ key: s, def: n }], tags: e ?? [] };
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function Nt(s, t, e) {
|
|
135
135
|
if (typeof t == "function") {
|
|
136
136
|
const o = t;
|
|
137
137
|
return {
|
|
@@ -152,7 +152,7 @@ function xt(s, t, e) {
|
|
|
152
152
|
tags: e ?? []
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function xt(s, t, e) {
|
|
156
156
|
if (typeof t == "function") {
|
|
157
157
|
const r = t;
|
|
158
158
|
return { type: "ITEMS", itemType: "DATE_INPUT", items: [{ key: s, def: (a) => ({ type: "dateInput", ...r(a) }) }], tags: e ?? [] };
|
|
@@ -204,7 +204,7 @@ function Gt(s, t, e) {
|
|
|
204
204
|
const n = { type: "rangeDatePicker", ...t };
|
|
205
205
|
return { type: "ITEMS", itemType: "RANGE_DATE_PICKER", items: [{ key: s, def: n }], tags: e ?? [] };
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function Ft(s, t, e, n) {
|
|
208
208
|
if (typeof e == "function") {
|
|
209
209
|
const i = e;
|
|
210
210
|
return { type: "ITEMS", itemType: "CUSTOM_INPUT", items: [{ key: t, def: (d) => ({
|
|
@@ -215,7 +215,22 @@ function Wt(s, t, e, n) {
|
|
|
215
215
|
const o = { customType: s, ...e };
|
|
216
216
|
return { type: "ITEMS", itemType: "CUSTOM_INPUT", items: [{ key: t, def: o }], tags: n ?? [] };
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function I(s, t) {
|
|
219
|
+
return {
|
|
220
|
+
items: [s],
|
|
221
|
+
type: "ITEMS",
|
|
222
|
+
itemType: y.ACTIONS,
|
|
223
|
+
tags: t ?? []
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
const Yt = (s) => {
|
|
227
|
+
const t = {
|
|
228
|
+
uid: "#submit",
|
|
229
|
+
label: "Submit"
|
|
230
|
+
}, e = s != null ? _.deepMerge(t, s) : t;
|
|
231
|
+
return I(e);
|
|
232
|
+
};
|
|
233
|
+
function $t(s, t, e) {
|
|
219
234
|
if (typeof t == "function") {
|
|
220
235
|
const r = t;
|
|
221
236
|
return { type: "ITEMS", itemType: "CUSTOM_ACTION", items: [
|
|
@@ -224,10 +239,10 @@ function Ft(s, t, e) {
|
|
|
224
239
|
}
|
|
225
240
|
return { type: "ITEMS", itemType: "CUSTOM_ACTION", items: [{ customType: s, ...t }], tags: e ?? [] };
|
|
226
241
|
}
|
|
227
|
-
function
|
|
242
|
+
function jt(s, t) {
|
|
228
243
|
return { type: "ITEMS", itemType: "ALERTS", items: [s], tags: t ?? [] };
|
|
229
244
|
}
|
|
230
|
-
function
|
|
245
|
+
function Kt(s, t, e) {
|
|
231
246
|
if (typeof t == "function") {
|
|
232
247
|
const u = t;
|
|
233
248
|
return { type: "ITEMS", itemType: "CUSTOM_DISPLAY", items: [
|
|
@@ -243,12 +258,12 @@ function $t(s, t, e) {
|
|
|
243
258
|
}
|
|
244
259
|
const m = (s, t, e) => ({
|
|
245
260
|
type: "ITEMS",
|
|
246
|
-
itemType:
|
|
261
|
+
itemType: y.LAYOUTS,
|
|
247
262
|
items: [{ def: { widgetName: "flex", ...t ?? {} }, children: s }],
|
|
248
263
|
tags: e ?? []
|
|
249
|
-
}),
|
|
264
|
+
}), Wt = (s, t, e) => m(s, { direction: "row", ...t ?? {} }, e), vt = (s, t, e) => m(s, { direction: "column", ...t ?? {} }, e), l = (s, t, e) => ({
|
|
250
265
|
type: "ITEMS",
|
|
251
|
-
itemType:
|
|
266
|
+
itemType: y.LAYOUTS,
|
|
252
267
|
items: [
|
|
253
268
|
{
|
|
254
269
|
def: {
|
|
@@ -271,7 +286,7 @@ function Xt(s, t, e) {
|
|
|
271
286
|
uid: i.uid ?? g(i.label)
|
|
272
287
|
})), o = s.map((i) => ({
|
|
273
288
|
type: "ITEMS",
|
|
274
|
-
itemType:
|
|
289
|
+
itemType: y.LAYOUTS,
|
|
275
290
|
items: [
|
|
276
291
|
{
|
|
277
292
|
def: { uid: i.uid ?? g(i.label), direction: "column", widgetName: "flex" },
|
|
@@ -293,13 +308,13 @@ function Xt(s, t, e) {
|
|
|
293
308
|
function T(s) {
|
|
294
309
|
return s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
|
|
295
310
|
}
|
|
296
|
-
function
|
|
311
|
+
function Vt(s, t, e) {
|
|
297
312
|
const n = s.map((i) => ({
|
|
298
313
|
label: i.label,
|
|
299
314
|
uid: i.uid ?? T(i.label)
|
|
300
315
|
})), o = s.map((i) => ({
|
|
301
316
|
type: "ITEMS",
|
|
302
|
-
itemType:
|
|
317
|
+
itemType: y.LAYOUTS,
|
|
303
318
|
items: [
|
|
304
319
|
{
|
|
305
320
|
def: { uid: i.uid ?? T(i.label), direction: "column", widgetName: "flex" },
|
|
@@ -318,7 +333,7 @@ function vt(s, t, e) {
|
|
|
318
333
|
tags: e ?? []
|
|
319
334
|
};
|
|
320
335
|
}
|
|
321
|
-
function
|
|
336
|
+
function qt(s, t, e, n) {
|
|
322
337
|
if (typeof e == "function") {
|
|
323
338
|
const i = e;
|
|
324
339
|
return { type: "ITEMS", itemType: "CUSTOM_LAYOUT", items: [{ def: (d) => ({
|
|
@@ -328,7 +343,7 @@ function Vt(s, t, e, n) {
|
|
|
328
343
|
}
|
|
329
344
|
return { type: "ITEMS", itemType: "CUSTOM_LAYOUT", items: [{ def: { customType: s, ...e }, children: t }], tags: n ?? [] };
|
|
330
345
|
}
|
|
331
|
-
function
|
|
346
|
+
function Qt(s, t, e) {
|
|
332
347
|
const { template: n, ...o } = t;
|
|
333
348
|
return {
|
|
334
349
|
type: "ITEMS",
|
|
@@ -337,26 +352,26 @@ function qt(s, t, e) {
|
|
|
337
352
|
tags: e ?? []
|
|
338
353
|
};
|
|
339
354
|
}
|
|
340
|
-
const
|
|
341
|
-
class
|
|
355
|
+
const Zt = (s) => p(s, (t) => t.type === "text"), Jt = (s) => p(s, (t) => t.type === "number"), Ot = (s) => p(s, (t) => t.type === "boolean");
|
|
356
|
+
class c {
|
|
342
357
|
constructor(t) {
|
|
343
358
|
this.conditions = t;
|
|
344
359
|
}
|
|
345
360
|
static root() {
|
|
346
|
-
return new
|
|
361
|
+
return new c([]);
|
|
347
362
|
}
|
|
348
363
|
// ─── Scope methods (chain-extending, immutable) ───
|
|
349
364
|
tag(t) {
|
|
350
|
-
return new
|
|
365
|
+
return new c([...this.conditions, { kind: "tagsAnd", tags: [t] }]);
|
|
351
366
|
}
|
|
352
367
|
state(t) {
|
|
353
|
-
return new
|
|
368
|
+
return new c([...this.conditions, { kind: "state", name: t }]);
|
|
354
369
|
}
|
|
355
370
|
tagsAnd(t) {
|
|
356
|
-
return new
|
|
371
|
+
return new c([...this.conditions, { kind: "tagsAnd", tags: t }]);
|
|
357
372
|
}
|
|
358
373
|
tagsOr(t) {
|
|
359
|
-
return new
|
|
374
|
+
return new c([...this.conditions, { kind: "tagsOr", tags: t }]);
|
|
360
375
|
}
|
|
361
376
|
apply(t) {
|
|
362
377
|
if (this.conditions.length === 0) return t;
|
|
@@ -389,236 +404,236 @@ class y {
|
|
|
389
404
|
return this.apply(p(t));
|
|
390
405
|
}
|
|
391
406
|
inputByUid(t, e) {
|
|
392
|
-
return this.apply(
|
|
407
|
+
return this.apply(E(t, e));
|
|
393
408
|
}
|
|
394
409
|
textInputs(t) {
|
|
395
|
-
return this.apply(
|
|
410
|
+
return this.apply(Zt(t));
|
|
396
411
|
}
|
|
397
412
|
numberInputs(t) {
|
|
398
|
-
return this.apply(
|
|
413
|
+
return this.apply(Jt(t));
|
|
399
414
|
}
|
|
400
415
|
booleanInputs(t) {
|
|
401
|
-
return this.apply(
|
|
416
|
+
return this.apply(Ot(t));
|
|
402
417
|
}
|
|
403
418
|
selects(t) {
|
|
404
|
-
return this.apply(
|
|
419
|
+
return this.apply(S(t));
|
|
405
420
|
}
|
|
406
421
|
selectByUid(t, e) {
|
|
407
|
-
return this.apply(
|
|
422
|
+
return this.apply(U(t, e));
|
|
408
423
|
}
|
|
409
424
|
dropdowns(t) {
|
|
410
425
|
return this.apply(h(t));
|
|
411
426
|
}
|
|
412
427
|
dropdownByUid(t, e) {
|
|
413
|
-
return this.apply(
|
|
428
|
+
return this.apply(A(t, e));
|
|
414
429
|
}
|
|
415
430
|
radiogroups(t) {
|
|
416
|
-
return this.apply(
|
|
431
|
+
return this.apply(M(t));
|
|
417
432
|
}
|
|
418
433
|
radiogroupByUid(t, e) {
|
|
419
434
|
return this.apply(k(t, e));
|
|
420
435
|
}
|
|
421
436
|
checkboxes(t) {
|
|
422
|
-
return this.apply(
|
|
437
|
+
return this.apply(B(t));
|
|
423
438
|
}
|
|
424
439
|
checkboxByUid(t, e) {
|
|
425
|
-
return this.apply(
|
|
440
|
+
return this.apply(D(t, e));
|
|
426
441
|
}
|
|
427
442
|
textareas(t) {
|
|
428
|
-
return this.apply(
|
|
443
|
+
return this.apply(R(t));
|
|
429
444
|
}
|
|
430
445
|
textareaByUid(t, e) {
|
|
431
|
-
return this.apply(
|
|
446
|
+
return this.apply(P(t, e));
|
|
432
447
|
}
|
|
433
448
|
passwords(t) {
|
|
434
|
-
return this.apply(
|
|
449
|
+
return this.apply(w(t));
|
|
435
450
|
}
|
|
436
451
|
passwordByUid(t, e) {
|
|
437
|
-
return this.apply(
|
|
452
|
+
return this.apply(N(t, e));
|
|
438
453
|
}
|
|
439
454
|
currencies(t) {
|
|
440
|
-
return this.apply(
|
|
455
|
+
return this.apply(x(t));
|
|
441
456
|
}
|
|
442
457
|
currencyByUid(t, e) {
|
|
443
|
-
return this.apply(
|
|
458
|
+
return this.apply(b(t, e));
|
|
444
459
|
}
|
|
445
460
|
markdowns(t) {
|
|
446
|
-
return this.apply(
|
|
461
|
+
return this.apply(L(t));
|
|
447
462
|
}
|
|
448
463
|
markdownByUid(t, e) {
|
|
449
|
-
return this.apply(
|
|
464
|
+
return this.apply(C(t, e));
|
|
450
465
|
}
|
|
451
466
|
lists(t) {
|
|
452
|
-
return this.apply(
|
|
467
|
+
return this.apply(G(t));
|
|
453
468
|
}
|
|
454
469
|
listByUid(t, e) {
|
|
455
|
-
return this.apply(
|
|
470
|
+
return this.apply(F(t, e));
|
|
456
471
|
}
|
|
457
472
|
calendars(t) {
|
|
458
|
-
return this.apply(
|
|
473
|
+
return this.apply(Y(t));
|
|
459
474
|
}
|
|
460
475
|
calendarByUid(t, e) {
|
|
461
|
-
return this.apply(
|
|
476
|
+
return this.apply($(t, e));
|
|
462
477
|
}
|
|
463
478
|
dateInputs(t) {
|
|
464
|
-
return this.apply(
|
|
479
|
+
return this.apply(j(t));
|
|
465
480
|
}
|
|
466
481
|
dateInputByUid(t, e) {
|
|
467
|
-
return this.apply(
|
|
482
|
+
return this.apply(K(t, e));
|
|
468
483
|
}
|
|
469
484
|
datePickers(t) {
|
|
470
|
-
return this.apply(
|
|
485
|
+
return this.apply(W(t));
|
|
471
486
|
}
|
|
472
487
|
datePickerByUid(t, e) {
|
|
473
|
-
return this.apply(
|
|
488
|
+
return this.apply(v(t, e));
|
|
474
489
|
}
|
|
475
490
|
rangeCalendars(t) {
|
|
476
|
-
return this.apply(
|
|
491
|
+
return this.apply(z(t));
|
|
477
492
|
}
|
|
478
493
|
rangeCalendarByUid(t, e) {
|
|
479
|
-
return this.apply(
|
|
494
|
+
return this.apply(H(t, e));
|
|
480
495
|
}
|
|
481
496
|
rangeDateInputs(t) {
|
|
482
|
-
return this.apply(
|
|
497
|
+
return this.apply(X(t));
|
|
483
498
|
}
|
|
484
499
|
rangeDateInputByUid(t, e) {
|
|
485
|
-
return this.apply(
|
|
500
|
+
return this.apply(V(t, e));
|
|
486
501
|
}
|
|
487
502
|
rangeDatePickers(t) {
|
|
488
|
-
return this.apply(
|
|
503
|
+
return this.apply(q(t));
|
|
489
504
|
}
|
|
490
505
|
rangeDatePickerByUid(t, e) {
|
|
491
|
-
return this.apply(
|
|
506
|
+
return this.apply(Q(t, e));
|
|
492
507
|
}
|
|
493
508
|
repeaters(t) {
|
|
494
|
-
return this.apply(
|
|
509
|
+
return this.apply(Z(t));
|
|
495
510
|
}
|
|
496
511
|
repeaterByUid(t, e) {
|
|
497
|
-
return this.apply(
|
|
512
|
+
return this.apply(J(t, e));
|
|
498
513
|
}
|
|
499
514
|
// ─── Type selectors — actions, displays, layouts ───
|
|
500
515
|
actions(t) {
|
|
501
|
-
return this.apply(
|
|
516
|
+
return this.apply(O(t));
|
|
502
517
|
}
|
|
503
518
|
actionByUid(t, e) {
|
|
504
|
-
return this.apply(
|
|
519
|
+
return this.apply(tt(t, e));
|
|
505
520
|
}
|
|
506
521
|
layouts(t) {
|
|
507
|
-
return this.apply(
|
|
522
|
+
return this.apply(et(t));
|
|
508
523
|
}
|
|
509
524
|
layoutByUid(t, e) {
|
|
510
|
-
return this.apply(
|
|
525
|
+
return this.apply(st(t, e));
|
|
511
526
|
}
|
|
512
527
|
displays(t) {
|
|
513
|
-
return this.apply(
|
|
528
|
+
return this.apply(nt(t));
|
|
514
529
|
}
|
|
515
530
|
displayByUid(t, e) {
|
|
516
|
-
return this.apply(
|
|
531
|
+
return this.apply(it(t, e));
|
|
517
532
|
}
|
|
518
533
|
alerts(t) {
|
|
519
|
-
return this.apply(
|
|
534
|
+
return this.apply(rt(t));
|
|
520
535
|
}
|
|
521
536
|
alertByUid(t, e) {
|
|
522
|
-
return this.apply(
|
|
537
|
+
return this.apply(ot(t, e));
|
|
523
538
|
}
|
|
524
539
|
tabs(t) {
|
|
525
|
-
return this.apply(
|
|
540
|
+
return this.apply(at(t));
|
|
526
541
|
}
|
|
527
542
|
tabsByUid(t, e) {
|
|
528
|
-
return this.apply(
|
|
543
|
+
return this.apply(ut(t, e));
|
|
529
544
|
}
|
|
530
545
|
accordions(t) {
|
|
531
|
-
return this.apply(
|
|
546
|
+
return this.apply(yt(t));
|
|
532
547
|
}
|
|
533
548
|
accordionByUid(t, e) {
|
|
534
|
-
return this.apply(
|
|
549
|
+
return this.apply(ct(t, e));
|
|
535
550
|
}
|
|
536
551
|
// ─── Type selectors — custom kinds ───
|
|
537
552
|
customInputs(t) {
|
|
538
|
-
return this.apply(
|
|
553
|
+
return this.apply(dt(t));
|
|
539
554
|
}
|
|
540
555
|
customInputByUid(t, e) {
|
|
541
|
-
return this.apply(
|
|
556
|
+
return this.apply(pt(t, e));
|
|
542
557
|
}
|
|
543
558
|
customActions(t) {
|
|
544
|
-
return this.apply(
|
|
559
|
+
return this.apply(mt(t));
|
|
545
560
|
}
|
|
546
561
|
customActionByUid(t, e) {
|
|
547
|
-
return this.apply(
|
|
562
|
+
return this.apply(lt(t, e));
|
|
548
563
|
}
|
|
549
564
|
customDisplays(t) {
|
|
550
|
-
return this.apply(
|
|
565
|
+
return this.apply(ft(t));
|
|
551
566
|
}
|
|
552
567
|
customDisplayByUid(t, e) {
|
|
553
|
-
return this.apply(
|
|
568
|
+
return this.apply(gt(t, e));
|
|
554
569
|
}
|
|
555
570
|
customLayouts(t) {
|
|
556
|
-
return this.apply(
|
|
571
|
+
return this.apply(Tt(t));
|
|
557
572
|
}
|
|
558
573
|
customLayoutByUid(t, e) {
|
|
559
|
-
return this.apply(
|
|
574
|
+
return this.apply(It(t, e));
|
|
560
575
|
}
|
|
561
576
|
}
|
|
562
|
-
const
|
|
577
|
+
const oe = {
|
|
563
578
|
inputs: {
|
|
564
579
|
textInput: Et,
|
|
565
|
-
numberInput:
|
|
566
|
-
booleanInput:
|
|
567
|
-
select:
|
|
568
|
-
dropdown:
|
|
569
|
-
radiogroup:
|
|
570
|
-
checkbox:
|
|
580
|
+
numberInput: St,
|
|
581
|
+
booleanInput: Ut,
|
|
582
|
+
select: ht,
|
|
583
|
+
dropdown: At,
|
|
584
|
+
radiogroup: Mt,
|
|
585
|
+
checkbox: kt,
|
|
571
586
|
textarea: Bt,
|
|
572
587
|
password: Dt,
|
|
573
|
-
currency:
|
|
574
|
-
markdown:
|
|
575
|
-
list:
|
|
576
|
-
calendar:
|
|
577
|
-
dateInput:
|
|
588
|
+
currency: Rt,
|
|
589
|
+
markdown: Pt,
|
|
590
|
+
list: wt,
|
|
591
|
+
calendar: Nt,
|
|
592
|
+
dateInput: xt,
|
|
578
593
|
datePicker: bt,
|
|
579
594
|
rangeCalendar: Lt,
|
|
580
595
|
rangeDateInput: Ct,
|
|
581
596
|
rangeDatePicker: Gt,
|
|
582
|
-
repeater:
|
|
583
|
-
custom:
|
|
597
|
+
repeater: Qt,
|
|
598
|
+
custom: Ft
|
|
584
599
|
},
|
|
585
600
|
actions: {
|
|
586
|
-
button:
|
|
587
|
-
submitButton:
|
|
588
|
-
custom:
|
|
601
|
+
button: I,
|
|
602
|
+
submitButton: Yt,
|
|
603
|
+
custom: $t
|
|
589
604
|
},
|
|
590
605
|
displays: {
|
|
591
|
-
display:
|
|
592
|
-
alert:
|
|
593
|
-
custom:
|
|
606
|
+
display: _t,
|
|
607
|
+
alert: jt,
|
|
608
|
+
custom: Kt
|
|
594
609
|
},
|
|
595
610
|
layouts: {
|
|
596
611
|
flex: m,
|
|
597
|
-
horizontalFlex:
|
|
598
|
-
verticalFlex:
|
|
612
|
+
horizontalFlex: Wt,
|
|
613
|
+
verticalFlex: vt,
|
|
599
614
|
grid: l,
|
|
600
615
|
horizontalGrid: zt,
|
|
601
616
|
verticalGrid: Ht,
|
|
602
617
|
tabs: Xt,
|
|
603
|
-
accordion:
|
|
604
|
-
custom:
|
|
618
|
+
accordion: Vt,
|
|
619
|
+
custom: qt
|
|
605
620
|
},
|
|
606
|
-
selectors:
|
|
621
|
+
selectors: c.root()
|
|
607
622
|
};
|
|
608
|
-
function
|
|
623
|
+
function ae(s, ...t) {
|
|
609
624
|
return t.map((e) => ({
|
|
610
625
|
...e,
|
|
611
626
|
targetState: s
|
|
612
627
|
}));
|
|
613
628
|
}
|
|
614
|
-
function
|
|
629
|
+
function ue(s, ...t) {
|
|
615
630
|
return {
|
|
616
631
|
kind: "aggregated",
|
|
617
632
|
matcher: (e) => e.tags?.includes(s) ?? !1,
|
|
618
633
|
children: t
|
|
619
634
|
};
|
|
620
635
|
}
|
|
621
|
-
class
|
|
636
|
+
class te {
|
|
622
637
|
create(t) {
|
|
623
638
|
return {
|
|
624
639
|
states: t.states,
|
|
@@ -631,21 +646,21 @@ class Ot {
|
|
|
631
646
|
};
|
|
632
647
|
}
|
|
633
648
|
}
|
|
634
|
-
function
|
|
635
|
-
return new
|
|
649
|
+
function ye() {
|
|
650
|
+
return new te();
|
|
636
651
|
}
|
|
637
|
-
const
|
|
638
|
-
function
|
|
652
|
+
const ce = (s) => s !== null && typeof s == "object" && Object.prototype.hasOwnProperty.call(s, "label") && Object.prototype.hasOwnProperty.call(s, "value");
|
|
653
|
+
function ee(s) {
|
|
639
654
|
return typeof s == "object" && s !== null && "$ref" in s && typeof s.$ref == "string" && Object.keys(s).length === 1;
|
|
640
655
|
}
|
|
641
|
-
async function
|
|
656
|
+
async function se(s, t) {
|
|
642
657
|
const e = new URL(s, t).href, n = await fetch(e);
|
|
643
658
|
if (!n.ok) throw new Error(`Failed to load form chunk ${e}: ${n.status}`);
|
|
644
659
|
const { $schema: o, ...r } = await n.json();
|
|
645
660
|
return f(r, e);
|
|
646
661
|
}
|
|
647
662
|
async function f(s, t) {
|
|
648
|
-
if (
|
|
663
|
+
if (ee(s)) return se(s.$ref, t);
|
|
649
664
|
const e = s;
|
|
650
665
|
if (Array.isArray(e.children)) {
|
|
651
666
|
const n = await Promise.all(e.children.map((o) => f(o, t)));
|
|
@@ -653,257 +668,117 @@ async function f(s, t) {
|
|
|
653
668
|
}
|
|
654
669
|
return s;
|
|
655
670
|
}
|
|
656
|
-
async function
|
|
671
|
+
async function de(s, t) {
|
|
657
672
|
const e = await Promise.all(
|
|
658
673
|
s.form.map((n) => f(n, t))
|
|
659
674
|
);
|
|
660
675
|
return { ...s, form: e };
|
|
661
676
|
}
|
|
662
|
-
const fe = {
|
|
663
|
-
//
|
|
664
|
-
// Input widgets
|
|
665
|
-
//
|
|
666
|
-
textinput: ({
|
|
667
|
-
config: s,
|
|
668
|
-
props: t,
|
|
669
|
-
validator: e
|
|
670
|
-
}) => ({
|
|
671
|
-
uid: "",
|
|
672
|
-
kind: "input",
|
|
673
|
-
type: "textinput",
|
|
674
|
-
// The `props` key only exists in the returned object when `props` is actually provided
|
|
675
|
-
...t && { props: t },
|
|
676
|
-
...e && { validator: e },
|
|
677
|
-
...s
|
|
678
|
-
}),
|
|
679
|
-
password: ({
|
|
680
|
-
config: s,
|
|
681
|
-
props: t,
|
|
682
|
-
validator: e
|
|
683
|
-
}) => ({
|
|
684
|
-
uid: "",
|
|
685
|
-
kind: "input",
|
|
686
|
-
type: "password",
|
|
687
|
-
// The `props` key only exists in the returned object when `props` is actually provided
|
|
688
|
-
...t && { props: t },
|
|
689
|
-
...e && { validator: e },
|
|
690
|
-
...s
|
|
691
|
-
}),
|
|
692
|
-
numberinput: ({
|
|
693
|
-
config: s,
|
|
694
|
-
props: t,
|
|
695
|
-
validator: e
|
|
696
|
-
}) => ({
|
|
697
|
-
uid: "",
|
|
698
|
-
kind: "input",
|
|
699
|
-
type: "numberinput",
|
|
700
|
-
...t && { props: t },
|
|
701
|
-
...e && { validator: e },
|
|
702
|
-
...s
|
|
703
|
-
}),
|
|
704
|
-
checkbox: ({
|
|
705
|
-
config: s,
|
|
706
|
-
props: t,
|
|
707
|
-
validator: e
|
|
708
|
-
}) => ({
|
|
709
|
-
uid: "",
|
|
710
|
-
kind: "input",
|
|
711
|
-
type: "checkbox",
|
|
712
|
-
...t && { props: t },
|
|
713
|
-
...e && { validator: e },
|
|
714
|
-
...s
|
|
715
|
-
}),
|
|
716
|
-
select: ({
|
|
717
|
-
config: s,
|
|
718
|
-
props: t,
|
|
719
|
-
validator: e
|
|
720
|
-
}) => ({
|
|
721
|
-
uid: "",
|
|
722
|
-
kind: "input",
|
|
723
|
-
type: "select",
|
|
724
|
-
...t && { props: t },
|
|
725
|
-
...e && { validator: e },
|
|
726
|
-
...s
|
|
727
|
-
}),
|
|
728
|
-
//
|
|
729
|
-
// Layout widgets
|
|
730
|
-
//
|
|
731
|
-
flex: (s, t) => ({
|
|
732
|
-
uid: "",
|
|
733
|
-
kind: "layout",
|
|
734
|
-
type: "flex",
|
|
735
|
-
...t && { props: t },
|
|
736
|
-
...s
|
|
737
|
-
}),
|
|
738
|
-
grid: (s, t) => ({
|
|
739
|
-
uid: "",
|
|
740
|
-
kind: "layout",
|
|
741
|
-
type: "grid",
|
|
742
|
-
...t && { props: t },
|
|
743
|
-
...s
|
|
744
|
-
}),
|
|
745
|
-
tabs: (s, t) => ({
|
|
746
|
-
uid: "",
|
|
747
|
-
kind: "layout",
|
|
748
|
-
type: "tabs",
|
|
749
|
-
...t && { props: t },
|
|
750
|
-
...s
|
|
751
|
-
}),
|
|
752
|
-
//
|
|
753
|
-
// Display widgets
|
|
754
|
-
//
|
|
755
|
-
alert: (s, t) => ({
|
|
756
|
-
uid: "",
|
|
757
|
-
kind: "display",
|
|
758
|
-
type: "alert",
|
|
759
|
-
...t && { props: t },
|
|
760
|
-
...s
|
|
761
|
-
}),
|
|
762
|
-
markdownText: (s, t) => ({
|
|
763
|
-
uid: "",
|
|
764
|
-
kind: "display",
|
|
765
|
-
type: "markdownText",
|
|
766
|
-
...t && { props: t },
|
|
767
|
-
...s
|
|
768
|
-
})
|
|
769
|
-
}, se = [
|
|
770
|
-
"calendar",
|
|
771
|
-
"checkbox",
|
|
772
|
-
"currency",
|
|
773
|
-
"dateInput",
|
|
774
|
-
"datePicker",
|
|
775
|
-
"dropdown",
|
|
776
|
-
"list",
|
|
777
|
-
"markdown",
|
|
778
|
-
"number",
|
|
779
|
-
"password",
|
|
780
|
-
"radiogroup",
|
|
781
|
-
"rangeCalendar",
|
|
782
|
-
"rangeDateInput",
|
|
783
|
-
"rangeDatePicker",
|
|
784
|
-
"repeater",
|
|
785
|
-
"select",
|
|
786
|
-
"textarea",
|
|
787
|
-
"textinput",
|
|
788
|
-
"toggle"
|
|
789
|
-
], ne = ["accordion", "flex", "grid", "tabs"], ie = ["alert", "markdownText", "renderer"], re = ["button"], ge = [
|
|
790
|
-
...se,
|
|
791
|
-
...ne,
|
|
792
|
-
...ie,
|
|
793
|
-
...re
|
|
794
|
-
];
|
|
795
677
|
export {
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
S as _gslDropdownByUid,
|
|
678
|
+
ct as _gslAccordionByUid,
|
|
679
|
+
yt as _gslAccordions,
|
|
680
|
+
tt as _gslActionByUid,
|
|
681
|
+
O as _gslActions,
|
|
682
|
+
ot as _gslAlertByUid,
|
|
683
|
+
rt as _gslAlerts,
|
|
684
|
+
Ot as _gslBooleanInputs,
|
|
685
|
+
$ as _gslCalendarByUid,
|
|
686
|
+
Y as _gslCalendars,
|
|
687
|
+
D as _gslCheckboxByUid,
|
|
688
|
+
B as _gslCheckboxes,
|
|
689
|
+
x as _gslCurrencies,
|
|
690
|
+
b as _gslCurrencyByUid,
|
|
691
|
+
lt as _gslCustomActionByUid,
|
|
692
|
+
mt as _gslCustomActions,
|
|
693
|
+
gt as _gslCustomDisplayByUid,
|
|
694
|
+
ft as _gslCustomDisplays,
|
|
695
|
+
pt as _gslCustomInputByUid,
|
|
696
|
+
dt as _gslCustomInputs,
|
|
697
|
+
It as _gslCustomLayoutByUid,
|
|
698
|
+
Tt as _gslCustomLayouts,
|
|
699
|
+
K as _gslDateInputByUid,
|
|
700
|
+
j as _gslDateInputs,
|
|
701
|
+
v as _gslDatePickerByUid,
|
|
702
|
+
W as _gslDatePickers,
|
|
703
|
+
it as _gslDisplayByUid,
|
|
704
|
+
nt as _gslDisplays,
|
|
705
|
+
A as _gslDropdownByUid,
|
|
825
706
|
h as _gslDropdowns,
|
|
826
|
-
|
|
707
|
+
E as _gslInputByUid,
|
|
827
708
|
p as _gslInputs,
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
709
|
+
st as _gslLayoutByUid,
|
|
710
|
+
et as _gslLayouts,
|
|
711
|
+
F as _gslListByUid,
|
|
712
|
+
G as _gslLists,
|
|
713
|
+
C as _gslMarkdownByUid,
|
|
714
|
+
L as _gslMarkdowns,
|
|
715
|
+
Jt as _gslNumberInputs,
|
|
716
|
+
N as _gslPasswordByUid,
|
|
717
|
+
w as _gslPasswords,
|
|
837
718
|
k as _gslRadiogroupByUid,
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
719
|
+
M as _gslRadiogroups,
|
|
720
|
+
H as _gslRangeCalendarByUid,
|
|
721
|
+
z as _gslRangeCalendars,
|
|
722
|
+
V as _gslRangeDateInputByUid,
|
|
723
|
+
X as _gslRangeDateInputs,
|
|
724
|
+
Q as _gslRangeDatePickerByUid,
|
|
725
|
+
q as _gslRangeDatePickers,
|
|
726
|
+
J as _gslRepeaterByUid,
|
|
727
|
+
Z as _gslRepeaters,
|
|
728
|
+
U as _gslSelectByUid,
|
|
729
|
+
S as _gslSelects,
|
|
730
|
+
ae as _gslStates,
|
|
731
|
+
at as _gslTabs,
|
|
732
|
+
ut as _gslTabsByUid,
|
|
733
|
+
ue as _gslTag,
|
|
734
|
+
Zt as _gslTextInputs,
|
|
735
|
+
P as _gslTextareaByUid,
|
|
736
|
+
R as _gslTextareas,
|
|
737
|
+
Vt as _guiAccordion,
|
|
738
|
+
jt as _guiAlert,
|
|
739
|
+
Ut as _guiBooleanInput,
|
|
740
|
+
I as _guiButton,
|
|
741
|
+
Nt as _guiCalendar,
|
|
742
|
+
kt as _guiCheckbox,
|
|
743
|
+
Rt as _guiCurrency,
|
|
744
|
+
$t as _guiCustomAction,
|
|
745
|
+
Kt as _guiCustomDisplay,
|
|
746
|
+
Ft as _guiCustomInput,
|
|
747
|
+
qt as _guiCustomLayout,
|
|
748
|
+
xt as _guiDateInput,
|
|
868
749
|
bt as _guiDatePicker,
|
|
869
|
-
|
|
870
|
-
|
|
750
|
+
_t as _guiDisplay,
|
|
751
|
+
At as _guiDropdown,
|
|
871
752
|
m as _guiFlex,
|
|
872
753
|
l as _guiGrid,
|
|
873
|
-
|
|
754
|
+
Wt as _guiHorizontalFlex,
|
|
874
755
|
zt as _guiHorizontalGrid,
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
756
|
+
wt as _guiList,
|
|
757
|
+
Pt as _guiMarkdown,
|
|
758
|
+
St as _guiNumberInput,
|
|
878
759
|
Dt as _guiPassword,
|
|
879
|
-
|
|
760
|
+
Mt as _guiRadiogroup,
|
|
880
761
|
Lt as _guiRangeCalendar,
|
|
881
762
|
Ct as _guiRangeDateInput,
|
|
882
763
|
Gt as _guiRangeDatePicker,
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
764
|
+
Qt as _guiRepeater,
|
|
765
|
+
ht as _guiSelect,
|
|
766
|
+
Yt as _guiSubmitButton,
|
|
886
767
|
Xt as _guiTabs,
|
|
887
768
|
Et as _guiTextInput,
|
|
888
769
|
Bt as _guiTextarea,
|
|
889
|
-
|
|
770
|
+
vt as _guiVerticalFlex,
|
|
890
771
|
Ht as _guiVerticalGrid,
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
me as isOption,
|
|
904
|
-
ne as layoutWidgets,
|
|
905
|
-
Ae as processAutoLabel,
|
|
906
|
-
Me as processAutoPlaceholder,
|
|
907
|
-
le as resolveChunkRefs,
|
|
908
|
-
Be as resolveFormInput
|
|
772
|
+
le as createGslSelector,
|
|
773
|
+
fe as defineShortcutType,
|
|
774
|
+
ge as extractWidgetProps,
|
|
775
|
+
Te as formDefs,
|
|
776
|
+
ye as golemForm,
|
|
777
|
+
oe as gui,
|
|
778
|
+
Ie as isDxDefinitions,
|
|
779
|
+
ce as isOption,
|
|
780
|
+
_e as processAutoLabel,
|
|
781
|
+
Ee as processAutoPlaceholder,
|
|
782
|
+
de as resolveChunkRefs,
|
|
783
|
+
Se as resolveFormInput
|
|
909
784
|
};
|