@wix/bookings 1.0.1782 → 1.0.1784
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.d.ts +18 -24
- package/build/cjs/context-service.js +403 -396
- package/build/cjs/context-service.js.map +1 -1
- package/build/cjs/context-time-slots.d.ts +24 -7
- package/build/cjs/context-time-slots.js +82 -81
- 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.d.mts +18 -24
- package/build/es/context-service.mjs +403 -396
- package/build/es/context-service.mjs.map +1 -1
- package/build/es/context-time-slots.d.mts +24 -7
- package/build/es/context-time-slots.mjs +82 -81
- 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.d.ts +18 -24
- package/build/internal/cjs/context-time-slots.d.ts +24 -7
- 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.d.mts +18 -24
- package/build/internal/es/context-time-slots.d.mts +24 -7
- 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 +18 -24
- package/context-runtime/context-service/runtime.js +3 -3
- package/context-runtime/context-time-slots/runtime.d.ts +24 -7
- package/context-runtime/context-time-slots/runtime.js +2 -2
- package/package.json +22 -6
|
@@ -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
|
|
@@ -4736,36 +4748,18 @@ interface ServiceContextValue {
|
|
|
4736
4748
|
draftRevision: number;
|
|
4737
4749
|
/**
|
|
4738
4750
|
* Whether the visitor has a promo code to enter at checkout, from the booking preferences in the
|
|
4739
|
-
* page's URL.
|
|
4751
|
+
* page's URL.
|
|
4752
|
+
*
|
|
4753
|
+
* @deprecated Use the Booking Checkout context's `selection.wantsPromoCode`.
|
|
4740
4754
|
*/
|
|
4741
4755
|
wantsPromoCode: boolean;
|
|
4742
4756
|
/**
|
|
4743
4757
|
* Sets whether the visitor has a promo code to enter at checkout, and writes it to the page's
|
|
4744
|
-
* URL, replacing the current history entry.
|
|
4745
|
-
*
|
|
4746
|
-
* 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.
|
|
4747
4760
|
*
|
|
4761
|
+
* @deprecated Use the Booking Checkout context's `setWantsPromoCode()`.
|
|
4748
4762
|
* @param wanted - Whether the visitor has a promo code to enter at checkout.
|
|
4749
|
-
*
|
|
4750
|
-
* @example Let the visitor say they have a promo code
|
|
4751
|
-
* ```tsx
|
|
4752
|
-
* import { useServiceContext } from '@wix/bookings/context/service';
|
|
4753
|
-
*
|
|
4754
|
-
* function PromoCodeCheckbox() {
|
|
4755
|
-
* const { wantsPromoCode, setWantsPromoCode } = useServiceContext();
|
|
4756
|
-
*
|
|
4757
|
-
* return (
|
|
4758
|
-
* <label>
|
|
4759
|
-
* <input
|
|
4760
|
-
* type="checkbox"
|
|
4761
|
-
* checked={wantsPromoCode}
|
|
4762
|
-
* onChange={(event) => setWantsPromoCode(event.target.checked)}
|
|
4763
|
-
* />
|
|
4764
|
-
* I have a promo code
|
|
4765
|
-
* </label>
|
|
4766
|
-
* );
|
|
4767
|
-
* }
|
|
4768
|
-
* ```
|
|
4769
4763
|
*/
|
|
4770
4764
|
setWantsPromoCode: (wanted: boolean) => void;
|
|
4771
4765
|
/**
|