@texaryn/solid 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +14 -1
- package/dist/components/FormRoot.d.ts +1 -0
- package/dist/index.js +377 -379
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { createFormRuntime as pe, objectChildKey as re, createRendererRegistry as
|
|
2
|
-
import { createSignal as z, createEffect as
|
|
3
|
-
import { createComponent as
|
|
1
|
+
import { createFormRuntime as pe, visibleFieldLabel as ve, objectChildKey as re, createRendererRegistry as $e, createFailedSubmitTracker as be, visibleErrorLabel as _e, visibleErrorMessages as we, englishMessages as xe } from "@texaryn/core";
|
|
2
|
+
import { createSignal as z, createEffect as q, onCleanup as K, createContext as le, useContext as ce, createMemo as b, Show as x, For as E, Switch as Te, Match as j, createUniqueId as Ie } from "solid-js";
|
|
3
|
+
import { createComponent as a, Dynamic as ue, memo as C, delegateEvents as G, use as de, insert as c, setAttribute as k, effect as A, template as $, spread as L, mergeProps as U } from "solid-js/web";
|
|
4
4
|
function ht(t, e) {
|
|
5
5
|
return pe(t, e);
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function V(t) {
|
|
8
8
|
const [e, n] = z(t().getSnapshot(), { equals: !1 });
|
|
9
|
-
return
|
|
10
|
-
const
|
|
11
|
-
n(() =>
|
|
9
|
+
return q(() => {
|
|
10
|
+
const o = t();
|
|
11
|
+
n(() => o.getSnapshot()), K(o.subscribe(() => n(() => o.getSnapshot())));
|
|
12
12
|
}), e;
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
function
|
|
16
|
-
const t = ce(
|
|
14
|
+
const ge = le();
|
|
15
|
+
function F() {
|
|
16
|
+
const t = ce(ge);
|
|
17
17
|
if (!t) throw new Error("Solid form widgets must be rendered below FormRoot");
|
|
18
18
|
return t;
|
|
19
19
|
}
|
|
@@ -21,41 +21,44 @@ const ne = [];
|
|
|
21
21
|
function W(t, e, n) {
|
|
22
22
|
return `${t}-${e}-${n}`;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
const e =
|
|
26
|
-
const
|
|
27
|
-
return
|
|
24
|
+
function me(t) {
|
|
25
|
+
const e = F(), n = b(() => {
|
|
26
|
+
const s = e.document().nodes[t()];
|
|
27
|
+
return s?.type === "field" ? s : void 0;
|
|
28
28
|
});
|
|
29
|
-
function
|
|
30
|
-
const [
|
|
31
|
-
return
|
|
32
|
-
const
|
|
33
|
-
if (!
|
|
34
|
-
I(() =>
|
|
29
|
+
function o(s, l) {
|
|
30
|
+
const [v, I] = z(l, { equals: !1 });
|
|
31
|
+
return q(() => {
|
|
32
|
+
const O = s(t());
|
|
33
|
+
if (!O) {
|
|
34
|
+
I(() => l);
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
I(() =>
|
|
38
|
-
}),
|
|
37
|
+
I(() => O.getSnapshot()), K(O.subscribe(() => I(() => O.getSnapshot())));
|
|
38
|
+
}), v;
|
|
39
39
|
}
|
|
40
|
-
const h =
|
|
41
|
-
|
|
40
|
+
const h = o((s) => e.form().getNodeState(s)?.value, void 0), u = o((s) => e.form().getNodeState(s)?.errors, ne), m = o((s) => e.form().getNodeState(s)?.dirty, !1), w = o((s) => e.form().getNodeState(s)?.touched, !1), d = o((s) => e.form().getNodeState(s)?.visible, !0), g = o((s) => e.form().getNodeState(s)?.disabled, !1), r = o((s) => e.form().getNodeState(s)?.showErrors, !1), f = b(() => r() ? u() : ne), i = b(() => {
|
|
41
|
+
const s = n();
|
|
42
|
+
return s ? ve(s.annotations.title, s.dataPointer, e.messages()) : "";
|
|
43
|
+
}), y = b(() => n()?.helpText ?? n()?.annotations.description), T = b(() => W(e.idPrefix(), n()?.id ?? t(), "input")), p = b(() => W(e.idPrefix(), n()?.id ?? t(), "description")), _ = b(() => W(e.idPrefix(), n()?.id ?? t(), "error")), S = b(() => f().length > 0), D = b(() => [
|
|
44
|
+
y() ? p() : void 0,
|
|
42
45
|
S() ? _() : void 0
|
|
43
46
|
].filter(Boolean).join(" ") || void 0), N = b(() => {
|
|
44
|
-
const
|
|
45
|
-
return typeof
|
|
47
|
+
const s = h();
|
|
48
|
+
return typeof s == "number" ? s : s == null ? "" : String(s);
|
|
46
49
|
});
|
|
47
|
-
function R(
|
|
48
|
-
n()?.readOnly || e.form().dispatch({ type: "SetValue", nodeId: t(), value:
|
|
50
|
+
function R(s) {
|
|
51
|
+
n()?.readOnly || e.form().dispatch({ type: "SetValue", nodeId: t(), value: s });
|
|
49
52
|
}
|
|
50
|
-
function P(
|
|
51
|
-
const
|
|
52
|
-
if (!(
|
|
53
|
-
if (
|
|
54
|
-
const I = Number(
|
|
55
|
-
Number.isInteger(I) && I >= 0 &&
|
|
53
|
+
function P(s, l) {
|
|
54
|
+
const v = n();
|
|
55
|
+
if (!(!v || v.readOnly)) {
|
|
56
|
+
if (v.enumValues?.length) {
|
|
57
|
+
const I = Number(l);
|
|
58
|
+
Number.isInteger(I) && I >= 0 && v.enumValues[I] && R(v.enumValues[I].value);
|
|
56
59
|
return;
|
|
57
60
|
}
|
|
58
|
-
|
|
61
|
+
v.fieldType === "number" || v.fieldType === "integer" ? R(s === "" ? void 0 : Number(s)) : R(s);
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
64
|
function B() {
|
|
@@ -64,37 +67,37 @@ function ge(t) {
|
|
|
64
67
|
return {
|
|
65
68
|
node: n,
|
|
66
69
|
value: h,
|
|
67
|
-
errors:
|
|
68
|
-
visibleErrors:
|
|
69
|
-
dirty:
|
|
70
|
+
errors: u,
|
|
71
|
+
visibleErrors: f,
|
|
72
|
+
dirty: m,
|
|
70
73
|
touched: w,
|
|
71
|
-
visible:
|
|
72
|
-
disabled:
|
|
74
|
+
visible: d,
|
|
75
|
+
disabled: g,
|
|
73
76
|
showErrors: r,
|
|
74
|
-
label:
|
|
75
|
-
description:
|
|
77
|
+
label: i,
|
|
78
|
+
description: y,
|
|
76
79
|
inputId: T,
|
|
77
|
-
descriptionId:
|
|
80
|
+
descriptionId: p,
|
|
78
81
|
errorId: _,
|
|
79
82
|
invalid: S,
|
|
80
|
-
describedBy:
|
|
83
|
+
describedBy: D,
|
|
81
84
|
display: N,
|
|
82
85
|
setRaw: P,
|
|
83
86
|
setValue: R,
|
|
84
87
|
onBlur: B
|
|
85
88
|
};
|
|
86
89
|
}
|
|
87
|
-
const yt =
|
|
90
|
+
const yt = me;
|
|
88
91
|
function Q(t) {
|
|
89
|
-
const e =
|
|
90
|
-
return
|
|
92
|
+
const e = F(), n = b(() => e.document().nodes[t.node.id] ?? t.node), o = b(() => e.registry().resolve(n()));
|
|
93
|
+
return a(x, {
|
|
91
94
|
get when() {
|
|
92
|
-
return
|
|
95
|
+
return C(() => !!n().visible)() && o();
|
|
93
96
|
},
|
|
94
97
|
get children() {
|
|
95
|
-
return
|
|
98
|
+
return a(ue, {
|
|
96
99
|
get component() {
|
|
97
|
-
return
|
|
100
|
+
return o();
|
|
98
101
|
},
|
|
99
102
|
get node() {
|
|
100
103
|
return n();
|
|
@@ -103,213 +106,214 @@ function Q(t) {
|
|
|
103
106
|
}
|
|
104
107
|
});
|
|
105
108
|
}
|
|
106
|
-
var oe = /* @__PURE__ */
|
|
107
|
-
const
|
|
108
|
-
function
|
|
109
|
-
const e =
|
|
110
|
-
let
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
var oe = /* @__PURE__ */ $("<button type=button>"), Se = /* @__PURE__ */ $("<div data-array-container>"), ke = /* @__PURE__ */ $("<span aria-hidden=true class=texaryn-array-drag-handle tabindex=-1>⠿"), Ae = /* @__PURE__ */ $("<button type=button data-reorder-direction=up>"), Ee = /* @__PURE__ */ $("<button type=button data-reorder-direction=down>"), Re = /* @__PURE__ */ $("<div data-array-row>");
|
|
110
|
+
const M = "application/x-texaryn-array-item";
|
|
111
|
+
function Oe(t) {
|
|
112
|
+
const e = F(), n = b(() => e.document().nodes[t.node.id] ?? t.node), o = b(() => n().arrayMeta), h = b(() => n().annotations.title), u = b(() => o()?.itemIds ?? []), [m, w] = z(null);
|
|
113
|
+
let d;
|
|
114
|
+
const g = () => o()?.canReorder === !0 && !n().readOnly && !n().disabled, r = () => {
|
|
115
|
+
d?.removeAttribute("data-array-drag-active"), d?.querySelectorAll("[data-dragging], [data-drop-target]").forEach((p) => {
|
|
116
|
+
p.removeAttribute("data-dragging"), p.removeAttribute("data-drop-target");
|
|
114
117
|
}), w(null);
|
|
115
118
|
};
|
|
116
|
-
|
|
117
|
-
const
|
|
118
|
-
if (!
|
|
119
|
+
q(() => {
|
|
120
|
+
const p = m();
|
|
121
|
+
if (!p) return;
|
|
119
122
|
const _ = e.form();
|
|
120
|
-
(
|
|
123
|
+
(p.runtime !== _ || p.root !== d || p.identityKey !== o()?.identityKey || !g() || !u().includes(p.itemId)) && r();
|
|
121
124
|
}), K(r);
|
|
122
|
-
const
|
|
123
|
-
const _ = n().children[
|
|
125
|
+
const f = (p) => p.target instanceof Element && p.target.closest("[data-array-container]") === d, i = (p) => {
|
|
126
|
+
const _ = n().children[p];
|
|
124
127
|
return _ ? e.document().nodes[_] : void 0;
|
|
125
|
-
},
|
|
126
|
-
itemTemplateTitle:
|
|
128
|
+
}, y = () => e.messages().addItem({
|
|
129
|
+
itemTemplateTitle: o()?.itemTitle,
|
|
127
130
|
containerTitle: h()
|
|
128
|
-
}), T = (
|
|
129
|
-
const
|
|
131
|
+
}), T = (p, _, S) => {
|
|
132
|
+
const D = S.currentTarget, N = document.activeElement === D, R = u()[p];
|
|
130
133
|
e.form().dispatch({
|
|
131
134
|
type: "MoveItem",
|
|
132
135
|
containerId: n().id,
|
|
133
|
-
from:
|
|
136
|
+
from: p,
|
|
134
137
|
to: _
|
|
135
|
-
}), !(!N || !R || _ ===
|
|
136
|
-
const P = [...document.querySelectorAll("[data-array-item-id]")].find((
|
|
138
|
+
}), !(!N || !R || _ === p) && queueMicrotask(() => {
|
|
139
|
+
const P = [...document.querySelectorAll("[data-array-item-id]")].find((s) => s.dataset.arrayItemId === R), B = _ < p && _ === 0 ? "down" : _ > p && _ === u().length - 1 ? "up" : void 0;
|
|
137
140
|
B && P?.querySelector(`[data-reorder-direction="${B}"]`)?.focus();
|
|
138
141
|
});
|
|
139
142
|
};
|
|
140
143
|
return (() => {
|
|
141
|
-
var
|
|
144
|
+
var p = Se();
|
|
142
145
|
return de((_) => {
|
|
143
|
-
|
|
144
|
-
},
|
|
146
|
+
d = _;
|
|
147
|
+
}, p), c(p, a(E, {
|
|
145
148
|
get each() {
|
|
146
|
-
return
|
|
149
|
+
return u();
|
|
147
150
|
},
|
|
148
151
|
children: (_, S) => {
|
|
149
|
-
const
|
|
152
|
+
const D = () => i(S())?.annotations.title, N = () => S() + 1, R = () => e.messages().moveItemUp({
|
|
150
153
|
position: N(),
|
|
151
|
-
itemTitle:
|
|
154
|
+
itemTitle: D(),
|
|
152
155
|
containerTitle: h()
|
|
153
156
|
}), P = () => e.messages().moveItemDown({
|
|
154
157
|
position: N(),
|
|
155
|
-
itemTitle:
|
|
158
|
+
itemTitle: D(),
|
|
156
159
|
containerTitle: h()
|
|
157
160
|
}), B = () => e.messages().removeItem({
|
|
158
161
|
position: N(),
|
|
159
|
-
itemTitle:
|
|
162
|
+
itemTitle: D(),
|
|
160
163
|
containerTitle: h()
|
|
161
164
|
});
|
|
162
165
|
return (() => {
|
|
163
|
-
var
|
|
164
|
-
return
|
|
165
|
-
if (!Array.from(
|
|
166
|
-
|
|
167
|
-
const
|
|
168
|
-
if (!
|
|
166
|
+
var s = Re();
|
|
167
|
+
return s.addEventListener("drop", (l) => {
|
|
168
|
+
if (!Array.from(l.dataTransfer?.types ?? []).includes(M)) return;
|
|
169
|
+
l.stopPropagation();
|
|
170
|
+
const v = m(), I = u();
|
|
171
|
+
if (!d || !f(l) || !v) {
|
|
169
172
|
r();
|
|
170
173
|
return;
|
|
171
174
|
}
|
|
172
|
-
const
|
|
173
|
-
if (
|
|
175
|
+
const O = I.indexOf(v.itemId), Z = I.indexOf(_);
|
|
176
|
+
if (v.runtime !== e.form() || v.root !== d || v.identityKey !== o()?.identityKey || !g() || O < 0 || Z < 0) {
|
|
174
177
|
r();
|
|
175
178
|
return;
|
|
176
179
|
}
|
|
177
|
-
|
|
178
|
-
const ee =
|
|
179
|
-
r(), te !==
|
|
180
|
+
l.preventDefault();
|
|
181
|
+
const ee = l.currentTarget.getBoundingClientRect(), ye = l.clientY >= ee.top + ee.height / 2, H = Z + (ye ? 1 : 0), te = H > O ? H - 1 : H;
|
|
182
|
+
r(), te !== O && e.form().dispatch({
|
|
180
183
|
type: "MoveItem",
|
|
181
184
|
containerId: n().id,
|
|
182
|
-
from:
|
|
185
|
+
from: O,
|
|
183
186
|
to: te
|
|
184
187
|
});
|
|
185
|
-
}),
|
|
186
|
-
Array.from(
|
|
187
|
-
}),
|
|
188
|
-
if (!Array.from(
|
|
189
|
-
if (!
|
|
190
|
-
|
|
188
|
+
}), s.addEventListener("dragleave", (l) => {
|
|
189
|
+
Array.from(l.dataTransfer?.types ?? []).includes(M) && l.currentTarget.removeAttribute("data-drop-target");
|
|
190
|
+
}), s.addEventListener("dragover", (l) => {
|
|
191
|
+
if (!Array.from(l.dataTransfer?.types ?? []).includes(M)) return;
|
|
192
|
+
if (!d || !f(l)) {
|
|
193
|
+
l.stopPropagation();
|
|
191
194
|
return;
|
|
192
195
|
}
|
|
193
|
-
const
|
|
194
|
-
if (
|
|
195
|
-
|
|
196
|
+
const v = m(), I = u();
|
|
197
|
+
if (!v || v.runtime !== e.form() || v.root !== d || v.identityKey !== o()?.identityKey || !g() || !I.includes(v.itemId) || !I.includes(_)) {
|
|
198
|
+
l.stopPropagation();
|
|
196
199
|
return;
|
|
197
200
|
}
|
|
198
|
-
|
|
199
|
-
}), k(
|
|
201
|
+
l.preventDefault(), l.stopPropagation(), l.dataTransfer && (l.dataTransfer.dropEffect = "move"), l.currentTarget.setAttribute("data-drop-target", "");
|
|
202
|
+
}), k(s, "data-array-item-id", _), c(s, a(x, {
|
|
200
203
|
get when() {
|
|
201
|
-
return
|
|
204
|
+
return g();
|
|
202
205
|
},
|
|
203
206
|
get children() {
|
|
204
|
-
var
|
|
205
|
-
return
|
|
206
|
-
|
|
207
|
-
}),
|
|
208
|
-
const I =
|
|
209
|
-
if (!
|
|
210
|
-
|
|
207
|
+
var l = ke();
|
|
208
|
+
return l.addEventListener("dragend", (v) => {
|
|
209
|
+
v.dataTransfer?.clearData(M), r();
|
|
210
|
+
}), l.addEventListener("dragstart", (v) => {
|
|
211
|
+
const I = o()?.identityKey;
|
|
212
|
+
if (!g() || !d || I === void 0 || !u().includes(_)) {
|
|
213
|
+
v.preventDefault();
|
|
211
214
|
return;
|
|
212
215
|
}
|
|
213
|
-
|
|
216
|
+
v.stopPropagation(), v.dataTransfer?.setData(M, _), v.dataTransfer && (v.dataTransfer.effectAllowed = "move"), w({
|
|
214
217
|
runtime: e.form(),
|
|
215
218
|
identityKey: I,
|
|
216
|
-
root:
|
|
219
|
+
root: d,
|
|
217
220
|
itemId: _
|
|
218
|
-
}),
|
|
219
|
-
}), k(
|
|
221
|
+
}), d.setAttribute("data-array-drag-active", ""), v.currentTarget.closest("[data-array-row]")?.setAttribute("data-dragging", "");
|
|
222
|
+
}), k(l, "draggable", !0), l;
|
|
220
223
|
}
|
|
221
|
-
}), null),
|
|
224
|
+
}), null), c(s, a(x, {
|
|
222
225
|
get when() {
|
|
223
|
-
return
|
|
226
|
+
return i(S());
|
|
224
227
|
},
|
|
225
|
-
children: (
|
|
228
|
+
children: (l) => a(Q, {
|
|
226
229
|
get node() {
|
|
227
|
-
return
|
|
230
|
+
return l();
|
|
228
231
|
}
|
|
229
232
|
})
|
|
230
|
-
}), null),
|
|
233
|
+
}), null), c(s, a(x, {
|
|
231
234
|
get when() {
|
|
232
|
-
return
|
|
235
|
+
return C(() => !!o()?.canReorder)() && S() > 0;
|
|
233
236
|
},
|
|
234
237
|
get children() {
|
|
235
|
-
var
|
|
236
|
-
return
|
|
238
|
+
var l = Ae();
|
|
239
|
+
return l.$$click = (v) => T(S(), S() - 1, v), c(l, () => R().label), A(() => k(l, "aria-label", R().accessibleName)), l;
|
|
237
240
|
}
|
|
238
|
-
}), null),
|
|
241
|
+
}), null), c(s, a(x, {
|
|
239
242
|
get when() {
|
|
240
|
-
return
|
|
243
|
+
return C(() => !!o()?.canReorder)() && S() < u().length - 1;
|
|
241
244
|
},
|
|
242
245
|
get children() {
|
|
243
|
-
var
|
|
244
|
-
return
|
|
246
|
+
var l = Ee();
|
|
247
|
+
return l.$$click = (v) => T(S(), S() + 1, v), c(l, () => P().label), A(() => k(l, "aria-label", P().accessibleName)), l;
|
|
245
248
|
}
|
|
246
|
-
}), null),
|
|
249
|
+
}), null), c(s, a(x, {
|
|
247
250
|
get when() {
|
|
248
|
-
return
|
|
251
|
+
return o()?.canRemove;
|
|
249
252
|
},
|
|
250
253
|
get children() {
|
|
251
|
-
var
|
|
252
|
-
return
|
|
254
|
+
var l = oe();
|
|
255
|
+
return l.$$click = () => e.form().dispatch({
|
|
253
256
|
type: "RemoveItem",
|
|
254
257
|
containerId: n().id,
|
|
255
258
|
index: S()
|
|
256
|
-
}), l
|
|
259
|
+
}), c(l, () => B().label), A(() => k(l, "aria-label", B().accessibleName)), l;
|
|
257
260
|
}
|
|
258
|
-
}), null),
|
|
261
|
+
}), null), s;
|
|
259
262
|
})();
|
|
260
263
|
}
|
|
261
|
-
}), null),
|
|
264
|
+
}), null), c(p, a(x, {
|
|
262
265
|
get when() {
|
|
263
|
-
return
|
|
266
|
+
return o()?.canAdd;
|
|
264
267
|
},
|
|
265
268
|
get children() {
|
|
266
269
|
var _ = oe();
|
|
267
270
|
return _.$$click = () => e.form().dispatch({
|
|
268
271
|
type: "InsertItem",
|
|
269
272
|
containerId: n().id,
|
|
270
|
-
index:
|
|
271
|
-
}),
|
|
273
|
+
index: u().length
|
|
274
|
+
}), c(_, () => y().label), A(() => k(_, "aria-label", y().accessibleName)), _;
|
|
272
275
|
}
|
|
273
|
-
}), null),
|
|
276
|
+
}), null), p;
|
|
274
277
|
})();
|
|
275
278
|
}
|
|
276
279
|
G(["click"]);
|
|
277
|
-
var
|
|
278
|
-
function
|
|
280
|
+
var Ce = /* @__PURE__ */ $("<ul>"), De = /* @__PURE__ */ $("<div aria-live=polite aria-atomic=true>"), Ne = /* @__PURE__ */ $("<li>");
|
|
281
|
+
function Be(t) {
|
|
282
|
+
const e = F();
|
|
279
283
|
return (() => {
|
|
280
|
-
var
|
|
281
|
-
return
|
|
284
|
+
var n = De();
|
|
285
|
+
return c(n, a(x, {
|
|
282
286
|
get when() {
|
|
283
287
|
return t.errors.length > 0;
|
|
284
288
|
},
|
|
285
289
|
get children() {
|
|
286
|
-
var
|
|
287
|
-
return
|
|
290
|
+
var o = Ce();
|
|
291
|
+
return c(o, a(E, {
|
|
288
292
|
get each() {
|
|
289
293
|
return t.errors;
|
|
290
294
|
},
|
|
291
|
-
children: (
|
|
292
|
-
var
|
|
293
|
-
return
|
|
295
|
+
children: (h) => (() => {
|
|
296
|
+
var u = Ne();
|
|
297
|
+
return c(u, () => e.messages().validationMessage(h)), u;
|
|
294
298
|
})()
|
|
295
|
-
})),
|
|
299
|
+
})), o;
|
|
296
300
|
}
|
|
297
|
-
})), A(() => k(
|
|
301
|
+
})), A(() => k(n, "id", t.id)), n;
|
|
298
302
|
})();
|
|
299
303
|
}
|
|
300
|
-
var
|
|
304
|
+
var Pe = /* @__PURE__ */ $("<span> (required)"), Fe = /* @__PURE__ */ $("<select>"), ae = /* @__PURE__ */ $("<input>"), Me = /* @__PURE__ */ $("<textarea>"), Ve = /* @__PURE__ */ $("<div>"), qe = /* @__PURE__ */ $("<div><label>"), je = /* @__PURE__ */ $("<option>");
|
|
301
305
|
function J(t, e) {
|
|
302
306
|
if (t === e) return !0;
|
|
303
307
|
if (typeof t != "object" || t === null || typeof e != "object" || e === null) return !1;
|
|
304
308
|
if (Array.isArray(t) || Array.isArray(e))
|
|
305
|
-
return Array.isArray(t) && Array.isArray(e) && t.length === e.length && t.every((
|
|
306
|
-
const n = t,
|
|
307
|
-
return h.length === Object.keys(
|
|
309
|
+
return Array.isArray(t) && Array.isArray(e) && t.length === e.length && t.every((u, m) => J(u, e[m]));
|
|
310
|
+
const n = t, o = e, h = Object.keys(n);
|
|
311
|
+
return h.length === Object.keys(o).length && h.every((u) => Object.hasOwn(o, u) && J(n[u], o[u]));
|
|
308
312
|
}
|
|
309
313
|
function ie(t) {
|
|
310
|
-
const e =
|
|
311
|
-
const
|
|
312
|
-
return String(
|
|
314
|
+
const e = me(() => t.node.id), n = b(() => e.node()), o = b(() => {
|
|
315
|
+
const m = n()?.enumValues ?? [], w = e.value();
|
|
316
|
+
return String(m.findIndex((d) => J(d.value, w)));
|
|
313
317
|
}), h = () => ({
|
|
314
318
|
id: e.inputId(),
|
|
315
319
|
name: n()?.dataPointer || n()?.id || "",
|
|
@@ -318,40 +322,40 @@ function ie(t) {
|
|
|
318
322
|
"aria-invalid": e.invalid() || void 0,
|
|
319
323
|
"aria-describedby": e.describedBy(),
|
|
320
324
|
placeholder: n()?.placeholder
|
|
321
|
-
}),
|
|
322
|
-
e.setRaw(
|
|
325
|
+
}), u = (m) => {
|
|
326
|
+
e.setRaw(m.currentTarget.value);
|
|
323
327
|
};
|
|
324
|
-
return
|
|
328
|
+
return a(x, {
|
|
325
329
|
get when() {
|
|
326
|
-
return
|
|
330
|
+
return C(() => !!e.visible())() && n();
|
|
327
331
|
},
|
|
328
|
-
children: (
|
|
329
|
-
var w =
|
|
330
|
-
return
|
|
332
|
+
children: (m) => (() => {
|
|
333
|
+
var w = qe(), d = w.firstChild;
|
|
334
|
+
return c(d, () => e.label(), null), c(d, a(x, {
|
|
331
335
|
get when() {
|
|
332
|
-
return
|
|
336
|
+
return m().constraints.required;
|
|
333
337
|
},
|
|
334
338
|
get children() {
|
|
335
|
-
return
|
|
339
|
+
return Pe();
|
|
336
340
|
}
|
|
337
|
-
}), null),
|
|
341
|
+
}), null), c(w, a(Te, {
|
|
338
342
|
get children() {
|
|
339
|
-
return [
|
|
343
|
+
return [a(j, {
|
|
340
344
|
get when() {
|
|
341
|
-
return
|
|
345
|
+
return m().enumValues?.length;
|
|
342
346
|
},
|
|
343
347
|
get children() {
|
|
344
|
-
var
|
|
345
|
-
return L(
|
|
348
|
+
var g = Fe();
|
|
349
|
+
return L(g, U(h, {
|
|
346
350
|
get value() {
|
|
347
|
-
return
|
|
351
|
+
return o();
|
|
348
352
|
},
|
|
349
353
|
get "aria-readonly"() {
|
|
350
|
-
return
|
|
354
|
+
return m().readOnly ? "true" : void 0;
|
|
351
355
|
},
|
|
352
356
|
onChange: (r) => {
|
|
353
|
-
if (
|
|
354
|
-
r.currentTarget.value =
|
|
357
|
+
if (m().readOnly) {
|
|
358
|
+
r.currentTarget.value = o();
|
|
355
359
|
return;
|
|
356
360
|
}
|
|
357
361
|
e.setRaw("", r.currentTarget.value);
|
|
@@ -359,32 +363,32 @@ function ie(t) {
|
|
|
359
363
|
get onBlur() {
|
|
360
364
|
return e.onBlur;
|
|
361
365
|
}
|
|
362
|
-
}), !1, !0),
|
|
366
|
+
}), !1, !0), c(g, a(E, {
|
|
363
367
|
get each() {
|
|
364
|
-
return
|
|
368
|
+
return m().enumValues;
|
|
365
369
|
},
|
|
366
|
-
children: (r,
|
|
367
|
-
var
|
|
368
|
-
return
|
|
370
|
+
children: (r, f) => (() => {
|
|
371
|
+
var i = je();
|
|
372
|
+
return c(i, () => r.title ?? String(r.value)), A(() => i.value = String(f())), i;
|
|
369
373
|
})()
|
|
370
|
-
})),
|
|
374
|
+
})), g;
|
|
371
375
|
}
|
|
372
|
-
}),
|
|
376
|
+
}), a(j, {
|
|
373
377
|
get when() {
|
|
374
|
-
return
|
|
378
|
+
return m().fieldType === "boolean";
|
|
375
379
|
},
|
|
376
380
|
get children() {
|
|
377
|
-
var
|
|
378
|
-
return L(
|
|
381
|
+
var g = ae();
|
|
382
|
+
return L(g, U(h, {
|
|
379
383
|
type: "checkbox",
|
|
380
384
|
get checked() {
|
|
381
385
|
return !!e.value();
|
|
382
386
|
},
|
|
383
387
|
get "aria-readonly"() {
|
|
384
|
-
return
|
|
388
|
+
return m().readOnly ? "true" : void 0;
|
|
385
389
|
},
|
|
386
390
|
onChange: (r) => {
|
|
387
|
-
if (
|
|
391
|
+
if (m().readOnly) {
|
|
388
392
|
r.currentTarget.checked = !!e.value();
|
|
389
393
|
return;
|
|
390
394
|
}
|
|
@@ -393,137 +397,137 @@ function ie(t) {
|
|
|
393
397
|
get onBlur() {
|
|
394
398
|
return e.onBlur;
|
|
395
399
|
}
|
|
396
|
-
}), !1, !1),
|
|
400
|
+
}), !1, !1), g;
|
|
397
401
|
}
|
|
398
|
-
}),
|
|
402
|
+
}), a(j, {
|
|
399
403
|
get when() {
|
|
400
|
-
return
|
|
404
|
+
return m().widget === "textarea";
|
|
401
405
|
},
|
|
402
406
|
get children() {
|
|
403
|
-
var
|
|
404
|
-
return L(
|
|
407
|
+
var g = Me();
|
|
408
|
+
return L(g, U(h, {
|
|
405
409
|
get value() {
|
|
406
410
|
return e.display();
|
|
407
411
|
},
|
|
408
412
|
get readOnly() {
|
|
409
|
-
return
|
|
413
|
+
return m().readOnly;
|
|
410
414
|
},
|
|
411
|
-
onInput:
|
|
415
|
+
onInput: u,
|
|
412
416
|
get onBlur() {
|
|
413
417
|
return e.onBlur;
|
|
414
418
|
}
|
|
415
|
-
}), !1, !1),
|
|
419
|
+
}), !1, !1), g;
|
|
416
420
|
}
|
|
417
|
-
}),
|
|
421
|
+
}), a(j, {
|
|
418
422
|
when: !0,
|
|
419
423
|
get children() {
|
|
420
|
-
var
|
|
421
|
-
return L(
|
|
424
|
+
var g = ae();
|
|
425
|
+
return L(g, U(h, {
|
|
422
426
|
get type() {
|
|
423
|
-
return
|
|
427
|
+
return m().fieldType === "number" || m().fieldType === "integer" ? "number" : "text";
|
|
424
428
|
},
|
|
425
429
|
get value() {
|
|
426
430
|
return e.display();
|
|
427
431
|
},
|
|
428
432
|
get readOnly() {
|
|
429
|
-
return
|
|
433
|
+
return m().readOnly;
|
|
430
434
|
},
|
|
431
|
-
onInput:
|
|
435
|
+
onInput: u,
|
|
432
436
|
get onBlur() {
|
|
433
437
|
return e.onBlur;
|
|
434
438
|
}
|
|
435
|
-
}), !1, !1),
|
|
439
|
+
}), !1, !1), g;
|
|
436
440
|
}
|
|
437
441
|
})];
|
|
438
442
|
}
|
|
439
|
-
}), null),
|
|
443
|
+
}), null), c(w, a(x, {
|
|
440
444
|
get when() {
|
|
441
445
|
return e.description();
|
|
442
446
|
},
|
|
443
447
|
get children() {
|
|
444
|
-
var
|
|
445
|
-
return
|
|
448
|
+
var g = Ve();
|
|
449
|
+
return c(g, () => e.description()), A(() => k(g, "id", e.descriptionId())), g;
|
|
446
450
|
}
|
|
447
|
-
}), null),
|
|
451
|
+
}), null), c(w, a(Be, {
|
|
448
452
|
get id() {
|
|
449
453
|
return e.errorId();
|
|
450
454
|
},
|
|
451
455
|
get errors() {
|
|
452
456
|
return e.visibleErrors();
|
|
453
457
|
}
|
|
454
|
-
}), null), A(() => k(
|
|
458
|
+
}), null), A(() => k(d, "for", e.inputId())), w;
|
|
455
459
|
})()
|
|
456
460
|
});
|
|
457
461
|
}
|
|
458
|
-
var
|
|
459
|
-
function
|
|
460
|
-
const e =
|
|
462
|
+
var Le = /* @__PURE__ */ $("<div>"), Ue = /* @__PURE__ */ $("<button type=button>"), Ke = /* @__PURE__ */ $("<fieldset>"), He = /* @__PURE__ */ $("<legend>");
|
|
463
|
+
function We(t) {
|
|
464
|
+
const e = F(), n = b(() => e.document().nodes[t.node.id] ?? t.node), o = b(() => n().children.map((r) => e.document().nodes[r]).filter((r) => r != null)), h = b(() => o().map(re)), u = b(() => n().annotations.title), m = b(() => {
|
|
461
465
|
const r = /* @__PURE__ */ new Map();
|
|
462
|
-
for (const
|
|
463
|
-
r.has(
|
|
466
|
+
for (const f of n().boundaryTargets ?? [])
|
|
467
|
+
r.has(f.reason) || r.set(f.reason, f);
|
|
464
468
|
return [...r.values()];
|
|
465
|
-
}), w = (r) => (e.messages().expandBoundary ?? ((
|
|
466
|
-
label: `Show ${
|
|
467
|
-
accessibleName: `Show ${
|
|
469
|
+
}), w = (r) => (e.messages().expandBoundary ?? ((i) => ({
|
|
470
|
+
label: `Show ${i.boundary}`,
|
|
471
|
+
accessibleName: `Show ${i.boundary}`
|
|
468
472
|
})))({
|
|
469
473
|
boundary: r.reason,
|
|
470
|
-
containerTitle:
|
|
474
|
+
containerTitle: u(),
|
|
471
475
|
position: 1,
|
|
472
476
|
count: 1
|
|
473
|
-
}),
|
|
477
|
+
}), d = (r) => {
|
|
474
478
|
e.form().dispatch({
|
|
475
479
|
type: "ExpandBoundary",
|
|
476
480
|
containerId: n().id,
|
|
477
481
|
targetToken: r.token
|
|
478
482
|
});
|
|
479
|
-
},
|
|
480
|
-
var r =
|
|
481
|
-
return
|
|
483
|
+
}, g = () => (() => {
|
|
484
|
+
var r = Le();
|
|
485
|
+
return c(r, a(E, {
|
|
482
486
|
get each() {
|
|
483
487
|
return h();
|
|
484
488
|
},
|
|
485
|
-
children: (
|
|
486
|
-
const
|
|
487
|
-
return
|
|
489
|
+
children: (f) => {
|
|
490
|
+
const i = b(() => o().find((y) => re(y) === f));
|
|
491
|
+
return a(x, {
|
|
488
492
|
get when() {
|
|
489
|
-
return
|
|
493
|
+
return i();
|
|
490
494
|
},
|
|
491
|
-
children: (
|
|
495
|
+
children: (y) => a(Q, {
|
|
492
496
|
get node() {
|
|
493
|
-
return
|
|
497
|
+
return y();
|
|
494
498
|
}
|
|
495
499
|
})
|
|
496
500
|
});
|
|
497
501
|
}
|
|
498
|
-
}), null),
|
|
502
|
+
}), null), c(r, a(E, {
|
|
499
503
|
get each() {
|
|
500
|
-
return
|
|
504
|
+
return m();
|
|
501
505
|
},
|
|
502
|
-
children: (
|
|
503
|
-
const
|
|
506
|
+
children: (f) => {
|
|
507
|
+
const i = w(f);
|
|
504
508
|
return (() => {
|
|
505
|
-
var
|
|
506
|
-
return
|
|
509
|
+
var y = Ue();
|
|
510
|
+
return y.$$click = () => d(f), c(y, () => i.label), A(() => k(y, "aria-label", i.accessibleName)), y;
|
|
507
511
|
})();
|
|
508
512
|
}
|
|
509
513
|
}), null), r;
|
|
510
514
|
})();
|
|
511
|
-
return t.node.parentId === null ?
|
|
512
|
-
var r =
|
|
513
|
-
return
|
|
515
|
+
return t.node.parentId === null ? g() : (() => {
|
|
516
|
+
var r = Ke();
|
|
517
|
+
return c(r, a(x, {
|
|
514
518
|
get when() {
|
|
515
|
-
return
|
|
519
|
+
return u();
|
|
516
520
|
},
|
|
517
|
-
children: (
|
|
518
|
-
var
|
|
519
|
-
return
|
|
521
|
+
children: (f) => (() => {
|
|
522
|
+
var i = He();
|
|
523
|
+
return c(i, f), i;
|
|
520
524
|
})()
|
|
521
|
-
}), null),
|
|
525
|
+
}), null), c(r, g, null), A(() => k(r, "role", u() === void 0 ? "none" : void 0)), r;
|
|
522
526
|
})();
|
|
523
527
|
}
|
|
524
528
|
G(["click"]);
|
|
525
|
-
function
|
|
526
|
-
const t =
|
|
529
|
+
function Je() {
|
|
530
|
+
const t = $e();
|
|
527
531
|
return t.register({
|
|
528
532
|
test: (e) => e.type === "field" && e.enumValues != null && e.enumValues.length > 0,
|
|
529
533
|
rank: 2
|
|
@@ -533,108 +537,102 @@ function We() {
|
|
|
533
537
|
}, ie), t.register({
|
|
534
538
|
test: (e) => e.type === "container" && e.containerType === "object",
|
|
535
539
|
rank: 1
|
|
536
|
-
},
|
|
540
|
+
}, We), t.register({
|
|
537
541
|
test: (e) => e.type === "container" && e.containerType === "array",
|
|
538
542
|
rank: 1
|
|
539
|
-
},
|
|
543
|
+
}, Oe), t;
|
|
540
544
|
}
|
|
541
|
-
var
|
|
542
|
-
function
|
|
545
|
+
var Ye = /* @__PURE__ */ $("<div role=group tabindex=-1><h2></h2><ul>"), ze = /* @__PURE__ */ $("<li><a>");
|
|
546
|
+
function se(t, e, n) {
|
|
543
547
|
return `${t}-${e}-${n}`;
|
|
544
548
|
}
|
|
545
|
-
function
|
|
546
|
-
const e =
|
|
547
|
-
let
|
|
548
|
-
|
|
549
|
-
const
|
|
550
|
-
|
|
549
|
+
function Ge(t) {
|
|
550
|
+
const e = F(), n = V(() => e.form().visibleErrors), o = V(() => e.form().submission), h = be(e.form().submission.getSnapshot()), u = b(() => se(e.idPrefix(), "error-summary", "heading"));
|
|
551
|
+
let m;
|
|
552
|
+
q(() => {
|
|
553
|
+
const d = n();
|
|
554
|
+
d.length > 0 && h.settle(o(), d) && t.focus !== !1 && queueMicrotask(() => m?.isConnected && m.focus());
|
|
551
555
|
});
|
|
552
|
-
const w = (
|
|
553
|
-
messages:
|
|
556
|
+
const w = (d) => e.messages().errorSummaryDetail({
|
|
557
|
+
messages: we(d, e.messages())
|
|
554
558
|
});
|
|
555
|
-
return
|
|
559
|
+
return a(x, {
|
|
556
560
|
get when() {
|
|
557
561
|
return n().length > 0;
|
|
558
562
|
},
|
|
559
563
|
get children() {
|
|
560
|
-
var
|
|
561
|
-
return typeof
|
|
564
|
+
var d = Ye(), g = d.firstChild, r = g.nextSibling, f = m;
|
|
565
|
+
return typeof f == "function" ? de(f, d) : m = d, c(g, () => e.messages().errorSummaryHeading({
|
|
562
566
|
count: n().length
|
|
563
|
-
})),
|
|
567
|
+
})), c(r, a(E, {
|
|
564
568
|
get each() {
|
|
565
569
|
return n();
|
|
566
570
|
},
|
|
567
|
-
children: (
|
|
568
|
-
var
|
|
569
|
-
return
|
|
571
|
+
children: (i) => (() => {
|
|
572
|
+
var y = ze(), T = y.firstChild;
|
|
573
|
+
return c(T, () => _e(i, e.messages())), c(y, () => w(i), null), A(() => k(T, "href", `#${se(e.idPrefix(), i.nodeId, "input")}`)), y;
|
|
570
574
|
})()
|
|
571
|
-
})), A((
|
|
572
|
-
var
|
|
573
|
-
return
|
|
575
|
+
})), A((i) => {
|
|
576
|
+
var y = u(), T = u();
|
|
577
|
+
return y !== i.e && k(d, "aria-labelledby", i.e = y), T !== i.t && k(g, "id", i.t = T), i;
|
|
574
578
|
}, {
|
|
575
579
|
e: void 0,
|
|
576
580
|
t: void 0
|
|
577
|
-
}),
|
|
581
|
+
}), d;
|
|
578
582
|
}
|
|
579
583
|
});
|
|
580
584
|
}
|
|
581
|
-
var Ge = /* @__PURE__ */ y("<form>");
|
|
582
585
|
function Qe(t) {
|
|
583
586
|
return Array.from(t, (e) => e.codePointAt(0).toString(36)).join("_");
|
|
584
587
|
}
|
|
585
588
|
function pt(t) {
|
|
586
|
-
const e =
|
|
587
|
-
let
|
|
588
|
-
|
|
589
|
-
const
|
|
590
|
-
if (
|
|
591
|
-
const
|
|
592
|
-
|
|
589
|
+
const e = Je(), n = t.form, o = b(() => t.form), h = V(() => o().document), u = () => t.registry ?? e, m = () => t.messages ?? xe, w = `texaryn-${Qe(Ie())}`, d = () => t.idPrefix ?? w;
|
|
590
|
+
let g = n;
|
|
591
|
+
q(() => {
|
|
592
|
+
const f = o();
|
|
593
|
+
if (f === g) return;
|
|
594
|
+
const i = g;
|
|
595
|
+
g = f, t.destroyOnUnmount !== !1 && i !== f && i.destroy();
|
|
593
596
|
}), K(() => {
|
|
594
|
-
t.destroyOnUnmount !== !1 &&
|
|
597
|
+
t.destroyOnUnmount !== !1 && o().destroy();
|
|
595
598
|
});
|
|
596
599
|
const r = {
|
|
597
|
-
form:
|
|
600
|
+
form: o,
|
|
598
601
|
document: h,
|
|
599
|
-
registry:
|
|
600
|
-
messages:
|
|
601
|
-
idPrefix:
|
|
602
|
-
}, p = (o) => {
|
|
603
|
-
o.preventDefault(), a().dispatch({
|
|
604
|
-
type: "Submit"
|
|
605
|
-
});
|
|
602
|
+
registry: u,
|
|
603
|
+
messages: m,
|
|
604
|
+
idPrefix: d
|
|
606
605
|
};
|
|
607
|
-
return
|
|
606
|
+
return a(ge.Provider, {
|
|
608
607
|
value: r,
|
|
609
608
|
get children() {
|
|
610
|
-
|
|
611
|
-
return o.addEventListener("submit", p), l(o, i(x, {
|
|
609
|
+
return [a(x, {
|
|
612
610
|
get when() {
|
|
613
|
-
return
|
|
611
|
+
return C(() => !!t.showErrorSummary)() && o();
|
|
614
612
|
},
|
|
615
613
|
keyed: !0,
|
|
616
614
|
get children() {
|
|
617
|
-
return
|
|
615
|
+
return a(Ge, {
|
|
618
616
|
get focus() {
|
|
619
617
|
return t.summaryFocus !== !1;
|
|
620
618
|
}
|
|
621
619
|
});
|
|
622
620
|
}
|
|
623
|
-
}),
|
|
621
|
+
}), a(x, {
|
|
624
622
|
get when() {
|
|
625
623
|
return h().nodes[h().rootId];
|
|
626
624
|
},
|
|
627
|
-
children: (f) =>
|
|
625
|
+
children: (f) => a(Q, {
|
|
628
626
|
get node() {
|
|
629
627
|
return f();
|
|
630
628
|
}
|
|
631
629
|
})
|
|
632
|
-
}),
|
|
630
|
+
}), C(() => t.children)];
|
|
633
631
|
}
|
|
634
632
|
});
|
|
635
633
|
}
|
|
636
|
-
var Xe = /* @__PURE__ */
|
|
637
|
-
const fe =
|
|
634
|
+
var Xe = /* @__PURE__ */ $("<fieldset><legend>"), Ze = /* @__PURE__ */ $("<div data-texaryn-layout>"), et = /* @__PURE__ */ $("<h2>"), tt = /* @__PURE__ */ $("<p role=note>"), rt = /* @__PURE__ */ $("<p>"), nt = /* @__PURE__ */ $("<button type=button>"), ot = /* @__PURE__ */ $("<ul>"), at = /* @__PURE__ */ $("<li>"), it = /* @__PURE__ */ $("<table><thead><tr></tr></thead><tbody>"), st = /* @__PURE__ */ $("<th scope=col>"), lt = /* @__PURE__ */ $("<tr>"), ct = /* @__PURE__ */ $("<td>");
|
|
635
|
+
const fe = le();
|
|
638
636
|
function X() {
|
|
639
637
|
const t = ce(fe);
|
|
640
638
|
if (!t) throw new Error("Display nodes must be rendered below DocumentRoot");
|
|
@@ -642,114 +640,114 @@ function X() {
|
|
|
642
640
|
}
|
|
643
641
|
function he(t) {
|
|
644
642
|
const e = X();
|
|
645
|
-
return
|
|
643
|
+
return V(() => {
|
|
646
644
|
const n = e.runtime().getCollection(t);
|
|
647
645
|
if (!n) throw new Error(`Node ${t} is not a collection`);
|
|
648
646
|
return n;
|
|
649
647
|
});
|
|
650
648
|
}
|
|
651
649
|
function Y(t) {
|
|
652
|
-
const e = X(), n = b(() => e.document().nodes[t.nodeId]),
|
|
650
|
+
const e = X(), n = b(() => e.document().nodes[t.nodeId]), o = b(() => {
|
|
653
651
|
const r = n();
|
|
654
652
|
if (r)
|
|
655
653
|
return r.type === "container" ? `container:${r.containerType}` : r.type === "text" ? `text:${r.textRole}` : r.type;
|
|
656
654
|
}), h = b(() => {
|
|
657
655
|
const r = n();
|
|
658
656
|
return r ? e.registry()?.resolve(r) : void 0;
|
|
659
|
-
}),
|
|
657
|
+
}), u = () => {
|
|
660
658
|
const r = n();
|
|
661
659
|
return r?.type === "container" ? r : void 0;
|
|
662
|
-
},
|
|
660
|
+
}, m = () => {
|
|
663
661
|
const r = n();
|
|
664
662
|
return r?.type === "text" ? r : void 0;
|
|
665
663
|
}, w = () => {
|
|
666
664
|
const r = n();
|
|
667
665
|
return r?.type === "list" ? r : void 0;
|
|
668
|
-
},
|
|
666
|
+
}, d = () => {
|
|
669
667
|
const r = n();
|
|
670
668
|
return r?.type === "table" ? r : void 0;
|
|
671
|
-
},
|
|
669
|
+
}, g = () => {
|
|
672
670
|
const r = n();
|
|
673
671
|
return r?.type === "action" ? r : void 0;
|
|
674
672
|
};
|
|
675
|
-
return
|
|
673
|
+
return a(x, {
|
|
676
674
|
get when() {
|
|
677
|
-
return
|
|
675
|
+
return o();
|
|
678
676
|
},
|
|
679
677
|
keyed: !0,
|
|
680
678
|
children: (r) => {
|
|
681
|
-
let
|
|
679
|
+
let f = null;
|
|
682
680
|
if (r.startsWith("container:")) {
|
|
683
|
-
const
|
|
684
|
-
|
|
685
|
-
var
|
|
686
|
-
return
|
|
681
|
+
const i = () => u()?.children ?? [];
|
|
682
|
+
f = r === "container:group" ? (() => {
|
|
683
|
+
var y = Xe(), T = y.firstChild;
|
|
684
|
+
return c(T, () => u()?.annotations.title), c(y, a(E, {
|
|
687
685
|
get each() {
|
|
688
|
-
return
|
|
686
|
+
return i();
|
|
689
687
|
},
|
|
690
|
-
children: (
|
|
691
|
-
nodeId:
|
|
688
|
+
children: (p) => a(Y, {
|
|
689
|
+
nodeId: p
|
|
692
690
|
})
|
|
693
|
-
}), null),
|
|
691
|
+
}), null), y;
|
|
694
692
|
})() : (() => {
|
|
695
|
-
var
|
|
696
|
-
return
|
|
693
|
+
var y = Ze();
|
|
694
|
+
return c(y, a(E, {
|
|
697
695
|
get each() {
|
|
698
|
-
return
|
|
696
|
+
return i();
|
|
699
697
|
},
|
|
700
|
-
children: (T) =>
|
|
698
|
+
children: (T) => a(Y, {
|
|
701
699
|
nodeId: T
|
|
702
700
|
})
|
|
703
|
-
})),
|
|
701
|
+
})), y;
|
|
704
702
|
})();
|
|
705
|
-
} else r === "text:heading" ?
|
|
706
|
-
var
|
|
707
|
-
return
|
|
708
|
-
})() : r === "text:help" ?
|
|
709
|
-
var
|
|
710
|
-
return
|
|
711
|
-
})() : r === "text:paragraph" ?
|
|
712
|
-
var
|
|
713
|
-
return
|
|
714
|
-
})() : r === "list" ?
|
|
703
|
+
} else r === "text:heading" ? f = (() => {
|
|
704
|
+
var i = et();
|
|
705
|
+
return c(i, () => m()?.content), i;
|
|
706
|
+
})() : r === "text:help" ? f = (() => {
|
|
707
|
+
var i = tt();
|
|
708
|
+
return c(i, () => m()?.content), i;
|
|
709
|
+
})() : r === "text:paragraph" ? f = (() => {
|
|
710
|
+
var i = rt();
|
|
711
|
+
return c(i, () => m()?.content), i;
|
|
712
|
+
})() : r === "list" ? f = a(x, {
|
|
715
713
|
get when() {
|
|
716
714
|
return w();
|
|
717
715
|
},
|
|
718
716
|
get children() {
|
|
719
|
-
return
|
|
717
|
+
return a(ut, {
|
|
720
718
|
get nodeId() {
|
|
721
719
|
return t.nodeId;
|
|
722
720
|
}
|
|
723
721
|
});
|
|
724
722
|
}
|
|
725
|
-
}) : r === "table" ?
|
|
723
|
+
}) : r === "table" ? f = a(x, {
|
|
726
724
|
get when() {
|
|
727
|
-
return
|
|
725
|
+
return d();
|
|
728
726
|
},
|
|
729
727
|
get children() {
|
|
730
|
-
return
|
|
728
|
+
return a(dt, {
|
|
731
729
|
get nodeId() {
|
|
732
730
|
return t.nodeId;
|
|
733
731
|
}
|
|
734
732
|
});
|
|
735
733
|
}
|
|
736
|
-
}) : r === "action" && (
|
|
737
|
-
var
|
|
738
|
-
return
|
|
739
|
-
const
|
|
740
|
-
|
|
741
|
-
const
|
|
742
|
-
|
|
734
|
+
}) : r === "action" && (f = (() => {
|
|
735
|
+
var i = nt();
|
|
736
|
+
return i.$$click = () => {
|
|
737
|
+
const y = n();
|
|
738
|
+
y?.type === "action" && e.runtime().invokeAction(y.id).catch((T) => {
|
|
739
|
+
const p = e.onActionError();
|
|
740
|
+
p ? p(T) : console.error(T);
|
|
743
741
|
});
|
|
744
|
-
},
|
|
742
|
+
}, c(i, () => g()?.label ?? ""), A(() => i.disabled = !e.runtime().hasActionHandler(g()?.actionType ?? "")), i;
|
|
745
743
|
})());
|
|
746
|
-
return
|
|
744
|
+
return a(x, {
|
|
747
745
|
get when() {
|
|
748
746
|
return h();
|
|
749
747
|
},
|
|
750
|
-
fallback:
|
|
748
|
+
fallback: f,
|
|
751
749
|
get children() {
|
|
752
|
-
return
|
|
750
|
+
return a(ue, {
|
|
753
751
|
get component() {
|
|
754
752
|
return h();
|
|
755
753
|
},
|
|
@@ -769,57 +767,57 @@ function ut(t) {
|
|
|
769
767
|
const e = he(t.nodeId);
|
|
770
768
|
return (() => {
|
|
771
769
|
var n = ot();
|
|
772
|
-
return
|
|
770
|
+
return c(n, a(E, {
|
|
773
771
|
get each() {
|
|
774
|
-
return e().map((
|
|
772
|
+
return e().map((o) => o.id);
|
|
775
773
|
},
|
|
776
|
-
children: (
|
|
777
|
-
const h = () => e().find((
|
|
774
|
+
children: (o) => {
|
|
775
|
+
const h = () => e().find((u) => u.id === o);
|
|
778
776
|
return (() => {
|
|
779
|
-
var
|
|
780
|
-
return
|
|
781
|
-
var
|
|
782
|
-
return () =>
|
|
783
|
-
})()),
|
|
777
|
+
var u = at();
|
|
778
|
+
return c(u, (() => {
|
|
779
|
+
var m = C(() => h()?.value == null);
|
|
780
|
+
return () => m() ? "" : String(h()?.value);
|
|
781
|
+
})()), u;
|
|
784
782
|
})();
|
|
785
783
|
}
|
|
786
784
|
})), n;
|
|
787
785
|
})();
|
|
788
786
|
}
|
|
789
787
|
function dt(t) {
|
|
790
|
-
const e = X(), n = he(t.nodeId),
|
|
788
|
+
const e = X(), n = he(t.nodeId), o = b(() => {
|
|
791
789
|
const h = e.document().nodes[t.nodeId];
|
|
792
790
|
return h?.type === "table" ? h : void 0;
|
|
793
791
|
});
|
|
794
792
|
return (() => {
|
|
795
|
-
var h = it(),
|
|
796
|
-
return
|
|
793
|
+
var h = it(), u = h.firstChild, m = u.firstChild, w = u.nextSibling;
|
|
794
|
+
return c(m, a(E, {
|
|
797
795
|
get each() {
|
|
798
|
-
return
|
|
796
|
+
return o()?.columns ?? [];
|
|
799
797
|
},
|
|
800
|
-
children: (
|
|
801
|
-
var
|
|
802
|
-
return
|
|
798
|
+
children: (d) => (() => {
|
|
799
|
+
var g = st();
|
|
800
|
+
return c(g, () => d.label), g;
|
|
803
801
|
})()
|
|
804
|
-
})),
|
|
802
|
+
})), c(w, a(E, {
|
|
805
803
|
get each() {
|
|
806
|
-
return n().map((
|
|
804
|
+
return n().map((d) => d.id);
|
|
807
805
|
},
|
|
808
|
-
children: (
|
|
809
|
-
const
|
|
806
|
+
children: (d) => {
|
|
807
|
+
const g = () => n().find((r) => r.id === d);
|
|
810
808
|
return (() => {
|
|
811
|
-
var r =
|
|
812
|
-
return
|
|
809
|
+
var r = lt();
|
|
810
|
+
return c(r, a(E, {
|
|
813
811
|
get each() {
|
|
814
|
-
return
|
|
812
|
+
return o()?.columns ?? [];
|
|
815
813
|
},
|
|
816
|
-
children: (
|
|
817
|
-
const
|
|
814
|
+
children: (f, i) => {
|
|
815
|
+
const y = () => g()?.cells[i()] ?? null;
|
|
818
816
|
return (() => {
|
|
819
817
|
var T = ct();
|
|
820
|
-
return
|
|
821
|
-
var
|
|
822
|
-
return () =>
|
|
818
|
+
return c(T, (() => {
|
|
819
|
+
var p = C(() => y() === null);
|
|
820
|
+
return () => p() ? "" : String(y());
|
|
823
821
|
})()), T;
|
|
824
822
|
})();
|
|
825
823
|
}
|
|
@@ -830,41 +828,41 @@ function dt(t) {
|
|
|
830
828
|
})();
|
|
831
829
|
}
|
|
832
830
|
function vt(t) {
|
|
833
|
-
const e =
|
|
831
|
+
const e = V(() => t.runtime.document), n = {
|
|
834
832
|
runtime: () => t.runtime,
|
|
835
833
|
document: e,
|
|
836
834
|
registry: () => t.registry,
|
|
837
835
|
onActionError: () => t.onActionError
|
|
838
836
|
};
|
|
839
|
-
return
|
|
837
|
+
return a(fe.Provider, {
|
|
840
838
|
value: n,
|
|
841
839
|
get children() {
|
|
842
|
-
return [
|
|
840
|
+
return [a(x, {
|
|
843
841
|
get when() {
|
|
844
842
|
return e().rootId;
|
|
845
843
|
},
|
|
846
844
|
keyed: !0,
|
|
847
|
-
children: (
|
|
848
|
-
nodeId:
|
|
845
|
+
children: (o) => a(Y, {
|
|
846
|
+
nodeId: o
|
|
849
847
|
})
|
|
850
|
-
}),
|
|
848
|
+
}), C(() => t.children)];
|
|
851
849
|
}
|
|
852
850
|
});
|
|
853
851
|
}
|
|
854
852
|
G(["click"]);
|
|
855
853
|
export {
|
|
856
|
-
|
|
854
|
+
Oe as ArrayControl,
|
|
857
855
|
vt as DocumentRoot,
|
|
858
|
-
|
|
859
|
-
|
|
856
|
+
Ge as ErrorSummary,
|
|
857
|
+
Be as FieldErrors,
|
|
860
858
|
ie as FieldWidget,
|
|
861
|
-
|
|
859
|
+
ge as FormContext,
|
|
862
860
|
pt as FormRoot,
|
|
863
861
|
Q as NodeRenderer,
|
|
864
|
-
|
|
865
|
-
|
|
862
|
+
We as ObjectLayout,
|
|
863
|
+
Je as createDefaultRegistry,
|
|
866
864
|
ht as createForm,
|
|
867
865
|
yt as useField,
|
|
868
|
-
|
|
869
|
-
|
|
866
|
+
F as useFormContext,
|
|
867
|
+
V as useStore
|
|
870
868
|
};
|