@firecms/formex 3.0.0-canary.23 → 3.0.0-canary.231

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/README.md CHANGED
@@ -14,11 +14,11 @@ Formex is a lightweight, flexible library designed to simplify form handling wit
14
14
  To install Formex, you can use either npm or yarn:
15
15
 
16
16
  ```sh
17
- npm install your-formex-package-name
17
+ npm install @firecms/formex
18
18
 
19
19
  # or if you're using yarn
20
20
 
21
- yarn add your-formex-package-name
21
+ yarn add @firecms/formex
22
22
  ```
23
23
 
24
24
  ## Quick Start
package/dist/Field.d.ts CHANGED
@@ -18,7 +18,6 @@ export interface FormexFieldProps<Value = any, FormValues extends object = any>
18
18
  field: FieldInputProps<Value>;
19
19
  form: FormexController<FormValues>;
20
20
  }
21
- export type FieldValidator = (value: any) => string | void | Promise<string | void>;
22
21
  export interface FieldConfig<Value, C extends React.ElementType | undefined = undefined> {
23
22
  /**
24
23
  * Component to render. Can either be a string e.g. 'select', 'input', or 'textarea', or a component.
package/dist/index.es.js CHANGED
@@ -1,172 +1,480 @@
1
- import * as x from "react";
2
- import b, { useContext as Q, useState as h, useEffect as U } from "react";
3
- import T from "react-fast-compare";
4
- const D = b.createContext({}), X = () => Q(D), nt = D.Provider, st = (t) => Array.isArray(t) && t.length === 0, M = (t) => typeof t == "function", y = (t) => t !== null && typeof t == "object", Y = (t) => String(Math.floor(Number(t))) === t, ot = (t) => Object.prototype.toString.call(t) === "[object String]", ct = (t) => t !== t, ut = (t) => x.Children.count(t) === 0, it = (t) => y(t) && M(t.then), at = (t) => t && y(t) && y(t.target);
5
- function lt(t) {
6
- if (t = t || (typeof document < "u" ? document : void 0), typeof t > "u")
1
+ import { c } from "react-compiler-runtime";
2
+ import * as React from "react";
3
+ import React__default, { useContext, useRef, useState, useEffect, useCallback, useMemo } from "react";
4
+ import equal from "react-fast-compare";
5
+ const FormexContext = React__default.createContext({});
6
+ const useFormex = () => {
7
+ return useContext(FormexContext);
8
+ };
9
+ const Formex = FormexContext.Provider;
10
+ const isEmptyArray = (value) => Array.isArray(value) && value.length === 0;
11
+ const isFunction = (obj) => typeof obj === "function";
12
+ const isObject = (obj) => obj !== null && typeof obj === "object";
13
+ const isInteger = (obj) => String(Math.floor(Number(obj))) === obj;
14
+ const isString = (obj) => Object.prototype.toString.call(obj) === "[object String]";
15
+ const isNaN = (obj) => obj !== obj;
16
+ const isEmptyChildren = (children) => React.Children.count(children) === 0;
17
+ const isPromise = (value) => isObject(value) && isFunction(value.then);
18
+ const isInputEvent = (value) => value && isObject(value) && isObject(value.target);
19
+ function getActiveElement(doc) {
20
+ doc = doc || (typeof document !== "undefined" ? document : void 0);
21
+ if (typeof doc === "undefined") {
7
22
  return null;
23
+ }
8
24
  try {
9
- return t.activeElement || t.body;
10
- } catch {
11
- return t.body;
25
+ return doc.activeElement || doc.body;
26
+ } catch (e) {
27
+ return doc.body;
12
28
  }
13
29
  }
14
- function F(t, a, n, u = 0) {
15
- const r = O(a);
16
- for (; t && u < r.length; )
17
- t = t[r[u++]];
18
- return u !== r.length && !t || t === void 0 ? n : t;
30
+ function getIn(obj, key, def, p = 0) {
31
+ const path = toPath(key);
32
+ while (obj && p < path.length) {
33
+ obj = obj[path[p++]];
34
+ }
35
+ if (p !== path.length && !obj) {
36
+ return def;
37
+ }
38
+ return obj === void 0 ? def : obj;
19
39
  }
20
- function Z(t, a, n) {
21
- const u = V(t);
22
- let r = u, e = 0;
23
- const i = O(a);
24
- for (; e < i.length - 1; e++) {
25
- const c = i[e], f = F(t, i.slice(0, e + 1));
26
- if (f && (y(f) || Array.isArray(f)))
27
- r = r[c] = V(f);
28
- else {
29
- const d = i[e + 1];
30
- r = r[c] = Y(d) && Number(d) >= 0 ? [] : {};
40
+ function setIn(obj, path, value) {
41
+ const res = clone(obj);
42
+ let resVal = res;
43
+ let i = 0;
44
+ const pathArray = toPath(path);
45
+ for (; i < pathArray.length - 1; i++) {
46
+ const currentPath = pathArray[i];
47
+ const currentObj = getIn(obj, pathArray.slice(0, i + 1));
48
+ if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {
49
+ resVal = resVal[currentPath] = clone(currentObj);
50
+ } else {
51
+ const nextPath = pathArray[i + 1];
52
+ resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};
31
53
  }
32
54
  }
33
- return (e === 0 ? t : r)[i[e]] === n ? t : (n === void 0 ? delete r[i[e]] : r[i[e]] = n, e === 0 && n === void 0 && delete u[i[e]], u);
55
+ if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {
56
+ return obj;
57
+ }
58
+ if (value === void 0) {
59
+ delete resVal[pathArray[i]];
60
+ } else {
61
+ resVal[pathArray[i]] = value;
62
+ }
63
+ if (i === 0 && value === void 0) {
64
+ delete res[pathArray[i]];
65
+ }
66
+ return res;
34
67
  }
35
- function j(t, a, n = /* @__PURE__ */ new WeakMap(), u = {}) {
36
- for (const r of Object.keys(t)) {
37
- const e = t[r];
38
- y(e) ? n.get(e) || (n.set(e, !0), u[r] = Array.isArray(e) ? [] : {}, j(e, a, n, u[r])) : u[r] = a;
68
+ function setNestedObjectValues(object, value, visited = /* @__PURE__ */ new WeakMap(), response = {}) {
69
+ for (const k of Object.keys(object)) {
70
+ const val = object[k];
71
+ if (isObject(val)) {
72
+ if (!visited.get(val)) {
73
+ visited.set(val, true);
74
+ response[k] = Array.isArray(val) ? [] : {};
75
+ setNestedObjectValues(val, value, visited, response[k]);
76
+ }
77
+ } else {
78
+ response[k] = value;
79
+ }
39
80
  }
40
- return u;
81
+ return response;
41
82
  }
42
- function V(t) {
43
- return Array.isArray(t) ? [...t] : typeof t == "object" && t !== null ? { ...t } : t;
83
+ function clone(value) {
84
+ if (Array.isArray(value)) {
85
+ return [...value];
86
+ } else if (typeof value === "object" && value !== null) {
87
+ return {
88
+ ...value
89
+ };
90
+ } else {
91
+ return value;
92
+ }
44
93
  }
45
- function O(t) {
46
- return Array.isArray(t) ? t : t.replace(/\[(\d+)]/g, ".$1").replace(/^\./, "").replace(/\.$/, "").split(".");
94
+ function toPath(value) {
95
+ if (Array.isArray(value)) return value;
96
+ return value.replace(/\[(\d+)]/g, ".$1").replace(/^\./, "").replace(/\.$/, "").split(".");
47
97
  }
48
- function ft({
49
- validate: t,
50
- name: a,
51
- children: n,
52
- as: u,
53
- // `as` is reserved in typescript lol
54
- // component,
55
- className: r,
56
- ...e
57
- }) {
58
- const i = X(), c = tt({ name: a, ...e }, i);
59
- if (M(n))
60
- return n({ field: c, form: i });
61
- const f = u || "input";
62
- if (typeof f == "string") {
63
- const { innerRef: d, ...p } = e;
64
- return x.createElement(
65
- f,
66
- { ref: d, ...c, ...p, className: r },
67
- n
68
- );
69
- }
70
- return x.createElement(f, { ...c, ...e, className: r }, n);
98
+ function Field(t0) {
99
+ const $ = c(37);
100
+ let children;
101
+ let className;
102
+ let is;
103
+ let name;
104
+ let props;
105
+ if ($[0] !== t0) {
106
+ const {
107
+ validate,
108
+ name: t12,
109
+ children: t22,
110
+ as: t3,
111
+ className: t4,
112
+ ...t5
113
+ } = t0;
114
+ name = t12;
115
+ children = t22;
116
+ is = t3;
117
+ className = t4;
118
+ props = t5;
119
+ $[0] = t0;
120
+ $[1] = children;
121
+ $[2] = className;
122
+ $[3] = is;
123
+ $[4] = name;
124
+ $[5] = props;
125
+ } else {
126
+ children = $[1];
127
+ className = $[2];
128
+ is = $[3];
129
+ name = $[4];
130
+ props = $[5];
131
+ }
132
+ const formex = useFormex();
133
+ let field;
134
+ let t1;
135
+ if ($[6] !== children || $[7] !== formex || $[8] !== name || $[9] !== props) {
136
+ t1 = Symbol.for("react.early_return_sentinel");
137
+ bb0: {
138
+ field = getFieldProps({
139
+ name,
140
+ ...props
141
+ }, formex);
142
+ if (isFunction(children)) {
143
+ t1 = children({
144
+ field,
145
+ form: formex
146
+ });
147
+ break bb0;
148
+ }
149
+ }
150
+ $[6] = children;
151
+ $[7] = formex;
152
+ $[8] = name;
153
+ $[9] = props;
154
+ $[10] = field;
155
+ $[11] = t1;
156
+ } else {
157
+ field = $[10];
158
+ t1 = $[11];
159
+ }
160
+ if (t1 !== Symbol.for("react.early_return_sentinel")) {
161
+ return t1;
162
+ }
163
+ const asElement = is || "input";
164
+ if (typeof asElement === "string") {
165
+ let innerRef;
166
+ let rest;
167
+ if ($[12] !== props) {
168
+ ({
169
+ innerRef,
170
+ ...rest
171
+ } = props);
172
+ $[12] = props;
173
+ $[13] = innerRef;
174
+ $[14] = rest;
175
+ } else {
176
+ innerRef = $[13];
177
+ rest = $[14];
178
+ }
179
+ let t22;
180
+ if ($[15] !== asElement || $[16] !== children || $[17] !== className || $[18] !== field || $[19] !== innerRef || $[20] !== rest) {
181
+ let t3;
182
+ if ($[22] !== className || $[23] !== field || $[24] !== innerRef || $[25] !== rest) {
183
+ t3 = {
184
+ ref: innerRef,
185
+ ...field,
186
+ ...rest,
187
+ className
188
+ };
189
+ $[22] = className;
190
+ $[23] = field;
191
+ $[24] = innerRef;
192
+ $[25] = rest;
193
+ $[26] = t3;
194
+ } else {
195
+ t3 = $[26];
196
+ }
197
+ t22 = React.createElement(asElement, t3, children);
198
+ $[15] = asElement;
199
+ $[16] = children;
200
+ $[17] = className;
201
+ $[18] = field;
202
+ $[19] = innerRef;
203
+ $[20] = rest;
204
+ $[21] = t22;
205
+ } else {
206
+ t22 = $[21];
207
+ }
208
+ return t22;
209
+ }
210
+ let t2;
211
+ if ($[27] !== asElement || $[28] !== children || $[29] !== className || $[30] !== field || $[31] !== props) {
212
+ let t3;
213
+ if ($[33] !== className || $[34] !== field || $[35] !== props) {
214
+ t3 = {
215
+ ...field,
216
+ ...props,
217
+ className
218
+ };
219
+ $[33] = className;
220
+ $[34] = field;
221
+ $[35] = props;
222
+ $[36] = t3;
223
+ } else {
224
+ t3 = $[36];
225
+ }
226
+ t2 = React.createElement(asElement, t3, children);
227
+ $[27] = asElement;
228
+ $[28] = children;
229
+ $[29] = className;
230
+ $[30] = field;
231
+ $[31] = props;
232
+ $[32] = t2;
233
+ } else {
234
+ t2 = $[32];
235
+ }
236
+ return t2;
71
237
  }
72
- const tt = (t, a) => {
73
- const n = y(t), u = n ? t.name : t, r = F(a.values, u), e = {
74
- name: u,
75
- value: r,
76
- onChange: a.handleChange,
77
- onBlur: a.handleBlur
238
+ const getFieldProps = (nameOrOptions, formex) => {
239
+ const isAnObject = isObject(nameOrOptions);
240
+ const name = isAnObject ? nameOrOptions.name : nameOrOptions;
241
+ const valueState = getIn(formex.values, name);
242
+ const field = {
243
+ name,
244
+ value: valueState,
245
+ onChange: formex.handleChange,
246
+ onBlur: formex.handleBlur
78
247
  };
79
- if (n) {
248
+ if (isAnObject) {
80
249
  const {
81
- type: i,
82
- value: c,
250
+ type,
251
+ value: valueProp,
83
252
  // value is special for checkboxes
84
- as: f,
85
- multiple: d
86
- } = t;
87
- i === "checkbox" ? c === void 0 ? e.checked = !!r : (e.checked = !!(Array.isArray(r) && ~r.indexOf(c)), e.value = c) : i === "radio" ? (e.checked = r === c, e.value = c) : f === "select" && d && (e.value = e.value || [], e.multiple = !0);
253
+ as: is,
254
+ multiple
255
+ } = nameOrOptions;
256
+ if (type === "checkbox") {
257
+ if (valueProp === void 0) {
258
+ field.checked = !!valueState;
259
+ } else {
260
+ field.checked = !!(Array.isArray(valueState) && ~valueState.indexOf(valueProp));
261
+ field.value = valueProp;
262
+ }
263
+ } else if (type === "radio") {
264
+ field.checked = valueState === valueProp;
265
+ field.value = valueProp;
266
+ } else if (is === "select" && multiple) {
267
+ field.value = field.value || [];
268
+ field.multiple = true;
269
+ }
88
270
  }
89
- return e;
271
+ return field;
90
272
  };
91
- function dt({ initialValues: t, initialErrors: a, validation: n, validateOnChange: u = !1, onSubmit: r, validateOnInitialRender: e = !1 }) {
92
- const i = b.useRef(t), c = b.useRef(t), [f, d] = h(t), [p, R] = h({}), [k, g] = h(a ?? {}), [_, A] = h(!1), [I, C] = h(0), [$, S] = h(!1), [q, w] = h(!1);
93
- U(() => {
94
- e && E();
273
+ function useCreateFormex({
274
+ initialValues,
275
+ initialErrors,
276
+ initialDirty,
277
+ validation,
278
+ validateOnChange = false,
279
+ validateOnInitialRender = false,
280
+ onSubmit,
281
+ onReset,
282
+ debugId
283
+ }) {
284
+ const initialValuesRef = useRef(initialValues);
285
+ const valuesRef = useRef(initialValues);
286
+ const debugIdRef = useRef(debugId);
287
+ const [values, setValuesInner] = useState(initialValues);
288
+ const [touchedState, setTouchedState] = useState({});
289
+ const [errors, setErrors] = useState(initialErrors ?? {});
290
+ const [dirty, setDirty] = useState(initialDirty ?? false);
291
+ const [submitCount, setSubmitCount] = useState(0);
292
+ const [isSubmitting, setIsSubmitting] = useState(false);
293
+ const [isValidating, setIsValidating] = useState(false);
294
+ const [version, setVersion] = useState(0);
295
+ const historyRef = useRef([initialValues]);
296
+ const historyIndexRef = useRef(0);
297
+ useEffect(() => {
298
+ if (validateOnInitialRender) {
299
+ validate();
300
+ }
301
+ }, []);
302
+ const setValues = useCallback((newValues) => {
303
+ valuesRef.current = newValues;
304
+ setValuesInner(newValues);
305
+ setDirty(!equal(initialValuesRef.current, newValues));
306
+ const newHistory = historyRef.current.slice(0, historyIndexRef.current + 1);
307
+ newHistory.push(newValues);
308
+ historyRef.current = newHistory;
309
+ historyIndexRef.current = newHistory.length - 1;
95
310
  }, []);
96
- const W = (s) => {
97
- c.current = s, d(s), A(T(i.current, s));
98
- }, E = async () => {
99
- w(!0);
100
- const s = c.current, o = await n?.(s);
101
- return g(o ?? {}), w(!1), o;
102
- }, N = (s, o, l) => {
103
- const m = Z(c.current, s, o);
104
- c.current = m, d(m), T(F(i.current, s), o) || A(!0), l && E();
105
- }, z = (s, o) => {
106
- const l = { ...k };
107
- o ? l[s] = o : delete l[s], g(l);
108
- }, v = (s, o, l) => {
109
- const m = { ...p };
110
- m[s] = o, R(m), l && E();
111
- }, G = (s) => {
112
- const o = s.target, l = o.type === "checkbox" ? o.checked : o.value, m = o.name;
113
- N(m, l, u), v(m, !0);
114
- }, H = (s) => {
115
- const l = s.target.name;
116
- v(l, !0);
117
- }, J = async (s) => {
118
- s?.preventDefault(), s?.stopPropagation(), S(!0), C(I + 1);
119
- const o = await n?.(c.current);
120
- o && Object.keys(o).length > 0 ? g(o) : (g({}), await r?.(c.current, B.current)), S(!1);
121
- }, K = (s) => {
311
+ const validate = useCallback(async () => {
312
+ setIsValidating(true);
313
+ const validationErrors = await validation?.(valuesRef.current);
314
+ setErrors(validationErrors ?? {});
315
+ setIsValidating(false);
316
+ return validationErrors;
317
+ }, [validation]);
318
+ const setFieldValue = useCallback((key, value, shouldValidate) => {
319
+ const newValues_0 = setIn(valuesRef.current, key, value);
320
+ valuesRef.current = newValues_0;
321
+ setValuesInner(newValues_0);
322
+ if (!equal(getIn(initialValuesRef.current, key), value)) {
323
+ setDirty(true);
324
+ }
325
+ if (shouldValidate) {
326
+ validate();
327
+ }
328
+ const newHistory_0 = historyRef.current.slice(0, historyIndexRef.current + 1);
329
+ newHistory_0.push(newValues_0);
330
+ historyRef.current = newHistory_0;
331
+ historyIndexRef.current = newHistory_0.length - 1;
332
+ }, [validate]);
333
+ const setFieldError = useCallback((key_0, error) => {
334
+ setErrors((prevErrors) => {
335
+ const newErrors = {
336
+ ...prevErrors
337
+ };
338
+ if (error) {
339
+ newErrors[key_0] = error;
340
+ } else {
341
+ delete newErrors[key_0];
342
+ }
343
+ return newErrors;
344
+ });
345
+ }, []);
346
+ const setFieldTouched = useCallback((key_1, touched, shouldValidate_0) => {
347
+ setTouchedState((prev) => ({
348
+ ...prev,
349
+ [key_1]: touched
350
+ }));
351
+ if (shouldValidate_0) {
352
+ validate();
353
+ }
354
+ }, [validate]);
355
+ const handleChange = useCallback((event) => {
356
+ const target = event.target;
357
+ let value_0;
358
+ if (target.type === "checkbox") {
359
+ value_0 = target.checked;
360
+ } else if (target.type === "number") {
361
+ value_0 = target.valueAsNumber;
362
+ } else {
363
+ value_0 = target.value;
364
+ }
365
+ const name = target.name;
366
+ setFieldValue(name, value_0, validateOnChange);
367
+ setFieldTouched(name, true);
368
+ }, [setFieldValue, setFieldTouched, validateOnChange]);
369
+ const handleBlur = useCallback((event_0) => {
370
+ const target_0 = event_0.target;
371
+ const name_0 = target_0.name;
372
+ setFieldTouched(name_0, true);
373
+ }, [setFieldTouched]);
374
+ const submit = useCallback(async (e) => {
375
+ e?.preventDefault();
376
+ e?.stopPropagation();
377
+ setIsSubmitting(true);
378
+ setSubmitCount((prev_0) => prev_0 + 1);
379
+ const validationErrors_0 = await validation?.(valuesRef.current);
380
+ if (validationErrors_0 && Object.keys(validationErrors_0).length > 0) {
381
+ setErrors(validationErrors_0);
382
+ } else {
383
+ setErrors({});
384
+ await onSubmit?.(valuesRef.current, controllerRef.current);
385
+ }
386
+ setIsSubmitting(false);
387
+ setVersion((prev_1) => prev_1 + 1);
388
+ }, [onSubmit, validation]);
389
+ const resetForm = useCallback((props) => {
122
390
  const {
123
- submitCount: o,
124
- values: l,
125
- errors: m,
126
- touched: L
127
- } = s ?? {};
128
- i.current = l ?? t, c.current = l ?? t, d(l ?? t), g(m ?? {}), R(L ?? {}), A(!1), C(o ?? 0);
129
- }, P = {
130
- values: f,
131
- initialValues: i.current,
132
- handleChange: G,
133
- isSubmitting: $,
134
- setSubmitting: S,
135
- setValues: W,
136
- setFieldValue: N,
137
- errors: k,
138
- setFieldError: z,
139
- touched: p,
140
- setFieldTouched: v,
141
- dirty: _,
142
- setDirty: A,
143
- handleSubmit: J,
144
- submitCount: I,
145
- setSubmitCount: C,
146
- handleBlur: H,
147
- validate: E,
148
- isValidating: q,
149
- resetForm: K
150
- }, B = b.useRef(P);
151
- return B.current = P, P;
391
+ submitCount: submitCountProp,
392
+ values: valuesProp,
393
+ errors: errorsProp,
394
+ touched: touchedProp
395
+ } = props ?? {};
396
+ valuesRef.current = valuesProp ?? initialValuesRef.current;
397
+ initialValuesRef.current = valuesProp ?? initialValuesRef.current;
398
+ setValuesInner(valuesProp ?? initialValuesRef.current);
399
+ setErrors(errorsProp ?? {});
400
+ setTouchedState(touchedProp ?? {});
401
+ setDirty(false);
402
+ setSubmitCount(submitCountProp ?? 0);
403
+ setVersion((prev_2) => prev_2 + 1);
404
+ onReset?.(controllerRef.current);
405
+ historyRef.current = [valuesProp ?? initialValuesRef.current];
406
+ historyIndexRef.current = 0;
407
+ }, [onReset]);
408
+ const undo = useCallback(() => {
409
+ if (historyIndexRef.current > 0) {
410
+ const newIndex = historyIndexRef.current - 1;
411
+ const newValues_1 = historyRef.current[newIndex];
412
+ setValuesInner(newValues_1);
413
+ valuesRef.current = newValues_1;
414
+ historyIndexRef.current = newIndex;
415
+ }
416
+ }, []);
417
+ const redo = useCallback(() => {
418
+ if (historyIndexRef.current < historyRef.current.length - 1) {
419
+ const newIndex_0 = historyIndexRef.current + 1;
420
+ const newValues_2 = historyRef.current[newIndex_0];
421
+ setValuesInner(newValues_2);
422
+ valuesRef.current = newValues_2;
423
+ historyIndexRef.current = newIndex_0;
424
+ }
425
+ }, []);
426
+ const controllerRef = useRef({});
427
+ const controller = useMemo(() => ({
428
+ values,
429
+ initialValues: initialValuesRef.current,
430
+ handleChange,
431
+ isSubmitting,
432
+ setSubmitting: setIsSubmitting,
433
+ setValues,
434
+ setFieldValue,
435
+ errors,
436
+ setFieldError,
437
+ touched: touchedState,
438
+ setFieldTouched,
439
+ dirty,
440
+ setDirty,
441
+ handleSubmit: submit,
442
+ submitCount,
443
+ setSubmitCount,
444
+ handleBlur,
445
+ validate,
446
+ isValidating,
447
+ resetForm,
448
+ version,
449
+ debugId: debugIdRef.current,
450
+ undo,
451
+ redo,
452
+ canUndo: historyIndexRef.current > 0,
453
+ canRedo: historyIndexRef.current < historyRef.current.length - 1
454
+ }), [values, errors, touchedState, dirty, isSubmitting, submitCount, isValidating, version, handleChange, handleBlur, setValues, setFieldValue, setFieldTouched, setFieldError, validate, submit, resetForm, undo, redo]);
455
+ useEffect(() => {
456
+ controllerRef.current = controller;
457
+ }, [controller]);
458
+ return controller;
152
459
  }
153
460
  export {
154
- ft as Field,
155
- nt as Formex,
156
- lt as getActiveElement,
157
- F as getIn,
158
- st as isEmptyArray,
159
- ut as isEmptyChildren,
160
- M as isFunction,
161
- at as isInputEvent,
162
- Y as isInteger,
163
- ct as isNaN,
164
- y as isObject,
165
- it as isPromise,
166
- ot as isString,
167
- Z as setIn,
168
- j as setNestedObjectValues,
169
- dt as useCreateFormex,
170
- X as useFormex
461
+ Field,
462
+ Formex,
463
+ clone,
464
+ getActiveElement,
465
+ getIn,
466
+ isEmptyArray,
467
+ isEmptyChildren,
468
+ isFunction,
469
+ isInputEvent,
470
+ isInteger,
471
+ isNaN,
472
+ isObject,
473
+ isPromise,
474
+ isString,
475
+ setIn,
476
+ setNestedObjectValues,
477
+ useCreateFormex,
478
+ useFormex
171
479
  };
172
480
  //# sourceMappingURL=index.es.js.map