@gem-sdk/components 12.0.0-dev.148 → 12.0.0-dev.149

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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("../../../helpers.js"),s=require("@gem-sdk/system"),i=require("./ProductListCarouselLayout.liquid.js"),d=require("./ProductListGridLayout.liquid.js"),a=require("./common/styles.js"),r=require("./common/classes.js"),n=require("./common/helpers.js");exports.default=o=>{let{setting:l,styles:c,pageContext:u}=o,g=u?.pageType==="GP_FUNNEL_PAGE";if(g)return"";let{hasRelatedExclude:p,relatedExcludeTrim:f,collectionID:m,isLatestProducts:P,isGrid:$,numberOfProducts:_,productListId:h,productListHandles:y,sortedBy:v,isReverse:E,productSrc:S,productNumber:k,isSorted:L,relatedTag:b,collectionHandle:x}=n.getDataLiquid(o),R=()=>e.template`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("../../../helpers.js"),s=require("@gem-sdk/system"),i=require("./ProductListCarouselLayout.liquid.js"),d=require("./ProductListGridLayout.liquid.js"),a=require("./common/styles.js"),r=require("./common/classes.js"),n=require("./common/helpers.js");exports.default=o=>{let{setting:l,styles:c,pageContext:u}=o,g=u?.pageType==="GP_FUNNEL_PAGE";if(g)return"";let{hasRelatedExclude:p,relatedExcludeTrim:f,collectionID:m,isLatestProducts:$,isGrid:P,numberOfProducts:_,productListId:h,productListHandles:y,sortedBy:v,isReverse:E,productSrc:S,productNumber:k,isSorted:L,relatedTag:b,collectionHandle:x}=n.getDataLiquid(o),R=()=>e.template`
2
2
  ${e.RenderIf("RelatedProduct"===S,`
3
3
  assign relatedTag = '${b}'
4
4
  assign assignProduct = product
@@ -135,6 +135,7 @@
135
135
  `;return e.template`
136
136
  {%- liquid
137
137
  assign productHandles = '${y.toString()}'| split: ','
138
+ assign collection_handle = ${x}
138
139
  assign products = null
139
140
  assign target_collection = null
140
141
  assign productSrc = '${S}'
@@ -143,7 +144,9 @@
143
144
 
144
145
  if request.page_type == 'collection' or preview_page_type == 'collection'
145
146
  assign target_collection = collection
146
- if target_collection == empty or target_collection == null
147
+ if productSrc == 'Collection' and collection_handle != empty
148
+ ${t}
149
+ elsif target_collection == empty or target_collection == null
147
150
  if '${m.toLowerCase()}' == 'latest'
148
151
  assign target_collection = collections | sort: 'updated_at' ${E?"| reverse":""} | first
149
152
  else
@@ -157,7 +160,7 @@
157
160
  if productSrc == 'RelatedProduct'
158
161
  ${R()}
159
162
  elsif productSrc == 'PickProduct'
160
- unless ${P}
163
+ unless ${$}
161
164
  assign products = null | sort
162
165
  for handle in productHandles
163
166
  assign productH = all_products[handle] | sort
@@ -194,7 +197,7 @@
194
197
  {%- endif -%}
195
198
  {%- endif -%}
196
199
  {%-else-%}
197
- ${s.If($,e.template`${d.default({...o,productListId:h,productSrc:S})}`,e.template`${i.default({...o,productListId:h,productSrc:S})}`)}
200
+ ${s.If(P,e.template`${d.default({...o,productListId:h,productSrc:S})}`,e.template`${i.default({...o,productListId:h,productSrc:S})}`)}
198
201
  {%- endif -%}
199
202
  `}
200
203
  {%- assign product = gpBkProduct -%}
@@ -1,4 +1,4 @@
1
- import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-sdk/core";import{getSettingPreloadData as d,getStaticLocale as o}from"../../../helpers.js";import{If as r}from"@gem-sdk/system";import a from"./ProductListCarouselLayout.liquid.js";import n from"./ProductListGridLayout.liquid.js";import{getStyle as c}from"./common/styles.js";import{getClass as l}from"./common/classes.js";import{getDataLiquid as u}from"./common/helpers.js";let g=g=>{let{setting:p,styles:f,pageContext:m}=g,$=m?.pageType==="GP_FUNNEL_PAGE";if($)return"";let{hasRelatedExclude:P,relatedExcludeTrim:h,collectionID:_,isLatestProducts:y,isGrid:v,numberOfProducts:E,productListId:k,productListHandles:x,sortedBy:S,isReverse:b,productSrc:A,productNumber:L,isSorted:R,relatedTag:I,collectionHandle:F}=u(g),j=()=>i`
1
+ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-sdk/core";import{getSettingPreloadData as d,getStaticLocale as o}from"../../../helpers.js";import{If as r}from"@gem-sdk/system";import n from"./ProductListCarouselLayout.liquid.js";import a from"./ProductListGridLayout.liquid.js";import{getStyle as c}from"./common/styles.js";import{getClass as l}from"./common/classes.js";import{getDataLiquid as u}from"./common/helpers.js";let g=g=>{let{setting:p,styles:f,pageContext:m}=g,$=m?.pageType==="GP_FUNNEL_PAGE";if($)return"";let{hasRelatedExclude:P,relatedExcludeTrim:h,collectionID:_,isLatestProducts:y,isGrid:v,numberOfProducts:E,productListId:k,productListHandles:x,sortedBy:S,isReverse:b,productSrc:A,productNumber:L,isSorted:R,relatedTag:I,collectionHandle:F}=u(g),j=()=>i`
2
2
  ${e("RelatedProduct"===A,`
3
3
  assign relatedTag = '${I}'
4
4
  assign assignProduct = product
@@ -135,6 +135,7 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
135
135
  `;return i`
136
136
  {%- liquid
137
137
  assign productHandles = '${x.toString()}'| split: ','
138
+ assign collection_handle = ${F}
138
139
  assign products = null
139
140
  assign target_collection = null
140
141
  assign productSrc = '${A}'
@@ -143,7 +144,9 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
143
144
 
144
145
  if request.page_type == 'collection' or preview_page_type == 'collection'
145
146
  assign target_collection = collection
146
- if target_collection == empty or target_collection == null
147
+ if productSrc == 'Collection' and collection_handle != empty
148
+ ${e}
149
+ elsif target_collection == empty or target_collection == null
147
150
  if '${_.toLowerCase()}' == 'latest'
148
151
  assign target_collection = collections | sort: 'updated_at' ${b?"| reverse":""} | first
149
152
  else
@@ -194,7 +197,7 @@ import{RenderIf as e,isLocalEnv as s,baseAssetURL as t,template as i}from"@gem-s
194
197
  {%- endif -%}
195
198
  {%- endif -%}
196
199
  {%-else-%}
197
- ${r(v,i`${n({...g,productListId:k,productSrc:A})}`,i`${a({...g,productListId:k,productSrc:A})}`)}
200
+ ${r(v,i`${a({...g,productListId:k,productSrc:A})}`,i`${n({...g,productListId:k,productSrc:A})}`)}
198
201
  {%- endif -%}
199
202
  `}
200
203
  {%- assign product = gpBkProduct -%}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "12.0.0-dev.148",
3
+ "version": "12.0.0-dev.149",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",