@wix/vibe-bookings-plugin 0.45.0 → 0.47.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/dist/index.cjs +57 -33
- package/dist/index.cjs.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -2994,6 +2994,8 @@ var getRouterFileContent = () => {
|
|
|
2994
2994
|
BookingProvider,
|
|
2995
2995
|
createBookingLoader,
|
|
2996
2996
|
} from './bookings/components/common/BookingProvider';
|
|
2997
|
+
import { BookingsBreadcrumbs } from './bookings/components/common/BookingsBreadcrumbs';
|
|
2998
|
+
import { BOOKINGS_ROUTES } from './bookings/components/common/consts';
|
|
2997
2999
|
import { rootRouteLoader, WixServicesProvider } from '@/wix-verticals/react-pages/react-router/routes/root';
|
|
2998
3000
|
|
|
2999
3001
|
const router = createBrowserRouter(
|
|
@@ -3015,20 +3017,40 @@ var getRouterFileContent = () => {
|
|
|
3015
3017
|
children: [
|
|
3016
3018
|
{
|
|
3017
3019
|
path: 'locations',
|
|
3018
|
-
element:
|
|
3020
|
+
element: (
|
|
3021
|
+
<>
|
|
3022
|
+
<BookingsBreadcrumbs currentPage={BOOKINGS_ROUTES.LOCATIONS} />
|
|
3023
|
+
<LocationSelectorPageRoute servicesPagePath="/booking/services" />
|
|
3024
|
+
</>
|
|
3025
|
+
),
|
|
3019
3026
|
loader: LocationSelectorPageRouteLoader,
|
|
3020
3027
|
},
|
|
3021
3028
|
{
|
|
3022
3029
|
path: 'services',
|
|
3023
|
-
element:
|
|
3030
|
+
element: (
|
|
3031
|
+
<>
|
|
3032
|
+
<BookingsBreadcrumbs currentPage={BOOKINGS_ROUTES.SERVICES} />
|
|
3033
|
+
<ServiceListPageRoute slotsPagePath="/booking/slots" formPagePath="/booking/form" />
|
|
3034
|
+
</>
|
|
3035
|
+
),
|
|
3024
3036
|
},
|
|
3025
3037
|
{
|
|
3026
3038
|
path: 'slots/:serviceSlug',
|
|
3027
|
-
element:
|
|
3039
|
+
element: (
|
|
3040
|
+
<>
|
|
3041
|
+
<BookingsBreadcrumbs currentPage={BOOKINGS_ROUTES.SLOTS} />
|
|
3042
|
+
<TimeSlotListPageRoute formPagePath="/booking/form" />
|
|
3043
|
+
</>
|
|
3044
|
+
),
|
|
3028
3045
|
},
|
|
3029
3046
|
{
|
|
3030
3047
|
path: 'form/:serviceSlug',
|
|
3031
|
-
element:
|
|
3048
|
+
element: (
|
|
3049
|
+
<>
|
|
3050
|
+
<BookingsBreadcrumbs currentPage={BOOKINGS_ROUTES.FORM} />
|
|
3051
|
+
<BookingFormPageRoute bookingCompletedPagePath="/booking/booking-completed" />
|
|
3052
|
+
</>
|
|
3053
|
+
),
|
|
3032
3054
|
},
|
|
3033
3055
|
{
|
|
3034
3056
|
path: 'booking-completed',
|
|
@@ -3087,29 +3109,31 @@ The \`BookingProvider\` uses \`createBookingLoader(rootRouteLoader)\` to combine
|
|
|
3087
3109
|
<strong>ALWAYS IMPLEMENT THE LAYOUT COMPONENTS OF THE SITE, AS A LAYOUT FOR THE SITE, AND WRAP ALL THE ROUTES WITH THAT LAYOUT (INCLUDING THE BOOKINGS ROUTES).</strong>
|
|
3088
3110
|
</important_router_notes>
|
|
3089
3111
|
|
|
3090
|
-
All the routes from the bookings router are 100% width, no titles, no background, no padding nor margin outside of their content area.
|
|
3091
|
-
For example, instead of using the service list route as is, wrap it with a proper element:
|
|
3092
|
-
\`\`\`tsx
|
|
3093
|
-
<div className="...">
|
|
3094
|
-
<h1 className="... px-4 py-2">Our Services</h1>
|
|
3095
|
-
<ServiceListPageRoute slotsPagePath="/booking/slots" />
|
|
3096
|
-
</div>
|
|
3097
|
-
\`\`\`
|
|
3112
|
+
All the routes from the bookings router are 100% width, no titles, no background, no padding nor margin outside of their content area. Each route includes a \`<BookingsBreadcrumbs>\` component that must be rendered with the appropriate \`BOOKINGS_ROUTES\` constant.
|
|
3098
3113
|
|
|
3099
|
-
|
|
3100
|
-
If you want to style or position the breadcrumbs (e.g., add padding, center them, match your page layout), wrap the \`<BookingProvider>\` with your layout wrapper and add margin to the content below it:
|
|
3114
|
+
To add styling (padding, margins, background, titles), wrap each route element with a layout structure:
|
|
3101
3115
|
\`\`\`tsx
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3116
|
+
{
|
|
3117
|
+
path: 'services',
|
|
3118
|
+
element: (
|
|
3119
|
+
<div className="pt-16 px-64">
|
|
3120
|
+
<BookingsBreadcrumbs currentPage={BOOKINGS_ROUTES.SERVICES} />
|
|
3105
3121
|
<div className="mt-12">
|
|
3106
|
-
<
|
|
3122
|
+
<h1 className="font-heading text-3xl mb-8">Select Service</h1>
|
|
3123
|
+
<ServiceListPageRoute slotsPagePath="/booking/slots" formPagePath="/booking/form" />
|
|
3107
3124
|
</div>
|
|
3108
|
-
</
|
|
3109
|
-
|
|
3110
|
-
|
|
3125
|
+
</div>
|
|
3126
|
+
),
|
|
3127
|
+
},
|
|
3111
3128
|
\`\`\`
|
|
3112
|
-
|
|
3129
|
+
|
|
3130
|
+
**Available page constants for breadcrumbs:**
|
|
3131
|
+
- \`BOOKINGS_ROUTES.LOCATIONS\` - for the location selection page
|
|
3132
|
+
- \`BOOKINGS_ROUTES.SERVICES\` - for the services list page
|
|
3133
|
+
- \`BOOKINGS_ROUTES.SLOTS\` - for the date/time selection page
|
|
3134
|
+
- \`BOOKINGS_ROUTES.FORM\` - for the booking form page
|
|
3135
|
+
|
|
3136
|
+
Note: The \`booking-completed\` route does not use breadcrumbs.
|
|
3113
3137
|
|
|
3114
3138
|
# Layout changes
|
|
3115
3139
|
The bookings system provides a provider that must be integrated into the site layout.
|
|
@@ -5549,7 +5573,7 @@ function routeComplexOverload(args, options) {
|
|
|
5549
5573
|
}
|
|
5550
5574
|
}
|
|
5551
5575
|
|
|
5552
|
-
// node_modules/@wix/auto_sdk_bookings_add-ons/build/es/index.mjs
|
|
5576
|
+
// ../../../node_modules/@wix/auto_sdk_bookings_add-ons/build/es/index.mjs
|
|
5553
5577
|
var onAddOnCreated = EventDefinition(
|
|
5554
5578
|
"wix.addons.v1.add_on_created",
|
|
5555
5579
|
true,
|
|
@@ -5604,7 +5628,7 @@ createEventModule(onAddOnCreated);
|
|
|
5604
5628
|
createEventModule(onAddOnDeleted);
|
|
5605
5629
|
createEventModule(onAddOnUpdated);
|
|
5606
5630
|
|
|
5607
|
-
// node_modules/@wix/auto_sdk_bookings_service-options-and-variants/build/es/index.mjs
|
|
5631
|
+
// ../../../node_modules/@wix/auto_sdk_bookings_service-options-and-variants/build/es/index.mjs
|
|
5608
5632
|
var onServiceOptionsAndVariantsCreated = EventDefinition(
|
|
5609
5633
|
"wix.bookings.catalog.v1.service_options_and_variants_created",
|
|
5610
5634
|
true,
|
|
@@ -5651,7 +5675,7 @@ createEventModule(
|
|
|
5651
5675
|
onServiceOptionsAndVariantsUpdated
|
|
5652
5676
|
);
|
|
5653
5677
|
|
|
5654
|
-
// node_modules/@wix/auto_sdk_bookings_categories-v-2/build/es/index.mjs
|
|
5678
|
+
// ../../../node_modules/@wix/auto_sdk_bookings_categories-v-2/build/es/index.mjs
|
|
5655
5679
|
var es_exports = {};
|
|
5656
5680
|
__export(es_exports, {
|
|
5657
5681
|
Position: () => Position,
|
|
@@ -6330,7 +6354,7 @@ function transformRESTFloatToSDKFloat(val) {
|
|
|
6330
6354
|
return val;
|
|
6331
6355
|
}
|
|
6332
6356
|
|
|
6333
|
-
// node_modules/@wix/auto_sdk_bookings_resources/build/es/index.mjs
|
|
6357
|
+
// ../../../node_modules/@wix/auto_sdk_bookings_resources/build/es/index.mjs
|
|
6334
6358
|
var onResourceCreated = EventDefinition(
|
|
6335
6359
|
"wix.bookings.resources.v2.resource_created",
|
|
6336
6360
|
true,
|
|
@@ -6383,7 +6407,7 @@ createEventModule(onResourceCreated);
|
|
|
6383
6407
|
createEventModule(onResourceDeleted);
|
|
6384
6408
|
createEventModule(onResourceUpdated);
|
|
6385
6409
|
|
|
6386
|
-
// node_modules/@wix/auto_sdk_bookings_resource-types/build/es/index.mjs
|
|
6410
|
+
// ../../../node_modules/@wix/auto_sdk_bookings_resource-types/build/es/index.mjs
|
|
6387
6411
|
var onResourceTypeCreated = EventDefinition(
|
|
6388
6412
|
"wix.bookings.resources.v2.resource_type_created",
|
|
6389
6413
|
true,
|
|
@@ -6444,7 +6468,7 @@ createEventModule(
|
|
|
6444
6468
|
onResourceTypeUpdated
|
|
6445
6469
|
);
|
|
6446
6470
|
|
|
6447
|
-
// node_modules/@wix/auto_sdk_bookings_services/build/es/index.mjs
|
|
6471
|
+
// ../../../node_modules/@wix/auto_sdk_bookings_services/build/es/index.mjs
|
|
6448
6472
|
var es_exports2 = {};
|
|
6449
6473
|
__export(es_exports2, {
|
|
6450
6474
|
Action: () => Action,
|
|
@@ -6608,7 +6632,7 @@ function transformRESTPageURLV2ToSDKPageURLV2(val) {
|
|
|
6608
6632
|
return val.url;
|
|
6609
6633
|
}
|
|
6610
6634
|
|
|
6611
|
-
// node_modules/@wix/auto_sdk_bookings_services/build/es/index.mjs
|
|
6635
|
+
// ../../../node_modules/@wix/auto_sdk_bookings_services/build/es/index.mjs
|
|
6612
6636
|
function resolveWixBookingsServicesV2AddOnGroupsServiceUrl(opts) {
|
|
6613
6637
|
const domainToMappings = {
|
|
6614
6638
|
"*.dev.wix-code.com": [
|
|
@@ -10369,7 +10393,7 @@ var onServiceCreated2 = createEventModule(onServiceCreated);
|
|
|
10369
10393
|
var onServiceDeleted2 = createEventModule(onServiceDeleted);
|
|
10370
10394
|
var onServiceUpdated2 = createEventModule(onServiceUpdated);
|
|
10371
10395
|
|
|
10372
|
-
// node_modules/@wix/auto_sdk_bookings_staff-members/build/es/index.mjs
|
|
10396
|
+
// ../../../node_modules/@wix/auto_sdk_bookings_staff-members/build/es/index.mjs
|
|
10373
10397
|
var es_exports3 = {};
|
|
10374
10398
|
__export(es_exports3, {
|
|
10375
10399
|
AggregationType: () => AggregationType2,
|
|
@@ -12053,7 +12077,7 @@ var onStaffMemberUpdated2 = createEventModule(
|
|
|
12053
12077
|
onStaffMemberUpdated
|
|
12054
12078
|
);
|
|
12055
12079
|
|
|
12056
|
-
// node_modules/@wix/auto_sdk_bookings_staff-member-settings/build/es/index.mjs
|
|
12080
|
+
// ../../../node_modules/@wix/auto_sdk_bookings_staff-member-settings/build/es/index.mjs
|
|
12057
12081
|
var onStaffMemberSettingsUpdated = EventDefinition(
|
|
12058
12082
|
"wix.bookings.staff_settings.v1.staff_member_settings_updated",
|
|
12059
12083
|
true,
|
|
@@ -12076,7 +12100,7 @@ createEventModule(
|
|
|
12076
12100
|
onStaffMemberSettingsUpdated
|
|
12077
12101
|
);
|
|
12078
12102
|
|
|
12079
|
-
// node_modules/@wix/auto_sdk_bookings_booking-policies/build/es/index.mjs
|
|
12103
|
+
// ../../../node_modules/@wix/auto_sdk_bookings_booking-policies/build/es/index.mjs
|
|
12080
12104
|
var onBookingPolicyCreated = EventDefinition(
|
|
12081
12105
|
"wix.bookings.v1.booking_policy_created",
|
|
12082
12106
|
true,
|
|
@@ -12166,7 +12190,7 @@ createEventModule(
|
|
|
12166
12190
|
onCategoryNotification
|
|
12167
12191
|
);
|
|
12168
12192
|
|
|
12169
|
-
// node_modules/@wix/auto_sdk_bookings_bookings/build/es/index.mjs
|
|
12193
|
+
// ../../../node_modules/@wix/auto_sdk_bookings_bookings/build/es/index.mjs
|
|
12170
12194
|
var onBookingCanceled = EventDefinition(
|
|
12171
12195
|
"wix.bookings.v2.booking_canceled",
|
|
12172
12196
|
true,
|