@bowlos/reservations 0.19.0 → 0.21.0
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/HEADLESS.md +331 -6
- package/README.md +23 -10
- package/dist/{catalog-Dgapnrdm.d.ts → catalog-BuafmB8y.d.cts} +67 -2
- package/dist/{catalog-Db8EdzJ2.d.cts → catalog-bpCn9klL.d.ts} +67 -2
- package/dist/{chunk-BPLYLQO3.js → chunk-FV6SROO2.js} +31 -4
- package/dist/chunk-FV6SROO2.js.map +1 -0
- package/dist/{chunk-FWPXQII5.js → chunk-S5T4OCBY.js} +61 -3
- package/dist/chunk-S5T4OCBY.js.map +1 -0
- package/dist/components.cjs +11 -6
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.cts +10 -4
- package/dist/components.d.ts +10 -4
- package/dist/components.js +11 -6
- package/dist/components.js.map +1 -1
- package/dist/{data-DevEKBmK.d.cts → data-BKlgn8Ln.d.cts} +174 -1
- package/dist/{data-DevEKBmK.d.ts → data-BKlgn8Ln.d.ts} +174 -1
- package/dist/index.cjs +86 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +18 -3
- package/dist/index.js.map +1 -1
- package/dist/payments.d.cts +1 -1
- package/dist/payments.d.ts +1 -1
- package/dist/{react-BgP6rtBS.d.ts → react-BI2RKM5p.d.ts} +1 -1
- package/dist/{react-D73ZxxDw.d.cts → react-D2mBw_-l.d.cts} +1 -1
- package/dist/react.cjs +173 -0
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +77 -5
- package/dist/react.d.ts +77 -5
- package/dist/react.js +102 -4
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
- package/templates/center-site/package.json +1 -1
- package/dist/chunk-BPLYLQO3.js.map +0 -1
- package/dist/chunk-FWPXQII5.js.map +0 -1
package/dist/components.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { c as UseAccountResult } from './react-
|
|
3
|
+
import { U as PricingMode, S as PaymentIntentInfo, l as Customer } from './data-BKlgn8Ln.cjs';
|
|
4
|
+
import { c as UseAccountResult } from './react-D2mBw_-l.cjs';
|
|
5
5
|
import './errors-IIK7xibp.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -435,9 +435,14 @@ type CatalogOffer = {
|
|
|
435
435
|
} | {
|
|
436
436
|
kind: "event";
|
|
437
437
|
id: string;
|
|
438
|
+
slug: string;
|
|
438
439
|
name: string;
|
|
439
440
|
date: string;
|
|
440
441
|
description: string | null;
|
|
442
|
+
purchaseMode: "reservation" | "ticket";
|
|
443
|
+
productId: string | null;
|
|
444
|
+
pricePlanId: string | null;
|
|
445
|
+
priceCents: number | null;
|
|
441
446
|
} | {
|
|
442
447
|
kind: "package";
|
|
443
448
|
id: string;
|
|
@@ -477,8 +482,9 @@ interface BookingCatalogProps {
|
|
|
477
482
|
centerId: string;
|
|
478
483
|
/**
|
|
479
484
|
* Called when a customer picks an offer. Route by `offer.kind`: a `product`
|
|
480
|
-
*
|
|
481
|
-
*
|
|
485
|
+
* → your `<BookingFlow>`; an `event` → its landing page (`offer.slug`) or,
|
|
486
|
+
* for reservation-mode events, your booking flow with the event date/window
|
|
487
|
+
* preset; a `package` / `membership` / `gamecard` → its buy page.
|
|
482
488
|
*/
|
|
483
489
|
onSelect: (offer: CatalogOffer) => void;
|
|
484
490
|
labels?: Partial<BookingCatalogLabels>;
|
package/dist/components.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { c as UseAccountResult } from './react-
|
|
3
|
+
import { U as PricingMode, S as PaymentIntentInfo, l as Customer } from './data-BKlgn8Ln.js';
|
|
4
|
+
import { c as UseAccountResult } from './react-BI2RKM5p.js';
|
|
5
5
|
import './errors-IIK7xibp.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -435,9 +435,14 @@ type CatalogOffer = {
|
|
|
435
435
|
} | {
|
|
436
436
|
kind: "event";
|
|
437
437
|
id: string;
|
|
438
|
+
slug: string;
|
|
438
439
|
name: string;
|
|
439
440
|
date: string;
|
|
440
441
|
description: string | null;
|
|
442
|
+
purchaseMode: "reservation" | "ticket";
|
|
443
|
+
productId: string | null;
|
|
444
|
+
pricePlanId: string | null;
|
|
445
|
+
priceCents: number | null;
|
|
441
446
|
} | {
|
|
442
447
|
kind: "package";
|
|
443
448
|
id: string;
|
|
@@ -477,8 +482,9 @@ interface BookingCatalogProps {
|
|
|
477
482
|
centerId: string;
|
|
478
483
|
/**
|
|
479
484
|
* Called when a customer picks an offer. Route by `offer.kind`: a `product`
|
|
480
|
-
*
|
|
481
|
-
*
|
|
485
|
+
* → your `<BookingFlow>`; an `event` → its landing page (`offer.slug`) or,
|
|
486
|
+
* for reservation-mode events, your booking flow with the event date/window
|
|
487
|
+
* preset; a `package` / `membership` / `gamecard` → its buy page.
|
|
482
488
|
*/
|
|
483
489
|
onSelect: (offer: CatalogOffer) => void;
|
|
484
490
|
labels?: Partial<BookingCatalogLabels>;
|
package/dist/components.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useAccount, useAvailability, useBookingPreview, useAddons, useStartTimes, useBookingFlow, useMyReservations, useMyMemberships, useMyLoyalty, useMyCredits, useMyPasses, useFlashSale, useFlashSales, useProducts,
|
|
2
|
-
import { availableUnitCount } from './chunk-
|
|
1
|
+
import { useAccount, useAvailability, useBookingPreview, useAddons, useStartTimes, useBookingFlow, useMyReservations, useMyMemberships, useMyLoyalty, useMyCredits, useMyPasses, useFlashSale, useFlashSales, useProducts, useEventOffers, usePackages, usePublicMemberships, useGameCards } from './chunk-FV6SROO2.js';
|
|
2
|
+
import { availableUnitCount } from './chunk-S5T4OCBY.js';
|
|
3
3
|
import { styles, formatCents, formatMinuteLabel, token, minutesToTime, useCountdown, formatCentsRange } from './chunk-Y3YSDO3H.js';
|
|
4
4
|
export { BOWLOS_DEFAULT_THEME, BowlosTheme, formatCents, formatCentsRange } from './chunk-Y3YSDO3H.js';
|
|
5
5
|
import { useState, useEffect, useMemo, useRef } from 'react';
|
|
@@ -841,7 +841,7 @@ function BookingCatalog({ brandId, centerId, onSelect, labels, className }) {
|
|
|
841
841
|
const t = { ...DEFAULT_LABELS7, ...labels };
|
|
842
842
|
const s = styles();
|
|
843
843
|
const products = useProducts({ centerId });
|
|
844
|
-
const events =
|
|
844
|
+
const events = useEventOffers({ centerId });
|
|
845
845
|
const packages = usePackages({ brandId, centerId });
|
|
846
846
|
const memberships = usePublicMemberships({ centerId });
|
|
847
847
|
const gameCards = useGameCards({ brandId, centerId });
|
|
@@ -853,9 +853,14 @@ function BookingCatalog({ brandId, centerId, onSelect, labels, className }) {
|
|
|
853
853
|
const eventOffers = (events.data ?? []).map((e) => ({
|
|
854
854
|
kind: "event",
|
|
855
855
|
id: e.id,
|
|
856
|
-
|
|
856
|
+
slug: e.slug,
|
|
857
|
+
name: e.title,
|
|
857
858
|
date: e.date,
|
|
858
|
-
description: e.description
|
|
859
|
+
description: e.subtitle ?? e.description,
|
|
860
|
+
purchaseMode: e.purchaseMode,
|
|
861
|
+
productId: e.productId,
|
|
862
|
+
pricePlanId: e.pricePlanId,
|
|
863
|
+
priceCents: e.priceCents
|
|
859
864
|
}));
|
|
860
865
|
const packageOffers = (packages.data ?? []).map((p) => ({
|
|
861
866
|
kind: "package",
|
|
@@ -913,7 +918,7 @@ function subtitle(offer, t) {
|
|
|
913
918
|
case "product":
|
|
914
919
|
return `${offer.attractionName} \xB7 ${offer.durationMinutes} ${t.minutesAbbrev}`;
|
|
915
920
|
case "event":
|
|
916
|
-
return offer.date;
|
|
921
|
+
return offer.priceCents !== null ? `${offer.date} \xB7 ${formatCents(offer.priceCents)}` : offer.date;
|
|
917
922
|
case "membership":
|
|
918
923
|
return `${formatCents(offer.priceCents)}${t.perMonth}`;
|
|
919
924
|
case "package":
|