@sentecacommerce-theme/lib 0.14.12 → 0.14.15

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -1046,15 +1046,15 @@ Object.keys(_useLocalRating).forEach(function(key) {
1046
1046
  }
1047
1047
  });
1048
1048
  });
1049
- var _types = _interopRequireWildcard(require("./hooks/useProductVariants/types"));
1050
- Object.keys(_types).forEach(function(key) {
1049
+ var _useProductVariants = _interopRequireWildcard(require("./hooks/useProductVariants"));
1050
+ Object.keys(_useProductVariants).forEach(function(key) {
1051
1051
  if (key === "default" || key === "__esModule") return;
1052
1052
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
1053
- if (key in exports && exports[key] === _types[key]) return;
1053
+ if (key in exports && exports[key] === _useProductVariants[key]) return;
1054
1054
  Object.defineProperty(exports, key, {
1055
1055
  enumerable: true,
1056
1056
  get: function() {
1057
- return _types[key];
1057
+ return _useProductVariants[key];
1058
1058
  }
1059
1059
  });
1060
1060
  });
@@ -1082,15 +1082,15 @@ Object.keys(_utils1).forEach(function(key) {
1082
1082
  }
1083
1083
  });
1084
1084
  });
1085
- var _types1 = _interopRequireWildcard(require("./types"));
1086
- Object.keys(_types1).forEach(function(key) {
1085
+ var _types = _interopRequireWildcard(require("./types"));
1086
+ Object.keys(_types).forEach(function(key) {
1087
1087
  if (key === "default" || key === "__esModule") return;
1088
1088
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
1089
- if (key in exports && exports[key] === _types1[key]) return;
1089
+ if (key in exports && exports[key] === _types[key]) return;
1090
1090
  Object.defineProperty(exports, key, {
1091
1091
  enumerable: true,
1092
1092
  get: function() {
1093
- return _types1[key];
1093
+ return _types[key];
1094
1094
  }
1095
1095
  });
1096
1096
  });
@@ -21,6 +21,7 @@ function GlobalSEO() {
21
21
  var organizationJSONLd = "{\n \"@context\": \"https://schema.org\",\n \"@type\": \"Organization\",\n \"url\": \"".concat(domain, "\",\n \"contactPoint\": [\n {\n \"@type\": \"ContactPoint\",\n \"telephone\": \"").concat(organizationPhone, "\",\n \"contactType\": \"customer service\"\n }\n ]\n }");
22
22
  var defaultIcon = (favicon === null || favicon === void 0 ? void 0 : favicon.default) || (favicon === null || favicon === void 0 ? void 0 : favicon.medium) || (favicon === null || favicon === void 0 ? void 0 : favicon.svg);
23
23
  return(/*#__PURE__*/ _react.default.createElement(_head.default, null, /*#__PURE__*/ _react.default.createElement("link", {
24
+ key: "canonical",
24
25
  rel: "canonical",
25
26
  href: "https://".concat(domain).concat(router === null || router === void 0 ? void 0 : (ref = router.asPath) === null || ref === void 0 ? void 0 : ref.split('?')[0])
26
27
  }), /*#__PURE__*/ _react.default.createElement("script", {
@@ -58,7 +58,7 @@ function ProductSEO() {
58
58
  };
59
59
  var formattedDescription = favorDescriptionTemplateOverMeta ? createTemplate(descriptionTemplate) : seoData.description || createTemplate(descriptionTemplate);
60
60
  var formattedTitle = favorTitleTemplateOverMeta ? createTemplate(titleTemplate) : seoData.title || createTemplate(titleTemplate);
61
- var productJSONLd = "{\n \"@context\": \"https://schema.org\",\n \"@type\": \"Product\",\n \"name\": \"".concat(formattedTitle.replaceAll('"', '″'), "\",\n \"image\": [").concat(generateImage(image), "],\n \"description\": \"").concat(formattedDescription.replaceAll('"', '″'), "\",\n \"sku\": \"").concat((selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.sku) || '', "\",\n ").concat(brandName ? "\"brand\": {\n \"@type\": \"Brand\",\n \"name\": \"".concat(brandName, "\"\n },") : '', "\n ").concat(hasRating ? "\"aggregateRating\": {\n \"@type\": \"AggregateRating\",\n \"ratingValue\": \"".concat((ref13 = metaData.reviewRatingStatistics) === null || ref13 === void 0 ? void 0 : ref13.averageRating, "\",\n \"reviewCount\": \"").concat((ref14 = metaData.reviewRatingStatistics) === null || ref14 === void 0 ? void 0 : ref14.count, "\"\n },") : '', "\n \"offers\": {\n \"@type\": \"Offer\",\n \"priceCurrency\": \"").concat(currencyCode, "\",\n \"price\": \"").concat(price.value, "\",\n \"itemCondition\": \"").concat(itemCondition, "\",\n \"availability\": \"").concat(availability, "\"\n }\n }");
61
+ var productJSONLd = "{\n \"@context\": \"https://schema.org\",\n \"@type\": \"Product\",\n \"name\": \"".concat(formattedTitle === null || formattedTitle === void 0 ? void 0 : formattedTitle.replace(/"/g, '″'), "\",\n \"image\": [").concat(generateImage(image), "],\n \"description\": \"").concat(formattedDescription === null || formattedDescription === void 0 ? void 0 : formattedDescription.replace(/"/g, '″'), "\",\n \"sku\": \"").concat((selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.sku) || '', "\",\n ").concat(brandName ? "\"brand\": {\n \"@type\": \"Brand\",\n \"name\": \"".concat(brandName, "\"\n },") : '', "\n ").concat(hasRating ? "\"aggregateRating\": {\n \"@type\": \"AggregateRating\",\n \"ratingValue\": \"".concat((ref13 = metaData.reviewRatingStatistics) === null || ref13 === void 0 ? void 0 : ref13.averageRating, "\",\n \"reviewCount\": \"").concat((ref14 = metaData.reviewRatingStatistics) === null || ref14 === void 0 ? void 0 : ref14.count, "\"\n },") : '', "\n \"offers\": {\n \"@type\": \"Offer\",\n \"priceCurrency\": \"").concat(currencyCode, "\",\n \"price\": \"").concat(price.value, "\",\n \"itemCondition\": \"").concat(itemCondition, "\",\n \"availability\": \"").concat(availability, "\"\n }\n }");
62
62
  return(/*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/ _react.default.createElement(_head.default, null, /*#__PURE__*/ _react.default.createElement("script", {
63
63
  type: "application/ld+json",
64
64
  dangerouslySetInnerHTML: (0, _utils).createDangerousMarkup(productJSONLd)
package/dist/esm/index.js CHANGED
@@ -92,7 +92,7 @@ export * from './hooks/useRouterRedirect';
92
92
  export * from './hooks/useProgressBar';
93
93
  export * from './hooks/useCatalogDiscounts';
94
94
  export * from './hooks/useLocalRating';
95
- export * from './hooks/useProductVariants/types';
95
+ export * from './hooks/useProductVariants';
96
96
  export * from './hooks/CompareContext/';
97
97
  // Utils
98
98
  export * from './utils';
@@ -11,6 +11,7 @@ export function GlobalSEO() {
11
11
  var organizationJSONLd = "{\n \"@context\": \"https://schema.org\",\n \"@type\": \"Organization\",\n \"url\": \"".concat(domain, "\",\n \"contactPoint\": [\n {\n \"@type\": \"ContactPoint\",\n \"telephone\": \"").concat(organizationPhone, "\",\n \"contactType\": \"customer service\"\n }\n ]\n }");
12
12
  var defaultIcon = (favicon === null || favicon === void 0 ? void 0 : favicon.default) || (favicon === null || favicon === void 0 ? void 0 : favicon.medium) || (favicon === null || favicon === void 0 ? void 0 : favicon.svg);
13
13
  return(/*#__PURE__*/ React.createElement(Head, null, /*#__PURE__*/ React.createElement("link", {
14
+ key: "canonical",
14
15
  rel: "canonical",
15
16
  href: "https://".concat(domain).concat(router === null || router === void 0 ? void 0 : (ref = router.asPath) === null || ref === void 0 ? void 0 : ref.split('?')[0])
16
17
  }), /*#__PURE__*/ React.createElement("script", {
@@ -48,7 +48,7 @@ export function ProductSEO() {
48
48
  };
49
49
  var formattedDescription = favorDescriptionTemplateOverMeta ? createTemplate(descriptionTemplate) : seoData.description || createTemplate(descriptionTemplate);
50
50
  var formattedTitle = favorTitleTemplateOverMeta ? createTemplate(titleTemplate) : seoData.title || createTemplate(titleTemplate);
51
- var productJSONLd = "{\n \"@context\": \"https://schema.org\",\n \"@type\": \"Product\",\n \"name\": \"".concat(formattedTitle.replaceAll('"', '″'), "\",\n \"image\": [").concat(generateImage(image), "],\n \"description\": \"").concat(formattedDescription.replaceAll('"', '″'), "\",\n \"sku\": \"").concat((selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.sku) || '', "\",\n ").concat(brandName ? "\"brand\": {\n \"@type\": \"Brand\",\n \"name\": \"".concat(brandName, "\"\n },") : '', "\n ").concat(hasRating ? "\"aggregateRating\": {\n \"@type\": \"AggregateRating\",\n \"ratingValue\": \"".concat((ref13 = metaData.reviewRatingStatistics) === null || ref13 === void 0 ? void 0 : ref13.averageRating, "\",\n \"reviewCount\": \"").concat((ref14 = metaData.reviewRatingStatistics) === null || ref14 === void 0 ? void 0 : ref14.count, "\"\n },") : '', "\n \"offers\": {\n \"@type\": \"Offer\",\n \"priceCurrency\": \"").concat(currencyCode, "\",\n \"price\": \"").concat(price.value, "\",\n \"itemCondition\": \"").concat(itemCondition, "\",\n \"availability\": \"").concat(availability, "\"\n }\n }");
51
+ var productJSONLd = "{\n \"@context\": \"https://schema.org\",\n \"@type\": \"Product\",\n \"name\": \"".concat(formattedTitle === null || formattedTitle === void 0 ? void 0 : formattedTitle.replace(/"/g, '″'), "\",\n \"image\": [").concat(generateImage(image), "],\n \"description\": \"").concat(formattedDescription === null || formattedDescription === void 0 ? void 0 : formattedDescription.replace(/"/g, '″'), "\",\n \"sku\": \"").concat((selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.sku) || '', "\",\n ").concat(brandName ? "\"brand\": {\n \"@type\": \"Brand\",\n \"name\": \"".concat(brandName, "\"\n },") : '', "\n ").concat(hasRating ? "\"aggregateRating\": {\n \"@type\": \"AggregateRating\",\n \"ratingValue\": \"".concat((ref13 = metaData.reviewRatingStatistics) === null || ref13 === void 0 ? void 0 : ref13.averageRating, "\",\n \"reviewCount\": \"").concat((ref14 = metaData.reviewRatingStatistics) === null || ref14 === void 0 ? void 0 : ref14.count, "\"\n },") : '', "\n \"offers\": {\n \"@type\": \"Offer\",\n \"priceCurrency\": \"").concat(currencyCode, "\",\n \"price\": \"").concat(price.value, "\",\n \"itemCondition\": \"").concat(itemCondition, "\",\n \"availability\": \"").concat(availability, "\"\n }\n }");
52
52
  return(/*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Head, null, /*#__PURE__*/ React.createElement("script", {
53
53
  type: "application/ld+json",
54
54
  dangerouslySetInnerHTML: createDangerousMarkup(productJSONLd)
@@ -85,7 +85,7 @@ export * from './hooks/useRouterRedirect';
85
85
  export * from './hooks/useProgressBar';
86
86
  export * from './hooks/useCatalogDiscounts';
87
87
  export * from './hooks/useLocalRating';
88
- export * from './hooks/useProductVariants/types';
88
+ export * from './hooks/useProductVariants';
89
89
  export * from './hooks/CompareContext/';
90
90
  export * from './utils';
91
91
  export * from './types';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sentecacommerce-theme/lib",
3
3
  "sideEffects": false,
4
- "version": "0.14.12",
4
+ "version": "0.14.15",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/types/index.d.ts",
@@ -31,13 +31,13 @@
31
31
  "watch:cjs": "swc src --out-dir dist/cjs -w",
32
32
  "watch:esm": "swc src --out-dir dist/esm --no-swcrc -w"
33
33
  },
34
- "gitHead": "3bec8f769a02fbb65c6e9b1da3ed43fd99b448d9",
34
+ "gitHead": "7391deed8f45e0eab052c1f4a7adff5aaf21449c",
35
35
  "peerDependencies": {
36
36
  "react-query": "^2.26.2"
37
37
  },
38
38
  "dependencies": {
39
- "@sentecacommerce-theme/base": "^0.14.12",
40
- "@sentecacommerce-theme/cms": "^0.14.12",
39
+ "@sentecacommerce-theme/base": "^0.14.15",
40
+ "@sentecacommerce-theme/cms": "^0.14.15",
41
41
  "@sentecacommerce/sdk": "2.0.175",
42
42
  "body-scroll-lock": "^3.1.5",
43
43
  "copy-to-clipboard": "^3.3.1",