@levo-so/react 0.1.2 → 0.1.5
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/{CheckboxWidget-BV2nPDdB.js → CheckboxWidget-Bnx-S2j2.js} +7 -7
- package/dist/{CollectionFormBuilder-uvr15jvu.js → CollectionFormBuilder-B_dXpvPN.js} +87 -88
- package/dist/{CurrencyWidget-VzBWDdzQ.js → CurrencyWidget-6Ov8DZpo.js} +6 -6
- package/dist/{DateTimeWidget-QmZXdxzS.js → DateTimeWidget-DI98zHMn.js} +7 -7
- package/dist/{DefaultFormVariant-DyyCGXvB.js → DefaultFormVariant-Bxbh1yc0.js} +22 -22
- package/dist/{DropdownWidget-CxWQF6r3.js → DropdownWidget-DrMkD9vK.js} +2 -2
- package/dist/{EmailWidget-BxxtgUGU.js → EmailWidget-DHjXwVCL.js} +2 -2
- package/dist/{GeocoderWidget-lh46EUHn.js → GeocoderWidget-D8GsLWkV.js} +83 -82
- package/dist/LevoProvider-Cp0CKrgY.js +212 -0
- package/dist/{MultiGeocoderWidget-C84ZYxpR.js → MultiGeocoderWidget-WzlKESyZ.js} +8 -8
- package/dist/{PhoneWidget-_-cBcZ_D.js → PhoneWidget-DQSo_DPX.js} +1 -1
- package/dist/{RadioWidget-BJ1qwTRO.js → RadioWidget-C8sTnz9B.js} +3 -3
- package/dist/{RichTextWidget-CC6uShje.js → RichTextWidget-DOMiJ9pX.js} +2 -2
- package/dist/{Spinner-CuUosd-S.js → Spinner-DzGH5rKe.js} +49 -49
- package/dist/{StepsFormVariant-BxANsU4Z.js → StepsFormVariant-CzS2wbMD.js} +8 -8
- package/dist/{SwitchWidget-CbCYweyx.js → SwitchWidget-CBottoNO.js} +1 -1
- package/dist/TextWidget-Dg-ZYJI2.js +33 -0
- package/dist/{TextareaWidget-Dqt4CVV-.js → TextareaWidget-wsUSnO28.js} +6 -6
- package/dist/{ToggleCheckboxWidget-D8CxllEX.js → ToggleCheckboxWidget-IeHYCie0.js} +1 -1
- package/dist/{URLWidget-C07DCMOd.js → URLWidget-BsIEpzV3.js} +2 -2
- package/dist/{UploadWidget-DoY_CPLy.js → UploadWidget-BJPmoAW-.js} +170 -168
- package/dist/audience/components/component.d.ts.map +1 -1
- package/dist/audience/index.js +1 -1
- package/dist/collection/components/CollectionFormBuilder.d.ts.map +1 -1
- package/dist/collection/components/renderer/RenderArrayWidget.d.ts.map +1 -1
- package/dist/collection/components/widgets/dateTimeWidget/DateTimeWidget.d.ts +1 -1
- package/dist/collection/components/widgets/dateTimeWidget/DateTimeWidget.d.ts.map +1 -1
- package/dist/collection/components/widgets/multiGeocoderWidget/MultiGeocoderWidget.d.ts.map +1 -1
- package/dist/collection/components/widgets/phoneWidget/PhoneWidget.d.ts.map +1 -1
- package/dist/collection/components/widgets/textWidget/TextWidget.d.ts.map +1 -1
- package/dist/collection/components/widgets/uploadWidget/FileUploadModal.d.ts.map +1 -1
- package/dist/collection/components/widgets/uploadWidget/UploadWidget.d.ts.map +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/lib/FormBuilder.d.ts.map +1 -1
- package/dist/collection/lib/hooks/useLevoForm.d.ts.map +1 -1
- package/dist/collection/utils/formHelpers.d.ts +1 -0
- package/dist/collection/utils/formHelpers.d.ts.map +1 -1
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{index-wTf_TtOG.js → index-BFJ48R-4.js} +1 -1
- package/dist/index.css +1 -0
- package/dist/index.js +5 -5
- package/dist/libs.css +1 -0
- package/dist/libs.d.ts +1 -0
- package/dist/membership/components/OAuth/Button.d.ts +1 -1
- package/dist/membership/components/OAuth/Button.d.ts.map +1 -1
- package/dist/membership/components/OAuth/Container.d.ts +1 -1
- package/dist/membership/components/OAuth/Container.d.ts.map +1 -1
- package/dist/membership/index.js +1 -1
- package/dist/page-YRcNFGqi.js +205 -0
- package/dist/providers/LevoProvider.d.ts +7 -7
- package/dist/providers/LevoProvider.d.ts.map +1 -1
- package/dist/{useLevoForm-B4Dmf73H.js → useLevoForm-HS_d5OoW.js} +7 -7
- package/package.json +72 -71
- package/dist/LevoProvider-DNbYyEaf.js +0 -21
- package/dist/TextWidget-CfEeuyFV.js +0 -33
- package/dist/page-CxaKoH22.js +0 -205
- package/dist/style.css +0 -1
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as h } from "./jsx-runtime-B6kdoens.js";
|
|
3
3
|
import le, { useState as J, useEffect as fe } from "react";
|
|
4
|
+
import { c as U } from "./LevoProvider-Cp0CKrgY.js";
|
|
4
5
|
import { useController as de } from "react-hook-form";
|
|
5
|
-
import { q as pe } from "./Spinner-
|
|
6
|
-
import { h as ge, j as me, k as ye } from "./CollectionFormBuilder-
|
|
6
|
+
import { q as pe } from "./Spinner-DzGH5rKe.js";
|
|
7
|
+
import { h as ge, j as me, k as ye } from "./CollectionFormBuilder-B_dXpvPN.js";
|
|
7
8
|
import { I as _e } from "./Input-2CvZ90f8.js";
|
|
8
|
-
var
|
|
9
|
+
var ne = {}, ve = "Expected a function", Y = NaN, be = "[object Symbol]", Se = /^\s+|\s+$/g, Pe = /^[-+]0x[0-9a-f]+$/i, Oe = /^0b[01]+$/i, he = /^0o[0-7]+$/i, Te = parseInt, je = typeof U == "object" && U && U.Object === Object && U, xe = typeof self == "object" && self && self.Object === Object && self, Ae = je || xe || Function("return this")(), Le = Object.prototype, Ee = Le.toString, Ie = Math.max, we = Math.min, $ = function() {
|
|
9
10
|
return Ae.Date.now();
|
|
10
11
|
};
|
|
11
|
-
function Ce(e,
|
|
12
|
-
var n, a, c, u, s, l,
|
|
12
|
+
function Ce(e, r, t) {
|
|
13
|
+
var n, a, c, u, s, l, m = 0, d = !1, v = !1, T = !0;
|
|
13
14
|
if (typeof e != "function")
|
|
14
15
|
throw new TypeError(ve);
|
|
15
|
-
|
|
16
|
+
r = Z(r) || 0, q(t) && (d = !!t.leading, v = "maxWait" in t, c = v ? Ie(Z(t.maxWait) || 0, r) : c, T = "trailing" in t ? !!t.trailing : T);
|
|
16
17
|
function P(i) {
|
|
17
18
|
var o = n, f = a;
|
|
18
|
-
return n = a = void 0,
|
|
19
|
+
return n = a = void 0, m = i, u = e.apply(f, o), u;
|
|
19
20
|
}
|
|
20
21
|
function j(i) {
|
|
21
|
-
return
|
|
22
|
+
return m = i, s = setTimeout(y, r), d ? P(i) : u;
|
|
22
23
|
}
|
|
23
24
|
function A(i) {
|
|
24
|
-
var o = i - l, f = i -
|
|
25
|
-
return v ?
|
|
25
|
+
var o = i - l, f = i - m, O = r - o;
|
|
26
|
+
return v ? we(O, c - f) : O;
|
|
26
27
|
}
|
|
27
28
|
function L(i) {
|
|
28
|
-
var o = i - l, f = i -
|
|
29
|
-
return l === void 0 || o >=
|
|
29
|
+
var o = i - l, f = i - m;
|
|
30
|
+
return l === void 0 || o >= r || o < 0 || v && f >= c;
|
|
30
31
|
}
|
|
31
32
|
function y() {
|
|
32
33
|
var i = $();
|
|
@@ -38,9 +39,9 @@ function Ce(e, t, r) {
|
|
|
38
39
|
return s = void 0, T && n ? P(i) : (n = a = void 0, u);
|
|
39
40
|
}
|
|
40
41
|
function E() {
|
|
41
|
-
s !== void 0 && clearTimeout(s),
|
|
42
|
+
s !== void 0 && clearTimeout(s), m = 0, n = l = a = s = void 0;
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function I() {
|
|
44
45
|
return s === void 0 ? u : b($());
|
|
45
46
|
}
|
|
46
47
|
function S() {
|
|
@@ -49,15 +50,15 @@ function Ce(e, t, r) {
|
|
|
49
50
|
if (s === void 0)
|
|
50
51
|
return j(l);
|
|
51
52
|
if (v)
|
|
52
|
-
return s = setTimeout(y,
|
|
53
|
+
return s = setTimeout(y, r), P(l);
|
|
53
54
|
}
|
|
54
|
-
return s === void 0 && (s = setTimeout(y,
|
|
55
|
+
return s === void 0 && (s = setTimeout(y, r)), u;
|
|
55
56
|
}
|
|
56
|
-
return S.cancel = E, S.flush =
|
|
57
|
+
return S.cancel = E, S.flush = I, S;
|
|
57
58
|
}
|
|
58
59
|
function q(e) {
|
|
59
|
-
var
|
|
60
|
-
return !!e && (
|
|
60
|
+
var r = typeof e;
|
|
61
|
+
return !!e && (r == "object" || r == "function");
|
|
61
62
|
}
|
|
62
63
|
function Me(e) {
|
|
63
64
|
return !!e && typeof e == "object";
|
|
@@ -71,14 +72,14 @@ function Z(e) {
|
|
|
71
72
|
if (ke(e))
|
|
72
73
|
return Y;
|
|
73
74
|
if (q(e)) {
|
|
74
|
-
var
|
|
75
|
-
e = q(
|
|
75
|
+
var r = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
76
|
+
e = q(r) ? r + "" : r;
|
|
76
77
|
}
|
|
77
78
|
if (typeof e != "string")
|
|
78
79
|
return e === 0 ? e : +e;
|
|
79
80
|
e = e.replace(Se, "");
|
|
80
|
-
var
|
|
81
|
-
return
|
|
81
|
+
var t = Oe.test(e);
|
|
82
|
+
return t || he.test(e) ? Te(e.slice(2), t ? 2 : 8) : Pe.test(e) ? Y : +e;
|
|
82
83
|
}
|
|
83
84
|
var Ge = Ce, k = {};
|
|
84
85
|
Object.defineProperty(k, "__esModule", {
|
|
@@ -87,10 +88,10 @@ Object.defineProperty(k, "__esModule", {
|
|
|
87
88
|
k.loadGoogleMapScript = k.isBrowser = void 0;
|
|
88
89
|
var oe = typeof window < "u" && window.document;
|
|
89
90
|
k.isBrowser = oe;
|
|
90
|
-
var Re = function(
|
|
91
|
+
var Re = function(r, t) {
|
|
91
92
|
if (!oe || typeof google < "u" && google.maps && google.maps.api)
|
|
92
93
|
return Promise.resolve();
|
|
93
|
-
var n = document.querySelectorAll('script[src*="'.concat(
|
|
94
|
+
var n = document.querySelectorAll('script[src*="'.concat(r, '"]'));
|
|
94
95
|
if (n && n.length)
|
|
95
96
|
return new Promise(function(u) {
|
|
96
97
|
if (typeof google < "u") return u();
|
|
@@ -98,7 +99,7 @@ var Re = function(t, r) {
|
|
|
98
99
|
return u();
|
|
99
100
|
});
|
|
100
101
|
});
|
|
101
|
-
var a = new URL(
|
|
102
|
+
var a = new URL(t);
|
|
102
103
|
a.searchParams.set("callback", "__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__");
|
|
103
104
|
var c = document.createElement("script");
|
|
104
105
|
return c.src = a.toString(), new Promise(function(u) {
|
|
@@ -116,67 +117,67 @@ N.GOOGLE_MAP_SCRIPT_BASE_URL = Be;
|
|
|
116
117
|
Object.defineProperty(ne, "__esModule", {
|
|
117
118
|
value: !0
|
|
118
119
|
});
|
|
119
|
-
var Ue = ne.default = Ve,
|
|
120
|
+
var Ue = ne.default = Ve, g = le, D = Qe(Ge), ee = k, Ne = N;
|
|
120
121
|
function Qe(e) {
|
|
121
122
|
return e && e.__esModule ? e : { default: e };
|
|
122
123
|
}
|
|
123
|
-
function
|
|
124
|
-
var
|
|
124
|
+
function re(e, r) {
|
|
125
|
+
var t = Object.keys(e);
|
|
125
126
|
if (Object.getOwnPropertySymbols) {
|
|
126
127
|
var n = Object.getOwnPropertySymbols(e);
|
|
127
|
-
|
|
128
|
+
r && (n = n.filter(function(a) {
|
|
128
129
|
return Object.getOwnPropertyDescriptor(e, a).enumerable;
|
|
129
|
-
})),
|
|
130
|
+
})), t.push.apply(t, n);
|
|
130
131
|
}
|
|
131
|
-
return
|
|
132
|
+
return t;
|
|
132
133
|
}
|
|
133
134
|
function C(e) {
|
|
134
|
-
for (var
|
|
135
|
-
var
|
|
136
|
-
|
|
137
|
-
$e(e, n,
|
|
138
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(
|
|
139
|
-
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(
|
|
135
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
136
|
+
var t = arguments[r] != null ? arguments[r] : {};
|
|
137
|
+
r % 2 ? re(Object(t), !0).forEach(function(n) {
|
|
138
|
+
$e(e, n, t[n]);
|
|
139
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : re(Object(t)).forEach(function(n) {
|
|
140
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
|
|
140
141
|
});
|
|
141
142
|
}
|
|
142
143
|
return e;
|
|
143
144
|
}
|
|
144
|
-
function $e(e,
|
|
145
|
-
return
|
|
145
|
+
function $e(e, r, t) {
|
|
146
|
+
return r in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e;
|
|
146
147
|
}
|
|
147
|
-
function M(e,
|
|
148
|
-
return We(e) || Ke(e,
|
|
148
|
+
function M(e, r) {
|
|
149
|
+
return We(e) || Ke(e, r) || Fe(e, r) || qe();
|
|
149
150
|
}
|
|
150
151
|
function qe() {
|
|
151
152
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
152
153
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
153
154
|
}
|
|
154
|
-
function Fe(e,
|
|
155
|
+
function Fe(e, r) {
|
|
155
156
|
if (e) {
|
|
156
|
-
if (typeof e == "string") return
|
|
157
|
-
var
|
|
158
|
-
if (
|
|
159
|
-
if (
|
|
157
|
+
if (typeof e == "string") return te(e, r);
|
|
158
|
+
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
159
|
+
if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set") return Array.from(e);
|
|
160
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return te(e, r);
|
|
160
161
|
}
|
|
161
162
|
}
|
|
162
|
-
function
|
|
163
|
-
(
|
|
164
|
-
for (var
|
|
165
|
-
n[
|
|
163
|
+
function te(e, r) {
|
|
164
|
+
(r == null || r > e.length) && (r = e.length);
|
|
165
|
+
for (var t = 0, n = new Array(r); t < r; t++)
|
|
166
|
+
n[t] = e[t];
|
|
166
167
|
return n;
|
|
167
168
|
}
|
|
168
|
-
function Ke(e,
|
|
169
|
-
var
|
|
170
|
-
if (
|
|
169
|
+
function Ke(e, r) {
|
|
170
|
+
var t = e && (typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]);
|
|
171
|
+
if (t != null) {
|
|
171
172
|
var n = [], a = !0, c = !1, u, s;
|
|
172
173
|
try {
|
|
173
|
-
for (
|
|
174
|
+
for (t = t.call(e); !(a = (u = t.next()).done) && (n.push(u.value), !(r && n.length === r)); a = !0)
|
|
174
175
|
;
|
|
175
176
|
} catch (l) {
|
|
176
177
|
c = !0, s = l;
|
|
177
178
|
} finally {
|
|
178
179
|
try {
|
|
179
|
-
!a &&
|
|
180
|
+
!a && t.return != null && t.return();
|
|
180
181
|
} finally {
|
|
181
182
|
if (c) throw s;
|
|
182
183
|
}
|
|
@@ -188,37 +189,37 @@ function We(e) {
|
|
|
188
189
|
if (Array.isArray(e)) return e;
|
|
189
190
|
}
|
|
190
191
|
function Ve(e) {
|
|
191
|
-
var
|
|
192
|
+
var r = e.apiKey, t = e.libraries, n = t === void 0 ? "places" : t, a = e.googleMapsScriptBaseUrl, c = a === void 0 ? Ne.GOOGLE_MAP_SCRIPT_BASE_URL : a, u = e.debounce, s = u === void 0 ? 300 : u, l = e.options, m = l === void 0 ? {} : l, d = e.sessionToken, v = e.language, T = v ? "&language=".concat(v) : "", P = "".concat(c, "?key=").concat(r, "&libraries=").concat(n).concat(T), j = (0, g.useState)([]), A = M(j, 2), L = A[0], y = A[1], b = (0, g.useState)(!1), E = M(b, 2), I = E[0], S = E[1], i = (0, g.useState)(null), o = M(i, 2), f = o[0], O = o[1], R = (0, g.useState)(!1), G = M(R, 2), B = G[0], Q = G[1], ie = (0, g.useState)(!1), F = M(ie, 2), ae = F[0], K = F[1], se = (0, g.useState)([]), W = M(se, 2), ue = W[0], V = W[1], w = (0, g.useRef)(null), H = (0, g.useRef)(null), x = (0, g.useRef)(null), ce = (0, g.useCallback)(function() {
|
|
192
193
|
return (0, ee.loadGoogleMapScript)(c, P);
|
|
193
|
-
}, [c, P]), z = (0,
|
|
194
|
-
|
|
194
|
+
}, [c, P]), z = (0, g.useCallback)((0, D.default)(function(_) {
|
|
195
|
+
w.current && _.input && w.current.getPlacePredictions(C(C(C({}, d && x.current ? {
|
|
195
196
|
sessionToken: x.current
|
|
196
|
-
} : {}),
|
|
197
|
+
} : {}), m), _), function(p) {
|
|
197
198
|
S(!1), y(p || []);
|
|
198
199
|
});
|
|
199
|
-
}, s), [s]), X = (0,
|
|
200
|
-
|
|
200
|
+
}, s), [s]), X = (0, g.useCallback)((0, D.default)(function(_) {
|
|
201
|
+
w.current && _.input && w.current.getQueryPredictions(C(C(C({}, d && x.current ? {
|
|
201
202
|
sessionToken: x.current
|
|
202
|
-
} : {}),
|
|
203
|
+
} : {}), m), _), function(p) {
|
|
203
204
|
Q(!1), V(p || []);
|
|
204
205
|
});
|
|
205
206
|
}, s), [s]);
|
|
206
|
-
return (0,
|
|
207
|
+
return (0, g.useEffect)(function() {
|
|
207
208
|
if (ee.isBrowser) {
|
|
208
209
|
var _ = function() {
|
|
209
210
|
if (!google) return console.error("Google has not been found. Make sure your provide apiKey prop.");
|
|
210
|
-
|
|
211
|
+
w.current = new google.maps.places.AutocompleteService(), H.current = new google.maps.places.PlacesService(document.createElement("div")), d && (x.current = new google.maps.places.AutocompleteSessionToken());
|
|
211
212
|
};
|
|
212
|
-
|
|
213
|
+
r ? ce().then(function() {
|
|
213
214
|
return _();
|
|
214
215
|
}) : _();
|
|
215
216
|
}
|
|
216
217
|
}, []), {
|
|
217
218
|
placesService: H.current,
|
|
218
219
|
autocompleteSessionToken: x.current,
|
|
219
|
-
placesAutocompleteService:
|
|
220
|
+
placesAutocompleteService: w.current,
|
|
220
221
|
placePredictions: f ? L : [],
|
|
221
|
-
isPlacePredictionsLoading:
|
|
222
|
+
isPlacePredictionsLoading: I,
|
|
222
223
|
getPlacePredictions: function(p) {
|
|
223
224
|
if (p.input) {
|
|
224
225
|
O(p.input), S(!0), z(p);
|
|
@@ -240,19 +241,19 @@ function Ve(e) {
|
|
|
240
241
|
}
|
|
241
242
|
};
|
|
242
243
|
}
|
|
243
|
-
const
|
|
244
|
+
const er = ({ field: e }) => {
|
|
244
245
|
var i;
|
|
245
|
-
const [
|
|
246
|
+
const [r, t] = J(""), [n, a] = J(!1), { key: c = "", label: u = "", helper_text: s = "", readonly: l = !1 } = e, m = c, {
|
|
246
247
|
field: { value: d, onBlur: v, onChange: T, ...P },
|
|
247
248
|
fieldState: j
|
|
248
249
|
} = de({
|
|
249
|
-
name:
|
|
250
|
+
name: m,
|
|
250
251
|
rules: ge(e)
|
|
251
252
|
}), A = !!(e != null && e.required), L = (i = j == null ? void 0 : j.error) == null ? void 0 : i.message, {
|
|
252
253
|
placesService: y,
|
|
253
254
|
placePredictions: b,
|
|
254
255
|
getPlacePredictions: E,
|
|
255
|
-
isPlacePredictionsLoading:
|
|
256
|
+
isPlacePredictionsLoading: I
|
|
256
257
|
} = Ue({
|
|
257
258
|
apiKey: process.env.NEXT_PUBLIC_GOOGLE_MAPS,
|
|
258
259
|
debounce: 200
|
|
@@ -263,7 +264,7 @@ const De = ({ field: e }) => {
|
|
|
263
264
|
},
|
|
264
265
|
(f) => {
|
|
265
266
|
var O, R, G, B;
|
|
266
|
-
T(
|
|
267
|
+
T({
|
|
267
268
|
...f,
|
|
268
269
|
place_name: o == null ? void 0 : o.description,
|
|
269
270
|
latitude: ((R = (O = f == null ? void 0 : f.geometry) == null ? void 0 : O.location) == null ? void 0 : R.lat()) || 0,
|
|
@@ -273,26 +274,26 @@ const De = ({ field: e }) => {
|
|
|
273
274
|
), a(!0);
|
|
274
275
|
};
|
|
275
276
|
return fe(() => {
|
|
276
|
-
d != null && d.place_name && (
|
|
277
|
+
d != null && d.place_name && (t(d == null ? void 0 : d.place_name), a(!0));
|
|
277
278
|
}, [d]), /* @__PURE__ */ h.jsx(me, { error: L, helperText: s, readOnly: l, children: /* @__PURE__ */ h.jsxs("div", { className: "w-full relative", children: [
|
|
278
|
-
u && /* @__PURE__ */ h.jsx(ye, { htmlFor:
|
|
279
|
+
u && /* @__PURE__ */ h.jsx(ye, { htmlFor: m, isRequired: A, children: u }),
|
|
279
280
|
/* @__PURE__ */ h.jsx(
|
|
280
281
|
_e,
|
|
281
282
|
{
|
|
282
|
-
id:
|
|
283
|
-
value:
|
|
283
|
+
id: m,
|
|
284
|
+
value: r,
|
|
284
285
|
onChange: (o) => {
|
|
285
|
-
a(!1), E({ input: o.target.value }),
|
|
286
|
+
a(!1), E({ input: o.target.value }), t(o.target.value);
|
|
286
287
|
},
|
|
287
288
|
onBlur: () => {
|
|
288
289
|
v();
|
|
289
290
|
},
|
|
290
|
-
rightIcon:
|
|
291
|
+
rightIcon: I && /* @__PURE__ */ h.jsx(pe, { size: "20px", className: "animate-spin" }),
|
|
291
292
|
readOnly: l,
|
|
292
293
|
...P
|
|
293
294
|
}
|
|
294
295
|
),
|
|
295
|
-
|
|
296
|
+
r && !I && !n && /* @__PURE__ */ h.jsx("div", { className: "absolute bg-white left-[-1px] z-50 p-[4px] w-full shadow-[0_0_8px_rgba(0,0,0,0.25)] rounded-[6px]", children: b != null && b.length ? b.map((o) => /* @__PURE__ */ h.jsx(
|
|
296
297
|
"p",
|
|
297
298
|
{
|
|
298
299
|
className: "text-md p-[8px] cursor-pointer rounded-[6px] hover:bg-gray-200",
|
|
@@ -304,6 +305,6 @@ const De = ({ field: e }) => {
|
|
|
304
305
|
] }) });
|
|
305
306
|
};
|
|
306
307
|
export {
|
|
307
|
-
|
|
308
|
-
|
|
308
|
+
er as GeocoderWidget,
|
|
309
|
+
er as default
|
|
309
310
|
};
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var j = Object.defineProperty;
|
|
3
|
+
var D = (r, l, o) => l in r ? j(r, l, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[l] = o;
|
|
4
|
+
var v = (r, l, o) => D(r, typeof l != "symbol" ? l + "" : l, o);
|
|
5
|
+
import { j as B } from "./jsx-runtime-B6kdoens.js";
|
|
6
|
+
import k from "wretch";
|
|
7
|
+
import { createContext as G, useContext as W } from "react";
|
|
8
|
+
var q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
9
|
+
function z(r) {
|
|
10
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
11
|
+
}
|
|
12
|
+
var T = class {
|
|
13
|
+
constructor(r) {
|
|
14
|
+
v(this, "client");
|
|
15
|
+
this.client = r;
|
|
16
|
+
}
|
|
17
|
+
}, F = { exports: {} };
|
|
18
|
+
(function(r) {
|
|
19
|
+
(function(l, o) {
|
|
20
|
+
r.exports ? r.exports = o() : l.log = o();
|
|
21
|
+
})(q, function() {
|
|
22
|
+
var l = function() {
|
|
23
|
+
}, o = "undefined", b = typeof window !== o && typeof window.navigator !== o && /Trident\/|MSIE /.test(window.navigator.userAgent), y = [
|
|
24
|
+
"trace",
|
|
25
|
+
"debug",
|
|
26
|
+
"info",
|
|
27
|
+
"warn",
|
|
28
|
+
"error"
|
|
29
|
+
], c = {}, i = null;
|
|
30
|
+
function w(t, s) {
|
|
31
|
+
var e = t[s];
|
|
32
|
+
if (typeof e.bind == "function")
|
|
33
|
+
return e.bind(t);
|
|
34
|
+
try {
|
|
35
|
+
return Function.prototype.bind.call(e, t);
|
|
36
|
+
} catch {
|
|
37
|
+
return function() {
|
|
38
|
+
return Function.prototype.apply.apply(e, [t, arguments]);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function S() {
|
|
43
|
+
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
44
|
+
}
|
|
45
|
+
function U(t) {
|
|
46
|
+
return t === "debug" && (t = "log"), typeof console === o ? !1 : t === "trace" && b ? S : console[t] !== void 0 ? w(console, t) : console.log !== void 0 ? w(console, "log") : l;
|
|
47
|
+
}
|
|
48
|
+
function g() {
|
|
49
|
+
for (var t = this.getLevel(), s = 0; s < y.length; s++) {
|
|
50
|
+
var e = y[s];
|
|
51
|
+
this[e] = s < t ? l : this.methodFactory(e, t, this.name);
|
|
52
|
+
}
|
|
53
|
+
if (this.log = this.debug, typeof console === o && t < this.levels.SILENT)
|
|
54
|
+
return "No console available for logging";
|
|
55
|
+
}
|
|
56
|
+
function A(t) {
|
|
57
|
+
return function() {
|
|
58
|
+
typeof console !== o && (g.call(this), this[t].apply(this, arguments));
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function M(t, s, e) {
|
|
62
|
+
return U(t) || A.apply(this, arguments);
|
|
63
|
+
}
|
|
64
|
+
function E(t, s) {
|
|
65
|
+
var e = this, h, m, f, u = "loglevel";
|
|
66
|
+
typeof t == "string" ? u += ":" + t : typeof t == "symbol" && (u = void 0);
|
|
67
|
+
function O(n) {
|
|
68
|
+
var a = (y[n] || "silent").toUpperCase();
|
|
69
|
+
if (!(typeof window === o || !u)) {
|
|
70
|
+
try {
|
|
71
|
+
window.localStorage[u] = a;
|
|
72
|
+
return;
|
|
73
|
+
} catch {
|
|
74
|
+
}
|
|
75
|
+
try {
|
|
76
|
+
window.document.cookie = encodeURIComponent(u) + "=" + a + ";";
|
|
77
|
+
} catch {
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function C() {
|
|
82
|
+
var n;
|
|
83
|
+
if (!(typeof window === o || !u)) {
|
|
84
|
+
try {
|
|
85
|
+
n = window.localStorage[u];
|
|
86
|
+
} catch {
|
|
87
|
+
}
|
|
88
|
+
if (typeof n === o)
|
|
89
|
+
try {
|
|
90
|
+
var a = window.document.cookie, L = encodeURIComponent(u), I = a.indexOf(L + "=");
|
|
91
|
+
I !== -1 && (n = /^([^;]+)/.exec(
|
|
92
|
+
a.slice(I + L.length + 1)
|
|
93
|
+
)[1]);
|
|
94
|
+
} catch {
|
|
95
|
+
}
|
|
96
|
+
return e.levels[n] === void 0 && (n = void 0), n;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function P() {
|
|
100
|
+
if (!(typeof window === o || !u)) {
|
|
101
|
+
try {
|
|
102
|
+
window.localStorage.removeItem(u);
|
|
103
|
+
} catch {
|
|
104
|
+
}
|
|
105
|
+
try {
|
|
106
|
+
window.document.cookie = encodeURIComponent(u) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
107
|
+
} catch {
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function d(n) {
|
|
112
|
+
var a = n;
|
|
113
|
+
if (typeof a == "string" && e.levels[a.toUpperCase()] !== void 0 && (a = e.levels[a.toUpperCase()]), typeof a == "number" && a >= 0 && a <= e.levels.SILENT)
|
|
114
|
+
return a;
|
|
115
|
+
throw new TypeError("log.setLevel() called with invalid level: " + n);
|
|
116
|
+
}
|
|
117
|
+
e.name = t, e.levels = {
|
|
118
|
+
TRACE: 0,
|
|
119
|
+
DEBUG: 1,
|
|
120
|
+
INFO: 2,
|
|
121
|
+
WARN: 3,
|
|
122
|
+
ERROR: 4,
|
|
123
|
+
SILENT: 5
|
|
124
|
+
}, e.methodFactory = s || M, e.getLevel = function() {
|
|
125
|
+
return f ?? m ?? h;
|
|
126
|
+
}, e.setLevel = function(n, a) {
|
|
127
|
+
return f = d(n), a !== !1 && O(f), g.call(e);
|
|
128
|
+
}, e.setDefaultLevel = function(n) {
|
|
129
|
+
m = d(n), C() || e.setLevel(n, !1);
|
|
130
|
+
}, e.resetLevel = function() {
|
|
131
|
+
f = null, P(), g.call(e);
|
|
132
|
+
}, e.enableAll = function(n) {
|
|
133
|
+
e.setLevel(e.levels.TRACE, n);
|
|
134
|
+
}, e.disableAll = function(n) {
|
|
135
|
+
e.setLevel(e.levels.SILENT, n);
|
|
136
|
+
}, e.rebuild = function() {
|
|
137
|
+
if (i !== e && (h = d(i.getLevel())), g.call(e), i === e)
|
|
138
|
+
for (var n in c)
|
|
139
|
+
c[n].rebuild();
|
|
140
|
+
}, h = d(
|
|
141
|
+
i ? i.getLevel() : "WARN"
|
|
142
|
+
);
|
|
143
|
+
var x = C();
|
|
144
|
+
x != null && (f = d(x)), g.call(e);
|
|
145
|
+
}
|
|
146
|
+
i = new E(), i.getLogger = function(s) {
|
|
147
|
+
if (typeof s != "symbol" && typeof s != "string" || s === "")
|
|
148
|
+
throw new TypeError("You must supply a name when creating a logger.");
|
|
149
|
+
var e = c[s];
|
|
150
|
+
return e || (e = c[s] = new E(
|
|
151
|
+
s,
|
|
152
|
+
i.methodFactory
|
|
153
|
+
)), e;
|
|
154
|
+
};
|
|
155
|
+
var N = typeof window !== o ? window.log : void 0;
|
|
156
|
+
return i.noConflict = function() {
|
|
157
|
+
return typeof window !== o && window.log === i && (window.log = N), i;
|
|
158
|
+
}, i.getLoggers = function() {
|
|
159
|
+
return c;
|
|
160
|
+
}, i.default = i, i;
|
|
161
|
+
});
|
|
162
|
+
})(F);
|
|
163
|
+
var J = F.exports;
|
|
164
|
+
const p = /* @__PURE__ */ z(J);
|
|
165
|
+
var K = class extends T {
|
|
166
|
+
constructor(l) {
|
|
167
|
+
super(l);
|
|
168
|
+
v(this, "logger", p);
|
|
169
|
+
p.setLevel(
|
|
170
|
+
this.client.NODE_ENV === "production" ? p.levels.INFO : p.levels.DEBUG
|
|
171
|
+
), p.methodFactory = (o, b, y) => (c, i = {}) => {
|
|
172
|
+
k().url(`${this.client.apiUrl}/v1/apm/logs/json`).post({
|
|
173
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
174
|
+
level: o,
|
|
175
|
+
message: c,
|
|
176
|
+
...i
|
|
177
|
+
}).res().catch((w) => console.error(w));
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
}, V = class extends T {
|
|
181
|
+
constructor() {
|
|
182
|
+
super(...arguments);
|
|
183
|
+
v(this, "mediaBulkUpload", (l, o = {}) => this.client.fetch.url("/v1/assets/media/bulk").options(o).post(l).json());
|
|
184
|
+
v(this, "getAllMedia", async (l = {}) => await this.client.fetch.url("/v1/assets/media/query").post(l).json());
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
const R = G(null), X = ({
|
|
188
|
+
children: r,
|
|
189
|
+
client: l,
|
|
190
|
+
...o
|
|
191
|
+
}) => /* @__PURE__ */ B.jsx(
|
|
192
|
+
R.Provider,
|
|
193
|
+
{
|
|
194
|
+
value: {
|
|
195
|
+
client: l,
|
|
196
|
+
media: new V(l),
|
|
197
|
+
logger: new K(l),
|
|
198
|
+
...o
|
|
199
|
+
},
|
|
200
|
+
children: r
|
|
201
|
+
}
|
|
202
|
+
), Z = () => {
|
|
203
|
+
const r = W(R);
|
|
204
|
+
if (!r)
|
|
205
|
+
throw new Error("useLevo must be used within LevoProvider");
|
|
206
|
+
return r;
|
|
207
|
+
};
|
|
208
|
+
export {
|
|
209
|
+
X as L,
|
|
210
|
+
q as c,
|
|
211
|
+
Z as u
|
|
212
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as e } from "./jsx-runtime-B6kdoens.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { GeocoderWidget as d } from "./GeocoderWidget-
|
|
7
|
-
import { B as p } from "./Spinner-
|
|
3
|
+
import { Plus as m } from "lucide-react";
|
|
4
|
+
import { useFieldArray as n } from "react-hook-form";
|
|
5
|
+
import { k as c } from "./CollectionFormBuilder-B_dXpvPN.js";
|
|
6
|
+
import { GeocoderWidget as d } from "./GeocoderWidget-D8GsLWkV.js";
|
|
7
|
+
import { B as p } from "./Spinner-DzGH5rKe.js";
|
|
8
8
|
const g = ({
|
|
9
9
|
field: l
|
|
10
10
|
}) => {
|
|
11
|
-
const { key: s = "", label: o = "" } = l, { fields: r, ...i } =
|
|
11
|
+
const { key: s = "", label: o = "" } = l, { fields: r, ...i } = n({
|
|
12
12
|
name: s
|
|
13
13
|
});
|
|
14
14
|
return /* @__PURE__ */ e.jsxs("div", { className: "w-full relative", children: [
|
|
15
|
-
o && /* @__PURE__ */ e.jsx(
|
|
15
|
+
o && /* @__PURE__ */ e.jsx(c, { htmlFor: s, children: o }),
|
|
16
16
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
17
17
|
r == null ? void 0 : r.map((a, t) => /* @__PURE__ */ e.jsx(
|
|
18
18
|
d,
|
|
@@ -35,7 +35,7 @@ const g = ({
|
|
|
35
35
|
i.append(null);
|
|
36
36
|
},
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */ e.jsx(
|
|
38
|
+
/* @__PURE__ */ e.jsx(m, { className: "inline-block mr-1", size: "14px" }),
|
|
39
39
|
"Add"
|
|
40
40
|
]
|
|
41
41
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
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
|
-
import { h as x, j as v, k as j } from "./CollectionFormBuilder-uvr15jvu.js";
|
|
6
5
|
import { c as l } from "./cn-C9QoOYNG.js";
|
|
6
|
+
import { h as x, j as v, k as j } from "./CollectionFormBuilder-B_dXpvPN.js";
|
|
7
7
|
const k = ({ 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 },
|
|
@@ -3,10 +3,10 @@ import { j as r } from "./jsx-runtime-B6kdoens.js";
|
|
|
3
3
|
import * as n from "@radix-ui/react-radio-group";
|
|
4
4
|
import * as d from "react";
|
|
5
5
|
import { useController as F } from "react-hook-form";
|
|
6
|
-
import { G as E } from "./Spinner-
|
|
7
|
-
import { h as G, j as V, k as f } from "./CollectionFormBuilder-uvr15jvu.js";
|
|
8
|
-
import { I as q } from "./Input-2CvZ90f8.js";
|
|
6
|
+
import { G as E } from "./Spinner-DzGH5rKe.js";
|
|
9
7
|
import { c as N } from "./cn-C9QoOYNG.js";
|
|
8
|
+
import { h as G, j as V, k as f } from "./CollectionFormBuilder-B_dXpvPN.js";
|
|
9
|
+
import { I as q } from "./Input-2CvZ90f8.js";
|
|
10
10
|
function B(s) {
|
|
11
11
|
return E({ 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);
|
|
12
12
|
}
|
|
@@ -17,9 +17,9 @@ import F from "@tiptap/extension-underline";
|
|
|
17
17
|
import { useEditor as I, EditorContent as E } from "@tiptap/react";
|
|
18
18
|
import { useState as D, useEffect as G } from "react";
|
|
19
19
|
import { useController as q } from "react-hook-form";
|
|
20
|
-
import { G as p, e as J, f as V, g as W, h as Z, i as _, j as P, k as K, l as Q, m as X, n as Y, o as $, p as nn } from "./Spinner-
|
|
21
|
-
import { h as ln, j as en, k as sn } from "./CollectionFormBuilder-uvr15jvu.js";
|
|
20
|
+
import { G as p, e as J, f as V, g as W, h as Z, i as _, j as P, k as K, l as Q, m as X, n as Y, o as $, p as nn } from "./Spinner-DzGH5rKe.js";
|
|
22
21
|
import { c as j } from "./cn-C9QoOYNG.js";
|
|
22
|
+
import { h as ln, j as en, k as sn } from "./CollectionFormBuilder-B_dXpvPN.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
|
}
|