@levo-so/react 0.1.35 → 0.1.36
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-BrVNbP0R.js → CheckboxWidget-3qTjxIlp.js} +1 -1
- package/dist/{CollectionFormBuilder-CkD8uVKZ.js → CollectionFormBuilder-CUzpwIva.js} +17 -17
- package/dist/{CurrencyWidget-D_q2AYWu.js → CurrencyWidget-DgH4uCpg.js} +1 -1
- package/dist/{DateTimeWidget-CsuCisSs.js → DateTimeWidget-C2hLHKU6.js} +1 -1
- package/dist/{DefaultFormVariant-rv38sBOZ.js → DefaultFormVariant-Cm9i2BBn.js} +2 -2
- package/dist/{DropdownWidget-CsTQ0Ojo.js → DropdownWidget-B6mRXcTa.js} +1 -1
- package/dist/{EmailWidget-Did2OUyB.js → EmailWidget-CBFnvo9z.js} +1 -1
- package/dist/{FormCaptcha-C_DxR2za.js → FormCaptcha-btA0HfMx.js} +3 -3
- package/dist/{GeocoderWidget-CyzcaWxa.js → GeocoderWidget-DZGXm9Ji.js} +2 -2
- package/dist/{MultiGeocoderWidget-DgwiZ330.js → MultiGeocoderWidget-D7ogTcWu.js} +2 -2
- package/dist/{MultiTextWidget-Dic46WBU.js → MultiTextWidget-DYxi8PHm.js} +1 -1
- package/dist/{PhoneWidget-DKH-Wzgz.js → PhoneWidget-BxaGCfLs.js} +1 -1
- package/dist/{RadioWidget-CTgWKCg2.js → RadioWidget-Bkq1Oudi.js} +1 -1
- package/dist/{RichTextWidget-C30H7mVF.js → RichTextWidget-Caqhw4GK.js} +1 -1
- package/dist/{StepsFormVariant-myT97AwJ.js → StepsFormVariant-D-m93LMv.js} +2 -2
- package/dist/{SwitchWidget-BS-rmHiq.js → SwitchWidget-BpAzgVui.js} +1 -1
- package/dist/{TextWidget-aNB-0vc-.js → TextWidget-CHkFlxmT.js} +1 -1
- package/dist/{TextareaWidget-CEH-97Oj.js → TextareaWidget-B0htlijX.js} +1 -1
- package/dist/{ToggleCheckboxWidget-C0buyS29.js → ToggleCheckboxWidget-DLrS6ax4.js} +1 -1
- package/dist/{URLWidget-DrZlRAD7.js → URLWidget-CnWKNlOF.js} +2 -2
- package/dist/{UploadWidget-Bw7urh-7.js → UploadWidget-DSvWOBuR.js} +1 -1
- package/dist/audience/components/page.d.ts +3 -4
- package/dist/audience/components/page.d.ts.map +1 -1
- package/dist/audience/index.js +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/index.js +2 -2
- package/dist/membership/index.js +70 -69
- package/dist/page-C1-z2EsC.js +574 -0
- package/dist/providers/LevoProvider.d.ts +4 -19
- package/dist/providers/LevoProvider.d.ts.map +1 -1
- package/dist/providers/index.js +8 -164
- package/package.json +4 -4
- package/dist/Checbox-sq-atGlJ.js.map +0 -1
- package/dist/CheckboxWidget-BrVNbP0R.js.map +0 -1
- package/dist/CollectionFormBuilder-CkD8uVKZ.js.map +0 -1
- package/dist/CurrencyWidget-D_q2AYWu.js.map +0 -1
- package/dist/DateTimeWidget-CsuCisSs.js.map +0 -1
- package/dist/DefaultFormVariant-rv38sBOZ.js.map +0 -1
- package/dist/DropdownWidget-CsTQ0Ojo.js.map +0 -1
- package/dist/EmailWidget-Did2OUyB.js.map +0 -1
- package/dist/FormCaptcha-C_DxR2za.js.map +0 -1
- package/dist/GeocoderWidget-CyzcaWxa.js.map +0 -1
- package/dist/Input-Vv7mKQFt.js.map +0 -1
- package/dist/MultiGeocoderWidget-DgwiZ330.js.map +0 -1
- package/dist/MultiTextWidget-Dic46WBU.js.map +0 -1
- package/dist/PhoneWidget-DKH-Wzgz.js.map +0 -1
- package/dist/RadioWidget-CTgWKCg2.js.map +0 -1
- package/dist/RichTextWidget-C30H7mVF.js.map +0 -1
- package/dist/Sonner-t6JVKA0a.js.map +0 -1
- package/dist/Spinner-BcBoT-J5.js.map +0 -1
- package/dist/StepsFormVariant-myT97AwJ.js.map +0 -1
- package/dist/SwitchWidget-BS-rmHiq.js.map +0 -1
- package/dist/TextWidget-aNB-0vc-.js.map +0 -1
- package/dist/TextareaWidget-CEH-97Oj.js.map +0 -1
- package/dist/ToggleCheckboxWidget-C0buyS29.js.map +0 -1
- package/dist/Tooltip-DoWyn3Ho.js.map +0 -1
- package/dist/URLWidget-DrZlRAD7.js.map +0 -1
- package/dist/UploadWidget-Bw7urh-7.js.map +0 -1
- package/dist/audience/index.js.map +0 -1
- package/dist/byteToSize-BFKZSBu1.js.map +0 -1
- package/dist/cn-C9QoOYNG.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/errorHandler-_34Yv8wA.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/isEmptyObject-C5s4GzLE.js.map +0 -1
- package/dist/jsx-runtime-B6kdoens.js.map +0 -1
- package/dist/membership/index.js.map +0 -1
- package/dist/page-t8PpNiSB.js +0 -567
- package/dist/page-t8PpNiSB.js.map +0 -1
- package/dist/providers/index.js.map +0 -1
- package/dist/utils/index.js.map +0 -1
|
@@ -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-
|
|
6
|
+
import { z as O, A as I, B as x } from "./CollectionFormBuilder-CUzpwIva.js";
|
|
7
7
|
import { C as g } from "./Checbox-sq-atGlJ.js";
|
|
8
8
|
import { I as S } from "./Input-Vv7mKQFt.js";
|
|
9
9
|
const L = ({ field: i }) => {
|
|
@@ -915,26 +915,26 @@ const dt = E.lazy(
|
|
|
915
915
|
}
|
|
916
916
|
);
|
|
917
917
|
}, pt = v(
|
|
918
|
-
() => import("./MultiTextWidget-
|
|
919
|
-
), ie = v(() => import("./TextWidget-
|
|
920
|
-
() => import("./CurrencyWidget-
|
|
918
|
+
() => import("./MultiTextWidget-DYxi8PHm.js")
|
|
919
|
+
), ie = v(() => import("./TextWidget-CHkFlxmT.js")), xt = v(
|
|
920
|
+
() => import("./CurrencyWidget-DgH4uCpg.js")
|
|
921
921
|
), ht = v(
|
|
922
|
-
() => import("./CheckboxWidget-
|
|
922
|
+
() => import("./CheckboxWidget-3qTjxIlp.js")
|
|
923
923
|
), ce = v(
|
|
924
|
-
() => import("./DateTimeWidget-
|
|
924
|
+
() => import("./DateTimeWidget-C2hLHKU6.js")
|
|
925
925
|
), de = v(
|
|
926
|
-
() => import("./DropdownWidget-
|
|
927
|
-
), yt = v(() => import("./EmailWidget-
|
|
928
|
-
() => import("./GeocoderWidget-
|
|
926
|
+
() => import("./DropdownWidget-B6mRXcTa.js")
|
|
927
|
+
), yt = v(() => import("./EmailWidget-CBFnvo9z.js")), ft = v(
|
|
928
|
+
() => import("./GeocoderWidget-DZGXm9Ji.js")
|
|
929
929
|
), jt = v(
|
|
930
|
-
() => import("./MultiGeocoderWidget-
|
|
931
|
-
), bt = v(() => import("./PhoneWidget-
|
|
932
|
-
() => import("./RichTextWidget-
|
|
933
|
-
), wt = v(() => import("./SwitchWidget-
|
|
934
|
-
() => import("./TextareaWidget-
|
|
930
|
+
() => import("./MultiGeocoderWidget-D7ogTcWu.js")
|
|
931
|
+
), bt = v(() => import("./PhoneWidget-BxaGCfLs.js")), vt = v(() => import("./RadioWidget-Bkq1Oudi.js")), Ct = v(
|
|
932
|
+
() => import("./RichTextWidget-Caqhw4GK.js")
|
|
933
|
+
), wt = v(() => import("./SwitchWidget-BpAzgVui.js")), kt = v(
|
|
934
|
+
() => import("./TextareaWidget-B0htlijX.js")
|
|
935
935
|
), Wt = v(
|
|
936
|
-
() => import("./ToggleCheckboxWidget-
|
|
937
|
-
), _t = v(() => import("./URLWidget-
|
|
936
|
+
() => import("./ToggleCheckboxWidget-DLrS6ax4.js")
|
|
937
|
+
), _t = v(() => import("./URLWidget-CnWKNlOF.js")), K = v(() => import("./UploadWidget-DSvWOBuR.js")), Nt = ({
|
|
938
938
|
field: e,
|
|
939
939
|
isInternal: n
|
|
940
940
|
}) => {
|
|
@@ -1103,9 +1103,9 @@ const dt = E.lazy(
|
|
|
1103
1103
|
e
|
|
1104
1104
|
] });
|
|
1105
1105
|
}, ns = () => E.useContext(Ce), Tt = E.lazy(
|
|
1106
|
-
() => import("./DefaultFormVariant-
|
|
1106
|
+
() => import("./DefaultFormVariant-Cm9i2BBn.js")
|
|
1107
1107
|
), Mt = E.lazy(
|
|
1108
|
-
() => import("./StepsFormVariant-
|
|
1108
|
+
() => import("./StepsFormVariant-D-m93LMv.js")
|
|
1109
1109
|
), It = ({
|
|
1110
1110
|
formVariant: e,
|
|
1111
1111
|
...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-
|
|
5
|
+
import { z as C, A as B, B as N } from "./CollectionFormBuilder-CUzpwIva.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-
|
|
7
|
+
import { z as M, A as D, B as C } from "./CollectionFormBuilder-CUzpwIva.js";
|
|
8
8
|
import { I as F } from "./Input-Vv7mKQFt.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 N } from "./CollectionFormBuilder-
|
|
5
|
-
import { u as g, S as w, F as b } from "./FormCaptcha-
|
|
4
|
+
import { D as F, F as N } from "./CollectionFormBuilder-CUzpwIva.js";
|
|
5
|
+
import { u as g, S as w, F as b } from "./FormCaptcha-btA0HfMx.js";
|
|
6
6
|
import { B as D } from "./Spinner-BcBoT-J5.js";
|
|
7
7
|
const _ = () => {
|
|
8
8
|
var n;
|
|
@@ -4,7 +4,7 @@ import { useState as f, useEffect as w } from "react";
|
|
|
4
4
|
import { useController as R } from "react-hook-form";
|
|
5
5
|
import B from "react-select";
|
|
6
6
|
import { c as y } from "./cn-C9QoOYNG.js";
|
|
7
|
-
import { z as D, A as N, B as q } from "./CollectionFormBuilder-
|
|
7
|
+
import { z as D, A as N, B as q } from "./CollectionFormBuilder-CUzpwIva.js";
|
|
8
8
|
import { I as L } from "./Input-Vv7mKQFt.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-BcBoT-J5.js";
|
|
4
|
-
import { z as F, A as I, B as V } from "./CollectionFormBuilder-
|
|
4
|
+
import { z as F, A as I, B as V } from "./CollectionFormBuilder-CUzpwIva.js";
|
|
5
5
|
import { I as b } from "./Input-Vv7mKQFt.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);
|
|
@@ -3,7 +3,7 @@ import { useEffect as k, useState as b, useRef as J } from "react";
|
|
|
3
3
|
import { useFormContext as W, useWatch as Y, useForm as B, useController as G } from "react-hook-form";
|
|
4
4
|
import { useDebouncedCallback as H } from "use-debounce";
|
|
5
5
|
import { useLevo as x } from "./providers/index.js";
|
|
6
|
-
import { D as C, s as z, h as Q, c as X, A as Z } from "./CollectionFormBuilder-
|
|
6
|
+
import { D as C, s as z, h as Q, c as X, A as Z } from "./CollectionFormBuilder-CUzpwIva.js";
|
|
7
7
|
import { s as m } from "./Sonner-t6JVKA0a.js";
|
|
8
8
|
import { e as D } from "./errorHandler-_34Yv8wA.js";
|
|
9
9
|
import { a as h } from "./isEmptyObject-C5s4GzLE.js";
|
|
@@ -24,7 +24,7 @@ const R = {
|
|
|
24
24
|
localStorage.removeItem(`${t}-${R.FORM_VALUES}`);
|
|
25
25
|
}, dt = ({ currentValues: t, isError: s, getContentId: g }) => {
|
|
26
26
|
var O;
|
|
27
|
-
const { schema: n, isLoggedIn: a } = C(), e = W(), l = Y(),
|
|
27
|
+
const { schema: n, isLoggedIn: a } = C(), e = W(), l = Y(), S = x(), I = H((v) => {
|
|
28
28
|
n != null && n.key && !s && n != null && n.allow_draft && (a ? fetch(`${S.apiUrl}/v1/bevy/content/${n == null ? void 0 : n.key}/save-entry`, {
|
|
29
29
|
method: "POST",
|
|
30
30
|
body: JSON.stringify({ ...v }),
|
|
@@ -150,7 +150,7 @@ const R = {
|
|
|
150
150
|
handleSubmit: q
|
|
151
151
|
};
|
|
152
152
|
}, pt = () => {
|
|
153
|
-
const { isInternal: t } = C(),
|
|
153
|
+
const { isInternal: t } = C(), s = x(), g = J(null), {
|
|
154
154
|
field: { onChange: n },
|
|
155
155
|
fieldState: { error: a }
|
|
156
156
|
} = G({
|
|
@@ -3,12 +3,12 @@ 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 k } from "react-hook-form";
|
|
5
5
|
import { o as z } from "./Spinner-BcBoT-J5.js";
|
|
6
|
-
import { z as T, A as q, B as A } from "./CollectionFormBuilder-
|
|
6
|
+
import { z as T, A as q, B as A } from "./CollectionFormBuilder-CUzpwIva.js";
|
|
7
7
|
import { I as E } from "./Input-Vv7mKQFt.js";
|
|
8
8
|
import { useLevo as O } from "./providers/index.js";
|
|
9
9
|
const $ = ({ field: t }) => {
|
|
10
10
|
var _;
|
|
11
|
-
const [c, h] = p(""), [m, d] = p(!1), [l, N] = p([]), [g, i] = p(!1),
|
|
11
|
+
const [c, h] = p(""), [m, d] = p(!1), [l, N] = p([]), [g, i] = p(!1), a = O(), { key: u = "", label: f = "", helper_text: w = "", readonly: j = !1 } = t, {
|
|
12
12
|
field: { value: s, onBlur: F, onChange: y, ...L },
|
|
13
13
|
fieldState: x
|
|
14
14
|
} = k({
|
|
@@ -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-
|
|
6
|
-
import { GeocoderWidget as d } from "./GeocoderWidget-
|
|
5
|
+
import { B as c } from "./CollectionFormBuilder-CUzpwIva.js";
|
|
6
|
+
import { GeocoderWidget as d } from "./GeocoderWidget-DZGXm9Ji.js";
|
|
7
7
|
import { B as p } from "./Spinner-BcBoT-J5.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-
|
|
3
|
+
import { z as C, A as b, B as q } from "./CollectionFormBuilder-CUzpwIva.js";
|
|
4
4
|
import { I } from "./Input-Vv7mKQFt.js";
|
|
5
5
|
const f = ({ field: r }) => {
|
|
6
6
|
var l;
|
|
@@ -3,7 +3,7 @@ import { j as t } from "./jsx-runtime-B6kdoens.js";
|
|
|
3
3
|
import { useController as f } from "react-hook-form";
|
|
4
4
|
import { PhoneInput as x } from "react-international-phone";
|
|
5
5
|
import { c as l } from "./cn-C9QoOYNG.js";
|
|
6
|
-
import { z as g, A as v, B as y } from "./CollectionFormBuilder-
|
|
6
|
+
import { z as g, A as v, B as y } from "./CollectionFormBuilder-CUzpwIva.js";
|
|
7
7
|
const P = ({ field: e }) => {
|
|
8
8
|
const { key: u = "", label: o = "", 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-BcBoT-J5.js";
|
|
7
7
|
import { c as N } from "./cn-C9QoOYNG.js";
|
|
8
|
-
import { z as E, A as G, B as f } from "./CollectionFormBuilder-
|
|
8
|
+
import { z as E, A as G, B as f } from "./CollectionFormBuilder-CUzpwIva.js";
|
|
9
9
|
import { I as V } from "./Input-Vv7mKQFt.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, p as J, q as V, r as W, s as Z, t as _, u as P, v as K, w as Q, x as X, y as Y, z as $, A as nn } from "./Spinner-BcBoT-J5.js";
|
|
21
21
|
import { c as j } from "./cn-C9QoOYNG.js";
|
|
22
|
-
import { z as ln, A as en, B as sn } from "./CollectionFormBuilder-
|
|
22
|
+
import { z as ln, A as en, B as sn } from "./CollectionFormBuilder-CUzpwIva.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-
|
|
7
|
-
import { u as C, S as H, F as M } from "./FormCaptcha-
|
|
6
|
+
import { D as N, F as _ } from "./CollectionFormBuilder-CUzpwIva.js";
|
|
7
|
+
import { u as C, S as H, F as M } from "./FormCaptcha-btA0HfMx.js";
|
|
8
8
|
import { B as g } from "./Spinner-BcBoT-J5.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-
|
|
4
|
+
import { z as w, A as j, B as v } from "./CollectionFormBuilder-CUzpwIva.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-
|
|
4
|
+
import { A as F, B as b, z as y } from "./CollectionFormBuilder-CUzpwIva.js";
|
|
5
5
|
import { I as f } from "./Input-Vv7mKQFt.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-
|
|
4
|
+
import { A as g, B as f, z as h } from "./CollectionFormBuilder-CUzpwIva.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-
|
|
4
|
+
import { z as u, A as g, B as C } from "./CollectionFormBuilder-CUzpwIva.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-
|
|
3
|
-
import r from "./TextWidget-
|
|
2
|
+
import { H as s } from "./CollectionFormBuilder-CUzpwIva.js";
|
|
3
|
+
import r from "./TextWidget-CHkFlxmT.js";
|
|
4
4
|
const a = (t) => /* @__PURE__ */ e.jsx(
|
|
5
5
|
r,
|
|
6
6
|
{
|
|
@@ -5,7 +5,7 @@ import { Upload as Z, X as at, ExternalLink as et } from "lucide-react";
|
|
|
5
5
|
import { useState as B, useMemo as D, useRef as st, useEffect as R } from "react";
|
|
6
6
|
import { useController as ot } from "react-hook-form";
|
|
7
7
|
import { G as q, S as W, B as F, k as nt, T as ct, l as lt, m as V, n as H } from "./Spinner-BcBoT-J5.js";
|
|
8
|
-
import { t as it, g as dt, z as xt, w as J, A as ut, B as mt } from "./CollectionFormBuilder-
|
|
8
|
+
import { t as it, g as dt, z as xt, w as J, A as ut, B as mt } from "./CollectionFormBuilder-CUzpwIva.js";
|
|
9
9
|
import { useLevo as G } from "./providers/index.js";
|
|
10
10
|
import { e as k } from "./errorHandler-_34Yv8wA.js";
|
|
11
11
|
import { I as Q } from "./Input-Vv7mKQFt.js";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ILevoAudience,
|
|
2
|
-
import { LevoAudience } from '@levo-so/core/audience-plugin';
|
|
1
|
+
import { ILevoAudience, ILevoClient } from '@levo-so/core';
|
|
3
2
|
declare global {
|
|
4
3
|
interface Window {
|
|
5
|
-
levo_client?:
|
|
6
|
-
levo_audience?:
|
|
4
|
+
levo_client?: ILevoClient;
|
|
5
|
+
levo_audience?: ILevoClient["audience"];
|
|
7
6
|
}
|
|
8
7
|
}
|
|
9
8
|
export declare const LevoAudiencePage: React.FC<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../src/audience/components/page.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../src/audience/components/page.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAYhE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,WAAW,CAAC,EAAE,WAAW,CAAC;QAC1B,aAAa,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;KACzC;CACF;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC;IACtC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC;CACvC,CAwNA,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
package/dist/audience/index.js
CHANGED
package/dist/collection/index.js
CHANGED
|
@@ -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-
|
|
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-CUzpwIva.js";
|
|
2
2
|
import { default as h } from "validatorjs";
|
|
3
3
|
export {
|
|
4
4
|
s as CollectionFormBuilder,
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LevoProvider as s, useLevo as o } from "./providers/index.js";
|
|
2
|
-
import { L as t, a as r, b as l } from "./page-
|
|
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 M, i as E, a as L, w as P, t as B, p as C, h as O, s as V, u as j, v as I, l as S, q as K } from "./CollectionFormBuilder-
|
|
2
|
+
import { L as t, a as r, b as l } from "./page-C1-z2EsC.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 M, i as E, a as L, w as P, t as B, p as C, h as O, s as V, u as j, v as I, l as S, q as K } from "./CollectionFormBuilder-CUzpwIva.js";
|
|
4
4
|
import { LevoOAuth as U } from "./membership/index.js";
|
|
5
5
|
import { B as H, D as N, j as q, e as w, i as z, g as A, f as R, c as G, a as J, h as Q, d as X, k as Y, S as Z, T as _, n as $, l as aa, m as ea, b as sa } from "./Spinner-BcBoT-J5.js";
|
|
6
6
|
import { T as ia, e as ta, s as ra } from "./Sonner-t6JVKA0a.js";
|
package/dist/membership/index.js
CHANGED
|
@@ -1,146 +1,147 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var
|
|
3
|
-
var R = (e, t, n) => t in e ?
|
|
4
|
-
var
|
|
5
|
-
import { j as
|
|
6
|
-
import j, { useState as
|
|
7
|
-
import { useLevo as
|
|
8
|
-
const
|
|
2
|
+
var O = Object.defineProperty;
|
|
3
|
+
var R = (e, t, n) => t in e ? O(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
|
+
var m = (e, t, n) => R(e, typeof t != "symbol" ? t + "" : t, n);
|
|
5
|
+
import { j as p } from "../jsx-runtime-B6kdoens.js";
|
|
6
|
+
import j, { useState as g, useEffect as x, useMemo as y, useContext as P, useRef as U, useCallback as W } from "react";
|
|
7
|
+
import { useLevo as _ } from "../providers/index.js";
|
|
8
|
+
const L = j.createContext({
|
|
9
9
|
urls: null,
|
|
10
10
|
title: "",
|
|
11
11
|
onSuccess: () => {
|
|
12
12
|
},
|
|
13
13
|
onError: () => {
|
|
14
14
|
}
|
|
15
|
-
}),
|
|
15
|
+
}), b = ({
|
|
16
16
|
title: e,
|
|
17
17
|
onSuccess: t,
|
|
18
18
|
onError: n,
|
|
19
|
-
children:
|
|
19
|
+
children: s
|
|
20
20
|
}) => {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const c = _(), i = typeof window < "u" ? window.location.href : "", [o, r] = g(null);
|
|
22
|
+
x(() => {
|
|
23
|
+
var u;
|
|
24
|
+
c.membership && ((u = c.membership) == null || u.getOAuthURL().then((a) => {
|
|
25
|
+
r(a);
|
|
25
26
|
}).catch(() => {
|
|
26
27
|
n({
|
|
27
28
|
code: "SOMETHING_WENT_WRONG",
|
|
28
29
|
message: "We could not connect with our service for your sign-in."
|
|
29
30
|
});
|
|
30
31
|
}));
|
|
31
|
-
}, [
|
|
32
|
-
const
|
|
32
|
+
}, []);
|
|
33
|
+
const f = y(
|
|
33
34
|
() => ({ title: e, urls: o, onSuccess: t, onError: n }),
|
|
34
35
|
[e, o, t, n]
|
|
35
36
|
);
|
|
36
|
-
return
|
|
37
|
-
if (o &&
|
|
38
|
-
const
|
|
39
|
-
for (const
|
|
37
|
+
return x(() => {
|
|
38
|
+
if (o && i) {
|
|
39
|
+
const u = {}, a = Object.keys(o);
|
|
40
|
+
for (const h of a)
|
|
40
41
|
try {
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
42
|
+
const l = o[h];
|
|
43
|
+
if (l) {
|
|
44
|
+
const w = new URL(l), d = w.searchParams;
|
|
45
|
+
d.set("redirect_uri", i);
|
|
46
|
+
const C = c.pageContext;
|
|
47
|
+
C && d.set("page_context", JSON.stringify(C)), u[h] = w.toString();
|
|
47
48
|
}
|
|
48
49
|
} catch {
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
+
r(u);
|
|
51
52
|
}
|
|
52
|
-
}, [
|
|
53
|
-
},
|
|
54
|
-
const
|
|
53
|
+
}, [i]), /* @__PURE__ */ p.jsx(L.Provider, { value: f, children: s });
|
|
54
|
+
}, k = () => P(L), A = ({ url: e, title: t, height: n, width: s }) => {
|
|
55
|
+
const c = window.screenX + (window.outerWidth - s) / 2, i = window.screenY + (window.outerHeight - n) / 2.5;
|
|
55
56
|
return window.open(
|
|
56
57
|
e,
|
|
57
58
|
t,
|
|
58
|
-
`width=${
|
|
59
|
+
`width=${s},height=${n},left=${c},top=${i}`
|
|
59
60
|
);
|
|
60
|
-
},
|
|
61
|
+
}, E = ({
|
|
61
62
|
title: e = "",
|
|
62
63
|
width: t = 500,
|
|
63
64
|
height: n = 500,
|
|
64
|
-
url:
|
|
65
|
-
children:
|
|
66
|
-
onCode:
|
|
67
|
-
onClose:
|
|
65
|
+
url: s,
|
|
66
|
+
children: c,
|
|
67
|
+
onCode: i,
|
|
68
|
+
onClose: o
|
|
68
69
|
}) => {
|
|
69
|
-
const [
|
|
70
|
-
window.clearInterval(
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
url:
|
|
70
|
+
const [r, f] = g(), u = U(), a = () => {
|
|
71
|
+
window.clearInterval(u.current);
|
|
72
|
+
}, h = () => {
|
|
73
|
+
f(
|
|
74
|
+
A({
|
|
75
|
+
url: s,
|
|
75
76
|
title: e,
|
|
76
77
|
width: t,
|
|
77
78
|
height: n
|
|
78
79
|
})
|
|
79
80
|
);
|
|
80
81
|
};
|
|
81
|
-
return
|
|
82
|
+
return x(() => (r && (u.current = window.setInterval(() => {
|
|
82
83
|
try {
|
|
83
|
-
const
|
|
84
|
+
const l = r.location.href, w = new URL(l).searchParams, d = w.get("code");
|
|
84
85
|
if (!d)
|
|
85
86
|
return;
|
|
86
|
-
|
|
87
|
+
i(d, w), a(), r.close();
|
|
87
88
|
} catch {
|
|
88
89
|
} finally {
|
|
89
|
-
(!
|
|
90
|
+
(!r || r.closed) && (o(), a());
|
|
90
91
|
}
|
|
91
92
|
}, 700)), () => {
|
|
92
|
-
|
|
93
|
-
}), [
|
|
93
|
+
r && r.close(), o && o();
|
|
94
|
+
}), [r]), /* @__PURE__ */ p.jsx(
|
|
94
95
|
"div",
|
|
95
96
|
{
|
|
96
97
|
onClick: () => {
|
|
97
|
-
|
|
98
|
+
h();
|
|
98
99
|
},
|
|
99
|
-
children:
|
|
100
|
+
children: c
|
|
100
101
|
}
|
|
101
102
|
);
|
|
102
|
-
},
|
|
103
|
+
}, S = ({
|
|
103
104
|
title: e = "Levo",
|
|
104
105
|
url: t,
|
|
105
106
|
children: n,
|
|
106
|
-
onSuccess:
|
|
107
|
-
onError:
|
|
108
|
-
width:
|
|
109
|
-
height:
|
|
107
|
+
onSuccess: s,
|
|
108
|
+
onError: c,
|
|
109
|
+
width: i = 500,
|
|
110
|
+
height: o = 700
|
|
110
111
|
}) => {
|
|
111
|
-
const
|
|
112
|
-
|
|
112
|
+
const r = W((f, u) => {
|
|
113
|
+
f.toLowerCase() === "success" ? s(u) : c(u);
|
|
113
114
|
}, []);
|
|
114
|
-
return /* @__PURE__ */
|
|
115
|
-
|
|
115
|
+
return /* @__PURE__ */ p.jsx(
|
|
116
|
+
E,
|
|
116
117
|
{
|
|
117
118
|
title: e,
|
|
118
|
-
width:
|
|
119
|
-
height:
|
|
119
|
+
width: i,
|
|
120
|
+
height: o,
|
|
120
121
|
onClose: () => {
|
|
121
122
|
},
|
|
122
123
|
url: t,
|
|
123
|
-
onCode:
|
|
124
|
+
onCode: r,
|
|
124
125
|
children: n
|
|
125
126
|
}
|
|
126
127
|
);
|
|
127
|
-
},
|
|
128
|
-
const { title: n, urls:
|
|
129
|
-
return
|
|
130
|
-
|
|
128
|
+
}, N = ({ children: e, provider: t }) => {
|
|
129
|
+
const { title: n, urls: s, onSuccess: c, onError: i } = k(), o = s == null ? void 0 : s[t];
|
|
130
|
+
return o ? /* @__PURE__ */ p.jsx(
|
|
131
|
+
S,
|
|
131
132
|
{
|
|
132
133
|
title: n,
|
|
133
134
|
provider: t,
|
|
134
|
-
url:
|
|
135
|
-
onSuccess:
|
|
136
|
-
onError:
|
|
135
|
+
url: o,
|
|
136
|
+
onSuccess: c,
|
|
137
|
+
onError: i,
|
|
137
138
|
children: e
|
|
138
139
|
}
|
|
139
140
|
) : null;
|
|
140
141
|
};
|
|
141
142
|
class v {
|
|
142
143
|
}
|
|
143
|
-
|
|
144
|
+
m(v, "Container", b), m(v, "Button", N);
|
|
144
145
|
export {
|
|
145
146
|
v as LevoOAuth
|
|
146
147
|
};
|