@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.
Files changed (77) hide show
  1. package/dist/StorefrontProvider.d.ts +18 -15
  2. package/dist/StorefrontProvider.d.ts.map +1 -1
  3. package/dist/StorefrontProvider.js +24 -34
  4. package/dist/chunks/booking-engine/dist/models/{Product.shared-CJ6vPb6n.js → Product.shared-CTuk4fiR.js} +2 -2
  5. package/dist/chunks/booking-engine/dist/schemas/{base-asset-PqhtKnZA.js → base-asset-B_Dm8_Vk.js} +1 -1
  6. package/dist/chunks/booking-engine/dist/schemas/{base-booking-BM3jZzqu.js → base-booking-DW8AEPKo.js} +1 -1
  7. package/dist/chunks/booking-engine/dist/schemas/{base-product-BJd4ttMP.js → base-product-1H8l2aUv.js} +1 -1
  8. package/dist/chunks/booking-engine/dist/{schemas-BNlwu75Z.js → schemas-34QQv0EH.js} +4 -4
  9. package/dist/chunks/ui/dist/Map/{MapContent--PwVTg2W.js → MapContent-QPkuTBvK.js} +2 -2
  10. package/dist/chunks/ui/dist/Map/{constants-DqrK8UkE.js → constants-BNmiJXfg.js} +1 -1
  11. package/dist/chunks/ui/dist/{Map-B45AxZ-D.js → Map-BXmRf5Ep.js} +3 -3
  12. package/dist/chunks/ui/dist/static/strings-1T2w7LqX.js +4 -0
  13. package/dist/components/AboutSection/index.d.ts +1 -6
  14. package/dist/components/AboutSection/index.d.ts.map +1 -1
  15. package/dist/components/AboutSection/index.js +43 -39
  16. package/dist/components/ContactSection/index.d.ts +1 -3
  17. package/dist/components/ContactSection/index.d.ts.map +1 -1
  18. package/dist/components/ContactSection/index.js +222 -164
  19. package/dist/components/Footer/index.d.ts +3 -4
  20. package/dist/components/Footer/index.d.ts.map +1 -1
  21. package/dist/components/Footer/index.js +98 -69
  22. package/dist/components/FulfillmentSection/index.d.ts.map +1 -1
  23. package/dist/components/FulfillmentSection/index.js +17 -16
  24. package/dist/components/Header/index.d.ts +1 -3
  25. package/dist/components/Header/index.d.ts.map +1 -1
  26. package/dist/components/Header/index.js +77 -72
  27. package/dist/components/Layout/index.d.ts +3 -1
  28. package/dist/components/Layout/index.d.ts.map +1 -1
  29. package/dist/components/Layout/index.js +45 -47
  30. package/dist/components/Map/index.js +1 -1
  31. package/dist/components/ProductPriceBadge/index.d.ts.map +1 -1
  32. package/dist/components/ProductPriceBadge/index.js +68 -60
  33. package/dist/i18n/I18nProvider.js +1 -1
  34. package/dist/i18n/fr.js +1 -1
  35. package/dist/index.d.ts +151 -150
  36. package/dist/index.js +62 -62
  37. package/dist/lib/cart.d.ts +4 -1
  38. package/dist/lib/cart.d.ts.map +1 -1
  39. package/dist/lib/cart.js +64 -40
  40. package/dist/lib/cartSummary.d.ts.map +1 -1
  41. package/dist/lib/cartSummary.js +4 -3
  42. package/dist/lib/checkoutSubmit.js +2 -2
  43. package/dist/lib/productVariants.d.ts.map +1 -1
  44. package/dist/lib/productVariants.js +20 -9
  45. package/dist/lib/storefrontAddress.d.ts +5 -0
  46. package/dist/lib/storefrontAddress.d.ts.map +1 -0
  47. package/dist/lib/storefrontAddress.js +24 -0
  48. package/dist/lib/storefrontAvailability.d.ts +6 -6
  49. package/dist/lib/storefrontContact.d.ts +10 -0
  50. package/dist/lib/storefrontContact.d.ts.map +1 -0
  51. package/dist/lib/storefrontContact.js +24 -0
  52. package/dist/lib/storefrontMissingValues.d.ts +5 -0
  53. package/dist/lib/storefrontMissingValues.d.ts.map +1 -0
  54. package/dist/lib/storefrontMissingValues.js +4 -0
  55. package/dist/lib/storefrontProducts.d.ts +23 -21
  56. package/dist/lib/storefrontProducts.d.ts.map +1 -1
  57. package/dist/lib/storefrontProducts.js +7 -5
  58. package/dist/lib/whatsapp.d.ts +8 -6
  59. package/dist/lib/whatsapp.d.ts.map +1 -1
  60. package/dist/lib/whatsapp.js +16 -43
  61. package/dist/pages/BookingPage.js +36 -36
  62. package/dist/pages/HomePage.d.ts.map +1 -1
  63. package/dist/pages/HomePage.js +126 -128
  64. package/dist/pages/ProductPage.js +160 -160
  65. package/dist/storefront.css +1 -1
  66. package/dist/storefrontSchemas.d.ts +14 -12
  67. package/dist/storefrontSchemas.d.ts.map +1 -1
  68. package/dist/storefrontSchemas.js +3 -2
  69. package/dist/ui/radio-group.d.ts +1 -1
  70. package/package.json +7 -6
  71. package/dist/chunks/ui/dist/static/strings-CPnO-KbA.js +0 -4
  72. package/dist/data/config.d.ts +0 -15
  73. package/dist/data/config.d.ts.map +0 -1
  74. package/dist/data/config.js +0 -24
  75. package/dist/static/strings.d.ts +0 -2
  76. package/dist/static/strings.d.ts.map +0 -1
  77. 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: "soldOutOnly" | "soldOutAndFewRemaining" | "fewRemaining" | "fewRemainingCounts" | "remainingCounts";
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: "soldOutOnly" | "soldOutAndFewRemaining" | "fewRemaining" | "fewRemainingCounts" | "remainingCounts";
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: "hour" | "half_day" | "day" | "week" | "month";
57
+ baseUnit: "day" | "half_day" | "hour" | "month" | "week";
57
58
  rentalUnits: {
58
- unit: "hour" | "half_day" | "day" | "week" | "month";
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: "EUR" | "USD" | "GBP" | "CHF";
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: "soldOutOnly" | "soldOutAndFewRemaining" | "fewRemaining" | "fewRemainingCounts" | "remainingCounts";
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: "soldOutOnly" | "soldOutAndFewRemaining" | "fewRemaining" | "fewRemainingCounts" | "remainingCounts";
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: "hour" | "half_day" | "day" | "week" | "month";
290
+ baseUnit: "day" | "half_day" | "hour" | "month" | "week";
289
291
  rentalUnits: {
290
- unit: "hour" | "half_day" | "day" | "week" | "month";
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: "EUR" | "USD" | "GBP" | "CHF";
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: "soldOutOnly" | "soldOutAndFewRemaining" | "fewRemaining" | "fewRemainingCounts" | "remainingCounts";
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: "soldOutOnly" | "soldOutAndFewRemaining" | "fewRemaining" | "fewRemainingCounts" | "remainingCounts";
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: "hour" | "half_day" | "day" | "week" | "month";
513
+ baseUnit: "day" | "half_day" | "hour" | "month" | "week";
511
514
  rentalUnits: {
512
- unit: "hour" | "half_day" | "day" | "week" | "month";
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: "EUR" | "USD" | "GBP" | "CHF";
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,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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(i, { storeSlug: u }, o).then((e) => ({
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 = [], g = [], _ = [], v = [], y = await l;
32
- if (!y.ok) console.error("Error fetching storefront products:", y.productsError);
33
- else {
34
- let e = a.safeParse(y.productsResponse);
35
- if (!e.success) console.error("Invalid storefront products received", e.error.flatten());
36
- else if (!e.data.success) console.error("Storefront products unavailable", e.data.message ?? "Unknown error");
37
- else {
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: b,
51
- configuredFallbackLanguage: x
52
- }) : s(b, x);
34
+ configuredLanguages: y,
35
+ configuredFallbackLanguage: b
36
+ }) : s(y, b);
53
37
  return {
54
38
  storeSlug: u,
55
39
  storefrontConfiguration: m.data,
56
- bikes: h,
57
- accessories: g,
58
- bookingBikes: _,
59
- bookingAccessories: v,
60
- language: S
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 fetching storefront config:", e), new Response("Storefront config unavailable", { status: 500 }));
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, { storefrontConfiguration: e.storefrontConfiguration })
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
- pricePerDay: i.default(0)
46
+ pricePerDayMinor: i.default(0)
47
47
  }).default({
48
48
  enabled: !1,
49
- pricePerDay: 0
49
+ pricePerDayMinor: 0
50
50
  }),
51
51
  bufferStartMinutes: o.number().int().min(0).optional(),
52
52
  bufferEndMinutes: o.number().int().min(0).optional(),
@@ -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-CJ6vPb6n.js";
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-CJ6vPb6n.js";
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,3 +1,3 @@
1
1
  import "../models/LocalizedString-D_TRgAdr.js";
2
2
  import "../models/Price-DCAgqkKh.js";
3
- import "../models/Product.shared-CJ6vPb6n.js";
3
+ import "../models/Product.shared-CTuk4fiR.js";
@@ -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-CJ6vPb6n.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-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-BJd4ttMP.js";
11
- import { baseAssetSchema as ee, baseAssetStatusSchema as te } from "./schemas/base-asset-PqhtKnZA.js";
12
- import { baseBookingItemSchema as ne, baseBookingSchema as re, baseBookingStateSchema as ie } from "./schemas/base-booking-BM3jZzqu.js";
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-DqrK8UkE.js";
4
- import { COORDS as r } from "../static/strings-CPnO-KbA.js";
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
@@ -1,4 +1,4 @@
1
1
  //#region ../ui/dist/Map/constants.js
2
- var e = "hsl(var(--forest-200))";
2
+ var e = "rgb(201 221 176)";
3
3
  //#endregion
4
4
  export { e as DEFAULT_MAP_SKELETON_COLOR };
@@ -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 ?? "hsl(var(--forest-200))" }
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--PwVTg2W.js")), d = (e) => {
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 ?? "hsl(var(--forest-200))"
40
+ color: e.skeletonColor ?? "rgb(201 221 176)"
41
41
  });
