@dynamicforms/vue-forms 0.16.1 → 0.17.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.
@@ -1,10 +1,10 @@
1
- import { computed as K, unref as h, isRef as Vt, reactive as Ut, watch as $t, ref as Wt, defineComponent as qt, resolveComponent as lt, openBlock as zt, createBlock as Ht, h as k } from "vue";
2
- import { isEqual as R, isEmpty as F, isBoolean as Qt, isString as C, truncate as Xt, isArray as yt, isObject as Et } from "lodash-es";
3
- var x = /* @__PURE__ */ ((n) => (n[n.SUPPRESS = 1] = "SUPPRESS", n[n.HIDDEN = 5] = "HIDDEN", n[n.INVISIBLE = 8] = "INVISIBLE", n[n.FULL = 10] = "FULL", n))(x || {});
1
+ import { computed as K, unref as h, isRef as Vt, reactive as Ut, watch as $t, ref as Wt, defineComponent as qt, resolveComponent as lt, openBlock as zt, createBlock as Ht, h as R } from "vue";
2
+ import { isEqual as F, isEmpty as j, isBoolean as Qt, isString as C, truncate as Xt, isArray as yt, isObject as Et } from "lodash-es";
3
+ var I = /* @__PURE__ */ ((n) => (n[n.SUPPRESS = 1] = "SUPPRESS", n[n.HIDDEN = 5] = "HIDDEN", n[n.INVISIBLE = 8] = "INVISIBLE", n[n.FULL = 10] = "FULL", n))(I || {});
4
4
  const Kt = 10, ut = new Set(
5
- Object.values(x).filter((n) => typeof n == "number")
5
+ Object.values(I).filter((n) => typeof n == "number")
6
6
  ), Yt = new Set(
7
- Object.values(x).filter((n) => typeof n == "string")
7
+ Object.values(I).filter((n) => typeof n == "string")
8
8
  );
