@dynamicforms/vue-forms 3.0.0-alpha.2 → 3.0.0-alpha.4
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/dist/dynamicforms-vue-forms.js +519 -494
- package/dist/dynamicforms-vue-forms.js.map +1 -1
- package/dist/index.d.ts +30 -7
- package/package.json +3 -3
- package/readme.md +12 -9
|
@@ -31,18 +31,18 @@ function pe(e) {
|
|
|
31
31
|
}
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/plugins/devtools/api.ts
|
|
34
|
-
var me = !0, he = !0,
|
|
35
|
-
function
|
|
36
|
-
|
|
34
|
+
var me = !0, he = !0, v, ge = !1;
|
|
35
|
+
function _e(t) {
|
|
36
|
+
ge ? import("./chunks/plugin-Ds_2fb9G.js").then((e) => e.installFor(t)) : (ge = !0, import("./chunks/plugin-Ds_2fb9G.js").then((t) => {
|
|
37
37
|
t.install(), e().forEach(({ element: e }) => t.installFor(e));
|
|
38
38
|
}));
|
|
39
39
|
}
|
|
40
|
-
var
|
|
40
|
+
var ve = {
|
|
41
41
|
setup(e) {
|
|
42
42
|
n(e);
|
|
43
43
|
},
|
|
44
44
|
onElementCreated(e, t) {
|
|
45
|
-
t || (c(e, he),
|
|
45
|
+
t || (c(e, he), _e(e));
|
|
46
46
|
},
|
|
47
47
|
onElementAdopted(e) {
|
|
48
48
|
s(e);
|
|
@@ -51,92 +51,92 @@ var ye = {
|
|
|
51
51
|
i();
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
-
function
|
|
55
|
-
process.env.NODE_ENV !== "production" && me && !
|
|
54
|
+
function ye() {
|
|
55
|
+
process.env.NODE_ENV !== "production" && me && !v && typeof window < "u" && (v = Ne(ve));
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function be(e, t) {
|
|
58
58
|
process.env.NODE_ENV !== "production" && r(e, t);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function xe(e, t = !0) {
|
|
61
61
|
process.env.NODE_ENV !== "production" && o(e, t);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
process.env.NODE_ENV !== "production" && (e.location !== void 0 && (he = e.location), e.registration !== void 0 && a(e.registration), e.enabled !== void 0 && (me = e.enabled, me || (
|
|
63
|
+
function Se(e) {
|
|
64
|
+
process.env.NODE_ENV !== "production" && (e.location !== void 0 && (he = e.location), e.registration !== void 0 && a(e.registration), e.enabled !== void 0 && (me = e.enabled, me || (v?.(), v = void 0), t(me)));
|
|
65
65
|
}
|
|
66
66
|
//#endregion
|
|
67
67
|
//#region src/plugins.ts
|
|
68
|
-
var
|
|
68
|
+
var Ce = Symbol("Field.changeInPlace"), y = [], we = [], Te = [], Ee = [], De = [], Oe = [], ke = /* @__PURE__ */ new WeakSet(), Ae = 0, je = {
|
|
69
69
|
changeInPlace(e, t, n, r) {
|
|
70
|
-
let i = e[
|
|
70
|
+
let i = e[Ce];
|
|
71
71
|
if (typeof i != "function") throw TypeError("changeInPlace: the element is not a Field");
|
|
72
72
|
i.call(e, t, n, r);
|
|
73
73
|
},
|
|
74
74
|
isInternal(e) {
|
|
75
|
-
return e.declaration !== e ||
|
|
75
|
+
return e.declaration !== e || ke.has(e);
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
function
|
|
79
|
-
|
|
78
|
+
function Me() {
|
|
79
|
+
we = y.filter((e) => e.onSetValue), Te = y.filter((e) => e.onSetOriginalValue), Ee = y.filter((e) => e.onElementCreated), De = y.filter((e) => e.onElementAdopted), Oe = y.filter((e) => e.onCommit);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
|
|
81
|
+
function Ne(e) {
|
|
82
|
+
y.push(e), Me();
|
|
83
83
|
let t = () => {
|
|
84
|
-
let t =
|
|
85
|
-
t < 0 || (
|
|
84
|
+
let t = y.lastIndexOf(e);
|
|
85
|
+
t < 0 || (y.splice(t, 1), Me());
|
|
86
86
|
};
|
|
87
87
|
try {
|
|
88
|
-
e.setup?.(
|
|
88
|
+
e.setup?.(je);
|
|
89
89
|
} catch (e) {
|
|
90
90
|
throw t(), e;
|
|
91
91
|
}
|
|
92
92
|
return t;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function Pe(e, t) {
|
|
95
95
|
let n = t;
|
|
96
|
-
for (let t of
|
|
96
|
+
for (let t of we) n = t.onSetValue(n, e);
|
|
97
97
|
return n;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Fe(e, t) {
|
|
100
100
|
let n = t;
|
|
101
|
-
for (let t of
|
|
101
|
+
for (let t of Te) n = t.onSetOriginalValue(n, e);
|
|
102
102
|
return n;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
|
|
104
|
+
function Ie(e) {
|
|
105
|
+
Ae++;
|
|
106
106
|
try {
|
|
107
107
|
return e();
|
|
108
108
|
} finally {
|
|
109
|
-
|
|
109
|
+
Ae--;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
|
|
112
|
+
function Le(e) {
|
|
113
|
+
ke.add(e);
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
process.env.NODE_ENV !== "production" &&
|
|
117
|
-
let t =
|
|
118
|
-
for (let n of
|
|
115
|
+
function Re(e) {
|
|
116
|
+
process.env.NODE_ENV !== "production" && ye();
|
|
117
|
+
let t = Ae > 0;
|
|
118
|
+
for (let n of Ee) n.onElementCreated(e, t);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
|
|
122
|
-
for (let e of
|
|
120
|
+
function ze(e, t) {
|
|
121
|
+
De.length !== 0 && e.whenCommitted(() => {
|
|
122
|
+
for (let e of De) e.onElementAdopted(t);
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
for (let e of
|
|
125
|
+
function Be() {
|
|
126
|
+
for (let e of Oe) e.onCommit();
|
|
127
127
|
}
|
|
128
128
|
//#endregion
|
|
129
129
|
//#region src/transaction.ts
|
|
130
|
-
var
|
|
131
|
-
function
|
|
130
|
+
var b = Symbol("Transaction.capture"), Ve = Symbol("FieldBase.sentNowhere"), He = Symbol("Transaction.restore"), Ue = Symbol("Transaction.announceValue"), We = Symbol("Transaction.settleValidity"), Ge = Symbol("Transaction.announceFlags");
|
|
131
|
+
function x(e) {
|
|
132
132
|
return e;
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function Ke(e) {
|
|
135
135
|
let t = 0, n = e.parent;
|
|
136
136
|
for (; n;) t++, n = n.parent;
|
|
137
137
|
return t;
|
|
138
138
|
}
|
|
139
|
-
var
|
|
139
|
+
var qe = class {
|
|
140
140
|
participants = /* @__PURE__ */ new Map();
|
|
141
141
|
undo = [];
|
|
142
142
|
settled = [];
|
|
@@ -158,7 +158,7 @@ var Je = class {
|
|
|
158
158
|
}
|
|
159
159
|
touch(e) {
|
|
160
160
|
let t = this.participant(e);
|
|
161
|
-
t.snapshot ||=
|
|
161
|
+
t.snapshot ||= x(e)[b]();
|
|
162
162
|
}
|
|
163
163
|
markValueChanged(e, t) {
|
|
164
164
|
let n = this.participant(e);
|
|
@@ -184,11 +184,11 @@ var Je = class {
|
|
|
184
184
|
this.settled.push(e);
|
|
185
185
|
}
|
|
186
186
|
noteDepth(e) {
|
|
187
|
-
this.passDepth < 0 ||
|
|
187
|
+
this.passDepth < 0 || Ke(e) >= this.passDepth && (this.restartPass = !0);
|
|
188
188
|
}
|
|
189
189
|
rollback() {
|
|
190
190
|
this.unwound = !0, [...this.participants.values()].reverse().forEach((e) => {
|
|
191
|
-
e.snapshot &&
|
|
191
|
+
e.snapshot && x(e.element)[He](e.snapshot);
|
|
192
192
|
}), this.participants.clear();
|
|
193
193
|
for (let e = this.undo.length - 1; e >= 0; e--) this.undo[e]();
|
|
194
194
|
this.undo.length = 0, this.settled.length = 0;
|
|
@@ -205,13 +205,13 @@ var Je = class {
|
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
207
|
for (let e = 0; e < this.settled.length; e++) n(this.settled[e]);
|
|
208
|
-
if (this.settled.length = 0, n(
|
|
208
|
+
if (this.settled.length = 0, n(Be), e) throw t;
|
|
209
209
|
}
|
|
210
210
|
buckets(e) {
|
|
211
211
|
let t = [];
|
|
212
212
|
return this.participants.forEach((n) => {
|
|
213
213
|
if (!e(n)) return;
|
|
214
|
-
let r =
|
|
214
|
+
let r = Ke(n.element);
|
|
215
215
|
(t[r] ??= []).push(n);
|
|
216
216
|
}), t;
|
|
217
217
|
}
|
|
@@ -239,61 +239,61 @@ var Je = class {
|
|
|
239
239
|
announceValues() {
|
|
240
240
|
return this.pass((e) => e.valueDirty || e.structural !== void 0, (e) => {
|
|
241
241
|
let { structural: t } = e, n = e.valueDirty, r = e.forceValue;
|
|
242
|
-
e.structural = void 0, e.valueDirty = !1, e.forceValue = !1,
|
|
242
|
+
e.structural = void 0, e.valueDirty = !1, e.forceValue = !1, x(e.element)[Ue](this, n, r, t);
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
245
|
announceFlags() {
|
|
246
246
|
return this.pass((e) => e.flagsDirty, (e) => {
|
|
247
|
-
e.flagsDirty = !1,
|
|
247
|
+
e.flagsDirty = !1, x(e.element)[Ge]();
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
250
|
settleValidity() {
|
|
251
251
|
return this.pass((e) => e.validityDirty, (e) => {
|
|
252
|
-
e.validityDirty = !1,
|
|
252
|
+
e.validityDirty = !1, x(e.element)[We](this);
|
|
253
253
|
});
|
|
254
254
|
}
|
|
255
|
-
},
|
|
256
|
-
function
|
|
257
|
-
return
|
|
255
|
+
}, S, Je;
|
|
256
|
+
function C() {
|
|
257
|
+
return S;
|
|
258
258
|
}
|
|
259
|
-
var
|
|
259
|
+
var Ye = class {}, Xe = class {
|
|
260
260
|
open = !0;
|
|
261
261
|
rollbackRequested = !1;
|
|
262
262
|
rollback() {
|
|
263
|
-
throw this.open ? (this.rollbackRequested = !0, new
|
|
263
|
+
throw this.open ? (this.rollbackRequested = !0, new Ye()) : TypeError("this transaction handle is spent: the transaction that handed it out has closed. A handle is only usable inside the call that received it.");
|
|
264
264
|
}
|
|
265
265
|
close() {
|
|
266
266
|
this.open = !1;
|
|
267
267
|
}
|
|
268
268
|
};
|
|
269
|
-
function
|
|
269
|
+
function Ze(e) {
|
|
270
270
|
if (e != null && typeof e.then == "function") throw TypeError("a transaction may not be asynchronous: the callback returned a thenable. Do the awaiting outside and open a transaction for each synchronous part.");
|
|
271
271
|
}
|
|
272
|
-
function
|
|
273
|
-
if (
|
|
274
|
-
let t = e(
|
|
275
|
-
return
|
|
272
|
+
function w(e) {
|
|
273
|
+
if (S) {
|
|
274
|
+
let t = e(Je);
|
|
275
|
+
return Ze(t), t;
|
|
276
276
|
}
|
|
277
|
-
let t = new
|
|
278
|
-
|
|
277
|
+
let t = new qe(), n = new Xe();
|
|
278
|
+
S = t, Je = n;
|
|
279
279
|
let r;
|
|
280
280
|
try {
|
|
281
|
-
if (r = e(n),
|
|
281
|
+
if (r = e(n), Ze(r), n.rollbackRequested) throw new Ye();
|
|
282
282
|
t.commit();
|
|
283
283
|
} catch (e) {
|
|
284
|
-
if (t.rollback(), e instanceof
|
|
284
|
+
if (t.rollback(), e instanceof Ye) return;
|
|
285
285
|
throw e;
|
|
286
286
|
} finally {
|
|
287
|
-
|
|
287
|
+
S = void 0, Je = void 0, n.close();
|
|
288
288
|
}
|
|
289
289
|
return t.settle(), r;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
292
|
-
return
|
|
291
|
+
function T(e) {
|
|
292
|
+
return S ? e(S) : w(() => e(S));
|
|
293
293
|
}
|
|
294
294
|
//#endregion
|
|
295
295
|
//#region src/actions/field-action-base.ts
|
|
296
|
-
var
|
|
296
|
+
var Qe = Symbol("FieldActionBase.outermost"), $e = Symbol("FieldActionBase.releaseIfAbandoned"), E = class {
|
|
297
297
|
static get classIdentifier() {
|
|
298
298
|
throw Error("classIdentifier must be declared");
|
|
299
299
|
}
|
|
@@ -311,7 +311,7 @@ var $e = Symbol("FieldActionBase.outermost"), et = Symbol("FieldActionBase.relea
|
|
|
311
311
|
forgetState(e) {
|
|
312
312
|
if (!this.states.has(e)) return;
|
|
313
313
|
let t = this.states.get(e);
|
|
314
|
-
this.states.delete(e),
|
|
314
|
+
this.states.delete(e), C()?.whenRolledBack(() => this.states.set(e, t));
|
|
315
315
|
}
|
|
316
316
|
execute(e, t, ...n) {
|
|
317
317
|
return this.executorFn(e, t, ...n);
|
|
@@ -322,8 +322,8 @@ var $e = Symbol("FieldActionBase.outermost"), et = Symbol("FieldActionBase.relea
|
|
|
322
322
|
boundToBinding(e) {}
|
|
323
323
|
unregisterFrom(e) {}
|
|
324
324
|
resetBinding(e) {}
|
|
325
|
-
},
|
|
326
|
-
function
|
|
325
|
+
}, D = class extends Error {}, O = Symbol("FieldBase.noErrorsBaseline"), et = Symbol("FieldBase.changedSinceErrors"), tt = Object.freeze({});
|
|
326
|
+
function nt() {
|
|
327
327
|
return {
|
|
328
328
|
originalValue: void 0,
|
|
329
329
|
announcedValue: void 0,
|
|
@@ -340,59 +340,59 @@ function rt() {
|
|
|
340
340
|
parent: void 0,
|
|
341
341
|
fieldName: void 0,
|
|
342
342
|
declaration: void 0,
|
|
343
|
-
extra:
|
|
343
|
+
extra: tt,
|
|
344
344
|
valid: !0,
|
|
345
345
|
invalidChildren: 0,
|
|
346
|
-
errorsBaseline:
|
|
346
|
+
errorsBaseline: O
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function rt() {
|
|
350
350
|
return {
|
|
351
|
-
...
|
|
351
|
+
...nt(),
|
|
352
352
|
value: void 0,
|
|
353
353
|
touched: !1
|
|
354
354
|
};
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function it() {
|
|
357
357
|
return {
|
|
358
|
-
...
|
|
358
|
+
...nt(),
|
|
359
359
|
announcedValue: null,
|
|
360
360
|
cachedValue: null,
|
|
361
361
|
cachedValueVersion: -1
|
|
362
362
|
};
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function at() {
|
|
365
365
|
return {
|
|
366
|
-
...
|
|
366
|
+
...it(),
|
|
367
367
|
fieldNames: []
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function ot() {
|
|
371
371
|
return {
|
|
372
|
-
...
|
|
372
|
+
...it(),
|
|
373
373
|
rows: null,
|
|
374
374
|
rowsVersion: 0,
|
|
375
375
|
cachedItems: null,
|
|
376
376
|
cachedItemsVersion: -1
|
|
377
377
|
};
|
|
378
378
|
}
|
|
379
|
-
var
|
|
379
|
+
var st = Symbol("Action.executeHandlers"), ct = Symbol("List.reorderRows"), lt = Symbol("FieldBase.beginValidating"), k = Symbol("FieldBase.errorPoliciesChanged"), ut = Symbol("FieldBase.removeErrorsOnSubmit"), dt = Object.freeze([
|
|
380
380
|
"change",
|
|
381
381
|
"edit",
|
|
382
382
|
"submit",
|
|
383
383
|
"never"
|
|
384
|
-
]),
|
|
384
|
+
]), ft = Symbol("ErrorPolicy"), pt = Object.freeze({
|
|
385
385
|
validEffect: !0,
|
|
386
386
|
removeOn: "never"
|
|
387
|
-
}),
|
|
387
|
+
}), A = Object.freeze({ server: Object.freeze({
|
|
388
388
|
validEffect: !0,
|
|
389
389
|
removeOn: "edit"
|
|
390
|
-
}) }),
|
|
390
|
+
}) }), mt = f(0), ht = 0;
|
|
391
391
|
function gt() {
|
|
392
392
|
return ht > 0;
|
|
393
393
|
}
|
|
394
394
|
function _t() {
|
|
395
|
-
|
|
395
|
+
mt.value;
|
|
396
396
|
}
|
|
397
397
|
var j = (e) => typeof e == "string" ? `'${e}'` : String(e);
|
|
398
398
|
function vt(e) {
|
|
@@ -401,7 +401,7 @@ function vt(e) {
|
|
|
401
401
|
if (e === "validator") throw TypeError("'validator' has no rule: a validator replaces its own errors and they always count");
|
|
402
402
|
if (typeof t != "object" || !t) throw TypeError(`The rule for ${j(e)} is not an object of validEffect and removeOn`);
|
|
403
403
|
if (typeof t.validEffect != "boolean") throw TypeError(`validEffect for ${j(e)} is ${j(t.validEffect)}, not a boolean`);
|
|
404
|
-
if (!
|
|
404
|
+
if (!dt.includes(t.removeOn)) throw TypeError(`removeOn for ${j(e)} is ${j(t.removeOn)}, not one of ` + dt.map(j).join(", "));
|
|
405
405
|
if (t.validEffect && t.removeOn === "submit") throw TypeError(`The rule for ${j(e)} combines validEffect: true with removeOn: 'submit': an error that makes the target invalid refuses the submit that would remove it`);
|
|
406
406
|
});
|
|
407
407
|
}
|
|
@@ -416,24 +416,24 @@ function yt(e) {
|
|
|
416
416
|
}
|
|
417
417
|
function bt(e) {
|
|
418
418
|
vt(e);
|
|
419
|
-
let t =
|
|
420
|
-
return
|
|
421
|
-
...
|
|
419
|
+
let t = A;
|
|
420
|
+
return A = Object.freeze({
|
|
421
|
+
...A,
|
|
422
422
|
...yt(e)
|
|
423
|
-
}),
|
|
424
|
-
|
|
423
|
+
}), mt.value++, () => {
|
|
424
|
+
A = t, mt.value++;
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
427
|
function xt(e) {
|
|
428
|
-
return
|
|
428
|
+
return A[e] ?? pt;
|
|
429
429
|
}
|
|
430
|
-
var M = class extends
|
|
430
|
+
var M = class extends E {
|
|
431
431
|
policies;
|
|
432
432
|
constructor(e) {
|
|
433
433
|
vt(e), super((e, t, ...n) => t(e, ...n)), this.policies = yt(e);
|
|
434
434
|
}
|
|
435
435
|
static get classIdentifier() {
|
|
436
|
-
return
|
|
436
|
+
return ft;
|
|
437
437
|
}
|
|
438
438
|
boundToBinding(e) {
|
|
439
439
|
ht++, this.rulesChanged(e);
|
|
@@ -442,7 +442,7 @@ var M = class extends T {
|
|
|
442
442
|
ht--, this.rulesChanged(e);
|
|
443
443
|
}
|
|
444
444
|
rulesChanged(e) {
|
|
445
|
-
|
|
445
|
+
mt.value++, T(() => e[k]());
|
|
446
446
|
}
|
|
447
447
|
};
|
|
448
448
|
function St(e, t) {
|
|
@@ -459,7 +459,7 @@ function Ct(e, t) {
|
|
|
459
459
|
}
|
|
460
460
|
//#endregion
|
|
461
461
|
//#region src/actions/value-changed-action.ts
|
|
462
|
-
var wt = Symbol("ValueChangedAction"), N = class extends
|
|
462
|
+
var wt = Symbol("ValueChangedAction"), N = class extends E {
|
|
463
463
|
constructor(e) {
|
|
464
464
|
super(e);
|
|
465
465
|
}
|
|
@@ -469,7 +469,13 @@ var wt = Symbol("ValueChangedAction"), N = class extends T {
|
|
|
469
469
|
execute(e, t, n, r) {
|
|
470
470
|
return super.execute(e, t, n, r);
|
|
471
471
|
}
|
|
472
|
-
}, Tt =
|
|
472
|
+
}, Tt = "vue-forms";
|
|
473
|
+
function P(e) {
|
|
474
|
+
return `${Tt}.${e}`;
|
|
475
|
+
}
|
|
476
|
+
//#endregion
|
|
477
|
+
//#region src/validators/validation-error.ts
|
|
478
|
+
var Et = class {
|
|
473
479
|
code;
|
|
474
480
|
params;
|
|
475
481
|
detail;
|
|
@@ -483,19 +489,19 @@ var wt = Symbol("ValueChangedAction"), N = class extends T {
|
|
|
483
489
|
sameAs(e) {
|
|
484
490
|
return Object.getPrototypeOf(this) === Object.getPrototypeOf(e) && this.code === e.code && this.detail === e.detail && this.statedOrigin === e.statedOrigin && h(this.params, e.params);
|
|
485
491
|
}
|
|
486
|
-
},
|
|
487
|
-
function
|
|
492
|
+
}, Dt = Symbol("Validator");
|
|
493
|
+
function Ot(e, t) {
|
|
488
494
|
return e.replace(/\{(\w+)\}/g, (e, n) => Object.hasOwn(t, n) ? String(t[n]) : e);
|
|
489
495
|
}
|
|
490
|
-
var
|
|
496
|
+
var F = class extends N {
|
|
491
497
|
source;
|
|
492
498
|
constructor(e) {
|
|
493
499
|
super((t, n, r, i) => {
|
|
494
|
-
let a = this.bindingState(t), o = a.abandon, s = ++a.run, c =
|
|
500
|
+
let a = this.bindingState(t), o = a.abandon, s = ++a.run, c = C(), l = !1, u = () => !l && a.run === s && !c?.rolledBack, d = new AbortController(), f = () => {
|
|
495
501
|
u() || (l = !0, a.abandon === f && (a.abandon = void 0), d.abort());
|
|
496
502
|
};
|
|
497
503
|
o?.();
|
|
498
|
-
let p = t[
|
|
504
|
+
let p = t[Ve]() ? [] : e(r, i, t, d.signal) || [], m = (e) => w(() => {
|
|
499
505
|
let n = e?.map((e) => this.claim(e)) ?? [];
|
|
500
506
|
for (let e = t.errors.length - 1; e >= 0; e--) {
|
|
501
507
|
let r = t.errors[e];
|
|
@@ -508,11 +514,11 @@ var P = class extends N {
|
|
|
508
514
|
});
|
|
509
515
|
if (p instanceof Promise) {
|
|
510
516
|
a.abandon = f, c?.whenRolledBack(f);
|
|
511
|
-
let e = t[
|
|
517
|
+
let e = t[lt]();
|
|
512
518
|
p.then((e) => {
|
|
513
519
|
u() && m(e);
|
|
514
520
|
}, (e) => {
|
|
515
|
-
u() && (m([new
|
|
521
|
+
u() && (m([new Et(P("validation_failed"), {}, "Validation could not be completed")]), console.error("Validation failed", e));
|
|
516
522
|
}).finally(() => {
|
|
517
523
|
a.abandon === f && (a.abandon = void 0), e();
|
|
518
524
|
}).catch((e) => console.error("Validation failed", e));
|
|
@@ -536,13 +542,13 @@ var P = class extends N {
|
|
|
536
542
|
});
|
|
537
543
|
}
|
|
538
544
|
static get classIdentifier() {
|
|
539
|
-
return
|
|
545
|
+
return Dt;
|
|
540
546
|
}
|
|
541
547
|
get eager() {
|
|
542
548
|
return !0;
|
|
543
549
|
}
|
|
544
550
|
unregisterFrom(e) {
|
|
545
|
-
|
|
551
|
+
T((t) => {
|
|
546
552
|
let n = this.bindingState(e), r = n.run;
|
|
547
553
|
t.whenCommitted(() => {
|
|
548
554
|
n.run === r && this.abandonRun(e);
|
|
@@ -562,9 +568,9 @@ var P = class extends N {
|
|
|
562
568
|
return { run: 0 };
|
|
563
569
|
}
|
|
564
570
|
errorFor(e, t, n, r) {
|
|
565
|
-
return new
|
|
571
|
+
return new Et(e?.code ?? t, r, Ot(e?.detail ?? n, r));
|
|
566
572
|
}
|
|
567
|
-
},
|
|
573
|
+
}, kt = class e {
|
|
568
574
|
actions = [];
|
|
569
575
|
get registrations() {
|
|
570
576
|
return this.actions;
|
|
@@ -573,7 +579,7 @@ var P = class extends N {
|
|
|
573
579
|
this.actions = e;
|
|
574
580
|
}
|
|
575
581
|
register(t, n) {
|
|
576
|
-
if (!(t instanceof
|
|
582
|
+
if (!(t instanceof E)) throw Error("Invalid action type");
|
|
577
583
|
t.classIdentifier, Ct(t, this.actions);
|
|
578
584
|
let r = n ? this.actions.indexOf(n) : -1;
|
|
579
585
|
if (n && (n.classIdentifier !== t.classIdentifier || r < 0)) throw Error("Action to register before is not registered under the same identifier");
|
|
@@ -581,7 +587,7 @@ var P = class extends N {
|
|
|
581
587
|
this.actions = e.inserted(this.actions, r, t);
|
|
582
588
|
return;
|
|
583
589
|
}
|
|
584
|
-
let i = t[
|
|
590
|
+
let i = t[Qe] ? -1 : this.actions.findIndex((e) => e[Qe] && e.classIdentifier === t.classIdentifier);
|
|
585
591
|
this.actions = e.inserted(this.actions, i < 0 ? this.actions.length : i, t);
|
|
586
592
|
}
|
|
587
593
|
static inserted(e, t, n) {
|
|
@@ -604,11 +610,11 @@ var P = class extends N {
|
|
|
604
610
|
return this.run(e.classIdentifier, !1, t, n);
|
|
605
611
|
}
|
|
606
612
|
triggerEager(e, ...t) {
|
|
607
|
-
let n = this.runEager((e) => !(e instanceof
|
|
608
|
-
this.runEager((e) => e instanceof
|
|
613
|
+
let n = this.runEager((e) => !(e instanceof F), e, t) ? [e.contribution, ...t.slice(1)] : t;
|
|
614
|
+
this.runEager((e) => e instanceof F, e, n);
|
|
609
615
|
}
|
|
610
616
|
triggerEagerRules(e, ...t) {
|
|
611
|
-
this.runEager((e) => !(e instanceof
|
|
617
|
+
this.runEager((e) => !(e instanceof F), e, t);
|
|
612
618
|
}
|
|
613
619
|
runEager(t, n, r) {
|
|
614
620
|
let i = !1, a = this.actions;
|
|
@@ -619,10 +625,10 @@ var P = class extends N {
|
|
|
619
625
|
try {
|
|
620
626
|
let t = this.walk(a, o, s.classIdentifier, !0, n, r);
|
|
621
627
|
e.isPromise(t) && t.then(void 0, (e) => {
|
|
622
|
-
if (!(e instanceof
|
|
628
|
+
if (!(e instanceof D)) throw e;
|
|
623
629
|
});
|
|
624
630
|
} catch (e) {
|
|
625
|
-
if (!(e instanceof
|
|
631
|
+
if (!(e instanceof D)) throw e;
|
|
626
632
|
}
|
|
627
633
|
}
|
|
628
634
|
}
|
|
@@ -635,7 +641,7 @@ var P = class extends N {
|
|
|
635
641
|
return this.actions.filter((t) => t.classIdentifier === e);
|
|
636
642
|
}
|
|
637
643
|
get validators() {
|
|
638
|
-
return this.actions.filter((e) => e instanceof
|
|
644
|
+
return this.actions.filter((e) => e instanceof F);
|
|
639
645
|
}
|
|
640
646
|
bindTo(e) {
|
|
641
647
|
this.actions.forEach((t) => t.boundToBinding(e));
|
|
@@ -653,7 +659,7 @@ var P = class extends N {
|
|
|
653
659
|
}
|
|
654
660
|
static answerAbort(t) {
|
|
655
661
|
return e.isPromise(t) ? t.then(void 0, (e) => {
|
|
656
|
-
if (e instanceof
|
|
662
|
+
if (e instanceof D) return e;
|
|
657
663
|
throw e;
|
|
658
664
|
}) : t;
|
|
659
665
|
}
|
|
@@ -662,7 +668,7 @@ var P = class extends N {
|
|
|
662
668
|
try {
|
|
663
669
|
return e.answerAbort(this.walk(a, a.length - 1, t, n, r, i));
|
|
664
670
|
} catch (e) {
|
|
665
|
-
if (e instanceof
|
|
671
|
+
if (e instanceof D) return e;
|
|
666
672
|
throw e;
|
|
667
673
|
}
|
|
668
674
|
}
|
|
@@ -674,40 +680,40 @@ var P = class extends N {
|
|
|
674
680
|
};
|
|
675
681
|
//#endregion
|
|
676
682
|
//#region src/resolve.ts
|
|
677
|
-
function
|
|
683
|
+
function I(e) {
|
|
678
684
|
let t = e;
|
|
679
685
|
for (; t.fieldName !== void 0 && t.parent;) t = t.parent;
|
|
680
686
|
return t;
|
|
681
687
|
}
|
|
682
|
-
function
|
|
688
|
+
function At(e, t) {
|
|
683
689
|
let n = e;
|
|
684
|
-
for (let e of
|
|
690
|
+
for (let e of jt(t)) if (n = n.field?.(e) ?? void 0, !n) return;
|
|
685
691
|
return n?.declaration === t ? n : void 0;
|
|
686
692
|
}
|
|
687
|
-
function
|
|
693
|
+
function jt(e) {
|
|
688
694
|
let t = [], n = e;
|
|
689
695
|
for (; n.fieldName !== void 0 && n.parent;) t.unshift(n.fieldName), n = n.parent;
|
|
690
696
|
return t;
|
|
691
697
|
}
|
|
692
|
-
function
|
|
693
|
-
let n =
|
|
698
|
+
function Mt(e, t) {
|
|
699
|
+
let n = At(t, e);
|
|
694
700
|
if (n) return n;
|
|
695
701
|
let r = t.parent;
|
|
696
702
|
for (; r;) {
|
|
697
|
-
let t =
|
|
703
|
+
let t = At(I(r), e);
|
|
698
704
|
if (t) return t;
|
|
699
705
|
r = r.parent;
|
|
700
706
|
}
|
|
701
|
-
return
|
|
707
|
+
return I(e) === I(t.declaration) ? void 0 : e;
|
|
702
708
|
}
|
|
703
|
-
function
|
|
704
|
-
let n =
|
|
709
|
+
function Nt(e, t) {
|
|
710
|
+
let n = Mt(e, t);
|
|
705
711
|
if (!n) return [];
|
|
706
712
|
if (n !== e) return [n];
|
|
707
713
|
let r = t.bindingsOf(e);
|
|
708
714
|
return r.length > 0 ? r : [e];
|
|
709
715
|
}
|
|
710
|
-
function
|
|
716
|
+
function Pt(e, t) {
|
|
711
717
|
let n = t.parent;
|
|
712
718
|
for (; n;) {
|
|
713
719
|
let t = n.field?.(e);
|
|
@@ -717,7 +723,7 @@ function Nt(e, t) {
|
|
|
717
723
|
}
|
|
718
724
|
//#endregion
|
|
719
725
|
//#region src/weak-elements.ts
|
|
720
|
-
var
|
|
726
|
+
var Ft = class {
|
|
721
727
|
refs = /* @__PURE__ */ new Set();
|
|
722
728
|
byElement = /* @__PURE__ */ new WeakMap();
|
|
723
729
|
add(e) {
|
|
@@ -739,13 +745,13 @@ var Pt = class {
|
|
|
739
745
|
n ? e.push(n) : this.refs.delete(t);
|
|
740
746
|
}), e;
|
|
741
747
|
}
|
|
742
|
-
},
|
|
748
|
+
}, It = Symbol("ConditionalStatementAction"), L = class extends N {
|
|
743
749
|
statement;
|
|
744
750
|
conditionalExecutor;
|
|
745
|
-
declarations = new
|
|
751
|
+
declarations = new Ft();
|
|
746
752
|
registrations = /* @__PURE__ */ new WeakSet();
|
|
747
753
|
constructor(e, t) {
|
|
748
|
-
super((e, t, n, r) => (this.applyIn(
|
|
754
|
+
super((e, t, n, r) => (this.applyIn(I(e)) || e.markRecordIncomplete(), t(e, n, r))), this.statement = e, this.conditionalExecutor = t, this.relay = new N((e, t, ...n) => (this.applyFrom(e), t(e, ...n))), this.relay[Qe] = !0, this.relay[$e] = () => {
|
|
749
755
|
this.bound && this.declarations.alive.length === 0 && this.stopListening();
|
|
750
756
|
}, this.listen();
|
|
751
757
|
}
|
|
@@ -756,12 +762,12 @@ var Pt = class {
|
|
|
756
762
|
this.listening || (this.listening = !0, this.statement.collectFields().forEach((e) => e.registerAction(this.relay)));
|
|
757
763
|
}
|
|
758
764
|
stopListening() {
|
|
759
|
-
this.listening && (
|
|
765
|
+
this.listening && (C()?.whenRolledBack(() => {
|
|
760
766
|
this.listening = !0;
|
|
761
767
|
}), this.listening = !1, this.statement.collectFields().forEach((e) => e.unregisterAction(this.relay)));
|
|
762
768
|
}
|
|
763
769
|
static get classIdentifier() {
|
|
764
|
-
return
|
|
770
|
+
return It;
|
|
765
771
|
}
|
|
766
772
|
get eager() {
|
|
767
773
|
return !0;
|
|
@@ -777,7 +783,7 @@ var Pt = class {
|
|
|
777
783
|
}
|
|
778
784
|
targetsIn(e) {
|
|
779
785
|
let t = [];
|
|
780
|
-
return this.declarations.alive.forEach((n) =>
|
|
786
|
+
return this.declarations.alive.forEach((n) => Nt(n, e).forEach((e) => {
|
|
781
787
|
this.registrations.has(e) && t.push(e);
|
|
782
788
|
})), t;
|
|
783
789
|
}
|
|
@@ -794,29 +800,29 @@ var Pt = class {
|
|
|
794
800
|
}
|
|
795
801
|
applyFrom(e) {
|
|
796
802
|
let t = /* @__PURE__ */ new Set();
|
|
797
|
-
this.targetsIn(
|
|
803
|
+
this.targetsIn(I(e)).forEach((e) => t.add(I(e))), t.forEach((e) => this.applyIn(e));
|
|
798
804
|
}
|
|
799
|
-
},
|
|
805
|
+
}, Lt = class extends L {
|
|
800
806
|
constructor(e, t = "full", n = "suppress") {
|
|
801
807
|
super(e, (e, r) => {
|
|
802
808
|
e.visibility = r ? t : n;
|
|
803
809
|
});
|
|
804
810
|
}
|
|
805
|
-
},
|
|
811
|
+
}, Rt = class extends L {
|
|
806
812
|
constructor(e, t = "editable", n = "disabled") {
|
|
807
813
|
super(e, (e, r) => {
|
|
808
814
|
e.access = r ? t : n;
|
|
809
815
|
});
|
|
810
816
|
}
|
|
811
|
-
},
|
|
817
|
+
}, zt = class extends L {
|
|
812
818
|
constructor(e, t) {
|
|
813
819
|
super(e, (e, n) => {
|
|
814
820
|
n && (e.value = t);
|
|
815
821
|
});
|
|
816
822
|
}
|
|
817
|
-
},
|
|
823
|
+
}, R = /* @__PURE__ */ function(e) {
|
|
818
824
|
return e[e.NOT = 0] = "NOT", e[e.OR = 1] = "OR", e[e.AND = 2] = "AND", e[e.XOR = 3] = "XOR", e[e.NAND = 4] = "NAND", e[e.NOR = 5] = "NOR", e[e.EQUALS = -1] = "EQUALS", e[e.NOT_EQUALS = -2] = "NOT_EQUALS", e[e.GT = -3] = "GT", e[e.LT = -4] = "LT", e[e.GE = -5] = "GE", e[e.LE = -6] = "LE", e[e.IN = -7] = "IN", e[e.NOT_IN = -8] = "NOT_IN", e[e.INCLUDES = -9] = "INCLUDES", e[e.NOT_INCLUDES = -10] = "NOT_INCLUDES", e;
|
|
819
|
-
}(
|
|
825
|
+
}(R || {});
|
|
820
826
|
(function(e) {
|
|
821
827
|
function t(e) {
|
|
822
828
|
let t = e.toLowerCase();
|
|
@@ -852,15 +858,15 @@ var Pt = class {
|
|
|
852
858
|
}
|
|
853
859
|
e.fromString = t;
|
|
854
860
|
function n(e) {
|
|
855
|
-
let t = typeof e == "number" ? e :
|
|
856
|
-
if (Object.values(
|
|
861
|
+
let t = typeof e == "number" ? e : R.fromString(e);
|
|
862
|
+
if (Object.values(R).includes(t)) return t;
|
|
857
863
|
throw Error(`Unrecognised operator ${e}`);
|
|
858
864
|
}
|
|
859
865
|
e.fromAny = n;
|
|
860
866
|
function r(e) {
|
|
861
|
-
if (typeof e == "number") return Object.values(
|
|
867
|
+
if (typeof e == "number") return Object.values(R).includes(e);
|
|
862
868
|
try {
|
|
863
|
-
return Object.values(
|
|
869
|
+
return Object.values(R).includes(R.fromString(e));
|
|
864
870
|
} catch {
|
|
865
871
|
return !1;
|
|
866
872
|
}
|
|
@@ -870,97 +876,97 @@ var Pt = class {
|
|
|
870
876
|
return e >= 0;
|
|
871
877
|
}
|
|
872
878
|
e.isLogicOperator = i;
|
|
873
|
-
})(
|
|
874
|
-
var
|
|
879
|
+
})(R ||= {}), Object.freeze(R);
|
|
880
|
+
var z = R, Bt = Symbol("AccessChangingAction"), Vt = class extends E {
|
|
875
881
|
constructor(e) {
|
|
876
882
|
super(e);
|
|
877
883
|
}
|
|
878
884
|
static get classIdentifier() {
|
|
879
|
-
return
|
|
885
|
+
return Bt;
|
|
880
886
|
}
|
|
881
887
|
execute(e, t, n, r) {
|
|
882
888
|
return super.execute(e, t, n, r);
|
|
883
889
|
}
|
|
884
|
-
},
|
|
890
|
+
}, Ht = Symbol("AccessChangedAction"), Ut = class extends E {
|
|
885
891
|
constructor(e) {
|
|
886
892
|
super(e);
|
|
887
893
|
}
|
|
888
894
|
static get classIdentifier() {
|
|
889
|
-
return
|
|
895
|
+
return Ht;
|
|
890
896
|
}
|
|
891
897
|
execute(e, t, n, r) {
|
|
892
898
|
return super.execute(e, t, n, r);
|
|
893
899
|
}
|
|
894
|
-
},
|
|
900
|
+
}, Wt = Symbol("ContributionChangedAction"), Gt = class extends E {
|
|
895
901
|
constructor(e) {
|
|
896
902
|
super(e);
|
|
897
903
|
}
|
|
898
904
|
static get classIdentifier() {
|
|
899
|
-
return
|
|
905
|
+
return Wt;
|
|
900
906
|
}
|
|
901
907
|
execute(e, t, n, r) {
|
|
902
908
|
return super.execute(e, t, n, r);
|
|
903
909
|
}
|
|
904
|
-
},
|
|
910
|
+
}, Kt = Symbol("EnabledChangingAction"), qt = class extends E {
|
|
905
911
|
constructor(e) {
|
|
906
912
|
super(e);
|
|
907
913
|
}
|
|
908
914
|
static get classIdentifier() {
|
|
909
|
-
return
|
|
915
|
+
return Kt;
|
|
910
916
|
}
|
|
911
917
|
execute(e, t, n, r) {
|
|
912
918
|
return super.execute(e, t, n, r);
|
|
913
919
|
}
|
|
914
|
-
},
|
|
920
|
+
}, Jt = Symbol("EnabledChangedAction"), Yt = class extends E {
|
|
915
921
|
constructor(e) {
|
|
916
922
|
super(e);
|
|
917
923
|
}
|
|
918
924
|
static get classIdentifier() {
|
|
919
|
-
return
|
|
925
|
+
return Jt;
|
|
920
926
|
}
|
|
921
927
|
execute(e, t, n, r) {
|
|
922
928
|
return super.execute(e, t, n, r);
|
|
923
929
|
}
|
|
924
|
-
},
|
|
930
|
+
}, Xt = Symbol("ValidChangedAction"), Zt = class extends E {
|
|
925
931
|
constructor(e) {
|
|
926
932
|
super(e);
|
|
927
933
|
}
|
|
928
934
|
static get classIdentifier() {
|
|
929
|
-
return
|
|
935
|
+
return Xt;
|
|
930
936
|
}
|
|
931
937
|
execute(e, t, n, r) {
|
|
932
938
|
return super.execute(e, t, n, r);
|
|
933
939
|
}
|
|
934
|
-
},
|
|
940
|
+
}, Qt = Symbol("VisibilityChangingAction"), $t = class extends E {
|
|
935
941
|
constructor(e) {
|
|
936
942
|
super(e);
|
|
937
943
|
}
|
|
938
944
|
static get classIdentifier() {
|
|
939
|
-
return
|
|
945
|
+
return Qt;
|
|
940
946
|
}
|
|
941
947
|
execute(e, t, n, r) {
|
|
942
948
|
return super.execute(e, t, n, r);
|
|
943
949
|
}
|
|
944
|
-
},
|
|
950
|
+
}, en = Symbol("VisibilityChangedAction"), tn = class extends E {
|
|
945
951
|
constructor(e) {
|
|
946
952
|
super(e);
|
|
947
953
|
}
|
|
948
954
|
static get classIdentifier() {
|
|
949
|
-
return
|
|
955
|
+
return en;
|
|
950
956
|
}
|
|
951
957
|
execute(e, t, n, r) {
|
|
952
958
|
return super.execute(e, t, n, r);
|
|
953
959
|
}
|
|
954
|
-
},
|
|
955
|
-
function
|
|
960
|
+
}, nn = /* @__PURE__ */ new WeakMap(), rn = 6e4, an = /* @__PURE__ */ new WeakMap();
|
|
961
|
+
function on(e) {
|
|
956
962
|
let t = [];
|
|
957
963
|
return e.refs.forEach((n) => {
|
|
958
964
|
let r = n.deref();
|
|
959
965
|
r ? t.push(r) : e.refs.delete(n);
|
|
960
966
|
}), e.sweptAt = Date.now(), t;
|
|
961
967
|
}
|
|
962
|
-
var
|
|
963
|
-
function
|
|
968
|
+
var sn = /* @__PURE__ */ new Set(["validators", "actions"]);
|
|
969
|
+
function cn(e, t) {
|
|
964
970
|
for (let n = Object.getPrototypeOf(e); n && n !== Object.prototype;) {
|
|
965
971
|
let e = Object.getOwnPropertyDescriptor(n, t);
|
|
966
972
|
if (e) return e.get !== void 0 || e.set !== void 0;
|
|
@@ -968,11 +974,11 @@ function sn(e, t) {
|
|
|
968
974
|
}
|
|
969
975
|
return !1;
|
|
970
976
|
}
|
|
971
|
-
var
|
|
972
|
-
function
|
|
973
|
-
if (Object.hasOwn(e, "enabled")) throw TypeError(`enabled is read from access and cannot be assigned; state access instead: ${
|
|
977
|
+
var ln = (e) => typeof e == "string" ? `'${e}'` : String(e), un = (e) => e.map(ln).join(", "), B = (e) => e.origin !== "validator", dn = (e) => e === "disabled" ? "omit" : e === "disabled-null" ? "null" : "value";
|
|
978
|
+
function fn(e) {
|
|
979
|
+
if (Object.hasOwn(e, "enabled")) throw TypeError(`enabled is read from access and cannot be assigned; state access instead: ${un(_)}`);
|
|
974
980
|
}
|
|
975
|
-
var
|
|
981
|
+
var pn = 0, V = null, H = class {
|
|
976
982
|
get __v_skip() {
|
|
977
983
|
return !0;
|
|
978
984
|
}
|
|
@@ -985,7 +991,7 @@ var un = 0, H = null, U = class {
|
|
|
985
991
|
#e;
|
|
986
992
|
#t;
|
|
987
993
|
constructor(e) {
|
|
988
|
-
this.#t = e, this.#e = u(e),
|
|
994
|
+
this.#t = e, this.#e = u(e), Re(this);
|
|
989
995
|
}
|
|
990
996
|
get state() {
|
|
991
997
|
return this.#e;
|
|
@@ -994,11 +1000,11 @@ var un = 0, H = null, U = class {
|
|
|
994
1000
|
return this.#t;
|
|
995
1001
|
}
|
|
996
1002
|
rebind(e) {
|
|
997
|
-
return
|
|
1003
|
+
return T((t) => {
|
|
998
1004
|
t.touch(this);
|
|
999
1005
|
let n = t.willAnnounceValue(this), { announcedValue: r, announcedContribution: i, validatedValue: a } = this.#t;
|
|
1000
1006
|
this.asReset(() => {
|
|
1001
|
-
this.resetTo(this.declaration, e),
|
|
1007
|
+
this.resetTo(this.declaration, e), V?.push(this);
|
|
1002
1008
|
}), n ? Object.assign(this.#t, {
|
|
1003
1009
|
announcedValue: r,
|
|
1004
1010
|
announcedContribution: i,
|
|
@@ -1010,7 +1016,7 @@ var un = 0, H = null, U = class {
|
|
|
1010
1016
|
return this.#e.originalValue;
|
|
1011
1017
|
}
|
|
1012
1018
|
set originalValue(e) {
|
|
1013
|
-
this.touchState(), this.#e.originalValue =
|
|
1019
|
+
this.touchState(), this.#e.originalValue = Fe(this, e);
|
|
1014
1020
|
}
|
|
1015
1021
|
get extra() {
|
|
1016
1022
|
return this.#e.extra;
|
|
@@ -1024,33 +1030,33 @@ var un = 0, H = null, U = class {
|
|
|
1024
1030
|
extendedOf(e) {
|
|
1025
1031
|
let t = Object.create(null);
|
|
1026
1032
|
return Object.entries(e).forEach(([e, n]) => {
|
|
1027
|
-
|
|
1033
|
+
sn.has(e) || cn(this, e) || (t[e] = n);
|
|
1028
1034
|
}), t;
|
|
1029
1035
|
}
|
|
1030
1036
|
assignParams(e) {
|
|
1031
|
-
|
|
1037
|
+
fn(e);
|
|
1032
1038
|
let t = this.extendedOf(e);
|
|
1033
1039
|
Object.entries(e).forEach(([e, n]) => {
|
|
1034
|
-
Object.hasOwn(t, e) ||
|
|
1040
|
+
Object.hasOwn(t, e) || sn.has(e) || (this[e] = n);
|
|
1035
1041
|
}), ne(t) || this.setExtendedValues(t);
|
|
1036
1042
|
}
|
|
1037
1043
|
touchState() {
|
|
1038
|
-
|
|
1044
|
+
C()?.touch(this);
|
|
1039
1045
|
}
|
|
1040
|
-
[
|
|
1046
|
+
[b]() {
|
|
1041
1047
|
return {
|
|
1042
1048
|
...this.#t,
|
|
1043
1049
|
errors: [...this.#t.errors]
|
|
1044
1050
|
};
|
|
1045
1051
|
}
|
|
1046
|
-
[
|
|
1052
|
+
[He](e) {
|
|
1047
1053
|
let t = this.#t.validatingCount, n = this.#t.validatingChildren;
|
|
1048
1054
|
Object.assign(this.#e, e), this.#e.validatingCount = t, this.#e.validatingChildren = n;
|
|
1049
1055
|
}
|
|
1050
1056
|
get validating() {
|
|
1051
1057
|
return this.#e.validatingCount > 0 || this.#e.validatingChildren > 0;
|
|
1052
1058
|
}
|
|
1053
|
-
[
|
|
1059
|
+
[lt]() {
|
|
1054
1060
|
let e = !this.validating;
|
|
1055
1061
|
this.#e.validatingCount++, e && this.container?.childValidatingChanged(!0);
|
|
1056
1062
|
let t = !1;
|
|
@@ -1073,14 +1079,14 @@ var un = 0, H = null, U = class {
|
|
|
1073
1079
|
}) : Promise.resolve();
|
|
1074
1080
|
}
|
|
1075
1081
|
get errors() {
|
|
1076
|
-
return this.touchState(),
|
|
1082
|
+
return this.touchState(), C() || this.noteErrorsBaseline(), this.#e.errors;
|
|
1077
1083
|
}
|
|
1078
1084
|
set errors(e) {
|
|
1079
|
-
this.touchState(), this.#e.errors = e, this.#t.errorsBaseline =
|
|
1085
|
+
this.touchState(), this.#e.errors = e, this.#t.errorsBaseline = O, this.noteErrorsBaseline();
|
|
1080
1086
|
}
|
|
1081
1087
|
noteErrorsBaseline() {
|
|
1082
1088
|
let e = this.#t;
|
|
1083
|
-
e.errorsBaseline !==
|
|
1089
|
+
e.errorsBaseline !== O || !e.errors.some(B) || (e.errorsBaseline = p(this.value));
|
|
1084
1090
|
}
|
|
1085
1091
|
ruleOf(e) {
|
|
1086
1092
|
for (let t of this.selfAndAbove()) {
|
|
@@ -1105,31 +1111,31 @@ var un = 0, H = null, U = class {
|
|
|
1105
1111
|
removeErrors(e) {
|
|
1106
1112
|
let t = this.#e.errors, n = !1;
|
|
1107
1113
|
for (let r = t.length - 1; r >= 0; r--) B(t[r]) && e(this.ruleOf(t[r].origin)) && (t.splice(r, 1), n = !0);
|
|
1108
|
-
return this.#t.errors.some(B) || (this.#t.errorsBaseline =
|
|
1114
|
+
return this.#t.errors.some(B) || (this.#t.errorsBaseline = O), n;
|
|
1109
1115
|
}
|
|
1110
1116
|
editConcluded() {
|
|
1111
1117
|
let e = this.selfAndAbove().filter((e) => e.#t.errors.some((t) => B(t) && e.ruleOf(t.origin).removeOn === "edit"));
|
|
1112
|
-
e.length !== 0 &&
|
|
1118
|
+
e.length !== 0 && T((t) => {
|
|
1113
1119
|
for (let n of e) {
|
|
1114
1120
|
let e = n.#t, r = e.errorsBaseline;
|
|
1115
|
-
if (t.touch(n), r ===
|
|
1121
|
+
if (t.touch(n), r === O) {
|
|
1116
1122
|
e.errorsBaseline = p(n.value);
|
|
1117
1123
|
continue;
|
|
1118
1124
|
}
|
|
1119
|
-
r !==
|
|
1125
|
+
r !== et && h(n.value, r) || (n.removeErrors((e) => e.removeOn === "edit"), t.markValidityDirty(n));
|
|
1120
1126
|
}
|
|
1121
1127
|
});
|
|
1122
1128
|
}
|
|
1123
|
-
[
|
|
1124
|
-
|
|
1129
|
+
[ut]() {
|
|
1130
|
+
T((e) => {
|
|
1125
1131
|
let t = (n) => {
|
|
1126
1132
|
n.#t.errors.some(B) && (e.touch(n), n.removeErrors((e) => e.removeOn === "submit") && e.markValidityDirty(n)), n.members.forEach(t);
|
|
1127
1133
|
};
|
|
1128
1134
|
t(this);
|
|
1129
1135
|
});
|
|
1130
1136
|
}
|
|
1131
|
-
[
|
|
1132
|
-
|
|
1137
|
+
[k]() {
|
|
1138
|
+
T((e) => {
|
|
1133
1139
|
let t = (n) => {
|
|
1134
1140
|
n.#t.errors.some(B) && e.markValidityDirty(n), n.members.forEach(t);
|
|
1135
1141
|
};
|
|
@@ -1158,18 +1164,18 @@ var un = 0, H = null, U = class {
|
|
|
1158
1164
|
return r(this), n;
|
|
1159
1165
|
}
|
|
1160
1166
|
markRecordIncomplete() {
|
|
1161
|
-
this._recordPending || (this._recordPending = !0,
|
|
1167
|
+
this._recordPending || (this._recordPending = !0, pn++);
|
|
1162
1168
|
}
|
|
1163
1169
|
completeRecords(e = this) {
|
|
1164
|
-
|
|
1170
|
+
pn !== 0 && T(() => {
|
|
1165
1171
|
let t = (e) => {
|
|
1166
|
-
e._recordPending && (e._recordPending = !1,
|
|
1172
|
+
e._recordPending && (e._recordPending = !1, pn--, e.rerunEagerActions()), e.members.forEach(t);
|
|
1167
1173
|
};
|
|
1168
1174
|
t(e);
|
|
1169
1175
|
});
|
|
1170
1176
|
}
|
|
1171
1177
|
rerunEagerActions() {
|
|
1172
|
-
|
|
1178
|
+
T((e) => {
|
|
1173
1179
|
this.boundActions?.triggerEager(this, this.contribution, this.contribution), e.markValidityDirty(this);
|
|
1174
1180
|
});
|
|
1175
1181
|
}
|
|
@@ -1177,20 +1183,20 @@ var un = 0, H = null, U = class {
|
|
|
1177
1183
|
return this._actions;
|
|
1178
1184
|
}
|
|
1179
1185
|
noteBinding(e) {
|
|
1180
|
-
let t =
|
|
1181
|
-
t ? Date.now() - t.sweptAt >=
|
|
1186
|
+
let t = nn.get(this);
|
|
1187
|
+
t ? Date.now() - t.sweptAt >= rn && on(t) : (t = {
|
|
1182
1188
|
refs: /* @__PURE__ */ new Set(),
|
|
1183
1189
|
sweptAt: Date.now()
|
|
1184
|
-
},
|
|
1190
|
+
}, nn.set(this, t)), t.refs.add(new WeakRef(e));
|
|
1185
1191
|
}
|
|
1186
1192
|
get boundElements() {
|
|
1187
|
-
let e = this.declaration, t =
|
|
1188
|
-
return t ? [e, ...
|
|
1193
|
+
let e = this.declaration, t = nn.get(e);
|
|
1194
|
+
return t ? [e, ...on(t)] : [e];
|
|
1189
1195
|
}
|
|
1190
1196
|
get actions() {
|
|
1191
1197
|
let e = this.declaration;
|
|
1192
1198
|
if (!e._actions) {
|
|
1193
|
-
let t = new
|
|
1199
|
+
let t = new kt();
|
|
1194
1200
|
e.boundElements.forEach((e) => {
|
|
1195
1201
|
e._actions = t;
|
|
1196
1202
|
});
|
|
@@ -1201,20 +1207,20 @@ var un = 0, H = null, U = class {
|
|
|
1201
1207
|
return this.#e.valueVersion;
|
|
1202
1208
|
}
|
|
1203
1209
|
bumpValueVersion() {
|
|
1204
|
-
|
|
1210
|
+
T((e) => {
|
|
1205
1211
|
e.touch(this), this.#e.valueVersion++;
|
|
1206
1212
|
let t = this.parent;
|
|
1207
1213
|
for (; t;) e.touch(t), t.#e.valueVersion++, t = t.parent;
|
|
1208
1214
|
});
|
|
1209
1215
|
}
|
|
1210
1216
|
propagateValueChanged(e = !1) {
|
|
1211
|
-
|
|
1217
|
+
T((t) => {
|
|
1212
1218
|
t.markValueChanged(this, e), this.errorsAfterChange(t), t.markValidityDirty(this), this.parent?.notifyValueChanged();
|
|
1213
1219
|
});
|
|
1214
1220
|
}
|
|
1215
1221
|
errorsAfterChange(e) {
|
|
1216
1222
|
let t = this.#t;
|
|
1217
|
-
t.errors.some(B) && (e.touch(this), this.removeErrors((e) => e.removeOn === "change"), t.errorsBaseline ===
|
|
1223
|
+
t.errors.some(B) && (e.touch(this), this.removeErrors((e) => e.removeOn === "change"), t.errorsBaseline === O && t.errors.some(B) && (t.errorsBaseline = et));
|
|
1218
1224
|
}
|
|
1219
1225
|
constructed(e) {}
|
|
1220
1226
|
refreshPreviousValue() {
|
|
@@ -1224,33 +1230,33 @@ var un = 0, H = null, U = class {
|
|
|
1224
1230
|
return this.ownErrorsValid(this.#t.errors) && this.#t.invalidChildren === 0;
|
|
1225
1231
|
}
|
|
1226
1232
|
takeChild(e, t) {
|
|
1227
|
-
|
|
1233
|
+
T((n) => {
|
|
1228
1234
|
if (e.parent) throw TypeError("This element already belongs to a container - pass a bind() of it");
|
|
1229
1235
|
if (e === this) throw TypeError("A container cannot hold itself or a container above it");
|
|
1230
1236
|
for (let t = this.parent; t; t = t.parent) if (t === e) throw TypeError("A container cannot hold itself or a container above it");
|
|
1231
1237
|
n.touch(e), e.#e.fieldName = t;
|
|
1232
1238
|
let r = this.effectiveAccess === "editable" ? void 0 : e.effectiveAccessFromHere();
|
|
1233
|
-
e.#e.parent = this, r && e.revalidateWhereChanged(r), gt() && e[
|
|
1239
|
+
e.#e.parent = this, r && e.revalidateWhereChanged(r), gt() && e[k](), this.adoptChild(e), ze(n, e);
|
|
1234
1240
|
});
|
|
1235
1241
|
}
|
|
1236
1242
|
adoptChild(e) {
|
|
1237
|
-
|
|
1243
|
+
T((t) => {
|
|
1238
1244
|
t.touch(this), !e.#t.valid && e.countsInContainer && this.#t.invalidChildren++, e.validating && this.childValidatingChanged(!0), t.whenRolledBack(() => {
|
|
1239
1245
|
e.validating && this.childValidatingChanged(!1);
|
|
1240
1246
|
}), t.markValidityDirty(this);
|
|
1241
1247
|
});
|
|
1242
1248
|
}
|
|
1243
1249
|
releaseChild(e) {
|
|
1244
|
-
|
|
1250
|
+
T((t) => {
|
|
1245
1251
|
t.touch(this), t.touch(e), !e.#t.valid && e.countsInContainer && this.#t.invalidChildren--;
|
|
1246
1252
|
let n = this.effectiveAccess === "editable" ? void 0 : e.effectiveAccessFromHere();
|
|
1247
1253
|
e.validating && this.childValidatingChanged(!1), t.whenRolledBack(() => {
|
|
1248
1254
|
e.validating && this.childValidatingChanged(!0);
|
|
1249
|
-
}), e.#e.parent = void 0, e.#e.fieldName = void 0, n && e.revalidateWhereChanged(n), gt() && e[
|
|
1255
|
+
}), e.#e.parent = void 0, e.#e.fieldName = void 0, n && e.revalidateWhereChanged(n), gt() && e[k](), t.markValidityDirty(this);
|
|
1250
1256
|
});
|
|
1251
1257
|
}
|
|
1252
1258
|
resetTo(e, t) {
|
|
1253
|
-
|
|
1259
|
+
T(() => {
|
|
1254
1260
|
let n = t === void 0 ? e.value : t, r = this.errors.length > 0;
|
|
1255
1261
|
r && (this.errors = []), this.touched = !1;
|
|
1256
1262
|
let i = this.value !== n;
|
|
@@ -1258,19 +1264,19 @@ var un = 0, H = null, U = class {
|
|
|
1258
1264
|
});
|
|
1259
1265
|
}
|
|
1260
1266
|
resetChild(e, t, n) {
|
|
1261
|
-
e !== t && (e.access = t.access, e.visibility = t.visibility, e.boundActions?.resetBinding(e)), e.resetTo(t, n),
|
|
1267
|
+
e !== t && (e.access = t.access, e.visibility = t.visibility, e.boundActions?.resetBinding(e)), e.resetTo(t, n), V?.push(e);
|
|
1262
1268
|
}
|
|
1263
1269
|
asReset(e) {
|
|
1264
|
-
if (
|
|
1270
|
+
if (V) {
|
|
1265
1271
|
e();
|
|
1266
1272
|
return;
|
|
1267
1273
|
}
|
|
1268
1274
|
let t = [];
|
|
1269
|
-
|
|
1275
|
+
V = t;
|
|
1270
1276
|
try {
|
|
1271
1277
|
e();
|
|
1272
1278
|
} finally {
|
|
1273
|
-
|
|
1279
|
+
V = null;
|
|
1274
1280
|
}
|
|
1275
1281
|
t.forEach((e) => e.boundActions?.triggerEagerRules(e, e.contribution, e.contribution)), t.forEach((e) => e.recordBaseline());
|
|
1276
1282
|
}
|
|
@@ -1288,11 +1294,11 @@ var un = 0, H = null, U = class {
|
|
|
1288
1294
|
}
|
|
1289
1295
|
set visibility(e) {
|
|
1290
1296
|
let t = this.#e.visibility;
|
|
1291
|
-
e !== t &&
|
|
1292
|
-
let r = this.boundActions?.trigger(
|
|
1293
|
-
if (r instanceof
|
|
1297
|
+
e !== t && T((n) => {
|
|
1298
|
+
let r = this.boundActions?.trigger($t, this, e, t);
|
|
1299
|
+
if (r instanceof D) return;
|
|
1294
1300
|
let i = r ?? e;
|
|
1295
|
-
if (!pe(i)) throw Error(`${
|
|
1301
|
+
if (!pe(i)) throw Error(`${ln(i)} is not a visibility: ${un(de)}`);
|
|
1296
1302
|
i !== t && (n.touch(this), this.#t.announcedVisibility === void 0 && (this.#t.announcedVisibility = t), this.#e.visibility = i, n.markFlagsDirty(this));
|
|
1297
1303
|
});
|
|
1298
1304
|
}
|
|
@@ -1301,29 +1307,29 @@ var un = 0, H = null, U = class {
|
|
|
1301
1307
|
}
|
|
1302
1308
|
set access(e) {
|
|
1303
1309
|
let t = this.#e.access;
|
|
1304
|
-
e !== t &&
|
|
1305
|
-
let r = this.boundActions?.trigger(
|
|
1306
|
-
if (r instanceof
|
|
1310
|
+
e !== t && T((n) => {
|
|
1311
|
+
let r = this.boundActions?.trigger(Vt, this, e, t);
|
|
1312
|
+
if (r instanceof D) return;
|
|
1307
1313
|
let i = r ?? e;
|
|
1308
|
-
if (!ue(i)) throw Error(`${
|
|
1314
|
+
if (!ue(i)) throw Error(`${ln(i)} is not an access: ${un(_)}`);
|
|
1309
1315
|
if (i === t) return;
|
|
1310
1316
|
let a = this.enabled, o = i === "editable";
|
|
1311
1317
|
if (o !== a) {
|
|
1312
|
-
let e = this.boundActions?.trigger(
|
|
1313
|
-
if (e instanceof
|
|
1314
|
-
if (e != null && typeof e != "boolean") throw Error(`${
|
|
1318
|
+
let e = this.boundActions?.trigger(qt, this, o, a);
|
|
1319
|
+
if (e instanceof D) return;
|
|
1320
|
+
if (e != null && typeof e != "boolean") throw Error(`${ln(e)} is not what an EnabledChangingAction answers with: a boolean`);
|
|
1315
1321
|
if (e === a) return;
|
|
1316
1322
|
}
|
|
1317
1323
|
n.touch(this);
|
|
1318
1324
|
let s = this.contribution, c = this.countsInContainer, l = this.effectiveAccessBelow();
|
|
1319
|
-
this.#e.access = i, this.revalidateWhereChanged(l), !this.composesValue &&
|
|
1325
|
+
this.#e.access = i, this.revalidateWhereChanged(l), !this.composesValue && dn(t) !== dn(i) && this.boundActions?.triggerEager(this, this.contribution, s), this.contributionChanged(n, c), this.#t.announcedAccess === void 0 && (this.#t.announcedAccess = t), n.markFlagsDirty(this);
|
|
1320
1326
|
});
|
|
1321
1327
|
}
|
|
1322
1328
|
get effectiveAccess() {
|
|
1323
1329
|
let e = this.access, t = this.parent?.effectiveAccess;
|
|
1324
1330
|
return t === "disabled" || t === "disabled-null" ? "disabled" : t === "readonly" && e === "editable" ? "readonly" : e;
|
|
1325
1331
|
}
|
|
1326
|
-
[
|
|
1332
|
+
[Ve]() {
|
|
1327
1333
|
if (this.#t.access === "disabled") return !0;
|
|
1328
1334
|
for (let e = this.#t.parent; e; e = e.#t.parent) if (e.#t.access === "disabled" || e.#t.access === "disabled-null") return !0;
|
|
1329
1335
|
return !1;
|
|
@@ -1348,7 +1354,7 @@ var un = 0, H = null, U = class {
|
|
|
1348
1354
|
}
|
|
1349
1355
|
revalidateWhereChanged(e) {
|
|
1350
1356
|
e.forEach((e, t) => {
|
|
1351
|
-
|
|
1357
|
+
dn(t.effectiveAccess) !== dn(e) && t.rerunEagerActions();
|
|
1352
1358
|
});
|
|
1353
1359
|
}
|
|
1354
1360
|
serializesAs(e) {
|
|
@@ -1388,7 +1394,7 @@ var un = 0, H = null, U = class {
|
|
|
1388
1394
|
childComposesValue(e) {
|
|
1389
1395
|
return e.composesValue;
|
|
1390
1396
|
}
|
|
1391
|
-
[
|
|
1397
|
+
[Ue](e, t, n, r) {
|
|
1392
1398
|
if (r?.forEach((e) => this.boundActions?.trigger(e.actionClass, this, e.item, e.index)), !t) return;
|
|
1393
1399
|
let i = this.boundActions, a = this.composesValue, o = (e, t) => a ? h(e, t) : e === t;
|
|
1394
1400
|
if (a && i?.hasEager) {
|
|
@@ -1399,38 +1405,38 @@ var un = 0, H = null, U = class {
|
|
|
1399
1405
|
let t = this.holding, r = this.#t.announcedValue;
|
|
1400
1406
|
(n || !o(t, r)) && (e.touch(this), this.#t.announcedValue = t, i?.trigger(N, this, t, r));
|
|
1401
1407
|
}
|
|
1402
|
-
if (i?.willTrigger(
|
|
1408
|
+
if (i?.willTrigger(Wt)) {
|
|
1403
1409
|
let t = this.contribution, n = this.#t.announcedContribution;
|
|
1404
|
-
o(t, n) || (e.touch(this), this.#t.announcedContribution = t, i.trigger(
|
|
1410
|
+
o(t, n) || (e.touch(this), this.#t.announcedContribution = t, i.trigger(Gt, this, t, n));
|
|
1405
1411
|
}
|
|
1406
1412
|
}
|
|
1407
1413
|
recordAnnounced() {
|
|
1408
1414
|
let e = this.boundActions;
|
|
1409
|
-
(!this.composesValue || e?.willTrigger(wt)) && (this.#t.announcedValue = this.holding), e?.willTrigger(
|
|
1415
|
+
(!this.composesValue || e?.willTrigger(wt)) && (this.#t.announcedValue = this.holding), e?.willTrigger(Wt) && (this.#t.announcedContribution = this.contribution), this.composesValue && e?.hasEager && (this.#t.validatedValue = this.contribution), this.#t.errorsBaseline = O;
|
|
1410
1416
|
}
|
|
1411
|
-
[
|
|
1417
|
+
[Ge]() {
|
|
1412
1418
|
let e = this.#t, t = e.announcedAccess;
|
|
1413
1419
|
if (t !== void 0) {
|
|
1414
1420
|
e.announcedAccess = void 0;
|
|
1415
1421
|
let n = e.access;
|
|
1416
1422
|
if (n !== t) {
|
|
1417
|
-
this.boundActions?.trigger(
|
|
1423
|
+
this.boundActions?.trigger(Ut, this, n, t);
|
|
1418
1424
|
let e = n === "editable", r = t === "editable";
|
|
1419
|
-
e !== r && this.boundActions?.trigger(
|
|
1425
|
+
e !== r && this.boundActions?.trigger(Yt, this, e, r);
|
|
1420
1426
|
}
|
|
1421
1427
|
}
|
|
1422
1428
|
let n = e.announcedVisibility;
|
|
1423
|
-
n !== void 0 && (e.announcedVisibility = void 0, e.visibility !== n && this.boundActions?.trigger(
|
|
1429
|
+
n !== void 0 && (e.announcedVisibility = void 0, e.visibility !== n && this.boundActions?.trigger(tn, this, e.visibility, n));
|
|
1424
1430
|
}
|
|
1425
|
-
[
|
|
1431
|
+
[We](e) {
|
|
1426
1432
|
let t = this.#t.valid, n = this.countedValid;
|
|
1427
1433
|
if (n === t) return;
|
|
1428
1434
|
e.touch(this), this.#t.valid = n;
|
|
1429
1435
|
let r = this.container;
|
|
1430
|
-
r && this.countsInContainer && (e.touch(r), r.childValidityChanged(n), e.markValidityDirty(r)), this.boundActions?.trigger(
|
|
1436
|
+
r && this.countsInContainer && (e.touch(r), r.childValidityChanged(n), e.markValidityDirty(r)), this.boundActions?.trigger(Zt, this, n, t);
|
|
1431
1437
|
}
|
|
1432
1438
|
validate(e = !1) {
|
|
1433
|
-
|
|
1439
|
+
T((t) => {
|
|
1434
1440
|
e && this.boundActions?.triggerEager(this, this.contribution, this.contribution), t.markValidityDirty(this);
|
|
1435
1441
|
});
|
|
1436
1442
|
}
|
|
@@ -1444,7 +1450,7 @@ var un = 0, H = null, U = class {
|
|
|
1444
1450
|
return !h(this.value, this.originalValue);
|
|
1445
1451
|
}
|
|
1446
1452
|
boundFrom(e, t, n, r) {
|
|
1447
|
-
r &&
|
|
1453
|
+
r && fn(r), this.#t.declaration = e.declaration;
|
|
1448
1454
|
let i = {
|
|
1449
1455
|
...e.extra,
|
|
1450
1456
|
...r && this.extendedOf(r)
|
|
@@ -1461,18 +1467,18 @@ var un = 0, H = null, U = class {
|
|
|
1461
1467
|
});
|
|
1462
1468
|
}
|
|
1463
1469
|
registerAction(e) {
|
|
1464
|
-
return
|
|
1470
|
+
return T((t) => {
|
|
1465
1471
|
t.willAnnounceValue(this) || this.refreshPreviousValue(), this.register(t, e);
|
|
1466
1472
|
}), this;
|
|
1467
1473
|
}
|
|
1468
1474
|
registerActionBefore(e, t) {
|
|
1469
|
-
return
|
|
1475
|
+
return T((n) => {
|
|
1470
1476
|
n.willAnnounceValue(this) || this.refreshPreviousValue(), this.register(n, e, t);
|
|
1471
1477
|
}), this;
|
|
1472
1478
|
}
|
|
1473
1479
|
unregisterAction(e) {
|
|
1474
1480
|
let t = !1;
|
|
1475
|
-
return
|
|
1481
|
+
return T((n) => {
|
|
1476
1482
|
let r = this.boundActions;
|
|
1477
1483
|
if (!r) return;
|
|
1478
1484
|
let i = r.registrations;
|
|
@@ -1495,15 +1501,15 @@ var un = 0, H = null, U = class {
|
|
|
1495
1501
|
});
|
|
1496
1502
|
}
|
|
1497
1503
|
releaseAbandoned(e) {
|
|
1498
|
-
let t = Date.now(), n =
|
|
1499
|
-
n !== void 0 && t - n <
|
|
1504
|
+
let t = Date.now(), n = an.get(e);
|
|
1505
|
+
n !== void 0 && t - n < rn || (an.set(e, t), n !== void 0 && e.registrations.forEach((e) => e[$e]?.()));
|
|
1500
1506
|
}
|
|
1501
1507
|
triggerAction(e, ...t) {
|
|
1502
1508
|
let n = this.boundActions;
|
|
1503
1509
|
return n ? n.trigger(e, this, ...t) : null;
|
|
1504
1510
|
}
|
|
1505
1511
|
clearValidators() {
|
|
1506
|
-
|
|
1512
|
+
T((e) => {
|
|
1507
1513
|
e.touch(this);
|
|
1508
1514
|
let t = this.boundActions;
|
|
1509
1515
|
if (t) {
|
|
@@ -1518,10 +1524,10 @@ var un = 0, H = null, U = class {
|
|
|
1518
1524
|
};
|
|
1519
1525
|
//#endregion
|
|
1520
1526
|
//#region src/actions/conditional/statement.ts
|
|
1521
|
-
function
|
|
1527
|
+
function mn(e, t) {
|
|
1522
1528
|
return e ? !t : t;
|
|
1523
1529
|
}
|
|
1524
|
-
var
|
|
1530
|
+
var hn = class e {
|
|
1525
1531
|
operand1;
|
|
1526
1532
|
operator;
|
|
1527
1533
|
operand2;
|
|
@@ -1530,12 +1536,12 @@ var fn = class e {
|
|
|
1530
1536
|
if (typeof e == "function") throw TypeError(`Statement operand ${t} is a function: an operand is a field, a nested statement or a literal, and a function is none of them. An accessor states the field it answers with: group.field('name').`);
|
|
1531
1537
|
}
|
|
1532
1538
|
constructor(t, n, r) {
|
|
1533
|
-
e.validateOperand(t, 1), n !==
|
|
1539
|
+
e.validateOperand(t, 1), n !== z.NOT && e.validateOperand(r, 2), this.operand1 = t, this.operator = n, this.operand2 = r;
|
|
1534
1540
|
}
|
|
1535
1541
|
static valueOf(t, n) {
|
|
1536
1542
|
if (t instanceof e) return t.evaluate(n);
|
|
1537
|
-
if (t instanceof
|
|
1538
|
-
let e = n ?
|
|
1543
|
+
if (t instanceof H) {
|
|
1544
|
+
let e = n ? Mt(t, n) : t;
|
|
1539
1545
|
return e ? m(e.value) : void 0;
|
|
1540
1546
|
}
|
|
1541
1547
|
return t;
|
|
@@ -1549,38 +1555,38 @@ var fn = class e {
|
|
|
1549
1555
|
evaluate(t) {
|
|
1550
1556
|
let n = e.valueOf(this.operand1, t), r = e.valueOf(this.operand2, t);
|
|
1551
1557
|
switch (this.operator) {
|
|
1552
|
-
case
|
|
1553
|
-
case
|
|
1554
|
-
case
|
|
1555
|
-
case
|
|
1556
|
-
case
|
|
1557
|
-
case
|
|
1558
|
-
case
|
|
1559
|
-
case
|
|
1560
|
-
case
|
|
1561
|
-
case
|
|
1562
|
-
case
|
|
1563
|
-
case
|
|
1564
|
-
case
|
|
1565
|
-
case
|
|
1566
|
-
case
|
|
1567
|
-
case
|
|
1558
|
+
case z.AND: return !!(n && r);
|
|
1559
|
+
case z.OR: return !!(n || r);
|
|
1560
|
+
case z.NAND: return !(n && r);
|
|
1561
|
+
case z.NOR: return !(n || r);
|
|
1562
|
+
case z.XOR: return mn(!!n, !!r);
|
|
1563
|
+
case z.NOT: return !n;
|
|
1564
|
+
case z.EQUALS: return n == r;
|
|
1565
|
+
case z.NOT_EQUALS: return n != r;
|
|
1566
|
+
case z.LT: return n < r;
|
|
1567
|
+
case z.LE: return n <= r;
|
|
1568
|
+
case z.GE: return n >= r;
|
|
1569
|
+
case z.GT: return n > r;
|
|
1570
|
+
case z.IN: return !!r?.includes?.(n);
|
|
1571
|
+
case z.NOT_IN: return !r?.includes?.(n);
|
|
1572
|
+
case z.INCLUDES: return g(n) && g(r) && n.indexOf(r) >= 0;
|
|
1573
|
+
case z.NOT_INCLUDES: return !(g(n) && g(r) && n.indexOf(r) >= 0);
|
|
1568
1574
|
default: throw Error(`Operator not implemented ${this.operator}`);
|
|
1569
1575
|
}
|
|
1570
1576
|
}
|
|
1571
1577
|
collectFields() {
|
|
1572
1578
|
let t = /* @__PURE__ */ new Set();
|
|
1573
1579
|
function n(n) {
|
|
1574
|
-
n instanceof
|
|
1580
|
+
n instanceof H ? t.add(n) : n instanceof e && n.collectFields().forEach((e) => t.add(e));
|
|
1575
1581
|
}
|
|
1576
1582
|
return n(this.operand1), n(this.operand2), t;
|
|
1577
1583
|
}
|
|
1578
|
-
},
|
|
1584
|
+
}, gn = Symbol("ExecuteAction"), U = class extends E {
|
|
1579
1585
|
constructor(e) {
|
|
1580
1586
|
super(e);
|
|
1581
1587
|
}
|
|
1582
1588
|
static get classIdentifier() {
|
|
1583
|
-
return
|
|
1589
|
+
return gn;
|
|
1584
1590
|
}
|
|
1585
1591
|
execute(e, t, n) {
|
|
1586
1592
|
return super.execute(e, t, n);
|
|
@@ -1588,40 +1594,40 @@ var fn = class e {
|
|
|
1588
1594
|
canExecute(e) {
|
|
1589
1595
|
return !0;
|
|
1590
1596
|
}
|
|
1591
|
-
},
|
|
1597
|
+
}, _n = class extends U {
|
|
1592
1598
|
targetFor(e) {
|
|
1593
1599
|
let t = this.target;
|
|
1594
1600
|
return typeof t == "function" ? t(e) ?? void 0 : t;
|
|
1595
1601
|
}
|
|
1596
1602
|
};
|
|
1597
|
-
function
|
|
1603
|
+
function vn(e) {
|
|
1598
1604
|
return e.validating ? new Promise((t) => {
|
|
1599
1605
|
let n = ee(() => e.validating, (e) => {
|
|
1600
1606
|
e || (n(), t());
|
|
1601
1607
|
}, { flush: "sync" });
|
|
1602
1608
|
}) : Promise.resolve();
|
|
1603
1609
|
}
|
|
1604
|
-
var
|
|
1610
|
+
var yn = class extends D {}, bn = class extends yn {
|
|
1605
1611
|
constructor(e) {
|
|
1606
1612
|
super("the submit handler failed", { cause: e });
|
|
1607
1613
|
}
|
|
1608
|
-
},
|
|
1614
|
+
}, xn = class extends yn {
|
|
1609
1615
|
reason;
|
|
1610
1616
|
constructor(e) {
|
|
1611
1617
|
super(e === "invalid" ? "the submitted element is invalid" : "a submit of this action is already running"), this.reason = e;
|
|
1612
1618
|
}
|
|
1613
|
-
},
|
|
1619
|
+
}, Sn = class extends _n {
|
|
1614
1620
|
target;
|
|
1615
1621
|
constructor(e, t, n = {}) {
|
|
1616
1622
|
super(async (e, r, i) => {
|
|
1617
1623
|
let a = this.state(e, () => ({ running: !1 }));
|
|
1618
|
-
if (a.running) throw new
|
|
1624
|
+
if (a.running) throw new xn("running");
|
|
1619
1625
|
a.running = !0;
|
|
1620
1626
|
try {
|
|
1621
1627
|
let a = this.targetFor(e);
|
|
1622
1628
|
if (!a) throw Error("SubmitAction: the target callback returned no element");
|
|
1623
|
-
if (await
|
|
1624
|
-
a[
|
|
1629
|
+
if (await vn(a), !a.valid) throw new xn("invalid");
|
|
1630
|
+
a[ut]();
|
|
1625
1631
|
let o = a.value, s, c = n.lock !== !1 && a.access === "editable";
|
|
1626
1632
|
c && (a.access = "readonly");
|
|
1627
1633
|
let l = c && a.access === "readonly";
|
|
@@ -1629,7 +1635,7 @@ var gn = class extends E {}, _n = class extends gn {
|
|
|
1629
1635
|
try {
|
|
1630
1636
|
s = await t(o, a);
|
|
1631
1637
|
} catch (e) {
|
|
1632
|
-
throw new
|
|
1638
|
+
throw new bn(e);
|
|
1633
1639
|
}
|
|
1634
1640
|
s !== void 0 && n.rebind !== !1 && a.rebind(s);
|
|
1635
1641
|
} finally {
|
|
@@ -1649,7 +1655,7 @@ var gn = class extends E {}, _n = class extends gn {
|
|
|
1649
1655
|
let t = this.targetFor(e);
|
|
1650
1656
|
return t !== void 0 && t.valid && !t.pending;
|
|
1651
1657
|
}
|
|
1652
|
-
},
|
|
1658
|
+
}, Cn = class extends _n {
|
|
1653
1659
|
target;
|
|
1654
1660
|
constructor(e) {
|
|
1655
1661
|
super((e, t, n) => {
|
|
@@ -1661,27 +1667,27 @@ var gn = class extends E {}, _n = class extends gn {
|
|
|
1661
1667
|
canExecute(e) {
|
|
1662
1668
|
return this.targetFor(e) !== void 0;
|
|
1663
1669
|
}
|
|
1664
|
-
},
|
|
1670
|
+
}, wn = Symbol("ListItemAddedAction"), W = class extends E {
|
|
1665
1671
|
constructor(e) {
|
|
1666
1672
|
super(e);
|
|
1667
1673
|
}
|
|
1668
1674
|
static get classIdentifier() {
|
|
1669
|
-
return
|
|
1675
|
+
return wn;
|
|
1670
1676
|
}
|
|
1671
1677
|
execute(e, t, n, r) {
|
|
1672
1678
|
return super.execute(e, t, n, r);
|
|
1673
1679
|
}
|
|
1674
|
-
},
|
|
1680
|
+
}, Tn = Symbol("ListItemRemovedAction"), G = class extends E {
|
|
1675
1681
|
constructor(e) {
|
|
1676
1682
|
super(e);
|
|
1677
1683
|
}
|
|
1678
1684
|
static get classIdentifier() {
|
|
1679
|
-
return
|
|
1685
|
+
return Tn;
|
|
1680
1686
|
}
|
|
1681
1687
|
execute(e, t, n, r) {
|
|
1682
1688
|
return super.execute(e, t, n, r);
|
|
1683
1689
|
}
|
|
1684
|
-
},
|
|
1690
|
+
}, K = class extends H {
|
|
1685
1691
|
get [Symbol.toStringTag]() {
|
|
1686
1692
|
return "Field";
|
|
1687
1693
|
}
|
|
@@ -1695,13 +1701,13 @@ var gn = class extends E {}, _n = class extends gn {
|
|
|
1695
1701
|
return this.state.value;
|
|
1696
1702
|
}
|
|
1697
1703
|
set _value(e) {
|
|
1698
|
-
this.state.value =
|
|
1704
|
+
this.state.value = Pe(this, e);
|
|
1699
1705
|
}
|
|
1700
1706
|
constructor(e) {
|
|
1701
|
-
super(
|
|
1707
|
+
super(rt()), this.init(e);
|
|
1702
1708
|
}
|
|
1703
1709
|
init(e) {
|
|
1704
|
-
|
|
1710
|
+
T(() => {
|
|
1705
1711
|
if (e) {
|
|
1706
1712
|
let { value: t, validators: n, actions: r, ...i } = e;
|
|
1707
1713
|
this.registerInitialActions([...n || [], ...r || []]), this.assignParams(i), this._value = t === void 0 ? this.originalValue : t;
|
|
@@ -1714,12 +1720,12 @@ var gn = class extends E {}, _n = class extends gn {
|
|
|
1714
1720
|
}
|
|
1715
1721
|
set value(e) {
|
|
1716
1722
|
let t = this._value;
|
|
1717
|
-
t === e || Number.isNaN(t) && Number.isNaN(e) ||
|
|
1723
|
+
t === e || Number.isNaN(t) && Number.isNaN(e) || T((n) => {
|
|
1718
1724
|
n.touch(this), this._value = e, this.bumpValueVersion(), this.serializesAs("value") === "value" && this.boundActions?.triggerEager(this, this._value, t), this.propagateValueChanged();
|
|
1719
1725
|
});
|
|
1720
1726
|
}
|
|
1721
|
-
[
|
|
1722
|
-
|
|
1727
|
+
[Ce](e, t, n) {
|
|
1728
|
+
T((r) => {
|
|
1723
1729
|
r.touch(this);
|
|
1724
1730
|
let i = this.raw;
|
|
1725
1731
|
p(i.announcedValue) === p(i.value) && (i.announcedValue = n()), e(), r.whenRolledBack(t), this.bumpValueVersion(), this.serializesAs("value") === "value" && this.boundActions?.triggerEager(this, this._value, i.announcedValue), this.propagateValueChanged(!0);
|
|
@@ -1732,7 +1738,7 @@ var gn = class extends E {}, _n = class extends gn {
|
|
|
1732
1738
|
this.touchState(), this.state.touched = e, e && this.editConcluded();
|
|
1733
1739
|
}
|
|
1734
1740
|
bind(e, t) {
|
|
1735
|
-
let n = this.constructor, r =
|
|
1741
|
+
let n = this.constructor, r = Ie(() => new n({
|
|
1736
1742
|
value: e === void 0 ? this.value : e,
|
|
1737
1743
|
...t && "originalValue" in t ? { originalValue: t.originalValue } : {},
|
|
1738
1744
|
access: t?.access ?? this.access,
|
|
@@ -1740,23 +1746,23 @@ var gn = class extends E {}, _n = class extends gn {
|
|
|
1740
1746
|
}));
|
|
1741
1747
|
return r.boundFrom(this, r.contribution, r.originalValue, t), r;
|
|
1742
1748
|
}
|
|
1743
|
-
},
|
|
1744
|
-
function
|
|
1749
|
+
}, En = /* @__PURE__ */ new WeakMap();
|
|
1750
|
+
function Dn(e) {
|
|
1745
1751
|
if (e != null) return Object.values(e).some((e) => e != null) ? e : void 0;
|
|
1746
1752
|
}
|
|
1747
|
-
var
|
|
1753
|
+
var On = class extends K {
|
|
1748
1754
|
get [Symbol.toStringTag]() {
|
|
1749
1755
|
return "Action";
|
|
1750
1756
|
}
|
|
1751
1757
|
init(e) {
|
|
1752
|
-
|
|
1758
|
+
T(() => {
|
|
1753
1759
|
if (this._value = {
|
|
1754
1760
|
label: void 0,
|
|
1755
1761
|
icon: void 0
|
|
1756
1762
|
}, e) {
|
|
1757
1763
|
let { value: t, originalValue: n, validators: r, actions: i, ...a } = e;
|
|
1758
1764
|
this.registerInitialActions([...r || [], ...i || []]), this.assignParams(a);
|
|
1759
|
-
let o =
|
|
1765
|
+
let o = Dn(t), s = Dn(n);
|
|
1760
1766
|
o ? this._value = o : s && (this._value = { ...s }), s && (this.originalValue = Object.freeze({ ...s }));
|
|
1761
1767
|
}
|
|
1762
1768
|
this.constructed(e), this.originalValue === void 0 && (this.originalValue = this._value), this.recordAnnounced(), this.boundActions?.triggerEager(this, this.contribution, this.originalValue), this.validate();
|
|
@@ -1787,18 +1793,18 @@ var Tn = class extends q {
|
|
|
1787
1793
|
serializesAs() {
|
|
1788
1794
|
return "omit";
|
|
1789
1795
|
}
|
|
1790
|
-
[
|
|
1796
|
+
[Ve]() {
|
|
1791
1797
|
return !0;
|
|
1792
1798
|
}
|
|
1793
1799
|
get executable() {
|
|
1794
|
-
return !this.effectiveEnabled || this.visibility !== "full" || this.busy ? !1 : this[
|
|
1800
|
+
return !this.effectiveEnabled || this.visibility !== "full" || this.busy ? !1 : this[st]().every((e) => e.canExecute(this));
|
|
1795
1801
|
}
|
|
1796
|
-
[
|
|
1797
|
-
return this.boundActions?.ofClass(
|
|
1802
|
+
[st]() {
|
|
1803
|
+
return this.boundActions?.ofClass(U.classIdentifier) ?? [];
|
|
1798
1804
|
}
|
|
1799
1805
|
get busyRuns() {
|
|
1800
|
-
let e =
|
|
1801
|
-
return e || (e = d(0),
|
|
1806
|
+
let e = En.get(this);
|
|
1807
|
+
return e || (e = d(0), En.set(this, e)), e;
|
|
1802
1808
|
}
|
|
1803
1809
|
get busy() {
|
|
1804
1810
|
return this.busyRuns.value > 0;
|
|
@@ -1807,12 +1813,12 @@ var Tn = class extends q {
|
|
|
1807
1813
|
let t = this.busyRuns;
|
|
1808
1814
|
t.value++;
|
|
1809
1815
|
try {
|
|
1810
|
-
return await this.triggerAction(
|
|
1816
|
+
return await this.triggerAction(U, e);
|
|
1811
1817
|
} finally {
|
|
1812
1818
|
t.value--;
|
|
1813
1819
|
}
|
|
1814
1820
|
}
|
|
1815
|
-
},
|
|
1821
|
+
}, kn = /* @__PURE__ */ new WeakMap(), An = /* @__PURE__ */ new WeakMap(), q = class e extends H {
|
|
1816
1822
|
get [Symbol.toStringTag]() {
|
|
1817
1823
|
return "Container";
|
|
1818
1824
|
}
|
|
@@ -1820,7 +1826,7 @@ var Tn = class extends q {
|
|
|
1820
1826
|
return this.children.some((e) => e.touched);
|
|
1821
1827
|
}
|
|
1822
1828
|
set touched(e) {
|
|
1823
|
-
|
|
1829
|
+
T(() => {
|
|
1824
1830
|
this.members.forEach((t) => {
|
|
1825
1831
|
t.touched = e;
|
|
1826
1832
|
});
|
|
@@ -1833,7 +1839,7 @@ var Tn = class extends q {
|
|
|
1833
1839
|
return this.busyRead;
|
|
1834
1840
|
}
|
|
1835
1841
|
validate(e = !1) {
|
|
1836
|
-
|
|
1842
|
+
T(() => {
|
|
1837
1843
|
e && this.members.forEach((e) => e.validate(!0)), super.validate(e);
|
|
1838
1844
|
});
|
|
1839
1845
|
}
|
|
@@ -1851,8 +1857,8 @@ var Tn = class extends q {
|
|
|
1851
1857
|
return t.length > 0 && t.every((e) => this.childSerializesAs(e, "fullValue") === "omit") ? "omit" : super.serializesAs(e);
|
|
1852
1858
|
}
|
|
1853
1859
|
command(e) {
|
|
1854
|
-
let t = e === "confirm" ?
|
|
1855
|
-
r.filter(({ action: e }) => e[
|
|
1860
|
+
let t = e === "confirm" ? Sn : Cn, n = e === "confirm" ? "defaultConfirm" : "defaultReject", r = this.actionsBelow().filter((e) => e.action.visibility === "full"), i = [
|
|
1861
|
+
r.filter(({ action: e }) => e[st]().some((n) => n instanceof t && n.targetFor(e) === this)),
|
|
1856
1862
|
r.filter(({ action: e, depth: t }) => t === 0 && e[n]),
|
|
1857
1863
|
r.filter(({ action: e, depth: t }) => t > 0 && e[n])
|
|
1858
1864
|
];
|
|
@@ -1867,7 +1873,7 @@ var Tn = class extends q {
|
|
|
1867
1873
|
}
|
|
1868
1874
|
}
|
|
1869
1875
|
actionsBelow(t = 0) {
|
|
1870
|
-
return this.children.flatMap((n) => n instanceof
|
|
1876
|
+
return this.children.flatMap((n) => n instanceof On ? [{
|
|
1871
1877
|
action: n,
|
|
1872
1878
|
depth: t
|
|
1873
1879
|
}] : n instanceof e ? n.actionsBelow(t + 1) : []);
|
|
@@ -1882,12 +1888,12 @@ var Tn = class extends q {
|
|
|
1882
1888
|
return this.fullValue;
|
|
1883
1889
|
}
|
|
1884
1890
|
get validRead() {
|
|
1885
|
-
let e =
|
|
1886
|
-
return e || (e = l(() => this.ownErrorsValid(this.state.errors) && this.children.every((e) => e.valid || this.childSerializesAs(e, "value") === "omit")),
|
|
1891
|
+
let e = kn.get(this);
|
|
1892
|
+
return e || (e = l(() => this.ownErrorsValid(this.state.errors) && this.children.every((e) => e.valid || this.childSerializesAs(e, "value") === "omit")), kn.set(this, e)), e.value;
|
|
1887
1893
|
}
|
|
1888
1894
|
get busyRead() {
|
|
1889
|
-
let e =
|
|
1890
|
-
return e || (e = l(() => this.children.some((e) => e.busy)),
|
|
1895
|
+
let e = An.get(this);
|
|
1896
|
+
return e || (e = l(() => this.children.some((e) => e.busy)), An.set(this, e)), e.value;
|
|
1891
1897
|
}
|
|
1892
1898
|
childValidatingChanged(e) {
|
|
1893
1899
|
let t = this.validating;
|
|
@@ -1896,11 +1902,11 @@ var Tn = class extends q {
|
|
|
1896
1902
|
childValidityChanged(e) {
|
|
1897
1903
|
this.raw.invalidChildren += e ? -1 : 1;
|
|
1898
1904
|
}
|
|
1899
|
-
},
|
|
1900
|
-
function
|
|
1905
|
+
}, jn = Object.freeze([]);
|
|
1906
|
+
function Mn(e, t) {
|
|
1901
1907
|
if (!Number.isInteger(e)) throw RangeError(`List.${t}(): the index must be an integer, got ${e}`);
|
|
1902
1908
|
}
|
|
1903
|
-
var
|
|
1909
|
+
var J = class e extends q {
|
|
1904
1910
|
get [Symbol.toStringTag]() {
|
|
1905
1911
|
return "List";
|
|
1906
1912
|
}
|
|
@@ -1912,7 +1918,7 @@ var An = class e extends J {
|
|
|
1912
1918
|
}
|
|
1913
1919
|
_itemTemplate;
|
|
1914
1920
|
constructor(t, n) {
|
|
1915
|
-
super(
|
|
1921
|
+
super(ot()), this._itemTemplate = t, t && Le(t), T(() => {
|
|
1916
1922
|
if (n) {
|
|
1917
1923
|
let { value: e, validators: t, actions: r, ...i } = n;
|
|
1918
1924
|
this.registerInitialActions([...t || [], ...r || []]), this.assignParams(i), e === void 0 ? this.originalValue !== void 0 && this.setValueInternal(this.originalValue) : this.setValueInternal(e);
|
|
@@ -1920,8 +1926,8 @@ var An = class e extends J {
|
|
|
1920
1926
|
this.constructed(n), this.originalValue === void 0 && (this.originalValue = e.baseline(this.value)), this.recordAnnounced(), this.boundActions?.triggerEager(this, this.contribution, this.originalValue), this.validate();
|
|
1921
1927
|
});
|
|
1922
1928
|
}
|
|
1923
|
-
[
|
|
1924
|
-
let e = super[
|
|
1929
|
+
[b]() {
|
|
1930
|
+
let e = super[b]();
|
|
1925
1931
|
return e.rows = this.raw.rows ? [...this.raw.rows] : this.raw.rows, e;
|
|
1926
1932
|
}
|
|
1927
1933
|
static baseline(e) {
|
|
@@ -1929,10 +1935,10 @@ var An = class e extends J {
|
|
|
1929
1935
|
}
|
|
1930
1936
|
processSetValueItem(t) {
|
|
1931
1937
|
let n;
|
|
1932
|
-
return n = t instanceof
|
|
1938
|
+
return n = t instanceof H ? t : this._itemTemplate ? this._itemTemplate.bind(t) : e.elementFor(t), this.takeChild(n), this.completeRecords(n), n;
|
|
1933
1939
|
}
|
|
1934
1940
|
static elementFor(t) {
|
|
1935
|
-
return ae(t) ? Y.createFromFormData(t) : Array.isArray(t) ? new e(void 0, { value: t }) : new
|
|
1941
|
+
return ae(t) ? Y.createFromFormData(t) : Array.isArray(t) ? new e(void 0, { value: t }) : new K({ value: t });
|
|
1936
1942
|
}
|
|
1937
1943
|
createPaddingItem(t) {
|
|
1938
1944
|
return this._itemTemplate ? this.processSetValueItem(this._itemTemplate.bind()) : t instanceof Y || ae(t) ? this.processSetValueItem({}) : t instanceof e || Array.isArray(t) ? this.processSetValueItem([]) : this.processSetValueItem(void 0);
|
|
@@ -1946,17 +1952,17 @@ var An = class e extends J {
|
|
|
1946
1952
|
}
|
|
1947
1953
|
setValueInternal(t, n = !1) {
|
|
1948
1954
|
if (t != null && !Array.isArray(t)) throw TypeError("Invalid value provided: a list takes an array of rows, or null to empty it");
|
|
1949
|
-
|
|
1955
|
+
T((r) => this.asReset(() => {
|
|
1950
1956
|
r.touch(this);
|
|
1951
1957
|
let i = this.raw.rows, a = (e, t) => {
|
|
1952
1958
|
n && r.recordStructural(this, {
|
|
1953
|
-
actionClass:
|
|
1959
|
+
actionClass: G,
|
|
1954
1960
|
item: e,
|
|
1955
1961
|
index: t
|
|
1956
1962
|
});
|
|
1957
1963
|
}, o = (e, t) => {
|
|
1958
1964
|
n && r.recordStructural(this, {
|
|
1959
|
-
actionClass:
|
|
1965
|
+
actionClass: W,
|
|
1960
1966
|
item: e,
|
|
1961
1967
|
index: t
|
|
1962
1968
|
});
|
|
@@ -1971,7 +1977,7 @@ var An = class e extends J {
|
|
|
1971
1977
|
let n = Array(t.length);
|
|
1972
1978
|
for (let r = 0; r < t.length; r++) {
|
|
1973
1979
|
let i = t[r], s = e[r], c = this._itemTemplate;
|
|
1974
|
-
s && c && !(i instanceof
|
|
1980
|
+
s && c && !(i instanceof H) && s.declaration === c.declaration ? (this.resetChild(s, c, i), n[r] = s) : (s && (this.releaseChild(s), a(s, r)), n[r] = this.processSetValueItem(i), o(n[r], r));
|
|
1975
1981
|
}
|
|
1976
1982
|
for (let n = t.length; n < e.length; n++) this.releaseChild(e[n]);
|
|
1977
1983
|
this.raw.rows = n;
|
|
@@ -1991,16 +1997,16 @@ var An = class e extends J {
|
|
|
1991
1997
|
case "null": t.push(null);
|
|
1992
1998
|
}
|
|
1993
1999
|
});
|
|
1994
|
-
let n = t.length ? Object.freeze(t) :
|
|
2000
|
+
let n = t.length ? Object.freeze(t) : jn;
|
|
1995
2001
|
return this.raw.cachedValue = n, this.raw.cachedValueVersion = e, n;
|
|
1996
2002
|
}
|
|
1997
2003
|
set value(e) {
|
|
1998
|
-
|
|
2004
|
+
T(() => {
|
|
1999
2005
|
this.setValueInternal(e, !0), this.propagateValueChanged(!0);
|
|
2000
2006
|
});
|
|
2001
2007
|
}
|
|
2002
2008
|
resetTo(e, t) {
|
|
2003
|
-
|
|
2009
|
+
T((n) => {
|
|
2004
2010
|
n.touch(this), this.errors.length && (this.errors = []), this.setValueInternal(t === void 0 ? e.fullValue : t), this.recordBaseline(), super.validate(!0);
|
|
2005
2011
|
});
|
|
2006
2012
|
}
|
|
@@ -2008,7 +2014,7 @@ var An = class e extends J {
|
|
|
2008
2014
|
this.recordAnnounced(), this.originalValue = e.baseline(this.value);
|
|
2009
2015
|
}
|
|
2010
2016
|
bind(e, t) {
|
|
2011
|
-
let n = this._itemTemplate?.bind(), r = this.constructor, i =
|
|
2017
|
+
let n = this._itemTemplate?.bind(), r = this.constructor, i = Ie(() => new r(n, {
|
|
2012
2018
|
value: [...(e === void 0 ? this.fullValue : e) ?? []],
|
|
2013
2019
|
...t && "originalValue" in t ? { originalValue: t.originalValue } : {},
|
|
2014
2020
|
access: t?.access ?? this.access,
|
|
@@ -2046,37 +2052,37 @@ var An = class e extends J {
|
|
|
2046
2052
|
return this.remove((this.raw.rows?.length ?? 0) - 1);
|
|
2047
2053
|
}
|
|
2048
2054
|
remove(e) {
|
|
2049
|
-
|
|
2055
|
+
Mn(e, "remove");
|
|
2050
2056
|
let t;
|
|
2051
|
-
return
|
|
2057
|
+
return T((n) => {
|
|
2052
2058
|
let r = this.raw.rows;
|
|
2053
2059
|
if (r == null || e < 0 || r.length <= e) return;
|
|
2054
2060
|
n.touch(this);
|
|
2055
2061
|
let i = r.splice(e, 1)?.[0];
|
|
2056
2062
|
i && (this.releaseChild(i), this.rowsChanged(), this.bumpValueVersion(), t = i, n.recordStructural(this, {
|
|
2057
|
-
actionClass:
|
|
2063
|
+
actionClass: G,
|
|
2058
2064
|
item: t,
|
|
2059
2065
|
index: e
|
|
2060
2066
|
}), this.propagateValueChanged(!0));
|
|
2061
2067
|
}), t;
|
|
2062
2068
|
}
|
|
2063
2069
|
insert(e, t) {
|
|
2064
|
-
|
|
2070
|
+
Mn(t, "insert");
|
|
2065
2071
|
let n = 0;
|
|
2066
|
-
return
|
|
2072
|
+
return T((r) => {
|
|
2067
2073
|
r.touch(this);
|
|
2068
2074
|
let i = this.raw.rows ??= [];
|
|
2069
2075
|
for (n = t < 0 ? Math.max(i.length + t, 0) : t; i.length < n;) {
|
|
2070
2076
|
let t = this.createPaddingItem(e), n = i.push(t) - 1;
|
|
2071
2077
|
this.bumpValueVersion(), r.recordStructural(this, {
|
|
2072
|
-
actionClass:
|
|
2078
|
+
actionClass: W,
|
|
2073
2079
|
item: t,
|
|
2074
2080
|
index: n
|
|
2075
2081
|
});
|
|
2076
2082
|
}
|
|
2077
2083
|
let a = this.processSetValueItem(e);
|
|
2078
2084
|
i.splice(n, 0, a), r.recordStructural(this, {
|
|
2079
|
-
actionClass:
|
|
2085
|
+
actionClass: W,
|
|
2080
2086
|
item: a,
|
|
2081
2087
|
index: n
|
|
2082
2088
|
}), this.rowsChanged(), this.bumpValueVersion(), this.propagateValueChanged(!0);
|
|
@@ -2085,17 +2091,17 @@ var An = class e extends J {
|
|
|
2085
2091
|
releaseRows() {
|
|
2086
2092
|
this.raw.rows?.forEach((e) => this.releaseChild(e));
|
|
2087
2093
|
}
|
|
2088
|
-
[
|
|
2089
|
-
|
|
2094
|
+
[ct](e) {
|
|
2095
|
+
T((t) => {
|
|
2090
2096
|
t.touch(this), this.raw.rows = [...e], this.rowsChanged(), this.bumpValueVersion(), this.propagateValueChanged(!0);
|
|
2091
2097
|
});
|
|
2092
2098
|
}
|
|
2093
2099
|
clear() {
|
|
2094
|
-
|
|
2100
|
+
T((e) => {
|
|
2095
2101
|
let t = this.raw.rows ?? [], n = t.length > 0;
|
|
2096
2102
|
e.touch(this);
|
|
2097
2103
|
for (let n = t.length - 1; n >= 0; n--) e.recordStructural(this, {
|
|
2098
|
-
actionClass:
|
|
2104
|
+
actionClass: G,
|
|
2099
2105
|
item: t[n],
|
|
2100
2106
|
index: n
|
|
2101
2107
|
});
|
|
@@ -2105,16 +2111,16 @@ var An = class e extends J {
|
|
|
2105
2111
|
rebind(e) {
|
|
2106
2112
|
return super.rebind(e);
|
|
2107
2113
|
}
|
|
2108
|
-
},
|
|
2109
|
-
function
|
|
2114
|
+
}, Nn = /* @__PURE__ */ new WeakSet();
|
|
2115
|
+
function Pn(e) {
|
|
2110
2116
|
if (e === "$" || e === "then" || e.startsWith("__v_")) throw TypeError(`A view cannot hold a member named ${e}: $ is the element the view stands for, and then and __v_* are read by the language and by Vue`);
|
|
2111
2117
|
}
|
|
2112
2118
|
//#endregion
|
|
2113
2119
|
//#region src/group.ts
|
|
2114
|
-
function
|
|
2115
|
-
return ae(e) ? Y.createFromFormData(e) : Array.isArray(e) ? new
|
|
2120
|
+
function Fn(e) {
|
|
2121
|
+
return ae(e) ? Y.createFromFormData(e) : Array.isArray(e) ? new J(void 0, { value: e }) : new K({ value: e });
|
|
2116
2122
|
}
|
|
2117
|
-
var
|
|
2123
|
+
var In = /* @__PURE__ */ new WeakSet(), Ln = Object.freeze({}), Rn = /* @__PURE__ */ new WeakMap(), zn = (e) => ({
|
|
2118
2124
|
get(t, n, r) {
|
|
2119
2125
|
return e(), Reflect.get(t, n, r);
|
|
2120
2126
|
},
|
|
@@ -2136,7 +2142,7 @@ var Pn = /* @__PURE__ */ new WeakSet(), Fn = Object.freeze({}), In = /* @__PURE_
|
|
|
2136
2142
|
deleteProperty(e, t) {
|
|
2137
2143
|
throw TypeError(`fields.${String(t)} cannot be deleted: use removeField() to take a member out`);
|
|
2138
2144
|
}
|
|
2139
|
-
}), Y = class e extends
|
|
2145
|
+
}), Y = class e extends q {
|
|
2140
2146
|
get [Symbol.toStringTag]() {
|
|
2141
2147
|
return "Group";
|
|
2142
2148
|
}
|
|
@@ -2148,17 +2154,17 @@ var Pn = /* @__PURE__ */ new WeakSet(), Fn = Object.freeze({}), In = /* @__PURE_
|
|
|
2148
2154
|
}
|
|
2149
2155
|
_fields;
|
|
2150
2156
|
constructor(t, n) {
|
|
2151
|
-
if (super(
|
|
2152
|
-
this._fields = Object.create(null),
|
|
2157
|
+
if (super(at()), !e.isValidFields(t)) throw Error("Invalid fields object provided");
|
|
2158
|
+
this._fields = Object.create(null), T(() => {
|
|
2153
2159
|
let r = !1, i = !1;
|
|
2154
|
-
|
|
2160
|
+
In.add(this);
|
|
2155
2161
|
try {
|
|
2156
2162
|
if (Object.entries(t).forEach(([e, t]) => this.addField(e, t)), n) {
|
|
2157
2163
|
let { value: e, validators: t, actions: a, ...o } = n;
|
|
2158
2164
|
this.registerInitialActions([...t || [], ...a || []]), this.assignParams(o), e === void 0 ? this.originalValue !== void 0 && this.assignMembers(this.originalValue) : this.assignMembers(e), r = e !== void 0 || this.originalValue !== void 0, i = n.originalValue !== void 0 && e !== void 0;
|
|
2159
2165
|
}
|
|
2160
2166
|
} finally {
|
|
2161
|
-
|
|
2167
|
+
In.delete(this);
|
|
2162
2168
|
}
|
|
2163
2169
|
this.completeRecords(), this.constructed(n);
|
|
2164
2170
|
let a = this.value;
|
|
@@ -2172,22 +2178,22 @@ var Pn = /* @__PURE__ */ new WeakSet(), Fn = Object.freeze({}), In = /* @__PURE_
|
|
|
2172
2178
|
r instanceof e && r.baselineMembersFrom(i), r.originalValue = i;
|
|
2173
2179
|
});
|
|
2174
2180
|
}
|
|
2175
|
-
[
|
|
2176
|
-
let e = super[
|
|
2181
|
+
[b]() {
|
|
2182
|
+
let e = super[b]();
|
|
2177
2183
|
return e.fieldNames = [...this.raw.fieldNames], e;
|
|
2178
2184
|
}
|
|
2179
2185
|
static baseline(e) {
|
|
2180
2186
|
return e == null ? e : { ...e };
|
|
2181
2187
|
}
|
|
2182
2188
|
addField(t, n) {
|
|
2183
|
-
return
|
|
2189
|
+
return T((r) => {
|
|
2184
2190
|
if (Object.hasOwn(this._fields, t)) throw Error(`Field ${t} is already in this form`);
|
|
2185
|
-
|
|
2191
|
+
Nn.has(this) && Pn(t), this.takeChild(n, t), r.touch(this), e.setEntry(this._fields, t, n), r.whenRolledBack(() => e.dropEntry(this._fields, t)), this.state.fieldNames.push(t), In.has(this) || this.completeRecords(n), this.bumpValueVersion(), this.notifyValueChanged();
|
|
2186
2192
|
}), this;
|
|
2187
2193
|
}
|
|
2188
2194
|
removeField(t) {
|
|
2189
2195
|
let n;
|
|
2190
|
-
return
|
|
2196
|
+
return T((r) => {
|
|
2191
2197
|
if (!Object.hasOwn(this._fields, t)) return;
|
|
2192
2198
|
let i = this._fields[t];
|
|
2193
2199
|
r.touch(this), this.releaseChild(i);
|
|
@@ -2206,20 +2212,20 @@ var Pn = /* @__PURE__ */ new WeakSet(), Fn = Object.freeze({}), In = /* @__PURE_
|
|
|
2206
2212
|
}
|
|
2207
2213
|
static isValidFields(e) {
|
|
2208
2214
|
function t(e) {
|
|
2209
|
-
return e instanceof
|
|
2215
|
+
return e instanceof H;
|
|
2210
2216
|
}
|
|
2211
2217
|
return typeof e == "object" && !!e && Object.entries(e).every(([, e]) => t(e));
|
|
2212
2218
|
}
|
|
2213
2219
|
static createFromFormData(t) {
|
|
2214
|
-
if (t instanceof
|
|
2215
|
-
return new e(t == null ? {} : Object.fromEntries(Object.entries(t).map(([e, t]) => [e,
|
|
2220
|
+
if (t instanceof H) throw Error("data is already a Form structure, should be a simple object");
|
|
2221
|
+
return new e(t == null ? {} : Object.fromEntries(Object.entries(t).map(([e, t]) => [e, Fn(t)])));
|
|
2216
2222
|
}
|
|
2217
2223
|
field(e) {
|
|
2218
2224
|
return this._fields[e] ?? null;
|
|
2219
2225
|
}
|
|
2220
2226
|
get fields() {
|
|
2221
|
-
let e =
|
|
2222
|
-
return e || (e = new Proxy(this._fields,
|
|
2227
|
+
let e = Rn.get(this);
|
|
2228
|
+
return e || (e = new Proxy(this._fields, zn(() => this.state.fieldNames.length)), Rn.set(this, e)), e;
|
|
2223
2229
|
}
|
|
2224
2230
|
get members() {
|
|
2225
2231
|
return this.raw.fieldNames.map((e) => this._fields[e]);
|
|
@@ -2239,24 +2245,24 @@ var Pn = /* @__PURE__ */ new WeakSet(), Fn = Object.freeze({}), In = /* @__PURE_
|
|
|
2239
2245
|
case "null": t[e] = null;
|
|
2240
2246
|
}
|
|
2241
2247
|
});
|
|
2242
|
-
let n = ne(t) ?
|
|
2248
|
+
let n = ne(t) ? Ln : Object.freeze({ ...t });
|
|
2243
2249
|
return this.raw.cachedValue = n, this.raw.cachedValueVersion = e, n;
|
|
2244
2250
|
}
|
|
2245
2251
|
assignMembers(e) {
|
|
2246
|
-
|
|
2252
|
+
T(() => {
|
|
2247
2253
|
Object.entries(this._fields).forEach(([t, n]) => {
|
|
2248
2254
|
this.childSerializesAs(n, "fullValue") !== "omit" && (e == null || Object.hasOwn(e, t)) && (n.value = e == null ? null : e[t]);
|
|
2249
2255
|
});
|
|
2250
2256
|
});
|
|
2251
2257
|
}
|
|
2252
2258
|
set value(e) {
|
|
2253
|
-
|
|
2259
|
+
T((t) => {
|
|
2254
2260
|
this.assignMembers(e), t.markValidityDirty(this);
|
|
2255
2261
|
});
|
|
2256
2262
|
}
|
|
2257
2263
|
resetTo(e, t) {
|
|
2258
2264
|
let n = e;
|
|
2259
|
-
|
|
2265
|
+
T((e) => {
|
|
2260
2266
|
e.touch(this), this.errors.length && (this.errors = []), Object.entries(this._fields).forEach(([e, r]) => {
|
|
2261
2267
|
let i = n.field(e) ?? r, a;
|
|
2262
2268
|
this.childSerializesAs(r, "fullValue") === "omit" ? a = void 0 : t === null ? a = null : t !== void 0 && (a = Object.hasOwn(t, e) ? t[e] : i.originalValue), this.resetChild(r, i, a);
|
|
@@ -2281,7 +2287,7 @@ var Pn = /* @__PURE__ */ new WeakSet(), Fn = Object.freeze({}), In = /* @__PURE_
|
|
|
2281
2287
|
Object.entries(this._fields).forEach(([e, t]) => {
|
|
2282
2288
|
r[e] = t.bind();
|
|
2283
2289
|
});
|
|
2284
|
-
let i = this.constructor, a =
|
|
2290
|
+
let i = this.constructor, a = Ie(() => new i(r, {
|
|
2285
2291
|
value: t === void 0 ? this.fullValue : this.withBaselines(t),
|
|
2286
2292
|
...n && "originalValue" in n ? { originalValue: n.originalValue } : {},
|
|
2287
2293
|
access: n?.access ?? this.access,
|
|
@@ -2299,24 +2305,41 @@ var Pn = /* @__PURE__ */ new WeakSet(), Fn = Object.freeze({}), In = /* @__PURE_
|
|
|
2299
2305
|
rebind(e) {
|
|
2300
2306
|
return super.rebind(e);
|
|
2301
2307
|
}
|
|
2302
|
-
}
|
|
2308
|
+
}, Bn = /^(0|[1-9]\d*)$/;
|
|
2309
|
+
function Vn(e) {
|
|
2310
|
+
return typeof e == "number" ? Number.isSafeInteger(e) && e >= 0 ? e : void 0 : Bn.test(e) ? Number(e) : void 0;
|
|
2311
|
+
}
|
|
2312
|
+
function Hn(e, t) {
|
|
2313
|
+
let n = typeof t == "string" ? t === "" ? [] : t.split(".") : t, r = e;
|
|
2314
|
+
for (let e of n) {
|
|
2315
|
+
let t;
|
|
2316
|
+
if (r instanceof Y) t = r.fields[String(e)];
|
|
2317
|
+
else if (r instanceof J) {
|
|
2318
|
+
let n = Vn(e);
|
|
2319
|
+
t = n === void 0 ? void 0 : r.get(n);
|
|
2320
|
+
} else return;
|
|
2321
|
+
if (!t) return;
|
|
2322
|
+
r = t;
|
|
2323
|
+
}
|
|
2324
|
+
return r;
|
|
2325
|
+
}
|
|
2303
2326
|
//#endregion
|
|
2304
2327
|
//#region src/is-equal.ts
|
|
2305
|
-
function
|
|
2306
|
-
let n = e instanceof
|
|
2328
|
+
function Un(e, t) {
|
|
2329
|
+
let n = e instanceof H ? e.value : e, r = t instanceof H ? t.value : t;
|
|
2307
2330
|
return n === e && r === t ? void 0 : h(n, r);
|
|
2308
2331
|
}
|
|
2309
|
-
function
|
|
2310
|
-
return e instanceof
|
|
2332
|
+
function Wn(e, t) {
|
|
2333
|
+
return e instanceof H && t instanceof H ? h(e.value, t.value) : re(e, t, Un);
|
|
2311
2334
|
}
|
|
2312
2335
|
//#endregion
|
|
2313
2336
|
//#region src/validators/validator-compare-to.ts
|
|
2314
|
-
var
|
|
2337
|
+
var Gn = class extends F {
|
|
2315
2338
|
isValidComparison;
|
|
2316
2339
|
otherField;
|
|
2317
2340
|
registrations = /* @__PURE__ */ new WeakSet();
|
|
2318
|
-
listening = new
|
|
2319
|
-
declarations = new
|
|
2341
|
+
listening = new Ft();
|
|
2342
|
+
declarations = new Ft();
|
|
2320
2343
|
relay;
|
|
2321
2344
|
constructor(e, t, n) {
|
|
2322
2345
|
super((e, t, r) => {
|
|
@@ -2325,31 +2348,31 @@ var Bn = class extends P {
|
|
|
2325
2348
|
if (!i) return r.markRecordIncomplete(), null;
|
|
2326
2349
|
this.listenOn(i);
|
|
2327
2350
|
let a = m(i.value);
|
|
2328
|
-
return this.isValidComparison(m(e), a) ? null : [this.errorFor(n, "compare_to", "Value does not match the comparison with {otherValue}", {
|
|
2351
|
+
return this.isValidComparison(m(e), a) ? null : [this.errorFor(n, P("compare_to"), "Value does not match the comparison with {otherValue}", {
|
|
2329
2352
|
newValue: e,
|
|
2330
2353
|
oldValue: t,
|
|
2331
2354
|
otherValue: a
|
|
2332
2355
|
})];
|
|
2333
2356
|
}), this.isValidComparison = t, this.otherField = e, this.relay = new N((e, t, n, r) => {
|
|
2334
2357
|
t(e, n, r);
|
|
2335
|
-
let i =
|
|
2336
|
-
this.declarations.alive.forEach((e) =>
|
|
2358
|
+
let i = I(e);
|
|
2359
|
+
this.declarations.alive.forEach((e) => Nt(e, i).forEach((e) => {
|
|
2337
2360
|
this.registrations.has(e) && this.execute(e, () => null, e.contribution, this.comparisonState(e).oldValue);
|
|
2338
2361
|
}));
|
|
2339
|
-
}), this.relay[
|
|
2362
|
+
}), this.relay[$e] = () => {
|
|
2340
2363
|
this.declarations.alive.length === 0 && this.stopListening();
|
|
2341
2364
|
};
|
|
2342
2365
|
}
|
|
2343
2366
|
resolve(e) {
|
|
2344
2367
|
let t = this.otherField;
|
|
2345
|
-
return typeof t == "function" ? t(e) ?? void 0 : typeof t == "string" ?
|
|
2368
|
+
return typeof t == "function" ? t(e) ?? void 0 : typeof t == "string" ? Pt(t, e) : Mt(t, I(e));
|
|
2346
2369
|
}
|
|
2347
2370
|
listenOn(e) {
|
|
2348
2371
|
this.listening.has(e.declaration) || (this.listening.add(e.declaration), e.registerAction(this.relay));
|
|
2349
2372
|
}
|
|
2350
2373
|
stopListening() {
|
|
2351
2374
|
let e = this.listening.alive;
|
|
2352
|
-
e.length !== 0 && (
|
|
2375
|
+
e.length !== 0 && (C()?.whenRolledBack(() => e.forEach((e) => this.listening.add(e))), e.forEach((e) => {
|
|
2353
2376
|
this.listening.delete(e), e.unregisterAction(this.relay);
|
|
2354
2377
|
}));
|
|
2355
2378
|
}
|
|
@@ -2384,7 +2407,7 @@ function X(e) {
|
|
|
2384
2407
|
function Z(e) {
|
|
2385
2408
|
return X(e) === 0 && (e == null || g(e) || te(e) || ie(e));
|
|
2386
2409
|
}
|
|
2387
|
-
function
|
|
2410
|
+
function Kn(e, t) {
|
|
2388
2411
|
if (e instanceof Date && t instanceof Date) {
|
|
2389
2412
|
let n = e.getTime() - t.getTime();
|
|
2390
2413
|
return Number.isNaN(n) ? void 0 : n;
|
|
@@ -2394,7 +2417,7 @@ function Vn(e, t) {
|
|
|
2394
2417
|
}
|
|
2395
2418
|
//#endregion
|
|
2396
2419
|
//#region src/validators/validator-in-allowed-values.ts
|
|
2397
|
-
var
|
|
2420
|
+
var qn = class extends F {
|
|
2398
2421
|
constructor(e, t) {
|
|
2399
2422
|
let n = () => {
|
|
2400
2423
|
let t = m(e);
|
|
@@ -2410,7 +2433,7 @@ var Hn = class extends P {
|
|
|
2410
2433
|
super((e, i) => {
|
|
2411
2434
|
if (Z(m(e))) return null;
|
|
2412
2435
|
let a = n();
|
|
2413
|
-
return a.includes(m(e)) ? null : [this.errorFor(t, "in_allowed_values", "Must be one of [{allowedAsText}]", {
|
|
2436
|
+
return a.includes(m(e)) ? null : [this.errorFor(t, P("in_allowed_values"), "Must be one of [{allowedAsText}]", {
|
|
2414
2437
|
newValue: e,
|
|
2415
2438
|
oldValue: i,
|
|
2416
2439
|
allowedValues: a,
|
|
@@ -2418,47 +2441,47 @@ var Hn = class extends P {
|
|
|
2418
2441
|
})];
|
|
2419
2442
|
});
|
|
2420
2443
|
}
|
|
2421
|
-
},
|
|
2444
|
+
}, Jn = class extends F {
|
|
2422
2445
|
constructor(e) {
|
|
2423
2446
|
let t = e?.trim ?? !0;
|
|
2424
2447
|
super((n, r) => {
|
|
2425
2448
|
let i = m(n);
|
|
2426
|
-
return X(t && g(i) ? i.trim() : i) === 0 ? [this.errorFor(e, "required", "Please enter a value", {
|
|
2449
|
+
return X(t && g(i) ? i.trim() : i) === 0 ? [this.errorFor(e, P("required"), "Please enter a value", {
|
|
2427
2450
|
newValue: n,
|
|
2428
2451
|
oldValue: r
|
|
2429
2452
|
})] : null;
|
|
2430
2453
|
});
|
|
2431
2454
|
}
|
|
2432
|
-
},
|
|
2455
|
+
}, Yn = class extends F {
|
|
2433
2456
|
constructor(e, t) {
|
|
2434
2457
|
super((n, r) => {
|
|
2435
2458
|
if (Z(n)) return null;
|
|
2436
|
-
let i =
|
|
2437
|
-
return i === void 0 || i < 0 ? [this.errorFor(t, "min_value", "Value must be larger or equal to {minValue}", {
|
|
2459
|
+
let i = Kn(n, e);
|
|
2460
|
+
return i === void 0 || i < 0 ? [this.errorFor(t, P("min_value"), "Value must be larger or equal to {minValue}", {
|
|
2438
2461
|
newValue: n,
|
|
2439
2462
|
oldValue: r,
|
|
2440
2463
|
minValue: e
|
|
2441
2464
|
})] : null;
|
|
2442
2465
|
});
|
|
2443
2466
|
}
|
|
2444
|
-
},
|
|
2467
|
+
}, Xn = class extends F {
|
|
2445
2468
|
constructor(e, t) {
|
|
2446
2469
|
super((n, r) => {
|
|
2447
2470
|
if (Z(n)) return null;
|
|
2448
|
-
let i =
|
|
2449
|
-
return i === void 0 || i > 0 ? [this.errorFor(t, "max_value", "Value must be less than or equal to {maxValue}", {
|
|
2471
|
+
let i = Kn(n, e);
|
|
2472
|
+
return i === void 0 || i > 0 ? [this.errorFor(t, P("max_value"), "Value must be less than or equal to {maxValue}", {
|
|
2450
2473
|
newValue: n,
|
|
2451
2474
|
oldValue: r,
|
|
2452
2475
|
maxValue: e
|
|
2453
2476
|
})] : null;
|
|
2454
2477
|
});
|
|
2455
2478
|
}
|
|
2456
|
-
},
|
|
2479
|
+
}, Zn = class extends F {
|
|
2457
2480
|
constructor(e, t, n) {
|
|
2458
2481
|
super((r, i) => {
|
|
2459
2482
|
if (Z(r)) return null;
|
|
2460
|
-
let a =
|
|
2461
|
-
return a === void 0 || o === void 0 || a < 0 || o > 0 ? [this.errorFor(n, "value_in_range", "Value must be between {minValue} and {maxValue}", {
|
|
2483
|
+
let a = Kn(r, e), o = Kn(r, t);
|
|
2484
|
+
return a === void 0 || o === void 0 || a < 0 || o > 0 ? [this.errorFor(n, P("value_in_range"), "Value must be between {minValue} and {maxValue}", {
|
|
2462
2485
|
newValue: r,
|
|
2463
2486
|
oldValue: i,
|
|
2464
2487
|
minValue: e,
|
|
@@ -2466,28 +2489,28 @@ var Hn = class extends P {
|
|
|
2466
2489
|
})] : null;
|
|
2467
2490
|
});
|
|
2468
2491
|
}
|
|
2469
|
-
},
|
|
2492
|
+
}, Qn = class extends F {
|
|
2470
2493
|
constructor(e, t) {
|
|
2471
|
-
super((n, r) => Z(n) ? null : X(n) < e ? [this.errorFor(t, "min_length", "Length must be larger or equal to {minLength}", {
|
|
2494
|
+
super((n, r) => Z(n) ? null : X(n) < e ? [this.errorFor(t, P("min_length"), "Length must be larger or equal to {minLength}", {
|
|
2472
2495
|
newValue: n,
|
|
2473
2496
|
oldValue: r,
|
|
2474
2497
|
minLength: e
|
|
2475
2498
|
})] : null);
|
|
2476
2499
|
}
|
|
2477
|
-
},
|
|
2500
|
+
}, $n = class extends F {
|
|
2478
2501
|
constructor(e, t) {
|
|
2479
|
-
super((n, r) => Z(n) ? null : X(n) > e ? [this.errorFor(t, "max_length", "Length must be less than or equal to {maxLength}", {
|
|
2502
|
+
super((n, r) => Z(n) ? null : X(n) > e ? [this.errorFor(t, P("max_length"), "Length must be less than or equal to {maxLength}", {
|
|
2480
2503
|
newValue: n,
|
|
2481
2504
|
oldValue: r,
|
|
2482
2505
|
maxLength: e
|
|
2483
2506
|
})] : null);
|
|
2484
2507
|
}
|
|
2485
|
-
},
|
|
2508
|
+
}, er = class extends F {
|
|
2486
2509
|
constructor(e, t, n) {
|
|
2487
2510
|
super((r, i) => {
|
|
2488
2511
|
if (Z(r)) return null;
|
|
2489
2512
|
let a = X(r);
|
|
2490
|
-
return a < e || a > t ? [this.errorFor(n, "length_in_range", "Length must be between {minLength} and {maxLength}", {
|
|
2513
|
+
return a < e || a > t ? [this.errorFor(n, P("length_in_range"), "Length must be between {minLength} and {maxLength}", {
|
|
2491
2514
|
newValue: r,
|
|
2492
2515
|
oldValue: i,
|
|
2493
2516
|
minLength: e,
|
|
@@ -2495,32 +2518,32 @@ var Hn = class extends P {
|
|
|
2495
2518
|
})] : null;
|
|
2496
2519
|
});
|
|
2497
2520
|
}
|
|
2498
|
-
},
|
|
2521
|
+
}, tr = class extends F {
|
|
2499
2522
|
constructor(e, t) {
|
|
2500
2523
|
let n = /[gy]/.test(e.flags) ? new RegExp(e.source, e.flags.replace(/[gy]/g, "")) : e;
|
|
2501
2524
|
super((r, i) => {
|
|
2502
2525
|
let a = m(r);
|
|
2503
|
-
return Z(a) || n.test(String(a)) ? null : [this.errorFor(t, "pattern", "Value must match pattern \"{pattern}\"", {
|
|
2526
|
+
return Z(a) || n.test(String(a)) ? null : [this.errorFor(t, P("pattern"), "Value must match pattern \"{pattern}\"", {
|
|
2504
2527
|
newValue: r,
|
|
2505
2528
|
oldValue: i,
|
|
2506
2529
|
pattern: e
|
|
2507
2530
|
})];
|
|
2508
2531
|
});
|
|
2509
2532
|
}
|
|
2510
|
-
},
|
|
2511
|
-
CompareTo: () =>
|
|
2512
|
-
InAllowedValues: () =>
|
|
2513
|
-
LengthInRange: () =>
|
|
2514
|
-
MaxLength: () =>
|
|
2515
|
-
MaxValue: () =>
|
|
2516
|
-
MinLength: () =>
|
|
2517
|
-
MinValue: () =>
|
|
2518
|
-
Pattern: () =>
|
|
2519
|
-
Required: () =>
|
|
2520
|
-
Validator: () =>
|
|
2521
|
-
ValueInRange: () =>
|
|
2533
|
+
}, nr = /* @__PURE__ */ ce({
|
|
2534
|
+
CompareTo: () => Gn,
|
|
2535
|
+
InAllowedValues: () => qn,
|
|
2536
|
+
LengthInRange: () => er,
|
|
2537
|
+
MaxLength: () => $n,
|
|
2538
|
+
MaxValue: () => Xn,
|
|
2539
|
+
MinLength: () => Qn,
|
|
2540
|
+
MinValue: () => Yn,
|
|
2541
|
+
Pattern: () => tr,
|
|
2542
|
+
Required: () => Jn,
|
|
2543
|
+
Validator: () => F,
|
|
2544
|
+
ValueInRange: () => Zn,
|
|
2522
2545
|
isEmptyValue: () => Z
|
|
2523
|
-
}),
|
|
2546
|
+
}), rr = /* @__PURE__ */ new WeakMap(), ir = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new Set([
|
|
2524
2547
|
"push",
|
|
2525
2548
|
"pop",
|
|
2526
2549
|
"shift",
|
|
@@ -2531,23 +2554,23 @@ var Hn = class extends P {
|
|
|
2531
2554
|
"fill",
|
|
2532
2555
|
"copyWithin"
|
|
2533
2556
|
]);
|
|
2534
|
-
function
|
|
2557
|
+
function or(e) {
|
|
2535
2558
|
return typeof e == "string" && /^(0|[1-9]\d*)$/.test(e);
|
|
2536
2559
|
}
|
|
2537
|
-
function
|
|
2560
|
+
function sr(e) {
|
|
2538
2561
|
let t = Math.trunc(Number(e));
|
|
2539
2562
|
return Number.isNaN(t) ? 0 : t;
|
|
2540
2563
|
}
|
|
2541
2564
|
function Q(e) {
|
|
2542
|
-
return typeof e == "object" && !!e &&
|
|
2565
|
+
return typeof e == "object" && !!e && ir.get(e) || e;
|
|
2543
2566
|
}
|
|
2544
2567
|
function $(e) {
|
|
2545
|
-
return e instanceof
|
|
2568
|
+
return e instanceof q ? pr(e) : e.value;
|
|
2546
2569
|
}
|
|
2547
|
-
function
|
|
2548
|
-
e.value = Q(t) instanceof
|
|
2570
|
+
function cr(e, t) {
|
|
2571
|
+
e.value = Q(t) instanceof H ? Q(t).value : t;
|
|
2549
2572
|
}
|
|
2550
|
-
function
|
|
2573
|
+
function lr(e) {
|
|
2551
2574
|
return e === "__v_skip" ? {
|
|
2552
2575
|
answered: !0,
|
|
2553
2576
|
value: !0
|
|
@@ -2556,11 +2579,11 @@ function ir(e) {
|
|
|
2556
2579
|
value: void 0
|
|
2557
2580
|
} : { answered: !1 };
|
|
2558
2581
|
}
|
|
2559
|
-
function
|
|
2582
|
+
function ur(e) {
|
|
2560
2583
|
let t = (t) => typeof t == "string" && t !== "$" ? e.field(t) ?? void 0 : void 0, n = () => Object.keys(e.fields);
|
|
2561
2584
|
return {
|
|
2562
2585
|
get(n, r) {
|
|
2563
|
-
let i =
|
|
2586
|
+
let i = lr(r);
|
|
2564
2587
|
if (i.answered) return i.value;
|
|
2565
2588
|
if (r === "$") return e;
|
|
2566
2589
|
if (r === Symbol.toStringTag) return "View";
|
|
@@ -2571,7 +2594,7 @@ function ar(e) {
|
|
|
2571
2594
|
if (n === "$") throw TypeError("$ is the element a view stands for, and cannot be replaced");
|
|
2572
2595
|
let i = t(n);
|
|
2573
2596
|
if (!i) throw TypeError(`${String(n)} is not a member of this group - use $.addField() to add one`);
|
|
2574
|
-
return
|
|
2597
|
+
return cr(i, r), !0;
|
|
2575
2598
|
},
|
|
2576
2599
|
has(e, t) {
|
|
2577
2600
|
return t === "$" || typeof t == "string" && n().includes(t);
|
|
@@ -2595,11 +2618,11 @@ function ar(e) {
|
|
|
2595
2618
|
}
|
|
2596
2619
|
};
|
|
2597
2620
|
}
|
|
2598
|
-
function
|
|
2599
|
-
let t = () => e.items, n = (t) => Math.min(t, e.length), r = (e, t) => e < 0 ? Math.max(t + e, 0) : Math.min(e, t), i = (t) =>
|
|
2600
|
-
e[
|
|
2621
|
+
function dr(e) {
|
|
2622
|
+
let t = () => e.items, n = (t) => Math.min(t, e.length), r = (e, t) => e < 0 ? Math.max(t + e, 0) : Math.min(e, t), i = (t) => w(() => {
|
|
2623
|
+
e[ct](t);
|
|
2601
2624
|
}), a = {
|
|
2602
|
-
push: (...n) => (
|
|
2625
|
+
push: (...n) => (w(() => n.forEach((t) => e.push(Q(t)))), t().length),
|
|
2603
2626
|
pop: () => {
|
|
2604
2627
|
let n = t();
|
|
2605
2628
|
if (!n.length) return;
|
|
@@ -2612,15 +2635,15 @@ function or(e) {
|
|
|
2612
2635
|
let r = $(n[0]);
|
|
2613
2636
|
return e.remove(e.items.indexOf(n[0])), r;
|
|
2614
2637
|
},
|
|
2615
|
-
unshift: (...r) => (
|
|
2638
|
+
unshift: (...r) => (w(() => {
|
|
2616
2639
|
let t = n(0);
|
|
2617
2640
|
r.forEach((n, r) => e.insert(Q(n), t + r));
|
|
2618
2641
|
}), t().length),
|
|
2619
2642
|
splice: (...i) => {
|
|
2620
2643
|
let [a, o, ...s] = i, c = [];
|
|
2621
|
-
return
|
|
2622
|
-
let l = t(), u = r(
|
|
2623
|
-
i.length === 1 ? d = l.length - u : i.length > 1 && (d = Math.max(0, Math.min(
|
|
2644
|
+
return w(() => {
|
|
2645
|
+
let l = t(), u = r(sr(a), l.length), d = 0;
|
|
2646
|
+
i.length === 1 ? d = l.length - u : i.length > 1 && (d = Math.max(0, Math.min(sr(o), l.length - u))), l.slice(u, u + d).forEach((t) => {
|
|
2624
2647
|
c.push($(t)), e.remove(e.items.indexOf(t));
|
|
2625
2648
|
});
|
|
2626
2649
|
let f = n(u);
|
|
@@ -2648,15 +2671,15 @@ function or(e) {
|
|
|
2648
2671
|
}, o;
|
|
2649
2672
|
return o = new Proxy([], {
|
|
2650
2673
|
get(n, r, i) {
|
|
2651
|
-
let o =
|
|
2674
|
+
let o = lr(r);
|
|
2652
2675
|
if (o.answered) return o.value;
|
|
2653
2676
|
if (r === "$") return e;
|
|
2654
2677
|
if (r === "length") return t().length;
|
|
2655
|
-
if (
|
|
2678
|
+
if (or(r)) {
|
|
2656
2679
|
let e = t()[Number(r)];
|
|
2657
2680
|
return e ? $(e) : void 0;
|
|
2658
2681
|
}
|
|
2659
|
-
return typeof r == "string" &&
|
|
2682
|
+
return typeof r == "string" && ar.has(r) ? a[r] : Reflect.get(n, r, i);
|
|
2660
2683
|
},
|
|
2661
2684
|
set(r, i, a) {
|
|
2662
2685
|
if (i === "$") throw TypeError("$ is the element a view stands for, and cannot be replaced");
|
|
@@ -2665,16 +2688,16 @@ function or(e) {
|
|
|
2665
2688
|
if (!Number.isInteger(n) || n < 0 || n > 2 ** 32 - 1) throw RangeError("Invalid array length");
|
|
2666
2689
|
let r = t();
|
|
2667
2690
|
if (n > r.length) throw TypeError("a list view grows by push(), not by its length");
|
|
2668
|
-
return
|
|
2691
|
+
return w(() => r.slice(n).forEach((t) => e.remove(e.items.indexOf(t)))), !0;
|
|
2669
2692
|
}
|
|
2670
|
-
if (
|
|
2693
|
+
if (or(i)) {
|
|
2671
2694
|
let r = Number(i), o = t();
|
|
2672
|
-
return r < o.length ?
|
|
2695
|
+
return r < o.length ? cr(o[r], a) : e.insert(Q(a), n(o.length) + (r - o.length)), !0;
|
|
2673
2696
|
}
|
|
2674
2697
|
throw TypeError(`${String(i)} cannot be set on a list view`);
|
|
2675
2698
|
},
|
|
2676
2699
|
has(e, n) {
|
|
2677
|
-
return n === "$" || n === "length" ? !0 :
|
|
2700
|
+
return n === "$" || n === "length" ? !0 : or(n) ? Number(n) < t().length : Reflect.has(e, n);
|
|
2678
2701
|
},
|
|
2679
2702
|
ownKeys() {
|
|
2680
2703
|
return [...t().map((e, t) => String(t)), "length"];
|
|
@@ -2686,7 +2709,7 @@ function or(e) {
|
|
|
2686
2709
|
enumerable: !1,
|
|
2687
2710
|
configurable: !1
|
|
2688
2711
|
};
|
|
2689
|
-
if (!(!
|
|
2712
|
+
if (!(!or(n) || Number(n) >= t().length)) return {
|
|
2690
2713
|
value: $(t()[Number(n)]),
|
|
2691
2714
|
writable: !0,
|
|
2692
2715
|
enumerable: !0,
|
|
@@ -2701,10 +2724,10 @@ function or(e) {
|
|
|
2701
2724
|
}
|
|
2702
2725
|
}), o;
|
|
2703
2726
|
}
|
|
2704
|
-
function
|
|
2727
|
+
function fr(e) {
|
|
2705
2728
|
return {
|
|
2706
2729
|
get(t, n) {
|
|
2707
|
-
let r =
|
|
2730
|
+
let r = lr(n);
|
|
2708
2731
|
if (r.answered) return r.value;
|
|
2709
2732
|
if (n === "$") return e;
|
|
2710
2733
|
},
|
|
@@ -2719,69 +2742,71 @@ function sr(e) {
|
|
|
2719
2742
|
}
|
|
2720
2743
|
};
|
|
2721
2744
|
}
|
|
2722
|
-
function
|
|
2723
|
-
if (
|
|
2724
|
-
let t =
|
|
2745
|
+
function pr(e) {
|
|
2746
|
+
if (ir.has(e)) return e;
|
|
2747
|
+
let t = rr.get(e);
|
|
2725
2748
|
if (t) return t;
|
|
2726
2749
|
let n;
|
|
2727
|
-
return e instanceof Y ? (Object.keys(e.fields).forEach(
|
|
2750
|
+
return e instanceof Y ? (Object.keys(e.fields).forEach(Pn), Nn.add(e), n = new Proxy({}, ur(e))) : n = e instanceof J ? dr(e) : new Proxy({}, fr(e)), rr.set(e, n), ir.set(n, e), n;
|
|
2728
2751
|
}
|
|
2729
2752
|
//#endregion
|
|
2730
2753
|
//#region src/index.ts
|
|
2731
|
-
var
|
|
2732
|
-
AbortEventHandlingException: () =>
|
|
2733
|
-
AccessChangedAction: () =>
|
|
2734
|
-
AccessChangingAction: () =>
|
|
2735
|
-
Action: () =>
|
|
2736
|
-
ActionsMap: () =>
|
|
2737
|
-
CommandException: () =>
|
|
2738
|
-
ConditionalAccessAction: () =>
|
|
2739
|
-
ConditionalStatementAction: () =>
|
|
2740
|
-
ConditionalValueAction: () =>
|
|
2741
|
-
ConditionalVisibilityAction: () =>
|
|
2742
|
-
Container: () =>
|
|
2743
|
-
ContributionChangedAction: () =>
|
|
2744
|
-
|
|
2745
|
-
|
|
2754
|
+
var mr = /* @__PURE__ */ ce({
|
|
2755
|
+
AbortEventHandlingException: () => D,
|
|
2756
|
+
AccessChangedAction: () => Ut,
|
|
2757
|
+
AccessChangingAction: () => Vt,
|
|
2758
|
+
Action: () => On,
|
|
2759
|
+
ActionsMap: () => kt,
|
|
2760
|
+
CommandException: () => yn,
|
|
2761
|
+
ConditionalAccessAction: () => Rt,
|
|
2762
|
+
ConditionalStatementAction: () => L,
|
|
2763
|
+
ConditionalValueAction: () => zt,
|
|
2764
|
+
ConditionalVisibilityAction: () => Lt,
|
|
2765
|
+
Container: () => q,
|
|
2766
|
+
ContributionChangedAction: () => Gt,
|
|
2767
|
+
ERROR_NAMESPACE: () => Tt,
|
|
2768
|
+
EnabledChangedAction: () => Yt,
|
|
2769
|
+
EnabledChangingAction: () => qt,
|
|
2746
2770
|
ErrorPolicy: () => M,
|
|
2747
|
-
ExecuteAction: () =>
|
|
2748
|
-
Field: () =>
|
|
2749
|
-
FieldActionBase: () =>
|
|
2750
|
-
FieldBase: () =>
|
|
2771
|
+
ExecuteAction: () => U,
|
|
2772
|
+
Field: () => K,
|
|
2773
|
+
FieldActionBase: () => E,
|
|
2774
|
+
FieldBase: () => H,
|
|
2751
2775
|
Group: () => Y,
|
|
2752
|
-
List: () =>
|
|
2753
|
-
ListItemAddedAction: () =>
|
|
2754
|
-
ListItemRemovedAction: () =>
|
|
2755
|
-
Operator: () =>
|
|
2756
|
-
RejectAction: () =>
|
|
2757
|
-
Statement: () =>
|
|
2758
|
-
SubmitAction: () =>
|
|
2759
|
-
SubmitFailedException: () =>
|
|
2760
|
-
SubmitRefusedException: () =>
|
|
2761
|
-
TargetedExecuteAction: () =>
|
|
2762
|
-
ValidChangedAction: () =>
|
|
2763
|
-
ValidationError: () =>
|
|
2764
|
-
Validators: () =>
|
|
2776
|
+
List: () => J,
|
|
2777
|
+
ListItemAddedAction: () => W,
|
|
2778
|
+
ListItemRemovedAction: () => G,
|
|
2779
|
+
Operator: () => z,
|
|
2780
|
+
RejectAction: () => Cn,
|
|
2781
|
+
Statement: () => hn,
|
|
2782
|
+
SubmitAction: () => Sn,
|
|
2783
|
+
SubmitFailedException: () => bn,
|
|
2784
|
+
SubmitRefusedException: () => xn,
|
|
2785
|
+
TargetedExecuteAction: () => _n,
|
|
2786
|
+
ValidChangedAction: () => Zt,
|
|
2787
|
+
ValidationError: () => Et,
|
|
2788
|
+
Validators: () => nr,
|
|
2765
2789
|
ValueChangedAction: () => N,
|
|
2766
|
-
VisibilityChangedAction: () =>
|
|
2767
|
-
VisibilityChangingAction: () =>
|
|
2790
|
+
VisibilityChangedAction: () => tn,
|
|
2791
|
+
VisibilityChangingAction: () => $t,
|
|
2768
2792
|
accessValues: () => _,
|
|
2769
|
-
configureDevtools: () =>
|
|
2793
|
+
configureDevtools: () => Se,
|
|
2770
2794
|
defaultAccess: () => le,
|
|
2771
2795
|
defaultVisibility: () => fe,
|
|
2772
|
-
describeState: () =>
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2796
|
+
describeState: () => be,
|
|
2797
|
+
elementAt: () => Hn,
|
|
2798
|
+
errorRemovals: () => dt,
|
|
2799
|
+
hideState: () => xe,
|
|
2800
|
+
installPlugin: () => Ne,
|
|
2776
2801
|
isAccess: () => ue,
|
|
2777
|
-
isEqual: () =>
|
|
2802
|
+
isEqual: () => Wn,
|
|
2778
2803
|
isVisibility: () => pe,
|
|
2779
2804
|
setDefaultErrorPolicies: () => bt,
|
|
2780
|
-
transaction: () =>
|
|
2781
|
-
view: () =>
|
|
2805
|
+
transaction: () => w,
|
|
2806
|
+
view: () => pr,
|
|
2782
2807
|
visibilityValues: () => de
|
|
2783
2808
|
});
|
|
2784
2809
|
//#endregion
|
|
2785
|
-
export {
|
|
2810
|
+
export { D as AbortEventHandlingException, Ut as AccessChangedAction, Vt as AccessChangingAction, On as Action, kt as ActionsMap, yn as CommandException, Rt as ConditionalAccessAction, L as ConditionalStatementAction, zt as ConditionalValueAction, Lt as ConditionalVisibilityAction, q as Container, Gt as ContributionChangedAction, Tt as ERROR_NAMESPACE, Yt as EnabledChangedAction, qt as EnabledChangingAction, M as ErrorPolicy, U as ExecuteAction, K as Field, E as FieldActionBase, H as FieldBase, Y as Group, J as List, W as ListItemAddedAction, G as ListItemRemovedAction, z as Operator, Cn as RejectAction, hn as Statement, Sn as SubmitAction, bn as SubmitFailedException, xn as SubmitRefusedException, _n as TargetedExecuteAction, Zt as ValidChangedAction, Et as ValidationError, nr as Validators, N as ValueChangedAction, tn as VisibilityChangedAction, $t as VisibilityChangingAction, _ as accessValues, Se as configureDevtools, mr as default, le as defaultAccess, fe as defaultVisibility, be as describeState, Hn as elementAt, dt as errorRemovals, xe as hideState, Ne as installPlugin, ue as isAccess, Wn as isEqual, pe as isVisibility, bt as setDefaultErrorPolicies, w as transaction, pr as view, de as visibilityValues };
|
|
2786
2811
|
|
|
2787
2812
|
//# sourceMappingURL=dynamicforms-vue-forms.js.map
|