@golemui/gui-shared 0.13.1 → 0.13.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 +10 -0
- package/index.d.ts +11 -7
- package/index.js +147 -287
- package/index.umd.cjs +1 -1
- package/internals.js +12 -2
- package/internals.umd.cjs +1 -1
- package/lib/widgets.d.ts +1 -1
- package/package.json +5 -3
- package/resolveFormInput-C0LCXSox.cjs +1 -0
- package/resolveFormInput-CmPoe8iw.js +1589 -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, _ as p, a as I, b as _, c as E, d as S, e as h, f as U, g as A, h as M, i as k, j as B, k as D, l as R, m as P, n as w, o as x, p as N, q as L, r as b, s as C, t as G, u as F, v as Y, w as $, x as K, y as W, z as j, A as v, B as z, C as H, D as X, E as V, F as q, H as Q, I as Z, J, K as O, L as tt, M as et, N as st, O as nt, P as it, Q as rt, R as ot, S as at, T as ut, U as yt, V as ct, W as dt, X as pt, Y as mt, Z as ft, $ as lt, a0 as gt, a1 as Tt, a2 as It, a3 as _t } from "./resolveFormInput-CmPoe8iw.js";
|
|
2
|
+
import { a4 as me, a5 as fe, a6 as le, a7 as ge, a8 as Te, a9 as Ie, aa as _e, ab as Ee } from "./resolveFormInput-CmPoe8iw.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 ht(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,7 +52,7 @@ 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
|
}
|
|
@@ -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 ?? [] };
|
|
@@ -160,7 +160,7 @@ function Nt(s, t, e) {
|
|
|
160
160
|
const n = { type: "dateInput", ...t };
|
|
161
161
|
return { type: "ITEMS", itemType: "DATE_INPUT", items: [{ key: s, def: n }], tags: e ?? [] };
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Lt(s, t, e) {
|
|
164
164
|
if (typeof t == "function") {
|
|
165
165
|
const r = t;
|
|
166
166
|
return { type: "ITEMS", itemType: "DATE_PICKER", items: [{ key: s, def: (a) => ({
|
|
@@ -171,7 +171,7 @@ function bt(s, t, e) {
|
|
|
171
171
|
const n = { type: "datePicker", ...t };
|
|
172
172
|
return { type: "ITEMS", itemType: "DATE_PICKER", items: [{ key: s, def: n }], tags: e ?? [] };
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function bt(s, t, e) {
|
|
175
175
|
if (typeof t == "function") {
|
|
176
176
|
const r = t;
|
|
177
177
|
return { type: "ITEMS", itemType: "RANGE_CALENDAR", items: [{ key: s, def: (a) => ({
|
|
@@ -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,7 @@ 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 Yt(s, t, e) {
|
|
219
219
|
if (typeof t == "function") {
|
|
220
220
|
const r = t;
|
|
221
221
|
return { type: "ITEMS", itemType: "CUSTOM_ACTION", items: [
|
|
@@ -224,10 +224,10 @@ function Ft(s, t, e) {
|
|
|
224
224
|
}
|
|
225
225
|
return { type: "ITEMS", itemType: "CUSTOM_ACTION", items: [{ customType: s, ...t }], tags: e ?? [] };
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function $t(s, t) {
|
|
228
228
|
return { type: "ITEMS", itemType: "ALERTS", items: [s], tags: t ?? [] };
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function Kt(s, t, e) {
|
|
231
231
|
if (typeof t == "function") {
|
|
232
232
|
const u = t;
|
|
233
233
|
return { type: "ITEMS", itemType: "CUSTOM_DISPLAY", items: [
|
|
@@ -243,12 +243,12 @@ function $t(s, t, e) {
|
|
|
243
243
|
}
|
|
244
244
|
const m = (s, t, e) => ({
|
|
245
245
|
type: "ITEMS",
|
|
246
|
-
itemType:
|
|
246
|
+
itemType: y.LAYOUTS,
|
|
247
247
|
items: [{ def: { widgetName: "flex", ...t ?? {} }, children: s }],
|
|
248
248
|
tags: e ?? []
|
|
249
|
-
}),
|
|
249
|
+
}), Wt = (s, t, e) => m(s, { direction: "row", ...t ?? {} }, e), jt = (s, t, e) => m(s, { direction: "column", ...t ?? {} }, e), f = (s, t, e) => ({
|
|
250
250
|
type: "ITEMS",
|
|
251
|
-
itemType:
|
|
251
|
+
itemType: y.LAYOUTS,
|
|
252
252
|
items: [
|
|
253
253
|
{
|
|
254
254
|
def: {
|
|
@@ -261,17 +261,17 @@ const m = (s, t, e) => ({
|
|
|
261
261
|
}
|
|
262
262
|
],
|
|
263
263
|
tags: e ?? []
|
|
264
|
-
}),
|
|
264
|
+
}), vt = (s, t, e) => f(s, { direction: "row", ...t ?? {} }, e), zt = (s, t, e) => f(s, { direction: "column", ...t ?? {} }, e);
|
|
265
265
|
function g(s) {
|
|
266
266
|
return s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function Ht(s, t, e) {
|
|
269
269
|
const n = s.map((i) => ({
|
|
270
270
|
label: i.label,
|
|
271
271
|
uid: i.uid ?? g(i.label)
|
|
272
272
|
})), o = s.map((i) => ({
|
|
273
273
|
type: "ITEMS",
|
|
274
|
-
itemType:
|
|
274
|
+
itemType: y.LAYOUTS,
|
|
275
275
|
items: [
|
|
276
276
|
{
|
|
277
277
|
def: { uid: i.uid ?? g(i.label), direction: "column", widgetName: "flex" },
|
|
@@ -293,13 +293,13 @@ function Xt(s, t, e) {
|
|
|
293
293
|
function T(s) {
|
|
294
294
|
return s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function Xt(s, t, e) {
|
|
297
297
|
const n = s.map((i) => ({
|
|
298
298
|
label: i.label,
|
|
299
299
|
uid: i.uid ?? T(i.label)
|
|
300
300
|
})), o = s.map((i) => ({
|
|
301
301
|
type: "ITEMS",
|
|
302
|
-
itemType:
|
|
302
|
+
itemType: y.LAYOUTS,
|
|
303
303
|
items: [
|
|
304
304
|
{
|
|
305
305
|
def: { uid: i.uid ?? T(i.label), direction: "column", widgetName: "flex" },
|
|
@@ -338,25 +338,25 @@ function qt(s, t, e) {
|
|
|
338
338
|
};
|
|
339
339
|
}
|
|
340
340
|
const Qt = (s) => p(s, (t) => t.type === "text"), Zt = (s) => p(s, (t) => t.type === "number"), Jt = (s) => p(s, (t) => t.type === "boolean");
|
|
341
|
-
class
|
|
341
|
+
class c {
|
|
342
342
|
constructor(t) {
|
|
343
343
|
this.conditions = t;
|
|
344
344
|
}
|
|
345
345
|
static root() {
|
|
346
|
-
return new
|
|
346
|
+
return new c([]);
|
|
347
347
|
}
|
|
348
348
|
// ─── Scope methods (chain-extending, immutable) ───
|
|
349
349
|
tag(t) {
|
|
350
|
-
return new
|
|
350
|
+
return new c([...this.conditions, { kind: "tagsAnd", tags: [t] }]);
|
|
351
351
|
}
|
|
352
352
|
state(t) {
|
|
353
|
-
return new
|
|
353
|
+
return new c([...this.conditions, { kind: "state", name: t }]);
|
|
354
354
|
}
|
|
355
355
|
tagsAnd(t) {
|
|
356
|
-
return new
|
|
356
|
+
return new c([...this.conditions, { kind: "tagsAnd", tags: t }]);
|
|
357
357
|
}
|
|
358
358
|
tagsOr(t) {
|
|
359
|
-
return new
|
|
359
|
+
return new c([...this.conditions, { kind: "tagsOr", tags: t }]);
|
|
360
360
|
}
|
|
361
361
|
apply(t) {
|
|
362
362
|
if (this.conditions.length === 0) return t;
|
|
@@ -407,22 +407,22 @@ class y {
|
|
|
407
407
|
return this.apply(E(t, e));
|
|
408
408
|
}
|
|
409
409
|
dropdowns(t) {
|
|
410
|
-
return this.apply(
|
|
410
|
+
return this.apply(S(t));
|
|
411
411
|
}
|
|
412
412
|
dropdownByUid(t, e) {
|
|
413
|
-
return this.apply(
|
|
413
|
+
return this.apply(h(t, e));
|
|
414
414
|
}
|
|
415
415
|
radiogroups(t) {
|
|
416
416
|
return this.apply(U(t));
|
|
417
417
|
}
|
|
418
418
|
radiogroupByUid(t, e) {
|
|
419
|
-
return this.apply(
|
|
419
|
+
return this.apply(A(t, e));
|
|
420
420
|
}
|
|
421
421
|
checkboxes(t) {
|
|
422
|
-
return this.apply(
|
|
422
|
+
return this.apply(M(t));
|
|
423
423
|
}
|
|
424
424
|
checkboxByUid(t, e) {
|
|
425
|
-
return this.apply(
|
|
425
|
+
return this.apply(k(t, e));
|
|
426
426
|
}
|
|
427
427
|
textareas(t) {
|
|
428
428
|
return this.apply(B(t));
|
|
@@ -431,13 +431,13 @@ class y {
|
|
|
431
431
|
return this.apply(D(t, e));
|
|
432
432
|
}
|
|
433
433
|
passwords(t) {
|
|
434
|
-
return this.apply(
|
|
434
|
+
return this.apply(R(t));
|
|
435
435
|
}
|
|
436
436
|
passwordByUid(t, e) {
|
|
437
|
-
return this.apply(
|
|
437
|
+
return this.apply(P(t, e));
|
|
438
438
|
}
|
|
439
439
|
currencies(t) {
|
|
440
|
-
return this.apply(
|
|
440
|
+
return this.apply(w(t));
|
|
441
441
|
}
|
|
442
442
|
currencyByUid(t, e) {
|
|
443
443
|
return this.apply(x(t, e));
|
|
@@ -446,10 +446,10 @@ class y {
|
|
|
446
446
|
return this.apply(N(t));
|
|
447
447
|
}
|
|
448
448
|
markdownByUid(t, e) {
|
|
449
|
-
return this.apply(
|
|
449
|
+
return this.apply(L(t, e));
|
|
450
450
|
}
|
|
451
451
|
lists(t) {
|
|
452
|
-
return this.apply(
|
|
452
|
+
return this.apply(b(t));
|
|
453
453
|
}
|
|
454
454
|
listByUid(t, e) {
|
|
455
455
|
return this.apply(C(t, e));
|
|
@@ -458,34 +458,34 @@ class y {
|
|
|
458
458
|
return this.apply(G(t));
|
|
459
459
|
}
|
|
460
460
|
calendarByUid(t, e) {
|
|
461
|
-
return this.apply(
|
|
461
|
+
return this.apply(F(t, e));
|
|
462
462
|
}
|
|
463
463
|
dateInputs(t) {
|
|
464
|
-
return this.apply(
|
|
464
|
+
return this.apply(Y(t));
|
|
465
465
|
}
|
|
466
466
|
dateInputByUid(t, e) {
|
|
467
|
-
return this.apply(
|
|
467
|
+
return this.apply($(t, e));
|
|
468
468
|
}
|
|
469
469
|
datePickers(t) {
|
|
470
|
-
return this.apply(
|
|
470
|
+
return this.apply(K(t));
|
|
471
471
|
}
|
|
472
472
|
datePickerByUid(t, e) {
|
|
473
|
-
return this.apply(
|
|
473
|
+
return this.apply(W(t, e));
|
|
474
474
|
}
|
|
475
475
|
rangeCalendars(t) {
|
|
476
476
|
return this.apply(j(t));
|
|
477
477
|
}
|
|
478
478
|
rangeCalendarByUid(t, e) {
|
|
479
|
-
return this.apply(
|
|
479
|
+
return this.apply(v(t, e));
|
|
480
480
|
}
|
|
481
481
|
rangeDateInputs(t) {
|
|
482
|
-
return this.apply(
|
|
482
|
+
return this.apply(z(t));
|
|
483
483
|
}
|
|
484
484
|
rangeDateInputByUid(t, e) {
|
|
485
|
-
return this.apply(
|
|
485
|
+
return this.apply(H(t, e));
|
|
486
486
|
}
|
|
487
487
|
rangeDatePickers(t) {
|
|
488
|
-
return this.apply(
|
|
488
|
+
return this.apply(X(t));
|
|
489
489
|
}
|
|
490
490
|
rangeDatePickerByUid(t, e) {
|
|
491
491
|
return this.apply(V(t, e));
|
|
@@ -535,10 +535,10 @@ class y {
|
|
|
535
535
|
}
|
|
536
536
|
// ─── Type selectors — custom kinds ───
|
|
537
537
|
customInputs(t) {
|
|
538
|
-
return this.apply(
|
|
538
|
+
return this.apply(yt(t));
|
|
539
539
|
}
|
|
540
540
|
customInputByUid(t, e) {
|
|
541
|
-
return this.apply(
|
|
541
|
+
return this.apply(ct(t, e));
|
|
542
542
|
}
|
|
543
543
|
customActions(t) {
|
|
544
544
|
return this.apply(dt(t));
|
|
@@ -550,68 +550,68 @@ class y {
|
|
|
550
550
|
return this.apply(mt(t));
|
|
551
551
|
}
|
|
552
552
|
customDisplayByUid(t, e) {
|
|
553
|
-
return this.apply(
|
|
553
|
+
return this.apply(ft(t, e));
|
|
554
554
|
}
|
|
555
555
|
customLayouts(t) {
|
|
556
|
-
return this.apply(
|
|
556
|
+
return this.apply(lt(t));
|
|
557
557
|
}
|
|
558
558
|
customLayoutByUid(t, e) {
|
|
559
559
|
return this.apply(gt(t, e));
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
|
-
const
|
|
562
|
+
const re = {
|
|
563
563
|
inputs: {
|
|
564
564
|
textInput: Et,
|
|
565
|
-
numberInput:
|
|
566
|
-
booleanInput:
|
|
565
|
+
numberInput: St,
|
|
566
|
+
booleanInput: ht,
|
|
567
567
|
select: Ut,
|
|
568
|
-
dropdown:
|
|
569
|
-
radiogroup:
|
|
570
|
-
checkbox:
|
|
568
|
+
dropdown: At,
|
|
569
|
+
radiogroup: Mt,
|
|
570
|
+
checkbox: kt,
|
|
571
571
|
textarea: Bt,
|
|
572
572
|
password: Dt,
|
|
573
|
-
currency:
|
|
574
|
-
markdown:
|
|
575
|
-
list:
|
|
573
|
+
currency: Rt,
|
|
574
|
+
markdown: Pt,
|
|
575
|
+
list: wt,
|
|
576
576
|
calendar: xt,
|
|
577
577
|
dateInput: Nt,
|
|
578
|
-
datePicker:
|
|
579
|
-
rangeCalendar:
|
|
578
|
+
datePicker: Lt,
|
|
579
|
+
rangeCalendar: bt,
|
|
580
580
|
rangeDateInput: Ct,
|
|
581
581
|
rangeDatePicker: Gt,
|
|
582
582
|
repeater: qt,
|
|
583
|
-
custom:
|
|
583
|
+
custom: Ft
|
|
584
584
|
},
|
|
585
585
|
actions: {
|
|
586
586
|
button: _t,
|
|
587
587
|
submitButton: It,
|
|
588
|
-
custom:
|
|
588
|
+
custom: Yt
|
|
589
589
|
},
|
|
590
590
|
displays: {
|
|
591
591
|
display: Tt,
|
|
592
|
-
alert:
|
|
593
|
-
custom:
|
|
592
|
+
alert: $t,
|
|
593
|
+
custom: Kt
|
|
594
594
|
},
|
|
595
595
|
layouts: {
|
|
596
596
|
flex: m,
|
|
597
|
-
horizontalFlex:
|
|
597
|
+
horizontalFlex: Wt,
|
|
598
598
|
verticalFlex: jt,
|
|
599
|
-
grid:
|
|
600
|
-
horizontalGrid:
|
|
601
|
-
verticalGrid:
|
|
602
|
-
tabs:
|
|
603
|
-
accordion:
|
|
599
|
+
grid: f,
|
|
600
|
+
horizontalGrid: vt,
|
|
601
|
+
verticalGrid: zt,
|
|
602
|
+
tabs: Ht,
|
|
603
|
+
accordion: Xt,
|
|
604
604
|
custom: Vt
|
|
605
605
|
},
|
|
606
|
-
selectors:
|
|
606
|
+
selectors: c.root()
|
|
607
607
|
};
|
|
608
|
-
function
|
|
608
|
+
function oe(s, ...t) {
|
|
609
609
|
return t.map((e) => ({
|
|
610
610
|
...e,
|
|
611
611
|
targetState: s
|
|
612
612
|
}));
|
|
613
613
|
}
|
|
614
|
-
function
|
|
614
|
+
function ae(s, ...t) {
|
|
615
615
|
return {
|
|
616
616
|
kind: "aggregated",
|
|
617
617
|
matcher: (e) => e.tags?.includes(s) ?? !1,
|
|
@@ -631,10 +631,10 @@ class Ot {
|
|
|
631
631
|
};
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function ue() {
|
|
635
635
|
return new Ot();
|
|
636
636
|
}
|
|
637
|
-
const
|
|
637
|
+
const ye = (s) => s !== null && typeof s == "object" && Object.prototype.hasOwnProperty.call(s, "label") && Object.prototype.hasOwnProperty.call(s, "value");
|
|
638
638
|
function te(s) {
|
|
639
639
|
return typeof s == "object" && s !== null && "$ref" in s && typeof s.$ref == "string" && Object.keys(s).length === 1;
|
|
640
640
|
}
|
|
@@ -642,158 +642,24 @@ async function ee(s, t) {
|
|
|
642
642
|
const e = new URL(s, t).href, n = await fetch(e);
|
|
643
643
|
if (!n.ok) throw new Error(`Failed to load form chunk ${e}: ${n.status}`);
|
|
644
644
|
const { $schema: o, ...r } = await n.json();
|
|
645
|
-
return
|
|
645
|
+
return l(r, e);
|
|
646
646
|
}
|
|
647
|
-
async function
|
|
647
|
+
async function l(s, t) {
|
|
648
648
|
if (te(s)) return ee(s.$ref, t);
|
|
649
649
|
const e = s;
|
|
650
650
|
if (Array.isArray(e.children)) {
|
|
651
|
-
const n = await Promise.all(e.children.map((o) =>
|
|
651
|
+
const n = await Promise.all(e.children.map((o) => l(o, t)));
|
|
652
652
|
return { ...e, children: n };
|
|
653
653
|
}
|
|
654
654
|
return s;
|
|
655
655
|
}
|
|
656
|
-
async function
|
|
656
|
+
async function ce(s, t) {
|
|
657
657
|
const e = await Promise.all(
|
|
658
|
-
s.form.map((n) =>
|
|
658
|
+
s.form.map((n) => l(n, t))
|
|
659
659
|
);
|
|
660
660
|
return { ...s, form: e };
|
|
661
661
|
}
|
|
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
662
|
export {
|
|
796
|
-
fe as GolemWidgets,
|
|
797
663
|
ut as _gslAccordionByUid,
|
|
798
664
|
at as _gslAccordions,
|
|
799
665
|
J as _gslActionByUid,
|
|
@@ -801,109 +667,103 @@ export {
|
|
|
801
667
|
it as _gslAlertByUid,
|
|
802
668
|
nt as _gslAlerts,
|
|
803
669
|
Jt as _gslBooleanInputs,
|
|
804
|
-
|
|
670
|
+
F as _gslCalendarByUid,
|
|
805
671
|
G as _gslCalendars,
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
672
|
+
k as _gslCheckboxByUid,
|
|
673
|
+
M as _gslCheckboxes,
|
|
674
|
+
w as _gslCurrencies,
|
|
809
675
|
x as _gslCurrencyByUid,
|
|
810
676
|
pt as _gslCustomActionByUid,
|
|
811
677
|
dt as _gslCustomActions,
|
|
812
|
-
|
|
678
|
+
ft as _gslCustomDisplayByUid,
|
|
813
679
|
mt as _gslCustomDisplays,
|
|
814
|
-
|
|
815
|
-
|
|
680
|
+
ct as _gslCustomInputByUid,
|
|
681
|
+
yt as _gslCustomInputs,
|
|
816
682
|
gt as _gslCustomLayoutByUid,
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
683
|
+
lt as _gslCustomLayouts,
|
|
684
|
+
$ as _gslDateInputByUid,
|
|
685
|
+
Y as _gslDateInputs,
|
|
686
|
+
W as _gslDatePickerByUid,
|
|
687
|
+
K as _gslDatePickers,
|
|
822
688
|
st as _gslDisplayByUid,
|
|
823
689
|
et as _gslDisplays,
|
|
824
|
-
|
|
825
|
-
|
|
690
|
+
h as _gslDropdownByUid,
|
|
691
|
+
S as _gslDropdowns,
|
|
826
692
|
I as _gslInputByUid,
|
|
827
693
|
p as _gslInputs,
|
|
828
694
|
tt as _gslLayoutByUid,
|
|
829
695
|
O as _gslLayouts,
|
|
830
696
|
C as _gslListByUid,
|
|
831
|
-
|
|
832
|
-
|
|
697
|
+
b as _gslLists,
|
|
698
|
+
L as _gslMarkdownByUid,
|
|
833
699
|
N as _gslMarkdowns,
|
|
834
700
|
Zt as _gslNumberInputs,
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
701
|
+
P as _gslPasswordByUid,
|
|
702
|
+
R as _gslPasswords,
|
|
703
|
+
A as _gslRadiogroupByUid,
|
|
838
704
|
U as _gslRadiogroups,
|
|
839
|
-
|
|
705
|
+
v as _gslRangeCalendarByUid,
|
|
840
706
|
j as _gslRangeCalendars,
|
|
841
|
-
|
|
842
|
-
|
|
707
|
+
H as _gslRangeDateInputByUid,
|
|
708
|
+
z as _gslRangeDateInputs,
|
|
843
709
|
V as _gslRangeDatePickerByUid,
|
|
844
|
-
|
|
710
|
+
X as _gslRangeDatePickers,
|
|
845
711
|
Q as _gslRepeaterByUid,
|
|
846
712
|
q as _gslRepeaters,
|
|
847
713
|
E as _gslSelectByUid,
|
|
848
714
|
_ as _gslSelects,
|
|
849
|
-
|
|
715
|
+
oe as _gslStates,
|
|
850
716
|
rt as _gslTabs,
|
|
851
717
|
ot as _gslTabsByUid,
|
|
852
|
-
|
|
718
|
+
ae as _gslTag,
|
|
853
719
|
Qt as _gslTextInputs,
|
|
854
720
|
D as _gslTextareaByUid,
|
|
855
721
|
B as _gslTextareas,
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
722
|
+
Xt as _guiAccordion,
|
|
723
|
+
$t as _guiAlert,
|
|
724
|
+
ht as _guiBooleanInput,
|
|
859
725
|
_t as _guiButton,
|
|
860
726
|
xt as _guiCalendar,
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
727
|
+
kt as _guiCheckbox,
|
|
728
|
+
Rt as _guiCurrency,
|
|
729
|
+
Yt as _guiCustomAction,
|
|
730
|
+
Kt as _guiCustomDisplay,
|
|
731
|
+
Ft as _guiCustomInput,
|
|
866
732
|
Vt as _guiCustomLayout,
|
|
867
733
|
Nt as _guiDateInput,
|
|
868
|
-
|
|
734
|
+
Lt as _guiDatePicker,
|
|
869
735
|
Tt as _guiDisplay,
|
|
870
|
-
|
|
736
|
+
At as _guiDropdown,
|
|
871
737
|
m as _guiFlex,
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
738
|
+
f as _guiGrid,
|
|
739
|
+
Wt as _guiHorizontalFlex,
|
|
740
|
+
vt as _guiHorizontalGrid,
|
|
741
|
+
wt as _guiList,
|
|
742
|
+
Pt as _guiMarkdown,
|
|
743
|
+
St as _guiNumberInput,
|
|
878
744
|
Dt as _guiPassword,
|
|
879
|
-
|
|
880
|
-
|
|
745
|
+
Mt as _guiRadiogroup,
|
|
746
|
+
bt as _guiRangeCalendar,
|
|
881
747
|
Ct as _guiRangeDateInput,
|
|
882
748
|
Gt as _guiRangeDatePicker,
|
|
883
749
|
qt as _guiRepeater,
|
|
884
750
|
Ut as _guiSelect,
|
|
885
751
|
It as _guiSubmitButton,
|
|
886
|
-
|
|
752
|
+
Ht as _guiTabs,
|
|
887
753
|
Et as _guiTextInput,
|
|
888
754
|
Bt as _guiTextarea,
|
|
889
755
|
jt as _guiVerticalFlex,
|
|
890
|
-
|
|
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
|
|
756
|
+
zt as _guiVerticalGrid,
|
|
757
|
+
me as createGslSelector,
|
|
758
|
+
fe as defineShortcutType,
|
|
759
|
+
le as extractWidgetProps,
|
|
760
|
+
ge as formDefs,
|
|
761
|
+
ue as golemForm,
|
|
762
|
+
re as gui,
|
|
763
|
+
Te as isDxDefinitions,
|
|
764
|
+
ye as isOption,
|
|
765
|
+
Ie as processAutoLabel,
|
|
766
|
+
_e as processAutoPlaceholder,
|
|
767
|
+
ce as resolveChunkRefs,
|
|
768
|
+
Ee as resolveFormInput
|
|
909
769
|
};
|