@dynamicforms/vue-forms 0.4.6 → 0.4.8

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