@wix/bookings 1.0.1776 → 1.0.1778
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/build/cjs/context-booking-checkout.d.ts +243 -108
- package/build/cjs/context-booking-checkout.js +177 -183
- package/build/cjs/context-booking-checkout.js.map +1 -1
- package/build/cjs/context-categories.d.ts +16 -143
- package/build/cjs/context-categories.js +412 -412
- package/build/cjs/context-categories.js.map +1 -1
- package/build/cjs/context-locations.d.ts +16 -287
- package/build/cjs/context-locations.js +336 -336
- package/build/cjs/context-locations.js.map +1 -1
- package/build/cjs/context-service-addons.d.ts +2 -2
- package/build/cjs/context-service-addons.js +1 -1
- package/build/cjs/context-service-addons.js.map +1 -1
- package/build/cjs/context-service.d.ts +71 -33
- package/build/cjs/context-service.js +98 -96
- package/build/cjs/context-service.js.map +1 -1
- package/build/cjs/context-services.js +1 -1
- package/build/cjs/context-services.js.map +1 -1
- package/build/cjs/context-time-slots.d.ts +10 -0
- package/build/cjs/context-time-slots.js +2 -2
- package/build/cjs/context-time-slots.js.map +1 -1
- package/build/es/context-booking-checkout.d.mts +243 -108
- package/build/es/context-booking-checkout.mjs +177 -180
- package/build/es/context-booking-checkout.mjs.map +1 -1
- package/build/es/context-categories.d.mts +16 -143
- package/build/es/context-categories.mjs +412 -412
- package/build/es/context-categories.mjs.map +1 -1
- package/build/es/context-locations.d.mts +16 -287
- package/build/es/context-locations.mjs +336 -336
- package/build/es/context-locations.mjs.map +1 -1
- package/build/es/context-service-addons.d.mts +2 -2
- package/build/es/context-service-addons.mjs +1 -1
- package/build/es/context-service-addons.mjs.map +1 -1
- package/build/es/context-service.d.mts +71 -33
- package/build/es/context-service.mjs +98 -96
- package/build/es/context-service.mjs.map +1 -1
- package/build/es/context-services.mjs +1 -1
- package/build/es/context-services.mjs.map +1 -1
- package/build/es/context-time-slots.d.mts +10 -0
- package/build/es/context-time-slots.mjs +2 -2
- package/build/es/context-time-slots.mjs.map +1 -1
- package/build/internal/cjs/context-booking-checkout.d.ts +243 -108
- package/build/internal/cjs/context-categories.d.ts +16 -143
- package/build/internal/cjs/context-locations.d.ts +16 -287
- package/build/internal/cjs/context-service-addons.d.ts +2 -2
- package/build/internal/cjs/context-service.d.ts +71 -33
- package/build/internal/cjs/context-time-slots.d.ts +10 -0
- package/build/internal/es/context-booking-checkout.d.mts +243 -108
- package/build/internal/es/context-categories.d.mts +16 -143
- package/build/internal/es/context-locations.d.mts +16 -287
- package/build/internal/es/context-service-addons.d.mts +2 -2
- package/build/internal/es/context-service.d.mts +71 -33
- package/build/internal/es/context-time-slots.d.mts +10 -0
- package/{_sdk-exports → context-runtime}/context-booking-checkout/runtime.d.ts +243 -108
- package/context-runtime/context-booking-checkout/runtime.js +3 -0
- package/{_sdk-exports → context-runtime}/context-categories/runtime.d.ts +16 -143
- package/context-runtime/context-categories/runtime.js +2 -0
- package/context-runtime/context-locations/runtime.d.ts +195 -0
- package/context-runtime/context-locations/runtime.js +2 -0
- package/{_sdk-exports → context-runtime}/context-service/runtime.d.ts +71 -33
- package/{_sdk-exports → context-runtime}/context-service/runtime.js +3 -3
- package/{_sdk-exports → context-runtime}/context-service-addons/runtime.d.ts +2 -2
- package/{_sdk-exports → context-runtime}/context-time-slots/runtime.d.ts +10 -0
- package/{_sdk-exports → context-runtime}/context-time-slots/runtime.js +2 -2
- package/package.json +8 -8
- package/_sdk-exports/context-booking-checkout/runtime.js +0 -3
- package/_sdk-exports/context-categories/runtime.js +0 -2
- package/_sdk-exports/context-locations/runtime.d.ts +0 -466
- package/_sdk-exports/context-locations/runtime.js +0 -2
- /package/{_sdk-exports → context-runtime}/context-service-addons/runtime.js +0 -0
- /package/{_sdk-exports → context-runtime}/context-services/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-services/runtime.js +0 -0
|
@@ -481,6 +481,16 @@ interface TimeSlotItem {
|
|
|
481
481
|
readonly slotEndTime: string | null;
|
|
482
482
|
/** Whether the visitor can book the time slot. */
|
|
483
483
|
readonly bookable: boolean;
|
|
484
|
+
/**
|
|
485
|
+
* Whether booking for the time slot hasn't opened yet, under the business's booking policy
|
|
486
|
+
* (it books too far ahead).
|
|
487
|
+
*/
|
|
488
|
+
readonly tooEarlyToBook: boolean;
|
|
489
|
+
/**
|
|
490
|
+
* Whether booking for the time slot has closed, under the business's booking policy (it starts
|
|
491
|
+
* too soon).
|
|
492
|
+
*/
|
|
493
|
+
readonly tooLateToBook: boolean;
|
|
484
494
|
/** Total number of spots in the time slot. `null` when it's unknown. */
|
|
485
495
|
readonly totalCapacity: number | null;
|
|
486
496
|
/** Number of spots left in the time slot. `null` when it's unknown. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// context-runtime/context-time-slots/runtime.js
|
|
2
2
|
import { Component as e, Suspense as t, createContext as n, useCallback as r, useContext as i, useEffect as a, useMemo as o, useRef as s, useState as c, useSyncExternalStore as l } from "react";
|
|
3
3
|
import { useServiceContext as u } from "@wix/bookings/context/service";
|
|
4
4
|
import { useGetService as d, useService as f } from "@wix/services-manager-react";
|
|
@@ -2593,7 +2593,7 @@ function xl({ rows: e2, slotIdOf: t2 }, n2) {
|
|
|
2593
2593
|
return [...e2.filter((e3) => t2(e3) === n2)].sort((e3, t3) => Dl(t3) - Dl(e3))[0] ?? null;
|
|
2594
2594
|
}
|
|
2595
2595
|
function Sl(e2, t2, n2, r2) {
|
|
2596
|
-
return { slotId: n2(e2), slotStartTime: e2.localStartDate ?? null, slotEndTime: e2.localEndDate ?? null, bookable: e2.bookable ?? false, totalCapacity: e2.totalCapacity ?? null, remainingCapacity: e2.remainingCapacity ?? null, bookableCapacity: e2.bookableCapacity ?? null, eventId: e2.eventInfo?.eventId ?? null, eventTitle: e2.eventInfo?.eventTitle ?? null, waitlistCapacity: e2.eventInfo?.waitingList?.remainingCapacity ?? null, locationId: e2.location?._id ?? null, locationName: e2.location?.name || e2.location?.formattedAddress || null, durationMinutes: El(e2, t2), isAllDay: e2.allDay ?? false, staff: r2 ? [] : Cl(e2) };
|
|
2596
|
+
return { slotId: n2(e2), slotStartTime: e2.localStartDate ?? null, slotEndTime: e2.localEndDate ?? null, bookable: e2.bookable ?? false, tooEarlyToBook: e2.bookingPolicyViolations?.tooEarlyToBook ?? false, tooLateToBook: e2.bookingPolicyViolations?.tooLateToBook ?? false, totalCapacity: e2.totalCapacity ?? null, remainingCapacity: e2.remainingCapacity ?? null, bookableCapacity: e2.bookableCapacity ?? null, eventId: e2.eventInfo?.eventId ?? null, eventTitle: e2.eventInfo?.eventTitle ?? null, waitlistCapacity: e2.eventInfo?.waitingList?.remainingCapacity ?? null, locationId: e2.location?._id ?? null, locationName: e2.location?.name || e2.location?.formattedAddress || null, durationMinutes: El(e2, t2), isAllDay: e2.allDay ?? false, staff: r2 ? [] : Cl(e2) };
|
|
2597
2597
|
}
|
|
2598
2598
|
function Cl(e2) {
|
|
2599
2599
|
let t2 = /* @__PURE__ */ new Map();
|