@levo-so/studio 0.1.111 → 0.1.113

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 { t as e } from "./Button-DjphTnCg.js";
2
+ import { t as e } from "./Button-Uwxgkriw.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
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import "./Dialog-IrII0ugb.js";
3
- import { d as e, i as t, l as n, n as r, o as i, r as a, u as o } from "./PopupRenderer-Dd9zoNIY-Cx663DmW.js";
3
+ import { a as e, c as t, h as n, l as r, n as i, r as a, t as o } from "./PopupRenderer-Bncp54gB-DysCmUdR.js";
4
4
  import { n as s } from "./AuthProvider-C6bvedwF.js";
5
5
  import { n as c } from "./ModalManager-DQVNPEuG.js";
6
6
  import { c as l } from "react/compiler-runtime";
@@ -22,15 +22,15 @@ import se from "isomorphic-dompurify";
22
22
  var ce = async (e, t) => {
23
23
  let n = {};
24
24
  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 ?? [];
25
- }, le = _(() => import("./PopupRenderer-Dd9zoNIY-Cx663DmW.js").then((e) => e.s).then((e) => e.t).then((e) => ({ default: e.PopupRenderer }))), ue = (e) => {
26
- let t = l(9), { siteId: n, pageId: r } = e, { fetch: i, logger: a } = f(), [s, c] = S(null), d = x(!1), p, h;
27
- if (t[0] !== i || t[1] !== a || t[2] !== n ? (p = () => {
25
+ }, le = _(() => import("./PopupRenderer-Bncp54gB-DysCmUdR.js").then((e) => e.o).then((e) => e.t).then((e) => ({ default: e.PopupRenderer }))), ue = (e) => {
26
+ let t = l(9), { siteId: n, pageId: r } = e, { fetch: a, logger: o } = f(), [s, c] = S(null), d = x(!1), p, h;
27
+ if (t[0] !== a || t[1] !== o || t[2] !== n ? (p = () => {
28
28
  if (d.current) return;
29
29
  let e = () => {
30
- d.current || (d.current = !0, ce(i, n ? { site_id: n } : void 0).then((e) => {
31
- o(e), c(e);
30
+ d.current || (d.current = !0, ce(a, n ? { site_id: n } : void 0).then((e) => {
31
+ i(e), c(e);
32
32
  }).catch((e) => {
33
- a?.error("Failed to fetch popups", { exception: e }), o([]), c([]);
33
+ o?.error("Failed to fetch popups", { exception: e }), i([]), c([]);
34
34
  }).finally(de));
35
35
  };
36
36
  if (u.get()) {
@@ -42,10 +42,10 @@ var ce = async (e, t) => {
42
42
  });
43
43
  return () => t();
44
44
  }, h = [
45
- i,
46
45
  a,
46
+ o,
47
47
  n
48
- ], t[0] = i, t[1] = a, t[2] = n, t[3] = p, t[4] = h) : (p = t[3], h = t[4]), y(p, h), !s || s.length === 0) return null;
48
+ ], t[0] = a, t[1] = o, t[2] = n, t[3] = p, t[4] = h) : (p = t[3], h = t[4]), y(p, h), !s || s.length === 0) return null;
49
49
  let g;
50
50
  t[5] === Symbol.for("react.memo_cache_sentinel") ? (g = {
51
51
  position: "relative",
@@ -61,27 +61,27 @@ var ce = async (e, t) => {
61
61
  }), t[6] = r, t[7] = s, t[8] = _) : _ = t[8], _;
62
62
  };
63
63
  function de() {
64
- return n(!1);
64
+ return a(!1);
65
65
  }
66
66
  var D = () => {
67
- let e = l(3), n = E(a), r = E(t), i = fe, o = pe, s;
68
- return e[0] !== r || e[1] !== n ? (s = {
67
+ let e = l(3), n = E(t), i = E(r), a = fe, o = pe, s;
68
+ return e[0] !== i || e[1] !== n ? (s = {
69
69
  popups: n,
70
- isLoading: r,
71
- openPopup: i,
70
+ isLoading: i,
71
+ openPopup: a,
72
72
  closePopup: o
73
- }, e[0] = r, e[1] = n, e[2] = s) : s = e[2], s;
73
+ }, e[0] = i, e[1] = n, e[2] = s) : s = e[2], s;
74
74
  };
75
- function fe(e) {
76
- let t = a.get().find((t) => t.id === e);
77
- t && i(t, {
75
+ function fe(n) {
76
+ let r = t.get().find((e) => e.id === n);
77
+ r && e(r, {
78
78
  force: !0,
79
79
  trigger_type: "manual"
80
80
  });
81
81
  }
82
82
  function pe() {
83
- let t = r.get().active_popup_id;
84
- t && e(t);
83
+ let e = n.get().active_popup_id;
84
+ e && o(e);
85
85
  }
86
86
  //#endregion
87
87
  //#region src/utils/getKeysWithValue.ts
@@ -527,8 +527,7 @@ var O = (e, t) => {
527
527
  renderMode: t.renderMode,
528
528
  workspace_id: t.workspace_id,
529
529
  pageSource: t.pageSource,
530
- localizedPages: t.localizedPages,
531
- language: t.language
530
+ languageVariants: t.languageVariants
532
531
  }), [
533
532
  n,
534
533
  r,
@@ -539,19 +538,15 @@ var O = (e, t) => {
539
538
  t.renderMode,
540
539
  t.workspace_id,
541
540
  t.pageSource,
542
- t.localizedPages,
543
- t.language
541
+ t.languageVariants
544
542
  ]);
545
543
  return /* @__PURE__ */ w(z.Provider, {
546
544
  value: i,
547
545
  children: e
548
546
  });
549
547
  }, B = () => ee(z), Ue = () => {
550
- let { localizedPages: e, language: t } = B();
551
- return {
552
- localizedPages: e ?? [],
553
- currentLanguage: t
554
- };
548
+ let { languageVariants: e } = B();
549
+ return { languageVariants: e ?? [] };
555
550
  }, V = {
556
551
  opacity: 1,
557
552
  scale: 1,
@@ -1388,7 +1383,7 @@ var O = (e, t) => {
1388
1383
  ]
1389
1384
  }]
1390
1385
  }, Je = ({ children: e, ...t }) => {
1391
- let { isStudio: n } = B();
1386
+ let { isStudio: n, renderMode: r } = B();
1392
1387
  return n ? e : /* @__PURE__ */ w(oe, {
1393
1388
  ...t,
1394
1389
  children: e
@@ -1400,6 +1395,7 @@ var O = (e, t) => {
1400
1395
  return t ? /^([a-z][a-z0-9+.-]*:|\/\/)/.test(t) || t.startsWith("#") || t.startsWith("/") ? t : `https://${t}` : void 0;
1401
1396
  }
1402
1397
  case "page": return e.action.value;
1398
+ case "page_section": return e.action.value ? `#${e.action.value}` : void 0;
1403
1399
  case "email": return `mailto:${e.action.value}`;
1404
1400
  case "phone": return `tel:${e.action.value}`;
1405
1401
  default: return;
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./Button-lUfKisu8.js";
2
2
  import { t, u as n } from "./CollectionField-DrJuHNsg.js";
3
3
  import { t as ee } from "./CollectionInput-CG-Pu_51.js";
4
- import { a as r, i, n as a, r as o, t as s } from "./Popover-DnZY1k6o.js";
4
+ import { a as r, i, n as a, r as o, t as s } from "./Popover-C_IQMM8H.js";
5
5
  import { c as te } from "react/compiler-runtime";
6
6
  import { useEffect as ne, useRef as c, useState as l } from "react";
7
7
  import { jsx as u, jsxs as d } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { r as e } from "./dist-bHoi1bCB.js";
2
+ import { r as e } from "./dist-D-y51gmU.js";
3
3
  import { n as t } from "./AuthProvider-C6bvedwF.js";
4
4
  import { t as n } from "./card-D5fPArfa.js";
5
5
  import { t as r } from "./MessageFooter-CHuPnL_D.js";