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

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,824 +1,304 @@
1
- import { G as y, _ as p, d as I, a as _, b as S, c as E, e as h, f as U, g as A, h as k, i as M, j as B, k as D, l as R, m as P, n as w, o as x, p as N, q as b, r as L, s as G, t as C, u as W, v, w as F, x as K, y as Y, z as $, A as j, 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 lt, Z as mt, $ as ft, a0 as gt, a1 as Tt, a2 as It, a3 as _t, a4 as St, a5 as Et, a6 as ht } from "./resolveFormInput-DoBisQ5Q.js";
2
- import { a7 as Ue, a8 as Ae, a9 as ke, aa as Me } from "./resolveFormInput-DoBisQ5Q.js";
1
+ import { _ as d, a as y, b as g, c, d as h, e as _, f as B, g as U, h as m, i as k, j as f, k as w, l as I, m as x, n as D, o as C, p as b, q as A, r as R, s as P, t as T, u as L, v as M, w as $, x as F, y as v, z, A as G, B as j, C as O, D as E, E as H, F as N, G as V, H as q, I as W, J as K, K as Q, L as S, M as X, N as Y, O as Z, P as J, Q as ss, R as as, S as ts, T as rs, U as is, V as es, W as ns, X as us, Y as ls, Z as ps, $ as os, a0 as ds, a1 as ys, a2 as gs, a3 as cs, a4 as hs, a5 as _s, a6 as Bs, a7 as Us, a8 as ms, a9 as ks, aa as fs, ab as ws, ac as Is, ad as xs, ae as Ds, af as Cs, ag as bs, ah as As, ai as Rs, aj as Ps, ak as Ts, al as Ls, am as Ms, an as $s, ao as Fs, ap as vs, aq as zs, ar as Gs, as as js, at as Os, au as Es, av as Hs, aw as Ns, ax as Vs, ay as qs, az as Ws, aA as Ks, aB as Qs, aC as Ss, aD as Xs, aE as Ys } from "./register-BCL1xvhN.js";
3
2
  import "@golemui/core";
