@golemui/gui-shared 0.17.0 → 1.0.0-rc.0

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.
@@ -0,0 +1,1399 @@
1
+ import "@golemui/core";
2
+ const m = {
3
+ INPUTS: "INPUTS",
4
+ ACTIONS: "ACTIONS",
5
+ LAYOUTS: "LAYOUTS",
6
+ DISPLAYS: "DISPLAYS"
7
+ };
8
+ function U(e) {
9
+ return function(t, s = () => !0) {
10
+ return {
11
+ kind: "leaf",
12
+ selectorType: e,
13
+ matcher: s,
14
+ config: t
15
+ };
16
+ };
17
+ }
18
+ function y(e, t) {
19
+ return typeof e == "function" ? e : { type: t, ...e ?? {} };
20
+ }
21
+ function ce(e, t, s) {
22
+ if (typeof t == "function") {
23
+ const n = t;
24
+ return {
25
+ items: [{ key: e, def: (o) => ({ type: "text", ...n(o) }) }],
26
+ type: "ITEMS",
27
+ itemType: m.INPUTS,
28
+ tags: s ?? []
29
+ };
30
+ }
31
+ const a = { type: "text", ...t };
32
+ return {
33
+ items: [{ key: e, def: a }],
34
+ type: "ITEMS",
35
+ itemType: m.INPUTS,
36
+ tags: s ?? []
37
+ };
38
+ }
39
+ function ye(e, t, s) {
40
+ if (typeof t == "function") {
41
+ const n = t;
42
+ return {
43
+ items: [{ key: e, def: (o) => ({ type: "number", ...n(o) }) }],
44
+ type: "ITEMS",
45
+ itemType: m.INPUTS,
46
+ tags: s ?? []
47
+ };
48
+ }
49
+ const a = { type: "number", ...t };
50
+ return {
51
+ items: [{ key: e, def: a }],
52
+ type: "ITEMS",
53
+ itemType: m.INPUTS,
54
+ tags: s ?? []
55
+ };
56
+ }
57
+ function me(e, t, s) {
58
+ if (typeof t == "function") {
59
+ const n = t;
60
+ return {
61
+ items: [{ key: e, def: (o) => ({ type: "boolean", ...n(o) }) }],
62
+ type: "ITEMS",
63
+ itemType: m.INPUTS,
64
+ tags: s ?? []
65
+ };
66
+ }
67
+ const a = { type: "boolean", ...t };
68
+ return {
69
+ items: [{ key: e, def: a }],
70
+ type: "ITEMS",
71
+ itemType: m.INPUTS,
72
+ tags: s ?? []
73
+ };
74
+ }
75
+ function Te(e, t, s) {
76
+ if (typeof t == "function") {
77
+ const i = t;
78
+ return { type: "ITEMS", itemType: "SELECT", items: [{ key: e, def: (l) => ({ type: "select", ...i(l) }) }], tags: s ?? [] };
79
+ }
80
+ const a = { type: "select", ...t };
81
+ return { type: "ITEMS", itemType: "SELECT", items: [{ key: e, def: a }], tags: s ?? [] };
82
+ }
83
+ function ge(e, t, s) {
84
+ if (typeof t == "function") {
85
+ const i = t;
86
+ return { type: "ITEMS", itemType: "DROPDOWN", items: [{ key: e, def: (l) => ({
87
+ type: "dropdown",
88
+ ...i(l)
89
+ }) }], tags: s ?? [] };
90
+ }
91
+ const a = { type: "dropdown", ...t };
92
+ return { type: "ITEMS", itemType: "DROPDOWN", items: [{ key: e, def: a }], tags: s ?? [] };
93
+ }
94
+ function be(e, t, s) {
95
+ if (typeof t == "function") {
96
+ const i = t;
97
+ return { type: "ITEMS", itemType: "RADIOGROUP", items: [{ key: e, def: (l) => ({ type: "radiogroup", ...i(l) }) }], tags: s ?? [] };
98
+ }
99
+ const a = { type: "radiogroup", ...t };
100
+ return { type: "ITEMS", itemType: "RADIOGROUP", items: [{ key: e, def: a }], tags: s ?? [] };
101
+ }
102
+ function he(e, t, s) {
103
+ if (typeof t == "function") {
104
+ const i = t;
105
+ return { type: "ITEMS", itemType: "CHECKBOX", items: [{ key: e, def: (l) => ({ type: "checkbox", ...i(l) }) }], tags: s ?? [] };
106
+ }
107
+ const a = { type: "checkbox", ...t };
108
+ return { type: "ITEMS", itemType: "CHECKBOX", items: [{ key: e, def: a }], tags: s ?? [] };
109
+ }
110
+ function _e(e, t, s) {
111
+ if (typeof t == "function") {
112
+ const i = t;
113
+ return { type: "ITEMS", itemType: "TEXTAREA", items: [{ key: e, def: (l) => ({ type: "textarea", ...i(l) }) }], tags: s ?? [] };
114
+ }
115
+ const a = { type: "textarea", ...t };
116
+ return { type: "ITEMS", itemType: "TEXTAREA", items: [{ key: e, def: a }], tags: s ?? [] };
117
+ }
118
+ function Se(e, t, s) {
119
+ if (typeof t == "function") {
120
+ const i = t;
121
+ return { type: "ITEMS", itemType: "PASSWORD", items: [{ key: e, def: (l) => ({ type: "password", ...i(l) }) }], tags: s ?? [] };
122
+ }
123
+ const a = { type: "password", ...t };
124
+ return { type: "ITEMS", itemType: "PASSWORD", items: [{ key: e, def: a }], tags: s ?? [] };
125
+ }
126
+ function Ae(e, t, s) {
127
+ if (typeof t == "function") {
128
+ const i = t;
129
+ return { type: "ITEMS", itemType: "CURRENCY", items: [{ key: e, def: (l) => ({ type: "currency", ...i(l) }) }], tags: s ?? [] };
130
+ }
131
+ const a = { type: "currency", ...t };
132
+ return { type: "ITEMS", itemType: "CURRENCY", items: [{ key: e, def: a }], tags: s ?? [] };
133
+ }
134
+ function Ie(e, t, s) {
135
+ if (typeof t == "function") {
136
+ const i = t;
137
+ return { type: "ITEMS", itemType: "MARKDOWN", items: [{ key: e, def: (l) => ({ type: "markdown", ...i(l) }) }], tags: s ?? [] };
138
+ }
139
+ const a = { type: "markdown", ...t };
140
+ return { type: "ITEMS", itemType: "MARKDOWN", items: [{ key: e, def: a }], tags: s ?? [] };
141
+ }
142
+ function Ee(e, t, s) {
143
+ if (typeof t == "function") {
144
+ const i = t;
145
+ return { type: "ITEMS", itemType: "LIST", items: [{ key: e, def: (l) => ({ type: "list", ...i(l) }) }], tags: s ?? [] };
146
+ }
147
+ const a = { type: "list", ...t };
148
+ return { type: "ITEMS", itemType: "LIST", items: [{ key: e, def: a }], tags: s ?? [] };
149
+ }
150
+ function fe(e, t, s) {
151
+ if (typeof t == "function") {
152
+ const n = t;
153
+ return {
154
+ items: [(o) => ({
155
+ type: "calendar",
156
+ path: e,
157
+ ...n(o)
158
+ })],
159
+ type: "ITEMS",
160
+ itemType: "CALENDAR",
161
+ tags: s ?? []
162
+ };
163
+ }
164
+ return {
165
+ items: [{ type: "calendar", path: e, ...t }],
166
+ type: "ITEMS",
167
+ itemType: "CALENDAR",
168
+ tags: s ?? []
169
+ };
170
+ }
171
+ function ke(e, t, s) {
172
+ if (typeof t == "function") {
173
+ const i = t;
174
+ return { type: "ITEMS", itemType: "DATE_INPUT", items: [{ key: e, def: (l) => ({ type: "dateInput", ...i(l) }) }], tags: s ?? [] };
175
+ }
176
+ const a = { type: "dateInput", ...t };
177
+ return { type: "ITEMS", itemType: "DATE_INPUT", items: [{ key: e, def: a }], tags: s ?? [] };
178
+ }
179
+ function Ue(e, t, s) {
180
+ if (typeof t == "function") {
181
+ const i = t;
182
+ return { type: "ITEMS", itemType: "DATE_PICKER", items: [{ key: e, def: (l) => ({
183
+ type: "datePicker",
184
+ ...i(l)
185
+ }) }], tags: s ?? [] };
186
+ }
187
+ const a = { type: "datePicker", ...t };
188
+ return { type: "ITEMS", itemType: "DATE_PICKER", items: [{ key: e, def: a }], tags: s ?? [] };
189
+ }
190
+ function Pe(e, t, s) {
191
+ if (typeof t == "function") {
192
+ const i = t;
193
+ return { type: "ITEMS", itemType: "RANGE_CALENDAR", items: [{ key: e, def: (l) => ({
194
+ type: "rangeCalendar",
195
+ ...i(l)
196
+ }) }], tags: s ?? [] };
197
+ }
198
+ const a = { type: "rangeCalendar", ...t };
199
+ return { type: "ITEMS", itemType: "RANGE_CALENDAR", items: [{ key: e, def: a }], tags: s ?? [] };
200
+ }
201
+ function Le(e, t, s) {
202
+ if (typeof t == "function") {
203
+ const i = t;
204
+ return { type: "ITEMS", itemType: "RANGE_DATE_INPUT", items: [{ key: e, def: (l) => ({
205
+ type: "rangeDateInput",
206
+ ...i(l)
207
+ }) }], tags: s ?? [] };
208
+ }
209
+ const a = { type: "rangeDateInput", ...t };
210
+ return { type: "ITEMS", itemType: "RANGE_DATE_INPUT", items: [{ key: e, def: a }], tags: s ?? [] };
211
+ }
212
+ function De(e, t, s) {
213
+ if (typeof t == "function") {
214
+ const i = t;
215
+ return { type: "ITEMS", itemType: "RANGE_DATE_PICKER", items: [{ key: e, def: (l) => ({
216
+ type: "rangeDatePicker",
217
+ ...i(l)
218
+ }) }], tags: s ?? [] };
219
+ }
220
+ const a = { type: "rangeDatePicker", ...t };
221
+ return { type: "ITEMS", itemType: "RANGE_DATE_PICKER", items: [{ key: e, def: a }], tags: s ?? [] };
222
+ }
223
+ function Me(e, t, s, a) {
224
+ if (typeof s == "function") {
225
+ const o = s;
226
+ return { type: "ITEMS", itemType: "CUSTOM_INPUT", items: [{ key: t, def: (p) => ({
227
+ customType: e,
228
+ ...o(p)
229
+ }) }], tags: a ?? [] };
230
+ }
231
+ const n = { customType: e, ...s };
232
+ return { type: "ITEMS", itemType: "CUSTOM_INPUT", items: [{ key: t, def: n }], tags: a ?? [] };
233
+ }
234
+ function Ce(e, t) {
235
+ return {
236
+ items: [e],
237
+ type: "ITEMS",
238
+ itemType: m.ACTIONS,
239
+ tags: t ?? []
240
+ };
241
+ }
242
+ function ve(e, t, s) {
243
+ if (typeof t == "function") {
244
+ const i = t;
245
+ return { type: "ITEMS", itemType: "CUSTOM_ACTION", items: [
246
+ (r) => ({ customType: e, ...i(r) })
247
+ ], tags: s ?? [] };
248
+ }
249
+ return { type: "ITEMS", itemType: "CUSTOM_ACTION", items: [{ customType: e, ...t }], tags: s ?? [] };
250
+ }
251
+ const Be = (e, t) => ({
252
+ type: "ITEMS",
253
+ itemType: m.DISPLAYS,
254
+ items: [{ render: e }],
255
+ tags: t ?? []
256
+ });
257
+ function we(e, t) {
258
+ return { type: "ITEMS", itemType: "ALERTS", items: [e], tags: t ?? [] };
259
+ }
260
+ function Ne(e, t) {
261
+ return { type: "ITEMS", itemType: "MARKDOWN_TEXTS", items: [e], tags: t ?? [] };
262
+ }
263
+ function We(e, t, s) {
264
+ if (typeof t == "function") {
265
+ const r = t;
266
+ return { type: "ITEMS", itemType: "CUSTOM_DISPLAY", items: [
267
+ (p) => ({ customType: e, ...r(p) })
268
+ ], tags: s ?? [] };
269
+ }
270
+ const { uid: a, ...n } = t ?? {};
271
+ return { type: "ITEMS", itemType: "CUSTOM_DISPLAY", items: [{
272
+ customType: e,
273
+ ...a != null ? { uid: a } : {},
274
+ props: Object.keys(n).length > 0 ? n : void 0
275
+ }], tags: s ?? [] };
276
+ }
277
+ const P = (e, t, s) => ({
278
+ type: "ITEMS",
279
+ itemType: m.LAYOUTS,
280
+ items: [{ def: { widgetName: "flex", ...t ?? {} }, children: e }],
281
+ tags: s ?? []
282
+ }), Re = (e, t, s) => P(e, { direction: "row", ...t ?? {} }, s), Oe = (e, t, s) => P(e, { direction: "column", ...t ?? {} }, s), L = (e, t, s) => ({
283
+ type: "ITEMS",
284
+ itemType: m.LAYOUTS,
285
+ items: [
286
+ {
287
+ def: {
288
+ widgetName: "grid",
289
+ direction: "row",
290
+ autoFit: !0,
291
+ ...t ?? {}
292
+ },
293
+ children: e
294
+ }
295
+ ],
296
+ tags: s ?? []
297
+ }), xe = (e, t, s) => L(e, { direction: "row", ...t ?? {} }, s), Ye = (e, t, s) => L(e, { direction: "column", ...t ?? {} }, s);
298
+ function f(e) {
299
+ return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
300
+ }
301
+ function $e(e, t, s) {
302
+ const a = e.map((o) => ({
303
+ label: o.label,
304
+ uid: o.uid ?? f(o.label)
305
+ })), n = e.map((o) => ({
306
+ type: "ITEMS",
307
+ itemType: m.LAYOUTS,
308
+ items: [
309
+ {
310
+ def: { uid: o.uid ?? f(o.label), direction: "column", widgetName: "flex" },
311
+ children: o.children
312
+ }
313
+ ],
314
+ tags: []
315
+ }));
316
+ return {
317
+ type: "ITEMS",
318
+ itemType: "TABS",
319
+ items: [{ def: {
320
+ tabs: a,
321
+ ...t
322
+ }, children: n }],
323
+ tags: s ?? []
324
+ };
325
+ }
326
+ function k(e) {
327
+ return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
328
+ }
329
+ function Ge(e, t, s) {
330
+ const a = e.map((o) => ({
331
+ label: o.label,
332
+ uid: o.uid ?? k(o.label)
333
+ })), n = e.map((o) => ({
334
+ type: "ITEMS",
335
+ itemType: m.LAYOUTS,
336
+ items: [
337
+ {
338
+ def: { uid: o.uid ?? k(o.label), direction: "column", widgetName: "flex" },
339
+ children: o.children
340
+ }
341
+ ],
342
+ tags: []
343
+ }));
344
+ return {
345
+ type: "ITEMS",
346
+ itemType: "ACCORDION",
347
+ items: [{ def: {
348
+ sections: a,
349
+ ...t
350
+ }, children: n }],
351
+ tags: s ?? []
352
+ };
353
+ }
354
+ function Fe(e, t, s, a) {
355
+ if (typeof s == "function") {
356
+ const o = s;
357
+ return { type: "ITEMS", itemType: "CUSTOM_LAYOUT", items: [{ def: (p) => ({
358
+ customType: e,
359
+ ...o(p)
360
+ }), children: t }], tags: a ?? [] };
361
+ }
362
+ return { type: "ITEMS", itemType: "CUSTOM_LAYOUT", items: [{ def: { customType: e, ...s }, children: t }], tags: a ?? [] };
363
+ }
364
+ function Ke(e, t, s) {
365
+ const { template: a, ...n } = t;
366
+ return {
367
+ type: "ITEMS",
368
+ itemType: "REPEATER",
369
+ items: [{ key: e, def: n, children: a }],
370
+ tags: s ?? []
371
+ };
372
+ }
373
+ function ze(e, t, s) {
374
+ if (typeof t == "function") {
375
+ const i = t;
376
+ return { type: "ITEMS", itemType: "TAGS", items: [{ key: e, def: (l) => ({ type: "tags", ...i(l) }) }], tags: s ?? [] };
377
+ }
378
+ const a = { type: "tags", ...t };
379
+ return { type: "ITEMS", itemType: "TAGS", items: [{ key: e, def: a }], tags: s ?? [] };
380
+ }
381
+ const S = /* @__PURE__ */ new Map();
382
+ function D(e, t) {
383
+ if (S.has(e))
384
+ throw new Error(`Item type "${e}" is already registered.`);
385
+ S.set(e, t);
386
+ }
387
+ function He(e) {
388
+ const t = S.get(e);
389
+ if (!t)
390
+ throw new Error(
391
+ `No handler registered for item type "${e}". Did you forget to import the registration module?`
392
+ );
393
+ return t;
394
+ }
395
+ function Ve(e) {
396
+ return S.has(e);
397
+ }
398
+ function u(e) {
399
+ const t = (r) => {
400
+ if (!e.sensibleDefaults)
401
+ return {};
402
+ let l = { ...e.sensibleDefaults.base };
403
+ for (const p of r) {
404
+ const T = p.config;
405
+ for (const h of e.sensibleDefaults.fields) {
406
+ const b = h;
407
+ T[b] != null && (l = { ...l, [b]: T[b] });
408
+ }
409
+ }
410
+ return l;
411
+ }, s = (r, l) => e.sensibleDefaults ? e.sensibleDefaults.apply(r, l) : r, a = (r) => {
412
+ switch (e.entryShape) {
413
+ case "bare":
414
+ return { baseDef: r };
415
+ case "keyed": {
416
+ const l = r;
417
+ return { baseDef: l.def, path: l.key };
418
+ }
419
+ case "compound": {
420
+ const l = r;
421
+ return { baseDef: l.def, children: l.children };
422
+ }
423
+ }
424
+ }, n = {
425
+ rollUpSensibleDefaults: t,
426
+ applySensibleDefaults: s,
427
+ mapToWidget: e.mapToWidget,
428
+ parseEntry: a,
429
+ ...e.afterMerge ? { afterMerge: e.afterMerge } : {},
430
+ ...e.buildCustomWidget ? { buildCustomWidget: e.buildCustomWidget } : {},
431
+ ...e.getChildren ? { getChildren: e.getChildren } : {}
432
+ };
433
+ D(e.itemType, n);
434
+ const i = U(e.itemType);
435
+ return { gsl: i, gslByUid: (r, l) => i(l, ((p) => p.uid === r)) };
436
+ }
437
+ function d(e) {
438
+ const {
439
+ uid: t,
440
+ path: s,
441
+ label: a,
442
+ disabled: n,
443
+ readonly: i,
444
+ defaultValue: o,
445
+ tags: r,
446
+ type: l,
447
+ size: p,
448
+ onLoad: T,
449
+ onChange: h,
450
+ onFilter: b,
451
+ on: A,
452
+ states: _,
453
+ include: re,
454
+ exclude: ue,
455
+ validator: pe,
456
+ ...v
457
+ } = e;
458
+ return v;
459
+ }
460
+ function B(e) {
461
+ return e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w/g, (t) => t.toUpperCase()) : "";
462
+ }
463
+ function c(e, t) {
464
+ return e.label != null || t.suppressAutomaticLabels || !e.path ? e : { ...e, label: B(e.path) };
465
+ }
466
+ function g(e, t) {
467
+ return e.placeholder != null || t.suppressAutomaticPlaceholders || !e.path ? e : { ...e, placeholder: e.path };
468
+ }
469
+ function w(e) {
470
+ switch (e.type) {
471
+ case "text":
472
+ return W(e);
473
+ case "number":
474
+ return R(e);
475
+ case "boolean":
476
+ return N(e);
477
+ default:
478
+ throw new Error(`Unsupported field type "${e.type}"`);
479
+ }
480
+ }
481
+ function N(e) {
482
+ const t = d(e);
483
+ return {
484
+ uid: e.uid ?? "",
485
+ kind: "input",
486
+ type: "toggle",
487
+ path: e.path ?? "",
488
+ ...e.label != null ? { label: e.label } : {},
489
+ ...e.disabled != null ? { disabled: e.disabled } : {},
490
+ ...e.readonly != null ? { readonly: e.readonly } : {},
491
+ ...e.validator != null ? { validator: y(e.validator, "boolean") } : {},
492
+ props: t
493
+ };
494
+ }
495
+ function W(e) {
496
+ const t = d(e);
497
+ return {
498
+ uid: e.uid ?? "",
499
+ kind: "input",
500
+ type: "textinput",
501
+ path: e.path ?? "",
502
+ ...e.label != null ? { label: e.label } : {},
503
+ ...e.disabled != null ? { disabled: e.disabled } : {},
504
+ ...e.readonly != null ? { readonly: e.readonly } : {},
505
+ props: {
506
+ placeholder: t.placeholder ?? "",
507
+ ...t
508
+ },
509
+ validator: y(e.validator, "string")
510
+ };
511
+ }
512
+ function R(e) {
513
+ const t = d(e);
514
+ return {
515
+ uid: e.uid ?? "",
516
+ kind: "input",
517
+ type: "number",
518
+ path: e.path ?? "",
519
+ ...e.label != null ? { label: e.label } : {},
520
+ ...e.disabled != null ? { disabled: e.disabled } : {},
521
+ ...e.readonly != null ? { readonly: e.readonly } : {},
522
+ props: {
523
+ placeholder: t.placeholder ?? "",
524
+ ...t
525
+ },
526
+ validator: y(e.validator, "number")
527
+ };
528
+ }
529
+ const { gsl: E, gslByUid: Xe } = u({
530
+ itemType: "INPUTS",
531
+ entryShape: "keyed",
532
+ sensibleDefaults: {
533
+ base: {
534
+ suppressAutomaticLabels: !1,
535
+ suppressAutomaticPlaceholders: !1
536
+ },
537
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
538
+ apply: (e, t) => {
539
+ let s = c(e, t);
540
+ return s = g(s, t), s;
541
+ }
542
+ },
543
+ mapToWidget: w
544
+ }), je = (e) => E(e, (t) => t.type === "text"), qe = (e) => E(e, (t) => t.type === "number"), Je = (e) => E(e, (t) => t.type === "boolean"), { gsl: Ze, gslByUid: Qe } = u({
545
+ itemType: "SELECT",
546
+ entryShape: "keyed",
547
+ sensibleDefaults: {
548
+ base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
549
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
550
+ apply: (e, t) => g(c(e, t), t)
551
+ },
552
+ mapToWidget: (e) => ({
553
+ uid: e.uid ?? "",
554
+ kind: "input",
555
+ type: "select",
556
+ path: e.path ?? "",
557
+ ...e.label != null ? { label: e.label } : {},
558
+ ...e.disabled != null ? { disabled: e.disabled } : {},
559
+ ...e.readonly != null ? { readonly: e.readonly } : {},
560
+ ...e.validator != null ? { validator: e.validator } : {},
561
+ props: d(e)
562
+ })
563
+ }), { gsl: et, gslByUid: tt } = u({
564
+ itemType: "DROPDOWN",
565
+ entryShape: "keyed",
566
+ sensibleDefaults: {
567
+ base: {
568
+ suppressAutomaticLabels: !1,
569
+ suppressAutomaticPlaceholders: !1
570
+ },
571
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
572
+ apply: (e, t) => g(c(e, t), t)
573
+ },
574
+ mapToWidget: (e) => ({
575
+ uid: e.uid ?? "",
576
+ kind: "input",
577
+ type: "dropdown",
578
+ path: e.path ?? "",
579
+ ...e.label != null ? { label: e.label } : {},
580
+ ...e.disabled != null ? { disabled: e.disabled } : {},
581
+ ...e.readonly != null ? { readonly: e.readonly } : {},
582
+ ...e.validator != null ? { validator: e.validator } : {},
583
+ props: d(e)
584
+ })
585
+ }), { gsl: st, gslByUid: at } = u({
586
+ itemType: "RADIOGROUP",
587
+ entryShape: "keyed",
588
+ sensibleDefaults: {
589
+ base: { suppressAutomaticLabels: !1 },
590
+ fields: ["suppressAutomaticLabels"],
591
+ apply: (e, t) => c(e, t)
592
+ },
593
+ mapToWidget: (e) => ({
594
+ uid: e.uid ?? "",
595
+ kind: "input",
596
+ type: "radiogroup",
597
+ path: e.path ?? "",
598
+ ...e.label != null ? { label: e.label } : {},
599
+ ...e.disabled != null ? { disabled: e.disabled } : {},
600
+ ...e.readonly != null ? { readonly: e.readonly } : {},
601
+ ...e.validator != null ? { validator: e.validator } : {},
602
+ props: d(e)
603
+ })
604
+ }), { gsl: nt, gslByUid: it } = u({
605
+ itemType: "CHECKBOX",
606
+ entryShape: "keyed",
607
+ sensibleDefaults: {
608
+ base: { suppressAutomaticLabels: !1 },
609
+ fields: ["suppressAutomaticLabels"],
610
+ apply: (e, t) => c(e, t)
611
+ },
612
+ mapToWidget: (e) => ({
613
+ uid: e.uid ?? "",
614
+ kind: "input",
615
+ type: "checkbox",
616
+ path: e.path ?? "",
617
+ ...e.label != null ? { label: e.label } : {},
618
+ ...e.disabled != null ? { disabled: e.disabled } : {},
619
+ ...e.readonly != null ? { readonly: e.readonly } : {},
620
+ ...e.validator != null ? { validator: y(e.validator, "boolean") } : {},
621
+ props: d(e)
622
+ })
623
+ }), { gsl: lt, gslByUid: ot } = u({
624
+ itemType: "TEXTAREA",
625
+ entryShape: "keyed",
626
+ sensibleDefaults: {
627
+ base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
628
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
629
+ apply: (e, t) => g(c(e, t), t)
630
+ },
631
+ mapToWidget: (e) => ({
632
+ uid: e.uid ?? "",
633
+ kind: "input",
634
+ type: "textarea",
635
+ path: e.path ?? "",
636
+ ...e.label != null ? { label: e.label } : {},
637
+ ...e.disabled != null ? { disabled: e.disabled } : {},
638
+ ...e.readonly != null ? { readonly: e.readonly } : {},
639
+ ...e.validator != null ? { validator: y(e.validator, "string") } : {},
640
+ props: d(e)
641
+ })
642
+ }), { gsl: rt, gslByUid: ut } = u({
643
+ itemType: "PASSWORD",
644
+ entryShape: "keyed",
645
+ sensibleDefaults: {
646
+ base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
647
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
648
+ apply: (e, t) => g(c(e, t), t)
649
+ },
650
+ mapToWidget: (e) => ({
651
+ uid: e.uid ?? "",
652
+ kind: "input",
653
+ type: "password",
654
+ path: e.path ?? "",
655
+ ...e.label != null ? { label: e.label } : {},
656
+ ...e.disabled != null ? { disabled: e.disabled } : {},
657
+ ...e.readonly != null ? { readonly: e.readonly } : {},
658
+ ...e.validator != null ? { validator: y(e.validator, "string") } : {},
659
+ props: d(e)
660
+ })
661
+ }), { gsl: pt, gslByUid: dt } = u({
662
+ itemType: "CURRENCY",
663
+ entryShape: "keyed",
664
+ sensibleDefaults: {
665
+ base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
666
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
667
+ apply: (e, t) => g(c(e, t), t)
668
+ },
669
+ mapToWidget: (e) => ({
670
+ uid: e.uid ?? "",
671
+ kind: "input",
672
+ type: "currency",
673
+ path: e.path ?? "",
674
+ ...e.label != null ? { label: e.label } : {},
675
+ ...e.disabled != null ? { disabled: e.disabled } : {},
676
+ ...e.readonly != null ? { readonly: e.readonly } : {},
677
+ ...e.validator != null ? { validator: y(e.validator, "number") } : {},
678
+ props: d(e)
679
+ })
680
+ }), { gsl: ct, gslByUid: yt } = u({
681
+ itemType: "MARKDOWN",
682
+ entryShape: "keyed",
683
+ sensibleDefaults: {
684
+ base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
685
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
686
+ apply: (e, t) => g(c(e, t), t)
687
+ },
688
+ mapToWidget: (e) => ({
689
+ uid: e.uid ?? "",
690
+ kind: "input",
691
+ type: "markdown",
692
+ path: e.path ?? "",
693
+ ...e.label != null ? { label: e.label } : {},
694
+ ...e.disabled != null ? { disabled: e.disabled } : {},
695
+ ...e.readonly != null ? { readonly: e.readonly } : {},
696
+ ...e.validator != null ? { validator: y(e.validator, "string") } : {},
697
+ props: d(e)
698
+ })
699
+ }), { gsl: mt, gslByUid: Tt } = u({
700
+ itemType: "LIST",
701
+ entryShape: "keyed",
702
+ sensibleDefaults: {
703
+ base: { suppressAutomaticLabels: !1 },
704
+ fields: ["suppressAutomaticLabels"],
705
+ apply: (e, t) => c(e, t)
706
+ },
707
+ mapToWidget: (e) => ({
708
+ uid: e.uid ?? "",
709
+ kind: "input",
710
+ type: "list",
711
+ path: e.path ?? "",
712
+ ...e.label != null ? { label: e.label } : {},
713
+ ...e.disabled != null ? { disabled: e.disabled } : {},
714
+ ...e.readonly != null ? { readonly: e.readonly } : {},
715
+ ...e.validator != null ? { validator: e.validator } : {},
716
+ props: d(e)
717
+ })
718
+ }), { gsl: gt, gslByUid: bt } = u({
719
+ itemType: "CALENDAR",
720
+ entryShape: "bare",
721
+ sensibleDefaults: {
722
+ base: { suppressAutomaticLabels: !1 },
723
+ fields: ["suppressAutomaticLabels"],
724
+ apply: (e, t) => c(e, t)
725
+ },
726
+ mapToWidget: (e) => ({
727
+ uid: e.uid ?? "",
728
+ kind: "input",
729
+ type: "calendar",
730
+ path: e.path ?? "",
731
+ ...e.label != null ? { label: e.label } : {},
732
+ ...e.disabled != null ? { disabled: e.disabled } : {},
733
+ ...e.readonly != null ? { readonly: e.readonly } : {},
734
+ ...e.validator != null ? { validator: y(e.validator, "string") } : {},
735
+ props: d(e)
736
+ })
737
+ }), { gsl: ht, gslByUid: _t } = u({
738
+ itemType: "DATE_INPUT",
739
+ entryShape: "keyed",
740
+ sensibleDefaults: {
741
+ base: { suppressAutomaticLabels: !1 },
742
+ fields: ["suppressAutomaticLabels"],
743
+ apply: (e, t) => c(e, t)
744
+ },
745
+ mapToWidget: (e) => ({
746
+ uid: e.uid ?? "",
747
+ kind: "input",
748
+ type: "dateInput",
749
+ path: e.path ?? "",
750
+ ...e.label != null ? { label: e.label } : {},
751
+ ...e.disabled != null ? { disabled: e.disabled } : {},
752
+ ...e.readonly != null ? { readonly: e.readonly } : {},
753
+ ...e.validator != null ? { validator: y(e.validator, "string") } : {},
754
+ props: d(e)
755
+ })
756
+ }), { gsl: St, gslByUid: At } = u({
757
+ itemType: "DATE_PICKER",
758
+ entryShape: "keyed",
759
+ sensibleDefaults: {
760
+ base: {
761
+ suppressAutomaticLabels: !1,
762
+ suppressAutomaticPlaceholders: !1
763
+ },
764
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
765
+ apply: (e, t) => g(c(e, t), t)
766
+ },
767
+ mapToWidget: (e) => ({
768
+ uid: e.uid ?? "",
769
+ kind: "input",
770
+ type: "datePicker",
771
+ path: e.path ?? "",
772
+ ...e.label != null ? { label: e.label } : {},
773
+ ...e.disabled != null ? { disabled: e.disabled } : {},
774
+ ...e.readonly != null ? { readonly: e.readonly } : {},
775
+ ...e.validator != null ? { validator: y(e.validator, "string") } : {},
776
+ props: d(e)
777
+ })
778
+ }), { gsl: It, gslByUid: Et } = u({
779
+ itemType: "RANGE_CALENDAR",
780
+ entryShape: "keyed",
781
+ sensibleDefaults: {
782
+ base: { suppressAutomaticLabels: !1 },
783
+ fields: ["suppressAutomaticLabels"],
784
+ apply: (e, t) => c(e, t)
785
+ },
786
+ mapToWidget: (e) => ({
787
+ uid: e.uid ?? "",
788
+ kind: "input",
789
+ type: "rangeCalendar",
790
+ path: e.path ?? "",
791
+ ...e.label != null ? { label: e.label } : {},
792
+ ...e.disabled != null ? { disabled: e.disabled } : {},
793
+ ...e.readonly != null ? { readonly: e.readonly } : {},
794
+ ...e.validator != null ? { validator: y(e.validator, "array") } : {},
795
+ props: d(e)
796
+ })
797
+ }), { gsl: ft, gslByUid: kt } = u({
798
+ itemType: "RANGE_DATE_INPUT",
799
+ entryShape: "keyed",
800
+ sensibleDefaults: {
801
+ base: { suppressAutomaticLabels: !1 },
802
+ fields: ["suppressAutomaticLabels"],
803
+ apply: (e, t) => c(e, t)
804
+ },
805
+ mapToWidget: (e) => ({
806
+ uid: e.uid ?? "",
807
+ kind: "input",
808
+ type: "rangeDateInput",
809
+ path: e.path ?? "",
810
+ ...e.label != null ? { label: e.label } : {},
811
+ ...e.disabled != null ? { disabled: e.disabled } : {},
812
+ ...e.readonly != null ? { readonly: e.readonly } : {},
813
+ ...e.validator != null ? { validator: y(e.validator, "array") } : {},
814
+ props: d(e)
815
+ })
816
+ }), { gsl: Ut, gslByUid: Pt } = u({
817
+ itemType: "RANGE_DATE_PICKER",
818
+ entryShape: "keyed",
819
+ sensibleDefaults: {
820
+ base: {
821
+ suppressAutomaticLabels: !1,
822
+ suppressAutomaticPlaceholders: !1
823
+ },
824
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
825
+ apply: (e, t) => g(c(e, t), t)
826
+ },
827
+ mapToWidget: (e) => ({
828
+ uid: e.uid ?? "",
829
+ kind: "input",
830
+ type: "rangeDatePicker",
831
+ path: e.path ?? "",
832
+ ...e.label != null ? { label: e.label } : {},
833
+ ...e.disabled != null ? { disabled: e.disabled } : {},
834
+ ...e.readonly != null ? { readonly: e.readonly } : {},
835
+ ...e.validator != null ? { validator: y(e.validator, "array") } : {},
836
+ props: d(e)
837
+ })
838
+ });
839
+ function O(e) {
840
+ const t = {};
841
+ return e.addLabel != null && (t.addLabel = e.addLabel), e.removeLabel != null && (t.removeLabel = e.removeLabel), e.limit != null && (t.limit = e.limit), e.title != null && (t.title = e.title), e.addButtonIcon != null && (t.addButtonIcon = e.addButtonIcon), e.removeButtonIcon != null && (t.removeButtonIcon = e.removeButtonIcon), t;
842
+ }
843
+ function x(e) {
844
+ return {
845
+ uid: e.uid ?? "",
846
+ kind: "input",
847
+ type: "repeater",
848
+ path: e.path ?? "",
849
+ ...e.label != null ? { label: e.label } : {},
850
+ ...e.disabled != null ? { disabled: e.disabled } : {},
851
+ ...e.readonly != null ? { readonly: e.readonly } : {},
852
+ ...e.validator != null ? { validator: y(e.validator, "array") } : {},
853
+ props: {
854
+ ...O(e),
855
+ template: { kind: "layout", type: "flex", children: [], props: { direction: "column" } }
856
+ }
857
+ };
858
+ }
859
+ function I(e, t) {
860
+ for (const s of e) {
861
+ if (typeof s == "function") continue;
862
+ const a = s;
863
+ typeof a.path == "string" && a.path && (a.path = t + a.path), "children" in a && Array.isArray(a.children) && I(a.children, t);
864
+ const n = a.props;
865
+ n?.template?.children && Array.isArray(n.template.children) && I(n.template.children, t);
866
+ }
867
+ }
868
+ function Y(e, t) {
869
+ const s = t.walkChildren(t.children ?? []), a = e.kind === "static" ? e.def.path ?? "" : e.fn({})?.path ?? "";
870
+ a && I(s, a + ".items.");
871
+ const n = {
872
+ kind: "layout",
873
+ type: "flex",
874
+ uid: "",
875
+ children: s,
876
+ props: { direction: "column" }
877
+ };
878
+ if (e.kind === "static") {
879
+ const o = t.mapStaticDef(e.def, "REPEATER");
880
+ return {
881
+ ...o,
882
+ props: { ...o.props, template: n }
883
+ };
884
+ }
885
+ const i = e.fn;
886
+ return ((o) => {
887
+ const r = i(o), l = t.mapStaticDef(r, "REPEATER");
888
+ return {
889
+ ...l,
890
+ props: { ...l.props, template: n }
891
+ };
892
+ });
893
+ }
894
+ function $(e) {
895
+ return {
896
+ baseDef: e.def,
897
+ path: e.key,
898
+ children: e.children
899
+ };
900
+ }
901
+ function G(e) {
902
+ return e.children;
903
+ }
904
+ const F = {
905
+ parseEntry: $,
906
+ rollUpSensibleDefaults: () => ({}),
907
+ applySensibleDefaults: (e) => e,
908
+ mapToWidget: x,
909
+ buildCustomWidget: Y,
910
+ getChildren: G
911
+ };
912
+ D("REPEATER", F);
913
+ const K = U("REPEATER"), Lt = (e, t) => K(t, ((s) => s.uid === e)), M = {
914
+ onLoad: "load",
915
+ onChange: "change",
916
+ onFilter: "filter",
917
+ onBlur: "blur"
918
+ }, z = Object.keys(M);
919
+ class H {
920
+ // ── Action-specific: onClick ───────────────────────────────────
921
+ extractOnClickFromMergeResult(t, s, a) {
922
+ if (t.kind === "dynamic") {
923
+ const o = t.fn;
924
+ return { kind: "dynamic", fn: (l) => {
925
+ const p = o(l);
926
+ return this.wireOnClick(p, s, a);
927
+ } };
928
+ }
929
+ const n = t.def;
930
+ return { kind: "static", def: this.wireOnClick(n, s, a) };
931
+ }
932
+ wireOnClick(t, s, a) {
933
+ const n = a.next(), i = t.onClick;
934
+ if (typeof i == "function") {
935
+ const { onClick: o, ...r } = t, l = i(void 0);
936
+ return typeof l == "string" ? { ...r, uid: n, on: { click: l } } : (s.set(n, (p) => i(p.data)), { ...r, uid: n, on: { click: n } });
937
+ }
938
+ return { ...t, uid: n };
939
+ }
940
+ // ── Universal: onLoad, onChange, onFilter ──────────────────────
941
+ wireInputLayoutEvents(t, s, a) {
942
+ if (t.kind === "dynamic") {
943
+ const i = t.fn;
944
+ return { kind: "dynamic", fn: (r) => {
945
+ const l = i(r);
946
+ return this.wireEventProperties(l, s, a);
947
+ } };
948
+ }
949
+ return { kind: "static", def: this.wireEventProperties(t.def, s, a) };
950
+ }
951
+ wireEventProperties(t, s, a) {
952
+ const n = { ...t.on || {} };
953
+ let i = !1;
954
+ const o = { ...t };
955
+ for (const r of z) {
956
+ const l = t[r];
957
+ if (l == null) continue;
958
+ const p = M[r];
959
+ if (typeof l == "function") {
960
+ const T = a.next();
961
+ s.set(T, l), n[p] = T, i = !0;
962
+ } else typeof l == "string" && (n[p] = l, i = !0);
963
+ delete o[r];
964
+ }
965
+ return i && (o.on = n), o;
966
+ }
967
+ }
968
+ const C = new H();
969
+ function V(e) {
970
+ const {
971
+ uid: t,
972
+ label: s,
973
+ actionType: a,
974
+ disabled: n,
975
+ on: i,
976
+ onClick: o,
977
+ data: r,
978
+ type: l,
979
+ tags: p,
980
+ size: T,
981
+ include: h,
982
+ exclude: b,
983
+ states: A,
984
+ ..._
985
+ } = e;
986
+ return {
987
+ uid: t ?? "",
988
+ kind: "action",
989
+ type: "button",
990
+ disabled: n,
991
+ actionType: a,
992
+ label: s,
993
+ ...i != null ? { on: i } : {},
994
+ props: _
995
+ };
996
+ }
997
+ const { gsl: Dt, gslByUid: Mt } = u({
998
+ itemType: "ACTIONS",
999
+ entryShape: "bare",
1000
+ mapToWidget: V,
1001
+ afterMerge: (e, t) => C.extractOnClickFromMergeResult(
1002
+ e,
1003
+ t.eventRegistry,
1004
+ t.eventIdGenerator
1005
+ )
1006
+ });
1007
+ function X(e) {
1008
+ const {
1009
+ uid: t,
1010
+ widgetName: s,
1011
+ tags: a,
1012
+ size: n,
1013
+ onChange: i,
1014
+ include: o,
1015
+ exclude: r,
1016
+ ...l
1017
+ } = e, { on: p, ...T } = l;
1018
+ return {
1019
+ uid: t ?? "",
1020
+ kind: "layout",
1021
+ type: s ?? "flex",
1022
+ props: {
1023
+ direction: T.direction ?? "column",
1024
+ ...T
1025
+ },
1026
+ children: []
1027
+ };
1028
+ }
1029
+ function j(e, t) {
1030
+ const s = t.walkChildren(t.children ?? []);
1031
+ if (e.kind === "static")
1032
+ return { ...t.mapStaticDef(e.def, "LAYOUTS"), children: s };
1033
+ const a = e.fn;
1034
+ return ((n) => {
1035
+ const i = a(n);
1036
+ return { ...t.mapStaticDef(i, "LAYOUTS"), children: s };
1037
+ });
1038
+ }
1039
+ function q(e) {
1040
+ return e.children;
1041
+ }
1042
+ const { gsl: Ct, gslByUid: vt } = u({
1043
+ itemType: "LAYOUTS",
1044
+ entryShape: "compound",
1045
+ mapToWidget: X,
1046
+ buildCustomWidget: j,
1047
+ getChildren: q
1048
+ });
1049
+ function J(e) {
1050
+ return {
1051
+ uid: "",
1052
+ kind: "display",
1053
+ type: "renderer",
1054
+ props: { render: e.render }
1055
+ };
1056
+ }
1057
+ function Z(e, t) {
1058
+ if (e.kind === "static") {
1059
+ const a = e.def;
1060
+ return ((n) => ({
1061
+ uid: "",
1062
+ kind: "display",
1063
+ type: "renderer",
1064
+ ...a.include != null ? { include: a.include } : {},
1065
+ ...a.exclude != null ? { exclude: a.exclude } : {},
1066
+ props: { render: a.render(n ?? {}) }
1067
+ }));
1068
+ }
1069
+ const s = e.fn;
1070
+ return ((a) => {
1071
+ const n = s(a);
1072
+ return {
1073
+ uid: "",
1074
+ kind: "display",
1075
+ type: "renderer",
1076
+ ...n.include != null ? { include: n.include } : {},
1077
+ ...n.exclude != null ? { exclude: n.exclude } : {},
1078
+ props: { render: n.render(a ?? {}) }
1079
+ };
1080
+ });
1081
+ }
1082
+ const { gsl: Bt, gslByUid: wt } = u({
1083
+ itemType: "DISPLAYS",
1084
+ entryShape: "bare",
1085
+ mapToWidget: J,
1086
+ buildCustomWidget: Z
1087
+ }), { gsl: Nt, gslByUid: Wt } = u({
1088
+ itemType: "ALERTS",
1089
+ entryShape: "bare",
1090
+ mapToWidget: (e) => ({
1091
+ uid: e.uid ?? "",
1092
+ kind: "display",
1093
+ type: "alert",
1094
+ props: {
1095
+ text: e.text,
1096
+ ...e.level != null ? { level: e.level } : {}
1097
+ }
1098
+ })
1099
+ }), { gsl: Rt, gslByUid: Ot } = u({
1100
+ itemType: "MARKDOWN_TEXTS",
1101
+ entryShape: "bare",
1102
+ mapToWidget: (e) => ({
1103
+ uid: e.uid ?? "",
1104
+ kind: "display",
1105
+ type: "markdownText",
1106
+ props: {
1107
+ md: e.md
1108
+ }
1109
+ })
1110
+ });
1111
+ function Q(e) {
1112
+ return {
1113
+ uid: e.uid ?? "",
1114
+ kind: "layout",
1115
+ type: "tabs",
1116
+ props: {
1117
+ tabs: e.tabs,
1118
+ renderMode: e.renderMode ?? "all",
1119
+ ...e.defaultOpen != null ? { defaultOpen: e.defaultOpen } : {}
1120
+ },
1121
+ children: []
1122
+ };
1123
+ }
1124
+ function ee(e, t) {
1125
+ const s = t.walkChildren(t.children ?? []);
1126
+ if (e.kind === "static")
1127
+ return { ...t.mapStaticDef(e.def, "TABS"), children: s };
1128
+ const a = e.fn;
1129
+ return ((n) => {
1130
+ const i = a(n);
1131
+ return { ...t.mapStaticDef(i, "TABS"), children: s };
1132
+ });
1133
+ }
1134
+ function te(e) {
1135
+ return e.children;
1136
+ }
1137
+ const { gsl: xt, gslByUid: Yt } = u({
1138
+ itemType: "TABS",
1139
+ entryShape: "compound",
1140
+ mapToWidget: Q,
1141
+ buildCustomWidget: ee,
1142
+ getChildren: te
1143
+ });
1144
+ function se(e) {
1145
+ return {
1146
+ uid: e.uid ?? "",
1147
+ kind: "layout",
1148
+ type: "accordion",
1149
+ props: {
1150
+ sections: e.sections,
1151
+ renderMode: e.renderMode ?? "all",
1152
+ ...e.singleOpen != null ? { singleOpen: e.singleOpen } : {},
1153
+ ...e.defaultOpen != null ? { defaultOpen: e.defaultOpen } : {}
1154
+ },
1155
+ children: []
1156
+ };
1157
+ }
1158
+ function ae(e, t) {
1159
+ const s = t.walkChildren(t.children ?? []);
1160
+ if (e.kind === "static")
1161
+ return { ...t.mapStaticDef(e.def, "ACCORDION"), children: s };
1162
+ const a = e.fn;
1163
+ return ((n) => {
1164
+ const i = a(n);
1165
+ return { ...t.mapStaticDef(i, "ACCORDION"), children: s };
1166
+ });
1167
+ }
1168
+ function ne(e) {
1169
+ return e.children;
1170
+ }
1171
+ const { gsl: $t, gslByUid: Gt } = u({
1172
+ itemType: "ACCORDION",
1173
+ entryShape: "compound",
1174
+ mapToWidget: se,
1175
+ buildCustomWidget: ae,
1176
+ getChildren: ne
1177
+ }), { gsl: Ft, gslByUid: Kt } = u({
1178
+ itemType: "CUSTOM_INPUT",
1179
+ entryShape: "keyed",
1180
+ sensibleDefaults: {
1181
+ base: {
1182
+ suppressAutomaticLabels: !1
1183
+ },
1184
+ fields: ["suppressAutomaticLabels"],
1185
+ apply: (e, t) => c(e, t)
1186
+ },
1187
+ mapToWidget: (e) => ({
1188
+ uid: e.uid ?? "",
1189
+ kind: "input",
1190
+ type: e.customType,
1191
+ path: e.path ?? "",
1192
+ ...e.label != null ? { label: e.label } : {},
1193
+ ...e.disabled != null ? { disabled: e.disabled } : {},
1194
+ ...e.readonly != null ? { readonly: e.readonly } : {},
1195
+ ...e.defaultValue != null ? { defaultValue: e.defaultValue } : {},
1196
+ ...e.validator != null ? { validator: e.validator } : {},
1197
+ props: e.props ?? {}
1198
+ })
1199
+ }), { gsl: zt, gslByUid: Ht } = u({
1200
+ itemType: "CUSTOM_ACTION",
1201
+ entryShape: "bare",
1202
+ mapToWidget: (e) => {
1203
+ const {
1204
+ uid: t,
1205
+ label: s,
1206
+ disabled: a,
1207
+ on: n,
1208
+ onClick: i,
1209
+ data: o,
1210
+ customType: r,
1211
+ tags: l,
1212
+ size: p,
1213
+ include: T,
1214
+ exclude: h,
1215
+ states: b,
1216
+ props: A,
1217
+ ..._
1218
+ } = e;
1219
+ return {
1220
+ uid: t ?? "",
1221
+ kind: "action",
1222
+ type: e.customType,
1223
+ label: s,
1224
+ disabled: a,
1225
+ ...n != null ? { on: n } : {},
1226
+ props: { ...A, ..._ }
1227
+ };
1228
+ },
1229
+ afterMerge: (e, t) => C.extractOnClickFromMergeResult(
1230
+ e,
1231
+ t.eventRegistry,
1232
+ t.eventIdGenerator
1233
+ )
1234
+ }), { gsl: Vt, gslByUid: Xt } = u({
1235
+ itemType: "CUSTOM_DISPLAY",
1236
+ entryShape: "bare",
1237
+ mapToWidget: (e) => ({
1238
+ uid: e.uid ?? "",
1239
+ kind: "display",
1240
+ type: e.customType,
1241
+ props: e.props ?? {}
1242
+ })
1243
+ });
1244
+ function ie(e) {
1245
+ return {
1246
+ uid: e.uid ?? "",
1247
+ kind: "layout",
1248
+ type: e.customType,
1249
+ props: e.props ?? {},
1250
+ children: []
1251
+ };
1252
+ }
1253
+ function le(e, t) {
1254
+ const s = t.walkChildren(t.children ?? []);
1255
+ if (e.kind === "static")
1256
+ return { ...t.mapStaticDef(e.def, "CUSTOM_LAYOUT"), children: s };
1257
+ const a = e.fn;
1258
+ return ((n) => {
1259
+ const i = a(n);
1260
+ return { ...t.mapStaticDef(i, "CUSTOM_LAYOUT"), children: s };
1261
+ });
1262
+ }
1263
+ function oe(e) {
1264
+ return e.children;
1265
+ }
1266
+ const { gsl: jt, gslByUid: qt } = u({
1267
+ itemType: "CUSTOM_LAYOUT",
1268
+ entryShape: "compound",
1269
+ mapToWidget: ie,
1270
+ buildCustomWidget: le,
1271
+ getChildren: oe
1272
+ }), { gsl: Jt, gslByUid: Zt } = u({
1273
+ itemType: "TAGS",
1274
+ entryShape: "keyed",
1275
+ sensibleDefaults: {
1276
+ base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
1277
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
1278
+ apply: (e, t) => g(c(e, t), t)
1279
+ },
1280
+ mapToWidget: (e) => ({
1281
+ uid: e.uid ?? "",
1282
+ kind: "input",
1283
+ type: "tags",
1284
+ path: e.path ?? "",
1285
+ ...e.label != null ? { label: e.label } : {},
1286
+ ...e.disabled != null ? { disabled: e.disabled } : {},
1287
+ ...e.readonly != null ? { readonly: e.readonly } : {},
1288
+ ...e.validator != null ? { validator: y(e.validator, "array") } : {},
1289
+ props: d(e)
1290
+ })
1291
+ });
1292
+ export {
1293
+ zt as $,
1294
+ St as A,
1295
+ At as B,
1296
+ It as C,
1297
+ Et as D,
1298
+ ft as E,
1299
+ kt as F,
1300
+ Ut as G,
1301
+ Pt as H,
1302
+ K as I,
1303
+ Lt as J,
1304
+ Dt as K,
1305
+ Mt as L,
1306
+ Ct as M,
1307
+ vt as N,
1308
+ Bt as O,
1309
+ wt as P,
1310
+ Nt as Q,
1311
+ Wt as R,
1312
+ Rt as S,
1313
+ Ot as T,
1314
+ xt as U,
1315
+ Yt as V,
1316
+ $t as W,
1317
+ Gt as X,
1318
+ Ft as Y,
1319
+ Kt as Z,
1320
+ E as _,
1321
+ Xe as a,
1322
+ Ht as a0,
1323
+ Vt as a1,
1324
+ Xt as a2,
1325
+ jt as a3,
1326
+ qt as a4,
1327
+ Fe as a5,
1328
+ Ge as a6,
1329
+ $e as a7,
1330
+ Ye as a8,
1331
+ xe as a9,
1332
+ ge as aA,
1333
+ Te as aB,
1334
+ me as aC,
1335
+ ye as aD,
1336
+ ce as aE,
1337
+ Ve as aF,
1338
+ He as aG,
1339
+ m as aH,
1340
+ C as aI,
1341
+ Jt as aJ,
1342
+ Zt as aK,
1343
+ U as aL,
1344
+ u as aM,
1345
+ d as aN,
1346
+ c as aO,
1347
+ g as aP,
1348
+ L as aa,
1349
+ Oe as ab,
1350
+ Re as ac,
1351
+ P as ad,
1352
+ We as ae,
1353
+ Ne as af,
1354
+ we as ag,
1355
+ Be as ah,
1356
+ ve as ai,
1357
+ Ce as aj,
1358
+ Me as ak,
1359
+ ze as al,
1360
+ Ke as am,
1361
+ De as an,
1362
+ Le as ao,
1363
+ Pe as ap,
1364
+ Ue as aq,
1365
+ ke as ar,
1366
+ fe as as,
1367
+ Ee as at,
1368
+ Ie as au,
1369
+ Ae as av,
1370
+ Se as aw,
1371
+ _e as ax,
1372
+ he as ay,
1373
+ be as az,
1374
+ je as b,
1375
+ qe as c,
1376
+ Je as d,
1377
+ Ze as e,
1378
+ Qe as f,
1379
+ et as g,
1380
+ tt as h,
1381
+ st as i,
1382
+ at as j,
1383
+ nt as k,
1384
+ it as l,
1385
+ lt as m,
1386
+ ot as n,
1387
+ rt as o,
1388
+ ut as p,
1389
+ pt as q,
1390
+ dt as r,
1391
+ ct as s,
1392
+ yt as t,
1393
+ mt as u,
1394
+ Tt as v,
1395
+ gt as w,
1396
+ bt as x,
1397
+ ht as y,
1398
+ _t as z
1399
+ };