@loczer/storefront-sdk 0.182.0 → 0.183.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/StorefrontProvider.d.ts +18 -15
- package/dist/StorefrontProvider.d.ts.map +1 -1
- package/dist/StorefrontProvider.js +24 -34
- package/dist/chunks/booking-engine/dist/models/{Product.shared-CJ6vPb6n.js → Product.shared-CTuk4fiR.js} +2 -2
- package/dist/chunks/booking-engine/dist/schemas/{base-asset-PqhtKnZA.js → base-asset-B_Dm8_Vk.js} +1 -1
- package/dist/chunks/booking-engine/dist/schemas/{base-booking-BM3jZzqu.js → base-booking-DW8AEPKo.js} +1 -1
- package/dist/chunks/booking-engine/dist/schemas/{base-product-BJd4ttMP.js → base-product-1H8l2aUv.js} +1 -1
- package/dist/chunks/booking-engine/dist/{schemas-BNlwu75Z.js → schemas-34QQv0EH.js} +4 -4
- package/dist/chunks/ui/dist/Map/{MapContent--PwVTg2W.js → MapContent-QPkuTBvK.js} +2 -2
- package/dist/chunks/ui/dist/Map/{constants-DqrK8UkE.js → constants-BNmiJXfg.js} +1 -1
- package/dist/chunks/ui/dist/{Map-B45AxZ-D.js → Map-BXmRf5Ep.js} +3 -3
- package/dist/chunks/ui/dist/static/strings-1T2w7LqX.js +4 -0
- package/dist/components/AboutSection/index.d.ts +1 -6
- package/dist/components/AboutSection/index.d.ts.map +1 -1
- package/dist/components/AboutSection/index.js +43 -39
- package/dist/components/ContactSection/index.d.ts +1 -3
- package/dist/components/ContactSection/index.d.ts.map +1 -1
- package/dist/components/ContactSection/index.js +222 -164
- package/dist/components/Footer/index.d.ts +3 -4
- package/dist/components/Footer/index.d.ts.map +1 -1
- package/dist/components/Footer/index.js +98 -69
- package/dist/components/FulfillmentSection/index.d.ts.map +1 -1
- package/dist/components/FulfillmentSection/index.js +17 -16
- package/dist/components/Header/index.d.ts +1 -3
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +77 -72
- package/dist/components/Layout/index.d.ts +3 -1
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/Layout/index.js +45 -47
- package/dist/components/Map/index.js +1 -1
- package/dist/components/ProductPriceBadge/index.d.ts.map +1 -1
- package/dist/components/ProductPriceBadge/index.js +68 -60
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/fr.js +1 -1
- package/dist/index.d.ts +151 -150
- package/dist/index.js +62 -62
- package/dist/lib/cart.d.ts +4 -1
- package/dist/lib/cart.d.ts.map +1 -1
- package/dist/lib/cart.js +64 -40
- package/dist/lib/cartSummary.d.ts.map +1 -1
- package/dist/lib/cartSummary.js +4 -3
- package/dist/lib/checkoutSubmit.js +2 -2
- package/dist/lib/productVariants.d.ts.map +1 -1
- package/dist/lib/productVariants.js +20 -9
- package/dist/lib/storefrontAddress.d.ts +5 -0
- package/dist/lib/storefrontAddress.d.ts.map +1 -0
- package/dist/lib/storefrontAddress.js +24 -0
- package/dist/lib/storefrontAvailability.d.ts +6 -6
- package/dist/lib/storefrontContact.d.ts +10 -0
- package/dist/lib/storefrontContact.d.ts.map +1 -0
- package/dist/lib/storefrontContact.js +24 -0
- package/dist/lib/storefrontMissingValues.d.ts +5 -0
- package/dist/lib/storefrontMissingValues.d.ts.map +1 -0
- package/dist/lib/storefrontMissingValues.js +4 -0
- package/dist/lib/storefrontProducts.d.ts +23 -21
- package/dist/lib/storefrontProducts.d.ts.map +1 -1
- package/dist/lib/storefrontProducts.js +7 -5
- package/dist/lib/whatsapp.d.ts +8 -6
- package/dist/lib/whatsapp.d.ts.map +1 -1
- package/dist/lib/whatsapp.js +16 -43
- package/dist/pages/BookingPage.js +36 -36
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +126 -128
- package/dist/pages/ProductPage.js +160 -160
- package/dist/storefront.css +1 -1
- package/dist/storefrontSchemas.d.ts +14 -12
- package/dist/storefrontSchemas.d.ts.map +1 -1
- package/dist/storefrontSchemas.js +3 -2
- package/dist/ui/radio-group.d.ts +1 -1
- package/package.json +7 -6
- package/dist/chunks/ui/dist/static/strings-CPnO-KbA.js +0 -4
- package/dist/data/config.d.ts +0 -15
- package/dist/data/config.d.ts.map +0 -1
- package/dist/data/config.js +0 -24
- package/dist/static/strings.d.ts +0 -2
- package/dist/static/strings.d.ts.map +0 -1
- package/dist/static/strings.js +0 -4
|
@@ -19,6 +19,7 @@ export declare const loader: ({ ctx, params }: import('@rpcbase/client').LoaderA
|
|
|
19
19
|
id: string;
|
|
20
20
|
name: string;
|
|
21
21
|
slug?: string | undefined;
|
|
22
|
+
logoImageId?: string | undefined;
|
|
22
23
|
timeZone?: string | undefined;
|
|
23
24
|
url?: string | undefined;
|
|
24
25
|
googleMapsLink?: string | undefined;
|
|
@@ -35,7 +36,7 @@ export declare const loader: ({ ctx, params }: import('@rpcbase/client').LoaderA
|
|
|
35
36
|
status: "unpublished" | "published";
|
|
36
37
|
checkoutMode: "auto_approve_when_possible" | "manual_approval_required";
|
|
37
38
|
availabilityDisplay: {
|
|
38
|
-
defaultMode: "
|
|
39
|
+
defaultMode: "fewRemaining" | "fewRemainingCounts" | "remainingCounts" | "soldOutAndFewRemaining" | "soldOutOnly";
|
|
39
40
|
defaultFewRemainingThreshold?: number | undefined;
|
|
40
41
|
};
|
|
41
42
|
enabled: boolean;
|
|
@@ -45,7 +46,7 @@ export declare const loader: ({ ctx, params }: import('@rpcbase/client').LoaderA
|
|
|
45
46
|
};
|
|
46
47
|
bookingEngine: {
|
|
47
48
|
availabilityDisplay: {
|
|
48
|
-
defaultMode: "
|
|
49
|
+
defaultMode: "fewRemaining" | "fewRemainingCounts" | "remainingCounts" | "soldOutAndFewRemaining" | "soldOutOnly";
|
|
49
50
|
defaultFewRemainingThreshold?: number | undefined;
|
|
50
51
|
};
|
|
51
52
|
holdSettings: {
|
|
@@ -53,9 +54,9 @@ export declare const loader: ({ ctx, params }: import('@rpcbase/client').LoaderA
|
|
|
53
54
|
defaultTtlMinutes: number;
|
|
54
55
|
};
|
|
55
56
|
pricing: {
|
|
56
|
-
baseUnit: "
|
|
57
|
+
baseUnit: "day" | "half_day" | "hour" | "month" | "week";
|
|
57
58
|
rentalUnits: {
|
|
58
|
-
unit: "
|
|
59
|
+
unit: "day" | "half_day" | "hour" | "month" | "week";
|
|
59
60
|
durationHours: number;
|
|
60
61
|
label?: Record<string, {
|
|
61
62
|
[x: string]: unknown;
|
|
@@ -109,7 +110,7 @@ export declare const loader: ({ ctx, params }: import('@rpcbase/client').LoaderA
|
|
|
109
110
|
extraAmount: number;
|
|
110
111
|
}[] | undefined;
|
|
111
112
|
};
|
|
112
|
-
currency: "
|
|
113
|
+
currency: "CHF" | "EUR" | "GBP" | "USD";
|
|
113
114
|
checkout: {
|
|
114
115
|
mode: "auto_approve_when_possible" | "manual_approval_required";
|
|
115
116
|
dynamicOptions?: {
|
|
@@ -251,6 +252,7 @@ export declare function useStorefrontConfig(): {
|
|
|
251
252
|
id: string;
|
|
252
253
|
name: string;
|
|
253
254
|
slug?: string | undefined;
|
|
255
|
+
logoImageId?: string | undefined;
|
|
254
256
|
timeZone?: string | undefined;
|
|
255
257
|
url?: string | undefined;
|
|
256
258
|
googleMapsLink?: string | undefined;
|
|
@@ -267,7 +269,7 @@ export declare function useStorefrontConfig(): {
|
|
|
267
269
|
status: "unpublished" | "published";
|
|
268
270
|
checkoutMode: "auto_approve_when_possible" | "manual_approval_required";
|
|
269
271
|
availabilityDisplay: {
|
|
270
|
-
defaultMode: "
|
|
272
|
+
defaultMode: "fewRemaining" | "fewRemainingCounts" | "remainingCounts" | "soldOutAndFewRemaining" | "soldOutOnly";
|
|
271
273
|
defaultFewRemainingThreshold?: number | undefined;
|
|
272
274
|
};
|
|
273
275
|
enabled: boolean;
|
|
@@ -277,7 +279,7 @@ export declare function useStorefrontConfig(): {
|
|
|
277
279
|
};
|
|
278
280
|
bookingEngine: {
|
|
279
281
|
availabilityDisplay: {
|
|
280
|
-
defaultMode: "
|
|
282
|
+
defaultMode: "fewRemaining" | "fewRemainingCounts" | "remainingCounts" | "soldOutAndFewRemaining" | "soldOutOnly";
|
|
281
283
|
defaultFewRemainingThreshold?: number | undefined;
|
|
282
284
|
};
|
|
283
285
|
holdSettings: {
|
|
@@ -285,9 +287,9 @@ export declare function useStorefrontConfig(): {
|
|
|
285
287
|
defaultTtlMinutes: number;
|
|
286
288
|
};
|
|
287
289
|
pricing: {
|
|
288
|
-
baseUnit: "
|
|
290
|
+
baseUnit: "day" | "half_day" | "hour" | "month" | "week";
|
|
289
291
|
rentalUnits: {
|
|
290
|
-
unit: "
|
|
292
|
+
unit: "day" | "half_day" | "hour" | "month" | "week";
|
|
291
293
|
durationHours: number;
|
|
292
294
|
label?: Record<string, {
|
|
293
295
|
[x: string]: unknown;
|
|
@@ -341,7 +343,7 @@ export declare function useStorefrontConfig(): {
|
|
|
341
343
|
extraAmount: number;
|
|
342
344
|
}[] | undefined;
|
|
343
345
|
};
|
|
344
|
-
currency: "
|
|
346
|
+
currency: "CHF" | "EUR" | "GBP" | "USD";
|
|
345
347
|
checkout: {
|
|
346
348
|
mode: "auto_approve_when_possible" | "manual_approval_required";
|
|
347
349
|
dynamicOptions?: {
|
|
@@ -473,6 +475,7 @@ export declare function useStorefrontConfig(): {
|
|
|
473
475
|
id: string;
|
|
474
476
|
name: string;
|
|
475
477
|
slug?: string | undefined;
|
|
478
|
+
logoImageId?: string | undefined;
|
|
476
479
|
timeZone?: string | undefined;
|
|
477
480
|
url?: string | undefined;
|
|
478
481
|
googleMapsLink?: string | undefined;
|
|
@@ -489,7 +492,7 @@ export declare function useStorefrontConfig(): {
|
|
|
489
492
|
status: "unpublished" | "published";
|
|
490
493
|
checkoutMode: "auto_approve_when_possible" | "manual_approval_required";
|
|
491
494
|
availabilityDisplay: {
|
|
492
|
-
defaultMode: "
|
|
495
|
+
defaultMode: "fewRemaining" | "fewRemainingCounts" | "remainingCounts" | "soldOutAndFewRemaining" | "soldOutOnly";
|
|
493
496
|
defaultFewRemainingThreshold?: number | undefined;
|
|
494
497
|
};
|
|
495
498
|
enabled: boolean;
|
|
@@ -499,7 +502,7 @@ export declare function useStorefrontConfig(): {
|
|
|
499
502
|
};
|
|
500
503
|
bookingEngine: {
|
|
501
504
|
availabilityDisplay: {
|
|
502
|
-
defaultMode: "
|
|
505
|
+
defaultMode: "fewRemaining" | "fewRemainingCounts" | "remainingCounts" | "soldOutAndFewRemaining" | "soldOutOnly";
|
|
503
506
|
defaultFewRemainingThreshold?: number | undefined;
|
|
504
507
|
};
|
|
505
508
|
holdSettings: {
|
|
@@ -507,9 +510,9 @@ export declare function useStorefrontConfig(): {
|
|
|
507
510
|
defaultTtlMinutes: number;
|
|
508
511
|
};
|
|
509
512
|
pricing: {
|
|
510
|
-
baseUnit: "
|
|
513
|
+
baseUnit: "day" | "half_day" | "hour" | "month" | "week";
|
|
511
514
|
rentalUnits: {
|
|
512
|
-
unit: "
|
|
515
|
+
unit: "day" | "half_day" | "hour" | "month" | "week";
|
|
513
516
|
durationHours: number;
|
|
514
517
|
label?: Record<string, {
|
|
515
518
|
[x: string]: unknown;
|
|
@@ -563,7 +566,7 @@ export declare function useStorefrontConfig(): {
|
|
|
563
566
|
extraAmount: number;
|
|
564
567
|
}[] | undefined;
|
|
565
568
|
};
|
|
566
|
-
currency: "
|
|
569
|
+
currency: "CHF" | "EUR" | "GBP" | "USD";
|
|
567
570
|
checkout: {
|
|
568
571
|
mode: "auto_approve_when_possible" | "manual_approval_required";
|
|
569
572
|
dynamicOptions?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorefrontProvider.d.ts","sourceRoot":"","sources":["../src/StorefrontProvider.tsx"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,sBAAsB,EAC5B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAiC,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAEjG,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAA;AAGvB,KAAK,sBAAsB,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,uBAAuB,EAAE,uBAAuB,CAAA;IAChD,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,WAAW,EAAE,gBAAgB,EAAE,CAAA;IAC/B,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,kBAAkB,EAAE,gBAAgB,EAAE,CAAA;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,sBAAsB,CAAA;CACjC,CAAA;AAKD,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"StorefrontProvider.d.ts","sourceRoot":"","sources":["../src/StorefrontProvider.tsx"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,sBAAsB,EAC5B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAiC,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAEjG,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAA;AAGvB,KAAK,sBAAsB,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,uBAAuB,EAAE,uBAAuB,CAAA;IAChD,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,WAAW,EAAE,gBAAgB,EAAE,CAAA;IAC/B,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,kBAAkB,EAAE,gBAAgB,EAAE,CAAA;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,sBAAsB,CAAA;CACjC,CAAA;AAKD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DA,CAAA;AAGnB,MAAM,CAAC,OAAO,UAAU,kBAAkB,4CAqBzC;AAED,wBAAgB,aAAa,2BAQ5B;AAED,wBAAgB,qBAAqB,uCAEpC;AAED,wBAAgB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMlC;AAED,wBAAgB,8BAA8B,IAAI,sBAAsB,CAGvE;AAED,wBAAgB,qBAAqB;;;EAGpC;AAED,wBAAgB,4BAA4B;;;EAG3C"}
|
|
@@ -15,52 +15,36 @@ var h = u(void 0), g = (async ({ ctx: o, params: l }) => {
|
|
|
15
15
|
statusText: "Store not found"
|
|
16
16
|
});
|
|
17
17
|
try {
|
|
18
|
-
let l = p.get(
|
|
19
|
-
ok: !0,
|
|
20
|
-
productsResponse: e
|
|
21
|
-
})).catch((e) => ({
|
|
22
|
-
ok: !1,
|
|
23
|
-
productsError: e
|
|
24
|
-
})), d = await p.get("/api/public/storefront/config", { storeSlug: u }, o), f = typeof d == "object" && d ? d : {};
|
|
18
|
+
let [l, d] = await Promise.all([p.get("/api/public/storefront/config", { storeSlug: u }, o), p.get(i, { storeSlug: u }, o)]), f = typeof l == "object" && l ? l : {};
|
|
25
19
|
if (f.success !== !0) throw new Response("Store not found", {
|
|
26
20
|
status: 404,
|
|
27
21
|
statusText: "Store not found"
|
|
28
22
|
});
|
|
29
23
|
let m = e.safeParse(f.storefrontConfiguration);
|
|
30
24
|
if (!m.success) throw console.error("Invalid storefront config received", m.error.flatten()), new Response("Storefront config invalid", { status: 500 });
|
|
31
|
-
let h =
|
|
32
|
-
if (!
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
let i = e.data.products;
|
|
39
|
-
h = n(i?.bikes ?? []), g = t(i?.accessories ?? []);
|
|
40
|
-
let a = r({
|
|
41
|
-
bikes: h,
|
|
42
|
-
accessories: g
|
|
43
|
-
});
|
|
44
|
-
_ = a.bikes, v = a.accessories;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
let b = m.data.workspace?.languages ?? null, x = m.data.workspace?.workspaceLanguage ?? null, S = o?.req ? c({
|
|
25
|
+
let h = a.safeParse(d);
|
|
26
|
+
if (!h.success) throw console.error("Invalid storefront products received", h.error.flatten()), new Response("Storefront products invalid", { status: 500 });
|
|
27
|
+
if (!h.data.success) throw console.error("Storefront products unavailable", h.data.message ?? "Unknown error"), new Response("Storefront products unavailable", { status: 500 });
|
|
28
|
+
let g = n(h.data.products.bikes), _ = t(h.data.products.accessories), v = r({
|
|
29
|
+
bikes: g,
|
|
30
|
+
accessories: _
|
|
31
|
+
}), y = m.data.workspace?.languages ?? null, b = m.data.workspace?.workspaceLanguage ?? null, x = o?.req ? c({
|
|
48
32
|
cookieHeader: o.req.headers?.cookie,
|
|
49
33
|
acceptLanguageHeader: o.req.headers?.["accept-language"],
|
|
50
|
-
configuredLanguages:
|
|
51
|
-
configuredFallbackLanguage:
|
|
52
|
-
}) : s(
|
|
34
|
+
configuredLanguages: y,
|
|
35
|
+
configuredFallbackLanguage: b
|
|
36
|
+
}) : s(y, b);
|
|
53
37
|
return {
|
|
54
38
|
storeSlug: u,
|
|
55
39
|
storefrontConfiguration: m.data,
|
|
56
|
-
bikes:
|
|
57
|
-
accessories:
|
|
58
|
-
bookingBikes:
|
|
59
|
-
bookingAccessories: v,
|
|
60
|
-
language:
|
|
40
|
+
bikes: g,
|
|
41
|
+
accessories: _,
|
|
42
|
+
bookingBikes: v.bikes,
|
|
43
|
+
bookingAccessories: v.accessories,
|
|
44
|
+
language: x
|
|
61
45
|
};
|
|
62
46
|
} catch (e) {
|
|
63
|
-
throw e instanceof Response ? e : (console.error("Error
|
|
47
|
+
throw e instanceof Response ? e : (console.error("Error loading storefront:", e), new Response("Storefront unavailable", { status: 500 }));
|
|
64
48
|
}
|
|
65
49
|
});
|
|
66
50
|
function _() {
|
|
@@ -80,7 +64,13 @@ function _() {
|
|
|
80
64
|
initialLanguage: e.language,
|
|
81
65
|
configuredLanguages: e.storefrontConfiguration.workspace?.languages,
|
|
82
66
|
configuredFallbackLanguage: e.storefrontConfiguration.workspace?.workspaceLanguage,
|
|
83
|
-
children: /* @__PURE__ */ f(l, {
|
|
67
|
+
children: /* @__PURE__ */ f(l, {
|
|
68
|
+
storefrontConfiguration: e.storefrontConfiguration,
|
|
69
|
+
storefrontProducts: {
|
|
70
|
+
bikes: e.bikes,
|
|
71
|
+
accessories: e.accessories
|
|
72
|
+
}
|
|
73
|
+
})
|
|
84
74
|
})
|
|
85
75
|
});
|
|
86
76
|
}
|
|
@@ -43,10 +43,10 @@ var m = o.object({
|
|
|
43
43
|
depositAmount: i.default(0),
|
|
44
44
|
insurance: o.object({
|
|
45
45
|
enabled: o.boolean().default(!1),
|
|
46
|
-
|
|
46
|
+
pricePerDayMinor: i.default(0)
|
|
47
47
|
}).default({
|
|
48
48
|
enabled: !1,
|
|
49
|
-
|
|
49
|
+
pricePerDayMinor: 0
|
|
50
50
|
}),
|
|
51
51
|
bufferStartMinutes: o.number().int().min(0).optional(),
|
|
52
52
|
bufferEndMinutes: o.number().int().min(0).optional(),
|
package/dist/chunks/booking-engine/dist/schemas/{base-asset-PqhtKnZA.js → base-asset-B_Dm8_Vk.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { booleanNumberRecordSchema as e, identifierSchema as t, isoDateTimeSchema as n } from "../models/types-rIp4ReXN.js";
|
|
2
|
-
import { productVariantIdentifierSchema as r } from "../models/Product.shared-
|
|
2
|
+
import { productVariantIdentifierSchema as r } from "../models/Product.shared-CTuk4fiR.js";
|
|
3
3
|
import { z as i } from "zod";
|
|
4
4
|
//#region ../booking-engine/dist/schemas/base-asset.js
|
|
5
5
|
var a = i.enum([
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { identifierSchema as e, isoDateTimeSchema as t, objectIdStringSchema as n, ulidStringSchema as r } from "../models/types-rIp4ReXN.js";
|
|
2
2
|
import { moneyMinorSchema as i } from "./money-CVoCY4of.js";
|
|
3
|
-
import { productKindSchema as a } from "../models/Product.shared-
|
|
3
|
+
import { productKindSchema as a } from "../models/Product.shared-CTuk4fiR.js";
|
|
4
4
|
import { richTextSchema as o } from "./rich-text-DTRh7U3z.js";
|
|
5
5
|
import { cancellationPolicySchema as s } from "./booking-engine-configuration-D02MRF9U.js";
|
|
6
6
|
import { z as c } from "zod";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createLocalizedStringEntry as e, getLocalizedStringValue as t, localizedStringArraySchema as n, localizedStringEntrySchema as r, localizedStringSchema as i } from "./models/LocalizedString-D_TRgAdr.js";
|
|
2
2
|
import { currencyCodeSchema as a, currencyMinorUnitDigits as o, majorToMinor as s, minorToMajor as c, moneyMinorSchema as l, signedMoneyMinorSchema as u } from "./schemas/money-CVoCY4of.js";
|
|
3
3
|
import { priceSchema as d, priceUnitSchema as f } from "./models/Price-DCAgqkKh.js";
|
|
4
|
-
import { PRODUCT_VARIANT_CODE_IDENTIFIER_KIND as p, PRODUCT_VARIANT_CODE_MAX_LENGTH as m, accessoryProductSchema as h, bikeProductSchema as g, eBikeProductSchema as _, isProductVariantCodeIdentifierKind as v, productKindSchema as y, productSchema as b, productStorefrontDisplayModeSchema as x, productVariantAttributeSchema as S, productVariantCodeSchema as C, productVariantIdentifierSchema as w, productVariantSchema as T } from "./models/Product.shared-
|
|
4
|
+
import { PRODUCT_VARIANT_CODE_IDENTIFIER_KIND as p, PRODUCT_VARIANT_CODE_MAX_LENGTH as m, accessoryProductSchema as h, bikeProductSchema as g, eBikeProductSchema as _, isProductVariantCodeIdentifierKind as v, productKindSchema as y, productSchema as b, productStorefrontDisplayModeSchema as x, productVariantAttributeSchema as S, productVariantCodeSchema as C, productVariantIdentifierSchema as w, productVariantSchema as T } from "./models/Product.shared-CTuk4fiR.js";
|
|
5
5
|
import { richTextJsonDocSchema as E, richTextSchema as D, richTextVersionSchema as O } from "./schemas/rich-text-DTRh7U3z.js";
|
|
6
6
|
import { isoDateSchema as k, shopConfigurationSchema as A, shopExtraTimeSlotRuleSchema as j, shopOpeningDayIndexSchema as M, shopOpeningDaySchema as N, shopOpeningHoursOverrideSchema as P, shopOpeningHoursPeriodSchema as F, shopOpeningSlotSchema as I, timeOfDaySchema as L } from "./schemas/shop-opening-hours-BlLD1gfz.js";
|
|
7
7
|
import { DEFAULT_CANCELLATION_POLICY as R, DEFAULT_PAYMENT_POLICIES as z, cancellationPolicySchema as B, cancellationPolicyTierSchema as V, paymentPoliciesSchema as H } from "./schemas/booking-engine-configuration-D02MRF9U.js";
|
|
8
8
|
import { fulfillmentModeSchema as U, publicBookingEngineConfigurationSchema as W, publicCheckoutConfigurationSchema as G, publicCheckoutDynamicOptionsSchema as K } from "./schemas/public-booking-engine-configuration-BnJ_H-p1.js";
|
|
9
9
|
import { bookingCustomerInputSchema as q, bookingDeliveryOptionSchema as J, bookingScheduleInputSchema as Y, cartItemInputSchema as X, createBookingInputBaseSchema as Z, createBookingInputSchema as Q, validateBookingDeliveryAddress as $ } from "./schemas/cart-inputs-9vM8GCrc.js";
|
|
10
|
-
import "./schemas/base-product-
|
|
11
|
-
import { baseAssetSchema as ee, baseAssetStatusSchema as te } from "./schemas/base-asset-
|
|
12
|
-
import { baseBookingItemSchema as ne, baseBookingSchema as re, baseBookingStateSchema as ie } from "./schemas/base-booking-
|
|
10
|
+
import "./schemas/base-product-1H8l2aUv.js";
|
|
11
|
+
import { baseAssetSchema as ee, baseAssetStatusSchema as te } from "./schemas/base-asset-B_Dm8_Vk.js";
|
|
12
|
+
import { baseBookingItemSchema as ne, baseBookingSchema as re, baseBookingStateSchema as ie } from "./schemas/base-booking-DW8AEPKo.js";
|
|
13
13
|
export { R as DEFAULT_CANCELLATION_POLICY, z as DEFAULT_PAYMENT_POLICIES, p as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, m as PRODUCT_VARIANT_CODE_MAX_LENGTH, h as accessoryProductSchema, ee as baseAssetSchema, te as baseAssetStatusSchema, ne as baseBookingItemSchema, re as baseBookingSchema, ie as baseBookingStateSchema, g as bikeProductSchema, q as bookingCustomerInputSchema, J as bookingDeliveryOptionSchema, Y as bookingScheduleInputSchema, B as cancellationPolicySchema, V as cancellationPolicyTierSchema, X as cartItemInputSchema, Z as createBookingInputBaseSchema, Q as createBookingInputSchema, e as createLocalizedStringEntry, a as currencyCodeSchema, o as currencyMinorUnitDigits, _ as eBikeProductSchema, U as fulfillmentModeSchema, t as getLocalizedStringValue, v as isProductVariantCodeIdentifierKind, k as isoDateSchema, n as localizedStringArraySchema, r as localizedStringEntrySchema, i as localizedStringSchema, s as majorToMinor, c as minorToMajor, l as moneyMinorSchema, H as paymentPoliciesSchema, d as priceSchema, f as priceUnitSchema, y as productKindSchema, b as productSchema, x as productStorefrontDisplayModeSchema, S as productVariantAttributeSchema, C as productVariantCodeSchema, w as productVariantIdentifierSchema, T as productVariantSchema, W as publicBookingEngineConfigurationSchema, G as publicCheckoutConfigurationSchema, K as publicCheckoutDynamicOptionsSchema, E as richTextJsonDocSchema, D as richTextSchema, O as richTextVersionSchema, A as shopConfigurationSchema, j as shopExtraTimeSlotRuleSchema, M as shopOpeningDayIndexSchema, N as shopOpeningDaySchema, P as shopOpeningHoursOverrideSchema, F as shopOpeningHoursPeriodSchema, I as shopOpeningSlotSchema, u as signedMoneyMinorSchema, L as timeOfDaySchema, $ as validateBookingDeliveryAddress };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn as e } from "../lib/utils-CoCD4bw8.js";
|
|
2
2
|
import { __toESM as t } from "../_virtual/_rolldown/runtime-2EUTAT-G.js";
|
|
3
|
-
import { DEFAULT_MAP_SKELETON_COLOR as n } from "./constants-
|
|
4
|
-
import {
|
|
3
|
+
import { DEFAULT_MAP_SKELETON_COLOR as n } from "./constants-BNmiJXfg.js";
|
|
4
|
+
import { DEFAULT_MAP_CENTER as r } from "../static/strings-1T2w7LqX.js";
|
|
5
5
|
import { Component as i, useEffect as a, useRef as o, useState as s } from "react";
|
|
6
6
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
7
|
//#region ../ui/dist/Map/MapContent.js
|
|
@@ -11,10 +11,10 @@ var l = ({ className: t, style: n, color: r }) => /* @__PURE__ */ c("div", {
|
|
|
11
11
|
className: "absolute inset-0 transition-opacity duration-500 ease-out opacity-100",
|
|
12
12
|
children: /* @__PURE__ */ s("div", {
|
|
13
13
|
className: "h-full w-full",
|
|
14
|
-
style: { backgroundColor: r ?? "
|
|
14
|
+
style: { backgroundColor: r ?? "rgb(201 221 176)" }
|
|
15
15
|
})
|
|
16
16
|
}), /* @__PURE__ */ s("div", { className: "h-full w-full transition-opacity duration-500 ease-out pointer-events-none opacity-0" })]
|
|
17
|
-
}), u = r(() => import("./Map/MapContent
|
|
17
|
+
}), u = r(() => import("./Map/MapContent-QPkuTBvK.js")), d = (e) => {
|
|
18
18
|
let r = a(null), [c, d] = o(!1);
|
|
19
19
|
i(() => {
|
|
20
20
|
if (t()) return;
|
|
@@ -37,7 +37,7 @@ var l = ({ className: t, style: n, color: r }) => /* @__PURE__ */ c("div", {
|
|
|
37
37
|
let f = /* @__PURE__ */ s(l, {
|
|
38
38
|
className: e.className,
|
|
39
39
|
style: e.style,
|
|
40
|
-
color: e.skeletonColor ?? "
|
|
40
|
+
color: e.skeletonColor ?? "rgb(201 221 176)"
|
|
41
41
|
});
|
|
42
42
|
return /* @__PURE__ */ s("div", {
|
|
43
43
|
ref: r,
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
type AboutSectionProps = {
|
|
3
|
-
preset: StorefrontPreset;
|
|
4
|
-
};
|
|
5
|
-
export declare function AboutSection({ preset }: AboutSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export {};
|
|
1
|
+
export declare function AboutSection(): import("react/jsx-runtime").JSX.Element;
|
|
7
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AboutSection/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AboutSection/index.tsx"],"names":[],"mappings":"AAeA,wBAAgB,YAAY,4CAyH3B"}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { cn as e } from "../../lib/utils.js";
|
|
2
2
|
import { getLocalizedEntry as t } from "../../localization.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { UNCONFIGURED_SHOP_MAP_CENTER as n } from "../../lib/storefrontMissingValues.js";
|
|
4
|
+
import { useStorefront as r } from "../../StorefrontProvider.js";
|
|
5
5
|
import { createMarkerElement as i } from "../Map/createMarkerElement.js";
|
|
6
6
|
import { Map as a } from "../Map/index.js";
|
|
7
7
|
import { useEffect as o, useMemo as s, useRef as c, useState as l } from "react";
|
|
8
8
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
9
|
import { useTranslation as p } from "react-i18next";
|
|
10
10
|
//#region src/components/AboutSection/index.tsx
|
|
11
|
-
function m(
|
|
12
|
-
let { i18n:
|
|
13
|
-
let e =
|
|
14
|
-
return e ? [e[1], e[0]] :
|
|
15
|
-
}, [
|
|
16
|
-
coords:
|
|
11
|
+
function m() {
|
|
12
|
+
let { i18n: m, t: h } = p(), { storefrontConfiguration: g, mapboxToken: _ } = r(), v = g.workspace?.workspaceLanguage, [y, b] = l(!1), [x, S] = l(!1), C = c(null), w = t(g.content?.about, m.language, v)?.html?.trim(), T = s(() => {
|
|
13
|
+
let e = g.shop.gpsCoordinates;
|
|
14
|
+
return e ? [e[1], e[0]] : null;
|
|
15
|
+
}, [g.shop.gpsCoordinates]), E = T ?? n, D = s(() => i(), []), O = g.shop.address?.trim() ?? "", k = s(() => T ? {
|
|
16
|
+
coords: T,
|
|
17
17
|
element: D || void 0,
|
|
18
18
|
offset: [0, -25.5],
|
|
19
|
-
popupHTML:
|
|
19
|
+
popupHTML: O || "[Missing shop address]",
|
|
20
20
|
popupCloseButton: !1
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
} : null, [
|
|
22
|
+
O,
|
|
23
|
+
T,
|
|
24
24
|
D
|
|
25
|
-
]),
|
|
25
|
+
]), A = s(() => k ? [k] : [], [k]);
|
|
26
26
|
return o(() => {
|
|
27
|
-
|
|
28
|
-
}, [
|
|
29
|
-
if (!
|
|
30
|
-
|
|
27
|
+
b(!1);
|
|
28
|
+
}, [w]), o(() => {
|
|
29
|
+
if (!w) {
|
|
30
|
+
S(!1);
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
-
let e =
|
|
33
|
+
let e = C.current;
|
|
34
34
|
if (!e) return;
|
|
35
35
|
let t = () => {
|
|
36
36
|
let t = e.scrollHeight > 321;
|
|
37
|
-
|
|
37
|
+
S(t);
|
|
38
38
|
};
|
|
39
39
|
return t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
|
|
40
|
-
}, [
|
|
40
|
+
}, [w]), /* @__PURE__ */ d("section", {
|
|
41
41
|
id: "about",
|
|
42
42
|
className: "border-t border-slate-200 bg-white scroll-mt-16 sm:scroll-mt-20",
|
|
43
43
|
children: /* @__PURE__ */ f("div", {
|
|
@@ -49,45 +49,49 @@ function m({ preset: m }) {
|
|
|
49
49
|
children: [
|
|
50
50
|
/* @__PURE__ */ d("p", {
|
|
51
51
|
className: "text-2xs font-medium uppercase tracking-[0.08em] text-slate-500",
|
|
52
|
-
children: /* @__PURE__ */ d("span", { children:
|
|
52
|
+
children: /* @__PURE__ */ d("span", { children: h("about_section_title") })
|
|
53
53
|
}),
|
|
54
54
|
/* @__PURE__ */ d("h2", {
|
|
55
55
|
className: "mt-2 text-2xl font-semibold tracking-tight text-slate-950 sm:text-3xl",
|
|
56
|
-
children: /* @__PURE__ */ d("span", { children:
|
|
56
|
+
children: /* @__PURE__ */ d("span", { children: h("about_section_heading") })
|
|
57
57
|
}),
|
|
58
|
-
|
|
58
|
+
w ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ f("div", {
|
|
59
59
|
className: "relative mt-4",
|
|
60
60
|
children: [/* @__PURE__ */ d("div", {
|
|
61
|
-
ref:
|
|
62
|
-
className: e("overflow-hidden text-sm leading-6 text-slate-700 transition-[max-height] duration-300 ease-out sm:text-base [&_a]:text-slate-900 [&_a]:underline [&_blockquote]:border-l-2 [&_blockquote]:border-slate-300 [&_blockquote]:pl-4 [&_h1]:text-2xl [&_h1]:font-semibold [&_h2]:text-xl [&_h2]:font-semibold [&_h3]:text-lg [&_h3]:font-semibold [&_li]:my-1 [&_ol]:list-decimal [&_ol]:pl-6 [&_p]:my-2 [&_ul]:list-disc [&_ul]:pl-6", !
|
|
63
|
-
dangerouslySetInnerHTML: { __html:
|
|
64
|
-
}), !
|
|
61
|
+
ref: C,
|
|
62
|
+
className: e("overflow-hidden text-sm leading-6 text-slate-700 transition-[max-height] duration-300 ease-out sm:text-base [&_a]:text-slate-900 [&_a]:underline [&_blockquote]:border-l-2 [&_blockquote]:border-slate-300 [&_blockquote]:pl-4 [&_h1]:text-2xl [&_h1]:font-semibold [&_h2]:text-xl [&_h2]:font-semibold [&_h3]:text-lg [&_h3]:font-semibold [&_li]:my-1 [&_ol]:list-decimal [&_ol]:pl-6 [&_p]:my-2 [&_ul]:list-disc [&_ul]:pl-6", !y && "max-h-[320px]"),
|
|
63
|
+
dangerouslySetInnerHTML: { __html: w }
|
|
64
|
+
}), !y && x && /* @__PURE__ */ d("div", {
|
|
65
65
|
"aria-hidden": !0,
|
|
66
66
|
className: "pointer-events-none absolute inset-x-0 bottom-0 h-14 bg-gradient-to-b from-transparent to-white"
|
|
67
67
|
})]
|
|
68
|
-
}),
|
|
68
|
+
}), x ? /* @__PURE__ */ d("div", {
|
|
69
69
|
className: "mt-2",
|
|
70
70
|
children: /* @__PURE__ */ d("button", {
|
|
71
71
|
type: "button",
|
|
72
|
-
onClick: () =>
|
|
72
|
+
onClick: () => b((e) => !e),
|
|
73
73
|
className: "text-primary hover:underline text-sm cursor-pointer",
|
|
74
|
-
children:
|
|
74
|
+
children: h(y ? "testimonials.see_less" : "testimonials.see_more")
|
|
75
75
|
})
|
|
76
76
|
}) : null] }) : /* @__PURE__ */ d("p", {
|
|
77
77
|
className: "mt-4 text-sm leading-6 text-slate-700 sm:text-base",
|
|
78
|
-
children: /* @__PURE__ */ d("span", { children:
|
|
78
|
+
children: /* @__PURE__ */ d("span", { children: h("about_section_fallback") })
|
|
79
79
|
})
|
|
80
80
|
]
|
|
81
81
|
})
|
|
82
82
|
}), /* @__PURE__ */ d("div", {
|
|
83
|
-
className: "hidden lg:block lg:h-full
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
83
|
+
className: "relative hidden lg:block lg:h-full",
|
|
84
|
+
"data-testid": "storefront-about-map",
|
|
85
|
+
children: /* @__PURE__ */ d("div", {
|
|
86
|
+
className: "h-full [&>div]:h-full",
|
|
87
|
+
children: /* @__PURE__ */ d(a, {
|
|
88
|
+
mapboxToken: _,
|
|
89
|
+
initialCenter: E,
|
|
90
|
+
initialZoom: T ? 10 : 1,
|
|
91
|
+
markers: A,
|
|
92
|
+
showNavigationControl: !1,
|
|
93
|
+
className: "overflow-clip h-full min-h-[420px] w-full"
|
|
94
|
+
})
|
|
91
95
|
})
|
|
92
96
|
})]
|
|
93
97
|
})
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function ContactSection({ preset, storeSlug }: {
|
|
3
|
-
preset: StorefrontPreset;
|
|
1
|
+
export declare function ContactSection({ storeSlug }: {
|
|
4
2
|
storeSlug: string;
|
|
5
3
|
}): import("react/jsx-runtime").JSX.Element;
|
|
6
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ContactSection/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ContactSection/index.tsx"],"names":[],"mappings":"AAmCA,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,2CAiUlE"}
|