@loczer/storefront-sdk 0.234.0 → 0.235.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/components/TestimonialsSection/index.d.ts.map +1 -1
- package/dist/components/TestimonialsSection/index.js +1 -1
- package/dist/i18n/en.d.ts +0 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +0 -1
- package/dist/i18n/fr.d.ts +0 -1
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/lib/storefrontReviews.d.ts +5 -20
- package/dist/lib/storefrontReviews.d.ts.map +1 -1
- package/dist/lib/storefrontReviews.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TestimonialsSection/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TestimonialsSection/index.tsx"],"names":[],"mappings":"AA4KA,eAAO,MAAM,mBAAmB,sDAmP/B,CAAA"}
|
|
@@ -49,7 +49,7 @@ var p = ({ className: t }) => /* @__PURE__ */ c("div", {
|
|
|
49
49
|
]
|
|
50
50
|
});
|
|
51
51
|
function h({ review: t, enableExpand: n = !0, defaultOriginalUrl: r }) {
|
|
52
|
-
let { t: s } = u(), d = i(a(t.name)), p = t.source === "
|
|
52
|
+
let { t: s } = u(), d = i(a(t.name)), p = t.source === "google" ? s("testimonials.google_review") : void 0, [m, h] = o.useState(!1), [g, v] = o.useState(!1), y = o.useRef(null), b = n && m ? 6 : 4, x = _(t.originalUrl || r), S = n && g, C = typeof x == "string" && x.length > 0;
|
|
53
53
|
return o.useEffect(() => {
|
|
54
54
|
if (!n) return;
|
|
55
55
|
let e = y.current;
|
package/dist/i18n/en.d.ts
CHANGED
package/dist/i18n/en.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4gBtB,CAAA"}
|
package/dist/i18n/en.js
CHANGED
package/dist/i18n/fr.d.ts
CHANGED
package/dist/i18n/fr.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6gBtB,CAAA"}
|
package/dist/i18n/fr.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -4317,7 +4317,6 @@ export declare const storefrontEn: {
|
|
|
4317
4317
|
view_original: string;
|
|
4318
4318
|
google_user: string;
|
|
4319
4319
|
google_review: string;
|
|
4320
|
-
tripadvisor_review: string;
|
|
4321
4320
|
see_more: string;
|
|
4322
4321
|
see_less: string;
|
|
4323
4322
|
};
|
|
@@ -4875,7 +4874,6 @@ export declare const storefrontFr: {
|
|
|
4875
4874
|
view_original: string;
|
|
4876
4875
|
google_user: string;
|
|
4877
4876
|
google_review: string;
|
|
4878
|
-
tripadvisor_review: string;
|
|
4879
4877
|
see_more: string;
|
|
4880
4878
|
see_less: string;
|
|
4881
4879
|
};
|
|
@@ -5,16 +5,10 @@ export declare const requestSchema: z.ZodObject<{
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
6
6
|
}, z.core.$strip>;
|
|
7
7
|
export type RequestPayload = z.infer<typeof requestSchema>;
|
|
8
|
-
export declare const reviewSourceSchema: z.
|
|
9
|
-
google: "google";
|
|
10
|
-
tripadvisor: "tripadvisor";
|
|
11
|
-
}>;
|
|
8
|
+
export declare const reviewSourceSchema: z.ZodLiteral<"google">;
|
|
12
9
|
export type ReviewSource = z.infer<typeof reviewSourceSchema>;
|
|
13
10
|
export declare const shopReviewsProviderSchema: z.ZodObject<{
|
|
14
|
-
source: z.
|
|
15
|
-
google: "google";
|
|
16
|
-
tripadvisor: "tripadvisor";
|
|
17
|
-
}>;
|
|
11
|
+
source: z.ZodLiteral<"google">;
|
|
18
12
|
rating: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
19
13
|
totalReviewsCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
20
14
|
providerUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -26,10 +20,7 @@ export declare const shopReviewsProviderSchema: z.ZodObject<{
|
|
|
26
20
|
export type ShopReviewsProvider = z.infer<typeof shopReviewsProviderSchema>;
|
|
27
21
|
export declare const publicReviewItemSchema: z.ZodObject<{
|
|
28
22
|
id: z.ZodString;
|
|
29
|
-
source: z.
|
|
30
|
-
google: "google";
|
|
31
|
-
tripadvisor: "tripadvisor";
|
|
32
|
-
}>;
|
|
23
|
+
source: z.ZodLiteral<"google">;
|
|
33
24
|
authorMasked: z.ZodString;
|
|
34
25
|
avatarSeed: z.ZodNumber;
|
|
35
26
|
rating: z.ZodNumber;
|
|
@@ -42,10 +33,7 @@ export declare const responseSchema: z.ZodObject<{
|
|
|
42
33
|
success: z.ZodBoolean;
|
|
43
34
|
message: z.ZodOptional<z.ZodString>;
|
|
44
35
|
providers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
45
|
-
source: z.
|
|
46
|
-
google: "google";
|
|
47
|
-
tripadvisor: "tripadvisor";
|
|
48
|
-
}>;
|
|
36
|
+
source: z.ZodLiteral<"google">;
|
|
49
37
|
rating: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
50
38
|
totalReviewsCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
51
39
|
providerUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -56,10 +44,7 @@ export declare const responseSchema: z.ZodObject<{
|
|
|
56
44
|
}, z.core.$strip>>>;
|
|
57
45
|
reviews: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
58
46
|
id: z.ZodString;
|
|
59
|
-
source: z.
|
|
60
|
-
google: "google";
|
|
61
|
-
tripadvisor: "tripadvisor";
|
|
62
|
-
}>;
|
|
47
|
+
source: z.ZodLiteral<"google">;
|
|
63
48
|
authorMasked: z.ZodString;
|
|
64
49
|
avatarSeed: z.ZodNumber;
|
|
65
50
|
rating: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storefrontReviews.d.ts","sourceRoot":"","sources":["../../src/lib/storefrontReviews.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,KAAK,mCAAmC,CAAA;AAErD,eAAO,MAAM,aAAa;;;iBAGxB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"storefrontReviews.d.ts","sourceRoot":"","sources":["../../src/lib/storefrontReviews.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,KAAK,mCAAmC,CAAA;AAErD,eAAO,MAAM,aAAa;;;iBAGxB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,kBAAkB,wBAAsB,CAAA;AACrD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,eAAO,MAAM,yBAAyB;;;;;;;;;iBASpC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAE3E,eAAO,MAAM,sBAAsB;;;;;;;;;iBASjC,CAAA;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAErE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;iBAKzB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
|
|
@@ -3,7 +3,7 @@ import { z as e } from "zod";
|
|
|
3
3
|
var t = "/api/public/storefront/reviews", n = e.object({
|
|
4
4
|
storeSlug: e.string().trim().min(1).toLowerCase(),
|
|
5
5
|
limit: e.number().int().positive().max(200).optional()
|
|
6
|
-
}), r = e.
|
|
6
|
+
}), r = e.literal("google"), i = e.object({
|
|
7
7
|
source: r,
|
|
8
8
|
rating: e.number().min(0).max(5).nullable().optional(),
|
|
9
9
|
totalReviewsCount: e.number().int().nonnegative().nullable().optional(),
|