@golemui/gui-shared 1.1.1-rc.0 → 1.1.1-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/index.js +23 -366
  3. package/index.umd.cjs +1 -1
  4. package/internals.js +162 -757
  5. package/internals.umd.cjs +1 -1
  6. package/lib/dx/__tests__/helpers.d.ts +1 -1
  7. package/lib/dx/formDef.domain.d.ts +8 -33
  8. package/lib/dx/formDefs.d.ts +7 -0
  9. package/lib/dx/gui.d.ts +281 -52
  10. package/lib/dx/guiDependencyTypes.d.ts +14 -0
  11. package/lib/dx/index.d.ts +12 -11
  12. package/lib/dx/registry.d.ts +26 -0
  13. package/lib/dx/resolveFormInput.d.ts +7 -20
  14. package/lib/dx/shortcuts/accordion/accordion.domain.d.ts +1 -3
  15. package/lib/dx/shortcuts/accordion/guiAccordion.impl.d.ts +1 -1
  16. package/lib/dx/shortcuts/accordion/register.d.ts +4 -2
  17. package/lib/dx/shortcuts/actions/actions.domain.d.ts +1 -2
  18. package/lib/dx/shortcuts/actions/guiActions.impl.d.ts +1 -1
  19. package/lib/dx/shortcuts/actions/register.d.ts +3 -1
  20. package/lib/dx/shortcuts/alert/alert.domain.d.ts +1 -2
  21. package/lib/dx/shortcuts/alert/guiAlert.impl.d.ts +1 -1
  22. package/lib/dx/shortcuts/alert/register.d.ts +4 -2
  23. package/lib/dx/shortcuts/calendar/calendar.domain.d.ts +1 -3
  24. package/lib/dx/shortcuts/calendar/guiCalendar.impl.d.ts +1 -1
  25. package/lib/dx/shortcuts/calendar/register.d.ts +4 -2
  26. package/lib/dx/shortcuts/checkbox/checkbox.domain.d.ts +1 -3
  27. package/lib/dx/shortcuts/checkbox/guiCheckbox.impl.d.ts +1 -1
  28. package/lib/dx/shortcuts/checkbox/register.d.ts +4 -2
  29. package/lib/dx/shortcuts/currency/currency.domain.d.ts +1 -3
  30. package/lib/dx/shortcuts/currency/guiCurrency.impl.d.ts +1 -1
  31. package/lib/dx/shortcuts/currency/register.d.ts +4 -2
  32. package/lib/dx/shortcuts/custom-action/customAction.domain.d.ts +1 -2
  33. package/lib/dx/shortcuts/custom-action/guiCustomAction.impl.d.ts +1 -1
  34. package/lib/dx/shortcuts/custom-action/register.d.ts +4 -2
  35. package/lib/dx/shortcuts/custom-display/customDisplay.domain.d.ts +1 -2
  36. package/lib/dx/shortcuts/custom-display/guiCustomDisplay.impl.d.ts +1 -1
  37. package/lib/dx/shortcuts/custom-display/register.d.ts +4 -2
  38. package/lib/dx/shortcuts/custom-input/customInput.domain.d.ts +1 -2
  39. package/lib/dx/shortcuts/custom-input/guiCustomInput.impl.d.ts +1 -1
  40. package/lib/dx/shortcuts/custom-input/register.d.ts +4 -2
  41. package/lib/dx/shortcuts/custom-layout/customLayout.domain.d.ts +1 -3
  42. package/lib/dx/shortcuts/custom-layout/guiCustomLayout.impl.d.ts +1 -2
  43. package/lib/dx/shortcuts/custom-layout/register.d.ts +4 -2
  44. package/lib/dx/shortcuts/date-input/dateInput.domain.d.ts +1 -3
  45. package/lib/dx/shortcuts/date-input/guiDateInput.impl.d.ts +1 -1
  46. package/lib/dx/shortcuts/date-input/register.d.ts +4 -2
  47. package/lib/dx/shortcuts/date-picker/datePicker.domain.d.ts +1 -3
  48. package/lib/dx/shortcuts/date-picker/guiDatePicker.impl.d.ts +1 -1
  49. package/lib/dx/shortcuts/date-picker/register.d.ts +4 -2
  50. package/lib/dx/shortcuts/date-time-calendar/dateTimeCalendar.domain.d.ts +1 -3
  51. package/lib/dx/shortcuts/date-time-calendar/guiDateTimeCalendar.impl.d.ts +1 -1
  52. package/lib/dx/shortcuts/date-time-calendar/register.d.ts +4 -2
  53. package/lib/dx/shortcuts/date-time-input/dateTimeInput.domain.d.ts +1 -3
  54. package/lib/dx/shortcuts/date-time-input/guiDateTimeInput.impl.d.ts +1 -1
  55. package/lib/dx/shortcuts/date-time-input/register.d.ts +4 -2
  56. package/lib/dx/shortcuts/date-time-picker/dateTimePicker.domain.d.ts +1 -3
  57. package/lib/dx/shortcuts/date-time-picker/guiDateTimePicker.impl.d.ts +1 -1
  58. package/lib/dx/shortcuts/date-time-picker/register.d.ts +4 -2
  59. package/lib/dx/shortcuts/display/display.domain.d.ts +1 -2
  60. package/lib/dx/shortcuts/display/guiDisplay.impl.d.ts +1 -1
  61. package/lib/dx/shortcuts/display/register.d.ts +4 -2
  62. package/lib/dx/shortcuts/dropdown/dropdown.domain.d.ts +1 -2
  63. package/lib/dx/shortcuts/dropdown/guiDropdown.impl.d.ts +1 -1
  64. package/lib/dx/shortcuts/dropdown/register.d.ts +4 -2
  65. package/lib/dx/shortcuts/inputs/gslInputSubtypes.d.ts +3 -3
  66. package/lib/dx/shortcuts/inputs/guiBooleanInput.impl.d.ts +1 -1
  67. package/lib/dx/shortcuts/inputs/guiNumberInput.impl.d.ts +1 -1
  68. package/lib/dx/shortcuts/inputs/guiTextInput.impl.d.ts +1 -1
  69. package/lib/dx/shortcuts/inputs/inputSensibleDefaults.service.d.ts +1 -1
  70. package/lib/dx/shortcuts/inputs/inputs.domain.d.ts +1 -3
  71. package/lib/dx/shortcuts/inputs/register.d.ts +4 -2
  72. package/lib/dx/shortcuts/layouts/guiFlex.impl.d.ts +1 -1
  73. package/lib/dx/shortcuts/layouts/layouts.domain.d.ts +1 -3
  74. package/lib/dx/shortcuts/layouts/register.d.ts +4 -2
  75. package/lib/dx/shortcuts/list/guiList.impl.d.ts +1 -1
  76. package/lib/dx/shortcuts/list/list.domain.d.ts +1 -2
  77. package/lib/dx/shortcuts/list/register.d.ts +4 -2
  78. package/lib/dx/shortcuts/markdown/guiMarkdown.impl.d.ts +1 -1
  79. package/lib/dx/shortcuts/markdown/markdown.domain.d.ts +1 -3
  80. package/lib/dx/shortcuts/markdown/register.d.ts +4 -2
  81. package/lib/dx/shortcuts/markdown-text/guiMarkdownText.impl.d.ts +1 -1
  82. package/lib/dx/shortcuts/markdown-text/markdownText.domain.d.ts +1 -2
  83. package/lib/dx/shortcuts/markdown-text/register.d.ts +4 -2
  84. package/lib/dx/shortcuts/password/guiPassword.impl.d.ts +1 -1
  85. package/lib/dx/shortcuts/password/password.domain.d.ts +1 -3
  86. package/lib/dx/shortcuts/password/register.d.ts +4 -2
  87. package/lib/dx/shortcuts/radiogroup/guiRadiogroup.impl.d.ts +1 -1
  88. package/lib/dx/shortcuts/radiogroup/radiogroup.domain.d.ts +1 -2
  89. package/lib/dx/shortcuts/radiogroup/register.d.ts +4 -2
  90. package/lib/dx/shortcuts/range-calendar/guiRangeCalendar.impl.d.ts +1 -1
  91. package/lib/dx/shortcuts/range-calendar/rangeCalendar.domain.d.ts +1 -3
  92. package/lib/dx/shortcuts/range-calendar/register.d.ts +4 -2
  93. package/lib/dx/shortcuts/range-date-input/guiRangeDateInput.impl.d.ts +1 -1
  94. package/lib/dx/shortcuts/range-date-input/rangeDateInput.domain.d.ts +1 -3
  95. package/lib/dx/shortcuts/range-date-input/register.d.ts +4 -2
  96. package/lib/dx/shortcuts/range-date-picker/guiRangeDatePicker.impl.d.ts +1 -1
  97. package/lib/dx/shortcuts/range-date-picker/rangeDatePicker.domain.d.ts +1 -3
  98. package/lib/dx/shortcuts/range-date-picker/register.d.ts +4 -2
  99. package/lib/dx/shortcuts/range-date-time-calendar/guiRangeDateTimeCalendar.impl.d.ts +1 -1
  100. package/lib/dx/shortcuts/range-date-time-calendar/rangeDateTimeCalendar.domain.d.ts +1 -3
  101. package/lib/dx/shortcuts/range-date-time-calendar/register.d.ts +4 -2
  102. package/lib/dx/shortcuts/range-date-time-input/guiRangeDateTimeInput.impl.d.ts +1 -1
  103. package/lib/dx/shortcuts/range-date-time-input/rangeDateTimeInput.domain.d.ts +1 -3
  104. package/lib/dx/shortcuts/range-date-time-input/register.d.ts +4 -2
  105. package/lib/dx/shortcuts/range-date-time-picker/guiRangeDateTimePicker.impl.d.ts +1 -1
  106. package/lib/dx/shortcuts/range-date-time-picker/rangeDateTimePicker.domain.d.ts +1 -3
  107. package/lib/dx/shortcuts/range-date-time-picker/register.d.ts +4 -2
  108. package/lib/dx/shortcuts/range-time-input/guiRangeTimeInput.impl.d.ts +1 -1
  109. package/lib/dx/shortcuts/range-time-input/rangeTimeInput.domain.d.ts +1 -3
  110. package/lib/dx/shortcuts/range-time-input/register.d.ts +4 -2
  111. package/lib/dx/shortcuts/range-time-picker/guiRangeTimePicker.impl.d.ts +1 -1
  112. package/lib/dx/shortcuts/range-time-picker/rangeTimePicker.domain.d.ts +1 -3
  113. package/lib/dx/shortcuts/range-time-picker/register.d.ts +4 -2
  114. package/lib/dx/shortcuts/repeater/guiRepeater.impl.d.ts +1 -1
  115. package/lib/dx/shortcuts/repeater/register.d.ts +5 -3
  116. package/lib/dx/shortcuts/repeater/repeater.domain.d.ts +1 -4
  117. package/lib/dx/shortcuts/scopes/gslStates.impl.d.ts +1 -1
  118. package/lib/dx/shortcuts/scopes/gslTag.impl.d.ts +1 -1
  119. package/lib/dx/shortcuts/select/guiSelect.impl.d.ts +1 -1
  120. package/lib/dx/shortcuts/select/register.d.ts +4 -2
  121. package/lib/dx/shortcuts/select/select.domain.d.ts +1 -2
  122. package/lib/dx/shortcuts/tabs/guiTabs.impl.d.ts +1 -1
  123. package/lib/dx/shortcuts/tabs/register.d.ts +4 -2
  124. package/lib/dx/shortcuts/tabs/tabs.domain.d.ts +1 -3
  125. package/lib/dx/shortcuts/tags/guiTags.impl.d.ts +1 -1
  126. package/lib/dx/shortcuts/tags/register.d.ts +4 -2
  127. package/lib/dx/shortcuts/tags/tags.domain.d.ts +1 -3
  128. package/lib/dx/shortcuts/textarea/guiTextarea.impl.d.ts +1 -1
  129. package/lib/dx/shortcuts/textarea/register.d.ts +4 -2
  130. package/lib/dx/shortcuts/textarea/textarea.domain.d.ts +1 -3
  131. package/lib/dx/shortcuts/time-input/guiTimeInput.impl.d.ts +1 -1
  132. package/lib/dx/shortcuts/time-input/register.d.ts +4 -2
  133. package/lib/dx/shortcuts/time-input/timeInput.domain.d.ts +1 -3
  134. package/lib/dx/shortcuts/time-picker/guiTimePicker.impl.d.ts +1 -1
  135. package/lib/dx/shortcuts/time-picker/register.d.ts +4 -2
  136. package/lib/dx/shortcuts/time-picker/timePicker.domain.d.ts +1 -3
  137. package/lib/shared.d.ts +3 -0
  138. package/lib/widgets.d.ts +1 -1
  139. package/package.json +7 -3
  140. package/{register-De8Y1vW5.js → resolveFormInput-CsFeoGjz.js} +1402 -1387
  141. package/resolveFormInput-UcmQ-kme.cjs +1 -0
  142. package/lib/dx/core/defineShortcutType.d.ts +0 -39
  143. package/lib/dx/core/dx.domain.d.ts +0 -79
  144. package/lib/dx/core/dxBase.types.d.ts +0 -128
  145. package/lib/dx/core/dxPropsHelper.d.ts +0 -9
  146. package/lib/dx/core/dxUtilityTypes.d.ts +0 -40
  147. package/lib/dx/core/dxValidatorHelper.d.ts +0 -31
  148. package/lib/dx/core/eventWiring.service.d.ts +0 -34
  149. package/lib/dx/core/itemTypeRegistry.d.ts +0 -94
  150. package/lib/dx/core/itemWalker.service.d.ts +0 -31
  151. package/lib/dx/core/selectorNormalizer.service.d.ts +0 -15
  152. package/lib/dx/core/selectorResolver.service.d.ts +0 -11
  153. package/lib/dx/core/sharedSensibleDefaults.service.d.ts +0 -35
  154. package/lib/dx/core/stateExpansion.service.d.ts +0 -31
  155. package/lib/dx/core/widgetMapper.service.d.ts +0 -13
  156. package/lib/dx/core/widgetMerger.service.d.ts +0 -14
  157. package/lib/dx/core/withForm.d.ts +0 -8
  158. package/lib/dx/dx.service.d.ts +0 -36
  159. package/lib/dx/registerAll.d.ts +0 -0
  160. package/lib/dx/shortcuts/scopes/scopeChain.d.ts +0 -132
  161. package/lib/utils/objectUtils.service.d.ts +0 -11
  162. package/register-B3CJMfX9.cjs +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## 1.1.1-rc.1 (2026-08-02)
