@gem-sdk/components 19.0.0-staging.31 → 19.0.0-staging.32

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.
Files changed (25) hide show
  1. package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
  2. package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +12 -12
  3. package/dist/cjs/product/components/product-badge/common/classes.js +1 -1
  4. package/dist/cjs/product/components/product-badge/utils/renderBadgeILP.js +1 -1
  5. package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +7 -5
  6. package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +14 -16
  7. package/dist/cjs/product/components/product-images-v3/common/common.js +1 -1
  8. package/dist/cjs/product/components/product-list/ProductList.js +1 -1
  9. package/dist/cjs/product/components/product-list/ProductList.liquid.js +10 -9
  10. package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
  11. package/dist/cjs/product/components/product-list-v3/ProductList.liquid.js +10 -9
  12. package/dist/cjs/product/components/product-wrap/Product.liquid.js +12 -9
  13. package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
  14. package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +12 -12
  15. package/dist/esm/product/components/product-badge/common/classes.js +1 -1
  16. package/dist/esm/product/components/product-badge/utils/renderBadgeILP.js +1 -1
  17. package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +5 -3
  18. package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +26 -28
  19. package/dist/esm/product/components/product-images-v3/common/common.js +1 -1
  20. package/dist/esm/product/components/product-list/ProductList.js +1 -1
  21. package/dist/esm/product/components/product-list/ProductList.liquid.js +18 -17
  22. package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
  23. package/dist/esm/product/components/product-list-v3/ProductList.liquid.js +18 -17
  24. package/dist/esm/product/components/product-wrap/Product.liquid.js +16 -13
  25. package/package.json +2 -2
