@wix/bookings 1.0.1796 → 1.0.1798
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 +3 -37
- package/build/cjs/context-booking-checkout.js +1350 -1340
- package/build/cjs/context-booking-checkout.js.map +1 -1
- package/build/cjs/context-categories.d.ts +1 -3
- package/build/cjs/context-categories.js +20 -43
- package/build/cjs/context-categories.js.map +1 -1
- package/build/cjs/context-locations.d.ts +1 -1
- package/build/cjs/context-locations.js +20 -43
- package/build/cjs/context-locations.js.map +1 -1
- package/build/cjs/context-service-addons.d.ts +1 -15
- package/build/cjs/context-service-addons.js +20 -43
- package/build/cjs/context-service-addons.js.map +1 -1
- package/build/cjs/context-service.d.ts +1 -65
- package/build/cjs/context-service.js +363 -386
- package/build/cjs/context-service.js.map +1 -1
- package/build/cjs/context-services.d.ts +1 -23
- package/build/cjs/context-services.js +542 -566
- package/build/cjs/context-services.js.map +1 -1
- package/build/cjs/context-time-slots.d.ts +1 -21
- package/build/cjs/context-time-slots.js +588 -615
- package/build/cjs/context-time-slots.js.map +1 -1
- package/build/es/context-booking-checkout.d.mts +3 -37
- package/build/es/context-booking-checkout.mjs +1350 -1340
- package/build/es/context-booking-checkout.mjs.map +1 -1
- package/build/es/context-categories.d.mts +1 -3
- package/build/es/context-categories.mjs +20 -43
- package/build/es/context-categories.mjs.map +1 -1
- package/build/es/context-locations.d.mts +1 -1
- package/build/es/context-locations.mjs +20 -43
- package/build/es/context-locations.mjs.map +1 -1
- package/build/es/context-service-addons.d.mts +1 -15
- package/build/es/context-service-addons.mjs +20 -43
- package/build/es/context-service-addons.mjs.map +1 -1
- package/build/es/context-service.d.mts +1 -65
- package/build/es/context-service.mjs +363 -386
- package/build/es/context-service.mjs.map +1 -1
- package/build/es/context-services.d.mts +1 -23
- package/build/es/context-services.mjs +542 -566
- package/build/es/context-services.mjs.map +1 -1
- package/build/es/context-time-slots.d.mts +1 -21
- package/build/es/context-time-slots.mjs +588 -615
- package/build/es/context-time-slots.mjs.map +1 -1
- package/build/internal/cjs/context-booking-checkout.d.ts +3 -37
- package/build/internal/cjs/context-categories.d.ts +1 -3
- package/build/internal/cjs/context-locations.d.ts +1 -1
- package/build/internal/cjs/context-service-addons.d.ts +1 -15
- package/build/internal/cjs/context-service.d.ts +1 -65
- package/build/internal/cjs/context-services.d.ts +1 -23
- package/build/internal/cjs/context-time-slots.d.ts +1 -21
- package/build/internal/es/context-booking-checkout.d.mts +3 -37
- package/build/internal/es/context-categories.d.mts +1 -3
- package/build/internal/es/context-locations.d.mts +1 -1
- package/build/internal/es/context-service-addons.d.mts +1 -15
- package/build/internal/es/context-service.d.mts +1 -65
- package/build/internal/es/context-services.d.mts +1 -23
- package/build/internal/es/context-time-slots.d.mts +1 -21
- package/context-runtime/context-booking-checkout/runtime.d.ts +3 -38
- package/context-runtime/context-booking-checkout/runtime.js +3 -3
- package/context-runtime/context-categories/runtime.d.ts +1 -4
- package/context-runtime/context-categories/runtime.js +2 -2
- package/context-runtime/context-locations/runtime.d.ts +1 -2
- package/context-runtime/context-locations/runtime.js +2 -2
- package/context-runtime/context-service/runtime.d.ts +1 -66
- package/context-runtime/context-service/runtime.js +3 -3
- package/context-runtime/context-service-addons/runtime.d.ts +1 -16
- package/context-runtime/context-service-addons/runtime.js +2 -2
- package/context-runtime/context-services/runtime.d.ts +1 -24
- package/context-runtime/context-services/runtime.js +3 -3
- package/context-runtime/context-time-slots/runtime.d.ts +1 -22
- package/context-runtime/context-time-slots/runtime.js +3 -3
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/extensions/contexts/locations-context/locations-context.d.ts
|
|
4
4
|
/** A business location as shown in a location list, with its selected state. */
|
|
5
5
|
interface LocationItem {
|
|
6
6
|
/**
|
|
@@ -222,7 +222,7 @@ function Te(e5, t2, n2) {
|
|
|
222
222
|
break;
|
|
223
223
|
}
|
|
224
224
|
let a2 = r2[e6 + 1];
|
|
225
|
-
|
|
225
|
+
t3 in i2 && i2[t3] != null && typeof i2[t3] == `object` && i2[t3] !== null || (i2[t3] = typeof a2 == `number` ? [] : {}), i2 = i2[t3];
|
|
226
226
|
}
|
|
227
227
|
return e5;
|
|
228
228
|
}
|
|
@@ -289,11 +289,8 @@ var Ae = class {
|
|
|
289
289
|
return;
|
|
290
290
|
}
|
|
291
291
|
let a3 = Pe(e6);
|
|
292
|
-
if (a3 && a3 in t3)
|
|
293
|
-
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
throw Error(`Cannot find key '${e6}' or its transformations at path ${this.buildPathString(r2)}`);
|
|
292
|
+
if (a3 && a3 in t3) r2.push(a3), n2 = t3[a3];
|
|
293
|
+
else throw Error(`Cannot find key '${e6}' or its transformations at path ${this.buildPathString(r2)}`);
|
|
297
294
|
}, o2 = (e6, t3) => {
|
|
298
295
|
r2.push(e6), n2 = t3[e6];
|
|
299
296
|
};
|
|
@@ -304,11 +301,7 @@ var Ae = class {
|
|
|
304
301
|
}
|
|
305
302
|
if (typeof n2 != `object` || !n2) throw Error(`Cannot access property '${e6}' on ${typeof n2} at path ${this.buildPathString(r2)}`);
|
|
306
303
|
let t3 = n2;
|
|
307
|
-
|
|
308
|
-
o2(e6, t3);
|
|
309
|
-
continue;
|
|
310
|
-
}
|
|
311
|
-
a2(e6, t3);
|
|
304
|
+
e6 in n2 ? o2(e6, t3) : a2(e6, t3);
|
|
312
305
|
}
|
|
313
306
|
return { [this.buildPathString(r2)]: n2 };
|
|
314
307
|
}
|
|
@@ -1149,13 +1142,7 @@ var G = class {
|
|
|
1149
1142
|
}), this;
|
|
1150
1143
|
}
|
|
1151
1144
|
off(e5, t2) {
|
|
1152
|
-
|
|
1153
|
-
if (!t2) {
|
|
1154
|
-
delete this.observers[e5];
|
|
1155
|
-
return;
|
|
1156
|
-
}
|
|
1157
|
-
this.observers[e5].delete(t2);
|
|
1158
|
-
}
|
|
1145
|
+
this.observers[e5] && (t2 ? this.observers[e5].delete(t2) : delete this.observers[e5]);
|
|
1159
1146
|
}
|
|
1160
1147
|
emit(e5, ...t2) {
|
|
1161
1148
|
this.observers[e5] && Array.from(this.observers[e5].entries()).forEach(([e6, n2]) => {
|
|
@@ -1682,24 +1669,17 @@ var dr = class extends G {
|
|
|
1682
1669
|
let e6 = this.waitingReads.shift();
|
|
1683
1670
|
this.read(e6.lng, e6.ns, e6.fcName, e6.tried, e6.wait, e6.callback);
|
|
1684
1671
|
}
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
}, i2);
|
|
1689
|
-
return;
|
|
1690
|
-
}
|
|
1691
|
-
a2(o3, s3);
|
|
1672
|
+
o3 && s3 && r2 < this.maxRetries ? setTimeout(() => {
|
|
1673
|
+
this.read.call(this, e5, t2, n2, r2 + 1, i2 * 2, a2);
|
|
1674
|
+
}, i2) : a2(o3, s3);
|
|
1692
1675
|
}, s2 = this.backend[n2].bind(this.backend);
|
|
1693
|
-
if (s2.length === 2) {
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
o2(e6);
|
|
1699
|
-
}
|
|
1700
|
-
return;
|
|
1676
|
+
if (s2.length === 2) try {
|
|
1677
|
+
let n3 = s2(e5, t2);
|
|
1678
|
+
n3 && typeof n3.then == `function` ? n3.then((e6) => o2(null, e6)).catch(o2) : o2(null, n3);
|
|
1679
|
+
} catch (e6) {
|
|
1680
|
+
o2(e6);
|
|
1701
1681
|
}
|
|
1702
|
-
return s2(e5, t2, o2);
|
|
1682
|
+
else return s2(e5, t2, o2);
|
|
1703
1683
|
}
|
|
1704
1684
|
prepareLoading(e5, t2, n2 = {}, r2) {
|
|
1705
1685
|
if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
|
|
@@ -1724,11 +1704,8 @@ var dr = class extends G {
|
|
|
1724
1704
|
}
|
|
1725
1705
|
saveMissing(e5, t2, n2, r2, i2, a2 = {}, o2 = () => {
|
|
1726
1706
|
}) {
|
|
1727
|
-
if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(t2)) {
|
|
1728
|
-
|
|
1729
|
-
return;
|
|
1730
|
-
}
|
|
1731
|
-
if (n2 != null && n2 !== ``) {
|
|
1707
|
+
if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(t2)) this.logger.warn(`did not save key "${n2}" as the namespace "${t2}" was not yet loaded`, `This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);
|
|
1708
|
+
else if (n2 != null && n2 !== ``) {
|
|
1732
1709
|
if (this.backend?.create) {
|
|
1733
1710
|
let s2 = { ...a2, isUpdate: i2 }, c2 = this.backend.create.bind(this.backend);
|
|
1734
1711
|
if (c2.length < 6) try {
|
|
@@ -2040,7 +2017,7 @@ var Ir = class {
|
|
|
2040
2017
|
};
|
|
2041
2018
|
var Lr = (e5) => new Ir(e5);
|
|
2042
2019
|
var Rr = kn({ getMonitoringClient: (e5) => () => e5.getMonitoringClient ? e5.getMonitoringClient() : Lr(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
|
|
2043
|
-
var zr = { service: `service`, services: `services`, categories: `categories`, locations: `locations`, sessions: `sessions`, timeSlots: `time-slots`, serviceAddOns: `service-addons`, bookingsSettings: `bookings-settings`, serviceCta: `service-cta`, preferences: `preferences`, bookingSummary: `booking-summary`, bookingCheckout: `booking-checkout`, formValues: `form-values`, paymentOptions: `payment-options`, seo: `seo`, warmup: `warmup`, reschedule: `reschedule` };
|
|
2020
|
+
var zr = { service: `service`, services: `services`, categories: `categories`, locations: `locations`, sessions: `sessions`, timeSlots: `time-slots`, serviceAddOns: `service-addons`, bookingsSettings: `bookings-settings`, serviceCta: `service-cta`, preferences: `preferences`, bookingSummary: `booking-summary`, bookingCheckout: `booking-checkout`, formValues: `form-values`, paymentOptions: `payment-options`, seo: `seo`, warmup: `warmup`, reschedule: `reschedule`, intakeForms: `intake-forms` };
|
|
2044
2021
|
function Br(e5) {
|
|
2045
2022
|
try {
|
|
2046
2023
|
let t2 = Rr.getMonitoringClient?.();
|
|
@@ -2186,7 +2163,7 @@ function ci(e5) {
|
|
|
2186
2163
|
}
|
|
2187
2164
|
function li() {
|
|
2188
2165
|
let e5 = ci(si()), t2 = typeof window > `u`;
|
|
2189
|
-
return { scope: e5 ?? void 0, get: async (n2) => {
|
|
2166
|
+
return (0, import_react.useMemo)(() => ({ scope: e5 ?? void 0, get: async (n2) => {
|
|
2190
2167
|
if (t2 || !e5) return null;
|
|
2191
2168
|
try {
|
|
2192
2169
|
return await e5.get(n2);
|
|
@@ -2198,7 +2175,7 @@ function li() {
|
|
|
2198
2175
|
e5.set(n2, r2);
|
|
2199
2176
|
} catch {
|
|
2200
2177
|
}
|
|
2201
|
-
} };
|
|
2178
|
+
} }), [e5, t2]);
|
|
2202
2179
|
}
|
|
2203
2180
|
var ui = Z(`@wix/site-service-locale`);
|
|
2204
2181
|
var di = Z;
|
|
@@ -2385,7 +2362,7 @@ function na({ locationsPromise: e5, refetch: t2, children: n2 }) {
|
|
|
2385
2362
|
}
|
|
2386
2363
|
function ra({ children: e5 }) {
|
|
2387
2364
|
Xi(qi.LOCATIONS);
|
|
2388
|
-
let n2 = li(), i2 = hi(), [a2, s2] = (0, import_react.useState)(0), l2 = (0, import_react.useMemo)(() => Jr(Oi({ key: _i(i2), refresh: a2 !== 0, warmupData: n2, fetchData: () => Hr(`locations-context-load`, { feature: zr.locations }, Vi()) }), ea, ta), [a2, i2]), u2 = (0, import_react.useCallback)(() => s2((e6) => e6 + 1), []);
|
|
2365
|
+
let n2 = li(), i2 = hi(), [a2, s2] = (0, import_react.useState)(0), l2 = (0, import_react.useMemo)(() => Jr(Oi({ key: _i(i2), refresh: a2 !== 0, warmupData: n2, fetchData: () => Hr(`locations-context-load`, { feature: zr.locations }, Vi()) }), ea, ta), [a2, i2, n2]), u2 = (0, import_react.useCallback)(() => s2((e6) => e6 + 1), []);
|
|
2389
2366
|
return (0, import_jsx_runtime.jsx)(Ur, { fallback: (0, import_jsx_runtime.jsx)(Wi, { refetch: u2, children: e5 }), feature: zr.locations, children: (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(Ui, { refetch: u2, children: e5 }), children: (0, import_jsx_runtime.jsx)(na, { locationsPromise: l2, refetch: u2, children: e5 }) }) });
|
|
2390
2367
|
}
|
|
2391
2368
|
var ia = En(`c151d9f7-1582-407c-bb59-59030f244b47`);
|