@levo-so/react 0.1.29 → 0.1.30
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-Bug2FXpG.js → CheckboxWidget-Dedx-7Wy.js} +6 -6
- package/dist/{CollectionFormBuilder-DxViQE0w.js → CollectionFormBuilder-BPzVyGLq.js} +36 -36
- package/dist/{CurrencyWidget-BtjxmXgj.js → CurrencyWidget-CW3cMoYn.js} +1 -1
- package/dist/{DateTimeWidget-Ds8g90-j.js → DateTimeWidget-eKbj2Q86.js} +5 -5
- package/dist/{DefaultFormVariant-ChnisPj2.js → DefaultFormVariant-DGecA_SF.js} +6 -6
- package/dist/{DropdownWidget-B2o6wz-C.js → DropdownWidget-DJ6rBFE0.js} +2 -2
- package/dist/{EmailWidget-Cfyfy5OH.js → EmailWidget-Bx3LTBSb.js} +4 -4
- package/dist/{FormCaptcha-BOjVusbv.js → FormCaptcha-BVawlT6h.js} +1 -1
- package/dist/{GeocoderWidget-B5TnEwp-.js → GeocoderWidget-C_8wJijA.js} +6 -6
- package/dist/{Input-2CvZ90f8.js → Input-Vv7mKQFt.js} +4 -4
- package/dist/{MultiGeocoderWidget-CF4HGkCg.js → MultiGeocoderWidget-0uUFNNoH.js} +6 -6
- package/dist/{MultiTextWidget-fnzlopnN.js → MultiTextWidget-BluGgZVP.js} +2 -2
- package/dist/{PhoneWidget-BVk5mhOm.js → PhoneWidget-Mm6DmCsK.js} +2 -2
- package/dist/{RadioWidget-CouCg5aG.js → RadioWidget-BkYAbg4o.js} +7 -7
- package/dist/{RichTextWidget-dqN--eKc.js → RichTextWidget-CbyT-y1E.js} +10 -10
- package/dist/{Spinner-CDMNP44S.js → Spinner-BcBoT-J5.js} +3 -3
- package/dist/{StepsFormVariant-Buw3v2UB.js → StepsFormVariant-Bk_rc3R7.js} +8 -8
- package/dist/{SwitchWidget-BkBgr_nQ.js → SwitchWidget-DeCIh2Vm.js} +2 -2
- package/dist/{TextWidget-I9pwxamg.js → TextWidget-Di_db2UE.js} +2 -2
- package/dist/{TextareaWidget-takl2qqW.js → TextareaWidget-CZqLQQAK.js} +1 -1
- package/dist/{ToggleCheckboxWidget-B8hL0ZhV.js → ToggleCheckboxWidget-Dynr-C0Y.js} +2 -2
- package/dist/{URLWidget-C1S_yZ9J.js → URLWidget-BvQvn0aZ.js} +3 -3
- package/dist/{UploadWidget-D7USwx7q.js → UploadWidget-mRgEWRVS.js} +29 -29
- package/dist/audience/hooks/useTrackClicks.d.ts.map +1 -1
- package/dist/audience/index.js +1 -1
- package/dist/audience/utils/autocapture.d.ts +1 -1
- package/dist/audience/utils/autocapture.d.ts.map +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/index.js +3 -3
- package/dist/{page-Bgl12goV.js → page-CgK_Cgps.js} +40 -36
- package/package.json +4 -4
|
@@ -3,9 +3,9 @@ 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-BPzVyGLq.js";
|
|
7
7
|
import { C as g } from "./Checbox-sq-atGlJ.js";
|
|
8
|
-
import { I as S } from "./Input-
|
|
8
|
+
import { I as S } from "./Input-Vv7mKQFt.js";
|
|
9
9
|
const L = ({ field: i }) => {
|
|
10
10
|
const [o, p] = w(""), [j, m] = w(!1), {
|
|
11
11
|
key: k = "",
|
|
@@ -44,13 +44,13 @@ const L = ({ field: i }) => {
|
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
46
46
|
className: C(
|
|
47
|
-
"w-full flex
|
|
47
|
+
"flex w-full flex-col flex-wrap gap-4 pt-1",
|
|
48
48
|
y && "pointer-events-none cursor-not-allowed"
|
|
49
49
|
),
|
|
50
50
|
children: n == null ? void 0 : n.map((r, e) => /* @__PURE__ */ a.jsxs(
|
|
51
51
|
"div",
|
|
52
52
|
{
|
|
53
|
-
className: "w-full flex
|
|
53
|
+
className: "flex w-full flex-nowrap items-start gap-2",
|
|
54
54
|
children: [
|
|
55
55
|
/* @__PURE__ */ a.jsx(
|
|
56
56
|
g,
|
|
@@ -72,8 +72,8 @@ const L = ({ field: i }) => {
|
|
|
72
72
|
))
|
|
73
73
|
}
|
|
74
74
|
),
|
|
75
|
-
$ && /* @__PURE__ */ a.jsxs("div", { className: "flex w-full items-center
|
|
76
|
-
/* @__PURE__ */ a.jsxs("div", { className: "flex
|
|
75
|
+
$ && /* @__PURE__ */ a.jsxs("div", { className: "my-4 flex w-full flex-wrap items-center gap-2", children: [
|
|
76
|
+
/* @__PURE__ */ a.jsxs("div", { className: "flex shrink-0 flex-nowrap gap-2", children: [
|
|
77
77
|
/* @__PURE__ */ a.jsx(
|
|
78
78
|
g,
|
|
79
79
|
{
|
|
@@ -4,7 +4,7 @@ import { FieldInterfaces as l, defaultByKinds as ue, formatsByInterface as we, i
|
|
|
4
4
|
import * as I from "react";
|
|
5
5
|
import E, { useState as w, useEffect as ge, lazy as v, Suspense as _e } from "react";
|
|
6
6
|
import { useFieldArray as Ne, useController as me } from "react-hook-form";
|
|
7
|
-
import { G as P, T as Re, l as Le, m as Te, B as W, n as Me, C as Ie, E as Ae, k as De, o as Be, S as Se } from "./Spinner-
|
|
7
|
+
import { G as P, T as Re, l as Le, m as Te, B as W, n as Me, C as Ie, E as Ae, k as De, o as Be, S as Se } from "./Spinner-BcBoT-J5.js";
|
|
8
8
|
import { X as Fe } from "lucide-react";
|
|
9
9
|
import { u as X } from "./LevoProvider-BAZy7_tP.js";
|
|
10
10
|
import { Snowflake as Ee } from "@theinternetfolks/snowflake";
|
|
@@ -247,7 +247,7 @@ const q = ({
|
|
|
247
247
|
"label",
|
|
248
248
|
{
|
|
249
249
|
className: b(
|
|
250
|
-
"block text-sm font-medium leading-normal peer-disabled:cursor-not-allowed peer-disabled:opacity-70
|
|
250
|
+
"block flex-1 select-none text-sm font-medium leading-normal text-text-1 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
251
251
|
"mb-2",
|
|
252
252
|
t
|
|
253
253
|
),
|
|
@@ -268,8 +268,8 @@ const q = ({
|
|
|
268
268
|
return !c || !t ? null : /* @__PURE__ */ s.jsxs("div", { className: "w-full max-w-full", children: [
|
|
269
269
|
/* @__PURE__ */ s.jsx(q, { children: r }),
|
|
270
270
|
i && Array.isArray(i) ? /* @__PURE__ */ s.jsxs(Re, { value: o, onValueChange: a, className: "w-full", children: [
|
|
271
|
-
/* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2
|
|
272
|
-
i.length ? /* @__PURE__ */ s.jsx(Le, { className: "h-11
|
|
271
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex w-full items-center gap-2", children: [
|
|
272
|
+
i.length ? /* @__PURE__ */ s.jsx(Le, { className: "h-11 w-1 flex-1 justify-start overflow-x-auto overflow-y-hidden", children: i == null ? void 0 : i.map((x, d) => /* @__PURE__ */ s.jsx(
|
|
273
273
|
Te,
|
|
274
274
|
{
|
|
275
275
|
id: `${e == null ? void 0 : e.key}-${d}`,
|
|
@@ -288,7 +288,7 @@ const q = ({
|
|
|
288
288
|
m.append(U(g)), a(((i == null ? void 0 : i.length) ?? 0).toString());
|
|
289
289
|
},
|
|
290
290
|
children: [
|
|
291
|
-
/* @__PURE__ */ s.jsx(le, { className: "inline-block
|
|
291
|
+
/* @__PURE__ */ s.jsx(le, { className: "mr-1 inline-block", size: "14px" }),
|
|
292
292
|
"Add"
|
|
293
293
|
]
|
|
294
294
|
}
|
|
@@ -297,10 +297,10 @@ const q = ({
|
|
|
297
297
|
i == null ? void 0 : i.map((x, d) => /* @__PURE__ */ s.jsxs(
|
|
298
298
|
Me,
|
|
299
299
|
{
|
|
300
|
-
className: "space-y-4 border
|
|
300
|
+
className: "space-y-4 rounded border bg-secondary/40",
|
|
301
301
|
value: d.toString(),
|
|
302
302
|
children: [
|
|
303
|
-
/* @__PURE__ */ s.jsx("div", { className: "flex flex-col px-3 py-2
|
|
303
|
+
/* @__PURE__ */ s.jsx("div", { className: "flex flex-col gap-3 px-3 py-2", children: g.map((y) => {
|
|
304
304
|
const k = {
|
|
305
305
|
...y,
|
|
306
306
|
key: `${t}.${d}.${y == null ? void 0 : y.key}`
|
|
@@ -314,7 +314,7 @@ const q = ({
|
|
|
314
314
|
`common-fields-${y == null ? void 0 : y.id}`
|
|
315
315
|
);
|
|
316
316
|
}) }),
|
|
317
|
-
/* @__PURE__ */ s.jsxs("div", { className: "flex
|
|
317
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex items-center border-t p-2", children: [
|
|
318
318
|
/* @__PURE__ */ s.jsx(
|
|
319
319
|
W,
|
|
320
320
|
{
|
|
@@ -323,7 +323,7 @@ const q = ({
|
|
|
323
323
|
},
|
|
324
324
|
disabled: d === 0,
|
|
325
325
|
size: "icon",
|
|
326
|
-
className: "
|
|
326
|
+
className: "h-8 w-8 rounded-full",
|
|
327
327
|
children: /* @__PURE__ */ s.jsx(Ie, { size: "24px" })
|
|
328
328
|
}
|
|
329
329
|
),
|
|
@@ -341,7 +341,7 @@ const q = ({
|
|
|
341
341
|
/* @__PURE__ */ s.jsx(
|
|
342
342
|
W,
|
|
343
343
|
{
|
|
344
|
-
className: "
|
|
344
|
+
className: "h-8 w-8 rounded-full",
|
|
345
345
|
onClick: () => {
|
|
346
346
|
a((d + 1).toString()), m.move(d, d + 1);
|
|
347
347
|
},
|
|
@@ -364,7 +364,7 @@ const q = ({
|
|
|
364
364
|
m.append(U(g)), a("0");
|
|
365
365
|
},
|
|
366
366
|
children: [
|
|
367
|
-
/* @__PURE__ */ s.jsx(le, { className: "inline-block
|
|
367
|
+
/* @__PURE__ */ s.jsx(le, { className: "mr-1 inline-block", size: "14px" }),
|
|
368
368
|
"Add"
|
|
369
369
|
]
|
|
370
370
|
}
|
|
@@ -428,7 +428,7 @@ const xe = (e) => {
|
|
|
428
428
|
};
|
|
429
429
|
}, rt = ({
|
|
430
430
|
children: e
|
|
431
|
-
}) => /* @__PURE__ */ s.jsx("p", { className: "text-xs font-normal text-red-400
|
|
431
|
+
}) => /* @__PURE__ */ s.jsx("p", { className: "text-wrap text-xs font-normal text-red-400", children: e }), at = ({
|
|
432
432
|
children: e
|
|
433
433
|
}) => /* @__PURE__ */ s.jsx("p", { className: b("text-xs font-normal text-text-1"), children: e }), J = E.forwardRef(({ error: e, helperText: n, containerStyles: t, readOnly: r, children: c }, g) => /* @__PURE__ */ s.jsx(
|
|
434
434
|
"div",
|
|
@@ -441,8 +441,8 @@ const xe = (e) => {
|
|
|
441
441
|
ref: g,
|
|
442
442
|
children: /* @__PURE__ */ s.jsxs("div", { className: b("w-full shrink-0", "sm:flex-1"), children: [
|
|
443
443
|
c,
|
|
444
|
-
e && /* @__PURE__ */ s.jsx("div", { className: b("w-full
|
|
445
|
-
n && /* @__PURE__ */ s.jsx("div", { className: b("w-full
|
|
444
|
+
e && /* @__PURE__ */ s.jsx("div", { className: b("mt-3 w-full"), children: /* @__PURE__ */ s.jsx(rt, { children: e }) }),
|
|
445
|
+
n && /* @__PURE__ */ s.jsx("div", { className: b("mt-3 w-full"), children: /* @__PURE__ */ s.jsx(at, { children: n }) })
|
|
446
446
|
] })
|
|
447
447
|
}
|
|
448
448
|
));
|
|
@@ -719,8 +719,8 @@ const dt = E.lazy(
|
|
|
719
719
|
),
|
|
720
720
|
f != null && f.length ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
721
721
|
/* @__PURE__ */ s.jsxs("div", { className: "relative overflow-hidden", children: [
|
|
722
|
-
t ? /* @__PURE__ */ s.jsx("div", { className: "
|
|
723
|
-
/* @__PURE__ */ s.jsx(Be, { className: "h-8 w-8 animate-spin
|
|
722
|
+
t ? /* @__PURE__ */ s.jsx("div", { className: "absolute bottom-0 left-0 right-0 top-0 z-10 flex items-center justify-center bg-[rgba(0,0,0,0.05)]", children: /* @__PURE__ */ s.jsxs("div", { className: "flex items-center", children: [
|
|
723
|
+
/* @__PURE__ */ s.jsx(Be, { className: "mr-2 h-8 w-8 animate-spin" }),
|
|
724
724
|
"Fetching"
|
|
725
725
|
] }) }) : null,
|
|
726
726
|
/* @__PURE__ */ s.jsx(he, { className: f.length > 5 ? "min-h-72" : "", children: /* @__PURE__ */ s.jsx(ye, { children: c.map((u) => /* @__PURE__ */ s.jsx(fe, { children: /* @__PURE__ */ s.jsxs(je, { className: "flex justify-between", children: [
|
|
@@ -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-BluGgZVP.js")
|
|
919
|
+
), ie = v(() => import("./TextWidget-Di_db2UE.js")), xt = v(
|
|
920
|
+
() => import("./CurrencyWidget-CW3cMoYn.js")
|
|
921
921
|
), ht = v(
|
|
922
|
-
() => import("./CheckboxWidget-
|
|
922
|
+
() => import("./CheckboxWidget-Dedx-7Wy.js")
|
|
923
923
|
), ce = v(
|
|
924
|
-
() => import("./DateTimeWidget-
|
|
924
|
+
() => import("./DateTimeWidget-eKbj2Q86.js")
|
|
925
925
|
), de = v(
|
|
926
|
-
() => import("./DropdownWidget-
|
|
927
|
-
), yt = v(() => import("./EmailWidget-
|
|
928
|
-
() => import("./GeocoderWidget-
|
|
926
|
+
() => import("./DropdownWidget-DJ6rBFE0.js")
|
|
927
|
+
), yt = v(() => import("./EmailWidget-Bx3LTBSb.js")), ft = v(
|
|
928
|
+
() => import("./GeocoderWidget-C_8wJijA.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-0uUFNNoH.js")
|
|
931
|
+
), bt = v(() => import("./PhoneWidget-Mm6DmCsK.js")), vt = v(() => import("./RadioWidget-BkYAbg4o.js")), Ct = v(
|
|
932
|
+
() => import("./RichTextWidget-CbyT-y1E.js")
|
|
933
|
+
), wt = v(() => import("./SwitchWidget-DeCIh2Vm.js")), kt = v(
|
|
934
|
+
() => import("./TextareaWidget-CZqLQQAK.js")
|
|
935
935
|
), Wt = v(
|
|
936
|
-
() => import("./ToggleCheckboxWidget-
|
|
937
|
-
), _t = v(() => import("./URLWidget-
|
|
936
|
+
() => import("./ToggleCheckboxWidget-Dynr-C0Y.js")
|
|
937
|
+
), _t = v(() => import("./URLWidget-BvQvn0aZ.js")), K = v(() => import("./UploadWidget-mRgEWRVS.js")), Nt = ({
|
|
938
938
|
field: e,
|
|
939
939
|
isInternal: n
|
|
940
940
|
}) => {
|
|
@@ -1056,7 +1056,7 @@ const dt = E.lazy(
|
|
|
1056
1056
|
const { key: t = "", label: r = "", field_interface: c = "", fields: g = [] } = e;
|
|
1057
1057
|
return !c || !t ? null : /* @__PURE__ */ s.jsxs("div", { className: "w-full", children: [
|
|
1058
1058
|
/* @__PURE__ */ s.jsx(q, { children: r }),
|
|
1059
|
-
/* @__PURE__ */ s.jsx("div", { className: "
|
|
1059
|
+
/* @__PURE__ */ s.jsx("div", { className: "flex flex-col gap-3 rounded border bg-secondary/40 px-3 py-4", children: g.map((o) => {
|
|
1060
1060
|
const a = {
|
|
1061
1061
|
...o,
|
|
1062
1062
|
key: `${t}.${o == null ? void 0 : o.key}`
|
|
@@ -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-DGecA_SF.js")
|
|
1107
1107
|
), Mt = E.lazy(
|
|
1108
|
-
() => import("./StepsFormVariant-
|
|
1108
|
+
() => import("./StepsFormVariant-Bk_rc3R7.js")
|
|
1109
1109
|
), It = ({
|
|
1110
1110
|
formVariant: e,
|
|
1111
1111
|
...n
|
|
@@ -1116,7 +1116,7 @@ const dt = E.lazy(
|
|
|
1116
1116
|
"h1",
|
|
1117
1117
|
{
|
|
1118
1118
|
className: b(
|
|
1119
|
-
"
|
|
1119
|
+
"mb-4 text-left text-2xl font-semibold text-black",
|
|
1120
1120
|
e === "default" ? "ml-[32%]" : "ml-0"
|
|
1121
1121
|
),
|
|
1122
1122
|
children: [
|
|
@@ -1157,7 +1157,7 @@ const dt = E.lazy(
|
|
|
1157
1157
|
}) : (console.error(
|
|
1158
1158
|
"[CollectionFormBuilder] Collection ID or Workspace ID is missing."
|
|
1159
1159
|
), g(!1));
|
|
1160
|
-
}, [e]), /* @__PURE__ */ s.jsx("div", { className: "w-full
|
|
1160
|
+
}, [e]), /* @__PURE__ */ s.jsx("div", { className: "h-auto w-full", children: c ? /* @__PURE__ */ s.jsx("div", { className: "flex min-h-[400px] w-full items-center justify-center rounded-md", children: /* @__PURE__ */ s.jsx(Se, {}) }) : o ? /* @__PURE__ */ s.jsx(It, { schema: o, ...t }) : null });
|
|
1161
1161
|
};
|
|
1162
1162
|
export {
|
|
1163
1163
|
J as A,
|
|
@@ -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-BPzVyGLq.js";
|
|
6
6
|
const V = ({
|
|
7
7
|
field: r,
|
|
8
8
|
...m
|
|
@@ -4,8 +4,8 @@ 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-
|
|
8
|
-
import { I as F } from "./Input-
|
|
7
|
+
import { z as M, A as D, B as C } from "./CollectionFormBuilder-BPzVyGLq.js";
|
|
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) {
|
|
11
11
|
const o = new Date(e);
|
|
@@ -23,12 +23,12 @@ const T = l.default.default || l.default || l, I = (e) => {
|
|
|
23
23
|
}), y = !!(e != null && e.required), g = (d = a == null ? void 0 : a.error) == null ? void 0 : d.message, c = (e == null ? void 0 : e.field_interface) === b.DateTimeWidget;
|
|
24
24
|
return /* @__PURE__ */ r.jsxs(D, { helperText: f, readOnly: x, error: g, children: [
|
|
25
25
|
m && /* @__PURE__ */ r.jsx(C, { htmlFor: n, isRequired: y, children: m }),
|
|
26
|
-
/* @__PURE__ */ r.jsxs("div", { className: "w-full
|
|
26
|
+
/* @__PURE__ */ r.jsxs("div", { className: "relative w-full rounded-md", children: [
|
|
27
27
|
/* @__PURE__ */ r.jsx(
|
|
28
28
|
"div",
|
|
29
29
|
{
|
|
30
30
|
className: p(
|
|
31
|
-
"absolute
|
|
31
|
+
"pointer-events-none absolute bottom-0 left-0 top-0 flex w-9 items-center justify-center overflow-hidden rounded-l-md"
|
|
32
32
|
),
|
|
33
33
|
children: /* @__PURE__ */ r.jsx(w, { size: "20px", className: "text-muted-foreground" })
|
|
34
34
|
}
|
|
@@ -58,7 +58,7 @@ const T = l.default.default || l.default || l, I = (e) => {
|
|
|
58
58
|
"div",
|
|
59
59
|
{
|
|
60
60
|
className: p(
|
|
61
|
-
"absolute
|
|
61
|
+
"absolute bottom-0 right-0 top-0 z-10 flex w-9 items-center justify-center overflow-hidden rounded-l-md"
|
|
62
62
|
),
|
|
63
63
|
children: /* @__PURE__ */ r.jsx(
|
|
64
64
|
"button",
|
|
@@ -1,9 +1,9 @@
|
|
|
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-
|
|
6
|
-
import { B as D } from "./Spinner-
|
|
4
|
+
import { D as F, F as N } from "./CollectionFormBuilder-BPzVyGLq.js";
|
|
5
|
+
import { u as g, S as w, F as b } from "./FormCaptcha-BVawlT6h.js";
|
|
6
|
+
import { B as D } from "./Spinner-BcBoT-J5.js";
|
|
7
7
|
const _ = () => {
|
|
8
8
|
var n;
|
|
9
9
|
const {
|
|
@@ -39,8 +39,8 @@ const _ = () => {
|
|
|
39
39
|
"form",
|
|
40
40
|
{
|
|
41
41
|
className: t(
|
|
42
|
-
"w-full
|
|
43
|
-
u && "
|
|
42
|
+
"flex w-full flex-col gap-6 rounded-md px-4 py-6 text-text-1 md:px-8",
|
|
43
|
+
u && "pointer-events-none opacity-50"
|
|
44
44
|
),
|
|
45
45
|
id: "collection-form",
|
|
46
46
|
onSubmit: j,
|
|
@@ -60,7 +60,7 @@ const _ = () => {
|
|
|
60
60
|
] }, s.id);
|
|
61
61
|
}),
|
|
62
62
|
!d && /* @__PURE__ */ e.jsx(b, {}),
|
|
63
|
-
(a == null ? void 0 : a.show) && /* @__PURE__ */ e.jsx("div", { className: "w-full
|
|
63
|
+
(a == null ? void 0 : a.show) && /* @__PURE__ */ e.jsx("div", { className: "mt-6 flex w-full items-center justify-end", children: /* @__PURE__ */ e.jsx(
|
|
64
64
|
D,
|
|
65
65
|
{
|
|
66
66
|
className: a == null ? void 0 : a.styles,
|
|
@@ -4,8 +4,8 @@ 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-
|
|
8
|
-
import { I as L } from "./Input-
|
|
7
|
+
import { z as D, A as N, B as q } from "./CollectionFormBuilder-BPzVyGLq.js";
|
|
8
|
+
import { I as L } from "./Input-Vv7mKQFt.js";
|
|
9
9
|
const G = ({
|
|
10
10
|
field: s,
|
|
11
11
|
...o
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as r } from "./jsx-runtime-B6kdoens.js";
|
|
2
2
|
import { useController as y } from "react-hook-form";
|
|
3
|
-
import { G as C } from "./Spinner-
|
|
4
|
-
import { z as F, A as I, B as V } from "./CollectionFormBuilder-
|
|
5
|
-
import { I as b } from "./Input-
|
|
3
|
+
import { G as C } from "./Spinner-BcBoT-J5.js";
|
|
4
|
+
import { z as F, A as I, B as V } from "./CollectionFormBuilder-BPzVyGLq.js";
|
|
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);
|
|
8
8
|
}
|
|
@@ -22,7 +22,7 @@ const Z = ({ field: e, ...c }) => {
|
|
|
22
22
|
{
|
|
23
23
|
id: t,
|
|
24
24
|
type: "email",
|
|
25
|
-
leftIcon: /* @__PURE__ */ r.jsx("div", { className: "
|
|
25
|
+
leftIcon: /* @__PURE__ */ r.jsx("div", { className: "flex h-full w-full items-center justify-center bg-muted", children: /* @__PURE__ */ r.jsx(w, { size: "20px", className: "text-muted-foreground" }) }),
|
|
26
26
|
value: h || "",
|
|
27
27
|
onChange: (o) => {
|
|
28
28
|
var n, i, m;
|
|
@@ -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 { u as x } from "./LevoProvider-BAZy7_tP.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-BPzVyGLq.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";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
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
|
-
import { o as z } from "./Spinner-
|
|
6
|
-
import { z as T, A as q, B as A } from "./CollectionFormBuilder-
|
|
7
|
-
import { I as E } from "./Input-
|
|
5
|
+
import { o as z } from "./Spinner-BcBoT-J5.js";
|
|
6
|
+
import { z as T, A as q, B as A } from "./CollectionFormBuilder-BPzVyGLq.js";
|
|
7
|
+
import { I as E } from "./Input-Vv7mKQFt.js";
|
|
8
8
|
import { u as O } from "./LevoProvider-BAZy7_tP.js";
|
|
9
9
|
const $ = ({ field: t }) => {
|
|
10
10
|
var _;
|
|
@@ -33,7 +33,7 @@ const $ = ({ field: t }) => {
|
|
|
33
33
|
}).finally(() => i(!1)));
|
|
34
34
|
}, [c, m]), v(() => {
|
|
35
35
|
s != null && s.place_name && (h(s == null ? void 0 : s.place_name), u(!0));
|
|
36
|
-
}, [s]), /* @__PURE__ */ o.jsx(q, { error: C, helperText: w, readOnly: j, children: /* @__PURE__ */ o.jsxs("div", { className: "w-full
|
|
36
|
+
}, [s]), /* @__PURE__ */ o.jsx(q, { error: C, helperText: w, readOnly: j, children: /* @__PURE__ */ o.jsxs("div", { className: "relative w-full", children: [
|
|
37
37
|
f && /* @__PURE__ */ o.jsx(A, { htmlFor: d, isRequired: B, children: f }),
|
|
38
38
|
/* @__PURE__ */ o.jsx(
|
|
39
39
|
E,
|
|
@@ -51,10 +51,10 @@ const $ = ({ field: t }) => {
|
|
|
51
51
|
...L
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
|
-
c && !g && !m && /* @__PURE__ */ o.jsx("div", { className: "absolute
|
|
54
|
+
c && !g && !m && /* @__PURE__ */ o.jsx("div", { className: "absolute left-[-1px] z-50 w-full rounded-[6px] bg-white p-[4px] shadow-[0_0_8px_rgba(0,0,0,0.25)]", children: l != null && l.length ? l.map((e) => /* @__PURE__ */ o.jsx(
|
|
55
55
|
"p",
|
|
56
56
|
{
|
|
57
|
-
className: "text-md
|
|
57
|
+
className: "text-md cursor-pointer rounded-[6px] p-[8px] text-black hover:bg-gray-200",
|
|
58
58
|
onClick: () => I(e),
|
|
59
59
|
children: e.description
|
|
60
60
|
},
|
|
@@ -10,12 +10,12 @@ const b = u.forwardRef(
|
|
|
10
10
|
rightIconBoxStyles: d,
|
|
11
11
|
containerStyles: n,
|
|
12
12
|
...s
|
|
13
|
-
}, a) => /* @__PURE__ */ e.jsxs("div", { className: r("w-full
|
|
13
|
+
}, a) => /* @__PURE__ */ e.jsxs("div", { className: r("relative w-full", n), children: [
|
|
14
14
|
t ? /* @__PURE__ */ e.jsx(
|
|
15
15
|
"div",
|
|
16
16
|
{
|
|
17
17
|
className: r(
|
|
18
|
-
"absolute
|
|
18
|
+
"absolute bottom-0 left-0 top-0 flex w-9 items-center justify-center overflow-hidden rounded-l-md",
|
|
19
19
|
"border border-transparent",
|
|
20
20
|
i
|
|
21
21
|
),
|
|
@@ -27,7 +27,7 @@ const b = u.forwardRef(
|
|
|
27
27
|
{
|
|
28
28
|
ref: a,
|
|
29
29
|
className: r(
|
|
30
|
-
"h-9
|
|
30
|
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
31
31
|
s.readOnly ? "focus-visible:ring-0" : "",
|
|
32
32
|
t ? "pl-11" : "",
|
|
33
33
|
o ? "pr-11" : "",
|
|
@@ -40,7 +40,7 @@ const b = u.forwardRef(
|
|
|
40
40
|
"div",
|
|
41
41
|
{
|
|
42
42
|
className: r(
|
|
43
|
-
"absolute
|
|
43
|
+
"absolute bottom-0 right-0 top-0 flex w-9 items-center justify-center overflow-hidden rounded-r-md",
|
|
44
44
|
"border border-transparent",
|
|
45
45
|
d
|
|
46
46
|
),
|
|
@@ -2,16 +2,16 @@
|
|
|
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-
|
|
7
|
-
import { B as p } from "./Spinner-
|
|
5
|
+
import { B as c } from "./CollectionFormBuilder-BPzVyGLq.js";
|
|
6
|
+
import { GeocoderWidget as d } from "./GeocoderWidget-C_8wJijA.js";
|
|
7
|
+
import { B as p } from "./Spinner-BcBoT-J5.js";
|
|
8
8
|
const k = ({
|
|
9
9
|
field: l
|
|
10
10
|
}) => {
|
|
11
11
|
const { key: s = "", label: o = "" } = l, { fields: r, ...i } = n({
|
|
12
12
|
name: s
|
|
13
13
|
});
|
|
14
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "w-full
|
|
14
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "relative w-full", children: [
|
|
15
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(
|
|
@@ -30,12 +30,12 @@ const k = ({
|
|
|
30
30
|
{
|
|
31
31
|
variant: "ghost",
|
|
32
32
|
size: "xs",
|
|
33
|
-
className: "shrink-0 grow-0
|
|
33
|
+
className: "shrink-0 grow-0 self-start",
|
|
34
34
|
onClick: () => {
|
|
35
35
|
i.append(null);
|
|
36
36
|
},
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */ e.jsx(m, { className: "inline-block
|
|
38
|
+
/* @__PURE__ */ e.jsx(m, { className: "mr-1 inline-block", size: "14px" }),
|
|
39
39
|
"Add"
|
|
40
40
|
]
|
|
41
41
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
4
|
-
import { I } from "./Input-
|
|
3
|
+
import { z as C, A as b, B as q } from "./CollectionFormBuilder-BPzVyGLq.js";
|
|
4
|
+
import { I } from "./Input-Vv7mKQFt.js";
|
|
5
5
|
const f = ({ field: r }) => {
|
|
6
6
|
var l;
|
|
7
7
|
const { key: u = "", label: n = "", helper_text: c = "", readonly: x = !1 } = r, o = u, {
|
|
@@ -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-BPzVyGLq.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 },
|
|
@@ -21,7 +21,7 @@ const P = ({ field: e }) => {
|
|
|
21
21
|
value: d,
|
|
22
22
|
className: l(
|
|
23
23
|
"w-full",
|
|
24
|
-
n ? "focus-visible:ring-0
|
|
24
|
+
n ? "pointer-events-none focus-visible:ring-0" : ""
|
|
25
25
|
),
|
|
26
26
|
inputClassName: l(
|
|
27
27
|
"w-full border border-input !bg-transparent text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 !text-text-1"
|
|
@@ -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 B } from "./Spinner-
|
|
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-
|
|
9
|
-
import { I as V } from "./Input-
|
|
8
|
+
import { z as E, A as G, B as f } from "./CollectionFormBuilder-BPzVyGLq.js";
|
|
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);
|
|
12
12
|
}
|
|
@@ -35,7 +35,7 @@ const C = ({ field: s }) => {
|
|
|
35
35
|
{
|
|
36
36
|
id: a,
|
|
37
37
|
className: N(
|
|
38
|
-
"w-full flex
|
|
38
|
+
"flex w-full flex-col flex-wrap gap-4 pt-1",
|
|
39
39
|
g && "pointer-events-none cursor-not-allowed"
|
|
40
40
|
),
|
|
41
41
|
onValueChange: (e) => {
|
|
@@ -47,13 +47,13 @@ const C = ({ field: s }) => {
|
|
|
47
47
|
value: u ? "Other" : i,
|
|
48
48
|
...R,
|
|
49
49
|
children: [
|
|
50
|
-
t == null ? void 0 : t.map((e, l) => /* @__PURE__ */ r.jsxs("div", { className: "flex gap-2
|
|
50
|
+
t == null ? void 0 : t.map((e, l) => /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
51
51
|
/* @__PURE__ */ r.jsx(x, { id: `${a}-${e}-${l}`, value: e, children: e }),
|
|
52
52
|
/* @__PURE__ */ r.jsx(
|
|
53
53
|
f,
|
|
54
54
|
{
|
|
55
55
|
htmlFor: `${a}-${e}-${l}`,
|
|
56
|
-
className: "font-normal
|
|
56
|
+
className: "mb-0 font-normal",
|
|
57
57
|
children: e
|
|
58
58
|
}
|
|
59
59
|
)
|
|
@@ -63,7 +63,7 @@ const C = ({ field: s }) => {
|
|
|
63
63
|
/* @__PURE__ */ r.jsx(
|
|
64
64
|
f,
|
|
65
65
|
{
|
|
66
|
-
className: "font-normal leading-none
|
|
66
|
+
className: "mb-0 font-normal leading-none",
|
|
67
67
|
htmlFor: `${a}-other`,
|
|
68
68
|
children: "Other:"
|
|
69
69
|
}
|
|
@@ -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 q, useEffect as D } from "react";
|
|
19
19
|
import { useController as G } from "react-hook-form";
|
|
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-
|
|
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-BPzVyGLq.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
|
}
|
|
@@ -38,7 +38,7 @@ const e = ({
|
|
|
38
38
|
"button",
|
|
39
39
|
{
|
|
40
40
|
className: j(
|
|
41
|
-
"text-gray-900
|
|
41
|
+
"rounded-[4px] text-gray-900 hover:bg-gray-200",
|
|
42
42
|
n ? "bg-gray-400" : "bg-transparent",
|
|
43
43
|
c
|
|
44
44
|
),
|
|
@@ -46,7 +46,7 @@ const e = ({
|
|
|
46
46
|
...i,
|
|
47
47
|
children: t
|
|
48
48
|
}
|
|
49
|
-
), a = ({ children: n }) => /* @__PURE__ */ l.jsx("div", { className: "flex
|
|
49
|
+
), a = ({ children: n }) => /* @__PURE__ */ l.jsx("div", { className: "flex gap-[2px] border-r-[1px] border-solid border-input p-1", children: n }), rn = ({ editor: n }) => {
|
|
50
50
|
if (!n)
|
|
51
51
|
return null;
|
|
52
52
|
function c(i) {
|
|
@@ -60,7 +60,7 @@ const e = ({
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
const t = n.getAttributes("link").href;
|
|
63
|
-
return /* @__PURE__ */ l.jsxs("div", { className: "w-full
|
|
63
|
+
return /* @__PURE__ */ l.jsxs("div", { className: "overflow flex w-full flex-wrap rounded-br-[14px] rounded-tl-[14px] border-b-[1px] border-solid bg-white", children: [
|
|
64
64
|
/* @__PURE__ */ l.jsxs(a, { children: [
|
|
65
65
|
/* @__PURE__ */ l.jsx(
|
|
66
66
|
e,
|
|
@@ -273,16 +273,16 @@ const e = ({
|
|
|
273
273
|
"div",
|
|
274
274
|
{
|
|
275
275
|
className: j(
|
|
276
|
-
"w-full rounded-md border border-input placeholder:text-muted-foreground focus-within:outline-none focus-within:ring-1 focus-within:ring-ring
|
|
277
|
-
(m == null ? void 0 : m.disabled) && "cursor-not-allowed opacity-50
|
|
278
|
-
x && "focus-visible:ring-0
|
|
276
|
+
"w-full overflow-hidden rounded-md border border-input placeholder:text-muted-foreground focus-within:outline-none focus-within:ring-1 focus-within:ring-ring",
|
|
277
|
+
(m == null ? void 0 : m.disabled) && "pointer-events-none cursor-not-allowed opacity-50",
|
|
278
|
+
x && "pointer-events-none focus-visible:ring-0"
|
|
279
279
|
),
|
|
280
280
|
children: [
|
|
281
281
|
/* @__PURE__ */ l.jsx(rn, { editor: s }),
|
|
282
282
|
/* @__PURE__ */ l.jsx(
|
|
283
283
|
"div",
|
|
284
284
|
{
|
|
285
|
-
className: "
|
|
285
|
+
className: "h-[210px] w-full flex-1 overflow-y-auto rounded-b-[inherit] bg-white",
|
|
286
286
|
onClick: () => {
|
|
287
287
|
var f;
|
|
288
288
|
return (f = s == null ? void 0 : s.commands) == null ? void 0 : f.focus();
|
|
@@ -291,7 +291,7 @@ const e = ({
|
|
|
291
291
|
E,
|
|
292
292
|
{
|
|
293
293
|
id: o,
|
|
294
|
-
className: "prose prose-sm
|
|
294
|
+
className: "prose prose-sm !w-full px-4 [&>div]:w-full [&>div]:outline-none",
|
|
295
295
|
name: o,
|
|
296
296
|
editor: s
|
|
297
297
|
}
|
|
@@ -276,7 +276,7 @@ const q = o.Root, pt = o.Trigger, J = o.Portal, bt = o.Close, j = u.forwardRef((
|
|
|
276
276
|
{
|
|
277
277
|
ref: a,
|
|
278
278
|
className: c(
|
|
279
|
-
"fixed
|
|
279
|
+
"fixed inset-0 z-50 grid max-h-screen place-items-center overflow-y-auto bg-background/80 py-10 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
280
280
|
t
|
|
281
281
|
),
|
|
282
282
|
...e
|
|
@@ -288,7 +288,7 @@ const N = u.forwardRef(({ className: t, children: e, hideCloseButton: a, overlay
|
|
|
288
288
|
{
|
|
289
289
|
ref: l,
|
|
290
290
|
className: c(
|
|
291
|
-
"z-50
|
|
291
|
+
"relative z-50 grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",
|
|
292
292
|
t
|
|
293
293
|
),
|
|
294
294
|
...s,
|
|
@@ -298,7 +298,7 @@ const N = u.forwardRef(({ className: t, children: e, hideCloseButton: a, overlay
|
|
|
298
298
|
o.Close,
|
|
299
299
|
{
|
|
300
300
|
type: "button",
|
|
301
|
-
className: "absolute
|
|
301
|
+
className: "absolute right-4 top-4 rounded-sm p-1 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
302
302
|
children: [
|
|
303
303
|
/* @__PURE__ */ i.jsx(R, { className: "h-4 w-4" }),
|
|
304
304
|
/* @__PURE__ */ i.jsx("span", { className: "sr-only", children: "Close" })
|
|
@@ -3,9 +3,9 @@ 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-
|
|
8
|
-
import { B as g } from "./Spinner-
|
|
6
|
+
import { D as N, F as _ } from "./CollectionFormBuilder-BPzVyGLq.js";
|
|
7
|
+
import { u as C, S as H, F as M } from "./FormCaptcha-BVawlT6h.js";
|
|
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 = () => {
|
|
11
11
|
a((o) => o - 1);
|
|
@@ -79,13 +79,13 @@ const Y = () => {
|
|
|
79
79
|
"form",
|
|
80
80
|
{
|
|
81
81
|
className: F(
|
|
82
|
-
"
|
|
83
|
-
L && "
|
|
82
|
+
"border-[rgb(229, 231, 235)] min-h-12 w-full rounded-md border px-4 py-6 text-text-1 md:px-8",
|
|
83
|
+
L && "pointer-events-none opacity-50"
|
|
84
84
|
),
|
|
85
85
|
id: "collection-form",
|
|
86
86
|
onSubmit: E,
|
|
87
87
|
children: [
|
|
88
|
-
!(d != null && d.hideSectionHeadings) && /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between
|
|
88
|
+
!(d != null && d.hideSectionHeadings) && /* @__PURE__ */ t.jsxs("div", { className: "mb-6 flex items-center justify-between", children: [
|
|
89
89
|
/* @__PURE__ */ t.jsx("p", { className: "text-xl font-medium", children: (r == null ? void 0 : r.label) || "Details" }),
|
|
90
90
|
/* @__PURE__ */ t.jsxs("p", { children: [
|
|
91
91
|
"Step ",
|
|
@@ -94,7 +94,7 @@ const Y = () => {
|
|
|
94
94
|
((j = s == null ? void 0 : s.sections) == null ? void 0 : j.length) || 1
|
|
95
95
|
] })
|
|
96
96
|
] }),
|
|
97
|
-
/* @__PURE__ */ t.jsxs("div", { className: "w-full flex
|
|
97
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex w-full flex-col gap-6", children: [
|
|
98
98
|
(v = r == null ? void 0 : r.fields) == null ? void 0 : v.map((e) => e && !e.hidden ? /* @__PURE__ */ t.jsx(
|
|
99
99
|
_,
|
|
100
100
|
{
|
|
@@ -105,7 +105,7 @@ const Y = () => {
|
|
|
105
105
|
) : null),
|
|
106
106
|
!c && x && /* @__PURE__ */ t.jsx(M, {})
|
|
107
107
|
] }),
|
|
108
|
-
/* @__PURE__ */ t.jsxs("div", { className: "
|
|
108
|
+
/* @__PURE__ */ t.jsxs("div", { className: "mt-8 flex justify-between", children: [
|
|
109
109
|
n !== 0 ? /* @__PURE__ */ t.jsx(
|
|
110
110
|
g,
|
|
111
111
|
{
|
|
@@ -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-BPzVyGLq.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";
|
|
@@ -34,7 +34,7 @@ const C = ({ field: e }) => {
|
|
|
34
34
|
name: o,
|
|
35
35
|
rules: w(e)
|
|
36
36
|
}), f = !!(e != null && e.required), x = (l = n == null ? void 0 : n.error) == null ? void 0 : l.message;
|
|
37
|
-
return /* @__PURE__ */ r.jsx(j, { error: x, helperText: u, readOnly: p, children: /* @__PURE__ */ r.jsxs("div", { className: "w-full
|
|
37
|
+
return /* @__PURE__ */ r.jsx(j, { error: x, helperText: u, readOnly: p, children: /* @__PURE__ */ r.jsxs("div", { className: "flex w-full max-w-[300px] items-center justify-between", children: [
|
|
38
38
|
s && /* @__PURE__ */ r.jsx(v, { htmlFor: o, isRequired: f, className: "!mb-0", children: s }),
|
|
39
39
|
/* @__PURE__ */ r.jsx(
|
|
40
40
|
m,
|
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
5
|
-
import { I as f } from "./Input-
|
|
4
|
+
import { A as F, B as b, z as y } from "./CollectionFormBuilder-BPzVyGLq.js";
|
|
5
|
+
import { I as f } from "./Input-Vv7mKQFt.js";
|
|
6
6
|
const k = ({
|
|
7
7
|
field: r,
|
|
8
8
|
inputStyles: a,
|
|
@@ -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-BPzVyGLq.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-BPzVyGLq.js";
|
|
5
5
|
import { C as f } from "./Checbox-sq-atGlJ.js";
|
|
6
6
|
const y = ({
|
|
7
7
|
field: e
|
|
@@ -19,7 +19,7 @@ const y = ({
|
|
|
19
19
|
error: a == null ? void 0 : a.message,
|
|
20
20
|
helperText: t,
|
|
21
21
|
readOnly: n,
|
|
22
|
-
children: /* @__PURE__ */ r.jsxs("div", { className: "w-full flex
|
|
22
|
+
children: /* @__PURE__ */ r.jsxs("div", { className: "flex w-full flex-nowrap items-start gap-2", ref: d, children: [
|
|
23
23
|
/* @__PURE__ */ r.jsx(
|
|
24
24
|
f,
|
|
25
25
|
{
|
|
@@ -1,10 +1,10 @@
|
|
|
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-BPzVyGLq.js";
|
|
3
|
+
import r from "./TextWidget-Di_db2UE.js";
|
|
4
4
|
const a = (t) => /* @__PURE__ */ e.jsx(
|
|
5
5
|
r,
|
|
6
6
|
{
|
|
7
|
-
leftIcon: /* @__PURE__ */ e.jsx("div", { className: "
|
|
7
|
+
leftIcon: /* @__PURE__ */ e.jsx("div", { className: "flex h-full w-full items-center justify-center bg-muted", children: /* @__PURE__ */ e.jsx(s, { size: "20px", className: "text-muted-foreground" }) }),
|
|
8
8
|
...t
|
|
9
9
|
}
|
|
10
10
|
);
|
|
@@ -4,11 +4,11 @@ import { MediaKindList as rt } from "@levo-so/core";
|
|
|
4
4
|
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
|
-
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-
|
|
8
|
-
import { t as it, g as dt, z as xt, w as J, A as ut, B as mt } from "./CollectionFormBuilder-
|
|
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-BPzVyGLq.js";
|
|
9
9
|
import { u as G } from "./LevoProvider-BAZy7_tP.js";
|
|
10
10
|
import { e as k } from "./errorHandler-_34Yv8wA.js";
|
|
11
|
-
import { I as Q } from "./Input-
|
|
11
|
+
import { I as Q } from "./Input-Vv7mKQFt.js";
|
|
12
12
|
import { c as I } from "./cn-C9QoOYNG.js";
|
|
13
13
|
import { useDropzone as ht } from "react-dropzone";
|
|
14
14
|
import { c as pt, S as jt } from "./Tooltip-DoWyn3Ho.js";
|
|
@@ -87,17 +87,17 @@ const Nt = ({ onChange: a, value: l, kind: j, isMultiple: n = !1 }) => {
|
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
}), P = i || g;
|
|
90
|
-
return /* @__PURE__ */ r.jsx(pt, { children: /* @__PURE__ */ r.jsx("div", { className: "
|
|
90
|
+
return /* @__PURE__ */ r.jsx(pt, { children: /* @__PURE__ */ r.jsx("div", { className: "min-h-[150px] w-full", children: /* @__PURE__ */ r.jsxs(
|
|
91
91
|
"div",
|
|
92
92
|
{
|
|
93
93
|
className: I(
|
|
94
|
-
"flex items-center justify-center
|
|
95
|
-
P && "cursor-not-allowed opacity-80
|
|
94
|
+
"relative flex h-[14rem] w-full flex-col items-center justify-center gap-2 rounded-md border-[2px] border-dashed border-gray-400 p-4",
|
|
95
|
+
P && "cursor-not-allowed opacity-80"
|
|
96
96
|
),
|
|
97
97
|
...w(),
|
|
98
98
|
children: [
|
|
99
|
-
i && /* @__PURE__ */ r.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-white bg-opacity-60
|
|
100
|
-
/* @__PURE__ */ r.jsx("p", { className: "text-xl
|
|
99
|
+
i && /* @__PURE__ */ r.jsx("div", { className: "absolute inset-0 flex cursor-progress items-center justify-center bg-white bg-opacity-60", children: /* @__PURE__ */ r.jsx(W, {}) }),
|
|
100
|
+
/* @__PURE__ */ r.jsx("p", { className: "my-2 text-xl", children: _ ? "Drop your files here..." : "Drag & Drop here to upload!" }),
|
|
101
101
|
/* @__PURE__ */ r.jsx(
|
|
102
102
|
"div",
|
|
103
103
|
{
|
|
@@ -165,8 +165,8 @@ const Nt = ({ onChange: a, value: l, kind: j, isMultiple: n = !1 }) => {
|
|
|
165
165
|
}
|
|
166
166
|
j ? (a == null ? void 0 : a.findIndex((d) => (d == null ? void 0 : d.id) === (t == null ? void 0 : t.id))) >= 0 ? l == null || l(a == null ? void 0 : a.filter((d) => (d == null ? void 0 : d.id) !== (t == null ? void 0 : t.id))) : l == null || l([...a || [], t]) : l == null || l([t]);
|
|
167
167
|
};
|
|
168
|
-
return /* @__PURE__ */ r.jsxs("div", { className: "
|
|
169
|
-
/* @__PURE__ */ r.jsx("div", { className: "
|
|
168
|
+
return /* @__PURE__ */ r.jsxs("div", { className: "relative w-full rounded-md bg-white p-0", children: [
|
|
169
|
+
/* @__PURE__ */ r.jsx("div", { className: "sticky top-0 z-50 w-full bg-white pb-2", children: /* @__PURE__ */ r.jsx(
|
|
170
170
|
Q,
|
|
171
171
|
{
|
|
172
172
|
name: "searchText",
|
|
@@ -178,11 +178,11 @@ const Nt = ({ onChange: a, value: l, kind: j, isMultiple: n = !1 }) => {
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
) }),
|
|
181
|
-
o && !u.length ? /* @__PURE__ */ r.jsx("div", { className: "
|
|
181
|
+
o && !u.length ? /* @__PURE__ */ r.jsx("div", { className: "flex h-full min-h-[28rem] w-full items-center justify-center", children: /* @__PURE__ */ r.jsx(W, {}) }) : /* @__PURE__ */ r.jsxs(
|
|
182
182
|
"div",
|
|
183
183
|
{
|
|
184
184
|
ref: g,
|
|
185
|
-
className: "
|
|
185
|
+
className: "grid h-[28rem] w-full gap-x-6 gap-y-4 overflow-y-auto overflow-x-hidden p-2 lg:grid-cols-4",
|
|
186
186
|
children: [
|
|
187
187
|
u == null ? void 0 : u.map((t, d) => {
|
|
188
188
|
var A;
|
|
@@ -199,7 +199,7 @@ const Nt = ({ onChange: a, value: l, kind: j, isMultiple: n = !1 }) => {
|
|
|
199
199
|
"div",
|
|
200
200
|
{
|
|
201
201
|
className: I(
|
|
202
|
-
"
|
|
202
|
+
"group flex h-[130px] w-full cursor-pointer items-center justify-center overflow-hidden rounded-md border-2",
|
|
203
203
|
z ? "border-primary" : "border-gray-100"
|
|
204
204
|
),
|
|
205
205
|
onClick: () => {
|
|
@@ -217,7 +217,7 @@ const Nt = ({ onChange: a, value: l, kind: j, isMultiple: n = !1 }) => {
|
|
|
217
217
|
"div",
|
|
218
218
|
{
|
|
219
219
|
className: I(
|
|
220
|
-
"
|
|
220
|
+
"absolute left-0 right-0 top-0 h-[42px] w-full rounded-md bg-[linear-gradient(0deg,_transparent_0%,_#000000_200%)] opacity-0",
|
|
221
221
|
h ? "group-hover:opacity-100" : ""
|
|
222
222
|
)
|
|
223
223
|
}
|
|
@@ -226,14 +226,14 @@ const Nt = ({ onChange: a, value: l, kind: j, isMultiple: n = !1 }) => {
|
|
|
226
226
|
bt,
|
|
227
227
|
{
|
|
228
228
|
name: "isFileIncluded",
|
|
229
|
-
className: "absolute
|
|
229
|
+
className: "absolute left-[10px] top-[10px]",
|
|
230
230
|
checked: z
|
|
231
231
|
}
|
|
232
232
|
),
|
|
233
233
|
(t == null ? void 0 : t.kind) !== "image" ? /* @__PURE__ */ r.jsx(X, { size: "60px", className: "text-gray-400" }) : /* @__PURE__ */ r.jsx(
|
|
234
234
|
"img",
|
|
235
235
|
{
|
|
236
|
-
className: "
|
|
236
|
+
className: "h-full w-full object-contain",
|
|
237
237
|
srcSet: (A = t == null ? void 0 : t.srcset) == null ? void 0 : A.path,
|
|
238
238
|
src: t == null ? void 0 : t.location
|
|
239
239
|
}
|
|
@@ -242,7 +242,7 @@ const Nt = ({ onChange: a, value: l, kind: j, isMultiple: n = !1 }) => {
|
|
|
242
242
|
}
|
|
243
243
|
),
|
|
244
244
|
/* @__PURE__ */ r.jsxs("div", { className: "my-[10px]", children: [
|
|
245
|
-
/* @__PURE__ */ r.jsx("p", { className: "text-
|
|
245
|
+
/* @__PURE__ */ r.jsx("p", { className: "overflow-hidden text-ellipsis whitespace-nowrap text-sm", children: t == null ? void 0 : t.filename }),
|
|
246
246
|
/* @__PURE__ */ r.jsx("p", { className: "text-xs text-gray-500", children: gt(t == null ? void 0 : t.metadata.size) })
|
|
247
247
|
] })
|
|
248
248
|
]
|
|
@@ -250,7 +250,7 @@ const Nt = ({ onChange: a, value: l, kind: j, isMultiple: n = !1 }) => {
|
|
|
250
250
|
`media-layout-file-${d}`
|
|
251
251
|
);
|
|
252
252
|
}),
|
|
253
|
-
o && /* @__PURE__ */ r.jsx("div", { className: "
|
|
253
|
+
o && /* @__PURE__ */ r.jsx("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ r.jsx(W, {}) })
|
|
254
254
|
]
|
|
255
255
|
}
|
|
256
256
|
)
|
|
@@ -264,7 +264,7 @@ const Nt = ({ onChange: a, value: l, kind: j, isMultiple: n = !1 }) => {
|
|
|
264
264
|
return R(() => {
|
|
265
265
|
var i, x;
|
|
266
266
|
!j && a[0] && !((i = a[0]) != null && i.location.includes("levo")) && s((x = a[0]) == null ? void 0 : x.location);
|
|
267
|
-
}, [a]), /* @__PURE__ */ r.jsx("div", { className: "
|
|
267
|
+
}, [a]), /* @__PURE__ */ r.jsx("div", { className: "relative w-full rounded-md bg-white p-0", children: /* @__PURE__ */ r.jsxs("div", { className: "sticky top-0 z-50 flex w-full items-center gap-4 bg-white py-2 pl-0.5", children: [
|
|
268
268
|
/* @__PURE__ */ r.jsx(
|
|
269
269
|
Q,
|
|
270
270
|
{
|
|
@@ -311,10 +311,10 @@ const Nt = ({ onChange: a, value: l, kind: j, isMultiple: n = !1 }) => {
|
|
|
311
311
|
}, At = ({ media: a, handleDeleteSelf: l }) => /* @__PURE__ */ r.jsxs(
|
|
312
312
|
"div",
|
|
313
313
|
{
|
|
314
|
-
className: I("group
|
|
314
|
+
className: I("group relative flex w-full items-center border-b py-2"),
|
|
315
315
|
children: [
|
|
316
316
|
(a == null ? void 0 : a.kind) !== "image" ? /* @__PURE__ */ r.jsx(X, { size: 48, className: "text-muted-foreground/80" }) : /* @__PURE__ */ r.jsx("img", { className: "h-12 max-w-16 object-contain", src: a == null ? void 0 : a.location }),
|
|
317
|
-
/* @__PURE__ */ r.jsx("p", { className: "text-sm
|
|
317
|
+
/* @__PURE__ */ r.jsx("p", { className: "ml-5 text-sm", children: (a == null ? void 0 : a.filename) ?? (a == null ? void 0 : a.location) }),
|
|
318
318
|
/* @__PURE__ */ r.jsx(
|
|
319
319
|
F,
|
|
320
320
|
{
|
|
@@ -344,7 +344,7 @@ const Nt = ({ onChange: a, value: l, kind: j, isMultiple: n = !1 }) => {
|
|
|
344
344
|
});
|
|
345
345
|
};
|
|
346
346
|
return (s == null ? void 0 : s.length) === 0 ? null : /* @__PURE__ */ r.jsxs("div", { className: I("mt-4", j), children: [
|
|
347
|
-
/* @__PURE__ */ r.jsx("p", { className: "text-sm text-muted-foreground
|
|
347
|
+
/* @__PURE__ */ r.jsx("p", { className: "mb-1 text-sm text-muted-foreground", children: (n == null ? void 0 : n.length) > 1 ? "All files" : `All ${n == null ? void 0 : n[0]}s` }),
|
|
348
348
|
/* @__PURE__ */ r.jsx("div", { children: s == null ? void 0 : s.map((x) => /* @__PURE__ */ r.jsx(
|
|
349
349
|
At,
|
|
350
350
|
{
|
|
@@ -358,7 +358,7 @@ const Nt = ({ onChange: a, value: l, kind: j, isMultiple: n = !1 }) => {
|
|
|
358
358
|
"span",
|
|
359
359
|
{
|
|
360
360
|
className: I(
|
|
361
|
-
"
|
|
361
|
+
"ml-1 grid flex-shrink-0 place-content-center rounded-full bg-gray-300 px-1.5 text-sm"
|
|
362
362
|
),
|
|
363
363
|
children: a
|
|
364
364
|
}
|
|
@@ -489,7 +489,7 @@ const Nt = ({ onChange: a, value: l, kind: j, isMultiple: n = !1 }) => {
|
|
|
489
489
|
)
|
|
490
490
|
] }) })
|
|
491
491
|
] }),
|
|
492
|
-
/* @__PURE__ */ r.jsx("div", { className: "flex justify-end
|
|
492
|
+
/* @__PURE__ */ r.jsx("div", { className: "mt-5 flex justify-end", children: /* @__PURE__ */ r.jsxs(F, { variant: "default", onClick: L, children: [
|
|
493
493
|
"Save",
|
|
494
494
|
" ",
|
|
495
495
|
w === 1 ? `${w} file` : `${w} files`
|
|
@@ -614,16 +614,16 @@ const Nt = ({ onChange: a, value: l, kind: j, isMultiple: n = !1 }) => {
|
|
|
614
614
|
)
|
|
615
615
|
] })
|
|
616
616
|
] }),
|
|
617
|
-
(c == null ? void 0 : c.length) > 0 && /* @__PURE__ */ r.jsx("div", { className: "mt-3 w-full", children: /* @__PURE__ */ r.jsx("div", { className: "w-full grid
|
|
617
|
+
(c == null ? void 0 : c.length) > 0 && /* @__PURE__ */ r.jsx("div", { className: "mt-3 w-full", children: /* @__PURE__ */ r.jsx("div", { className: "grid w-full grid-cols-[repeat(auto-fill,_minmax(100px,_1fr))] gap-4", children: c == null ? void 0 : c.map((e, T) => e != null && e.location ? /* @__PURE__ */ r.jsxs(
|
|
618
618
|
"div",
|
|
619
619
|
{
|
|
620
|
-
className: "relative
|
|
620
|
+
className: "group relative flex h-28 w-full items-center justify-center overflow-hidden rounded-xl border",
|
|
621
621
|
children: [
|
|
622
|
-
/* @__PURE__ */ r.jsx("div", { className: "
|
|
622
|
+
/* @__PURE__ */ r.jsx("div", { className: "absolute left-0 top-0 z-10 hidden h-full w-full items-center justify-center bg-black/20 group-hover:flex", children: /* @__PURE__ */ r.jsx("a", { href: e == null ? void 0 : e.location, target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ r.jsx(et, { size: 24 }) }) }),
|
|
623
623
|
(e == null ? void 0 : e.kind) !== "image" ? /* @__PURE__ */ r.jsx(X, { size: "60px", className: "text-gray-400" }) : /* @__PURE__ */ r.jsx(
|
|
624
624
|
"img",
|
|
625
625
|
{
|
|
626
|
-
className: "
|
|
626
|
+
className: "h-full w-full object-contain",
|
|
627
627
|
src: e == null ? void 0 : e.location,
|
|
628
628
|
alt: e == null ? void 0 : e.id
|
|
629
629
|
}
|
|
@@ -631,7 +631,7 @@ const Nt = ({ onChange: a, value: l, kind: j, isMultiple: n = !1 }) => {
|
|
|
631
631
|
/* @__PURE__ */ r.jsx(
|
|
632
632
|
"button",
|
|
633
633
|
{
|
|
634
|
-
className: "absolute
|
|
634
|
+
className: "absolute right-1 top-1 z-10 rounded-full bg-white p-1 focus:outline-none",
|
|
635
635
|
onClick: () => {
|
|
636
636
|
f(
|
|
637
637
|
c == null ? void 0 : c.filter((b) => (b == null ? void 0 : b.id) !== (e == null ? void 0 : e.id))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTrackClicks.d.ts","sourceRoot":"","sources":["../../../src/audience/hooks/useTrackClicks.tsx"],"names":[],"mappings":"AASA,QAAA,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"useTrackClicks.d.ts","sourceRoot":"","sources":["../../../src/audience/hooks/useTrackClicks.tsx"],"names":[],"mappings":"AASA,QAAA,MAAM,cAAc,YAmEnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/dist/audience/index.js
CHANGED
|
@@ -10,5 +10,5 @@ export declare const getDirectAndNestedSpanText: (target: Element) => string;
|
|
|
10
10
|
export type Property = any;
|
|
11
11
|
export type Properties = Record<string, Property>;
|
|
12
12
|
export declare const getAttributes: (element: Element) => Properties;
|
|
13
|
-
export declare const getPropertiesFromEvent: (e: Event, eventName: string) =>
|
|
13
|
+
export declare const getPropertiesFromEvent: (e: Event, eventName: string) => Properties | null;
|
|
14
14
|
//# sourceMappingURL=autocapture.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocapture.d.ts","sourceRoot":"","sources":["../../../src/audience/utils/autocapture.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,UAAU,OACjB,OAAO,GAAG,SAAS,GAAG,IAAI,KAC7B,EAAE,IAAI,WAER,CAAC;AAyDF,eAAO,MAAM,YAAY,MAAO,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAAM,GAAG,IAiBpE,CAAC;AAWF,eAAO,MAAM,WAAW,OAAQ,OAAO,KAAG,MAiBzC,CAAC;AAEF,eAAO,MAAM,cAAc,MAAO,KAAK,KAAG,OAAO,GAAG,IASnD,CAAC;AAYF,eAAO,MAAM,qBAAqB,OAAQ,OAAO,SAAS,KAAK,KAAG,OA2BjE,CAAC;AA+CF,eAAO,MAAM,kBAAkB,OAAQ,OAAO,KAAG,OAchD,CAAC;AAuBF,eAAO,MAAM,kBAAkB,UACtB,MAAM,8BAEZ,OAuBF,CAAC;AASF,eAAO,MAAM,kBAAkB,kBAAmB,MAAM,KAAG,OAQ1D,CAAC;AASF,eAAO,MAAM,0BAA0B,WAAY,OAAO,KAAG,MAI5D,CAAC;AA6BF,MAAM,MAAM,QAAQ,GAAG,GAAG,CAAC;AAC3B,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAIlD,eAAO,MAAM,aAAa,YAAa,OAAO,KAAG,UAoEhD,CAAC;AAEF,eAAO,MAAM,sBAAsB,MAAO,KAAK,aAAa,MAAM,
|
|
1
|
+
{"version":3,"file":"autocapture.d.ts","sourceRoot":"","sources":["../../../src/audience/utils/autocapture.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,UAAU,OACjB,OAAO,GAAG,SAAS,GAAG,IAAI,KAC7B,EAAE,IAAI,WAER,CAAC;AAyDF,eAAO,MAAM,YAAY,MAAO,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAAM,GAAG,IAiBpE,CAAC;AAWF,eAAO,MAAM,WAAW,OAAQ,OAAO,KAAG,MAiBzC,CAAC;AAEF,eAAO,MAAM,cAAc,MAAO,KAAK,KAAG,OAAO,GAAG,IASnD,CAAC;AAYF,eAAO,MAAM,qBAAqB,OAAQ,OAAO,SAAS,KAAK,KAAG,OA2BjE,CAAC;AA+CF,eAAO,MAAM,kBAAkB,OAAQ,OAAO,KAAG,OAchD,CAAC;AAuBF,eAAO,MAAM,kBAAkB,UACtB,MAAM,8BAEZ,OAuBF,CAAC;AASF,eAAO,MAAM,kBAAkB,kBAAmB,MAAM,KAAG,OAQ1D,CAAC;AASF,eAAO,MAAM,0BAA0B,WAAY,OAAO,KAAG,MAI5D,CAAC;AA6BF,MAAM,MAAM,QAAQ,GAAG,GAAG,CAAC;AAC3B,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAIlD,eAAO,MAAM,aAAa,YAAa,OAAO,KAAG,UAoEhD,CAAC;AAEF,eAAO,MAAM,sBAAsB,MAAO,KAAK,aAAa,MAAM,sBA2BjE,CAAC"}
|
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-BPzVyGLq.js";
|
|
2
2
|
import { default as h } from "validatorjs";
|
|
3
3
|
export {
|
|
4
4
|
s as CollectionFormBuilder,
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as s, D as r, j as t, e as i, i as e, g as l, f as T, c as g, a as p, h as n, d as D, k as b, S as m, T as c, n as f, l as d, m as x, b as C } from "../Spinner-
|
|
1
|
+
import { B as s, D as r, j as t, e as i, i as e, g as l, f as T, c as g, a as p, h as n, d as D, k as b, S as m, T as c, n as f, l as d, m as x, b as C } from "../Spinner-BcBoT-J5.js";
|
|
2
2
|
import { T as u, e as P, s as v } from "../Sonner-t6JVKA0a.js";
|
|
3
3
|
import { S as W, T as h, b as j, d as k, c as y, a as F } from "../Tooltip-DoWyn3Ho.js";
|
|
4
4
|
import { toast as L } from "sonner";
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { L as s, u as o } from "./LevoProvider-BAZy7_tP.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 L, i as M, a as E, 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-CgK_Cgps.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 C, h as O, s as V, u as j, v as I, l as S, q as K } from "./CollectionFormBuilder-BPzVyGLq.js";
|
|
4
4
|
import { LevoOAuth as U } from "./membership/index.js";
|
|
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-
|
|
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";
|
|
7
7
|
import { S as na, T as ma, b as pa, d as da, c as ga, a as Ta } from "./Tooltip-DoWyn3Ho.js";
|
|
8
8
|
import { b as ua } from "./byteToSize-BFKZSBu1.js";
|
|
@@ -201,7 +201,7 @@ function We(e) {
|
|
|
201
201
|
n = e.className;
|
|
202
202
|
break;
|
|
203
203
|
case "object":
|
|
204
|
-
n = (e.className && "baseVal" in e.className ? e.className.baseVal : null) || e.getAttribute("class") || "";
|
|
204
|
+
n = (e.className && "baseVal" in e.className ? e.className.baseVal : null) || (e == null ? void 0 : e.getAttribute("class")) || "";
|
|
205
205
|
break;
|
|
206
206
|
default:
|
|
207
207
|
n = "";
|
|
@@ -252,7 +252,7 @@ function Ve(e) {
|
|
|
252
252
|
}
|
|
253
253
|
const z = (e) => {
|
|
254
254
|
const n = ["button", "checkbox", "submit", "reset"];
|
|
255
|
-
return !!(v(e, "input") && !n.includes(e.type) || v(e, "select") || v(e, "textarea") || e.getAttribute("contenteditable") === "true");
|
|
255
|
+
return !!(v(e, "input") && !n.includes(e.type) || v(e, "select") || v(e, "textarea") || (e == null ? void 0 : e.getAttribute("contenteditable")) === "true");
|
|
256
256
|
}, Z = "(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})", Ye = new RegExp(`^(?:${Z})$`), Je = new RegExp(Z), q = "\\d{3}-?\\d{2}-?\\d{4}", Xe = new RegExp(`^(${q})$`), ze = new RegExp(`(${q})`), j = (e, n = !0) => !(Y(e) || L(e) && (e = N(e), (n ? Ye : Je).test((e || "").replace(/[- ]/g, "")) || (n ? Xe : ze).test(e))), Ze = (e) => L(e) ? e.substring(0, 10) === "_ngcontent" || e.substring(0, 7) === "_nghost" : !1, W = (e) => {
|
|
257
257
|
let n = C(e);
|
|
258
258
|
return n = `${n} ${Q(e)}`.trim(), j(n) ? n : "";
|
|
@@ -307,9 +307,7 @@ const qe = ["input", "textarea", "select"], ee = (e) => {
|
|
|
307
307
|
const i = ee(t);
|
|
308
308
|
if (r) {
|
|
309
309
|
const c = X((o = window == null ? void 0 : window.getSelection()) == null ? void 0 : o.toString()), s = e.type || "clipboard";
|
|
310
|
-
|
|
311
|
-
return !1;
|
|
312
|
-
i.copy_text = c, i.copy_type = s;
|
|
310
|
+
i.copy_text = c ?? "", i.copy_type = s ?? "";
|
|
313
311
|
}
|
|
314
312
|
return i;
|
|
315
313
|
}
|
|
@@ -334,41 +332,47 @@ const R = new rt(), ot = () => {
|
|
|
334
332
|
const { audience: e } = x();
|
|
335
333
|
f(() => {
|
|
336
334
|
const n = (t) => {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
if (t.target instanceof HTMLElement) {
|
|
347
|
-
const o = t.target;
|
|
348
|
-
r.rage_click = R == null ? void 0 : R.isRageClick(
|
|
349
|
-
t.clientX,
|
|
350
|
-
t.clientY,
|
|
351
|
-
(/* @__PURE__ */ new Date()).getTime()
|
|
352
|
-
), r = {
|
|
353
|
-
...r,
|
|
354
|
-
...ee(o)
|
|
335
|
+
try {
|
|
336
|
+
let r = {
|
|
337
|
+
hostname: window.location.hostname,
|
|
338
|
+
pathname: window.location.pathname,
|
|
339
|
+
page_title: document.title,
|
|
340
|
+
url: window.location.href,
|
|
341
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
342
|
+
event_type: t.type,
|
|
343
|
+
button_type: t.button
|
|
355
344
|
};
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
345
|
+
if (t.target instanceof HTMLElement) {
|
|
346
|
+
const o = t.target;
|
|
347
|
+
r.rage_click = R == null ? void 0 : R.isRageClick(
|
|
348
|
+
t.clientX,
|
|
349
|
+
t.clientY,
|
|
350
|
+
(/* @__PURE__ */ new Date()).getTime()
|
|
351
|
+
), r = {
|
|
352
|
+
...r,
|
|
353
|
+
...ee(o)
|
|
354
|
+
};
|
|
355
|
+
let i = o == null ? void 0 : o.getAttribute("href");
|
|
356
|
+
if (!i) {
|
|
357
|
+
let c = o.parentNode, s = 0;
|
|
358
|
+
for (; c && s < 8; ) {
|
|
359
|
+
const a = c == null ? void 0 : c.getAttribute(
|
|
360
|
+
"href"
|
|
361
|
+
);
|
|
362
|
+
if (a) {
|
|
363
|
+
i = a;
|
|
364
|
+
break;
|
|
365
|
+
}
|
|
366
|
+
c = c.parentNode, s++;
|
|
364
367
|
}
|
|
365
|
-
c = c.parentNode, s++;
|
|
366
368
|
}
|
|
369
|
+
e == null || e.track("page.click", {
|
|
370
|
+
...r,
|
|
371
|
+
href: i || void 0
|
|
372
|
+
});
|
|
367
373
|
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
href: i || void 0
|
|
371
|
-
});
|
|
374
|
+
} catch (r) {
|
|
375
|
+
console.error(r);
|
|
372
376
|
}
|
|
373
377
|
};
|
|
374
378
|
return document.addEventListener("click", n), () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levo-so/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"author": "Levo Engineering <devs@theinternetfolks.com>",
|
|
5
5
|
"description": "Levo suite for React based applications",
|
|
6
6
|
"type": "module",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"react": ">=18",
|
|
18
18
|
"react-dom": ">=18",
|
|
19
|
-
"@levo-so/core": "0.1.
|
|
19
|
+
"@levo-so/core": "0.1.30"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@radix-ui/react-checkbox": "1.1.1",
|
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
"typescript": "5.5.4",
|
|
91
91
|
"vite": "5.4.3",
|
|
92
92
|
"vite-plugin-dts": "4.1.0",
|
|
93
|
-
"@levo/eslint-config": "0.0.0",
|
|
94
93
|
"@levo/tw-config": "0.0.0",
|
|
95
|
-
"@levo/ts-config": "0.0.0"
|
|
94
|
+
"@levo/ts-config": "0.0.0",
|
|
95
|
+
"@levo/eslint-config": "0.0.0"
|
|
96
96
|
},
|
|
97
97
|
"main": "./dist/index.js",
|
|
98
98
|
"module": "./dist/index.js",
|