@harnessio/forms 0.16.0 → 0.17.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/core/transformers/transformers.d.ts +2 -1
- package/dist/core/utils/transform-utils.d.ts +2 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +619 -610
- package/dist/index.js.map +1 -1
- package/dist/types/types.d.ts +11 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var N = (r, e,
|
|
4
|
-
import { isEmpty as
|
|
5
|
-
import
|
|
6
|
-
import { useFormContext as
|
|
7
|
-
import { Controller as
|
|
8
|
-
import * as
|
|
9
|
-
import { toNestErrors as
|
|
10
|
-
class
|
|
1
|
+
var je = Object.defineProperty;
|
|
2
|
+
var Pe = (r, e, t) => e in r ? je(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var N = (r, e, t) => Pe(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { isEmpty as J, set as R, get as T, forOwn as ge, isArray as w, isObject as be, merge as A, isUndefined as L, cloneDeep as M, unset as ve, isPlainObject as xe, isNull as Te, isString as Fe, omitBy as qe, isNil as Ae, capitalize as ke } from "lodash-es";
|
|
5
|
+
import De, { createContext as Me, useContext as $e, Component as Ne, memo as Be, useMemo as B, useRef as P, useEffect as j, useCallback as Ze, forwardRef as We, Fragment as Je } from "react";
|
|
6
|
+
import { useFormContext as Le, get as Ue, useForm as He, FormProvider as Ge, appendErrors as Ke, useController as Qe } from "react-hook-form";
|
|
7
|
+
import { Controller as Xr, Form as Yr, FormProvider as zr, get as et, set as rt, useFieldArray as tt, useForm as nt, useFormContext as st, useFormState as it, useWatch as at } from "react-hook-form";
|
|
8
|
+
import * as p from "zod";
|
|
9
|
+
import { toNestErrors as Xe } from "@hookform/resolvers";
|
|
10
|
+
class Ye extends Error {
|
|
11
11
|
constructor(e) {
|
|
12
12
|
super(`Input component '${e}' is already registered.`);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
class
|
|
15
|
+
class Ce {
|
|
16
16
|
constructor(e) {
|
|
17
17
|
N(this, "componentBank");
|
|
18
18
|
N(this, "allowOverride");
|
|
@@ -26,11 +26,11 @@ class ve {
|
|
|
26
26
|
*/
|
|
27
27
|
registerComponent(e) {
|
|
28
28
|
if (!this.allowOverride && this.getComponent(e.internalType))
|
|
29
|
-
throw new
|
|
29
|
+
throw new Ye(e.internalType);
|
|
30
30
|
this.componentBank.set(e.internalType, e);
|
|
31
31
|
}
|
|
32
32
|
getComponent(e) {
|
|
33
|
-
if (e && !
|
|
33
|
+
if (e && !J(e))
|
|
34
34
|
return this.componentBank.get(e);
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
@@ -47,65 +47,65 @@ class ve {
|
|
|
47
47
|
* @returns new input factory
|
|
48
48
|
*/
|
|
49
49
|
clone() {
|
|
50
|
-
const e = new
|
|
50
|
+
const e = new Ce({
|
|
51
51
|
allowOverride: this.allowOverride
|
|
52
52
|
});
|
|
53
|
-
return this.listRegisteredComponents().forEach((
|
|
54
|
-
e.registerComponent(this.componentBank.get(
|
|
53
|
+
return this.listRegisteredComponents().forEach((t) => {
|
|
54
|
+
e.registerComponent(this.componentBank.get(t));
|
|
55
55
|
}), e;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
var
|
|
58
|
+
var U = { exports: {} }, x = {};
|
|
59
59
|
/*
|
|
60
60
|
object-assign
|
|
61
61
|
(c) Sindre Sorhus
|
|
62
62
|
@license MIT
|
|
63
63
|
*/
|
|
64
|
-
var
|
|
65
|
-
function
|
|
66
|
-
if (
|
|
67
|
-
|
|
68
|
-
var r = Object.getOwnPropertySymbols, e = Object.prototype.hasOwnProperty,
|
|
69
|
-
function
|
|
64
|
+
var H, fe;
|
|
65
|
+
function ze() {
|
|
66
|
+
if (fe) return H;
|
|
67
|
+
fe = 1;
|
|
68
|
+
var r = Object.getOwnPropertySymbols, e = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
69
|
+
function n(s) {
|
|
70
70
|
if (s == null)
|
|
71
71
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
72
72
|
return Object(s);
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function o() {
|
|
75
75
|
try {
|
|
76
76
|
if (!Object.assign)
|
|
77
77
|
return !1;
|
|
78
78
|
var s = new String("abc");
|
|
79
79
|
if (s[5] = "de", Object.getOwnPropertyNames(s)[0] === "5")
|
|
80
80
|
return !1;
|
|
81
|
-
for (var
|
|
82
|
-
|
|
83
|
-
var
|
|
84
|
-
return
|
|
81
|
+
for (var i = {}, a = 0; a < 10; a++)
|
|
82
|
+
i["_" + String.fromCharCode(a)] = a;
|
|
83
|
+
var c = Object.getOwnPropertyNames(i).map(function(u) {
|
|
84
|
+
return i[u];
|
|
85
85
|
});
|
|
86
|
-
if (
|
|
86
|
+
if (c.join("") !== "0123456789")
|
|
87
87
|
return !1;
|
|
88
|
-
var
|
|
89
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
90
|
-
|
|
91
|
-
}), Object.keys(Object.assign({},
|
|
88
|
+
var l = {};
|
|
89
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(u) {
|
|
90
|
+
l[u] = u;
|
|
91
|
+
}), Object.keys(Object.assign({}, l)).join("") === "abcdefghijklmnopqrst";
|
|
92
92
|
} catch {
|
|
93
93
|
return !1;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
return
|
|
97
|
-
for (var
|
|
98
|
-
|
|
99
|
-
for (var d in
|
|
100
|
-
e.call(
|
|
96
|
+
return H = o() ? Object.assign : function(s, i) {
|
|
97
|
+
for (var a, c = n(s), l, u = 1; u < arguments.length; u++) {
|
|
98
|
+
a = Object(arguments[u]);
|
|
99
|
+
for (var d in a)
|
|
100
|
+
e.call(a, d) && (c[d] = a[d]);
|
|
101
101
|
if (r) {
|
|
102
|
-
|
|
103
|
-
for (var
|
|
104
|
-
|
|
102
|
+
l = r(a);
|
|
103
|
+
for (var f = 0; f < l.length; f++)
|
|
104
|
+
t.call(a, l[f]) && (c[l[f]] = a[l[f]]);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
return
|
|
108
|
-
},
|
|
107
|
+
return c;
|
|
108
|
+
}, H;
|
|
109
109
|
}
|
|
110
110
|
/** @license React v17.0.2
|
|
111
111
|
* react-jsx-runtime.production.min.js
|
|
@@ -115,54 +115,54 @@ 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
|
|
119
|
-
function
|
|
120
|
-
if (
|
|
121
|
-
|
|
122
|
-
var r =
|
|
123
|
-
if (
|
|
124
|
-
var
|
|
125
|
-
e =
|
|
118
|
+
var le;
|
|
119
|
+
function er() {
|
|
120
|
+
if (le) return x;
|
|
121
|
+
le = 1, ze();
|
|
122
|
+
var r = De, e = 60103;
|
|
123
|
+
if (x.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
|
|
124
|
+
var t = Symbol.for;
|
|
125
|
+
e = t("react.element"), x.Fragment = t("react.fragment");
|
|
126
126
|
}
|
|
127
|
-
var
|
|
128
|
-
function a
|
|
129
|
-
var
|
|
130
|
-
|
|
131
|
-
for (
|
|
132
|
-
if (
|
|
133
|
-
return { $$typeof: e, type:
|
|
127
|
+
var n = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = Object.prototype.hasOwnProperty, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
128
|
+
function i(a, c, l) {
|
|
129
|
+
var u, d = {}, f = null, m = null;
|
|
130
|
+
l !== void 0 && (f = "" + l), c.key !== void 0 && (f = "" + c.key), c.ref !== void 0 && (m = c.ref);
|
|
131
|
+
for (u in c) o.call(c, u) && !s.hasOwnProperty(u) && (d[u] = c[u]);
|
|
132
|
+
if (a && a.defaultProps) for (u in c = a.defaultProps, c) d[u] === void 0 && (d[u] = c[u]);
|
|
133
|
+
return { $$typeof: e, type: a, key: f, ref: m, props: d, _owner: n.current };
|
|
134
134
|
}
|
|
135
|
-
return
|
|
135
|
+
return x.jsx = i, x.jsxs = i, x;
|
|
136
136
|
}
|
|
137
|
-
var
|
|
138
|
-
function
|
|
139
|
-
return
|
|
137
|
+
var de;
|
|
138
|
+
function rr() {
|
|
139
|
+
return de || (de = 1, U.exports = er()), U.exports;
|
|
140
140
|
}
|
|
141
|
-
var
|
|
142
|
-
const
|
|
143
|
-
function
|
|
141
|
+
var g = rr();
|
|
142
|
+
const Oe = Me({});
|
|
143
|
+
function tr({
|
|
144
144
|
children: r,
|
|
145
145
|
metadata: e,
|
|
146
|
-
inputErrorHandler:
|
|
147
|
-
readonly:
|
|
146
|
+
inputErrorHandler: t,
|
|
147
|
+
readonly: n
|
|
148
148
|
}) {
|
|
149
|
-
return /* @__PURE__ */
|
|
150
|
-
|
|
149
|
+
return /* @__PURE__ */ g.jsx(
|
|
150
|
+
Oe.Provider,
|
|
151
151
|
{
|
|
152
152
|
value: {
|
|
153
153
|
metadata: e,
|
|
154
|
-
readonly:
|
|
155
|
-
inputErrorHandler:
|
|
154
|
+
readonly: n,
|
|
155
|
+
inputErrorHandler: t
|
|
156
156
|
},
|
|
157
157
|
children: r
|
|
158
158
|
}
|
|
159
159
|
);
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
const r =
|
|
161
|
+
function nr() {
|
|
162
|
+
const r = $e(Oe);
|
|
163
163
|
return r || console.warn("useRootFormContext must be used within RootFormProvider"), r;
|
|
164
164
|
}
|
|
165
|
-
class
|
|
165
|
+
class sr extends Ne {
|
|
166
166
|
constructor() {
|
|
167
167
|
super(...arguments);
|
|
168
168
|
N(this, "state", {
|
|
@@ -172,120 +172,120 @@ class er extends ke {
|
|
|
172
172
|
static getDerivedStateFromError() {
|
|
173
173
|
return { hasError: !0 };
|
|
174
174
|
}
|
|
175
|
-
componentDidCatch(
|
|
176
|
-
var s,
|
|
177
|
-
console.error(
|
|
178
|
-
const
|
|
179
|
-
`Form input [${this.props.inputType}] has failed at path [${this.props.path}]. Error: ${
|
|
175
|
+
componentDidCatch(t, n) {
|
|
176
|
+
var s, i;
|
|
177
|
+
console.error(t, n);
|
|
178
|
+
const o = new Error(
|
|
179
|
+
`Form input [${this.props.inputType}] has failed at path [${this.props.path}]. Error: ${t}, Error info: ${n}`
|
|
180
180
|
);
|
|
181
|
-
(
|
|
181
|
+
(i = (s = this.props).inputErrorHandler) == null || i.call(s, o);
|
|
182
182
|
}
|
|
183
183
|
render() {
|
|
184
|
-
return this.state.hasError ? /* @__PURE__ */
|
|
184
|
+
return this.state.hasError ? /* @__PURE__ */ g.jsx(g.Fragment, {}) : this.props.children;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
const
|
|
187
|
+
const me = ({
|
|
188
188
|
children: r,
|
|
189
189
|
withoutWrapper: e = !1
|
|
190
|
-
}) => e || !r ? r : /* @__PURE__ */
|
|
190
|
+
}) => e || !r ? r : /* @__PURE__ */ g.jsx("div", { children: r }), ir = Be(function({
|
|
191
191
|
path: e,
|
|
192
|
-
factory:
|
|
193
|
-
onUpdate:
|
|
194
|
-
onChange:
|
|
192
|
+
factory: t,
|
|
193
|
+
onUpdate: n,
|
|
194
|
+
onChange: o,
|
|
195
195
|
initialValues: s,
|
|
196
|
-
input:
|
|
197
|
-
withoutWrapper:
|
|
196
|
+
input: i,
|
|
197
|
+
withoutWrapper: a = !1
|
|
198
198
|
}) {
|
|
199
|
-
var
|
|
200
|
-
const
|
|
201
|
-
if (!
|
|
202
|
-
let
|
|
203
|
-
return
|
|
204
|
-
const q =
|
|
205
|
-
|
|
206
|
-
}),
|
|
207
|
-
}, [
|
|
208
|
-
var
|
|
209
|
-
if (!
|
|
210
|
-
const
|
|
211
|
-
return !$ &&
|
|
212
|
-
}, [
|
|
199
|
+
var te, ne, se, ie, ae;
|
|
200
|
+
const c = Le(), { formState: l } = c, { fixedValues: u = {} } = {}, { metadata: d, readonly: f, inputErrorHandler: m } = nr(), b = t == null ? void 0 : t.getComponent(i.inputType), h = !!(i.isVisible || typeof i.disabled == "function" || typeof ((te = i.validation) == null ? void 0 : te.schema) == "function" || typeof ((ne = i.warning) == null ? void 0 : ne.schema) == "function"), v = !!((se = i.warning) != null && se.schema || (ie = i.validation) != null && ie.schema), y = h ? c.watch() : {}, E = v ? h ? Ue(y, i.path) : c.watch(i.path) : void 0, S = B(() => {
|
|
201
|
+
if (!h) return {};
|
|
202
|
+
let F = y;
|
|
203
|
+
return u && Object.keys(u).forEach(($) => {
|
|
204
|
+
const q = u[$];
|
|
205
|
+
F = R(F, $, q);
|
|
206
|
+
}), F;
|
|
207
|
+
}, [h, y, u]), V = !i.isVisible || i.isVisible(S, d), C = f || i.readonly, _ = typeof i.disabled == "function" ? i.disabled(S, d) : i.disabled, O = (ae = i.warning) == null ? void 0 : ae.schema, ee = B(() => {
|
|
208
|
+
var ue, ce;
|
|
209
|
+
if (!V || typeof O > "u") return;
|
|
210
|
+
const F = typeof O == "function" ? O(S, d) : O, { success: $, error: q } = F.safeParse(E), oe = (ce = (ue = q == null ? void 0 : q.errors) == null ? void 0 : ue[0]) == null ? void 0 : ce.message;
|
|
211
|
+
return !$ && oe ? oe : void 0;
|
|
212
|
+
}, [i.path, E, O, V, d]), re = B(
|
|
213
213
|
() => ({
|
|
214
214
|
path: e,
|
|
215
215
|
key: e,
|
|
216
216
|
initialValues: s,
|
|
217
|
-
onUpdate:
|
|
218
|
-
onChange:
|
|
219
|
-
factory:
|
|
220
|
-
readonly:
|
|
221
|
-
input:
|
|
222
|
-
disabled:
|
|
223
|
-
warning:
|
|
217
|
+
onUpdate: n,
|
|
218
|
+
onChange: o,
|
|
219
|
+
factory: t,
|
|
220
|
+
readonly: C,
|
|
221
|
+
input: i,
|
|
222
|
+
disabled: _,
|
|
223
|
+
warning: ee
|
|
224
224
|
}),
|
|
225
|
-
[
|
|
226
|
-
),
|
|
227
|
-
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
|
|
230
|
-
] }) : null, [
|
|
231
|
-
return
|
|
225
|
+
[t, s, i, o, n, e, C, l.errors, _, ee]
|
|
226
|
+
), Ve = B(() => V ? /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
227
|
+
i.before ? i.before : null,
|
|
228
|
+
/* @__PURE__ */ g.jsx(sr, { path: e, inputType: i.inputType, inputErrorHandler: m, children: b == null ? void 0 : b.renderComponent(re) }),
|
|
229
|
+
i.after ? i.after : null
|
|
230
|
+
] }) : null, [V, i.before, i.inputType, i.after, e, b, re, l.errors]);
|
|
231
|
+
return b ? /* @__PURE__ */ g.jsx(me, { withoutWrapper: a, children: Ve }) : /* @__PURE__ */ g.jsx(me, { withoutWrapper: a, children: /* @__PURE__ */ g.jsxs("p", { children: [
|
|
232
232
|
"Input component not found (internal type: ",
|
|
233
|
-
|
|
233
|
+
i.inputType,
|
|
234
234
|
")"
|
|
235
235
|
] }) });
|
|
236
236
|
});
|
|
237
|
-
class
|
|
237
|
+
class Ir {
|
|
238
238
|
getType() {
|
|
239
239
|
return this.internalType;
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function pe() {
|
|
243
243
|
return typeof window < "u" && "requestIdleCallback" in window ? window.requestIdleCallback : function(r, e) {
|
|
244
|
-
const
|
|
244
|
+
const t = Date.now(), n = (e == null ? void 0 : e.timeout) || 1;
|
|
245
245
|
return setTimeout(function() {
|
|
246
246
|
r({
|
|
247
247
|
didTimeout: !1,
|
|
248
248
|
timeRemaining: function() {
|
|
249
|
-
return Math.max(0, 50 - (Date.now() -
|
|
249
|
+
return Math.max(0, 50 - (Date.now() - t));
|
|
250
250
|
}
|
|
251
251
|
});
|
|
252
|
-
},
|
|
252
|
+
}, n);
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function he() {
|
|
256
256
|
return typeof window < "u" && "cancelIdleCallback" in window ? window.cancelIdleCallback : clearTimeout;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function wr(r) {
|
|
259
259
|
const {
|
|
260
260
|
mode: e = "onSubmit",
|
|
261
|
-
resolver:
|
|
262
|
-
defaultValues:
|
|
263
|
-
shouldFocusError:
|
|
261
|
+
resolver: t,
|
|
262
|
+
defaultValues: n,
|
|
263
|
+
shouldFocusError: o,
|
|
264
264
|
// validateAfterFirstSubmit,
|
|
265
265
|
onValuesChange: s,
|
|
266
|
-
onValidationChange:
|
|
267
|
-
onSubmit:
|
|
268
|
-
onInputRenderError:
|
|
266
|
+
onValidationChange: i,
|
|
267
|
+
onSubmit: a,
|
|
268
|
+
onInputRenderError: c,
|
|
269
269
|
// validate,
|
|
270
270
|
// validateDebounceInterval,
|
|
271
271
|
// validationConfig,
|
|
272
|
-
metadata:
|
|
273
|
-
children:
|
|
272
|
+
metadata: l,
|
|
273
|
+
children: u,
|
|
274
274
|
// fixedValues
|
|
275
275
|
autoFocusPath: d,
|
|
276
|
-
readonly:
|
|
277
|
-
} = r,
|
|
276
|
+
readonly: f
|
|
277
|
+
} = r, m = He({
|
|
278
278
|
mode: e,
|
|
279
279
|
reValidateMode: "onChange",
|
|
280
|
-
defaultValues:
|
|
281
|
-
shouldFocusError:
|
|
282
|
-
resolver:
|
|
283
|
-
}),
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}, [
|
|
287
|
-
const
|
|
288
|
-
|
|
280
|
+
defaultValues: n,
|
|
281
|
+
shouldFocusError: o,
|
|
282
|
+
resolver: t
|
|
283
|
+
}), b = P(!1), h = P(JSON.stringify(n ?? {}));
|
|
284
|
+
j(() => {
|
|
285
|
+
h.current = JSON.stringify(n ?? {}), m.reset(n, {});
|
|
286
|
+
}, [m.reset, n]), j(() => {
|
|
287
|
+
const C = pe(), _ = he(), O = C(() => {
|
|
288
|
+
m.reset({}, {
|
|
289
289
|
keepErrors: !0,
|
|
290
290
|
keepDirty: !0,
|
|
291
291
|
keepDirtyValues: !0,
|
|
@@ -298,79 +298,79 @@ function _r(r) {
|
|
|
298
298
|
keepSubmitCount: !0
|
|
299
299
|
});
|
|
300
300
|
});
|
|
301
|
-
return () =>
|
|
301
|
+
return () => _(O);
|
|
302
302
|
}, []);
|
|
303
|
-
const { handleSubmit: v } =
|
|
304
|
-
|
|
303
|
+
const { handleSubmit: v } = m, y = P(s);
|
|
304
|
+
j(() => {
|
|
305
305
|
y.current = s;
|
|
306
306
|
}, [s]);
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
}, [
|
|
311
|
-
const
|
|
312
|
-
|
|
313
|
-
const
|
|
314
|
-
var
|
|
315
|
-
|
|
316
|
-
|
|
307
|
+
const E = P(i);
|
|
308
|
+
j(() => {
|
|
309
|
+
E.current = i;
|
|
310
|
+
}, [i]);
|
|
311
|
+
const S = P(!1);
|
|
312
|
+
j(() => {
|
|
313
|
+
const C = m.watch((_) => {
|
|
314
|
+
var O;
|
|
315
|
+
S.current || JSON.stringify(_ ?? {}) !== h.current && ((O = y.current) == null || O.call(y, { ..._ }), b.current === !0 && (S.current = !0, m.trigger().finally(() => {
|
|
316
|
+
S.current = !1;
|
|
317
317
|
})));
|
|
318
318
|
});
|
|
319
319
|
return () => {
|
|
320
|
-
|
|
320
|
+
C.unsubscribe();
|
|
321
321
|
};
|
|
322
|
-
}, [
|
|
323
|
-
const
|
|
324
|
-
return
|
|
325
|
-
var
|
|
326
|
-
if (
|
|
327
|
-
|
|
322
|
+
}, [m]);
|
|
323
|
+
const V = P(!0);
|
|
324
|
+
return j(() => {
|
|
325
|
+
var C;
|
|
326
|
+
if (V.current) {
|
|
327
|
+
V.current = !1;
|
|
328
328
|
return;
|
|
329
329
|
}
|
|
330
|
-
(
|
|
331
|
-
}, [
|
|
330
|
+
(C = E.current) == null || C.call(E, { isValid: m.formState.isValid, isSubmitted: m.formState.isSubmitted });
|
|
331
|
+
}, [m.formState.isValid, m.formState.isSubmitted]), j(() => {
|
|
332
332
|
if (d) {
|
|
333
|
-
const
|
|
334
|
-
|
|
333
|
+
const C = pe(), _ = he(), O = C(() => {
|
|
334
|
+
m.setFocus(d);
|
|
335
335
|
});
|
|
336
|
-
return () =>
|
|
336
|
+
return () => _(O);
|
|
337
337
|
}
|
|
338
|
-
}, [
|
|
339
|
-
...
|
|
338
|
+
}, [m, d]), /* @__PURE__ */ g.jsx(tr, { metadata: l, readonly: f, inputErrorHandler: c, children: /* @__PURE__ */ g.jsx(Ge, { ...m, children: typeof u == "function" ? u({
|
|
339
|
+
...m,
|
|
340
340
|
submitForm: async () => {
|
|
341
|
-
|
|
342
|
-
|
|
341
|
+
a && (b.current = !0, v((C) => {
|
|
342
|
+
a(C);
|
|
343
343
|
})());
|
|
344
344
|
}
|
|
345
|
-
}) :
|
|
345
|
+
}) : u }) });
|
|
346
346
|
}
|
|
347
|
-
const
|
|
348
|
-
const e = {},
|
|
349
|
-
|
|
350
|
-
const { path: s, default:
|
|
351
|
-
Array.isArray(
|
|
347
|
+
const Vr = (r) => {
|
|
348
|
+
const e = {}, t = (n) => {
|
|
349
|
+
n.forEach((o) => {
|
|
350
|
+
const { path: s, default: i, inputs: a } = o;
|
|
351
|
+
Array.isArray(a) ? t(a) : T(e, s) === void 0 && R(e, s, i);
|
|
352
352
|
});
|
|
353
353
|
};
|
|
354
|
-
return Array.isArray(r.inputs) &&
|
|
354
|
+
return Array.isArray(r.inputs) && t(r.inputs), e;
|
|
355
355
|
};
|
|
356
|
-
function
|
|
357
|
-
const
|
|
358
|
-
const
|
|
359
|
-
return
|
|
356
|
+
function jr(r, e) {
|
|
357
|
+
const t = r.inputs.map((n) => {
|
|
358
|
+
const o = ar(e, n.path);
|
|
359
|
+
return o || n;
|
|
360
360
|
});
|
|
361
|
-
return { ...r, inputs:
|
|
361
|
+
return { ...r, inputs: t };
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
return r.inputs.find((
|
|
363
|
+
function ar(r, e) {
|
|
364
|
+
return r.inputs.find((t) => t.path === e);
|
|
365
365
|
}
|
|
366
|
-
const
|
|
367
|
-
function
|
|
366
|
+
const Ee = "__temp_", Pr = (r) => Ee + r.split(".").join("__");
|
|
367
|
+
function or(r) {
|
|
368
368
|
const e = { ...r };
|
|
369
|
-
return
|
|
370
|
-
|
|
369
|
+
return ge(e, (t, n) => {
|
|
370
|
+
n.startsWith(Ee) && delete e[n];
|
|
371
371
|
}), e;
|
|
372
372
|
}
|
|
373
|
-
const
|
|
373
|
+
const ur = "Required field";
|
|
374
374
|
function k(r) {
|
|
375
375
|
let e;
|
|
376
376
|
if (typeof r == "string")
|
|
@@ -383,74 +383,74 @@ function k(r) {
|
|
|
383
383
|
e = r;
|
|
384
384
|
if (typeof e == "string")
|
|
385
385
|
return e;
|
|
386
|
-
if (
|
|
386
|
+
if (w(e))
|
|
387
387
|
return k(e[0]);
|
|
388
|
-
const
|
|
389
|
-
return
|
|
390
|
-
}
|
|
391
|
-
function
|
|
392
|
-
let
|
|
393
|
-
if (Z(
|
|
394
|
-
const s =
|
|
395
|
-
|
|
388
|
+
const t = e;
|
|
389
|
+
return be(t) && (t != null && t.message) ? e == null ? void 0 : e.message : "Unknown error";
|
|
390
|
+
}
|
|
391
|
+
function cr(r, e, t) {
|
|
392
|
+
let n = {};
|
|
393
|
+
if (Z(n, r.inputs, e, t), t != null && t.prefix) {
|
|
394
|
+
const s = t == null ? void 0 : t.prefix.replace(/.$/, "");
|
|
395
|
+
n = R({}, s, n);
|
|
396
396
|
}
|
|
397
|
-
return
|
|
398
|
-
}
|
|
399
|
-
function
|
|
400
|
-
const
|
|
401
|
-
if (
|
|
402
|
-
const
|
|
403
|
-
for (let
|
|
404
|
-
if (
|
|
405
|
-
const
|
|
406
|
-
s.push(
|
|
397
|
+
return p.object(D(n, e, t));
|
|
398
|
+
}
|
|
399
|
+
function fr(r, e, t) {
|
|
400
|
+
const n = Object.keys(r).filter((i) => /^\d+$/.test(i) && !i.startsWith("_")).map((i) => parseInt(i, 10)).sort((i, a) => i - a);
|
|
401
|
+
if (n.length === 0) return null;
|
|
402
|
+
const o = Math.max(...n), s = [];
|
|
403
|
+
for (let i = 0; i <= o; i++)
|
|
404
|
+
if (n.includes(i)) {
|
|
405
|
+
const a = r[i], c = D({ item: a }, e, t);
|
|
406
|
+
s.push(c.item || p.any().optional());
|
|
407
407
|
} else
|
|
408
|
-
s.push(
|
|
409
|
-
return
|
|
408
|
+
s.push(p.any().optional());
|
|
409
|
+
return p.tuple(s).rest(p.any()).optional();
|
|
410
410
|
}
|
|
411
|
-
function D(r, e,
|
|
412
|
-
const
|
|
413
|
-
return Object.keys(r).forEach((
|
|
411
|
+
function D(r, e, t) {
|
|
412
|
+
const n = {};
|
|
413
|
+
return Object.keys(r).forEach((o) => {
|
|
414
414
|
const {
|
|
415
415
|
_requiredOnly: s,
|
|
416
|
-
_schemaObj:
|
|
417
|
-
_input:
|
|
418
|
-
_isList:
|
|
419
|
-
_isArrayItem:
|
|
420
|
-
_isTuple:
|
|
416
|
+
_schemaObj: i,
|
|
417
|
+
_input: a,
|
|
418
|
+
_isList: c,
|
|
419
|
+
_isArrayItem: l,
|
|
420
|
+
_isTuple: u,
|
|
421
421
|
_schema: d
|
|
422
422
|
/*...nestedSchemaObj*/
|
|
423
|
-
} = r[
|
|
424
|
-
if (
|
|
425
|
-
const
|
|
426
|
-
if (
|
|
427
|
-
|
|
423
|
+
} = r[o];
|
|
424
|
+
if (u && !c && !l) {
|
|
425
|
+
const f = fr(r[o], e, t);
|
|
426
|
+
if (f) {
|
|
427
|
+
n[o] = f;
|
|
428
428
|
return;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
if (
|
|
432
|
-
const
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
]),
|
|
436
|
-
|
|
437
|
-
} else if (
|
|
438
|
-
const
|
|
439
|
-
|
|
440
|
-
} else if (d &&
|
|
441
|
-
const
|
|
442
|
-
|
|
443
|
-
} else s &&
|
|
444
|
-
}),
|
|
431
|
+
if (c && i && a) {
|
|
432
|
+
const f = p.object(D(i, e, t)), m = p.union([
|
|
433
|
+
p.array(f).optional(),
|
|
434
|
+
Se(a, t)
|
|
435
|
+
]), b = ye(d, a, e, t, m);
|
|
436
|
+
n[o] = b;
|
|
437
|
+
} else if (l && a) {
|
|
438
|
+
const f = i != null && i.___array ? D({ ___array: i.___array }, e, t) : { ___array: p.any() }, m = lr(f, a, t), b = ye(d, a, e, t, m);
|
|
439
|
+
n[o] = b;
|
|
440
|
+
} else if (d && a) {
|
|
441
|
+
const f = dr(d, a, e, t);
|
|
442
|
+
n[o] = f;
|
|
443
|
+
} else s && a ? n[o] = Y(a, t) : n[o] = p.object(D(r[o], e, t)).optional();
|
|
444
|
+
}), n;
|
|
445
445
|
}
|
|
446
|
-
function
|
|
447
|
-
return
|
|
448
|
-
var
|
|
449
|
-
if ((
|
|
450
|
-
const s = e.validationConfig.globalValidation(
|
|
446
|
+
function Se(r, e) {
|
|
447
|
+
return p.string().superRefine((t, n) => {
|
|
448
|
+
var o;
|
|
449
|
+
if ((o = e == null ? void 0 : e.validationConfig) != null && o.globalValidation) {
|
|
450
|
+
const s = e.validationConfig.globalValidation(t, r, e.metadata);
|
|
451
451
|
if (s.error)
|
|
452
|
-
return
|
|
453
|
-
code:
|
|
452
|
+
return n.addIssue({
|
|
453
|
+
code: p.ZodIssueCode.custom,
|
|
454
454
|
message: s.error
|
|
455
455
|
}), !1;
|
|
456
456
|
if (!s.continue)
|
|
@@ -459,116 +459,116 @@ function Ee(r, e) {
|
|
|
459
459
|
return !0;
|
|
460
460
|
});
|
|
461
461
|
}
|
|
462
|
-
function
|
|
463
|
-
return
|
|
462
|
+
function lr(r, e, t) {
|
|
463
|
+
return p.union([p.array(r.___array).optional(), Se(e, t)]);
|
|
464
464
|
}
|
|
465
|
-
function
|
|
466
|
-
return
|
|
467
|
-
var
|
|
468
|
-
if (e.required && !(await
|
|
465
|
+
function dr(r, e, t, n) {
|
|
466
|
+
return p.any().optional().superRefine(async (o, s) => {
|
|
467
|
+
var a, c;
|
|
468
|
+
if (e.required && !(await Y(e, n).safeParseAsync(o)).success)
|
|
469
469
|
return s.addIssue({
|
|
470
|
-
code:
|
|
471
|
-
message:
|
|
472
|
-
}),
|
|
473
|
-
if ((
|
|
474
|
-
const
|
|
475
|
-
if (
|
|
470
|
+
code: p.ZodIssueCode.custom,
|
|
471
|
+
message: Q(e, n)
|
|
472
|
+
}), p.NEVER;
|
|
473
|
+
if ((a = n == null ? void 0 : n.validationConfig) != null && a.globalValidation) {
|
|
474
|
+
const l = (c = n == null ? void 0 : n.validationConfig) == null ? void 0 : c.globalValidation(o, e, n.metadata);
|
|
475
|
+
if (l.error)
|
|
476
476
|
return s.addIssue({
|
|
477
|
-
code:
|
|
478
|
-
message:
|
|
479
|
-
}),
|
|
480
|
-
if (!
|
|
477
|
+
code: p.ZodIssueCode.custom,
|
|
478
|
+
message: l.error
|
|
479
|
+
}), p.NEVER;
|
|
480
|
+
if (!l.continue)
|
|
481
481
|
return !0;
|
|
482
482
|
}
|
|
483
|
-
const
|
|
484
|
-
if (
|
|
485
|
-
const
|
|
486
|
-
if (!
|
|
487
|
-
const
|
|
483
|
+
const i = _e(r, t);
|
|
484
|
+
if (i) {
|
|
485
|
+
const l = await i.safeParseAsync(o);
|
|
486
|
+
if (!l.success) {
|
|
487
|
+
const u = k(l == null ? void 0 : l.error.message), d = u === "Required" ? Q(e, n) : u;
|
|
488
488
|
s.addIssue({
|
|
489
|
-
code:
|
|
489
|
+
code: p.ZodIssueCode.custom,
|
|
490
490
|
message: d
|
|
491
491
|
});
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
});
|
|
495
495
|
}
|
|
496
|
-
function
|
|
497
|
-
return
|
|
498
|
-
var
|
|
499
|
-
const
|
|
500
|
-
if (e.required && !
|
|
501
|
-
const
|
|
502
|
-
return
|
|
496
|
+
function ye(r, e, t, n, o) {
|
|
497
|
+
return p.any().optional().superRefine(async (s, i) => {
|
|
498
|
+
var u, d;
|
|
499
|
+
const c = await Y(e, n).safeParseAsync(s);
|
|
500
|
+
if (e.required && !c.success) {
|
|
501
|
+
const f = k(c.error.message);
|
|
502
|
+
return i.addIssue({ code: p.ZodIssueCode.custom, message: f, fatal: !0 }), p.NEVER;
|
|
503
503
|
}
|
|
504
|
-
if (!e.required && !
|
|
505
|
-
return
|
|
506
|
-
if ((
|
|
507
|
-
const
|
|
508
|
-
if (
|
|
509
|
-
return
|
|
510
|
-
code:
|
|
511
|
-
message: k(
|
|
512
|
-
}),
|
|
513
|
-
if (!
|
|
504
|
+
if (!e.required && !c.success)
|
|
505
|
+
return p.NEVER;
|
|
506
|
+
if ((u = n == null ? void 0 : n.validationConfig) != null && u.globalValidation) {
|
|
507
|
+
const f = (d = n == null ? void 0 : n.validationConfig) == null ? void 0 : d.globalValidation(s, e, n.metadata);
|
|
508
|
+
if (f.error)
|
|
509
|
+
return i.addIssue({
|
|
510
|
+
code: p.ZodIssueCode.custom,
|
|
511
|
+
message: k(f.error)
|
|
512
|
+
}), p.NEVER;
|
|
513
|
+
if (!f.continue)
|
|
514
514
|
return !0;
|
|
515
515
|
}
|
|
516
|
-
if (!
|
|
517
|
-
return
|
|
518
|
-
code:
|
|
516
|
+
if (!w(s))
|
|
517
|
+
return i.addIssue({
|
|
518
|
+
code: p.ZodIssueCode.custom,
|
|
519
519
|
message: "'Value is not array'"
|
|
520
|
-
}),
|
|
521
|
-
const
|
|
522
|
-
if (
|
|
523
|
-
const
|
|
524
|
-
if (!
|
|
525
|
-
return
|
|
526
|
-
code:
|
|
527
|
-
message: k(
|
|
528
|
-
}),
|
|
520
|
+
}), p.NEVER;
|
|
521
|
+
const l = _e(r, t);
|
|
522
|
+
if (l) {
|
|
523
|
+
const f = await l.safeParseAsync(s);
|
|
524
|
+
if (!f.success)
|
|
525
|
+
return i.addIssue({
|
|
526
|
+
code: p.ZodIssueCode.custom,
|
|
527
|
+
message: k(f.error.message)
|
|
528
|
+
}), p.NEVER;
|
|
529
529
|
}
|
|
530
|
-
}).pipe(
|
|
530
|
+
}).pipe(o ?? p.any());
|
|
531
531
|
}
|
|
532
|
-
function Z(r, e,
|
|
532
|
+
function Z(r, e, t, n, o) {
|
|
533
533
|
e.forEach((s) => {
|
|
534
|
-
var
|
|
535
|
-
const
|
|
536
|
-
if (!s.isVisible || (
|
|
537
|
-
const
|
|
538
|
-
if ((
|
|
534
|
+
var a, c, l, u, d, f, m;
|
|
535
|
+
const i = t;
|
|
536
|
+
if (!s.isVisible || (a = s.isVisible) != null && a.call(s, i, n == null ? void 0 : n.metadata)) {
|
|
537
|
+
const b = T(r, s.path);
|
|
538
|
+
if ((c = s.validation) != null && c.schema ? R(
|
|
539
539
|
r,
|
|
540
540
|
s.path,
|
|
541
|
-
A(
|
|
542
|
-
_schema: (
|
|
541
|
+
A(b, {
|
|
542
|
+
_schema: (l = s.validation) == null ? void 0 : l.schema,
|
|
543
543
|
_input: s
|
|
544
544
|
})
|
|
545
|
-
) : s.required &&
|
|
546
|
-
const
|
|
545
|
+
) : s.required && R(r, s.path, A(b, { _requiredOnly: !0, _input: s })), s.inputs && Z(r, s.inputs, t, n), s.inputType === "list") {
|
|
546
|
+
const h = {};
|
|
547
547
|
Z(
|
|
548
|
-
|
|
549
|
-
(d = (
|
|
548
|
+
h,
|
|
549
|
+
(d = (u = s.inputConfig) == null ? void 0 : u.inputs) == null ? void 0 : d.map((y) => ({
|
|
550
550
|
...y,
|
|
551
551
|
path: y.relativePath
|
|
552
552
|
})),
|
|
553
|
-
|
|
554
|
-
|
|
553
|
+
t,
|
|
554
|
+
n
|
|
555
555
|
);
|
|
556
|
-
const v =
|
|
557
|
-
|
|
556
|
+
const v = T(r, s.path);
|
|
557
|
+
R(r, s.path, A(v, { _schemaObj: h, _isList: !0, _input: s }));
|
|
558
558
|
}
|
|
559
|
-
if (!((
|
|
560
|
-
const
|
|
559
|
+
if (!((f = s.validation) != null && f.schema) && s.inputType === "array") {
|
|
560
|
+
const h = {};
|
|
561
561
|
Z(
|
|
562
|
-
|
|
562
|
+
h,
|
|
563
563
|
[{ ...s.inputConfig.input, path: "___array" }],
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
),
|
|
564
|
+
t,
|
|
565
|
+
n
|
|
566
|
+
), R(
|
|
567
567
|
r,
|
|
568
568
|
s.path,
|
|
569
|
-
A(
|
|
570
|
-
_schemaObj:
|
|
571
|
-
_schema: (
|
|
569
|
+
A(b, {
|
|
570
|
+
_schemaObj: h,
|
|
571
|
+
_schema: (m = s.validation) == null ? void 0 : m.schema,
|
|
572
572
|
_isArrayItem: !0,
|
|
573
573
|
_input: s
|
|
574
574
|
})
|
|
@@ -576,87 +576,87 @@ function Z(r, e, n, t, i) {
|
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
578
|
}), e.forEach((s) => {
|
|
579
|
-
var
|
|
580
|
-
const
|
|
581
|
-
if ((!s.isVisible || (
|
|
582
|
-
const
|
|
583
|
-
|
|
584
|
-
if (
|
|
585
|
-
const d =
|
|
586
|
-
|
|
579
|
+
var a;
|
|
580
|
+
const i = t;
|
|
581
|
+
if ((!s.isVisible || (a = s.isVisible) != null && a.call(s, i, n == null ? void 0 : n.metadata)) && s.path) {
|
|
582
|
+
const c = s.path.split(".");
|
|
583
|
+
c.forEach((l, u) => {
|
|
584
|
+
if (u > 0 && /^\d+$/.test(l)) {
|
|
585
|
+
const d = c.slice(0, u).join("."), f = d ? T(r, d) : r;
|
|
586
|
+
f && typeof f == "object" && (f._isTuple = !0);
|
|
587
587
|
}
|
|
588
588
|
});
|
|
589
589
|
}
|
|
590
590
|
});
|
|
591
591
|
}
|
|
592
|
-
function
|
|
593
|
-
var
|
|
594
|
-
return ((
|
|
595
|
-
}
|
|
596
|
-
function
|
|
597
|
-
var
|
|
598
|
-
if ((
|
|
599
|
-
return (
|
|
600
|
-
if ((
|
|
601
|
-
return (
|
|
602
|
-
const
|
|
603
|
-
return
|
|
604
|
-
typeof
|
|
605
|
-
code:
|
|
606
|
-
message:
|
|
607
|
-
}), (
|
|
608
|
-
code:
|
|
609
|
-
message:
|
|
592
|
+
function Q(r, e) {
|
|
593
|
+
var t, n, o;
|
|
594
|
+
return ((n = (t = e == null ? void 0 : e.validationConfig) == null ? void 0 : t.requiredMessagePerInput) == null ? void 0 : n[r.inputType]) ?? ((o = e == null ? void 0 : e.validationConfig) == null ? void 0 : o.requiredMessage) ?? ur;
|
|
595
|
+
}
|
|
596
|
+
function Y(r, e) {
|
|
597
|
+
var n, o, s, i, a, c;
|
|
598
|
+
if ((o = (n = e == null ? void 0 : e.validationConfig) == null ? void 0 : n.requiredSchemaPerInput) != null && o[r.inputType])
|
|
599
|
+
return (i = (s = e == null ? void 0 : e.validationConfig) == null ? void 0 : s.requiredSchemaPerInput) == null ? void 0 : i[r.inputType];
|
|
600
|
+
if ((a = e == null ? void 0 : e.validationConfig) != null && a.requiredSchema)
|
|
601
|
+
return (c = e == null ? void 0 : e.validationConfig) == null ? void 0 : c.requiredSchema;
|
|
602
|
+
const t = Q(r, e);
|
|
603
|
+
return p.any().optional().superRefine((l, u) => {
|
|
604
|
+
typeof l == "object" && J(l) && u.addIssue({
|
|
605
|
+
code: p.ZodIssueCode.custom,
|
|
606
|
+
message: t
|
|
607
|
+
}), (L(l) || l === "") && u.addIssue({
|
|
608
|
+
code: p.ZodIssueCode.custom,
|
|
609
|
+
message: t
|
|
610
610
|
});
|
|
611
611
|
});
|
|
612
612
|
}
|
|
613
|
-
function
|
|
614
|
-
if (r instanceof
|
|
613
|
+
function _e(r, e) {
|
|
614
|
+
if (r instanceof p.ZodType)
|
|
615
615
|
return r;
|
|
616
616
|
if (typeof r == "function")
|
|
617
617
|
return r(e);
|
|
618
618
|
}
|
|
619
|
-
const
|
|
620
|
-
const
|
|
619
|
+
const mr = (r) => Array.isArray(r == null ? void 0 : r.errors), pr = (r, e) => {
|
|
620
|
+
const t = {};
|
|
621
621
|
for (; r.length; ) {
|
|
622
|
-
const
|
|
623
|
-
if (!
|
|
624
|
-
if ("unionErrors" in
|
|
625
|
-
const
|
|
626
|
-
|
|
627
|
-
message:
|
|
628
|
-
type:
|
|
622
|
+
const n = r[0], { code: o, message: s, path: i } = n, a = i.join(".");
|
|
623
|
+
if (!t[a])
|
|
624
|
+
if ("unionErrors" in n) {
|
|
625
|
+
const c = n.unionErrors[0].errors[0];
|
|
626
|
+
t[a] = {
|
|
627
|
+
message: c.message,
|
|
628
|
+
type: c.code
|
|
629
629
|
};
|
|
630
630
|
} else
|
|
631
|
-
|
|
632
|
-
"unionErrors" in
|
|
631
|
+
t[a] = { message: s, type: o };
|
|
632
|
+
"unionErrors" in n && n.unionErrors.forEach((c) => c.errors.forEach((l) => r.push(l)));
|
|
633
633
|
{
|
|
634
|
-
const
|
|
635
|
-
|
|
636
|
-
|
|
634
|
+
const c = t[a].types, l = c && c[n.code];
|
|
635
|
+
t[a] = Ke(
|
|
636
|
+
a,
|
|
637
637
|
e,
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
638
|
+
t,
|
|
639
|
+
o,
|
|
640
|
+
l ? [].concat(l, n.message) : n.message
|
|
641
641
|
);
|
|
642
642
|
}
|
|
643
643
|
r.shift();
|
|
644
644
|
}
|
|
645
|
-
return
|
|
645
|
+
return t;
|
|
646
646
|
};
|
|
647
|
-
function
|
|
648
|
-
return
|
|
649
|
-
async (
|
|
647
|
+
function xr(r, e) {
|
|
648
|
+
return Ze(
|
|
649
|
+
async (t, n, o) => {
|
|
650
650
|
try {
|
|
651
|
-
return await
|
|
652
|
-
values:
|
|
651
|
+
return await cr(r, t, e).parseAsync(t), {
|
|
652
|
+
values: t,
|
|
653
653
|
errors: {}
|
|
654
654
|
};
|
|
655
655
|
} catch (s) {
|
|
656
|
-
if (
|
|
656
|
+
if (mr(s))
|
|
657
657
|
return {
|
|
658
658
|
values: {},
|
|
659
|
-
errors:
|
|
659
|
+
errors: Xe(pr(s.errors, !0), o)
|
|
660
660
|
};
|
|
661
661
|
throw s;
|
|
662
662
|
}
|
|
@@ -664,337 +664,346 @@ function wr(r, e) {
|
|
|
664
664
|
[r, e]
|
|
665
665
|
);
|
|
666
666
|
}
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
667
|
+
const G = (r, e) => r.level !== e.level ? r.level - e.level : r.isPrimitive ? 1 : -1, K = (r, e) => r.level !== e.level ? e.level - r.level : r.isPrimitive ? -1 : 1;
|
|
668
|
+
function W(r, e, t) {
|
|
669
|
+
T(r, e) === void 0 && t === void 0 || R(r, e, t);
|
|
670
|
+
}
|
|
671
|
+
function hr(r, e) {
|
|
672
|
+
const t = M(r), n = e.filter((a) => a.inputPriority === "early"), o = e.filter((a) => a.inputPriority === "normal"), s = e.filter((a) => a.inputPriority === "late");
|
|
673
|
+
return n.sort(G), o.sort(G), s.sort(G), [...n, ...o, ...s].forEach((a) => {
|
|
674
|
+
if (a.inputTransform) {
|
|
675
|
+
const c = w(a.inputTransform) ? a.inputTransform : [a.inputTransform];
|
|
676
|
+
let l;
|
|
677
|
+
const u = a.path.split(".");
|
|
678
|
+
if (u.length > 1) {
|
|
679
|
+
const d = u.slice(0, -1).join("."), f = T(t, d);
|
|
680
|
+
typeof f == "string" || typeof f == "number" || typeof f == "boolean" ? l = void 0 : l = T(t, a.path);
|
|
677
681
|
} else
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
const
|
|
681
|
-
|
|
682
|
+
l = T(t, a.path);
|
|
683
|
+
c.forEach((d) => {
|
|
684
|
+
const f = d(l, t);
|
|
685
|
+
f && (l = f.value, W(t, f.path ?? a.path, f.value));
|
|
682
686
|
});
|
|
683
687
|
}
|
|
684
|
-
}),
|
|
688
|
+
}), t;
|
|
685
689
|
}
|
|
686
|
-
function
|
|
687
|
-
const
|
|
688
|
-
|
|
689
|
-
n
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
690
|
+
function yr(r, e, t) {
|
|
691
|
+
const n = e.filter((u) => u.outputPriority === "early"), o = e.filter((u) => u.outputPriority === "normal"), s = e.filter((u) => u.outputPriority === "late");
|
|
692
|
+
n.sort(K), o.sort(K), s.sort(K);
|
|
693
|
+
const i = [...n, ...o, ...s], a = [];
|
|
694
|
+
let c = {};
|
|
695
|
+
t || (c = M(r));
|
|
696
|
+
const l = M(r);
|
|
697
|
+
return i.forEach((u) => {
|
|
698
|
+
if (u.outputTransform) {
|
|
699
|
+
const d = w(u.outputTransform) ? u.outputTransform : [u.outputTransform];
|
|
700
|
+
let f = T(l, u.path);
|
|
701
|
+
d.forEach((m) => {
|
|
702
|
+
const b = T(c, u.path), h = m(f, l, b, c);
|
|
703
|
+
if (h)
|
|
704
|
+
if (f = h.value, h.path) {
|
|
705
|
+
if (h.merge) {
|
|
706
|
+
const v = T(c, h.path);
|
|
707
|
+
let y;
|
|
708
|
+
v ? y = A({}, v, h.value) : y = h.value, W(c, h.path, y);
|
|
703
709
|
} else
|
|
704
|
-
|
|
705
|
-
|
|
710
|
+
W(c, h.path, h.value);
|
|
711
|
+
h.unset && a.push(u.path);
|
|
706
712
|
} else
|
|
707
|
-
|
|
713
|
+
W(c, u.path, h.value);
|
|
708
714
|
});
|
|
709
715
|
}
|
|
710
|
-
}),
|
|
711
|
-
|
|
712
|
-
}),
|
|
716
|
+
}), a.forEach((u) => {
|
|
717
|
+
ve(c, u);
|
|
718
|
+
}), c;
|
|
713
719
|
}
|
|
714
|
-
function
|
|
715
|
-
return r.reduce((
|
|
720
|
+
function z(r) {
|
|
721
|
+
return r.reduce((t, n) => Array.isArray(n.inputs) ? [...t, n, ...z(n.inputs)] : [...t, n], []);
|
|
716
722
|
}
|
|
717
|
-
const
|
|
723
|
+
const gr = (r) => {
|
|
718
724
|
if (r !== void 0)
|
|
719
725
|
return { value: r };
|
|
720
|
-
},
|
|
726
|
+
}, br = (r) => {
|
|
721
727
|
if (r !== void 0)
|
|
722
728
|
return { value: r };
|
|
723
729
|
};
|
|
724
|
-
function
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
730
|
+
function Re(r, e) {
|
|
731
|
+
return z(r.inputs).reduce((o, s) => {
|
|
732
|
+
var f, m;
|
|
733
|
+
const i = s.inputType === "text" || s.inputType === "boolean" || s.inputType === "number" || s.inputType === "textarea" || s.inputType === "select", a = !!s.inputTransform, c = !!s.outputTransform, l = Array.isArray(s.inputs) && s.inputs.length > 0, u = s.inputType === "list" || s.inputType === "array";
|
|
734
|
+
return a || c ? o.push({
|
|
728
735
|
path: s.path,
|
|
729
736
|
inputTransform: s.inputTransform,
|
|
730
737
|
outputTransform: s.outputTransform,
|
|
731
738
|
level: s.path.split(".").length,
|
|
732
|
-
isPrimitive:
|
|
733
|
-
|
|
739
|
+
isPrimitive: i,
|
|
740
|
+
inputPriority: ((f = s.transformerPriority) == null ? void 0 : f.input) ?? "normal",
|
|
741
|
+
outputPriority: ((m = s.transformerPriority) == null ? void 0 : m.output) ?? "normal"
|
|
742
|
+
}) : e && !(l || u) && o.push({
|
|
734
743
|
path: s.path,
|
|
735
|
-
inputTransform:
|
|
736
|
-
outputTransform:
|
|
744
|
+
inputTransform: gr,
|
|
745
|
+
outputTransform: br,
|
|
737
746
|
level: s.path.split(".").length,
|
|
738
|
-
isPrimitive:
|
|
739
|
-
|
|
747
|
+
isPrimitive: i,
|
|
748
|
+
inputPriority: "normal",
|
|
749
|
+
outputPriority: "normal"
|
|
750
|
+
}), o;
|
|
740
751
|
}, []);
|
|
741
|
-
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
Array.isArray(o) ? n(o) : s !== void 0 && O(e, a, s);
|
|
752
|
+
}
|
|
753
|
+
function vr(r, e, t, n = {}) {
|
|
754
|
+
const { preserve: o } = n, s = z(r.inputs), i = M(e);
|
|
755
|
+
return s.forEach((a) => {
|
|
756
|
+
o && o.includes(a.path) || a.isVisible && !a.isVisible(e, t) && ve(i, a.path);
|
|
757
|
+
}), i;
|
|
758
|
+
}
|
|
759
|
+
function Fr(r, e) {
|
|
760
|
+
const t = Re(e);
|
|
761
|
+
return hr(r, t);
|
|
762
|
+
}
|
|
763
|
+
function qr(r, e, t, n = {}) {
|
|
764
|
+
const o = n.cleanOutput, s = Re(e, o);
|
|
765
|
+
let i = vr(e, r, t, n);
|
|
766
|
+
return i = yr(i, s, n.cleanOutput), i = or(i), i;
|
|
767
|
+
}
|
|
768
|
+
function Ar(r) {
|
|
769
|
+
const e = {}, t = (n) => {
|
|
770
|
+
n.forEach((o) => {
|
|
771
|
+
const { default: s, path: i, inputs: a } = o;
|
|
772
|
+
Array.isArray(a) ? t(a) : s !== void 0 && R(e, i, s);
|
|
763
773
|
});
|
|
764
774
|
};
|
|
765
|
-
return Array.isArray(r.inputs) &&
|
|
775
|
+
return Array.isArray(r.inputs) && t(r.inputs), e;
|
|
766
776
|
}
|
|
767
|
-
function
|
|
777
|
+
function kr() {
|
|
768
778
|
return function(r, e) {
|
|
769
779
|
if (!(typeof r > "u"))
|
|
770
|
-
return !r || !
|
|
771
|
-
value: Object.getOwnPropertyNames(r).map((
|
|
780
|
+
return !r || !xe(r) ? { value: r } : {
|
|
781
|
+
value: Object.getOwnPropertyNames(r).map((t) => ({ key: t, value: r[t] }))
|
|
772
782
|
};
|
|
773
783
|
};
|
|
774
784
|
}
|
|
775
|
-
function
|
|
776
|
-
return function(e
|
|
785
|
+
function Dr(r) {
|
|
786
|
+
return function(e) {
|
|
777
787
|
if (typeof e > "u") return;
|
|
778
|
-
if (!e || !
|
|
788
|
+
if (!e || !w(e)) return { value: e };
|
|
779
789
|
const t = {
|
|
780
|
-
value: e.reduce((
|
|
781
|
-
...
|
|
782
|
-
[
|
|
790
|
+
value: e.reduce((n, o) => ({
|
|
791
|
+
...n,
|
|
792
|
+
[o.key]: r != null && r.assignKeyToValue ? o.key : o.value ?? (r == null ? void 0 : r.fallbackValue)
|
|
783
793
|
}), {})
|
|
784
794
|
};
|
|
785
795
|
return r != null && r.unsetIfEmpty && Object.getOwnPropertyNames(t.value).length === 0 ? { value: void 0 } : t;
|
|
786
796
|
};
|
|
787
797
|
}
|
|
788
|
-
function
|
|
789
|
-
return function(r
|
|
798
|
+
function Mr() {
|
|
799
|
+
return function(r) {
|
|
790
800
|
if (!(typeof r > "u"))
|
|
791
|
-
return
|
|
801
|
+
return w(r) && J(r) ? { value: void 0 } : { value: r };
|
|
792
802
|
};
|
|
793
803
|
}
|
|
794
|
-
function
|
|
795
|
-
return function(
|
|
796
|
-
|
|
797
|
-
if (!(typeof
|
|
798
|
-
if (
|
|
799
|
-
if (
|
|
800
|
-
const
|
|
801
|
-
|
|
802
|
-
return { value: void 0, path: r };
|
|
804
|
+
function $r(r, e) {
|
|
805
|
+
return function(t, n, o, s) {
|
|
806
|
+
let i;
|
|
807
|
+
if (r ? i = T(e && s ? s : n, r) : i = e ? o : t, !(typeof i > "u")) {
|
|
808
|
+
if (Te(i)) return { value: void 0, path: r };
|
|
809
|
+
if (be(i)) {
|
|
810
|
+
const a = we(M(i));
|
|
811
|
+
return Object.getOwnPropertyNames(a).length === 0 ? { value: void 0, path: r } : void 0;
|
|
803
812
|
}
|
|
804
|
-
return { value:
|
|
813
|
+
return { value: i, path: r };
|
|
805
814
|
}
|
|
806
815
|
};
|
|
807
816
|
}
|
|
808
|
-
function
|
|
809
|
-
return function(r
|
|
817
|
+
function Nr() {
|
|
818
|
+
return function(r) {
|
|
810
819
|
if (!(typeof r > "u"))
|
|
811
|
-
return
|
|
820
|
+
return Fe(r) && J(r) ? { value: void 0 } : { value: r };
|
|
812
821
|
};
|
|
813
822
|
}
|
|
814
|
-
function
|
|
815
|
-
return function(e,
|
|
816
|
-
const
|
|
817
|
-
if (typeof
|
|
818
|
-
return { value:
|
|
819
|
-
if (!(typeof
|
|
823
|
+
function Br(r) {
|
|
824
|
+
return function(e, t) {
|
|
825
|
+
const n = T(t, r);
|
|
826
|
+
if (typeof n == "string")
|
|
827
|
+
return { value: n };
|
|
828
|
+
if (!(typeof n == "number" || typeof n == "boolean") && e !== void 0)
|
|
820
829
|
return { value: e };
|
|
821
830
|
};
|
|
822
831
|
}
|
|
823
|
-
function
|
|
824
|
-
return function(e, n) {
|
|
832
|
+
function Zr(r) {
|
|
833
|
+
return function(e, t, n, o) {
|
|
825
834
|
if (typeof e > "u") return;
|
|
826
835
|
if (!e) return { value: e };
|
|
827
|
-
const
|
|
828
|
-
if (typeof
|
|
829
|
-
const i =
|
|
836
|
+
const s = T(o || t, r);
|
|
837
|
+
if (typeof s == "object") {
|
|
838
|
+
const i = we(s);
|
|
830
839
|
if (Object.getOwnPropertyNames(i).length === 1)
|
|
831
840
|
return { value: e, path: r };
|
|
832
841
|
}
|
|
833
842
|
return { value: e };
|
|
834
843
|
};
|
|
835
844
|
}
|
|
836
|
-
function
|
|
837
|
-
return function(e,
|
|
838
|
-
const
|
|
839
|
-
if (typeof
|
|
840
|
-
return { value: [
|
|
841
|
-
if (!(typeof
|
|
845
|
+
function Wr(r) {
|
|
846
|
+
return function(e, t) {
|
|
847
|
+
const n = T(t, r);
|
|
848
|
+
if (typeof n == "string")
|
|
849
|
+
return { value: [n] };
|
|
850
|
+
if (!(typeof n == "number" || typeof n == "boolean") && e !== void 0)
|
|
842
851
|
return { value: e };
|
|
843
852
|
};
|
|
844
853
|
}
|
|
845
|
-
function
|
|
846
|
-
return function(
|
|
847
|
-
if (typeof
|
|
848
|
-
if (!
|
|
849
|
-
const
|
|
850
|
-
if (
|
|
851
|
-
if (
|
|
852
|
-
return { value:
|
|
853
|
-
if (
|
|
854
|
+
function Jr(r, e) {
|
|
855
|
+
return function(t, n) {
|
|
856
|
+
if (typeof t > "u") return;
|
|
857
|
+
if (!t) return { value: t };
|
|
858
|
+
const o = T(n, r);
|
|
859
|
+
if (w(o)) {
|
|
860
|
+
if (o.length === 1)
|
|
861
|
+
return { value: o[0], path: r };
|
|
862
|
+
if (o.length === 0 && e != null && e.unsetIfEmpty)
|
|
854
863
|
return { value: void 0, path: r };
|
|
855
864
|
}
|
|
856
|
-
return { value:
|
|
865
|
+
return { value: t };
|
|
857
866
|
};
|
|
858
867
|
}
|
|
859
|
-
function
|
|
860
|
-
return typeof r == "object" ? !Object.getOwnPropertyNames(r).some((e) => !
|
|
861
|
-
}
|
|
862
|
-
function
|
|
863
|
-
return
|
|
864
|
-
}
|
|
865
|
-
function
|
|
866
|
-
const { items: e, className:
|
|
867
|
-
return
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
const
|
|
871
|
-
const { inputs:
|
|
872
|
-
return s ? /* @__PURE__ */
|
|
873
|
-
|
|
874
|
-
/* @__PURE__ */
|
|
875
|
-
] }) : /* @__PURE__ */
|
|
876
|
-
|
|
877
|
-
/* @__PURE__ */
|
|
868
|
+
function Ie(r) {
|
|
869
|
+
return Ae(r) ? !0 : w(r) ? r.length === 0 : typeof r == "object" ? !Object.getOwnPropertyNames(r).some((e) => !Ie(r[e])) : L(r);
|
|
870
|
+
}
|
|
871
|
+
function we(r) {
|
|
872
|
+
return qe(r, (e) => typeof e == "object" ? Ie(e) : L(e));
|
|
873
|
+
}
|
|
874
|
+
function X(r) {
|
|
875
|
+
const { items: e, className: t, withoutWrapper: n = !0, ...o } = r, s = e.map((i) => /* @__PURE__ */ g.jsx(ir, { input: i, path: i.path, ...o }, `${i.inputType}_${i.path}`));
|
|
876
|
+
return n ? /* @__PURE__ */ g.jsx(g.Fragment, { children: s }) : /* @__PURE__ */ g.jsx("div", { className: t, children: s });
|
|
877
|
+
}
|
|
878
|
+
X.displayName = "RenderInputs";
|
|
879
|
+
const Tr = We((r, e) => {
|
|
880
|
+
const { inputs: t, className: n, factory: o, withoutWrapper: s } = r;
|
|
881
|
+
return s ? /* @__PURE__ */ g.jsxs(Je, { children: [
|
|
882
|
+
t.hero,
|
|
883
|
+
/* @__PURE__ */ g.jsx(X, { items: t.inputs, factory: o })
|
|
884
|
+
] }) : /* @__PURE__ */ g.jsxs("div", { className: n, ref: e, children: [
|
|
885
|
+
t.hero,
|
|
886
|
+
/* @__PURE__ */ g.jsx(X, { items: t.inputs, factory: o })
|
|
878
887
|
] });
|
|
879
888
|
});
|
|
880
|
-
|
|
881
|
-
function
|
|
889
|
+
Tr.displayName = "RenderForm";
|
|
890
|
+
function Lr(r) {
|
|
882
891
|
let e = !0;
|
|
883
|
-
return
|
|
884
|
-
e = e && (
|
|
892
|
+
return ge(r, (t) => {
|
|
893
|
+
e = e && (t === "" || Te(t) || L(t));
|
|
885
894
|
}), e;
|
|
886
895
|
}
|
|
887
|
-
const
|
|
888
|
-
let
|
|
896
|
+
const Ur = (r = "") => ke(r.split("_").join(" ")), Cr = (r, e = 2, t, n = 1e3) => {
|
|
897
|
+
let o = !1;
|
|
889
898
|
const s = () => {
|
|
890
899
|
requestAnimationFrame(() => {
|
|
891
|
-
|
|
900
|
+
o || (e -= 1, e <= 0 ? r() : s());
|
|
892
901
|
});
|
|
893
902
|
};
|
|
894
|
-
return
|
|
903
|
+
return t && Date.now() - t <= n ? (r(), () => {
|
|
895
904
|
}) : (s(), () => {
|
|
896
|
-
|
|
905
|
+
o = !0;
|
|
897
906
|
});
|
|
898
907
|
};
|
|
899
|
-
function
|
|
908
|
+
function Hr(r, e) {
|
|
900
909
|
return {
|
|
901
910
|
...r,
|
|
902
|
-
inputs: r.inputs.map((
|
|
911
|
+
inputs: r.inputs.map((t) => I(t, e))
|
|
903
912
|
};
|
|
904
913
|
}
|
|
905
|
-
function
|
|
906
|
-
var
|
|
907
|
-
const { override:
|
|
908
|
-
if ((
|
|
909
|
-
const d = ((
|
|
910
|
-
if (d.length > 0 ||
|
|
911
|
-
const
|
|
912
|
-
|
|
913
|
-
var
|
|
914
|
-
const v = d[
|
|
915
|
-
if (!v && y) return
|
|
916
|
-
if (v && !y) return
|
|
914
|
+
function I(r, e) {
|
|
915
|
+
var c, l, u;
|
|
916
|
+
const { override: t, ...n } = r, o = e && t ? t[e] : void 0, { inputConfig: s, ...i } = o || {}, a = o ? { ...n, ...i } : n;
|
|
917
|
+
if ((n.inputConfig || s) && (a.inputConfig = { ...n.inputConfig, ...s }), a.inputs && (a.inputs = a.inputs.map((d) => I(d, e))), a.inputType === "list" && a.inputConfig) {
|
|
918
|
+
const d = ((c = n.inputConfig) == null ? void 0 : c.inputs) || [], f = (s == null ? void 0 : s.inputs) || [];
|
|
919
|
+
if (d.length > 0 || f.length > 0) {
|
|
920
|
+
const m = Math.max(d.length, f.length);
|
|
921
|
+
a.inputConfig.inputs = Array.from({ length: m }, (b, h) => {
|
|
922
|
+
var E;
|
|
923
|
+
const v = d[h], y = f[h];
|
|
924
|
+
if (!v && y) return I(y, e);
|
|
925
|
+
if (v && !y) return I(v, e);
|
|
917
926
|
if (v && y) {
|
|
918
|
-
const
|
|
919
|
-
return e && y && (
|
|
927
|
+
const S = v.override ? { ...v.override } : {};
|
|
928
|
+
return e && y && (S[e] = (E = v.override) != null && E[e] ? { ...v.override[e], ...y } : y), I({ ...v, override: S }, e);
|
|
920
929
|
}
|
|
921
930
|
}).filter(Boolean);
|
|
922
|
-
} else
|
|
923
|
-
(
|
|
931
|
+
} else a.inputConfig.inputs && (a.inputConfig.inputs = a.inputConfig.inputs.map(
|
|
932
|
+
(m) => I(m, e)
|
|
924
933
|
));
|
|
925
934
|
}
|
|
926
|
-
if (
|
|
927
|
-
const d = (
|
|
928
|
-
if (d &&
|
|
929
|
-
const
|
|
930
|
-
e &&
|
|
931
|
-
{ ...d, override:
|
|
935
|
+
if (a.inputType === "array" && a.inputConfig) {
|
|
936
|
+
const d = (l = n.inputConfig) == null ? void 0 : l.input, f = s == null ? void 0 : s.input;
|
|
937
|
+
if (d && f) {
|
|
938
|
+
const m = d.override ? { ...d.override } : {};
|
|
939
|
+
e && f && (m[e] = (u = d.override) != null && u[e] ? { ...d.override[e], ...f } : f), a.inputConfig.input = I(
|
|
940
|
+
{ ...d, override: m },
|
|
932
941
|
e
|
|
933
942
|
);
|
|
934
|
-
} else
|
|
943
|
+
} else a.inputConfig.input && (a.inputConfig.input = I(a.inputConfig.input, e));
|
|
935
944
|
}
|
|
936
|
-
return
|
|
945
|
+
return a;
|
|
937
946
|
}
|
|
938
|
-
function
|
|
947
|
+
function Gr(r) {
|
|
939
948
|
const {
|
|
940
|
-
field: { onBlur: e, ...
|
|
941
|
-
...
|
|
942
|
-
} =
|
|
949
|
+
field: { onBlur: e, ...t },
|
|
950
|
+
...n
|
|
951
|
+
} = Qe(r), o = P(Date.now());
|
|
943
952
|
return {
|
|
944
|
-
...
|
|
953
|
+
...n,
|
|
945
954
|
field: {
|
|
946
|
-
...
|
|
947
|
-
onBlur:
|
|
955
|
+
...t,
|
|
956
|
+
onBlur: Cr(e, 2, o.current)
|
|
948
957
|
}
|
|
949
958
|
};
|
|
950
959
|
}
|
|
951
960
|
export {
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
961
|
+
Xr as Controller,
|
|
962
|
+
Yr as Form,
|
|
963
|
+
zr as FormProvider,
|
|
964
|
+
Ir as InputComponent,
|
|
965
|
+
ir as InputComponentRenderer,
|
|
966
|
+
Ce as InputFactory,
|
|
967
|
+
Ye as InputOverrideError,
|
|
968
|
+
Tr as RenderForm,
|
|
969
|
+
X as RenderInputs,
|
|
970
|
+
wr as RootForm,
|
|
971
|
+
Cr as afterFrames,
|
|
972
|
+
Hr as applyFormOverrides,
|
|
973
|
+
I as applyInputOverride,
|
|
974
|
+
Dr as arrayToObjectOutputTransformer,
|
|
975
|
+
Ar as collectDefaultValues,
|
|
976
|
+
Fr as convertDataToFormModel,
|
|
977
|
+
qr as convertFormModelToData,
|
|
978
|
+
Ur as generateReadableLabel,
|
|
979
|
+
et as get,
|
|
980
|
+
Vr as getDefaultValuesFromFormDefinition,
|
|
981
|
+
Pr as getTemporaryPath,
|
|
982
|
+
Re as getTransformers,
|
|
983
|
+
cr as getValidationSchema,
|
|
984
|
+
hr as inputTransformValues,
|
|
985
|
+
Lr as isChildrenEmpty,
|
|
986
|
+
kr as objectToArrayInputTransformer,
|
|
987
|
+
yr as outputTransformValues,
|
|
988
|
+
jr as overrideFormDefinition,
|
|
980
989
|
k as processValidationParseResponse,
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
990
|
+
or as removeTemporaryFieldsValue,
|
|
991
|
+
rt as set,
|
|
992
|
+
Wr as shorthandArrayInputTransformer,
|
|
993
|
+
Jr as shorthandArrayOutputTransformer,
|
|
994
|
+
Br as shorthandObjectInputTransformer,
|
|
995
|
+
Zr as shorthandObjectOutputTransformer,
|
|
996
|
+
Mr as unsetEmptyArrayOutputTransformer,
|
|
997
|
+
$r as unsetEmptyObjectOutputTransformer,
|
|
998
|
+
Nr as unsetEmptyStringOutputTransformer,
|
|
999
|
+
vr as unsetHiddenInputsValues,
|
|
1000
|
+
Gr as useController,
|
|
1001
|
+
tt as useFieldArray,
|
|
1002
|
+
nt as useForm,
|
|
1003
|
+
st as useFormContext,
|
|
1004
|
+
it as useFormState,
|
|
1005
|
+
nr as useRootFormContext,
|
|
1006
|
+
at as useWatch,
|
|
1007
|
+
xr as useZodValidationResolver
|
|
999
1008
|
};
|
|
1000
1009
|
//# sourceMappingURL=index.js.map
|