@levo-so/react 0.1.16 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/{CheckboxWidget-CNoS-2W3.js → CheckboxWidget-CZWSPzDj.js} +1 -1
  2. package/dist/{CollectionFormBuilder-MAo2Ob3a.js → CollectionFormBuilder-nZcXob6G.js} +17 -17
  3. package/dist/{CurrencyWidget-Cu1Cthnw.js → CurrencyWidget-CvosXYBi.js} +1 -1
  4. package/dist/{DateTimeWidget-N-wuCRSJ.js → DateTimeWidget-CE0EPFkl.js} +1 -1
  5. package/dist/{DefaultFormVariant-IqWi1BiT.js → DefaultFormVariant-DiaIcOyu.js} +2 -2
  6. package/dist/{DropdownWidget-BFttB4b-.js → DropdownWidget-BquZdGIL.js} +1 -1
  7. package/dist/{EmailWidget-D_SqXx3M.js → EmailWidget-KnkQjB4I.js} +1 -1
  8. package/dist/{FormCaptcha-CJ9KgDu0.js → FormCaptcha-DNPGf2xY.js} +68 -68
  9. package/dist/{GeocoderWidget-Bxt3TeAf.js → GeocoderWidget-DNkRmCVB.js} +1 -1
  10. package/dist/{MultiGeocoderWidget-DFjuXZBN.js → MultiGeocoderWidget-D2Vh9SuR.js} +2 -2
  11. package/dist/{MultiTextWidget-CZzT51cH.js → MultiTextWidget-Ktmx0-ou.js} +1 -1
  12. package/dist/{PhoneWidget--K5aS16s.js → PhoneWidget-2JMw1hQ-.js} +1 -1
  13. package/dist/{RadioWidget-BbMPtR3P.js → RadioWidget-CsMqjCtP.js} +1 -1
  14. package/dist/{RichTextWidget-Cce3Bw8d.js → RichTextWidget-CesaOZze.js} +1 -1
  15. package/dist/{StepsFormVariant-5wZbYAA9.js → StepsFormVariant-FXwgPUG0.js} +2 -2
  16. package/dist/{SwitchWidget-B0wkSWxa.js → SwitchWidget-W7FLoMLu.js} +1 -1
  17. package/dist/{TextWidget-ldbMuLB0.js → TextWidget-B6Y4Jjld.js} +1 -1
  18. package/dist/{TextareaWidget-S8bKUTv0.js → TextareaWidget-TszSrgEj.js} +1 -1
  19. package/dist/{ToggleCheckboxWidget-CPduXE6Y.js → ToggleCheckboxWidget-sJoiRMME.js} +1 -1
  20. package/dist/{URLWidget-KbhE2ZUA.js → URLWidget-BjFx8Uf7.js} +2 -2
  21. package/dist/{UploadWidget-DFvfDUT6.js → UploadWidget-Dzop6rEv.js} +1 -1
  22. package/dist/collection/index.js +1 -1
  23. package/dist/collection/lib/SaveDraftValues.d.ts.map +1 -1
  24. package/dist/collection/lib/hooks/useLevoForm.d.ts.map +1 -1
  25. package/dist/index.js +1 -1
  26. package/package.json +3 -3
@@ -3,7 +3,7 @@ import { j as a } from "./jsx-runtime-B6kdoens.js";
3
3
  import { useState as w, useEffect as B } from "react";
4
4
  import { useController as E } from "react-hook-form";
5
5
  import { c as C } from "./cn-C9QoOYNG.js";
6
- import { z as O, A as I, B as x } from "./CollectionFormBuilder-MAo2Ob3a.js";
6
+ import { z as O, A as I, B as x } from "./CollectionFormBuilder-nZcXob6G.js";
7
7
  import { C as g } from "./Checbox-sq-atGlJ.js";
8
8
  import { I as S } from "./Input-2CvZ90f8.js";
9
9
  const L = ({ field: i }) => {
@@ -919,26 +919,26 @@ const dt = E.lazy(
919
919
  }
920
920
  );
