@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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TestimonialsSection/index.tsx"],"names":[],"mappings":"AA+KA,eAAO,MAAM,mBAAmB,sDAmP/B,CAAA"}
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 === "tripadvisor" ? s("testimonials.tripadvisor_review") : 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;
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
@@ -139,7 +139,6 @@ export declare const storefront: {
139
139
  view_original: string;
140
140
  google_user: string;
141
141
  google_review: string;
142
- tripadvisor_review: string;
143
142
  see_more: string;
144
143
  see_less: string;
145
144
  };
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4gBtB,CAAA"}
package/dist/i18n/en.js CHANGED
@@ -140,7 +140,6 @@ var e = {
140
140
  view_original: "View original",
141
141
  google_user: "Google user",
142
142
  google_review: "Google review",
143
- tripadvisor_review: "Tripadvisor review",
144
143
  see_more: "See more",
145
144
  see_less: "See less"
146
145
  },
package/dist/i18n/fr.d.ts CHANGED
@@ -139,7 +139,6 @@ export declare const storefront: {
139
139
  view_original: string;
140
140
  google_user: string;
141
141
  google_review: string;
142
- tripadvisor_review: string;
143
142
  see_more: string;
144
143
  see_less: string;
145
144
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8gBtB,CAAA"}
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
@@ -140,7 +140,6 @@ var e = {
140
140
  view_original: "Voir l'original",
141
141
  google_user: "Utilisateur Google",
142
142
  google_review: "Avis Google",
143
- tripadvisor_review: "Avis Tripadvisor",
144
143
  see_more: "Voir plus",
145
144
  see_less: "Voir moins"
146
145
  },
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.ZodEnum<{
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.ZodEnum<{
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.ZodEnum<{
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.ZodEnum<{
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.ZodEnum<{
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;;;EAAoC,CAAA;AACnE,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"}
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.enum(["google", "tripadvisor"]), i = e.object({
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(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loczer/storefront-sdk",
3
- "version": "0.234.0",
3
+ "version": "0.235.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"