@wix/vibe-bookings-plugin 0.32.0 → 0.35.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 +26 -18
- package/dist/index.cjs.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -2987,7 +2987,10 @@ var getRouterFileContent = () => {
|
|
|
2987
2987
|
LocationSelectorPageRoute,
|
|
2988
2988
|
LocationSelectorPageRouteLoader,
|
|
2989
2989
|
} from './bookings/routes/location-selector-route';
|
|
2990
|
-
import {
|
|
2990
|
+
import {
|
|
2991
|
+
BookingProvider,
|
|
2992
|
+
createBookingLoader,
|
|
2993
|
+
} from './bookings/components/common/BookingProvider';
|
|
2991
2994
|
import { rootRouteLoader, WixServicesProvider } from '@/wix-verticals/react-pages/react-router/routes/root';
|
|
2992
2995
|
|
|
2993
2996
|
const router = createBrowserRouter(
|
|
@@ -3000,12 +3003,12 @@ var getRouterFileContent = () => {
|
|
|
3000
3003
|
path: '/booking',
|
|
3001
3004
|
element: (
|
|
3002
3005
|
<WixServicesProvider>
|
|
3003
|
-
<
|
|
3006
|
+
<BookingProvider>
|
|
3004
3007
|
<Outlet />
|
|
3005
|
-
</
|
|
3008
|
+
</BookingProvider>
|
|
3006
3009
|
</WixServicesProvider>
|
|
3007
3010
|
),
|
|
3008
|
-
loader: rootRouteLoader,
|
|
3011
|
+
loader: createBookingLoader(rootRouteLoader),
|
|
3009
3012
|
children: [
|
|
3010
3013
|
{
|
|
3011
3014
|
path: 'locations',
|
|
@@ -3057,17 +3060,22 @@ The routes in the example router file are wrapped with:
|
|
|
3057
3060
|
|
|
3058
3061
|
\`\`\`tsx
|
|
3059
3062
|
<WixServicesProvider>
|
|
3060
|
-
<
|
|
3063
|
+
<BookingProvider>
|
|
3061
3064
|
...
|
|
3062
3065
|
<Outlet />
|
|
3063
|
-
</
|
|
3066
|
+
</BookingProvider>
|
|
3064
3067
|
</WixServicesProvider>
|
|
3065
|
-
|
|
3068
|
+
\`\`\`
|
|
3069
|
+
|
|
3070
|
+
The \`BookingProvider\` uses \`createBookingLoader(rootRouteLoader)\` to combine:
|
|
3071
|
+
1. The \`rootRouteLoader\` - required for WixServicesProvider initialization
|
|
3072
|
+
2. Booking service pre-loading from URL parameters (\`serviceSlug\` from route params, \`locationId\` from query params)
|
|
3066
3073
|
|
|
3067
3074
|
<important_router_notes>
|
|
3068
3075
|
<strong>MAKE SURE TO WRAP ALL THE ROUTES WITH THE PROVIDERS IN THE ABOVE EXAMPLE ROUTER</strong>
|
|
3069
|
-
<strong>WRAP THE MAIN LAYOUT WITH <code><WixServicesProvider></code> and <code><
|
|
3070
|
-
- Use <code><
|
|
3076
|
+
<strong>WRAP THE MAIN LAYOUT WITH <code><WixServicesProvider></code> and <code><BookingProvider></code> not only the bookings routes.</strong>
|
|
3077
|
+
- Use <code><BookingProvider></code> only in the top level router and only once, the same component tree should not include more than one \`BookingProvider\`.
|
|
3078
|
+
- Use \`createBookingLoader(rootRouteLoader)\` to combine the root loader with booking service pre-loading.
|
|
3071
3079
|
<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>
|
|
3072
3080
|
</important_router_notes>
|
|
3073
3081
|
|
|
@@ -6287,7 +6295,7 @@ function transformRESTFloatToSDKFloat(val) {
|
|
|
6287
6295
|
return val;
|
|
6288
6296
|
}
|
|
6289
6297
|
|
|
6290
|
-
//
|
|
6298
|
+
// node_modules/@wix/auto_sdk_bookings_resources/build/es/index.mjs
|
|
6291
6299
|
var onResourceCreated = EventDefinition(
|
|
6292
6300
|
"wix.bookings.resources.v2.resource_created",
|
|
6293
6301
|
true,
|
|
@@ -8315,14 +8323,6 @@ var TaxableAddressType = /* @__PURE__ */ ((TaxableAddressType2) => {
|
|
|
8315
8323
|
TaxableAddressType2["BILLING"] = "BILLING";
|
|
8316
8324
|
return TaxableAddressType2;
|
|
8317
8325
|
})(TaxableAddressType || {});
|
|
8318
|
-
var WebhookIdentityType2 = /* @__PURE__ */ ((WebhookIdentityType22) => {
|
|
8319
|
-
WebhookIdentityType22["UNKNOWN"] = "UNKNOWN";
|
|
8320
|
-
WebhookIdentityType22["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
8321
|
-
WebhookIdentityType22["MEMBER"] = "MEMBER";
|
|
8322
|
-
WebhookIdentityType22["WIX_USER"] = "WIX_USER";
|
|
8323
|
-
WebhookIdentityType22["APP"] = "APP";
|
|
8324
|
-
return WebhookIdentityType22;
|
|
8325
|
-
})(WebhookIdentityType2 || {});
|
|
8326
8326
|
var V2RequestedFields = /* @__PURE__ */ ((V2RequestedFields2) => {
|
|
8327
8327
|
V2RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
|
|
8328
8328
|
V2RequestedFields2["STAFF_MEMBER_DETAILS"] = "STAFF_MEMBER_DETAILS";
|
|
@@ -8466,6 +8466,14 @@ var ResolutionMethod = /* @__PURE__ */ ((ResolutionMethod2) => {
|
|
|
8466
8466
|
ResolutionMethod2["SUBDIRECTORY"] = "SUBDIRECTORY";
|
|
8467
8467
|
return ResolutionMethod2;
|
|
8468
8468
|
})(ResolutionMethod || {});
|
|
8469
|
+
var WebhookIdentityType2 = /* @__PURE__ */ ((WebhookIdentityType22) => {
|
|
8470
|
+
WebhookIdentityType22["UNKNOWN"] = "UNKNOWN";
|
|
8471
|
+
WebhookIdentityType22["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
8472
|
+
WebhookIdentityType22["MEMBER"] = "MEMBER";
|
|
8473
|
+
WebhookIdentityType22["WIX_USER"] = "WIX_USER";
|
|
8474
|
+
WebhookIdentityType22["APP"] = "APP";
|
|
8475
|
+
return WebhookIdentityType22;
|
|
8476
|
+
})(WebhookIdentityType2 || {});
|
|
8469
8477
|
async function createService2(service) {
|
|
8470
8478
|
const { httpClient, sideEffects } = arguments[1];
|
|
8471
8479
|
const payload = transformPaths(
|