@dynamicforms/vue-forms 3.0.0-alpha.3 → 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 +538 -520
- package/dist/dynamicforms-vue-forms.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/package.json +1 -1
|
@@ -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,43 +340,43 @@ 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",
|
|
@@ -387,25 +387,25 @@ var ct = Symbol("Action.executeHandlers"), lt = Symbol("List.reorderRows"), ut =
|
|
|
387
387
|
}), A = Object.freeze({ server: Object.freeze({
|
|
388
388
|
validEffect: !0,
|
|
389
389
|
removeOn: "edit"
|
|
390
|
-
}) }),
|
|
391
|
-
function ht() {
|
|
392
|
-
return mt > 0;
|
|
393
|
-
}
|
|
390
|
+
}) }), mt = f(0), ht = 0;
|
|
394
391
|
function gt() {
|
|
395
|
-
|
|
392
|
+
return ht > 0;
|
|
396
393
|
}
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
394
|
+
function _t() {
|
|
395
|
+
mt.value;
|
|
396
|
+
}
|
|
397
|
+
var j = (e) => typeof e == "string" ? `'${e}'` : String(e);
|
|
398
|
+
function vt(e) {
|
|
399
|
+
if (typeof e != "object" || !e) throw TypeError(`${j(e)} is not an object of rules keyed by origin`);
|
|
400
400
|
Object.entries(e).forEach(([e, t]) => {
|
|
401
401
|
if (e === "validator") throw TypeError("'validator' has no rule: a validator replaces its own errors and they always count");
|
|
402
|
-
if (typeof t != "object" || !t) throw TypeError(`The rule for ${
|
|
403
|
-
if (typeof t.validEffect != "boolean") throw TypeError(`validEffect for ${
|
|
404
|
-
if (!
|
|
405
|
-
if (t.validEffect && t.removeOn === "submit") throw TypeError(`The rule for ${
|
|
402
|
+
if (typeof t != "object" || !t) throw TypeError(`The rule for ${j(e)} is not an object of validEffect and removeOn`);
|
|
403
|
+
if (typeof t.validEffect != "boolean") throw TypeError(`validEffect for ${j(e)} is ${j(t.validEffect)}, not a boolean`);
|
|
404
|
+
if (!dt.includes(t.removeOn)) throw TypeError(`removeOn for ${j(e)} is ${j(t.removeOn)}, not one of ` + dt.map(j).join(", "));
|
|
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
|
}
|
|
408
|
-
function
|
|
408
|
+
function yt(e) {
|
|
409
409
|
let t = Object.create(null);
|
|
410
410
|
return Object.entries(e).forEach(([e, n]) => {
|
|
411
411
|
t[e] = Object.freeze({
|
|
@@ -414,68 +414,68 @@ function vt(e) {
|
|
|
414
414
|
});
|
|
415
415
|
}), Object.freeze(t);
|
|
416
416
|
}
|
|
417
|
-
function
|
|
418
|
-
|
|
417
|
+
function bt(e) {
|
|
418
|
+
vt(e);
|
|
419
419
|
let t = A;
|
|
420
420
|
return A = Object.freeze({
|
|
421
421
|
...A,
|
|
422
|
-
...
|
|
423
|
-
}),
|
|
424
|
-
A = t,
|
|
422
|
+
...yt(e)
|
|
423
|
+
}), mt.value++, () => {
|
|
424
|
+
A = t, mt.value++;
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
|
-
function
|
|
427
|
+
function xt(e) {
|
|
428
428
|
return A[e] ?? pt;
|
|
429
429
|
}
|
|
430
|
-
var
|
|
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
436
|
return ft;
|
|
437
437
|
}
|
|
438
438
|
boundToBinding(e) {
|
|
439
|
-
|
|
439
|
+
ht++, this.rulesChanged(e);
|
|
440
440
|
}
|
|
441
441
|
unregisterFrom(e) {
|
|
442
|
-
|
|
442
|
+
ht--, this.rulesChanged(e);
|
|
443
443
|
}
|
|
444
444
|
rulesChanged(e) {
|
|
445
|
-
|
|
445
|
+
mt.value++, T(() => e[k]());
|
|
446
446
|
}
|
|
447
447
|
};
|
|
448
|
-
function
|
|
448
|
+
function St(e, t) {
|
|
449
449
|
return e.policies[t];
|
|
450
450
|
}
|
|
451
|
-
function
|
|
452
|
-
if (!(e instanceof
|
|
451
|
+
function Ct(e, t) {
|
|
452
|
+
if (!(e instanceof M)) return;
|
|
453
453
|
let n = Object.keys(e.policies);
|
|
454
454
|
t.forEach((t) => {
|
|
455
|
-
if (t === e || !(t instanceof
|
|
456
|
-
let r = n.find((e) =>
|
|
457
|
-
if (r !== void 0) throw TypeError(`An ErrorPolicy for ${
|
|
455
|
+
if (t === e || !(t instanceof M)) return;
|
|
456
|
+
let r = n.find((e) => St(t, e) !== void 0);
|
|
457
|
+
if (r !== void 0) throw TypeError(`An ErrorPolicy for ${j(r)} is already registered on this element`);
|
|
458
458
|
});
|
|
459
459
|
}
|
|
460
460
|
//#endregion
|
|
461
461
|
//#region src/actions/value-changed-action.ts
|
|
462
|
-
var
|
|
462
|
+
var wt = Symbol("ValueChangedAction"), N = class extends E {
|
|
463
463
|
constructor(e) {
|
|
464
464
|
super(e);
|
|
465
465
|
}
|
|
466
466
|
static get classIdentifier() {
|
|
467
|
-
return
|
|
467
|
+
return wt;
|
|
468
468
|
}
|
|
469
469
|
execute(e, t, n, r) {
|
|
470
470
|
return super.execute(e, t, n, r);
|
|
471
471
|
}
|
|
472
|
-
},
|
|
473
|
-
function
|
|
474
|
-
return `${
|
|
472
|
+
}, Tt = "vue-forms";
|
|
473
|
+
function P(e) {
|
|
474
|
+
return `${Tt}.${e}`;
|
|
475
475
|
}
|
|
476
476
|
//#endregion
|
|
477
477
|
//#region src/validators/validation-error.ts
|
|
478
|
-
var
|
|
478
|
+
var Et = class {
|
|
479
479
|
code;
|
|
480
480
|
params;
|
|
481
481
|
detail;
|
|
@@ -489,19 +489,19 @@ var Tt = class {
|
|
|
489
489
|
sameAs(e) {
|
|
490
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);
|
|
491
491
|
}
|
|
492
|
-
},
|
|
493
|
-
function
|
|
492
|
+
}, Dt = Symbol("Validator");
|
|
493
|
+
function Ot(e, t) {
|
|
494
494
|
return e.replace(/\{(\w+)\}/g, (e, n) => Object.hasOwn(t, n) ? String(t[n]) : e);
|
|
495
495
|
}
|
|
496
|
-
var
|
|
496
|
+
var F = class extends N {
|
|
497
497
|
source;
|
|
498
498
|
constructor(e) {
|
|
499
499
|
super((t, n, r, i) => {
|
|
500
|
-
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 = () => {
|
|
501
501
|
u() || (l = !0, a.abandon === f && (a.abandon = void 0), d.abort());
|
|
502
502
|
};
|
|
503
503
|
o?.();
|
|
504
|
-
let p = t[
|
|
504
|
+
let p = t[Ve]() ? [] : e(r, i, t, d.signal) || [], m = (e) => w(() => {
|
|
505
505
|
let n = e?.map((e) => this.claim(e)) ?? [];
|
|
506
506
|
for (let e = t.errors.length - 1; e >= 0; e--) {
|
|
507
507
|
let r = t.errors[e];
|
|
@@ -514,11 +514,11 @@ var I = class extends P {
|
|
|
514
514
|
});
|
|
515
515
|
if (p instanceof Promise) {
|
|
516
516
|
a.abandon = f, c?.whenRolledBack(f);
|
|
517
|
-
let e = t[
|
|
517
|
+
let e = t[lt]();
|
|
518
518
|
p.then((e) => {
|
|
519
519
|
u() && m(e);
|
|
520
520
|
}, (e) => {
|
|
521
|
-
u() && (m([new
|
|
521
|
+
u() && (m([new Et(P("validation_failed"), {}, "Validation could not be completed")]), console.error("Validation failed", e));
|
|
522
522
|
}).finally(() => {
|
|
523
523
|
a.abandon === f && (a.abandon = void 0), e();
|
|
524
524
|
}).catch((e) => console.error("Validation failed", e));
|
|
@@ -542,13 +542,13 @@ var I = class extends P {
|
|
|
542
542
|
});
|
|
543
543
|
}
|
|
544
544
|
static get classIdentifier() {
|
|
545
|
-
return
|
|
545
|
+
return Dt;
|
|
546
546
|
}
|
|
547
547
|
get eager() {
|
|
548
548
|
return !0;
|
|
549
549
|
}
|
|
550
550
|
unregisterFrom(e) {
|
|
551
|
-
|
|
551
|
+
T((t) => {
|
|
552
552
|
let n = this.bindingState(e), r = n.run;
|
|
553
553
|
t.whenCommitted(() => {
|
|
554
554
|
n.run === r && this.abandonRun(e);
|
|
@@ -568,9 +568,9 @@ var I = class extends P {
|
|
|
568
568
|
return { run: 0 };
|
|
569
569
|
}
|
|
570
570
|
errorFor(e, t, n, r) {
|
|
571
|
-
return new
|
|
571
|
+
return new Et(e?.code ?? t, r, Ot(e?.detail ?? n, r));
|
|
572
572
|
}
|
|
573
|
-
},
|
|
573
|
+
}, kt = class e {
|
|
574
574
|
actions = [];
|
|
575
575
|
get registrations() {
|
|
576
576
|
return this.actions;
|
|
@@ -579,15 +579,15 @@ var I = class extends P {
|
|
|
579
579
|
this.actions = e;
|
|
580
580
|
}
|
|
581
581
|
register(t, n) {
|
|
582
|
-
if (!(t instanceof
|
|
583
|
-
t.classIdentifier,
|
|
582
|
+
if (!(t instanceof E)) throw Error("Invalid action type");
|
|
583
|
+
t.classIdentifier, Ct(t, this.actions);
|
|
584
584
|
let r = n ? this.actions.indexOf(n) : -1;
|
|
585
585
|
if (n && (n.classIdentifier !== t.classIdentifier || r < 0)) throw Error("Action to register before is not registered under the same identifier");
|
|
586
586
|
if (r >= 0) {
|
|
587
587
|
this.actions = e.inserted(this.actions, r, t);
|
|
588
588
|
return;
|
|
589
589
|
}
|
|
590
|
-
let i = t[
|
|
590
|
+
let i = t[Qe] ? -1 : this.actions.findIndex((e) => e[Qe] && e.classIdentifier === t.classIdentifier);
|
|
591
591
|
this.actions = e.inserted(this.actions, i < 0 ? this.actions.length : i, t);
|
|
592
592
|
}
|
|
593
593
|
static inserted(e, t, n) {
|
|
@@ -610,11 +610,11 @@ var I = class extends P {
|
|
|
610
610
|
return this.run(e.classIdentifier, !1, t, n);
|
|
611
611
|
}
|
|
612
612
|
triggerEager(e, ...t) {
|
|
613
|
-
let n = this.runEager((e) => !(e instanceof
|
|
614
|
-
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);
|
|
615
615
|
}
|
|
616
616
|
triggerEagerRules(e, ...t) {
|
|
617
|
-
this.runEager((e) => !(e instanceof
|
|
617
|
+
this.runEager((e) => !(e instanceof F), e, t);
|
|
618
618
|
}
|
|
619
619
|
runEager(t, n, r) {
|
|
620
620
|
let i = !1, a = this.actions;
|
|
@@ -625,10 +625,10 @@ var I = class extends P {
|
|
|
625
625
|
try {
|
|
626
626
|
let t = this.walk(a, o, s.classIdentifier, !0, n, r);
|
|
627
627
|
e.isPromise(t) && t.then(void 0, (e) => {
|
|
628
|
-
if (!(e instanceof
|
|
628
|
+
if (!(e instanceof D)) throw e;
|
|
629
629
|
});
|
|
630
630
|
} catch (e) {
|
|
631
|
-
if (!(e instanceof
|
|
631
|
+
if (!(e instanceof D)) throw e;
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
634
|
}
|
|
@@ -641,7 +641,7 @@ var I = class extends P {
|
|
|
641
641
|
return this.actions.filter((t) => t.classIdentifier === e);
|
|
642
642
|
}
|
|
643
643
|
get validators() {
|
|
644
|
-
return this.actions.filter((e) => e instanceof
|
|
644
|
+
return this.actions.filter((e) => e instanceof F);
|
|
645
645
|
}
|
|
646
646
|
bindTo(e) {
|
|
647
647
|
this.actions.forEach((t) => t.boundToBinding(e));
|
|
@@ -659,7 +659,7 @@ var I = class extends P {
|
|
|
659
659
|
}
|
|
660
660
|
static answerAbort(t) {
|
|
661
661
|
return e.isPromise(t) ? t.then(void 0, (e) => {
|
|
662
|
-
if (e instanceof
|
|
662
|
+
if (e instanceof D) return e;
|
|
663
663
|
throw e;
|
|
664
664
|
}) : t;
|
|
665
665
|
}
|
|
@@ -668,7 +668,7 @@ var I = class extends P {
|
|
|
668
668
|
try {
|
|
669
669
|
return e.answerAbort(this.walk(a, a.length - 1, t, n, r, i));
|
|
670
670
|
} catch (e) {
|
|
671
|
-
if (e instanceof
|
|
671
|
+
if (e instanceof D) return e;
|
|
672
672
|
throw e;
|
|
673
673
|
}
|
|
674
674
|
}
|
|
@@ -680,40 +680,40 @@ var I = class extends P {
|
|
|
680
680
|
};
|
|
681
681
|
//#endregion
|
|
682
682
|
//#region src/resolve.ts
|
|
683
|
-
function
|
|
683
|
+
function I(e) {
|
|
684
684
|
let t = e;
|
|
685
685
|
for (; t.fieldName !== void 0 && t.parent;) t = t.parent;
|
|
686
686
|
return t;
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function At(e, t) {
|
|
689
689
|
let n = e;
|
|
690
|
-
for (let e of
|
|
690
|
+
for (let e of jt(t)) if (n = n.field?.(e) ?? void 0, !n) return;
|
|
691
691
|
return n?.declaration === t ? n : void 0;
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function jt(e) {
|
|
694
694
|
let t = [], n = e;
|
|
695
695
|
for (; n.fieldName !== void 0 && n.parent;) t.unshift(n.fieldName), n = n.parent;
|
|
696
696
|
return t;
|
|
697
697
|
}
|
|
698
|
-
function
|
|
699
|
-
let n =
|
|
698
|
+
function Mt(e, t) {
|
|
699
|
+
let n = At(t, e);
|
|
700
700
|
if (n) return n;
|
|
701
701
|
let r = t.parent;
|
|
702
702
|
for (; r;) {
|
|
703
|
-
let t =
|
|
703
|
+
let t = At(I(r), e);
|
|
704
704
|
if (t) return t;
|
|
705
705
|
r = r.parent;
|
|
706
706
|
}
|
|
707
|
-
return
|
|
707
|
+
return I(e) === I(t.declaration) ? void 0 : e;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
let n =
|
|
709
|
+
function Nt(e, t) {
|
|
710
|
+
let n = Mt(e, t);
|
|
711
711
|
if (!n) return [];
|
|
712
712
|
if (n !== e) return [n];
|
|
713
713
|
let r = t.bindingsOf(e);
|
|
714
714
|
return r.length > 0 ? r : [e];
|
|
715
715
|
}
|
|
716
|
-
function
|
|
716
|
+
function Pt(e, t) {
|
|
717
717
|
let n = t.parent;
|
|
718
718
|
for (; n;) {
|
|
719
719
|
let t = n.field?.(e);
|
|
@@ -723,7 +723,7 @@ function Nt(e, t) {
|
|
|
723
723
|
}
|
|
724
724
|
//#endregion
|
|
725
725
|
//#region src/weak-elements.ts
|
|
726
|
-
var
|
|
726
|
+
var Ft = class {
|
|
727
727
|
refs = /* @__PURE__ */ new Set();
|
|
728
728
|
byElement = /* @__PURE__ */ new WeakMap();
|
|
729
729
|
add(e) {
|
|
@@ -745,13 +745,13 @@ var Pt = class {
|
|
|
745
745
|
n ? e.push(n) : this.refs.delete(t);
|
|
746
746
|
}), e;
|
|
747
747
|
}
|
|
748
|
-
},
|
|
748
|
+
}, It = Symbol("ConditionalStatementAction"), L = class extends N {
|
|
749
749
|
statement;
|
|
750
750
|
conditionalExecutor;
|
|
751
|
-
declarations = new
|
|
751
|
+
declarations = new Ft();
|
|
752
752
|
registrations = /* @__PURE__ */ new WeakSet();
|
|
753
753
|
constructor(e, t) {
|
|
754
|
-
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] = () => {
|
|
755
755
|
this.bound && this.declarations.alive.length === 0 && this.stopListening();
|
|
756
756
|
}, this.listen();
|
|
757
757
|
}
|
|
@@ -762,12 +762,12 @@ var Pt = class {
|
|
|
762
762
|
this.listening || (this.listening = !0, this.statement.collectFields().forEach((e) => e.registerAction(this.relay)));
|
|
763
763
|
}
|
|
764
764
|
stopListening() {
|
|
765
|
-
this.listening && (
|
|
765
|
+
this.listening && (C()?.whenRolledBack(() => {
|
|
766
766
|
this.listening = !0;
|
|
767
767
|
}), this.listening = !1, this.statement.collectFields().forEach((e) => e.unregisterAction(this.relay)));
|
|
768
768
|
}
|
|
769
769
|
static get classIdentifier() {
|
|
770
|
-
return
|
|
770
|
+
return It;
|
|
771
771
|
}
|
|
772
772
|
get eager() {
|
|
773
773
|
return !0;
|
|
@@ -783,7 +783,7 @@ var Pt = class {
|
|
|
783
783
|
}
|
|
784
784
|
targetsIn(e) {
|
|
785
785
|
let t = [];
|
|
786
|
-
return this.declarations.alive.forEach((n) =>
|
|
786
|
+
return this.declarations.alive.forEach((n) => Nt(n, e).forEach((e) => {
|
|
787
787
|
this.registrations.has(e) && t.push(e);
|
|
788
788
|
})), t;
|
|
789
789
|
}
|
|
@@ -800,29 +800,29 @@ var Pt = class {
|
|
|
800
800
|
}
|
|
801
801
|
applyFrom(e) {
|
|
802
802
|
let t = /* @__PURE__ */ new Set();
|
|
803
|
-
this.targetsIn(
|
|
803
|
+
this.targetsIn(I(e)).forEach((e) => t.add(I(e))), t.forEach((e) => this.applyIn(e));
|
|
804
804
|
}
|
|
805
|
-
},
|
|
805
|
+
}, Lt = class extends L {
|
|
806
806
|
constructor(e, t = "full", n = "suppress") {
|
|
807
807
|
super(e, (e, r) => {
|
|
808
808
|
e.visibility = r ? t : n;
|
|
809
809
|
});
|
|
810
810
|
}
|
|
811
|
-
},
|
|
811
|
+
}, Rt = class extends L {
|
|
812
812
|
constructor(e, t = "editable", n = "disabled") {
|
|
813
813
|
super(e, (e, r) => {
|
|
814
814
|
e.access = r ? t : n;
|
|
815
815
|
});
|
|
816
816
|
}
|
|
817
|
-
},
|
|
817
|
+
}, zt = class extends L {
|
|
818
818
|
constructor(e, t) {
|
|
819
819
|
super(e, (e, n) => {
|
|
820
820
|
n && (e.value = t);
|
|
821
821
|
});
|
|
822
822
|
}
|
|
823
|
-
},
|
|
823
|
+
}, R = /* @__PURE__ */ function(e) {
|
|
824
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;
|
|
825
|
-
}(
|
|
825
|
+
}(R || {});
|
|
826
826
|
(function(e) {
|
|
827
827
|
function t(e) {
|
|
828
828
|
let t = e.toLowerCase();
|
|
@@ -858,15 +858,15 @@ var Pt = class {
|
|
|
858
858
|
}
|
|
859
859
|
e.fromString = t;
|
|
860
860
|
function n(e) {
|
|
861
|
-
let t = typeof e == "number" ? e :
|
|
862
|
-
if (Object.values(
|
|
861
|
+
let t = typeof e == "number" ? e : R.fromString(e);
|
|
862
|
+
if (Object.values(R).includes(t)) return t;
|
|
863
863
|
throw Error(`Unrecognised operator ${e}`);
|
|
864
864
|
}
|
|
865
865
|
e.fromAny = n;
|
|
866
866
|
function r(e) {
|
|
867
|
-
if (typeof e == "number") return Object.values(
|
|
867
|
+
if (typeof e == "number") return Object.values(R).includes(e);
|
|
868
868
|
try {
|
|
869
|
-
return Object.values(
|
|
869
|
+
return Object.values(R).includes(R.fromString(e));
|
|
870
870
|
} catch {
|
|
871
871
|
return !1;
|
|
872
872
|
}
|
|
@@ -876,97 +876,97 @@ var Pt = class {
|
|
|
876
876
|
return e >= 0;
|
|
877
877
|
}
|
|
878
878
|
e.isLogicOperator = i;
|
|
879
|
-
})(
|
|
880
|
-
var
|
|
879
|
+
})(R ||= {}), Object.freeze(R);
|
|
880
|
+
var z = R, Bt = Symbol("AccessChangingAction"), Vt = class extends E {
|
|
881
881
|
constructor(e) {
|
|
882
882
|
super(e);
|
|
883
883
|
}
|
|
884
884
|
static get classIdentifier() {
|
|
885
|
-
return
|
|
885
|
+
return Bt;
|
|
886
886
|
}
|
|
887
887
|
execute(e, t, n, r) {
|
|
888
888
|
return super.execute(e, t, n, r);
|
|
889
889
|
}
|
|
890
|
-
},
|
|
890
|
+
}, Ht = Symbol("AccessChangedAction"), Ut = class extends E {
|
|
891
891
|
constructor(e) {
|
|
892
892
|
super(e);
|
|
893
893
|
}
|
|
894
894
|
static get classIdentifier() {
|
|
895
|
-
return
|
|
895
|
+
return Ht;
|
|
896
896
|
}
|
|
897
897
|
execute(e, t, n, r) {
|
|
898
898
|
return super.execute(e, t, n, r);
|
|
899
899
|
}
|
|
900
|
-
},
|
|
900
|
+
}, Wt = Symbol("ContributionChangedAction"), Gt = class extends E {
|
|
901
901
|
constructor(e) {
|
|
902
902
|
super(e);
|
|
903
903
|
}
|
|
904
904
|
static get classIdentifier() {
|
|
905
|
-
return
|
|
905
|
+
return Wt;
|
|
906
906
|
}
|
|
907
907
|
execute(e, t, n, r) {
|
|
908
908
|
return super.execute(e, t, n, r);
|
|
909
909
|
}
|
|
910
|
-
},
|
|
910
|
+
}, Kt = Symbol("EnabledChangingAction"), qt = class extends E {
|
|
911
911
|
constructor(e) {
|
|
912
912
|
super(e);
|
|
913
913
|
}
|
|
914
914
|
static get classIdentifier() {
|
|
915
|
-
return
|
|
915
|
+
return Kt;
|
|
916
916
|
}
|
|
917
917
|
execute(e, t, n, r) {
|
|
918
918
|
return super.execute(e, t, n, r);
|
|
919
919
|
}
|
|
920
|
-
},
|
|
920
|
+
}, Jt = Symbol("EnabledChangedAction"), Yt = class extends E {
|
|
921
921
|
constructor(e) {
|
|
922
922
|
super(e);
|
|
923
923
|
}
|
|
924
924
|
static get classIdentifier() {
|
|
925
|
-
return
|
|
925
|
+
return Jt;
|
|
926
926
|
}
|
|
927
927
|
execute(e, t, n, r) {
|
|
928
928
|
return super.execute(e, t, n, r);
|
|
929
929
|
}
|
|
930
|
-
},
|
|
930
|
+
}, Xt = Symbol("ValidChangedAction"), Zt = class extends E {
|
|
931
931
|
constructor(e) {
|
|
932
932
|
super(e);
|
|
933
933
|
}
|
|
934
934
|
static get classIdentifier() {
|
|
935
|
-
return
|
|
935
|
+
return Xt;
|
|
936
936
|
}
|
|
937
937
|
execute(e, t, n, r) {
|
|
938
938
|
return super.execute(e, t, n, r);
|
|
939
939
|
}
|
|
940
|
-
},
|
|
940
|
+
}, Qt = Symbol("VisibilityChangingAction"), $t = class extends E {
|
|
941
941
|
constructor(e) {
|
|
942
942
|
super(e);
|
|
943
943
|
}
|
|
944
944
|
static get classIdentifier() {
|
|
945
|
-
return
|
|
945
|
+
return Qt;
|
|
946
946
|
}
|
|
947
947
|
execute(e, t, n, r) {
|
|
948
948
|
return super.execute(e, t, n, r);
|
|
949
949
|
}
|
|
950
|
-
},
|
|
950
|
+
}, en = Symbol("VisibilityChangedAction"), tn = class extends E {
|
|
951
951
|
constructor(e) {
|
|
952
952
|
super(e);
|
|
953
953
|
}
|
|
954
954
|
static get classIdentifier() {
|
|
955
|
-
return
|
|
955
|
+
return en;
|
|
956
956
|
}
|
|
957
957
|
execute(e, t, n, r) {
|
|
958
958
|
return super.execute(e, t, n, r);
|
|
959
959
|
}
|
|
960
|
-
},
|
|
961
|
-
function
|
|
960
|
+
}, nn = /* @__PURE__ */ new WeakMap(), rn = 6e4, an = /* @__PURE__ */ new WeakMap();
|
|
961
|
+
function on(e) {
|
|
962
962
|
let t = [];
|
|
963
963
|
return e.refs.forEach((n) => {
|
|
964
964
|
let r = n.deref();
|
|
965
965
|
r ? t.push(r) : e.refs.delete(n);
|
|
966
966
|
}), e.sweptAt = Date.now(), t;
|
|
967
967
|
}
|
|
968
|
-
var
|
|
969
|
-
function
|
|
968
|
+
var sn = /* @__PURE__ */ new Set(["validators", "actions"]);
|
|
969
|
+
function cn(e, t) {
|
|
970
970
|
for (let n = Object.getPrototypeOf(e); n && n !== Object.prototype;) {
|
|
971
971
|
let e = Object.getOwnPropertyDescriptor(n, t);
|
|
972
972
|
if (e) return e.get !== void 0 || e.set !== void 0;
|
|
@@ -974,11 +974,11 @@ function sn(e, t) {
|
|
|
974
974
|
}
|
|
975
975
|
return !1;
|
|
976
976
|
}
|
|
977
|
-
var
|
|
978
|
-
function
|
|
979
|
-
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(_)}`);
|
|
980
980
|
}
|
|
981
|
-
var
|
|
981
|
+
var pn = 0, V = null, H = class {
|
|
982
982
|
get __v_skip() {
|
|
983
983
|
return !0;
|
|
984
984
|
}
|
|
@@ -991,7 +991,7 @@ var fn = 0, H = null, U = class {
|
|
|
991
991
|
#e;
|
|
992
992
|
#t;
|
|
993
993
|
constructor(e) {
|
|
994
|
-
this.#t = e, this.#e = u(e),
|
|
994
|
+
this.#t = e, this.#e = u(e), Re(this);
|
|
995
995
|
}
|
|
996
996
|
get state() {
|
|
997
997
|
return this.#e;
|
|
@@ -1000,11 +1000,11 @@ var fn = 0, H = null, U = class {
|
|
|
1000
1000
|
return this.#t;
|
|
1001
1001
|
}
|
|
1002
1002
|
rebind(e) {
|
|
1003
|
-
return
|
|
1003
|
+
return T((t) => {
|
|
1004
1004
|
t.touch(this);
|
|
1005
1005
|
let n = t.willAnnounceValue(this), { announcedValue: r, announcedContribution: i, validatedValue: a } = this.#t;
|
|
1006
1006
|
this.asReset(() => {
|
|
1007
|
-
this.resetTo(this.declaration, e),
|
|
1007
|
+
this.resetTo(this.declaration, e), V?.push(this);
|
|
1008
1008
|
}), n ? Object.assign(this.#t, {
|
|
1009
1009
|
announcedValue: r,
|
|
1010
1010
|
announcedContribution: i,
|
|
@@ -1016,7 +1016,7 @@ var fn = 0, H = null, U = class {
|
|
|
1016
1016
|
return this.#e.originalValue;
|
|
1017
1017
|
}
|
|
1018
1018
|
set originalValue(e) {
|
|
1019
|
-
this.touchState(), this.#e.originalValue =
|
|
1019
|
+
this.touchState(), this.#e.originalValue = Fe(this, e);
|
|
1020
1020
|
}
|
|
1021
1021
|
get extra() {
|
|
1022
1022
|
return this.#e.extra;
|
|
@@ -1030,33 +1030,33 @@ var fn = 0, H = null, U = class {
|
|
|
1030
1030
|
extendedOf(e) {
|
|
1031
1031
|
let t = Object.create(null);
|
|
1032
1032
|
return Object.entries(e).forEach(([e, n]) => {
|
|
1033
|
-
|
|
1033
|
+
sn.has(e) || cn(this, e) || (t[e] = n);
|
|
1034
1034
|
}), t;
|
|
1035
1035
|
}
|
|
1036
1036
|
assignParams(e) {
|
|
1037
|
-
|
|
1037
|
+
fn(e);
|
|
1038
1038
|
let t = this.extendedOf(e);
|
|
1039
1039
|
Object.entries(e).forEach(([e, n]) => {
|
|
1040
|
-
Object.hasOwn(t, e) ||
|
|
1040
|
+
Object.hasOwn(t, e) || sn.has(e) || (this[e] = n);
|
|
1041
1041
|
}), ne(t) || this.setExtendedValues(t);
|
|
1042
1042
|
}
|
|
1043
1043
|
touchState() {
|
|
1044
|
-
|
|
1044
|
+
C()?.touch(this);
|
|
1045
1045
|
}
|
|
1046
|
-
[
|
|
1046
|
+
[b]() {
|
|
1047
1047
|
return {
|
|
1048
1048
|
...this.#t,
|
|
1049
1049
|
errors: [...this.#t.errors]
|
|
1050
1050
|
};
|
|
1051
1051
|
}
|
|
1052
|
-
[
|
|
1052
|
+
[He](e) {
|
|
1053
1053
|
let t = this.#t.validatingCount, n = this.#t.validatingChildren;
|
|
1054
1054
|
Object.assign(this.#e, e), this.#e.validatingCount = t, this.#e.validatingChildren = n;
|
|
1055
1055
|
}
|
|
1056
1056
|
get validating() {
|
|
1057
1057
|
return this.#e.validatingCount > 0 || this.#e.validatingChildren > 0;
|
|
1058
1058
|
}
|
|
1059
|
-
[
|
|
1059
|
+
[lt]() {
|
|
1060
1060
|
let e = !this.validating;
|
|
1061
1061
|
this.#e.validatingCount++, e && this.container?.childValidatingChanged(!0);
|
|
1062
1062
|
let t = !1;
|
|
@@ -1079,26 +1079,26 @@ var fn = 0, H = null, U = class {
|
|
|
1079
1079
|
}) : Promise.resolve();
|
|
1080
1080
|
}
|
|
1081
1081
|
get errors() {
|
|
1082
|
-
return this.touchState(),
|
|
1082
|
+
return this.touchState(), C() || this.noteErrorsBaseline(), this.#e.errors;
|
|
1083
1083
|
}
|
|
1084
1084
|
set errors(e) {
|
|
1085
|
-
this.touchState(), this.#e.errors = e, this.#t.errorsBaseline =
|
|
1085
|
+
this.touchState(), this.#e.errors = e, this.#t.errorsBaseline = O, this.noteErrorsBaseline();
|
|
1086
1086
|
}
|
|
1087
1087
|
noteErrorsBaseline() {
|
|
1088
1088
|
let e = this.#t;
|
|
1089
|
-
e.errorsBaseline !==
|
|
1089
|
+
e.errorsBaseline !== O || !e.errors.some(B) || (e.errorsBaseline = p(this.value));
|
|
1090
1090
|
}
|
|
1091
1091
|
ruleOf(e) {
|
|
1092
1092
|
for (let t of this.selfAndAbove()) {
|
|
1093
1093
|
let n = t.boundActions;
|
|
1094
|
-
if (!n?.willTrigger(
|
|
1095
|
-
let r = n.ofClass(
|
|
1094
|
+
if (!n?.willTrigger(M.classIdentifier)) continue;
|
|
1095
|
+
let r = n.ofClass(M.classIdentifier);
|
|
1096
1096
|
for (let t = r.length - 1; t >= 0; t--) {
|
|
1097
|
-
let n =
|
|
1097
|
+
let n = St(r[t], e);
|
|
1098
1098
|
if (n) return n;
|
|
1099
1099
|
}
|
|
1100
1100
|
}
|
|
1101
|
-
return
|
|
1101
|
+
return xt(e);
|
|
1102
1102
|
}
|
|
1103
1103
|
selfAndAbove() {
|
|
1104
1104
|
let e = [this];
|
|
@@ -1106,38 +1106,38 @@ var fn = 0, H = null, U = class {
|
|
|
1106
1106
|
return e;
|
|
1107
1107
|
}
|
|
1108
1108
|
ownErrorsValid(e) {
|
|
1109
|
-
return e.length === 0 || !e.some((e) => !
|
|
1109
|
+
return e.length === 0 || !e.some((e) => !B(e) || (_t(), this.ruleOf(e.origin).validEffect));
|
|
1110
1110
|
}
|
|
1111
1111
|
removeErrors(e) {
|
|
1112
1112
|
let t = this.#e.errors, n = !1;
|
|
1113
|
-
for (let r = t.length - 1; r >= 0; r--)
|
|
1114
|
-
return this.#t.errors.some(
|
|
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);
|
|
1114
|
+
return this.#t.errors.some(B) || (this.#t.errorsBaseline = O), n;
|
|
1115
1115
|
}
|
|
1116
1116
|
editConcluded() {
|
|
1117
|
-
let e = this.selfAndAbove().filter((e) => e.#t.errors.some((t) =>
|
|
1118
|
-
e.length !== 0 &&
|
|
1117
|
+
let e = this.selfAndAbove().filter((e) => e.#t.errors.some((t) => B(t) && e.ruleOf(t.origin).removeOn === "edit"));
|
|
1118
|
+
e.length !== 0 && T((t) => {
|
|
1119
1119
|
for (let n of e) {
|
|
1120
1120
|
let e = n.#t, r = e.errorsBaseline;
|
|
1121
|
-
if (t.touch(n), r ===
|
|
1121
|
+
if (t.touch(n), r === O) {
|
|
1122
1122
|
e.errorsBaseline = p(n.value);
|
|
1123
1123
|
continue;
|
|
1124
1124
|
}
|
|
1125
|
-
r !==
|
|
1125
|
+
r !== et && h(n.value, r) || (n.removeErrors((e) => e.removeOn === "edit"), t.markValidityDirty(n));
|
|
1126
1126
|
}
|
|
1127
1127
|
});
|
|
1128
1128
|
}
|
|
1129
|
-
[
|
|
1130
|
-
|
|
1129
|
+
[ut]() {
|
|
1130
|
+
T((e) => {
|
|
1131
1131
|
let t = (n) => {
|
|
1132
|
-
n.#t.errors.some(
|
|
1132
|
+
n.#t.errors.some(B) && (e.touch(n), n.removeErrors((e) => e.removeOn === "submit") && e.markValidityDirty(n)), n.members.forEach(t);
|
|
1133
1133
|
};
|
|
1134
1134
|
t(this);
|
|
1135
1135
|
});
|
|
1136
1136
|
}
|
|
1137
|
-
[
|
|
1138
|
-
|
|
1137
|
+
[k]() {
|
|
1138
|
+
T((e) => {
|
|
1139
1139
|
let t = (n) => {
|
|
1140
|
-
n.#t.errors.some(
|
|
1140
|
+
n.#t.errors.some(B) && e.markValidityDirty(n), n.members.forEach(t);
|
|
1141
1141
|
};
|
|
1142
1142
|
t(this);
|
|
1143
1143
|
});
|
|
@@ -1164,18 +1164,18 @@ var fn = 0, H = null, U = class {
|
|
|
1164
1164
|
return r(this), n;
|
|
1165
1165
|
}
|
|
1166
1166
|
markRecordIncomplete() {
|
|
1167
|
-
this._recordPending || (this._recordPending = !0,
|
|
1167
|
+
this._recordPending || (this._recordPending = !0, pn++);
|
|
1168
1168
|
}
|
|
1169
1169
|
completeRecords(e = this) {
|
|
1170
|
-
|
|
1170
|
+
pn !== 0 && T(() => {
|
|
1171
1171
|
let t = (e) => {
|
|
1172
|
-
e._recordPending && (e._recordPending = !1,
|
|
1172
|
+
e._recordPending && (e._recordPending = !1, pn--, e.rerunEagerActions()), e.members.forEach(t);
|
|
1173
1173
|
};
|
|
1174
1174
|
t(e);
|
|
1175
1175
|
});
|
|
1176
1176
|
}
|
|
1177
1177
|
rerunEagerActions() {
|
|
1178
|
-
|
|
1178
|
+
T((e) => {
|
|
1179
1179
|
this.boundActions?.triggerEager(this, this.contribution, this.contribution), e.markValidityDirty(this);
|
|
1180
1180
|
});
|
|
1181
1181
|
}
|
|
@@ -1183,20 +1183,20 @@ var fn = 0, H = null, U = class {
|
|
|
1183
1183
|
return this._actions;
|
|
1184
1184
|
}
|
|
1185
1185
|
noteBinding(e) {
|
|
1186
|
-
let t =
|
|
1187
|
-
t ? Date.now() - t.sweptAt >=
|
|
1186
|
+
let t = nn.get(this);
|
|
1187
|
+
t ? Date.now() - t.sweptAt >= rn && on(t) : (t = {
|
|
1188
1188
|
refs: /* @__PURE__ */ new Set(),
|
|
1189
1189
|
sweptAt: Date.now()
|
|
1190
|
-
},
|
|
1190
|
+
}, nn.set(this, t)), t.refs.add(new WeakRef(e));
|
|
1191
1191
|
}
|
|
1192
1192
|
get boundElements() {
|
|
1193
|
-
let e = this.declaration, t =
|
|
1194
|
-
return t ? [e, ...
|
|
1193
|
+
let e = this.declaration, t = nn.get(e);
|
|
1194
|
+
return t ? [e, ...on(t)] : [e];
|
|
1195
1195
|
}
|
|
1196
1196
|
get actions() {
|
|
1197
1197
|
let e = this.declaration;
|
|
1198
1198
|
if (!e._actions) {
|
|
1199
|
-
let t = new
|
|
1199
|
+
let t = new kt();
|
|
1200
1200
|
e.boundElements.forEach((e) => {
|
|
1201
1201
|
e._actions = t;
|
|
1202
1202
|
});
|
|
@@ -1207,20 +1207,20 @@ var fn = 0, H = null, U = class {
|
|
|
1207
1207
|
return this.#e.valueVersion;
|
|
1208
1208
|
}
|
|
1209
1209
|
bumpValueVersion() {
|
|
1210
|
-
|
|
1210
|
+
T((e) => {
|
|
1211
1211
|
e.touch(this), this.#e.valueVersion++;
|
|
1212
1212
|
let t = this.parent;
|
|
1213
1213
|
for (; t;) e.touch(t), t.#e.valueVersion++, t = t.parent;
|
|
1214
1214
|
});
|
|
1215
1215
|
}
|
|
1216
1216
|
propagateValueChanged(e = !1) {
|
|
1217
|
-
|
|
1217
|
+
T((t) => {
|
|
1218
1218
|
t.markValueChanged(this, e), this.errorsAfterChange(t), t.markValidityDirty(this), this.parent?.notifyValueChanged();
|
|
1219
1219
|
});
|
|
1220
1220
|
}
|
|
1221
1221
|
errorsAfterChange(e) {
|
|
1222
1222
|
let t = this.#t;
|
|
1223
|
-
t.errors.some(
|
|
1223
|
+
t.errors.some(B) && (e.touch(this), this.removeErrors((e) => e.removeOn === "change"), t.errorsBaseline === O && t.errors.some(B) && (t.errorsBaseline = et));
|
|
1224
1224
|
}
|
|
1225
1225
|
constructed(e) {}
|
|
1226
1226
|
refreshPreviousValue() {
|
|
@@ -1230,33 +1230,33 @@ var fn = 0, H = null, U = class {
|
|
|
1230
1230
|
return this.ownErrorsValid(this.#t.errors) && this.#t.invalidChildren === 0;
|
|
1231
1231
|
}
|
|
1232
1232
|
takeChild(e, t) {
|
|
1233
|
-
|
|
1233
|
+
T((n) => {
|
|
1234
1234
|
if (e.parent) throw TypeError("This element already belongs to a container - pass a bind() of it");
|
|
1235
1235
|
if (e === this) throw TypeError("A container cannot hold itself or a container above it");
|
|
1236
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");
|
|
1237
1237
|
n.touch(e), e.#e.fieldName = t;
|
|
1238
1238
|
let r = this.effectiveAccess === "editable" ? void 0 : e.effectiveAccessFromHere();
|
|
1239
|
-
e.#e.parent = this, r && e.revalidateWhereChanged(r),
|
|
1239
|
+
e.#e.parent = this, r && e.revalidateWhereChanged(r), gt() && e[k](), this.adoptChild(e), ze(n, e);
|
|
1240
1240
|
});
|
|
1241
1241
|
}
|
|
1242
1242
|
adoptChild(e) {
|
|
1243
|
-
|
|
1243
|
+
T((t) => {
|
|
1244
1244
|
t.touch(this), !e.#t.valid && e.countsInContainer && this.#t.invalidChildren++, e.validating && this.childValidatingChanged(!0), t.whenRolledBack(() => {
|
|
1245
1245
|
e.validating && this.childValidatingChanged(!1);
|
|
1246
1246
|
}), t.markValidityDirty(this);
|
|
1247
1247
|
});
|
|
1248
1248
|
}
|
|
1249
1249
|
releaseChild(e) {
|
|
1250
|
-
|
|
1250
|
+
T((t) => {
|
|
1251
1251
|
t.touch(this), t.touch(e), !e.#t.valid && e.countsInContainer && this.#t.invalidChildren--;
|
|
1252
1252
|
let n = this.effectiveAccess === "editable" ? void 0 : e.effectiveAccessFromHere();
|
|
1253
1253
|
e.validating && this.childValidatingChanged(!1), t.whenRolledBack(() => {
|
|
1254
1254
|
e.validating && this.childValidatingChanged(!0);
|
|
1255
|
-
}), e.#e.parent = void 0, e.#e.fieldName = void 0, n && e.revalidateWhereChanged(n),
|
|
1255
|
+
}), e.#e.parent = void 0, e.#e.fieldName = void 0, n && e.revalidateWhereChanged(n), gt() && e[k](), t.markValidityDirty(this);
|
|
1256
1256
|
});
|
|
1257
1257
|
}
|
|
1258
1258
|
resetTo(e, t) {
|
|
1259
|
-
|
|
1259
|
+
T(() => {
|
|
1260
1260
|
let n = t === void 0 ? e.value : t, r = this.errors.length > 0;
|
|
1261
1261
|
r && (this.errors = []), this.touched = !1;
|
|
1262
1262
|
let i = this.value !== n;
|
|
@@ -1264,19 +1264,19 @@ var fn = 0, H = null, U = class {
|
|
|
1264
1264
|
});
|
|
1265
1265
|
}
|
|
1266
1266
|
resetChild(e, t, n) {
|
|
1267
|
-
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);
|
|
1268
1268
|
}
|
|
1269
1269
|
asReset(e) {
|
|
1270
|
-
if (
|
|
1270
|
+
if (V) {
|
|
1271
1271
|
e();
|
|
1272
1272
|
return;
|
|
1273
1273
|
}
|
|
1274
1274
|
let t = [];
|
|
1275
|
-
|
|
1275
|
+
V = t;
|
|
1276
1276
|
try {
|
|
1277
1277
|
e();
|
|
1278
1278
|
} finally {
|
|
1279
|
-
|
|
1279
|
+
V = null;
|
|
1280
1280
|
}
|
|
1281
1281
|
t.forEach((e) => e.boundActions?.triggerEagerRules(e, e.contribution, e.contribution)), t.forEach((e) => e.recordBaseline());
|
|
1282
1282
|
}
|
|
@@ -1294,11 +1294,11 @@ var fn = 0, H = null, U = class {
|
|
|
1294
1294
|
}
|
|
1295
1295
|
set visibility(e) {
|
|
1296
1296
|
let t = this.#e.visibility;
|
|
1297
|
-
e !== t &&
|
|
1298
|
-
let r = this.boundActions?.trigger(
|
|
1299
|
-
if (r instanceof
|
|
1297
|
+
e !== t && T((n) => {
|
|
1298
|
+
let r = this.boundActions?.trigger($t, this, e, t);
|
|
1299
|
+
if (r instanceof D) return;
|
|
1300
1300
|
let i = r ?? e;
|
|
1301
|
-
if (!pe(i)) throw Error(`${
|
|
1301
|
+
if (!pe(i)) throw Error(`${ln(i)} is not a visibility: ${un(de)}`);
|
|
1302
1302
|
i !== t && (n.touch(this), this.#t.announcedVisibility === void 0 && (this.#t.announcedVisibility = t), this.#e.visibility = i, n.markFlagsDirty(this));
|
|
1303
1303
|
});
|
|
1304
1304
|
}
|
|
@@ -1307,29 +1307,29 @@ var fn = 0, H = null, U = class {
|
|
|
1307
1307
|
}
|
|
1308
1308
|
set access(e) {
|
|
1309
1309
|
let t = this.#e.access;
|
|
1310
|
-
e !== t &&
|
|
1311
|
-
let r = this.boundActions?.trigger(
|
|
1312
|
-
if (r instanceof
|
|
1310
|
+
e !== t && T((n) => {
|
|
1311
|
+
let r = this.boundActions?.trigger(Vt, this, e, t);
|
|
1312
|
+
if (r instanceof D) return;
|
|
1313
1313
|
let i = r ?? e;
|
|
1314
|
-
if (!ue(i)) throw Error(`${
|
|
1314
|
+
if (!ue(i)) throw Error(`${ln(i)} is not an access: ${un(_)}`);
|
|
1315
1315
|
if (i === t) return;
|
|
1316
1316
|
let a = this.enabled, o = i === "editable";
|
|
1317
1317
|
if (o !== a) {
|
|
1318
|
-
let e = this.boundActions?.trigger(
|
|
1319
|
-
if (e instanceof
|
|
1320
|
-
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`);
|
|
1321
1321
|
if (e === a) return;
|
|
1322
1322
|
}
|
|
1323
1323
|
n.touch(this);
|
|
1324
1324
|
let s = this.contribution, c = this.countsInContainer, l = this.effectiveAccessBelow();
|
|
1325
|
-
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);
|
|
1326
1326
|
});
|
|
1327
1327
|
}
|
|
1328
1328
|
get effectiveAccess() {
|
|
1329
1329
|
let e = this.access, t = this.parent?.effectiveAccess;
|
|
1330
1330
|
return t === "disabled" || t === "disabled-null" ? "disabled" : t === "readonly" && e === "editable" ? "readonly" : e;
|
|
1331
1331
|
}
|
|
1332
|
-
[
|
|
1332
|
+
[Ve]() {
|
|
1333
1333
|
if (this.#t.access === "disabled") return !0;
|
|
1334
1334
|
for (let e = this.#t.parent; e; e = e.#t.parent) if (e.#t.access === "disabled" || e.#t.access === "disabled-null") return !0;
|
|
1335
1335
|
return !1;
|
|
@@ -1354,7 +1354,7 @@ var fn = 0, H = null, U = class {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
revalidateWhereChanged(e) {
|
|
1356
1356
|
e.forEach((e, t) => {
|
|
1357
|
-
|
|
1357
|
+
dn(t.effectiveAccess) !== dn(e) && t.rerunEagerActions();
|
|
1358
1358
|
});
|
|
1359
1359
|
}
|
|
1360
1360
|
serializesAs(e) {
|
|
@@ -1394,49 +1394,49 @@ var fn = 0, H = null, U = class {
|
|
|
1394
1394
|
childComposesValue(e) {
|
|
1395
1395
|
return e.composesValue;
|
|
1396
1396
|
}
|
|
1397
|
-
[
|
|
1397
|
+
[Ue](e, t, n, r) {
|
|
1398
1398
|
if (r?.forEach((e) => this.boundActions?.trigger(e.actionClass, this, e.item, e.index)), !t) return;
|
|
1399
1399
|
let i = this.boundActions, a = this.composesValue, o = (e, t) => a ? h(e, t) : e === t;
|
|
1400
1400
|
if (a && i?.hasEager) {
|
|
1401
1401
|
let t = this.contribution, r = this.#t.validatedValue;
|
|
1402
1402
|
(n || !h(t, r)) && (e.touch(this), this.#t.validatedValue = t, i.triggerEager(this, t, r));
|
|
1403
1403
|
}
|
|
1404
|
-
if (!a || i?.willTrigger(
|
|
1404
|
+
if (!a || i?.willTrigger(wt)) {
|
|
1405
1405
|
let t = this.holding, r = this.#t.announcedValue;
|
|
1406
|
-
(n || !o(t, r)) && (e.touch(this), this.#t.announcedValue = t, i?.trigger(
|
|
1406
|
+
(n || !o(t, r)) && (e.touch(this), this.#t.announcedValue = t, i?.trigger(N, this, t, r));
|
|
1407
1407
|
}
|
|
1408
|
-
if (i?.willTrigger(
|
|
1408
|
+
if (i?.willTrigger(Wt)) {
|
|
1409
1409
|
let t = this.contribution, n = this.#t.announcedContribution;
|
|
1410
|
-
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));
|
|
1411
1411
|
}
|
|
1412
1412
|
}
|
|
1413
1413
|
recordAnnounced() {
|
|
1414
1414
|
let e = this.boundActions;
|
|
1415
|
-
(!this.composesValue || 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;
|
|
1416
1416
|
}
|
|
1417
|
-
[
|
|
1417
|
+
[Ge]() {
|
|
1418
1418
|
let e = this.#t, t = e.announcedAccess;
|
|
1419
1419
|
if (t !== void 0) {
|
|
1420
1420
|
e.announcedAccess = void 0;
|
|
1421
1421
|
let n = e.access;
|
|
1422
1422
|
if (n !== t) {
|
|
1423
|
-
this.boundActions?.trigger(
|
|
1423
|
+
this.boundActions?.trigger(Ut, this, n, t);
|
|
1424
1424
|
let e = n === "editable", r = t === "editable";
|
|
1425
|
-
e !== r && this.boundActions?.trigger(
|
|
1425
|
+
e !== r && this.boundActions?.trigger(Yt, this, e, r);
|
|
1426
1426
|
}
|
|
1427
1427
|
}
|
|
1428
1428
|
let n = e.announcedVisibility;
|
|
1429
|
-
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));
|
|
1430
1430
|
}
|
|
1431
|
-
[
|
|
1431
|
+
[We](e) {
|
|
1432
1432
|
let t = this.#t.valid, n = this.countedValid;
|
|
1433
1433
|
if (n === t) return;
|
|
1434
1434
|
e.touch(this), this.#t.valid = n;
|
|
1435
1435
|
let r = this.container;
|
|
1436
|
-
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);
|
|
1437
1437
|
}
|
|
1438
1438
|
validate(e = !1) {
|
|
1439
|
-
|
|
1439
|
+
T((t) => {
|
|
1440
1440
|
e && this.boundActions?.triggerEager(this, this.contribution, this.contribution), t.markValidityDirty(this);
|
|
1441
1441
|
});
|
|
1442
1442
|
}
|
|
@@ -1450,7 +1450,7 @@ var fn = 0, H = null, U = class {
|
|
|
1450
1450
|
return !h(this.value, this.originalValue);
|
|
1451
1451
|
}
|
|
1452
1452
|
boundFrom(e, t, n, r) {
|
|
1453
|
-
r &&
|
|
1453
|
+
r && fn(r), this.#t.declaration = e.declaration;
|
|
1454
1454
|
let i = {
|
|
1455
1455
|
...e.extra,
|
|
1456
1456
|
...r && this.extendedOf(r)
|
|
@@ -1467,18 +1467,18 @@ var fn = 0, H = null, U = class {
|
|
|
1467
1467
|
});
|
|
1468
1468
|
}
|
|
1469
1469
|
registerAction(e) {
|
|
1470
|
-
return
|
|
1470
|
+
return T((t) => {
|
|
1471
1471
|
t.willAnnounceValue(this) || this.refreshPreviousValue(), this.register(t, e);
|
|
1472
1472
|
}), this;
|
|
1473
1473
|
}
|
|
1474
1474
|
registerActionBefore(e, t) {
|
|
1475
|
-
return
|
|
1475
|
+
return T((n) => {
|
|
1476
1476
|
n.willAnnounceValue(this) || this.refreshPreviousValue(), this.register(n, e, t);
|
|
1477
1477
|
}), this;
|
|
1478
1478
|
}
|
|
1479
1479
|
unregisterAction(e) {
|
|
1480
1480
|
let t = !1;
|
|
1481
|
-
return
|
|
1481
|
+
return T((n) => {
|
|
1482
1482
|
let r = this.boundActions;
|
|
1483
1483
|
if (!r) return;
|
|
1484
1484
|
let i = r.registrations;
|
|
@@ -1501,15 +1501,15 @@ var fn = 0, H = null, U = class {
|
|
|
1501
1501
|
});
|
|
1502
1502
|
}
|
|
1503
1503
|
releaseAbandoned(e) {
|
|
1504
|
-
let t = Date.now(), n =
|
|
1505
|
-
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]?.()));
|
|
1506
1506
|
}
|
|
1507
1507
|
triggerAction(e, ...t) {
|
|
1508
1508
|
let n = this.boundActions;
|
|
1509
1509
|
return n ? n.trigger(e, this, ...t) : null;
|
|
1510
1510
|
}
|
|
1511
1511
|
clearValidators() {
|
|
1512
|
-
|
|
1512
|
+
T((e) => {
|
|
1513
1513
|
e.touch(this);
|
|
1514
1514
|
let t = this.boundActions;
|
|
1515
1515
|
if (t) {
|
|
@@ -1524,10 +1524,10 @@ var fn = 0, H = null, U = class {
|
|
|
1524
1524
|
};
|
|
1525
1525
|
//#endregion
|
|
1526
1526
|
//#region src/actions/conditional/statement.ts
|
|
1527
|
-
function
|
|
1527
|
+
function mn(e, t) {
|
|
1528
1528
|
return e ? !t : t;
|
|
1529
1529
|
}
|
|
1530
|
-
var
|
|
1530
|
+
var hn = class e {
|
|
1531
1531
|
operand1;
|
|
1532
1532
|
operator;
|
|
1533
1533
|
operand2;
|
|
@@ -1536,12 +1536,12 @@ var mn = class e {
|
|
|
1536
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').`);
|
|
1537
1537
|
}
|
|
1538
1538
|
constructor(t, n, r) {
|
|
1539
|
-
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;
|
|
1540
1540
|
}
|
|
1541
1541
|
static valueOf(t, n) {
|
|
1542
1542
|
if (t instanceof e) return t.evaluate(n);
|
|
1543
|
-
if (t instanceof
|
|
1544
|
-
let e = n ?
|
|
1543
|
+
if (t instanceof H) {
|
|
1544
|
+
let e = n ? Mt(t, n) : t;
|
|
1545
1545
|
return e ? m(e.value) : void 0;
|
|
1546
1546
|
}
|
|
1547
1547
|
return t;
|
|
@@ -1555,38 +1555,38 @@ var mn = class e {
|
|
|
1555
1555
|
evaluate(t) {
|
|
1556
1556
|
let n = e.valueOf(this.operand1, t), r = e.valueOf(this.operand2, t);
|
|
1557
1557
|
switch (this.operator) {
|
|
1558
|
-
case
|
|
1559
|
-
case
|
|
1560
|
-
case
|
|
1561
|
-
case
|
|
1562
|
-
case
|
|
1563
|
-
case
|
|
1564
|
-
case
|
|
1565
|
-
case
|
|
1566
|
-
case
|
|
1567
|
-
case
|
|
1568
|
-
case
|
|
1569
|
-
case
|
|
1570
|
-
case
|
|
1571
|
-
case
|
|
1572
|
-
case
|
|
1573
|
-
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);
|
|
1574
1574
|
default: throw Error(`Operator not implemented ${this.operator}`);
|
|
1575
1575
|
}
|
|
1576
1576
|
}
|
|
1577
1577
|
collectFields() {
|
|
1578
1578
|
let t = /* @__PURE__ */ new Set();
|
|
1579
1579
|
function n(n) {
|
|
1580
|
-
n instanceof
|
|
1580
|
+
n instanceof H ? t.add(n) : n instanceof e && n.collectFields().forEach((e) => t.add(e));
|
|
1581
1581
|
}
|
|
1582
1582
|
return n(this.operand1), n(this.operand2), t;
|
|
1583
1583
|
}
|
|
1584
|
-
},
|
|
1584
|
+
}, gn = Symbol("ExecuteAction"), U = class extends E {
|
|
1585
1585
|
constructor(e) {
|
|
1586
1586
|
super(e);
|
|
1587
1587
|
}
|
|
1588
1588
|
static get classIdentifier() {
|
|
1589
|
-
return
|
|
1589
|
+
return gn;
|
|
1590
1590
|
}
|
|
1591
1591
|
execute(e, t, n) {
|
|
1592
1592
|
return super.execute(e, t, n);
|
|
@@ -1594,40 +1594,40 @@ var mn = class e {
|
|
|
1594
1594
|
canExecute(e) {
|
|
1595
1595
|
return !0;
|
|
1596
1596
|
}
|
|
1597
|
-
},
|
|
1597
|
+
}, _n = class extends U {
|
|
1598
1598
|
targetFor(e) {
|
|
1599
1599
|
let t = this.target;
|
|
1600
1600
|
return typeof t == "function" ? t(e) ?? void 0 : t;
|
|
1601
1601
|
}
|
|
1602
1602
|
};
|
|
1603
|
-
function
|
|
1603
|
+
function vn(e) {
|
|
1604
1604
|
return e.validating ? new Promise((t) => {
|
|
1605
1605
|
let n = ee(() => e.validating, (e) => {
|
|
1606
1606
|
e || (n(), t());
|
|
1607
1607
|
}, { flush: "sync" });
|
|
1608
1608
|
}) : Promise.resolve();
|
|
1609
1609
|
}
|
|
1610
|
-
var
|
|
1610
|
+
var yn = class extends D {}, bn = class extends yn {
|
|
1611
1611
|
constructor(e) {
|
|
1612
1612
|
super("the submit handler failed", { cause: e });
|
|
1613
1613
|
}
|
|
1614
|
-
},
|
|
1614
|
+
}, xn = class extends yn {
|
|
1615
1615
|
reason;
|
|
1616
1616
|
constructor(e) {
|
|
1617
1617
|
super(e === "invalid" ? "the submitted element is invalid" : "a submit of this action is already running"), this.reason = e;
|
|
1618
1618
|
}
|
|
1619
|
-
},
|
|
1619
|
+
}, Sn = class extends _n {
|
|
1620
1620
|
target;
|
|
1621
1621
|
constructor(e, t, n = {}) {
|
|
1622
1622
|
super(async (e, r, i) => {
|
|
1623
1623
|
let a = this.state(e, () => ({ running: !1 }));
|
|
1624
|
-
if (a.running) throw new
|
|
1624
|
+
if (a.running) throw new xn("running");
|
|
1625
1625
|
a.running = !0;
|
|
1626
1626
|
try {
|
|
1627
1627
|
let a = this.targetFor(e);
|
|
1628
1628
|
if (!a) throw Error("SubmitAction: the target callback returned no element");
|
|
1629
|
-
if (await
|
|
1630
|
-
a[
|
|
1629
|
+
if (await vn(a), !a.valid) throw new xn("invalid");
|
|
1630
|
+
a[ut]();
|
|
1631
1631
|
let o = a.value, s, c = n.lock !== !1 && a.access === "editable";
|
|
1632
1632
|
c && (a.access = "readonly");
|
|
1633
1633
|
let l = c && a.access === "readonly";
|
|
@@ -1635,7 +1635,7 @@ var vn = class extends E {}, yn = class extends vn {
|
|
|
1635
1635
|
try {
|
|
1636
1636
|
s = await t(o, a);
|
|
1637
1637
|
} catch (e) {
|
|
1638
|
-
throw new
|
|
1638
|
+
throw new bn(e);
|
|
1639
1639
|
}
|
|
1640
1640
|
s !== void 0 && n.rebind !== !1 && a.rebind(s);
|
|
1641
1641
|
} finally {
|
|
@@ -1655,7 +1655,7 @@ var vn = class extends E {}, yn = class extends vn {
|
|
|
1655
1655
|
let t = this.targetFor(e);
|
|
1656
1656
|
return t !== void 0 && t.valid && !t.pending;
|
|
1657
1657
|
}
|
|
1658
|
-
},
|
|
1658
|
+
}, Cn = class extends _n {
|
|
1659
1659
|
target;
|
|
1660
1660
|
constructor(e) {
|
|
1661
1661
|
super((e, t, n) => {
|
|
@@ -1667,27 +1667,27 @@ var vn = class extends E {}, yn = class extends vn {
|
|
|
1667
1667
|
canExecute(e) {
|
|
1668
1668
|
return this.targetFor(e) !== void 0;
|
|
1669
1669
|
}
|
|
1670
|
-
},
|
|
1670
|
+
}, wn = Symbol("ListItemAddedAction"), W = class extends E {
|
|
1671
1671
|
constructor(e) {
|
|
1672
1672
|
super(e);
|
|
1673
1673
|
}
|
|
1674
1674
|
static get classIdentifier() {
|
|
1675
|
-
return
|
|
1675
|
+
return wn;
|
|
1676
1676
|
}
|
|
1677
1677
|
execute(e, t, n, r) {
|
|
1678
1678
|
return super.execute(e, t, n, r);
|
|
1679
1679
|
}
|
|
1680
|
-
},
|
|
1680
|
+
}, Tn = Symbol("ListItemRemovedAction"), G = class extends E {
|
|
1681
1681
|
constructor(e) {
|
|
1682
1682
|
super(e);
|
|
1683
1683
|
}
|
|
1684
1684
|
static get classIdentifier() {
|
|
1685
|
-
return
|
|
1685
|
+
return Tn;
|
|
1686
1686
|
}
|
|
1687
1687
|
execute(e, t, n, r) {
|
|
1688
1688
|
return super.execute(e, t, n, r);
|
|
1689
1689
|
}
|
|
1690
|
-
},
|
|
1690
|
+
}, K = class extends H {
|
|
1691
1691
|
get [Symbol.toStringTag]() {
|
|
1692
1692
|
return "Field";
|
|
1693
1693
|
}
|
|
@@ -1701,13 +1701,13 @@ var vn = class extends E {}, yn = class extends vn {
|
|
|
1701
1701
|
return this.state.value;
|
|
1702
1702
|
}
|
|
1703
1703
|
set _value(e) {
|
|
1704
|
-
this.state.value =
|
|
1704
|
+
this.state.value = Pe(this, e);
|
|
1705
1705
|
}
|
|
1706
1706
|
constructor(e) {
|
|
1707
|
-
super(
|
|
1707
|
+
super(rt()), this.init(e);
|
|
1708
1708
|
}
|
|
1709
1709
|
init(e) {
|
|
1710
|
-
|
|
1710
|
+
T(() => {
|
|
1711
1711
|
if (e) {
|
|
1712
1712
|
let { value: t, validators: n, actions: r, ...i } = e;
|
|
1713
1713
|
this.registerInitialActions([...n || [], ...r || []]), this.assignParams(i), this._value = t === void 0 ? this.originalValue : t;
|
|
@@ -1720,12 +1720,12 @@ var vn = class extends E {}, yn = class extends vn {
|
|
|
1720
1720
|
}
|
|
1721
1721
|
set value(e) {
|
|
1722
1722
|
let t = this._value;
|
|
1723
|
-
t === e || Number.isNaN(t) && Number.isNaN(e) ||
|
|
1723
|
+
t === e || Number.isNaN(t) && Number.isNaN(e) || T((n) => {
|
|
1724
1724
|
n.touch(this), this._value = e, this.bumpValueVersion(), this.serializesAs("value") === "value" && this.boundActions?.triggerEager(this, this._value, t), this.propagateValueChanged();
|
|
1725
1725
|
});
|
|
1726
1726
|
}
|
|
1727
|
-
[
|
|
1728
|
-
|
|
1727
|
+
[Ce](e, t, n) {
|
|
1728
|
+
T((r) => {
|
|
1729
1729
|
r.touch(this);
|
|
1730
1730
|
let i = this.raw;
|
|
1731
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);
|
|
@@ -1738,7 +1738,7 @@ var vn = class extends E {}, yn = class extends vn {
|
|
|
1738
1738
|
this.touchState(), this.state.touched = e, e && this.editConcluded();
|
|
1739
1739
|
}
|
|
1740
1740
|
bind(e, t) {
|
|
1741
|
-
let n = this.constructor, r =
|
|
1741
|
+
let n = this.constructor, r = Ie(() => new n({
|
|
1742
1742
|
value: e === void 0 ? this.value : e,
|
|
1743
1743
|
...t && "originalValue" in t ? { originalValue: t.originalValue } : {},
|
|
1744
1744
|
access: t?.access ?? this.access,
|
|
@@ -1746,23 +1746,23 @@ var vn = class extends E {}, yn = class extends vn {
|
|
|
1746
1746
|
}));
|
|
1747
1747
|
return r.boundFrom(this, r.contribution, r.originalValue, t), r;
|
|
1748
1748
|
}
|
|
1749
|
-
},
|
|
1750
|
-
function
|
|
1749
|
+
}, En = /* @__PURE__ */ new WeakMap();
|
|
1750
|
+
function Dn(e) {
|
|
1751
1751
|
if (e != null) return Object.values(e).some((e) => e != null) ? e : void 0;
|
|
1752
1752
|
}
|
|
1753
|
-
var
|
|
1753
|
+
var On = class extends K {
|
|
1754
1754
|
get [Symbol.toStringTag]() {
|
|
1755
1755
|
return "Action";
|
|
1756
1756
|
}
|
|
1757
1757
|
init(e) {
|
|
1758
|
-
|
|
1758
|
+
T(() => {
|
|
1759
1759
|
if (this._value = {
|
|
1760
1760
|
label: void 0,
|
|
1761
1761
|
icon: void 0
|
|
1762
1762
|
}, e) {
|
|
1763
1763
|
let { value: t, originalValue: n, validators: r, actions: i, ...a } = e;
|
|
1764
1764
|
this.registerInitialActions([...r || [], ...i || []]), this.assignParams(a);
|
|
1765
|
-
let o =
|
|
1765
|
+
let o = Dn(t), s = Dn(n);
|
|
1766
1766
|
o ? this._value = o : s && (this._value = { ...s }), s && (this.originalValue = Object.freeze({ ...s }));
|
|
1767
1767
|
}
|
|
1768
1768
|
this.constructed(e), this.originalValue === void 0 && (this.originalValue = this._value), this.recordAnnounced(), this.boundActions?.triggerEager(this, this.contribution, this.originalValue), this.validate();
|
|
@@ -1793,18 +1793,18 @@ var Dn = class extends q {
|
|
|
1793
1793
|
serializesAs() {
|
|
1794
1794
|
return "omit";
|
|
1795
1795
|
}
|
|
1796
|
-
[
|
|
1796
|
+
[Ve]() {
|
|
1797
1797
|
return !0;
|
|
1798
1798
|
}
|
|
1799
1799
|
get executable() {
|
|
1800
|
-
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));
|
|
1801
1801
|
}
|
|
1802
|
-
[
|
|
1803
|
-
return this.boundActions?.ofClass(
|
|
1802
|
+
[st]() {
|
|
1803
|
+
return this.boundActions?.ofClass(U.classIdentifier) ?? [];
|
|
1804
1804
|
}
|
|
1805
1805
|
get busyRuns() {
|
|
1806
|
-
let e =
|
|
1807
|
-
return e || (e = d(0),
|
|
1806
|
+
let e = En.get(this);
|
|
1807
|
+
return e || (e = d(0), En.set(this, e)), e;
|
|
1808
1808
|
}
|
|
1809
1809
|
get busy() {
|
|
1810
1810
|
return this.busyRuns.value > 0;
|
|
@@ -1813,12 +1813,12 @@ var Dn = class extends q {
|
|
|
1813
1813
|
let t = this.busyRuns;
|
|
1814
1814
|
t.value++;
|
|
1815
1815
|
try {
|
|
1816
|
-
return await this.triggerAction(
|
|
1816
|
+
return await this.triggerAction(U, e);
|
|
1817
1817
|
} finally {
|
|
1818
1818
|
t.value--;
|
|
1819
1819
|
}
|
|
1820
1820
|
}
|
|
1821
|
-
},
|
|
1821
|
+
}, kn = /* @__PURE__ */ new WeakMap(), An = /* @__PURE__ */ new WeakMap(), q = class e extends H {
|
|
1822
1822
|
get [Symbol.toStringTag]() {
|
|
1823
1823
|
return "Container";
|
|
1824
1824
|
}
|
|
@@ -1826,7 +1826,7 @@ var Dn = class extends q {
|
|
|
1826
1826
|
return this.children.some((e) => e.touched);
|
|
1827
1827
|
}
|
|
1828
1828
|
set touched(e) {
|
|
1829
|
-
|
|
1829
|
+
T(() => {
|
|
1830
1830
|
this.members.forEach((t) => {
|
|
1831
1831
|
t.touched = e;
|
|
1832
1832
|
});
|
|
@@ -1839,7 +1839,7 @@ var Dn = class extends q {
|
|
|
1839
1839
|
return this.busyRead;
|
|
1840
1840
|
}
|
|
1841
1841
|
validate(e = !1) {
|
|
1842
|
-
|
|
1842
|
+
T(() => {
|
|
1843
1843
|
e && this.members.forEach((e) => e.validate(!0)), super.validate(e);
|
|
1844
1844
|
});
|
|
1845
1845
|
}
|
|
@@ -1857,8 +1857,8 @@ var Dn = class extends q {
|
|
|
1857
1857
|
return t.length > 0 && t.every((e) => this.childSerializesAs(e, "fullValue") === "omit") ? "omit" : super.serializesAs(e);
|
|
1858
1858
|
}
|
|
1859
1859
|
command(e) {
|
|
1860
|
-
let t = e === "confirm" ?
|
|
1861
|
-
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)),
|
|
1862
1862
|
r.filter(({ action: e, depth: t }) => t === 0 && e[n]),
|
|
1863
1863
|
r.filter(({ action: e, depth: t }) => t > 0 && e[n])
|
|
1864
1864
|
];
|
|
@@ -1873,7 +1873,7 @@ var Dn = class extends q {
|
|
|
1873
1873
|
}
|
|
1874
1874
|
}
|
|
1875
1875
|
actionsBelow(t = 0) {
|
|
1876
|
-
return this.children.flatMap((n) => n instanceof
|
|
1876
|
+
return this.children.flatMap((n) => n instanceof On ? [{
|
|
1877
1877
|
action: n,
|
|
1878
1878
|
depth: t
|
|
1879
1879
|
}] : n instanceof e ? n.actionsBelow(t + 1) : []);
|
|
@@ -1888,12 +1888,12 @@ var Dn = class extends q {
|
|
|
1888
1888
|
return this.fullValue;
|
|
1889
1889
|
}
|
|
1890
1890
|
get validRead() {
|
|
1891
|
-
let e =
|
|
1892
|
-
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;
|
|
1893
1893
|
}
|
|
1894
1894
|
get busyRead() {
|
|
1895
|
-
let e =
|
|
1896
|
-
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;
|
|
1897
1897
|
}
|
|
1898
1898
|
childValidatingChanged(e) {
|
|
1899
1899
|
let t = this.validating;
|
|
@@ -1902,11 +1902,11 @@ var Dn = class extends q {
|
|
|
1902
1902
|
childValidityChanged(e) {
|
|
1903
1903
|
this.raw.invalidChildren += e ? -1 : 1;
|
|
1904
1904
|
}
|
|
1905
|
-
},
|
|
1906
|
-
function
|
|
1905
|
+
}, jn = Object.freeze([]);
|
|
1906
|
+
function Mn(e, t) {
|
|
1907
1907
|
if (!Number.isInteger(e)) throw RangeError(`List.${t}(): the index must be an integer, got ${e}`);
|
|
1908
1908
|
}
|
|
1909
|
-
var
|
|
1909
|
+
var J = class e extends q {
|
|
1910
1910
|
get [Symbol.toStringTag]() {
|
|
1911
1911
|
return "List";
|
|
1912
1912
|
}
|
|
@@ -1918,7 +1918,7 @@ var Mn = class e extends J {
|
|
|
1918
1918
|
}
|
|
1919
1919
|
_itemTemplate;
|
|
1920
1920
|
constructor(t, n) {
|
|
1921
|
-
super(
|
|
1921
|
+
super(ot()), this._itemTemplate = t, t && Le(t), T(() => {
|
|
1922
1922
|
if (n) {
|
|
1923
1923
|
let { value: e, validators: t, actions: r, ...i } = n;
|
|
1924
1924
|
this.registerInitialActions([...t || [], ...r || []]), this.assignParams(i), e === void 0 ? this.originalValue !== void 0 && this.setValueInternal(this.originalValue) : this.setValueInternal(e);
|
|
@@ -1926,8 +1926,8 @@ var Mn = class e extends J {
|
|
|
1926
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();
|
|
1927
1927
|
});
|
|
1928
1928
|
}
|
|
1929
|
-
[
|
|
1930
|
-
let e = super[
|
|
1929
|
+
[b]() {
|
|
1930
|
+
let e = super[b]();
|
|
1931
1931
|
return e.rows = this.raw.rows ? [...this.raw.rows] : this.raw.rows, e;
|
|
1932
1932
|
}
|
|
1933
1933
|
static baseline(e) {
|
|
@@ -1935,10 +1935,10 @@ var Mn = class e extends J {
|
|
|
1935
1935
|
}
|
|
1936
1936
|
processSetValueItem(t) {
|
|
1937
1937
|
let n;
|
|
1938
|
-
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;
|
|
1939
1939
|
}
|
|
1940
1940
|
static elementFor(t) {
|
|
1941
|
-
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 });
|
|
1942
1942
|
}
|
|
1943
1943
|
createPaddingItem(t) {
|
|
1944
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);
|
|
@@ -1952,17 +1952,17 @@ var Mn = class e extends J {
|
|
|
1952
1952
|
}
|
|
1953
1953
|
setValueInternal(t, n = !1) {
|
|
1954
1954
|
if (t != null && !Array.isArray(t)) throw TypeError("Invalid value provided: a list takes an array of rows, or null to empty it");
|
|
1955
|
-
|
|
1955
|
+
T((r) => this.asReset(() => {
|
|
1956
1956
|
r.touch(this);
|
|
1957
1957
|
let i = this.raw.rows, a = (e, t) => {
|
|
1958
1958
|
n && r.recordStructural(this, {
|
|
1959
|
-
actionClass:
|
|
1959
|
+
actionClass: G,
|
|
1960
1960
|
item: e,
|
|
1961
1961
|
index: t
|
|
1962
1962
|
});
|
|
1963
1963
|
}, o = (e, t) => {
|
|
1964
1964
|
n && r.recordStructural(this, {
|
|
1965
|
-
actionClass:
|
|
1965
|
+
actionClass: W,
|
|
1966
1966
|
item: e,
|
|
1967
1967
|
index: t
|
|
1968
1968
|
});
|
|
@@ -1977,7 +1977,7 @@ var Mn = class e extends J {
|
|
|
1977
1977
|
let n = Array(t.length);
|
|
1978
1978
|
for (let r = 0; r < t.length; r++) {
|
|
1979
1979
|
let i = t[r], s = e[r], c = this._itemTemplate;
|
|
1980
|
-
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));
|
|
1981
1981
|
}
|
|
1982
1982
|
for (let n = t.length; n < e.length; n++) this.releaseChild(e[n]);
|
|
1983
1983
|
this.raw.rows = n;
|
|
@@ -1997,16 +1997,16 @@ var Mn = class e extends J {
|
|
|
1997
1997
|
case "null": t.push(null);
|
|
1998
1998
|
}
|
|
1999
1999
|
});
|
|
2000
|
-
let n = t.length ? Object.freeze(t) :
|
|
2000
|
+
let n = t.length ? Object.freeze(t) : jn;
|
|
2001
2001
|
return this.raw.cachedValue = n, this.raw.cachedValueVersion = e, n;
|
|
2002
2002
|
}
|
|
2003
2003
|
set value(e) {
|
|
2004
|
-
|
|
2004
|
+
T(() => {
|
|
2005
2005
|
this.setValueInternal(e, !0), this.propagateValueChanged(!0);
|
|
2006
2006
|
});
|
|
2007
2007
|
}
|
|
2008
2008
|
resetTo(e, t) {
|
|
2009
|
-
|
|
2009
|
+
T((n) => {
|
|
2010
2010
|
n.touch(this), this.errors.length && (this.errors = []), this.setValueInternal(t === void 0 ? e.fullValue : t), this.recordBaseline(), super.validate(!0);
|
|
2011
2011
|
});
|
|
2012
2012
|
}
|
|
@@ -2014,7 +2014,7 @@ var Mn = class e extends J {
|
|
|
2014
2014
|
this.recordAnnounced(), this.originalValue = e.baseline(this.value);
|
|
2015
2015
|
}
|
|
2016
2016
|
bind(e, t) {
|
|
2017
|
-
let n = this._itemTemplate?.bind(), r = this.constructor, i =
|
|
2017
|
+
let n = this._itemTemplate?.bind(), r = this.constructor, i = Ie(() => new r(n, {
|
|
2018
2018
|
value: [...(e === void 0 ? this.fullValue : e) ?? []],
|
|
2019
2019
|
...t && "originalValue" in t ? { originalValue: t.originalValue } : {},
|
|
2020
2020
|
access: t?.access ?? this.access,
|
|
@@ -2052,37 +2052,37 @@ var Mn = class e extends J {
|
|
|
2052
2052
|
return this.remove((this.raw.rows?.length ?? 0) - 1);
|
|
2053
2053
|
}
|
|
2054
2054
|
remove(e) {
|
|
2055
|
-
|
|
2055
|
+
Mn(e, "remove");
|
|
2056
2056
|
let t;
|
|
2057
|
-
return
|
|
2057
|
+
return T((n) => {
|
|
2058
2058
|
let r = this.raw.rows;
|
|
2059
2059
|
if (r == null || e < 0 || r.length <= e) return;
|
|
2060
2060
|
n.touch(this);
|
|
2061
2061
|
let i = r.splice(e, 1)?.[0];
|
|
2062
2062
|
i && (this.releaseChild(i), this.rowsChanged(), this.bumpValueVersion(), t = i, n.recordStructural(this, {
|
|
2063
|
-
actionClass:
|
|
2063
|
+
actionClass: G,
|
|
2064
2064
|
item: t,
|
|
2065
2065
|
index: e
|
|
2066
2066
|
}), this.propagateValueChanged(!0));
|
|
2067
2067
|
}), t;
|
|
2068
2068
|
}
|
|
2069
2069
|
insert(e, t) {
|
|
2070
|
-
|
|
2070
|
+
Mn(t, "insert");
|
|
2071
2071
|
let n = 0;
|
|
2072
|
-
return
|
|
2072
|
+
return T((r) => {
|
|
2073
2073
|
r.touch(this);
|
|
2074
2074
|
let i = this.raw.rows ??= [];
|
|
2075
2075
|
for (n = t < 0 ? Math.max(i.length + t, 0) : t; i.length < n;) {
|
|
2076
2076
|
let t = this.createPaddingItem(e), n = i.push(t) - 1;
|
|
2077
2077
|
this.bumpValueVersion(), r.recordStructural(this, {
|
|
2078
|
-
actionClass:
|
|
2078
|
+
actionClass: W,
|
|
2079
2079
|
item: t,
|
|
2080
2080
|
index: n
|
|
2081
2081
|
});
|
|
2082
2082
|
}
|
|
2083
2083
|
let a = this.processSetValueItem(e);
|
|
2084
2084
|
i.splice(n, 0, a), r.recordStructural(this, {
|
|
2085
|
-
actionClass:
|
|
2085
|
+
actionClass: W,
|
|
2086
2086
|
item: a,
|
|
2087
2087
|
index: n
|
|
2088
2088
|
}), this.rowsChanged(), this.bumpValueVersion(), this.propagateValueChanged(!0);
|
|
@@ -2091,17 +2091,17 @@ var Mn = class e extends J {
|
|
|
2091
2091
|
releaseRows() {
|
|
2092
2092
|
this.raw.rows?.forEach((e) => this.releaseChild(e));
|
|
2093
2093
|
}
|
|
2094
|
-
[
|
|
2095
|
-
|
|
2094
|
+
[ct](e) {
|
|
2095
|
+
T((t) => {
|
|
2096
2096
|
t.touch(this), this.raw.rows = [...e], this.rowsChanged(), this.bumpValueVersion(), this.propagateValueChanged(!0);
|
|
2097
2097
|
});
|
|
2098
2098
|
}
|
|
2099
2099
|
clear() {
|
|
2100
|
-
|
|
2100
|
+
T((e) => {
|
|
2101
2101
|
let t = this.raw.rows ?? [], n = t.length > 0;
|
|
2102
2102
|
e.touch(this);
|
|
2103
2103
|
for (let n = t.length - 1; n >= 0; n--) e.recordStructural(this, {
|
|
2104
|
-
actionClass:
|
|
2104
|
+
actionClass: G,
|
|
2105
2105
|
item: t[n],
|
|
2106
2106
|
index: n
|
|
2107
2107
|
});
|
|
@@ -2118,7 +2118,7 @@ function Pn(e) {
|
|
|
2118
2118
|
//#endregion
|
|
2119
2119
|
//#region src/group.ts
|
|
2120
2120
|
function Fn(e) {
|
|
2121
|
-
return ae(e) ? Y.createFromFormData(e) : Array.isArray(e) ? new
|
|
2121
|
+
return ae(e) ? Y.createFromFormData(e) : Array.isArray(e) ? new J(void 0, { value: e }) : new K({ value: e });
|
|
2122
2122
|
}
|
|
2123
2123
|
var In = /* @__PURE__ */ new WeakSet(), Ln = Object.freeze({}), Rn = /* @__PURE__ */ new WeakMap(), zn = (e) => ({
|
|
2124
2124
|
get(t, n, r) {
|
|
@@ -2142,7 +2142,7 @@ var In = /* @__PURE__ */ new WeakSet(), Ln = Object.freeze({}), Rn = /* @__PURE_
|
|
|
2142
2142
|
deleteProperty(e, t) {
|
|
2143
2143
|
throw TypeError(`fields.${String(t)} cannot be deleted: use removeField() to take a member out`);
|
|
2144
2144
|
}
|
|
2145
|
-
}), Y = class e extends
|
|
2145
|
+
}), Y = class e extends q {
|
|
2146
2146
|
get [Symbol.toStringTag]() {
|
|
2147
2147
|
return "Group";
|
|
2148
2148
|
}
|
|
@@ -2154,8 +2154,8 @@ var In = /* @__PURE__ */ new WeakSet(), Ln = Object.freeze({}), Rn = /* @__PURE_
|
|
|
2154
2154
|
}
|
|
2155
2155
|
_fields;
|
|
2156
2156
|
constructor(t, n) {
|
|
2157
|
-
if (super(
|
|
2158
|
-
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(() => {
|
|
2159
2159
|
let r = !1, i = !1;
|
|
2160
2160
|
In.add(this);
|
|
2161
2161
|
try {
|
|
@@ -2178,22 +2178,22 @@ var In = /* @__PURE__ */ new WeakSet(), Ln = Object.freeze({}), Rn = /* @__PURE_
|
|
|
2178
2178
|
r instanceof e && r.baselineMembersFrom(i), r.originalValue = i;
|
|
2179
2179
|
});
|
|
2180
2180
|
}
|
|
2181
|
-
[
|
|
2182
|
-
let e = super[
|
|
2181
|
+
[b]() {
|
|
2182
|
+
let e = super[b]();
|
|
2183
2183
|
return e.fieldNames = [...this.raw.fieldNames], e;
|
|
2184
2184
|
}
|
|
2185
2185
|
static baseline(e) {
|
|
2186
2186
|
return e == null ? e : { ...e };
|
|
2187
2187
|
}
|
|
2188
2188
|
addField(t, n) {
|
|
2189
|
-
return
|
|
2189
|
+
return T((r) => {
|
|
2190
2190
|
if (Object.hasOwn(this._fields, t)) throw Error(`Field ${t} is already in this form`);
|
|
2191
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();
|
|
2192
2192
|
}), this;
|
|
2193
2193
|
}
|
|
2194
2194
|
removeField(t) {
|
|
2195
2195
|
let n;
|
|
2196
|
-
return
|
|
2196
|
+
return T((r) => {
|
|
2197
2197
|
if (!Object.hasOwn(this._fields, t)) return;
|
|
2198
2198
|
let i = this._fields[t];
|
|
2199
2199
|
r.touch(this), this.releaseChild(i);
|
|
@@ -2212,12 +2212,12 @@ var In = /* @__PURE__ */ new WeakSet(), Ln = Object.freeze({}), Rn = /* @__PURE_
|
|
|
2212
2212
|
}
|
|
2213
2213
|
static isValidFields(e) {
|
|
2214
2214
|
function t(e) {
|
|
2215
|
-
return e instanceof
|
|
2215
|
+
return e instanceof H;
|
|
2216
2216
|
}
|
|
2217
2217
|
return typeof e == "object" && !!e && Object.entries(e).every(([, e]) => t(e));
|
|
2218
2218
|
}
|
|
2219
2219
|
static createFromFormData(t) {
|
|
2220
|
-
if (t instanceof
|
|
2220
|
+
if (t instanceof H) throw Error("data is already a Form structure, should be a simple object");
|
|
2221
2221
|
return new e(t == null ? {} : Object.fromEntries(Object.entries(t).map(([e, t]) => [e, Fn(t)])));
|
|
2222
2222
|
}
|
|
2223
2223
|
field(e) {
|
|
@@ -2249,20 +2249,20 @@ var In = /* @__PURE__ */ new WeakSet(), Ln = Object.freeze({}), Rn = /* @__PURE_
|
|
|
2249
2249
|
return this.raw.cachedValue = n, this.raw.cachedValueVersion = e, n;
|
|
2250
2250
|
}
|
|
2251
2251
|
assignMembers(e) {
|
|
2252
|
-
|
|
2252
|
+
T(() => {
|
|
2253
2253
|
Object.entries(this._fields).forEach(([t, n]) => {
|
|
2254
2254
|
this.childSerializesAs(n, "fullValue") !== "omit" && (e == null || Object.hasOwn(e, t)) && (n.value = e == null ? null : e[t]);
|
|
2255
2255
|
});
|
|
2256
2256
|
});
|
|
2257
2257
|
}
|
|
2258
2258
|
set value(e) {
|
|
2259
|
-
|
|
2259
|
+
T((t) => {
|
|
2260
2260
|
this.assignMembers(e), t.markValidityDirty(this);
|
|
2261
2261
|
});
|
|
2262
2262
|
}
|
|
2263
2263
|
resetTo(e, t) {
|
|
2264
2264
|
let n = e;
|
|
2265
|
-
|
|
2265
|
+
T((e) => {
|
|
2266
2266
|
e.touch(this), this.errors.length && (this.errors = []), Object.entries(this._fields).forEach(([e, r]) => {
|
|
2267
2267
|
let i = n.field(e) ?? r, a;
|
|
2268
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);
|
|
@@ -2287,7 +2287,7 @@ var In = /* @__PURE__ */ new WeakSet(), Ln = Object.freeze({}), Rn = /* @__PURE_
|
|
|
2287
2287
|
Object.entries(this._fields).forEach(([e, t]) => {
|
|
2288
2288
|
r[e] = t.bind();
|
|
2289
2289
|
});
|
|
2290
|
-
let i = this.constructor, a =
|
|
2290
|
+
let i = this.constructor, a = Ie(() => new i(r, {
|
|
2291
2291
|
value: t === void 0 ? this.fullValue : this.withBaselines(t),
|
|
2292
2292
|
...n && "originalValue" in n ? { originalValue: n.originalValue } : {},
|
|
2293
2293
|
access: n?.access ?? this.access,
|
|
@@ -2305,24 +2305,41 @@ var In = /* @__PURE__ */ new WeakSet(), Ln = Object.freeze({}), Rn = /* @__PURE_
|
|
|
2305
2305
|
rebind(e) {
|
|
2306
2306
|
return super.rebind(e);
|
|
2307
2307
|
}
|
|
2308
|
-
}
|
|
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
|
+
}
|
|
2309
2326
|
//#endregion
|
|
2310
2327
|
//#region src/is-equal.ts
|
|
2311
|
-
function
|
|
2312
|
-
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;
|
|
2313
2330
|
return n === e && r === t ? void 0 : h(n, r);
|
|
2314
2331
|
}
|
|
2315
|
-
function
|
|
2316
|
-
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);
|
|
2317
2334
|
}
|
|
2318
2335
|
//#endregion
|
|
2319
2336
|
//#region src/validators/validator-compare-to.ts
|
|
2320
|
-
var
|
|
2337
|
+
var Gn = class extends F {
|
|
2321
2338
|
isValidComparison;
|
|
2322
2339
|
otherField;
|
|
2323
2340
|
registrations = /* @__PURE__ */ new WeakSet();
|
|
2324
|
-
listening = new
|
|
2325
|
-
declarations = new
|
|
2341
|
+
listening = new Ft();
|
|
2342
|
+
declarations = new Ft();
|
|
2326
2343
|
relay;
|
|
2327
2344
|
constructor(e, t, n) {
|
|
2328
2345
|
super((e, t, r) => {
|
|
@@ -2331,31 +2348,31 @@ var Hn = class extends I {
|
|
|
2331
2348
|
if (!i) return r.markRecordIncomplete(), null;
|
|
2332
2349
|
this.listenOn(i);
|
|
2333
2350
|
let a = m(i.value);
|
|
2334
|
-
return this.isValidComparison(m(e), a) ? null : [this.errorFor(n,
|
|
2351
|
+
return this.isValidComparison(m(e), a) ? null : [this.errorFor(n, P("compare_to"), "Value does not match the comparison with {otherValue}", {
|
|
2335
2352
|
newValue: e,
|
|
2336
2353
|
oldValue: t,
|
|
2337
2354
|
otherValue: a
|
|
2338
2355
|
})];
|
|
2339
|
-
}), this.isValidComparison = t, this.otherField = e, this.relay = new
|
|
2356
|
+
}), this.isValidComparison = t, this.otherField = e, this.relay = new N((e, t, n, r) => {
|
|
2340
2357
|
t(e, n, r);
|
|
2341
|
-
let i =
|
|
2342
|
-
this.declarations.alive.forEach((e) =>
|
|
2358
|
+
let i = I(e);
|
|
2359
|
+
this.declarations.alive.forEach((e) => Nt(e, i).forEach((e) => {
|
|
2343
2360
|
this.registrations.has(e) && this.execute(e, () => null, e.contribution, this.comparisonState(e).oldValue);
|
|
2344
2361
|
}));
|
|
2345
|
-
}), this.relay[
|
|
2362
|
+
}), this.relay[$e] = () => {
|
|
2346
2363
|
this.declarations.alive.length === 0 && this.stopListening();
|
|
2347
2364
|
};
|
|
2348
2365
|
}
|
|
2349
2366
|
resolve(e) {
|
|
2350
2367
|
let t = this.otherField;
|
|
2351
|
-
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));
|
|
2352
2369
|
}
|
|
2353
2370
|
listenOn(e) {
|
|
2354
2371
|
this.listening.has(e.declaration) || (this.listening.add(e.declaration), e.registerAction(this.relay));
|
|
2355
2372
|
}
|
|
2356
2373
|
stopListening() {
|
|
2357
2374
|
let e = this.listening.alive;
|
|
2358
|
-
e.length !== 0 && (
|
|
2375
|
+
e.length !== 0 && (C()?.whenRolledBack(() => e.forEach((e) => this.listening.add(e))), e.forEach((e) => {
|
|
2359
2376
|
this.listening.delete(e), e.unregisterAction(this.relay);
|
|
2360
2377
|
}));
|
|
2361
2378
|
}
|
|
@@ -2390,7 +2407,7 @@ function X(e) {
|
|
|
2390
2407
|
function Z(e) {
|
|
2391
2408
|
return X(e) === 0 && (e == null || g(e) || te(e) || ie(e));
|
|
2392
2409
|
}
|
|
2393
|
-
function
|
|
2410
|
+
function Kn(e, t) {
|
|
2394
2411
|
if (e instanceof Date && t instanceof Date) {
|
|
2395
2412
|
let n = e.getTime() - t.getTime();
|
|
2396
2413
|
return Number.isNaN(n) ? void 0 : n;
|
|
@@ -2400,7 +2417,7 @@ function Un(e, t) {
|
|
|
2400
2417
|
}
|
|
2401
2418
|
//#endregion
|
|
2402
2419
|
//#region src/validators/validator-in-allowed-values.ts
|
|
2403
|
-
var
|
|
2420
|
+
var qn = class extends F {
|
|
2404
2421
|
constructor(e, t) {
|
|
2405
2422
|
let n = () => {
|
|
2406
2423
|
let t = m(e);
|
|
@@ -2416,7 +2433,7 @@ var Wn = class extends I {
|
|
|
2416
2433
|
super((e, i) => {
|
|
2417
2434
|
if (Z(m(e))) return null;
|
|
2418
2435
|
let a = n();
|
|
2419
|
-
return a.includes(m(e)) ? null : [this.errorFor(t,
|
|
2436
|
+
return a.includes(m(e)) ? null : [this.errorFor(t, P("in_allowed_values"), "Must be one of [{allowedAsText}]", {
|
|
2420
2437
|
newValue: e,
|
|
2421
2438
|
oldValue: i,
|
|
2422
2439
|
allowedValues: a,
|
|
@@ -2424,47 +2441,47 @@ var Wn = class extends I {
|
|
|
2424
2441
|
})];
|
|
2425
2442
|
});
|
|
2426
2443
|
}
|
|
2427
|
-
},
|
|
2444
|
+
}, Jn = class extends F {
|
|
2428
2445
|
constructor(e) {
|
|
2429
2446
|
let t = e?.trim ?? !0;
|
|
2430
2447
|
super((n, r) => {
|
|
2431
2448
|
let i = m(n);
|
|
2432
|
-
return X(t && g(i) ? i.trim() : i) === 0 ? [this.errorFor(e,
|
|
2449
|
+
return X(t && g(i) ? i.trim() : i) === 0 ? [this.errorFor(e, P("required"), "Please enter a value", {
|
|
2433
2450
|
newValue: n,
|
|
2434
2451
|
oldValue: r
|
|
2435
2452
|
})] : null;
|
|
2436
2453
|
});
|
|
2437
2454
|
}
|
|
2438
|
-
},
|
|
2455
|
+
}, Yn = class extends F {
|
|
2439
2456
|
constructor(e, t) {
|
|
2440
2457
|
super((n, r) => {
|
|
2441
2458
|
if (Z(n)) return null;
|
|
2442
|
-
let i =
|
|
2443
|
-
return i === void 0 || i < 0 ? [this.errorFor(t,
|
|
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}", {
|
|
2444
2461
|
newValue: n,
|
|
2445
2462
|
oldValue: r,
|
|
2446
2463
|
minValue: e
|
|
2447
2464
|
})] : null;
|
|
2448
2465
|
});
|
|
2449
2466
|
}
|
|
2450
|
-
},
|
|
2467
|
+
}, Xn = class extends F {
|
|
2451
2468
|
constructor(e, t) {
|
|
2452
2469
|
super((n, r) => {
|
|
2453
2470
|
if (Z(n)) return null;
|
|
2454
|
-
let i =
|
|
2455
|
-
return i === void 0 || i > 0 ? [this.errorFor(t,
|
|
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}", {
|
|
2456
2473
|
newValue: n,
|
|
2457
2474
|
oldValue: r,
|
|
2458
2475
|
maxValue: e
|
|
2459
2476
|
})] : null;
|
|
2460
2477
|
});
|
|
2461
2478
|
}
|
|
2462
|
-
},
|
|
2479
|
+
}, Zn = class extends F {
|
|
2463
2480
|
constructor(e, t, n) {
|
|
2464
2481
|
super((r, i) => {
|
|
2465
2482
|
if (Z(r)) return null;
|
|
2466
|
-
let a =
|
|
2467
|
-
return a === void 0 || o === void 0 || a < 0 || o > 0 ? [this.errorFor(n,
|
|
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}", {
|
|
2468
2485
|
newValue: r,
|
|
2469
2486
|
oldValue: i,
|
|
2470
2487
|
minValue: e,
|
|
@@ -2472,28 +2489,28 @@ var Wn = class extends I {
|
|
|
2472
2489
|
})] : null;
|
|
2473
2490
|
});
|
|
2474
2491
|
}
|
|
2475
|
-
},
|
|
2492
|
+
}, Qn = class extends F {
|
|
2476
2493
|
constructor(e, t) {
|
|
2477
|
-
super((n, r) => Z(n) ? null : X(n) < e ? [this.errorFor(t,
|
|
2494
|
+
super((n, r) => Z(n) ? null : X(n) < e ? [this.errorFor(t, P("min_length"), "Length must be larger or equal to {minLength}", {
|
|
2478
2495
|
newValue: n,
|
|
2479
2496
|
oldValue: r,
|
|
2480
2497
|
minLength: e
|
|
2481
2498
|
})] : null);
|
|
2482
2499
|
}
|
|
2483
|
-
},
|
|
2500
|
+
}, $n = class extends F {
|
|
2484
2501
|
constructor(e, t) {
|
|
2485
|
-
super((n, r) => Z(n) ? null : X(n) > e ? [this.errorFor(t,
|
|
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}", {
|
|
2486
2503
|
newValue: n,
|
|
2487
2504
|
oldValue: r,
|
|
2488
2505
|
maxLength: e
|
|
2489
2506
|
})] : null);
|
|
2490
2507
|
}
|
|
2491
|
-
},
|
|
2508
|
+
}, er = class extends F {
|
|
2492
2509
|
constructor(e, t, n) {
|
|
2493
2510
|
super((r, i) => {
|
|
2494
2511
|
if (Z(r)) return null;
|
|
2495
2512
|
let a = X(r);
|
|
2496
|
-
return a < e || a > t ? [this.errorFor(n,
|
|
2513
|
+
return a < e || a > t ? [this.errorFor(n, P("length_in_range"), "Length must be between {minLength} and {maxLength}", {
|
|
2497
2514
|
newValue: r,
|
|
2498
2515
|
oldValue: i,
|
|
2499
2516
|
minLength: e,
|
|
@@ -2501,32 +2518,32 @@ var Wn = class extends I {
|
|
|
2501
2518
|
})] : null;
|
|
2502
2519
|
});
|
|
2503
2520
|
}
|
|
2504
|
-
},
|
|
2521
|
+
}, tr = class extends F {
|
|
2505
2522
|
constructor(e, t) {
|
|
2506
2523
|
let n = /[gy]/.test(e.flags) ? new RegExp(e.source, e.flags.replace(/[gy]/g, "")) : e;
|
|
2507
2524
|
super((r, i) => {
|
|
2508
2525
|
let a = m(r);
|
|
2509
|
-
return Z(a) || n.test(String(a)) ? null : [this.errorFor(t,
|
|
2526
|
+
return Z(a) || n.test(String(a)) ? null : [this.errorFor(t, P("pattern"), "Value must match pattern \"{pattern}\"", {
|
|
2510
2527
|
newValue: r,
|
|
2511
2528
|
oldValue: i,
|
|
2512
2529
|
pattern: e
|
|
2513
2530
|
})];
|
|
2514
2531
|
});
|
|
2515
2532
|
}
|
|
2516
|
-
},
|
|
2517
|
-
CompareTo: () =>
|
|
2518
|
-
InAllowedValues: () =>
|
|
2519
|
-
LengthInRange: () =>
|
|
2520
|
-
MaxLength: () =>
|
|
2521
|
-
MaxValue: () =>
|
|
2522
|
-
MinLength: () =>
|
|
2523
|
-
MinValue: () =>
|
|
2524
|
-
Pattern: () =>
|
|
2525
|
-
Required: () =>
|
|
2526
|
-
Validator: () =>
|
|
2527
|
-
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,
|
|
2528
2545
|
isEmptyValue: () => Z
|
|
2529
|
-
}),
|
|
2546
|
+
}), rr = /* @__PURE__ */ new WeakMap(), ir = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new Set([
|
|
2530
2547
|
"push",
|
|
2531
2548
|
"pop",
|
|
2532
2549
|
"shift",
|
|
@@ -2537,23 +2554,23 @@ var Wn = class extends I {
|
|
|
2537
2554
|
"fill",
|
|
2538
2555
|
"copyWithin"
|
|
2539
2556
|
]);
|
|
2540
|
-
function
|
|
2557
|
+
function or(e) {
|
|
2541
2558
|
return typeof e == "string" && /^(0|[1-9]\d*)$/.test(e);
|
|
2542
2559
|
}
|
|
2543
|
-
function
|
|
2560
|
+
function sr(e) {
|
|
2544
2561
|
let t = Math.trunc(Number(e));
|
|
2545
2562
|
return Number.isNaN(t) ? 0 : t;
|
|
2546
2563
|
}
|
|
2547
2564
|
function Q(e) {
|
|
2548
|
-
return typeof e == "object" && !!e &&
|
|
2565
|
+
return typeof e == "object" && !!e && ir.get(e) || e;
|
|
2549
2566
|
}
|
|
2550
2567
|
function $(e) {
|
|
2551
|
-
return e instanceof
|
|
2568
|
+
return e instanceof q ? pr(e) : e.value;
|
|
2552
2569
|
}
|
|
2553
|
-
function
|
|
2554
|
-
e.value = Q(t) instanceof
|
|
2570
|
+
function cr(e, t) {
|
|
2571
|
+
e.value = Q(t) instanceof H ? Q(t).value : t;
|
|
2555
2572
|
}
|
|
2556
|
-
function
|
|
2573
|
+
function lr(e) {
|
|
2557
2574
|
return e === "__v_skip" ? {
|
|
2558
2575
|
answered: !0,
|
|
2559
2576
|
value: !0
|
|
@@ -2562,11 +2579,11 @@ function or(e) {
|
|
|
2562
2579
|
value: void 0
|
|
2563
2580
|
} : { answered: !1 };
|
|
2564
2581
|
}
|
|
2565
|
-
function
|
|
2582
|
+
function ur(e) {
|
|
2566
2583
|
let t = (t) => typeof t == "string" && t !== "$" ? e.field(t) ?? void 0 : void 0, n = () => Object.keys(e.fields);
|
|
2567
2584
|
return {
|
|
2568
2585
|
get(n, r) {
|
|
2569
|
-
let i =
|
|
2586
|
+
let i = lr(r);
|
|
2570
2587
|
if (i.answered) return i.value;
|
|
2571
2588
|
if (r === "$") return e;
|
|
2572
2589
|
if (r === Symbol.toStringTag) return "View";
|
|
@@ -2577,7 +2594,7 @@ function sr(e) {
|
|
|
2577
2594
|
if (n === "$") throw TypeError("$ is the element a view stands for, and cannot be replaced");
|
|
2578
2595
|
let i = t(n);
|
|
2579
2596
|
if (!i) throw TypeError(`${String(n)} is not a member of this group - use $.addField() to add one`);
|
|
2580
|
-
return
|
|
2597
|
+
return cr(i, r), !0;
|
|
2581
2598
|
},
|
|
2582
2599
|
has(e, t) {
|
|
2583
2600
|
return t === "$" || typeof t == "string" && n().includes(t);
|
|
@@ -2601,11 +2618,11 @@ function sr(e) {
|
|
|
2601
2618
|
}
|
|
2602
2619
|
};
|
|
2603
2620
|
}
|
|
2604
|
-
function
|
|
2605
|
-
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) =>
|
|
2606
|
-
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);
|
|
2607
2624
|
}), a = {
|
|
2608
|
-
push: (...n) => (
|
|
2625
|
+
push: (...n) => (w(() => n.forEach((t) => e.push(Q(t)))), t().length),
|
|
2609
2626
|
pop: () => {
|
|
2610
2627
|
let n = t();
|
|
2611
2628
|
if (!n.length) return;
|
|
@@ -2618,15 +2635,15 @@ function cr(e) {
|
|
|
2618
2635
|
let r = $(n[0]);
|
|
2619
2636
|
return e.remove(e.items.indexOf(n[0])), r;
|
|
2620
2637
|
},
|
|
2621
|
-
unshift: (...r) => (
|
|
2638
|
+
unshift: (...r) => (w(() => {
|
|
2622
2639
|
let t = n(0);
|
|
2623
2640
|
r.forEach((n, r) => e.insert(Q(n), t + r));
|
|
2624
2641
|
}), t().length),
|
|
2625
2642
|
splice: (...i) => {
|
|
2626
2643
|
let [a, o, ...s] = i, c = [];
|
|
2627
|
-
return
|
|
2628
|
-
let l = t(), u = r(
|
|
2629
|
-
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) => {
|
|
2630
2647
|
c.push($(t)), e.remove(e.items.indexOf(t));
|
|
2631
2648
|
});
|
|
2632
2649
|
let f = n(u);
|
|
@@ -2654,15 +2671,15 @@ function cr(e) {
|
|
|
2654
2671
|
}, o;
|
|
2655
2672
|
return o = new Proxy([], {
|
|
2656
2673
|
get(n, r, i) {
|
|
2657
|
-
let o =
|
|
2674
|
+
let o = lr(r);
|
|
2658
2675
|
if (o.answered) return o.value;
|
|
2659
2676
|
if (r === "$") return e;
|
|
2660
2677
|
if (r === "length") return t().length;
|
|
2661
|
-
if (
|
|
2678
|
+
if (or(r)) {
|
|
2662
2679
|
let e = t()[Number(r)];
|
|
2663
2680
|
return e ? $(e) : void 0;
|
|
2664
2681
|
}
|
|
2665
|
-
return typeof r == "string" &&
|
|
2682
|
+
return typeof r == "string" && ar.has(r) ? a[r] : Reflect.get(n, r, i);
|
|
2666
2683
|
},
|
|
2667
2684
|
set(r, i, a) {
|
|
2668
2685
|
if (i === "$") throw TypeError("$ is the element a view stands for, and cannot be replaced");
|
|
@@ -2671,16 +2688,16 @@ function cr(e) {
|
|
|
2671
2688
|
if (!Number.isInteger(n) || n < 0 || n > 2 ** 32 - 1) throw RangeError("Invalid array length");
|
|
2672
2689
|
let r = t();
|
|
2673
2690
|
if (n > r.length) throw TypeError("a list view grows by push(), not by its length");
|
|
2674
|
-
return
|
|
2691
|
+
return w(() => r.slice(n).forEach((t) => e.remove(e.items.indexOf(t)))), !0;
|
|
2675
2692
|
}
|
|
2676
|
-
if (
|
|
2693
|
+
if (or(i)) {
|
|
2677
2694
|
let r = Number(i), o = t();
|
|
2678
|
-
return r < o.length ?
|
|
2695
|
+
return r < o.length ? cr(o[r], a) : e.insert(Q(a), n(o.length) + (r - o.length)), !0;
|
|
2679
2696
|
}
|
|
2680
2697
|
throw TypeError(`${String(i)} cannot be set on a list view`);
|
|
2681
2698
|
},
|
|
2682
2699
|
has(e, n) {
|
|
2683
|
-
return n === "$" || n === "length" ? !0 :
|
|
2700
|
+
return n === "$" || n === "length" ? !0 : or(n) ? Number(n) < t().length : Reflect.has(e, n);
|
|
2684
2701
|
},
|
|
2685
2702
|
ownKeys() {
|
|
2686
2703
|
return [...t().map((e, t) => String(t)), "length"];
|
|
@@ -2692,7 +2709,7 @@ function cr(e) {
|
|
|
2692
2709
|
enumerable: !1,
|
|
2693
2710
|
configurable: !1
|
|
2694
2711
|
};
|
|
2695
|
-
if (!(!
|
|
2712
|
+
if (!(!or(n) || Number(n) >= t().length)) return {
|
|
2696
2713
|
value: $(t()[Number(n)]),
|
|
2697
2714
|
writable: !0,
|
|
2698
2715
|
enumerable: !0,
|
|
@@ -2707,10 +2724,10 @@ function cr(e) {
|
|
|
2707
2724
|
}
|
|
2708
2725
|
}), o;
|
|
2709
2726
|
}
|
|
2710
|
-
function
|
|
2727
|
+
function fr(e) {
|
|
2711
2728
|
return {
|
|
2712
2729
|
get(t, n) {
|
|
2713
|
-
let r =
|
|
2730
|
+
let r = lr(n);
|
|
2714
2731
|
if (r.answered) return r.value;
|
|
2715
2732
|
if (n === "$") return e;
|
|
2716
2733
|
},
|
|
@@ -2725,70 +2742,71 @@ function lr(e) {
|
|
|
2725
2742
|
}
|
|
2726
2743
|
};
|
|
2727
2744
|
}
|
|
2728
|
-
function
|
|
2729
|
-
if (
|
|
2730
|
-
let t =
|
|
2745
|
+
function pr(e) {
|
|
2746
|
+
if (ir.has(e)) return e;
|
|
2747
|
+
let t = rr.get(e);
|
|
2731
2748
|
if (t) return t;
|
|
2732
2749
|
let n;
|
|
2733
|
-
return e instanceof Y ? (Object.keys(e.fields).forEach(Pn), Nn.add(e), n = new Proxy({},
|
|
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;
|
|
2734
2751
|
}
|
|
2735
2752
|
//#endregion
|
|
2736
2753
|
//#region src/index.ts
|
|
2737
|
-
var
|
|
2738
|
-
AbortEventHandlingException: () =>
|
|
2739
|
-
AccessChangedAction: () =>
|
|
2740
|
-
AccessChangingAction: () =>
|
|
2741
|
-
Action: () =>
|
|
2742
|
-
ActionsMap: () =>
|
|
2743
|
-
CommandException: () =>
|
|
2744
|
-
ConditionalAccessAction: () =>
|
|
2745
|
-
ConditionalStatementAction: () =>
|
|
2746
|
-
ConditionalValueAction: () =>
|
|
2747
|
-
ConditionalVisibilityAction: () =>
|
|
2748
|
-
Container: () =>
|
|
2749
|
-
ContributionChangedAction: () =>
|
|
2750
|
-
ERROR_NAMESPACE: () =>
|
|
2751
|
-
EnabledChangedAction: () =>
|
|
2752
|
-
EnabledChangingAction: () =>
|
|
2753
|
-
ErrorPolicy: () =>
|
|
2754
|
-
ExecuteAction: () =>
|
|
2755
|
-
Field: () =>
|
|
2756
|
-
FieldActionBase: () =>
|
|
2757
|
-
FieldBase: () =>
|
|
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,
|
|
2770
|
+
ErrorPolicy: () => M,
|
|
2771
|
+
ExecuteAction: () => U,
|
|
2772
|
+
Field: () => K,
|
|
2773
|
+
FieldActionBase: () => E,
|
|
2774
|
+
FieldBase: () => H,
|
|
2758
2775
|
Group: () => Y,
|
|
2759
|
-
List: () =>
|
|
2760
|
-
ListItemAddedAction: () =>
|
|
2761
|
-
ListItemRemovedAction: () =>
|
|
2762
|
-
Operator: () =>
|
|
2763
|
-
RejectAction: () =>
|
|
2764
|
-
Statement: () =>
|
|
2765
|
-
SubmitAction: () =>
|
|
2766
|
-
SubmitFailedException: () =>
|
|
2767
|
-
SubmitRefusedException: () =>
|
|
2768
|
-
TargetedExecuteAction: () =>
|
|
2769
|
-
ValidChangedAction: () =>
|
|
2770
|
-
ValidationError: () =>
|
|
2771
|
-
Validators: () =>
|
|
2772
|
-
ValueChangedAction: () =>
|
|
2773
|
-
VisibilityChangedAction: () =>
|
|
2774
|
-
VisibilityChangingAction: () =>
|
|
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,
|
|
2789
|
+
ValueChangedAction: () => N,
|
|
2790
|
+
VisibilityChangedAction: () => tn,
|
|
2791
|
+
VisibilityChangingAction: () => $t,
|
|
2775
2792
|
accessValues: () => _,
|
|
2776
|
-
configureDevtools: () =>
|
|
2793
|
+
configureDevtools: () => Se,
|
|
2777
2794
|
defaultAccess: () => le,
|
|
2778
2795
|
defaultVisibility: () => fe,
|
|
2779
|
-
describeState: () =>
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2796
|
+
describeState: () => be,
|
|
2797
|
+
elementAt: () => Hn,
|
|
2798
|
+
errorRemovals: () => dt,
|
|
2799
|
+
hideState: () => xe,
|
|
2800
|
+
installPlugin: () => Ne,
|
|
2783
2801
|
isAccess: () => ue,
|
|
2784
|
-
isEqual: () =>
|
|
2802
|
+
isEqual: () => Wn,
|
|
2785
2803
|
isVisibility: () => pe,
|
|
2786
|
-
setDefaultErrorPolicies: () =>
|
|
2787
|
-
transaction: () =>
|
|
2788
|
-
view: () =>
|
|
2804
|
+
setDefaultErrorPolicies: () => bt,
|
|
2805
|
+
transaction: () => w,
|
|
2806
|
+
view: () => pr,
|
|
2789
2807
|
visibilityValues: () => de
|
|
2790
2808
|
});
|
|
2791
2809
|
//#endregion
|
|
2792
|
-
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 };
|
|
2793
2811
|
|
|
2794
2812
|
//# sourceMappingURL=dynamicforms-vue-forms.js.map
|