@levo-so/studio 0.2.2 → 0.2.3
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/index.js +27 -24
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -10300,8 +10300,8 @@ var Cd = async (e, t, n) => {
|
|
|
10300
10300
|
console.log(e);
|
|
10301
10301
|
}
|
|
10302
10302
|
}, wd = ({ eventID: e, title: t, external: n, buttonText: r = "Register Now" }) => {
|
|
10303
|
-
let i = N(), [a, o] = B([]), [s, c] = B(!0), { isOpen: l, onOpen: u, onClose: d } = Sd(), [f, p] = B(!1), [m, h] = B(null), [g, _] = B(void 0), [v, y] = B(""), [b, x] = B(null), [S,
|
|
10304
|
-
x(null), _(void 0),
|
|
10303
|
+
let i = N(), [a, o] = B([]), [s, c] = B(!0), { isOpen: l, onOpen: u, onClose: d } = Sd(), [f, p] = B(!1), [m, h] = B(null), [g, _] = B(void 0), [v, y] = B(""), [b, x] = B(null), [S, w] = B(!1), [T, E] = B(null), [ee, D] = B(!1), [O, te] = B(1), [ne, re] = B(null), [ie, ae] = B([]), { workspace: j } = k(), oe = z(null), se = () => {
|
|
10304
|
+
x(null), _(void 0), E(null), w(!1), y(""), re(null), d(), te(1), Oe();
|
|
10305
10305
|
}, { Razorpay: ce } = Zn(), { stripePromise: le, config: ue, isOpen: de, openStripeCheckout: fe, closeStripeCheckout: pe, setOnComplete: ge } = me(), _e = () => {
|
|
10306
10306
|
let e = oe.current;
|
|
10307
10307
|
e && i?.fetch?.url(`/v1/event/booking/${e.bookingId}/confirm-booking`)?.options({ headers: { Origin: j?.id || "" } })?.post({ session_id: e.sessionId })?.json().then((e) => {
|
|
@@ -10390,7 +10390,7 @@ var Cd = async (e, t, n) => {
|
|
|
10390
10390
|
}
|
|
10391
10391
|
}, xe = async (t) => {
|
|
10392
10392
|
let n = t ?? v;
|
|
10393
|
-
|
|
10393
|
+
w(!0), E(null);
|
|
10394
10394
|
try {
|
|
10395
10395
|
let t = await i?.fetch?.url(`/v1/event/event/${e}/coupon/validate-coupon-code`)?.options({ headers: { Origin: j?.id || "" } })?.post({
|
|
10396
10396
|
coupon: n,
|
|
@@ -10401,16 +10401,16 @@ var Cd = async (e, t, n) => {
|
|
|
10401
10401
|
ticket: m?._id
|
|
10402
10402
|
}]
|
|
10403
10403
|
}).json();
|
|
10404
|
-
t.status && (x(t.content.data), y(n)),
|
|
10404
|
+
t.status && (x(t.content.data), y(n)), D(!1), w(!1);
|
|
10405
10405
|
} catch (e) {
|
|
10406
|
-
|
|
10406
|
+
E(W(e).message), w(!1);
|
|
10407
10407
|
}
|
|
10408
10408
|
}, Se = (e) => {
|
|
10409
|
-
y(""), x(null),
|
|
10409
|
+
y(""), x(null), E(null), w(!1), re(null), h(e);
|
|
10410
10410
|
}, Ce = () => {
|
|
10411
|
-
x(null),
|
|
10411
|
+
x(null), E(null), y("");
|
|
10412
10412
|
}, we = () => {
|
|
10413
|
-
|
|
10413
|
+
E(null), w(!1), y(""), D(!1);
|
|
10414
10414
|
};
|
|
10415
10415
|
L(() => {
|
|
10416
10416
|
if (n) {
|
|
@@ -10451,29 +10451,32 @@ var Cd = async (e, t, n) => {
|
|
|
10451
10451
|
let { name: t, value: n, type: r, checked: i } = e.target;
|
|
10452
10452
|
r === "checkbox" ? P(t, i) : P(t, n);
|
|
10453
10453
|
};
|
|
10454
|
-
if (n) return /* @__PURE__ */ H(
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
|
|
10454
|
+
if (n) return /* @__PURE__ */ H(oc, {
|
|
10455
|
+
elementKey: "register_container",
|
|
10456
|
+
className: "my-2 w-fit",
|
|
10457
|
+
children: /* @__PURE__ */ H(C, {
|
|
10458
|
+
elementKey: "register_button",
|
|
10458
10459
|
className: "rounded-lg px-4 py-3 font-semibold",
|
|
10459
10460
|
onClick: () => window.open(n, "_blank", "noopener,noreferrer"),
|
|
10460
10461
|
children: r
|
|
10461
10462
|
})
|
|
10462
10463
|
});
|
|
10463
|
-
if (s) return /* @__PURE__ */ H(
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
|
|
10464
|
+
if (s) return /* @__PURE__ */ H(oc, {
|
|
10465
|
+
elementKey: "register_container",
|
|
10466
|
+
className: "my-2 w-fit",
|
|
10467
|
+
children: /* @__PURE__ */ H(C, {
|
|
10468
|
+
elementKey: "register_button",
|
|
10467
10469
|
className: "rounded-lg px-4 py-2 font-bold",
|
|
10468
10470
|
children: "Loading..."
|
|
10469
10471
|
})
|
|
10470
10472
|
});
|
|
10471
10473
|
let Ae = b?.sale_amount === 0 || m?.unit_amount === 0 ? "Complete Registration" : "Pay";
|
|
10472
10474
|
return /* @__PURE__ */ U(V, { children: [
|
|
10473
|
-
/* @__PURE__ */ H(
|
|
10475
|
+
/* @__PURE__ */ H(oc, {
|
|
10476
|
+
elementKey: "register_container",
|
|
10474
10477
|
className: "my-2",
|
|
10475
|
-
children: a?.length ? /* @__PURE__ */ H(
|
|
10476
|
-
elementKey: "",
|
|
10478
|
+
children: a?.length ? /* @__PURE__ */ H(C, {
|
|
10479
|
+
elementKey: "register_button",
|
|
10477
10480
|
onClick: u,
|
|
10478
10481
|
className: "rounded-lg px-4 py-3 font-semibold",
|
|
10479
10482
|
children: r
|
|
@@ -10485,9 +10488,9 @@ var Cd = async (e, t, n) => {
|
|
|
10485
10488
|
/* @__PURE__ */ H(Rn.Root, { children: l && /* @__PURE__ */ H("div", {
|
|
10486
10489
|
className: "fixed inset-0 z-100 flex justify-center bg-black/50 pt-24",
|
|
10487
10490
|
children: /* @__PURE__ */ U("div", {
|
|
10488
|
-
className: A("flex h-fit max-w-[90%] flex-col rounded-lg bg-white p-4 md:w-[40%]",
|
|
10491
|
+
className: A("flex h-fit max-w-[90%] flex-col rounded-lg bg-white p-4 md:w-[40%]", ee ? "md:max-w-[30%]" : "md:max-w-[40%]"),
|
|
10489
10492
|
children: [/* @__PURE__ */ U("div", {
|
|
10490
|
-
className: `mb-4 flex w-full items-start justify-between ${
|
|
10493
|
+
className: `mb-4 flex w-full items-start justify-between ${ee ? "" : "pb-[6px]"} `,
|
|
10491
10494
|
children: [/* @__PURE__ */ U("h2", {
|
|
10492
10495
|
className: "font-semibold text-lg",
|
|
10493
10496
|
children: [
|
|
@@ -10504,10 +10507,10 @@ var Cd = async (e, t, n) => {
|
|
|
10504
10507
|
}), /* @__PURE__ */ U("div", { children: [ne && /* @__PURE__ */ H("div", {
|
|
10505
10508
|
className: "mb-4 rounded-md bg-red-50 p-3 text-red-600 text-sm",
|
|
10506
10509
|
children: ne
|
|
10507
|
-
}), O === 1 ? /* @__PURE__ */ H("div", { children:
|
|
10510
|
+
}), O === 1 ? /* @__PURE__ */ H("div", { children: ee ? /* @__PURE__ */ H(yd, {
|
|
10508
10511
|
couponCode: v,
|
|
10509
10512
|
onCouponCodeChange: y,
|
|
10510
|
-
couponError:
|
|
10513
|
+
couponError: T,
|
|
10511
10514
|
couponLoading: S,
|
|
10512
10515
|
onValidateCoupon: xe,
|
|
10513
10516
|
publicCoupons: ie,
|
|
@@ -10520,7 +10523,7 @@ var Cd = async (e, t, n) => {
|
|
|
10520
10523
|
discount: b,
|
|
10521
10524
|
couponCode: v,
|
|
10522
10525
|
publicCouponsCount: ie.length,
|
|
10523
|
-
onApplyCouponClick: () =>
|
|
10526
|
+
onApplyCouponClick: () => D(!0),
|
|
10524
10527
|
onRemoveCoupon: Ce,
|
|
10525
10528
|
onNext: () => te(2)
|
|
10526
10529
|
}) }) : /* @__PURE__ */ H(pd, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levo-so/studio",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"author": "Levo Engineering <devs@theinternetfolks.com>",
|
|
5
5
|
"description": "Levo Studio components and utilities for building block-based pages",
|
|
6
6
|
"type": "module",
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
"react": ">=19",
|
|
120
120
|
"next": ">=14",
|
|
121
121
|
"react-dom": ">=19",
|
|
122
|
+
"@levo-so/insights": "0.2.1",
|
|
122
123
|
"@levo-so/core": "0.2.1",
|
|
123
|
-
"@levo-so/react": "0.2.1"
|
|
124
|
-
"@levo-so/insights": "0.2.1"
|
|
124
|
+
"@levo-so/react": "0.2.1"
|
|
125
125
|
}
|
|
126
126
|
}
|