@wix/bookings 1.0.1781 → 1.0.1783
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 +32 -0
- package/build/cjs/context-booking-checkout.js +2002 -1762
- package/build/cjs/context-booking-checkout.js.map +1 -1
- package/build/cjs/context-my-booking.d.ts +2832 -0
- package/build/cjs/context-my-booking.js +592 -0
- package/build/cjs/context-my-booking.js.map +1 -0
- package/build/cjs/context-my-bookings.d.ts +2862 -0
- package/build/cjs/context-my-bookings.js +12885 -0
- package/build/cjs/context-my-bookings.js.map +1 -0
- package/build/cjs/context-service-addons.d.ts +54 -3
- package/build/cjs/context-service-addons.js +1065 -578
- package/build/cjs/context-service-addons.js.map +1 -1
- package/build/cjs/context-service.d.ts +35 -24
- package/build/cjs/context-service.js +985 -966
- package/build/cjs/context-service.js.map +1 -1
- package/build/cjs/context-time-slots.d.ts +44 -98
- package/build/cjs/context-time-slots.js +456 -474
- package/build/cjs/context-time-slots.js.map +1 -1
- package/build/es/context-booking-checkout.d.mts +32 -0
- package/build/es/context-booking-checkout.mjs +2002 -1762
- package/build/es/context-booking-checkout.mjs.map +1 -1
- package/build/es/context-my-booking.d.mts +2832 -0
- package/build/es/context-my-booking.mjs +562 -0
- package/build/es/context-my-booking.mjs.map +1 -0
- package/build/es/context-my-bookings.d.mts +2862 -0
- package/build/es/context-my-bookings.mjs +12844 -0
- package/build/es/context-my-bookings.mjs.map +1 -0
- package/build/es/context-service-addons.d.mts +54 -3
- package/build/es/context-service-addons.mjs +1061 -574
- package/build/es/context-service-addons.mjs.map +1 -1
- package/build/es/context-service.d.mts +35 -24
- package/build/es/context-service.mjs +985 -966
- package/build/es/context-service.mjs.map +1 -1
- package/build/es/context-time-slots.d.mts +44 -98
- package/build/es/context-time-slots.mjs +456 -474
- package/build/es/context-time-slots.mjs.map +1 -1
- package/build/internal/cjs/context-booking-checkout.d.ts +32 -0
- package/build/internal/cjs/context-my-booking.d.ts +2832 -0
- package/build/internal/cjs/context-my-bookings.d.ts +2862 -0
- package/build/internal/cjs/context-service-addons.d.ts +54 -3
- package/build/internal/cjs/context-service.d.ts +35 -24
- package/build/internal/cjs/context-time-slots.d.ts +44 -98
- package/build/internal/es/context-booking-checkout.d.mts +32 -0
- package/build/internal/es/context-my-booking.d.mts +2832 -0
- package/build/internal/es/context-my-bookings.d.mts +2862 -0
- package/build/internal/es/context-service-addons.d.mts +54 -3
- package/build/internal/es/context-service.d.mts +35 -24
- package/build/internal/es/context-time-slots.d.mts +44 -98
- package/context/my-booking/package.json +3 -0
- package/context/my-bookings/package.json +3 -0
- package/context-runtime/context-booking-checkout/runtime.d.ts +32 -0
- package/context-runtime/context-booking-checkout/runtime.js +3 -3
- package/context-runtime/context-my-booking/runtime.d.ts +2832 -0
- package/context-runtime/context-my-booking/runtime.js +2 -0
- package/context-runtime/context-my-bookings/runtime.d.ts +2862 -0
- package/context-runtime/context-my-bookings/runtime.js +11 -0
- package/context-runtime/context-service/runtime.d.ts +35 -24
- package/context-runtime/context-service/runtime.js +3 -3
- package/context-runtime/context-service-addons/runtime.d.ts +54 -3
- package/context-runtime/context-service-addons/runtime.js +2 -2
- package/context-runtime/context-time-slots/runtime.d.ts +44 -98
- package/context-runtime/context-time-slots/runtime.js +3 -3
- package/package.json +20 -4
|
@@ -4186,6 +4186,9 @@ interface ServiceContextValue {
|
|
|
4186
4186
|
* - A class: it has a session that hasn't ended.
|
|
4187
4187
|
* - A course: it has spots left, its sessions haven't ended, and booking is open.
|
|
4188
4188
|
*
|
|
4189
|
+
* In the editor, bind a booking button's visibility condition to it to hide the button when
|
|
4190
|
+
* the service can't be booked.
|
|
4191
|
+
*
|
|
4189
4192
|
* @returns `true` when the service can be booked online now. Same as
|
|
4190
4193
|
* `serviceBookability.isAvailableForBooking`.
|
|
4191
4194
|
*
|
|
@@ -4210,6 +4213,9 @@ interface ServiceContextValue {
|
|
|
4210
4213
|
/**
|
|
4211
4214
|
* Checks whether the service has a booking policy description to show.
|
|
4212
4215
|
*
|
|
4216
|
+
* In the editor, bind the policy text's visibility condition to it to hide the text when
|
|
4217
|
+
* there's no policy.
|
|
4218
|
+
*
|
|
4213
4219
|
* @returns `true` when `policyDescription` isn't empty.
|
|
4214
4220
|
*
|
|
4215
4221
|
* @example Show the booking policy only when there's one
|
|
@@ -4234,6 +4240,9 @@ interface ServiceContextValue {
|
|
|
4234
4240
|
/**
|
|
4235
4241
|
* Checks whether the service has a cover image.
|
|
4236
4242
|
*
|
|
4243
|
+
* In the editor, bind a header's visibility condition to it to hide the header when there's
|
|
4244
|
+
* no cover image.
|
|
4245
|
+
*
|
|
4237
4246
|
* @returns `true` when `coverImage` is set.
|
|
4238
4247
|
*
|
|
4239
4248
|
* @example Show a header only when the service has a cover image
|
|
@@ -4255,6 +4264,9 @@ interface ServiceContextValue {
|
|
|
4255
4264
|
/**
|
|
4256
4265
|
* Checks whether the service has gallery images.
|
|
4257
4266
|
*
|
|
4267
|
+
* In the editor, bind a gallery's visibility condition to it to hide the gallery when there are
|
|
4268
|
+
* no images.
|
|
4269
|
+
*
|
|
4258
4270
|
* @returns `true` when `gallery` has at least 1 image.
|
|
4259
4271
|
*
|
|
4260
4272
|
* @example Show a gallery only when the service has images
|
|
@@ -4411,6 +4423,21 @@ interface ServiceContextValue {
|
|
|
4411
4423
|
* `navigateToNextPage()` carries it to the next page.
|
|
4412
4424
|
*/
|
|
4413
4425
|
selection: ServicePreference;
|
|
4426
|
+
/**
|
|
4427
|
+
* Whether the time slot in `selection` is a full class session whose waitlist is open. Such a
|
|
4428
|
+
* slot can't be booked on the site yet: `navigateToNextPage()` doesn't take it to the booking
|
|
4429
|
+
* form, and a button that books it should offer the waitlist instead.
|
|
4430
|
+
*
|
|
4431
|
+
* `false` when no time slot is selected, or the selected one can be booked.
|
|
4432
|
+
*/
|
|
4433
|
+
isWaitlistSlotSelected: boolean;
|
|
4434
|
+
/**
|
|
4435
|
+
* ID of the site (its meta site ID), as the host reports it. Builders use it for links that
|
|
4436
|
+
* name the site, such as the waitlist dialog's link to the site in the Wix app.
|
|
4437
|
+
*
|
|
4438
|
+
* `''` while the host hasn't provided it, such as an unsaved site in the editor.
|
|
4439
|
+
*/
|
|
4440
|
+
siteId: string;
|
|
4414
4441
|
/**
|
|
4415
4442
|
* [IANA time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time
|
|
4416
4443
|
* slot in `selection`. It's the time zone sent with the time slot when it was selected.
|
|
@@ -4721,36 +4748,18 @@ interface ServiceContextValue {
|
|
|
4721
4748
|
draftRevision: number;
|
|
4722
4749
|
/**
|
|
4723
4750
|
* Whether the visitor has a promo code to enter at checkout, from the booking preferences in the
|
|
4724
|
-
* page's URL.
|
|
4751
|
+
* page's URL.
|
|
4752
|
+
*
|
|
4753
|
+
* @deprecated Use the Booking Checkout context's `selection.wantsPromoCode`.
|
|
4725
4754
|
*/
|
|
4726
4755
|
wantsPromoCode: boolean;
|
|
4727
4756
|
/**
|
|
4728
4757
|
* Sets whether the visitor has a promo code to enter at checkout, and writes it to the page's
|
|
4729
|
-
* URL, replacing the current history entry.
|
|
4730
|
-
*
|
|
4731
|
-
* The function does nothing when the page's URL has no booking preferences.
|
|
4758
|
+
* URL, replacing the current history entry. The function does nothing when the page's URL has no
|
|
4759
|
+
* booking preferences.
|
|
4732
4760
|
*
|
|
4761
|
+
* @deprecated Use the Booking Checkout context's `setWantsPromoCode()`.
|
|
4733
4762
|
* @param wanted - Whether the visitor has a promo code to enter at checkout.
|
|
4734
|
-
*
|
|
4735
|
-
* @example Let the visitor say they have a promo code
|
|
4736
|
-
* ```tsx
|
|
4737
|
-
* import { useServiceContext } from '@wix/bookings/context/service';
|
|
4738
|
-
*
|
|
4739
|
-
* function PromoCodeCheckbox() {
|
|
4740
|
-
* const { wantsPromoCode, setWantsPromoCode } = useServiceContext();
|
|
4741
|
-
*
|
|
4742
|
-
* return (
|
|
4743
|
-
* <label>
|
|
4744
|
-
* <input
|
|
4745
|
-
* type="checkbox"
|
|
4746
|
-
* checked={wantsPromoCode}
|
|
4747
|
-
* onChange={(event) => setWantsPromoCode(event.target.checked)}
|
|
4748
|
-
* />
|
|
4749
|
-
* I have a promo code
|
|
4750
|
-
* </label>
|
|
4751
|
-
* );
|
|
4752
|
-
* }
|
|
4753
|
-
* ```
|
|
4754
4763
|
*/
|
|
4755
4764
|
setWantsPromoCode: (wanted: boolean) => void;
|
|
4756
4765
|
/**
|
|
@@ -4800,6 +4809,8 @@ interface ServiceContextValue {
|
|
|
4800
4809
|
* - The context is in reschedule mode. To move the booking, call `rescheduleBooking()`.
|
|
4801
4810
|
* - The next page is the booking form, and no time slot is selected for a class or an
|
|
4802
4811
|
* appointment.
|
|
4812
|
+
* - The next page is the booking form, and the selected time slot is a full class session with
|
|
4813
|
+
* an open waitlist. See `isWaitlistSlotSelected`.
|
|
4803
4814
|
* - The site has no page for the next step.
|
|
4804
4815
|
*
|
|
4805
4816
|
* The booking form gets only this service's selection. Other pages get the selection merged into
|