@levo-so/studio 0.3.8 → 0.3.9
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-vBBLXLzk.js → BillingStep-CvRmZGdq.js} +1 -1
- package/{Button-BZDul09m.js → Button-Dza3e6Mv.js} +1 -1
- package/{EntryCard-DLPs2PaP.js → EntryCard-BpcaCqXU.js} +1 -1
- package/{KBChatWidget-B-SNBtoX.js → KBChatWidget-Cgsubvuk.js} +10 -9
- package/{LoginCard-EtzpuqYB.js → LoginCard-B_anBE4b.js} +1 -1
- package/{PendingApprovalCard-CCbhY8p3.js → PendingApprovalCard-DbYp0nSk.js} +1 -1
- package/{PopupBody-DZVwDLkg-PiECxgmc.js → PopupBody-BI-MJqmd-BrzdFaaE.js} +47 -44
- package/{PopupRenderer-BjW1jg70-C1UDgSfJ.js → PopupRenderer-D66Gx63H-GHfJebm6.js} +140 -139
- package/{ProfileCard-DzEBPrax.js → ProfileCard-DmAnVf5R.js} +1 -1
- package/{bookingCard-kEYdGZJ-.js → bookingCard-CLhIpOpR.js} +2 -2
- package/collection.js +1 -1
- package/{dist-2bXx8eVI.js → dist-D5mTOitS.js} +74 -57
- package/index.d.ts +14 -0
- package/index.js +2557 -2244
- package/{kbChat-zJcrfsqJ.js → kbChat-QDHdRejh.js} +1 -1
- package/package.json +41 -41
- package/studio.css +1 -1
- package/{usePopupRedirect-BThP_YPW-jXtfhYu6.js → usePopupRedirect-CAAdcpaW-DdME0F7f.js} +14 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./Button-
|
|
2
|
+
import { t as e } from "./Button-Dza3e6Mv.js";
|
|
3
3
|
import { useState as t } from "react";
|
|
4
4
|
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/bookingCard/BillingStep.tsx
|
|
@@ -20,7 +20,7 @@ import oe from "isomorphic-dompurify";
|
|
|
20
20
|
var O = async (e, t) => {
|
|
21
21
|
let n = {};
|
|
22
22
|
return t?.site_id && (n.site_id = t.site_id), t?.locale && (n.locale = t.locale), t?.country && (n.country = t.country), (await e.url("/v1/studio/popup/list-active").query(n).get().json())?.content?.data ?? [];
|
|
23
|
-
}, k = _(() => import("./PopupRenderer-
|
|
23
|
+
}, k = _(() => import("./PopupRenderer-D66Gx63H-GHfJebm6.js").then((e) => e.t).then((e) => ({ default: e.PopupRenderer }))), A = (e) => {
|
|
24
24
|
let t = u(9), { siteId: n, pageId: r } = e, { fetch: a, logger: o } = f(), [s, c] = S(null), l = x(!1), p, h;
|
|
25
25
|
if (t[0] !== a || t[1] !== o || t[2] !== n ? (p = () => {
|
|
26
26
|
if (l.current) return;
|
|
@@ -372,10 +372,10 @@ var H = ({ chips: e, onSelect: t, size: n = "comfortable", className: r, chipCla
|
|
|
372
372
|
})
|
|
373
373
|
]
|
|
374
374
|
});
|
|
375
|
-
}, Ie = () => null, Le = "max-w-none text-sm text-zinc-900 leading-relaxed [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_a:hover]:text-sky-700 [&_a]:break-words [&_a]:font-medium [&_a]:text-sky-600 [&_a]:underline [&_a]:underline-offset-2 [&_li]:text-sm [&_ol]:my-2 [&_ol]:list-decimal [&_ol]:pl-5 [&_p]:my-2 [&_p]:text-sm [&_strong]:font-semibold [&_ul]:my-2 [&_ul]:list-disc [&_ul]:pl-5", Re = "group pr-4 pb-6", ze = "mt-2 flex items-center gap-2 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100", Be = "text-xs text-zinc-500/60", Ve = "rounded p-1.5 text-zinc-500 transition-colors hover:text-zinc-900", He = ({ tools: e = Ie, Parts: t, thinkingIndicator: n = /* @__PURE__ */ E(Fe, {}), rootClassName: r = Re, contentClassName: i = Le, metaClassName: a = ze, wrapContent: o, metaSlot: s, copyIdleClassName: c, copyCopiedClassName: l, reloadClassName: u = Ve, timeClassName: d = Be, timeFormatOptions: f, readOnly: p = !1, belowContent: m }) => {
|
|
376
|
-
let
|
|
375
|
+
}, Ie = () => null, Le = "max-w-none text-sm text-zinc-900 leading-relaxed [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_a:hover]:text-sky-700 [&_a]:break-words [&_a]:font-medium [&_a]:text-sky-600 [&_a]:underline [&_a]:underline-offset-2 [&_li]:text-sm [&_ol]:my-2 [&_ol]:list-decimal [&_ol]:pl-5 [&_p]:my-2 [&_p]:text-sm [&_strong]:font-semibold [&_ul]:my-2 [&_ul]:list-disc [&_ul]:pl-5", Re = "group pr-4 pb-6", ze = "mt-2 flex items-center gap-2 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100", Be = "text-xs text-zinc-500/60", Ve = "rounded p-1.5 text-zinc-500 transition-colors hover:text-zinc-900", He = ({ tools: e = Ie, Parts: t, thinkingIndicator: n = /* @__PURE__ */ E(Fe, {}), rootClassName: r = Re, contentClassName: i = Le, metaClassName: a = ze, wrapContent: o, metaSlot: s, copyIdleClassName: c, copyCopiedClassName: l, reloadClassName: u = Ve, timeClassName: d = Be, timeFormatOptions: f, readOnly: p = !1, belowContent: m, footerSlot: g }) => {
|
|
376
|
+
let _ = V((e) => e.message), v = t ?? R.Content, y = _.status?.type === "running", b = /* @__PURE__ */ E("div", {
|
|
377
377
|
className: i,
|
|
378
|
-
children: /* @__PURE__ */ E(
|
|
378
|
+
children: /* @__PURE__ */ E(v, { components: {
|
|
379
379
|
Text: Me,
|
|
380
380
|
tools: { Fallback: e }
|
|
381
381
|
} })
|
|
@@ -385,21 +385,21 @@ var H = ({ chips: e, onSelect: t, size: n = "comfortable", className: r, chipCla
|
|
|
385
385
|
children: /* @__PURE__ */ D("div", {
|
|
386
386
|
className: "flex min-w-0 flex-col",
|
|
387
387
|
children: [
|
|
388
|
-
o ? o(
|
|
389
|
-
|
|
388
|
+
o ? o(b) : b,
|
|
389
|
+
y && /* @__PURE__ */ E("div", {
|
|
390
390
|
className: "mt-1",
|
|
391
391
|
children: n
|
|
392
392
|
}),
|
|
393
|
-
!
|
|
393
|
+
!y && m && /* @__PURE__ */ E("div", {
|
|
394
394
|
className: "mt-2",
|
|
395
395
|
children: m
|
|
396
396
|
}),
|
|
397
|
-
!
|
|
397
|
+
!y && /* @__PURE__ */ D("div", {
|
|
398
398
|
className: a,
|
|
399
399
|
children: [
|
|
400
400
|
/* @__PURE__ */ E("span", {
|
|
401
401
|
className: d,
|
|
402
|
-
children: h(
|
|
402
|
+
children: h(_.createdAt, f)
|
|
403
403
|
}),
|
|
404
404
|
s,
|
|
405
405
|
/* @__PURE__ */ D(F.Root, {
|
|
@@ -413,7 +413,8 @@ var H = ({ chips: e, onSelect: t, size: n = "comfortable", className: r, chipCla
|
|
|
413
413
|
})]
|
|
414
414
|
})
|
|
415
415
|
]
|
|
416
|
-
})
|
|
416
|
+
}),
|
|
417
|
+
!y && g
|
|
417
418
|
]
|
|
418
419
|
})
|
|
419
420
|
});
|
|
@@ -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-DbYp0nSk.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", {}),
|
|
@@ -3,9 +3,9 @@ import { n as t, t as n } from "./fontSize-B-ba6pvx.js";
|
|
|
3
3
|
import { n as r, r as i, t as a } from "./inlineRteTheme-BOAno9MG.js";
|
|
4
4
|
import { i as o, r as s, t as c } from "./Dialog-CPE8yUqK.js";
|
|
5
5
|
import { t as l } from "./inlineCollectionTheme-uhBXoF1F.js";
|
|
6
|
-
import {
|
|
6
|
+
import { c as u, g as d, h as f, i as p, m, r as h, u as g } from "./usePopupRedirect-CAAdcpaW-DdME0F7f.js";
|
|
7
7
|
import { c as _ } from "react/compiler-runtime";
|
|
8
|
-
import {
|
|
8
|
+
import { LevoProvider as v } from "@levo-so/react";
|
|
9
9
|
import { Suspense as y, lazy as b, useMemo as x, useState as S } from "react";
|
|
10
10
|
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
11
11
|
import E from "clsx";
|
|
@@ -33,7 +33,7 @@ import { Underline as J } from "@tiptap/extension-underline";
|
|
|
33
33
|
import { UniqueID as Y } from "@tiptap/extension-unique-id";
|
|
34
34
|
import { generateJSON as X } from "@tiptap/html";
|
|
35
35
|
import { renderToReactElement as Z } from "@tiptap/static-renderer/pm/react";
|
|
36
|
-
//#region ../../libraries/popups/dist/PopupBody-
|
|
36
|
+
//#region ../../libraries/popups/dist/PopupBody-BI-MJqmd.js
|
|
37
37
|
var Q = [
|
|
38
38
|
O,
|
|
39
39
|
H,
|
|
@@ -75,26 +75,26 @@ var Q = [
|
|
|
75
75
|
...i,
|
|
76
76
|
children: o
|
|
77
77
|
}) : null;
|
|
78
|
-
}, te = /* @__PURE__ */
|
|
79
|
-
left:
|
|
80
|
-
center:
|
|
81
|
-
right:
|
|
78
|
+
}, te = /* @__PURE__ */ d({ PopupBody: () => oe }), ne = b(() => import("./dist-D5mTOitS.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormBuilder }))), re = a({ baseSpacing: ".625rem" }), ie = { style: l({ form: { gap: "1rem" } }) }, ae = {
|
|
79
|
+
left: u,
|
|
80
|
+
center: h,
|
|
81
|
+
right: p
|
|
82
82
|
}, oe = (t) => {
|
|
83
|
-
let n = _(33), {
|
|
84
|
-
n[0] !== h.action || n[1] !==
|
|
83
|
+
let n = _(33), { disableInteraction: r } = t, { popup: i, callbacks: a, client: l, preview: u } = m(), d = a?.onAction, p = f(i), { content: h } = i, [b, x] = S(!1), E;
|
|
84
|
+
n[0] !== h.action || n[1] !== d || n[2] !== i ? (E = () => {
|
|
85
85
|
if (h.action?.type !== "redirect" || !h.action.copyValue) return;
|
|
86
86
|
let e = h.action.copyValue;
|
|
87
87
|
navigator.clipboard.writeText(e).then(() => {
|
|
88
|
-
x(!0), setTimeout(() => x(!1), 2e3),
|
|
88
|
+
x(!0), setTimeout(() => x(!1), 2e3), d?.(i, {
|
|
89
89
|
action_type: "copy",
|
|
90
90
|
copy_value: e
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
|
-
}, n[0] = h.action, n[1] =
|
|
93
|
+
}, n[0] = h.action, n[1] = d, n[2] = i, n[3] = E) : E = n[3];
|
|
94
94
|
let D = E, O = h.align ?? "left", k = h.size ?? "medium", M;
|
|
95
|
-
n[4] === k ? M = n[5] : (M =
|
|
95
|
+
n[4] === k ? M = n[5] : (M = g({ size: k }), n[4] = k, n[5] = M);
|
|
96
96
|
let N;
|
|
97
|
-
n[6] ===
|
|
97
|
+
n[6] === r ? N = n[7] : (N = r ? { pointerEvents: "none" } : void 0, n[6] = r, n[7] = N);
|
|
98
98
|
let P;
|
|
99
99
|
n[8] !== O || n[9] !== h.description || n[10] !== h.heading ? (P = (h.heading || h.description) && /* @__PURE__ */ T(c, {
|
|
100
100
|
className: "zv6sjd4",
|
|
@@ -108,38 +108,41 @@ var Q = [
|
|
|
108
108
|
content: h.body
|
|
109
109
|
}), n[12] = h.body, n[13] = F);
|
|
110
110
|
let I;
|
|
111
|
-
n[14] !== O || n[15] !==
|
|
111
|
+
n[14] !== O || n[15] !== l || n[16] !== h.action || n[17] !== d || n[18] !== i || n[19] !== u ? (I = h.action?.type === "form" && l && /* @__PURE__ */ w("div", {
|
|
112
112
|
className: "zv6sjd7",
|
|
113
|
-
children: /* @__PURE__ */ w(y, { children: /* @__PURE__ */ w(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
113
|
+
children: /* @__PURE__ */ w(y, { children: /* @__PURE__ */ w(v, {
|
|
114
|
+
client: l,
|
|
115
|
+
children: /* @__PURE__ */ w(ne, {
|
|
116
|
+
collection_id: h.action.collectionKey,
|
|
117
|
+
formVariant: h.action.formVariant,
|
|
118
|
+
theme: ie,
|
|
119
|
+
uiConfig: {
|
|
120
|
+
hideFormHeading: !0,
|
|
121
|
+
hideSectionHeadings: !0
|
|
122
|
+
},
|
|
123
|
+
successConfig: h.action.successRedirectUrl ? { action: {
|
|
124
|
+
type: "redirect",
|
|
125
|
+
value: h.action.successRedirectUrl
|
|
126
|
+
} } : void 0,
|
|
127
|
+
submitButtonConfig: {
|
|
128
|
+
show: !0,
|
|
129
|
+
text: h.action.label || "Submit",
|
|
130
|
+
styles: h.action.fullWidth && (h.action.formVariant ?? "default") === "default" ? "zv6sjdb" : ae[O]
|
|
131
|
+
},
|
|
132
|
+
workspace_id: l.workspace,
|
|
133
|
+
containerStyles: "zv6sjd6",
|
|
134
|
+
preview: u,
|
|
135
|
+
onSuccess: () => {
|
|
136
|
+
h.action?.type === "form" && d?.(i, {
|
|
137
|
+
action_type: "form_submit",
|
|
138
|
+
collection_key: h.action.collectionKey
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
})
|
|
139
142
|
}) })
|
|
140
|
-
}), n[14] = O, n[15] =
|
|
143
|
+
}), n[14] = O, n[15] = l, n[16] = h.action, n[17] = d, n[18] = i, n[19] = u, n[20] = I) : I = n[20];
|
|
141
144
|
let L;
|
|
142
|
-
n[21] !== h.action || n[22] !== b || n[23] !== D || n[24] !==
|
|
145
|
+
n[21] !== h.action || n[22] !== b || n[23] !== D || n[24] !== p ? (L = h.action?.type === "redirect" && /* @__PURE__ */ T(C, { children: [h.action.copyValue && /* @__PURE__ */ T("button", {
|
|
143
146
|
type: "button",
|
|
144
147
|
className: "zv6sjdd",
|
|
145
148
|
onClick: D,
|
|
@@ -152,9 +155,9 @@ var Q = [
|
|
|
152
155
|
})]
|
|
153
156
|
}), /* @__PURE__ */ w(e, {
|
|
154
157
|
className: "zv6sjdc",
|
|
155
|
-
onClick: () =>
|
|
158
|
+
onClick: () => p?.(),
|
|
156
159
|
children: h.action.label || "Button"
|
|
157
|
-
})] }), n[21] = h.action, n[22] = b, n[23] = D, n[24] =
|
|
160
|
+
})] }), n[21] = h.action, n[22] = b, n[23] = D, n[24] = p, n[25] = L) : L = n[25];
|
|
158
161
|
let R;
|
|
159
162
|
return n[26] !== M || n[27] !== N || n[28] !== P || n[29] !== F || n[30] !== I || n[31] !== L ? (R = /* @__PURE__ */ T("div", {
|
|
160
163
|
className: M,
|