@loczer/storefront-sdk 0.186.0 → 0.188.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 (42) hide show
  1. package/dist/StorefrontProvider.d.ts +3 -0
  2. package/dist/StorefrontProvider.d.ts.map +1 -1
  3. package/dist/chunks/booking-engine/dist/models/{Product.shared-CTuk4fiR.js → Product.shared-IYOeC3N7.js} +12 -10
  4. package/dist/chunks/booking-engine/dist/schemas/{base-asset-B_Dm8_Vk.js → base-asset-zsUj5_3O.js} +1 -1
  5. package/dist/chunks/booking-engine/dist/schemas/{base-booking-DW8AEPKo.js → base-booking-TzCge_mR.js} +2 -2
  6. package/dist/chunks/booking-engine/dist/schemas/{base-product-1H8l2aUv.js → base-product-DvFFzAcg.js} +1 -1
  7. package/dist/chunks/booking-engine/dist/schemas/{booking-engine-configuration-D02MRF9U.js → booking-engine-configuration-LnrhShqm.js} +4 -1
  8. package/dist/chunks/booking-engine/dist/schemas/{cart-inputs-j1yWfJxO.js → cart-inputs-B0HpcFe5.js} +1 -1
  9. package/dist/chunks/booking-engine/dist/schemas/{public-booking-engine-configuration-BnJ_H-p1.js → public-booking-engine-configuration-CEM9mexX.js} +1 -1
  10. package/dist/chunks/booking-engine/dist/schemas-BNUzqsci.js +13 -0
  11. package/dist/components/Header/index.js +30 -29
  12. package/dist/components/PlaygroundDevFloatingButton/index.d.ts.map +1 -1
  13. package/dist/components/PlaygroundDevFloatingButton/index.js +109 -102
  14. package/dist/components/StorefrontCancellationPolicyNotice/index.d.ts.map +1 -1
  15. package/dist/components/StorefrontCancellationPolicyNotice/index.js +51 -48
  16. package/dist/components/StorefrontInsuranceNotice/index.d.ts +9 -0
  17. package/dist/components/StorefrontInsuranceNotice/index.d.ts.map +1 -0
  18. package/dist/components/StorefrontInsuranceNotice/index.js +191 -0
  19. package/dist/i18n/en.d.ts +19 -0
  20. package/dist/i18n/en.d.ts.map +1 -1
  21. package/dist/i18n/en.js +21 -2
  22. package/dist/i18n/fr.d.ts +20 -0
  23. package/dist/i18n/fr.d.ts.map +1 -1
  24. package/dist/i18n/fr.js +24 -4
  25. package/dist/index.d.ts +86 -0
  26. package/dist/index.js +68 -68
  27. package/dist/lib/booking.js +2 -2
  28. package/dist/lib/checkoutSubmit.js +3 -3
  29. package/dist/lib/playgroundDevSettings.d.ts +3 -2
  30. package/dist/lib/playgroundDevSettings.d.ts.map +1 -1
  31. package/dist/lib/playgroundDevSettings.js +28 -27
  32. package/dist/lib/storefrontProducts.d.ts +16 -0
  33. package/dist/lib/storefrontProducts.d.ts.map +1 -1
  34. package/dist/lib/storefrontProducts.js +27 -22
  35. package/dist/pages/HomePage.d.ts.map +1 -1
  36. package/dist/pages/HomePage.js +264 -266
  37. package/dist/storefront.css +1 -1
  38. package/dist/storefrontSchemas.d.ts +17 -0
  39. package/dist/storefrontSchemas.d.ts.map +1 -1
  40. package/dist/storefrontSchemas.js +28 -23
  41. package/package.json +1 -1
  42. package/dist/chunks/booking-engine/dist/schemas-DftrSnTE.js +0 -13