921
921
  }, pt = v(
922
- () => import("./MultiTextWidget-CZzT51cH.js")
923
- ), ie = v(() => import("./TextWidget-ldbMuLB0.js")), xt = v(
924
- () => import("./CurrencyWidget-Cu1Cthnw.js")
922
+ () => import("./MultiTextWidget-Ktmx0-ou.js")
923
+ ), ie = v(() => import("./TextWidget-B6Y4Jjld.js")), xt = v(
924
+ () => import("./CurrencyWidget-CvosXYBi.js")
925
925
  ), ht = v(
926
- () => import("./CheckboxWidget-CNoS-2W3.js")
926
+ () => import("./CheckboxWidget-CZWSPzDj.js")
927
927
  ), ce = v(
928
- () => import("./DateTimeWidget-N-wuCRSJ.js")
928
+ () => import("./DateTimeWidget-CE0EPFkl.js")
929
929
  ), de = v(
930
- () => import("./DropdownWidget-BFttB4b-.js")
931
- ), yt = v(() => import("./EmailWidget-D_SqXx3M.js")), ft = v(
932
- () => import("./GeocoderWidget-Bxt3TeAf.js")
930
+ () => import("./DropdownWidget-BquZdGIL.js")
931
+ ), yt = v(() => import("./EmailWidget-KnkQjB4I.js")), ft = v(
932
+ () => import("./GeocoderWidget-DNkRmCVB.js")
933
933
  ), jt = v(
934
- () => import("./MultiGeocoderWidget-DFjuXZBN.js")
935
- ), bt = v(() => import("./PhoneWidget--K5aS16s.js")), vt = v(() => import("./RadioWidget-BbMPtR3P.js")), Ct = v(
936
- () => import("./RichTextWidget-Cce3Bw8d.js")
937
- ), wt = v(() => import("./SwitchWidget-B0wkSWxa.js")), kt = v(
938
- () => import("./TextareaWidget-S8bKUTv0.js")
934
+ () => import("./MultiGeocoderWidget-D2Vh9SuR.js")
935
+ ), bt = v(() => import("./PhoneWidget-2JMw1hQ-.js")), vt = v(() => import("./RadioWidget-CsMqjCtP.js")), Ct = v(
936
+ () => import("./RichTextWidget-CesaOZze.js")
937
+ ), wt = v(() => import("./SwitchWidget-W7FLoMLu.js")), kt = v(
938
+ () => import("./TextareaWidget-TszSrgEj.js")
939
939
  ), Wt = v(
940
- () => import("./ToggleCheckboxWidget-CPduXE6Y.js")
941
- ), _t = v(() => import("./URLWidget-KbhE2ZUA.js")), K = v(() => import("./UploadWidget-DFvfDUT6.js")), Nt = ({
940
+ () => import("./ToggleCheckboxWidget-sJoiRMME.js")
941
+ ), _t = v(() => import("./URLWidget-BjFx8Uf7.js")), K = v(() => import("./UploadWidget-Dzop6rEv.js")), Nt = ({
942
942
  field: e,
943
943
  isInternal: n
944
944
  }) => {
@@ -1107,9 +1107,9 @@ const dt = E.lazy(
1107
1107
  e
1108
1108
  ] });
