@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/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { G as c, _ as p, a as I, b as _, c as E, d as h, e as S, f as U, h as k, i as A, j as M, k as B, l as D, m as P, n as w, o as R, p as x, q as N, s as b, t as L, u as C, v as G, w as W, x as F, y as Y, z as $, A as K, B as j, C as z, D as H, E as X, F as v, H as V, I as q, J as Q, K as Z, L as J, M as O, N as tt, O as et, P as st, Q as nt, R as it, S as rt, T as ot, U as at, V as ut, W as ct, X as yt, Y as dt, Z as pt, $ as mt, a0 as lt, a1 as ft, a2 as gt, a3 as Tt, a4 as It, a5 as _t } from "./repeater-Bq3AKxF4.js";
2
- import { aa as _e, a8 as Ee, a9 as he, a6 as Se, g as Ue, a7 as ke, ab as Ae, ac as Me, r as Be } from "./repeater-Bq3AKxF4.js";
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: c.INPUTS,
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: c.INPUTS,
19
+ itemType: y.INPUTS,
20
20
  tags: e ?? []
21
21
  };
22
22
  }
23
- function ht(s, t, e) {
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: c.INPUTS,
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: c.INPUTS,
37
+ itemType: y.INPUTS,
38
38
  tags: e ?? []
39
39
  };
40
40
  }
41
- function St(s, t, e) {
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: c.INPUTS,
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: c.INPUTS,
55
+ itemType: y.INPUTS,
56
56
  tags: e ?? []
57
57
  };
58
58
  }
