@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 +40 -48
- package/build/index.js +40 -48
- package/package.json +1 -1
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
|
-
|
|
22695
|
-
|
|
22696
|
-
|
|
22697
|
-
|
|
22698
|
-
|
|
22699
|
-
|
|
22700
|
-
|
|
22701
|
-
|
|
22702
|
-
|
|
22703
|
-
|
|
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
|
-
|
|
22708
|
-
|
|
22709
|
-
|
|
22710
|
-
|
|
22711
|
-
|
|
22712
|
-
|
|
22713
|
-
|
|
22714
|
-
|
|
22715
|
-
|
|
22716
|
-
|
|
22717
|
-
|
|
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
|
-
|
|
22727
|
-
"@type": "
|
|
22728
|
-
|
|
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
|
-
|
|
22732
|
-
|
|
22733
|
-
|
|
22734
|
-
|
|
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
|
-
|
|
22679
|
-
|
|
22680
|
-
|
|
22681
|
-
|
|
22682
|
-
|
|
22683
|
-
|
|
22684
|
-
|
|
22685
|
-
|
|
22686
|
-
|
|
22687
|
-
|
|
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
|
-
|
|
22692
|
-
|
|
22693
|
-
|
|
22694
|
-
|
|
22695
|
-
|
|
22696
|
-
|
|
22697
|
-
|
|
22698
|
-
|
|
22699
|
-
|
|
22700
|
-
|
|
22701
|
-
|
|
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
|
-
|
|
22711
|
-
"@type": "
|
|
22712
|
-
|
|
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
|
-
|
|
22716
|
-
|
|
22717
|
-
|
|
22718
|
-
|
|
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) {
|