@gem-sdk/components 2.0.0-dev.855 → 2.0.0-dev.857
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/dist/cjs/product/components/ProductList.liquid.js +35 -30
- package/dist/cjs/product/setting/product-image-v2/ProductImages.js +1 -1
- package/dist/esm/product/components/ProductList.liquid.js +33 -28
- package/dist/esm/product/setting/product-image-v2/ProductImages.js +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var product=require("../helpers/product.js"),core=require("@gem-sdk/core"),CarouselItem_liquid=require("../../carousel/components/CarouselItem.liquid.js"),Carousel_liquid=require("../../carousel/components/Carousel.liquid.js"),carousel=require("../../carousel/components/common/carousel.js"),arrow=require("../../carousel/components/common/arrow.js"),dots=require("../../carousel/components/common/dots.js"),helpers=require("../../helpers.js"),productFeaturedImage=require("./ProductImages/common/productFeaturedImage.js");const ProductList=({setting:t,builderProps:e,styles:o,className:s,children:r,advanced:i,pageContext:d})=>{let n="gid://shopify/Collection/",a=t?.productSetting,c=a?.relatedTag,l=a?.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var product=require("../helpers/product.js"),core=require("@gem-sdk/core"),CarouselItem_liquid=require("../../carousel/components/CarouselItem.liquid.js"),Carousel_liquid=require("../../carousel/components/Carousel.liquid.js"),carousel=require("../../carousel/components/common/carousel.js"),arrow=require("../../carousel/components/common/arrow.js"),dots=require("../../carousel/components/common/dots.js"),helpers=require("../../helpers.js"),productFeaturedImage=require("./ProductImages/common/productFeaturedImage.js");const ProductList=({setting:t,builderProps:e,styles:o,className:s,children:r,advanced:i,pageContext:d})=>{let n="gid://shopify/Collection/",a=t?.productSetting,c=a?.relatedTag,l=a?.hasRelatedExclude,u=a?.relatedExclude,p=a?.productSrc??"Collection",g=a?.collectionId?.includes(n)?a?.collectionId?.replace(n,""):"latest",f=a?.productSrc==="PickProduct"&&a?.productIds?.length===0,m=o?.layout==="grid",P=productFeaturedImage.convertUnitToNumber(t?.numberOfProducts,4),h="PickProduct"===p&&a?.productIds?.length?a?.productIds.map(t=>t.replace("gid://shopify/Product/","")):[],_="PickProduct"===p&&a?.productHandles?.length?a?.productHandles:[],v=arrow.getUpdatedArrowDisplay(t?.arrow,t?.controlOverContent),y=dots.getUpdatedDotStyle(t?.dot),S=e=>core.template`
|
|
2
2
|
<div style="${{...core.makeStyleResponsive("w",core.makeWidth(o?.width,o?.fullWidth)),...core.makeStyleResponsive("rg",o?.horizontalGutter),...core.makeStyleResponsive("cg",o?.verticalGutter),...core.makeStyleResponsive("gtc",{desktop:`repeat(${core.getResponsiveValueByScreen(t?.slidesToShow,"desktop")}, minmax(0, 1fr))`,tablet:t?.slidesToShow?.tablet&&`repeat(${core.getResponsiveValueByScreen(t?.slidesToShow,"tablet")}, minmax(0, 1fr))`,mobile:t?.slidesToShow?.mobile&&`repeat(${core.getResponsiveValueByScreen(t?.slidesToShow,"mobile")}, minmax(0, 1fr))`})}}"
|
|
3
3
|
class="${core.cls(s,"gp-grid !gp-m-auto gp-w-full",i?.cssClass)}"
|
|
4
4
|
>
|
|
5
5
|
${e}
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
${Carousel_liquid.default({advanced:i,builderProps:{...e},setting:{loop:t?.loop,slidesToShow:t?.slidesToShow,dot:t?.dot,dotSize:{desktop:12},dotGapToCarousel:{desktop:16},dotStyle:
|
|
8
|
+
`,$=s=>core.template`
|
|
9
|
+
${Carousel_liquid.default({advanced:i,builderProps:{...e},setting:{loop:t?.loop,slidesToShow:t?.slidesToShow,dot:t?.dot,dotSize:{desktop:12},dotGapToCarousel:{desktop:16},dotStyle:y,navigationStyle:v,arrowCustom:t?.arrowCustom,controlOverContent:t?.controlOverContent,enableDrag:{desktop:t?.dragToScroll,tablet:t?.dragToScroll,mobile:t?.dragToScroll},speed:t?.speed,dotActiveColor:t?.dotActiveColor,dotColor:t?.dotColor,autoplay:t?.autoplay,pauseOnHover:t?.pauseOnHover,autoplayTimeout:t?.autoplayTimeout,arrowCustomColor:t?.arrowCustomColor,arrowButtonSize:{desktop:{width:"24px",height:"24px"}}},rootId:`product-list-carousel-${e?.uid}`,rootClass:"gp-justify-center",styles:{sizeSetting:{...product.getSizeSetting({adaptiveHeight:o?.adaptiveHeight,fullWidth:o?.fullWidth,width:o?.width,height:o?.height})},spacing:o?.spacing},children:`
|
|
10
10
|
${s}
|
|
11
11
|
`})}
|
|
12
|
-
|
|
13
|
-
${
|
|
12
|
+
`,C=()=>core.template`
|
|
13
|
+
${S(`
|
|
14
14
|
{%- assign count = 0 -%}
|
|
15
15
|
{%- for product in products limit: limit -%}
|
|
16
16
|
{%- assign count = count | plus: 1 -%}
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
{%- endform -%}
|
|
26
26
|
</gp-product>
|
|
27
27
|
{% endfor %}
|
|
28
|
-
{%- if count == 0 and ${
|
|
28
|
+
{%- if count == 0 and ${h.length} == 0 -%}
|
|
29
29
|
<div>${helpers.getStaticLocale("ProductList","no_products_found")}</div>
|
|
30
30
|
{%- endif -%}
|
|
31
31
|
`)}
|
|
32
|
-
`,
|
|
33
|
-
${
|
|
32
|
+
`,I=()=>core.template`
|
|
33
|
+
${$(`
|
|
34
34
|
{%- assign count = 0 -%}
|
|
35
35
|
{%- for product in products limit: limit -%}
|
|
36
36
|
{%- assign count = count | plus: 1 -%}
|
|
@@ -45,64 +45,69 @@
|
|
|
45
45
|
{%- endform -%}
|
|
46
46
|
</gp-product>`})}
|
|
47
47
|
{%- endfor -%}
|
|
48
|
-
{%- if count == 0 and ${
|
|
48
|
+
{%- if count == 0 and ${h.length} == 0 -%}
|
|
49
49
|
<div>${helpers.getStaticLocale("ProductList","no_products_found")}</div>
|
|
50
50
|
{%- endif -%}
|
|
51
51
|
`)}
|
|
52
|
-
`,
|
|
52
|
+
`,L=()=>core.template`
|
|
53
53
|
{%- if products == null -%}
|
|
54
54
|
<div>${helpers.getStaticLocale("ProductList","product_not_found")}</div>
|
|
55
55
|
{%-else-%}
|
|
56
|
-
${core.RenderIf(
|
|
57
|
-
${core.RenderIf(!
|
|
56
|
+
${core.RenderIf(m,C())}
|
|
57
|
+
${core.RenderIf(!m,I())}
|
|
58
58
|
{%- endif -%}
|
|
59
59
|
`;return d?.pageType==="GP_FUNNEL_PAGE"?"":core.template`
|
|
60
60
|
${core.RenderIf(core.isLocalEnv,'<script src="{{ \'gp-product.v2.js\' | asset_url }}" defer="defer"></script>',`<script src="${core.baseAssetURL}/assets-v2/gp-product.v2.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
61
61
|
{%- assign gpBkProduct = product -%}
|
|
62
62
|
{%- assign gpBkProducts = products -%}
|
|
63
63
|
{%- liquid
|
|
64
|
-
assign productHandles = '${
|
|
64
|
+
assign productHandles = '${_.toString()}'| split: ','
|
|
65
65
|
assign products = null
|
|
66
66
|
assign stringListProducts = ''
|
|
67
67
|
assign target_collection = null
|
|
68
|
-
assign productSrc = '${
|
|
68
|
+
assign productSrc = '${p}'
|
|
69
69
|
assign c = 0
|
|
70
|
-
assign limit = ${
|
|
70
|
+
assign limit = ${m&&"latest"===g?"RelatedProduct"===p?P:a?.numOfSelectedProducts||4:P}
|
|
71
71
|
if request.page_type == 'collection' or preview_page_type == 'collection'
|
|
72
72
|
assign target_collection = collection
|
|
73
73
|
if target_collection == empty or target_collection == null
|
|
74
|
-
if '${
|
|
74
|
+
if '${g.toLowerCase()}' == 'latest'
|
|
75
75
|
assign target_collection = collections | sort: 'updated_at' | first
|
|
76
76
|
else
|
|
77
77
|
for collection in collections
|
|
78
|
-
if collection.id == ${
|
|
78
|
+
if collection.id == ${g}
|
|
79
79
|
assign target_collection = collection
|
|
80
80
|
break
|
|
81
81
|
endif
|
|
82
82
|
endfor
|
|
83
83
|
endif
|
|
84
84
|
endif
|
|
85
|
-
paginate target_collection.products by ${
|
|
85
|
+
paginate target_collection.products by ${P||4}
|
|
86
86
|
assign products = target_collection.products
|
|
87
87
|
endpaginate
|
|
88
88
|
else
|
|
89
89
|
if productSrc == 'RelatedProduct'
|
|
90
90
|
assign relatedTag = '${c}'
|
|
91
|
-
assign relatedProductHandle = '${l}'
|
|
92
91
|
assign products = null | sort
|
|
93
|
-
assign assignProduct =
|
|
92
|
+
assign assignProduct = product
|
|
94
93
|
assign idAssignProduct = assignProduct.id
|
|
95
94
|
assign allProducts = collections.all.products
|
|
96
95
|
|
|
97
96
|
if relatedTag == 'collection'
|
|
97
|
+
assign hasRelatedExclude = '${l}'
|
|
98
|
+
assign relatedExclude = '${u}'
|
|
99
|
+
assign arrayRelatedExclude = relatedExclude | spit: ", "
|
|
98
100
|
for collection in collections
|
|
99
101
|
assign collectionId = collection.id
|
|
102
|
+
assign collectionTitle = collection.handle
|
|
100
103
|
assign isInCollection = false
|
|
101
104
|
assign collectionsAssignProduct = assignProduct.collections
|
|
102
105
|
for item in collectionsAssignProduct
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
unless arrayRelatedExclude contains item.handle
|
|
107
|
+
if item.id == collectionId
|
|
108
|
+
assign isInCollection = true
|
|
109
|
+
endif
|
|
110
|
+
endunless
|
|
106
111
|
endfor
|
|
107
112
|
if isInCollection
|
|
108
113
|
for item in allProducts
|
|
@@ -175,11 +180,11 @@ ${core.RenderIf(core.isLocalEnv,'<script src="{{ \'gp-product.v2.js\' | asset_ur
|
|
|
175
180
|
endfor
|
|
176
181
|
endfor
|
|
177
182
|
endif
|
|
178
|
-
paginate products by ${
|
|
183
|
+
paginate products by ${P||4}
|
|
179
184
|
assign products = products
|
|
180
185
|
endpaginate
|
|
181
186
|
else if productSrc == 'PickProduct'
|
|
182
|
-
unless ${
|
|
187
|
+
unless ${f}
|
|
183
188
|
assign products = null | sort
|
|
184
189
|
for handle in productHandles
|
|
185
190
|
assign productH = all_products[handle] | sort
|
|
@@ -187,30 +192,30 @@ ${core.RenderIf(core.isLocalEnv,'<script src="{{ \'gp-product.v2.js\' | asset_ur
|
|
|
187
192
|
endfor
|
|
188
193
|
assign limit = products.length
|
|
189
194
|
else
|
|
190
|
-
if ${
|
|
195
|
+
if ${h.length} == 0
|
|
191
196
|
paginate collections.all.products by 100000
|
|
192
197
|
assign products = collections.all.products | sort : "created_at" | reverse
|
|
193
198
|
endpaginate
|
|
194
199
|
endif
|
|
195
200
|
endunless
|
|
196
201
|
else
|
|
197
|
-
if '${
|
|
202
|
+
if '${g.toLowerCase()}' == 'latest'
|
|
198
203
|
assign target_collection = collections | sort: 'updated_at' | first
|
|
199
204
|
else
|
|
200
205
|
for collection in collections
|
|
201
|
-
if collection.id == ${
|
|
206
|
+
if collection.id == ${g}
|
|
202
207
|
assign target_collection = collection
|
|
203
208
|
break
|
|
204
209
|
endif
|
|
205
210
|
endfor
|
|
206
211
|
endif
|
|
207
|
-
paginate target_collection.products by ${
|
|
212
|
+
paginate target_collection.products by ${P||4}
|
|
208
213
|
assign products = target_collection.products
|
|
209
214
|
endpaginate
|
|
210
215
|
endif
|
|
211
216
|
endif
|
|
212
217
|
-%}
|
|
213
|
-
${
|
|
218
|
+
${L()}
|
|
214
219
|
{%- assign product = gpBkProduct -%}
|
|
215
220
|
{%- assign products = gpBkProducts -%}
|
|
216
221
|
`};exports.default=ProductList;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path d="M13.3337 14.6666C13.3337 16.1333 12.1337 17.3333 10.667 17.3333C9.20033 17.3333 8.00033 16.1333 8.00033 14.6666C8.00033 13.2 9.20033 12 10.667 12C12.1337 12 13.3337 13.2 13.3337 14.6666ZM27.3741 14.8404C26.9836 14.4499 26.3504 14.4499 25.9599 14.8404L16.667 24.1333L14.0346 21.6062C13.6442 21.2314 13.0267 21.2352 12.6409 21.6145L5.33366 28.8V9.33329H34.667V22.1333L27.3741 14.8404ZM34.667 30.6666H23.2003L18.5337 26L26.667 17.8666L34.667 25.8666V30.6666ZM7.33366 30.6666L13.467 24.6666L19.467 30.6666H7.33366ZM3.66699 6.66663C3.11471 6.66663 2.66699 7.11434 2.66699 7.66663V31.4666V32.3333C2.66699 32.8856 3.11471 33.3333 3.66699 33.3333H25.867H36.3337C36.8859 33.3333 37.3337 32.8856 37.3337 32.3333V30.6666V28.5333V24.8V7.66662C37.3337 7.11434 36.8859 6.66663 36.3337 6.66663H3.66699Z" fill="currentColor"/>
|
|
4
4
|
</svg>
|
|
5
|
-
`,settings:[{id:"setting",controls:[{id:"select-display",type:"group",label:"Select images to display",controls:ProductFeatureImage.productSelectDisplaySetting},{id:"featured-image",type:"group",label:"Featured Image",controls:ProductFeatureImage.productFeatureImageSetting},{id:"gallery-images",type:"group",label:"Gallery Images",controls:ProductGalleryImage.productGalleryImageSetting},{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"finest"}},options:[{label:"Finest",value:"finest"},{label:"High",value:"high"},{label:"Medium",value:"medium"},{label:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"preload",type:"toggle",label:"Preload",default:!1},{id:"qualityPercent",type:"range",label:"",units:["%"],min:100,max:400,step:50,useOnlyUnitInit:!0,devices:{desktop:{default:100}}},{id:"ftDotStyle",label:"Dot style",type:"layout-segment",iconViewBox:"0 0 77 48",enableItemBackground:!0,enableTooltip:!0,options:[{label:"None",value:"none",type:"carousel-dot",isTextIcon:!0},{label:"Inside",value:"inside",type:"carousel-dot"},{label:"Outside",value:"outside",type:"carousel-dot"}],devices:{desktop:{default:"none"}}},{id:"ftDotSize",label:"Dots size",type:"input:number",min:1,devices:{desktop:{default:12}}},{id:"ftDotGapToCarousel",label:"Gap to carousel",type:"input:unit",useOnlyUnitInit:!0,units:["px"],min:0,devices:{desktop:{default:16}}},{id:"ftDotColor",label:"Dot color",type:"colorpicker",devices:{desktop:{default:"bg-1"}}},{id:"ftDotActiveColor",label:"Dot color active",type:"colorpicker",devices:{desktop:{default:"line-3"}}}]},{id:"style",controls:[{id:"position",label:"Layout",type:"layout-segment",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:3,itemSpacing:"large",options:[{label:"Bottom",value:"bottom-center",type:"p-image-layout"},{label:"Left",value:"left",type:"p-image-layout"},{label:"Right",value:"right",type:"p-image-layout"},{label:"Only Feature Image",value:"only-feature",type:"p-image-layout"},{label:"2 Col",value:"two-col",type:"p-image-layout"},{label:"1 Col",value:"one-col",type:"p-image-layout"}],devices:{desktop:{default:"bottom-center"},mobile:{default:"bottom-center"}}},{id:"spacing",label:"Spacing Item",type:"input:unit-spacing",units:["px"],devices:{desktop:{default:"var(--g-s-s)"},mobile:{default:"var(--g-s-s)"}}},{id:"ratioLayout",label:"Ratio",type:"grid-arrange",devices:{desktop:{default:[2,10]}}},{id:"ratioLayoutRight",label:"Ratio",type:"grid-arrange",devices:{desktop:{default:[10,2]}}},{id:"dimensions",type:"group",label:"Featured Image",controls:ProductFeatureImage.productFeatureImageStyle},{id:"galleryStyles",type:"group",label:"Gallery",controls:ProductGalleryImage.productGalleryImageStyle},{id:"align",label:"Alignment",type:"segment",options:[{label:"Start",value:"flex-start",type:"align-flex",tooltip:"Align left"},{label:"Center",value:"center",type:"align-flex",tooltip:"Align center"},{label:"End",value:"flex-end",type:"align-flex",tooltip:"Align right"}],devices:getDefaultResponsive("flex-start")}]}],ui:[{type:"group",label:{en:"Layout"},controls:[{type:"control",layout:"vertical",setting:{id:"position"}},{type:"control",label:{en:"Ratio"},setting:{id:"ratioLayout"},layout:"vertical",condition:'position == "left"'},{type:"control",label:{en:"Ratio"},setting:{id:"ratioLayoutRight"},layout:"vertical",condition:'position == "right"'},{type:"control",label:{en:"Spacing"},setting:{id:"spacing"},isMoreSetting:!0,condition:'["bottom-center", "left", "right"].includes(position)'},{type:"control",label:{en:"Spacing"},setting:{id:"itemSpacing"},isMoreSetting:!0,condition:'["one-col", "two-col"].includes(position)'}]},{type:"group",label:{en:"Select images to display"},controls:ProductFeatureImage.productSelectImage,condition:'["bottom-center", "left", "right", "only-feature"].includes(position)'},{type:"group",label:{en:"Featured image"},controls:ProductFeatureImage.productFeatureImageUI,condition:'["bottom-center", "left", "right", "only-feature"].includes(position)',hiddenDivice:!0},{type:"group",label:{en:"
|
|
5
|
+
`,settings:[{id:"setting",controls:[{id:"select-display",type:"group",label:"Select images to display",controls:ProductFeatureImage.productSelectDisplaySetting},{id:"featured-image",type:"group",label:"Featured Image",controls:ProductFeatureImage.productFeatureImageSetting},{id:"gallery-images",type:"group",label:"Gallery Images",controls:ProductGalleryImage.productGalleryImageSetting},{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"finest"}},options:[{label:"Finest",value:"finest"},{label:"High",value:"high"},{label:"Medium",value:"medium"},{label:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"preload",type:"toggle",label:"Preload",default:!1},{id:"qualityPercent",type:"range",label:"",units:["%"],min:100,max:400,step:50,useOnlyUnitInit:!0,devices:{desktop:{default:100}}},{id:"ftDotStyle",label:"Dot style",type:"layout-segment",iconViewBox:"0 0 77 48",enableItemBackground:!0,enableTooltip:!0,options:[{label:"None",value:"none",type:"carousel-dot",isTextIcon:!0},{label:"Inside",value:"inside",type:"carousel-dot"},{label:"Outside",value:"outside",type:"carousel-dot"}],devices:{desktop:{default:"none"}}},{id:"ftDotSize",label:"Dots size",type:"input:number",min:1,devices:{desktop:{default:12}}},{id:"ftDotGapToCarousel",label:"Gap to carousel",type:"input:unit",useOnlyUnitInit:!0,units:["px"],min:0,devices:{desktop:{default:16}}},{id:"ftDotColor",label:"Dot color",type:"colorpicker",devices:{desktop:{default:"bg-1"}}},{id:"ftDotActiveColor",label:"Dot color active",type:"colorpicker",devices:{desktop:{default:"line-3"}}}]},{id:"style",controls:[{id:"position",label:"Layout",type:"layout-segment",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:3,itemSpacing:"large",options:[{label:"Bottom",value:"bottom-center",type:"p-image-layout"},{label:"Left",value:"left",type:"p-image-layout"},{label:"Right",value:"right",type:"p-image-layout"},{label:"Only Feature Image",value:"only-feature",type:"p-image-layout"},{label:"2 Col",value:"two-col",type:"p-image-layout"},{label:"1 Col",value:"one-col",type:"p-image-layout"}],devices:{desktop:{default:"bottom-center"},mobile:{default:"bottom-center"}}},{id:"spacing",label:"Spacing Item",type:"input:unit-spacing",units:["px"],devices:{desktop:{default:"var(--g-s-s)"},mobile:{default:"var(--g-s-s)"}}},{id:"ratioLayout",label:"Ratio",type:"grid-arrange",devices:{desktop:{default:[2,10]}}},{id:"ratioLayoutRight",label:"Ratio",type:"grid-arrange",devices:{desktop:{default:[10,2]}}},{id:"dimensions",type:"group",label:"Featured Image",controls:ProductFeatureImage.productFeatureImageStyle},{id:"galleryStyles",type:"group",label:"Gallery",controls:ProductGalleryImage.productGalleryImageStyle},{id:"align",label:"Alignment",type:"segment",options:[{label:"Start",value:"flex-start",type:"align-flex",tooltip:"Align left"},{label:"Center",value:"center",type:"align-flex",tooltip:"Align center"},{label:"End",value:"flex-end",type:"align-flex",tooltip:"Align right"}],devices:getDefaultResponsive("flex-start")}]}],ui:[{type:"group",label:{en:"Layout"},controls:[{type:"control",layout:"vertical",setting:{id:"position"}},{type:"control",label:{en:"Ratio"},setting:{id:"ratioLayout"},layout:"vertical",condition:'position == "left"'},{type:"control",label:{en:"Ratio"},setting:{id:"ratioLayoutRight"},layout:"vertical",condition:'position == "right"'},{type:"control",label:{en:"Spacing"},setting:{id:"spacing"},isMoreSetting:!0,condition:'["bottom-center", "left", "right"].includes(position)'},{type:"control",label:{en:"Spacing"},setting:{id:"itemSpacing"},isMoreSetting:!0,condition:'["one-col", "two-col"].includes(position)'}]},{type:"group",label:{en:"Select images to display"},controls:ProductFeatureImage.productSelectImage,condition:'["bottom-center", "left", "right", "only-feature"].includes(position)'},{type:"group",label:{en:"Featured image"},controls:[...ProductFeatureImage.productFeatureImageUI,...ProductFeatureImage.productFeatureImageNavigationUI],condition:'["bottom-center", "left", "right", "only-feature"].includes(position)',hiddenDivice:!0},{type:"group",label:{en:"Dots"},controls:[{type:"control",setting:{id:"ftDotStyle"}},{condition:'ftDotStyle !== "none"',type:"control",label:{en:"Inactive dot color"},setting:{id:"ftDotColor"}},{condition:'ftDotStyle !== "none"',type:"control",label:{en:"Active dot color"},setting:{id:"ftDotActiveColor"}},{condition:'ftDotStyle !== "none"',type:"control",label:{en:"Dots size"},setting:{id:"ftDotSize"},isMoreSetting:!0},{condition:'ftDotStyle !== "none"',type:"control",label:{en:"Gap to carousel"},setting:{id:"ftDotGapToCarousel"},isMoreSetting:!0}],condition:'position === "only-feature"'},{type:"group",label:{en:"Image list"},controls:ProductGalleryImage.productGalleryImageUI,condition:'position !== "only-feature"',hiddenDivice:!0},{type:"group",label:{en:""},controls:ProductGalleryImage.productGalleryImageNavigationUI,condition:'position !== "only-feature"'},{type:"group",controls:[{type:"control",label:{en:"Quality"},options:{label:"large"},setting:{id:"qualityType"}},{type:"control",layout:"horizontal",label:{en:" "},condition:'qualityType == "custom"',setting:{id:"qualityPercent"}}]},{type:"control",label:{en:"Align"},setting:{id:"align"}}],editorConfigs:{placeholder:{flowTag:["Product"]}},presets:[{id:"product-image-v2",name:{en:"Product Images"},icon:{desktop:`
|
|
6
6
|
<svg width="70" height="48" viewBox="0 0 70 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
7
|
<rect x="10" width="10" height="10" rx="3" transform="rotate(90 10 0)" fill="#494949"/>
|
|
8
8
|
<rect x="10" y="12" width="10" height="10" rx="3" transform="rotate(90 10 12)" fill="#494949"/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{getSizeSetting as t}from"../helpers/product.js";import{template as o,RenderIf as s,isLocalEnv as
|
|
1
|
+
import{getSizeSetting as t}from"../helpers/product.js";import{template as o,RenderIf as s,isLocalEnv as e,baseAssetURL as i,makeStyleResponsive as d,makeWidth as r,getResponsiveValueByScreen as n,cls as a}from"@gem-sdk/core";import c from"../../carousel/components/CarouselItem.liquid.js";import l from"../../carousel/components/Carousel.liquid.js";import{getInitialWidthForCarouselItem as u}from"../../carousel/components/common/carousel.js";import{getUpdatedArrowDisplay as p}from"../../carousel/components/common/arrow.js";import{getUpdatedDotStyle as g}from"../../carousel/components/common/dots.js";import{getStaticLocale as f}from"../../helpers.js";import{convertUnitToNumber as m}from"./ProductImages/common/productFeaturedImage.js";let ProductList=({setting:P,builderProps:h,styles:_,className:y,children:v,advanced:$,pageContext:S})=>{let C="gid://shopify/Collection/",b=P?.productSetting,w=b?.relatedTag,L=b?.hasRelatedExclude,T=b?.relatedExclude,O=b?.productSrc??"Collection",I=b?.collectionId?.includes(C)?b?.collectionId?.replace(C,""):"latest",k=b?.productSrc==="PickProduct"&&b?.productIds?.length===0,A=_?.layout==="grid",j=m(P?.numberOfProducts,4),x="PickProduct"===O&&b?.productIds?.length?b?.productIds.map(t=>t.replace("gid://shopify/Product/","")):[],E="PickProduct"===O&&b?.productHandles?.length?b?.productHandles:[],q=p(P?.arrow,P?.controlOverContent),F=g(P?.dot),H=t=>o`
|
|
2
2
|
<div style="${{...d("w",r(_?.width,_?.fullWidth)),...d("rg",_?.horizontalGutter),...d("cg",_?.verticalGutter),...d("gtc",{desktop:`repeat(${n(P?.slidesToShow,"desktop")}, minmax(0, 1fr))`,tablet:P?.slidesToShow?.tablet&&`repeat(${n(P?.slidesToShow,"tablet")}, minmax(0, 1fr))`,mobile:P?.slidesToShow?.mobile&&`repeat(${n(P?.slidesToShow,"mobile")}, minmax(0, 1fr))`})}}"
|
|
3
|
-
class="${a(
|
|
3
|
+
class="${a(y,"gp-grid !gp-m-auto gp-w-full",$?.cssClass)}"
|
|
4
4
|
>
|
|
5
5
|
${t}
|
|
6
6
|
</div>
|
|
@@ -9,8 +9,8 @@ import{getSizeSetting as t}from"../helpers/product.js";import{template as o,Rend
|
|
|
9
9
|
${l({advanced:$,builderProps:{...h},setting:{loop:P?.loop,slidesToShow:P?.slidesToShow,dot:P?.dot,dotSize:{desktop:12},dotGapToCarousel:{desktop:16},dotStyle:F,navigationStyle:q,arrowCustom:P?.arrowCustom,controlOverContent:P?.controlOverContent,enableDrag:{desktop:P?.dragToScroll,tablet:P?.dragToScroll,mobile:P?.dragToScroll},speed:P?.speed,dotActiveColor:P?.dotActiveColor,dotColor:P?.dotColor,autoplay:P?.autoplay,pauseOnHover:P?.pauseOnHover,autoplayTimeout:P?.autoplayTimeout,arrowCustomColor:P?.arrowCustomColor,arrowButtonSize:{desktop:{width:"24px",height:"24px"}}},rootId:`product-list-carousel-${h?.uid}`,rootClass:"gp-justify-center",styles:{sizeSetting:{...t({adaptiveHeight:_?.adaptiveHeight,fullWidth:_?.fullWidth,width:_?.width,height:_?.height})},spacing:_?.spacing},children:`
|
|
10
10
|
${s}
|
|
11
11
|
`})}
|
|
12
|
-
`,
|
|
13
|
-
${
|
|
12
|
+
`,R=()=>o`
|
|
13
|
+
${H(`
|
|
14
14
|
{%- assign count = 0 -%}
|
|
15
15
|
{%- for product in products limit: limit -%}
|
|
16
16
|
{%- assign count = count | plus: 1 -%}
|
|
@@ -21,15 +21,15 @@ import{getSizeSetting as t}from"../helpers/product.js";import{template as o,Rend
|
|
|
21
21
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
22
22
|
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
23
23
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
24
|
-
${
|
|
24
|
+
${v??""}
|
|
25
25
|
{%- endform -%}
|
|
26
26
|
</gp-product>
|
|
27
27
|
{% endfor %}
|
|
28
|
-
{%- if count == 0 and ${
|
|
28
|
+
{%- if count == 0 and ${x.length} == 0 -%}
|
|
29
29
|
<div>${f("ProductList","no_products_found")}</div>
|
|
30
30
|
{%- endif -%}
|
|
31
31
|
`)}
|
|
32
|
-
`,
|
|
32
|
+
`,z=()=>o`
|
|
33
33
|
${G(`
|
|
34
34
|
{%- assign count = 0 -%}
|
|
35
35
|
{%- for product in products limit: limit -%}
|
|
@@ -41,11 +41,11 @@ import{getSizeSetting as t}from"../helpers/product.js";import{template as o,Rend
|
|
|
41
41
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
42
42
|
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
43
43
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
44
|
-
${
|
|
44
|
+
${v??""}
|
|
45
45
|
{%- endform -%}
|
|
46
46
|
</gp-product>`})}
|
|
47
47
|
{%- endfor -%}
|
|
48
|
-
{%- if count == 0 and ${
|
|
48
|
+
{%- if count == 0 and ${x.length} == 0 -%}
|
|
49
49
|
<div>${f("ProductList","no_products_found")}</div>
|
|
50
50
|
{%- endif -%}
|
|
51
51
|
`)}
|
|
@@ -53,56 +53,61 @@ import{getSizeSetting as t}from"../helpers/product.js";import{template as o,Rend
|
|
|
53
53
|
{%- if products == null -%}
|
|
54
54
|
<div>${f("ProductList","product_not_found")}</div>
|
|
55
55
|
{%-else-%}
|
|
56
|
-
${s(
|
|
57
|
-
${s(!
|
|
56
|
+
${s(A,R())}
|
|
57
|
+
${s(!A,z())}
|
|
58
58
|
{%- endif -%}
|
|
59
59
|
`;return S?.pageType==="GP_FUNNEL_PAGE"?"":o`
|
|
60
|
-
${s(
|
|
60
|
+
${s(e,'<script src="{{ \'gp-product.v2.js\' | asset_url }}" defer="defer"></script>',`<script src="${i}/assets-v2/gp-product.v2.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
61
61
|
{%- assign gpBkProduct = product -%}
|
|
62
62
|
{%- assign gpBkProducts = products -%}
|
|
63
63
|
{%- liquid
|
|
64
|
-
assign productHandles = '${
|
|
64
|
+
assign productHandles = '${E.toString()}'| split: ','
|
|
65
65
|
assign products = null
|
|
66
66
|
assign stringListProducts = ''
|
|
67
67
|
assign target_collection = null
|
|
68
68
|
assign productSrc = '${O}'
|
|
69
69
|
assign c = 0
|
|
70
|
-
assign limit = ${
|
|
70
|
+
assign limit = ${A&&"latest"===I?"RelatedProduct"===O?j:b?.numOfSelectedProducts||4:j}
|
|
71
71
|
if request.page_type == 'collection' or preview_page_type == 'collection'
|
|
72
72
|
assign target_collection = collection
|
|
73
73
|
if target_collection == empty or target_collection == null
|
|
74
|
-
if '${
|
|
74
|
+
if '${I.toLowerCase()}' == 'latest'
|
|
75
75
|
assign target_collection = collections | sort: 'updated_at' | first
|
|
76
76
|
else
|
|
77
77
|
for collection in collections
|
|
78
|
-
if collection.id == ${
|
|
78
|
+
if collection.id == ${I}
|
|
79
79
|
assign target_collection = collection
|
|
80
80
|
break
|
|
81
81
|
endif
|
|
82
82
|
endfor
|
|
83
83
|
endif
|
|
84
84
|
endif
|
|
85
|
-
paginate target_collection.products by ${
|
|
85
|
+
paginate target_collection.products by ${j||4}
|
|
86
86
|
assign products = target_collection.products
|
|
87
87
|
endpaginate
|
|
88
88
|
else
|
|
89
89
|
if productSrc == 'RelatedProduct'
|
|
90
90
|
assign relatedTag = '${w}'
|
|
91
|
-
assign relatedProductHandle = '${L}'
|
|
92
91
|
assign products = null | sort
|
|
93
|
-
assign assignProduct =
|
|
92
|
+
assign assignProduct = product
|
|
94
93
|
assign idAssignProduct = assignProduct.id
|
|
95
94
|
assign allProducts = collections.all.products
|
|
96
95
|
|
|
97
96
|
if relatedTag == 'collection'
|
|
97
|
+
assign hasRelatedExclude = '${L}'
|
|
98
|
+
assign relatedExclude = '${T}'
|
|
99
|
+
assign arrayRelatedExclude = relatedExclude | spit: ", "
|
|
98
100
|
for collection in collections
|
|
99
101
|
assign collectionId = collection.id
|
|
102
|
+
assign collectionTitle = collection.handle
|
|
100
103
|
assign isInCollection = false
|
|
101
104
|
assign collectionsAssignProduct = assignProduct.collections
|
|
102
105
|
for item in collectionsAssignProduct
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
unless arrayRelatedExclude contains item.handle
|
|
107
|
+
if item.id == collectionId
|
|
108
|
+
assign isInCollection = true
|
|
109
|
+
endif
|
|
110
|
+
endunless
|
|
106
111
|
endfor
|
|
107
112
|
if isInCollection
|
|
108
113
|
for item in allProducts
|
|
@@ -175,11 +180,11 @@ ${s(i,'<script src="{{ \'gp-product.v2.js\' | asset_url }}" defer="defer"></scri
|
|
|
175
180
|
endfor
|
|
176
181
|
endfor
|
|
177
182
|
endif
|
|
178
|
-
paginate products by ${
|
|
183
|
+
paginate products by ${j||4}
|
|
179
184
|
assign products = products
|
|
180
185
|
endpaginate
|
|
181
186
|
else if productSrc == 'PickProduct'
|
|
182
|
-
unless ${
|
|
187
|
+
unless ${k}
|
|
183
188
|
assign products = null | sort
|
|
184
189
|
for handle in productHandles
|
|
185
190
|
assign productH = all_products[handle] | sort
|
|
@@ -187,24 +192,24 @@ ${s(i,'<script src="{{ \'gp-product.v2.js\' | asset_url }}" defer="defer"></scri
|
|
|
187
192
|
endfor
|
|
188
193
|
assign limit = products.length
|
|
189
194
|
else
|
|
190
|
-
if ${
|
|
195
|
+
if ${x.length} == 0
|
|
191
196
|
paginate collections.all.products by 100000
|
|
192
197
|
assign products = collections.all.products | sort : "created_at" | reverse
|
|
193
198
|
endpaginate
|
|
194
199
|
endif
|
|
195
200
|
endunless
|
|
196
201
|
else
|
|
197
|
-
if '${
|
|
202
|
+
if '${I.toLowerCase()}' == 'latest'
|
|
198
203
|
assign target_collection = collections | sort: 'updated_at' | first
|
|
199
204
|
else
|
|
200
205
|
for collection in collections
|
|
201
|
-
if collection.id == ${
|
|
206
|
+
if collection.id == ${I}
|
|
202
207
|
assign target_collection = collection
|
|
203
208
|
break
|
|
204
209
|
endif
|
|
205
210
|
endfor
|
|
206
211
|
endif
|
|
207
|
-
paginate target_collection.products by ${
|
|
212
|
+
paginate target_collection.products by ${j||4}
|
|
208
213
|
assign products = target_collection.products
|
|
209
214
|
endpaginate
|
|
210
215
|
endif
|
|
@@ -2,7 +2,7 @@ import{productSelectDisplaySetting as e,productFeatureImageSetting as t,productF
|
|
|
2
2
|
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path d="M13.3337 14.6666C13.3337 16.1333 12.1337 17.3333 10.667 17.3333C9.20033 17.3333 8.00033 16.1333 8.00033 14.6666C8.00033 13.2 9.20033 12 10.667 12C12.1337 12 13.3337 13.2 13.3337 14.6666ZM27.3741 14.8404C26.9836 14.4499 26.3504 14.4499 25.9599 14.8404L16.667 24.1333L14.0346 21.6062C13.6442 21.2314 13.0267 21.2352 12.6409 21.6145L5.33366 28.8V9.33329H34.667V22.1333L27.3741 14.8404ZM34.667 30.6666H23.2003L18.5337 26L26.667 17.8666L34.667 25.8666V30.6666ZM7.33366 30.6666L13.467 24.6666L19.467 30.6666H7.33366ZM3.66699 6.66663C3.11471 6.66663 2.66699 7.11434 2.66699 7.66663V31.4666V32.3333C2.66699 32.8856 3.11471 33.3333 3.66699 33.3333H25.867H36.3337C36.8859 33.3333 37.3337 32.8856 37.3337 32.3333V30.6666V28.5333V24.8V7.66662C37.3337 7.11434 36.8859 6.66663 36.3337 6.66663H3.66699Z" fill="currentColor"/>
|
|
4
4
|
</svg>
|
|
5
|
-
`,settings:[{id:"setting",controls:[{id:"select-display",type:"group",label:"Select images to display",controls:e},{id:"featured-image",type:"group",label:"Featured Image",controls:t},{id:"gallery-images",type:"group",label:"Gallery Images",controls:a},{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"finest"}},options:[{label:"Finest",value:"finest"},{label:"High",value:"high"},{label:"Medium",value:"medium"},{label:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"preload",type:"toggle",label:"Preload",default:!1},{id:"qualityPercent",type:"range",label:"",units:["%"],min:100,max:400,step:50,useOnlyUnitInit:!0,devices:{desktop:{default:100}}},{id:"ftDotStyle",label:"Dot style",type:"layout-segment",iconViewBox:"0 0 77 48",enableItemBackground:!0,enableTooltip:!0,options:[{label:"None",value:"none",type:"carousel-dot",isTextIcon:!0},{label:"Inside",value:"inside",type:"carousel-dot"},{label:"Outside",value:"outside",type:"carousel-dot"}],devices:{desktop:{default:"none"}}},{id:"ftDotSize",label:"Dots size",type:"input:number",min:1,devices:{desktop:{default:12}}},{id:"ftDotGapToCarousel",label:"Gap to carousel",type:"input:unit",useOnlyUnitInit:!0,units:["px"],min:0,devices:{desktop:{default:16}}},{id:"ftDotColor",label:"Dot color",type:"colorpicker",devices:{desktop:{default:"bg-1"}}},{id:"ftDotActiveColor",label:"Dot color active",type:"colorpicker",devices:{desktop:{default:"line-3"}}}]},{id:"style",controls:[{id:"position",label:"Layout",type:"layout-segment",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:3,itemSpacing:"large",options:[{label:"Bottom",value:"bottom-center",type:"p-image-layout"},{label:"Left",value:"left",type:"p-image-layout"},{label:"Right",value:"right",type:"p-image-layout"},{label:"Only Feature Image",value:"only-feature",type:"p-image-layout"},{label:"2 Col",value:"two-col",type:"p-image-layout"},{label:"1 Col",value:"one-col",type:"p-image-layout"}],devices:{desktop:{default:"bottom-center"},mobile:{default:"bottom-center"}}},{id:"spacing",label:"Spacing Item",type:"input:unit-spacing",units:["px"],devices:{desktop:{default:"var(--g-s-s)"},mobile:{default:"var(--g-s-s)"}}},{id:"ratioLayout",label:"Ratio",type:"grid-arrange",devices:{desktop:{default:[2,10]}}},{id:"ratioLayoutRight",label:"Ratio",type:"grid-arrange",devices:{desktop:{default:[10,2]}}},{id:"dimensions",type:"group",label:"Featured Image",controls:o},{id:"galleryStyles",type:"group",label:"Gallery",controls:s},{id:"align",label:"Alignment",type:"segment",options:[{label:"Start",value:"flex-start",type:"align-flex",tooltip:"Align left"},{label:"Center",value:"center",type:"align-flex",tooltip:"Align center"},{label:"End",value:"flex-end",type:"align-flex",tooltip:"Align right"}],devices:getDefaultResponsive("flex-start")}]}],ui:[{type:"group",label:{en:"Layout"},controls:[{type:"control",layout:"vertical",setting:{id:"position"}},{type:"control",label:{en:"Ratio"},setting:{id:"ratioLayout"},layout:"vertical",condition:'position == "left"'},{type:"control",label:{en:"Ratio"},setting:{id:"ratioLayoutRight"},layout:"vertical",condition:'position == "right"'},{type:"control",label:{en:"Spacing"},setting:{id:"spacing"},isMoreSetting:!0,condition:'["bottom-center", "left", "right"].includes(position)'},{type:"control",label:{en:"Spacing"},setting:{id:"itemSpacing"},isMoreSetting:!0,condition:'["one-col", "two-col"].includes(position)'}]},{type:"group",label:{en:"Select images to display"},controls:l,condition:'["bottom-center", "left", "right", "only-feature"].includes(position)'},{type:"group",label:{en:"Featured image"},controls:i,condition:'["bottom-center", "left", "right", "only-feature"].includes(position)',hiddenDivice:!0},{type:"group",label:{en:"
|
|
5
|
+
`,settings:[{id:"setting",controls:[{id:"select-display",type:"group",label:"Select images to display",controls:e},{id:"featured-image",type:"group",label:"Featured Image",controls:t},{id:"gallery-images",type:"group",label:"Gallery Images",controls:a},{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"finest"}},options:[{label:"Finest",value:"finest"},{label:"High",value:"high"},{label:"Medium",value:"medium"},{label:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"preload",type:"toggle",label:"Preload",default:!1},{id:"qualityPercent",type:"range",label:"",units:["%"],min:100,max:400,step:50,useOnlyUnitInit:!0,devices:{desktop:{default:100}}},{id:"ftDotStyle",label:"Dot style",type:"layout-segment",iconViewBox:"0 0 77 48",enableItemBackground:!0,enableTooltip:!0,options:[{label:"None",value:"none",type:"carousel-dot",isTextIcon:!0},{label:"Inside",value:"inside",type:"carousel-dot"},{label:"Outside",value:"outside",type:"carousel-dot"}],devices:{desktop:{default:"none"}}},{id:"ftDotSize",label:"Dots size",type:"input:number",min:1,devices:{desktop:{default:12}}},{id:"ftDotGapToCarousel",label:"Gap to carousel",type:"input:unit",useOnlyUnitInit:!0,units:["px"],min:0,devices:{desktop:{default:16}}},{id:"ftDotColor",label:"Dot color",type:"colorpicker",devices:{desktop:{default:"bg-1"}}},{id:"ftDotActiveColor",label:"Dot color active",type:"colorpicker",devices:{desktop:{default:"line-3"}}}]},{id:"style",controls:[{id:"position",label:"Layout",type:"layout-segment",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:3,itemSpacing:"large",options:[{label:"Bottom",value:"bottom-center",type:"p-image-layout"},{label:"Left",value:"left",type:"p-image-layout"},{label:"Right",value:"right",type:"p-image-layout"},{label:"Only Feature Image",value:"only-feature",type:"p-image-layout"},{label:"2 Col",value:"two-col",type:"p-image-layout"},{label:"1 Col",value:"one-col",type:"p-image-layout"}],devices:{desktop:{default:"bottom-center"},mobile:{default:"bottom-center"}}},{id:"spacing",label:"Spacing Item",type:"input:unit-spacing",units:["px"],devices:{desktop:{default:"var(--g-s-s)"},mobile:{default:"var(--g-s-s)"}}},{id:"ratioLayout",label:"Ratio",type:"grid-arrange",devices:{desktop:{default:[2,10]}}},{id:"ratioLayoutRight",label:"Ratio",type:"grid-arrange",devices:{desktop:{default:[10,2]}}},{id:"dimensions",type:"group",label:"Featured Image",controls:o},{id:"galleryStyles",type:"group",label:"Gallery",controls:s},{id:"align",label:"Alignment",type:"segment",options:[{label:"Start",value:"flex-start",type:"align-flex",tooltip:"Align left"},{label:"Center",value:"center",type:"align-flex",tooltip:"Align center"},{label:"End",value:"flex-end",type:"align-flex",tooltip:"Align right"}],devices:getDefaultResponsive("flex-start")}]}],ui:[{type:"group",label:{en:"Layout"},controls:[{type:"control",layout:"vertical",setting:{id:"position"}},{type:"control",label:{en:"Ratio"},setting:{id:"ratioLayout"},layout:"vertical",condition:'position == "left"'},{type:"control",label:{en:"Ratio"},setting:{id:"ratioLayoutRight"},layout:"vertical",condition:'position == "right"'},{type:"control",label:{en:"Spacing"},setting:{id:"spacing"},isMoreSetting:!0,condition:'["bottom-center", "left", "right"].includes(position)'},{type:"control",label:{en:"Spacing"},setting:{id:"itemSpacing"},isMoreSetting:!0,condition:'["one-col", "two-col"].includes(position)'}]},{type:"group",label:{en:"Select images to display"},controls:l,condition:'["bottom-center", "left", "right", "only-feature"].includes(position)'},{type:"group",label:{en:"Featured image"},controls:[...i,...n],condition:'["bottom-center", "left", "right", "only-feature"].includes(position)',hiddenDivice:!0},{type:"group",label:{en:"Dots"},controls:[{type:"control",setting:{id:"ftDotStyle"}},{condition:'ftDotStyle !== "none"',type:"control",label:{en:"Inactive dot color"},setting:{id:"ftDotColor"}},{condition:'ftDotStyle !== "none"',type:"control",label:{en:"Active dot color"},setting:{id:"ftDotActiveColor"}},{condition:'ftDotStyle !== "none"',type:"control",label:{en:"Dots size"},setting:{id:"ftDotSize"},isMoreSetting:!0},{condition:'ftDotStyle !== "none"',type:"control",label:{en:"Gap to carousel"},setting:{id:"ftDotGapToCarousel"},isMoreSetting:!0}],condition:'position === "only-feature"'},{type:"group",label:{en:"Image list"},controls:r,condition:'position !== "only-feature"',hiddenDivice:!0},{type:"group",label:{en:""},controls:d,condition:'position !== "only-feature"'},{type:"group",controls:[{type:"control",label:{en:"Quality"},options:{label:"large"},setting:{id:"qualityType"}},{type:"control",layout:"horizontal",label:{en:" "},condition:'qualityType == "custom"',setting:{id:"qualityPercent"}}]},{type:"control",label:{en:"Align"},setting:{id:"align"}}],editorConfigs:{placeholder:{flowTag:["Product"]}},presets:[{id:"product-image-v2",name:{en:"Product Images"},icon:{desktop:`
|
|
6
6
|
<svg width="70" height="48" viewBox="0 0 70 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
7
|
<rect x="10" width="10" height="10" rx="3" transform="rotate(90 10 0)" fill="#494949"/>
|
|
8
8
|
<rect x="10" y="12" width="10" height="10" rx="3" transform="rotate(90 10 12)" fill="#494949"/>
|