4
- import "@golemui/gui-validators";
5
- function Ut(s, t, e) {
6
- if (typeof t == "function") {
7
- const o = t;
8
- return {
9
- items: [{ key: s, def: (r) => ({ type: "text", ...o(r) }) }],
10
- type: "ITEMS",
11
- itemType: y.INPUTS,
12
- tags: e ?? []
13
- };
14
- }
15
- const n = { type: "text", ...t };
16
- return {
17
- items: [{ key: s, def: n }],
18
- type: "ITEMS",
19
- itemType: y.INPUTS,
20
- tags: e ?? []
21
- };
22
- }
23
- function At(s, t, e) {
24
- if (typeof t == "function") {
25
- const o = t;
26
- return {
27
- items: [{ key: s, def: (r) => ({ type: "number", ...o(r) }) }],
28
- type: "ITEMS",
29
- itemType: y.INPUTS,
30
- tags: e ?? []
31
- };
32
- }
33
- const n = { type: "number", ...t };
34
- return {
35
- items: [{ key: s, def: n }],
36
- type: "ITEMS",
37
- itemType: y.INPUTS,
38
- tags: e ?? []
39
- };
40
- }
41
- function kt(s, t, e) {
42
- if (typeof t == "function") {
43
- const o = t;
44
- return {
45
- items: [{ key: s, def: (r) => ({ type: "boolean", ...o(r) }) }],
46
- type: "ITEMS",
47
- itemType: y.INPUTS,
48
- tags: e ?? []
49
- };
50
- }
51
- const n = { type: "boolean", ...t };
52
- return {
53
- items: [{ key: s, def: n }],
54
- type: "ITEMS",
55
- itemType: y.INPUTS,
56
- tags: e ?? []
57
- };
58
- }
59
- function Mt(s, t, e) {
60
- if (typeof t == "function") {
61
- const i = t;
62
- return { type: "ITEMS", itemType: "SELECT", items: [{ key: s, def: (a) => ({ type: "select", ...i(a) }) }], tags: e ?? [] };
63
- }
64
- const n = { type: "select", ...t };
65
- return { type: "ITEMS", itemType: "SELECT", items: [{ key: s, def: n }], tags: e ?? [] };
66
- }
67
- function Bt(s, t, e) {
68
- if (typeof t == "function") {
69
- const i = t;
70
- return { type: "ITEMS", itemType: "DROPDOWN", items: [{ key: s, def: (a) => ({
71
- type: "dropdown",
72
- ...i(a)
73
- }) }], tags: e ?? [] };
74
- }
75
- const n = { type: "dropdown", ...t };
76
- return { type: "ITEMS", itemType: "DROPDOWN", items: [{ key: s, def: n }], tags: e ?? [] };
77
- }
78
- function Dt(s, t, e) {
79
- if (typeof t == "function") {
80
- const i = t;
81
- return { type: "ITEMS", itemType: "RADIOGROUP", items: [{ key: s, def: (a) => ({ type: "radiogroup", ...i(a) }) }], tags: e ?? [] };
82
- }
83
- const n = { type: "radiogroup", ...t };
84
- return { type: "ITEMS", itemType: "RADIOGROUP", items: [{ key: s, def: n }], tags: e ?? [] };
85
- }
86
- function Rt(s, t, e) {
87
- if (typeof t == "function") {
88
- const i = t;
89
- return { type: "ITEMS", itemType: "CHECKBOX", items: [{ key: s, def: (a) => ({ type: "checkbox", ...i(a) }) }], tags: e ?? [] };
90
- }
91
- const n = { type: "checkbox", ...t };
92
- return { type: "ITEMS", itemType: "CHECKBOX", items: [{ key: s, def: n }], tags: e ?? [] };
93
- }
94
- function Pt(s, t, e) {
95
- if (typeof t == "function") {
96
- const i = t;
97
- return { type: "ITEMS", itemType: "TEXTAREA", items: [{ key: s, def: (a) => ({ type: "textarea", ...i(a) }) }], tags: e ?? [] };
98
- }
99
- const n = { type: "textarea", ...t };
100
- return { type: "ITEMS", itemType: "TEXTAREA", items: [{ key: s, def: n }], tags: e ?? [] };
101
- }
102
- function wt(s, t, e) {
103
- if (typeof t == "function") {
104
- const i = t;
105
- return { type: "ITEMS", itemType: "PASSWORD", items: [{ key: s, def: (a) => ({ type: "password", ...i(a) }) }], tags: e ?? [] };
106
- }
107
- const n = { type: "password", ...t };
108
- return { type: "ITEMS", itemType: "PASSWORD", items: [{ key: s, def: n }], tags: e ?? [] };
109
- }
110
- function xt(s, t, e) {
111
- if (typeof t == "function") {
112
- const i = t;
113
- return { type: "ITEMS", itemType: "CURRENCY", items: [{ key: s, def: (a) => ({ type: "currency", ...i(a) }) }], tags: e ?? [] };
114
- }
115
- const n = { type: "currency", ...t };
116
- return { type: "ITEMS", itemType: "CURRENCY", items: [{ key: s, def: n }], tags: e ?? [] };
117
- }
118
- function Nt(s, t, e) {
119
- if (typeof t == "function") {
120
- const i = t;
121
- return { type: "ITEMS", itemType: "MARKDOWN", items: [{ key: s, def: (a) => ({ type: "markdown", ...i(a) }) }], tags: e ?? [] };
122
- }
123
- const n = { type: "markdown", ...t };
124
- return { type: "ITEMS", itemType: "MARKDOWN", items: [{ key: s, def: n }], tags: e ?? [] };
125
- }
126
- function bt(s, t, e) {
127
- if (typeof t == "function") {
128
- const i = t;
129
- return { type: "ITEMS", itemType: "LIST", items: [{ key: s, def: (a) => ({ type: "list", ...i(a) }) }], tags: e ?? [] };
130
- }
131
- const n = { type: "list", ...t };
132
- return { type: "ITEMS", itemType: "LIST", items: [{ key: s, def: n }], tags: e ?? [] };
133
- }
134
- function Lt(s, t, e) {
135
- if (typeof t == "function") {
136
- const o = t;
137
- return {
138
- items: [(r) => ({
139
- type: "calendar",
140
- path: s,
141
- ...o(r)
142
- })],
143
- type: "ITEMS",
144
- itemType: "CALENDAR",
145
- tags: e ?? []
146
- };
147
- }
148
- return {
149
- items: [{ type: "calendar", path: s, ...t }],
150
- type: "ITEMS",
151
- itemType: "CALENDAR",
152
- tags: e ?? []
153
- };
154
- }
155
- function Gt(s, t, e) {
156
- if (typeof t == "function") {
157
- const i = t;
158
- return { type: "ITEMS", itemType: "DATE_INPUT", items: [{ key: s, def: (a) => ({ type: "dateInput", ...i(a) }) }], tags: e ?? [] };
159
- }
160
- const n = { type: "dateInput", ...t };
161
- return { type: "ITEMS", itemType: "DATE_INPUT", items: [{ key: s, def: n }], tags: e ?? [] };
162
- }
163
- function Ct(s, t, e) {
164
- if (typeof t == "function") {
165
- const i = t;
166
- return { type: "ITEMS", itemType: "DATE_PICKER", items: [{ key: s, def: (a) => ({
167
- type: "datePicker",
168
- ...i(a)
169
- }) }], tags: e ?? [] };
170
- }
171
- const n = { type: "datePicker", ...t };
172
- return { type: "ITEMS", itemType: "DATE_PICKER", items: [{ key: s, def: n }], tags: e ?? [] };
173
- }
174
- function Wt(s, t, e) {
175
- if (typeof t == "function") {
176
- const i = t;
177
- return { type: "ITEMS", itemType: "RANGE_CALENDAR", items: [{ key: s, def: (a) => ({
178
- type: "rangeCalendar",
179
- ...i(a)
180
- }) }], tags: e ?? [] };
181
- }
182
- const n = { type: "rangeCalendar", ...t };
183
- return { type: "ITEMS", itemType: "RANGE_CALENDAR", items: [{ key: s, def: n }], tags: e ?? [] };
184
- }
185
- function vt(s, t, e) {
186
- if (typeof t == "function") {
187
- const i = t;
188
- return { type: "ITEMS", itemType: "RANGE_DATE_INPUT", items: [{ key: s, def: (a) => ({
189
- type: "rangeDateInput",
190
- ...i(a)
191
- }) }], tags: e ?? [] };
192
- }
193
- const n = { type: "rangeDateInput", ...t };
194
- return { type: "ITEMS", itemType: "RANGE_DATE_INPUT", items: [{ key: s, def: n }], tags: e ?? [] };
195
- }
196
- function Ft(s, t, e) {
197
- if (typeof t == "function") {
198
- const i = t;
199
- return { type: "ITEMS", itemType: "RANGE_DATE_PICKER", items: [{ key: s, def: (a) => ({
200
- type: "rangeDatePicker",
201
- ...i(a)
202
- }) }], tags: e ?? [] };
203
- }
204
- const n = { type: "rangeDatePicker", ...t };
205
- return { type: "ITEMS", itemType: "RANGE_DATE_PICKER", items: [{ key: s, def: n }], tags: e ?? [] };
206
- }
207
- function Kt(s, t, e, n) {
208
- if (typeof e == "function") {
209
- const r = e;
210
- return { type: "ITEMS", itemType: "CUSTOM_INPUT", items: [{ key: t, def: (d) => ({
211
- customType: s,
212
- ...r(d)
213
- }) }], tags: n ?? [] };
214
- }
215
- const o = { customType: s, ...e };
216
- return { type: "ITEMS", itemType: "CUSTOM_INPUT", items: [{ key: t, def: o }], tags: n ?? [] };
217
- }
218
- function Yt(s, t) {
219
- return {
220
- items: [s],
221
- type: "ITEMS",
222
- itemType: y.ACTIONS,
223
- tags: t ?? []
224
- };
225
- }
226
- function $t(s, t, e) {
227
- if (typeof t == "function") {
228
- const i = t;
229
- return { type: "ITEMS", itemType: "CUSTOM_ACTION", items: [
230
- (u) => ({ customType: s, ...i(u) })
231
- ], tags: e ?? [] };
232
- }
233
- return { type: "ITEMS", itemType: "CUSTOM_ACTION", items: [{ customType: s, ...t }], tags: e ?? [] };
234
- }
235
- function jt(s, t) {
236
- return { type: "ITEMS", itemType: "ALERTS", items: [s], tags: t ?? [] };
237
- }
238
- function zt(s, t) {
239
- return { type: "ITEMS", itemType: "MARKDOWN_TEXTS", items: [s], tags: t ?? [] };
240
- }
241
- function Ht(s, t, e) {
242
- if (typeof t == "function") {
243
- const u = t;
244
- return { type: "ITEMS", itemType: "CUSTOM_DISPLAY", items: [
245
- (d) => ({ customType: s, ...u(d) })
246
- ], tags: e ?? [] };
247
- }
248
- const { uid: n, ...o } = t ?? {};
249
- return { type: "ITEMS", itemType: "CUSTOM_DISPLAY", items: [{
250
- customType: s,
251
- ...n != null ? { uid: n } : {},
252
- props: Object.keys(o).length > 0 ? o : void 0
253
- }], tags: e ?? [] };
254
- }
255
- const l = (s, t, e) => ({
256
- type: "ITEMS",
257
- itemType: y.LAYOUTS,
258
- items: [{ def: { widgetName: "flex", ...t ?? {} }, children: s }],
259
- tags: e ?? []
260
- }), Xt = (s, t, e) => l(s, { direction: "row", ...t ?? {} }, e), Vt = (s, t, e) => l(s, { direction: "column", ...t ?? {} }, e), m = (s, t, e) => ({
261
- type: "ITEMS",
262
- itemType: y.LAYOUTS,
263
- items: [
264
- {
265
- def: {
266
- widgetName: "grid",
267
- direction: "row",
268
- autoFit: !0,
269
- ...t ?? {}
270
- },
271
- children: s
272
- }
273
- ],
274
- tags: e ?? []
275
- }), qt = (s, t, e) => m(s, { direction: "row", ...t ?? {} }, e), Qt = (s, t, e) => m(s, { direction: "column", ...t ?? {} }, e);
276
- function g(s) {
277
- return s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
278
- }
279
- function Zt(s, t, e) {
280
- const n = s.map((r) => ({
281
- label: r.label,
282
- uid: r.uid ?? g(r.label)
283
- })), o = s.map((r) => ({
284
- type: "ITEMS",
285
- itemType: y.LAYOUTS,
286
- items: [
287
- {
288
- def: { uid: r.uid ?? g(r.label), direction: "column", widgetName: "flex" },
289
- children: r.children
290
- }
291
- ],
292
- tags: []
293
- }));
294
- return {
295
- type: "ITEMS",
296
- itemType: "TABS",
297
- items: [{ def: {
298
- tabs: n,
299
- ...t
300
- }, children: o }],
301
- tags: e ?? []
302
- };
303
- }
304
- function T(s) {
305
- return s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
306
- }
307
- function Jt(s, t, e) {
308
- const n = s.map((r) => ({
309
- label: r.label,
310
- uid: r.uid ?? T(r.label)
311
- })), o = s.map((r) => ({
312
- type: "ITEMS",
313
- itemType: y.LAYOUTS,
314
- items: [
315
- {
316
- def: { uid: r.uid ?? T(r.label), direction: "column", widgetName: "flex" },
317
- children: r.children
318
- }
319
- ],
320
- tags: []
321
- }));
322
- return {
323
- type: "ITEMS",
324
- itemType: "ACCORDION",
325
- items: [{ def: {
326
- sections: n,
327
- ...t
328
- }, children: o }],
329
- tags: e ?? []
330
- };
331
- }
332
- function Ot(s, t, e, n) {
333
- if (typeof e == "function") {
334
- const r = e;
335
- return { type: "ITEMS", itemType: "CUSTOM_LAYOUT", items: [{ def: (d) => ({
336
- customType: s,
337
- ...r(d)
338
- }), children: t }], tags: n ?? [] };
339
- }
340
- return { type: "ITEMS", itemType: "CUSTOM_LAYOUT", items: [{ def: { customType: s, ...e }, children: t }], tags: n ?? [] };
341
- }
342
- function te(s, t, e) {
343
- const { template: n, ...o } = t;
344
- return {
345
- type: "ITEMS",
346
- itemType: "REPEATER",
347
- items: [{ key: s, def: o, children: n }],
348
- tags: e ?? []
349
- };
350
- }
351
- function ee(s, t, e) {
352
- if (typeof t == "function") {
353
- const i = t;
354
- return { type: "ITEMS", itemType: "TAGS", items: [{ key: s, def: (a) => ({ type: "tags", ...i(a) }) }], tags: e ?? [] };
355
- }
356
- const n = { type: "tags", ...t };
357
- return { type: "ITEMS", itemType: "TAGS", items: [{ key: s, def: n }], tags: e ?? [] };
358
- }
359
- const se = (s) => p(s, (t) => t.type === "text"), ne = (s) => p(s, (t) => t.type === "number"), ie = (s) => p(s, (t) => t.type === "boolean"), { gsl: re, gslByUid: oe } = I({
360
- itemType: "MARKDOWN_TEXTS",
361
- entryShape: "bare",
362
- mapToWidget: (s) => ({
363
- uid: s.uid ?? "",
364
- kind: "display",
365
- type: "markdownText",
366
- props: {
367
- md: s.md
368
- }
369
- })
370
- });
371
- class c {
372
- constructor(t) {
373
- this.conditions = t;
3
+ class e {
4
+ constructor(s) {
5
+ this.conditions = s;
374
6
  }
375
7
  static root() {
376
- return new c([]);
8
+ return new e([]);
377
9
  }
378
10
  // ─── Scope methods (chain-extending, immutable) ───
379
- tag(t) {
380
- return new c([...this.conditions, { kind: "tagsAnd", tags: [t] }]);
11
+ tag(s) {
12
+ return new e([...this.conditions, { kind: "tagsAnd", tags: [s] }]);
381
13
  }
382
- state(t) {
383
- return new c([...this.conditions, { kind: "state", name: t }]);
14
+ state(s) {
15
+ return new e([...this.conditions, { kind: "state", name: s }]);
384
16
  }
385
- tagsAnd(t) {
386
- return new c([...this.conditions, { kind: "tagsAnd", tags: t }]);
17
+ tagsAnd(s) {
18
+ return new e([...this.conditions, { kind: "tagsAnd", tags: s }]);
387
19
  }
388
- tagsOr(t) {
389
- return new c([...this.conditions, { kind: "tagsOr", tags: t }]);
20
+ tagsOr(s) {
21
+ return new e([...this.conditions, { kind: "tagsOr", tags: s }]);
390
22
  }
391
- apply(t) {
392
- if (this.conditions.length === 0) return t;
393
- const e = this.conditions.find(
23
+ apply(s) {
24
+ if (this.conditions.length === 0) return s;
25
+ const a = this.conditions.find(
394
26
  (i) => i.kind === "state"
395
- ), n = this.conditions.filter(
27
+ ), r = this.conditions.filter(
396
28
  (i) => i.kind !== "state"
397
- ), o = t.matcher;
29
+ ), n = s.matcher;
398
30
  return {
399
- ...t,
31
+ ...s,
400
32
  matcher: (i) => {
401
- if (!o(i)) return !1;
402
- for (const r of n) {
403
- const u = i.tags ?? [];
404
- if (r.kind === "tagsAnd") {
405
- for (const a of r.tags)
406
- if (!u.includes(a)) return !1;
33
+ if (!n(i)) return !1;
34
+ for (const u of r) {
35
+ const o = i.tags ?? [];
36
+ if (u.kind === "tagsAnd") {
37
+ for (const l of u.tags)
38
+ if (!o.includes(l)) return !1;
407
39
  } else {
408
- if (r.tags.length === 0) continue;
409
- if (!r.tags.some((a) => u.includes(a))) return !1;
40
+ if (u.tags.length === 0) continue;
41
+ if (!u.tags.some((l) => o.includes(l))) return !1;
410
42
  }
411
43
  }
412
44
  return !0;
413
45
  },
414
- ...e ? { targetState: e.name } : {}
46
+ ...a ? { targetState: a.name } : {}
415
47
  };
416
48
  }
417
49
  // ─── Type selectors — inputs ───
418
- inputs(t) {
419
- return this.apply(p(t));
50
+ inputs(s) {
51
+ return this.apply(d(s));
420
52
  }
421
- inputByUid(t, e) {
422
- return this.apply(_(t, e));
53
+ inputByUid(s, a) {
54
+ return this.apply(y(s, a));
423
55
  }
424
- textInputs(t) {
425
- return this.apply(se(t));
56
+ textInputs(s) {
57
+ return this.apply(g(s));
426
58
  }
427
- numberInputs(t) {
428
- return this.apply(ne(t));
59
+ numberInputs(s) {
60
+ return this.apply(c(s));
429
61
  }
430
- booleanInputs(t) {
431
- return this.apply(ie(t));
62
+ booleanInputs(s) {
63
+ return this.apply(h(s));
432
64
  }
433
- selects(t) {
434
- return this.apply(S(t));
65
+ selects(s) {
66
+ return this.apply(_(s));
435
67
  }
436
- selectByUid(t, e) {
437
- return this.apply(E(t, e));
68
+ selectByUid(s, a) {
69
+ return this.apply(B(s, a));
438
70
  }
439
- dropdowns(t) {
440
- return this.apply(h(t));
71
+ dropdowns(s) {
72
+ return this.apply(U(s));
441
73
  }
442
- dropdownByUid(t, e) {
443
- return this.apply(U(t, e));
74
+ dropdownByUid(s, a) {
75
+ return this.apply(m(s, a));
444
76
  }
445
- radiogroups(t) {
446
- return this.apply(A(t));
77
+ radiogroups(s) {
78
+ return this.apply(k(s));
447
79
  }
448
- radiogroupByUid(t, e) {
449
- return this.apply(k(t, e));
80
+ radiogroupByUid(s, a) {
81
+ return this.apply(f(s, a));
450
82
  }
451
- checkboxes(t) {
452
- return this.apply(M(t));
83
+ checkboxes(s) {
84
+ return this.apply(w(s));
453
85
  }
454
- checkboxByUid(t, e) {
455
- return this.apply(B(t, e));
86
+ checkboxByUid(s, a) {
87
+ return this.apply(I(s, a));
456
88
  }
457
- textareas(t) {
458
- return this.apply(D(t));
89
+ textareas(s) {
90
+ return this.apply(x(s));
459
91
  }
460
- textareaByUid(t, e) {
461
- return this.apply(R(t, e));
92
+ textareaByUid(s, a) {
93
+ return this.apply(D(s, a));
462
94
  }
463
- passwords(t) {
464
- return this.apply(P(t));
95
+ passwords(s) {
96
+ return this.apply(C(s));
465
97
  }
466
- passwordByUid(t, e) {
467
- return this.apply(w(t, e));
98
+ passwordByUid(s, a) {
99
+ return this.apply(b(s, a));
468
100
  }
469
- currencies(t) {
470
- return this.apply(x(t));
101
+ currencies(s) {
102
+ return this.apply(A(s));
471
103
  }
472
- currencyByUid(t, e) {
473
- return this.apply(N(t, e));
104
+ currencyByUid(s, a) {
105
+ return this.apply(R(s, a));
474
106
  }
475
- markdowns(t) {
476
- return this.apply(b(t));
107
+ markdowns(s) {
108
+ return this.apply(P(s));
477
109
  }
478
- markdownByUid(t, e) {
479
- return this.apply(L(t, e));
110
+ markdownByUid(s, a) {
111
+ return this.apply(T(s, a));
480
112
  }
481
- lists(t) {
482
- return this.apply(G(t));
113
+ lists(s) {
114
+ return this.apply(L(s));
483
115
  }
484
- listByUid(t, e) {
485
- return this.apply(C(t, e));
116
+ listByUid(s, a) {
117
+ return this.apply(M(s, a));
486
118
  }
487
- calendars(t) {
488
- return this.apply(W(t));
119
+ calendars(s) {
120
+ return this.apply($(s));
489
121
  }
490
- calendarByUid(t, e) {
491
- return this.apply(v(t, e));
122
+ calendarByUid(s, a) {
123
+ return this.apply(F(s, a));
492
124
  }
493
- dateInputs(t) {
494
- return this.apply(F(t));
125
+ dateInputs(s) {
126
+ return this.apply(v(s));
495
127
  }
496
- dateInputByUid(t, e) {
497
- return this.apply(K(t, e));
128
+ dateInputByUid(s, a) {
129
+ return this.apply(z(s, a));
498
130
  }
499
- datePickers(t) {
500
- return this.apply(Y(t));
131
+ datePickers(s) {
132
+ return this.apply(G(s));
501
133
  }
502
- datePickerByUid(t, e) {
503
- return this.apply($(t, e));
134
+ datePickerByUid(s, a) {
135
+ return this.apply(j(s, a));
504
136
  }
505
- rangeCalendars(t) {
506
- return this.apply(j(t));
137
+ rangeCalendars(s) {
138
+ return this.apply(O(s));
507
139
  }
508
- rangeCalendarByUid(t, e) {
509
- return this.apply(z(t, e));
140
+ rangeCalendarByUid(s, a) {
141
+ return this.apply(E(s, a));
510
142
  }
511
- rangeDateInputs(t) {
512
- return this.apply(H(t));
143
+ rangeDateInputs(s) {
144
+ return this.apply(H(s));
513
145
  }
514
- rangeDateInputByUid(t, e) {
515
- return this.apply(X(t, e));
146
+ rangeDateInputByUid(s, a) {
147
+ return this.apply(N(s, a));
516
148
  }
517
- rangeDatePickers(t) {
518
- return this.apply(V(t));
149
+ rangeDatePickers(s) {
150
+ return this.apply(V(s));
519
151
  }
520
- rangeDatePickerByUid(t, e) {
521
- return this.apply(q(t, e));
152
+ rangeDatePickerByUid(s, a) {
153
+ return this.apply(q(s, a));
522
154
  }
523
- repeaters(t) {
524
- return this.apply(Q(t));
155
+ repeaters(s) {
156
+ return this.apply(W(s));
525
157
  }
526
- repeaterByUid(t, e) {
527
- return this.apply(Z(t, e));
158
+ repeaterByUid(s, a) {
159
+ return this.apply(K(s, a));
528
160
  }
529
161
  // ─── Type selectors — actions, displays, layouts ───
530
- actions(t) {
531
- return this.apply(J(t));
162
+ actions(s) {
163
+ return this.apply(Q(s));
532
164
  }
533
- actionByUid(t, e) {
534
- return this.apply(O(t, e));
165
+ actionByUid(s, a) {
166
+ return this.apply(S(s, a));
535
167
  }
536
- layouts(t) {
537
- return this.apply(tt(t));
168
+ layouts(s) {
169
+ return this.apply(X(s));
538
170
  }
539
- layoutByUid(t, e) {
540
- return this.apply(et(t, e));
171
+ layoutByUid(s, a) {
172
+ return this.apply(Y(s, a));
541
173
  }
542
- displays(t) {
543
- return this.apply(st(t));
174
+ displays(s) {
175
+ return this.apply(Z(s));
544
176
  }
545
- displayByUid(t, e) {
546
- return this.apply(nt(t, e));
177
+ displayByUid(s, a) {
178
+ return this.apply(J(s, a));
547
179
  }
548
- alerts(t) {
549
- return this.apply(it(t));
180
+ alerts(s) {
181
+ return this.apply(ss(s));
550
182
  }
551
- alertByUid(t, e) {
552
- return this.apply(rt(t, e));
183
+ alertByUid(s, a) {
184
+ return this.apply(as(s, a));
553
185
  }
554
- markdownTexts(t) {
555
- return this.apply(re(t));
186
+ markdownTexts(s) {
187
+ return this.apply(ts(s));
556
188
  }
557
- markdownTextByUid(t, e) {
558
- return this.apply(oe(t, e));
189
+ markdownTextByUid(s, a) {
190
+ return this.apply(rs(s, a));
559
191
  }
560
- tabs(t) {
561
- return this.apply(ot(t));
192
+ tabs(s) {
193
+ return this.apply(is(s));
562
194
  }
563
- tabsByUid(t, e) {
564
- return this.apply(at(t, e));
195
+ tabsByUid(s, a) {
196
+ return this.apply(es(s, a));
565
197
  }
566
- accordions(t) {
567
- return this.apply(ut(t));
198
+ accordions(s) {
199
+ return this.apply(ns(s));
568
200
  }
569
- accordionByUid(t, e) {
570
- return this.apply(yt(t, e));
201
+ accordionByUid(s, a) {
202
+ return this.apply(us(s, a));
571
203
  }
572
204
  // ─── Type selectors — custom kinds ───
573
- customInputs(t) {
574
- return this.apply(ct(t));
205
+ customInputs(s) {
206
+ return this.apply(ls(s));
575
207
  }
576
- customInputByUid(t, e) {
577
- return this.apply(dt(t, e));
208
+ customInputByUid(s, a) {
209
+ return this.apply(ps(s, a));
578
210
  }
579
- customActions(t) {
580
- return this.apply(pt(t));
211
+ customActions(s) {
212
+ return this.apply(os(s));
581
213
  }
582
- customActionByUid(t, e) {
583
- return this.apply(lt(t, e));
214
+ customActionByUid(s, a) {
215
+ return this.apply(ds(s, a));
584
216
  }
585
- customDisplays(t) {
586
- return this.apply(mt(t));
217
+ customDisplays(s) {
218
+ return this.apply(ys(s));
587
219
  }
588
- customDisplayByUid(t, e) {
589
- return this.apply(ft(t, e));
220
+ customDisplayByUid(s, a) {
221
+ return this.apply(gs(s, a));
590
222
  }
591
- customLayouts(t) {
592
- return this.apply(gt(t));
223
+ customLayouts(s) {
224
+ return this.apply(cs(s));
593
225
  }
594
- customLayoutByUid(t, e) {
595
- return this.apply(Tt(t, e));
226
+ customLayoutByUid(s, a) {
227
+ return this.apply(hs(s, a));
596
228
  }
597
229
  }
598
- const le = {
230
+ const ta = {
599
231
  inputs: {
600
- textInput: Ut,
601
- numberInput: At,
602
- booleanInput: kt,
603
- select: Mt,
604
- dropdown: Bt,
605
- radiogroup: Dt,
606
- checkbox: Rt,
607
- textarea: Pt,
608
- password: wt,
609
- currency: xt,
610
- markdown: Nt,
611
- list: bt,
612
- calendar: Lt,
613
- dateInput: Gt,
614
- datePicker: Ct,
615
- rangeCalendar: Wt,
616
- rangeDateInput: vt,
617
- rangeDatePicker: Ft,
618
- repeater: te,
619
- tags: ee,
620
- custom: Kt
232
+ textInput: Ys,
233
+ numberInput: Xs,
234
+ booleanInput: Ss,
235
+ select: Qs,
236
+ dropdown: Ks,
237
+ radiogroup: Ws,
238
+ checkbox: qs,
239
+ textarea: Vs,
240
+ password: Ns,
241
+ currency: Hs,
242
+ markdown: Es,
243
+ list: Os,
244
+ calendar: js,
245
+ dateInput: Gs,
246
+ datePicker: zs,
247
+ rangeCalendar: vs,
248
+ rangeDateInput: Fs,
249
+ rangeDatePicker: $s,
250
+ repeater: Ms,
251
+ tags: Ls,
252
+ custom: Ts
621
253
  },
622
254
  actions: {
623
- button: Yt,
624
- custom: $t
255
+ button: Ps,
256
+ custom: Rs
625
257
  },
626
258
  displays: {
627
- display: It,
628
- alert: jt,
629
- markdownText: zt,
630
- custom: Ht
259
+ display: As,
260
+ alert: bs,
261
+ markdownText: Cs,
262
+ custom: Ds
631
263
  },
632
264
  layouts: {
633
- flex: l,
634
- horizontalFlex: Xt,
635
- verticalFlex: Vt,
636
- grid: m,
637
- horizontalGrid: qt,
638
- verticalGrid: Qt,
639
- tabs: Zt,
640
- accordion: Jt,
641
- custom: Ot
265
+ flex: xs,
266
+ horizontalFlex: Is,
267
+ verticalFlex: ws,
268
+ grid: fs,
269
+ horizontalGrid: ks,
270
+ verticalGrid: ms,
271
+ tabs: Us,
272
+ accordion: Bs,
273
+ custom: _s
642
274
  },
643
- selectors: c.root()
644
- }, { gsl: me, gslByUid: fe } = I({
645
- itemType: "TAGS",
646
- entryShape: "keyed",
647
- sensibleDefaults: {
648
- base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
649
- fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
650
- apply: (s, t) => Et(ht(s, t), t)
651
- },
652
- mapToWidget: (s) => ({
653
- uid: s.uid ?? "",
654
- kind: "input",
655
- type: "tags",
656
- path: s.path ?? "",
657
- ...s.label != null ? { label: s.label } : {},
658
- ...s.disabled != null ? { disabled: s.disabled } : {},
659
- ...s.readonly != null ? { readonly: s.readonly } : {},
660
- ...s.validator != null ? { validator: St(s.validator, "array") } : {},
661
- props: _t(s)
662
- })
663
- });
664
- function ge(s, ...t) {
665
- return t.map((e) => ({
666
- ...e,
667
- targetState: s
668
- }));
669
- }
670
- function Te(s, ...t) {
671
- return {
672
- kind: "aggregated",
673
- matcher: (e) => e.tags?.includes(s) ?? !1,
674
- children: t
675
- };
676
- }
677
- class ae {
678
- create(t) {
679
- return {
680
- states: t.states,
681
- form: {
682
- uid: "gui-root-uid",
683
- type: "flex",
684
- kind: "layout",
685
- children: t.form
686
- }
687
- };
688
- }
689
- }
690
- function Ie() {
691
- return new ae();
692
- }
693
- const _e = (s) => s !== null && typeof s == "object" && Object.prototype.hasOwnProperty.call(s, "label") && Object.prototype.hasOwnProperty.call(s, "value");
694
- function ue(s) {
695
- return typeof s == "object" && s !== null && "$ref" in s && typeof s.$ref == "string" && Object.keys(s).length === 1;
696
- }
697
- async function ye(s, t) {
698
- const e = new URL(s, t).href, n = await fetch(e);
699
- if (!n.ok) throw new Error(`Failed to load form chunk ${e}: ${n.status}`);
700
- const { $schema: o, ...i } = await n.json();
701
- return f(i, e);
702
- }
703
- async function f(s, t) {
704
- if (ue(s)) return ye(s.$ref, t);
705
- const e = s;
706
- if (Array.isArray(e.children)) {
707
- const n = await Promise.all(e.children.map((o) => f(o, t)));
708
- return { ...e, children: n };
709
- }
710
- return s;
711
- }
712
- async function Se(s, t) {
713
- const e = await Promise.all(
714
- s.form.map((n) => f(n, t))
275
+ selectors: e.root()
276
+ };
277
+ function Zs(t) {
278
+ return typeof t == "object" && t !== null && "$ref" in t && typeof t.$ref == "string" && Object.keys(t).length === 1;
279
+ }
280
+ async function Js(t, s) {
281
+ const a = new URL(t, s).href, r = await fetch(a);
282
+ if (!r.ok) throw new Error(`Failed to load form chunk ${a}: ${r.status}`);
283
+ const { $schema: n, ...i } = await r.json();
284
+ return p(i, a);
285
+ }
286
+ async function p(t, s) {
287
+ if (Zs(t)) return Js(t.$ref, s);
288
+ const a = t;
289
+ if (Array.isArray(a.children)) {
290
+ const r = await Promise.all(a.children.map((n) => p(n, s)));
291
+ return { ...a, children: r };
292
+ }
293
+ return t;
294
+ }
295
+ async function ra(t, s) {
296
+ const a = await Promise.all(
297
+ t.form.map((r) => p(r, s))
715
298
  );
716
- return { ...s, form: e };
299
+ return { ...t, form: a };
717
300
  }
718
301
  export {
719
- yt as _gslAccordionByUid,
720
- ut as _gslAccordions,
721
- O as _gslActionByUid,
722
- J as _gslActions,
723
- rt as _gslAlertByUid,
724
- it as _gslAlerts,
725
- ie as _gslBooleanInputs,
726
- v as _gslCalendarByUid,
727
- W as _gslCalendars,
728
- B as _gslCheckboxByUid,
729
- M as _gslCheckboxes,
730
- x as _gslCurrencies,
731
- N as _gslCurrencyByUid,
732
- lt as _gslCustomActionByUid,
733
- pt as _gslCustomActions,
734
- ft as _gslCustomDisplayByUid,
735
- mt as _gslCustomDisplays,
736
- dt as _gslCustomInputByUid,
737
- ct as _gslCustomInputs,
738
- Tt as _gslCustomLayoutByUid,
739
- gt as _gslCustomLayouts,
740
- K as _gslDateInputByUid,
741
- F as _gslDateInputs,
742
- $ as _gslDatePickerByUid,
743
- Y as _gslDatePickers,
744
- nt as _gslDisplayByUid,
745
- st as _gslDisplays,
746
- U as _gslDropdownByUid,
747
- h as _gslDropdowns,
748
- _ as _gslInputByUid,
749
- p as _gslInputs,
750
- et as _gslLayoutByUid,
751
- tt as _gslLayouts,
752
- C as _gslListByUid,
753
- G as _gslLists,
754
- L as _gslMarkdownByUid,
755
- b as _gslMarkdowns,
756
- ne as _gslNumberInputs,
757
- w as _gslPasswordByUid,
758
- P as _gslPasswords,
759
- k as _gslRadiogroupByUid,
760
- A as _gslRadiogroups,
761
- z as _gslRangeCalendarByUid,
762
- j as _gslRangeCalendars,
763
- X as _gslRangeDateInputByUid,
764
- H as _gslRangeDateInputs,
765
- q as _gslRangeDatePickerByUid,
766
- V as _gslRangeDatePickers,
767
- Z as _gslRepeaterByUid,
768
- Q as _gslRepeaters,
769
- E as _gslSelectByUid,
770
- S as _gslSelects,
771
- ge as _gslStates,
772
- ot as _gslTabs,
773
- at as _gslTabsByUid,
774
- Te as _gslTag,
775
- se as _gslTextInputs,
776
- R as _gslTextareaByUid,
777
- D as _gslTextareas,
778
- Jt as _guiAccordion,
779
- jt as _guiAlert,
780
- kt as _guiBooleanInput,
781
- Yt as _guiButton,
782
- Lt as _guiCalendar,
783
- Rt as _guiCheckbox,
784
- xt as _guiCurrency,
785
- $t as _guiCustomAction,
786
- Ht as _guiCustomDisplay,
787
- Kt as _guiCustomInput,
788
- Ot as _guiCustomLayout,
789
- Gt as _guiDateInput,
790
- Ct as _guiDatePicker,
791
- It as _guiDisplay,
792
- Bt as _guiDropdown,
793
- l as _guiFlex,
794
- m as _guiGrid,
795
- Xt as _guiHorizontalFlex,
796
- qt as _guiHorizontalGrid,
797
- bt as _guiList,
798
- Nt as _guiMarkdown,
799
- At as _guiNumberInput,
800
- wt as _guiPassword,
801
- Dt as _guiRadiogroup,
802
- Wt as _guiRangeCalendar,
803
- vt as _guiRangeDateInput,
804
- Ft as _guiRangeDatePicker,
805
- te as _guiRepeater,
806
- Mt as _guiSelect,
807
- Zt as _guiTabs,
808
- Ut as _guiTextInput,
809
- Pt as _guiTextarea,
810
- Vt as _guiVerticalFlex,
811
- Qt as _guiVerticalGrid,
812
- Ue as createGslSelector,
813
- I as defineShortcutType,
814
- _t as extractWidgetProps,
815
- Ae as formDefs,
816
- Ie as golemForm,
817
- le as gui,
818
- ke as isDxDefinitions,
819
- _e as isOption,
820
- ht as processAutoLabel,
821
- Et as processAutoPlaceholder,
822
- Se as resolveChunkRefs,
823
- Me as resolveFormInput
302
+ ta as gui,
303
+ ra as resolveChunkRefs
824
304
  };