9
9
  function z(n) {
10
10
  const t = typeof n == "string" ? `'${n}'` : String(n);
@@ -33,9 +33,9 @@ function z(n) {
33
33
  return typeof i == "number" ? ut.has(i) : typeof i == "string" ? Yt.has(i.toUpperCase()) : !1;
34
34
  }
35
35
  n.isDefined = s;
36
- })(x || (x = {}));
37
- Object.freeze(x);
38
- const I = x;
36
+ })(I || (I = {}));
37
+ Object.freeze(I);
38
+ const O = I;
39
39
  class m {
40
40
  static get classIdentifier() {
41
41
  throw new Error("classIdentifier must be declared");
@@ -86,10 +86,10 @@ class m {
86
86
  unregisterFrom(t) {
87
87
  }
88
88
  }
89
- class P extends Error {
89
+ class S extends Error {
90
90
  }
91
91
  const Ct = /* @__PURE__ */ Symbol("ValueChangedAction");
92
- class T extends m {
92
+ class P extends m {
93
93
  constructor(t) {
94
94
  super(t);
95
95
  }
@@ -100,7 +100,7 @@ class T extends m {
100
100
  return super.execute(t, e, s, i);
101
101
  }
102
102
  }
103
- const O = /* @__PURE__ */ Symbol("Transaction.capture"), St = /* @__PURE__ */ Symbol("Transaction.restore"), xt = /* @__PURE__ */ Symbol("Transaction.announceValue"), At = /* @__PURE__ */ Symbol("Transaction.settleValidity");
103
+ const k = /* @__PURE__ */ Symbol("Transaction.capture"), St = /* @__PURE__ */ Symbol("Transaction.restore"), xt = /* @__PURE__ */ Symbol("Transaction.announceValue"), At = /* @__PURE__ */ Symbol("Transaction.settleValidity");
104
104
  function ct(n) {
105
105
  let t = 0, e = n.parent;
106
106
  for (; e; )
@@ -134,7 +134,7 @@ class Jt {
134
134
  */
135
135
  touch(t) {
136
136
  const e = this.participant(t);
137
- e.snapshot || (e.snapshot = t[O]());
137
+ e.snapshot || (e.snapshot = t[k]());
138
138
  }
139
139
  /** Enrols an element as one whose value the commit has to announce. `force` skips the comparison. */
140
140
  markValueChanged(t, e) {
@@ -268,9 +268,9 @@ class Jt {
268
268
  );
269
269
  }
270
270
  }
271
- let S, H;
271
+ let A, H;
272
272
  function It() {
273
- return S;
273
+ return A;
274
274
  }
275
275
  class Tt {
276
276
  }
@@ -292,12 +292,12 @@ function ht(n) {
292
292
  );
293
293
  }
294
294
  function J(n) {
295
- if (S) {
295
+ if (A) {
296
296
  const s = n(H);
297
297
  return ht(s), s;
298
298
  }
299
299
  const t = new Jt(), e = new Zt();
300
- S = t, H = e;
300
+ A = t, H = e;
301
301
  try {
302
302
  const s = n(e);
303
303
  return ht(s), t.commit(), s;
@@ -305,11 +305,11 @@ function J(n) {
305
305
  if (t.rollback(), s instanceof Tt) return;
306
306
  throw s;
307
307
  } finally {
308
- S = void 0, H = void 0, e.close();
308
+ A = void 0, H = void 0, e.close();
309
309
  }
310
310
  }
311
311
  function u(n) {
312
- return S ? n(S) : J(() => n(S));
312
+ return A ? n(A) : J(() => n(A));
313
313
  }
314
314
  const Ot = { useMarkdownInValidators: !0 };
315
315
  function Gt() {
@@ -323,7 +323,7 @@ const Ue = {
323
323
  t && te(t);
324
324
  }
325
325
  };
326
- class j extends String {
326
+ class N extends String {
327
327
  plugins;
328
328
  options;
329
329
  constructor(t, e, s) {
@@ -334,7 +334,7 @@ function Z(n) {
334
334
  const t = h(n);
335
335
  return typeof t == "object" && t !== null && "componentName" in t;
336
336
  }
337
- function L(n) {
337
+ function M(n) {
338
338
  return typeof h(n) == "function";
339
339
  }
340
340
  class G {
@@ -358,7 +358,7 @@ class G {
358
358
  * `ValidationErrorRenderContent` holds a Vue `computed`, and two of those are never structurally equal.
359
359
  */
360
360
  sameAs(t) {
361
- return Object.getPrototypeOf(this) === Object.getPrototypeOf(t) && this.code === t.code && this.componentName === t.componentName && R(this.componentBody, t.componentBody) && R(this.componentBindings, t.componentBindings) && R(this.extraClasses, t.extraClasses);
361
+ return Object.getPrototypeOf(this) === Object.getPrototypeOf(t) && this.code === t.code && this.componentName === t.componentName && F(this.componentBody, t.componentBody) && F(this.componentBindings, t.componentBindings) && F(this.extraClasses, t.extraClasses);
362
362
  }
363
363
  get componentName() {
364
364
  return "Comment";
@@ -398,11 +398,11 @@ class g extends G {
398
398
  textType;
399
399
  get resolvedText() {
400
400
  const t = h(this.text);
401
- return L(t) ? t() : t;
401
+ return M(t) ? t() : t;
402
402
  }
403
403
  get getTextType() {
404
404
  const t = this.resolvedText;
405
- return t ? t instanceof j ? "md" : Z(t) ? "component" : "string" : "string";
405
+ return t ? t instanceof N ? "md" : Z(t) ? "component" : "string" : "string";
406
406
  }
407
407
  get componentName() {
408
408
  switch (h(this.textType)) {
@@ -447,11 +447,11 @@ class g extends G {
447
447
  class se extends g {
448
448
  }
449
449
  function b(n) {
450
- return Gt().useMarkdownInValidators ? new j(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, `
450
+ return Gt().useMarkdownInValidators ? new N(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, `
451
451
  `);
452
452
  }
453
453
  const ie = /* @__PURE__ */ Symbol("Validator"), ne = () => b("Validation could not be completed");
454
- class f extends T {
454
+ class f extends P {
455
455
  source;
456
456
  /**
457
457
  * Creates a new validator
@@ -461,22 +461,22 @@ class f extends T {
461
461
  const e = (s, i, r, a) => {
462
462
  const o = this.bindingState(s), l = o.abandon, v = ++o.run, p = s.validationEpoch, it = It();
463
463
  let nt = !1;
464
- const $ = () => !nt && o.run === v && s.validationEpoch === p && !it?.rolledBack, rt = new AbortController(), B = () => {
465
- $() || (nt = !0, o.abandon === B && (o.abandon = void 0), rt.abort());
464
+ const $ = () => !nt && o.run === v && s.validationEpoch === p && !it?.rolledBack, rt = new AbortController(), D = () => {
465
+ $() || (nt = !0, o.abandon === D && (o.abandon = void 0), rt.abort());
466
466
  };
467
467
  l?.();
468
468
  const W = t(r, a, s, rt.signal) || [], q = (E) => J(() => {
469
- const D = E?.map((A) => this.claim(A)) ?? [];
470
- for (let A = s.errors.length - 1; A >= 0; A--) {
471
- const at = s.errors[A];
469
+ const L = E?.map((T) => this.claim(T)) ?? [];
470
+ for (let T = s.errors.length - 1; T >= 0; T--) {
471
+ const at = s.errors[T];
472
472
  if (at.source === this.source) {
473
- const ot = D.findIndex((Mt) => Mt.sameAs(at));
474
- ot >= 0 ? D.splice(ot, 1) : s.errors.splice(A, 1);
473
+ const ot = L.findIndex((Mt) => Mt.sameAs(at));
474
+ ot >= 0 ? L.splice(ot, 1) : s.errors.splice(T, 1);
475
475
  }
476
476
  }
477
- D.length > 0 && s.errors.push(...D), s.validate();
477
+ L.length > 0 && s.errors.push(...L), s.validate();
478
478
  });
479
- return W instanceof Promise ? (o.abandon = B, it?.whenRolledBack(B), s.beginValidating(), W.then(
479
+ return W instanceof Promise ? (o.abandon = D, it?.whenRolledBack(D), s.beginValidating(), W.then(
480
480
  (E) => {
481
481
  $() && q(E);
482
482
  },
@@ -484,7 +484,7 @@ class f extends T {
484
484
  $() && (q([new g(ne(), "", "validation-failed")]), console.error("Validation failed", E));
485
485
  }
486
486
  ).finally(() => {
487
- o.abandon === B && (o.abandon = void 0), s.endValidating();
487
+ o.abandon === D && (o.abandon = void 0), s.endValidating();
488
488
  }).catch((E) => console.error("Validation failed", E))) : q(W), i(s, r, a);
489
489
  };
490
490
  super(e), this.source = Symbol(this.constructor.name);
@@ -556,23 +556,23 @@ class f extends T {
556
556
  replacePlaceholdersFunction(t, e) {
557
557
  return () => {
558
558
  let s = h(t);
559
- for (; L(s); )
559
+ for (; M(s); )
560
560
  s = h(this.replacePlaceholders(s(), e));
561
561
  return s;
562
562
  };
563
563
  }
564
564
  replacePlaceholders(t, e) {
565
- if (L(t)) return this.replacePlaceholdersFunction(t, e);
565
+ if (M(t)) return this.replacePlaceholdersFunction(t, e);
566
566
  if (Z(t)) return t;
567
567
  if (Vt(t))
568
568
  return this.replacePlaceholdersFunction(() => h(t), e);
569
569
  let s = h(t);
570
570
  return Object.keys(e).forEach((i) => {
571
571
  s = s.replaceAll(`{${i}}`, e[i]);
572
- }), t instanceof j ? new j(s.toString(), t.options, t.plugins) : s;
572
+ }), t instanceof N ? new N(s.toString(), t.options, t.plugins) : s;
573
573
  }
574
574
  }
575
- class M {
575
+ class x {
576
576
  /**
577
577
  * Every action registered here, in registration order. It is replaced rather than written when an action is
578
578
  * dropped, so a run already walking it finishes on the array it started with and the removal takes effect from
@@ -616,11 +616,14 @@ class M {
616
616
  const s = this.actions;
617
617
  for (let i = s.length - 1; i >= 0; i--) {
618
618
  const r = s[i];
619
- if (r.eager && M.outermostEager(s, i))
619
+ if (r.eager && x.outermostEager(s, i))
620
620
  try {
621
- this.walk(s, i, r.classIdentifier, !0, t, e);
621
+ const a = this.walk(s, i, r.classIdentifier, !0, t, e);
622
+ x.isPromise(a) && a.then(void 0, (o) => {
623
+ if (!(o instanceof S)) throw o;
624
+ });
622
625
  } catch (a) {
623
- if (!(a instanceof P)) throw a;
626
+ if (!(a instanceof S)) throw a;
624
627
  }
625
628
  }
626
629
  }
@@ -647,17 +650,38 @@ class M {
647
650
  if (t[i].eager && t[i].classIdentifier === s) return !1;
648
651
  return !0;
649
652
  }
653
+ /**
654
+ * True where `value` is a promise, which is what a walk through an asynchronous handler answers with. The test is
655
+ * the type rather than a `then` member: a handler may answer with a value object that carries one, and calling
656
+ * `then` on such an object replaces the answer with whatever that call returns.
657
+ */
658
+ static isPromise(t) {
659
+ return t instanceof Promise;
660
+ }
661
+ /**
662
+ * Answers an abort with itself on the asynchronous path as well. Where a handler in the chain is asynchronous, the
663
+ * walk answers with a promise and the abort raised under it arrives as that promise's rejection; this turns it back
664
+ * into the value the caller receives, so a promise the trigger answers with resolves to the exception instead of
665
+ * rejecting with it. Anything else keeps rejecting.
666
+ */
667
+ static answerAbort(t) {
668
+ return x.isPromise(t) ? t.then(void 0, (e) => {
669
+ if (e instanceof S) return e;
670
+ throw e;
671
+ }) : t;
672
+ }
650
673
  /**
651
674
  * Enters a group at its outermost action. An abort ends the run and is answered with rather than raised: the
652
- * exception is what the caller receives, so a run a handler ended is told apart from one that reached no handler
653
- * and from one whose handler answered null.
675
+ * exception is what the caller receives - directly where the chain ran synchronously, as what the answered promise
676
+ * resolves to where it did not - so a run a handler ended is told apart from one that reached no handler and from
677
+ * one whose handler answered null.
654
678
  */
655
679
  run(t, e, s, i) {
656
680
  const r = this.actions;
657
681
  try {
658
- return this.walk(r, r.length - 1, t, e, s, i);
682
+ return x.answerAbort(this.walk(r, r.length - 1, t, e, s, i));
659
683
  } catch (a) {
660
- if (a instanceof P) return a;
684
+ if (a instanceof S) return a;
661
685
  throw a;
662
686
  }
663
687
  }
@@ -703,7 +727,7 @@ function tt(n, t) {
703
727
  }
704
728
  return V(n) === V(t.declaration) ? void 0 : n;
705
729
  }
706
- function kt(n, t) {
730
+ function Pt(n, t) {
707
731
  const e = tt(n, t);
708
732
  if (!e) return [];
709
733
  if (e !== n) return [e];
@@ -719,7 +743,7 @@ function ae(n, t) {
719
743
  }
720
744
  }
721
745
  const oe = /* @__PURE__ */ Symbol("ConditionalStatementAction");
722
- class U extends T {
746
+ class U extends P {
723
747
  statement;
724
748
  conditionalExecutor;
725
749
  /**
@@ -736,7 +760,7 @@ class U extends T {
736
760
  registrations = /* @__PURE__ */ new WeakSet();
737
761
  constructor(t, e) {
738
762
  super((i, r, a, o) => (this.applyIn(V(i)) || i.markRecordIncomplete(), r(i, a, o))), this.statement = t, this.conditionalExecutor = e;
739
- const s = new T((i, r, ...a) => (this.applyFrom(i), r(i, ...a)));
763
+ const s = new P((i, r, ...a) => (this.applyFrom(i), r(i, ...a)));
740
764
  t.collectFields().forEach((i) => i.registerAction(s));
741
765
  }
742
766
  static get classIdentifier() {
@@ -758,7 +782,7 @@ class U extends T {
758
782
  targetsIn(t) {
759
783
  const e = [];
760
784
  return this.declarations.forEach(
761
- (s) => kt(s, t).forEach((i) => {
785
+ (s) => Pt(s, t).forEach((i) => {
762
786
  this.registrations.has(i) && e.push(i);
763
787
  })
764
788
  ), e;
@@ -791,7 +815,7 @@ class U extends T {
791
815
  class le extends U {
792
816
  constructor(t) {
793
817
  super(t, (e, s) => {
794
- e.visibility = s ? I.FULL : I.SUPPRESS;
818
+ e.visibility = s ? O.FULL : O.SUPPRESS;
795
819
  });
796
820
  }
797
821
  }
@@ -809,7 +833,7 @@ class ce extends U {
809
833
  });
810
834
  }
811
835
  }
812
- var N = /* @__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))(N || {});
836
+ var B = /* @__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))(B || {});
813
837
  ((n) => {
814
838
  function t(r) {
815
839
  const a = r.toLowerCase();
@@ -847,10 +871,10 @@ var N = /* @__PURE__ */ ((n) => (n[n.NOT = 0] = "NOT", n[n.OR = 1] = "OR", n[n.A
847
871
  return r >= 0;
848
872
  }
849
873
  n.isLogicOperator = i;
850
- })(N || (N = {}));
851
- Object.freeze(N);
852
- const c = N, he = /* @__PURE__ */ Symbol("EnabledChangingAction");
853
- class Rt extends m {
874
+ })(B || (B = {}));
875
+ Object.freeze(B);
876
+ const c = B, he = /* @__PURE__ */ Symbol("EnabledChangingAction");
877
+ class kt extends m {
854
878
  constructor(t) {
855
879
  super(t);
856
880
  }
@@ -862,7 +886,7 @@ class Rt extends m {
862
886
  }
863
887
  }
864
888
  const de = /* @__PURE__ */ Symbol("EnabledChangedAction");
865
- class _t extends m {
889
+ class Rt extends m {
866
890
  constructor(t) {
867
891
  super(t);
868
892
  }
@@ -886,7 +910,7 @@ class Ft extends m {
886
910
  }
887
911
  }
888
912
  const fe = /* @__PURE__ */ Symbol("VisibilityChangingAction");
889
- class Pt extends m {
913
+ class _t extends m {
890
914
  constructor(t) {
891
915
  super(t);
892
916
  }
@@ -1042,7 +1066,7 @@ class y {
1042
1066
  const e = this.extendedOf(t);
1043
1067
  Object.entries(t).forEach(([s, i]) => {
1044
1068
  Object.hasOwn(e, s) || pt.has(s) || (this[s] = i);
1045
- }), F(e) || this.setExtendedValues(e);
1069
+ }), j(e) || this.setExtendedValues(e);
1046
1070
  }
1047
1071
  /**
1048
1072
  * Takes this element into the record of the open transaction, where one is open. A write of a single slot that
@@ -1060,7 +1084,7 @@ class y {
1060
1084
  * What is not in the snapshot is the action map, which no write touches: an operation that replaces it hands
1061
1085
  * the transaction its own undo instead, so this stays the one shape every element captures.
1062
1086
  */
1063
- [O]() {
1087
+ [k]() {
1064
1088
  return { ...this.#e, errors: [...this.#e.errors] };
1065
1089
  }
1066
1090
  /**
@@ -1269,7 +1293,7 @@ class y {
1269
1293
  get actions() {
1270
1294
  const t = this.declaration;
1271
1295
  if (!t._actions) {
1272
- const e = new M();
1296
+ const e = new x();
1273
1297
  t.boundElements.forEach((s) => {
1274
1298
  s._actions = e;
1275
1299
  });
@@ -1427,11 +1451,11 @@ class y {
1427
1451
  set visibility(t) {
1428
1452
  const e = this.#t.visibility;
1429
1453
  t !== e && u((s) => {
1430
- const i = this.boundActions?.trigger(Pt, this, t, e);
1431
- if (!(i instanceof P)) {
1432
- if (!I.isDefined(i ?? t))
1454
+ const i = this.boundActions?.trigger(_t, this, t, e);
1455
+ if (!(i instanceof S)) {
1456
+ if (!O.isDefined(i ?? t))
1433
1457
  throw new Error("visibility must be a DisplayMode constant");
1434
- s.touch(this), this.#t.visibility = I.fromAny(i ?? t), this.boundActions?.trigger(jt, this, this.#t.visibility, e);
1458
+ s.touch(this), this.#t.visibility = O.fromAny(i ?? t), this.boundActions?.trigger(jt, this, this.#t.visibility, e);
1435
1459
  }
1436
1460
  });
1437
1461
  }
@@ -1441,13 +1465,31 @@ class y {
1441
1465
  set enabled(t) {
1442
1466
  const e = this.#t.enabled;
1443
1467
  t !== e && u((s) => {
1444
- const i = this.boundActions?.trigger(Rt, this, t, e);
1445
- if (!(i instanceof P)) {
1468
+ const i = this.boundActions?.trigger(kt, this, t, e);
1469
+ if (!(i instanceof S)) {
1446
1470
  if (!Qt(i ?? t)) throw new Error("Enabled value must be boolean");
1447
- s.touch(this), this.#t.enabled = i ?? t, this.#t.enabled !== e && this.bumpValueVersion(), this.boundActions?.trigger(_t, this, this.#t.enabled, e);
1471
+ s.touch(this), this.#t.enabled = i ?? t, this.#t.enabled !== e && this.bumpValueVersion(), this.boundActions?.trigger(Rt, this, this.#t.enabled, e);
1448
1472
  }
1449
1473
  });
1450
1474
  }
1475
+ /**
1476
+ * Whether this element and every container above it are enabled. A rendering layer binds one read instead of
1477
+ * walking the parent chain: a disabled `Group` states that its section cannot be edited, and the inputs
1478
+ * rendered from the members inside it read that here.
1479
+ *
1480
+ * It is a read and nothing else. `enabled` on each element stays exactly what was written to it, a write to a
1481
+ * member of a disabled container is accepted the way it always was, and what a container serializes is decided
1482
+ * by the members' own `enabled`. Where a whole subtree is to stop serializing, the members are disabled.
1483
+ *
1484
+ * `enabled` is the only member with a reading of this kind, and it is not a scheme the other members follow.
1485
+ * `visibility` has none because `SUPPRESS` states that an element is absent from the value as well, so folding
1486
+ * it down the tree would decide serialization rather than report it; `value` has none because a container
1487
+ * composes its own from its members rather than passing one down. A rendering layer that needs a third thing
1488
+ * folded down the tree has `provide`/`inject`, which is where the render tree's own context belongs.
1489
+ */
1490
+ get effectiveEnabled() {
1491
+ return this.enabled && (this.parent?.effectiveEnabled ?? !0);
1492
+ }
1451
1493
  /**
1452
1494
  * True for an element whose value is composed of its members'. The commit builds such a value only where
1453
1495
  * something receives it, compares it by content rather than by identity, and runs the element's own validators
@@ -1477,7 +1519,7 @@ class y {
1477
1519
  const r = this.boundActions;
1478
1520
  if (this.composesValue && !(r?.willTrigger(Ct) || r?.hasEager)) return;
1479
1521
  const a = this.value, o = this.#e.announcedValue;
1480
- !s && (this.composesValue ? R(a, o) : a === o) || (t.touch(this), this.#e.announcedValue = a, this.composesValue && r?.triggerEager(this, a, o), r?.trigger(T, this, a, o));
1522
+ !s && (this.composesValue ? F(a, o) : a === o) || (t.touch(this), this.#e.announcedValue = a, this.composesValue && r?.triggerEager(this, a, o), r?.trigger(P, this, a, o));
1481
1523
  }
1482
1524
  /**
1483
1525
  * Forms the verdict this element ends the transaction with and announces a transition of it. The container is
@@ -1505,7 +1547,7 @@ class y {
1505
1547
  return this.value;
1506
1548
  }
1507
1549
  get isChanged() {
1508
- return !R(this.value, this.originalValue);
1550
+ return !F(this.value, this.originalValue);
1509
1551
  }
1510
1552
  /**
1511
1553
  * Brings a fresh element into the state a binding of `source` is in: it records what it was declared as, takes
@@ -1518,7 +1560,7 @@ class y {
1518
1560
  boundFrom(t, e, s, i) {
1519
1561
  this.#e.declaration = t.declaration;
1520
1562
  const r = { ...t.extra, ...i && this.extendedOf(i) };
1521
- F(r) || this.setExtendedValues(r);
1563
+ j(r) || this.setExtendedValues(r);
1522
1564
  const a = this.declaration;
1523
1565
  a.noteBinding(this);
1524
1566
  const o = a._actions;
@@ -1757,7 +1799,7 @@ function Dt() {
1757
1799
  originalValue: void 0,
1758
1800
  announcedValue: void 0,
1759
1801
  errors: [],
1760
- visibility: I.FULL,
1802
+ visibility: O.FULL,
1761
1803
  enabled: !0,
1762
1804
  valueVersion: 0,
1763
1805
  validatingCount: 0,
@@ -1926,7 +1968,8 @@ class Se extends et {
1926
1968
  *
1927
1969
  * The answer is a promise whatever the handler returns, so a handler that throws rejects it rather than throwing
1928
1970
  * out of this call: a caller that does not await the answer and does not attach a catch handler leaves that
1929
- * rejection unhandled.
1971
+ * rejection unhandled. An `AbortEventHandlingException` is the one exception that does not reject: the answer
1972
+ * resolves with it, in a synchronous chain as in an asynchronous one.
1930
1973
  */
1931
1974
  async execute(t) {
1932
1975
  const e = this.busyRuns;
@@ -2002,22 +2045,22 @@ const xe = /* @__PURE__ */ qt({
2002
2045
  "dt",
2003
2046
  "dd"
2004
2047
  ]), i = () => {
2005
- if (typeof t.message == "string") return k("span", { class: t.classes }, t.message);
2048
+ if (typeof t.message == "string") return R("span", { class: t.classes }, t.message);
2006
2049
  const r = [];
2007
2050
  return t.message.forEach((a) => {
2008
2051
  switch (a.componentName) {
2009
2052
  case "template":
2010
- r.push(k("div", { class: [t.classes, a.extraClasses] }, a.componentBody));
2053
+ r.push(R("div", { class: [t.classes, a.extraClasses] }, a.componentBody));
2011
2054
  break;
2012
2055
  case "vue-markdown":
2013
2056
  if (typeof e == "string")
2014
2057
  console.warn(
2015
2058
  "You are using markdown for messages-widget, but you haven't registered a vue-markdown component"
2016
- ), r.push(k("div", { class: [t.classes, a.extraClasses] }, a.componentBindings.source));
2059
+ ), r.push(R("div", { class: [t.classes, a.extraClasses] }, a.componentBindings.source));
2017
2060
  else {
2018
2061
  const o = a.componentBindings;
2019
2062
  r.push(
2020
- k(e, {
2063
+ R(e, {
2021
2064
  class: [t.classes, a.extraClasses, "df-messages-widget-markdown"],
2022
2065
  source: o.source,
2023
2066
  options: o.options,
@@ -2028,7 +2071,7 @@ const xe = /* @__PURE__ */ qt({
2028
2071
  break;
2029
2072
  default:
2030
2073
  r.push(
2031
- k(
2074
+ R(
2032
2075
  s.has(a.componentName.toLowerCase()) ? a.componentName : lt(a.componentName),
2033
2076
  {
2034
2077
  class: [t.classes, a.extraClasses],
@@ -2093,8 +2136,8 @@ class d extends y {
2093
2136
  * The name array is copied as well: a rollback puts back the set of members the group held, not the array it
2094
2137
  * went on to hold.
2095
2138
  */
2096
- [O]() {
2097
- const t = super[O]();
2139
+ [k]() {
2140
+ const t = super[k]();
2098
2141
  return t.fieldNames = [...this.raw.fieldNames], t;
2099
2142
  }
2100
2143
  /**
@@ -2192,9 +2235,9 @@ class d extends y {
2192
2235
  const e = /* @__PURE__ */ Object.create(null);
2193
2236
  Object.entries(this._fields).forEach(([i, r]) => {
2194
2237
  const a = r.value;
2195
- (r.enabled || this.childComposesValue(r) && !F(a)) && (e[i] = a);
2238
+ (r.enabled || this.childComposesValue(r) && !j(a)) && (e[i] = a);
2196
2239
  });
2197
- const s = F(e) ? null : Object.freeze({ ...e });
2240
+ const s = j(e) ? null : Object.freeze({ ...e });
2198
2241
  return this.raw.cachedValue = s, this.raw.cachedValueVersion = t, s;
2199
2242
  }
2200
2243
  /**
@@ -2337,8 +2380,8 @@ class _ extends y {
2337
2380
  });
2338
2381
  }
2339
2382
  /** The row array is copied as well: a rollback puts back the set the list held, not the array it went on to hold. */
2340
- [O]() {
2341
- const t = super[O]();
2383
+ [k]() {
2384
+ const t = super[k]();
2342
2385
  return t.rows = this.raw.rows ? [...this.raw.rows] : this.raw.rows, t;
2343
2386
  }
2344
2387
  /**
@@ -2391,7 +2434,7 @@ class _ extends y {
2391
2434
  get value() {
2392
2435
  const t = this.valueVersion;
2393
2436
  if (this.raw.cachedValueVersion === t) return this.raw.cachedValue;
2394
- const e = this.state.rows?.map((i) => i.value), s = F(e) ? null : Object.freeze(e);
2437
+ const e = this.state.rows?.map((i) => i.value), s = j(e) ? null : Object.freeze(e);
2395
2438
  return this.raw.cachedValue = s, this.raw.cachedValueVersion = t, s;
2396
2439
  }
2397
2440
  set value(t) {
@@ -2588,11 +2631,11 @@ class Ie extends f {
2588
2631
  */
2589
2632
  listenOn(t) {
2590
2633
  this.listening.has(t) || this.listening.has(t.declaration) || (this.listening.add(t), t.registerAction(
2591
- new T((e, s, i, r) => {
2634
+ new P((e, s, i, r) => {
2592
2635
  s(e, i, r);
2593
2636
  const a = V(e);
2594
2637
  this.declarations.forEach(
2595
- (o) => kt(o, a).forEach((l) => {
2638
+ (o) => Pt(o, a).forEach((l) => {
2596
2639
  this.registrations.has(l) && this.execute(l, () => null, l.value, this.comparisonState(l).oldValue);
2597
2640
  })
2598
2641
  );
@@ -2645,7 +2688,7 @@ function Oe(n) {
2645
2688
  function wt(n) {
2646
2689
  return typeof n == "object" && n !== null && !Vt(n) && !(n instanceof String) && !("componentName" in n);
2647
2690
  }
2648
- class ke extends f {
2691
+ class Pe extends f {
2649
2692
  constructor(t, e) {
2650
2693
  const s = wt(t) ? void 0 : t, i = (wt(t) ? t : e)?.trim ?? !0, r = s || b("Please enter a value"), a = (o, l, v) => {
2651
2694
  const p = h(o);
@@ -2660,7 +2703,7 @@ class ke extends f {
2660
2703
  super(a);
2661
2704
  }
2662
2705
  }
2663
- class Re extends f {
2706
+ class ke extends f {
2664
2707
  constructor(t, e) {
2665
2708
  const s = e || b("Value must be larger or equal to **{minValue}**"), i = (r, a, o) => r < t || r === void 0 ? [
2666
2709
  new g(
@@ -2672,7 +2715,7 @@ class Re extends f {
2672
2715
  super(i);
2673
2716
  }
2674
2717
  }
2675
- class _e extends f {
2718
+ class Re extends f {
2676
2719
  constructor(t, e) {
2677
2720
  const s = e || b("Value must be less than or equal to **{maxValue}**"), i = (r, a, o) => r > t || r === void 0 ? [
2678
2721
  new g(
@@ -2699,7 +2742,7 @@ class Fe extends f {
2699
2742
  function st(n) {
2700
2743
  return n == null ? 0 : yt(n) || C(n) ? n.length : Et(n) && Object.getPrototypeOf(n) === Object.prototype ? Object.keys(n).length : String(n).length;
2701
2744
  }
2702
- class Pe extends f {
2745
+ class _e extends f {
2703
2746
  constructor(t, e) {
2704
2747
  const s = e || b("Length must be larger or equal to **{minLength}**"), i = (r, a, o) => st(r) < t ? [
2705
2748
  new g(
@@ -2756,25 +2799,25 @@ const De = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2756
2799
  InAllowedValues: Te,
2757
2800
  LengthInRange: Ne,
2758
2801
  MaxLength: je,
2759
- MaxValue: _e,
2760
- MinLength: Pe,
2761
- MinValue: Re,
2802
+ MaxValue: Re,
2803
+ MinLength: _e,
2804
+ MinValue: ke,
2762
2805
  Pattern: Be,
2763
- Required: ke,
2806
+ Required: Pe,
2764
2807
  Validator: f,
2765
2808
  ValueInRange: Fe
2766
2809
  }, Symbol.toStringTag, { value: "Module" })), $e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2767
2810
  __proto__: null,
2768
- AbortEventHandlingException: P,
2811
+ AbortEventHandlingException: S,
2769
2812
  Action: Se,
2770
- ActionsMap: M,
2813
+ ActionsMap: x,
2771
2814
  ConditionalEnabledAction: ue,
2772
2815
  ConditionalStatementAction: U,
2773
2816
  ConditionalValueAction: ce,
2774
2817
  ConditionalVisibilityAction: le,
2775
- DisplayMode: I,
2776
- EnabledChangedAction: _t,
2777
- EnabledChangingAction: Rt,
2818
+ DisplayMode: O,
2819
+ EnabledChangedAction: Rt,
2820
+ EnabledChangingAction: kt,
2778
2821
  ExecuteAction: Nt,
2779
2822
  Field: et,
2780
2823
  FieldActionBase: m,
@@ -2783,7 +2826,7 @@ const De = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2783
2826
  List: _,
2784
2827
  ListItemAddedAction: Y,
2785
2828
  ListItemRemovedAction: Bt,
2786
- MdString: j,
2829
+ MdString: N,
2787
2830
  MessagesWidget: xe,
2788
2831
  Operator: c,
2789
2832
  RenderableValue: se,
@@ -2793,26 +2836,26 @@ const De = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2793
2836
  ValidationErrorRenderContent: g,
2794
2837
  ValidationErrorText: ee,
2795
2838
  Validators: De,
2796
- ValueChangedAction: T,
2839
+ ValueChangedAction: P,
2797
2840
  VisibilityChangedAction: jt,
2798
- VisibilityChangingAction: Pt,
2841
+ VisibilityChangingAction: _t,
2799
2842
  buildErrorMessage: b,
2800
2843
  defaultDisplayMode: Kt,
2801
- isCallableFunction: L,
2844
+ isCallableFunction: M,
2802
2845
  isSimpleComponentDef: Z,
2803
2846
  transaction: J
2804
2847
  }, Symbol.toStringTag, { value: "Module" }));
2805
2848
  export {
2806
- P as AbortEventHandlingException,
2849
+ S as AbortEventHandlingException,
2807
2850
  Se as Action,
2808
- M as ActionsMap,
2851
+ x as ActionsMap,
2809
2852
  ue as ConditionalEnabledAction,
2810
2853
  U as ConditionalStatementAction,
2811
2854
  ce as ConditionalValueAction,
2812
2855
  le as ConditionalVisibilityAction,
2813
- I as DisplayMode,
2814
- _t as EnabledChangedAction,
2815
- Rt as EnabledChangingAction,
2856
+ O as DisplayMode,
2857
+ Rt as EnabledChangedAction,
2858
+ kt as EnabledChangingAction,
2816
2859
  Nt as ExecuteAction,
2817
2860
  et as Field,
2818
2861
  m as FieldActionBase,
@@ -2821,7 +2864,7 @@ export {
2821
2864
  _ as List,
2822
2865
  Y as ListItemAddedAction,
2823
2866
  Bt as ListItemRemovedAction,
2824
- j as MdString,
2867
+ N as MdString,
2825
2868
  xe as MessagesWidget,
2826
2869
  c as Operator,
2827
2870
  se as RenderableValue,
@@ -2831,15 +2874,15 @@ export {
2831
2874
  g as ValidationErrorRenderContent,
2832
2875
  ee as ValidationErrorText,
2833
2876
  De as Validators,
2834
- T as ValueChangedAction,
2877
+ P as ValueChangedAction,
2835
2878
  jt as VisibilityChangedAction,
2836
- Pt as VisibilityChangingAction,
2879
+ _t as VisibilityChangingAction,
2837
2880
  b as buildErrorMessage,
2838
2881
  $e as default,
2839
2882
  Kt as defaultDisplayMode,
2840
2883
  Ue as forms,
2841
2884
  Gt as getConfig,
2842
- L as isCallableFunction,
2885
+ M as isCallableFunction,
2843
2886
  Z as isSimpleComponentDef,
2844
2887
  te as setConfig,
2845
2888
  J as transaction