42
42
  return /* @__PURE__ */ s("div", {
43
43
  ref: r,
@@ -0,0 +1,4 @@
1
+ //#region ../ui/dist/static/strings.js
2
+ var e = [0, 0];
3
+ //#endregion
4
+ export { e as DEFAULT_MAP_CENTER };
@@ -1,7 +1,2 @@
1
- import { StorefrontPreset } from '../../data/config';
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":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAQzD,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,gBAAgB,CAAA;CACzB,CAAA;AAID,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE,iBAAiB,2CAqHzD"}
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 { useStorefront as n } from "../../StorefrontProvider.js";
4
- import { COORDS as r } from "../../static/strings.js";
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({ preset: m }) {
12
- let { i18n: h, t: g } = p(), { storefrontConfiguration: _, mapboxToken: v } = n(), y = _.workspace?.workspaceLanguage, [b, x] = l(!1), [S, C] = l(!1), w = c(null), T = t(_.content?.about, h.language, y)?.html?.trim(), E = s(() => {
13
- let e = _.shop.gpsCoordinates;
14
- return e ? [e[1], e[0]] : r;
15
- }, [_.shop.gpsCoordinates]), D = s(() => i(), []), O = s(() => ({
16
- coords: E,
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: m.address,
19
+ popupHTML: O || "[Missing shop address]",
20
20
  popupCloseButton: !1
21
- }), [
22
- m.address,
23
- E,
21
+ } : null, [
22
+ O,
23
+ T,
24
24
  D
25
- ]), k = s(() => [O], [O]);
25
+ ]), A = s(() => k ? [k] : [], [k]);
26
26
  return o(() => {
27
- x(!1);
28
- }, [T]), o(() => {
29
- if (!T) {
30
- C(!1);
27
+ b(!1);
28
+ }, [w]), o(() => {
29
+ if (!w) {
30
+ S(!1);
31
31
  return;
32
32
  }
33
- let e = w.current;
33
+ let e = C.current;
34
34
  if (!e) return;
35
35
  let t = () => {
36
36
  let t = e.scrollHeight > 321;
37
- C(t);
37
+ S(t);
38
38
  };
39
39
  return t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
40
- }, [T]), /* @__PURE__ */ d("section", {
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: g("about_section_title") })
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: g("about_section_heading") })
56
+ children: /* @__PURE__ */ d("span", { children: h("about_section_heading") })
57
57
  }),
