@ikas/storefront 0.0.34 → 0.0.35

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/build/index.es.js CHANGED
@@ -22691,58 +22691,50 @@ var IkasPageHead = observer(function (_a) {
22691
22691
  });
22692
22692
  function createProductSchema(pageSpecificDataStr) {
22693
22693
  var _a;
22694
- var productDetailParsed = JSON.parse(pageSpecificDataStr);
22695
- var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
22696
- var isBrowser = typeof window !== "undefined";
22697
- if (isBrowser) {
22698
- var urlParams = new URLSearchParams(window.location.search);
22699
- var vid_1 = urlParams.get("vid");
22700
- if (vid_1) {
22701
- var variant = productDetail.product.variants.find(function (v) { return v.id === vid_1; });
22702
- if (variant) {
22703
- productDetail.selectedVariantValues = variant.variantValues;
22694
+ try {
22695
+ var productDetailParsed = JSON.parse(pageSpecificDataStr);
22696
+ var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
22697
+ var isBrowser = typeof window !== "undefined";
22698
+ if (isBrowser) {
22699
+ var urlParams = new URLSearchParams(window.location.search);
22700
+ var vid_1 = urlParams.get("vid");
22701
+ if (vid_1) {
22702
+ var variant = productDetail.product.variants.find(function (v) { return v.id === vid_1; });
22703
+ if (variant) {
22704
+ productDetail.selectedVariantValues = variant.variantValues;
22705
+ }
22704
22706
  }
22705
22707
  }
22706
- }
22707
- return {
22708
- "@context": "https://schema.org/",
22709
- "@type": "Product",
22710
- name: productDetail.product.name,
22711
- image: productDetail.selectedVariant.images.map(function (i) { return i.src; }),
22712
- description: "Sleeker than ACME's Classic Anvil, the Executive Anvil is perfect for the business traveler looking for something to drop from a height.",
22713
- sku: productDetail.selectedVariant.sku,
22714
- mpn: "925872",
22715
- brand: {
22716
- "@type": "Brand",
22717
- name: (_a = productDetail.product.brand) === null || _a === void 0 ? void 0 : _a.name,
22718
- },
22719
- review: {
22720
- "@type": "Review",
22721
- reviewRating: {
22722
- "@type": "Rating",
22723
- ratingValue: "4",
22724
- bestRating: "5",
22708
+ return {
22709
+ "@context": "https://schema.org/",
22710
+ "@type": "Product",
22711
+ name: productDetail.product.name,
22712
+ image: productDetail.selectedVariant.images.map(function (i) { return i.src; }),
22713
+ description: "",
22714
+ sku: productDetail.selectedVariant.sku,
22715
+ mpn: productDetail.selectedVariant.barcodeList.length
22716
+ ? productDetail.selectedVariant.barcodeList[0]
22717
+ : "",
22718
+ brand: {
22719
+ "@type": "Brand",
22720
+ name: (_a = productDetail.product.brand) === null || _a === void 0 ? void 0 : _a.name,
22725
22721
  },
22726
- author: {
22727
- "@type": "Person",
22728
- name: "Fred Benson",
22722
+ offers: {
22723
+ "@type": "Offer",
22724
+ url: "https://" + window.location.hostname + productDetail.href,
22725
+ priceCurrency: productDetail.selectedVariant.price.currency,
22726
+ price: productDetail.selectedVariant.price.finalPrice,
22727
+ priceValidUntil: "",
22728
+ itemCondition: "https://schema.org/NewCondition",
22729
+ availability: productDetail.selectedVariant.stock > 0
22730
+ ? "https://schema.org/InStock"
22731
+ : "https://schema.org/OutOfStock",
22729
22732
  },
22730
- },
22731
- aggregateRating: {
22732
- "@type": "AggregateRating",
22733
- ratingValue: "4.4",
22734
- reviewCount: "89",
22735
- },
22736
- offers: {
22737
- "@type": "Offer",
22738
- url: "https://example.com/anvil",
22739
- priceCurrency: productDetail.selectedVariant.price.currency,
22740
- price: productDetail.selectedVariant.price.finalPrice,
22741
- priceValidUntil: "2020-11-20",
22742
- itemCondition: "https://schema.org/UsedCondition",
22743
- availability: "https://schema.org/InStock",
22744
- },
22745
- };
22733
+ };
22734
+ }
22735
+ catch (err) {
22736
+ console.log(err);
22737
+ }
22746
22738
  }
22747
22739
 
22748
22740
  var IkasCheckoutPage = observer(function (_a) {
package/build/index.js CHANGED
@@ -22675,58 +22675,50 @@ var IkasPageHead = mobxReactLite.observer(function (_a) {
22675
22675
  });
22676
22676
  function createProductSchema(pageSpecificDataStr) {
22677
22677
  var _a;
22678
- var productDetailParsed = JSON.parse(pageSpecificDataStr);
22679
- var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
22680
- var isBrowser = typeof window !== "undefined";
22681
- if (isBrowser) {
22682
- var urlParams = new URLSearchParams(window.location.search);
22683
- var vid_1 = urlParams.get("vid");
22684
- if (vid_1) {
22685
- var variant = productDetail.product.variants.find(function (v) { return v.id === vid_1; });
22686
- if (variant) {
22687
- productDetail.selectedVariantValues = variant.variantValues;
22678
+ try {
22679
+ var productDetailParsed = JSON.parse(pageSpecificDataStr);
22680
+ var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
22681
+ var isBrowser = typeof window !== "undefined";
22682
+ if (isBrowser) {
22683
+ var urlParams = new URLSearchParams(window.location.search);
22684
+ var vid_1 = urlParams.get("vid");
22685
+ if (vid_1) {
22686
+ var variant = productDetail.product.variants.find(function (v) { return v.id === vid_1; });
22687
+ if (variant) {
22688
+ productDetail.selectedVariantValues = variant.variantValues;
22689
+ }
22688
22690
  }
22689
22691
  }
22690
- }
22691
- return {
22692
- "@context": "https://schema.org/",
22693
- "@type": "Product",
22694
- name: productDetail.product.name,
22695
- image: productDetail.selectedVariant.images.map(function (i) { return i.src; }),
22696
- description: "Sleeker than ACME's Classic Anvil, the Executive Anvil is perfect for the business traveler looking for something to drop from a height.",
22697
- sku: productDetail.selectedVariant.sku,
22698
- mpn: "925872",
22699
- brand: {
22700
- "@type": "Brand",
22701
- name: (_a = productDetail.product.brand) === null || _a === void 0 ? void 0 : _a.name,
22702
- },
22703
- review: {
22704
- "@type": "Review",
22705
- reviewRating: {
22706
- "@type": "Rating",
22707
- ratingValue: "4",
22708
- bestRating: "5",
22692
+ return {
22693
+ "@context": "https://schema.org/",
22694
+ "@type": "Product",
22695
+ name: productDetail.product.name,
22696
+ image: productDetail.selectedVariant.images.map(function (i) { return i.src; }),
22697
+ description: "",
22698
+ sku: productDetail.selectedVariant.sku,
22699
+ mpn: productDetail.selectedVariant.barcodeList.length
22700
+ ? productDetail.selectedVariant.barcodeList[0]
22701
+ : "",
22702
+ brand: {
22703
+ "@type": "Brand",
22704
+ name: (_a = productDetail.product.brand) === null || _a === void 0 ? void 0 : _a.name,
22709
22705
  },
22710
- author: {
22711
- "@type": "Person",
22712
- name: "Fred Benson",
22706
+ offers: {
22707
+ "@type": "Offer",
22708
+ url: "https://" + window.location.hostname + productDetail.href,
22709
+ priceCurrency: productDetail.selectedVariant.price.currency,
22710
+ price: productDetail.selectedVariant.price.finalPrice,
22711
+ priceValidUntil: "",
22712
+ itemCondition: "https://schema.org/NewCondition",
22713
+ availability: productDetail.selectedVariant.stock > 0
22714
+ ? "https://schema.org/InStock"
22715
+ : "https://schema.org/OutOfStock",
22713
22716
  },
22714
- },
22715
- aggregateRating: {
22716
- "@type": "AggregateRating",
22717
- ratingValue: "4.4",
22718
- reviewCount: "89",
22719
- },
22720
- offers: {
22721
- "@type": "Offer",
22722
- url: "https://example.com/anvil",
22723
- priceCurrency: productDetail.selectedVariant.price.currency,
22724
- price: productDetail.selectedVariant.price.finalPrice,
22725
- priceValidUntil: "2020-11-20",
22726
- itemCondition: "https://schema.org/UsedCondition",
22727
- availability: "https://schema.org/InStock",
22728
- },
22729
- };
22717
+ };
22718
+ }
22719
+ catch (err) {
22720
+ console.log(err);
22721
+ }
22730
22722
  }
22731
22723
 
22732
22724
  var IkasCheckoutPage = mobxReactLite.observer(function (_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",