1109
1109
  }, ns = () => E.useContext(Ce), Tt = E.lazy(
1110
- () => import("./DefaultFormVariant-IqWi1BiT.js")
1110
+ () => import("./DefaultFormVariant-DiaIcOyu.js")
1111
1111
  ), Mt = E.lazy(
1112
- () => import("./StepsFormVariant-5wZbYAA9.js")
1112
+ () => import("./StepsFormVariant-FXwgPUG0.js")
1113
1113
  ), At = ({
1114
1114
  formVariant: e,
1115
1115
  ...n
@@ -2,7 +2,7 @@ import { j as t } from "./jsx-runtime-B6kdoens.js";
2
2
  import { useController as j } from "react-hook-form";
3
3
  import { NumericFormat as F } from "react-number-format";
4
4
  import { c as w } from "./cn-C9QoOYNG.js";
5
- import { z as C, A as B, B as N } from "./CollectionFormBuilder-MAo2Ob3a.js";
5
+ import { z as C, A as B, B as N } from "./CollectionFormBuilder-nZcXob6G.js";
6
6
  const V = ({
7
7
  field: r,
8
8
  ...m
@@ -4,7 +4,7 @@ import { Calendar as w, X as N } from "lucide-react";
4
4
  import * as l from "react-datepicker";
5
5
  import { useController as v } from "react-hook-form";
6
6
  import { c as p } from "./cn-C9QoOYNG.js";
7
- import { z as M, A as D, B as C } from "./CollectionFormBuilder-MAo2Ob3a.js";
7
+ import { z as M, A as D, B as C } from "./CollectionFormBuilder-nZcXob6G.js";
8
8
  import { I as F } from "./Input-2CvZ90f8.js";
9
9
  const T = l.default.default || l.default || l, I = (e) => {
10
10
  if (e) {
@@ -1,8 +1,8 @@
1
1
  import { j as e } from "./jsx-runtime-B6kdoens.js";
2
2
  import { FormProvider as y } from "react-hook-form";
3
3
  import { c as t } from "./cn-C9QoOYNG.js";
4
- import { D as F, F as g } from "./CollectionFormBuilder-MAo2Ob3a.js";
5
- import { u as w, S as N, F as b } from "./FormCaptcha-CJ9KgDu0.js";
4
+ import { D as F, F as g } from "./CollectionFormBuilder-nZcXob6G.js";
5
+ import { u as w, S as N, F as b } from "./FormCaptcha-DNPGf2xY.js";
6
6
  import { B as D } from "./Spinner-Bzu2xCFZ.js";
7
7
  const _ = () => {
8
8
  var n;
@@ -4,7 +4,7 @@ import { useState as x, useEffect as w } from "react";
4
4
  import { useController as B } from "react-hook-form";
5
5
  import D from "react-select";
6
6
  import { c as y } from "./cn-C9QoOYNG.js";
7
- import { z as N, A as k, B as q } from "./CollectionFormBuilder-MAo2Ob3a.js";
7
+ import { z as N, A as k, B as q } from "./CollectionFormBuilder-nZcXob6G.js";
8
8
  import { I as L } from "./Input-2CvZ90f8.js";
9
9
  const G = ({
10
10
  field: s,
@@ -1,7 +1,7 @@
1
1
  import { j as r } from "./jsx-runtime-B6kdoens.js";
2
2
  import { useController as y } from "react-hook-form";
3
3
  import { G as C } from "./Spinner-Bzu2xCFZ.js";
4
- import { z as F, A as I, B as V } from "./CollectionFormBuilder-MAo2Ob3a.js";
4
+ import { z as F, A as I, B as V } from "./CollectionFormBuilder-nZcXob6G.js";
5
5
  import { I as b } from "./Input-2CvZ90f8.js";
6
6
  function w(e) {
7
7
  return C({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M1.75 3h20.5c.966 0 1.75.784 1.75 1.75v14a1.75 1.75 0 0 1-1.75 1.75H1.75A1.75 1.75 0 0 1 0 18.75v-14C0 3.784.784 3 1.75 3ZM1.5 7.412V18.75c0 .138.112.25.25.25h20.5a.25.25 0 0 0 .25-.25V7.412l-9.52 6.433c-.592.4-1.368.4-1.96 0Zm0-2.662v.852l10.36 7a.25.25 0 0 0 .28 0l10.36-7V4.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z" }, child: [] }] })(e);
@@ -1,28 +1,28 @@
1
1
  "use client";
2
- import { useEffect as O, useState as L, useRef as N } from "react";
3
- import { useFormContext as B, useWatch as G, useForm as H, useController as z } from "react-hook-form";
4
- import { useDebouncedCallback as Q } from "use-debounce";
2
+ import { useEffect as O, useState as L, useRef as J } from "react";
3
+ import { useFormContext as W, useWatch as Y, useForm as B, useController as G } from "react-hook-form";
4
+ import { useDebouncedCallback as H } from "use-debounce";
5
5
  import { u as x } from "./LevoProvider-BAZy7_tP.js";
6
- import { D as C, c as T, s as X, h as Z, A as m } from "./CollectionFormBuilder-MAo2Ob3a.js";
7
- import { s as h } from "./Sonner-t6JVKA0a.js";
8
- import { e as U } from "./errorHandler-_34Yv8wA.js";
9
- import { a as tt } from "./isEmptyObject-C5s4GzLE.js";
10
- import { j as M } from "./jsx-runtime-B6kdoens.js";
6
+ import { D as C, s as z, h as Q, c as X, A as Z } from "./CollectionFormBuilder-nZcXob6G.js";
7
+ import { s as m } from "./Sonner-t6JVKA0a.js";
8
+ import { e as T } from "./errorHandler-_34Yv8wA.js";
9
+ import { a as h } from "./isEmptyObject-C5s4GzLE.js";
10
+ import { j as U } from "./jsx-runtime-B6kdoens.js";
11
11
  import "altcha";
12
12
  const R = {
13
13
  FORM_DIRTY: "form-dirty",
14
14
  FORM_VALUES: "form-values"
15
- }, et = (t) => {
15
+ }, tt = (t) => {
16
16
  const o = localStorage.getItem(`${t}-${R.FORM_VALUES}`);
17
17
  return o ? JSON.parse(o) : {};
18
- }, rt = (t, o) => {
18
+ }, et = (t, o) => {
19
19
  localStorage.setItem(
20
20
  `${t}-${R.FORM_VALUES}`,
21
21
  JSON.stringify(o)
22
22
  );
23
- }, J = (t) => {
23
+ }, M = (t) => {
24
24
  localStorage.removeItem(`${t}-${R.FORM_VALUES}`);
25
- }, nt = async ({
25
+ }, rt = async ({
26
26
  collection_key: t,
27
27
  data: o
28
28
  }) => {
@@ -37,93 +37,93 @@ const R = {
37
37
  }
38
38
  );
39
39
  return e != null && e.ok ? await e.json() : null;
40
- }, pt = ({ currentValues: t, isError: o, getContentId: c }) => {
40
+ }, yt = ({ currentValues: t, isError: o, getContentId: c }) => {
41
41
  var I;
42
- const { schema: e, isLoggedIn: f } = C(), r = B(), s = G(), S = Q((v) => {
43
- e != null && e.key && !o && e != null && e.allow_draft && (f ? nt({
42
+ const { schema: e, isLoggedIn: a } = C(), r = W(), s = Y(), g = H((v) => {
43
+ e != null && e.key && !o && e != null && e.allow_draft && (a ? rt({
44
44
  collection_key: e == null ? void 0 : e.key,
45
45
  data: v
46
46
  }).then((l) => {
47
- var E, k, _, d;
48
- (k = (E = l == null ? void 0 : l.content) == null ? void 0 : E.data) != null && k._id && c((d = (_ = l == null ? void 0 : l.content) == null ? void 0 : _.data) == null ? void 0 : d._id);
49
- }) : rt(e == null ? void 0 : e.key, v));
47
+ var E, _, V, d;
48
+ (_ = (E = l == null ? void 0 : l.content) == null ? void 0 : E.data) != null && _._id && c((d = (V = l == null ? void 0 : l.content) == null ? void 0 : V.data) == null ? void 0 : d._id);
49
+ }) : et(e == null ? void 0 : e.key, v));
50
50
  }, 2500);
51
51
  return O(() => {
52
52
  var v, l;
53
- o || (v = r == null ? void 0 : r.formState) != null && v.isDirty && ((l = Object == null ? void 0 : Object.keys(s || {})) == null ? void 0 : l.length) > 0 && S({
54
- currentValues: t,
53
+ o || (v = r == null ? void 0 : r.formState) != null && v.isDirty && ((l = Object == null ? void 0 : Object.keys(s || {})) == null ? void 0 : l.length) > 0 && (g.cancel(), g({
54
+ ...t,
55
55
  ...s
56
- });
57
- }, [(I = r == null ? void 0 : r.formState) == null ? void 0 : I.isDirty, o, f, s]), null;
58
- }, gt = ({
56
+ }));
57
+ }, [(I = r == null ? void 0 : r.formState) == null ? void 0 : I.isDirty, o, a, s]), null;
58
+ }, pt = ({
59
59
  schema: t,
60
60
  saveToRemote: o,
61
61
  onSubmit: c,
62
62
  onSubmitSuccess: e,
63
- onSubmitError: f
63
+ onSubmitError: a
64
64
  }) => {
65
65
  const { collection: r } = x(), {
66
66
  toastConfig: s,
67
- onSuccess: S,
67
+ onSuccess: g,
68
68
  onError: I,
69
69
  isLoggedIn: v,
70
70
  isDisabled: l,
71
71
  externalInitialValues: E = {}
72
- } = C(), [k, _] = L({}), [d, w] = L(null), [P, $] = L(!1), [q, A] = L(!1), n = N({}), K = T(t), V = H({
72
+ } = C(), [_, V] = L({}), [d, w] = L(null), [N, $] = L(!1), [P, A] = L(!1), n = J({}), F = B({
73
73
  mode: "all",
74
74
  disabled: l,
75
- defaultValues: K,
76
- values: k,
75
+ defaultValues: _,
76
+ values: _,
77
77
  resetOptions: {
78
78
  keepErrors: !0
79
79
  }
80
- }), W = V.handleSubmit(async (y) => {
81
- var F, g, p, i, j, D;
80
+ }), q = F.handleSubmit(async (y) => {
81
+ var k, S, p, i, j, D;
82
82
  if (n.current = {
83
83
  ...n.current || {},
84
84
  ...y
85
85
  }, o && r) {
86
86
  if (t)
87
87
  try {
88
- const a = X(n == null ? void 0 : n.current, t);
88
+ const f = z(n == null ? void 0 : n.current, t);
89
89
  let u = null;
90
- if (d ? u = await (r == null ? void 0 : r.submitDraftEntry(t == null ? void 0 : t.key, a).catch((b) => (U(b), null))) : u = await (r == null ? void 0 : r.saveCollectionData({
90
+ if (d ? u = await (r == null ? void 0 : r.submitDraftEntry(t == null ? void 0 : t.key, f).catch((b) => (T(b), null))) : u = await (r == null ? void 0 : r.saveCollectionData({
91
91
  collection_id: t == null ? void 0 : t.id,
92
- data: a
93
- }).catch((b) => (U(b), null))), (F = u == null ? void 0 : u.content) != null && F.data)
94
- return s != null && s.showSuccessToast && h(
92
+ data: f
93
+ }).catch((b) => (T(b), null))), (k = u == null ? void 0 : u.content) != null && k.data)
94
+ return s != null && s.showSuccessToast && m(
95
95
  s.successToastText || "Form submitted successfully."
96
- ), n.current = tt(E) ? {} : { ...E }, J(t == null ? void 0 : t.key), w(null), S && S({
96
+ ), n.current = h(E) ? {} : { ...E }, M(t == null ? void 0 : t.key), w(null), g && g({
97
97
  schemaId: t == null ? void 0 : t.id,
98
- response: (g = u == null ? void 0 : u.content) == null ? void 0 : g.data
99
- }), e && e(), V.reset(), V.clearErrors(), !0;
98
+ response: (S = u == null ? void 0 : u.content) == null ? void 0 : S.data
99
+ }), e && e(), F.reset(), F.clearErrors(), !0;
100
100
  throw new Error("Failed to save form details, API response invalid");
101
- } catch (a) {
102
- const u = (j = (i = (p = a == null ? void 0 : a.response) == null ? void 0 : p.data) == null ? void 0 : i.content) == null ? void 0 : j.errors;
103
- return Z(u, V.setError), f && f(u), I && I(((D = a == null ? void 0 : a.response) == null ? void 0 : D.data) || a), !1;
101
+ } catch (f) {
102
+ const u = (j = (i = (p = f == null ? void 0 : f.response) == null ? void 0 : p.data) == null ? void 0 : i.content) == null ? void 0 : j.errors;
103
+ return Q(u, F.setError), a && a(u), I && I(((D = f == null ? void 0 : f.response) == null ? void 0 : D.data) || f), !1;
104
104
  }
105
105
  return !1;
106
106
  }
107
107
  y && c && c(y);
108
- }), Y = (y) => {
108
+ }), K = (y) => {
109
109
  y && y !== d && w(y);
110
110
  };
111
111
  return O(() => {
112
112
  if (t && r) {
113
- const y = T(t);
113
+ const y = X(t);
114
114
  if (n.current = {
115
115
  ...y,
116
116
  ...E || {},
117
117
  ...n.current || {}
118
118
  }, !d && t != null && t.allow_draft) {
119
119
  if (v) {
120
- $(!0), r == null || r.getDraftEntry(t == null ? void 0 : t.key).then((g) => {
121
- if (g === null) {
120
+ $(!0), r == null || r.getDraftEntry(t == null ? void 0 : t.key).then((S) => {
121
+ if (S === null) {
122
122
  A(!0);
123
123
  return;
124
124
  }
125
125
  A(!1);
126
- const p = Array.isArray(g) ? g == null ? void 0 : g.filter((i) => (i == null ? void 0 : i._status) === "draft") : [];
126
+ const p = Array.isArray(S) ? S == null ? void 0 : S.filter((i) => (i == null ? void 0 : i._status) === "draft") : [];
127
127
  if ((p == null ? void 0 : p.length) > 0) {
128
128
  const i = (p == null ? void 0 : p[0]) || {};
129
129
  i != null && i._id && (n.current = {
@@ -132,50 +132,50 @@ const R = {
132
132
  }, w(i == null ? void 0 : i._id));
133
133
  }
134
134
  }).catch(() => null).finally(() => {
135
- _({
135
+ V({
136
136
  ...n == null ? void 0 : n.current
137
137
  }), $(!1);
138
138
  });
139
139
  return;
140
140
  }
141
- const F = et(t == null ? void 0 : t.key);
142
- F && (n.current = {
143
- ...F,
144
- ...n.current || {}
141
+ const k = tt(t == null ? void 0 : t.key);
142
+ k && (n.current = {
143
+ ...n.current || {},
144
+ ...k
145
145
  });
146
146
  }
147
- _({
147
+ V({
148
148
  ...(n == null ? void 0 : n.current) || {}
149
149
  });
150
150
  }
151
151
  }, [t]), O(() => {
152
- t && d && J(t == null ? void 0 : t.key);
152
+ t && d && M(t == null ? void 0 : t.key);
153
153
  }, [d]), {
154
- methods: V,
155
- isLoading: P,
156
- isError: q,
154
+ methods: F,
155
+ isLoading: N,
156
+ isError: P,
157
157
  contentId: d,
158
158
  allFormValues: n.current,
159
- handleContentId: Y,
160
- handleSubmit: W
159
+ handleContentId: K,
160
+ handleSubmit: q
161
161
  };
162
- }, St = () => {
163
- const { isInternal: t } = C(), { client: o } = x(), c = N(null), {
162
+ }, gt = () => {
163
+ const { isInternal: t } = C(), { client: o } = x(), c = J(null), {
164
164
  field: { onChange: e },
165
- fieldState: { error: f }
166
- } = z({
165
+ fieldState: { error: a }
166
+ } = G({
167
167
  name: "__captcha",
168
168
  rules: {
169
169
  required: t ? !1 : "Verification is required"
170
170
  }
171
171
  });
172
172
  return O(() => {
173
- const r = (S) => {
174
- "detail" in S && e(S.detail.state || null);
173
+ const r = (g) => {
174
+ "detail" in g && e(g.detail.state || null);
175
175
  }, { current: s } = c;
176
176
  if (s)
177
177
  return s.addEventListener("statechange", r), () => s.removeEventListener("statechange", r);
178
- }, []), /* @__PURE__ */ M.jsx(m, { error: f == null ? void 0 : f.message, children: /* @__PURE__ */ M.jsx(
178
+ }, []), /* @__PURE__ */ U.jsx(Z, { error: a == null ? void 0 : a.message, children: /* @__PURE__ */ U.jsx(
179
179
  "altcha-widget",
180
180
  {
181
181
  ref: c,
@@ -191,7 +191,7 @@ const R = {
191
191
  ) });
192
192
  };
193
193
  export {
194
- St as F,
195
- pt as S,
196
- gt as u
194
+ gt as F,
195
+ yt as S,
196
+ pt as u
197
197
  };
@@ -3,7 +3,7 @@ import { j as o } from "./jsx-runtime-B6kdoens.js";
3
3
  import { useState as p, useEffect as v } from "react";
4
4
  import { useController as z } from "react-hook-form";
5
5
  import { n as T } from "./Spinner-Bzu2xCFZ.js";
6
- import { z as k, A as q, B as A } from "./CollectionFormBuilder-MAo2Ob3a.js";
6
+ import { z as k, A as q, B as A } from "./CollectionFormBuilder-nZcXob6G.js";
7
7
  import { I as E } from "./Input-2CvZ90f8.js";
8
8
  import { u as O } from "./LevoProvider-BAZy7_tP.js";
9
9
  const $ = ({ field: t }) => {
@@ -2,8 +2,8 @@
2
2
  import { j as e } from "./jsx-runtime-B6kdoens.js";
3
3
  import { Plus as m } from "lucide-react";
4
4
  import { useFieldArray as n } from "react-hook-form";
5
- import { B as c } from "./CollectionFormBuilder-MAo2Ob3a.js";
6
- import { GeocoderWidget as d } from "./GeocoderWidget-Bxt3TeAf.js";
5
+ import { B as c } from "./CollectionFormBuilder-nZcXob6G.js";
6
+ import { GeocoderWidget as d } from "./GeocoderWidget-DNkRmCVB.js";
7
7
  import { B as p } from "./Spinner-Bzu2xCFZ.js";
8
8
  const k = ({
9
9
  field: l
@@ -1,6 +1,6 @@
1
1
  import { j as a } from "./jsx-runtime-B6kdoens.js";
2
2
  import { useController as A } from "react-hook-form";
3
- import { z as C, A as b, B as q } from "./CollectionFormBuilder-MAo2Ob3a.js";
3
+ import { z as C, A as b, B as q } from "./CollectionFormBuilder-nZcXob6G.js";
4
4
  import { I } from "./Input-2CvZ90f8.js";
5
5
  const f = ({ field: r }) => {
6
6
  var l;
@@ -3,7 +3,7 @@ import { j as o } from "./jsx-runtime-B6kdoens.js";
3
3
  import { useController as f } from "react-hook-form";
4
4
  import { PhoneInput as g } from "react-international-phone";
5
5
  import { c as l } from "./cn-C9QoOYNG.js";
6
- import { z as x, A as v, B as y } from "./CollectionFormBuilder-MAo2Ob3a.js";
6
+ import { z as x, A as v, B as y } from "./CollectionFormBuilder-nZcXob6G.js";
7
7
  const P = ({ field: e }) => {
8
8
  const { key: u = "", label: t = "", helper_text: c = "", readonly: n = !1 } = e, s = u, {
9
9
  field: { value: d, onBlur: a, onChange: i, ...m },
@@ -5,7 +5,7 @@ import * as d from "react";
5
5
  import { useController as F } from "react-hook-form";
6
6
  import { G as B } from "./Spinner-Bzu2xCFZ.js";
7
7
  import { c as N } from "./cn-C9QoOYNG.js";
8
- import { z as E, A as G, B as f } from "./CollectionFormBuilder-MAo2Ob3a.js";
8
+ import { z as E, A as G, B as f } from "./CollectionFormBuilder-nZcXob6G.js";
9
9
  import { I as V } from "./Input-2CvZ90f8.js";
10
10
  function q(s) {
11
11
  return B({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M416 128 192 384l-96-96" }, child: [] }] })(s);
@@ -19,7 +19,7 @@ import { useState as q, useEffect as D } from "react";
19
19
  import { useController as G } from "react-hook-form";
20
20
  import { G as p, o as J, p as V, q as W, r as Z, s as _, t as P, u as K, v as Q, w as X, x as Y, y as $, z as nn } from "./Spinner-Bzu2xCFZ.js";
21
21
  import { c as j } from "./cn-C9QoOYNG.js";
22
- import { z as ln, A as en, B as sn } from "./CollectionFormBuilder-MAo2Ob3a.js";
22
+ import { z as ln, A as en, B as sn } from "./CollectionFormBuilder-nZcXob6G.js";
23
23
  function an(n) {
24
24
  return p({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 0 1-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 0 1-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 0 0-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z" }, child: [] }] })(n);
25
25
  }
@@ -3,8 +3,8 @@ import { j as t } from "./jsx-runtime-B6kdoens.js";
3
3
  import { useState as I, useMemo as y } from "react";
4
4
  import { FormProvider as T } from "react-hook-form";
5
5
  import { c as F } from "./cn-C9QoOYNG.js";
6
- import { D as N, F as _ } from "./CollectionFormBuilder-MAo2Ob3a.js";
7
- import { u as C, S as H, F as M } from "./FormCaptcha-CJ9KgDu0.js";
6
+ import { D as N, F as _ } from "./CollectionFormBuilder-nZcXob6G.js";
7
+ import { u as C, S as H, F as M } from "./FormCaptcha-DNPGf2xY.js";
8
8
  import { B as g } from "./Spinner-Bzu2xCFZ.js";
9
9
  const Y = () => {
10
10
  const [n, a] = I(0), { containerStyles: m } = N(), l = () => {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { j as r } from "./jsx-runtime-B6kdoens.js";
3
3
  import { useController as k } from "react-hook-form";
4
- import { z as w, A as j, B as v } from "./CollectionFormBuilder-MAo2Ob3a.js";
4
+ import { z as w, A as j, B as v } from "./CollectionFormBuilder-nZcXob6G.js";
5
5
  import * as c from "@radix-ui/react-switch";
6
6
  import * as y from "react";
7
7
  import { c as d } from "./cn-C9QoOYNG.js";
@@ -1,7 +1,7 @@
1
1
  import { j as t } from "./jsx-runtime-B6kdoens.js";
2
2
  import { useFormContext as g, get as h } from "react-hook-form";
3
3
  import { c as j } from "./cn-C9QoOYNG.js";
4
- import { A as F, B as b, z as y } from "./CollectionFormBuilder-MAo2Ob3a.js";
4
+ import { A as F, B as b, z as y } from "./CollectionFormBuilder-nZcXob6G.js";
5
5
  import { I as f } from "./Input-2CvZ90f8.js";
6
6
  const k = ({
7
7
  field: r,
@@ -1,7 +1,7 @@
1
1
  import { j as s } from "./jsx-runtime-B6kdoens.js";
2
2
  import { useFormContext as u, get as x } from "react-hook-form";
3
3
  import { c as b } from "./cn-C9QoOYNG.js";
4
- import { A as g, B as f, z as h } from "./CollectionFormBuilder-MAo2Ob3a.js";
4
+ import { A as g, B as f, z as h } from "./CollectionFormBuilder-nZcXob6G.js";
5
5
  const w = ({ field: e }) => {
6
6
  var a;
7
7
  const {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { j as r } from "./jsx-runtime-B6kdoens.js";
3
3
  import { useController as p } from "react-hook-form";
4
- import { z as u, A as g, B as C } from "./CollectionFormBuilder-MAo2Ob3a.js";
4
+ import { z as u, A as g, B as C } from "./CollectionFormBuilder-nZcXob6G.js";
5
5
  import { C as f } from "./Checbox-sq-atGlJ.js";
6
6
  const y = ({
7
7
  field: e
@@ -1,6 +1,6 @@
1
1
  import { j as e } from "./jsx-runtime-B6kdoens.js";
2
- import { H as s } from "./CollectionFormBuilder-MAo2Ob3a.js";
3
- import r from "./TextWidget-ldbMuLB0.js";
2
+ import { H as s } from "./CollectionFormBuilder-nZcXob6G.js";
3
+ import r from "./TextWidget-B6Y4Jjld.js";
4
4
  const a = (t) => /* @__PURE__ */ e.jsx(
5
5
  r,
6
6
  {
@@ -5,7 +5,7 @@ import { X, Upload as O, ExternalLink as aa } from "lucide-react";
5
5
  import { useMemo as J, useState as U, useRef as ra, useEffect as M } from "react";
6
6
  import { useController as ta } from "react-hook-form";
7
7
  import { G as H, B as P, S as G, j as sa, T as ea, k as oa, l as $, m as V } from "./Spinner-Bzu2xCFZ.js";
8
- import { t as na, g as ca, z as la, w as C, A as da, B as ia } from "./CollectionFormBuilder-MAo2Ob3a.js";
8
+ import { t as na, g as ca, z as la, w as C, A as da, B as ia } from "./CollectionFormBuilder-nZcXob6G.js";
9
9
  import { u as k } from "./LevoProvider-BAZy7_tP.js";
10
10
  import { e as Y } from "./errorHandler-_34Yv8wA.js";
11
11
  import { I as K } from "./Input-2CvZ90f8.js";
@@ -1,4 +1,4 @@
1
- import { C as s, F as r, e as t, b as i, c as l, f as o, g as d, d as m, i as u, a as n, p as f, h as F, s as g, u as p, v as V } from "../CollectionFormBuilder-MAo2Ob3a.js";
1
+ import { C as s, F as r, e as t, b as i, c as l, f as o, g as d, d as m, i as u, a as n, p as f, h as F, s as g, u as p, v as V } from "../CollectionFormBuilder-nZcXob6G.js";
2
2
  import { default as h } from "validatorjs";
3
3
  export {
4
4
  s as CollectionFormBuilder,
@@ -1 +1 @@
1
- {"version":3,"file":"SaveDraftValues.d.ts","sourceRoot":"","sources":["../../../src/collection/lib/SaveDraftValues.tsx"],"names":[],"mappings":"AAgDA,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAuCA,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"SaveDraftValues.d.ts","sourceRoot":"","sources":["../../../src/collection/lib/SaveDraftValues.tsx"],"names":[],"mappings":"AAgDA,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAyCA,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useLevoForm.d.ts","sourceRoot":"","sources":["../../../../src/collection/lib/hooks/useLevoForm.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAQrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAMtD,eAAO,MAAM,WAAW,wEAMrB;IACD,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;CAC5C;;;;;;0BA8G8B,MAAM;;CA6FpC,CAAC"}
1
+ {"version":3,"file":"useLevoForm.d.ts","sourceRoot":"","sources":["../../../../src/collection/lib/hooks/useLevoForm.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAQrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAMtD,eAAO,MAAM,WAAW,wEAMrB;IACD,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;CAC5C;;;;;;0BA4G8B,MAAM;;CA6FpC,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { L as s, u as o } from "./LevoProvider-BAZy7_tP.js";
2
2
  import { L as t, a as r, b as l } from "./page-BKyDlf0z.js";
3
- import { C as m, F as p, x as d, y as g, m as T, r as f, j as u, n as c, e as x, b, c as D, f as y, g as F, d as v, k as h, o as L, i as M, a as E, w as P, t as B, p as O, h as V, s as j, u as C, v as I, l as S, q as K } from "./CollectionFormBuilder-MAo2Ob3a.js";
3
+ import { C as m, F as p, x as d, y as g, m as T, r as f, j as u, n as c, e as x, b, c as D, f as y, g as F, d as v, k as h, o as L, i as M, a as E, w as P, t as B, p as O, h as V, s as j, u as C, v as I, l as S, q as K } from "./CollectionFormBuilder-nZcXob6G.js";
4
4
  import { LevoOAuth as U } from "./membership/index.js";
5
5
  import { B as H, D as N, e as q, i as w, g as z, f as A, c as R, a as G, h as J, d as Q, j as X, S as Y, T as Z, m as _, k as $, l as aa, b as ea } from "./Spinner-Bzu2xCFZ.js";
6
6
  import { T as oa, e as ia, s as ta } from "./Sonner-t6JVKA0a.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levo-so/react",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "author": "Levo Engineering <devs@theinternetfolks.com>",
5
5
  "description": "Levo suite for React based applications",
6
6
  "type": "module",
@@ -91,8 +91,8 @@
91
91
  "vite": "5.4.3",
92
92
  "vite-plugin-dts": "4.1.0",
93
93
  "@levo/eslint-config": "0.0.0",
94
- "@levo/tw-config": "0.0.0",
95
- "@levo/ts-config": "0.0.0"
94
+ "@levo/ts-config": "0.0.0",
95
+ "@levo/tw-config": "0.0.0"
96
96
  },
97
97
  "main": "./dist/index.js",
98
98
  "module": "./dist/index.js",