@levo-so/studio 0.3.6 → 0.3.8
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/{BillingStep-DhK0Mkjr.js → BillingStep-vBBLXLzk.js} +1 -1
- package/{Button-Ho7QJuCT.js → Button-BZDul09m.js} +29 -32
- package/{CollectionField-CD6ok1A3.js → CollectionField-BZmxRB5D.js} +68 -68
- package/DateTimeWidget-Bt1UcCnx.js +255 -0
- package/{Dialog-IrII0ugb.js → Dialog-CPE8yUqK.js} +10 -10
- package/{EntryCard-BfwGbFzQ.js → EntryCard-DLPs2PaP.js} +4 -4
- package/{KBChatWidget-0dtBwnDA.js → KBChatWidget-B-SNBtoX.js} +1 -1
- package/{LoginCard-CMeVif-w.js → LoginCard-EtzpuqYB.js} +3 -3
- package/{LoginForm-DhGQD4uI.js → LoginForm-kI_b_7Tc.js} +2 -2
- package/{LoginModal-Ui2GnSje.js → LoginModal-C-9BhmoO.js} +4 -4
- package/{MessageCard-CJltLT2a.js → MessageCard-Nsxr98n6.js} +2 -2
- package/{MessageFooter-CrhrI-su.js → MessageFooter-K4Zd_eFO.js} +2 -2
- package/{ModalManager-BW3Dol7F.js → ModalManager-CzH36UIk.js} +1 -1
- package/{PendingApprovalCard-BlyH59Vy.js → PendingApprovalCard-CCbhY8p3.js} +3 -3
- package/{PhoneWidget-BQEfbyV4.js → PhoneWidget-BkzFjfKW.js} +9 -9
- package/{Popover-V2O1gz6N.js → Popover-Iis-qOn1.js} +1 -1
- package/PopupBody-DZVwDLkg-PiECxgmc.js +171 -0
- package/PopupRenderer-BjW1jg70-C1UDgSfJ.js +388 -0
- package/{ProfileCard-DFgmQMUO.js → ProfileCard-DzEBPrax.js} +5 -5
- package/{RichTextWidget-CStx2PMn.js → RichTextWidget-C3Y-0pNy.js} +181 -181
- package/{RteThemeProvider-DxYOzcck.js → RteThemeProvider-owl5oajj.js} +4 -4
- package/{Spinner-HCqR1eGW.js → Spinner-D5spB_Mv.js} +1 -1
- package/{StripePaymentModal-Cw-AlxTS.js → StripePaymentModal-CiKqmQwK.js} +1 -1
- package/{Button-lUfKisu8.js → ThemeProvider-CqPHzkW9.js} +58 -58
- package/{Tooltip-DTnCNEcE.js → Tooltip-DHU1QD-n.js} +1 -1
- package/{VerifyButton-kdxRhJWI.js → VerifyButton-BwTbzSwS.js} +21 -21
- package/{bookingCard-DUMPxFp4.js → bookingCard-kEYdGZJ-.js} +5 -5
- package/collection.d.ts +171 -0
- package/collection.js +2 -0
- package/{theme.cssm-2YTdd8Yh.js → createThemeExtension-C0PSYy0J.js} +2 -2
- package/{dialog-RrTP-MGm.js → dialog-8LH_ihs4.js} +1 -1
- package/dist-2bXx8eVI.js +3657 -0
- package/{PopupRenderer-DBKtkdmH-Ws7F9GmP.js → fontSize-B-ba6pvx.js} +17 -750
- package/{inlineCollectionTheme-D2w17LHX.js → generateRadiusScale-RROt8ppa.js} +4 -19
- package/index.js +3921 -3918
- package/inlineCollectionTheme-uhBXoF1F.js +19 -0
- package/{nodeAlignment-DS9_DLGB.js → inlineRteTheme-BOAno9MG.js} +16 -19
- package/{kbChat-BuTZ4Ytf.js → kbChat-zJcrfsqJ.js} +2 -2
- package/package.json +9 -5
- package/popupState-JmpeKzgM-UECLsSbL.js +100 -0
- package/rteTheme.cssm-W4gTOijw.js +4 -0
- package/studio.css +1 -1
- package/theme.cssm-Czj9sF4X.js +4 -0
- package/themeMapping-Bi9Rcr5G-C7UXWE6o.js +61 -0
- package/{useLogin-BhysESLW.js → useLogin-CfnGrLdO.js} +1 -1
- package/usePopupRedirect-BThP_YPW-jXtfhYu6.js +80 -0
- package/DateTimeWidget-DHUmirf1.js +0 -255
- package/dist-Ckw19x6H.js +0 -3639
- package/rolldown-runtime-CAFD8bLK.js +0 -11
- /package/{AuthProvider-CFQqiIf1.js → AuthProvider-B5NfFwbG.js} +0 -0
- /package/{Beams-DVEhileN.js → Beams-WJN38XSv.js} +0 -0
- /package/{Dots-vp0H1Md3.js → Dots-DggLz5I7.js} +0 -0
- /package/{Gradient-_5G8Qm5s.js → Gradient-BSWJAu0a.js} +0 -0
- /package/{Grid-D694XUrO.js → Grid-BFKl0MUt.js} +0 -0
- /package/{Waves-DeNoq6Bo.js → Waves-BPEgTYoO.js} +0 -0
- /package/{authentication-TdyaDNTn.js → authentication-BXQbxiPP.js} +0 -0
- /package/{card-Cb4m0p4i.js → card-5ooLmYSr.js} +0 -0
- /package/{cn-BL52QQS4.js → cn-B6c1DjO_.js} +0 -0
- /package/{pillChrome-CrJ9a5vj.js → pillChrome-CYoMtUAv.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as e, t } from "./
|
|
1
|
+
import { r as e, t } from "./ThemeProvider-CqPHzkW9.js";
|
|
2
2
|
import { c as n } from "react/compiler-runtime";
|
|
3
3
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
import a from "clsx";
|
|
@@ -13,10 +13,10 @@ var c = "ch8h0x0", l = "ch8h0x1", u = "ch8h0x2", d = "ch8h0x3", f = "ch8h0x5", p
|
|
|
13
13
|
"data-slot": "dialog",
|
|
14
14
|
...i
|
|
15
15
|
}), t[2] = i, t[3] = a), a;
|
|
16
|
-
}, h = (
|
|
16
|
+
}, h = (e) => {
|
|
17
17
|
let i = n(5), a;
|
|
18
|
-
i[0] ===
|
|
19
|
-
let { portalRef: o } =
|
|
18
|
+
i[0] === e ? a = i[1] : ({...a} = e, i[0] = e, i[1] = a);
|
|
19
|
+
let { portalRef: o } = t(), c;
|
|
20
20
|
return i[2] !== o || i[3] !== a ? (c = /* @__PURE__ */ r(s.Portal, {
|
|
21
21
|
container: o,
|
|
22
22
|
...a
|
|
@@ -32,11 +32,11 @@ var c = "ch8h0x0", l = "ch8h0x1", u = "ch8h0x2", d = "ch8h0x3", f = "ch8h0x5", p
|
|
|
32
32
|
className: c,
|
|
33
33
|
...o
|
|
34
34
|
}), t[5] = o, t[6] = c, t[7] = u) : u = t[7], u;
|
|
35
|
-
}, _ = (
|
|
35
|
+
}, _ = (t) => {
|
|
36
36
|
let i = n(10), a, o, c;
|
|
37
|
-
i[0] ===
|
|
37
|
+
i[0] === t ? (a = i[1], o = i[2], c = i[3]) : ({variant: c, size: o, ...a} = t, i[0] = t, i[1] = a, i[2] = o, i[3] = c);
|
|
38
38
|
let l;
|
|
39
|
-
i[4] !== o || i[5] !== c ? (l = /* @__PURE__ */ r(
|
|
39
|
+
i[4] !== o || i[5] !== c ? (l = /* @__PURE__ */ r(e, {
|
|
40
40
|
variant: c,
|
|
41
41
|
size: o
|
|
42
42
|
}), i[4] = o, i[5] = c, i[6] = l) : l = i[6];
|
|
@@ -57,15 +57,15 @@ var c = "ch8h0x0", l = "ch8h0x1", u = "ch8h0x2", d = "ch8h0x3", f = "ch8h0x5", p
|
|
|
57
57
|
className: l,
|
|
58
58
|
...o
|
|
59
59
|
}), t[5] = o, t[6] = l, t[7] = u) : u = t[7], u;
|
|
60
|
-
}, y = (
|
|
60
|
+
}, y = (t) => {
|
|
61
61
|
let c = n(14), l, d, f, p;
|
|
62
|
-
c[0] ===
|
|
62
|
+
c[0] === t ? (l = c[1], d = c[2], f = c[3], p = c[4]) : ({className: d, children: l, showCloseButton: p, ...f} = t, c[0] = t, c[1] = l, c[2] = d, c[3] = f, c[4] = p);
|
|
63
63
|
let m = p === void 0 ? !0 : p, h;
|
|
64
64
|
c[5] === d ? h = c[6] : (h = a(u, d), c[5] = d, c[6] = h);
|
|
65
65
|
let g;
|
|
66
66
|
c[7] === m ? g = c[8] : (g = m && /* @__PURE__ */ r(s.Close, {
|
|
67
67
|
"data-slot": "dialog-close",
|
|
68
|
-
render: /* @__PURE__ */ r(
|
|
68
|
+
render: /* @__PURE__ */ r(e, {
|
|
69
69
|
variant: "ghost",
|
|
70
70
|
size: "icon-sm",
|
|
71
71
|
className: "ch8h0x7",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { n as t } from "./AuthProvider-
|
|
4
|
-
import { t as n } from "./card-
|
|
5
|
-
import { t as r } from "./MessageFooter-
|
|
2
|
+
import { r as e } from "./dist-2bXx8eVI.js";
|
|
3
|
+
import { n as t } from "./AuthProvider-B5NfFwbG.js";
|
|
4
|
+
import { t as n } from "./card-5ooLmYSr.js";
|
|
5
|
+
import { t as r } from "./MessageFooter-K4Zd_eFO.js";
|
|
6
6
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
7
|
var o = {
|
|
8
8
|
header: "_header_emo7t_1",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { _ as e, a as t, c as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, r as d, s as f, t as p, u as m, v as h } from "./pillChrome-
|
|
2
|
+
import { _ as e, a as t, c as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, r as d, s as f, t as p, u as m, v as h } from "./pillChrome-CYoMtUAv.js";
|
|
3
3
|
import { Children as g, createContext as _, isValidElement as v, useCallback as y, useContext as b, useEffect as x, useLayoutEffect as S, useRef as C, useState as w } from "react";
|
|
4
4
|
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
5
5
|
import { ArrowUp as O, Check as k, ChevronDown as ee, Copy as A, MessageSquarePlus as j, Mic as te, RefreshCw as M, Sparkles as ne, Square as N, X as P } from "lucide-react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./LoginForm-
|
|
3
|
-
import { t } from "./card-
|
|
2
|
+
import { t as e } from "./LoginForm-kI_b_7Tc.js";
|
|
3
|
+
import { t } from "./card-5ooLmYSr.js";
|
|
4
4
|
import { Suspense as n, lazy as r, useState as i } from "react";
|
|
5
5
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
6
|
var s = {
|
|
@@ -8,7 +8,7 @@ var s = {
|
|
|
8
8
|
title: "_title_s7k8g_7",
|
|
9
9
|
subtitle: "_subtitle_s7k8g_14",
|
|
10
10
|
formWrapper: "_formWrapper_s7k8g_20"
|
|
11
|
-
}, c = r(() => import("./PendingApprovalCard-
|
|
11
|
+
}, c = r(() => import("./PendingApprovalCard-CCbhY8p3.js")), l = ({ logo: r, siteName: l, page: u }) => {
|
|
12
12
|
let [d, f] = i(!1), [p, m] = i(!1), h = u.access?.find((e) => e.kind === "gating" && e.enabled)?.options;
|
|
13
13
|
return p ? /* @__PURE__ */ a(n, {
|
|
14
14
|
fallback: /* @__PURE__ */ a("div", {}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./useLogin-
|
|
3
|
-
import { c as t, t as n } from "./authentication-
|
|
2
|
+
import { t as e } from "./useLogin-CfnGrLdO.js";
|
|
3
|
+
import { c as t, t as n } from "./authentication-BXQbxiPP.js";
|
|
4
4
|
import { LevoOAuth as r, errorHandler as i, successToast as a, useLevo as o } from "@levo-so/react";
|
|
5
5
|
import { useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
|
|
6
6
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as e } from "./AuthProvider-
|
|
3
|
-
import { n as t } from "./ModalManager-
|
|
4
|
-
import { a as n, n as r, o as i, r as a, t as o } from "./dialog-
|
|
5
|
-
import { t as s } from "./LoginForm-
|
|
2
|
+
import { n as e } from "./AuthProvider-B5NfFwbG.js";
|
|
3
|
+
import { n as t } from "./ModalManager-CzH36UIk.js";
|
|
4
|
+
import { a as n, n as r, o as i, r as a, t as o } from "./dialog-8LH_ihs4.js";
|
|
5
|
+
import { t as s } from "./LoginForm-kI_b_7Tc.js";
|
|
6
6
|
import { useEffect as c } from "react";
|
|
7
7
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
8
|
var d = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./card-
|
|
3
|
-
import { t } from "./MessageFooter-
|
|
2
|
+
import { t as e } from "./card-5ooLmYSr.js";
|
|
3
|
+
import { t } from "./MessageFooter-K4Zd_eFO.js";
|
|
4
4
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/accessCard/MessageCard.tsx
|
|
6
6
|
var i = ({ logo: i, siteName: a, options: o, message: s }) => /* @__PURE__ */ r(e, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as e } from "./AuthProvider-
|
|
3
|
-
import { t } from "./useLogin-
|
|
2
|
+
import { n as e } from "./AuthProvider-B5NfFwbG.js";
|
|
3
|
+
import { t } from "./useLogin-CfnGrLdO.js";
|
|
4
4
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
5
|
import i from "libphonenumber-js";
|
|
6
6
|
var a = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Suspense as e, createContext as t, lazy as n, useCallback as r, useContext as i, useState as a } from "react";
|
|
3
3
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
4
4
|
//#region src/context/ModalManager.tsx
|
|
5
|
-
var c = n(() => import("./LoginModal-
|
|
5
|
+
var c = n(() => import("./LoginModal-C-9BhmoO.js")), l = t({
|
|
6
6
|
availableModals: ["login"],
|
|
7
7
|
openModals: { key: null },
|
|
8
8
|
openModal: () => ({}),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { t } from "./card-
|
|
4
|
-
import { t as n } from "./MessageFooter-
|
|
2
|
+
import { r as e } from "./dist-2bXx8eVI.js";
|
|
3
|
+
import { t } from "./card-5ooLmYSr.js";
|
|
4
|
+
import { t as n } from "./MessageFooter-K4Zd_eFO.js";
|
|
5
5
|
import { useState as r } from "react";
|
|
6
6
|
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
var s = {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { r as e, t } from "./CollectionField-
|
|
3
|
-
import { t as n } from "./VerifyButton-
|
|
2
|
+
import { r as e, t } from "./CollectionField-BZmxRB5D.js";
|
|
3
|
+
import { t as n } from "./VerifyButton-BwTbzSwS.js";
|
|
4
4
|
import { t as r } from "./CollectionInput-DyNbxIZ8.js";
|
|
5
5
|
import { c as ee } from "react/compiler-runtime";
|
|
6
6
|
import { useState as i } from "react";
|
|
7
7
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
8
|
+
import te, { isSupportedCountry as ne } from "react-phone-number-input";
|
|
9
|
+
import { useController as re } from "react-hook-form";
|
|
10
|
+
import { IconPencil as ie } from "@tabler/icons-react";
|
|
11
11
|
//#region ../../libraries/react-collection/dist/widgets/phoneWidget/PhoneWidget.cssm.js
|
|
12
12
|
var ae = "_89f1hw0", s = "_89f1hw1", c = "_89f1hw2", oe = "_89f1hw4", l = (l) => {
|
|
13
13
|
let u = ee(51), { field: d, settings: se } = l, { key: f, label: p, helper_text: m, readonly: h, options: g } = d, _ = f === void 0 ? "" : f, v = p === void 0 ? "" : p, y = m === void 0 ? "" : m, b = h === void 0 ? !1 : h, x = _, S = !!g?.verification && !!se?.enableVerification, [C, w] = i(null), [T, E] = i(!1), D;
|
|
@@ -19,14 +19,14 @@ var ae = "_89f1hw0", s = "_89f1hw1", c = "_89f1hw2", oe = "_89f1hw4", l = (l) =>
|
|
|
19
19
|
name: x,
|
|
20
20
|
rules: k
|
|
21
21
|
}, u[7] = x, u[8] = k, u[9] = A) : A = u[9];
|
|
22
|
-
let { field: j, fieldState: M } =
|
|
22
|
+
let { field: j, fieldState: M } = re(A), N, P, F, I;
|
|
23
23
|
u[10] === j ? (N = u[11], P = u[12], F = u[13], I = u[14]) : ({value: I, onBlur: N, onChange: P, ...F} = j, u[10] = j, u[11] = N, u[12] = P, u[13] = F, u[14] = I);
|
|
24
24
|
let { error: ce } = M, L = !!d?.required, R = ce?.message, z = !!C && !!I && C === I, B;
|
|
25
25
|
u[15] === g?.country ? B = u[16] : (B = () => {
|
|
26
26
|
let e = g?.country;
|
|
27
27
|
if (e && typeof e == "string") {
|
|
28
28
|
let t = e?.toUpperCase();
|
|
29
|
-
if (
|
|
29
|
+
if (ne(t)) return t;
|
|
30
30
|
}
|
|
31
31
|
return "IN";
|
|
32
32
|
}, u[15] = g?.country, u[16] = B);
|
|
@@ -50,12 +50,12 @@ var ae = "_89f1hw0", s = "_89f1hw1", c = "_89f1hw2", oe = "_89f1hw4", l = (l) =>
|
|
|
50
50
|
onClick: () => w(null),
|
|
51
51
|
className: oe,
|
|
52
52
|
title: "Change phone number",
|
|
53
|
-
children: /* @__PURE__ */ a(
|
|
53
|
+
children: /* @__PURE__ */ a(ie, { size: 14 })
|
|
54
54
|
}) : null, u[25] = z, u[26] = Y);
|
|
55
55
|
let X;
|
|
56
56
|
u[27] !== F || u[28] !== W || u[29] !== G || u[30] !== K || u[31] !== q || u[32] !== J || u[33] !== Y ? (X = /* @__PURE__ */ a("div", {
|
|
57
57
|
className: c,
|
|
58
|
-
children: /* @__PURE__ */ a(
|
|
58
|
+
children: /* @__PURE__ */ a(te, {
|
|
59
59
|
value: W,
|
|
60
60
|
international: !0,
|
|
61
61
|
inputComponent: r,
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { r as e } from "./ThemeProvider-CqPHzkW9.js";
|
|
2
|
+
import { n as t, t as n } from "./fontSize-B-ba6pvx.js";
|
|
3
|
+
import { n as r, r as i, t as a } from "./inlineRteTheme-BOAno9MG.js";
|
|
4
|
+
import { i as o, r as s, t as c } from "./Dialog-CPE8yUqK.js";
|
|
5
|
+
import { t as l } from "./inlineCollectionTheme-uhBXoF1F.js";
|
|
6
|
+
import { _ as u, a as d, d as f, g as p, i as m, l as h, r as g } from "./usePopupRedirect-BThP_YPW-jXtfhYu6.js";
|
|
7
|
+
import { c as _ } from "react/compiler-runtime";
|
|
8
|
+
import { useLevo as v } from "@levo-so/react";
|
|
9
|
+
import { Suspense as y, lazy as b, useMemo as x, useState as S } from "react";
|
|
10
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
11
|
+
import E from "clsx";
|
|
12
|
+
import { Link as D } from "@tiptap/extension-link";
|
|
13
|
+
import { Document as O } from "@tiptap/extension-document";
|
|
14
|
+
import { TextStyle as k } from "@tiptap/extension-text-style";
|
|
15
|
+
import { IconCheck as A, IconCopy as j } from "@tabler/icons-react";
|
|
16
|
+
import { Bold as M } from "@tiptap/extension-bold";
|
|
17
|
+
import { BulletList as N } from "@tiptap/extension-bullet-list";
|
|
18
|
+
import { Code as P } from "@tiptap/extension-code";
|
|
19
|
+
import { Color as F } from "@tiptap/extension-color";
|
|
20
|
+
import { HardBreak as I } from "@tiptap/extension-hard-break";
|
|
21
|
+
import { Heading as L } from "@tiptap/extension-heading";
|
|
22
|
+
import { Highlight as R } from "@tiptap/extension-highlight";
|
|
23
|
+
import { Italic as z } from "@tiptap/extension-italic";
|
|
24
|
+
import { ListItem as B } from "@tiptap/extension-list-item";
|
|
25
|
+
import { OrderedList as V } from "@tiptap/extension-ordered-list";
|
|
26
|
+
import { Paragraph as H } from "@tiptap/extension-paragraph";
|
|
27
|
+
import { Strike as U } from "@tiptap/extension-strike";
|
|
28
|
+
import { Subscript as W } from "@tiptap/extension-subscript";
|
|
29
|
+
import { Superscript as G } from "@tiptap/extension-superscript";
|
|
30
|
+
import { Text as K } from "@tiptap/extension-text";
|
|
31
|
+
import { Typography as q } from "@tiptap/extension-typography";
|
|
32
|
+
import { Underline as J } from "@tiptap/extension-underline";
|
|
33
|
+
import { UniqueID as Y } from "@tiptap/extension-unique-id";
|
|
34
|
+
import { generateJSON as X } from "@tiptap/html";
|
|
35
|
+
import { renderToReactElement as Z } from "@tiptap/static-renderer/pm/react";
|
|
36
|
+
//#region ../../libraries/popups/dist/PopupBody-DZVwDLkg.js
|
|
37
|
+
var Q = [
|
|
38
|
+
O,
|
|
39
|
+
H,
|
|
40
|
+
K,
|
|
41
|
+
L,
|
|
42
|
+
M,
|
|
43
|
+
z,
|
|
44
|
+
U,
|
|
45
|
+
P,
|
|
46
|
+
N,
|
|
47
|
+
V,
|
|
48
|
+
B,
|
|
49
|
+
I,
|
|
50
|
+
J,
|
|
51
|
+
D.configure({ openOnClick: !1 }),
|
|
52
|
+
k,
|
|
53
|
+
n,
|
|
54
|
+
q,
|
|
55
|
+
G,
|
|
56
|
+
W,
|
|
57
|
+
F,
|
|
58
|
+
R.configure({ multicolor: !0 }),
|
|
59
|
+
t,
|
|
60
|
+
i,
|
|
61
|
+
Y.configure({ types: [
|
|
62
|
+
"paragraph",
|
|
63
|
+
"heading",
|
|
64
|
+
"bulletList",
|
|
65
|
+
"orderedList"
|
|
66
|
+
] })
|
|
67
|
+
], $ = (e) => X(e, Q), ee = ({ content: e, className: t, ref: n, ...i }) => {
|
|
68
|
+
let a = x(() => e ? typeof e == "string" ? e ? $(e) : null : e.json && Object.keys(e.json).length > 0 ? e.json : e.html ? $(e.html) : null : null, [e]), o = x(() => a ? Z({
|
|
69
|
+
content: a,
|
|
70
|
+
extensions: Q
|
|
71
|
+
}) : null, [a]);
|
|
72
|
+
return o ? /* @__PURE__ */ w("div", {
|
|
73
|
+
ref: n,
|
|
74
|
+
className: E(r, t),
|
|
75
|
+
...i,
|
|
76
|
+
children: o
|
|
77
|
+
}) : null;
|
|
78
|
+
}, te = /* @__PURE__ */ u({ PopupBody: () => oe }), ne = b(() => import("./dist-2bXx8eVI.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormBuilder }))), re = a({ baseSpacing: ".625rem" }), ie = { style: l({ form: { gap: "1rem" } }) }, ae = {
|
|
79
|
+
left: h,
|
|
80
|
+
center: g,
|
|
81
|
+
right: m
|
|
82
|
+
}, oe = (t) => {
|
|
83
|
+
let n = _(33), { popup: r, disableInteraction: i } = t, a = d(), l = a?.callbacks?.onAction, u = p(r), m = !a, { content: h } = r, { workspace: g } = v(), [b, x] = S(!1), E;
|
|
84
|
+
n[0] !== h.action || n[1] !== l || n[2] !== r ? (E = () => {
|
|
85
|
+
if (h.action?.type !== "redirect" || !h.action.copyValue) return;
|
|
86
|
+
let e = h.action.copyValue;
|
|
87
|
+
navigator.clipboard.writeText(e).then(() => {
|
|
88
|
+
x(!0), setTimeout(() => x(!1), 2e3), l?.(r, {
|
|
89
|
+
action_type: "copy",
|
|
90
|
+
copy_value: e
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
}, n[0] = h.action, n[1] = l, n[2] = r, n[3] = E) : E = n[3];
|
|
94
|
+
let D = E, O = h.align ?? "left", k = h.size ?? "medium", M;
|
|
95
|
+
n[4] === k ? M = n[5] : (M = f({ size: k }), n[4] = k, n[5] = M);
|
|
96
|
+
let N;
|
|
97
|
+
n[6] === i ? N = n[7] : (N = i ? { pointerEvents: "none" } : void 0, n[6] = i, n[7] = N);
|
|
98
|
+
let P;
|
|
99
|
+
n[8] !== O || n[9] !== h.description || n[10] !== h.heading ? (P = (h.heading || h.description) && /* @__PURE__ */ T(c, {
|
|
100
|
+
className: "zv6sjd4",
|
|
101
|
+
style: { textAlign: O },
|
|
102
|
+
children: [h.heading && /* @__PURE__ */ w(o, { children: h.heading }), h.description && /* @__PURE__ */ w(s, { children: h.description })]
|
|
103
|
+
}), n[8] = O, n[9] = h.description, n[10] = h.heading, n[11] = P) : P = n[11];
|
|
104
|
+
let F;
|
|
105
|
+
n[12] === h.body ? F = n[13] : (F = (h.body?.html || h.body?.json) && /* @__PURE__ */ w(ee, {
|
|
106
|
+
className: "zv6sjd5",
|
|
107
|
+
style: re,
|
|
108
|
+
content: h.body
|
|
109
|
+
}), n[12] = h.body, n[13] = F);
|
|
110
|
+
let I;
|
|
111
|
+
n[14] !== O || n[15] !== h.action || n[16] !== m || n[17] !== l || n[18] !== r || n[19] !== g ? (I = h.action?.type === "form" && /* @__PURE__ */ w("div", {
|
|
112
|
+
className: "zv6sjd7",
|
|
113
|
+
children: /* @__PURE__ */ w(y, { children: /* @__PURE__ */ w(ne, {
|
|
114
|
+
collection_id: h.action.collectionKey,
|
|
115
|
+
formVariant: h.action.formVariant,
|
|
116
|
+
theme: ie,
|
|
117
|
+
uiConfig: {
|
|
118
|
+
hideFormHeading: !0,
|
|
119
|
+
hideSectionHeadings: !0
|
|
120
|
+
},
|
|
121
|
+
successConfig: h.action.successRedirectUrl ? { action: {
|
|
122
|
+
type: "redirect",
|
|
123
|
+
value: h.action.successRedirectUrl
|
|
124
|
+
} } : void 0,
|
|
125
|
+
submitButtonConfig: {
|
|
126
|
+
show: !0,
|
|
127
|
+
text: h.action.label || "Submit",
|
|
128
|
+
styles: h.action.fullWidth && (h.action.formVariant ?? "default") === "default" ? "zv6sjdb" : ae[O]
|
|
129
|
+
},
|
|
130
|
+
workspace_id: g,
|
|
131
|
+
containerStyles: "zv6sjd6",
|
|
132
|
+
preview: m,
|
|
133
|
+
onSuccess: () => {
|
|
134
|
+
h.action?.type === "form" && l?.(r, {
|
|
135
|
+
action_type: "form_submit",
|
|
136
|
+
collection_key: h.action.collectionKey
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}) })
|
|
140
|
+
}), n[14] = O, n[15] = h.action, n[16] = m, n[17] = l, n[18] = r, n[19] = g, n[20] = I) : I = n[20];
|
|
141
|
+
let L;
|
|
142
|
+
n[21] !== h.action || n[22] !== b || n[23] !== D || n[24] !== u ? (L = h.action?.type === "redirect" && /* @__PURE__ */ T(C, { children: [h.action.copyValue && /* @__PURE__ */ T("button", {
|
|
143
|
+
type: "button",
|
|
144
|
+
className: "zv6sjdd",
|
|
145
|
+
onClick: D,
|
|
146
|
+
children: [/* @__PURE__ */ w("span", {
|
|
147
|
+
className: "zv6sjde",
|
|
148
|
+
children: h.action.copyValue
|
|
149
|
+
}), w(b ? A : j, {
|
|
150
|
+
size: 18,
|
|
151
|
+
className: "zv6sjdf"
|
|
152
|
+
})]
|
|
153
|
+
}), /* @__PURE__ */ w(e, {
|
|
154
|
+
className: "zv6sjdc",
|
|
155
|
+
onClick: () => u?.(),
|
|
156
|
+
children: h.action.label || "Button"
|
|
157
|
+
})] }), n[21] = h.action, n[22] = b, n[23] = D, n[24] = u, n[25] = L) : L = n[25];
|
|
158
|
+
let R;
|
|
159
|
+
return n[26] !== M || n[27] !== N || n[28] !== P || n[29] !== F || n[30] !== I || n[31] !== L ? (R = /* @__PURE__ */ T("div", {
|
|
160
|
+
className: M,
|
|
161
|
+
style: N,
|
|
162
|
+
children: [
|
|
163
|
+
P,
|
|
164
|
+
F,
|
|
165
|
+
I,
|
|
166
|
+
L
|
|
167
|
+
]
|
|
168
|
+
}), n[26] = M, n[27] = N, n[28] = P, n[29] = F, n[30] = I, n[31] = L, n[32] = R) : R = n[32], R;
|
|
169
|
+
};
|
|
170
|
+
//#endregion
|
|
171
|
+
export { te as n };
|