@bach.software/vue-dynamic-form 0.6.0 → 0.7.0

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.
Files changed (28) hide show
  1. package/dist/examples.cjs.js +8 -8
  2. package/dist/examples.cjs.js.map +1 -1
  3. package/dist/examples.es.js +590 -520
  4. package/dist/examples.es.js.map +1 -1
  5. package/dist/mapEachMetadataItem-DwSDJyzo.cjs +2 -0
  6. package/dist/mapEachMetadataItem-DwSDJyzo.cjs.map +1 -0
  7. package/dist/mapEachMetadataItem-DxEO1PDs.js +1186 -0
  8. package/dist/mapEachMetadataItem-DxEO1PDs.js.map +1 -0
  9. package/dist/src/components/__tests__/DynamicFormItem.formApi.test.d.ts +1 -0
  10. package/dist/src/components/__tests__/DynamicFormItemArray.formApi.test.d.ts +1 -0
  11. package/dist/src/components/__tests__/DynamicFormItemChoice.formApi.test.d.ts +1 -0
  12. package/dist/src/components/__tests__/DynamicFormItemWizard.formApi.test.d.ts +1 -0
  13. package/dist/src/core/__tests__/useIsResetPending.test.d.ts +1 -0
  14. package/dist/src/core/__tests__/useIsValidationSuppressed.test.d.ts +1 -0
  15. package/dist/src/core/useIsResetPending.d.ts +13 -0
  16. package/dist/src/core/useIsValidationSuppressed.d.ts +20 -0
  17. package/dist/src/examples/ProgrammaticWritesTestCase.vue.d.ts +2 -0
  18. package/dist/src/examples/TestForm.vue.d.ts +6 -1
  19. package/dist/src/examples/__tests__/TestFormTemplate.testcases.d.ts +37 -37
  20. package/dist/src/examples/index.d.ts +1 -0
  21. package/dist/tsconfig.tsbuildinfo +1 -1
  22. package/dist/vue-dynamic-form.cjs.js +1 -1
  23. package/dist/vue-dynamic-form.es.js +1 -1
  24. package/package.json +3 -3
  25. package/dist/mapEachMetadataItem-Cxfn86Z2.cjs +0 -2
  26. package/dist/mapEachMetadataItem-Cxfn86Z2.cjs.map +0 -1
  27. package/dist/mapEachMetadataItem-Dvf3R5jd.js +0 -1159
  28. package/dist/mapEachMetadataItem-Dvf3R5jd.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { defineComponent as q, createElementBlock as i, openBlock as t, normalizeClass as g, createCommentVNode as n, createElementVNode as a, createBlock as _, unref as W, withCtx as k, withDirectives as B, vModelText as G, vModelCheckbox as z, Fragment as V, renderList as A, toDisplayString as o, vModelSelect as j, renderSlot as C, createTextVNode as w, createVNode as E, vShow as H, computed as L, ref as P, withModifiers as K, markRaw as Q, h as Y } from "vue";