58
- T ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ f("div", {
58
+ w ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ f("div", {
59
59
  className: "relative mt-4",
60
60
  children: [/* @__PURE__ */ d("div", {
61
- ref: w,
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", !b && "max-h-[320px]"),
63
- dangerouslySetInnerHTML: { __html: T }
64
- }), !b && S && /* @__PURE__ */ d("div", {
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
- }), S ? /* @__PURE__ */ d("div", {
68
+ }), x ? /* @__PURE__ */ d("div", {
69
69
  className: "mt-2",
70
70
  children: /* @__PURE__ */ d("button", {
71
71
  type: "button",
72
- onClick: () => x((e) => !e),
72
+ onClick: () => b((e) => !e),
73
73
  className: "text-primary hover:underline text-sm cursor-pointer",
74
- children: g(b ? "testimonials.see_less" : "testimonials.see_more")
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: g("about_section_fallback") })
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 [&>div]:h-full",
84
- children: /* @__PURE__ */ d(a, {
85
- mapboxToken: v,
86
- initialCenter: E,
87
- initialZoom: 10,
88
- markers: k,
89
- showNavigationControl: !1,
90
- className: "overflow-clip h-full min-h-[420px] w-full"
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
- import { StorefrontPreset } from '../../data/config';
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":"AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAoBzD,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE;IAAE,MAAM,EAAE,gBAAgB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,2CAmRpG"}
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"}