@harnessio/forms 0.5.0 → 0.6.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.
package/dist/index.js CHANGED
@@ -1,21 +1,21 @@
1
- var pe = Object.defineProperty;
2
- var ye = (r, e, n) => e in r ? pe(r, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[e] = n;
3
- var w = (r, e, n) => ye(r, typeof e != "symbol" ? e + "" : e, n);
4
- import { isEmpty as I, cloneDeep as q, set as g, get as _, forOwn as te, isArray as O, isObject as ne, merge as x, isUndefined as A, unset as se, pick as ge, isNull as ae, omitBy as oe, isNil as be, isString as ve, capitalize as _e } from "lodash-es";
5
- import Ee, { createContext as Te, useContext as Re, Component as Se, useMemo as D, useRef as M, useEffect as j, useCallback as Oe, forwardRef as je, Fragment as Ce } from "react";
6
- import { useFormContext as Ie, get as Ve, useForm as we, FormProvider as xe, appendErrors as Fe, useController as Pe } from "react-hook-form";
1
+ var ye = Object.defineProperty;
2
+ var ge = (r, e, n) => e in r ? ye(r, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[e] = n;
3
+ var x = (r, e, n) => ge(r, typeof e != "symbol" ? e + "" : e, n);
4
+ import { isEmpty as V, cloneDeep as A, set as g, get as E, forOwn as ne, isArray as j, isObject as se, merge as F, isUndefined as k, unset as ae, pick as be, isNull as oe, omitBy as ue, isNil as ve, isString as Ee, capitalize as _e } from "lodash-es";
5
+ import Te, { createContext as Re, useContext as Se, Component as Oe, useMemo as M, useRef as Z, useEffect as C, useCallback as je, forwardRef as Ce, Fragment as Ie } from "react";
6
+ import { useFormContext as Ve, get as we, useForm as xe, FormProvider as Fe, appendErrors as Pe, useController as qe } from "react-hook-form";
7
7
  export * from "react-hook-form";
8
- import * as d from "zod";
9
- import { toNestErrors as qe } from "@hookform/resolvers";
10
- class Ae extends Error {
8
+ import * as l from "zod";
9
+ import { toNestErrors as Ae } from "@hookform/resolvers";
10
+ class ke extends Error {
11
11
  constructor(e) {
12
12
  super(`Input component '${e}' is already registered.`);
13
13
  }
14
14
  }
15
- class ue {
15
+ class ie {
16
16
  constructor(e) {
17
- w(this, "componentBank");
18
- w(this, "allowOverride");
17
+ x(this, "componentBank");
18
+ x(this, "allowOverride");
19
19
  this.allowOverride = (e == null ? void 0 : e.allowOverride) ?? !1, this.componentBank = /* @__PURE__ */ new Map();
20
20
  }
21
21
  /**
@@ -26,11 +26,11 @@ class ue {
26
26
  */
27
27
  registerComponent(e) {
28
28
  if (!this.allowOverride && this.getComponent(e.internalType))
29
- throw new Ae(e.internalType);
29
+ throw new ke(e.internalType);
30
30
  this.componentBank.set(e.internalType, e);
31
31
  }
32
32
  getComponent(e) {
33
- if (e && !I(e))
33
+ if (e && !V(e))
34
34
  return this.componentBank.get(e);
35
35
  }
36
36
  /**
@@ -47,7 +47,7 @@ class ue {
47
47
  * @returns new input factory
48
48
  */
49
49
  clone() {
50
- const e = new ue({
50
+ const e = new ie({
51
51
  allowOverride: this.allowOverride
52
52
  });
53
53
  return this.listRegisteredComponents().forEach((n) => {
@@ -55,16 +55,16 @@ class ue {
55
55
  }), e;
56
56
  }
57
57
  }
58
- var Z = { exports: {} }, S = {};
58
+ var $ = { exports: {} }, O = {};
59
59
  /*
60
60
  object-assign
61
61
  (c) Sindre Sorhus
62
62
  @license MIT
63
63
  */
64
- var $, X;
65
- function ke() {
66
- if (X) return $;
67
- X = 1;
64
+ var B, Y;
65
+ function Ne() {
66
+ if (Y) return B;
67
+ Y = 1;
68
68
  var r = Object.getOwnPropertySymbols, e = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
69
69
  function t(s) {
70
70
  if (s == null)
@@ -80,32 +80,32 @@ function ke() {
80
80
  return !1;
81
81
  for (var i = {}, o = 0; o < 10; o++)
82
82
  i["_" + String.fromCharCode(o)] = o;
83
- var u = Object.getOwnPropertyNames(i).map(function(l) {
84
- return i[l];
83
+ var u = Object.getOwnPropertyNames(i).map(function(f) {
84
+ return i[f];
85
85
  });
86
86
  if (u.join("") !== "0123456789")
87
87
  return !1;
88
88
  var c = {};
89
- return "abcdefghijklmnopqrst".split("").forEach(function(l) {
90
- c[l] = l;
89
+ return "abcdefghijklmnopqrst".split("").forEach(function(f) {
90
+ c[f] = f;
91
91
  }), Object.keys(Object.assign({}, c)).join("") === "abcdefghijklmnopqrst";
92
92
  } catch {
93
93
  return !1;
94
94
  }
95
95
  }
96
- return $ = a() ? Object.assign : function(s, i) {
97
- for (var o, u = t(s), c, l = 1; l < arguments.length; l++) {
98
- o = Object(arguments[l]);
96
+ return B = a() ? Object.assign : function(s, i) {
97
+ for (var o, u = t(s), c, f = 1; f < arguments.length; f++) {
98
+ o = Object(arguments[f]);
99
99
  for (var m in o)
100
100
  e.call(o, m) && (u[m] = o[m]);
101
101
  if (r) {
102
102
  c = r(o);
103
- for (var f = 0; f < c.length; f++)
104
- n.call(o, c[f]) && (u[c[f]] = o[c[f]]);
103
+ for (var d = 0; d < c.length; d++)
104
+ n.call(o, c[d]) && (u[c[d]] = o[c[d]]);
105
105
  }
106
106
  }
107
107
  return u;
108
- }, $;
108
+ }, B;
109
109
  }
110
110
  /** @license React v17.0.2
111
111
  * react-jsx-runtime.production.min.js
@@ -115,73 +115,76 @@ function ke() {
115
115
  * This source code is licensed under the MIT license found in the
116
116
  * LICENSE file in the root directory of this source tree.
117
117
  */
118
- var Y;
119
- function Ne() {
120
- if (Y) return S;
121
- Y = 1, ke();
122
- var r = Ee, e = 60103;
123
- if (S.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
118
+ var K;
119
+ function De() {
120
+ if (K) return O;
121
+ K = 1, Ne();
122
+ var r = Te, e = 60103;
123
+ if (O.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
124
124
  var n = Symbol.for;
125
- e = n("react.element"), S.Fragment = n("react.fragment");
125
+ e = n("react.element"), O.Fragment = n("react.fragment");
126
126
  }
127
127
  var t = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = Object.prototype.hasOwnProperty, s = { key: !0, ref: !0, __self: !0, __source: !0 };
128
128
  function i(o, u, c) {
129
- var l, m = {}, f = null, p = null;
130
- c !== void 0 && (f = "" + c), u.key !== void 0 && (f = "" + u.key), u.ref !== void 0 && (p = u.ref);
131
- for (l in u) a.call(u, l) && !s.hasOwnProperty(l) && (m[l] = u[l]);
132
- if (o && o.defaultProps) for (l in u = o.defaultProps, u) m[l] === void 0 && (m[l] = u[l]);
133
- return { $$typeof: e, type: o, key: f, ref: p, props: m, _owner: t.current };
129
+ var f, m = {}, d = null, h = null;
130
+ c !== void 0 && (d = "" + c), u.key !== void 0 && (d = "" + u.key), u.ref !== void 0 && (h = u.ref);
131
+ for (f in u) a.call(u, f) && !s.hasOwnProperty(f) && (m[f] = u[f]);
132
+ if (o && o.defaultProps) for (f in u = o.defaultProps, u) m[f] === void 0 && (m[f] = u[f]);
133
+ return { $$typeof: e, type: o, key: d, ref: h, props: m, _owner: t.current };
134
134
  }
135
- return S.jsx = i, S.jsxs = i, S;
135
+ return O.jsx = i, O.jsxs = i, O;
136
136
  }
137
- var K;
138
- function De() {
139
- return K || (K = 1, Z.exports = Ne()), Z.exports;
137
+ var z;
138
+ function Me() {
139
+ return z || (z = 1, $.exports = De()), $.exports;
140
140
  }
141
- var h = De();
142
- const ie = Te({});
143
- function Me({
141
+ var p = Me();
142
+ const ce = Re({});
143
+ function Ze({
144
144
  children: r,
145
145
  metadata: e,
146
- readonly: n
146
+ inputErrorHandler: n,
147
+ readonly: t
147
148
  }) {
148
- return /* @__PURE__ */ h.jsx(
149
- ie.Provider,
149
+ return /* @__PURE__ */ p.jsx(
150
+ ce.Provider,
150
151
  {
151
152
  value: {
152
153
  metadata: e,
153
- readonly: n
154
+ readonly: t,
155
+ inputErrorHandler: n
154
156
  },
155
157
  children: r
156
158
  }
157
159
  );
158
160
  }
159
- function Ze() {
160
- const r = Re(ie);
161
+ function $e() {
162
+ const r = Se(ce);
161
163
  return r || console.warn("useRootFormContext must be used within RootFormProvider"), r;
162
164
  }
163
- class $e extends Se {
165
+ class Be extends Oe {
164
166
  constructor() {
165
167
  super(...arguments);
166
- w(this, "state", {
168
+ x(this, "state", {
167
169
  hasError: !1
168
170
  });
169
171
  }
170
172
  static getDerivedStateFromError() {
171
173
  return { hasError: !0 };
172
174
  }
173
- componentDidCatch(n, t) {
174
- console.error(`Form Input [${this.props.inputType}] has failed at path [${this.props.path}].`, n, t);
175
+ componentDidCatch() {
176
+ const n = new Error(`Form input [${this.props.inputType}] has failed at path [${this.props.path}].`);
177
+ this.props.inputErrorHandler ? this.props.inputErrorHandler(n) : console.error(n);
175
178
  }
176
179
  render() {
177
- return this.state.hasError ? /* @__PURE__ */ h.jsx(h.Fragment, {}) : this.props.children;
180
+ return this.state.hasError ? /* @__PURE__ */ p.jsx(p.Fragment, {}) : this.props.children;
178
181
  }
179
182
  }
180
- const z = ({
183
+ const ee = ({
181
184
  children: r,
182
185
  withoutWrapper: e = !1
183
- }) => e || !r ? r : /* @__PURE__ */ h.jsx("div", { children: r });
184
- function Be({
186
+ }) => e || !r ? r : /* @__PURE__ */ p.jsx("div", { children: r });
187
+ function Je({
185
188
  path: r,
186
189
  factory: e,
187
190
  onUpdate: n,
@@ -190,24 +193,24 @@ function Be({
190
193
  input: s,
191
194
  withoutWrapper: i = !1
192
195
  }) {
193
- var W;
194
- const { formState: o, watch: u } = Ie(), {
196
+ var H;
197
+ const { formState: o, watch: u } = Ve(), {
195
198
  fixedValues: c = {}
196
199
  /*getValuesWithDependencies*/
197
- } = {}, { metadata: l, readonly: m } = Ze(), f = e == null ? void 0 : e.getComponent(s.inputType), p = u(), b = q(p);
198
- c && Object.keys(c).forEach((V) => {
199
- const k = c[V];
200
- g(b, V, k);
200
+ } = {}, { metadata: f, readonly: m, inputErrorHandler: d } = $e(), h = e == null ? void 0 : e.getComponent(s.inputType), b = u(), y = A(b);
201
+ c && Object.keys(c).forEach((w) => {
202
+ const N = c[w];
203
+ g(y, w, N);
201
204
  });
202
- const y = !s.isVisible || s.isVisible(b, l);
203
- let T, E;
204
- y && (T = m || s.readonly, E = typeof s.disabled == "function" ? s.disabled(b, l) : s.disabled);
205
- const R = (W = s.warning) == null ? void 0 : W.schema, v = D(() => {
206
- var H, Q;
207
- if (!y || typeof R > "u") return;
208
- const V = Ve(p, s.path), k = typeof R == "function" ? R(b) : R, { success: he, error: N } = k.safeParse(V), G = (Q = (H = N == null ? void 0 : N.errors) == null ? void 0 : H[0]) == null ? void 0 : Q.message;
209
- return !he && G ? G : void 0;
210
- }, [s.path, p, R, y]), L = D(
205
+ const _ = !s.isVisible || s.isVisible(y, f);
206
+ let T, S;
207
+ _ && (T = m || s.readonly, S = typeof s.disabled == "function" ? s.disabled(y, f) : s.disabled);
208
+ const R = (H = s.warning) == null ? void 0 : H.schema, v = M(() => {
209
+ var Q, X;
210
+ if (!_ || typeof R > "u") return;
211
+ const w = we(b, s.path), N = typeof R == "function" ? R(y) : R, { success: pe, error: D } = N.safeParse(w), G = (X = (Q = D == null ? void 0 : D.errors) == null ? void 0 : Q[0]) == null ? void 0 : X.message;
212
+ return !pe && G ? G : void 0;
213
+ }, [s.path, b, R, _]), W = M(
211
214
  () => ({
212
215
  path: r,
213
216
  key: r,
@@ -217,27 +220,27 @@ function Be({
217
220
  factory: e,
218
221
  readonly: T,
219
222
  input: s,
220
- disabled: E,
223
+ disabled: S,
221
224
  warning: v
222
225
  }),
223
- [e, a, s, t, n, r, T, o.errors, E, v]
224
- ), me = D(() => y ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
226
+ [e, a, s, t, n, r, T, o.errors, S, v]
227
+ ), he = M(() => _ ? /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
225
228
  s.before ? s.before : null,
226
- /* @__PURE__ */ h.jsx($e, { path: r, inputType: s.inputType, children: f == null ? void 0 : f.renderComponent(L) }),
229
+ /* @__PURE__ */ p.jsx(Be, { path: r, inputType: s.inputType, inputErrorHandler: d, children: h == null ? void 0 : h.renderComponent(W) }),
227
230
  s.after ? s.after : null
228
- ] }) : null, [y, s.before, s.inputType, s.after, r, f, L, o.errors]);
229
- return f ? /* @__PURE__ */ h.jsx(z, { withoutWrapper: i, children: me }) : /* @__PURE__ */ h.jsx(z, { withoutWrapper: i, children: /* @__PURE__ */ h.jsxs("p", { children: [
231
+ ] }) : null, [_, s.before, s.inputType, s.after, r, h, W, o.errors]);
232
+ return h ? /* @__PURE__ */ p.jsx(ee, { withoutWrapper: i, children: he }) : /* @__PURE__ */ p.jsx(ee, { withoutWrapper: i, children: /* @__PURE__ */ p.jsxs("p", { children: [
230
233
  "Input component not found (internal type: ",
231
234
  s.inputType,
232
235
  ")"
233
236
  ] }) });
234
237
  }
235
- class ir {
238
+ class cr {
236
239
  getType() {
237
240
  return this.internalType;
238
241
  }
239
242
  }
240
- function cr(r) {
243
+ function fr(r) {
241
244
  const {
242
245
  mode: e = "onSubmit",
243
246
  resolver: n,
@@ -247,26 +250,27 @@ function cr(r) {
247
250
  onValuesChange: s,
248
251
  onValidationChange: i,
249
252
  onSubmit: o,
253
+ onInputRenderError: u,
250
254
  // validate,
251
255
  // validateDebounceInterval,
252
256
  // validationConfig,
253
- metadata: u,
254
- children: c,
257
+ metadata: c,
258
+ children: f,
255
259
  // fixedValues
256
- autoFocusPath: l,
257
- readonly: m
258
- } = r, f = we({
260
+ autoFocusPath: m,
261
+ readonly: d
262
+ } = r, h = xe({
259
263
  mode: e ?? "onSubmit",
260
264
  reValidateMode: "onChange",
261
265
  defaultValues: t,
262
266
  shouldFocusError: a,
263
267
  resolver: n
264
- }), p = M(!1);
265
- j(() => {
266
- f.reset(t, {});
267
- }, [f.reset, t]), j(() => {
268
+ }), b = Z(!1);
269
+ C(() => {
270
+ h.reset(t, {});
271
+ }, [h.reset, t]), C(() => {
268
272
  const v = requestIdleCallback(() => {
269
- f.reset({}, {
273
+ h.reset({}, {
270
274
  keepErrors: !0,
271
275
  keepDirty: !0,
272
276
  keepDirtyValues: !0,
@@ -281,88 +285,88 @@ function cr(r) {
281
285
  });
282
286
  return () => cancelIdleCallback(v);
283
287
  }, []);
284
- const { getValues: b, handleSubmit: y } = f, T = b(), E = M(!0);
285
- j(() => {
286
- if (E.current) {
287
- E.current = !1;
288
+ const { getValues: y, handleSubmit: _ } = h, T = y(), S = Z(!0);
289
+ C(() => {
290
+ if (S.current) {
291
+ S.current = !1;
288
292
  return;
289
293
  }
290
- s == null || s({ ...T }), p.current === !0 && f.trigger();
294
+ s == null || s({ ...T }), b.current === !0 && h.trigger();
291
295
  }, [JSON.stringify(T)]);
292
- const R = M(!0);
293
- return j(() => {
296
+ const R = Z(!0);
297
+ return C(() => {
294
298
  if (R.current) {
295
299
  R.current = !1;
296
300
  return;
297
301
  }
298
- i == null || i({ isValid: f.formState.isValid, isSubmitted: f.formState.isSubmitted });
299
- }, [f.formState.isValid, f.formState.isSubmitted]), j(() => {
300
- if (l)
302
+ i == null || i({ isValid: h.formState.isValid, isSubmitted: h.formState.isSubmitted });
303
+ }, [h.formState.isValid, h.formState.isSubmitted]), C(() => {
304
+ if (m)
301
305
  if ("requestIdleCallback" in window) {
302
306
  const v = requestIdleCallback(() => {
303
- f.setFocus(l);
307
+ h.setFocus(m);
304
308
  });
305
309
  return () => cancelIdleCallback(v);
306
310
  } else {
307
311
  const v = setTimeout(() => {
308
- f.setFocus(l);
312
+ h.setFocus(m);
309
313
  }, 100);
310
314
  return () => clearTimeout(v);
311
315
  }
312
- }, [f]), /* @__PURE__ */ h.jsx(Me, { metadata: u, readonly: m, children: /* @__PURE__ */ h.jsx(xe, { ...f, children: typeof c == "function" ? c({
313
- ...f,
316
+ }, [h]), /* @__PURE__ */ p.jsx(Ze, { metadata: c, readonly: d, inputErrorHandler: u, children: /* @__PURE__ */ p.jsx(Fe, { ...h, children: typeof f == "function" ? f({
317
+ ...h,
314
318
  submitForm: async () => {
315
- o && (p.current = !0, y((v) => {
319
+ o && (b.current = !0, _((v) => {
316
320
  o(v);
317
321
  })());
318
322
  }
319
- }) : c }) });
323
+ }) : f }) });
320
324
  }
321
- const fr = (r) => {
325
+ const lr = (r) => {
322
326
  const e = {}, n = (t) => {
323
327
  t.forEach((a) => {
324
328
  const { path: s, default: i, inputType: o, inputs: u } = a;
325
- (o === "group" || o === "accordion") && Array.isArray(u) ? n(u) : _(e, s) === void 0 && g(e, s, i);
329
+ (o === "group" || o === "accordion") && Array.isArray(u) ? n(u) : E(e, s) === void 0 && g(e, s, i);
326
330
  });
327
331
  };
328
332
  return Array.isArray(r.inputs) && n(r.inputs), e;
329
333
  };
330
- function lr(r, e) {
334
+ function dr(r, e) {
331
335
  const n = r.inputs.map((t) => {
332
- const a = Je(e, t.path);
336
+ const a = Ue(e, t.path);
333
337
  return a || t;
334
338
  });
335
339
  return { ...r, inputs: n };
336
340
  }
337
- function Je(r, e) {
341
+ function Ue(r, e) {
338
342
  return r.inputs.find((n) => n.path === e);
339
343
  }
340
- const ce = "__temp_", dr = (r) => ce + r.split(".").join("__");
341
- function Ue(r) {
344
+ const fe = "__temp_", mr = (r) => fe + r.split(".").join("__");
345
+ function Le(r) {
342
346
  const e = { ...r };
343
- return te(e, (n, t) => {
344
- t.startsWith(ce) && delete e[t];
347
+ return ne(e, (n, t) => {
348
+ t.startsWith(fe) && delete e[t];
345
349
  }), e;
346
350
  }
347
- const Le = "Required field";
348
- function C(r) {
351
+ const We = "Required field";
352
+ function I(r) {
349
353
  const e = typeof r == "string" ? JSON.parse(r) : r;
350
354
  if (typeof e == "string")
351
355
  return e;
352
- if (O(e))
353
- return C(e[0]);
356
+ if (j(e))
357
+ return I(e[0]);
354
358
  const n = e;
355
- return ne(n) && (n != null && n.message) ? e == null ? void 0 : e.message : "Unknown error";
359
+ return se(n) && (n != null && n.message) ? e == null ? void 0 : e.message : "Unknown error";
356
360
  }
357
- function We(r, e, n) {
361
+ function He(r, e, n) {
358
362
  let t = {};
359
- if (P(t, r.inputs, e, n), n != null && n.prefix) {
363
+ if (q(t, r.inputs, e, n), n != null && n.prefix) {
360
364
  const s = n == null ? void 0 : n.prefix.replace(/.$/, "");
361
365
  t = g({}, s, t);
362
366
  }
363
- return d.object(F(t, e, n));
367
+ return l.object(P(t, e, n));
364
368
  }
365
- function F(r, e, n) {
369
+ function P(r, e, n) {
366
370
  const t = {};
367
371
  return Object.keys(r).forEach((a) => {
368
372
  const {
@@ -371,31 +375,31 @@ function F(r, e, n) {
371
375
  _input: o,
372
376
  _isList: u,
373
377
  _isArrayItem: c,
374
- _schema: l
378
+ _schema: f
375
379
  /*...nestedSchemaObj*/
376
380
  } = r[a];
377
381
  if (u && i && o) {
378
- const m = d.array(d.object(F(i, e, n))).optional(), f = ee(l, o, e, n, m);
379
- t[a] = f;
382
+ const m = l.array(l.object(P(i, e, n))).optional(), d = re(f, o, e, n, m);
383
+ t[a] = d;
380
384
  } else if (c && o) {
381
- const m = i != null && i.___array ? F({ ___array: i.___array }, e, n) : { ___array: d.any() }, f = Ge(m, o, n), p = ee(l, o, e, n, f);
382
- t[a] = p;
383
- } else if (l && o) {
384
- const m = He(l, o, e, n);
385
+ const m = i != null && i.___array ? P({ ___array: i.___array }, e, n) : { ___array: l.any() }, d = Ge(m, o, n), h = re(f, o, e, n, d);
386
+ t[a] = h;
387
+ } else if (f && o) {
388
+ const m = Qe(f, o, e, n);
385
389
  t[a] = m;
386
- } else s && o ? t[a] = J(o, n) : t[a] = d.object(F(r[a], e, n)).optional();
390
+ } else s && o ? t[a] = U(o, n) : t[a] = l.object(P(r[a], e, n)).optional();
387
391
  }), t;
388
392
  }
389
393
  function Ge(r, e, n) {
390
- return d.union([
391
- d.array(r.___array).optional(),
392
- d.string().superRefine((t, a) => {
394
+ return l.union([
395
+ l.array(r.___array).optional(),
396
+ l.string().superRefine((t, a) => {
393
397
  var s;
394
398
  if ((s = n == null ? void 0 : n.validationConfig) != null && s.globalValidation) {
395
399
  const i = n.validationConfig.globalValidation(t, e, n.metadata);
396
400
  if (i.error)
397
401
  return a.addIssue({
398
- code: d.ZodIssueCode.custom,
402
+ code: l.ZodIssueCode.custom,
399
403
  message: i.error
400
404
  }), !1;
401
405
  if (!i.continue)
@@ -405,103 +409,103 @@ function Ge(r, e, n) {
405
409
  })
406
410
  ]);
407
411
  }
408
- function He(r, e, n, t) {
409
- return d.any().optional().superRefine(async (a, s) => {
412
+ function Qe(r, e, n, t) {
413
+ return l.any().optional().superRefine(async (a, s) => {
410
414
  var o, u;
411
- if (e.required && !(await J(e, t).safeParseAsync(a)).success)
415
+ if (e.required && !(await U(e, t).safeParseAsync(a)).success)
412
416
  return s.addIssue({
413
- code: d.ZodIssueCode.custom,
414
- message: B(e, t)
415
- }), d.NEVER;
417
+ code: l.ZodIssueCode.custom,
418
+ message: J(e, t)
419
+ }), l.NEVER;
416
420
  if ((o = t == null ? void 0 : t.validationConfig) != null && o.globalValidation) {
417
421
  const c = (u = t == null ? void 0 : t.validationConfig) == null ? void 0 : u.globalValidation(a, e, t.metadata);
418
422
  if (c.error)
419
423
  return s.addIssue({
420
- code: d.ZodIssueCode.custom,
424
+ code: l.ZodIssueCode.custom,
421
425
  message: c.error
422
- }), d.NEVER;
426
+ }), l.NEVER;
423
427
  if (!c.continue)
424
428
  return !0;
425
429
  }
426
- const i = fe(r, n);
430
+ const i = le(r, n);
427
431
  if (i) {
428
432
  const c = await i.safeParseAsync(a);
429
433
  if (!c.success) {
430
- const l = C(c == null ? void 0 : c.error.message), m = l === "Required" ? B(e, t) : l;
434
+ const f = I(c == null ? void 0 : c.error.message), m = f === "Required" ? J(e, t) : f;
431
435
  s.addIssue({
432
- code: d.ZodIssueCode.custom,
436
+ code: l.ZodIssueCode.custom,
433
437
  message: m
434
438
  });
435
439
  }
436
440
  }
437
441
  });
438
442
  }
439
- function ee(r, e, n, t, a) {
440
- return d.any().optional().superRefine(async (s, i) => {
441
- var l, m;
442
- const u = await J(e, t).safeParseAsync(s);
443
+ function re(r, e, n, t, a) {
444
+ return l.any().optional().superRefine(async (s, i) => {
445
+ var f, m;
446
+ const u = await U(e, t).safeParseAsync(s);
443
447
  if (e.required && !u.success) {
444
- const f = C(u.error.message);
445
- return i.addIssue({ code: d.ZodIssueCode.custom, message: f, fatal: !0 }), d.NEVER;
448
+ const d = I(u.error.message);
449
+ return i.addIssue({ code: l.ZodIssueCode.custom, message: d, fatal: !0 }), l.NEVER;
446
450
  }
447
451
  if (!e.required && !u.success)
448
- return d.NEVER;
449
- if ((l = t == null ? void 0 : t.validationConfig) != null && l.globalValidation) {
450
- const f = (m = t == null ? void 0 : t.validationConfig) == null ? void 0 : m.globalValidation(s, e, t.metadata);
451
- if (f.error)
452
+ return l.NEVER;
453
+ if ((f = t == null ? void 0 : t.validationConfig) != null && f.globalValidation) {
454
+ const d = (m = t == null ? void 0 : t.validationConfig) == null ? void 0 : m.globalValidation(s, e, t.metadata);
455
+ if (d.error)
452
456
  return i.addIssue({
453
- code: d.ZodIssueCode.custom,
454
- message: C(f.error)
455
- }), d.NEVER;
456
- if (!f.continue)
457
- return d.NEVER;
457
+ code: l.ZodIssueCode.custom,
458
+ message: I(d.error)
459
+ }), l.NEVER;
460
+ if (!d.continue)
461
+ return l.NEVER;
458
462
  }
459
- if (!O(s))
463
+ if (!j(s))
460
464
  return i.addIssue({
461
- code: d.ZodIssueCode.custom,
465
+ code: l.ZodIssueCode.custom,
462
466
  message: "'Value is not array'"
463
- }), d.NEVER;
464
- const c = fe(r, n);
467
+ }), l.NEVER;
468
+ const c = le(r, n);
465
469
  if (c) {
466
- const f = await c.safeParseAsync(s);
467
- if (!f.success)
470
+ const d = await c.safeParseAsync(s);
471
+ if (!d.success)
468
472
  return i.addIssue({
469
- code: d.ZodIssueCode.custom,
470
- message: C(f.error.message)
471
- }), d.NEVER;
473
+ code: l.ZodIssueCode.custom,
474
+ message: I(d.error.message)
475
+ }), l.NEVER;
472
476
  }
473
- }).pipe(a ?? d.any());
477
+ }).pipe(a ?? l.any());
474
478
  }
475
- function P(r, e, n, t, a) {
479
+ function q(r, e, n, t, a) {
476
480
  e.forEach((s) => {
477
- var o, u, c, l, m, f, p;
481
+ var o, u, c, f, m, d, h;
478
482
  const i = n;
479
483
  if (!s.isVisible || (o = s.isVisible) != null && o.call(s, i, t == null ? void 0 : t.metadata)) {
480
- const b = _(r, s.path);
484
+ const b = E(r, s.path);
481
485
  if ((u = s.validation) != null && u.schema ? g(
482
486
  r,
483
487
  s.path,
484
- x(b, {
488
+ F(b, {
485
489
  _schema: (c = s.validation) == null ? void 0 : c.schema,
486
490
  _input: s
487
491
  })
488
- ) : s.required && g(r, s.path, x(b, { _requiredOnly: !0, _input: s })), s.inputs && P(r, s.inputs, n, t), s.inputType === "list") {
492
+ ) : s.required && g(r, s.path, F(b, { _requiredOnly: !0, _input: s })), s.inputs && q(r, s.inputs, n, t), s.inputType === "list") {
489
493
  const y = {};
490
- P(
494
+ q(
491
495
  y,
492
- (m = (l = s.inputConfig) == null ? void 0 : l.inputs) == null ? void 0 : m.map((E) => ({
493
- ...E,
494
- path: E.relativePath
496
+ (m = (f = s.inputConfig) == null ? void 0 : f.inputs) == null ? void 0 : m.map((T) => ({
497
+ ...T,
498
+ path: T.relativePath
495
499
  })),
496
500
  n,
497
501
  t
498
502
  );
499
- const T = _(r, s.path);
500
- g(r, s.path, x(T, { _schemaObj: y, _isList: !0, _input: s }));
503
+ const _ = E(r, s.path);
504
+ g(r, s.path, F(_, { _schemaObj: y, _isList: !0, _input: s }));
501
505
  }
502
- if (!((f = s.validation) != null && f.schema) && s.inputType === "array") {
506
+ if (!((d = s.validation) != null && d.schema) && s.inputType === "array") {
503
507
  const y = {};
504
- P(
508
+ q(
505
509
  y,
506
510
  [{ ...s.inputConfig.input, path: "___array" }],
507
511
  n,
@@ -509,9 +513,9 @@ function P(r, e, n, t, a) {
509
513
  ), g(
510
514
  r,
511
515
  s.path,
512
- x(b, {
516
+ F(b, {
513
517
  _schemaObj: y,
514
- _schema: (p = s.validation) == null ? void 0 : p.schema,
518
+ _schema: (h = s.validation) == null ? void 0 : h.schema,
515
519
  _isArrayItem: !0,
516
520
  _input: s
517
521
  })
@@ -520,34 +524,34 @@ function P(r, e, n, t, a) {
520
524
  }
521
525
  });
522
526
  }
523
- function B(r, e) {
527
+ function J(r, e) {
524
528
  var n, t, a;
525
- return ((t = (n = e == null ? void 0 : e.validationConfig) == null ? void 0 : n.requiredMessagePerInput) == null ? void 0 : t[r.inputType]) ?? ((a = e == null ? void 0 : e.validationConfig) == null ? void 0 : a.requiredMessage) ?? Le;
529
+ return ((t = (n = e == null ? void 0 : e.validationConfig) == null ? void 0 : n.requiredMessagePerInput) == null ? void 0 : t[r.inputType]) ?? ((a = e == null ? void 0 : e.validationConfig) == null ? void 0 : a.requiredMessage) ?? We;
526
530
  }
527
- function J(r, e) {
531
+ function U(r, e) {
528
532
  var t, a, s, i, o, u;
529
533
  if ((a = (t = e == null ? void 0 : e.validationConfig) == null ? void 0 : t.requiredSchemaPerInput) != null && a[r.inputType])
530
534
  return (i = (s = e == null ? void 0 : e.validationConfig) == null ? void 0 : s.requiredSchemaPerInput) == null ? void 0 : i[r.inputType];
531
535
  if ((o = e == null ? void 0 : e.validationConfig) != null && o.requiredSchema)
532
536
  return (u = e == null ? void 0 : e.validationConfig) == null ? void 0 : u.requiredSchema;
533
- const n = B(r, e);
534
- return d.any().optional().superRefine((c, l) => {
535
- typeof c == "object" && I(c) && l.addIssue({
536
- code: d.ZodIssueCode.custom,
537
+ const n = J(r, e);
538
+ return l.any().optional().superRefine((c, f) => {
539
+ typeof c == "object" && V(c) && f.addIssue({
540
+ code: l.ZodIssueCode.custom,
537
541
  message: n
538
- }), (A(c) || c === "") && l.addIssue({
539
- code: d.ZodIssueCode.custom,
542
+ }), (k(c) || c === "") && f.addIssue({
543
+ code: l.ZodIssueCode.custom,
540
544
  message: n
541
545
  });
542
546
  });
543
547
  }
544
- function fe(r, e) {
545
- if (r instanceof d.ZodType)
548
+ function le(r, e) {
549
+ if (r instanceof l.ZodType)
546
550
  return r;
547
551
  if (typeof r == "function")
548
552
  return r(e);
549
553
  }
550
- const Qe = (r) => Array.isArray(r == null ? void 0 : r.errors), Xe = (r, e) => {
554
+ const Xe = (r) => Array.isArray(r == null ? void 0 : r.errors), Ye = (r, e) => {
551
555
  const n = {};
552
556
  for (; r.length; ) {
553
557
  const t = r[0], { code: a, message: s, path: i } = t, o = i.join(".");
@@ -563,7 +567,7 @@ const Qe = (r) => Array.isArray(r == null ? void 0 : r.errors), Xe = (r, e) => {
563
567
  "unionErrors" in t && t.unionErrors.forEach((u) => u.errors.forEach((c) => r.push(c)));
564
568
  {
565
569
  const u = n[o].types, c = u && u[t.code];
566
- n[o] = Fe(
570
+ n[o] = Pe(
567
571
  o,
568
572
  e,
569
573
  n,
@@ -575,20 +579,20 @@ const Qe = (r) => Array.isArray(r == null ? void 0 : r.errors), Xe = (r, e) => {
575
579
  }
576
580
  return n;
577
581
  };
578
- function mr(r, e) {
579
- return Oe(
582
+ function hr(r, e) {
583
+ return je(
580
584
  async (n, t, a) => {
581
585
  try {
582
- return await We(r, n, e).parseAsync(n), {
586
+ return await He(r, n, e).parseAsync(n), {
583
587
  values: n,
584
588
  // TODO: check this - values does not contains all data
585
589
  errors: {}
586
590
  };
587
591
  } catch (s) {
588
- if (Qe(s))
592
+ if (Xe(s))
589
593
  return {
590
594
  values: {},
591
- errors: qe(Xe(s.errors, !0), a)
595
+ errors: Ae(Ye(s.errors, !0), a)
592
596
  };
593
597
  throw s;
594
598
  }
@@ -596,56 +600,56 @@ function mr(r, e) {
596
600
  [r]
597
601
  );
598
602
  }
599
- function Ye(r, e) {
600
- const n = q(r);
603
+ function Ke(r, e) {
604
+ const n = A(r);
601
605
  return e.forEach((t) => {
602
- t.inputTransform && (O(t.inputTransform) ? t.inputTransform : [t.inputTransform]).forEach((s) => {
603
- const i = _(n, t.path), o = s(i, n);
606
+ t.inputTransform && (j(t.inputTransform) ? t.inputTransform : [t.inputTransform]).forEach((s) => {
607
+ const i = E(n, t.path), o = s(i, n);
604
608
  o && g(n, o.path ?? t.path, o.value);
605
609
  });
606
610
  }), n;
607
611
  }
608
- function Ke(r, e) {
609
- const n = [], t = q(r);
612
+ function ze(r, e) {
613
+ const n = [], t = A(r);
610
614
  return e.forEach((a) => {
611
- a.outputTransform && (O(a.outputTransform) ? a.outputTransform : [a.outputTransform]).forEach((i) => {
612
- const o = _(t, a.path), u = i(o, t);
615
+ a.outputTransform && (j(a.outputTransform) ? a.outputTransform : [a.outputTransform]).forEach((i) => {
616
+ const o = E(t, a.path), u = i(o, t);
613
617
  u && (u.path ? (g(t, u.path, u.value), u.unset && n.push(a.path)) : g(t, a.path, u.value));
614
618
  });
615
619
  }), n.forEach((a) => {
616
- se(t, a);
620
+ ae(t, a);
617
621
  }), t;
618
622
  }
619
- function U(r) {
620
- return r.reduce((n, t) => (t.inputType === "group" || t.inputType === "accordion") && t.inputs ? [...n, t, ...U(t.inputs)] : [...n, t], []);
623
+ function L(r) {
624
+ return r.reduce((n, t) => (t.inputType === "group" || t.inputType === "accordion") && t.inputs ? [...n, t, ...L(t.inputs)] : [...n, t], []);
621
625
  }
622
- function le(r) {
623
- const n = U(r.inputs).reduce((t, a) => {
626
+ function de(r) {
627
+ const n = L(r.inputs).reduce((t, a) => {
624
628
  const s = a.inputType === "text" || a.inputType === "boolean" || a.inputType === "number" || a.inputType === "textarea" || a.inputType === "select";
625
629
  return (a.inputTransform || a.outputTransform) && t.push({
626
- ...ge(a, "path", "inputTransform", "outputTransform"),
630
+ ...be(a, "path", "inputTransform", "outputTransform"),
627
631
  level: a.path.split(".").length,
628
632
  isPrimitive: s
629
633
  }), t;
630
634
  }, []);
631
635
  return n.sort((t, a) => t.level === a.level ? t.isPrimitive ? 1 : -1 : t.level > a.level ? -1 : 1), n;
632
636
  }
633
- function ze(r, e, n, t = {}) {
634
- const { preserve: a } = t, s = U(r.inputs), i = q(e);
637
+ function er(r, e, n, t = {}) {
638
+ const { preserve: a } = t, s = L(r.inputs), i = A(e);
635
639
  return s.forEach((o) => {
636
- a && a.includes(o.path) || o.isVisible && !o.isVisible(e, n) && se(i, o.path);
640
+ a && a.includes(o.path) || o.isVisible && !o.isVisible(e, n) && ae(i, o.path);
637
641
  }), i;
638
642
  }
639
- function hr(r, e) {
640
- const n = le(e);
641
- return Ye(r, n);
643
+ function pr(r, e) {
644
+ const n = de(e);
645
+ return Ke(r, n);
642
646
  }
643
- function pr(r, e, n, t = {}) {
644
- const a = le(e);
645
- let s = ze(e, r, n, t);
646
- return s = Ke(s, a), s = Ue(s), s;
647
+ function yr(r, e, n, t = {}) {
648
+ const a = de(e);
649
+ let s = er(e, r, n, t);
650
+ return s = ze(s, a), s = Le(s), s;
647
651
  }
648
- function yr(r) {
652
+ function gr(r) {
649
653
  const e = {}, n = (t) => {
650
654
  t.forEach((a) => {
651
655
  const { default: s, path: i, inputType: o, inputs: u } = a;
@@ -654,7 +658,7 @@ function yr(r) {
654
658
  };
655
659
  return Array.isArray(r.inputs) && n(r.inputs), e;
656
660
  }
657
- function gr() {
661
+ function br() {
658
662
  return function(r, e) {
659
663
  if (!(typeof r > "u"))
660
664
  return r ? {
@@ -662,7 +666,7 @@ function gr() {
662
666
  } : { value: r };
663
667
  };
664
668
  }
665
- function br(r) {
669
+ function vr(r) {
666
670
  return function(e, n) {
667
671
  if (typeof e > "u") return;
668
672
  if (!e) return { value: e };
@@ -672,64 +676,64 @@ function br(r) {
672
676
  return r != null && r.unsetIfEmpty && Object.getOwnPropertyNames(t.value).length === 0 ? { value: void 0 } : t;
673
677
  };
674
678
  }
675
- function vr() {
679
+ function Er() {
676
680
  return function(r, e) {
677
681
  if (!(typeof r > "u"))
678
- return O(r) && I(r) ? { value: void 0 } : { value: r };
682
+ return j(r) && V(r) ? { value: void 0 } : { value: r };
679
683
  };
680
684
  }
681
685
  function _r(r) {
682
686
  return function(e, n) {
683
- const t = r ? _(n, r) : e;
687
+ const t = r ? E(n, r) : e;
684
688
  if (!(typeof t > "u")) {
685
- if (ae(t)) return { value: void 0, path: r };
686
- if (ne(t)) {
687
- const a = oe(t, be);
688
- if (I(a))
689
+ if (oe(t)) return { value: void 0, path: r };
690
+ if (se(t)) {
691
+ const a = ue(t, ve);
692
+ if (V(a))
689
693
  return { value: void 0, path: r };
690
694
  }
691
695
  return { value: t, path: r };
692
696
  }
693
697
  };
694
698
  }
695
- function Er() {
699
+ function Tr() {
696
700
  return function(r, e) {
697
701
  if (!(typeof r > "u"))
698
- return ve(r) && I(r) ? { value: void 0 } : { value: r };
702
+ return Ee(r) && V(r) ? { value: void 0 } : { value: r };
699
703
  };
700
704
  }
701
- function Tr(r) {
705
+ function Rr(r) {
702
706
  return function(e, n) {
703
- const t = _(n, r);
707
+ const t = E(n, r);
704
708
  return typeof t == "string" ? { value: t } : { value: e };
705
709
  };
706
710
  }
707
- function Rr(r) {
711
+ function Sr(r) {
708
712
  return function(e, n) {
709
713
  if (typeof e > "u") return;
710
714
  if (!e) return { value: e };
711
- const t = _(n, r);
715
+ const t = E(n, r);
712
716
  if (typeof t == "object") {
713
- const a = er(t);
717
+ const a = rr(t);
714
718
  if (Object.getOwnPropertyNames(a).length === 1)
715
719
  return { value: e, path: r };
716
720
  }
717
721
  return { value: e };
718
722
  };
719
723
  }
720
- function Sr(r) {
724
+ function Or(r) {
721
725
  return function(e, n) {
722
726
  if (typeof e > "u") return;
723
- const t = _(n, r);
727
+ const t = E(n, r);
724
728
  return typeof t == "string" ? { value: [t] } : { value: e };
725
729
  };
726
730
  }
727
- function Or(r, e) {
731
+ function jr(r, e) {
728
732
  return function(n, t) {
729
733
  if (typeof n > "u") return;
730
734
  if (!n) return { value: n };
731
- const a = _(t, r);
732
- if (O(a)) {
735
+ const a = E(t, r);
736
+ if (j(a)) {
733
737
  if (a.length === 1)
734
738
  return { value: a[0], path: r };
735
739
  if (a.length === 0 && e != null && e.unsetIfEmpty)
@@ -738,16 +742,16 @@ function Or(r, e) {
738
742
  return { value: n };
739
743
  };
740
744
  }
741
- function de(r) {
742
- return typeof r == "object" ? !Object.getOwnPropertyNames(r).some((e) => !de(r[e])) : A(r);
745
+ function me(r) {
746
+ return typeof r == "object" ? !Object.getOwnPropertyNames(r).some((e) => !me(r[e])) : k(r);
743
747
  }
744
- function er(r) {
745
- return oe(r, (e) => typeof e == "object" ? de(e) : A(e));
748
+ function rr(r) {
749
+ return ue(r, (e) => typeof e == "object" ? me(e) : k(e));
746
750
  }
747
- function re(r) {
751
+ function te(r) {
748
752
  const { items: e, ...n } = r;
749
- return /* @__PURE__ */ h.jsx(h.Fragment, { children: e.map((t) => /* @__PURE__ */ h.jsx(
750
- Be,
753
+ return /* @__PURE__ */ p.jsx(p.Fragment, { children: e.map((t) => /* @__PURE__ */ p.jsx(
754
+ Je,
751
755
  {
752
756
  input: t,
753
757
  path: t.path,
@@ -756,24 +760,24 @@ function re(r) {
756
760
  `${t.inputType}_${t.path}_${t.label}`
757
761
  )) });
758
762
  }
759
- const rr = je((r, e) => {
763
+ const tr = Ce((r, e) => {
760
764
  const { inputs: n, className: t, factory: a, withoutWrapper: s } = r;
761
- return s ? /* @__PURE__ */ h.jsxs(Ce, { children: [
765
+ return s ? /* @__PURE__ */ p.jsxs(Ie, { children: [
762
766
  n.hero,
763
- /* @__PURE__ */ h.jsx(re, { items: n.inputs, factory: a, withoutWrapper: s })
764
- ] }) : /* @__PURE__ */ h.jsxs("div", { className: t, ref: e, children: [
767
+ /* @__PURE__ */ p.jsx(te, { items: n.inputs, factory: a, withoutWrapper: s })
768
+ ] }) : /* @__PURE__ */ p.jsxs("div", { className: t, ref: e, children: [
765
769
  n.hero,
766
- /* @__PURE__ */ h.jsx(re, { items: n.inputs, factory: a, withoutWrapper: s })
770
+ /* @__PURE__ */ p.jsx(te, { items: n.inputs, factory: a, withoutWrapper: s })
767
771
  ] });
768
772
  });
769
- rr.displayName = "RenderForm";
770
- function jr(r) {
773
+ tr.displayName = "RenderForm";
774
+ function Cr(r) {
771
775
  let e = !0;
772
- return te(r, (n) => {
773
- e = e && (n === "" || ae(n) || A(n));
776
+ return ne(r, (n) => {
777
+ e = e && (n === "" || oe(n) || k(n));
774
778
  }), e;
775
779
  }
776
- const Cr = (r = "") => _e(r.split("_").join(" ")), tr = (r, e = 2) => {
780
+ const Ir = (r = "") => _e(r.split("_").join(" ")), nr = (r, e = 2) => {
777
781
  let n = !1;
778
782
  const t = () => {
779
783
  requestAnimationFrame(() => {
@@ -784,54 +788,54 @@ const Cr = (r = "") => _e(r.split("_").join(" ")), tr = (r, e = 2) => {
784
788
  n = !0;
785
789
  };
786
790
  };
787
- function Ir(r) {
791
+ function Vr(r) {
788
792
  const {
789
793
  field: { onBlur: e, ...n },
790
794
  ...t
791
- } = Pe(r);
795
+ } = qe(r);
792
796
  return {
793
797
  ...t,
794
798
  field: {
795
799
  ...n,
796
- onBlur: tr(e)
800
+ onBlur: nr(e)
797
801
  }
798
802
  };
799
803
  }
800
804
  export {
801
- ir as InputComponent,
802
- Be as InputComponentRenderer,
803
- ue as InputFactory,
804
- Ae as InputOverrideError,
805
- rr as RenderForm,
806
- re as RenderInputs,
807
- cr as RootForm,
808
- tr as afterFrames,
809
- br as arrayToObjectOutputTransformer,
810
- yr as collectDefaultValues,
811
- hr as convertDataToFormModel,
812
- pr as convertFormModelToData,
813
- Cr as generateReadableLabel,
814
- fr as getDefaultValuesFromFormDefinition,
815
- dr as getTemporaryPath,
816
- le as getTransformers,
817
- We as getValidationSchema,
818
- Ye as inputTransformValues,
819
- jr as isChildrenEmpty,
820
- gr as objectToArrayInputTransformer,
821
- Ke as outputTransformValues,
822
- lr as overrideFormDefinition,
823
- C as processValidationParseResponse,
824
- Ue as removeTemporaryFieldsValue,
825
- Sr as shorthandArrayInputTransformer,
826
- Or as shorthandArrayOutputTransformer,
827
- Tr as shorthandObjectInputTransformer,
828
- Rr as shorthandObjectOutputTransformer,
829
- vr as unsetEmptyArrayOutputTransformer,
805
+ cr as InputComponent,
806
+ Je as InputComponentRenderer,
807
+ ie as InputFactory,
808
+ ke as InputOverrideError,
809
+ tr as RenderForm,
810
+ te as RenderInputs,
811
+ fr as RootForm,
812
+ nr as afterFrames,
813
+ vr as arrayToObjectOutputTransformer,
814
+ gr as collectDefaultValues,
815
+ pr as convertDataToFormModel,
816
+ yr as convertFormModelToData,
817
+ Ir as generateReadableLabel,
818
+ lr as getDefaultValuesFromFormDefinition,
819
+ mr as getTemporaryPath,
820
+ de as getTransformers,
821
+ He as getValidationSchema,
822
+ Ke as inputTransformValues,
823
+ Cr as isChildrenEmpty,
824
+ br as objectToArrayInputTransformer,
825
+ ze as outputTransformValues,
826
+ dr as overrideFormDefinition,
827
+ I as processValidationParseResponse,
828
+ Le as removeTemporaryFieldsValue,
829
+ Or as shorthandArrayInputTransformer,
830
+ jr as shorthandArrayOutputTransformer,
831
+ Rr as shorthandObjectInputTransformer,
832
+ Sr as shorthandObjectOutputTransformer,
833
+ Er as unsetEmptyArrayOutputTransformer,
830
834
  _r as unsetEmptyObjectOutputTransformer,
831
- Er as unsetEmptyStringOutputTransformer,
832
- ze as unsetHiddenInputsValues,
833
- Ir as useController,
834
- Ze as useRootFormContext,
835
- mr as useZodValidationResolver
835
+ Tr as unsetEmptyStringOutputTransformer,
836
+ er as unsetHiddenInputsValues,
837
+ Vr as useController,
838
+ $e as useRootFormContext,
839
+ hr as useZodValidationResolver
836
840
  };
837
841
  //# sourceMappingURL=index.js.map