59
- function Ut(s, t, e) {
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 kt(s, t, e) {
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 At(s, t, e) {
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 Mt(s, t, e) {
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 Pt(s, t, e) {
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 wt(s, t, e) {
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 Rt(s, t, e) {
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 xt(s, t, e) {
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 Nt(s, t, e) {
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 Wt(s, t, e, n) {
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 Ft(s, t, e) {
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 Yt(s, t) {
242
+ function jt(s, t) {
228
243
  return { type: "ITEMS", itemType: "ALERTS", items: [s], tags: t ?? [] };
229
244
  }
230
- function $t(s, t, e) {
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: c.LAYOUTS,
261
+ itemType: y.LAYOUTS,
247
262
  items: [{ def: { widgetName: "flex", ...t ?? {} }, children: s }],
248
263
  tags: e ?? []
249
- }), Kt = (s, t, e) => m(s, { direction: "row", ...t ?? {} }, e), jt = (s, t, e) => m(s, { direction: "column", ...t ?? {} }, e), l = (s, t, e) => ({
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: c.LAYOUTS,
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: c.LAYOUTS,
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 vt(s, t, e) {
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: c.LAYOUTS,
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 Vt(s, t, e, n) {
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 qt(s, t, e) {
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 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 y {
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 y([]);
361
+ return new c([]);
347
362
  }
348
363
  // ─── Scope methods (chain-extending, immutable) ───
349
364
  tag(t) {
350
- return new y([...this.conditions, { kind: "tagsAnd", tags: [t] }]);
365
+ return new c([...this.conditions, { kind: "tagsAnd", tags: [t] }]);
351
366
  }
352
367
  state(t) {
353
- return new y([...this.conditions, { kind: "state", name: t }]);
368
+ return new c([...this.conditions, { kind: "state", name: t }]);
354
369
  }
355
370
  tagsAnd(t) {
356
- return new y([...this.conditions, { kind: "tagsAnd", tags: t }]);
371
+ return new c([...this.conditions, { kind: "tagsAnd", tags: t }]);
357
372
  }
358
373
  tagsOr(t) {
359
- return new y([...this.conditions, { kind: "tagsOr", tags: t }]);
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(I(t, e));
407
+ return this.apply(E(t, e));
393
408
  }
394
409
  textInputs(t) {
395
- return this.apply(Qt(t));
410
+ return this.apply(Zt(t));
396
411
  }
397
412
  numberInputs(t) {
398
- return this.apply(Zt(t));
413
+ return this.apply(Jt(t));
399
414
  }
400
415
  booleanInputs(t) {
401
- return this.apply(Jt(t));
416
+ return this.apply(Ot(t));
402
417
  }
403
418
  selects(t) {
404
- return this.apply(_(t));
419
+ return this.apply(S(t));
405
420
  }
406
421
  selectByUid(t, e) {
407
- return this.apply(E(t, e));
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(S(t, e));
428
+ return this.apply(A(t, e));
414
429
  }
415
430
  radiogroups(t) {
416
- return this.apply(U(t));
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(A(t));
437
+ return this.apply(B(t));
423
438
  }
424
439
  checkboxByUid(t, e) {
425
- return this.apply(M(t, e));
440
+ return this.apply(D(t, e));
426
441
  }
427
442
  textareas(t) {
428
- return this.apply(B(t));
443
+ return this.apply(R(t));
429
444
  }
430
445
  textareaByUid(t, e) {
431
- return this.apply(D(t, e));
446
+ return this.apply(P(t, e));
432
447
  }
433
448
  passwords(t) {
434
- return this.apply(P(t));
449
+ return this.apply(w(t));
435
450
  }
436
451
  passwordByUid(t, e) {
437
- return this.apply(w(t, e));
452
+ return this.apply(N(t, e));
438
453
  }
439
454
  currencies(t) {
440
- return this.apply(R(t));
455
+ return this.apply(x(t));
441
456
  }
442
457
  currencyByUid(t, e) {
443
- return this.apply(x(t, e));
458
+ return this.apply(b(t, e));
444
459
  }
445
460
  markdowns(t) {
446
- return this.apply(N(t));
461
+ return this.apply(L(t));
447
462
  }
448
463
  markdownByUid(t, e) {
449
- return this.apply(b(t, e));
464
+ return this.apply(C(t, e));
450
465
  }
451
466
  lists(t) {
452
- return this.apply(L(t));
467
+ return this.apply(G(t));
453
468
  }
454
469
  listByUid(t, e) {
455
- return this.apply(C(t, e));
470
+ return this.apply(F(t, e));
456
471
  }
457
472
  calendars(t) {
458
- return this.apply(G(t));
473
+ return this.apply(Y(t));
459
474
  }
460
475
  calendarByUid(t, e) {
461
- return this.apply(W(t, e));
476
+ return this.apply($(t, e));
462
477
  }
463
478
  dateInputs(t) {
464
- return this.apply(F(t));
479
+ return this.apply(j(t));
465
480
  }
466
481
  dateInputByUid(t, e) {
467
- return this.apply(Y(t, e));
482
+ return this.apply(K(t, e));
468
483
  }
469
484
  datePickers(t) {
470
- return this.apply($(t));
485
+ return this.apply(W(t));
471
486
  }
472
487
  datePickerByUid(t, e) {
473
- return this.apply(K(t, e));
488
+ return this.apply(v(t, e));
474
489
  }
475
490
  rangeCalendars(t) {
476
- return this.apply(j(t));
491
+ return this.apply(z(t));
477
492
  }
478
493
  rangeCalendarByUid(t, e) {
479
- return this.apply(z(t, e));
494
+ return this.apply(H(t, e));
480
495
  }
481
496
  rangeDateInputs(t) {
482
- return this.apply(H(t));
497
+ return this.apply(X(t));
483
498
  }
484
499
  rangeDateInputByUid(t, e) {
485
- return this.apply(X(t, e));
500
+ return this.apply(V(t, e));
486
501
  }
487
502
  rangeDatePickers(t) {
488
- return this.apply(v(t));
503
+ return this.apply(q(t));
489
504
  }
490
505
  rangeDatePickerByUid(t, e) {
491
- return this.apply(V(t, e));
506
+ return this.apply(Q(t, e));
492
507
  }
493
508
  repeaters(t) {
494
- return this.apply(q(t));
509
+ return this.apply(Z(t));
495
510
  }
496
511
  repeaterByUid(t, e) {
497
- return this.apply(Q(t, e));
512
+ return this.apply(J(t, e));
498
513
  }
499
514
  // ─── Type selectors — actions, displays, layouts ───
500
515
  actions(t) {
501
- return this.apply(Z(t));
516
+ return this.apply(O(t));
502
517
  }
503
518
  actionByUid(t, e) {
504
- return this.apply(J(t, e));
519
+ return this.apply(tt(t, e));
505
520
  }
506
521
  layouts(t) {
507
- return this.apply(O(t));
522
+ return this.apply(et(t));
508
523
  }
509
524
  layoutByUid(t, e) {
510
- return this.apply(tt(t, e));
525
+ return this.apply(st(t, e));
511
526
  }
512
527
  displays(t) {
513
- return this.apply(et(t));
528
+ return this.apply(nt(t));
514
529
  }
515
530
  displayByUid(t, e) {
516
- return this.apply(st(t, e));
531
+ return this.apply(it(t, e));
517
532
  }
518
533
  alerts(t) {
519
- return this.apply(nt(t));
534
+ return this.apply(rt(t));
520
535
  }
521
536
  alertByUid(t, e) {
522
- return this.apply(it(t, e));
537
+ return this.apply(ot(t, e));
523
538
  }
524
539
  tabs(t) {
525
- return this.apply(rt(t));
540
+ return this.apply(at(t));
526
541
  }
527
542
  tabsByUid(t, e) {
528
- return this.apply(ot(t, e));
543
+ return this.apply(ut(t, e));
529
544
  }
530
545
  accordions(t) {
531
- return this.apply(at(t));
546
+ return this.apply(yt(t));
532
547
  }
533
548
  accordionByUid(t, e) {
534
- return this.apply(ut(t, e));
549
+ return this.apply(ct(t, e));
535
550
  }
536
551
  // ─── Type selectors — custom kinds ───
537
552
  customInputs(t) {
538
- return this.apply(ct(t));
553
+ return this.apply(dt(t));
539
554
  }
540
555
  customInputByUid(t, e) {
541
- return this.apply(yt(t, e));
556
+ return this.apply(pt(t, e));
542
557
  }
543
558
  customActions(t) {
544
- return this.apply(dt(t));
559
+ return this.apply(mt(t));
545
560
  }
546
561
  customActionByUid(t, e) {
547
- return this.apply(pt(t, e));
562
+ return this.apply(lt(t, e));
548
563
  }
549
564
  customDisplays(t) {
550
- return this.apply(mt(t));
565
+ return this.apply(ft(t));
551
566
  }
552
567
  customDisplayByUid(t, e) {
553
- return this.apply(lt(t, e));
568
+ return this.apply(gt(t, e));
554
569
  }
555
570
  customLayouts(t) {
556
- return this.apply(ft(t));
571
+ return this.apply(Tt(t));
557
572
  }
558
573
  customLayoutByUid(t, e) {
559
- return this.apply(gt(t, e));
574
+ return this.apply(It(t, e));
560
575
  }
561
576
  }
562
- const ce = {
577
+ const oe = {
563
578
  inputs: {
564
579
  textInput: Et,
565
- numberInput: ht,
566
- booleanInput: St,
567
- select: Ut,
568
- dropdown: kt,
569
- radiogroup: At,
570
- checkbox: Mt,
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: Pt,
574
- markdown: wt,
575
- list: Rt,
576
- calendar: xt,
577
- dateInput: Nt,
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: qt,
583
- custom: Wt
597
+ repeater: Qt,
598
+ custom: Ft
584
599
  },
585
600
  actions: {
586
- button: _t,
587
- submitButton: It,
588
- custom: Ft
601
+ button: I,
602
+ submitButton: Yt,
603
+ custom: $t
589
604
  },
590
605
  displays: {
591
- display: Tt,
592
- alert: Yt,
593
- custom: $t
606
+ display: _t,
607
+ alert: jt,
608
+ custom: Kt
594
609
  },
595
610
  layouts: {
596
611
  flex: m,
597
- horizontalFlex: Kt,
598
- verticalFlex: jt,
612
+ horizontalFlex: Wt,
613
+ verticalFlex: vt,
599
614
  grid: l,
600
615
  horizontalGrid: zt,
601
616
  verticalGrid: Ht,
602
617
  tabs: Xt,
603
- accordion: vt,
604
- custom: Vt
618
+ accordion: Vt,
619
+ custom: qt
605
620
  },
606
- selectors: y.root()
621
+ selectors: c.root()
607
622
  };
608
- function ye(s, ...t) {
623
+ function ae(s, ...t) {
609
624
  return t.map((e) => ({
610
625
  ...e,
611
626
  targetState: s
612
627
  }));
613
628
  }
614
- function de(s, ...t) {
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 Ot {
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 pe() {
635
- return new Ot();
649
+ function ye() {
650
+ return new te();
636
651
  }
637
- const me = (s) => s !== null && typeof s == "object" && Object.prototype.hasOwnProperty.call(s, "label") && Object.prototype.hasOwnProperty.call(s, "value");
638
- function te(s) {
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 ee(s, t) {
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 (te(s)) return ee(s.$ref, t);
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 le(s, t) {
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
- fe as GolemWidgets,
797
- ut as _gslAccordionByUid,
798
- at as _gslAccordions,
799
- J as _gslActionByUid,
800
- Z as _gslActions,
801
- it as _gslAlertByUid,
802
- nt as _gslAlerts,
803
- Jt as _gslBooleanInputs,
804
- W as _gslCalendarByUid,
805
- G as _gslCalendars,
806
- M as _gslCheckboxByUid,
807
- A as _gslCheckboxes,
808
- R as _gslCurrencies,
809
- x as _gslCurrencyByUid,
810
- pt as _gslCustomActionByUid,
811
- dt as _gslCustomActions,
812
- lt as _gslCustomDisplayByUid,
813
- mt as _gslCustomDisplays,
814
- yt as _gslCustomInputByUid,
815
- ct as _gslCustomInputs,
816
- gt as _gslCustomLayoutByUid,
817
- ft as _gslCustomLayouts,
818
- Y as _gslDateInputByUid,
819
- F as _gslDateInputs,
820
- K as _gslDatePickerByUid,
821
- $ as _gslDatePickers,
822
- st as _gslDisplayByUid,
823
- et as _gslDisplays,
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
- I as _gslInputByUid,
707
+ E as _gslInputByUid,
827
708
  p as _gslInputs,
828
- tt as _gslLayoutByUid,
829
- O as _gslLayouts,
830
- C as _gslListByUid,
831
- L as _gslLists,
832
- b as _gslMarkdownByUid,
833
- N as _gslMarkdowns,
834
- Zt as _gslNumberInputs,
835
- w as _gslPasswordByUid,
836
- P as _gslPasswords,
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
- U as _gslRadiogroups,
839
- z as _gslRangeCalendarByUid,
840
- j as _gslRangeCalendars,
841
- X as _gslRangeDateInputByUid,
842
- H as _gslRangeDateInputs,
843
- V as _gslRangeDatePickerByUid,
844
- v as _gslRangeDatePickers,
845
- Q as _gslRepeaterByUid,
846
- q as _gslRepeaters,
847
- E as _gslSelectByUid,
848
- _ as _gslSelects,
849
- ye as _gslStates,
850
- rt as _gslTabs,
851
- ot as _gslTabsByUid,
852
- de as _gslTag,
853
- Qt as _gslTextInputs,
854
- D as _gslTextareaByUid,
855
- B as _gslTextareas,
856
- vt as _guiAccordion,
857
- Yt as _guiAlert,
858
- St as _guiBooleanInput,
859
- _t as _guiButton,
860
- xt as _guiCalendar,
861
- Mt as _guiCheckbox,
862
- Pt as _guiCurrency,
863
- Ft as _guiCustomAction,
864
- $t as _guiCustomDisplay,
865
- Wt as _guiCustomInput,
866
- Vt as _guiCustomLayout,
867
- Nt as _guiDateInput,
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
- Tt as _guiDisplay,
870
- kt as _guiDropdown,
750
+ _t as _guiDisplay,
751
+ At as _guiDropdown,
871
752
  m as _guiFlex,
872
753
  l as _guiGrid,
873
- Kt as _guiHorizontalFlex,
754
+ Wt as _guiHorizontalFlex,
874
755
  zt as _guiHorizontalGrid,
875
- Rt as _guiList,
876
- wt as _guiMarkdown,
877
- ht as _guiNumberInput,
756
+ wt as _guiList,
757
+ Pt as _guiMarkdown,
758
+ St as _guiNumberInput,
878
759
  Dt as _guiPassword,
879
- At as _guiRadiogroup,
760
+ Mt as _guiRadiogroup,
880
761
  Lt as _guiRangeCalendar,
881
762
  Ct as _guiRangeDateInput,
882
763
  Gt as _guiRangeDatePicker,
883
- qt as _guiRepeater,
884
- Ut as _guiSelect,
885
- It as _guiSubmitButton,
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
- jt as _guiVerticalFlex,
770
+ vt as _guiVerticalFlex,
890
771
  Ht as _guiVerticalGrid,
891
- re as actionWidgets,
892
- _e as createGslSelector,
893
- Ee as defineShortcutType,
894
- ie as displayWidgets,
895
- he as extractWidgetProps,
896
- Se as formDefs,
897
- Ue as getItemKey,
898
- pe as golemForm,
899
- ge as golemWidgets,
900
- ce as gui,
901
- se as inputWidgets,
902
- ke as isDxDefinitions,
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
  };