@@ -1,11 +1,11 @@
1
- import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-sdk/core";import a from"../../../grid/components/row/Row.liquid.js";import{LiquidIf as d,If as o}from"@gem-sdk/system";import{getSettingPreloadData as n,getStaticLocale as s}from"../../../helpers.js";import{getData as c,DYNAMIC_PRODUCT_STATUS as p,STATIC_PRODUCT_STATUS as l,PRODUCT_ID_LATEST as u}from"./common/helpers.js";let f=f=>{let{children:m,setting:g,style:y,builderProps:v,rawChildren:_,advanced:$}=f,{isSyncProduct:S,productSetting:I}=g??{},b=I?.hasPreSelected??!1,{rowSetting:j,rowStyles:h,formatVariantId:q,formatProductId:P,productStatus:V,preSelectedOptionIds:k,productHandle:w,advancedStyle:E}=c(f);return r`
1
+ import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-sdk/core";import a from"../../../grid/components/row/Row.liquid.js";import{LiquidIf as d,If as o}from"@gem-sdk/system";import{getSettingPreloadData as n,getStaticLocale as s}from"../../../helpers.js";import{getData as c,DYNAMIC_PRODUCT_STATUS as l,STATIC_PRODUCT_STATUS as p,PRODUCT_ID_LATEST as u}from"./common/helpers.js";let f=f=>{let{children:m,setting:g,style:y,builderProps:v,rawChildren:_,advanced:$}=f,{isSyncProduct:S,productSetting:h}=g??{},I=h?.hasPreSelected??!1,{rowSetting:b,rowStyles:j,formatVariantId:P,formatProductId:q,productStatus:V,preSelectedOptionIds:k,productHandle:w,advancedStyle:E}=c(f);return r`
2
2
  ${r`
3
3
  {%- assign gpBkProduct = product -%}
4
- ${o(V==p,r`
4
+ ${o(V==l,r`
5
5
  {%- liquid
6
6
  if request.page_type != 'product'
7
7
  assign product = all_products['${w}']
8
- assign productId = '${P}' | times: 1
8
+ assign productId = '${q}' | times: 1
9
9
  if product == empty or product == null
10
10
  paginate collections.all.products by 100000
11
11
  for item in collections.all.products
@@ -20,14 +20,14 @@ import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-s
20
20
  `,r`
21
21
  {%- liquid
22
22
  if request.page_type == 'product'
23
- if '${V}' == '${l}'
24
- if '${P}' == '${u}'
23
+ if '${V}' == '${p}'
24
+ if '${q}' == '${u}'
25
25
  paginate collections.all.products by 100000
26
26
  assign product = collections.all.products | sort: 'created_at' | reverse | first
27
27
  endpaginate
28
28
  else
29
29
  assign product = all_products['${w}']
30
- assign productId = '${P}' | times: 1
30
+ assign productId = '${q}' | times: 1
31
31
  if product == empty or product == null
32
32
  paginate collections.all.products by 100000
33
33
  for item in collections.all.products
@@ -40,13 +40,13 @@ import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-s
40
40
  endif
41
41
  endif
42
42
  else
43
- if '${P}' == '${u}'
43
+ if '${q}' == '${u}'
44
44
  paginate collections.all.products by 100000
45
45
  assign product = collections.all.products | sort: 'created_at'| reverse | first
46
46
  endpaginate
47
47
  else
48
48
  assign product = all_products['${w}']
49
- assign productId = '${P}' | times: 1
49
+ assign productId = '${q}' | times: 1
50
50
  if product == empty or product == null
51
51
  paginate collections.all.products by 100000
52
52
  for item in collections.all.products
@@ -63,23 +63,26 @@ import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-s
63
63
  `}
64
64
  ${d("product != empty and product != null",r`
65
65
  ${r`
66
- {%- assign initVariantId = ${q} -%}
66
+ {%- assign initVariantId = ${P} -%}
67
67
  {%- assign product_form_id = 'product-form-' | append: "${v?.uid}" -%}
68
- ${q?"{%- assign variant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign variant = product.selected_or_first_available_variant -%}"}
69
- ${q?"{%- assign productSelectedVariant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign productSelectedVariant = product.selected_or_first_available_variant -%}"}
68
+ ${P?"{%- assign variant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign variant = product.selected_or_first_available_variant -%}"}
69
+ ${P?"{%- assign productSelectedVariant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign productSelectedVariant = product.selected_or_first_available_variant -%}"}
70
70
  {%-if productSelectedVariant == empty or productSelectedVariant == null -%}
71
71
  {%- assign productSelectedVariant = product.selected_or_first_available_variant -%}
72
72
  {%- endif -%}
73
73
  {%-if variant == empty or variant == null -%}
74
74
  {%- assign variant = product.selected_or_first_available_variant -%}
75
75
  {%- endif -%}
76
+ {% unless isSettingSameHeightProductList %}
77
+ {%- assign isSettingSameHeightProductList = false -%}
78
+ {% endunless %}
76
79
  `}
77
80
  <gp-product
78
81
  data-uid="${v?.uid}"
79
82
  data-id="${v?.uid}"
80
83
  style="${E}"
81
84
  class="${$?.cssClass}"
82
- gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${k}], "isSyncProduct": "${S}", "hasPreSelected": ${b}, "variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "quantity": 1, "formId": "{{ product_form_id }}" }'
85
+ gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${k}], "isSyncProduct": "${S}", "hasPreSelected": ${I}, "variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "quantity": 1, "formId": "{{ product_form_id }}" }'
83
86
  gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }}}'
84
87
  >
85
88
  <product-form class="product-form">
@@ -87,7 +90,7 @@ import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-s
87
90
  <input type="hidden" name="id" value="{{ variant.id }}" />
88
91
  <input type="hidden" name="quantity" value="{{ quantity }}" />
89
92
  <button type="submit" onclick="return false;" style="display:none;"></button>
90
- ${a({builderProps:{...v,uid:v?.uid,uidInteraction:`${v?.uid}-row`},style:y,styles:h,setting:j,children:m,rawChildren:_})}
93
+ ${a({builderProps:{...v,uid:v?.uid,uidInteraction:`${v?.uid}-row`},style:y,styles:j,setting:b,children:m,rawChildren:_})}
91
94
  {%- endform -%}
92
95
  </product-form>
93
96
  </gp-product>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "19.0.0-staging.31",
3
+ "version": "19.0.0-staging.32",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -26,7 +26,7 @@
26
26
  "i18n:extract": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/translate/extract-texts-to-locales.js && node ./scripts/translate/en-keys-usage.js"
27
27
  },
28
28
  "devDependencies": {
29
- "@gem-sdk/core": "19.0.0-staging.28",
29
+ "@gem-sdk/core": "19.0.0-staging.32",
30
30
  "@gem-sdk/styles": "19.0.0-staging.28",
31
31
  "@gem-sdk/system": "19.0.0-staging.28",
32
32
  "@types/react-transition-group": "^4.4.12",