@dynamicforms/vue-forms 0.5.0 → 0.5.1

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.
@@ -21,8 +21,8 @@ var I = (i, s) => {
21
21
  };
22
22
  var l = (i, s, t) => q(i, typeof s != "symbol" ? s + "" : s, t);
23
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 || {});
24
+ import { unref as g, computed as G, reactive as yt, defineComponent as xt, resolveComponent as tt, openBlock as Et, createBlock as _t, h as S } from "vue";
25
+ var w = /* @__PURE__ */ ((i) => (i[i.SUPPRESS = 1] = "SUPPRESS", i[i.HIDDEN = 5] = "HIDDEN", i[i.INVISIBLE = 8] = "INVISIBLE", i[i.FULL = 10] = "FULL", i))(w || {});
26
26
  const et = 10;
27
27
  ((i) => {
28
28
  function s(n) {
@@ -39,9 +39,9 @@ const et = 10;
39
39
  return Object.values(i).includes(r);
40
40
  }
41
41
  i.isDefined = e;
42
- })(F || (F = {}));
43
- Object.freeze(F);
44
- const V = F;
42
+ })(w || (w = {}));
43
+ Object.freeze(w);
44
+ const V = w;
45
45
  class b {
46
46
  constructor(s) {
47
47
  l(this, "executorFn");
@@ -67,7 +67,7 @@ class b {
67
67
  }
68
68
  class Q extends Error {
69
69
  }
70
- const rt = Symbol("ValueChangedAction");
70
+ const rt = /* @__PURE__ */ Symbol("ValueChangedAction");
71
71
  class v extends b {
72
72
  constructor(s) {
73
73
  super(s);
@@ -109,8 +109,11 @@ class X {
109
109
  }
110
110
  }
111
111
  class Ct extends X {
112
- constructor(s, t = "") {
113
- super(), this.text = s, this.classes = t;
112
+ constructor(t, e = "") {
113
+ super();
114
+ l(this, "text");
115
+ l(this, "classes");
116
+ this.text = t, this.classes = e;
114
117
  }
115
118
  get componentName() {
116
119
  return "template";
@@ -125,6 +128,7 @@ class Ct extends X {
125
128
  class p extends X {
126
129
  constructor(t, e = "") {
127
130
  super();
131
+ l(this, "classes");
128
132
  l(this, "text");
129
133
  l(this, "textType");
130
134
  this.classes = e, this.text = t, this.textType = G(() => this.getTextType);
@@ -179,7 +183,7 @@ class p extends X {
179
183
  }
180
184
  class Vt extends p {
181
185
  }
182
- const At = Symbol("Validator");
186
+ const At = /* @__PURE__ */ Symbol("Validator");
183
187
  class f extends v {
184
188
  /**
185
189
  * Creates a new validator
@@ -278,7 +282,7 @@ class T extends Map {
278
282
  }), t;
279
283
  }
280
284
  }
281
- const It = Symbol("ConditionalStatementAction");
285
+ const It = /* @__PURE__ */ Symbol("ConditionalStatementAction");
282
286
  class B extends v {
283
287
  constructor(t, e) {
284
288
  const n = (r, a, o, c) => {
@@ -314,14 +318,14 @@ class St extends B {
314
318
  });
315
319
  }
316
320
  }
317
- class wt extends B {
321
+ class Ft extends B {
318
322
  constructor(s) {
319
323
  super(s, (t, e) => {
320
324
  t.enabled = e;
321
325
  });
322
326
  }
323
327
  }
324
- class Ft extends B {
328
+ class wt extends B {
325
329
  constructor(s, t) {
326
330
  super(s, (e, n) => {
327
331
  n && (e.value = t);
@@ -368,7 +372,7 @@ var L = /* @__PURE__ */ ((i) => (i[i.NOT = 0] = "NOT", i[i.OR = 1] = "OR", i[i.A
368
372
  i.isLogicOperator = n;
369
373
  })(L || (L = {}));
370
374
  Object.freeze(L);
371
- const d = L, Nt = Symbol("EnabledChangingAction");
375
+ const d = L, Nt = /* @__PURE__ */ Symbol("EnabledChangingAction");
372
376
  class at extends b {
373
377
  constructor(s) {
374
378
  super(s);
@@ -380,7 +384,7 @@ class at extends b {
380
384
  return super.execute(s, t, e, n);
381
385
  }
382
386
  }
383
- const Tt = Symbol("EnabledChangedAction");
387
+ const Tt = /* @__PURE__ */ Symbol("EnabledChangedAction");
384
388
  class ot extends b {
385
389
  constructor(s) {
386
390
  super(s);
@@ -392,7 +396,7 @@ class ot extends b {
392
396
  return super.execute(s, t, e, n);
393
397
  }
394
398
  }
395
- const Lt = Symbol("ValidChangedAction");
399
+ const Lt = /* @__PURE__ */ Symbol("ValidChangedAction");
396
400
  class lt extends b {
397
401
  constructor(s) {
398
402
  super(s);
@@ -404,7 +408,7 @@ class lt extends b {
404
408
  return super.execute(s, t, e, n);
405
409
  }
406
410
  }
407
- const jt = Symbol("VisibilityChangingAction");
411
+ const jt = /* @__PURE__ */ Symbol("VisibilityChangingAction");
408
412
  class ct extends b {
409
413
  constructor(s) {
410
414
  super(s);
@@ -416,7 +420,7 @@ class ct extends b {
416
420
  return super.execute(s, t, e, n);
417
421
  }
418
422
  }
419
- const Pt = Symbol("VisibilityChangedAction");
423
+ const Pt = /* @__PURE__ */ Symbol("VisibilityChangedAction");
420
424
  class ut extends b {
421
425
  constructor(s) {
422
426
  super(s);
@@ -487,7 +491,7 @@ class y {
487
491
  function Ot(i, s) {
488
492
  return i ? !s : s;
489
493
  }
490
- class w {
494
+ class F {
491
495
  constructor(s, t, e) {
492
496
  l(this, "operand1");
493
497
  l(this, "operator");
@@ -495,10 +499,10 @@ class w {
495
499
  this.operand1 = s, this.operator = t, this.operand2 = e;
496
500
  }
497
501
  get operand1Value() {
498
- return this.operand1 instanceof w ? this.operand1.evaluate() : this.operand1 instanceof y ? g(this.operand1.value) : this.operand1;
502
+ return this.operand1 instanceof F ? this.operand1.evaluate() : this.operand1 instanceof y ? g(this.operand1.value) : this.operand1;
499
503
  }
500
504
  get operand2Value() {
501
- return this.operand2 instanceof w ? this.operand2.evaluate() : this.operand2 instanceof y ? g(this.operand2.value) : this.operand2;
505
+ return this.operand2 instanceof F ? this.operand2.evaluate() : this.operand2 instanceof y ? g(this.operand2.value) : this.operand2;
502
506
  }
503
507
  evaluate() {
504
508
  var e, n, r, a;
@@ -549,12 +553,12 @@ class w {
549
553
  collectFields() {
550
554
  const s = /* @__PURE__ */ new Set();
551
555
  function t(e) {
552
- e instanceof y ? s.add(e) : e instanceof w && e.collectFields().forEach((r) => s.add(r));
556
+ e instanceof y ? s.add(e) : e instanceof F && e.collectFields().forEach((r) => s.add(r));
553
557
  }
554
558
  return t(this.operand1), t(this.operand2), s;
555
559
  }
556
560
  }
557
- const Rt = Symbol("ExecuteAction");
561
+ const Rt = /* @__PURE__ */ Symbol("ExecuteAction");
558
562
  class ht extends b {
559
563
  constructor(s) {
560
564
  super(s);
@@ -566,7 +570,7 @@ class ht extends b {
566
570
  return super.execute(s, t, e);
567
571
  }
568
572
  }
569
- const Ut = Symbol("ListItemAddedAction");
573
+ const Ut = /* @__PURE__ */ Symbol("ListItemAddedAction");
570
574
  class z extends b {
571
575
  constructor(s) {
572
576
  super(s);
@@ -578,7 +582,7 @@ class z extends b {
578
582
  return super.execute(s, t, e, n);
579
583
  }
580
584
  }
581
- const kt = Symbol("ListItemRemovedAction");
585
+ const kt = /* @__PURE__ */ Symbol("ListItemRemovedAction");
582
586
  class dt extends b {
583
587
  constructor(s) {
584
588
  super(s);
@@ -590,7 +594,7 @@ class dt extends b {
590
594
  return super.execute(s, t, e, n);
591
595
  }
592
596
  }
593
- const st = Symbol("FieldConstructorGuard");
597
+ const st = /* @__PURE__ */ Symbol("FieldConstructorGuard");
594
598
  class D extends y {
595
599
  constructor(t) {
596
600
  super();
@@ -782,7 +786,7 @@ const $t = /* @__PURE__ */ xt({
782
786
  }
783
787
  }), r;
784
788
  };
785
- return (r, a) => (_t(), Et(n));
789
+ return (r, a) => (Et(), _t(n));
786
790
  }
787
791
  });
788
792
  class E extends y {
@@ -1011,6 +1015,8 @@ class Ht extends f {
1011
1015
  this.replacePlaceholders(n, { newValue: u, oldValue: h, field: A, otherField: this.otherField })
1012
1016
  )
1013
1017
  ]));
1018
+ l(this, "otherField");
1019
+ l(this, "isValidComparison");
1014
1020
  l(this, "unregistered", !1);
1015
1021
  this.otherField = t, this.isValidComparison = e;
1016
1022
  }
@@ -1128,9 +1134,9 @@ const ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1128
1134
  AbortEventHandlingException: Q,
1129
1135
  Action: Dt,
1130
1136
  ActionsMap: T,
1131
- ConditionalEnabledAction: wt,
1137
+ ConditionalEnabledAction: Ft,
1132
1138
  ConditionalStatementAction: B,
1133
- ConditionalValueAction: Ft,
1139
+ ConditionalValueAction: wt,
1134
1140
  ConditionalVisibilityAction: St,
1135
1141
  DisplayMode: V,
1136
1142
  EmptyField: Bt,
@@ -1148,7 +1154,7 @@ const ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1148
1154
  MessagesWidget: $t,
1149
1155
  Operator: d,
1150
1156
  RenderableValue: Vt,
1151
- Statement: w,
1157
+ Statement: F,
1152
1158
  ValidChangedAction: lt,
1153
1159
  ValidationError: X,
1154
1160
  ValidationErrorRenderContent: p,
@@ -1166,9 +1172,9 @@ export {
1166
1172
  Q as AbortEventHandlingException,
1167
1173
  Dt as Action,
1168
1174
  T as ActionsMap,
1169
- wt as ConditionalEnabledAction,
1175
+ Ft as ConditionalEnabledAction,
1170
1176
  B as ConditionalStatementAction,
1171
- Ft as ConditionalValueAction,
1177
+ wt as ConditionalValueAction,
1172
1178
  St as ConditionalVisibilityAction,
1173
1179
  V as DisplayMode,
1174
1180
  Bt as EmptyField,
@@ -1186,7 +1192,7 @@ export {
1186
1192
  $t as MessagesWidget,
1187
1193
  d as Operator,
1188
1194
  Vt as RenderableValue,
1189
- w as Statement,
1195
+ F as Statement,
1190
1196
  lt as ValidChangedAction,
1191
1197
  X as ValidationError,
1192
1198
  p as ValidationErrorRenderContent,