@ikas/storefront 0.0.27 → 0.0.28

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
@@ -22698,6 +22698,17 @@ function createProductSchema(pageSpecificDataStr) {
22698
22698
  var _a;
22699
22699
  var productDetailParsed = JSON.parse(pageSpecificDataStr);
22700
22700
  var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
22701
+ var isBrowser = typeof window !== undefined;
22702
+ if (isBrowser) {
22703
+ var urlParams = new URLSearchParams(window.location.search);
22704
+ var vid_1 = urlParams.get("vid");
22705
+ if (vid_1) {
22706
+ var variant = productDetail.product.variants.find(function (v) { return v.id === vid_1; });
22707
+ if (variant) {
22708
+ productDetail.selectedVariantValues = variant.variantValues;
22709
+ }
22710
+ }
22711
+ }
22701
22712
  return {
22702
22713
  "@context": "https://schema.org/",
22703
22714
  "@type": "Product",
package/build/index.js CHANGED
@@ -22682,6 +22682,17 @@ function createProductSchema(pageSpecificDataStr) {
22682
22682
  var _a;
22683
22683
  var productDetailParsed = JSON.parse(pageSpecificDataStr);
22684
22684
  var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
22685
+ var isBrowser = typeof window !== undefined;
22686
+ if (isBrowser) {
22687
+ var urlParams = new URLSearchParams(window.location.search);
22688
+ var vid_1 = urlParams.get("vid");
22689
+ if (vid_1) {
22690
+ var variant = productDetail.product.variants.find(function (v) { return v.id === vid_1; });
22691
+ if (variant) {
22692
+ productDetail.selectedVariantValues = variant.variantValues;
22693
+ }
22694
+ }
22695
+ }
22685
22696
  return {
22686
22697
  "@context": "https://schema.org/",
22687
22698
  "@type": "Product",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",