2
+
3
+ This was a version bump only for gui-shared to align it with other projects, there were no code changes.
4
+
5
+ ## 1.1.1-rc.0 (2026-08-01)
6
+
7
+ ### 🩹 Fixes
8
+
9
+ - **components:** use role toolbar in markdown editor and pass missing titles ([88488312](https://github.com/golemui/golemui/commit/88488312))
10
+ - **components:** announce calendar month changes and label the year selector ([eca6ad26](https://github.com/golemui/golemui/commit/eca6ad26))
11
+ - **components:** accessible date/time pickers ([7e13a999](https://github.com/golemui/golemui/commit/7e13a999))
12
+ - **components:** expose segment aria-label props for date/time parts ([3e80ef30](https://github.com/golemui/golemui/commit/3e80ef30))
13
+
14
+ ### ❤️ Thank You
15
+
16
+ - Raúl Jiménez @Elecash
17
+
1
18
  ## 1.1.0 (2026-07-21)
2
19
 
3
20
  ### 🚀 Features
package/index.js CHANGED
@@ -1,374 +1,31 @@
1
- import { _ as d, a as y, b as o, c, d as _, e as h, f as m, g as B, h as U, i as T, j as k, k as D, l as I, m as P, n as C, o as f, p as R, q as w, r as x, s as b, t as A, u as L, v as M, w as $, x as F, y as G, z as v, A as z, B as j, C as O, D as H, E as N, F as V, G as E, H as W, I as q, J as K, K as Q, L as S, M as X, N as Y, O as Z, P as J, Q as aa, R as sa, S as ta, T as ea, U as ia, V as ra, W as na, X as ua, Y as la, Z as pa, $ as ga, a0 as da, a1 as ya, a2 as oa, a3 as ca, a4 as _a, a5 as ha, a6 as ma, a7 as Ba, a8 as Ua, a9 as Ta, aa as ka, ab as Da, ac as Ia, ad as Pa, ae as Ca, af as fa, ag as Ra, ah as wa, ai as xa, aj as ba, ak as Aa, al as La, am as Ma, an as $a, ao as Fa, ap as Ga, aq as va, ar as za, as as ja, at as Oa, au as Ha, av as Na, aw as Va, ax as Ea, ay as Wa, az as qa, aA as Ka, aB as Qa, aC as Sa, aD as Xa, aE as Ya, aF as Za, aG as Ja, aH as as, aI as ss, aJ as ts, aK as es, aL as is, aM as rs, aN as ns, aO as us, aP as ls, aQ as ps, aR as gs, aS as ds, aT as ys, aU as os, aV as cs, aW as _s, aX as hs, aY as ms, aZ as Bs, a_ as Us, a$ as Ts, b0 as ks, b1 as Ds, b2 as Is, b3 as Ps, b4 as Cs, b5 as fs, b6 as Rs } from "./register-De8Y1vW5.js";
1
+ import { g as p } from "./resolveFormInput-CsFeoGjz.js";
2
+ import "@golemui/dx";
2
3
  import "@golemui/core";
3
- class r {
4
- constructor(a) {
5
- this.conditions = a;
6
- }
7
- static root() {
8
- return new r([]);
9
- }
10
- // ─── Scope methods (chain-extending, immutable) ───
11
- tag(a) {
12
- return new r([...this.conditions, { kind: "tagsAnd", tags: [a] }]);
13
- }
14
- state(a) {
15
- return new r([...this.conditions, { kind: "state", name: a }]);
16
- }
17
- tagsAnd(a) {
18
- return new r([...this.conditions, { kind: "tagsAnd", tags: a }]);
19
- }
20
- tagsOr(a) {
21
- return new r([...this.conditions, { kind: "tagsOr", tags: a }]);
22
- }
23
- apply(a) {
24
- if (this.conditions.length === 0) return a;
25
- const s = this.conditions.find(
26
- (i) => i.kind === "state"
27
- ), e = this.conditions.filter(
28
- (i) => i.kind !== "state"
29
- ), n = a.matcher;
30
- return {
31
- ...a,
32
- matcher: (i) => {
33
- if (!n(i)) return !1;
34
- for (const u of e) {
35
- const g = i.tags ?? [];
36
- if (u.kind === "tagsAnd") {
37
- for (const l of u.tags)
38
- if (!g.includes(l)) return !1;
39
- } else {
40
- if (u.tags.length === 0) continue;
41
- if (!u.tags.some((l) => g.includes(l))) return !1;
42
- }
43
- }
44
- return !0;
45
- },
46
- ...s ? { targetState: s.name } : {}
47
- };
48
- }
49
- // ─── Type selectors — inputs ───
50
- inputs(a) {
51
- return this.apply(d(a));
52
- }
53
- inputByUid(a, s) {
54
- return this.apply(y(a, s));
55
- }
56
- textInputs(a) {
57
- return this.apply(o(a));
58
- }
59
- numberInputs(a) {
60
- return this.apply(c(a));
61
- }
62
- booleanInputs(a) {
63
- return this.apply(_(a));
64
- }
65
- selects(a) {
66
- return this.apply(h(a));
67
- }
68
- selectByUid(a, s) {
69
- return this.apply(m(a, s));
70
- }
71
- dropdowns(a) {
72
- return this.apply(B(a));
73
- }
74
- dropdownByUid(a, s) {
75
- return this.apply(U(a, s));
76
- }
77
- radiogroups(a) {
78
- return this.apply(T(a));
79
- }
80
- radiogroupByUid(a, s) {
81
- return this.apply(k(a, s));
82
- }
83
- checkboxes(a) {
84
- return this.apply(D(a));
85
- }
86
- checkboxByUid(a, s) {
87
- return this.apply(I(a, s));
88
- }
89
- textareas(a) {
90
- return this.apply(P(a));
91
- }
92
- textareaByUid(a, s) {
93
- return this.apply(C(a, s));
94
- }
95
- passwords(a) {
96
- return this.apply(f(a));
97
- }
98
- passwordByUid(a, s) {
99
- return this.apply(R(a, s));
100
- }
101
- currencies(a) {
102
- return this.apply(w(a));
103
- }
104
- currencyByUid(a, s) {
105
- return this.apply(x(a, s));
106
- }
107
- markdowns(a) {
108
- return this.apply(b(a));
109
- }
110
- markdownByUid(a, s) {
111
- return this.apply(A(a, s));
112
- }
113
- lists(a) {
114
- return this.apply(L(a));
115
- }
116
- listByUid(a, s) {
117
- return this.apply(M(a, s));
118
- }
119
- calendars(a) {
120
- return this.apply($(a));
121
- }
122
- calendarByUid(a, s) {
123
- return this.apply(F(a, s));
124
- }
125
- dateTimeCalendars(a) {
126
- return this.apply(G(a));
127
- }
128
- dateTimeCalendarByUid(a, s) {
129
- return this.apply(v(a, s));
130
- }
131
- dateInputs(a) {
132
- return this.apply(z(a));
133
- }
134
- dateInputByUid(a, s) {
135
- return this.apply(j(a, s));
136
- }
137
- timeInputs(a) {
138
- return this.apply(O(a));
139
- }
140
- timeInputByUid(a, s) {
141
- return this.apply(H(a, s));
142
- }
143
- timePickers(a) {
144
- return this.apply(N(a));
145
- }
146
- timePickerByUid(a, s) {
147
- return this.apply(V(a, s));
148
- }
149
- dateTimeInputs(a) {
150
- return this.apply(E(a));
151
- }
152
- dateTimeInputByUid(a, s) {
153
- return this.apply(W(a, s));
154
- }
155
- datePickers(a) {
156
- return this.apply(q(a));
157
- }
158
- datePickerByUid(a, s) {
159
- return this.apply(K(a, s));
160
- }
161
- dateTimePickers(a) {
162
- return this.apply(Q(a));
163
- }
164
- dateTimePickerByUid(a, s) {
165
- return this.apply(S(a, s));
166
- }
167
- rangeCalendars(a) {
168
- return this.apply(X(a));
169
- }
170
- rangeCalendarByUid(a, s) {
171
- return this.apply(Y(a, s));
172
- }
173
- rangeDateInputs(a) {
174
- return this.apply(Z(a));
175
- }
176
- rangeDateInputByUid(a, s) {
177
- return this.apply(J(a, s));
178
- }
179
- rangeTimeInputs(a) {
180
- return this.apply(aa(a));
181
- }
182
- rangeTimeInputByUid(a, s) {
183
- return this.apply(sa(a, s));
184
- }
185
- rangeDateTimeInputs(a) {
186
- return this.apply(ta(a));
187
- }
188
- rangeDateTimeInputByUid(a, s) {
189
- return this.apply(ea(a, s));
190
- }
191
- rangeDateTimeCalendars(a) {
192
- return this.apply(ia(a));
193
- }
194
- rangeDateTimeCalendarByUid(a, s) {
195
- return this.apply(ra(a, s));
196
- }
197
- rangeDateTimePickers(a) {
198
- return this.apply(na(a));
199
- }
200
- rangeDateTimePickerByUid(a, s) {
201
- return this.apply(ua(a, s));
202
- }
203
- rangeDatePickers(a) {
204
- return this.apply(la(a));
205
- }
206
- rangeDatePickerByUid(a, s) {
207
- return this.apply(pa(a, s));
208
- }
209
- rangeTimePickers(a) {
210
- return this.apply(ga(a));
211
- }
212
- rangeTimePickerByUid(a, s) {
213
- return this.apply(da(a, s));
214
- }
215
- repeaters(a) {
216
- return this.apply(ya(a));
217
- }
218
- repeaterByUid(a, s) {
219
- return this.apply(oa(a, s));
220
- }
221
- // ─── Type selectors — actions, displays, layouts ───
222
- actions(a) {
223
- return this.apply(ca(a));
224
- }
225
- actionByUid(a, s) {
226
- return this.apply(_a(a, s));
227
- }
228
- layouts(a) {
229
- return this.apply(ha(a));
230
- }
231
- layoutByUid(a, s) {
232
- return this.apply(ma(a, s));
233
- }
234
- displays(a) {
235
- return this.apply(Ba(a));
236
- }
237
- displayByUid(a, s) {
238
- return this.apply(Ua(a, s));
239
- }
240
- alerts(a) {
241
- return this.apply(Ta(a));
242
- }
243
- alertByUid(a, s) {
244
- return this.apply(ka(a, s));
245
- }
246
- markdownTexts(a) {
247
- return this.apply(Da(a));
248
- }
249
- markdownTextByUid(a, s) {
250
- return this.apply(Ia(a, s));
251
- }
252
- tabs(a) {
253
- return this.apply(Pa(a));
254
- }
255
- tabsByUid(a, s) {
256
- return this.apply(Ca(a, s));
257
- }
258
- accordions(a) {
259
- return this.apply(fa(a));
260
- }
261
- accordionByUid(a, s) {
262
- return this.apply(Ra(a, s));
263
- }
264
- // ─── Type selectors — custom kinds ───
265
- customInputs(a) {
266
- return this.apply(wa(a));
267
- }
268
- customInputByUid(a, s) {
269
- return this.apply(xa(a, s));
270
- }
271
- customActions(a) {
272
- return this.apply(ba(a));
273
- }
274
- customActionByUid(a, s) {
275
- return this.apply(Aa(a, s));
276
- }
277
- customDisplays(a) {
278
- return this.apply(La(a));
279
- }
280
- customDisplayByUid(a, s) {
281
- return this.apply(Ma(a, s));
282
- }
283
- customLayouts(a) {
284
- return this.apply($a(a));
285
- }
286
- customLayoutByUid(a, s) {
287
- return this.apply(Fa(a, s));
288
- }
4
+ function s(r) {
5
+ return typeof r == "object" && r !== null && "$ref" in r && typeof r.$ref == "string" && Object.keys(r).length === 1;
289
6
  }
290
- const Ls = {
291
- inputs: {
292
- textInput: Rs,
293
- numberInput: fs,
294
- booleanInput: Cs,
295
- select: Ps,
296
- dropdown: Is,
297
- radiogroup: Ds,
298
- checkbox: ks,
299
- textarea: Ts,
300
- password: Us,
301
- currency: Bs,
302
- markdown: ms,
303
- list: hs,
304
- calendar: _s,
305
- dateTimeCalendar: cs,
306
- dateInput: os,
307
- datePicker: ys,
308
- dateTimePicker: ds,
309
- timeInput: gs,
310
- timePicker: ps,
311
- dateTimeInput: ls,
312
- rangeCalendar: us,
313
- rangeDateInput: ns,
314
- rangeDateTimeInput: rs,
315
- rangeDateTimeCalendar: is,
316
- rangeDateTimePicker: es,
317
- rangeTimeInput: ts,
318
- rangeDatePicker: ss,
319
- rangeTimePicker: as,
320
- repeater: Ja,
321
- tags: Za,
322
- custom: Ya
323
- },
324
- actions: {
325
- button: Xa,
326
- custom: Sa
327
- },
328
- displays: {
329
- display: Qa,
330
- alert: Ka,
331
- markdownText: qa,
332
- custom: Wa
333
- },
334
- layouts: {
335
- flex: Ea,
336
- horizontalFlex: Va,
337
- verticalFlex: Na,
338
- grid: Ha,
339
- horizontalGrid: Oa,
340
- verticalGrid: ja,
341
- tabs: za,
342
- accordion: va,
343
- custom: Ga
344
- },
345
- selectors: r.root()
346
- };
347
- function ws(t) {
348
- return typeof t == "object" && t !== null && "$ref" in t && typeof t.$ref == "string" && Object.keys(t).length === 1;
7
+ async function i(r, t) {
8
+ const n = new URL(r, t).href, e = await fetch(n);
9
+ if (!e.ok) throw new Error(`Failed to load form chunk ${n}: ${e.status}`);
10
+ const { $schema: a, ...c } = await e.json();
11
+ return o(c, n);
349
12
  }
350
- async function xs(t, a) {
351
- const s = new URL(t, a).href, e = await fetch(s);
352
- if (!e.ok) throw new Error(`Failed to load form chunk ${s}: ${e.status}`);
353
- const { $schema: n, ...i } = await e.json();
354
- return p(i, s);
355
- }
356
- async function p(t, a) {
357
- if (ws(t)) return xs(t.$ref, a);
358
- const s = t;
359
- if (Array.isArray(s.children)) {
360
- const e = await Promise.all(s.children.map((n) => p(n, a)));
361
- return { ...s, children: e };
362
- }
363
- return t;
13
+ async function o(r, t) {
14
+ if (s(r)) return i(r.$ref, t);
15
+ const n = r;
16
+ if (Array.isArray(n.children)) {
17
+ const e = await Promise.all(n.children.map((a) => o(a, t)));
18
+ return { ...n, children: e };
19
+ }
20
+ return r;
364
21
  }
365
- async function Ms(t, a) {
366
- const s = await Promise.all(
367
- t.form.map((e) => p(e, a))
22
+ async function l(r, t) {
23
+ const n = await Promise.all(
24
+ r.form.map((e) => o(e, t))
368
25
  );
369
- return { ...t, form: s };
26
+ return { ...r, form: n };
370
27
  }
371
28
  export {
372
- Ls as gui,
373
- Ms as resolveChunkRefs
29
+ p as gui,
30
+ l as resolveChunkRefs
374
31
  };
package/index.umd.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./register-B3CJMfX9.cjs");require("@golemui/core");class n{constructor(t){this.conditions=t}static root(){return new n([])}tag(t){return new n([...this.conditions,{kind:"tagsAnd",tags:[t]}])}state(t){return new n([...this.conditions,{kind:"state",name:t}])}tagsAnd(t){return new n([...this.conditions,{kind:"tagsAnd",tags:t}])}tagsOr(t){return new n([...this.conditions,{kind:"tagsOr",tags:t}])}apply(t){if(this.conditions.length===0)return t;const i=this.conditions.find(a=>a.kind==="state"),s=this.conditions.filter(a=>a.kind!=="state"),u=t.matcher;return{...t,matcher:a=>{if(!u(a))return!1;for(const l of s){const d=a.tags??[];if(l.kind==="tagsAnd"){for(const p of l.tags)if(!d.includes(p))return!1}else{if(l.tags.length===0)continue;if(!l.tags.some(p=>d.includes(p)))return!1}}return!0},...i?{targetState:i.name}:{}}}inputs(t){return this.apply(e._gslInputs(t))}inputByUid(t,i){return this.apply(e._gslInputByUid(t,i))}textInputs(t){return this.apply(e._gslTextInputs(t))}numberInputs(t){return this.apply(e._gslNumberInputs(t))}booleanInputs(t){return this.apply(e._gslBooleanInputs(t))}selects(t){return this.apply(e._gslSelects(t))}selectByUid(t,i){return this.apply(e._gslSelectByUid(t,i))}dropdowns(t){return this.apply(e._gslDropdowns(t))}dropdownByUid(t,i){return this.apply(e._gslDropdownByUid(t,i))}radiogroups(t){return this.apply(e._gslRadiogroups(t))}radiogroupByUid(t,i){return this.apply(e._gslRadiogroupByUid(t,i))}checkboxes(t){return this.apply(e._gslCheckboxes(t))}checkboxByUid(t,i){return this.apply(e._gslCheckboxByUid(t,i))}textareas(t){return this.apply(e._gslTextareas(t))}textareaByUid(t,i){return this.apply(e._gslTextareaByUid(t,i))}passwords(t){return this.apply(e._gslPasswords(t))}passwordByUid(t,i){return this.apply(e._gslPasswordByUid(t,i))}currencies(t){return this.apply(e._gslCurrencies(t))}currencyByUid(t,i){return this.apply(e._gslCurrencyByUid(t,i))}markdowns(t){return this.apply(e._gslMarkdowns(t))}markdownByUid(t,i){return this.apply(e._gslMarkdownByUid(t,i))}lists(t){return this.apply(e._gslLists(t))}listByUid(t,i){return this.apply(e._gslListByUid(t,i))}calendars(t){return this.apply(e._gslCalendars(t))}calendarByUid(t,i){return this.apply(e._gslCalendarByUid(t,i))}dateTimeCalendars(t){return this.apply(e._gslDateTimeCalendars(t))}dateTimeCalendarByUid(t,i){return this.apply(e._gslDateTimeCalendarByUid(t,i))}dateInputs(t){return this.apply(e._gslDateInputs(t))}dateInputByUid(t,i){return this.apply(e._gslDateInputByUid(t,i))}timeInputs(t){return this.apply(e._gslTimeInputs(t))}timeInputByUid(t,i){return this.apply(e._gslTimeInputByUid(t,i))}timePickers(t){return this.apply(e._gslTimePickers(t))}timePickerByUid(t,i){return this.apply(e._gslTimePickerByUid(t,i))}dateTimeInputs(t){return this.apply(e._gslDateTimeInputs(t))}dateTimeInputByUid(t,i){return this.apply(e._gslDateTimeInputByUid(t,i))}datePickers(t){return this.apply(e._gslDatePickers(t))}datePickerByUid(t,i){return this.apply(e._gslDatePickerByUid(t,i))}dateTimePickers(t){return this.apply(e._gslDateTimePickers(t))}dateTimePickerByUid(t,i){return this.apply(e._gslDateTimePickerByUid(t,i))}rangeCalendars(t){return this.apply(e._gslRangeCalendars(t))}rangeCalendarByUid(t,i){return this.apply(e._gslRangeCalendarByUid(t,i))}rangeDateInputs(t){return this.apply(e._gslRangeDateInputs(t))}rangeDateInputByUid(t,i){return this.apply(e._gslRangeDateInputByUid(t,i))}rangeTimeInputs(t){return this.apply(e._gslRangeTimeInputs(t))}rangeTimeInputByUid(t,i){return this.apply(e._gslRangeTimeInputByUid(t,i))}rangeDateTimeInputs(t){return this.apply(e._gslRangeDateTimeInputs(t))}rangeDateTimeInputByUid(t,i){return this.apply(e._gslRangeDateTimeInputByUid(t,i))}rangeDateTimeCalendars(t){return this.apply(e._gslRangeDateTimeCalendars(t))}rangeDateTimeCalendarByUid(t,i){return this.apply(e._gslRangeDateTimeCalendarByUid(t,i))}rangeDateTimePickers(t){return this.apply(e._gslRangeDateTimePickers(t))}rangeDateTimePickerByUid(t,i){return this.apply(e._gslRangeDateTimePickerByUid(t,i))}rangeDatePickers(t){return this.apply(e._gslRangeDatePickers(t))}rangeDatePickerByUid(t,i){return this.apply(e._gslRangeDatePickerByUid(t,i))}rangeTimePickers(t){return this.apply(e._gslRangeTimePickers(t))}rangeTimePickerByUid(t,i){return this.apply(e._gslRangeTimePickerByUid(t,i))}repeaters(t){return this.apply(e._gslRepeaters(t))}repeaterByUid(t,i){return this.apply(e._gslRepeaterByUid(t,i))}actions(t){return this.apply(e._gslActions(t))}actionByUid(t,i){return this.apply(e._gslActionByUid(t,i))}layouts(t){return this.apply(e._gslLayouts(t))}layoutByUid(t,i){return this.apply(e._gslLayoutByUid(t,i))}displays(t){return this.apply(e._gslDisplays(t))}displayByUid(t,i){return this.apply(e._gslDisplayByUid(t,i))}alerts(t){return this.apply(e._gslAlerts(t))}alertByUid(t,i){return this.apply(e._gslAlertByUid(t,i))}markdownTexts(t){return this.apply(e._gslMarkdownTexts(t))}markdownTextByUid(t,i){return this.apply(e._gslMarkdownTextByUid(t,i))}tabs(t){return this.apply(e._gslTabs(t))}tabsByUid(t,i){return this.apply(e._gslTabsByUid(t,i))}accordions(t){return this.apply(e._gslAccordions(t))}accordionByUid(t,i){return this.apply(e._gslAccordionByUid(t,i))}customInputs(t){return this.apply(e._gslCustomInputs(t))}customInputByUid(t,i){return this.apply(e._gslCustomInputByUid(t,i))}customActions(t){return this.apply(e._gslCustomActions(t))}customActionByUid(t,i){return this.apply(e._gslCustomActionByUid(t,i))}customDisplays(t){return this.apply(e._gslCustomDisplays(t))}customDisplayByUid(t,i){return this.apply(e._gslCustomDisplayByUid(t,i))}customLayouts(t){return this.apply(e._gslCustomLayouts(t))}customLayoutByUid(t,i){return this.apply(e._gslCustomLayoutByUid(t,i))}}const y={inputs:{textInput:e._guiTextInput,numberInput:e._guiNumberInput,booleanInput:e._guiBooleanInput,select:e._guiSelect,dropdown:e._guiDropdown,radiogroup:e._guiRadiogroup,checkbox:e._guiCheckbox,textarea:e._guiTextarea,password:e._guiPassword,currency:e._guiCurrency,markdown:e._guiMarkdown,list:e._guiList,calendar:e._guiCalendar,dateTimeCalendar:e._guiDateTimeCalendar,dateInput:e._guiDateInput,datePicker:e._guiDatePicker,dateTimePicker:e._guiDateTimePicker,timeInput:e._guiTimeInput,timePicker:e._guiTimePicker,dateTimeInput:e._guiDateTimeInput,rangeCalendar:e._guiRangeCalendar,rangeDateInput:e._guiRangeDateInput,rangeDateTimeInput:e._guiRangeDateTimeInput,rangeDateTimeCalendar:e._guiRangeDateTimeCalendar,rangeDateTimePicker:e._guiRangeDateTimePicker,rangeTimeInput:e._guiRangeTimeInput,rangeDatePicker:e._guiRangeDatePicker,rangeTimePicker:e._guiRangeTimePicker,repeater:e._guiRepeater,tags:e._guiTags,custom:e._guiCustomInput},actions:{button:e._guiButton,custom:e._guiCustomAction},displays:{display:e._guiDisplay,alert:e._guiAlert,markdownText:e._guiMarkdownText,custom:e._guiCustomDisplay},layouts:{flex:e._guiFlex,horizontalFlex:e._guiHorizontalFlex,verticalFlex:e._guiVerticalFlex,grid:e._guiGrid,horizontalGrid:e._guiHorizontalGrid,verticalGrid:e._guiVerticalGrid,tabs:e._guiTabs,accordion:e._guiAccordion,custom:e._guiCustomLayout},selectors:n.root()};function o(r){return typeof r=="object"&&r!==null&&"$ref"in r&&typeof r.$ref=="string"&&Object.keys(r).length===1}async function c(r,t){const i=new URL(r,t).href,s=await fetch(i);if(!s.ok)throw new Error(`Failed to load form chunk ${i}: ${s.status}`);const{$schema:u,...a}=await s.json();return g(a,i)}async function g(r,t){if(o(r))return c(r.$ref,t);const i=r;if(Array.isArray(i.children)){const s=await Promise.all(i.children.map(u=>g(u,t)));return{...i,children:s}}return r}async function _(r,t){const i=await Promise.all(r.form.map(s=>g(s,t)));return{...r,form:i}}exports.gui=y;exports.resolveChunkRefs=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./resolveFormInput-UcmQ-kme.cjs");require("@golemui/dx");require("@golemui/core");function c(e){return typeof e=="object"&&e!==null&&"$ref"in e&&typeof e.$ref=="string"&&Object.keys(e).length===1}async function a(e,t){const r=new URL(e,t).href,n=await fetch(r);if(!n.ok)throw new Error(`Failed to load form chunk ${r}: ${n.status}`);const{$schema:s,...u}=await n.json();return o(u,r)}async function o(e,t){if(c(e))return a(e.$ref,t);const r=e;if(Array.isArray(r.children)){const n=await Promise.all(r.children.map(s=>o(s,t)));return{...r,children:n}}return e}async function f(e,t){const r=await Promise.all(e.form.map(n=>o(n,t)));return{...e,form:r}}exports.gui=i.gui;exports.resolveChunkRefs=f;