@dynamicforms/vue-forms 0.3.1 → 0.3.3
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 ft = Object.defineProperty, bt = Object.defineProperties;
|
|
2
|
+
var pt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var U = Object.getOwnPropertySymbols;
|
|
4
4
|
var J = Object.prototype.hasOwnProperty, K = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var B = (n, i, t) => i in n ? ft(n, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[i] = t, _ = (n, i) => {
|
|
6
6
|
for (var t in i || (i = {}))
|
|
7
|
-
J.call(i, t) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
K.call(i, t) &&
|
|
7
|
+
J.call(i, t) && B(n, t, i[t]);
|
|
8
|
+
if (U)
|
|
9
|
+
for (var t of U(i))
|
|
10
|
+
K.call(i, t) && B(n, t, i[t]);
|
|
11
11
|
return n;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, I = (n, i) => bt(n, pt(i));
|
|
13
|
+
var S = (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 && U)
|
|
18
|
+
for (var e of U(n))
|
|
19
19
|
i.indexOf(e) < 0 && K.call(n, e) && (t[e] = n[e]);
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
|
-
var o = (n, i, t) =>
|
|
23
|
-
import { isEqual as
|
|
24
|
-
import { unref as d, computed as
|
|
25
|
-
var
|
|
22
|
+
var o = (n, i, t) => B(n, typeof i != "symbol" ? i + "" : i, t);
|
|
23
|
+
import { isEqual as R, isBoolean as vt, isString as A, isEmpty as q, truncate as mt, isArray as et, isObject as it } from "lodash-es";
|
|
24
|
+
import { unref as d, computed as nt, reactive as st } from "vue";
|
|
25
|
+
var N = /* @__PURE__ */ ((n) => (n[n.SUPPRESS = 1] = "SUPPRESS", n[n.HIDDEN = 5] = "HIDDEN", n[n.INVISIBLE = 8] = "INVISIBLE", n[n.FULL = 10] = "FULL", n))(N || {});
|
|
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
|
+
})(N || (N = {}));
|
|
43
|
+
Object.freeze(N);
|
|
44
|
+
const C = N;
|
|
45
45
|
class p {
|
|
46
46
|
constructor(i) {
|
|
47
47
|
o(this, "executorFn");
|
|
@@ -67,9 +67,9 @@ class p {
|
|
|
67
67
|
unregister() {
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
class
|
|
70
|
+
class M extends Error {
|
|
71
71
|
}
|
|
72
|
-
const
|
|
72
|
+
const rt = Symbol("ValueChangedAction");
|
|
73
73
|
class b extends p {
|
|
74
74
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
75
75
|
constructor(i) {
|
|
@@ -77,19 +77,19 @@ class b extends p {
|
|
|
77
77
|
}
|
|
78
78
|
// eslint-disable-next-line class-methods-use-this
|
|
79
79
|
static get classIdentifier() {
|
|
80
|
-
return
|
|
80
|
+
return rt;
|
|
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 T extends String {
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Q(n) {
|
|
89
89
|
const i = d(n);
|
|
90
90
|
return typeof i == "object" && "componentName" in i;
|
|
91
91
|
}
|
|
92
|
-
class
|
|
92
|
+
class z {
|
|
93
93
|
get componentName() {
|
|
94
94
|
return "Comment";
|
|
95
95
|
}
|
|
@@ -103,7 +103,7 @@ class X {
|
|
|
103
103
|
}
|
|
104
104
|
// eslint-disable-line class-methods-use-this
|
|
105
105
|
}
|
|
106
|
-
class
|
|
106
|
+
class yt extends z {
|
|
107
107
|
constructor(t) {
|
|
108
108
|
super();
|
|
109
109
|
o(this, "text");
|
|
@@ -117,16 +117,16 @@ class vt extends X {
|
|
|
117
117
|
return this.text;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
class v extends
|
|
120
|
+
class v extends z {
|
|
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 = nt(() => 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 T ? "md" : Q(t) ? "component" : "string" : "string";
|
|
130
130
|
}
|
|
131
131
|
get componentName() {
|
|
132
132
|
switch (d(this.textType)) {
|
|
@@ -161,7 +161,7 @@ class v extends X {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
const
|
|
164
|
+
const xt = Symbol("Validator");
|
|
165
165
|
class f extends b {
|
|
166
166
|
/**
|
|
167
167
|
* Creates a new validator
|
|
@@ -169,7 +169,7 @@ class f extends b {
|
|
|
169
169
|
*/
|
|
170
170
|
constructor(t) {
|
|
171
171
|
super((s, r, a, l) => {
|
|
172
|
-
const
|
|
172
|
+
const c = t(a, l, s) || [], u = (h) => {
|
|
173
173
|
var V;
|
|
174
174
|
h == null || h.forEach(
|
|
175
175
|
(x) => Object.defineProperty(x, "source", { value: this.source, enumerable: !1, configurable: !1 })
|
|
@@ -177,22 +177,22 @@ class f extends b {
|
|
|
177
177
|
for (let x = s.errors.length - 1; x >= 0; x--) {
|
|
178
178
|
const P = s.errors[x];
|
|
179
179
|
if (P.source === this.source) {
|
|
180
|
-
const O = (V = h == null ? void 0 : h.findIndex((
|
|
180
|
+
const O = (V = h == null ? void 0 : h.findIndex(($) => R($, P))) != null ? V : -1;
|
|
181
181
|
O >= 0 ? h == null || h.splice(O, 1) : s.errors.splice(x, 1);
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
h && h.length > 0 && s.errors.push(...h), s.validate();
|
|
185
185
|
};
|
|
186
|
-
return
|
|
186
|
+
return c instanceof Promise ? (s.validating = ++s.validatingCount > 0, c.then((h) => u(h)).finally(() => {
|
|
187
187
|
s.validatingCount = Math.max(0, s.validatingCount - 1), s.validating = s.validatingCount > 0;
|
|
188
|
-
})) : c
|
|
188
|
+
})) : u(c), r(s, a, l);
|
|
189
189
|
});
|
|
190
190
|
o(this, "source");
|
|
191
191
|
this.source = Symbol(this.constructor.name);
|
|
192
192
|
}
|
|
193
193
|
// eslint-disable-next-line class-methods-use-this
|
|
194
194
|
static get classIdentifier() {
|
|
195
|
-
return
|
|
195
|
+
return xt;
|
|
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 (Q(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 T ? new T(s) : s;
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
class
|
|
210
|
+
class w extends Map {
|
|
211
211
|
constructor() {
|
|
212
212
|
super(...arguments);
|
|
213
213
|
o(this, "eagerActions", /* @__PURE__ */ new Set());
|
|
@@ -224,12 +224,12 @@ class T extends Map {
|
|
|
224
224
|
}
|
|
225
225
|
trigger(t, e, ...s) {
|
|
226
226
|
const r = t.classIdentifier;
|
|
227
|
-
r ===
|
|
227
|
+
r === rt && this.triggerEager(e, ...s);
|
|
228
228
|
const a = this.get(r);
|
|
229
229
|
try {
|
|
230
230
|
if (a) return a(e, ...s);
|
|
231
231
|
} catch (l) {
|
|
232
|
-
if (!(l instanceof
|
|
232
|
+
if (!(l instanceof M)) throw l;
|
|
233
233
|
}
|
|
234
234
|
return null;
|
|
235
235
|
}
|
|
@@ -239,32 +239,32 @@ class T extends Map {
|
|
|
239
239
|
try {
|
|
240
240
|
r && r(t, ...e);
|
|
241
241
|
} catch (a) {
|
|
242
|
-
if (!(a instanceof
|
|
242
|
+
if (!(a instanceof M)) throw a;
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
clone() {
|
|
247
|
-
const t = new
|
|
247
|
+
const t = new w();
|
|
248
248
|
return this.registeredActions.forEach((e) => t.register(e)), t;
|
|
249
249
|
}
|
|
250
250
|
cloneWithoutValidators() {
|
|
251
|
-
const t = new
|
|
251
|
+
const t = new w();
|
|
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 Et = Symbol("ConditionalStatementAction");
|
|
258
|
+
class D extends b {
|
|
259
259
|
constructor(t, e) {
|
|
260
|
-
const s = (r, a, l,
|
|
261
|
-
const
|
|
262
|
-
if (
|
|
260
|
+
const s = (r, a, l, c) => {
|
|
261
|
+
const u = t.evaluate();
|
|
262
|
+
if (u !== this.lastResult) {
|
|
263
263
|
for (const h of this.boundFields)
|
|
264
|
-
e(h,
|
|
265
|
-
this.lastResult =
|
|
264
|
+
e(h, u, this.lastResult);
|
|
265
|
+
this.lastResult = u;
|
|
266
266
|
}
|
|
267
|
-
return a(r, l,
|
|
267
|
+
return a(r, l, c);
|
|
268
268
|
};
|
|
269
269
|
super(s);
|
|
270
270
|
o(this, "lastResult");
|
|
@@ -275,7 +275,7 @@ class $ extends b {
|
|
|
275
275
|
}
|
|
276
276
|
// eslint-disable-next-line class-methods-use-this
|
|
277
277
|
static get classIdentifier() {
|
|
278
|
-
return
|
|
278
|
+
return Et;
|
|
279
279
|
}
|
|
280
280
|
// eslint-disable-next-line class-methods-use-this
|
|
281
281
|
get eager() {
|
|
@@ -285,28 +285,28 @@ class $ extends b {
|
|
|
285
285
|
this.boundFields.add(t);
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
-
class
|
|
288
|
+
class Vt extends D {
|
|
289
289
|
constructor(i) {
|
|
290
290
|
super(i, (t, e) => {
|
|
291
|
-
t.visibility = e ?
|
|
291
|
+
t.visibility = e ? C.FULL : C.SUPPRESS;
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
class
|
|
295
|
+
class At extends D {
|
|
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 Ct extends D {
|
|
303
303
|
constructor(i, t) {
|
|
304
304
|
super(i, (e, s) => {
|
|
305
305
|
s && (e.value = t);
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
var
|
|
309
|
+
var L = /* @__PURE__ */ ((n) => (n[n.NOT = 0] = "NOT", n[n.OR = 1] = "OR", n[n.AND = 2] = "AND", n[n.XOR = 3] = "XOR", n[n.NAND = 4] = "NAND", n[n.NOR = 5] = "NOR", n[n.EQUALS = -1] = "EQUALS", n[n.NOT_EQUALS = -2] = "NOT_EQUALS", n[n.GT = -3] = "GT", n[n.LT = -4] = "LT", n[n.GE = -5] = "GE", n[n.LE = -6] = "LE", n[n.IN = -7] = "IN", n[n.NOT_IN = -8] = "NOT_IN", n[n.INCLUDES = -9] = "INCLUDES", n[n.NOT_INCLUDES = -10] = "NOT_INCLUDES", n))(L || {});
|
|
310
310
|
((n) => {
|
|
311
311
|
function i(r) {
|
|
312
312
|
const a = r.toLowerCase();
|
|
@@ -344,24 +344,24 @@ var w = /* @__PURE__ */ ((n) => (n[n.NOT = 0] = "NOT", n[n.OR = 1] = "OR", n[n.A
|
|
|
344
344
|
return r >= 0;
|
|
345
345
|
}
|
|
346
346
|
n.isLogicOperator = s;
|
|
347
|
-
})(
|
|
348
|
-
Object.freeze(
|
|
349
|
-
const g =
|
|
350
|
-
class
|
|
347
|
+
})(L || (L = {}));
|
|
348
|
+
Object.freeze(L);
|
|
349
|
+
const g = L, _t = Symbol("EnabledChangingAction");
|
|
350
|
+
class at 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 _t;
|
|
358
358
|
}
|
|
359
359
|
execute(i, t, e, s) {
|
|
360
360
|
return super.execute(i, t, e, s);
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
const It = Symbol("EnabledChangedAction");
|
|
364
|
-
class
|
|
364
|
+
class lt extends p {
|
|
365
365
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
366
366
|
constructor(i) {
|
|
367
367
|
super(i);
|
|
@@ -374,43 +374,43 @@ class rt extends p {
|
|
|
374
374
|
return super.execute(i, t, e, s);
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
|
-
const
|
|
378
|
-
class
|
|
377
|
+
const St = Symbol("ValidChangedAction");
|
|
378
|
+
class ot 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 St;
|
|
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 Ft = Symbol("VisibilityChangingAction");
|
|
392
|
+
class ct 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 Ft;
|
|
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 Nt = Symbol("VisibilityChangedAction");
|
|
406
|
+
class ut 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 Nt;
|
|
414
414
|
}
|
|
415
415
|
execute(i, t, e, s) {
|
|
416
416
|
return super.execute(i, t, e, s);
|
|
@@ -418,7 +418,7 @@ class ot extends p {
|
|
|
418
418
|
}
|
|
419
419
|
class m {
|
|
420
420
|
constructor() {
|
|
421
|
-
o(this, "reactiveValue",
|
|
421
|
+
o(this, "reactiveValue", nt(() => 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 w());
|
|
430
430
|
// default property handlers
|
|
431
|
-
o(this, "_visibility",
|
|
431
|
+
o(this, "_visibility", C.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(ct, this, i, t);
|
|
439
|
+
if (!C.isDefined(e != null ? e : i)) throw new Error("visibility must be a DisplayMode constant");
|
|
440
|
+
this._visibility = C.fromAny(e != null ? e : i), this.actions.trigger(ut, 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(at, this, i, t);
|
|
447
|
+
if (!vt(e != null ? e : i)) throw new Error("Enabled value must be boolean");
|
|
448
|
+
this._enabled = e != null ? e : i, this.actions.trigger(lt, 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(ot, this, this.valid, i);
|
|
453
453
|
}
|
|
454
454
|
get valid() {
|
|
455
455
|
return this.errors.length === 0;
|
|
@@ -458,7 +458,7 @@ class m {
|
|
|
458
458
|
return this.value;
|
|
459
459
|
}
|
|
460
460
|
get isChanged() {
|
|
461
|
-
return !
|
|
461
|
+
return !R(this.value, this.originalValue);
|
|
462
462
|
}
|
|
463
463
|
registerAction(i) {
|
|
464
464
|
const t = i;
|
|
@@ -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 Tt(n, i) {
|
|
475
475
|
return n ? !i : i;
|
|
476
476
|
}
|
|
477
|
-
class
|
|
477
|
+
class F {
|
|
478
478
|
constructor(i, t, e) {
|
|
479
479
|
o(this, "operand1");
|
|
480
480
|
o(this, "operator");
|
|
@@ -482,10 +482,10 @@ class N {
|
|
|
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 F ? this.operand1.evaluate() : this.operand1 instanceof m ? d(this.operand1.value) : this.operand1;
|
|
486
486
|
}
|
|
487
487
|
get operand2Value() {
|
|
488
|
-
return this.operand2 instanceof
|
|
488
|
+
return this.operand2 instanceof F ? this.operand2.evaluate() : this.operand2 instanceof m ? d(this.operand2.value) : this.operand2;
|
|
489
489
|
}
|
|
490
490
|
evaluate() {
|
|
491
491
|
var e, s, r, a;
|
|
@@ -500,7 +500,7 @@ class N {
|
|
|
500
500
|
case g.NOR:
|
|
501
501
|
return !(i || t);
|
|
502
502
|
case g.XOR:
|
|
503
|
-
return
|
|
503
|
+
return Tt(i, t);
|
|
504
504
|
case g.NOT:
|
|
505
505
|
return !i;
|
|
506
506
|
case g.EQUALS:
|
|
@@ -534,27 +534,27 @@ class N {
|
|
|
534
534
|
collectFields() {
|
|
535
535
|
const i = /* @__PURE__ */ new Set();
|
|
536
536
|
function t(e) {
|
|
537
|
-
e instanceof m ? i.add(e) : e instanceof
|
|
537
|
+
e instanceof m ? i.add(e) : e instanceof F && 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 wt = Symbol("ExecuteAction");
|
|
543
|
+
class ht 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 wt;
|
|
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 G extends p {
|
|
558
558
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
559
559
|
constructor(i) {
|
|
560
560
|
super(i);
|
|
@@ -568,7 +568,7 @@ class z extends p {
|
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
570
|
const jt = Symbol("ListItemRemovedAction");
|
|
571
|
-
class
|
|
571
|
+
class gt extends p {
|
|
572
572
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
573
573
|
constructor(i) {
|
|
574
574
|
super(i);
|
|
@@ -581,25 +581,28 @@ class ct extends p {
|
|
|
581
581
|
return super.execute(i, t, e, s);
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function k(n, i) {
|
|
585
585
|
return (n == null ? void 0 : n.label) == null && (n == null ? void 0 : n.icon) == null ? i : n;
|
|
586
586
|
}
|
|
587
|
-
|
|
588
|
-
|
|
587
|
+
const Z = Symbol("ActionConstructorGuard");
|
|
588
|
+
class H extends m {
|
|
589
|
+
constructor(t) {
|
|
589
590
|
super();
|
|
590
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>");
|
|
591
594
|
}
|
|
592
595
|
init(t) {
|
|
593
596
|
if (t) {
|
|
594
|
-
const e = t, { value: s, originalValue: r, validators: a, actions: l } = e,
|
|
595
|
-
[...a || [], ...l || []].forEach((V) => this.registerAction(V)), Object.assign(this,
|
|
596
|
-
const
|
|
597
|
-
this._value =
|
|
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);
|
|
598
601
|
}
|
|
599
602
|
this.actions.triggerEager(this, this.value, this.originalValue), this.validate();
|
|
600
603
|
}
|
|
601
604
|
static create(t) {
|
|
602
|
-
const e =
|
|
605
|
+
const e = st(new this(Z));
|
|
603
606
|
return e.init(t), e;
|
|
604
607
|
}
|
|
605
608
|
get value() {
|
|
@@ -624,7 +627,7 @@ class U extends m {
|
|
|
624
627
|
}
|
|
625
628
|
clone(t) {
|
|
626
629
|
var s, r, a;
|
|
627
|
-
const e =
|
|
630
|
+
const e = H.create(I(_({
|
|
628
631
|
value: (s = t == null ? void 0 : t.value) != null ? s : this.value
|
|
629
632
|
}, t && "originalValue" in t ? { originalValue: t.originalValue } : {}), {
|
|
630
633
|
enabled: (r = t == null ? void 0 : t.enabled) != null ? r : this.enabled,
|
|
@@ -633,18 +636,21 @@ class U extends m {
|
|
|
633
636
|
return e.actions = this.actions.clone(), e.actions.triggerEager(e, e.value, e.originalValue), e;
|
|
634
637
|
}
|
|
635
638
|
execute(t) {
|
|
636
|
-
this.actions.trigger(
|
|
639
|
+
this.actions.trigger(ht, this, t);
|
|
637
640
|
}
|
|
638
641
|
}
|
|
639
|
-
|
|
640
|
-
|
|
642
|
+
const tt = Symbol("FieldConstructorGuard");
|
|
643
|
+
class j extends m {
|
|
644
|
+
constructor(t) {
|
|
641
645
|
super();
|
|
642
646
|
o(this, "_value");
|
|
647
|
+
if (t !== tt)
|
|
648
|
+
throw new TypeError("Don't use constructor to instantiate Field. Use Field.create<T>");
|
|
643
649
|
}
|
|
644
650
|
init(t) {
|
|
645
651
|
if (t) {
|
|
646
|
-
const e = t, { value: s, validators: r, actions: a } = e, l =
|
|
647
|
-
[...r || [], ...a || []].forEach((
|
|
652
|
+
const e = t, { value: s, validators: r, actions: a } = e, l = S(e, ["value", "validators", "actions"]);
|
|
653
|
+
[...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);
|
|
648
654
|
}
|
|
649
655
|
this.actions.triggerEager(this, this.value, this.originalValue), this.validate();
|
|
650
656
|
}
|
|
@@ -654,7 +660,7 @@ class C extends m {
|
|
|
654
660
|
* @returns Reactive Field instance
|
|
655
661
|
*/
|
|
656
662
|
static create(t) {
|
|
657
|
-
const e =
|
|
663
|
+
const e = st(new this(tt));
|
|
658
664
|
return e.init(t), e;
|
|
659
665
|
}
|
|
660
666
|
get value() {
|
|
@@ -666,7 +672,7 @@ class C extends m {
|
|
|
666
672
|
}
|
|
667
673
|
clone(t) {
|
|
668
674
|
var s, r, a;
|
|
669
|
-
const e =
|
|
675
|
+
const e = j.create(I(_({
|
|
670
676
|
value: (s = t == null ? void 0 : t.value) != null ? s : this.value
|
|
671
677
|
}, t && "originalValue" in t ? { originalValue: t.originalValue } : {}), {
|
|
672
678
|
enabled: (r = t == null ? void 0 : t.enabled) != null ? r : this.enabled,
|
|
@@ -675,7 +681,7 @@ class C extends m {
|
|
|
675
681
|
return e.actions = this.actions.clone(), e.actions.triggerEager(e, e.value, e.originalValue), e;
|
|
676
682
|
}
|
|
677
683
|
}
|
|
678
|
-
const
|
|
684
|
+
const Pt = j.create({ value: "EmptyField" }).registerAction(new b(
|
|
679
685
|
() => {
|
|
680
686
|
console.warn("Working with EmptyField! This should not happen");
|
|
681
687
|
}
|
|
@@ -688,8 +694,8 @@ class E extends m {
|
|
|
688
694
|
o(this, "suppressNotifyValueChanged", !1);
|
|
689
695
|
if (!E.isValidFields(t)) throw new Error("Invalid fields object provided");
|
|
690
696
|
if (this._fields = {}, Object.entries(t).forEach(([r, a]) => this.addField(r, a)), e) {
|
|
691
|
-
const s = e, { value: r, validators: a, actions: l } = s,
|
|
692
|
-
[...a || [], ...l || []].forEach((
|
|
697
|
+
const s = e, { value: r, validators: a, actions: l } = s, c = S(s, ["value", "validators", "actions"]);
|
|
698
|
+
[...a || [], ...l || []].forEach((u) => this.registerAction(u)), Object.assign(this, c), this.value = r != null ? r : this.originalValue;
|
|
693
699
|
}
|
|
694
700
|
this.originalValue === void 0 && (this.originalValue = this.value), this.actions.triggerEager(this, this.value, this.originalValue), this.validate();
|
|
695
701
|
}
|
|
@@ -715,7 +721,7 @@ class E extends m {
|
|
|
715
721
|
throw new Error("data is already a Form structure, should be a simple object");
|
|
716
722
|
return new E(
|
|
717
723
|
t == null ? {} : Object.fromEntries(
|
|
718
|
-
Object.entries(t).map(([e, s]) => [e,
|
|
724
|
+
Object.entries(t).map(([e, s]) => [e, j.create({ value: s })])
|
|
719
725
|
)
|
|
720
726
|
);
|
|
721
727
|
}
|
|
@@ -730,8 +736,8 @@ class E extends m {
|
|
|
730
736
|
const t = {};
|
|
731
737
|
return Object.entries(this._fields).forEach(([e, s]) => {
|
|
732
738
|
const r = s.value;
|
|
733
|
-
(s.enabled || s instanceof E && !
|
|
734
|
-
}),
|
|
739
|
+
(s.enabled || s instanceof E && !q(r)) && (t[e] = r);
|
|
740
|
+
}), q(t) ? null : t;
|
|
735
741
|
}
|
|
736
742
|
set value(t) {
|
|
737
743
|
this.suppressNotifyValueChanged = !0;
|
|
@@ -753,7 +759,7 @@ class E extends m {
|
|
|
753
759
|
notifyValueChanged() {
|
|
754
760
|
if (this.suppressNotifyValueChanged) return;
|
|
755
761
|
const t = this.value;
|
|
756
|
-
if (!
|
|
762
|
+
if (!R(t, this._value)) {
|
|
757
763
|
const e = this._value;
|
|
758
764
|
this._value = t, this.actions.trigger(b, this, t, e), this.parent && this.parent.notifyValueChanged(), this.validate();
|
|
759
765
|
}
|
|
@@ -764,10 +770,10 @@ class E extends m {
|
|
|
764
770
|
clone(t) {
|
|
765
771
|
var r, a, l;
|
|
766
772
|
const e = {};
|
|
767
|
-
Object.entries(this._fields).forEach(([
|
|
768
|
-
e[
|
|
773
|
+
Object.entries(this._fields).forEach(([c, u]) => {
|
|
774
|
+
e[c] = u.clone();
|
|
769
775
|
});
|
|
770
|
-
const s = new E(e,
|
|
776
|
+
const s = new E(e, I(_({
|
|
771
777
|
value: (r = t == null ? void 0 : t.value) != null ? r : this.value
|
|
772
778
|
}, t && "originalValue" in t ? { originalValue: t.originalValue } : {}), {
|
|
773
779
|
enabled: (a = t == null ? void 0 : t.enabled) != null ? a : this.enabled,
|
|
@@ -776,15 +782,15 @@ class E extends m {
|
|
|
776
782
|
return s.actions = this.actions.clone(), s.actions.triggerEager(s, s.value, s.originalValue), s;
|
|
777
783
|
}
|
|
778
784
|
}
|
|
779
|
-
class
|
|
785
|
+
class X extends m {
|
|
780
786
|
constructor(t, e) {
|
|
781
787
|
super();
|
|
782
788
|
o(this, "_value", null);
|
|
783
789
|
o(this, "_itemTemplate");
|
|
784
790
|
o(this, "_previousValue");
|
|
785
791
|
if (this._itemTemplate = t, e) {
|
|
786
|
-
const s = e, { value: r, validators: a, actions: l } = s,
|
|
787
|
-
[...a || [], ...l || []].forEach((
|
|
792
|
+
const s = e, { value: r, validators: a, actions: l } = s, c = S(s, ["value", "validators", "actions"]);
|
|
793
|
+
[...a || [], ...l || []].forEach((u) => this.registerAction(u)), Object.assign(this, c), r && this.setValueInternal(r);
|
|
788
794
|
}
|
|
789
795
|
this.originalValue === void 0 && (this.originalValue = this.value), this._previousValue = this.value, this.actions.triggerEager(this, this.value, this.originalValue), this.validate();
|
|
790
796
|
}
|
|
@@ -798,7 +804,7 @@ class G extends m {
|
|
|
798
804
|
get value() {
|
|
799
805
|
var e;
|
|
800
806
|
const t = (e = this._value) == null ? void 0 : e.map((s) => s.value);
|
|
801
|
-
return
|
|
807
|
+
return q(t) ? null : t;
|
|
802
808
|
}
|
|
803
809
|
set value(t) {
|
|
804
810
|
const e = this.value;
|
|
@@ -806,7 +812,7 @@ class G extends m {
|
|
|
806
812
|
}
|
|
807
813
|
clone(t) {
|
|
808
814
|
var s, r, a, l;
|
|
809
|
-
const e = new
|
|
815
|
+
const e = new X((s = this._itemTemplate) == null ? void 0 : s.clone(), I(_({
|
|
810
816
|
value: [...(r = t == null ? void 0 : t.value) != null ? r : this.value]
|
|
811
817
|
}, t && "originalValue" in t ? { originalValue: t.originalValue } : {}), {
|
|
812
818
|
enabled: (a = t == null ? void 0 : t.enabled) != null ? a : this.enabled,
|
|
@@ -816,7 +822,7 @@ class G extends m {
|
|
|
816
822
|
}
|
|
817
823
|
notifyValueChanged() {
|
|
818
824
|
const t = this.value;
|
|
819
|
-
if (!
|
|
825
|
+
if (!R(t, this._previousValue)) {
|
|
820
826
|
const e = this._previousValue;
|
|
821
827
|
this._previousValue = t, this.actions.trigger(b, this, t, e), this.parent && this.parent.notifyValueChanged(), this.validate();
|
|
822
828
|
}
|
|
@@ -840,44 +846,44 @@ class G extends m {
|
|
|
840
846
|
var s;
|
|
841
847
|
if (this._value == null || t < 0 || this._value.length <= t) return;
|
|
842
848
|
let e = (s = this._value.splice(t, 1)) == null ? void 0 : s[0];
|
|
843
|
-
return e && (e = e.clone(), this.actions.trigger(
|
|
849
|
+
return e && (e = e.clone(), this.actions.trigger(gt, this, e, t), this.notifyValueChanged()), e;
|
|
844
850
|
}
|
|
845
851
|
insert(t, e) {
|
|
846
852
|
for (this._value == null && (this._value = []); this._value.length < e; ) {
|
|
847
853
|
const r = this.processSetValueItem(null), a = this._value.push(r);
|
|
848
|
-
this.actions.trigger(
|
|
854
|
+
this.actions.trigger(G, this, r, a);
|
|
849
855
|
}
|
|
850
856
|
const s = this.processSetValueItem(t);
|
|
851
|
-
return this._value.splice(e, 0, s), this.actions.trigger(
|
|
857
|
+
return this._value.splice(e, 0, s), this.actions.trigger(G, this, s, e), this.notifyValueChanged(), e;
|
|
852
858
|
}
|
|
853
859
|
clear() {
|
|
854
860
|
this._value = null, this.notifyValueChanged();
|
|
855
861
|
}
|
|
856
862
|
}
|
|
857
|
-
const
|
|
858
|
-
function
|
|
859
|
-
return
|
|
863
|
+
const dt = { useMarkdownInValidators: !0 };
|
|
864
|
+
function Ot() {
|
|
865
|
+
return dt;
|
|
860
866
|
}
|
|
861
|
-
function
|
|
862
|
-
Object.assign(
|
|
867
|
+
function Ut(n) {
|
|
868
|
+
Object.assign(dt, n);
|
|
863
869
|
}
|
|
864
|
-
const
|
|
870
|
+
const Yt = {
|
|
865
871
|
install(n, i) {
|
|
866
|
-
i &&
|
|
872
|
+
i && Ut(i);
|
|
867
873
|
}
|
|
868
874
|
};
|
|
869
875
|
function y(n) {
|
|
870
|
-
return
|
|
876
|
+
return Ot().useMarkdownInValidators ? new T(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, `
|
|
871
877
|
`);
|
|
872
878
|
}
|
|
873
|
-
class
|
|
879
|
+
class Rt extends f {
|
|
874
880
|
constructor(t, e, s) {
|
|
875
881
|
let r = !1, a, l;
|
|
876
|
-
super((
|
|
877
|
-
P(x, O,
|
|
878
|
-
}))), this.isValidComparison(d(
|
|
882
|
+
super((u, h, V) => (a = u, l = h, r || (r = !0, this.otherField.registerAction(new b((x, P, O, $) => {
|
|
883
|
+
P(x, O, $), this.unregistered || this.execute(V, () => null, a, l);
|
|
884
|
+
}))), this.isValidComparison(d(u), d(this.otherField.value)) ? null : [
|
|
879
885
|
new v(
|
|
880
|
-
this.replacePlaceholders(s, { newValue:
|
|
886
|
+
this.replacePlaceholders(s, { newValue: u, oldValue: h, field: V, otherField: this.otherField })
|
|
881
887
|
)
|
|
882
888
|
]));
|
|
883
889
|
o(this, "unregistered", !1);
|
|
@@ -887,35 +893,35 @@ class Ot extends f {
|
|
|
887
893
|
this.unregistered = !0;
|
|
888
894
|
}
|
|
889
895
|
}
|
|
890
|
-
class
|
|
896
|
+
class Dt extends f {
|
|
891
897
|
constructor(i, t) {
|
|
892
898
|
const e = t || y("Must be one of [**{allowedAsText}**]");
|
|
893
899
|
let s = i.join(", ");
|
|
894
|
-
s.length > 60 && (s =
|
|
900
|
+
s.length > 60 && (s = mt(s, {
|
|
895
901
|
length: 40,
|
|
896
902
|
separator: ", ",
|
|
897
903
|
omission: `... (${i.length} items total)`
|
|
898
904
|
}));
|
|
899
|
-
const r = (a, l,
|
|
905
|
+
const r = (a, l, c) => i.includes(d(a)) ? null : [
|
|
900
906
|
new v(
|
|
901
|
-
this.replacePlaceholders(e, { newValue: a, oldValue: l, field:
|
|
907
|
+
this.replacePlaceholders(e, { newValue: a, oldValue: l, field: c, allowedValues: i, allowedAsText: s })
|
|
902
908
|
)
|
|
903
909
|
];
|
|
904
910
|
super(r);
|
|
905
911
|
}
|
|
906
912
|
}
|
|
907
|
-
function
|
|
908
|
-
return n == null ? 0 :
|
|
913
|
+
function $t(n) {
|
|
914
|
+
return n == null ? 0 : et(n) || A(n) ? n.length : it(n) && Object.getPrototypeOf(n) === Object.prototype ? Object.keys(n).length : String(n).length;
|
|
909
915
|
}
|
|
910
|
-
class
|
|
916
|
+
class Bt extends f {
|
|
911
917
|
constructor(i) {
|
|
912
|
-
const t = i || y("Please enter a value"), e = (s, r, a) =>
|
|
918
|
+
const t = i || y("Please enter a value"), e = (s, r, a) => $t(d(s)) === 0 ? [new v(
|
|
913
919
|
this.replacePlaceholders(t, { newValue: s, oldValue: r, field: a })
|
|
914
920
|
)] : null;
|
|
915
921
|
super(e);
|
|
916
922
|
}
|
|
917
923
|
}
|
|
918
|
-
class
|
|
924
|
+
class kt extends f {
|
|
919
925
|
constructor(i, t) {
|
|
920
926
|
const e = t || y("Value must be larger or equal to **{minValue}**"), s = (r, a, l) => r < i || r === void 0 ? [
|
|
921
927
|
new v(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: l, minValue: i }))
|
|
@@ -923,7 +929,7 @@ class $t extends f {
|
|
|
923
929
|
super(s);
|
|
924
930
|
}
|
|
925
931
|
}
|
|
926
|
-
class
|
|
932
|
+
class qt extends f {
|
|
927
933
|
constructor(i, t) {
|
|
928
934
|
const e = t || y("Value must be less than or equal to **{maxValue}**"), s = (r, a, l) => r > i || r === void 0 ? [
|
|
929
935
|
new v(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: l, maxValue: i }))
|
|
@@ -931,20 +937,20 @@ class Bt extends f {
|
|
|
931
937
|
super(s);
|
|
932
938
|
}
|
|
933
939
|
}
|
|
934
|
-
class
|
|
940
|
+
class Mt extends f {
|
|
935
941
|
constructor(i, t, e) {
|
|
936
|
-
const s = e || y("Value must be between **{minValue}** and **{maxValue}**"), r = (a, l,
|
|
942
|
+
const s = e || y("Value must be between **{minValue}** and **{maxValue}**"), r = (a, l, c) => a < i || a > t || a === void 0 ? [
|
|
937
943
|
new v(
|
|
938
|
-
this.replacePlaceholders(s, { newValue: a, oldValue: l, field:
|
|
944
|
+
this.replacePlaceholders(s, { newValue: a, oldValue: l, field: c, minValue: i, maxValue: t })
|
|
939
945
|
)
|
|
940
946
|
] : null;
|
|
941
947
|
super(r);
|
|
942
948
|
}
|
|
943
949
|
}
|
|
944
950
|
function W(n) {
|
|
945
|
-
return n == null ? 0 :
|
|
951
|
+
return n == null ? 0 : et(n) || A(n) ? n.length : it(n) && Object.getPrototypeOf(n) === Object.prototype ? Object.keys(n).length : String(n).length;
|
|
946
952
|
}
|
|
947
|
-
class
|
|
953
|
+
class Gt extends f {
|
|
948
954
|
constructor(i, t) {
|
|
949
955
|
const e = t || y("Length must be larger or equal to **{minLength}**"), s = (r, a, l) => W(r) < i ? [
|
|
950
956
|
new v(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: l, minLength: i }))
|
|
@@ -952,7 +958,7 @@ class qt extends f {
|
|
|
952
958
|
super(s);
|
|
953
959
|
}
|
|
954
960
|
}
|
|
955
|
-
class
|
|
961
|
+
class Qt extends f {
|
|
956
962
|
constructor(i, t) {
|
|
957
963
|
const e = t || y("Length must be less than or equal to **{maxLength}**"), s = (r, a, l) => W(r) > i ? [
|
|
958
964
|
new v(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: l, maxLength: i }))
|
|
@@ -960,20 +966,20 @@ class Mt extends f {
|
|
|
960
966
|
super(s);
|
|
961
967
|
}
|
|
962
968
|
}
|
|
963
|
-
class
|
|
969
|
+
class zt extends f {
|
|
964
970
|
constructor(i, t, e) {
|
|
965
|
-
const s = e || y("Length must be between **{minLength}** and **{maxLength}**"), r = (a, l,
|
|
966
|
-
const
|
|
967
|
-
return
|
|
971
|
+
const s = e || y("Length must be between **{minLength}** and **{maxLength}**"), r = (a, l, c) => {
|
|
972
|
+
const u = W(a);
|
|
973
|
+
return u < i || u > t ? [
|
|
968
974
|
new v(
|
|
969
|
-
this.replacePlaceholders(s, { newValue: a, oldValue: l, field:
|
|
975
|
+
this.replacePlaceholders(s, { newValue: a, oldValue: l, field: c, minLength: i, maxLength: t })
|
|
970
976
|
)
|
|
971
977
|
] : null;
|
|
972
978
|
};
|
|
973
979
|
super(r);
|
|
974
980
|
}
|
|
975
981
|
}
|
|
976
|
-
class
|
|
982
|
+
class Ht extends f {
|
|
977
983
|
constructor(i, t) {
|
|
978
984
|
const e = t || y('Value must match pattern "**{pattern}**"'), s = (r, a, l) => i.test(String(d(r))) ? null : [
|
|
979
985
|
new v(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: l, pattern: i }))
|
|
@@ -981,90 +987,90 @@ class zt extends f {
|
|
|
981
987
|
super(s);
|
|
982
988
|
}
|
|
983
989
|
}
|
|
984
|
-
const
|
|
990
|
+
const Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
985
991
|
__proto__: null,
|
|
986
|
-
CompareTo:
|
|
987
|
-
InAllowedValues:
|
|
988
|
-
LengthInRange:
|
|
989
|
-
MaxLength:
|
|
990
|
-
MaxValue:
|
|
991
|
-
MinLength:
|
|
992
|
-
MinValue:
|
|
993
|
-
Pattern:
|
|
994
|
-
Required:
|
|
992
|
+
CompareTo: Rt,
|
|
993
|
+
InAllowedValues: Dt,
|
|
994
|
+
LengthInRange: zt,
|
|
995
|
+
MaxLength: Qt,
|
|
996
|
+
MaxValue: qt,
|
|
997
|
+
MinLength: Gt,
|
|
998
|
+
MinValue: kt,
|
|
999
|
+
Pattern: Ht,
|
|
1000
|
+
Required: Bt,
|
|
995
1001
|
Validator: f,
|
|
996
|
-
ValueInRange:
|
|
997
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1002
|
+
ValueInRange: Mt
|
|
1003
|
+
}, Symbol.toStringTag, { value: "Module" })), Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
998
1004
|
__proto__: null,
|
|
999
|
-
AbortEventHandlingException:
|
|
1000
|
-
Action:
|
|
1001
|
-
ActionsMap:
|
|
1002
|
-
ConditionalEnabledAction:
|
|
1003
|
-
ConditionalStatementAction:
|
|
1004
|
-
ConditionalValueAction:
|
|
1005
|
-
ConditionalVisibilityAction:
|
|
1006
|
-
DisplayMode:
|
|
1007
|
-
EmptyField:
|
|
1008
|
-
EnabledChangedAction:
|
|
1009
|
-
EnabledChangingAction:
|
|
1010
|
-
ExecuteAction:
|
|
1011
|
-
Field:
|
|
1005
|
+
AbortEventHandlingException: M,
|
|
1006
|
+
Action: H,
|
|
1007
|
+
ActionsMap: w,
|
|
1008
|
+
ConditionalEnabledAction: At,
|
|
1009
|
+
ConditionalStatementAction: D,
|
|
1010
|
+
ConditionalValueAction: Ct,
|
|
1011
|
+
ConditionalVisibilityAction: Vt,
|
|
1012
|
+
DisplayMode: C,
|
|
1013
|
+
EmptyField: Pt,
|
|
1014
|
+
EnabledChangedAction: lt,
|
|
1015
|
+
EnabledChangingAction: at,
|
|
1016
|
+
ExecuteAction: ht,
|
|
1017
|
+
Field: j,
|
|
1012
1018
|
FieldActionBase: p,
|
|
1013
1019
|
FieldBase: m,
|
|
1014
1020
|
Group: E,
|
|
1015
|
-
List:
|
|
1016
|
-
ListItemAddedAction:
|
|
1017
|
-
ListItemRemovedAction:
|
|
1018
|
-
MdString:
|
|
1021
|
+
List: X,
|
|
1022
|
+
ListItemAddedAction: G,
|
|
1023
|
+
ListItemRemovedAction: gt,
|
|
1024
|
+
MdString: T,
|
|
1019
1025
|
Operator: g,
|
|
1020
|
-
Statement:
|
|
1021
|
-
ValidChangedAction:
|
|
1022
|
-
ValidationError:
|
|
1026
|
+
Statement: F,
|
|
1027
|
+
ValidChangedAction: ot,
|
|
1028
|
+
ValidationError: z,
|
|
1023
1029
|
ValidationErrorRenderContent: v,
|
|
1024
|
-
ValidationErrorText:
|
|
1030
|
+
ValidationErrorText: yt,
|
|
1025
1031
|
Validator: f,
|
|
1026
|
-
Validators:
|
|
1032
|
+
Validators: Xt,
|
|
1027
1033
|
ValueChangedAction: b,
|
|
1028
|
-
VisibilityChangedAction:
|
|
1029
|
-
VisibilityChangingAction:
|
|
1034
|
+
VisibilityChangedAction: ut,
|
|
1035
|
+
VisibilityChangingAction: ct,
|
|
1030
1036
|
buildErrorMessage: y,
|
|
1031
|
-
isCustomModalContentComponentDef:
|
|
1037
|
+
isCustomModalContentComponentDef: Q
|
|
1032
1038
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1033
1039
|
export {
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1040
|
+
M as AbortEventHandlingException,
|
|
1041
|
+
H as Action,
|
|
1042
|
+
w as ActionsMap,
|
|
1043
|
+
At as ConditionalEnabledAction,
|
|
1044
|
+
D as ConditionalStatementAction,
|
|
1045
|
+
Ct as ConditionalValueAction,
|
|
1046
|
+
Vt as ConditionalVisibilityAction,
|
|
1047
|
+
C as DisplayMode,
|
|
1048
|
+
Pt as EmptyField,
|
|
1049
|
+
lt as EnabledChangedAction,
|
|
1050
|
+
at as EnabledChangingAction,
|
|
1051
|
+
ht as ExecuteAction,
|
|
1052
|
+
j as Field,
|
|
1047
1053
|
p as FieldActionBase,
|
|
1048
1054
|
m as FieldBase,
|
|
1049
1055
|
E as Group,
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1056
|
+
X as List,
|
|
1057
|
+
G as ListItemAddedAction,
|
|
1058
|
+
gt as ListItemRemovedAction,
|
|
1059
|
+
T as MdString,
|
|
1054
1060
|
g as Operator,
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1061
|
+
F as Statement,
|
|
1062
|
+
ot as ValidChangedAction,
|
|
1063
|
+
z as ValidationError,
|
|
1058
1064
|
v as ValidationErrorRenderContent,
|
|
1059
|
-
|
|
1065
|
+
yt as ValidationErrorText,
|
|
1060
1066
|
f as Validator,
|
|
1061
|
-
|
|
1067
|
+
Xt as Validators,
|
|
1062
1068
|
b as ValueChangedAction,
|
|
1063
|
-
|
|
1064
|
-
|
|
1069
|
+
ut as VisibilityChangedAction,
|
|
1070
|
+
ct as VisibilityChangingAction,
|
|
1065
1071
|
y as buildErrorMessage,
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1072
|
+
Zt as default,
|
|
1073
|
+
Yt as forms,
|
|
1074
|
+
Q as isCustomModalContentComponentDef
|
|
1069
1075
|
};
|
|
1070
1076
|
//# sourceMappingURL=dynamicforms-vue-forms.js.map
|