@@ -16,22 +16,26 @@ var t = e.object({
16
16
  quantity: e.number().positive(),
17
17
  currency: e.string().trim().min(1).optional()
18
18
  }), o = e.object({
19
+ enabled: e.boolean(),
20
+ pricePerDayMinor: e.number().int().min(0),
21
+ deductibleAmountMinor: e.number().int().min(0).default(0)
22
+ }), s = e.object({
19
23
  kind: e.string().trim().min(1),
20
24
  value: e.string().trim().min(1)
21
- }), s = e.object({
25
+ }), c = e.object({
22
26
  key: e.string().trim().min(1),
23
27
  label: e.string().trim().min(1).optional(),
24
28
  value: e.string().trim().min(1)
25
- }), c = e.object({
29
+ }), l = e.object({
26
30
  id: e.string().trim().min(1),
27
31
  computedName: e.string().trim().min(1),
28
- attributes: e.array(s).default([]),
29
- identifiers: e.array(o).default([])
30
- }), l = e.enum([
32
+ attributes: e.array(c).default([]),
33
+ identifiers: e.array(s).default([])
34
+ }), u = e.enum([
31
35
  "AVAILABLE",
32
36
  "LOW_STOCK",
33
37
  "OUT_OF_STOCK"
34
- ]), u = e.enum(["bike", "e-bike"]), d = e.string().trim().min(1), f = e.enum(["variant_selector", "variants_as_products"]), p = e.object({
38
+ ]), d = e.enum(["bike", "e-bike"]), f = e.string().trim().min(1), p = e.enum(["variant_selector", "variants_as_products"]), m = e.object({
35
39
  bgMode: e.enum([
36
40
  "transparent",
37
41
  "solid",
@@ -41,45 +45,46 @@ var t = e.object({
41
45
  needsLightBorder: e.boolean().default(!1),
42
46
  confidence: e.number().min(0).max(1).optional(),
43
47
  analyzerVersion: e.number().int().min(1).optional()
44
- }).refine((e) => e.bgMode !== "solid" || !!e.bgColor, { message: "bgColor is required when bgMode is solid." }), m = e.object({
48
+ }).refine((e) => e.bgMode !== "solid" || !!e.bgColor, { message: "bgColor is required when bgMode is solid." }), h = e.object({
45
49
  id: e.string().trim().min(1),
46
50
  checkoutProductId: e.string().trim().min(1).optional(),
47
51
  representedVariantId: e.string().trim().min(1).optional(),
48
- slug: d,
49
- kind: u.optional(),
52
+ slug: f,
53
+ kind: d.optional(),
50
54
  name: n,
51
55
  description: n.optional(),
52
56
  warning: n.optional(),
53
57
  images: e.array(e.string().trim().min(1)).optional(),
54
- primaryImageStyle: p.optional(),
58
+ primaryImageStyle: m.optional(),
55
59
  prices: e.array(a).optional(),
60
+ insurance: o.optional(),
56
61
  features: e.array(n).optional(),
57
- productVariants: e.array(c).min(1),
58
- storefrontDisplayMode: f.default("variant_selector"),
59
- availabilityStatus: l.optional()
60
- }), h = e.object({
62
+ productVariants: e.array(l).min(1),
63
+ storefrontDisplayMode: p.default("variant_selector"),
64
+ availabilityStatus: u.optional()
65
+ }), g = e.object({
61
66
  id: e.string().trim().min(1),
62
67
  checkoutProductId: e.string().trim().min(1).optional(),
63
68
  representedVariantId: e.string().trim().min(1).optional(),
64
- slug: d,
69
+ slug: f,
65
70
  name: n,
66
71
  description: n.optional(),
67
72
  warning: n.optional(),
68
73
  images: e.array(e.string().trim().min(1)).optional(),
69
- primaryImageStyle: p.optional(),
74
+ primaryImageStyle: m.optional(),
70
75
  prices: e.array(a),
71
76
  features: e.array(n).optional(),
72
- productVariants: e.array(c).min(1),
73
- storefrontDisplayMode: f.default("variant_selector")
74
- }), g = "/api/public/storefront/products", _ = e.object({ storeSlug: e.string().trim().min(1).toLowerCase() }), v = e.discriminatedUnion("success", [e.object({
77
+ productVariants: e.array(l).min(1),
78
+ storefrontDisplayMode: p.default("variant_selector")
79
+ }), _ = "/api/public/storefront/products", v = e.object({ storeSlug: e.string().trim().min(1).toLowerCase() }), y = e.discriminatedUnion("success", [e.object({
75
80
  success: e.literal(!0),
76
81
  products: e.object({
77
- bikes: e.array(m).default([]),
78
- accessories: e.array(h).default([])
82
+ bikes: e.array(h).default([]),
83
+ accessories: e.array(g).default([])
79
84
  })
80
85
  }), e.object({
81
86
  success: e.literal(!1),
82
87
  message: e.string().optional()
83
88
  })]);
84
89
  //#endregion
85
- export { g as ROUTE, _ as requestSchema, v as responseSchema, h as storefrontPublicAccessoryProductSchema, l as storefrontPublicBikeAvailabilityStatusSchema, u as storefrontPublicBikeKindSchema, m as storefrontPublicBikeProductSchema, p as storefrontPublicImageStyleSchema, f as storefrontPublicProductDisplayModeSchema, a as storefrontPublicProductPriceSchema, d as storefrontPublicProductSlugSchema, s as storefrontPublicProductVariantAttributeSchema, o as storefrontPublicProductVariantIdentifierSchema, c as storefrontPublicProductVariantSchema };
90
+ export { _ as ROUTE, v as requestSchema, y as responseSchema, g as storefrontPublicAccessoryProductSchema, u as storefrontPublicBikeAvailabilityStatusSchema, d as storefrontPublicBikeKindSchema, h as storefrontPublicBikeProductSchema, m as storefrontPublicImageStyleSchema, p as storefrontPublicProductDisplayModeSchema, o as storefrontPublicProductInsuranceSchema, a as storefrontPublicProductPriceSchema, f as storefrontPublicProductSlugSchema, c as storefrontPublicProductVariantAttributeSchema, s as storefrontPublicProductVariantIdentifierSchema, l as storefrontPublicProductVariantSchema };
@@ -1 +1 @@
1
- {"version":3,"file":"HomePage.d.ts","sourceRoot":"","sources":["../../src/pages/HomePage.tsx"],"names":[],"mappings":"AA6GA,MAAM,CAAC,OAAO,UAAU,QAAQ,4CA8qB/B"}
1
+ {"version":3,"file":"HomePage.d.ts","sourceRoot":"","sources":["../../src/pages/HomePage.tsx"],"names":[],"mappings":"AA4GA,MAAM,CAAC,OAAO,UAAU,QAAQ,4CAwrB/B"}