@levo-so/site-runtime 0.3.24 → 0.3.26
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-ByiYjJ0S.js → BillingStep-OT3ayt8x.js} +1 -1
- package/{BookingCard-DdwLHVGw.js → BookingCard-mqroL-wV.js} +2 -2
- package/CHANGELOG.md +41 -0
- package/{DateTimeWidget-Bk2tk_CT.js → DateTimeWidget-DcsuQf6T.js} +1 -1
- package/{PhoneWidget-FWE3jD_L.js → PhoneWidget-DbhgbvKH.js} +1 -1
- package/{PopupBody-DWM55Zh5-B3ysApDM.js → PopupBody-DWM55Zh5-BaxCgy8c.js} +2 -2
- package/{PopupDialog-DwAAJ8JS-DkxjZaJL.js → PopupDialog-DwAAJ8JS-DzVJh1br.js} +2 -2
- package/{PopupRenderer-BVtV4b9I-Dot4Syse.js → PopupRenderer-BVtV4b9I-Z7QWR6y6.js} +2 -2
- package/{RichTextWidget-KnIKESAD.js → RichTextWidget-B_olC979.js} +1 -1
- package/blog-content.js +2 -2
- package/{dist-BVFCdirT.js → dist-B_29IiED.js} +79 -77
- package/{dist-DEXGyFeH.js → dist-DTszGV-P.js} +1 -1
- package/index.d.ts +88 -8
- package/index.js +1447 -905
- package/package.json +3 -3
- package/popups.js +1 -1
- package/styles.css +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { s as e } from "./dist-
|
|
2
|
+
import { s as e } from "./dist-B_29IiED.js";
|
|
3
3
|
import { n as t, t as n } from "./CollectionLabel-CmUFfc_7.js";
|
|
4
4
|
import { m as ee } from "./theme.cssm-iXnQwMCp.js";
|
|
5
5
|
import { c as te } from "react/compiler-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { c as e, r as t } from "./dist-
|
|
2
|
+
import { c as e, r as t } from "./dist-B_29IiED.js";
|
|
3
3
|
import { m as n } from "./theme.cssm-iXnQwMCp.js";
|
|
4
4
|
import { a as r } from "./inlineBaseTheme-DcNdMEYp.js";
|
|
5
|
-
import { BillingStep as i } from "./BillingStep-
|
|
5
|
+
import { BillingStep as i } from "./BillingStep-OT3ayt8x.js";
|
|
6
6
|
import a from "dayjs";
|
|
7
7
|
import { c as o } from "react/compiler-runtime";
|
|
8
8
|
import { useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# @levo-so/site-runtime
|
|
2
2
|
|
|
3
|
+
## 0.3.26
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Adds `LevoEditForm`, an edit form for a collection entry the page already has: the v3 counterpart of v2's studio `EditForm`, for "edit my profile" pages. **It makes no API calls of its own.** The page loads the entry and saves it; the form renders the collection's fields filled with that entry and hands the edited values back. New submissions still use `LevoForm`, and the signed-in member's own account still uses `LevoProfileForm`. Nothing changes for existing forms.
|
|
8
|
+
|
|
9
|
+
- Props: `source` (the same `dataSources` entry with `mode: "form"` that a `LevoForm` takes; the fields come from it), `initialValues` (the entry being edited), `onSubmit(values)`, `isLoading` (the save's pending state; disables the button and shows "Saving"), `hiddenFields` (field keys or ids), `submitLabel` (default "Save changes"), `theme` and `className`.
|
|
10
|
+
- `onSubmit` receives only the visible fields. Fields listed in `hiddenFields`, fields the collection marks hidden, and fields closed to visitors (`allow_public_view: false` or `allow_public_submit: false`) are not rendered and never reach the save.
|
|
11
|
+
- `initialValues` is read once, when the form mounts. Render the form after the entry has loaded, not while it is loading.
|
|
12
|
+
- A typical page: `const client = useLevoSite()`, load the visitor's entry with `client.collection.getDraftEntry(key)`, save with `client.collection.editDraftEntry(...)`, or with `client.collection.saveCollectionData(...)` when the visitor has no entry yet (then save to the new entry's id from the second Save on). The page owns the sign-in check and the success and error messages.
|
|
13
|
+
- Not supported: form layouts (single-field, steps), a success screen and captcha. `hiddenFields` matches top-level fields only, not the sub-fields of record or array fields.
|
|
14
|
+
|
|
15
|
+
- `LevoEventRegister` takes an opt-in `enableMultipleTicketBooking` prop that lets one order hold several tickets, paid for once. **Do not turn it on for live sites yet.** It sends one booking with an `attendees` entry per ticket, and the booking API does not yet accept multi-attendee bookings or price a coupon across the whole order. Leave the prop off until a later release says the backend supports it. Without the prop, registration works exactly as before.
|
|
16
|
+
|
|
17
|
+
With the prop on, the registration sheet has three steps:
|
|
18
|
+
|
|
19
|
+
- **Tickets.** A − / + stepper on every ticket type, with a running count and total. An event with one ticket type starts at 1. Each type is capped at 10 per order, or at its remaining stock if that is lower; sold-out tickets show "Sold out".
|
|
20
|
+
- **Attendee details.** One panel per ticket, grouped under the ticket's name. "Next attendee" checks the open panel before moving on, and "Review order" stays disabled until every attendee is complete. Attendee 1 is prefilled from the signed-in account; the others start blank. Lowering a count and raising it again brings the typed details back.
|
|
21
|
+
- **Review.** One line per ticket type, the coupon field, the GST invoice option (once, for the whole order), then a single payment. A free order skips this step and saves straight from the details step ("Save N spots").
|
|
22
|
+
|
|
23
|
+
The confirmation says how many spots were booked. With `external` set, the prop is ignored and the button still links out.
|
|
24
|
+
|
|
25
|
+
Fixed for every event page, with or without the prop:
|
|
26
|
+
|
|
27
|
+
- Moving between event pages without a full reload (`/events/a` to `/events/b`) starts a fresh registration. Before, the sheet could carry the previous event's confirmed booking, registered email or a payment still in flight onto the next event.
|
|
28
|
+
- A coupon check that answers after the visitor changed ticket or removed the coupon no longer brings back a discount for the earlier choice.
|
|
29
|
+
|
|
30
|
+
Nothing to change in site code.
|
|
31
|
+
|
|
32
|
+
- @levo-so/core@0.3.26
|
|
33
|
+
- @levo-so/insights@0.3.26
|
|
34
|
+
|
|
35
|
+
## 0.3.25
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- 12bdba7: Adds `LevoLink`, the router's `<Link>` with a `to` that accepts any site path. On a multi-variant site, shared chrome (navbar, footer, CTAs) must link to the language-neutral path (`/about-us`) so the doorway sends each visitor to their own variant, but `<Link to="/about-us">` fails the publish type check because the neutral path is not a registered route. `LevoLink` is that link with the typing escape in one place and the reason attached, instead of a cast in every site; navigation is unchanged and still goes through the root route's locale redirect.
|
|
40
|
+
- 07c0850: Dynamic pages type-check with the loader attached. The loader from `createLevoLoader` no longer declares `params` on its context type: TanStack inferred a route's params from that annotation instead of from the file path, so `Route.useParams()` on a `$slug` route was typed `{ [x: string]: string } | undefined` and `const { slug } = Route.useParams()` failed the publish type check (#4696). A plain `$slug` route now gets `slug: string`, a route under a `$locale` layout keeps `locale`, a `levoParams` route keeps its split variables, and a static route has no params. The loader still reads the route params at runtime and prefetches the same sources; sites can drop the `Route.useParams() ?? {}` workaround.
|
|
41
|
+
- @levo-so/core@0.3.25
|
|
42
|
+
- @levo-so/insights@0.3.25
|
|
43
|
+
|
|
3
44
|
## 0.3.24
|
|
4
45
|
|
|
5
46
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as e, p as t, s as n } from "./dist-
|
|
1
|
+
import { h as e, p as t, s as n } from "./dist-B_29IiED.js";
|
|
2
2
|
import { m as r } from "./theme.cssm-iXnQwMCp.js";
|
|
3
3
|
import { a as i, i as a, n as o, r as s, t as c } from "./Popover-MSrVDAzg.js";
|
|
4
4
|
import { FieldInterfaces as l } from "@levo-so/core";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { h as e, o as t, p as ee, s as n } from "./dist-
|
|
2
|
+
import { h as e, o as t, p as ee, s as n } from "./dist-B_29IiED.js";
|
|
3
3
|
import { c as te } from "react/compiler-runtime";
|
|
4
4
|
import { useState as r } from "react";
|
|
5
5
|
import { useController as i } from "react-hook-form";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e, i as t, m as n, n as r } from "./theme.cssm-iXnQwMCp.js";
|
|
2
|
-
import { a as i, i as a, l as o, n as s, o as c, r as l, u } from "./PopupDialog-DwAAJ8JS-
|
|
2
|
+
import { a as i, i as a, l as o, n as s, o as c, r as l, u } from "./PopupDialog-DwAAJ8JS-DzVJh1br.js";
|
|
3
3
|
import { o as d } from "./inlineBaseTheme-DcNdMEYp.js";
|
|
4
4
|
import { t as f } from "./inlineCollectionTheme-DjXuH3bK.js";
|
|
5
5
|
import { _ as p, a as m, c as h, d as g, f as _, g as v, h as y, i as b, l as x, m as S, n as C, o as w, p as T, r as E, s as D, t as O, u as k, v as A } from "./react-CENbCy5d.js";
|
|
@@ -59,7 +59,7 @@ var Z = [
|
|
|
59
59
|
...r,
|
|
60
60
|
children: a
|
|
61
61
|
}) : null;
|
|
62
|
-
}, $ = /* @__PURE__ */ u({ PopupBody: () => oe }), ne = F(() => import("./dist-
|
|
62
|
+
}, $ = /* @__PURE__ */ u({ PopupBody: () => oe }), ne = F(() => import("./dist-B_29IiED.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormBuilder }))), re = N({ baseSpacing: ".625rem" }), ie = { style: f({ form: { gap: "1rem" } }) }, ae = {
|
|
63
63
|
left: s,
|
|
64
64
|
center: a,
|
|
65
65
|
right: o
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as e, d as t, l as n, o as r, p as i, s as a, t as o, u as s } from "./theme.cssm-iXnQwMCp.js";
|
|
2
|
-
import { a as c, c as l, f as u, i as d, o as f, p, r as m, s as h } from "./dist-
|
|
2
|
+
import { a as c, c as l, f as u, i as d, o as f, p, r as m, s as h } from "./dist-DTszGV-P.js";
|
|
3
3
|
import { t as g } from "./rteTheme.cssm-BRxusHY4.js";
|
|
4
4
|
import { c as _ } from "react/compiler-runtime";
|
|
5
5
|
import { Suspense as v, createContext as y, lazy as b, useContext as x, useEffect as S, useRef as C } from "react";
|
|
@@ -171,7 +171,7 @@ var R = Object.defineProperty, z = (e, t) => {
|
|
|
171
171
|
...a,
|
|
172
172
|
children: n
|
|
173
173
|
}), t[15] = n, t[16] = a, t[17] = h, t[18] = v) : v = t[18], v;
|
|
174
|
-
}, ce = b(() => import("./PopupBody-DWM55Zh5-
|
|
174
|
+
}, ce = b(() => import("./PopupBody-DWM55Zh5-BaxCgy8c.js").then((e) => e.n).then((e) => ({ default: e.PopupBody }))), le = (e) => {
|
|
175
175
|
let t = _(7), { size: n } = e, r = n ?? "medium", i;
|
|
176
176
|
t[0] === r ? i = t[1] : (i = U({ size: r }), t[0] = r, t[1] = i);
|
|
177
177
|
let a, o, s;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as e, r as t, s as n, t as r, u as i } from "./PopupDialog-DwAAJ8JS-
|
|
1
|
+
import { c as e, r as t, s as n, t as r, u as i } from "./PopupDialog-DwAAJ8JS-DzVJh1br.js";
|
|
2
2
|
import { a, c as o } from "./inlineBaseTheme-DcNdMEYp.js";
|
|
3
|
-
import { d as s, l as c, r as l, u } from "./dist-
|
|
3
|
+
import { d as s, l as c, r as l, u } from "./dist-DTszGV-P.js";
|
|
4
4
|
import { c as d } from "react/compiler-runtime";
|
|
5
5
|
import { useEffect as f, useRef as p } from "react";
|
|
6
6
|
import { Fragment as m, jsx as h } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { d as e, f as t, h as n, l as r, m as i, p as a, u as o } from "./dist-
|
|
2
|
+
import { d as e, f as t, h as n, l as r, m as i, p as a, u as o } from "./dist-B_29IiED.js";
|
|
3
3
|
import { m as s } from "./theme.cssm-iXnQwMCp.js";
|
|
4
4
|
import { n as c, t as l } from "./content.cssm-D_LSloGW.js";
|
|
5
5
|
import { t as u } from "./inlineRteTheme-BYGIJM7P.js";
|
package/blog-content.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { i as e } from "./dist-
|
|
2
|
+
import { i as e } from "./dist-B_29IiED.js";
|
|
3
3
|
import { a as t, t as n } from "./inlineBaseTheme-DcNdMEYp.js";
|
|
4
|
-
import { t as r } from "./dist-
|
|
4
|
+
import { t as r } from "./dist-DTszGV-P.js";
|
|
5
5
|
import { _ as i, a, c as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b, v as x } from "./react-CENbCy5d.js";
|
|
6
6
|
import { i as S, n as C, r as w, t as T } from "./content.cssm-D_LSloGW.js";
|
|
7
7
|
import { t as E } from "./RteThemeProvider-DtTXGcCT.js";
|
|
@@ -1424,7 +1424,7 @@ var Kn = "_1vaa8ub0", qn = "_1vaa8ub2", Jn = "_1vaa8ub3", Yn = "_13kepqq0", Xn =
|
|
|
1424
1424
|
id: f,
|
|
1425
1425
|
value: x ? er : p ? t?.isMulti ? r?.filter((e) => p?.includes(e?.value)) : r?.find((e) => e?.value === p) : null,
|
|
1426
1426
|
onChange: (e) => {
|
|
1427
|
-
T && e?.value === er.value && e?.label === er.label ? (S(!0), b(""), h("")) : (S(!1), t?.isMulti ? h(e?.map((e) => e?.value)) : h(e?.value));
|
|
1427
|
+
T && e?.value === er.value && e?.label === er.label ? (S(!0), b(""), h("")) : (S(!1), t?.isMulti ? h(e?.map((e) => e?.value)) : h(e?.value ?? null));
|
|
1428
1428
|
},
|
|
1429
1429
|
onBlur: () => m(),
|
|
1430
1430
|
options: r,
|
|
@@ -2552,7 +2552,7 @@ var ki = "_156u72w0", Ai = "_156u72w1", ji = (e) => Array.isArray(e) && e.every(
|
|
|
2552
2552
|
field_key: e.key || void 0,
|
|
2553
2553
|
field_label: e.label || void 0
|
|
2554
2554
|
} : void 0, D = (e) => {
|
|
2555
|
-
h(r ? e : e?.[0]);
|
|
2555
|
+
h(r ? e : e?.[0] ?? null);
|
|
2556
2556
|
}, O = async (e) => {
|
|
2557
2557
|
let t = new FormData(), n = r ? e : e.slice(0, 1);
|
|
2558
2558
|
if (n.length !== 0) {
|
|
@@ -2638,7 +2638,7 @@ var ki = "_156u72w0", Ai = "_156u72w1", ji = (e) => Array.isArray(e) && e.every(
|
|
|
2638
2638
|
leftIcon: n,
|
|
2639
2639
|
...e
|
|
2640
2640
|
}), t[1] = e, t[2] = r), r;
|
|
2641
|
-
}, Pi = M(() => import("./DateTimeWidget-
|
|
2641
|
+
}, Pi = M(() => import("./DateTimeWidget-DcsuQf6T.js")), Fi = M(() => import("./PhoneWidget-DbhgbvKH.js")), Ii = M(() => import("./RichTextWidget-B_olC979.js")), Li = {
|
|
2642
2642
|
TextWidget: $((e) => /* @__PURE__ */ X($r, { ...e })),
|
|
2643
2643
|
NumberWidget: $((e) => /* @__PURE__ */ X($r, {
|
|
2644
2644
|
type: "number",
|
|
@@ -2752,39 +2752,41 @@ var ki = "_156u72w0", Ai = "_156u72w1", ji = (e) => Array.isArray(e) && e.every(
|
|
|
2752
2752
|
children: [g, v]
|
|
2753
2753
|
}), t[22] = g, t[23] = v, t[24] = y) : y = t[24], y;
|
|
2754
2754
|
}, Bi = (e) => {
|
|
2755
|
-
let t = D(
|
|
2755
|
+
let t = D(18), n, r;
|
|
2756
2756
|
t[0] === e ? (n = t[1], r = t[2]) : ({widgets: r, ...n} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
2757
2757
|
let i = it(n.schema, n.field), { field_interface: a, key: o, hidden: s } = i, c = a === void 0 ? "" : a;
|
|
2758
2758
|
if (!c || !(o !== void 0 && o) || s) return null;
|
|
2759
2759
|
switch (c) {
|
|
2760
2760
|
case y.ArrayWidget: {
|
|
2761
2761
|
let e;
|
|
2762
|
-
return t[3] !== i || t[4] !== n ? (e = /* @__PURE__ */ X(Ft, {
|
|
2762
|
+
return t[3] !== i || t[4] !== n || t[5] !== r ? (e = /* @__PURE__ */ X(Ft, {
|
|
2763
2763
|
...n,
|
|
2764
|
+
widgets: r,
|
|
2764
2765
|
field: i
|
|
2765
|
-
}), t[3] = i, t[4] = n, t[5] = e) : e = t[
|
|
2766
|
+
}), t[3] = i, t[4] = n, t[5] = r, t[6] = e) : e = t[6], e;
|
|
2766
2767
|
}
|
|
2767
2768
|
case y.RecordWidget: {
|
|
2768
2769
|
let e;
|
|
2769
|
-
return t[
|
|
2770
|
+
return t[7] !== i || t[8] !== n || t[9] !== r ? (e = /* @__PURE__ */ X(zi, {
|
|
2770
2771
|
...n,
|
|
2772
|
+
widgets: r,
|
|
2771
2773
|
field: i
|
|
2772
|
-
}), t[
|
|
2774
|
+
}), t[7] = i, t[8] = n, t[9] = r, t[10] = e) : e = t[10], e;
|
|
2773
2775
|
}
|
|
2774
2776
|
case y.CollectionWidget: {
|
|
2775
2777
|
let e;
|
|
2776
|
-
return t[
|
|
2778
|
+
return t[11] !== i || t[12] !== n ? (e = /* @__PURE__ */ X(An, {
|
|
2777
2779
|
...n,
|
|
2778
2780
|
field: i
|
|
2779
|
-
}), t[
|
|
2781
|
+
}), t[11] = i, t[12] = n, t[13] = e) : e = t[13], e;
|
|
2780
2782
|
}
|
|
2781
2783
|
default: {
|
|
2782
2784
|
let e;
|
|
2783
|
-
return t[
|
|
2785
|
+
return t[14] !== i || t[15] !== n || t[16] !== r ? (e = /* @__PURE__ */ X(Ri, {
|
|
2784
2786
|
widgets: r,
|
|
2785
2787
|
...n,
|
|
2786
2788
|
field: i
|
|
2787
|
-
}), t[
|
|
2789
|
+
}), t[14] = i, t[15] = n, t[16] = r, t[17] = e) : e = t[17], e;
|
|
2788
2790
|
}
|
|
2789
2791
|
}
|
|
2790
2792
|
};
|
|
@@ -3486,17 +3488,7 @@ var za = "_1vist8m0", Ba = (e) => {
|
|
|
3486
3488
|
className: i,
|
|
3487
3489
|
children: "Create new"
|
|
3488
3490
|
}), t[2] = i, t[3] = a), a;
|
|
3489
|
-
}, Va = "
|
|
3490
|
-
let t = D(5), { children: n, className: r } = e, { uiConfig: i } = sa();
|
|
3491
|
-
if (i?.hideSectionHeadings) return null;
|
|
3492
|
-
let a;
|
|
3493
|
-
t[0] === r ? a = t[1] : (a = J(Va, r), t[0] = r, t[1] = a);
|
|
3494
|
-
let o;
|
|
3495
|
-
return t[2] !== n || t[3] !== a ? (o = /* @__PURE__ */ X("h3", {
|
|
3496
|
-
className: a,
|
|
3497
|
-
children: n
|
|
3498
|
-
}), t[2] = n, t[3] = a, t[4] = o) : o = t[4], o;
|
|
3499
|
-
}, Ua = "q22d794", Wa = "q22d795", Ga = "q22d796", Ka = "q22d797", qa = "q22d798", Ja = 5, Ya = "Thank you!", Xa = "Your response has been submitted successfully.", Za = () => {
|
|
3491
|
+
}, Va = "q22d794", Ha = "q22d795", Ua = "q22d796", Wa = "q22d797", Ga = "q22d798", Ka = 5, qa = "Thank you!", Ja = "Your response has been submitted successfully.", Ya = () => {
|
|
3500
3492
|
let e = D(1), t;
|
|
3501
3493
|
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ Z("svg", {
|
|
3502
3494
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3508,8 +3500,8 @@ var za = "_1vist8m0", Ba = (e) => {
|
|
|
3508
3500
|
strokeLinejoin: "round",
|
|
3509
3501
|
children: [/* @__PURE__ */ X("title", { children: "Check Icon" }), /* @__PURE__ */ X("path", { d: "M20 6 9 17l-5-5" })]
|
|
3510
3502
|
}), e[0] = t) : t = e[0], t;
|
|
3511
|
-
},
|
|
3512
|
-
let { successConfig: t, schema: n } = sa(), r = n?.settings?.success_message, [i, a] = R(
|
|
3503
|
+
}, Xa = ({ onDismiss: e }) => {
|
|
3504
|
+
let { successConfig: t, schema: n } = sa(), r = n?.settings?.success_message, [i, a] = R(Ka), s = (e) => !e || e.replace(/<[^>]*>/g, "").trim() === "", c = t?.title || r?.title || qa, l = t?.message || r?.message, u = s(l) ? Ja : l, d = t?.action || r?.action, f = d?.type ?? "none", p = f === "redirect" ? d?.value : void 0, m = (() => {
|
|
3513
3505
|
let e = p?.trim();
|
|
3514
3506
|
if (e && !e.startsWith("//")) {
|
|
3515
3507
|
if (e.startsWith("/")) return e;
|
|
@@ -3530,20 +3522,20 @@ var za = "_1vist8m0", Ba = (e) => {
|
|
|
3530
3522
|
m && (window.location.href = m);
|
|
3531
3523
|
}, [m]);
|
|
3532
3524
|
return /* @__PURE__ */ X("div", {
|
|
3533
|
-
className:
|
|
3525
|
+
className: Va,
|
|
3534
3526
|
children: /* @__PURE__ */ Z("div", {
|
|
3535
|
-
className:
|
|
3527
|
+
className: Ha,
|
|
3536
3528
|
children: [
|
|
3537
3529
|
/* @__PURE__ */ X("div", {
|
|
3538
|
-
className:
|
|
3539
|
-
children: /* @__PURE__ */ X(
|
|
3530
|
+
className: Ua,
|
|
3531
|
+
children: /* @__PURE__ */ X(Ya, {})
|
|
3540
3532
|
}),
|
|
3541
3533
|
/* @__PURE__ */ X("h2", {
|
|
3542
|
-
className:
|
|
3534
|
+
className: Wa,
|
|
3543
3535
|
children: c
|
|
3544
3536
|
}),
|
|
3545
3537
|
/* @__PURE__ */ X("div", {
|
|
3546
|
-
className:
|
|
3538
|
+
className: Ga,
|
|
3547
3539
|
dangerouslySetInnerHTML: { __html: u }
|
|
3548
3540
|
}),
|
|
3549
3541
|
f === "submit_another" && /* @__PURE__ */ X("div", {
|
|
@@ -3574,14 +3566,14 @@ var za = "_1vist8m0", Ba = (e) => {
|
|
|
3574
3566
|
]
|
|
3575
3567
|
})
|
|
3576
3568
|
});
|
|
3577
|
-
},
|
|
3569
|
+
}, Za = (e) => {
|
|
3578
3570
|
let t = D(29), { isError: n, contentId: r, publishedId: i, getContentId: a, allFormValues: o } = e, { collection: s } = f(), { schema: c, isLoggedIn: l, preview: u } = sa(), { formState: d } = W(), p = G(), m;
|
|
3579
3571
|
t[0] !== s || t[1] !== r || t[2] !== a || t[3] !== n || t[4] !== l || t[5] !== u || t[6] !== i || t[7] !== c?.allow_draft || t[8] !== c?.key ? (m = (e) => {
|
|
3580
3572
|
u || i || c?.key && !n && c?.allow_draft && (l ? r ? s.editDraftEntry(c?.key, r, e).then((e) => {
|
|
3581
3573
|
e?.content?.data?._id && a(e?.content?.data?._id);
|
|
3582
|
-
}).catch(
|
|
3574
|
+
}).catch(Qa) : s.saveDraftEntry(c?.key, e).then((e) => {
|
|
3583
3575
|
e?.content?.data?._id && a(e?.content?.data?._id);
|
|
3584
|
-
}).catch(
|
|
3576
|
+
}).catch($a) : da(c?.key, e));
|
|
3585
3577
|
}, t[0] = s, t[1] = r, t[2] = a, t[3] = n, t[4] = l, t[5] = u, t[6] = i, t[7] = c?.allow_draft, t[8] = c?.key, t[9] = m) : m = t[9];
|
|
3586
3578
|
let h = ke(m, 100), { isDirty: g, isSubmitting: _, isSubmitSuccessful: v } = d, y;
|
|
3587
3579
|
t[10] !== o || t[11] !== h || t[12] !== p || t[13] !== g || t[14] !== n || t[15] !== v || t[16] !== _ || t[17] !== u ? (y = () => {
|
|
@@ -3609,15 +3601,47 @@ var za = "_1vist8m0", Ba = (e) => {
|
|
|
3609
3601
|
u
|
|
3610
3602
|
], t[19] = r, t[20] = p, t[21] = g, t[22] = n, t[23] = l, t[24] = v, t[25] = _, t[26] = u, t[27] = i, t[28] = b) : b = t[28], F(y, b), null;
|
|
3611
3603
|
};
|
|
3612
|
-
function
|
|
3604
|
+
function Qa() {
|
|
3613
3605
|
console.error("saving entry failed");
|
|
3614
3606
|
}
|
|
3615
|
-
function
|
|
3607
|
+
function $a() {
|
|
3616
3608
|
console.error("saving entry failed");
|
|
3617
3609
|
}
|
|
3618
3610
|
//#endregion
|
|
3619
3611
|
//#region ../../libraries/react-collection/dist/lib/variants/DefaultFormVariant/DefaultFormVariant.cssm.js
|
|
3620
|
-
var
|
|
3612
|
+
var eo = "fil1ri0", to = "fil1ri1", no = "zx38wb0", ro = (e) => {
|
|
3613
|
+
let t = D(5), { children: n, className: r } = e, { uiConfig: i } = sa();
|
|
3614
|
+
if (i?.hideSectionHeadings) return null;
|
|
3615
|
+
let a;
|
|
3616
|
+
t[0] === r ? a = t[1] : (a = J(no, r), t[0] = r, t[1] = a);
|
|
3617
|
+
let o;
|
|
3618
|
+
return t[2] !== n || t[3] !== a ? (o = /* @__PURE__ */ X("h3", {
|
|
3619
|
+
className: a,
|
|
3620
|
+
children: n
|
|
3621
|
+
}), t[2] = n, t[3] = a, t[4] = o) : o = t[4], o;
|
|
3622
|
+
}, io = "_1hdk5oz0", ao = "_1hdk5oz1", oo = (e) => {
|
|
3623
|
+
let t = D(12), { schema: n, section: r, widgets: i, enableVerification: a } = e;
|
|
3624
|
+
if (!at(n, r)) return null;
|
|
3625
|
+
let o;
|
|
3626
|
+
t[0] === r ? o = t[1] : (o = r?.label && /* @__PURE__ */ X(ro, { children: r.label }), t[0] = r, t[1] = o);
|
|
3627
|
+
let s;
|
|
3628
|
+
t[2] !== a || t[3] !== n || t[4] !== r?.fields || t[5] !== i ? (s = r?.fields?.map((e) => /* @__PURE__ */ X(Bi, {
|
|
3629
|
+
field: e,
|
|
3630
|
+
widgets: i,
|
|
3631
|
+
schema: n,
|
|
3632
|
+
settings: { enableVerification: a }
|
|
3633
|
+
}, e?.key)), t[2] = a, t[3] = n, t[4] = r?.fields, t[5] = i, t[6] = s) : s = t[6];
|
|
3634
|
+
let c;
|
|
3635
|
+
t[7] === s ? c = t[8] : (c = /* @__PURE__ */ X("div", {
|
|
3636
|
+
className: ao,
|
|
3637
|
+
children: s
|
|
3638
|
+
}), t[7] = s, t[8] = c);
|
|
3639
|
+
let l;
|
|
3640
|
+
return t[9] !== o || t[10] !== c ? (l = /* @__PURE__ */ Z("div", {
|
|
3641
|
+
className: io,
|
|
3642
|
+
children: [o, c]
|
|
3643
|
+
}), t[9] = o, t[10] = c, t[11] = l) : l = t[11], l;
|
|
3644
|
+
}, so = () => {
|
|
3621
3645
|
let e = D(51), { schema: t, containerStyles: n, submitButtonConfig: r, isDisabled: i, widgets: a, disableCaptcha: s, debug: c, enableVerification: l } = sa(), u;
|
|
3622
3646
|
e[0] === t ? u = e[1] : (u = { schema: t }, e[0] = t, e[1] = u);
|
|
3623
3647
|
let { methods: d, isError: f, isLoading: p, contentId: m, publishedId: h, handleContentId: g, submitToRemote: _, allFormValues: v, showSuccessOverlay: y, dismissSuccessOverlay: b } = pa(u), { handleSubmit: x, watch: S, formState: C } = d, { isSubmitting: w } = C, T;
|
|
@@ -3631,12 +3655,12 @@ var no = "fil1ri0", ro = "fil1ri1", io = "fil1ri2", ao = "fil1ri5", oo = () => {
|
|
|
3631
3655
|
let A = k;
|
|
3632
3656
|
if (y) {
|
|
3633
3657
|
let t;
|
|
3634
|
-
return e[9] === b ? t = e[10] : (t = /* @__PURE__ */ X(
|
|
3658
|
+
return e[9] === b ? t = e[10] : (t = /* @__PURE__ */ X(Xa, { onDismiss: b }), e[9] = b, e[10] = t), t;
|
|
3635
3659
|
}
|
|
3636
3660
|
let j;
|
|
3637
3661
|
e[11] === c ? j = e[12] : (j = c && /* @__PURE__ */ X(Na, {}), e[11] = c, e[12] = j);
|
|
3638
3662
|
let M = m || "", N = h || "", P;
|
|
3639
|
-
e[13] !== v || e[14] !== g || e[15] !== f || e[16] !== M || e[17] !== N ? (P = /* @__PURE__ */ X(
|
|
3663
|
+
e[13] !== v || e[14] !== g || e[15] !== f || e[16] !== M || e[17] !== N ? (P = /* @__PURE__ */ X(Za, {
|
|
3640
3664
|
getContentId: g,
|
|
3641
3665
|
isError: f,
|
|
3642
3666
|
contentId: M,
|
|
@@ -3644,13 +3668,13 @@ var no = "fil1ri0", ro = "fil1ri1", io = "fil1ri2", ao = "fil1ri5", oo = () => {
|
|
|
3644
3668
|
allFormValues: v
|
|
3645
3669
|
}), e[13] = v, e[14] = g, e[15] = f, e[16] = M, e[17] = N, e[18] = P) : P = e[18];
|
|
3646
3670
|
let F;
|
|
3647
|
-
e[19] === n ? F = e[20] : (F = J(
|
|
3671
|
+
e[19] === n ? F = e[20] : (F = J(eo, n), e[19] = n, e[20] = F);
|
|
3648
3672
|
let I;
|
|
3649
3673
|
e[21] === Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ X(Ba, {}), e[21] = I) : I = e[21];
|
|
3650
|
-
let L = p && "
|
|
3651
|
-
e[22] === L ? R = e[23] : (R = J(
|
|
3674
|
+
let L = p && "fil1ri2", R;
|
|
3675
|
+
e[22] === L ? R = e[23] : (R = J(to, L), e[22] = L, e[23] = R);
|
|
3652
3676
|
let B;
|
|
3653
|
-
e[24] !== l || e[25] !== t || e[26] !== a ? (B = t?.sections?.map((e) => /* @__PURE__ */ X(
|
|
3677
|
+
e[24] !== l || e[25] !== t || e[26] !== a ? (B = t?.sections?.map((e) => /* @__PURE__ */ X(oo, {
|
|
3654
3678
|
schema: t,
|
|
3655
3679
|
section: e,
|
|
3656
3680
|
widgets: a,
|
|
@@ -3660,7 +3684,7 @@ var no = "fil1ri0", ro = "fil1ri1", io = "fil1ri2", ao = "fil1ri5", oo = () => {
|
|
|
3660
3684
|
e[28] === s ? V = e[29] : (V = !s && /* @__PURE__ */ X(ja, {}), e[28] = s, e[29] = V);
|
|
3661
3685
|
let H;
|
|
3662
3686
|
e[30] !== E || e[31] !== i || e[32] !== w || e[33] !== r?.show || e[34] !== r?.styles || e[35] !== r?.text ? (H = r?.show && /* @__PURE__ */ X("div", {
|
|
3663
|
-
className: "
|
|
3687
|
+
className: "fil1ri3",
|
|
3664
3688
|
children: /* @__PURE__ */ X(o, {
|
|
3665
3689
|
className: r?.styles,
|
|
3666
3690
|
disabled: i || w,
|
|
@@ -3693,28 +3717,6 @@ var no = "fil1ri0", ro = "fil1ri1", io = "fil1ri2", ao = "fil1ri5", oo = () => {
|
|
|
3693
3717
|
W
|
|
3694
3718
|
]
|
|
3695
3719
|
}), e[46] = d, e[47] = W, e[48] = j, e[49] = P, e[50] = G) : G = e[50], G;
|
|
3696
|
-
}, so = (e) => {
|
|
3697
|
-
let t = D(12), { schema: n, section: r, widgets: i, enableVerification: a } = e;
|
|
3698
|
-
if (!at(n, r)) return null;
|
|
3699
|
-
let o;
|
|
3700
|
-
t[0] === r ? o = t[1] : (o = r?.label && /* @__PURE__ */ X(Ha, { children: r.label }), t[0] = r, t[1] = o);
|
|
3701
|
-
let s;
|
|
3702
|
-
t[2] !== a || t[3] !== n || t[4] !== r?.fields || t[5] !== i ? (s = r?.fields?.map((e) => /* @__PURE__ */ X(Bi, {
|
|
3703
|
-
field: e,
|
|
3704
|
-
widgets: i,
|
|
3705
|
-
schema: n,
|
|
3706
|
-
settings: { enableVerification: a }
|
|
3707
|
-
}, e?.key)), t[2] = a, t[3] = n, t[4] = r?.fields, t[5] = i, t[6] = s) : s = t[6];
|
|
3708
|
-
let c;
|
|
3709
|
-
t[7] === s ? c = t[8] : (c = /* @__PURE__ */ X("div", {
|
|
3710
|
-
className: ao,
|
|
3711
|
-
children: s
|
|
3712
|
-
}), t[7] = s, t[8] = c);
|
|
3713
|
-
let l;
|
|
3714
|
-
return t[9] !== o || t[10] !== c ? (l = /* @__PURE__ */ Z("div", {
|
|
3715
|
-
className: io,
|
|
3716
|
-
children: [o, c]
|
|
3717
|
-
}), t[9] = o, t[10] = c, t[11] = l) : l = t[11], l;
|
|
3718
3720
|
}, co = "_1kah2gz0", lo = "_1kah2gz1", uo = "_1kah2gz3", fo = (e) => {
|
|
3719
3721
|
let t = D(12), { totalSteps: n, currentStepIndex: r, hasLevoErrors: i } = e, { formState: a } = W(), { errors: o } = a, s = Object.keys(o || {}).length > 0 || i, c = Math.floor((r + 1) * 100 / n), l = s && "_1kah2gz2", u;
|
|
3720
3722
|
t[0] === l ? u = t[1] : (u = J(lo, l), t[0] = l, t[1] = u);
|
|
@@ -3820,10 +3822,10 @@ var no = "fil1ri0", ro = "fil1ri1", io = "fil1ri2", ao = "fil1ri5", oo = () => {
|
|
|
3820
3822
|
], e[32] = C, e[33] = y, e[34] = G, e[35] = se, e[36] = ce) : (se = e[35], ce = e[36]), F(se, ce), !n || l.length === 0) return null;
|
|
3821
3823
|
if (V) {
|
|
3822
3824
|
let t;
|
|
3823
|
-
return e[37] === H ? t = e[38] : (t = /* @__PURE__ */ X(
|
|
3825
|
+
return e[37] === H ? t = e[38] : (t = /* @__PURE__ */ X(Xa, { onDismiss: H }), e[37] = H, e[38] = t), t;
|
|
3824
3826
|
}
|
|
3825
3827
|
let le = q || B, ue = I || "", de = L || "", fe;
|
|
3826
|
-
e[39] !== P || e[40] !== M || e[41] !== N || e[42] !== ue || e[43] !== de ? (fe = /* @__PURE__ */ X(
|
|
3828
|
+
e[39] !== P || e[40] !== M || e[41] !== N || e[42] !== ue || e[43] !== de ? (fe = /* @__PURE__ */ X(Za, {
|
|
3827
3829
|
getContentId: M,
|
|
3828
3830
|
isError: N,
|
|
3829
3831
|
contentId: ue,
|
|
@@ -3833,7 +3835,7 @@ var no = "fil1ri0", ro = "fil1ri1", io = "fil1ri2", ao = "fil1ri5", oo = () => {
|
|
|
3833
3835
|
let pe;
|
|
3834
3836
|
e[45] === Symbol.for("react.memo_cache_sentinel") ? (pe = /* @__PURE__ */ X(Ba, { className: go }), e[45] = pe) : pe = e[45];
|
|
3835
3837
|
let me = C?.sectionLabel, he;
|
|
3836
|
-
e[46] === me ? he = e[47] : (he = /* @__PURE__ */ X(
|
|
3838
|
+
e[46] === me ? he = e[47] : (he = /* @__PURE__ */ X(ro, {
|
|
3837
3839
|
className: ho,
|
|
3838
3840
|
children: me
|
|
3839
3841
|
}), e[46] = me, e[47] = he);
|
|
@@ -4025,10 +4027,10 @@ var bo = "zlgzzn0", xo = "zlgzzn1", So = "zlgzznb", Co = "zlgzznc", wo = (e, t)
|
|
|
4025
4027
|
], e[47] = g, e[48] = S, e[49] = y, e[50] = q, e[51] = pe) : pe = e[51], F(fe, pe), !n || l.length === 0) return null;
|
|
4026
4028
|
if (U) {
|
|
4027
4029
|
let t;
|
|
4028
|
-
return e[52] === W ? t = e[53] : (t = /* @__PURE__ */ X(
|
|
4030
|
+
return e[52] === W ? t = e[53] : (t = /* @__PURE__ */ X(Xa, { onDismiss: W }), e[52] = W, e[53] = t), t;
|
|
4029
4031
|
}
|
|
4030
4032
|
let me = te || H || ie === "verifying" && C, he = B || "", ge = V || "", _e;
|
|
4031
|
-
e[54] !== L || e[55] !== P || e[56] !== I || e[57] !== he || e[58] !== ge ? (_e = /* @__PURE__ */ X(
|
|
4033
|
+
e[54] !== L || e[55] !== P || e[56] !== I || e[57] !== he || e[58] !== ge ? (_e = /* @__PURE__ */ X(Za, {
|
|
4032
4034
|
getContentId: P,
|
|
4033
4035
|
isError: I,
|
|
4034
4036
|
contentId: he,
|
|
@@ -4038,7 +4040,7 @@ var bo = "zlgzzn0", xo = "zlgzzn1", So = "zlgzznb", Co = "zlgzznc", wo = (e, t)
|
|
|
4038
4040
|
let ve;
|
|
4039
4041
|
e[60] === Symbol.for("react.memo_cache_sentinel") ? (ve = /* @__PURE__ */ X(Ba, { className: Co }), e[60] = ve) : ve = e[60];
|
|
4040
4042
|
let ye = S?.label, Q;
|
|
4041
|
-
e[61] === ye ? Q = e[62] : (Q = /* @__PURE__ */ X(
|
|
4043
|
+
e[61] === ye ? Q = e[62] : (Q = /* @__PURE__ */ X(ro, {
|
|
4042
4044
|
className: So,
|
|
4043
4045
|
children: ye
|
|
4044
4046
|
}), e[61] = ye, e[62] = Q);
|
|
@@ -4227,10 +4229,10 @@ var Oo = "_1f3ynb50", ko = "_1f3ynb54", Ao = "_1f3ynb55", jo = (e, t) => e?.sect
|
|
|
4227
4229
|
y
|
|
4228
4230
|
], t[30] = y, t[31] = _, t[32] = H, t[33] = ne, t[34] = re) : (ne = t[33], re = t[34]), F(re, ne), L) {
|
|
4229
4231
|
let e;
|
|
4230
|
-
return t[35] === B ? e = t[36] : (e = /* @__PURE__ */ X(
|
|
4232
|
+
return t[35] === B ? e = t[36] : (e = /* @__PURE__ */ X(Xa, { onDismiss: B }), t[35] = B, t[36] = e), e;
|
|
4231
4233
|
}
|
|
4232
4234
|
let ie = G || q === "verifying" && S, ae = N || "", oe = P || "", se;
|
|
4233
|
-
t[37] !== I || t[38] !== j || t[39] !== M || t[40] !== ae || t[41] !== oe ? (se = /* @__PURE__ */ X(
|
|
4235
|
+
t[37] !== I || t[38] !== j || t[39] !== M || t[40] !== ae || t[41] !== oe ? (se = /* @__PURE__ */ X(Za, {
|
|
4234
4236
|
getContentId: j,
|
|
4235
4237
|
isError: M,
|
|
4236
4238
|
contentId: ae,
|
|
@@ -4242,7 +4244,7 @@ var Oo = "_1f3ynb50", ko = "_1f3ynb54", Ao = "_1f3ynb55", jo = (e, t) => e?.sect
|
|
|
4242
4244
|
let ue;
|
|
4243
4245
|
t[46] === Symbol.for("react.memo_cache_sentinel") ? (ue = /* @__PURE__ */ X(Ba, {}), t[46] = ue) : ue = t[46];
|
|
4244
4246
|
let de = y?.label || "Details", fe;
|
|
4245
|
-
t[47] === de ? fe = t[48] : (fe = /* @__PURE__ */ X(
|
|
4247
|
+
t[47] === de ? fe = t[48] : (fe = /* @__PURE__ */ X(ro, { children: /* @__PURE__ */ X("span", { children: de }) }), t[47] = de, t[48] = fe);
|
|
4246
4248
|
let pe;
|
|
4247
4249
|
t[49] !== y?.fields || t[50] !== h || t[51] !== u || t[52] !== m ? (pe = y?.fields?.map((e) => e && !e.hidden ? /* @__PURE__ */ X(Bi, {
|
|
4248
4250
|
field: e,
|
|
@@ -4321,7 +4323,7 @@ var Lo = (e) => {
|
|
|
4321
4323
|
let s;
|
|
4322
4324
|
t[5] === n ? s = t[6] : (s = /* @__PURE__ */ X(A, {
|
|
4323
4325
|
fallback: o,
|
|
4324
|
-
children: X(n === "single-field" ? vo : n === "steps" ? Mo : n === "steps-2" ? To :
|
|
4326
|
+
children: X(n === "single-field" ? vo : n === "steps" ? Mo : n === "steps-2" ? To : so, {})
|
|
4325
4327
|
}), t[5] = n, t[6] = s);
|
|
4326
4328
|
let c;
|
|
4327
4329
|
return t[7] !== a || t[8] !== n || t[9] !== r || t[10] !== s ? (c = /* @__PURE__ */ X(oa, {
|
|
@@ -4384,7 +4386,7 @@ var Bo = (e) => e && typeof e == "object" && "_id" in e ? e._id : e, Vo = (e) =>
|
|
|
4384
4386
|
} catch {
|
|
4385
4387
|
return !0;
|
|
4386
4388
|
}
|
|
4387
|
-
}, Uo = (e) => e ? { headers: { Origin: e } } : {}, Wo = "_165z1im3", Go = "_165z1im4", Ko = M(() => import("./BillingStep-
|
|
4389
|
+
}, Uo = (e) => e ? { headers: { Origin: e } } : {}, Wo = "_165z1im3", Go = "_165z1im4", Ko = M(() => import("./BillingStep-OT3ayt8x.js").then((e) => ({ default: e.BillingStep }))), qo = M(() => import("./BookingCard-mqroL-wV.js").then((e) => ({ default: e.BookingCard }))), Jo = "We couldn't start your booking. Please try again.", Yo = ({ hiddenFields: e, fetchedSchema: t, isLoading: n, enableVerification: r = !0, workspace_id: i, workspace_name: a, onBookingComplete: o, onSuccess: s, ...c }) => {
|
|
4388
4390
|
let { fetch: l, collection: u, logger: d } = f(), [p, m] = R({ name: "form" }), [h, g] = R(null), [_, v] = R(null), y = I(() => t ? Xi(t, e) : null, [t, e]), b = y?.settings?.booking_config ?? {}, x = async (e) => {
|
|
4389
4391
|
let t = e?.meta?.booking_config;
|
|
4390
4392
|
if (t?.enabled && e?.response?._id && await Ho({
|
|
@@ -311,7 +311,7 @@ var he = /* @__PURE__ */ e({
|
|
|
311
311
|
}), Q = async (e, t) => {
|
|
312
312
|
let n = {};
|
|
313
313
|
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 ?? [];
|
|
314
|
-
}, ge = a(() => import("./PopupRenderer-BVtV4b9I-
|
|
314
|
+
}, ge = a(() => import("./PopupRenderer-BVtV4b9I-Z7QWR6y6.js").then((e) => e.t).then((e) => ({ default: e.PopupRenderer }))), _e = (e) => {
|
|
315
315
|
let n = r(9), { siteId: a, pageId: o } = e, { fetch: u, logger: p } = t(), [m, h] = l(null), g = c(!1), _, v;
|
|
316
316
|
if (n[0] !== u || n[1] !== p || n[2] !== a ? (_ = () => {
|
|
317
317
|
if (g.current) return;
|