@dynamicforms/vue-forms 0.4.5 → 0.4.7

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,37 +1,37 @@
1
- var gt = Object.defineProperty, ft = Object.defineProperties;
2
- var pt = Object.getOwnPropertyDescriptors;
1
+ var ft = Object.defineProperty, pt = Object.defineProperties;
2
+ var bt = Object.getOwnPropertyDescriptors;
3
3
  var R = Object.getOwnPropertySymbols;
4
- var J = Object.prototype.hasOwnProperty, K = Object.prototype.propertyIsEnumerable;
5
- var $ = (i, s, t) => s in i ? gt(i, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[s] = t, A = (i, s) => {
4
+ var K = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable;
5
+ var q = (i, s, t) => s in i ? ft(i, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[s] = t, A = (i, s) => {
6
6
  for (var t in s || (s = {}))
7
- J.call(s, t) && $(i, t, s[t]);
7
+ K.call(s, t) && q(i, t, s[t]);
8
8
  if (R)
9
9
  for (var t of R(s))
10
- K.call(s, t) && $(i, t, s[t]);
10
+ Z.call(s, t) && q(i, t, s[t]);
11
11
  return i;
12
- }, I = (i, s) => ft(i, pt(s));
12
+ }, I = (i, s) => pt(i, bt(s));
13
13
  var S = (i, s) => {
14
14
  var t = {};
15
15
  for (var e in i)
16
- J.call(i, e) && s.indexOf(e) < 0 && (t[e] = i[e]);
16
+ K.call(i, e) && s.indexOf(e) < 0 && (t[e] = i[e]);
17
17
  if (i != null && R)
18
18
  for (var e of R(i))
19
- s.indexOf(e) < 0 && K.call(i, e) && (t[e] = i[e]);
19
+ s.indexOf(e) < 0 && Z.call(i, e) && (t[e] = i[e]);
20
20
  return t;
21
21
  };
22
- var o = (i, s, t) => $(i, typeof s != "symbol" ? s + "" : s, t);
23
- import { isEqual as U, isBoolean as bt, isString as _, isEmpty as M, truncate as mt, isArray as st, isObject as it } from "lodash-es";
24
- import { unref as g, computed as z, reactive as vt, defineComponent as yt, resolveComponent as Z, createBlock as xt, openBlock as Et, h as w } from "vue";
22
+ var l = (i, s, t) => q(i, typeof s != "symbol" ? s + "" : s, t);
23
+ import { isEqual as k, isBoolean as vt, isString as _, isEmpty as H, truncate as mt, isArray as nt, isObject as it } from "lodash-es";
24
+ import { unref as g, computed as G, reactive as yt, defineComponent as xt, resolveComponent as tt, createBlock as Et, openBlock as _t, h as w } from "vue";
25
25
  var N = /* @__PURE__ */ ((i) => (i[i.SUPPRESS = 1] = "SUPPRESS", i[i.HIDDEN = 5] = "HIDDEN", i[i.INVISIBLE = 8] = "INVISIBLE", i[i.FULL = 10] = "FULL", i))(N || {});
26
- const tt = 10;
26
+ const et = 10;
27
27
  ((i) => {
28
28
  function s(n) {
29
- return n.toUpperCase() === "SUPPRESS" ? 1 : n.toUpperCase() === "HIDDEN" ? 5 : n.toUpperCase() === "INVISIBLE" ? 8 : tt;
29
+ return n.toUpperCase() === "SUPPRESS" ? 1 : n.toUpperCase() === "HIDDEN" ? 5 : n.toUpperCase() === "INVISIBLE" ? 8 : et;
30
30
  }
31
31
  i.fromString = s;
32
32
  function t(n) {
33
33
  const r = typeof n == "number" ? n : i.fromString(n);
34
- return Object.values(i).includes(r) ? r : tt;
34
+ return Object.values(i).includes(r) ? r : et;
35
35
  }
36
36
  i.fromAny = t;
37
37
  function e(n) {
@@ -44,7 +44,7 @@ Object.freeze(N);
44
44
  const C = N;
45
45
  class b {
46
46
  constructor(s) {
47
- o(this, "executorFn");
47
+ l(this, "executorFn");
48
48
  this.executorFn = s;
49
49
  }
50
50
  static get classIdentifier() {
@@ -56,40 +56,45 @@ class b {
56
56
  execute(s, t, ...e) {
57
57
  return this.executorFn(s, t, ...e);
58
58
  }
59
- // eslint-disable-next-line class-methods-use-this
60
59
  get eager() {
61
60
  return !1;
62
61
  }
63
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this
62
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
64
63
  boundToField(s) {
65
64
  }
66
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this
67
65
  unregister() {
68
66
  }
69
67
  }
70
- class H extends Error {
68
+ class Q extends Error {
71
69
  }
72
- const nt = Symbol("ValueChangedAction");
73
- class m extends b {
74
- // eslint-disable-next-line @typescript-eslint/no-useless-constructor
70
+ const rt = Symbol("ValueChangedAction");
71
+ class v extends b {
75
72
  constructor(s) {
76
73
  super(s);
77
74
  }
78
- // eslint-disable-next-line class-methods-use-this
79
75
  static get classIdentifier() {
80
- return nt;
76
+ return rt;
81
77
  }
82
78
  execute(s, t, e, n) {
83
79
  return super.execute(s, t, e, n);
84
80
  }
85
81
  }
86
- class L extends String {
82
+ class T extends String {
83
+ constructor(t, e, n) {
84
+ super(t);
85
+ l(this, "plugins");
86
+ l(this, "options");
87
+ this.plugins = n, this.options = e;
88
+ }
87
89
  }
88
- function G(i) {
90
+ function W(i) {
89
91
  const s = g(i);
90
92
  return typeof s == "object" && "componentName" in s;
91
93
  }
92
- class W {
94
+ function U(i) {
95
+ return typeof g(i) == "function";
96
+ }
97
+ class X {
93
98
  get componentName() {
94
99
  return "Comment";
95
100
  }
@@ -103,7 +108,7 @@ class W {
103
108
  return "";
104
109
  }
105
110
  }
106
- class _t extends W {
111
+ class Ct extends X {
107
112
  constructor(s, t = "") {
108
113
  super(), this.text = s, this.classes = t;
109
114
  }
@@ -117,16 +122,20 @@ class _t extends W {
117
122
  return this.classes;
118
123
  }
119
124
  }
120
- class p extends W {
125
+ class p extends X {
121
126
  constructor(t, e = "") {
122
127
  super();
123
- o(this, "text");
124
- o(this, "textType");
125
- this.classes = e, this.text = t, this.textType = z(() => this.getTextType);
128
+ l(this, "text");
129
+ l(this, "textType");
130
+ this.classes = e, this.text = t, this.textType = G(() => this.getTextType);
126
131
  }
127
- get getTextType() {
132
+ get resolvedText() {
128
133
  const t = g(this.text);
129
- return t ? t instanceof L ? "md" : G(t) ? "component" : "string" : "string";
134
+ return U(t) ? t() : t;
135
+ }
136
+ get getTextType() {
137
+ const t = this.resolvedText;
138
+ return t ? t instanceof T ? "md" : W(t) ? "component" : "string" : "string";
130
139
  }
131
140
  get componentName() {
132
141
  switch (g(this.textType)) {
@@ -135,7 +144,7 @@ class p extends W {
135
144
  case "md":
136
145
  return "vue-markdown";
137
146
  case "component":
138
- return g(this.text).componentName;
147
+ return this.resolvedText.componentName;
139
148
  default:
140
149
  return "template";
141
150
  }
@@ -144,10 +153,12 @@ class p extends W {
144
153
  switch (g(this.textType)) {
145
154
  case "string":
146
155
  return {};
147
- case "md":
148
- return { source: this.text.toString() };
156
+ case "md": {
157
+ const t = this.resolvedText;
158
+ return { source: t.toString(), options: t.options, plugins: t.plugins };
159
+ }
149
160
  case "component":
150
- return g(this.text).componentProps || {};
161
+ return this.resolvedText.componentProps || {};
151
162
  default:
152
163
  return {};
153
164
  }
@@ -155,9 +166,9 @@ class p extends W {
155
166
  get componentBody() {
156
167
  switch (g(this.textType)) {
157
168
  case "string":
158
- return g(this.text);
169
+ return this.resolvedText;
159
170
  case "component":
160
- return g(this.text).componentVHtml || "";
171
+ return this.resolvedText.componentVHtml || "";
161
172
  default:
162
173
  return "";
163
174
  }
@@ -166,77 +177,83 @@ class p extends W {
166
177
  return this.classes;
167
178
  }
168
179
  }
169
- class Ct extends p {
180
+ class Vt extends p {
170
181
  }
171
- const Vt = Symbol("Validator");
172
- class f extends m {
182
+ const At = Symbol("Validator");
183
+ class f extends v {
173
184
  /**
174
185
  * Creates a new validator
175
186
  * @param validationFn Function that validates the field value and returns errors or null
176
187
  */
177
188
  constructor(t) {
178
- super((n, r, a, l) => {
179
- const c = t(a, l, n) || [], u = (h) => {
189
+ super((n, r, a, o) => {
190
+ const c = t(a, o, n) || [], u = (h) => {
180
191
  var V;
181
192
  h == null || h.forEach(
182
193
  (x) => Object.defineProperty(x, "source", { value: this.source, enumerable: !1, configurable: !1 })
183
194
  );
184
195
  for (let x = n.errors.length - 1; x >= 0; x--) {
185
- const O = n.errors[x];
186
- if (O.source === this.source) {
187
- const P = (V = h == null ? void 0 : h.findIndex((B) => U(B, O))) != null ? V : -1;
188
- P >= 0 ? h == null || h.splice(P, 1) : n.errors.splice(x, 1);
196
+ const P = n.errors[x];
197
+ if (P.source === this.source) {
198
+ const O = (V = h == null ? void 0 : h.findIndex(($) => k($, P))) != null ? V : -1;
199
+ O >= 0 ? h == null || h.splice(O, 1) : n.errors.splice(x, 1);
189
200
  }
190
201
  }
191
202
  h && h.length > 0 && n.errors.push(...h), n.validate();
192
203
  };
193
204
  return c instanceof Promise ? (n.validating = ++n.validatingCount > 0, c.then((h) => u(h)).finally(() => {
194
205
  n.validatingCount = Math.max(0, n.validatingCount - 1), n.validating = n.validatingCount > 0;
195
- })) : u(c), r(n, a, l);
206
+ })) : u(c), r(n, a, o);
196
207
  });
197
- o(this, "source");
208
+ l(this, "source");
198
209
  this.source = Symbol(this.constructor.name);
199
210
  }
200
- // eslint-disable-next-line class-methods-use-this
201
211
  static get classIdentifier() {
202
- return Vt;
212
+ return At;
203
213
  }
204
- // eslint-disable-next-line class-methods-use-this
205
214
  get eager() {
206
215
  return !0;
207
216
  }
208
- // eslint-disable-next-line class-methods-use-this
217
+ replacePlaceholdersFunction(t, e) {
218
+ return () => {
219
+ let n = g(t);
220
+ for (; U(n); )
221
+ n = g(this.replacePlaceholders(n(), e));
222
+ return n;
223
+ };
224
+ }
209
225
  replacePlaceholders(t, e) {
210
- if (G(t)) return t;
211
- let n = t;
226
+ if (U(t)) return this.replacePlaceholdersFunction(t, e);
227
+ if (W(t)) return t;
228
+ let n = g(t);
212
229
  return Object.keys(e).forEach((r) => {
213
230
  n = n.replaceAll(`{${r}}`, e[r]);
214
- }), t instanceof L ? new L(n) : n;
231
+ }), t instanceof T ? new T(n.toString(), t.options, t.plugins) : n;
215
232
  }
216
233
  }
217
- class j extends Map {
234
+ class L extends Map {
218
235
  constructor() {
219
236
  super(...arguments);
220
- o(this, "eagerActions", /* @__PURE__ */ new Set());
221
- o(this, "registeredActions", []);
237
+ l(this, "eagerActions", /* @__PURE__ */ new Set());
238
+ l(this, "registeredActions", []);
222
239
  }
223
240
  register(t) {
224
241
  if (!(t instanceof b)) throw new Error("Invalid action type");
225
242
  this.registeredActions.push(t);
226
243
  const e = t.classIdentifier, n = this.get(e) || (() => null);
227
- function r(a, ...l) {
228
- return t.execute(a, n, ...l);
244
+ function r(a, ...o) {
245
+ return t.execute(a, n, ...o);
229
246
  }
230
247
  this.set(e, r), t.eager && this.eagerActions.add(t.classIdentifier);
231
248
  }
232
249
  trigger(t, e, ...n) {
233
250
  const r = t.classIdentifier;
234
- r === nt && this.triggerEager(e, ...n);
251
+ r === rt && this.triggerEager(e, ...n);
235
252
  const a = this.get(r);
236
253
  try {
237
254
  if (a) return a(e, ...n);
238
- } catch (l) {
239
- if (!(l instanceof H)) throw l;
255
+ } catch (o) {
256
+ if (!(o instanceof Q)) throw o;
240
257
  }
241
258
  return null;
242
259
  }
@@ -246,45 +263,43 @@ class j extends Map {
246
263
  try {
247
264
  r && r(t, ...e);
248
265
  } catch (a) {
249
- if (!(a instanceof H)) throw a;
266
+ if (!(a instanceof Q)) throw a;
250
267
  }
251
268
  }
252
269
  }
253
270
  clone() {
254
- const t = new j();
271
+ const t = new L();
255
272
  return this.registeredActions.forEach((e) => t.register(e)), t;
256
273
  }
257
274
  cloneWithoutValidators() {
258
- const t = new j();
275
+ const t = new L();
259
276
  return this.registeredActions.forEach((e) => {
260
277
  e instanceof f ? e.unregister() : t.register(e);
261
278
  }), t;
262
279
  }
263
280
  }
264
- const At = Symbol("ConditionalStatementAction");
265
- class k extends m {
281
+ const It = Symbol("ConditionalStatementAction");
282
+ class B extends v {
266
283
  constructor(t, e) {
267
- const n = (r, a, l, c) => {
284
+ const n = (r, a, o, c) => {
268
285
  const u = t.evaluate();
269
286
  if (u !== this.lastResult) {
270
287
  for (const h of this.boundFields)
271
288
  e(h, u, this.lastResult);
272
289
  this.lastResult = u;
273
290
  }
274
- return a(r, l, c);
291
+ return a(r, o, c);
275
292
  };
276
293
  super(n);
277
- o(this, "lastResult");
294
+ l(this, "lastResult");
278
295
  // boundField tracks the fields this action is bound to. so that it may perform the executorFn on them and not on the
279
296
  // ValueChangedAction fields that will call the actionExecutor
280
- o(this, "boundFields", /* @__PURE__ */ new Set());
281
- t.collectFields().forEach((r) => r.registerAction(new m(n)));
297
+ l(this, "boundFields", /* @__PURE__ */ new Set());
298
+ t.collectFields().forEach((r) => r.registerAction(new v(n)));
282
299
  }
283
- // eslint-disable-next-line class-methods-use-this
284
300
  static get classIdentifier() {
285
- return At;
301
+ return It;
286
302
  }
287
- // eslint-disable-next-line class-methods-use-this
288
303
  get eager() {
289
304
  return !0;
290
305
  }
@@ -292,28 +307,28 @@ class k extends m {
292
307
  this.boundFields.add(t);
293
308
  }
294
309
  }
295
- class It extends k {
310
+ class St extends B {
296
311
  constructor(s) {
297
312
  super(s, (t, e) => {
298
313
  t.visibility = e ? C.FULL : C.SUPPRESS;
299
314
  });
300
315
  }
301
316
  }
302
- class St extends k {
317
+ class wt extends B {
303
318
  constructor(s) {
304
319
  super(s, (t, e) => {
305
320
  t.enabled = e;
306
321
  });
307
322
  }
308
323
  }
309
- class wt extends k {
324
+ class Ft extends B {
310
325
  constructor(s, t) {
311
326
  super(s, (e, n) => {
312
327
  n && (e.value = t);
313
328
  });
314
329
  }
315
330
  }
316
- var T = /* @__PURE__ */ ((i) => (i[i.NOT = 0] = "NOT", i[i.OR = 1] = "OR", i[i.AND = 2] = "AND", i[i.XOR = 3] = "XOR", i[i.NAND = 4] = "NAND", i[i.NOR = 5] = "NOR", i[i.EQUALS = -1] = "EQUALS", i[i.NOT_EQUALS = -2] = "NOT_EQUALS", i[i.GT = -3] = "GT", i[i.LT = -4] = "LT", i[i.GE = -5] = "GE", i[i.LE = -6] = "LE", i[i.IN = -7] = "IN", i[i.NOT_IN = -8] = "NOT_IN", i[i.INCLUDES = -9] = "INCLUDES", i[i.NOT_INCLUDES = -10] = "NOT_INCLUDES", i))(T || {});
331
+ var j = /* @__PURE__ */ ((i) => (i[i.NOT = 0] = "NOT", i[i.OR = 1] = "OR", i[i.AND = 2] = "AND", i[i.XOR = 3] = "XOR", i[i.NAND = 4] = "NAND", i[i.NOR = 5] = "NOR", i[i.EQUALS = -1] = "EQUALS", i[i.NOT_EQUALS = -2] = "NOT_EQUALS", i[i.GT = -3] = "GT", i[i.LT = -4] = "LT", i[i.GE = -5] = "GE", i[i.LE = -6] = "LE", i[i.IN = -7] = "IN", i[i.NOT_IN = -8] = "NOT_IN", i[i.INCLUDES = -9] = "INCLUDES", i[i.NOT_INCLUDES = -10] = "NOT_INCLUDES", i))(j || {});
317
332
  ((i) => {
318
333
  function s(r) {
319
334
  const a = r.toLowerCase();
@@ -351,31 +366,27 @@ var T = /* @__PURE__ */ ((i) => (i[i.NOT = 0] = "NOT", i[i.OR = 1] = "OR", i[i.A
351
366
  return r >= 0;
352
367
  }
353
368
  i.isLogicOperator = n;
354
- })(T || (T = {}));
355
- Object.freeze(T);
356
- const d = T, Ft = Symbol("EnabledChangingAction");
357
- class rt extends b {
358
- // eslint-disable-next-line @typescript-eslint/no-useless-constructor
369
+ })(j || (j = {}));
370
+ Object.freeze(j);
371
+ const d = j, Nt = Symbol("EnabledChangingAction");
372
+ class at extends b {
359
373
  constructor(s) {
360
374
  super(s);
361
375
  }
362
- // eslint-disable-next-line class-methods-use-this
363
376
  static get classIdentifier() {
364
- return Ft;
377
+ return Nt;
365
378
  }
366
379
  execute(s, t, e, n) {
367
380
  return super.execute(s, t, e, n);
368
381
  }
369
382
  }
370
- const Nt = Symbol("EnabledChangedAction");
371
- class at extends b {
372
- // eslint-disable-next-line @typescript-eslint/no-useless-constructor
383
+ const Tt = Symbol("EnabledChangedAction");
384
+ class ot extends b {
373
385
  constructor(s) {
374
386
  super(s);
375
387
  }
376
- // eslint-disable-next-line class-methods-use-this
377
388
  static get classIdentifier() {
378
- return Nt;
389
+ return Tt;
379
390
  }
380
391
  execute(s, t, e, n) {
381
392
  return super.execute(s, t, e, n);
@@ -383,11 +394,9 @@ class at extends b {
383
394
  }
384
395
  const Lt = Symbol("ValidChangedAction");
385
396
  class lt extends b {
386
- // eslint-disable-next-line @typescript-eslint/no-useless-constructor
387
397
  constructor(s) {
388
398
  super(s);
389
399
  }
390
- // eslint-disable-next-line class-methods-use-this
391
400
  static get classIdentifier() {
392
401
  return Lt;
393
402
  }
@@ -396,12 +405,10 @@ class lt extends b {
396
405
  }
397
406
  }
398
407
  const jt = Symbol("VisibilityChangingAction");
399
- class ot extends b {
400
- // eslint-disable-next-line @typescript-eslint/no-useless-constructor
408
+ class ct extends b {
401
409
  constructor(s) {
402
410
  super(s);
403
411
  }
404
- // eslint-disable-next-line class-methods-use-this
405
412
  static get classIdentifier() {
406
413
  return jt;
407
414
  }
@@ -409,15 +416,13 @@ class ot extends b {
409
416
  return super.execute(s, t, e, n);
410
417
  }
411
418
  }
412
- const Tt = Symbol("VisibilityChangedAction");
413
- class ct extends b {
414
- // eslint-disable-next-line @typescript-eslint/no-useless-constructor
419
+ const Pt = Symbol("VisibilityChangedAction");
420
+ class ut extends b {
415
421
  constructor(s) {
416
422
  super(s);
417
423
  }
418
- // eslint-disable-next-line class-methods-use-this
419
424
  static get classIdentifier() {
420
- return Tt;
425
+ return Pt;
421
426
  }
422
427
  execute(s, t, e, n) {
423
428
  return super.execute(s, t, e, n);
@@ -425,34 +430,34 @@ class ct extends b {
425
430
  }
426
431
  class y {
427
432
  constructor() {
428
- o(this, "reactiveValue", z(() => this.value));
433
+ l(this, "reactiveValue", G(() => this.value));
429
434
  // contains original field value as was provided at creation
430
- o(this, "validatingCount", 0);
431
- o(this, "validating", !1);
432
- o(this, "_valid", !0);
435
+ l(this, "validatingCount", 0);
436
+ l(this, "validating", !1);
437
+ l(this, "_valid", !0);
433
438
  // is current value valid as per FE and BE validators?
434
- o(this, "errors", []);
439
+ l(this, "errors", []);
435
440
  // when member of a Group, fieldName specifies the name of this field
436
- o(this, "actions", new j());
441
+ l(this, "actions", new L());
437
442
  // default property handlers
438
- o(this, "_visibility", C.FULL);
439
- o(this, "_enabled", !0);
443
+ l(this, "_visibility", C.FULL);
444
+ l(this, "_enabled", !0);
440
445
  }
441
446
  get visibility() {
442
447
  return this._visibility;
443
448
  }
444
449
  set visibility(s) {
445
- const t = this._visibility, e = this.actions.trigger(ot, this, s, t);
450
+ const t = this._visibility, e = this.actions.trigger(ct, this, s, t);
446
451
  if (!C.isDefined(e != null ? e : s)) throw new Error("visibility must be a DisplayMode constant");
447
- this._visibility = C.fromAny(e != null ? e : s), this.actions.trigger(ct, this, this._visibility, t);
452
+ this._visibility = C.fromAny(e != null ? e : s), this.actions.trigger(ut, this, this._visibility, t);
448
453
  }
449
454
  get enabled() {
450
455
  return this._enabled;
451
456
  }
452
457
  set enabled(s) {
453
- const t = this._enabled, e = this.actions.trigger(rt, this, s, t);
454
- if (!bt(e != null ? e : s)) throw new Error("Enabled value must be boolean");
455
- this._enabled = e != null ? e : s, this.actions.trigger(at, this, this._enabled, t);
458
+ const t = this._enabled, e = this.actions.trigger(at, this, s, t);
459
+ if (!vt(e != null ? e : s)) throw new Error("Enabled value must be boolean");
460
+ this._enabled = e != null ? e : s, this.actions.trigger(ot, this, this._enabled, t);
456
461
  }
457
462
  validate(s = !1) {
458
463
  s && this.actions.triggerEager(this, this.value, this.value);
@@ -466,7 +471,7 @@ class y {
466
471
  return this.value;
467
472
  }
468
473
  get isChanged() {
469
- return !U(this.value, this.originalValue);
474
+ return !k(this.value, this.originalValue);
470
475
  }
471
476
  registerAction(s) {
472
477
  const t = s;
@@ -484,9 +489,9 @@ function Ot(i, s) {
484
489
  }
485
490
  class F {
486
491
  constructor(s, t, e) {
487
- o(this, "operand1");
488
- o(this, "operator");
489
- o(this, "operand2");
492
+ l(this, "operand1");
493
+ l(this, "operator");
494
+ l(this, "operand2");
490
495
  this.operand1 = s, this.operator = t, this.operand2 = e;
491
496
  }
492
497
  get operand1Value() {
@@ -499,6 +504,7 @@ class F {
499
504
  var e, n, r, a;
500
505
  const s = this.operand1Value, t = this.operand2Value;
501
506
  switch (this.operator) {
507
+ // logical operators
502
508
  case d.AND:
503
509
  return s && t;
504
510
  case d.OR:
@@ -511,6 +517,7 @@ class F {
511
517
  return Ot(s, t);
512
518
  case d.NOT:
513
519
  return !s;
520
+ // comparison operators
514
521
  case d.EQUALS:
515
522
  return s == t;
516
523
  case d.NOT_EQUALS:
@@ -547,63 +554,57 @@ class F {
547
554
  return t(this.operand1), t(this.operand2), s;
548
555
  }
549
556
  }
550
- const Pt = Symbol("ExecuteAction");
551
- class ut extends b {
552
- // eslint-disable-next-line @typescript-eslint/no-useless-constructor
557
+ const Rt = Symbol("ExecuteAction");
558
+ class ht extends b {
553
559
  constructor(s) {
554
560
  super(s);
555
561
  }
556
- // eslint-disable-next-line class-methods-use-this
557
562
  static get classIdentifier() {
558
- return Pt;
563
+ return Rt;
559
564
  }
560
565
  execute(s, t, e) {
561
566
  return super.execute(s, t, e);
562
567
  }
563
568
  }
564
- const Rt = Symbol("ListItemAddedAction");
565
- class Q extends b {
566
- // eslint-disable-next-line @typescript-eslint/no-useless-constructor
569
+ const Ut = Symbol("ListItemAddedAction");
570
+ class z extends b {
567
571
  constructor(s) {
568
572
  super(s);
569
573
  }
570
- // eslint-disable-next-line class-methods-use-this
571
574
  static get classIdentifier() {
572
- return Rt;
575
+ return Ut;
573
576
  }
574
577
  execute(s, t, e, n) {
575
578
  return super.execute(s, t, e, n);
576
579
  }
577
580
  }
578
- const Ut = Symbol("ListItemRemovedAction");
579
- class ht extends b {
580
- // eslint-disable-next-line @typescript-eslint/no-useless-constructor
581
+ const kt = Symbol("ListItemRemovedAction");
582
+ class dt extends b {
581
583
  constructor(s) {
582
584
  super(s);
583
585
  }
584
- // eslint-disable-next-line class-methods-use-this
585
586
  static get classIdentifier() {
586
- return Ut;
587
+ return kt;
587
588
  }
588
589
  execute(s, t, e, n) {
589
590
  return super.execute(s, t, e, n);
590
591
  }
591
592
  }
592
- const et = Symbol("FieldConstructorGuard");
593
+ const st = Symbol("FieldConstructorGuard");
593
594
  class D extends y {
594
595
  constructor(t) {
595
596
  super();
596
- o(this, "_value");
597
- o(this, "_touched", !1);
598
- if (t !== et) {
597
+ l(this, "_value");
598
+ l(this, "_touched", !1);
599
+ if (t !== st) {
599
600
  const e = this.constructor.name;
600
601
  throw new TypeError(`Don't use constructor to instantiate ${e}. Use ${e}.create<T>`);
601
602
  }
602
603
  }
603
604
  init(t) {
604
605
  if (t) {
605
- const e = t, { value: n, validators: r, actions: a } = e, l = S(e, ["value", "validators", "actions"]);
606
- [...r || [], ...a || []].forEach((c) => this.registerAction(c)), Object.assign(this, l), this._value = n != null ? n : this.originalValue, this.originalValue === void 0 && (this.originalValue = this._value);
606
+ const e = t, { value: n, validators: r, actions: a } = e, o = S(e, ["value", "validators", "actions"]);
607
+ [...r || [], ...a || []].forEach((c) => this.registerAction(c)), Object.assign(this, o), this._value = n != null ? n : this.originalValue, this.originalValue === void 0 && (this.originalValue = this._value);
607
608
  }
608
609
  this.actions.triggerEager(this, this.value, this.originalValue), this.validate();
609
610
  }
@@ -613,7 +614,7 @@ class D extends y {
613
614
  * @returns Reactive Field instance
614
615
  */
615
616
  static create(t) {
616
- const e = vt(new this(et));
617
+ const e = yt(new this(st));
617
618
  return e.init(t), e;
618
619
  }
619
620
  get value() {
@@ -621,7 +622,7 @@ class D extends y {
621
622
  }
622
623
  set value(t) {
623
624
  const e = this._value;
624
- !this.enabled || e === t || (this._value = t, this.actions.trigger(m, this, this._value, e), this.parent && this.parent.notifyValueChanged(), this.validate());
625
+ !this.enabled || e === t || (this._value = t, this.actions.trigger(v, this, this._value, e), this.parent && this.parent.notifyValueChanged(), this.validate());
625
626
  }
626
627
  get touched() {
627
628
  return this._touched;
@@ -640,12 +641,12 @@ class D extends y {
640
641
  return e.actions = this.actions.clone(), e.actions.triggerEager(e, e.value, e.originalValue), e;
641
642
  }
642
643
  }
643
- const kt = D.create({ value: "EmptyField" }).registerAction(new m(
644
- () => {
644
+ const Bt = D.create({ value: "EmptyField" }).registerAction(
645
+ new v(() => {
645
646
  console.warn("Working with EmptyField! This should not happen");
646
- }
647
- ));
648
- function q(i, s) {
647
+ })
648
+ );
649
+ function M(i, s) {
649
650
  return (i == null ? void 0 : i.label) == null && (i == null ? void 0 : i.icon) == null ? s : i;
650
651
  }
651
652
  class Dt extends D {
@@ -654,10 +655,10 @@ class Dt extends D {
654
655
  }
655
656
  init(s) {
656
657
  if (s) {
657
- const t = s, { value: e, originalValue: n, validators: r, actions: a } = t, l = S(t, ["value", "originalValue", "validators", "actions"]);
658
- [...r || [], ...a || []].forEach((h) => this.registerAction(h)), Object.assign(this, l);
659
- const c = q(e, this._value), u = Object.freeze({ label: n == null ? void 0 : n.label, icon: n == null ? void 0 : n.icon });
660
- this._value = q(c, u), this.originalValue = q(u, c);
658
+ const t = s, { value: e, originalValue: n, validators: r, actions: a } = t, o = S(t, ["value", "originalValue", "validators", "actions"]);
659
+ [...r || [], ...a || []].forEach((h) => this.registerAction(h)), Object.assign(this, o);
660
+ const c = M(e, this._value), u = Object.freeze({ label: n == null ? void 0 : n.label, icon: n == null ? void 0 : n.icon });
661
+ this._value = M(c, u), this.originalValue = M(u, c);
661
662
  }
662
663
  this.actions.triggerEager(this, this.value, this.originalValue), this.validate();
663
664
  }
@@ -677,17 +678,17 @@ class Dt extends D {
677
678
  this.value.label = s;
678
679
  }
679
680
  execute(s) {
680
- this.actions.trigger(ut, this, s);
681
+ this.actions.trigger(ht, this, s);
681
682
  }
682
683
  }
683
- const Bt = /* @__PURE__ */ yt({
684
+ const $t = /* @__PURE__ */ xt({
684
685
  __name: "messages-widget",
685
686
  props: {
686
687
  message: {},
687
688
  classes: { default: "text-error" }
688
689
  },
689
690
  setup(i) {
690
- const s = i, t = Z("vue-markdown"), e = /* @__PURE__ */ new Set([
691
+ const s = i, t = tt("vue-markdown"), e = /* @__PURE__ */ new Set([
691
692
  "div",
692
693
  "span",
693
694
  "p",
@@ -752,23 +753,26 @@ const Bt = /* @__PURE__ */ yt({
752
753
  r.push(w("div", { class: [s.classes, a.extraClasses] }, a.componentBody));
753
754
  break;
754
755
  case "vue-markdown":
755
- typeof t == "string" ? (console.warn(
756
- "You are using markdown for messages-widget, but you haven't registered a vue-markdown component"
757
- ), r.push(w("div", { class: [s.classes, a.extraClasses] }, a.componentBindings.source))) : r.push(w(
758
- t,
759
- {
760
- class: [s.classes, a.extraClasses, "df-messages-widget-markdown"],
761
- source: a.componentBindings.source
762
- }
763
- ));
756
+ if (typeof t == "string")
757
+ console.warn(
758
+ "You are using markdown for messages-widget, but you haven't registered a vue-markdown component"
759
+ ), r.push(w("div", { class: [s.classes, a.extraClasses] }, a.componentBindings.source));
760
+ else {
761
+ const o = a.componentBindings;
762
+ r.push(
763
+ w(t, {
764
+ class: [s.classes, a.extraClasses, "df-messages-widget-markdown"],
765
+ source: o.source,
766
+ options: o.options,
767
+ plugins: o.plugins
768
+ })
769
+ );
770
+ }
764
771
  break;
765
772
  default:
766
773
  r.push(
767
774
  w(
768
- e.has(a.componentName.toLowerCase()) ? (
769
- // only resolve if it's not a common html element
770
- a.componentName
771
- ) : Z(a.componentName),
775
+ e.has(a.componentName.toLowerCase()) ? a.componentName : tt(a.componentName),
772
776
  I(A({ class: [s.classes, a.extraClasses] }, a.componentBindings), { innerHTML: a.componentBody })
773
777
  )
774
778
  );
@@ -776,33 +780,33 @@ const Bt = /* @__PURE__ */ yt({
776
780
  }
777
781
  }), r;
778
782
  };
779
- return (r, a) => (Et(), xt(n));
783
+ return (r, a) => (_t(), Et(n));
780
784
  }
781
785
  });
782
786
  class E extends y {
783
787
  constructor(t, e) {
784
788
  super();
785
- o(this, "_fields");
786
- o(this, "_value", null);
787
- o(this, "reactiveValue", z(() => this.value));
788
- o(this, "suppressNotifyValueChanged", !1);
789
+ l(this, "_fields");
790
+ l(this, "_value", null);
791
+ l(this, "reactiveValue", G(() => this.value));
792
+ l(this, "suppressNotifyValueChanged", !1);
789
793
  if (!E.isValidFields(t)) throw new Error("Invalid fields object provided");
790
794
  if (this._fields = {}, Object.entries(t).forEach(([r, a]) => this.addField(r, a)), e) {
791
- const n = e, { value: r, validators: a, actions: l } = n, c = S(n, ["value", "validators", "actions"]);
792
- [...a || [], ...l || []].forEach((u) => this.registerAction(u)), Object.assign(this, c), this.value = r != null ? r : this.originalValue;
795
+ const n = e, { value: r, validators: a, actions: o } = n, c = S(n, ["value", "validators", "actions"]);
796
+ [...a || [], ...o || []].forEach((u) => this.registerAction(u)), Object.assign(this, c), this.value = r != null ? r : this.originalValue;
793
797
  }
794
798
  this.originalValue === void 0 && (this.originalValue = this.value), this.actions.triggerEager(this, this.value, this.originalValue), this.validate();
795
799
  }
796
800
  addField(t, e) {
797
801
  if (this.fields[t] !== void 0)
798
802
  throw new Error(`Field ${t} is already in this form`);
799
- Object.defineProperty(e, "parent", { get: () => this, configurable: !1, enumerable: !1 }), Object.defineProperty(e, "fieldName", { get: () => t, configurable: !1, enumerable: !1 }), Object.defineProperty(
800
- this._fields,
801
- t,
802
- { get() {
803
+ Object.defineProperty(e, "parent", { get: () => this, configurable: !1, enumerable: !1 }), Object.defineProperty(e, "fieldName", { get: () => t, configurable: !1, enumerable: !1 }), Object.defineProperty(this._fields, t, {
804
+ get() {
803
805
  return e;
804
- }, configurable: !1, enumerable: !0 }
805
- );
806
+ },
807
+ configurable: !1,
808
+ enumerable: !0
809
+ });
806
810
  }
807
811
  static isValidFields(t) {
808
812
  function e(n) {
@@ -814,9 +818,7 @@ class E extends y {
814
818
  if (t instanceof y)
815
819
  throw new Error("data is already a Form structure, should be a simple object");
816
820
  return new E(
817
- t == null ? {} : Object.fromEntries(
818
- Object.entries(t).map(([e, n]) => [e, D.create({ value: n })])
819
- )
821
+ t == null ? {} : Object.fromEntries(Object.entries(t).map(([e, n]) => [e, D.create({ value: n })]))
820
822
  );
821
823
  }
822
824
  field(t) {
@@ -830,8 +832,8 @@ class E extends y {
830
832
  const t = {};
831
833
  return Object.entries(this._fields).forEach(([e, n]) => {
832
834
  const r = n.value;
833
- (n.enabled || n instanceof E && !M(r)) && (t[e] = r);
834
- }), M(t) ? null : t;
835
+ (n.enabled || n instanceof E && !H(r)) && (t[e] = r);
836
+ }), H(t) ? null : t;
835
837
  }
836
838
  set value(t) {
837
839
  this.suppressNotifyValueChanged = !0;
@@ -861,9 +863,9 @@ class E extends y {
861
863
  notifyValueChanged() {
862
864
  if (this.suppressNotifyValueChanged) return;
863
865
  const t = this.value;
864
- if (!U(t, this._value)) {
866
+ if (!k(t, this._value)) {
865
867
  const e = this._value;
866
- this._value = t, this.actions.trigger(m, this, t, e), this.parent && this.parent.notifyValueChanged(), this.validate();
868
+ this._value = t, this.actions.trigger(v, this, t, e), this.parent && this.parent.notifyValueChanged(), this.validate();
867
869
  }
868
870
  }
869
871
  get valid() {
@@ -873,7 +875,7 @@ class E extends y {
873
875
  t && Object.values(this._fields).forEach((e) => e.validate(!0)), super.validate(t);
874
876
  }
875
877
  clone(t) {
876
- var r, a, l;
878
+ var r, a, o;
877
879
  const e = {};
878
880
  Object.entries(this._fields).forEach(([c, u]) => {
879
881
  e[c] = u.clone();
@@ -882,20 +884,20 @@ class E extends y {
882
884
  value: (r = t == null ? void 0 : t.value) != null ? r : this.value
883
885
  }, t && "originalValue" in t ? { originalValue: t.originalValue } : {}), {
884
886
  enabled: (a = t == null ? void 0 : t.enabled) != null ? a : this.enabled,
885
- visibility: (l = t == null ? void 0 : t.visibility) != null ? l : this.visibility
887
+ visibility: (o = t == null ? void 0 : t.visibility) != null ? o : this.visibility
886
888
  }));
887
889
  return n.actions = this.actions.clone(), n.actions.triggerEager(n, n.value, n.originalValue), n;
888
890
  }
889
891
  }
890
- class X extends y {
892
+ class Y extends y {
891
893
  constructor(t, e) {
892
894
  super();
893
- o(this, "_value", null);
894
- o(this, "_itemTemplate");
895
- o(this, "_previousValue");
895
+ l(this, "_value", null);
896
+ l(this, "_itemTemplate");
897
+ l(this, "_previousValue");
896
898
  if (this._itemTemplate = t, e) {
897
- const n = e, { value: r, validators: a, actions: l } = n, c = S(n, ["value", "validators", "actions"]);
898
- [...a || [], ...l || []].forEach((u) => this.registerAction(u)), Object.assign(this, c), r && this.setValueInternal(r);
899
+ const n = e, { value: r, validators: a, actions: o } = n, c = S(n, ["value", "validators", "actions"]);
900
+ [...a || [], ...o || []].forEach((u) => this.registerAction(u)), Object.assign(this, c), r && this.setValueInternal(r);
899
901
  }
900
902
  this.originalValue === void 0 && (this.originalValue = this.value), this._previousValue = this.value, this.actions.triggerEager(this, this.value, this.originalValue), this.validate();
901
903
  }
@@ -909,11 +911,11 @@ class X extends y {
909
911
  get value() {
910
912
  var e;
911
913
  const t = (e = this._value) == null ? void 0 : e.map((n) => n.value);
912
- return M(t) ? null : t;
914
+ return H(t) ? null : t;
913
915
  }
914
916
  set value(t) {
915
917
  const e = this.value;
916
- this.setValueInternal(t), this.actions.trigger(m, this, this.value, e), this.parent && this.parent.notifyValueChanged(), this.validate();
918
+ this.setValueInternal(t), this.actions.trigger(v, this, this.value, e), this.parent && this.parent.notifyValueChanged(), this.validate();
917
919
  }
918
920
  get touched() {
919
921
  var t;
@@ -926,20 +928,20 @@ class X extends y {
926
928
  });
927
929
  }
928
930
  clone(t) {
929
- var n, r, a, l;
930
- const e = new X((n = this._itemTemplate) == null ? void 0 : n.clone(), I(A({
931
+ var n, r, a, o;
932
+ const e = new Y((n = this._itemTemplate) == null ? void 0 : n.clone(), I(A({
931
933
  value: [...(r = t == null ? void 0 : t.value) != null ? r : this.value]
932
934
  }, t && "originalValue" in t ? { originalValue: t.originalValue } : {}), {
933
935
  enabled: (a = t == null ? void 0 : t.enabled) != null ? a : this.enabled,
934
- visibility: (l = t == null ? void 0 : t.visibility) != null ? l : this.visibility
936
+ visibility: (o = t == null ? void 0 : t.visibility) != null ? o : this.visibility
935
937
  }));
936
938
  return e.actions = this.actions.clone(), e.actions.triggerEager(e, e.value, e.originalValue), e;
937
939
  }
938
940
  notifyValueChanged() {
939
941
  const t = this.value;
940
- if (!U(t, this._previousValue)) {
942
+ if (!k(t, this._previousValue)) {
941
943
  const e = this._previousValue;
942
- this._previousValue = t, this.actions.trigger(m, this, t, e), this.parent && this.parent.notifyValueChanged(), this.validate();
944
+ this._previousValue = t, this.actions.trigger(v, this, t, e), this.parent && this.parent.notifyValueChanged(), this.validate();
943
945
  }
944
946
  }
945
947
  get valid() {
@@ -965,235 +967,237 @@ class X extends y {
965
967
  var n;
966
968
  if (this._value == null || t < 0 || this._value.length <= t) return;
967
969
  let e = (n = this._value.splice(t, 1)) == null ? void 0 : n[0];
968
- return e && (e = e.clone(), this.actions.trigger(ht, this, e, t), this.notifyValueChanged()), e;
970
+ return e && (e = e.clone(), this.actions.trigger(dt, this, e, t), this.notifyValueChanged()), e;
969
971
  }
970
972
  insert(t, e) {
971
973
  for (this._value == null && (this._value = []); this._value.length < e; ) {
972
974
  const r = this.processSetValueItem(null), a = this._value.push(r);
973
- this.actions.trigger(Q, this, r, a);
975
+ this.actions.trigger(z, this, r, a);
974
976
  }
975
977
  const n = this.processSetValueItem(t);
976
- return this._value.splice(e, 0, n), this.actions.trigger(Q, this, n, e), this.notifyValueChanged(), e;
978
+ return this._value.splice(e, 0, n), this.actions.trigger(z, this, n, e), this.notifyValueChanged(), e;
977
979
  }
978
980
  clear() {
979
981
  this._value = null, this.notifyValueChanged();
980
982
  }
981
983
  }
982
- const dt = { useMarkdownInValidators: !0 };
983
- function $t() {
984
- return dt;
984
+ const gt = { useMarkdownInValidators: !0 };
985
+ function qt() {
986
+ return gt;
985
987
  }
986
- function qt(i) {
987
- Object.assign(dt, i);
988
+ function Mt(i) {
989
+ Object.assign(gt, i);
988
990
  }
989
- const ne = {
991
+ const re = {
990
992
  install(i, s) {
991
- s && qt(s);
993
+ s && Mt(s);
992
994
  }
993
995
  };
994
- function v(i) {
995
- return $t().useMarkdownInValidators ? new L(i) : i.replace(/[*_~`]/g, "").replace(/!\[(.*?)\]\(.*?\)/g, "$1").replace(/\[(.*?)\]\((.*?)\)/g, "$1").replace(/#+\s?/g, "").replace(/>\s?/g, "").replace(/(\*|-|\d+\.)\s+/g, "").replace(/`{3}[\s\S]*?`{3}/g, "").replace(/`([^`]+)`/g, "$1").replace(/\n{2,}/g, `
996
+ function m(i) {
997
+ return qt().useMarkdownInValidators ? new T(i) : i.replace(/[*_~`]/g, "").replace(/!\[(.*?)\]\(.*?\)/g, "$1").replace(/\[(.*?)\]\((.*?)\)/g, "$1").replace(/#+\s?/g, "").replace(/>\s?/g, "").replace(/(\*|-|\d+\.)\s+/g, "").replace(/`{3}[\s\S]*?`{3}/g, "").replace(/`([^`]+)`/g, "$1").replace(/\n{2,}/g, `
996
998
  `);
997
999
  }
998
- class Mt extends f {
1000
+ class Ht extends f {
999
1001
  constructor(t, e, n) {
1000
- let r = !1, a, l;
1001
- super((u, h, V) => (a = u, l = h, r || (r = !0, this.otherField.registerAction(new m((x, O, P, B) => {
1002
- O(x, P, B), this.unregistered || this.execute(V, () => null, a, l);
1003
- }))), this.isValidComparison(g(u), g(this.otherField.value)) ? null : [
1002
+ let r = !1, a, o;
1003
+ super((u, h, V) => (a = u, o = h, r || (r = !0, this.otherField.registerAction(
1004
+ new v((x, P, O, $) => {
1005
+ P(x, O, $), this.unregistered || this.execute(V, () => null, a, o);
1006
+ })
1007
+ )), this.isValidComparison(g(u), g(this.otherField.value)) ? null : [
1004
1008
  new p(
1005
1009
  this.replacePlaceholders(n, { newValue: u, oldValue: h, field: V, otherField: this.otherField })
1006
1010
  )
1007
1011
  ]));
1008
- o(this, "unregistered", !1);
1012
+ l(this, "unregistered", !1);
1009
1013
  this.otherField = t, this.isValidComparison = e;
1010
1014
  }
1011
1015
  unregister() {
1012
1016
  this.unregistered = !0;
1013
1017
  }
1014
1018
  }
1015
- class Ht extends f {
1019
+ class Qt extends f {
1016
1020
  constructor(s, t) {
1017
- const e = t || v("Must be one of [**{allowedAsText}**]");
1021
+ const e = t || m("Must be one of [**{allowedAsText}**]");
1018
1022
  let n = s.join(", ");
1019
1023
  n.length > 60 && (n = mt(n, {
1020
1024
  length: 40,
1021
1025
  separator: ", ",
1022
1026
  omission: `... (${s.length} items total)`
1023
1027
  }));
1024
- const r = (a, l, c) => s.includes(g(a)) ? null : [
1028
+ const r = (a, o, c) => s.includes(g(a)) ? null : [
1025
1029
  new p(
1026
- this.replacePlaceholders(e, { newValue: a, oldValue: l, field: c, allowedValues: s, allowedAsText: n })
1030
+ this.replacePlaceholders(e, { newValue: a, oldValue: o, field: c, allowedValues: s, allowedAsText: n })
1027
1031
  )
1028
1032
  ];
1029
1033
  super(r);
1030
1034
  }
1031
1035
  }
1032
- function Qt(i) {
1033
- return i == null ? 0 : st(i) || _(i) ? i.length : it(i) && Object.getPrototypeOf(i) === Object.prototype ? Object.keys(i).length : String(i).length;
1036
+ function zt(i) {
1037
+ return i == null ? 0 : nt(i) || _(i) ? i.length : it(i) && Object.getPrototypeOf(i) === Object.prototype ? Object.keys(i).length : String(i).length;
1034
1038
  }
1035
- class zt extends f {
1039
+ class Gt extends f {
1036
1040
  constructor(s) {
1037
- const t = s || v("Please enter a value"), e = (n, r, a) => Qt(g(n)) === 0 ? [new p(
1038
- this.replacePlaceholders(t, { newValue: n, oldValue: r, field: a })
1039
- )] : null;
1041
+ const t = s || m("Please enter a value"), e = (n, r, a) => zt(g(n)) === 0 ? [new p(this.replacePlaceholders(t, { newValue: n, oldValue: r, field: a }))] : null;
1040
1042
  super(e);
1041
1043
  }
1042
1044
  }
1043
- class Gt extends f {
1045
+ class Wt extends f {
1044
1046
  constructor(s, t) {
1045
- const e = t || v("Value must be larger or equal to **{minValue}**"), n = (r, a, l) => r < s || r === void 0 ? [
1046
- new p(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: l, minValue: s }))
1047
+ const e = t || m("Value must be larger or equal to **{minValue}**"), n = (r, a, o) => r < s || r === void 0 ? [
1048
+ new p(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: o, minValue: s }))
1047
1049
  ] : null;
1048
1050
  super(n);
1049
1051
  }
1050
1052
  }
1051
- class Wt extends f {
1053
+ class Xt extends f {
1052
1054
  constructor(s, t) {
1053
- const e = t || v("Value must be less than or equal to **{maxValue}**"), n = (r, a, l) => r > s || r === void 0 ? [
1054
- new p(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: l, maxValue: s }))
1055
+ const e = t || m("Value must be less than or equal to **{maxValue}**"), n = (r, a, o) => r > s || r === void 0 ? [
1056
+ new p(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: o, maxValue: s }))
1055
1057
  ] : null;
1056
1058
  super(n);
1057
1059
  }
1058
1060
  }
1059
- class Xt extends f {
1061
+ class Yt extends f {
1060
1062
  constructor(s, t, e) {
1061
- const n = e || v("Value must be between **{minValue}** and **{maxValue}**"), r = (a, l, c) => a < s || a > t || a === void 0 ? [
1063
+ const n = e || m("Value must be between **{minValue}** and **{maxValue}**"), r = (a, o, c) => a < s || a > t || a === void 0 ? [
1062
1064
  new p(
1063
- this.replacePlaceholders(n, { newValue: a, oldValue: l, field: c, minValue: s, maxValue: t })
1065
+ this.replacePlaceholders(n, { newValue: a, oldValue: o, field: c, minValue: s, maxValue: t })
1064
1066
  )
1065
1067
  ] : null;
1066
1068
  super(r);
1067
1069
  }
1068
1070
  }
1069
- function Y(i) {
1070
- return i == null ? 0 : st(i) || _(i) ? i.length : it(i) && Object.getPrototypeOf(i) === Object.prototype ? Object.keys(i).length : String(i).length;
1071
+ function J(i) {
1072
+ return i == null ? 0 : nt(i) || _(i) ? i.length : it(i) && Object.getPrototypeOf(i) === Object.prototype ? Object.keys(i).length : String(i).length;
1071
1073
  }
1072
- class Yt extends f {
1074
+ class Jt extends f {
1073
1075
  constructor(s, t) {
1074
- const e = t || v("Length must be larger or equal to **{minLength}**"), n = (r, a, l) => Y(r) < s ? [
1075
- new p(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: l, minLength: s }))
1076
+ const e = t || m("Length must be larger or equal to **{minLength}**"), n = (r, a, o) => J(r) < s ? [
1077
+ new p(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: o, minLength: s }))
1076
1078
  ] : null;
1077
1079
  super(n);
1078
1080
  }
1079
1081
  }
1080
- class Jt extends f {
1082
+ class Kt extends f {
1081
1083
  constructor(s, t) {
1082
- const e = t || v("Length must be less than or equal to **{maxLength}**"), n = (r, a, l) => Y(r) > s ? [
1083
- new p(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: l, maxLength: s }))
1084
+ const e = t || m("Length must be less than or equal to **{maxLength}**"), n = (r, a, o) => J(r) > s ? [
1085
+ new p(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: o, maxLength: s }))
1084
1086
  ] : null;
1085
1087
  super(n);
1086
1088
  }
1087
1089
  }
1088
- class Kt extends f {
1090
+ class Zt extends f {
1089
1091
  constructor(s, t, e) {
1090
- const n = e || v("Length must be between **{minLength}** and **{maxLength}**"), r = (a, l, c) => {
1091
- const u = Y(a);
1092
+ const n = e || m("Length must be between **{minLength}** and **{maxLength}**"), r = (a, o, c) => {
1093
+ const u = J(a);
1092
1094
  return u < s || u > t ? [
1093
1095
  new p(
1094
- this.replacePlaceholders(n, { newValue: a, oldValue: l, field: c, minLength: s, maxLength: t })
1096
+ this.replacePlaceholders(n, { newValue: a, oldValue: o, field: c, minLength: s, maxLength: t })
1095
1097
  )
1096
1098
  ] : null;
1097
1099
  };
1098
1100
  super(r);
1099
1101
  }
1100
1102
  }
1101
- class Zt extends f {
1103
+ class te extends f {
1102
1104
  constructor(s, t) {
1103
- const e = t || v('Value must match pattern "**{pattern}**"'), n = (r, a, l) => s.test(String(g(r))) ? null : [
1104
- new p(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: l, pattern: s }))
1105
+ const e = t || m('Value must match pattern "**{pattern}**"'), n = (r, a, o) => s.test(String(g(r))) ? null : [
1106
+ new p(this.replacePlaceholders(e, { newValue: r, oldValue: a, field: o, pattern: s }))
1105
1107
  ];
1106
1108
  super(n);
1107
1109
  }
1108
1110
  }
1109
- const te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1111
+ const ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1110
1112
  __proto__: null,
1111
- CompareTo: Mt,
1112
- InAllowedValues: Ht,
1113
- LengthInRange: Kt,
1114
- MaxLength: Jt,
1115
- MaxValue: Wt,
1116
- MinLength: Yt,
1117
- MinValue: Gt,
1118
- Pattern: Zt,
1119
- Required: zt,
1113
+ CompareTo: Ht,
1114
+ InAllowedValues: Qt,
1115
+ LengthInRange: Zt,
1116
+ MaxLength: Kt,
1117
+ MaxValue: Xt,
1118
+ MinLength: Jt,
1119
+ MinValue: Wt,
1120
+ Pattern: te,
1121
+ Required: Gt,
1120
1122
  Validator: f,
1121
- ValueInRange: Xt
1122
- }, Symbol.toStringTag, { value: "Module" })), re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1123
+ ValueInRange: Yt
1124
+ }, Symbol.toStringTag, { value: "Module" })), ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1123
1125
  __proto__: null,
1124
- AbortEventHandlingException: H,
1126
+ AbortEventHandlingException: Q,
1125
1127
  Action: Dt,
1126
- ActionsMap: j,
1127
- ConditionalEnabledAction: St,
1128
- ConditionalStatementAction: k,
1129
- ConditionalValueAction: wt,
1130
- ConditionalVisibilityAction: It,
1128
+ ActionsMap: L,
1129
+ ConditionalEnabledAction: wt,
1130
+ ConditionalStatementAction: B,
1131
+ ConditionalValueAction: Ft,
1132
+ ConditionalVisibilityAction: St,
1131
1133
  DisplayMode: C,
1132
- EmptyField: kt,
1133
- EnabledChangedAction: at,
1134
- EnabledChangingAction: rt,
1135
- ExecuteAction: ut,
1134
+ EmptyField: Bt,
1135
+ EnabledChangedAction: ot,
1136
+ EnabledChangingAction: at,
1137
+ ExecuteAction: ht,
1136
1138
  Field: D,
1137
1139
  FieldActionBase: b,
1138
1140
  FieldBase: y,
1139
1141
  Group: E,
1140
- List: X,
1141
- ListItemAddedAction: Q,
1142
- ListItemRemovedAction: ht,
1143
- MdString: L,
1144
- MessagesWidget: Bt,
1142
+ List: Y,
1143
+ ListItemAddedAction: z,
1144
+ ListItemRemovedAction: dt,
1145
+ MdString: T,
1146
+ MessagesWidget: $t,
1145
1147
  Operator: d,
1146
- RenderableValue: Ct,
1148
+ RenderableValue: Vt,
1147
1149
  Statement: F,
1148
1150
  ValidChangedAction: lt,
1149
- ValidationError: W,
1151
+ ValidationError: X,
1150
1152
  ValidationErrorRenderContent: p,
1151
- ValidationErrorText: _t,
1153
+ ValidationErrorText: Ct,
1152
1154
  Validator: f,
1153
- Validators: te,
1154
- ValueChangedAction: m,
1155
- VisibilityChangedAction: ct,
1156
- VisibilityChangingAction: ot,
1157
- buildErrorMessage: v,
1158
- isSimpleComponentDef: G
1155
+ Validators: ee,
1156
+ ValueChangedAction: v,
1157
+ VisibilityChangedAction: ut,
1158
+ VisibilityChangingAction: ct,
1159
+ buildErrorMessage: m,
1160
+ isCallableFunction: U,
1161
+ isSimpleComponentDef: W
1159
1162
  }, Symbol.toStringTag, { value: "Module" }));
1160
1163
  export {
1161
- H as AbortEventHandlingException,
1164
+ Q as AbortEventHandlingException,
1162
1165
  Dt as Action,
1163
- j as ActionsMap,
1164
- St as ConditionalEnabledAction,
1165
- k as ConditionalStatementAction,
1166
- wt as ConditionalValueAction,
1167
- It as ConditionalVisibilityAction,
1166
+ L as ActionsMap,
1167
+ wt as ConditionalEnabledAction,
1168
+ B as ConditionalStatementAction,
1169
+ Ft as ConditionalValueAction,
1170
+ St as ConditionalVisibilityAction,
1168
1171
  C as DisplayMode,
1169
- kt as EmptyField,
1170
- at as EnabledChangedAction,
1171
- rt as EnabledChangingAction,
1172
- ut as ExecuteAction,
1172
+ Bt as EmptyField,
1173
+ ot as EnabledChangedAction,
1174
+ at as EnabledChangingAction,
1175
+ ht as ExecuteAction,
1173
1176
  D as Field,
1174
1177
  b as FieldActionBase,
1175
1178
  y as FieldBase,
1176
1179
  E as Group,
1177
- X as List,
1178
- Q as ListItemAddedAction,
1179
- ht as ListItemRemovedAction,
1180
- L as MdString,
1181
- Bt as MessagesWidget,
1180
+ Y as List,
1181
+ z as ListItemAddedAction,
1182
+ dt as ListItemRemovedAction,
1183
+ T as MdString,
1184
+ $t as MessagesWidget,
1182
1185
  d as Operator,
1183
- Ct as RenderableValue,
1186
+ Vt as RenderableValue,
1184
1187
  F as Statement,
1185
1188
  lt as ValidChangedAction,
1186
- W as ValidationError,
1189
+ X as ValidationError,
1187
1190
  p as ValidationErrorRenderContent,
1188
- _t as ValidationErrorText,
1191
+ Ct as ValidationErrorText,
1189
1192
  f as Validator,
1190
- te as Validators,
1191
- m as ValueChangedAction,
1192
- ct as VisibilityChangedAction,
1193
- ot as VisibilityChangingAction,
1194
- v as buildErrorMessage,
1195
- re as default,
1196
- ne as forms,
1197
- G as isSimpleComponentDef
1193
+ ee as Validators,
1194
+ v as ValueChangedAction,
1195
+ ut as VisibilityChangedAction,
1196
+ ct as VisibilityChangingAction,
1197
+ m as buildErrorMessage,
1198
+ ae as default,
1199
+ re as forms,
1200
+ U as isCallableFunction,
1201
+ W as isSimpleComponentDef
1198
1202
  };
1199
1203
  //# sourceMappingURL=dynamicforms-vue-forms.js.map