2
- import { e as Z, f as X, u as M, m as ee, _ as te, i as ie } from "./mapEachMetadataItem-Dvf3R5jd.js";
3
- const ae = {
1
+ import { defineComponent as E, createElementBlock as i, openBlock as t, normalizeClass as O, createCommentVNode as n, createElementVNode as a, createBlock as W, unref as F, withCtx as k, withDirectives as N, vModelText as K, vModelCheckbox as D, Fragment as $, renderList as A, toDisplayString as o, vModelSelect as Q, renderSlot as T, createTextVNode as x, createVNode as R, vShow as Y, computed as U, ref as L, withModifiers as Z, markRaw as X, h as M, useTemplateRef as ee } from "vue";
2
+ import { e as te, f as ie, u as ae, m as le, _ as ne, i as se } from "./mapEachMetadataItem-DxEO1PDs.js";
3
+ const oe = {
4
4
  key: 0,
5
5
  xmlns: "http://www.w3.org/2000/svg",
6
6
  fill: "none",
@@ -8,7 +8,7 @@ const ae = {
8
8
  "stroke-width": "1.5",
9
9
  stroke: "currentColor",
10
10
  class: "size-3"
11
- }, le = {
11
+ }, de = {
12
12
  key: 1,
13
13
  xmlns: "http://www.w3.org/2000/svg",
14
14
  fill: "none",
@@ -16,30 +16,30 @@ const ae = {
16
16
  "stroke-width": "1.5",
17
17
  stroke: "currentColor",
18
18
  class: "size-3"
19
- }, S = /* @__PURE__ */ q({
19
+ }, S = /* @__PURE__ */ E({
20
20
  __name: "IconButton",
21
21
  props: {
22
22
  icon: {},
23
23
  color: { default: "blue" }
24
24
  },
25
25
  emits: ["click"],
26
- setup(p) {
27
- return (f, c) => (t(), i("button", {
26
+ setup(u) {
27
+ return (h, d) => (t(), i("button", {
28
28
  type: "button",
29
- class: g(["cursor-pointer inline-flex items-center justify-center rounded-full size-5 text-white-800 cursor-pointer", {
30
- "bg-blue-200 hover:bg-blue-300": p.color === "blue",
31
- "bg-red-200 hover:bg-red-300": p.color === "red"
29
+ class: O(["cursor-pointer inline-flex items-center justify-center rounded-full size-5 text-white-800 cursor-pointer", {
30
+ "bg-blue-200 hover:bg-blue-300": u.color === "blue",
31
+ "bg-red-200 hover:bg-red-300": u.color === "red"
32
32
  }]),
33
- onClick: c[0] || (c[0] = (u) => f.$emit("click"))
33
+ onClick: d[0] || (d[0] = (c) => h.$emit("click"))
34
34
  }, [
35
- p.icon === "plus" ? (t(), i("svg", ae, [...c[1] || (c[1] = [
35
+ u.icon === "plus" ? (t(), i("svg", oe, [...d[1] || (d[1] = [
36
36
  a("path", {
37
37
  "stroke-linecap": "round",
38
38
  "stroke-linejoin": "round",
39
39
  d: "M12 4.5v15m7.5-7.5h-15"
40
40
  }, null, -1)
41
41
  ])])) : n("", !0),
42
- p.icon === "minus" ? (t(), i("svg", le, [...c[2] || (c[2] = [
42
+ u.icon === "minus" ? (t(), i("svg", de, [...d[2] || (d[2] = [
43
43
  a("path", {
44
44
  "stroke-linecap": "round",
45
45
  "stroke-linejoin": "round",
@@ -48,598 +48,598 @@ const ae = {
48
48
  ])])) : n("", !0)
49
49
  ], 2));
50
50
  }
51
- }), ne = ["data-testid", "onClick"], se = { class: "text-sm whitespace-pre-wrap" }, oe = ["data-testid"], de = { class: "grid grid-cols-1 md:grid-cols-2 gap-6" }, re = {
51
+ }), re = ["data-testid", "onClick"], ce = { class: "text-sm whitespace-pre-wrap" }, ue = ["data-testid"], pe = { class: "grid grid-cols-1 md:grid-cols-2 gap-6" }, me = {
52
52
  key: 0,
53
53
  class: "text-red-500 dark:text-rose-400"
54
- }, ce = {
54
+ }, he = {
55
55
  key: 1,
56
56
  class: "text-sm text-gray-400"
57
- }, ue = ["data-testid"], pe = {
57
+ }, be = ["data-testid"], fe = {
58
58
  key: 0,
59
59
  class: "flex gap-2 flex-wrap"
60
- }, me = ["disabled", "data-testid", "onClick"], he = ["data-testid", "onClick"], be = { class: "grid grid-cols-1 md:grid-cols-2 gap-6 ms-6" }, fe = { class: "text-sm whitespace-pre-wrap" }, Oe = ["data-testid"], ge = {
60
+ }, Oe = ["disabled", "data-testid", "onClick"], ge = ["data-testid", "onClick"], ye = { class: "grid grid-cols-1 md:grid-cols-2 gap-6 ms-6" }, xe = { class: "text-sm whitespace-pre-wrap" }, ve = ["data-testid"], we = {
61
61
  key: 0,
62
62
  class: "text-red-500 dark:text-rose-400"
63
- }, ye = {
63
+ }, ke = {
64
64
  key: 1,
65
65
  class: "text-sm text-gray-400"
66
- }, xe = ["data-testid"], ve = {
66
+ }, Ce = ["data-testid"], Te = {
67
67
  key: 0,
68
68
  class: "flex gap-2 flex-wrap"
69
- }, we = ["disabled", "data-testid", "onClick"], ke = ["data-testid", "onClick"], Ce = { class: "grid grid-cols-1 md:grid-cols-2 gap-6 ms-6" }, Te = { class: "text-sm whitespace-pre-wrap" }, Se = ["data-testid"], _e = { class: "flex gap-2 items-center" }, Ve = ["data-testid"], We = ["data-testid"], Ae = ["data-testid"], Fe = { class: "grid grid-cols-1 md:grid-cols-2 gap-6" }, $e = { class: "flex flex-col gap-2" }, Be = { class: "flex gap-2 flex-wrap" }, Ne = ["data-testid", "onClick"], Pe = { class: "flex gap-2" }, qe = ["data-testid", "onClick"], Le = ["data-testid", "onClick"], Ee = ["data-testid"], Ie = { class: "grid grid-cols-1 md:grid-cols-2 gap-6 ms-6" }, ze = ["data-testid"], Re = ["data-testid"], Ue = ["data-testid"], De = ["data-testid"], Je = ["data-testid"], Ge = ["data-testid"], je = ["data-testid"], He = ["data-testid", "data-current"], Ke = ["data-testid", "data-current"], Qe = ["for"], Ye = {
69
+ }, Ve = ["disabled", "data-testid", "onClick"], _e = ["data-testid", "onClick"], Se = { class: "grid grid-cols-1 md:grid-cols-2 gap-6 ms-6" }, We = { class: "text-sm whitespace-pre-wrap" }, Fe = ["data-testid"], $e = { class: "flex gap-2 items-center" }, Ae = ["data-testid"], Be = ["data-testid"], Ne = ["data-testid"], Pe = { class: "grid grid-cols-1 md:grid-cols-2 gap-6" }, qe = { class: "flex flex-col gap-2" }, Le = { class: "flex gap-2 flex-wrap" }, Ee = ["data-testid", "onClick"], Ie = { class: "flex gap-2" }, ze = ["data-testid", "onClick"], Re = ["data-testid", "onClick"], Ue = ["data-testid"], De = { class: "grid grid-cols-1 md:grid-cols-2 gap-6 ms-6" }, Je = ["data-testid"], Ge = ["data-testid"], je = ["data-testid"], He = ["data-testid"], Ke = ["data-testid"], Qe = ["data-testid"], Ye = ["data-testid"], Ze = ["data-testid", "data-current"], Xe = ["data-testid", "data-current"], Me = ["for"], et = {
70
70
  key: 0,
71
71
  class: "text-red-500 dark:text-rose-400"
72
- }, Ze = {
72
+ }, tt = {
73
73
  key: 1,
74
74
  class: "text-sm text-gray-400"
75
- }, Xe = { class: "text-sm whitespace-pre-wrap" }, Me = ["data-testid"], et = ["for"], tt = {
75
+ }, it = { class: "text-sm whitespace-pre-wrap" }, at = ["data-testid"], lt = ["for"], nt = {
76
76
  key: 0,
77
77
  class: "text-red-500 dark:text-rose-400"
78
- }, it = {
78
+ }, st = {
79
79
  key: 1,
80
80
  class: "text-sm text-gray-400"
81
- }, at = { class: "flex gap-2 items-center" }, lt = { class: "flex flex-col grow" }, nt = { class: "text-sm whitespace-pre-wrap" }, st = ["data-testid"], ot = {
81
+ }, ot = { class: "flex gap-2 items-center" }, dt = { class: "flex flex-col grow" }, rt = { class: "text-sm whitespace-pre-wrap" }, ct = ["data-testid"], ut = {
82
82
  key: 0,
83
83
  class: "text-red-500 dark:text-rose-400"
84
- }, dt = {
84
+ }, pt = {
85
85
  key: 1,
86
86
  class: "text-sm text-gray-400"
87
- }, rt = { class: "grid grid-cols-1 md:grid-cols-2 gap-6 ms-6" }, ct = { class: "text-sm whitespace-pre-wrap" }, ut = ["data-testid"], pt = {
87
+ }, mt = { class: "grid grid-cols-1 md:grid-cols-2 gap-6 ms-6" }, ht = { class: "text-sm whitespace-pre-wrap" }, bt = ["data-testid"], ft = {
88
88
  key: 0,
89
89
  class: "text-red-500 dark:text-rose-400"
90
- }, mt = {
90
+ }, Ot = {
91
91
  key: 1,
92
92
  class: "text-sm text-gray-400"
93
- }, ht = { class: "grid grid-cols-1 md:grid-cols-2 gap-6 ms-6" }, bt = { class: "text-sm whitespace-pre-wrap" }, ft = ["data-testid"], Ot = ["id", "value", "disabled", "onChange", "onBlur"], gt = ["value"], yt = ["id", "onUpdate:modelValue", "disabled", "onBlur"], xt = ["value"], vt = ["id", "checked", "disabled", "onChange", "onBlur"], wt = ["id", "onUpdate:modelValue", "disabled", "onBlur"], kt = ["id", "onUpdate:modelValue", "disabled", "onBlur"], Ct = ["id", "value", "disabled", "onInput", "onBlur"], $ = "inline-flex items-center h-9 px-3 text-sm border border-gray-300 rounded bg-gray-100 text-gray-900 cursor-pointer hover:bg-gray-200 disabled:opacity-50 disabled:cursor-not-allowed", Tt = "inline-flex items-center h-9 px-3 text-sm border border-blue-600 rounded bg-blue-600 text-white cursor-pointer hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed", St = /* @__PURE__ */ q({
93
+ }, gt = { class: "grid grid-cols-1 md:grid-cols-2 gap-6 ms-6" }, yt = { class: "text-sm whitespace-pre-wrap" }, xt = ["data-testid"], vt = ["id", "value", "disabled", "onChange", "onBlur"], wt = ["value"], kt = ["id", "onUpdate:modelValue", "disabled", "onBlur"], Ct = ["value"], Tt = ["id", "checked", "disabled", "onChange", "onBlur"], Vt = ["id", "onUpdate:modelValue", "disabled", "onBlur"], _t = ["id", "onUpdate:modelValue", "disabled", "onBlur"], St = ["id", "value", "disabled", "onInput", "onBlur"], q = "inline-flex items-center h-9 px-3 text-sm border border-gray-300 rounded bg-gray-100 text-gray-900 cursor-pointer hover:bg-gray-200 disabled:opacity-50 disabled:cursor-not-allowed", Wt = "inline-flex items-center h-9 px-3 text-sm border border-blue-600 rounded bg-blue-600 text-white cursor-pointer hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed", Ft = /* @__PURE__ */ E({
94
94
  __name: "TestFormTemplate",
95
- setup(p) {
96
- const f = X();
97
- return (c, u) => (t(), _(Z, { "metadata-configuration": W(f) }, {
98
- heading: k(({ fieldMetadata: e, fieldContext: { errorMessage: l, label: s }, disabled: r, canAddItems: d, addItem: b, canRemoveItems: x, removeItem: y, slotProps: m }) => [
95
+ setup(u) {
96
+ const h = ie();
97
+ return (d, c) => (t(), W(te, { "metadata-configuration": F(h) }, {
98
+ heading: k(({ fieldMetadata: e, fieldContext: { errorMessage: l, label: r }, disabled: p, canAddItems: s, addItem: f, canRemoveItems: y, removeItem: b, slotProps: v }) => [
99
99
  e.hidden ? n("", !0) : (t(), i("div", {
100
100
  key: 0,
101
- class: g(["mt-4", { "md:col-span-2": e.fullWidth }])
101
+ class: O(["mt-4", { "md:col-span-2": e.fullWidth }])
102
102
  }, [
103
- s ? (t(), i("h3", {
103
+ r ? (t(), i("h3", {
104
104
  key: 0,
105
- class: g(["flex text-xl font-bold gap-2 items-center mb-2", { "text-gray-500": e.disabled || r }])
105
+ class: O(["flex text-xl font-bold gap-2 items-center mb-2", { "text-gray-500": e.disabled || p }])
106
106
  }, [
107
- w(o(s) + " ", 1),
108
- d ? (t(), _(S, {
107
+ x(o(r) + " ", 1),
108
+ s ? (t(), W(S, {
109
109
  key: 0,
110
110
  icon: "plus",
111
111
  tabindex: "-1",
112
112
  "data-testid": `${e.path}-add-button`,
113
- onClick: b
113
+ onClick: f
114
114
  }, null, 8, ["data-testid", "onClick"])) : n("", !0),
115
- x ? (t(), _(S, {
115
+ y ? (t(), W(S, {
116
116
  key: 1,
117
117
  icon: "minus",
118
118
  tabindex: "-1",
119
119
  color: "red",
120
120
  "data-testid": `${e.path}-remove-button`,
121
- onClick: y
121
+ onClick: b
122
122
  }, null, 8, ["data-testid", "onClick"])) : n("", !0),
123
- m?.gotoStep ? (t(), i("button", {
123
+ v?.gotoStep ? (t(), i("button", {
124
124
  key: 2,
125
125
  type: "button",
126
126
  "data-testid": `${e.path}-goto-first-step-button`,
127
- onClick: (v) => m.gotoStep(0)
128
- }, " back to start ", 8, ne)) : n("", !0)
127
+ onClick: (V) => v.gotoStep(0)
128
+ }, " back to start ", 8, re)) : n("", !0)
129
129
  ], 2)) : n("", !0),
130
- a("pre", se, o(e.description), 1),
130
+ a("pre", ce, o(e.description), 1),
131
131
  l.value ? (t(), i("span", {
132
132
  key: 1,
133
133
  class: "text-red-600 text-sm",
134
134
  "data-testid": `${e.path}-error-message`
135
- }, o(l.value), 9, oe)) : n("", !0),
136
- a("div", de, [
137
- C(c.$slots, "default", {
138
- level: (m?.level ?? 0) + 1
135
+ }, o(l.value), 9, ue)) : n("", !0),
136
+ a("div", pe, [
137
+ T(d.$slots, "default", {
138
+ level: (v?.level ?? 0) + 1
139
139
  })
140
140
  ])
141
141
  ], 2))
142
142
  ]),
143
- "heading-array": k(({ fieldMetadata: e, fieldContext: { label: l }, disabled: s, canAddItems: r, addItem: d, slotProps: b }) => [
143
+ "heading-array": k(({ fieldMetadata: e, fieldContext: { label: l }, disabled: r, canAddItems: p, addItem: s, slotProps: f }) => [
144
144
  e.hidden ? n("", !0) : (t(), i("div", {
145
145
  key: 0,
146
- class: g(["mt-4 flex flex-col gap-2", { "md:col-span-2": e.fullWidth }])
146
+ class: O(["mt-4 flex flex-col gap-2", { "md:col-span-2": e.fullWidth }])
147
147
  }, [
148
148
  l ? (t(), i("h3", {
149
149
  key: 0,
150
- class: g(["flex text-xl font-bold gap-2 items-center", { "text-gray-500": e.disabled || s }])
150
+ class: O(["flex text-xl font-bold gap-2 items-center", { "text-gray-500": e.disabled || r }])
151
151
  }, [
152
- w(o(l) + " ", 1),
153
- r ? (t(), _(S, {
152
+ x(o(l) + " ", 1),
153
+ p ? (t(), W(S, {
154
154
  key: 0,
155
155
  icon: "plus",
156
156
  tabindex: "-1",
157
157
  "data-testid": `${e.path}-add-button`,
158
- onClick: d
158
+ onClick: s
159
159
  }, null, 8, ["data-testid", "onClick"])) : n("", !0)
160
160
  ], 2)) : n("", !0),
161
- C(c.$slots, "default", {
161
+ T(d.$slots, "default", {
162
162
  hideLabel: !0,
163
- level: (b?.level ?? 0) + 1
163
+ level: (f?.level ?? 0) + 1
164
164
  })
165
165
  ], 2))
166
166
  ]),
167
- "default-choice": k(({ fieldMetadata: e, fieldContext: { errorMessage: l, label: s }, disabled: r, required: d, slotProps: b, settings: { showOptionalInsteadOfRequired: x }, addChoiceOccurrence: y, removeChoiceOccurrence: m, canAddChoiceOccurrence: v, usedChoiceOccurrences: T }) => [
167
+ "default-choice": k(({ fieldMetadata: e, fieldContext: { errorMessage: l, label: r }, disabled: p, required: s, slotProps: f, settings: { showOptionalInsteadOfRequired: y }, addChoiceOccurrence: b, removeChoiceOccurrence: v, canAddChoiceOccurrence: V, usedChoiceOccurrences: _ }) => [
168
168
  e.hidden ? n("", !0) : (t(), i("div", {
169
169
  key: 0,
170
- class: g(["flex flex-col gap-2", { "md:col-span-2": e.fullWidth }])
170
+ class: O(["flex flex-col gap-2", { "md:col-span-2": e.fullWidth }])
171
171
  }, [
172
172
  a("span", {
173
- class: g(["flex gap-2 items-center", { "text-gray-500": r }])
173
+ class: O(["flex gap-2 items-center", { "text-gray-500": p }])
174
174
  }, [
175
- w(o(s) + " ", 1),
176
- d && !x ? (t(), i("span", re, "*")) : n("", !0),
177
- !d && x ? (t(), i("span", ce, "(optional)")) : n("", !0)
175
+ x(o(r) + " ", 1),
176
+ s && !y ? (t(), i("span", me, "*")) : n("", !0),
177
+ !s && y ? (t(), i("span", he, "(optional)")) : n("", !0)
178
178
  ], 2),
179
179
  a("div", null, [
180
- u[0] || (u[0] = w("Used choice occurrences: ", -1)),
180
+ c[0] || (c[0] = x("Used choice occurrences: ", -1)),
181
181
  a("span", {
182
182
  "data-testid": `${e.path}-used-choice-occurrences`
183
- }, o(T), 9, ue)
183
+ }, o(_), 9, be)
184
184
  ]),
185
- e.choice?.length ? (t(), i("div", pe, [
186
- (t(!0), i(V, null, A(e.choice, (O) => (t(), i("button", {
187
- key: `${O.name}-add`,
185
+ e.choice?.length ? (t(), i("div", fe, [
186
+ (t(!0), i($, null, A(e.choice, (g) => (t(), i("button", {
187
+ key: `${g.name}-add`,
188
188
  type: "button",
189
- class: g($),
190
- disabled: !v(O.name),
191
- "data-testid": `${e.path}.${O.name}-add-choice-button`,
192
- onClick: (F) => y(O.name)
193
- }, " Add " + o(O.name), 9, me))), 128)),
194
- (t(!0), i(V, null, A(e.choice, (O) => (t(), i("button", {
195
- key: `${O.name}-remove`,
189
+ class: O(q),
190
+ disabled: !V(g.name),
191
+ "data-testid": `${e.path}.${g.name}-add-choice-button`,
192
+ onClick: (B) => b(g.name)
193
+ }, " Add " + o(g.name), 9, Oe))), 128)),
194
+ (t(!0), i($, null, A(e.choice, (g) => (t(), i("button", {
195
+ key: `${g.name}-remove`,
196
196
  type: "button",
197
- class: g($),
198
- "data-testid": `${e.path}.${O.name}-remove-choice-button`,
199
- onClick: (F) => m(O.name)
200
- }, " Remove " + o(O.name), 9, he))), 128))
197
+ class: O(q),
198
+ "data-testid": `${e.path}.${g.name}-remove-choice-button`,
199
+ onClick: (B) => v(g.name)
200
+ }, " Remove " + o(g.name), 9, ge))), 128))
201
201
  ])) : n("", !0),
202
- a("div", be, [
203
- C(c.$slots, "default", {
204
- level: (b?.level ?? 0) + 1,
202
+ a("div", ye, [
203
+ T(d.$slots, "default", {
204
+ level: (f?.level ?? 0) + 1,
205
205
  belowChoiceField: !0
206
206
  })
207
207
  ]),
208
- a("pre", fe, o(e.description), 1),
208
+ a("pre", xe, o(e.description), 1),
209
209
  l.value ? (t(), i("span", {
210
210
  key: 1,
211
211
  class: "text-red-600 text-sm",
212
212
  "data-testid": `${e.path}-error-message`
213
- }, o(l.value), 9, Oe)) : n("", !0)
213
+ }, o(l.value), 9, ve)) : n("", !0)
214
214
  ], 2))
215
215
  ]),
216
- "default-choice-array": k(({ fieldMetadata: e, fieldContext: { errorMessage: l, label: s }, disabled: r, required: d, slotProps: b, settings: { showOptionalInsteadOfRequired: x }, addChoiceOccurrence: y, removeChoiceOccurrence: m, canAddChoiceOccurrence: v, usedChoiceOccurrences: T }) => [
216
+ "default-choice-array": k(({ fieldMetadata: e, fieldContext: { errorMessage: l, label: r }, disabled: p, required: s, slotProps: f, settings: { showOptionalInsteadOfRequired: y }, addChoiceOccurrence: b, removeChoiceOccurrence: v, canAddChoiceOccurrence: V, usedChoiceOccurrences: _ }) => [
217
217
  e.hidden ? n("", !0) : (t(), i("div", {
218
218
  key: 0,
219
- class: g(["flex flex-col gap-2", { "md:col-span-2": e.fullWidth }])
219
+ class: O(["flex flex-col gap-2", { "md:col-span-2": e.fullWidth }])
220
220
  }, [
221
221
  a("span", {
222
- class: g(["flex gap-2 items-center", { "text-gray-500": r }])
222
+ class: O(["flex gap-2 items-center", { "text-gray-500": p }])
223
223
  }, [
224
- w(o(s) + " ", 1),
225
- d && !x ? (t(), i("span", ge, "*")) : n("", !0),
226
- !d && x ? (t(), i("span", ye, "(optional)")) : n("", !0)
224
+ x(o(r) + " ", 1),
225
+ s && !y ? (t(), i("span", we, "*")) : n("", !0),
226
+ !s && y ? (t(), i("span", ke, "(optional)")) : n("", !0)
227
227
  ], 2),
228
228
  a("div", null, [
229
- u[1] || (u[1] = w("Used choice occurrences: ", -1)),
229
+ c[1] || (c[1] = x("Used choice occurrences: ", -1)),
230
230
  a("span", {
231
231
  "data-testid": `${e.path}-used-choice-occurrences`
232
- }, o(T), 9, xe)
232
+ }, o(_), 9, Ce)
233
233
  ]),
234
- e.choice?.length ? (t(), i("div", ve, [
235
- (t(!0), i(V, null, A(e.choice, (O) => (t(), i("button", {
236
- key: `${O.name}-add`,
234
+ e.choice?.length ? (t(), i("div", Te, [
235
+ (t(!0), i($, null, A(e.choice, (g) => (t(), i("button", {
236
+ key: `${g.name}-add`,
237
237
  type: "button",
238
- class: g($),
239
- disabled: !v(O.name),
240
- "data-testid": `${e.path}.${O.name}-add-choice-button`,
241
- onClick: (F) => y(O.name)
242
- }, " Add " + o(O.name), 9, we))), 128)),
243
- (t(!0), i(V, null, A(e.choice, (O) => (t(), i("button", {
244
- key: `${O.name}-remove`,
238
+ class: O(q),
239
+ disabled: !V(g.name),
240
+ "data-testid": `${e.path}.${g.name}-add-choice-button`,
241
+ onClick: (B) => b(g.name)
242
+ }, " Add " + o(g.name), 9, Ve))), 128)),
243
+ (t(!0), i($, null, A(e.choice, (g) => (t(), i("button", {
244
+ key: `${g.name}-remove`,
245
245
  type: "button",
246
- class: g($),
247
- "data-testid": `${e.path}.${O.name}-remove-choice-button`,
248
- onClick: (F) => m(O.name)
249
- }, " Remove " + o(O.name), 9, ke))), 128))
246
+ class: O(q),
247
+ "data-testid": `${e.path}.${g.name}-remove-choice-button`,
248
+ onClick: (B) => v(g.name)
249
+ }, " Remove " + o(g.name), 9, _e))), 128))
250
250
  ])) : n("", !0),
251
- a("div", Ce, [
252
- C(c.$slots, "default", {
253
- level: (b?.level ?? 0) + 1,
251
+ a("div", Se, [
252
+ T(d.$slots, "default", {
253
+ level: (f?.level ?? 0) + 1,
254
254
  belowChoiceField: !0
255
255
  })
256
256
  ]),
257
- a("pre", Te, o(e.description), 1),
257
+ a("pre", We, o(e.description), 1),
258
258
  l.value ? (t(), i("span", {
259
259
  key: 1,
260
260
  class: "text-red-600 text-sm",
261
261
  "data-testid": `${e.path}-error-message`
262
- }, o(l.value), 9, Se)) : n("", !0)
262
+ }, o(l.value), 9, Fe)) : n("", !0)
263
263
  ], 2))
264
264
  ]),
265
- "default-choice-array-item": k(({ fieldMetadata: e, slotProps: l, branchKey: s, globalIndex: r, insertionOrder: d, canAddItems: b, addItem: x, removeItem: y }) => [
265
+ "default-choice-array-item": k(({ fieldMetadata: e, slotProps: l, branchKey: r, globalIndex: p, insertionOrder: s, canAddItems: f, addItem: y, removeItem: b }) => [
266
266
  e.hidden ? n("", !0) : (t(), i("div", {
267
267
  key: 0,
268
- class: g(["flex flex-col gap-2 border-s-2 ps-2", { "md:col-span-2": e.fullWidth }])
268
+ class: O(["flex flex-col gap-2 border-s-2 ps-2", { "md:col-span-2": e.fullWidth }])
269
269
  }, [
270
- a("div", _e, [
270
+ a("div", $e, [
271
271
  a("span", {
272
272
  "data-testid": `${e.path}-kind-badge`
273
- }, o(s), 9, Ve),
274
- u[2] || (u[2] = w(" globalIndex: ", -1)),
273
+ }, o(r), 9, Ae),
274
+ c[2] || (c[2] = x(" globalIndex: ", -1)),
275
275
  a("span", {
276
276
  "data-testid": `${e.path}-global-index`
277
- }, o(r), 9, We),
278
- u[3] || (u[3] = w(" insertionOrder: ", -1)),
279
- d !== void 0 ? (t(), i("span", {
277
+ }, o(p), 9, Be),
278
+ c[3] || (c[3] = x(" insertionOrder: ", -1)),
279
+ s !== void 0 ? (t(), i("span", {
280
280
  key: 0,
281
281
  "data-testid": `${e.path}-insertion-order`
282
- }, o(d), 9, Ae)) : n("", !0),
283
- b ? (t(), _(S, {
282
+ }, o(s), 9, Ne)) : n("", !0),
283
+ f ? (t(), W(S, {
284
284
  key: 1,
285
285
  icon: "plus",
286
286
  tabindex: "-1",
287
287
  "data-testid": `${e.path}-add-choice-button`,
288
- onClick: x
288
+ onClick: y
289
289
  }, null, 8, ["data-testid", "onClick"])) : n("", !0),
290
- E(S, {
290
+ R(S, {
291
291
  icon: "minus",
292
292
  tabindex: "-1",
293
293
  color: "red",
294
294
  "data-testid": `${e.path}-remove-choice-button`,
295
- onClick: y
295
+ onClick: b
296
296
  }, null, 8, ["data-testid", "onClick"])
297
297
  ]),
298
- a("div", Fe, [
299
- C(c.$slots, "default", {
298
+ a("div", Pe, [
299
+ T(d.$slots, "default", {
300
300
  level: (l?.level ?? 0) + 1
301
301
  })
302
302
  ])
303
303
  ], 2))
304
304
  ]),
305
- "default-wizard": k(({ fieldMetadata: e, fieldContext: { errorMessage: l, label: s }, pages: r, currentStepIndex: d, pageCount: b, isFirst: x, isLast: y, isValidating: m, wizardConfig: v, next: T, prev: O, gotoStep: F, slotProps: J }) => [
306
- a("div", $e, [
307
- a("span", null, o(s), 1),
308
- a("div", Be, [
309
- (t(!0), i(V, null, A(r, (R, U) => (t(), i("button", {
310
- key: R.path,
305
+ "default-wizard": k(({ fieldMetadata: e, fieldContext: { errorMessage: l, label: r }, pages: p, currentStepIndex: s, pageCount: f, isFirst: y, isLast: b, isValidating: v, wizardConfig: V, next: _, prev: g, gotoStep: B, slotProps: P }) => [
306
+ a("div", qe, [
307
+ a("span", null, o(r), 1),
308
+ a("div", Le, [
309
+ (t(!0), i($, null, A(p, (w, C) => (t(), i("button", {
310
+ key: w.path,
311
311
  type: "button",
312
- class: g($),
313
- "data-testid": `${e.path}-goto-${U}-button`,
314
- onClick: (Et) => F(U)
315
- }, o(R.name), 9, Ne))), 128))
312
+ class: O(q),
313
+ "data-testid": `${e.path}-goto-${C}-button`,
314
+ onClick: (z) => B(C)
315
+ }, o(w.name), 9, Ee))), 128))
316
316
  ]),
317
- a("div", Pe, [
317
+ a("div", Ie, [
318
318
  a("button", {
319
319
  type: "button",
320
- class: g($),
320
+ class: O(q),
321
321
  "data-testid": `${e.path}-prev-button`,
322
- onClick: O
323
- }, " Previous ", 8, qe),
322
+ onClick: g
323
+ }, " Previous ", 8, ze),
324
324
  a("button", {
325
325
  type: "button",
326
- class: g(Tt),
326
+ class: O(Wt),
327
327
  "data-testid": `${e.path}-next-button`,
328
- onClick: T
329
- }, " Next ", 8, Le)
328
+ onClick: _
329
+ }, " Next ", 8, Re)
330
330
  ]),
331
331
  l.value ? (t(), i("span", {
332
332
  key: 0,
333
333
  class: "text-red-600 text-sm",
334
334
  "data-testid": `${e.path}-error-message`
335
- }, o(l.value), 9, Ee)) : n("", !0),
336
- a("div", Ie, [
337
- C(c.$slots, "default", {
338
- level: (J?.level ?? 0) + 1
335
+ }, o(l.value), 9, Ue)) : n("", !0),
336
+ a("div", De, [
337
+ T(d.$slots, "default", {
338
+ level: (P?.level ?? 0) + 1
339
339
  })
340
340
  ]),
341
341
  a("div", null, [
342
- u[4] || (u[4] = w("currentStepIndex: ", -1)),
342
+ c[4] || (c[4] = x("currentStepIndex: ", -1)),
343
343
  a("span", {
344
344
  "data-testid": `${e.path}-currentStepIndex`
345
- }, o(d), 9, ze)
345
+ }, o(s), 9, Je)
346
346
  ]),
347
347
  a("div", null, [
348
- u[5] || (u[5] = w("pageCount: ", -1)),
348
+ c[5] || (c[5] = x("pageCount: ", -1)),
349
349
  a("span", {
350
350
  "data-testid": `${e.path}-pageCount`
351
- }, o(b), 9, Re)
351
+ }, o(f), 9, Ge)
352
352
  ]),
353
353
  a("div", null, [
354
- u[6] || (u[6] = w("isFirst: ", -1)),
354
+ c[6] || (c[6] = x("isFirst: ", -1)),
355
355
  a("span", {
356
356
  "data-testid": `${e.path}-isFirst`
357
- }, o(x), 9, Ue)
357
+ }, o(y), 9, je)
358
358
  ]),
359
359
  a("div", null, [
360
- u[7] || (u[7] = w("isLast: ", -1)),
360
+ c[7] || (c[7] = x("isLast: ", -1)),
361
361
  a("span", {
362
362
  "data-testid": `${e.path}-isLast`
363
- }, o(y), 9, De)
363
+ }, o(b), 9, He)
364
364
  ]),
365
365
  a("div", null, [
366
- u[8] || (u[8] = w("isValidating: ", -1)),
366
+ c[8] || (c[8] = x("isValidating: ", -1)),
367
367
  a("span", {
368
368
  "data-testid": `${e.path}-isValidating`
369
- }, o(m), 9, Je)
369
+ }, o(v), 9, Ke)
370
370
  ]),
371
371
  a("div", null, [
372
- u[9] || (u[9] = w("allowForwardJump: ", -1)),
372
+ c[9] || (c[9] = x("allowForwardJump: ", -1)),
373
373
  a("span", {
374
374
  "data-testid": `${e.path}-wizardConfig-allowForwardJump`
375
- }, o(v.allowForwardJump), 9, Ge)
375
+ }, o(V.allowForwardJump), 9, Qe)
376
376
  ]),
377
377
  a("div", null, [
378
- u[10] || (u[10] = w("validateOnJump: ", -1)),
378
+ c[10] || (c[10] = x("validateOnJump: ", -1)),
379
379
  a("span", {
380
380
  "data-testid": `${e.path}-wizardConfig-validateOnJump`
381
- }, o(v.validateOnJump), 9, je)
381
+ }, o(V.validateOnJump), 9, Ye)
382
382
  ])
383
383
  ])
384
384
  ]),
385
- "default-wizard-page": k(({ fieldMetadata: e, isCurrent: l, gotoStep: s, slotProps: r, settings: { wizardPageUseVIf: d } }) => [
386
- d ? l ? (t(), i("div", {
385
+ "default-wizard-page": k(({ fieldMetadata: e, isCurrent: l, gotoStep: r, slotProps: p, settings: { wizardPageUseVIf: s } }) => [
386
+ s ? l ? (t(), i("div", {
387
387
  key: 1,
388
388
  "data-testid": `${e.path}-page`,
389
389
  "data-current": l
390
390
  }, [
391
- C(c.$slots, "default", {
392
- gotoStep: s,
393
- level: r?.level
391
+ T(d.$slots, "default", {
392
+ gotoStep: r,
393
+ level: p?.level
394
394
  })
395
- ], 8, Ke)) : n("", !0) : B((t(), i("div", {
395
+ ], 8, Xe)) : n("", !0) : N((t(), i("div", {
396
396
  key: 0,
397
397
  "data-testid": `${e.path}-page`,
398
398
  "data-current": l
399
399
  }, [
400
- C(c.$slots, "default", {
401
- gotoStep: s,
402
- level: r?.level
400
+ T(d.$slots, "default", {
401
+ gotoStep: r,
402
+ level: p?.level
403
403
  })
404
- ], 8, He)), [
405
- [H, l]
404
+ ], 8, Ze)), [
405
+ [Y, l]
406
406
  ])
407
407
  ]),
408
- "default-array": k(({ fieldMetadata: e, fieldContext: { errorMessage: l, label: s }, disabled: r, required: d, canAddItems: b, addItem: x, settings: { showOptionalInsteadOfRequired: y } }) => [
408
+ "default-array": k(({ fieldMetadata: e, fieldContext: { errorMessage: l, label: r }, disabled: p, required: s, canAddItems: f, addItem: y, settings: { showOptionalInsteadOfRequired: b } }) => [
409
409
  e.hidden ? n("", !0) : (t(), i("div", {
410
410
  key: 0,
411
- class: g(["flex flex-col gap-2", { "md:col-span-2": e.fullWidth }])
411
+ class: O(["flex flex-col gap-2", { "md:col-span-2": e.fullWidth }])
412
412
  }, [
413
413
  a("label", {
414
414
  for: `${e.path}[0]`,
415
- class: g([{ "text-gray-500": e.disabled || r }, "flex gap-2 items-center"])
415
+ class: O([{ "text-gray-500": e.disabled || p }, "flex gap-2 items-center"])
416
416
  }, [
417
- w(o(s) + " ", 1),
418
- d && !y ? (t(), i("span", Ye, "*")) : n("", !0),
419
- !d && y ? (t(), i("span", Ze, "(optional)")) : n("", !0),
420
- b ? (t(), _(S, {
417
+ x(o(r) + " ", 1),
418
+ s && !b ? (t(), i("span", et, "*")) : n("", !0),
419
+ !s && b ? (t(), i("span", tt, "(optional)")) : n("", !0),
420
+ f ? (t(), W(S, {
421
421
  key: 2,
422
422
  icon: "plus",
423
423
  tabindex: "-1",
424
424
  "data-testid": `${e.path}-add-button`,
425
- onClick: x
425
+ onClick: y
426
426
  }, null, 8, ["data-testid", "onClick"])) : n("", !0)
427
- ], 10, Qe),
428
- C(c.$slots, "default", { hideLabel: !0 }),
429
- a("pre", Xe, o(e.description), 1),
427
+ ], 10, Me),
428
+ T(d.$slots, "default", { hideLabel: !0 }),
429
+ a("pre", it, o(e.description), 1),
430
430
  l.value ? (t(), i("span", {
431
431
  key: 0,
432
432
  class: "text-red-600 text-sm",
433
433
  "data-testid": `${e.path}-error-message`
434
- }, o(l.value), 9, Me)) : n("", !0)
434
+ }, o(l.value), 9, at)) : n("", !0)
435
435
  ], 2))
436
436
  ]),
437
- default: k(({ fieldMetadata: e, fieldContext: { errorMessage: l, label: s }, disabled: r, required: d, canRemoveItems: b, removeItem: x, slotProps: y, settings: { showOptionalInsteadOfRequired: m } }) => [
437
+ default: k(({ fieldMetadata: e, fieldContext: { errorMessage: l, label: r }, disabled: p, required: s, canRemoveItems: f, removeItem: y, slotProps: b, settings: { showOptionalInsteadOfRequired: v } }) => [
438
438
  e.hidden ? n("", !0) : (t(), i("div", {
439
439
  key: 0,
440
- class: g(["flex flex-col gap-2", { "md:col-span-2": e.fullWidth }])
440
+ class: O(["flex flex-col gap-2", { "md:col-span-2": e.fullWidth }])
441
441
  }, [
442
- y?.hideLabel ? n("", !0) : (t(), i("label", {
442
+ b?.hideLabel ? n("", !0) : (t(), i("label", {
443
443
  key: 0,
444
444
  for: e.path,
445
- class: g([{ "text-gray-500": e.disabled || r }, "flex gap-1 items-center"])
445
+ class: O([{ "text-gray-500": e.disabled || p }, "flex gap-1 items-center"])
446
446
  }, [
447
- w(o(s) + " ", 1),
448
- d && !m ? (t(), i("span", tt, "*")) : n("", !0),
449
- !d && m ? (t(), i("span", it, "(optional)")) : n("", !0)
450
- ], 10, et)),
451
- a("div", at, [
452
- a("div", lt, [
453
- C(c.$slots, "default")
447
+ x(o(r) + " ", 1),
448
+ s && !v ? (t(), i("span", nt, "*")) : n("", !0),
449
+ !s && v ? (t(), i("span", st, "(optional)")) : n("", !0)
450
+ ], 10, lt)),
451
+ a("div", ot, [
452
+ a("div", dt, [
453
+ T(d.$slots, "default")
454
454
  ]),
455
- E(S, {
456
- class: g({ invisible: !b }),
455
+ R(S, {
456
+ class: O({ invisible: !f }),
457
457
  icon: "minus",
458
458
  tabindex: "-1",
459
459
  color: "red",
460
460
  "data-testid": `${e.path}-remove-button`,
461
- onClick: x
461
+ onClick: y
462
462
  }, null, 8, ["class", "data-testid", "onClick"])
463
463
  ]),
464
- a("pre", nt, o(e.description), 1),
464
+ a("pre", rt, o(e.description), 1),
465
465
  l.value ? (t(), i("span", {
466
466
  key: 1,
467
467
  class: "text-red-600 text-sm",
468
468
  "data-testid": `${e.path}-error-message`
469
- }, o(l.value), 9, st)) : n("", !0)
469
+ }, o(l.value), 9, ct)) : n("", !0)
470
470
  ], 2)),
471
- C(c.$slots, "attributes")
471
+ T(d.$slots, "attributes")
472
472
  ]),
473
- "group-array": k(({ fieldMetadata: e, fieldContext: { errorMessage: l, label: s }, disabled: r, required: d, canAddItems: b, addItem: x, slotProps: y, settings: { showOptionalInsteadOfRequired: m } }) => [
474
- e.hidden ? (t(), i(V, { key: 0 }, [], 64)) : y?.belowChoiceField ? (t(), i("div", {
473
+ "group-array": k(({ fieldMetadata: e, fieldContext: { errorMessage: l, label: r }, disabled: p, required: s, canAddItems: f, addItem: y, slotProps: b, settings: { showOptionalInsteadOfRequired: v } }) => [
474
+ e.hidden ? (t(), i($, { key: 0 }, [], 64)) : b?.belowChoiceField ? (t(), i("div", {
475
475
  key: 1,
476
- class: g({ "md:col-span-2": e.fullWidth })
476
+ class: O({ "md:col-span-2": e.fullWidth })
477
477
  }, [
478
478
  a("span", {
479
- class: g(["flex gap-2 items-center mb-2", { "text-gray-500": e.disabled || r }])
479
+ class: O(["flex gap-2 items-center mb-2", { "text-gray-500": e.disabled || p }])
480
480
  }, [
481
- w(o(s) + " ", 1),
482
- d && !m ? (t(), i("span", ot, "*")) : n("", !0),
483
- !d && m ? (t(), i("span", dt, "(optional)")) : n("", !0),
484
- b ? (t(), _(S, {
481
+ x(o(r) + " ", 1),
482
+ s && !v ? (t(), i("span", ut, "*")) : n("", !0),
483
+ !s && v ? (t(), i("span", pt, "(optional)")) : n("", !0),
484
+ f ? (t(), W(S, {
485
485
  key: 2,
486
486
  icon: "plus",
487
487
  tabindex: "-1",
488
488
  "data-testid": `${e.path}-add-button`,
489
- onClick: x
489
+ onClick: y
490
490
  }, null, 8, ["data-testid", "onClick"])) : n("", !0)
491
491
  ], 2),
492
- a("div", rt, [
493
- C(c.$slots, "default", {
494
- level: (y?.level ?? 0) + 1
492
+ a("div", mt, [
493
+ T(d.$slots, "default", {
494
+ level: (b?.level ?? 0) + 1
495
495
  })
496
496
  ]),
497
- a("pre", ct, o(e.description), 1),
497
+ a("pre", ht, o(e.description), 1),
498
498
  l.value ? (t(), i("span", {
499
499
  key: 0,
500
500
  class: "text-red-600 text-sm",
501
501
  "data-testid": `${e.path}-error-message`
502
- }, o(l.value), 9, ut)) : n("", !0)
503
- ], 2)) : C(c.$slots, "default", { key: 2 })
502
+ }, o(l.value), 9, bt)) : n("", !0)
503
+ ], 2)) : T(d.$slots, "default", {}, void 0, void 0, 2)
504
504
  ]),
505
- group: k(({ fieldMetadata: e, fieldContext: { errorMessage: l, label: s }, disabled: r, required: d, canAddItems: b, canRemoveItems: x, addItem: y, removeItem: m, slotProps: v, settings: { showOptionalInsteadOfRequired: T } }) => [
505
+ group: k(({ fieldMetadata: e, fieldContext: { errorMessage: l, label: r }, disabled: p, required: s, canAddItems: f, canRemoveItems: y, addItem: b, removeItem: v, slotProps: V, settings: { showOptionalInsteadOfRequired: _ } }) => [
506
506
  e.hidden ? n("", !0) : (t(), i("div", {
507
507
  key: 0,
508
- class: g({ "md:col-span-2": e.fullWidth })
508
+ class: O({ "md:col-span-2": e.fullWidth })
509
509
  }, [
510
- v?.hideLabel ? n("", !0) : (t(), i("span", {
510
+ V?.hideLabel ? n("", !0) : (t(), i("span", {
511
511
  key: 0,
512
- class: g(["flex gap-2 items-center mb-2", { "text-gray-500": e.disabled || r }])
512
+ class: O(["flex gap-2 items-center mb-2", { "text-gray-500": e.disabled || p }])
513
513
  }, [
514
- w(o(s) + " ", 1),
515
- d && !T ? (t(), i("span", pt, "*")) : n("", !0),
516
- !d && T ? (t(), i("span", mt, "(optional)")) : n("", !0),
517
- b ? (t(), _(S, {
514
+ x(o(r) + " ", 1),
515
+ s && !_ ? (t(), i("span", ft, "*")) : n("", !0),
516
+ !s && _ ? (t(), i("span", Ot, "(optional)")) : n("", !0),
517
+ f ? (t(), W(S, {
518
518
  key: 2,
519
519
  icon: "plus",
520
520
  tabindex: "-1",
521
521
  "data-testid": `${e.path}-add-button`,
522
- onClick: y
522
+ onClick: b
523
523
  }, null, 8, ["data-testid", "onClick"])) : n("", !0),
524
- x ? (t(), _(S, {
524
+ y ? (t(), W(S, {
525
525
  key: 3,
526
526
  icon: "minus",
527
527
  tabindex: "-1",
528
528
  "data-testid": `${e.path}-remove-button`,
529
529
  color: "red",
530
- onClick: m
530
+ onClick: v
531
531
  }, null, 8, ["data-testid", "onClick"])) : n("", !0)
532
532
  ], 2)),
533
- a("div", ht, [
534
- C(c.$slots, "default", {
535
- level: (v?.level ?? 0) + 1
533
+ a("div", gt, [
534
+ T(d.$slots, "default", {
535
+ level: (V?.level ?? 0) + 1
536
536
  })
537
537
  ]),
538
- a("pre", bt, o(e.description), 1),
538
+ a("pre", yt, o(e.description), 1),
539
539
  l.value ? (t(), i("span", {
540
540
  key: 1,
541
541
  class: "text-red-600 text-sm",
542
542
  "data-testid": `${e.path}-error-message`
543
- }, o(l.value), 9, ft)) : n("", !0)
543
+ }, o(l.value), 9, xt)) : n("", !0)
544
544
  ], 2)),
545
- C(c.$slots, "attributes")
545
+ T(d.$slots, "attributes")
546
546
  ]),
547
- "select-input": k(({ fieldMetadata: e, fieldContext: { value: l, handleBlur: s, handleChange: r }, disabled: d }) => [
547
+ "select-input": k(({ fieldMetadata: e, fieldContext: { value: l, handleBlur: r, handleChange: p }, disabled: s }) => [
548
548
  a("select", {
549
549
  id: e.path,
550
550
  value: l.value,
551
- disabled: e.disabled || d,
551
+ disabled: e.disabled || s,
552
552
  class: "h-9 bg-gray-100 border-gray-200 border rounded px-3 text-sm",
553
- onChange: r,
554
- onBlur: s
553
+ onChange: p,
554
+ onBlur: r
555
555
  }, [
556
- (t(!0), i(V, null, A(e.options, ({ key: b, value: x }) => (t(), i("option", {
557
- key: b,
558
- value: b
559
- }, o(x), 9, gt))), 128))
560
- ], 40, Ot)
556
+ (t(!0), i($, null, A(e.options, ({ key: f, value: y }) => (t(), i("option", {
557
+ key: f,
558
+ value: f
559
+ }, o(y), 9, wt))), 128))
560
+ ], 40, vt)
561
561
  ]),
562
- "selectBoundByVModel-input": k(({ fieldMetadata: e, fieldContext: { value: l, handleBlur: s }, disabled: r }) => [
563
- B(a("select", {
562
+ "selectBoundByVModel-input": k(({ fieldMetadata: e, fieldContext: { value: l, handleBlur: r }, disabled: p }) => [
563
+ N(a("select", {
564
564
  id: e.path,
565
- "onUpdate:modelValue": (d) => l.value = d,
566
- disabled: e.disabled || r,
565
+ "onUpdate:modelValue": (s) => l.value = s,
566
+ disabled: e.disabled || p,
567
567
  class: "h-9 bg-gray-100 border-gray-200 border rounded px-3 text-sm",
568
- onBlur: s
568
+ onBlur: r
569
569
  }, [
570
- (t(!0), i(V, null, A(e.options, ({ key: d, value: b }) => (t(), i("option", {
571
- key: d,
572
- value: d
573
- }, o(b), 9, xt))), 128))
574
- ], 40, yt), [
575
- [j, l.value]
570
+ (t(!0), i($, null, A(e.options, ({ key: s, value: f }) => (t(), i("option", {
571
+ key: s,
572
+ value: s
573
+ }, o(f), 9, Ct))), 128))
574
+ ], 40, kt), [
575
+ [Q, l.value]
576
576
  ])
577
577
  ]),
578
- "checkbox-input": k(({ fieldMetadata: e, fieldContext: { value: l, handleBlur: s, handleChange: r }, disabled: d }) => [
578
+ "checkbox-input": k(({ fieldMetadata: e, fieldContext: { value: l, handleBlur: r, handleChange: p }, disabled: s }) => [
579
579
  a("input", {
580
580
  id: e.path,
581
581
  checked: l.value,
582
- disabled: e.disabled || d,
582
+ disabled: e.disabled || s,
583
583
  type: "checkbox",
584
584
  class: "h-6 bg-gray-100 border-gray-200 border rounded px-3 text-sm",
585
- onChange: (b) => r(b.target.checked),
586
- onBlur: s
587
- }, null, 40, vt)
585
+ onChange: (f) => p(f.target.checked),
586
+ onBlur: r
587
+ }, null, 40, Tt)
588
588
  ]),
589
- "checkboxBoundByVModel-input": k(({ fieldMetadata: e, fieldContext: { value: l, handleBlur: s }, disabled: r }) => [
590
- B(a("input", {
589
+ "checkboxBoundByVModel-input": k(({ fieldMetadata: e, fieldContext: { value: l, handleBlur: r }, disabled: p }) => [
590
+ N(a("input", {
591
591
  id: e.path,
592
- "onUpdate:modelValue": (d) => l.value = d,
593
- disabled: e.disabled || r,
592
+ "onUpdate:modelValue": (s) => l.value = s,
593
+ disabled: e.disabled || p,
594
594
  type: "checkbox",
595
595
  class: "h-6 bg-gray-100 border-gray-200 border rounded px-3 text-sm",
596
- onBlur: s
597
- }, null, 40, wt), [
598
- [z, l.value]
596
+ onBlur: r
597
+ }, null, 40, Vt), [
598
+ [D, l.value]
599
599
  ])
600
600
  ]),
601
- "textBoundByVModel-input": k(({ fieldMetadata: e, fieldContext: { value: l, handleBlur: s }, disabled: r }) => [
602
- B(a("input", {
601
+ "textBoundByVModel-input": k(({ fieldMetadata: e, fieldContext: { value: l, handleBlur: r }, disabled: p }) => [
602
+ N(a("input", {
603
603
  id: e.path,
604
- "onUpdate:modelValue": (d) => l.value = d,
605
- disabled: e.disabled || r,
604
+ "onUpdate:modelValue": (s) => l.value = s,
605
+ disabled: e.disabled || p,
606
606
  type: "text",
607
607
  class: "h-9 bg-gray-100 border-gray-200 border rounded px-3 text-sm",
608
- onBlur: s
609
- }, null, 40, kt), [
610
- [G, l.value]
608
+ onBlur: r
609
+ }, null, 40, _t), [
610
+ [K, l.value]
611
611
  ])
612
612
  ]),
613
- "default-input": k(({ fieldMetadata: e, fieldContext: { value: l, handleBlur: s, handleChange: r }, disabled: d }) => [
613
+ "default-input": k(({ fieldMetadata: e, fieldContext: { value: l, handleBlur: r, handleChange: p }, disabled: s }) => [
614
614
  a("input", {
615
615
  id: e.path,
616
616
  value: l.value,
617
- disabled: e.disabled || d,
617
+ disabled: e.disabled || s,
618
618
  type: "text",
619
619
  class: "h-9 bg-gray-100 border-gray-200 border rounded px-3 text-sm",
620
- onInput: r,
621
- onBlur: s
622
- }, null, 40, Ct)
620
+ onInput: p,
621
+ onBlur: r
622
+ }, null, 40, St)
623
623
  ]),
624
624
  _: 3
625
625
  }, 8, ["metadata-configuration"]));
626
626
  }
627
- }), _t = { class: "flex justify-end gap-2" }, Vt = {
627
+ }), $t = { class: "flex justify-end gap-2" }, At = {
628
628
  key: 1,
629
629
  type: "submit",
630
630
  class: "cursor-pointer mt-4 bg-blue-500 text-white px-4 py-2 rounded",
631
631
  "data-testid": "submit"
632
- }, Wt = {
632
+ }, Bt = {
633
633
  key: 0,
634
634
  "data-testid": "errors",
635
635
  class: "col-12 text-red-600"
636
- }, At = ["innerHTML"], Ft = {
636
+ }, Nt = ["innerHTML"], Pt = {
637
637
  key: 1,
638
638
  "data-testid": "isSubmitted"
639
- }, $t = {
639
+ }, qt = {
640
640
  key: 2,
641
641
  class: "bg-gray-100 p-4 rounded-lg text-sm overflow-auto"
642
- }, D = /* @__PURE__ */ q({
642
+ }, G = /* @__PURE__ */ E({
643
643
  __name: "TestForm",
644
644
  props: {
645
645
  metadata: {},
@@ -650,19 +650,19 @@ const ae = {
650
650
  initialValues: {},
651
651
  keepValuesOnUnmount: { type: Boolean }
652
652
  },
653
- setup(p) {
654
- const { values: f, handleSubmit: c, errors: u, meta: e } = M({
655
- initialValues: p.initialValues,
653
+ setup(u, { expose: h }) {
654
+ const { values: d, handleSubmit: c, errors: e, meta: l, resetForm: r, resetField: p, setFieldValue: s, setValues: f } = ae({
655
+ initialValues: u.initialValues,
656
656
  // Passed as a computed ref (not the destructured value directly) so a live toggle of the prop
657
657
  // after mount keeps affecting unmount behaviour, instead of freezing whatever it was at setup time.
658
- keepValuesOnUnmount: L(() => p.keepValuesOnUnmount)
659
- }), l = P(), s = P(p.initialEdit), r = P(!1), d = L(() => p.metadata?.map((y) => ee(y, (m) => (m.computedProps = m.computedProps ?? [], m.computedProps.push((v) => {
660
- s.value || (v.disabled = !0);
661
- }), p.hideFieldsWithoutValue && (m.computedProps.push((v, T) => {
662
- !s.value && !ie(T.value) && (v.hidden = !0);
663
- }), m.computedProps.push((v, T, O) => {
664
- !s.value && O.value.length > 0 && O.value.every((F) => F.hidden) && (v.hidden = !0);
665
- })), m)))), b = L(() => ({
658
+ keepValuesOnUnmount: U(() => u.keepValuesOnUnmount)
659
+ }), y = L(), b = L(u.initialEdit), v = L(!1), V = U(() => u.metadata?.map((P) => le(P, (w) => (w.computedProps = w.computedProps ?? [], w.computedProps.push((C) => {
660
+ b.value || (C.disabled = !0);
661
+ }), u.hideFieldsWithoutValue && (w.computedProps.push((C, z) => {
662
+ !b.value && !se(z.value) && (C.hidden = !0);
663
+ }), w.computedProps.push((C, z, j) => {
664
+ !b.value && j.value.length > 0 && j.value.every((H) => H.hidden) && (C.hidden = !0);
665
+ })), w)))), _ = U(() => ({
666
666
  analytics: !0,
667
667
  messages: {
668
668
  required: "{field} is required",
@@ -684,73 +684,91 @@ const ae = {
684
684
  fractionDigits: "{field} may have at most {digits} decimal place(s)",
685
685
  totalDigits: "{field} may have at most {digits} significant digit(s)"
686
686
  },
687
- ...p.settings ?? {}
687
+ ...u.settings ?? {}
688
688
  }));
689
- function x(y) {
689
+ function g() {
690
+ p(u.metadata[0].name);
691
+ }
692
+ h({ setFieldValue: s, setValues: f });
693
+ function B(P) {
690
694
  c(
691
- (m) => {
692
- r.value = !0, s.value = !1;
695
+ (w) => {
696
+ v.value = !0, b.value = !1;
693
697
  },
694
- ({ errors: m }) => {
695
- r.value = !1;
698
+ ({ errors: w }) => {
699
+ v.value = !1;
696
700
  }
697
- )(y);
701
+ )(P);
698
702
  }
699
- return (y, m) => (t(), i("form", {
700
- onSubmit: K(x, ["prevent"])
703
+ return (P, w) => (t(), i("form", {
704
+ onSubmit: Z(B, ["prevent"])
701
705
  }, [
702
- a("div", _t, [
703
- s.value ? n("", !0) : (t(), i("button", {
706
+ a("div", $t, [
707
+ b.value ? n("", !0) : (t(), i("button", {
704
708
  key: 0,
705
709
  type: "button",
706
710
  class: "cursor-pointer mt-4 bg-blue-500 text-white px-4 py-2 rounded",
707
711
  "data-testid": "submit",
708
- onClick: m[0] || (m[0] = (v) => s.value = !0)
712
+ onClick: w[0] || (w[0] = (C) => b.value = !0)
709
713
  }, " Edit ")),
710
- s.value ? (t(), i("button", Vt, " Submit ")) : n("", !0),
711
- s.value ? (t(), i("button", {
714
+ b.value ? (t(), i("button", At, " Submit ")) : n("", !0),
715
+ b.value ? (t(), i("button", {
712
716
  key: 2,
713
717
  type: "button",
714
718
  class: "cursor-pointer mt-4 bg-gray-200 text-black px-4 py-2 rounded",
715
719
  "data-testid": "cancel",
716
- onClick: m[1] || (m[1] = (v) => s.value = !1)
717
- }, " Cancel ")) : n("", !0)
720
+ onClick: w[1] || (w[1] = (C) => b.value = !1)
721
+ }, " Cancel ")) : n("", !0),
722
+ b.value ? (t(), i("button", {
723
+ key: 3,
724
+ type: "button",
725
+ class: "cursor-pointer mt-4 bg-gray-200 text-black px-4 py-2 rounded",
726
+ "data-testid": "reset",
727
+ onClick: w[2] || (w[2] = (C) => F(r)())
728
+ }, " Reset ")) : n("", !0),
729
+ b.value ? (t(), i("button", {
730
+ key: 4,
731
+ type: "button",
732
+ class: "cursor-pointer mt-4 bg-gray-200 text-black px-4 py-2 rounded",
733
+ "data-testid": "resetField",
734
+ onClick: g
735
+ }, " Reset field ")) : n("", !0)
718
736
  ]),
719
- Object.values(W(u)).length ? (t(), i("div", Wt, [
720
- m[3] || (m[3] = w(" Errors: ", -1)),
737
+ Object.values(F(e)).length ? (t(), i("div", Bt, [
738
+ w[4] || (w[4] = x(" Errors: ", -1)),
721
739
  a("ul", null, [
722
- (t(!0), i(V, null, A(W(u), (v, T) => (t(), i("li", { key: T }, [
723
- a("span", { innerHTML: v }, null, 8, At)
740
+ (t(!0), i($, null, A(F(e), (C, z) => (t(), i("li", { key: z }, [
741
+ a("span", { innerHTML: C }, null, 8, Nt)
724
742
  ]))), 128))
725
743
  ])
726
744
  ])) : n("", !0),
727
- E(te, {
728
- template: St,
729
- metadata: d.value,
730
- settings: b.value,
731
- "onUpdate:modelValue": m[2] || (m[2] = (v) => l.value = v)
745
+ R(ne, {
746
+ template: Ft,
747
+ metadata: V.value,
748
+ settings: _.value,
749
+ "onUpdate:modelValue": w[3] || (w[3] = (C) => y.value = C)
732
750
  }, null, 8, ["metadata", "settings"]),
733
- r.value ? (t(), i("span", Ft)) : n("", !0),
734
- p.showDebugState ? (t(), i("pre", $t, "IsDirty: " + o(W(e).dirty) + `
735
- Pending: ` + o(W(e).pending) + `
736
- Touched: ` + o(W(e).touched) + `
737
- Valid: ` + o(W(e).valid) + `
738
- Submitted: ` + o(r.value) + `
751
+ v.value ? (t(), i("span", Pt)) : n("", !0),
752
+ u.showDebugState ? (t(), i("pre", qt, "IsDirty: " + o(F(l).dirty) + `
753
+ Pending: ` + o(F(l).pending) + `
754
+ Touched: ` + o(F(l).touched) + `
755
+ Valid: ` + o(F(l).valid) + `
756
+ Submitted: ` + o(v.value) + `
739
757
 
740
758
  // form values:
741
- ` + o(JSON.stringify(W(f), null, 2)) + `
759
+ ` + o(JSON.stringify(F(d), null, 2)) + `
742
760
  `, 1)) : n("", !0)
743
761
  ], 32));
744
762
  }
745
- }), Rt = h([{
763
+ }), Ht = m([{
746
764
  name: "text",
747
765
  type: "text",
748
766
  fieldOptions: { label: "Text Input" },
749
767
  path: "with.custom.structure",
750
768
  restriction: { maxLength: 10 }
751
- }]), Ut = {
769
+ }]), Kt = {
752
770
  with: { custom: { structure: "Order A204" } }
753
- }, Dt = h([{
771
+ }, Qt = m([{
754
772
  name: "arrays",
755
773
  fieldOptions: { label: "Array Fields" },
756
774
  type: "heading",
@@ -768,7 +786,7 @@ Submitted: ` + o(r.value) + `
768
786
  { name: "flag", fieldOptions: { label: "Nested field 3" }, type: "checkbox" }
769
787
  ] }
770
788
  ]
771
- }]), Jt = {
789
+ }]), Yt = {
772
790
  arrays: {
773
791
  optionalItems: ["First note"],
774
792
  requiredItems: ["Alpha", "Beta"],
@@ -778,7 +796,7 @@ Submitted: ` + o(r.value) + `
778
796
  { note: "Section two", category: "option1", flag: !1 }
779
797
  ]
780
798
  }
781
- }, Gt = h([{
799
+ }, Zt = m([{
782
800
  name: "groups",
783
801
  fieldOptions: { label: "Grouped Fields" },
784
802
  type: "heading",
@@ -808,7 +826,7 @@ You can test it by filling in one of the fields.`, children: [
808
826
  { name: "second", fieldOptions: { label: "Required Nested field 2" } }
809
827
  ] }
810
828
  ]
811
- }]), jt = {
829
+ }]), Xt = {
812
830
  groups: {
813
831
  requiredGroup: { first: "Ada", second: "Lovelace" },
814
832
  optionalGroup: { first: "Grace", second: "Hopper" }
@@ -822,7 +840,7 @@ You can test it by filling in one of the fields.`, children: [
822
840
  { first: "Barbara", second: "Liskov" }
823
841
  ]
824
842
  }
825
- }, Ht = h([
843
+ }, Mt = m([
826
844
  {
827
845
  name: "simpleChoiceSection",
828
846
  fieldOptions: { label: "Choice Fields (minOccurs 1, maxOccurs 1)" },
@@ -862,7 +880,7 @@ You can test it by filling in one of the fields.`, children: [
862
880
  ] }
863
881
  ]
864
882
  }
865
- ]), Kt = {
883
+ ]), ei = {
866
884
  // Only one branch per choice carries a value, honouring the mutually exclusive rule.
867
885
  simpleChoiceSection: { contactMethod: { primary: "Picked the first branch" } },
868
886
  groupedChoiceSection: {
@@ -871,7 +889,7 @@ You can test it by filling in one of the fields.`, children: [
871
889
  arrayChoiceSection: {
872
890
  pick: { optionA: ["First entry", "Second entry"] }
873
891
  }
874
- }, Qt = h([
892
+ }, ti = m([
875
893
  {
876
894
  fieldOptions: { label: "Personal Info" },
877
895
  type: "heading",
@@ -904,7 +922,7 @@ You can test it by filling in one of the fields.`, children: [
904
922
  lastName: "Smit"
905
923
  }
906
924
  }
907
- }), Yt = {
925
+ }), ii = {
908
926
  person: {
909
927
  firstName: "Ada",
910
928
  lastName: "Lovelace",
@@ -915,7 +933,7 @@ You can test it by filling in one of the fields.`, children: [
915
933
  city: "London",
916
934
  country: "United Kingdom"
917
935
  }
918
- }, Zt = h([
936
+ }, ai = m([
919
937
  {
920
938
  name: "inputs",
921
939
  fieldOptions: { label: "All Input Types" },
@@ -952,7 +970,7 @@ You can test it by filling in one of the fields.`, children: [
952
970
  { name: "describedField", minOccurs: 0, description: "A per-field description rendered below the input.", fieldOptions: { label: "Field with description" } }
953
971
  ]
954
972
  }
955
- ]), Xt = {
973
+ ]), li = {
956
974
  inputs: {
957
975
  text: "Hello world",
958
976
  textBoundByVModel: "Two-way bound",
@@ -968,7 +986,7 @@ You can test it by filling in one of the fields.`, children: [
968
986
  fullWidthField: "Spans the full width",
969
987
  describedField: "Described value"
970
988
  }
971
- }, Mt = h([
989
+ }, ni = m([
972
990
  {
973
991
  name: "strings",
974
992
  fieldOptions: { label: "String Restrictions" },
@@ -1003,10 +1021,10 @@ You can test it by filling in one of the fields.`, children: [
1003
1021
  children: [
1004
1022
  { name: "combined", minOccurs: 0, restriction: { minLength: 2, maxLength: 6, pattern: "^[a-z]+$" }, description: "minLength 2, maxLength 6 and lowercase-only pattern combined.", fieldOptions: { label: "Combined restrictions" } },
1005
1023
  { name: "requiredWithRestriction", restriction: { minLength: 3 }, fieldOptions: { label: "Required + minLength 3" } },
1006
- { name: "customValidation", minOccurs: 0, validation: (p) => !p || String(p).startsWith("A") || 'Value must start with "A"', description: "Custom vee-validate function via the validation property.", fieldOptions: { label: "Custom validation function" } }
1024
+ { name: "customValidation", minOccurs: 0, validation: (u) => !u || String(u).startsWith("A") || 'Value must start with "A"', description: "Custom vee-validate function via the validation property.", fieldOptions: { label: "Custom validation function" } }
1007
1025
  ]
1008
1026
  }
1009
- ]), ei = {
1027
+ ]), si = {
1010
1028
  // Every value here satisfies its restriction, so loading the sample form validates cleanly.
1011
1029
  strings: {
1012
1030
  minLength: "abcd",
@@ -1029,7 +1047,7 @@ You can test it by filling in one of the fields.`, children: [
1029
1047
  requiredWithRestriction: "valid",
1030
1048
  customValidation: "Apple"
1031
1049
  }
1032
- }, ti = h([
1050
+ }, oi = m([
1033
1051
  {
1034
1052
  name: "occurrences",
1035
1053
  fieldOptions: { label: "Occurrence Variants" },
@@ -1053,7 +1071,7 @@ You can test it by filling in one of the fields.`, children: [
1053
1071
  { name: "vModelTexts", type: "textBoundByVModel", minOccurs: 0, maxOccurs: 3, fieldOptions: { label: "v-model text array (max 3)" } }
1054
1072
  ]
1055
1073
  }
1056
- ]), ii = {
1074
+ ]), di = {
1057
1075
  occurrences: {
1058
1076
  manualFirstItem: ["Added by hand"],
1059
1077
  prefilledToMin: ["First", "Second"],
@@ -1064,7 +1082,7 @@ You can test it by filling in one of the fields.`, children: [
1064
1082
  checkboxes: [!0, !1],
1065
1083
  vModelTexts: ["Alpha", "Beta"]
1066
1084
  }
1067
- }, ai = h([
1085
+ }, ri = m([
1068
1086
  {
1069
1087
  name: "overLimit",
1070
1088
  fieldOptions: { label: "Over-limit Arrays (loaded from initialValues)" },
@@ -1074,12 +1092,12 @@ You can test it by filling in one of the fields.`, children: [
1074
1092
  { name: "optionalItems", minOccurs: 0, maxOccurs: 2, fieldOptions: { label: "Optional (max 2)" }, description: "A non-required array carried no occurrence rule before; loaded with 3 items it now fails xsd_maxOccurs on submit too." }
1075
1093
  ]
1076
1094
  }
1077
- ]), li = {
1095
+ ]), ci = {
1078
1096
  overLimit: {
1079
1097
  requiredItems: ["First", "Second", "Third"],
1080
1098
  optionalItems: ["One", "Two", "Three"]
1081
1099
  }
1082
- }, ni = h([
1100
+ }, ui = m([
1083
1101
  {
1084
1102
  name: "optionalChoice",
1085
1103
  fieldOptions: { label: "Optional Choice (minOccurs 0)" },
@@ -1137,7 +1155,7 @@ You can test it by filling in one of the fields.`, children: [
1137
1155
  ] }
1138
1156
  ]
1139
1157
  }
1140
- ]), si = {
1158
+ ]), pi = {
1141
1159
  optionalChoice: { contact: { email: "ada@example.com" } },
1142
1160
  // Two filled email occurrences satisfy the minOccurs 2 requirement.
1143
1161
  twoOccurrence: { contact: { email: ["ada@example.com", "grace@example.com"] } },
@@ -1145,7 +1163,7 @@ You can test it by filling in one of the fields.`, children: [
1145
1163
  totalCap: { entries: { capped: ["C-one", "C-two"] } },
1146
1164
  // Both single branches filled exactly to their effective cap, so every add button is disabled.
1147
1165
  singleBranchCap: { tags: { tag: ["T-one", "T-two"] }, clamped: { item: ["I-one", "I-two"] } }
1148
- }, oi = h([
1166
+ }, mi = m([
1149
1167
  {
1150
1168
  name: "tooManyBranches",
1151
1169
  fieldOptions: { label: "Choice Over maxOccurs (auto mode, maxOccurs 1)" },
@@ -1178,11 +1196,11 @@ You can test it by filling in one of the fields.`, children: [
1178
1196
  ] }
1179
1197
  ]
1180
1198
  }
1181
- ]), di = {
1199
+ ]), hi = {
1182
1200
  tooManyBranches: { contact: { email: "ada@example.com", phone: "555-0100" } },
1183
1201
  branchOverTotal: { entries: { capped: ["C-one", "C-two", "C-three"] } },
1184
1202
  singleBranchOverTotal: { tags: { tag: ["T-one", "T-two", "T-three"] } }
1185
- }, ri = h([
1203
+ }, bi = m([
1186
1204
  {
1187
1205
  name: "explicitSection",
1188
1206
  fieldOptions: { label: "Explicit Choice (selection-first)" },
@@ -1199,10 +1217,10 @@ You can test it by filling in one of the fields.`, children: [
1199
1217
  ] }
1200
1218
  ]
1201
1219
  }
1202
- ]), ci = {
1220
+ ]), fi = {
1203
1221
  // A loaded value auto-selects its branch, even though nothing was clicked.
1204
1222
  explicitSection: { contact: { email: { address: "jane@example.com" } } }
1205
- }, ui = h([
1223
+ }, Oi = m([
1206
1224
  {
1207
1225
  name: "preserveSection",
1208
1226
  fieldOptions: { label: "Explicit Choice With preserveOnSwitch" },
@@ -1218,9 +1236,9 @@ You can test it by filling in one of the fields.`, children: [
1218
1236
  ] }
1219
1237
  ]
1220
1238
  }
1221
- ]), pi = {
1239
+ ]), gi = {
1222
1240
  preserveSection: { contact: { email: { address: "restore@example.com" } } }
1223
- }, mi = h([
1241
+ }, yi = m([
1224
1242
  {
1225
1243
  name: "integrationsSection",
1226
1244
  fieldOptions: { label: "Explicit Repeatable Choice (maxOccurs 5)" },
@@ -1238,7 +1256,7 @@ You can test it by filling in one of the fields.`, children: [
1238
1256
  ] }
1239
1257
  ]
1240
1258
  }
1241
- ]), hi = {
1259
+ ]), xi = {
1242
1260
  // A mix of both kinds; each branch is its own array of occurrences.
1243
1261
  integrationsSection: {
1244
1262
  integrations: {
@@ -1251,7 +1269,7 @@ You can test it by filling in one of the fields.`, children: [
1251
1269
  ]
1252
1270
  }
1253
1271
  }
1254
- }, bi = h([
1272
+ }, vi = m([
1255
1273
  {
1256
1274
  name: "timelineSection",
1257
1275
  fieldOptions: { label: "Repeatable Explicit Choice (displayOrder: added)" },
@@ -1268,7 +1286,7 @@ You can test it by filling in one of the fields.`, children: [
1268
1286
  ] }
1269
1287
  ]
1270
1288
  }
1271
- ]), fi = {
1289
+ ]), wi = {
1272
1290
  // Both pre-loaded occurrences lack an add-order, so they render first in grouped order;
1273
1291
  // anything added afterwards appends below them in add-press order.
1274
1292
  timelineSection: {
@@ -1277,7 +1295,7 @@ You can test it by filling in one of the fields.`, children: [
1277
1295
  milestone: [{ title: "Loaded milestone", owner: "Ada" }]
1278
1296
  }
1279
1297
  }
1280
- }, Oi = h([
1298
+ }, ki = m([
1281
1299
  {
1282
1300
  name: "stepsSection",
1283
1301
  fieldOptions: { label: "Repeatable Explicit Choice (preserveOrder + displayOrder: added)" },
@@ -1293,7 +1311,7 @@ You can test it by filling in one of the fields.`, children: [
1293
1311
  ] }
1294
1312
  ]
1295
1313
  }
1296
- ]), gi = {
1314
+ ]), Ci = {
1297
1315
  // Neither pre-loaded occurrence carries "order"; the mount-time backfill assigns 1 and 2 from
1298
1316
  // their grouped position before any add-press can occur.
1299
1317
  stepsSection: {
@@ -1302,7 +1320,7 @@ You can test it by filling in one of the fields.`, children: [
1302
1320
  automated: [{ script: "deploy.sh" }]
1303
1321
  }
1304
1322
  }
1305
- }, yi = h([
1323
+ }, Ti = m([
1306
1324
  {
1307
1325
  name: "labelsSection",
1308
1326
  fieldOptions: { label: "preserveOrder With a Scalar-Leaf Branch (per-branch no-op)" },
@@ -1316,33 +1334,33 @@ You can test it by filling in one of the fields.`, children: [
1316
1334
  ] }
1317
1335
  ]
1318
1336
  }
1319
- ]), xi = {
1337
+ ]), Vi = {
1320
1338
  labelsSection: {
1321
1339
  items: {
1322
1340
  labelled: [{ label: "Has an order field" }],
1323
1341
  tag: ["plain-tag-no-order"]
1324
1342
  }
1325
1343
  }
1326
- }, vi = h([
1344
+ }, _i = m([
1327
1345
  {
1328
1346
  name: "ownValue",
1329
1347
  fieldOptions: { label: "Reacting to Own Value" },
1330
1348
  type: "heading",
1331
1349
  children: [
1332
1350
  { name: "charCounter", minOccurs: 0, restriction: { maxLength: 10 }, fieldOptions: { label: "Character counter" }, computedProps: [
1333
- (p, f) => {
1334
- const c = typeof f.value == "string" ? f.value.length : 0;
1335
- p.description = `${10 - c} character(s) remaining`;
1351
+ (u, h) => {
1352
+ const d = typeof h.value == "string" ? h.value.length : 0;
1353
+ u.description = `${10 - d} character(s) remaining`;
1336
1354
  }
1337
1355
  ] },
1338
1356
  { name: "selfHiding", minOccurs: 0, fieldOptions: { label: 'Type "hide" to hide me' }, computedProps: [
1339
- (p, f) => {
1340
- f.value === "hide" && (p.hidden = !0);
1357
+ (u, h) => {
1358
+ h.value === "hide" && (u.hidden = !0);
1341
1359
  }
1342
1360
  ] },
1343
1361
  { name: "selfDisabling", minOccurs: 0, fieldOptions: { label: 'Type "lock" to disable me' }, computedProps: [
1344
- (p, f) => {
1345
- f.value === "lock" && (p.disabled = !0);
1362
+ (u, h) => {
1363
+ h.value === "lock" && (u.disabled = !0);
1346
1364
  }
1347
1365
  ] }
1348
1366
  ]
@@ -1353,9 +1371,9 @@ You can test it by filling in one of the fields.`, children: [
1353
1371
  type: "heading",
1354
1372
  computeOnChildValueChange: !0,
1355
1373
  computedProps: [
1356
- (p, f) => {
1357
- const u = Object.values(f.value ?? {}).filter((e) => e != null && e !== "").length;
1358
- p.description = `${u} of 3 fields filled in`;
1374
+ (u, h) => {
1375
+ const c = Object.values(h.value ?? {}).filter((e) => e != null && e !== "").length;
1376
+ u.description = `${c} of 3 fields filled in`;
1359
1377
  }
1360
1378
  ],
1361
1379
  children: [
@@ -1370,29 +1388,29 @@ You can test it by filling in one of the fields.`, children: [
1370
1388
  type: "heading",
1371
1389
  description: 'Each child hides itself when its value is "hide"; once every child is hidden the parent heading hides too.',
1372
1390
  computedProps: [
1373
- (p, f, c) => {
1374
- c.value.length > 0 && c.value.every((u) => u.hidden) && (p.hidden = !0);
1391
+ (u, h, d) => {
1392
+ d.value.length > 0 && d.value.every((c) => c.hidden) && (u.hidden = !0);
1375
1393
  }
1376
1394
  ],
1377
1395
  children: [
1378
1396
  { name: "childA", minOccurs: 0, fieldOptions: { label: 'Child A (type "hide")' }, computedProps: [
1379
- (p, f) => {
1380
- f.value === "hide" && (p.hidden = !0);
1397
+ (u, h) => {
1398
+ h.value === "hide" && (u.hidden = !0);
1381
1399
  }
1382
1400
  ] },
1383
1401
  { name: "childB", minOccurs: 0, fieldOptions: { label: 'Child B (type "hide")' }, computedProps: [
1384
- (p, f) => {
1385
- f.value === "hide" && (p.hidden = !0);
1402
+ (u, h) => {
1403
+ h.value === "hide" && (u.hidden = !0);
1386
1404
  }
1387
1405
  ] }
1388
1406
  ]
1389
1407
  }
1390
- ]), wi = {
1408
+ ]), Si = {
1391
1409
  // Values that stay visible/enabled (typing "hide"/"lock" would trigger the self-hiding demos).
1392
1410
  ownValue: { charCounter: "Counting", selfHiding: "still shown", selfDisabling: "still on" },
1393
1411
  progress: { first: "Filled one", second: "Filled two" },
1394
1412
  childFieldsDemo: { childA: "kept visible" }
1395
- }, ki = h([
1413
+ }, Wi = m([
1396
1414
  {
1397
1415
  name: "attributes",
1398
1416
  fieldOptions: { label: "Attributes" },
@@ -1418,7 +1436,7 @@ You can test it by filling in one of the fields.`, children: [
1418
1436
  { name: "complexValue", minOccurs: 0, fullWidth: !0, isComplexType: !0, description: "isComplexType without attributes: the value is stored as { value: ... }.", fieldOptions: { label: "isComplexType" } }
1419
1437
  ]
1420
1438
  }
1421
- ]), Ci = {
1439
+ ]), Fi = {
1422
1440
  attributes: {
1423
1441
  // A complex type stores its value plus each attribute under one object.
1424
1442
  nickname: { value: "Ace", lang: "en" },
@@ -1427,7 +1445,7 @@ You can test it by filling in one of the fields.`, children: [
1427
1445
  complexTypes: {
1428
1446
  complexValue: { value: "Wrapped in { value }" }
1429
1447
  }
1430
- }, Ti = h([
1448
+ }, $i = m([
1431
1449
  {
1432
1450
  name: "customValueProp",
1433
1451
  fieldOptions: { label: "Custom complexTypeValueProperty" },
@@ -1441,39 +1459,39 @@ You can test it by filling in one of the fields.`, children: [
1441
1459
  }
1442
1460
  ], {
1443
1461
  complexTypeValueProperty: "val"
1444
- }), Si = {
1462
+ }), Ai = {
1445
1463
  // The value lives under "val" (not "value") because of the complexTypeValueProperty setting.
1446
1464
  customValueProp: { title: { val: "Hello world", lang: "en" } }
1447
1465
  };
1448
- function I(p, f) {
1449
- return h([
1466
+ function J(u, h) {
1467
+ return m([
1450
1468
  {
1451
1469
  name: "timing",
1452
1470
  fieldOptions: { label: "Validation Timing" },
1453
1471
  type: "heading",
1454
- description: p,
1472
+ description: u,
1455
1473
  children: [
1456
1474
  { name: "requiredField", fieldOptions: { label: "Required field" } },
1457
1475
  { name: "maxLengthField", minOccurs: 0, restriction: { maxLength: 5 }, fieldOptions: { label: "maxLength 5" } }
1458
1476
  ]
1459
1477
  }
1460
- ], f);
1478
+ ], h);
1461
1479
  }
1462
- const _i = {
1480
+ const Bi = {
1463
1481
  timing: { requiredField: "Filled in", maxLengthField: "abc" }
1464
- }, Vi = I(
1482
+ }, Ni = J(
1465
1483
  "validateOnValueUpdate: false, validateWhenInError: false. Errors only appear on submit and stay unchanged while typing until the next submit.",
1466
1484
  { validateOnValueUpdate: !1, validateWhenInError: !1 }
1467
- ), Wi = I(
1485
+ ), Pi = J(
1468
1486
  "validateOnBlur: true, validateOnValueUpdate: false. Errors appear when leaving a field, not while typing.",
1469
1487
  { validateOnBlur: !0, validateOnValueUpdate: !1 }
1470
- ), Ai = I(
1488
+ ), qi = J(
1471
1489
  "validateOnValueUpdateAfterSubmit: true, validateOnValueUpdate: false. Typing does not validate until the first submit; after that every change validates.",
1472
1490
  { validateOnValueUpdateAfterSubmit: !0, validateOnValueUpdate: !1 }
1473
- ), Fi = I(
1491
+ ), Li = J(
1474
1492
  "validateOnValueUpdate: false, validateWhenInError: true. A field only starts live-validating once it is in error (after a submit).",
1475
1493
  { validateOnValueUpdate: !1, validateWhenInError: !0 }
1476
- ), $i = h([
1494
+ ), Ei = m([
1477
1495
  {
1478
1496
  name: "optionalMarkers",
1479
1497
  fieldOptions: { label: 'Show "(optional)" Instead of "*"' },
@@ -1486,9 +1504,9 @@ const _i = {
1486
1504
  }
1487
1505
  ], {
1488
1506
  showOptionalInsteadOfRequired: !0
1489
- }), Bi = {
1507
+ }), Ii = {
1490
1508
  optionalMarkers: { requiredField: "Required value", optionalField: "Optional value" }
1491
- }, Ni = h([
1509
+ }, zi = m([
1492
1510
  {
1493
1511
  name: "messages",
1494
1512
  fieldOptions: { label: "Custom Validation Messages" },
@@ -1506,9 +1524,9 @@ const _i = {
1506
1524
  maxLength: "Custom message: {field} must stay under {length} characters",
1507
1525
  minInclusive: "Custom message: {field} must be {min} or higher"
1508
1526
  }
1509
- }), Pi = {
1527
+ }), Ri = {
1510
1528
  messages: { requiredField: "Filled in", maxLengthField: "abcd", minInclusiveField: "15" }
1511
- }, qi = h(
1529
+ }, Ui = m(
1512
1530
  [{
1513
1531
  name: "items",
1514
1532
  type: "text",
@@ -1522,17 +1540,17 @@ const _i = {
1522
1540
  // validateWhenInError: true,
1523
1541
  // validateOnBlur: true,
1524
1542
  }
1525
- ), Li = {
1543
+ ), Di = {
1526
1544
  // Each repeatable item is a complex type: its text under "value" plus the lang attribute.
1527
1545
  items: [
1528
1546
  { value: "First item", lang: "en" },
1529
1547
  { value: "Second item", lang: "nl" }
1530
1548
  ]
1531
- }, N = [
1549
+ }, I = [
1532
1550
  { key: "starter", value: "Starter" },
1533
1551
  { key: "growth", value: "Growth" },
1534
1552
  { key: "enterprise", value: "Enterprise" }
1535
- ], Ei = h([{
1553
+ ], Ji = m([{
1536
1554
  name: "onboarding",
1537
1555
  wizard: !0,
1538
1556
  fieldOptions: { label: "Onboarding wizard (backward-only)" },
@@ -1551,7 +1569,7 @@ const _i = {
1551
1569
  type: "heading",
1552
1570
  fieldOptions: { label: "Plan" },
1553
1571
  children: [
1554
- { name: "planName", type: "select", fieldOptions: { label: "Plan (required)" }, options: N },
1572
+ { name: "planName", type: "select", fieldOptions: { label: "Plan (required)" }, options: I },
1555
1573
  { name: "seats", minOccurs: 0, fieldOptions: { label: "Seats (optional)" } }
1556
1574
  ]
1557
1575
  },
@@ -1564,13 +1582,13 @@ const _i = {
1564
1582
  ]
1565
1583
  }
1566
1584
  ]
1567
- }]), Ii = {
1585
+ }]), Gi = {
1568
1586
  onboarding: {
1569
1587
  company: { companyName: "Acme Corp", website: "https://acme.example" },
1570
1588
  plan: { planName: "growth", seats: "25" },
1571
1589
  review: { termsAccepted: !0 }
1572
1590
  }
1573
- }, zi = h([{
1591
+ }, ji = m([{
1574
1592
  name: "onboarding",
1575
1593
  wizard: { allowForwardJump: !0, validateOnJump: !1 },
1576
1594
  fieldOptions: { label: "Wizard with forward jumping" },
@@ -1585,7 +1603,7 @@ const _i = {
1585
1603
  name: "plan",
1586
1604
  type: "heading",
1587
1605
  fieldOptions: { label: "Plan" },
1588
- children: [{ name: "planName", type: "select", fieldOptions: { label: "Plan (required)" }, options: N }]
1606
+ children: [{ name: "planName", type: "select", fieldOptions: { label: "Plan (required)" }, options: I }]
1589
1607
  },
1590
1608
  {
1591
1609
  name: "review",
@@ -1594,13 +1612,13 @@ const _i = {
1594
1612
  children: [{ name: "termsAccepted", type: "checkbox", fieldOptions: { label: "I accept the terms (required)" } }]
1595
1613
  }
1596
1614
  ]
1597
- }]), Bt = {
1615
+ }]), Lt = {
1598
1616
  onboarding: {
1599
1617
  company: { companyName: "Acme Corp" },
1600
1618
  plan: { planName: "enterprise" },
1601
1619
  review: { termsAccepted: !0 }
1602
1620
  }
1603
- }, Ri = h([{
1621
+ }, Hi = m([{
1604
1622
  name: "onboarding",
1605
1623
  wizard: { allowForwardJump: !0, validateOnJump: !0 },
1606
1624
  fieldOptions: { label: "Wizard with validate-on-jump" },
@@ -1615,7 +1633,7 @@ const _i = {
1615
1633
  name: "plan",
1616
1634
  type: "heading",
1617
1635
  fieldOptions: { label: "Plan" },
1618
- children: [{ name: "planName", type: "select", fieldOptions: { label: "Plan (required)" }, options: N }]
1636
+ children: [{ name: "planName", type: "select", fieldOptions: { label: "Plan (required)" }, options: I }]
1619
1637
  },
1620
1638
  {
1621
1639
  name: "review",
@@ -1624,7 +1642,7 @@ const _i = {
1624
1642
  children: [{ name: "termsAccepted", type: "checkbox", fieldOptions: { label: "I accept the terms (required)" } }]
1625
1643
  }
1626
1644
  ]
1627
- }]), Ui = Bt, Di = h([{
1645
+ }]), Ki = Lt, Qi = m([{
1628
1646
  name: "onboarding",
1629
1647
  wizard: { allowForwardJump: !0 },
1630
1648
  fieldOptions: { label: "Wizard with group / array / choice / summary pages" },
@@ -1669,7 +1687,7 @@ const _i = {
1669
1687
  fieldOptions: { label: "Summary (field-less page)" }
1670
1688
  }
1671
1689
  ]
1672
- }]), Ji = {
1690
+ }]), Yi = {
1673
1691
  onboarding: {
1674
1692
  company: { companyName: "Acme Corp" },
1675
1693
  contacts: [
@@ -1678,7 +1696,7 @@ const _i = {
1678
1696
  ],
1679
1697
  launchApproach: { guidedRollout: { accountManager: "Alan Turing" } }
1680
1698
  }
1681
- }, Gi = h([{
1699
+ }, Zi = m([{
1682
1700
  name: "setupPath",
1683
1701
  explicitChoiceSelection: !0,
1684
1702
  fullWidth: !0,
@@ -1706,7 +1724,7 @@ const _i = {
1706
1724
  { name: "companyName", fieldOptions: { label: "Company name (required)" }, fullWidth: !0 }
1707
1725
  ] },
1708
1726
  { name: "plan", type: "heading", fieldOptions: { label: "Plan" }, children: [
1709
- { name: "planName", type: "select", fieldOptions: { label: "Plan (required)" }, options: N }
1727
+ { name: "planName", type: "select", fieldOptions: { label: "Plan (required)" }, options: I }
1710
1728
  ] },
1711
1729
  { name: "review", type: "heading", fieldOptions: { label: "Review" }, children: [
1712
1730
  { name: "termsAccepted", type: "checkbox", fieldOptions: { label: "Accept terms (required)" } }
@@ -1714,7 +1732,7 @@ const _i = {
1714
1732
  ]
1715
1733
  }
1716
1734
  ]
1717
- }]), ji = {
1735
+ }]), Xi = {
1718
1736
  setupPath: {
1719
1737
  guidedSetup: {
1720
1738
  company: { companyName: "Acme Corp" },
@@ -1722,7 +1740,7 @@ const _i = {
1722
1740
  review: { termsAccepted: !0 }
1723
1741
  }
1724
1742
  }
1725
- }, Hi = h([{
1743
+ }, Mi = m([{
1726
1744
  name: "teams",
1727
1745
  type: "heading",
1728
1746
  maxOccurs: 3,
@@ -1742,12 +1760,12 @@ const _i = {
1742
1760
  ] }
1743
1761
  ]
1744
1762
  }]
1745
- }]), Ki = {
1763
+ }]), ea = {
1746
1764
  teams: [
1747
1765
  { setup: { team: { teamName: "Platform" }, lead: { leadName: "Ada Lovelace" } } },
1748
1766
  { setup: { team: { teamName: "Growth" }, lead: { leadName: "Grace Hopper" } } }
1749
1767
  ]
1750
- }, Qi = h([{
1768
+ }, ta = m([{
1751
1769
  name: "onboarding",
1752
1770
  wizard: { allowForwardJump: !0 },
1753
1771
  fieldOptions: { label: "Wizard: v-show vs v-if and keepValuesOnUnmount" },
@@ -1765,12 +1783,12 @@ const _i = {
1765
1783
  children: [{ name: "planName", minOccurs: 1, fieldOptions: { label: "Plan name" }, fullWidth: !0 }]
1766
1784
  }
1767
1785
  ]
1768
- }]), Yi = {
1786
+ }]), ia = {
1769
1787
  onboarding: {
1770
1788
  company: { companyName: "Acme Corp" },
1771
1789
  plan: { planName: "Growth" }
1772
1790
  }
1773
- }, Zi = h([{
1791
+ }, aa = m([{
1774
1792
  name: "registration",
1775
1793
  type: "heading",
1776
1794
  minOccurs: 0,
@@ -1795,18 +1813,18 @@ const _i = {
1795
1813
  type: "heading",
1796
1814
  fieldOptions: { label: "Plan" },
1797
1815
  children: [
1798
- { name: "planName", type: "select", fieldOptions: { label: "Plan (required once the section has a value)" }, options: N }
1816
+ { name: "planName", type: "select", fieldOptions: { label: "Plan (required once the section has a value)" }, options: I }
1799
1817
  ]
1800
1818
  }
1801
1819
  ]
1802
1820
  }]
1803
- }]), Xi = {
1821
+ }]), la = {
1804
1822
  registration: {
1805
1823
  onboarding: {
1806
1824
  company: { companyName: "Acme Corp" }
1807
1825
  }
1808
1826
  }
1809
- }, Mi = h([{
1827
+ }, na = m([{
1810
1828
  name: "archived",
1811
1829
  type: "heading",
1812
1830
  maxOccurs: 0,
@@ -1831,12 +1849,12 @@ const _i = {
1831
1849
  type: "heading",
1832
1850
  fieldOptions: { label: "Plan" },
1833
1851
  children: [
1834
- { name: "planName", type: "select", fieldOptions: { label: "Plan" }, options: N }
1852
+ { name: "planName", type: "select", fieldOptions: { label: "Plan" }, options: I }
1835
1853
  ]
1836
1854
  }
1837
1855
  ]
1838
1856
  }]
1839
- }]), ea = {
1857
+ }]), sa = {
1840
1858
  archived: {
1841
1859
  onboarding: {
1842
1860
  company: { companyName: "Acme Corp", website: "https://acme.example" },
@@ -1844,8 +1862,8 @@ const _i = {
1844
1862
  }
1845
1863
  }
1846
1864
  };
1847
- function h(p, f, c = {}) {
1848
- return Q(q({
1865
+ function m(u, h, d = {}) {
1866
+ return X(E({
1849
1867
  // Overridable at runtime so a Storybook control can flip a case between empty and pre-filled
1850
1868
  // without a second component; an unset prop falls back to the baked testCaseConfig/settings.
1851
1869
  props: {
@@ -1855,22 +1873,22 @@ function h(p, f, c = {}) {
1855
1873
  settings: { type: Object, default: void 0 },
1856
1874
  keepValuesOnUnmount: { type: Boolean, default: void 0 }
1857
1875
  },
1858
- setup: (u) => () => Y(D, {
1859
- metadata: p,
1860
- settings: u.settings ?? f,
1876
+ setup: (c) => () => M(G, {
1877
+ metadata: u,
1878
+ settings: c.settings ?? h,
1861
1879
  showDebugState: !0,
1862
- initialValues: u.initialValues ?? c.initialValues,
1863
- initialEdit: u.initialEdit ?? c.initialEdit,
1864
- hideFieldsWithoutValue: u.hideFieldsWithoutValue ?? c.hideFieldsWithoutValue,
1865
- keepValuesOnUnmount: u.keepValuesOnUnmount
1880
+ initialValues: c.initialValues ?? d.initialValues,
1881
+ initialEdit: c.initialEdit ?? d.initialEdit,
1882
+ hideFieldsWithoutValue: c.hideFieldsWithoutValue ?? d.hideFieldsWithoutValue,
1883
+ keepValuesOnUnmount: c.keepValuesOnUnmount
1866
1884
  })
1867
1885
  }));
1868
1886
  }
1869
- const Nt = { class: "flex flex-col gap-4" }, Pt = { class: "flex gap-6 flex-wrap" }, qt = { class: "flex items-center gap-2" }, Lt = { class: "flex items-center gap-2" }, ta = /* @__PURE__ */ q({
1887
+ const Et = { class: "flex flex-col gap-4" }, It = { class: "flex gap-6 flex-wrap" }, zt = { class: "flex items-center gap-2" }, Rt = { class: "flex items-center gap-2" }, oa = /* @__PURE__ */ E({
1870
1888
  __name: "KeepValuesOnUnmountTestCase",
1871
- setup(p) {
1872
- const f = P(!0), c = P(!1), u = L(() => [
1873
- ...f.value ? [{
1889
+ setup(u) {
1890
+ const h = L(!0), d = L(!1), c = U(() => [
1891
+ ...h.value ? [{
1874
1892
  name: "contact",
1875
1893
  fieldOptions: { label: "Contact (complex field with an attribute)" },
1876
1894
  minOccurs: 0,
@@ -1890,109 +1908,161 @@ const Nt = { class: "flex flex-col gap-4" }, Pt = { class: "flex gap-6 flex-wrap
1890
1908
  }] : [],
1891
1909
  { name: "note", fieldOptions: { label: "Sibling field (always mounted)" }, minOccurs: 0, fullWidth: !0 }
1892
1910
  ]);
1893
- return (e, l) => (t(), i("div", Nt, [
1894
- a("div", Pt, [
1895
- a("label", qt, [
1896
- B(a("input", {
1897
- "onUpdate:modelValue": l[0] || (l[0] = (s) => f.value = s),
1911
+ return (e, l) => (t(), i("div", Et, [
1912
+ a("div", It, [
1913
+ a("label", zt, [
1914
+ N(a("input", {
1915
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => h.value = r),
1898
1916
  type: "checkbox",
1899
1917
  "data-testid": "toggle-show-contact"
1900
1918
  }, null, 512), [
1901
- [z, f.value]
1919
+ [D, h.value]
1902
1920
  ]),
1903
- l[2] || (l[2] = w(" Show contact field (v-if unmount) ", -1))
1921
+ l[2] || (l[2] = x(" Show contact field (v-if unmount) ", -1))
1904
1922
  ]),
1905
- a("label", Lt, [
1906
- B(a("input", {
1907
- "onUpdate:modelValue": l[1] || (l[1] = (s) => c.value = s),
1923
+ a("label", Rt, [
1924
+ N(a("input", {
1925
+ "onUpdate:modelValue": l[1] || (l[1] = (r) => d.value = r),
1908
1926
  type: "checkbox",
1909
1927
  "data-testid": "toggle-keep-values-on-unmount"
1910
1928
  }, null, 512), [
1911
- [z, c.value]
1929
+ [D, d.value]
1912
1930
  ]),
1913
- l[3] || (l[3] = w(" keepValuesOnUnmount ", -1))
1931
+ l[3] || (l[3] = x(" keepValuesOnUnmount ", -1))
1914
1932
  ])
1915
1933
  ]),
1916
- E(D, {
1917
- metadata: u.value,
1918
- "keep-values-on-unmount": c.value,
1934
+ R(G, {
1935
+ metadata: c.value,
1936
+ "keep-values-on-unmount": d.value,
1919
1937
  "show-debug-state": ""
1920
1938
  }, null, 8, ["metadata", "keep-values-on-unmount"])
1921
1939
  ]));
1922
1940
  }
1941
+ }), Ut = { class: "flex flex-col gap-4" }, Dt = { class: "flex items-center gap-4 flex-wrap" }, Jt = { class: "flex items-center gap-2" }, da = /* @__PURE__ */ E({
1942
+ __name: "ProgrammaticWritesTestCase",
1943
+ setup(u) {
1944
+ const h = ee("form"), d = L(!1), c = [
1945
+ { name: "code", fieldOptions: { label: "Code (required, maxLength 5)" }, restriction: { maxLength: 5 }, fullWidth: !0 },
1946
+ { name: "quantity", fieldOptions: { label: "Quantity (at most 10)" }, minOccurs: 0, restriction: { maxInclusive: 10 }, fullWidth: !0 },
1947
+ { name: "tags", fieldOptions: { label: "Tags (at least 2 items)" }, minOccurs: 2, maxOccurs: 4, fullWidth: !0 }
1948
+ ], e = {
1949
+ code: "far too long for five",
1950
+ quantity: "42",
1951
+ tags: ["only one"]
1952
+ };
1953
+ function l() {
1954
+ h.value?.setFieldValue("code", e.code, d.value);
1955
+ }
1956
+ function r() {
1957
+ h.value?.setValues({ ...e }, d.value);
1958
+ }
1959
+ return (p, s) => (t(), i("div", Ut, [
1960
+ a("div", Dt, [
1961
+ a("button", {
1962
+ type: "button",
1963
+ class: "cursor-pointer bg-gray-200 text-black px-4 py-2 rounded",
1964
+ "data-testid": "set-field-value",
1965
+ onClick: l
1966
+ }, " setFieldValue('code', ...) "),
1967
+ a("button", {
1968
+ type: "button",
1969
+ class: "cursor-pointer bg-gray-200 text-black px-4 py-2 rounded",
1970
+ "data-testid": "set-values",
1971
+ onClick: r
1972
+ }, " setValues({ ... }) "),
1973
+ a("label", Jt, [
1974
+ N(a("input", {
1975
+ "onUpdate:modelValue": s[0] || (s[0] = (f) => d.value = f),
1976
+ type: "checkbox",
1977
+ "data-testid": "toggle-should-validate"
1978
+ }, null, 512), [
1979
+ [D, d.value]
1980
+ ]),
1981
+ s[1] || (s[1] = x(" shouldValidate ", -1))
1982
+ ])
1983
+ ]),
1984
+ R(G, {
1985
+ ref_key: "form",
1986
+ ref: h,
1987
+ metadata: c,
1988
+ "show-debug-state": ""
1989
+ }, null, 512)
1990
+ ]));
1991
+ }
1923
1992
  });
1924
1993
  export {
1925
- ta as KeepValuesOnUnmountTestCase,
1926
- St as TestFormTemplate,
1927
- li as arrayMaxOccursSampleValues,
1928
- ai as arrayMaxOccursTestCase,
1929
- ii as arrayOccurrenceSampleValues,
1930
- ti as arrayOccurrenceTestCase,
1931
- Jt as arraySampleValues,
1932
- Dt as arrayTestCase,
1933
- Ci as attributesSampleValues,
1934
- ki as attributesTestCase,
1935
- Yt as childFieldsSampleValues,
1936
- Qt as childFieldsTestCase,
1937
- fi as choiceDisplayOrderAddedSampleValues,
1938
- bi as choiceDisplayOrderAddedTestCase,
1939
- di as choiceMaxOccursSampleValues,
1940
- oi as choiceMaxOccursTestCase,
1941
- si as choiceOccurrenceSampleValues,
1942
- ni as choiceOccurrenceTestCase,
1943
- ji as choiceOfWizardsSampleValues,
1944
- Gi as choiceOfWizardsTestCase,
1945
- gi as choicePreserveOrderSampleValues,
1946
- xi as choicePreserveOrderScalarBranchSampleValues,
1947
- yi as choicePreserveOrderScalarBranchTestCase,
1948
- Oi as choicePreserveOrderTestCase,
1949
- Kt as choiceSampleValues,
1950
- Ht as choiceTestCase,
1951
- Si as complexTypeValuePropertySampleValues,
1952
- Ti as complexTypeValuePropertyTestCase,
1953
- wi as computedPropsSampleValues,
1954
- vi as computedPropsTestCase,
1955
- h as createTestCase,
1956
- Pi as customMessagesSampleValues,
1957
- Ni as customMessagesTestCase,
1958
- Ut as defaultSampleValues,
1959
- Rt as defaultTestCase,
1960
- ci as explicitChoiceSampleValues,
1961
- ri as explicitChoiceTestCase,
1962
- hi as explicitRepeatableChoiceSampleValues,
1963
- mi as explicitRepeatableChoiceTestCase,
1964
- jt as groupSampleValues,
1965
- Gt as groupTestCase,
1966
- Li as individualSampleValues,
1967
- qi as individualTestCase,
1968
- Xt as inputTypesSampleValues,
1969
- Zt as inputTypesTestCase,
1970
- pi as preserveOnSwitchSampleValues,
1971
- ui as preserveOnSwitchTestCase,
1972
- Ki as repeatedWizardSampleValues,
1973
- Hi as repeatedWizardTestCase,
1974
- ei as restrictionsSampleValues,
1975
- Mt as restrictionsTestCase,
1976
- Bi as showOptionalInsteadOfRequiredSampleValues,
1977
- $i as showOptionalInsteadOfRequiredTestCase,
1978
- Ai as validateAfterSubmitTestCase,
1979
- Wi as validateOnBlurTestCase,
1980
- Vi as validateOnSubmitOnlyTestCase,
1981
- Fi as validateWhenInErrorTestCase,
1982
- _i as validationTimingSampleValues,
1983
- Ji as wizardCompositePagesSampleValues,
1984
- Di as wizardCompositePagesTestCase,
1985
- ea as wizardDisabledAncestorSampleValues,
1986
- Mi as wizardDisabledAncestorTestCase,
1987
- Bt as wizardForwardJumpSampleValues,
1988
- zi as wizardForwardJumpTestCase,
1989
- Yi as wizardKeepValuesSampleValues,
1990
- Qi as wizardKeepValuesTestCase,
1991
- Xi as wizardOptionalAncestorSampleValues,
1992
- Zi as wizardOptionalAncestorTestCase,
1993
- Ii as wizardSampleValues,
1994
- Ei as wizardTestCase,
1995
- Ui as wizardValidateOnJumpSampleValues,
1996
- Ri as wizardValidateOnJumpTestCase
1994
+ oa as KeepValuesOnUnmountTestCase,
1995
+ da as ProgrammaticWritesTestCase,
1996
+ Ft as TestFormTemplate,
1997
+ ci as arrayMaxOccursSampleValues,
1998
+ ri as arrayMaxOccursTestCase,
1999
+ di as arrayOccurrenceSampleValues,
2000
+ oi as arrayOccurrenceTestCase,
2001
+ Yt as arraySampleValues,
2002
+ Qt as arrayTestCase,
2003
+ Fi as attributesSampleValues,
2004
+ Wi as attributesTestCase,
2005
+ ii as childFieldsSampleValues,
2006
+ ti as childFieldsTestCase,
2007
+ wi as choiceDisplayOrderAddedSampleValues,
2008
+ vi as choiceDisplayOrderAddedTestCase,
2009
+ hi as choiceMaxOccursSampleValues,
2010
+ mi as choiceMaxOccursTestCase,
2011
+ pi as choiceOccurrenceSampleValues,
2012
+ ui as choiceOccurrenceTestCase,
2013
+ Xi as choiceOfWizardsSampleValues,
2014
+ Zi as choiceOfWizardsTestCase,
2015
+ Ci as choicePreserveOrderSampleValues,
2016
+ Vi as choicePreserveOrderScalarBranchSampleValues,
2017
+ Ti as choicePreserveOrderScalarBranchTestCase,
2018
+ ki as choicePreserveOrderTestCase,
2019
+ ei as choiceSampleValues,
2020
+ Mt as choiceTestCase,
2021
+ Ai as complexTypeValuePropertySampleValues,
2022
+ $i as complexTypeValuePropertyTestCase,
2023
+ Si as computedPropsSampleValues,
2024
+ _i as computedPropsTestCase,
2025
+ m as createTestCase,
2026
+ Ri as customMessagesSampleValues,
2027
+ zi as customMessagesTestCase,
2028
+ Kt as defaultSampleValues,
2029
+ Ht as defaultTestCase,
2030
+ fi as explicitChoiceSampleValues,
2031
+ bi as explicitChoiceTestCase,
2032
+ xi as explicitRepeatableChoiceSampleValues,
2033
+ yi as explicitRepeatableChoiceTestCase,
2034
+ Xt as groupSampleValues,
2035
+ Zt as groupTestCase,
2036
+ Di as individualSampleValues,
2037
+ Ui as individualTestCase,
2038
+ li as inputTypesSampleValues,
2039
+ ai as inputTypesTestCase,
2040
+ gi as preserveOnSwitchSampleValues,
2041
+ Oi as preserveOnSwitchTestCase,
2042
+ ea as repeatedWizardSampleValues,
2043
+ Mi as repeatedWizardTestCase,
2044
+ si as restrictionsSampleValues,
2045
+ ni as restrictionsTestCase,
2046
+ Ii as showOptionalInsteadOfRequiredSampleValues,
2047
+ Ei as showOptionalInsteadOfRequiredTestCase,
2048
+ qi as validateAfterSubmitTestCase,
2049
+ Pi as validateOnBlurTestCase,
2050
+ Ni as validateOnSubmitOnlyTestCase,
2051
+ Li as validateWhenInErrorTestCase,
2052
+ Bi as validationTimingSampleValues,
2053
+ Yi as wizardCompositePagesSampleValues,
2054
+ Qi as wizardCompositePagesTestCase,
2055
+ sa as wizardDisabledAncestorSampleValues,
2056
+ na as wizardDisabledAncestorTestCase,
2057
+ Lt as wizardForwardJumpSampleValues,
2058
+ ji as wizardForwardJumpTestCase,
2059
+ ia as wizardKeepValuesSampleValues,
2060
+ ta as wizardKeepValuesTestCase,
2061
+ la as wizardOptionalAncestorSampleValues,
2062
+ aa as wizardOptionalAncestorTestCase,
2063
+ Gi as wizardSampleValues,
2064
+ Ji as wizardTestCase,
2065
+ Ki as wizardValidateOnJumpSampleValues,
2066
+ Hi as wizardValidateOnJumpTestCase
1997
2067
  };
1998
2068
  //# sourceMappingURL=examples.es.js.map