@dynamicforms/vue-forms 0.3.3 → 0.3.5
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.
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var ht = Object.defineProperty, gt = Object.defineProperties;
|
|
2
|
+
var dt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var w = Object.getOwnPropertySymbols;
|
|
4
4
|
var J = Object.prototype.hasOwnProperty, K = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var B = (n, i, t) => i in n ?
|
|
5
|
+
var B = (n, i, t) => i in n ? ht(n, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[i] = t, P = (n, i) => {
|
|
6
6
|
for (var t in i || (i = {}))
|
|
7
7
|
J.call(i, t) && B(n, t, i[t]);
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
8
|
+
if (w)
|
|
9
|
+
for (var t of w(i))
|
|
10
10
|
K.call(i, t) && B(n, t, i[t]);
|
|
11
11
|
return n;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, O = (n, i) => gt(n, dt(i));
|
|
13
|
+
var I = (n, i) => {
|
|
14
14
|
var t = {};
|
|
15
15
|
for (var e in n)
|
|
16
16
|
J.call(n, e) && i.indexOf(e) < 0 && (t[e] = n[e]);
|
|
17
|
-
if (n != null &&
|
|
18
|
-
for (var e of
|
|
17
|
+
if (n != null && w)
|
|
18
|
+
for (var e of w(n))
|
|
19
19
|
i.indexOf(e) < 0 && K.call(n, e) && (t[e] = n[e]);
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
var o = (n, i, t) => B(n, typeof i != "symbol" ? i + "" : i, t);
|
|
23
|
-
import { isEqual as R, isBoolean as
|
|
24
|
-
import { unref as d, computed as
|
|
25
|
-
var
|
|
23
|
+
import { isEqual as R, isBoolean as ft, isString as V, isEmpty as q, truncate as pt, isArray as tt, isObject as et } from "lodash-es";
|
|
24
|
+
import { unref as d, computed as z, reactive as bt } from "vue";
|
|
25
|
+
var S = /* @__PURE__ */ ((n) => (n[n.SUPPRESS = 1] = "SUPPRESS", n[n.HIDDEN = 5] = "HIDDEN", n[n.INVISIBLE = 8] = "INVISIBLE", n[n.FULL = 10] = "FULL", n))(S || {});
|
|
26
26
|
const Y = 10;
|
|
27
27
|
((n) => {
|
|
28
28
|
function i(s) {
|
|
@@ -39,9 +39,9 @@ const Y = 10;
|
|
|
39
39
|
return Object.values(n).includes(r);
|
|
40
40
|
}
|
|
41
41
|
n.isDefined = e;
|
|
42
|
-
})(
|
|
43
|
-
Object.freeze(
|
|
44
|
-
const
|
|
42
|
+
})(S || (S = {}));
|
|
43
|
+
Object.freeze(S);
|
|
44
|
+
const A = S;
|
|
45
45
|
class p {
|
|
46
46
|
constructor(i) {
|
|
47
47
|
o(this, "executorFn");
|
|
@@ -69,27 +69,27 @@ class p {
|
|
|
69
69
|
}
|
|
70
70
|
class M extends Error {
|
|
71
71
|
}
|
|
72
|
-
const
|
|
73
|
-
class
|
|
72
|
+
const it = Symbol("ValueChangedAction");
|
|
73
|
+
class v extends p {
|
|
74
74
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
75
75
|
constructor(i) {
|
|
76
76
|
super(i);
|
|
77
77
|
}
|
|
78
78
|
// eslint-disable-next-line class-methods-use-this
|
|
79
79
|
static get classIdentifier() {
|
|
80
|
-
return
|
|
80
|
+
return it;
|
|
81
81
|
}
|
|
82
82
|
execute(i, t, e, s) {
|
|
83
83
|
return super.execute(i, t, e, s);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
class
|
|
86
|
+
class F extends String {
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function G(n) {
|
|
89
89
|
const i = d(n);
|
|
90
90
|
return typeof i == "object" && "componentName" in i;
|
|
91
91
|
}
|
|
92
|
-
class
|
|
92
|
+
class H {
|
|
93
93
|
get componentName() {
|
|
94
94
|
return "Comment";
|
|
95
95
|
}
|
|
@@ -103,7 +103,7 @@ class z {
|
|
|
103
103
|
}
|
|
104
104
|
// eslint-disable-line class-methods-use-this
|
|
105
105
|
}
|
|
106
|
-
class
|
|
106
|
+
class vt extends H {
|
|
107
107
|
constructor(t) {
|
|
108
108
|
super();
|
|
109
109
|
o(this, "text");
|
|
@@ -117,16 +117,16 @@ class yt extends z {
|
|
|
117
117
|
return this.text;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
class
|
|
120
|
+
class b extends H {
|
|
121
121
|
constructor(t) {
|
|
122
122
|
super();
|
|
123
123
|
o(this, "text");
|
|
124
124
|
o(this, "textType");
|
|
125
|
-
this.text = t, this.textType =
|
|
125
|
+
this.text = t, this.textType = z(() => this.getTextType);
|
|
126
126
|
}
|
|
127
127
|
get getTextType() {
|
|
128
128
|
const t = d(this.text);
|
|
129
|
-
return t ? t instanceof
|
|
129
|
+
return t ? t instanceof F ? "md" : G(t) ? "component" : "string" : "string";
|
|
130
130
|
}
|
|
131
131
|
get componentName() {
|
|
132
132
|
switch (d(this.textType)) {
|
|
@@ -161,8 +161,8 @@ class v extends z {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
const
|
|
165
|
-
class f extends
|
|
164
|
+
const mt = Symbol("Validator");
|
|
165
|
+
class f extends v {
|
|
166
166
|
/**
|
|
167
167
|
* Creates a new validator
|
|
168
168
|
* @param validationFn Function that validates the field value and returns errors or null
|
|
@@ -170,15 +170,15 @@ class f extends b {
|
|
|
170
170
|
constructor(t) {
|
|
171
171
|
super((s, r, a, l) => {
|
|
172
172
|
const c = t(a, l, s) || [], u = (h) => {
|
|
173
|
-
var
|
|
173
|
+
var C;
|
|
174
174
|
h == null || h.forEach(
|
|
175
175
|
(x) => Object.defineProperty(x, "source", { value: this.source, enumerable: !1, configurable: !1 })
|
|
176
176
|
);
|
|
177
177
|
for (let x = s.errors.length - 1; x >= 0; x--) {
|
|
178
|
-
const
|
|
179
|
-
if (
|
|
180
|
-
const
|
|
181
|
-
|
|
178
|
+
const T = s.errors[x];
|
|
179
|
+
if (T.source === this.source) {
|
|
180
|
+
const j = (C = h == null ? void 0 : h.findIndex(($) => R($, T))) != null ? C : -1;
|
|
181
|
+
j >= 0 ? h == null || h.splice(j, 1) : s.errors.splice(x, 1);
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
h && h.length > 0 && s.errors.push(...h), s.validate();
|
|
@@ -192,7 +192,7 @@ class f extends b {
|
|
|
192
192
|
}
|
|
193
193
|
// eslint-disable-next-line class-methods-use-this
|
|
194
194
|
static get classIdentifier() {
|
|
195
|
-
return
|
|
195
|
+
return mt;
|
|
196
196
|
}
|
|
197
197
|
// eslint-disable-next-line class-methods-use-this
|
|
198
198
|
get eager() {
|
|
@@ -200,14 +200,14 @@ class f extends b {
|
|
|
200
200
|
}
|
|
201
201
|
// eslint-disable-next-line class-methods-use-this
|
|
202
202
|
replacePlaceholders(t, e) {
|
|
203
|
-
if (
|
|
203
|
+
if (G(t)) return t;
|
|
204
204
|
let s = t;
|
|
205
205
|
return Object.keys(e).forEach((r) => {
|
|
206
206
|
s = s.replaceAll(`{${r}}`, e[r]);
|
|
207
|
-
}), t instanceof
|
|
207
|
+
}), t instanceof F ? new F(s) : s;
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
class
|
|
210
|
+
class N extends Map {
|
|
211
211
|
constructor() {
|
|
212
212
|
super(...arguments);
|
|
213
213
|
o(this, "eagerActions", /* @__PURE__ */ new Set());
|
|
@@ -224,7 +224,7 @@ class w extends Map {
|
|
|
224
224
|
}
|
|
225
225
|
trigger(t, e, ...s) {
|
|
226
226
|
const r = t.classIdentifier;
|
|
227
|
-
r ===
|
|
227
|
+
r === it && this.triggerEager(e, ...s);
|
|
228
228
|
const a = this.get(r);
|
|
229
229
|
try {
|
|
230
230
|
if (a) return a(e, ...s);
|
|
@@ -244,18 +244,18 @@ class w extends Map {
|
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
clone() {
|
|
247
|
-
const t = new
|
|
247
|
+
const t = new N();
|
|
248
248
|
return this.registeredActions.forEach((e) => t.register(e)), t;
|
|
249
249
|
}
|
|
250
250
|
cloneWithoutValidators() {
|
|
251
|
-
const t = new
|
|
251
|
+
const t = new N();
|
|
252
252
|
return this.registeredActions.forEach((e) => {
|
|
253
253
|
e instanceof f ? e.unregister() : t.register(e);
|
|
254
254
|
}), t;
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
const
|
|
258
|
-
class
|
|
257
|
+
const yt = Symbol("ConditionalStatementAction");
|
|
258
|
+
class U extends v {
|
|
259
259
|
constructor(t, e) {
|
|
260
260
|
const s = (r, a, l, c) => {
|
|
261
261
|
const u = t.evaluate();
|
|
@@ -271,11 +271,11 @@ class D extends b {
|
|
|
271
271
|
// boundField tracks the fields this action is bound to. so that it may perform the executorFn on them and not on the
|
|
272
272
|
// ValueChangedAction fields that will call the actionExecutor
|
|
273
273
|
o(this, "boundFields", /* @__PURE__ */ new Set());
|
|
274
|
-
t.collectFields().forEach((r) => r.registerAction(new
|
|
274
|
+
t.collectFields().forEach((r) => r.registerAction(new v(s)));
|
|
275
275
|
}
|
|
276
276
|
// eslint-disable-next-line class-methods-use-this
|
|
277
277
|
static get classIdentifier() {
|
|
278
|
-
return
|
|
278
|
+
return yt;
|
|
279
279
|
}
|
|
280
280
|
// eslint-disable-next-line class-methods-use-this
|
|
281
281
|
get eager() {
|
|
@@ -285,21 +285,21 @@ class D extends b {
|
|
|
285
285
|
this.boundFields.add(t);
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
-
class
|
|
288
|
+
class xt extends U {
|
|
289
289
|
constructor(i) {
|
|
290
290
|
super(i, (t, e) => {
|
|
291
|
-
t.visibility = e ?
|
|
291
|
+
t.visibility = e ? A.FULL : A.SUPPRESS;
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
class
|
|
295
|
+
class Et extends U {
|
|
296
296
|
constructor(i) {
|
|
297
297
|
super(i, (t, e) => {
|
|
298
298
|
t.enabled = e;
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
class
|
|
302
|
+
class Vt extends U {
|
|
303
303
|
constructor(i, t) {
|
|
304
304
|
super(i, (e, s) => {
|
|
305
305
|
s && (e.value = t);
|
|
@@ -346,79 +346,79 @@ var L = /* @__PURE__ */ ((n) => (n[n.NOT = 0] = "NOT", n[n.OR = 1] = "OR", n[n.A
|
|
|
346
346
|
n.isLogicOperator = s;
|
|
347
347
|
})(L || (L = {}));
|
|
348
348
|
Object.freeze(L);
|
|
349
|
-
const g = L,
|
|
350
|
-
class
|
|
349
|
+
const g = L, At = Symbol("EnabledChangingAction");
|
|
350
|
+
class nt extends p {
|
|
351
351
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
352
352
|
constructor(i) {
|
|
353
353
|
super(i);
|
|
354
354
|
}
|
|
355
355
|
// eslint-disable-next-line class-methods-use-this
|
|
356
356
|
static get classIdentifier() {
|
|
357
|
-
return
|
|
357
|
+
return At;
|
|
358
358
|
}
|
|
359
359
|
execute(i, t, e, s) {
|
|
360
360
|
return super.execute(i, t, e, s);
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
-
const
|
|
364
|
-
class
|
|
363
|
+
const Ct = Symbol("EnabledChangedAction");
|
|
364
|
+
class st extends p {
|
|
365
365
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
366
366
|
constructor(i) {
|
|
367
367
|
super(i);
|
|
368
368
|
}
|
|
369
369
|
// eslint-disable-next-line class-methods-use-this
|
|
370
370
|
static get classIdentifier() {
|
|
371
|
-
return
|
|
371
|
+
return Ct;
|
|
372
372
|
}
|
|
373
373
|
execute(i, t, e, s) {
|
|
374
374
|
return super.execute(i, t, e, s);
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
|
-
const
|
|
378
|
-
class
|
|
377
|
+
const It = Symbol("ValidChangedAction");
|
|
378
|
+
class rt extends p {
|
|
379
379
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
380
380
|
constructor(i) {
|
|
381
381
|
super(i);
|
|
382
382
|
}
|
|
383
383
|
// eslint-disable-next-line class-methods-use-this
|
|
384
384
|
static get classIdentifier() {
|
|
385
|
-
return
|
|
385
|
+
return It;
|
|
386
386
|
}
|
|
387
387
|
execute(i, t, e, s) {
|
|
388
388
|
return super.execute(i, t, e, s);
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
const
|
|
392
|
-
class
|
|
391
|
+
const _t = Symbol("VisibilityChangingAction");
|
|
392
|
+
class at extends p {
|
|
393
393
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
394
394
|
constructor(i) {
|
|
395
395
|
super(i);
|
|
396
396
|
}
|
|
397
397
|
// eslint-disable-next-line class-methods-use-this
|
|
398
398
|
static get classIdentifier() {
|
|
399
|
-
return
|
|
399
|
+
return _t;
|
|
400
400
|
}
|
|
401
401
|
execute(i, t, e, s) {
|
|
402
402
|
return super.execute(i, t, e, s);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
|
-
const
|
|
406
|
-
class
|
|
405
|
+
const St = Symbol("VisibilityChangedAction");
|
|
406
|
+
class lt extends p {
|
|
407
407
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
408
408
|
constructor(i) {
|
|
409
409
|
super(i);
|
|
410
410
|
}
|
|
411
411
|
// eslint-disable-next-line class-methods-use-this
|
|
412
412
|
static get classIdentifier() {
|
|
413
|
-
return
|
|
413
|
+
return St;
|
|
414
414
|
}
|
|
415
415
|
execute(i, t, e, s) {
|
|
416
416
|
return super.execute(i, t, e, s);
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
class
|
|
419
|
+
class y {
|
|
420
420
|
constructor() {
|
|
421
|
-
o(this, "reactiveValue",
|
|
421
|
+
o(this, "reactiveValue", z(() => this.value));
|
|
422
422
|
// contains original field value as was provided at creation
|
|
423
423
|
o(this, "validatingCount", 0);
|
|
424
424
|
o(this, "validating", !1);
|
|
@@ -426,30 +426,30 @@ class m {
|
|
|
426
426
|
// is current value valid as per FE and BE validators?
|
|
427
427
|
o(this, "errors", []);
|
|
428
428
|
// when member of a Group, fieldName specifies the name of this field
|
|
429
|
-
o(this, "actions", new
|
|
429
|
+
o(this, "actions", new N());
|
|
430
430
|
// default property handlers
|
|
431
|
-
o(this, "_visibility",
|
|
431
|
+
o(this, "_visibility", A.FULL);
|
|
432
432
|
o(this, "_enabled", !0);
|
|
433
433
|
}
|
|
434
434
|
get visibility() {
|
|
435
435
|
return this._visibility;
|
|
436
436
|
}
|
|
437
437
|
set visibility(i) {
|
|
438
|
-
const t = this._visibility, e = this.actions.trigger(
|
|
439
|
-
if (!
|
|
440
|
-
this._visibility =
|
|
438
|
+
const t = this._visibility, e = this.actions.trigger(at, this, i, t);
|
|
439
|
+
if (!A.isDefined(e != null ? e : i)) throw new Error("visibility must be a DisplayMode constant");
|
|
440
|
+
this._visibility = A.fromAny(e != null ? e : i), this.actions.trigger(lt, this, this._visibility, t);
|
|
441
441
|
}
|
|
442
442
|
get enabled() {
|
|
443
443
|
return this._enabled;
|
|
444
444
|
}
|
|
445
445
|
set enabled(i) {
|
|
446
|
-
const t = this._enabled, e = this.actions.trigger(
|
|
447
|
-
if (!
|
|
448
|
-
this._enabled = e != null ? e : i, this.actions.trigger(
|
|
446
|
+
const t = this._enabled, e = this.actions.trigger(nt, this, i, t);
|
|
447
|
+
if (!ft(e != null ? e : i)) throw new Error("Enabled value must be boolean");
|
|
448
|
+
this._enabled = e != null ? e : i, this.actions.trigger(st, this, this._enabled, t);
|
|
449
449
|
}
|
|
450
450
|
validate() {
|
|
451
451
|
const i = this._valid;
|
|
452
|
-
this._valid = this.valid, this._valid !== i && this.actions.trigger(
|
|
452
|
+
this._valid = this.valid, this._valid !== i && this.actions.trigger(rt, this, this.valid, i);
|
|
453
453
|
}
|
|
454
454
|
get valid() {
|
|
455
455
|
return this.errors.length === 0;
|
|
@@ -471,10 +471,10 @@ class m {
|
|
|
471
471
|
this.actions = this.actions.cloneWithoutValidators(), this.errors = [], this._valid = !0;
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function Ft(n, i) {
|
|
475
475
|
return n ? !i : i;
|
|
476
476
|
}
|
|
477
|
-
class
|
|
477
|
+
class _ {
|
|
478
478
|
constructor(i, t, e) {
|
|
479
479
|
o(this, "operand1");
|
|
480
480
|
o(this, "operator");
|
|
@@ -482,10 +482,10 @@ class F {
|
|
|
482
482
|
this.operand1 = i, this.operator = t, this.operand2 = e;
|
|
483
483
|
}
|
|
484
484
|
get operand1Value() {
|
|
485
|
-
return this.operand1 instanceof
|
|
485
|
+
return this.operand1 instanceof _ ? this.operand1.evaluate() : this.operand1 instanceof y ? d(this.operand1.value) : this.operand1;
|
|
486
486
|
}
|
|
487
487
|
get operand2Value() {
|
|
488
|
-
return this.operand2 instanceof
|
|
488
|
+
return this.operand2 instanceof _ ? this.operand2.evaluate() : this.operand2 instanceof y ? d(this.operand2.value) : this.operand2;
|
|
489
489
|
}
|
|
490
490
|
evaluate() {
|
|
491
491
|
var e, s, r, a;
|
|
@@ -500,7 +500,7 @@ class F {
|
|
|
500
500
|
case g.NOR:
|
|
501
501
|
return !(i || t);
|
|
502
502
|
case g.XOR:
|
|
503
|
-
return
|
|
503
|
+
return Ft(i, t);
|
|
504
504
|
case g.NOT:
|
|
505
505
|
return !i;
|
|
506
506
|
case g.EQUALS:
|
|
@@ -520,9 +520,9 @@ class F {
|
|
|
520
520
|
case g.NOT_IN:
|
|
521
521
|
return !((a = (r = t == null ? void 0 : t.includes) == null ? void 0 : r.call(t, i)) == null || a);
|
|
522
522
|
case g.INCLUDES:
|
|
523
|
-
return
|
|
523
|
+
return V(i) && V(t) && i.indexOf(t) >= 0;
|
|
524
524
|
case g.NOT_INCLUDES:
|
|
525
|
-
return !(
|
|
525
|
+
return !(V(i) && V(t) && i.indexOf(t) >= 0);
|
|
526
526
|
default:
|
|
527
527
|
throw new Error(`Operator not implemented ${this.operator}`);
|
|
528
528
|
}
|
|
@@ -534,27 +534,27 @@ class F {
|
|
|
534
534
|
collectFields() {
|
|
535
535
|
const i = /* @__PURE__ */ new Set();
|
|
536
536
|
function t(e) {
|
|
537
|
-
e instanceof
|
|
537
|
+
e instanceof y ? i.add(e) : e instanceof _ && e.collectFields().forEach((r) => i.add(r));
|
|
538
538
|
}
|
|
539
539
|
return t(this.operand1), t(this.operand2), i;
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
const
|
|
543
|
-
class
|
|
542
|
+
const Nt = Symbol("ExecuteAction");
|
|
543
|
+
class ot extends p {
|
|
544
544
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
545
545
|
constructor(i) {
|
|
546
546
|
super(i);
|
|
547
547
|
}
|
|
548
548
|
// eslint-disable-next-line class-methods-use-this
|
|
549
549
|
static get classIdentifier() {
|
|
550
|
-
return
|
|
550
|
+
return Nt;
|
|
551
551
|
}
|
|
552
552
|
execute(i, t, e) {
|
|
553
553
|
return super.execute(i, t, e);
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
const Lt = Symbol("ListItemAddedAction");
|
|
557
|
-
class
|
|
557
|
+
class Q extends p {
|
|
558
558
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
559
559
|
constructor(i) {
|
|
560
560
|
super(i);
|
|
@@ -567,89 +567,33 @@ class G extends p {
|
|
|
567
567
|
return super.execute(i, t, e, s);
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
const
|
|
571
|
-
class
|
|
570
|
+
const Tt = Symbol("ListItemRemovedAction");
|
|
571
|
+
class ct extends p {
|
|
572
572
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
573
573
|
constructor(i) {
|
|
574
574
|
super(i);
|
|
575
575
|
}
|
|
576
576
|
// eslint-disable-next-line class-methods-use-this
|
|
577
577
|
static get classIdentifier() {
|
|
578
|
-
return
|
|
578
|
+
return Tt;
|
|
579
579
|
}
|
|
580
580
|
execute(i, t, e, s) {
|
|
581
581
|
return super.execute(i, t, e, s);
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
}
|
|
587
|
-
const Z = Symbol("ActionConstructorGuard");
|
|
588
|
-
class H extends m {
|
|
589
|
-
constructor(t) {
|
|
590
|
-
super();
|
|
591
|
-
o(this, "_value", { label: void 0, icon: void 0 });
|
|
592
|
-
if (t !== Z)
|
|
593
|
-
throw new TypeError("Don't use constructor to instantiate Action. Use Action.create<T>");
|
|
594
|
-
}
|
|
595
|
-
init(t) {
|
|
596
|
-
if (t) {
|
|
597
|
-
const e = t, { value: s, originalValue: r, validators: a, actions: l } = e, c = S(e, ["value", "originalValue", "validators", "actions"]);
|
|
598
|
-
[...a || [], ...l || []].forEach((V) => this.registerAction(V)), Object.assign(this, c);
|
|
599
|
-
const u = k(s, this._value), h = Object.freeze({ label: r == null ? void 0 : r.label, icon: r == null ? void 0 : r.icon });
|
|
600
|
-
this._value = k(u, h), this.originalValue = k(h, u);
|
|
601
|
-
}
|
|
602
|
-
this.actions.triggerEager(this, this.value, this.originalValue), this.validate();
|
|
603
|
-
}
|
|
604
|
-
static create(t) {
|
|
605
|
-
const e = st(new this(Z));
|
|
606
|
-
return e.init(t), e;
|
|
607
|
-
}
|
|
608
|
-
get value() {
|
|
609
|
-
return this._value;
|
|
610
|
-
}
|
|
611
|
-
set value(t) {
|
|
612
|
-
if (!this.enabled) return;
|
|
613
|
-
const e = this._value;
|
|
614
|
-
this._value = t, this.actions.trigger(b, this, t, e), this.parent && this.parent.notifyValueChanged(), this.validate();
|
|
615
|
-
}
|
|
616
|
-
get icon() {
|
|
617
|
-
return this.value.icon;
|
|
618
|
-
}
|
|
619
|
-
set icon(t) {
|
|
620
|
-
this.value.icon = t;
|
|
621
|
-
}
|
|
622
|
-
get label() {
|
|
623
|
-
return this.value.label;
|
|
624
|
-
}
|
|
625
|
-
set label(t) {
|
|
626
|
-
this.value.label = t;
|
|
627
|
-
}
|
|
628
|
-
clone(t) {
|
|
629
|
-
var s, r, a;
|
|
630
|
-
const e = H.create(I(_({
|
|
631
|
-
value: (s = t == null ? void 0 : t.value) != null ? s : this.value
|
|
632
|
-
}, t && "originalValue" in t ? { originalValue: t.originalValue } : {}), {
|
|
633
|
-
enabled: (r = t == null ? void 0 : t.enabled) != null ? r : this.enabled,
|
|
634
|
-
visibility: (a = t == null ? void 0 : t.visibility) != null ? a : this.visibility
|
|
635
|
-
}));
|
|
636
|
-
return e.actions = this.actions.clone(), e.actions.triggerEager(e, e.value, e.originalValue), e;
|
|
637
|
-
}
|
|
638
|
-
execute(t) {
|
|
639
|
-
this.actions.trigger(ht, this, t);
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
const tt = Symbol("FieldConstructorGuard");
|
|
643
|
-
class j extends m {
|
|
584
|
+
const Z = Symbol("FieldConstructorGuard");
|
|
585
|
+
class D extends y {
|
|
644
586
|
constructor(t) {
|
|
645
587
|
super();
|
|
646
588
|
o(this, "_value");
|
|
647
|
-
if (t !==
|
|
648
|
-
|
|
589
|
+
if (t !== Z) {
|
|
590
|
+
const e = this.constructor.name;
|
|
591
|
+
throw new TypeError(`Don't use constructor to instantiate ${e}. Use ${e}.create<T>`);
|
|
592
|
+
}
|
|
649
593
|
}
|
|
650
594
|
init(t) {
|
|
651
595
|
if (t) {
|
|
652
|
-
const e = t, { value: s, validators: r, actions: a } = e, l =
|
|
596
|
+
const e = t, { value: s, validators: r, actions: a } = e, l = I(e, ["value", "validators", "actions"]);
|
|
653
597
|
[...r || [], ...a || []].forEach((c) => this.registerAction(c)), Object.assign(this, l), this._value = s != null ? s : this.originalValue, this.originalValue === void 0 && (this.originalValue = this._value);
|
|
654
598
|
}
|
|
655
599
|
this.actions.triggerEager(this, this.value, this.originalValue), this.validate();
|
|
@@ -660,19 +604,19 @@ class j extends m {
|
|
|
660
604
|
* @returns Reactive Field instance
|
|
661
605
|
*/
|
|
662
606
|
static create(t) {
|
|
663
|
-
const e =
|
|
607
|
+
const e = bt(new this(Z));
|
|
664
608
|
return e.init(t), e;
|
|
665
609
|
}
|
|
666
610
|
get value() {
|
|
667
|
-
return
|
|
611
|
+
return this._value;
|
|
668
612
|
}
|
|
669
613
|
set value(t) {
|
|
670
614
|
const e = this._value;
|
|
671
|
-
!this.enabled || e === t || (this._value = t, this.actions.trigger(
|
|
615
|
+
!this.enabled || e === t || (this._value = t, this.actions.trigger(v, this, this._value, e), this.parent && this.parent.notifyValueChanged(), this.validate());
|
|
672
616
|
}
|
|
673
617
|
clone(t) {
|
|
674
618
|
var s, r, a;
|
|
675
|
-
const e =
|
|
619
|
+
const e = this.constructor.create(O(P({
|
|
676
620
|
value: (s = t == null ? void 0 : t.value) != null ? s : this.value
|
|
677
621
|
}, t && "originalValue" in t ? { originalValue: t.originalValue } : {}), {
|
|
678
622
|
enabled: (r = t == null ? void 0 : t.enabled) != null ? r : this.enabled,
|
|
@@ -681,20 +625,56 @@ class j extends m {
|
|
|
681
625
|
return e.actions = this.actions.clone(), e.actions.triggerEager(e, e.value, e.originalValue), e;
|
|
682
626
|
}
|
|
683
627
|
}
|
|
684
|
-
const
|
|
628
|
+
const jt = D.create({ value: "EmptyField" }).registerAction(new v(
|
|
685
629
|
() => {
|
|
686
630
|
console.warn("Working with EmptyField! This should not happen");
|
|
687
631
|
}
|
|
688
632
|
));
|
|
689
|
-
|
|
633
|
+
function k(n, i) {
|
|
634
|
+
return (n == null ? void 0 : n.label) == null && (n == null ? void 0 : n.icon) == null ? i : n;
|
|
635
|
+
}
|
|
636
|
+
class wt extends D {
|
|
637
|
+
constructor(i) {
|
|
638
|
+
super(i), this._value = { label: void 0, icon: void 0 };
|
|
639
|
+
}
|
|
640
|
+
init(i) {
|
|
641
|
+
if (i) {
|
|
642
|
+
const t = i, { value: e, originalValue: s, validators: r, actions: a } = t, l = I(t, ["value", "originalValue", "validators", "actions"]);
|
|
643
|
+
[...r || [], ...a || []].forEach((h) => this.registerAction(h)), Object.assign(this, l);
|
|
644
|
+
const c = k(e, this._value), u = Object.freeze({ label: s == null ? void 0 : s.label, icon: s == null ? void 0 : s.icon });
|
|
645
|
+
this._value = k(c, u), this.originalValue = k(u, c);
|
|
646
|
+
}
|
|
647
|
+
this.actions.triggerEager(this, this.value, this.originalValue), this.validate();
|
|
648
|
+
}
|
|
649
|
+
static create(i) {
|
|
650
|
+
return super.create(i);
|
|
651
|
+
}
|
|
652
|
+
get icon() {
|
|
653
|
+
return this.value.icon;
|
|
654
|
+
}
|
|
655
|
+
set icon(i) {
|
|
656
|
+
this.value.icon = i;
|
|
657
|
+
}
|
|
658
|
+
get label() {
|
|
659
|
+
return this.value.label;
|
|
660
|
+
}
|
|
661
|
+
set label(i) {
|
|
662
|
+
this.value.label = i;
|
|
663
|
+
}
|
|
664
|
+
execute(i) {
|
|
665
|
+
this.actions.trigger(ot, this, i);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
class E extends y {
|
|
690
669
|
constructor(t, e) {
|
|
691
670
|
super();
|
|
692
671
|
o(this, "_fields");
|
|
693
672
|
o(this, "_value", null);
|
|
673
|
+
o(this, "reactiveValue", z(() => this.value));
|
|
694
674
|
o(this, "suppressNotifyValueChanged", !1);
|
|
695
675
|
if (!E.isValidFields(t)) throw new Error("Invalid fields object provided");
|
|
696
676
|
if (this._fields = {}, Object.entries(t).forEach(([r, a]) => this.addField(r, a)), e) {
|
|
697
|
-
const s = e, { value: r, validators: a, actions: l } = s, c =
|
|
677
|
+
const s = e, { value: r, validators: a, actions: l } = s, c = I(s, ["value", "validators", "actions"]);
|
|
698
678
|
[...a || [], ...l || []].forEach((u) => this.registerAction(u)), Object.assign(this, c), this.value = r != null ? r : this.originalValue;
|
|
699
679
|
}
|
|
700
680
|
this.originalValue === void 0 && (this.originalValue = this.value), this.actions.triggerEager(this, this.value, this.originalValue), this.validate();
|
|
@@ -712,16 +692,16 @@ class E extends m {
|
|
|
712
692
|
}
|
|
713
693
|
static isValidFields(t) {
|
|
714
694
|
function e(s) {
|
|
715
|
-
return s instanceof
|
|
695
|
+
return s instanceof y;
|
|
716
696
|
}
|
|
717
697
|
return typeof t == "object" && t !== null && Object.entries(t).every(([, s]) => e(s));
|
|
718
698
|
}
|
|
719
699
|
static createFromFormData(t) {
|
|
720
|
-
if (t instanceof
|
|
700
|
+
if (t instanceof y)
|
|
721
701
|
throw new Error("data is already a Form structure, should be a simple object");
|
|
722
702
|
return new E(
|
|
723
703
|
t == null ? {} : Object.fromEntries(
|
|
724
|
-
Object.entries(t).map(([e, s]) => [e,
|
|
704
|
+
Object.entries(t).map(([e, s]) => [e, D.create({ value: s })])
|
|
725
705
|
)
|
|
726
706
|
);
|
|
727
707
|
}
|
|
@@ -761,7 +741,7 @@ class E extends m {
|
|
|
761
741
|
const t = this.value;
|
|
762
742
|
if (!R(t, this._value)) {
|
|
763
743
|
const e = this._value;
|
|
764
|
-
this._value = t, this.actions.trigger(
|
|
744
|
+
this._value = t, this.actions.trigger(v, this, t, e), this.parent && this.parent.notifyValueChanged(), this.validate();
|
|
765
745
|
}
|
|
766
746
|
}
|
|
767
747
|
get valid() {
|
|
@@ -773,7 +753,7 @@ class E extends m {
|
|
|
773
753
|
Object.entries(this._fields).forEach(([c, u]) => {
|
|
774
754
|
e[c] = u.clone();
|
|
775
755
|
});
|
|
776
|
-
const s = new E(e,
|
|
756
|
+
const s = new E(e, O(P({
|
|
777
757
|
value: (r = t == null ? void 0 : t.value) != null ? r : this.value
|
|
778
758
|
}, t && "originalValue" in t ? { originalValue: t.originalValue } : {}), {
|
|
779
759
|
enabled: (a = t == null ? void 0 : t.enabled) != null ? a : this.enabled,
|
|
@@ -782,14 +762,14 @@ class E extends m {
|
|
|
782
762
|
return s.actions = this.actions.clone(), s.actions.triggerEager(s, s.value, s.originalValue), s;
|
|
783
763
|
}
|
|
784
764
|
}
|
|
785
|
-
class X extends
|
|
765
|
+
class X extends y {
|
|
786
766
|
constructor(t, e) {
|
|
787
767
|
super();
|
|
788
768
|
o(this, "_value", null);
|
|
789
769
|
o(this, "_itemTemplate");
|
|
790
770
|
o(this, "_previousValue");
|
|
791
771
|
if (this._itemTemplate = t, e) {
|
|
792
|
-
const s = e, { value: r, validators: a, actions: l } = s, c =
|
|
772
|
+
const s = e, { value: r, validators: a, actions: l } = s, c = I(s, ["value", "validators", "actions"]);
|
|
793
773
|
[...a || [], ...l || []].forEach((u) => this.registerAction(u)), Object.assign(this, c), r && this.setValueInternal(r);
|
|
794
774
|
}
|
|
795
775
|
this.originalValue === void 0 && (this.originalValue = this.value), this._previousValue = this.value, this.actions.triggerEager(this, this.value, this.originalValue), this.validate();
|
|
@@ -808,11 +788,11 @@ class X extends m {
|
|
|
808
788
|
}
|
|
809
789
|
set value(t) {
|
|
810
790
|
const e = this.value;
|
|
811
|
-
this.setValueInternal(t), this.actions.trigger(
|
|
791
|
+
this.setValueInternal(t), this.actions.trigger(v, this, this.value, e), this.parent && this.parent.notifyValueChanged(), this.validate();
|
|
812
792
|
}
|
|
813
793
|
clone(t) {
|
|
814
794
|
var s, r, a, l;
|
|
815
|
-
const e = new X((s = this._itemTemplate) == null ? void 0 : s.clone(),
|
|
795
|
+
const e = new X((s = this._itemTemplate) == null ? void 0 : s.clone(), O(P({
|
|
816
796
|
value: [...(r = t == null ? void 0 : t.value) != null ? r : this.value]
|
|
817
797
|
}, t && "originalValue" in t ? { originalValue: t.originalValue } : {}), {
|
|
818
798
|
enabled: (a = t == null ? void 0 : t.enabled) != null ? a : this.enabled,
|
|
@@ -824,7 +804,7 @@ class X extends m {
|
|
|
824
804
|
const t = this.value;
|
|
825
805
|
if (!R(t, this._previousValue)) {
|
|
826
806
|
const e = this._previousValue;
|
|
827
|
-
this._previousValue = t, this.actions.trigger(
|
|
807
|
+
this._previousValue = t, this.actions.trigger(v, this, t, e), this.parent && this.parent.notifyValueChanged(), this.validate();
|
|
828
808
|
}
|
|
829
809
|
}
|
|
830
810
|
get valid() {
|
|
@@ -846,44 +826,44 @@ class X extends m {
|
|
|
846
826
|
var s;
|
|
847
827
|
if (this._value == null || t < 0 || this._value.length <= t) return;
|
|
848
828
|
let e = (s = this._value.splice(t, 1)) == null ? void 0 : s[0];
|
|
849
|
-
return e && (e = e.clone(), this.actions.trigger(
|
|
829
|
+
return e && (e = e.clone(), this.actions.trigger(ct, this, e, t), this.notifyValueChanged()), e;
|
|
850
830
|
}
|
|
851
831
|
insert(t, e) {
|
|
852
832
|
for (this._value == null && (this._value = []); this._value.length < e; ) {
|
|
853
833
|
const r = this.processSetValueItem(null), a = this._value.push(r);
|
|
854
|
-
this.actions.trigger(
|
|
834
|
+
this.actions.trigger(Q, this, r, a);
|
|
855
835
|
}
|
|
856
836
|
const s = this.processSetValueItem(t);
|
|
857
|
-
return this._value.splice(e, 0, s), this.actions.trigger(
|
|
837
|
+
return this._value.splice(e, 0, s), this.actions.trigger(Q, this, s, e), this.notifyValueChanged(), e;
|
|
858
838
|
}
|
|
859
839
|
clear() {
|
|
860
840
|
this._value = null, this.notifyValueChanged();
|
|
861
841
|
}
|
|
862
842
|
}
|
|
863
|
-
const
|
|
864
|
-
function
|
|
865
|
-
return
|
|
843
|
+
const ut = { useMarkdownInValidators: !0 };
|
|
844
|
+
function Pt() {
|
|
845
|
+
return ut;
|
|
866
846
|
}
|
|
867
|
-
function
|
|
868
|
-
Object.assign(
|
|
847
|
+
function Ot(n) {
|
|
848
|
+
Object.assign(ut, n);
|
|
869
849
|
}
|
|
870
|
-
const
|
|
850
|
+
const Kt = {
|
|
871
851
|
install(n, i) {
|
|
872
|
-
i &&
|
|
852
|
+
i && Ot(i);
|
|
873
853
|
}
|
|
874
854
|
};
|
|
875
|
-
function
|
|
876
|
-
return
|
|
855
|
+
function m(n) {
|
|
856
|
+
return Pt().useMarkdownInValidators ? new F(n) : n.replace(/[*_~`]/g, "").replace(/\[.*?\]\((.*?)\)/g, "$1").replace(/!\[.*?\]\((.*?)\)/g, "").replace(/#+\s?/g, "").replace(/>\s?/g, "").replace(/(\*|-|\d+\.)\s+/g, "").replace(/`{3}[\s\S]*?`{3}/g, "").replace(/`([^`]+)`/g, "$1").replace(/\n{2,}/g, `
|
|
877
857
|
`);
|
|
878
858
|
}
|
|
879
859
|
class Rt extends f {
|
|
880
860
|
constructor(t, e, s) {
|
|
881
861
|
let r = !1, a, l;
|
|
882
|
-
super((u, h,
|
|
883
|
-
|
|
862
|
+
super((u, h, C) => (a = u, l = h, r || (r = !0, this.otherField.registerAction(new v((x, T, j, $) => {
|
|
863
|
+
T(x, j, $), this.unregistered || this.execute(C, () => null, a, l);
|
|
884
864
|
}))), this.isValidComparison(d(u), d(this.otherField.value)) ? null : [
|
|
885
|
-
new
|
|
886
|
-
this.replacePlaceholders(s, { newValue: u, oldValue: h, field:
|
|
865
|
+
new b(
|
|
866
|
+
this.replacePlaceholders(s, { newValue: u, oldValue: h, field: C, otherField: this.otherField })
|
|
887
867
|
)
|
|
888
868
|
]));
|
|
889
869
|
o(this, "unregistered", !1);
|
|
@@ -893,54 +873,54 @@ class Rt extends f {
|
|
|
893
873
|
this.unregistered = !0;
|
|
894
874
|
}
|
|
895
875
|
}
|
|
896
|
-
class
|
|
876
|
+
class Ut extends f {
|
|
897
877
|
constructor(i, t) {
|
|
898
|
-
const e = t ||
|
|
878
|
+
const e = t || m("Must be one of [**{allowedAsText}**]");
|
|
899
879
|
let s = i.join(", ");
|
|
900
|
-
s.length > 60 && (s =
|
|
880
|
+
s.length > 60 && (s = pt(s, {
|
|
901
881
|
length: 40,
|
|
902
882
|
separator: ", ",
|
|
903
883
|
omission: `... (${i.length} items total)`
|
|
904
884
|
}));
|
|
905
885
|
const r = (a, l, c) => i.includes(d(a)) ? null : [
|
|
906
|
-
new
|
|
886
|
+
new b(
|
|
907
887
|
this.replacePlaceholders(e, { newValue: a, oldValue: l, field: c, allowedValues: i, allowedAsText: s })
|
|
908
888
|
)
|
|
909
889
|
];
|
|
910
890
|
super(r);
|
|
911
891
|
}
|
|
912
892
|
}
|
|
913
|
-
function
|
|
914
|
-
return n == null ? 0 :
|
|
893
|
+
function Dt(n) {
|
|
894
|
+
return n == null ? 0 : tt(n) || V(n) ? n.length : et(n) && Object.getPrototypeOf(n) === Object.prototype ? Object.keys(n).length : String(n).length;
|
|
915
895
|
}
|
|
916
|
-
class
|
|
896
|
+
class $t extends f {
|
|
917
897
|
constructor(i) {
|
|
918
|
-
const t = i ||
|
|
898
|
+
const t = i || m("Please enter a value"), e = (s, r, a) => Dt(d(s)) === 0 ? [new b(
|
|
919
899
|
this.replacePlaceholders(t, { newValue: s, oldValue: r, field: a })
|
|
920
900
|
)] : null;
|
|
921
901
|
super(e);
|
|
922
902
|
}
|
|
923
903
|
}
|
|
924
|
-
class
|
|
904
|
+
class Bt extends f {
|
|
925
905
|
constructor(i, t) {
|
|
926
|
-
const e = t ||
|
|
927
|
-
new
|
|
906
|
+
const e = t || m("Value must be larger or equal to **{minValue}**"), s = (r, a, l) => r < i || r === void 0 ? [
|
|
907
|
+
new b(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: l, minValue: i }))
|
|
928
908
|
] : null;
|
|
929
909
|
super(s);
|
|
930
910
|
}
|
|
931
911
|
}
|
|
932
|
-
class
|
|
912
|
+
class kt extends f {
|
|
933
913
|
constructor(i, t) {
|
|
934
|
-
const e = t ||
|
|
935
|
-
new
|
|
914
|
+
const e = t || m("Value must be less than or equal to **{maxValue}**"), s = (r, a, l) => r > i || r === void 0 ? [
|
|
915
|
+
new b(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: l, maxValue: i }))
|
|
936
916
|
] : null;
|
|
937
917
|
super(s);
|
|
938
918
|
}
|
|
939
919
|
}
|
|
940
|
-
class
|
|
920
|
+
class qt extends f {
|
|
941
921
|
constructor(i, t, e) {
|
|
942
|
-
const s = e ||
|
|
943
|
-
new
|
|
922
|
+
const s = e || m("Value must be between **{minValue}** and **{maxValue}**"), r = (a, l, c) => a < i || a > t || a === void 0 ? [
|
|
923
|
+
new b(
|
|
944
924
|
this.replacePlaceholders(s, { newValue: a, oldValue: l, field: c, minValue: i, maxValue: t })
|
|
945
925
|
)
|
|
946
926
|
] : null;
|
|
@@ -948,30 +928,30 @@ class Mt extends f {
|
|
|
948
928
|
}
|
|
949
929
|
}
|
|
950
930
|
function W(n) {
|
|
951
|
-
return n == null ? 0 :
|
|
931
|
+
return n == null ? 0 : tt(n) || V(n) ? n.length : et(n) && Object.getPrototypeOf(n) === Object.prototype ? Object.keys(n).length : String(n).length;
|
|
952
932
|
}
|
|
953
|
-
class
|
|
933
|
+
class Mt extends f {
|
|
954
934
|
constructor(i, t) {
|
|
955
|
-
const e = t ||
|
|
956
|
-
new
|
|
935
|
+
const e = t || m("Length must be larger or equal to **{minLength}**"), s = (r, a, l) => W(r) < i ? [
|
|
936
|
+
new b(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: l, minLength: i }))
|
|
957
937
|
] : null;
|
|
958
938
|
super(s);
|
|
959
939
|
}
|
|
960
940
|
}
|
|
961
941
|
class Qt extends f {
|
|
962
942
|
constructor(i, t) {
|
|
963
|
-
const e = t ||
|
|
964
|
-
new
|
|
943
|
+
const e = t || m("Length must be less than or equal to **{maxLength}**"), s = (r, a, l) => W(r) > i ? [
|
|
944
|
+
new b(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: l, maxLength: i }))
|
|
965
945
|
] : null;
|
|
966
946
|
super(s);
|
|
967
947
|
}
|
|
968
948
|
}
|
|
969
949
|
class zt extends f {
|
|
970
950
|
constructor(i, t, e) {
|
|
971
|
-
const s = e ||
|
|
951
|
+
const s = e || m("Length must be between **{minLength}** and **{maxLength}**"), r = (a, l, c) => {
|
|
972
952
|
const u = W(a);
|
|
973
953
|
return u < i || u > t ? [
|
|
974
|
-
new
|
|
954
|
+
new b(
|
|
975
955
|
this.replacePlaceholders(s, { newValue: a, oldValue: l, field: c, minLength: i, maxLength: t })
|
|
976
956
|
)
|
|
977
957
|
] : null;
|
|
@@ -979,98 +959,98 @@ class zt extends f {
|
|
|
979
959
|
super(r);
|
|
980
960
|
}
|
|
981
961
|
}
|
|
982
|
-
class
|
|
962
|
+
class Gt extends f {
|
|
983
963
|
constructor(i, t) {
|
|
984
|
-
const e = t ||
|
|
985
|
-
new
|
|
964
|
+
const e = t || m('Value must match pattern "**{pattern}**"'), s = (r, a, l) => i.test(String(d(r))) ? null : [
|
|
965
|
+
new b(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: l, pattern: i }))
|
|
986
966
|
];
|
|
987
967
|
super(s);
|
|
988
968
|
}
|
|
989
969
|
}
|
|
990
|
-
const
|
|
970
|
+
const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
991
971
|
__proto__: null,
|
|
992
972
|
CompareTo: Rt,
|
|
993
|
-
InAllowedValues:
|
|
973
|
+
InAllowedValues: Ut,
|
|
994
974
|
LengthInRange: zt,
|
|
995
975
|
MaxLength: Qt,
|
|
996
|
-
MaxValue:
|
|
997
|
-
MinLength:
|
|
998
|
-
MinValue:
|
|
999
|
-
Pattern:
|
|
1000
|
-
Required:
|
|
976
|
+
MaxValue: kt,
|
|
977
|
+
MinLength: Mt,
|
|
978
|
+
MinValue: Bt,
|
|
979
|
+
Pattern: Gt,
|
|
980
|
+
Required: $t,
|
|
1001
981
|
Validator: f,
|
|
1002
|
-
ValueInRange:
|
|
1003
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
982
|
+
ValueInRange: qt
|
|
983
|
+
}, Symbol.toStringTag, { value: "Module" })), Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1004
984
|
__proto__: null,
|
|
1005
985
|
AbortEventHandlingException: M,
|
|
1006
|
-
Action:
|
|
1007
|
-
ActionsMap:
|
|
1008
|
-
ConditionalEnabledAction:
|
|
1009
|
-
ConditionalStatementAction:
|
|
1010
|
-
ConditionalValueAction:
|
|
1011
|
-
ConditionalVisibilityAction:
|
|
1012
|
-
DisplayMode:
|
|
1013
|
-
EmptyField:
|
|
1014
|
-
EnabledChangedAction:
|
|
1015
|
-
EnabledChangingAction:
|
|
1016
|
-
ExecuteAction:
|
|
1017
|
-
Field:
|
|
986
|
+
Action: wt,
|
|
987
|
+
ActionsMap: N,
|
|
988
|
+
ConditionalEnabledAction: Et,
|
|
989
|
+
ConditionalStatementAction: U,
|
|
990
|
+
ConditionalValueAction: Vt,
|
|
991
|
+
ConditionalVisibilityAction: xt,
|
|
992
|
+
DisplayMode: A,
|
|
993
|
+
EmptyField: jt,
|
|
994
|
+
EnabledChangedAction: st,
|
|
995
|
+
EnabledChangingAction: nt,
|
|
996
|
+
ExecuteAction: ot,
|
|
997
|
+
Field: D,
|
|
1018
998
|
FieldActionBase: p,
|
|
1019
|
-
FieldBase:
|
|
999
|
+
FieldBase: y,
|
|
1020
1000
|
Group: E,
|
|
1021
1001
|
List: X,
|
|
1022
|
-
ListItemAddedAction:
|
|
1023
|
-
ListItemRemovedAction:
|
|
1024
|
-
MdString:
|
|
1002
|
+
ListItemAddedAction: Q,
|
|
1003
|
+
ListItemRemovedAction: ct,
|
|
1004
|
+
MdString: F,
|
|
1025
1005
|
Operator: g,
|
|
1026
|
-
Statement:
|
|
1027
|
-
ValidChangedAction:
|
|
1028
|
-
ValidationError:
|
|
1029
|
-
ValidationErrorRenderContent:
|
|
1030
|
-
ValidationErrorText:
|
|
1006
|
+
Statement: _,
|
|
1007
|
+
ValidChangedAction: rt,
|
|
1008
|
+
ValidationError: H,
|
|
1009
|
+
ValidationErrorRenderContent: b,
|
|
1010
|
+
ValidationErrorText: vt,
|
|
1031
1011
|
Validator: f,
|
|
1032
|
-
Validators:
|
|
1033
|
-
ValueChangedAction:
|
|
1034
|
-
VisibilityChangedAction:
|
|
1035
|
-
VisibilityChangingAction:
|
|
1036
|
-
buildErrorMessage:
|
|
1037
|
-
isCustomModalContentComponentDef:
|
|
1012
|
+
Validators: Ht,
|
|
1013
|
+
ValueChangedAction: v,
|
|
1014
|
+
VisibilityChangedAction: lt,
|
|
1015
|
+
VisibilityChangingAction: at,
|
|
1016
|
+
buildErrorMessage: m,
|
|
1017
|
+
isCustomModalContentComponentDef: G
|
|
1038
1018
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1039
1019
|
export {
|
|
1040
1020
|
M as AbortEventHandlingException,
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1021
|
+
wt as Action,
|
|
1022
|
+
N as ActionsMap,
|
|
1023
|
+
Et as ConditionalEnabledAction,
|
|
1024
|
+
U as ConditionalStatementAction,
|
|
1025
|
+
Vt as ConditionalValueAction,
|
|
1026
|
+
xt as ConditionalVisibilityAction,
|
|
1027
|
+
A as DisplayMode,
|
|
1028
|
+
jt as EmptyField,
|
|
1029
|
+
st as EnabledChangedAction,
|
|
1030
|
+
nt as EnabledChangingAction,
|
|
1031
|
+
ot as ExecuteAction,
|
|
1032
|
+
D as Field,
|
|
1053
1033
|
p as FieldActionBase,
|
|
1054
|
-
|
|
1034
|
+
y as FieldBase,
|
|
1055
1035
|
E as Group,
|
|
1056
1036
|
X as List,
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1037
|
+
Q as ListItemAddedAction,
|
|
1038
|
+
ct as ListItemRemovedAction,
|
|
1039
|
+
F as MdString,
|
|
1060
1040
|
g as Operator,
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1041
|
+
_ as Statement,
|
|
1042
|
+
rt as ValidChangedAction,
|
|
1043
|
+
H as ValidationError,
|
|
1044
|
+
b as ValidationErrorRenderContent,
|
|
1045
|
+
vt as ValidationErrorText,
|
|
1066
1046
|
f as Validator,
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1047
|
+
Ht as Validators,
|
|
1048
|
+
v as ValueChangedAction,
|
|
1049
|
+
lt as VisibilityChangedAction,
|
|
1050
|
+
at as VisibilityChangingAction,
|
|
1051
|
+
m as buildErrorMessage,
|
|
1052
|
+
Yt as default,
|
|
1053
|
+
Kt as forms,
|
|
1054
|
+
G as isCustomModalContentComponentDef
|
|
1075
1055
|
};
|
|
1076
1056
|
//# sourceMappingURL=dynamicforms-vue-forms.js.map
|