@levo-so/site-runtime 0.3.26 → 0.3.28

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.
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { s as e } from "./dist-B_29IiED.js";
2
+ import { s as e } from "./dist-ZKuRfAWn.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-B_29IiED.js";
2
+ import { c as e, r as t } from "./dist-ZKuRfAWn.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-OT3ayt8x.js";
5
+ import { BillingStep as i } from "./BillingStep-CzrxHzkA.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,33 @@
1
1
  # @levo-so/site-runtime
2
2
 
3
+ ## 0.3.28
4
+
5
+ ### Patch Changes
6
+
7
+ - Collection field public visibility flags synced with backend architecture
8
+ - @levo-so/core@0.3.28
9
+ - @levo-so/insights@0.3.28
10
+
11
+ ## 0.3.27
12
+
13
+ ### Patch Changes
14
+
15
+ - Event registration suggests the event's public coupons and applies the best one on its own. It works in both the one-ticket sheet and the multi-ticket cart, and needs no new props or backend change: it uses the existing public-coupon list and coupon validation. **A visible change on every site that sells paid tickets.** Nothing to change in site code.
16
+
17
+ - **The best public coupon applies on its own once the server accepts it.** "Finding your best offer…" holds its place while it validates, then a green banner shows the code and the saving. A failed auto-apply stays silent and leaves the price as it was.
18
+ - **The other public coupons the order qualifies for show as cards with their saving worked out**, e.g. "Save ₹300 · 10% off, up to ₹300". With nothing applied, the top card is marked "Best". Once a coupon is applied, the rest fold under "N more offers", and "Switch" moves to one of them.
19
+ - **Only coupons the order qualifies for are offered.** Archived, not-yet-started, expired and fully redeemed coupons are left out, as are coupons whose minimum order is not met and coupons that cover none of the chosen tickets. Offers are ranked by estimated saving, capped at the coupon's maximum discount. The applied banner always shows the server's figure, not the estimate.
20
+ - **Typing a code still works**, under "Have a code?", or "Have a different code?" once a coupon is applied. It is the only way to use a private code. A code that fails shows an inline error and leaves the applied coupon in place. Codes are upper-cased before they are checked.
21
+ - **The attendee's choice wins.** A code the attendee types or picks is never replaced by the best offer, even when the best offer is still loading or their own code fails. Removing the auto-applied coupon keeps it removed; a coupon is applied again only when the tickets change.
22
+ - In the multi-ticket cart, a coupon is applied only on the review step, the first point where the price is on screen.
23
+
24
+ Fixed:
25
+
26
+ - A booking now sends only a code the server has accepted. Before, a code typed into the field but never applied was sent with the booking.
27
+ - On the one-ticket sheet, a coupon that takes the price to zero no longer hides the order summary and coupon field, so the attendee can still see and remove it.
28
+ - @levo-so/core@0.3.27
29
+ - @levo-so/insights@0.3.27
30
+
3
31
  ## 0.3.26
4
32
 
5
33
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { h as e, p as t, s as n } from "./dist-B_29IiED.js";
1
+ import { h as e, p as t, s as n } from "./dist-ZKuRfAWn.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-B_29IiED.js";
2
+ import { h as e, o as t, p as ee, s as n } from "./dist-ZKuRfAWn.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-DzVJh1br.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-niDho4kU.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-B_29IiED.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormBuilder }))), re = N({ baseSpacing: ".625rem" }), ie = { style: f({ form: { gap: "1rem" } }) }, ae = {
62
+ }, $ = /* @__PURE__ */ u({ PopupBody: () => oe }), ne = F(() => import("./dist-ZKuRfAWn.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-DTszGV-P.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-DZ9NFwK3.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-BaxCgy8c.js").then((e) => e.n).then((e) => ({ default: e.PopupBody }))), le = (e) => {
174
+ }, ce = b(() => import("./PopupBody-DWM55Zh5-Cy9rnVZv.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-DzVJh1br.js";
1
+ import { c as e, r as t, s as n, t as r, u as i } from "./PopupDialog-DwAAJ8JS-niDho4kU.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-DTszGV-P.js";
3
+ import { d as s, l as c, r as l, u } from "./dist-DZ9NFwK3.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-B_29IiED.js";
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-ZKuRfAWn.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-B_29IiED.js";
2
+ import { i as e } from "./dist-ZKuRfAWn.js";
3
3
  import { a as t, t as n } from "./inlineBaseTheme-DcNdMEYp.js";
4
- import { t as r } from "./dist-DTszGV-P.js";
4
+ import { t as r } from "./dist-DZ9NFwK3.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";
@@ -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-Z7QWR6y6.js").then((e) => e.t).then((e) => ({ default: e.PopupRenderer }))), _e = (e) => {
314
+ }, ge = a(() => import("./PopupRenderer-BVtV4b9I-S7vK9JNa.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;
@@ -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-DcsuQf6T.js")), Fi = M(() => import("./PhoneWidget-DbhgbvKH.js")), Ii = M(() => import("./RichTextWidget-B_olC979.js")), Li = {
2641
+ }, Pi = M(() => import("./DateTimeWidget-B7p-A0FY.js")), Fi = M(() => import("./PhoneWidget-Rh1eP4pP.js")), Ii = M(() => import("./RichTextWidget-ClgWi7ZW.js")), Li = {
2642
2642
  TextWidget: $((e) => /* @__PURE__ */ X($r, { ...e })),
2643
2643
  NumberWidget: $((e) => /* @__PURE__ */ X($r, {
2644
2644
  type: "number",
@@ -2870,7 +2870,7 @@ var Ui = ((e) => (t) => t ? Hi(e, t) : e)({
2870
2870
  }), t[23] = p, t[24] = h, t[25] = i, t[26] = a, t[27] = o, t[28] = v, t[29] = y) : y = t[29], y;
2871
2871
  }, Yi = (e, t) => e?.map((e) => ({
2872
2872
  ...e,
2873
- hidden: e.hidden || t.includes(e.key) || t.includes(e.id) || e.allow_public_view === !1 || e.allow_public_submit === !1,
2873
+ hidden: e.hidden || t.includes(e.key) || t.includes(e.id) || e.allow_public_submit === !1,
2874
2874
  fields: Yi(e.fields, t)
2875
2875
  })), Xi = (e, t = []) => ({
2876
2876
  ...e,
@@ -4386,7 +4386,7 @@ var Bo = (e) => e && typeof e == "object" && "_id" in e ? e._id : e, Vo = (e) =>
4386
4386
  } catch {
4387
4387
  return !0;
4388
4388
  }
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 }) => {
4389
+ }, Uo = (e) => e ? { headers: { Origin: e } } : {}, Wo = "_165z1im3", Go = "_165z1im4", Ko = M(() => import("./BillingStep-CzrxHzkA.js").then((e) => ({ default: e.BillingStep }))), qo = M(() => import("./BookingCard-DOHYKI_6.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 }) => {
4390
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) => {
4391
4391
  let t = e?.meta?.booking_config;
4392
4392
  if (t?.enabled && e?.response?._id && await Ho({