@wix/bookings 1.0.1796 → 1.0.1797
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 +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/lib/picker-filter.d.ts
|
|
4
4
|
/** One field of a panel filter backed by an Items Selection provider (`$in`, or `$eq` after an operator switch). */
|
|
5
5
|
interface PickerRule {
|
|
6
6
|
$in?: string[];
|
|
@@ -9,8 +9,6 @@ interface PickerRule {
|
|
|
9
9
|
interface CategoriesPickerFilter {
|
|
10
10
|
categoryId?: PickerRule;
|
|
11
11
|
}
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/extensions/contexts/categories-context/categories-context.d.ts
|
|
14
12
|
/** A service category as shown in a category list, with its selected state. */
|
|
15
13
|
interface CategoryItem {
|
|
16
14
|
/**
|
|
@@ -222,7 +222,7 @@ function Ee(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 je = class {
|
|
|
289
289
|
return;
|
|
290
290
|
}
|
|
291
291
|
let a3 = Fe(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 je = 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
|
}
|
|
@@ -1086,13 +1079,7 @@ var H = class {
|
|
|
1086
1079
|
}), this;
|
|
1087
1080
|
}
|
|
1088
1081
|
off(e5, t2) {
|
|
1089
|
-
|
|
1090
|
-
if (!t2) {
|
|
1091
|
-
delete this.observers[e5];
|
|
1092
|
-
return;
|
|
1093
|
-
}
|
|
1094
|
-
this.observers[e5].delete(t2);
|
|
1095
|
-
}
|
|
1082
|
+
this.observers[e5] && (t2 ? this.observers[e5].delete(t2) : delete this.observers[e5]);
|
|
1096
1083
|
}
|
|
1097
1084
|
emit(e5, ...t2) {
|
|
1098
1085
|
this.observers[e5] && Array.from(this.observers[e5].entries()).forEach(([e6, n2]) => {
|
|
@@ -1619,24 +1606,17 @@ var Xn = class extends H {
|
|
|
1619
1606
|
let e6 = this.waitingReads.shift();
|
|
1620
1607
|
this.read(e6.lng, e6.ns, e6.fcName, e6.tried, e6.wait, e6.callback);
|
|
1621
1608
|
}
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
}, i2);
|
|
1626
|
-
return;
|
|
1627
|
-
}
|
|
1628
|
-
a2(o3, s3);
|
|
1609
|
+
o3 && s3 && r2 < this.maxRetries ? setTimeout(() => {
|
|
1610
|
+
this.read.call(this, e5, t2, n2, r2 + 1, i2 * 2, a2);
|
|
1611
|
+
}, i2) : a2(o3, s3);
|
|
1629
1612
|
}, s2 = this.backend[n2].bind(this.backend);
|
|
1630
|
-
if (s2.length === 2) {
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
o2(e6);
|
|
1636
|
-
}
|
|
1637
|
-
return;
|
|
1613
|
+
if (s2.length === 2) try {
|
|
1614
|
+
let n3 = s2(e5, t2);
|
|
1615
|
+
n3 && typeof n3.then == `function` ? n3.then((e6) => o2(null, e6)).catch(o2) : o2(null, n3);
|
|
1616
|
+
} catch (e6) {
|
|
1617
|
+
o2(e6);
|
|
1638
1618
|
}
|
|
1639
|
-
return s2(e5, t2, o2);
|
|
1619
|
+
else return s2(e5, t2, o2);
|
|
1640
1620
|
}
|
|
1641
1621
|
prepareLoading(e5, t2, n2 = {}, r2) {
|
|
1642
1622
|
if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
|
|
@@ -1661,11 +1641,8 @@ var Xn = class extends H {
|
|
|
1661
1641
|
}
|
|
1662
1642
|
saveMissing(e5, t2, n2, r2, i2, a2 = {}, o2 = () => {
|
|
1663
1643
|
}) {
|
|
1664
|
-
if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(t2)) {
|
|
1665
|
-
|
|
1666
|
-
return;
|
|
1667
|
-
}
|
|
1668
|
-
if (n2 != null && n2 !== ``) {
|
|
1644
|
+
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!!!`);
|
|
1645
|
+
else if (n2 != null && n2 !== ``) {
|
|
1669
1646
|
if (this.backend?.create) {
|
|
1670
1647
|
let s2 = { ...a2, isUpdate: i2 }, c2 = this.backend.create.bind(this.backend);
|
|
1671
1648
|
if (c2.length < 6) try {
|
|
@@ -1977,7 +1954,7 @@ var br = class {
|
|
|
1977
1954
|
};
|
|
1978
1955
|
var xr = (e5) => new br(e5);
|
|
1979
1956
|
var Sr = gn({ getMonitoringClient: (e5) => () => e5.getMonitoringClient ? e5.getMonitoringClient() : xr(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
|
|
1980
|
-
var Cr = { 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` };
|
|
1957
|
+
var Cr = { 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` };
|
|
1981
1958
|
function wr(e5) {
|
|
1982
1959
|
try {
|
|
1983
1960
|
let t2 = Sr.getMonitoringClient?.();
|
|
@@ -2123,7 +2100,7 @@ function Kr(e5) {
|
|
|
2123
2100
|
}
|
|
2124
2101
|
function qr() {
|
|
2125
2102
|
let e5 = Kr(Gr()), t2 = typeof window > `u`;
|
|
2126
|
-
return { scope: e5 ?? void 0, get: async (n2) => {
|
|
2103
|
+
return (0, import_react.useMemo)(() => ({ scope: e5 ?? void 0, get: async (n2) => {
|
|
2127
2104
|
if (t2 || !e5) return null;
|
|
2128
2105
|
try {
|
|
2129
2106
|
return await e5.get(n2);
|
|
@@ -2135,7 +2112,7 @@ function qr() {
|
|
|
2135
2112
|
e5.set(n2, r2);
|
|
2136
2113
|
} catch {
|
|
2137
2114
|
}
|
|
2138
|
-
} };
|
|
2115
|
+
} }), [e5, t2]);
|
|
2139
2116
|
}
|
|
2140
2117
|
var Jr = Z(`@wix/site-service-locale`);
|
|
2141
2118
|
var Yr = Z;
|
|
@@ -2321,7 +2298,7 @@ function Li({ categoriesPromise: e5, categoryIdsKey: t2, refetch: n2, children:
|
|
|
2321
2298
|
}
|
|
2322
2299
|
function Ri({ categoriesPicker: e5, refreshSignal: n2 = 0, children: i2 }) {
|
|
2323
2300
|
ji(Oi.CATEGORIES);
|
|
2324
|
-
let a2 = qr(), s2 = $r(), l2 = Ci(e5?.categoryId), [u2, d2] = (0, import_react.useState)(0), p2 = (0, import_react.useMemo)(() => Mr(fi({ key: ti(s2), refresh: u2 !== 0 || n2 !== 0, warmupData: a2, fetchData: () => Er(`categories-context-load`, { feature: Cr.categories }, yi()) }), Fi, Ii), [u2, n2, s2]), m2 = (0, import_react.useCallback)(() => d2((e6) => e6 + 1), []);
|
|
2301
|
+
let a2 = qr(), s2 = $r(), l2 = Ci(e5?.categoryId), [u2, d2] = (0, import_react.useState)(0), p2 = (0, import_react.useMemo)(() => Mr(fi({ key: ti(s2), refresh: u2 !== 0 || n2 !== 0, warmupData: a2, fetchData: () => Er(`categories-context-load`, { feature: Cr.categories }, yi()) }), Fi, Ii), [u2, n2, s2, a2]), m2 = (0, import_react.useCallback)(() => d2((e6) => e6 + 1), []);
|
|
2325
2302
|
return (0, import_jsx_runtime.jsx)(Dr, { fallback: (0, import_jsx_runtime.jsx)(Si, { refetch: m2, children: i2 }), feature: Cr.categories, children: (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(xi, { refetch: m2, children: i2 }), children: (0, import_jsx_runtime.jsx)(Li, { categoriesPromise: p2, categoryIdsKey: l2, refetch: m2, children: i2 }) }) });
|
|
2326
2303
|
}
|
|
2327
2304
|
var zi = pn(`73a358c8-c2c8-4342-bf64-9079e92178fc`);
|