@loczer/storefront-sdk 0.213.0 → 0.214.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/StorefrontContext.d.ts +18 -0
- package/dist/StorefrontContext.d.ts.map +1 -1
- package/dist/StorefrontProvider.d.ts +9 -0
- package/dist/StorefrontProvider.d.ts.map +1 -1
- package/dist/chunks/pkg/ui/dist/Drawer/{index-CSvSVP_J.js → index-Dp62Y2o5.js} +10 -7
- package/dist/chunks/pkg/ui/dist/{ResponsiveDialog-BVwhTZQo.js → ResponsiveDialog-BJ0RG6gh.js} +1 -1
- package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
- package/dist/components/BookingBikeVariantDialog/index.js +22 -27
- package/dist/components/Footer/index.d.ts +2 -1
- package/dist/components/Footer/index.d.ts.map +1 -1
- package/dist/components/Footer/index.js +64 -58
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/Layout/index.js +1 -0
- package/dist/components/PlatformFooter/index.js +6 -6
- package/dist/components/StorefrontCancellationPolicyNotice/index.js +1 -1
- package/dist/components/StorefrontInsuranceNotice/index.js +1 -1
- package/dist/components/StorefrontPopupMessages/index.js +1 -1
- package/dist/i18n/en.d.ts +6 -3
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +6 -3
- package/dist/i18n/fr.d.ts +6 -3
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +6 -3
- package/dist/index.d.ts +64 -7
- package/dist/index.js +69 -68
- package/dist/pages/BookingPage.d.ts.map +1 -1
- package/dist/pages/BookingPage.js +1 -0
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +1 -0
- package/dist/pages/RentalTermsPage.d.ts +2 -0
- package/dist/pages/RentalTermsPage.d.ts.map +1 -0
- package/dist/pages/RentalTermsPage.js +52 -0
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +14 -10
- package/dist/storefront.css +1 -1
- package/dist/storefrontSchemas.d.ts +19 -0
- package/dist/storefrontSchemas.d.ts.map +1 -1
- package/dist/storefrontSchemas.js +39 -35
- package/package.json +1 -1
|
@@ -11,6 +11,16 @@ export declare const storefrontLocalizedRichTextSchema: z.ZodRecord<z.ZodString,
|
|
|
11
11
|
html: z.ZodString;
|
|
12
12
|
text: z.ZodString;
|
|
13
13
|
}, z.core.$strict>>;
|
|
14
|
+
export declare const storefrontInformationSchema: z.ZodObject<{
|
|
15
|
+
rentalTerms: z.ZodOptional<z.ZodObject<{
|
|
16
|
+
version: z.ZodLiteral<1>;
|
|
17
|
+
json: z.ZodString;
|
|
18
|
+
html: z.ZodString;
|
|
19
|
+
text: z.ZodString;
|
|
20
|
+
}, z.core.$strict>>;
|
|
21
|
+
rentalTermsUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export type StorefrontInformation = z.infer<typeof storefrontInformationSchema>;
|
|
14
24
|
export declare const storefrontStatusSchema: z.ZodEnum<{
|
|
15
25
|
unpublished: "unpublished";
|
|
16
26
|
published: "published";
|
|
@@ -588,6 +598,15 @@ export declare const storefrontConfigurationSchema: z.ZodObject<{
|
|
|
588
598
|
}, z.core.$strip>>>;
|
|
589
599
|
}, z.core.$strip>>;
|
|
590
600
|
}, z.core.$strip>>;
|
|
601
|
+
information: z.ZodOptional<z.ZodObject<{
|
|
602
|
+
rentalTerms: z.ZodOptional<z.ZodObject<{
|
|
603
|
+
version: z.ZodLiteral<1>;
|
|
604
|
+
json: z.ZodString;
|
|
605
|
+
html: z.ZodString;
|
|
606
|
+
text: z.ZodString;
|
|
607
|
+
}, z.core.$strict>>;
|
|
608
|
+
rentalTermsUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
609
|
+
}, z.core.$strip>>;
|
|
591
610
|
modules: z.ZodOptional<z.ZodObject<{
|
|
592
611
|
reviews: z.ZodOptional<z.ZodObject<{
|
|
593
612
|
enabled: z.ZodBoolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storefrontSchemas.d.ts","sourceRoot":"","sources":["../src/storefrontSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAwBvB,eAAO,MAAM,wBAAwB;;;;;kBAO1B,CAAA;AACX,eAAO,MAAM,iCAAiC;;;;;mBAE5C,CAAA;
|
|
1
|
+
{"version":3,"file":"storefrontSchemas.d.ts","sourceRoot":"","sources":["../src/storefrontSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAwBvB,eAAO,MAAM,wBAAwB;;;;;kBAO1B,CAAA;AACX,eAAO,MAAM,iCAAiC;;;;;mBAE5C,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;iBAGtC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AA0C/E,eAAO,MAAM,sBAAsB;;;EAAuC,CAAA;AAC1E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAErE,eAAO,MAAM,4BAA4B;;;EAAqE,CAAA;AAC9G,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEjF,eAAO,MAAM,+BAA+B;;;EAAiC,CAAA;AAC7E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAEvF,eAAO,MAAM,qBAAqB,wFAIxB,CAAA;AACV,eAAO,MAAM,wBAAwB;;;;EAAgC,CAAA;AACrE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAIzE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;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,CAAA;AAE3F,eAAO,MAAM,6BAA6B;;;iBAGxC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEnF,eAAO,MAAM,uBAAuB;;;;;;;;iBAKlC,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAEvE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBASxC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA"}
|
|
@@ -12,7 +12,10 @@ var r = n.string().trim().regex(/^\+[1-9]\d{1,14}$/, { message: "Invalid phone n
|
|
|
12
12
|
json: n.string(),
|
|
13
13
|
html: n.string(),
|
|
14
14
|
text: n.string()
|
|
15
|
-
}).strict(), c = n.record(n.string().min(2), s).refine((e) => Object.keys(e).length > 0, { message: "Add at least one translation." }), l =
|
|
15
|
+
}).strict(), c = n.record(n.string().min(2), s).refine((e) => Object.keys(e).length > 0, { message: "Add at least one translation." }), l = n.object({
|
|
16
|
+
rentalTerms: s.optional(),
|
|
17
|
+
rentalTermsUpdatedAt: n.string().datetime({ offset: !0 }).nullable().optional()
|
|
18
|
+
}), u = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), d = (e) => {
|
|
16
19
|
let t = e.trim(), n = t.split(/\n+/).map((e) => e.trim()).filter(Boolean), r = n.length > 0 ? n.map((e) => ({
|
|
17
20
|
type: "paragraph",
|
|
18
21
|
content: [{
|
|
@@ -26,25 +29,25 @@ var r = n.string().trim().regex(/^\+[1-9]\d{1,14}$/, { message: "Invalid phone n
|
|
|
26
29
|
type: "doc",
|
|
27
30
|
content: r
|
|
28
31
|
}),
|
|
29
|
-
html: n.map((e) => `<p>${
|
|
32
|
+
html: n.map((e) => `<p>${u(e)}</p>`).join(""),
|
|
30
33
|
text: t
|
|
31
34
|
};
|
|
32
|
-
},
|
|
35
|
+
}, f = n.preprocess((e) => {
|
|
33
36
|
let t = a.safeParse(e);
|
|
34
|
-
return t.success ? Object.fromEntries(Object.entries(t.data).map(([e, t]) => [e,
|
|
35
|
-
}, c),
|
|
37
|
+
return t.success ? Object.fromEntries(Object.entries(t.data).map(([e, t]) => [e, d(t.value)])) : e;
|
|
38
|
+
}, c), p = n.string().regex(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/), m = t, h = n.enum(["unpublished", "published"]), g = n.enum(["auto_approve_when_possible", "manual_approval_required"]), _ = n.enum(["pickup", "delivery"]), v = [
|
|
36
39
|
"current_booking_hero",
|
|
37
40
|
"booking_bar_overlay_hero",
|
|
38
41
|
"vertical_marquee_hero"
|
|
39
|
-
],
|
|
40
|
-
status:
|
|
41
|
-
checkoutMode:
|
|
42
|
-
availabilityDisplay:
|
|
42
|
+
], y = n.enum(v), b = t.shape.availabilityDisplay, x = n.object({
|
|
43
|
+
status: h,
|
|
44
|
+
checkoutMode: g,
|
|
45
|
+
availabilityDisplay: b,
|
|
43
46
|
enabled: n.boolean(),
|
|
44
|
-
fulfillmentModes: n.array(
|
|
47
|
+
fulfillmentModes: n.array(_).min(1),
|
|
45
48
|
deliveryDisabledReason: n.string().trim().default(""),
|
|
46
49
|
sameDayCutoff: e
|
|
47
|
-
}),
|
|
50
|
+
}), S = n.object({
|
|
48
51
|
id: n.string().min(1),
|
|
49
52
|
slug: n.string().min(1).optional(),
|
|
50
53
|
name: n.string().min(1),
|
|
@@ -60,30 +63,30 @@ var r = n.string().trim().regex(/^\+[1-9]\d{1,14}$/, { message: "Invalid phone n
|
|
|
60
63
|
city: n.string().min(1).optional(),
|
|
61
64
|
country: n.string().min(1).optional(),
|
|
62
65
|
gpsCoordinates: n.tuple([n.number(), n.number()]).optional()
|
|
63
|
-
}),
|
|
66
|
+
}), C = n.object({
|
|
64
67
|
name: n.string().min(1).optional(),
|
|
65
68
|
workspaceLanguage: n.enum(["fr", "en"]).optional(),
|
|
66
69
|
languages: n.array(n.string().min(1)).optional()
|
|
67
|
-
}),
|
|
70
|
+
}), w = n.object({
|
|
68
71
|
id: n.string().min(1),
|
|
69
72
|
question: o,
|
|
70
73
|
answer: o
|
|
71
|
-
}),
|
|
74
|
+
}), T = n.object({
|
|
72
75
|
id: n.string().min(1),
|
|
73
76
|
enabled: n.boolean().default(!0),
|
|
74
77
|
showOnEachVisit: n.boolean().default(!1),
|
|
75
|
-
startDate:
|
|
76
|
-
endDate:
|
|
78
|
+
startDate: p.nullable().default(null),
|
|
79
|
+
endDate: p.nullable().default(null),
|
|
77
80
|
title: a.optional(),
|
|
78
81
|
subtitle: a.optional(),
|
|
79
|
-
message:
|
|
82
|
+
message: f.optional(),
|
|
80
83
|
imageIds: n.array(n.string().min(1)).default([])
|
|
81
|
-
}), T = n.object({
|
|
82
|
-
general: n.array(C).default([]),
|
|
83
|
-
deliveries: n.array(C).default([]),
|
|
84
|
-
booking: n.array(C).default([])
|
|
85
84
|
}), E = n.object({
|
|
86
|
-
|
|
85
|
+
general: n.array(w).default([]),
|
|
86
|
+
deliveries: n.array(w).default([]),
|
|
87
|
+
booking: n.array(w).default([])
|
|
88
|
+
}), D = n.object({
|
|
89
|
+
heroMode: y.default("current_booking_hero"),
|
|
87
90
|
tagline: a.optional(),
|
|
88
91
|
logoSquareImageId: n.string().min(1).optional(),
|
|
89
92
|
logoWideImageId: n.string().min(1).optional(),
|
|
@@ -94,26 +97,27 @@ var r = n.string().trim().regex(/^\+[1-9]\d{1,14}$/, { message: "Invalid phone n
|
|
|
94
97
|
whatsappPhone2Enabled: n.boolean().default(!1),
|
|
95
98
|
whatsappMessage: a.optional(),
|
|
96
99
|
showWhatsappFloatingButton: n.boolean().default(!0),
|
|
97
|
-
modalMessages: n.array(
|
|
98
|
-
faq:
|
|
100
|
+
modalMessages: n.array(T).default([]),
|
|
101
|
+
faq: E.default({
|
|
99
102
|
general: [],
|
|
100
103
|
deliveries: [],
|
|
101
104
|
booking: []
|
|
102
105
|
})
|
|
103
|
-
}),
|
|
106
|
+
}), O = n.object({
|
|
104
107
|
enabled: n.boolean(),
|
|
105
108
|
showRecentReviewsOnStorefront: n.boolean()
|
|
106
|
-
}), O = n.object({
|
|
107
|
-
reviews: D.optional(),
|
|
108
|
-
insurance: n.object({ enabled: n.boolean() }).optional()
|
|
109
109
|
}), k = n.object({
|
|
110
|
+
reviews: O.optional(),
|
|
111
|
+
insurance: n.object({ enabled: n.boolean() }).optional()
|
|
112
|
+
}), A = n.object({
|
|
110
113
|
storeSlug: n.string().min(1),
|
|
111
|
-
workspace:
|
|
112
|
-
shop:
|
|
113
|
-
settings:
|
|
114
|
-
bookingEngine:
|
|
115
|
-
content:
|
|
116
|
-
|
|
114
|
+
workspace: C.optional(),
|
|
115
|
+
shop: S,
|
|
116
|
+
settings: x,
|
|
117
|
+
bookingEngine: m,
|
|
118
|
+
content: D.optional(),
|
|
119
|
+
information: l.optional(),
|
|
120
|
+
modules: k.optional()
|
|
117
121
|
});
|
|
118
122
|
//#endregion
|
|
119
|
-
export {
|
|
123
|
+
export { v as STOREFRONT_HERO_MODES, g as storefrontCheckoutModeSchema, A as storefrontConfigurationSchema, D as storefrontContentSchema, w as storefrontFaqItemSchema, E as storefrontFaqSchema, _ as storefrontFulfillmentModeSchema, y as storefrontHeroModeSchema, l as storefrontInformationSchema, c as storefrontLocalizedRichTextSchema, T as storefrontModalMessageSchema, k as storefrontModulesSchema, O as storefrontReviewsModuleSchema, s as storefrontRichTextSchema, x as storefrontSettingsSchema, S as storefrontShopSchema, h as storefrontStatusSchema, C as storefrontWorkspaceSchema };
|