@wix/headless-bookings 1.0.16 → 1.0.17
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.
|
@@ -28,8 +28,10 @@ function RootContent({ children, }) {
|
|
|
28
28
|
const selected = serviceService.selectedSignal.get();
|
|
29
29
|
const bookable = serviceService.bookableSignal.get();
|
|
30
30
|
// In "from booking signal" mode, render null when no service is selected
|
|
31
|
-
// The signal will trigger a re-render when a service is selected
|
|
32
|
-
|
|
31
|
+
// The signal will trigger a re-render when a service is selected.
|
|
32
|
+
// While a slug/id-based fetch is in flight, keep rendering the subtree so
|
|
33
|
+
// consumers' loading skeletons (<Service.Raw>) can show instead of a blank screen.
|
|
34
|
+
if ((!service || !service._id) && !serviceService.isLoadingSignal.get()) {
|
|
33
35
|
return null;
|
|
34
36
|
}
|
|
35
37
|
if (typeof children === 'function') {
|
|
@@ -90,7 +90,7 @@ exports.ServiceService = services_definitions_1.implementService.withConfig()(ex
|
|
|
90
90
|
const initialService = config.service || {};
|
|
91
91
|
serviceSignal = signalsService.signal(initialService);
|
|
92
92
|
}
|
|
93
|
-
const isLoadingSignal = signalsService.signal(!!config.serviceId);
|
|
93
|
+
const isLoadingSignal = signalsService.signal(!config.service && (!!config.serviceId || !!config.serviceSlug));
|
|
94
94
|
const errorSignal = signalsService.signal(null);
|
|
95
95
|
// Default appId to BOOKING_APP_ID if not provided
|
|
96
96
|
const appId = config.appId ?? constants_js_1.BOOKING_APP_ID;
|
|
@@ -19,8 +19,10 @@ function RootContent({ children, }) {
|
|
|
19
19
|
const selected = serviceService.selectedSignal.get();
|
|
20
20
|
const bookable = serviceService.bookableSignal.get();
|
|
21
21
|
// In "from booking signal" mode, render null when no service is selected
|
|
22
|
-
// The signal will trigger a re-render when a service is selected
|
|
23
|
-
|
|
22
|
+
// The signal will trigger a re-render when a service is selected.
|
|
23
|
+
// While a slug/id-based fetch is in flight, keep rendering the subtree so
|
|
24
|
+
// consumers' loading skeletons (<Service.Raw>) can show instead of a blank screen.
|
|
25
|
+
if ((!service || !service._id) && !serviceService.isLoadingSignal.get()) {
|
|
24
26
|
return null;
|
|
25
27
|
}
|
|
26
28
|
if (typeof children === 'function') {
|
|
@@ -86,7 +86,7 @@ export const ServiceService = implementService.withConfig()(ServiceServiceDefini
|
|
|
86
86
|
const initialService = config.service || {};
|
|
87
87
|
serviceSignal = signalsService.signal(initialService);
|
|
88
88
|
}
|
|
89
|
-
const isLoadingSignal = signalsService.signal(!!config.serviceId);
|
|
89
|
+
const isLoadingSignal = signalsService.signal(!config.service && (!!config.serviceId || !!config.serviceSlug));
|
|
90
90
|
const errorSignal = signalsService.signal(null);
|
|
91
91
|
// Default appId to BOOKING_APP_ID if not provided
|
|
92
92
|
const appId = config.appId ?? BOOKING_APP_ID;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/headless-bookings",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"groupId": "com.wixpress.headless-components"
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
|
-
"falconPackageHash": "
|
|
94
|
+
"falconPackageHash": "e0eb894796285c23383284399c90c831b1dc3584451932add86c9b21"
|
|
95
95
|
}
|