@gem-sdk/components 23.0.0 → 23.1.2
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/file-upload/UploadFile.liquid.js +16 -16
- package/dist/cjs/product/components/file-upload/common/classes.js +1 -1
- package/dist/cjs/product/components/product-list/ProductListCarouselItem.liquid.js +4 -4
- package/dist/cjs/product/components/product-list/ProductListGridItem.liquid.js +4 -4
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselItem.liquid.js +2 -3
- package/dist/cjs/product/components/product-list-v3/ProductListGridItem.liquid.js +4 -4
- package/dist/cjs/product/components/product-wrap/Product.liquid.js +13 -13
- package/dist/esm/product/components/file-upload/UploadFile.liquid.js +19 -19
- package/dist/esm/product/components/file-upload/common/classes.js +1 -1
- package/dist/esm/product/components/product-list/ProductListCarouselItem.liquid.js +1 -1
- package/dist/esm/product/components/product-list/ProductListGridItem.liquid.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductListCarouselItem.liquid.js +6 -7
- package/dist/esm/product/components/product-list-v3/ProductListGridItem.liquid.js +1 -1
- package/dist/esm/product/components/product-wrap/Product.liquid.js +7 -7
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./common/classes.js"),s=require("./common/style.js"),t=require("@gem-sdk/system"),r=require("@gem-sdk/core"),a=require("./common/attr.js"),l=require("../../../helpers.js"),i=require("./common/helpers.js");exports.default=({setting:c,styles:o,builderProps:v,pageContext:n})=>{let
|
|
2
|
-
<gp-file-upload ${
|
|
3
|
-
<script gp-data type="application/json">${JSON.stringify(
|
|
4
|
-
<div class="${
|
|
5
|
-
<input ${
|
|
6
|
-
<div class="${
|
|
7
|
-
<div class="${
|
|
8
|
-
<div class="${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./common/classes.js"),s=require("./common/style.js"),t=require("@gem-sdk/system"),r=require("@gem-sdk/core"),a=require("./common/attr.js"),l=require("../../../helpers.js"),i=require("./common/helpers.js");exports.default=({setting:c,styles:o,builderProps:v,pageContext:n,advanced:d})=>{let y=t.createClass(e.createLayoutClasses(c,v?.uid)),p=t.createStyle({...i.removeHoverStyles(s.createLayoutStyles(c,o),o?.enableHoverEffect)}),u=t.createClass(e.createTypoClasses(o)),C=t.createStyle({...i.removeHoverStyles(s.createTypoStyles(o),o?.enableHoverEffect)}),f=t.createClass(e.createPreviewClasses()),S=t.createClass(e.createPreviewItemClasses()),$=t.createClass(e.createPreviewRemoveClasses()),m=t.createClass(e.createMessageClasses()),g=t.createStyle(s.createMessageStyles()),H=t.createClass(e.createContentWidthClasses()),b=t.createClass(e.createInputClasses()),q=t.createClass(e.composeClasses("gp-flex gp-items-center")),I=t.createAttr({...a.getInputAttr(c?.isRequired,c?.numberOfFiles)}),j=t.createAttr({...a.getWrapperAttr({uid:v?.uid})}),E=t.createStyle({...i.removeHoverStyles(s.createContainerStyles(o?.align,o?.textColor),o?.enableHoverEffect)}),P=t.createStyle({...i.removeHoverStyles(s.createWrapContentWidthStyles(c),o?.enableHoverEffect)}),h=t.createClass(e.createWrapContainerClasses(v?.uid,d?.cssClass)),w=t.createStyle({...i.removeHoverStyles(s.createContentWithStyles(c,o),o?.enableHoverEffect)}),x=t.createStyle({...i.removeHoverStyles(s.createIconContainerStyles(c),o?.enableHoverEffect)}),O=t.createClass(e.createIconContentClasses()),R=t.createStyle({...i.removeHoverStyles(s.createIconContentStyles(c,o),o?.enableHoverEffect)}),W=i.getDisplayText("Liquid",{uid:v?.uid,setting:c,styles:o,pageContext:n}),A=t.createStateOrContext({settings:{isShowPreviewImage:c?.isShowPreviewImage,numberOfFiles:c?.numberOfFiles,isRequired:c?.isRequired}});return r.template`
|
|
2
|
+
<gp-file-upload ${j}>
|
|
3
|
+
<script gp-data type="application/json">${JSON.stringify(A)}</script>
|
|
4
|
+
<div class="${h}" style="${E}">
|
|
5
|
+
<input ${I} class="${b}">
|
|
6
|
+
<div class="${q}" style="${P}">
|
|
7
|
+
<div class="${H}" style="${w}">
|
|
8
|
+
<div class="${y}" style="${p}">
|
|
9
9
|
${t.If(!!(c?.iconSvg&&c?.iconVisible),r.template`
|
|
10
|
-
<div class='${
|
|
11
|
-
<div class="${
|
|
10
|
+
<div class='${q}' style="${x}">
|
|
11
|
+
<div class="${O}" style="${R}">
|
|
12
12
|
${c?.iconSvg}
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
15
|
`)}
|
|
16
|
-
<div class="${
|
|
17
|
-
${
|
|
16
|
+
<div class="${u}" style="${C}">
|
|
17
|
+
${W}
|
|
18
18
|
</div>
|
|
19
19
|
</div>
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
|
-
<div class="${
|
|
24
|
-
<div class="${
|
|
25
|
-
<div class="${
|
|
23
|
+
<div class="${f}">
|
|
24
|
+
<div class="${S}">
|
|
25
|
+
<div class="${$}"></div>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
|
-
<div class="${
|
|
28
|
+
<div class="${m}" style="${g}"></div>
|
|
29
29
|
</gp-file-upload>
|
|
30
30
|
|
|
31
31
|
${r.RenderIf(r.isLocalEnv,`<script ${l.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-file-upload-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${l.getSettingPreloadData('class="gps-link" delay',"src")}="${r.baseAssetURL}/assets-v2/gp-file-upload-v7-5.js" defer="defer"></script>`)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@gem-sdk/core");const p=p=>e.composeTypographyClassName(p?.typo),r=e=>e.trim().split(/\s+/).reduce((e,p)=>(e[p]=!0,e),{});exports.composeClasses=r,exports.createContentWidthClasses=()=>r("gp-flex gp-items-center gp-file-upload__content"),exports.createIconContentClasses=()=>r("group-hover:[color:var(--text-hover-color)] gp-file-upload__icon gp-inline-flex gp-items-center gp-justify-center gp-overflow-hidden [&>svg]:!gp-h-[var(--height-desktop)] [&>svg]:!gp-w-full tablet:[&>svg]:!gp-h-[var(--height-tablet)] mobile:[&>svg]:!gp-h-[var(--height-mobile)]"),exports.createInputClasses=()=>r("gp-input_picker gp-block gp-opacity-0 gp-w-0 gp-h-0 gp-top-2/4 gp-left-2/4 -gp-translate-x-1/2 -gp-translate-y-1/2 gp-absolute gp-cursor-pointer gp-p-0"),exports.createLayoutClasses=(p,t)=>{let o=e.cls("gp-flex gp-items-center",t,{"gp-flex-col":p?.fileUploadLayout==="vertical"});return r(o)},exports.createMessageClasses=()=>r("gp-hidden error-message"),exports.createPreviewClasses=()=>r("gp-file_preview gp-flex gp-gap-2 gp-overflow-x-auto gp-whitespace-nowrap gp-mt-2"),exports.createPreviewItemClasses=()=>r("gp-group gp-file_preview_item gp-file_preview_item_0 gp-hidden gp-rounded-[2.62px] gp-min-h-[104px] gp-relative gp-flex-[0_0_calc((100%_/_4)_-_6px)] gp-min-w-[104px] gp-box-border"),exports.createPreviewRemoveClasses=()=>r("remove gp-hidden group-hover:!gp-flex"),exports.createTypoClasses=t=>r(e.cls(p(t),"gp-file-upload__text group-hover:[color:var(--text-hover-color)]")),exports.createWrapContainerClasses=e=>r(`gp-group gp-cursor-pointer gp-relative gp-flex gp-items-center gp-file-upload_container ${e}`);
|
|
1
|
+
"use strict";var e=require("@gem-sdk/core");const p=p=>e.composeTypographyClassName(p?.typo),r=e=>e.trim().split(/\s+/).reduce((e,p)=>(e[p]=!0,e),{});exports.composeClasses=r,exports.createContentWidthClasses=()=>r("gp-flex gp-items-center gp-file-upload__content"),exports.createIconContentClasses=()=>r("group-hover:[color:var(--text-hover-color)] gp-file-upload__icon gp-inline-flex gp-items-center gp-justify-center gp-overflow-hidden [&>svg]:!gp-h-[var(--height-desktop)] [&>svg]:!gp-w-full tablet:[&>svg]:!gp-h-[var(--height-tablet)] mobile:[&>svg]:!gp-h-[var(--height-mobile)]"),exports.createInputClasses=()=>r("gp-input_picker gp-block gp-opacity-0 gp-w-0 gp-h-0 gp-top-2/4 gp-left-2/4 -gp-translate-x-1/2 -gp-translate-y-1/2 gp-absolute gp-cursor-pointer gp-p-0"),exports.createLayoutClasses=(p,t)=>{let o=e.cls("gp-flex gp-items-center",t,{"gp-flex-col":p?.fileUploadLayout==="vertical"});return r(o)},exports.createMessageClasses=()=>r("gp-hidden error-message"),exports.createPreviewClasses=()=>r("gp-file_preview gp-flex gp-gap-2 gp-overflow-x-auto gp-whitespace-nowrap gp-mt-2"),exports.createPreviewItemClasses=()=>r("gp-group gp-file_preview_item gp-file_preview_item_0 gp-hidden gp-rounded-[2.62px] gp-min-h-[104px] gp-relative gp-flex-[0_0_calc((100%_/_4)_-_6px)] gp-min-w-[104px] gp-box-border"),exports.createPreviewRemoveClasses=()=>r("remove gp-hidden group-hover:!gp-flex"),exports.createTypoClasses=t=>r(e.cls(p(t),"gp-file-upload__text group-hover:[color:var(--text-hover-color)]")),exports.createWrapContainerClasses=(e,p)=>r(`gp-group gp-cursor-pointer gp-relative gp-flex gp-items-center gp-file-upload_container ${e} ${p}`);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./common/classes.js"),e=require("@gem-sdk/core");exports.default=n=>{let{pageContext:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./common/classes.js"),e=require("@gem-sdk/core");exports.default=n=>{let{pageContext:a,children:o}=n,{productItemClass:r,gpProductClass:i}=t.getClass(n);return e.template`
|
|
2
2
|
<gp-product
|
|
3
|
-
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
3
|
+
gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
4
|
class="${i}"
|
|
5
5
|
>
|
|
6
|
-
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(
|
|
6
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
|
|
7
7
|
{%- form 'product', product, id: product_form_id, class: 'form contents ${r}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
8
8
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
9
9
|
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
10
10
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
11
|
-
${
|
|
11
|
+
${o}
|
|
12
12
|
{%- endform -%}
|
|
13
13
|
</gp-product>
|
|
14
14
|
`};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@gem-sdk/core"),e=require("./common/classes.js");exports.default=n=>{let{pageContext:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@gem-sdk/core"),e=require("./common/classes.js");exports.default=n=>{let{pageContext:a,rawChildren:o}=n,{productItemClass:r,gpProductClass:i}=e.getClass(n);return t.template`
|
|
2
2
|
<gp-product
|
|
3
|
-
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
3
|
+
gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
4
|
class="${i}"
|
|
5
5
|
>
|
|
6
|
-
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(
|
|
6
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
|
|
7
7
|
{%- form 'product', product, id: product_form_id, class: 'form contents ${r}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
8
8
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
9
9
|
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
10
10
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
11
11
|
${t.template`
|
|
12
|
-
${
|
|
12
|
+
${o?.map((e,n)=>{if(e)return t.template`
|
|
13
13
|
${t.RenderChildren({...e,index:n})}
|
|
14
14
|
`}).join("")}
|
|
15
15
|
`}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./common/classes.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./common/classes.js"),e=require("@gem-sdk/core");exports.default=n=>{let{pageContext:a,children:o}=n,{productItemClass:r,gpProductClass:i}=t.getClass(n);return e.template`
|
|
2
2
|
<gp-product
|
|
3
|
-
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
|
-
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity }}, "formId": "{{ product_form_id }}"}'
|
|
3
|
+
gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
5
4
|
class="${i}"
|
|
6
5
|
>
|
|
7
6
|
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@gem-sdk/core"),e=require("./common/classes.js");exports.default=n=>{let{pageContext:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@gem-sdk/core"),e=require("./common/classes.js");exports.default=n=>{let{pageContext:a,rawChildren:o}=n,{productItemClass:r,gpProductClass:i}=e.getClass(n);return t.template`
|
|
2
2
|
<gp-product
|
|
3
|
-
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
3
|
+
gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
4
|
class="${i}"
|
|
5
5
|
>
|
|
6
|
-
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(
|
|
6
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
|
|
7
7
|
{%- form 'product', product, id: product_form_id, class: 'form contents ${r}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
8
8
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
9
9
|
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
10
10
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
11
11
|
${t.template`
|
|
12
|
-
${
|
|
12
|
+
${o?.map((e,n)=>{if(e)return t.template`
|
|
13
13
|
${t.RenderChildren({...e,index:n})}
|
|
14
14
|
`}).join("")}
|
|
15
15
|
`}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./common/helpers.js"),e=require("@gem-sdk/core"),i=require("../../../helpers.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./common/helpers.js"),e=require("@gem-sdk/core"),i=require("../../../helpers.js"),a=require("../../../grid/components/row/Row.liquid.js"),r=require("@gem-sdk/system");exports.default=d=>{let{children:n,setting:o,style:s,builderProps:c,rawChildren:l,advanced:p}=d,{isSyncProduct:u,productSetting:f}=o??{},g=f?.hasPreSelected??!1,{rowSetting:m,rowStyles:_,formatVariantId:y,formatProductId:v,productStatus:$,preSelectedOptionIds:S,productHandle:I,advancedStyle:P}=t.getData(d);return e.template`
|
|
2
2
|
${e.template`
|
|
3
3
|
{%- assign gpBkProduct = product -%}
|
|
4
|
-
${
|
|
4
|
+
${r.If($==t.DYNAMIC_PRODUCT_STATUS,e.template`
|
|
5
5
|
{%- liquid
|
|
6
6
|
if request.page_type != 'product'
|
|
7
7
|
assign product = all_products['${I}']
|
|
8
|
-
assign productId = '${
|
|
8
|
+
assign productId = '${v}' | 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
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
{%- liquid
|
|
22
22
|
if request.page_type == 'product'
|
|
23
23
|
if '${$}' == '${t.STATIC_PRODUCT_STATUS}'
|
|
24
|
-
if '${
|
|
24
|
+
if '${v}' == '${t.PRODUCT_ID_LATEST}'
|
|
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['${I}']
|
|
30
|
-
assign productId = '${
|
|
30
|
+
assign productId = '${v}' | 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 @@
|
|
|
40
40
|
endif
|
|
41
41
|
endif
|
|
42
42
|
else
|
|
43
|
-
if '${
|
|
43
|
+
if '${v}' == '${t.PRODUCT_ID_LATEST}'
|
|
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['${I}']
|
|
49
|
-
assign productId = '${
|
|
49
|
+
assign productId = '${v}' | 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
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
-%}
|
|
62
62
|
`)}
|
|
63
63
|
`}
|
|
64
|
-
${
|
|
64
|
+
${r.LiquidIf("product != empty and product != null",e.template`
|
|
65
65
|
${e.template`
|
|
66
|
-
{%- assign initVariantId = ${
|
|
66
|
+
{%- assign initVariantId = ${y} -%}
|
|
67
67
|
{%- assign product_form_id = 'product-form-' | append: "${c?.uid}" -%}
|
|
68
|
-
${
|
|
69
|
-
${
|
|
68
|
+
${y?"{%- assign variant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign variant = product.selected_or_first_available_variant -%}"}
|
|
69
|
+
${y?"{%- 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 -%}
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
data-id="${c?.uid}"
|
|
83
83
|
style="${P}"
|
|
84
84
|
class="${p?.cssClass}"
|
|
85
|
-
gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${S}], "isSyncProduct": "${u}", "hasPreSelected": ${g}, "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": [${S}], "isSyncProduct": "${u}", "hasPreSelected": ${g}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "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 }}" }'
|
|
86
86
|
>
|
|
87
87
|
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }}}</script>
|
|
88
88
|
<product-form class="product-form">
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
91
91
|
<input type="hidden" name="quantity" value="{{ quantity }}" />
|
|
92
92
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
93
|
-
${
|
|
93
|
+
${a.default({builderProps:{...c,uid:c?.uid,uidInteraction:`${c?.uid}-row`},style:s,styles:_,setting:m,children:n,rawChildren:l})}
|
|
94
94
|
{%- endform -%}
|
|
95
95
|
</product-form>
|
|
96
96
|
</gp-product>
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import{createLayoutClasses as e,createTypoClasses as s,createPreviewClasses as i,createPreviewItemClasses as l,createPreviewRemoveClasses as r,createMessageClasses as t,createContentWidthClasses as d,createInputClasses as o,composeClasses as a,createWrapContainerClasses as c,createIconContentClasses as v}from"./common/classes.js";import{createLayoutStyles as f,createTypoStyles as p,createMessageStyles as m,createContainerStyles as $,createWrapContentWidthStyles as n,createContentWithStyles as u,createIconContainerStyles as g,createIconContentStyles as y}from"./common/style.js";import{createClass as b,createStyle as j,createAttr as E,createStateOrContext as H,If as S}from"@gem-sdk/system";import{template as h,RenderIf as k,isLocalEnv as q,baseAssetURL as w}from"@gem-sdk/core";import{getInputAttr as F,getWrapperAttr as O}from"./common/attr.js";import{getSettingPreloadData as x}from"../../../helpers.js";import{removeHoverStyles as R,getDisplayText as
|
|
2
|
-
<gp-file-upload ${
|
|
3
|
-
<script gp-data type="application/json">${JSON.stringify(
|
|
4
|
-
<div class="${
|
|
5
|
-
<input ${
|
|
6
|
-
<div class="${
|
|
7
|
-
<div class="${
|
|
8
|
-
<div class="${
|
|
9
|
-
${S(!!(
|
|
10
|
-
<div class='${
|
|
11
|
-
<div class="${
|
|
12
|
-
${
|
|
1
|
+
import{createLayoutClasses as e,createTypoClasses as s,createPreviewClasses as i,createPreviewItemClasses as l,createPreviewRemoveClasses as r,createMessageClasses as t,createContentWidthClasses as d,createInputClasses as o,composeClasses as a,createWrapContainerClasses as c,createIconContentClasses as v}from"./common/classes.js";import{createLayoutStyles as f,createTypoStyles as p,createMessageStyles as m,createContainerStyles as $,createWrapContentWidthStyles as n,createContentWithStyles as u,createIconContainerStyles as g,createIconContentStyles as y}from"./common/style.js";import{createClass as b,createStyle as j,createAttr as E,createStateOrContext as H,If as S}from"@gem-sdk/system";import{template as h,RenderIf as k,isLocalEnv as q,baseAssetURL as w}from"@gem-sdk/core";import{getInputAttr as F,getWrapperAttr as O}from"./common/attr.js";import{getSettingPreloadData as x}from"../../../helpers.js";import{removeHoverStyles as R,getDisplayText as C}from"./common/helpers.js";let I=({setting:I,styles:P,builderProps:J,pageContext:L,advanced:N})=>{let U=b(e(I,J?.uid)),V=j({...R(f(I,P),P?.enableHoverEffect)}),_=b(s(P)),z=j({...R(p(P),P?.enableHoverEffect)}),A=b(i()),B=b(l()),D=b(r()),G=b(t()),K=j(m()),M=b(d()),Q=b(o()),T=b(a("gp-flex gp-items-center")),W=E({...F(I?.isRequired,I?.numberOfFiles)}),X=E({...O({uid:J?.uid})}),Y=j({...R($(P?.align,P?.textColor),P?.enableHoverEffect)}),Z=j({...R(n(I),P?.enableHoverEffect)}),ee=b(c(J?.uid,N?.cssClass)),es=j({...R(u(I,P),P?.enableHoverEffect)}),ei=j({...R(g(I),P?.enableHoverEffect)}),el=b(v()),er=j({...R(y(I,P),P?.enableHoverEffect)}),et=C("Liquid",{uid:J?.uid,setting:I,styles:P,pageContext:L}),ed=H({settings:{isShowPreviewImage:I?.isShowPreviewImage,numberOfFiles:I?.numberOfFiles,isRequired:I?.isRequired}});return h`
|
|
2
|
+
<gp-file-upload ${X}>
|
|
3
|
+
<script gp-data type="application/json">${JSON.stringify(ed)}</script>
|
|
4
|
+
<div class="${ee}" style="${Y}">
|
|
5
|
+
<input ${W} class="${Q}">
|
|
6
|
+
<div class="${T}" style="${Z}">
|
|
7
|
+
<div class="${M}" style="${es}">
|
|
8
|
+
<div class="${U}" style="${V}">
|
|
9
|
+
${S(!!(I?.iconSvg&&I?.iconVisible),h`
|
|
10
|
+
<div class='${T}' style="${ei}">
|
|
11
|
+
<div class="${el}" style="${er}">
|
|
12
|
+
${I?.iconSvg}
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
15
|
`)}
|
|
16
|
-
<div class="${
|
|
17
|
-
${
|
|
16
|
+
<div class="${_}" style="${z}">
|
|
17
|
+
${et}
|
|
18
18
|
</div>
|
|
19
19
|
</div>
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
|
-
<div class="${
|
|
24
|
-
<div class="${
|
|
25
|
-
<div class="${
|
|
23
|
+
<div class="${A}">
|
|
24
|
+
<div class="${B}">
|
|
25
|
+
<div class="${D}"></div>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
|
-
<div class="${
|
|
28
|
+
<div class="${G}" style="${K}"></div>
|
|
29
29
|
</gp-file-upload>
|
|
30
30
|
|
|
31
31
|
${k(q,`<script ${x('class="gps-link" delay',"src")}="{{ 'gp-file-upload-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${x('class="gps-link" delay',"src")}="${w}/assets-v2/gp-file-upload-v7-5.js" defer="defer"></script>`)}
|
|
32
|
-
`};export{
|
|
32
|
+
`};export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cls as e,composeTypographyClassName as p}from"@gem-sdk/core";let t=e=>p(e?.typo),r=(p,t)=>{let r=e("gp-flex gp-items-center",t,{"gp-flex-col":p?.fileUploadLayout==="vertical"});return f(r)},g=()=>f("group-hover:[color:var(--text-hover-color)] gp-file-upload__icon gp-inline-flex gp-items-center gp-justify-center gp-overflow-hidden [&>svg]:!gp-h-[var(--height-desktop)] [&>svg]:!gp-w-full tablet:[&>svg]:!gp-h-[var(--height-tablet)] mobile:[&>svg]:!gp-h-[var(--height-mobile)]"),o=p=>f(e(t(p),"gp-file-upload__text group-hover:[color:var(--text-hover-color)]")),l=()=>f("gp-flex gp-items-center gp-file-upload__content"),s=()=>f("gp-input_picker gp-block gp-opacity-0 gp-w-0 gp-h-0 gp-top-2/4 gp-left-2/4 -gp-translate-x-1/2 -gp-translate-y-1/2 gp-absolute gp-cursor-pointer gp-p-0"),a=e=>f(`gp-group gp-cursor-pointer gp-relative gp-flex gp-items-center gp-file-upload_container ${e}`),i=()=>f("gp-file_preview gp-flex gp-gap-2 gp-overflow-x-auto gp-whitespace-nowrap gp-mt-2"),c=()=>f("gp-group gp-file_preview_item gp-file_preview_item_0 gp-hidden gp-rounded-[2.62px] gp-min-h-[104px] gp-relative gp-flex-[0_0_calc((100%_/_4)_-_6px)] gp-min-w-[104px] gp-box-border"),n=()=>f("remove gp-hidden group-hover:!gp-flex"),v=()=>f("gp-hidden error-message"),f=e=>e.trim().split(/\s+/).reduce((e,p)=>(e[p]=!0,e),{});export{f as composeClasses,l as createContentWidthClasses,g as createIconContentClasses,s as createInputClasses,r as createLayoutClasses,v as createMessageClasses,i as createPreviewClasses,c as createPreviewItemClasses,n as createPreviewRemoveClasses,o as createTypoClasses,a as createWrapContainerClasses};
|
|
1
|
+
import{cls as e,composeTypographyClassName as p}from"@gem-sdk/core";let t=e=>p(e?.typo),r=(p,t)=>{let r=e("gp-flex gp-items-center",t,{"gp-flex-col":p?.fileUploadLayout==="vertical"});return f(r)},g=()=>f("group-hover:[color:var(--text-hover-color)] gp-file-upload__icon gp-inline-flex gp-items-center gp-justify-center gp-overflow-hidden [&>svg]:!gp-h-[var(--height-desktop)] [&>svg]:!gp-w-full tablet:[&>svg]:!gp-h-[var(--height-tablet)] mobile:[&>svg]:!gp-h-[var(--height-mobile)]"),o=p=>f(e(t(p),"gp-file-upload__text group-hover:[color:var(--text-hover-color)]")),l=()=>f("gp-flex gp-items-center gp-file-upload__content"),s=()=>f("gp-input_picker gp-block gp-opacity-0 gp-w-0 gp-h-0 gp-top-2/4 gp-left-2/4 -gp-translate-x-1/2 -gp-translate-y-1/2 gp-absolute gp-cursor-pointer gp-p-0"),a=(e,p)=>f(`gp-group gp-cursor-pointer gp-relative gp-flex gp-items-center gp-file-upload_container ${e} ${p}`),i=()=>f("gp-file_preview gp-flex gp-gap-2 gp-overflow-x-auto gp-whitespace-nowrap gp-mt-2"),c=()=>f("gp-group gp-file_preview_item gp-file_preview_item_0 gp-hidden gp-rounded-[2.62px] gp-min-h-[104px] gp-relative gp-flex-[0_0_calc((100%_/_4)_-_6px)] gp-min-w-[104px] gp-box-border"),n=()=>f("remove gp-hidden group-hover:!gp-flex"),v=()=>f("gp-hidden error-message"),f=e=>e.trim().split(/\s+/).reduce((e,p)=>(e[p]=!0,e),{});export{f as composeClasses,l as createContentWidthClasses,g as createIconContentClasses,s as createInputClasses,r as createLayoutClasses,v as createMessageClasses,i as createPreviewClasses,c as createPreviewItemClasses,n as createPreviewRemoveClasses,o as createTypoClasses,a as createWrapContainerClasses};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{getClass as t}from"./common/classes.js";import{template as n}from"@gem-sdk/core";let o=o=>{let{pageContext:e,children:a}=o,{productItemClass:r,gpProductClass:i}=t(o);return n`
|
|
2
2
|
<gp-product
|
|
3
|
-
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
3
|
+
gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
4
|
class="${i}"
|
|
5
5
|
>
|
|
6
6
|
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(e)}}</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{template as t,RenderChildren as n}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";let o=o=>{let{pageContext:a,rawChildren:r}=o,{productItemClass:i,gpProductClass:c}=e(o);return t`
|
|
2
2
|
<gp-product
|
|
3
|
-
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
3
|
+
gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 , "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
4
|
class="${c}"
|
|
5
5
|
>
|
|
6
6
|
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import{getClass as t}from"./common/classes.js";import{template as n}from"@gem-sdk/core";let
|
|
1
|
+
import{getClass as t}from"./common/classes.js";import{template as n}from"@gem-sdk/core";let o=o=>{let{pageContext:e,children:a}=o,{productItemClass:r,gpProductClass:i}=t(o);return n`
|
|
2
2
|
<gp-product
|
|
3
|
-
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
|
-
|
|
5
|
-
class="${r}"
|
|
3
|
+
gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
|
+
class="${i}"
|
|
6
5
|
>
|
|
7
|
-
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(
|
|
8
|
-
{%- form 'product', product, id: product_form_id, class: 'form contents ${
|
|
6
|
+
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(e)}}</script>
|
|
7
|
+
{%- form 'product', product, id: product_form_id, class: 'form contents ${r}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
9
8
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
10
9
|
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
11
10
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
12
11
|
${a}
|
|
13
12
|
{%- endform -%}
|
|
14
13
|
</gp-product>
|
|
15
|
-
`};export{
|
|
14
|
+
`};export{o as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{template as t,RenderChildren as n}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";let o=o=>{let{pageContext:a,rawChildren:r}=o,{productItemClass:i,gpProductClass:c}=e(o);return t`
|
|
2
2
|
<gp-product
|
|
3
|
-
gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
3
|
+
gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
|
|
4
4
|
class="${c}"
|
|
5
5
|
>
|
|
6
6
|
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{getData as t,DYNAMIC_PRODUCT_STATUS as e,STATIC_PRODUCT_STATUS as i,PRODUCT_ID_LATEST as r}from"./common/helpers.js";import{RenderIf as
|
|
1
|
+
import{getData as t,DYNAMIC_PRODUCT_STATUS as e,STATIC_PRODUCT_STATUS as i,PRODUCT_ID_LATEST as r}from"./common/helpers.js";import{RenderIf as a,isLocalEnv as o,baseAssetURL as d,template as n}from"@gem-sdk/core";import{getSettingPreloadData as s,getStaticLocale as c}from"../../../helpers.js";import l from"../../../grid/components/row/Row.liquid.js";import{LiquidIf as p,If as u}from"@gem-sdk/system";let f=f=>{let{children:m,setting:g,style:y,builderProps:_,rawChildren:v,advanced:$}=f,{isSyncProduct:S,productSetting:h}=g??{},j=h?.hasPreSelected??!1,{rowSetting:I,rowStyles:b,formatVariantId:P,formatProductId:q,productStatus:V,preSelectedOptionIds:k,productHandle:w,advancedStyle:E}=t(f);return n`
|
|
2
2
|
${n`
|
|
3
3
|
{%- assign gpBkProduct = product -%}
|
|
4
4
|
${u(V==e,n`
|
|
@@ -64,7 +64,7 @@ import{getData as t,DYNAMIC_PRODUCT_STATUS as e,STATIC_PRODUCT_STATUS as i,PRODU
|
|
|
64
64
|
${p("product != empty and product != null",n`
|
|
65
65
|
${n`
|
|
66
66
|
{%- assign initVariantId = ${P} -%}
|
|
67
|
-
{%- assign product_form_id = 'product-form-' | append: "${
|
|
67
|
+
{%- assign product_form_id = 'product-form-' | append: "${_?.uid}" -%}
|
|
68
68
|
${P?"{%- assign variant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign variant = product.selected_or_first_available_variant -%}"}
|
|
69
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 -%}
|
|
@@ -78,11 +78,11 @@ import{getData as t,DYNAMIC_PRODUCT_STATUS as e,STATIC_PRODUCT_STATUS as i,PRODU
|
|
|
78
78
|
{% endunless %}
|
|
79
79
|
`}
|
|
80
80
|
<gp-product
|
|
81
|
-
data-uid="${
|
|
82
|
-
data-id="${
|
|
81
|
+
data-uid="${_?.uid}"
|
|
82
|
+
data-id="${_?.uid}"
|
|
83
83
|
style="${E}"
|
|
84
84
|
class="${$?.cssClass}"
|
|
85
|
-
gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${k}], "isSyncProduct": "${S}", "hasPreSelected": ${j}, "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": ${j}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "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 }}" }'
|
|
86
86
|
>
|
|
87
87
|
<script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }}}</script>
|
|
88
88
|
<product-form class="product-form">
|
|
@@ -90,7 +90,7 @@ import{getData as t,DYNAMIC_PRODUCT_STATUS as e,STATIC_PRODUCT_STATUS as i,PRODU
|
|
|
90
90
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
91
91
|
<input type="hidden" name="quantity" value="{{ quantity }}" />
|
|
92
92
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
93
|
-
${l({builderProps:{...
|
|
93
|
+
${l({builderProps:{..._,uid:_?.uid,uidInteraction:`${_?.uid}-row`},style:y,styles:b,setting:I,children:m,rawChildren:v})}
|
|
94
94
|
{%- endform -%}
|
|
95
95
|
</product-form>
|
|
96
96
|
</gp-product>
|
|
@@ -98,5 +98,5 @@ import{getData as t,DYNAMIC_PRODUCT_STATUS as e,STATIC_PRODUCT_STATUS as i,PRODU
|
|
|
98
98
|
`,n`
|
|
99
99
|
<div class="gp-text-center">${c("Product","product_not_found")}</div>
|
|
100
100
|
`)}
|
|
101
|
-
${o
|
|
101
|
+
${a(o,`<script ${s('class="gps-link" delay',"src")}="{{ 'gp-product-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${s('class="gps-link" delay',"src")}="${d}/assets-v2/gp-product-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
102
102
|
`};export{f as default};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6902,7 +6902,7 @@ declare const ProductList: (props: ProductListProps) => string;
|
|
|
6902
6902
|
|
|
6903
6903
|
declare const ProductVendor: ({ setting, styles, advanced, builderProps }: VendorProps) => string;
|
|
6904
6904
|
|
|
6905
|
-
declare const FileUpload$1: ({ setting, styles, builderProps, pageContext }: FileUploadProps) => string;
|
|
6905
|
+
declare const FileUpload$1: ({ setting, styles, builderProps, pageContext, advanced }: FileUploadProps) => string;
|
|
6906
6906
|
|
|
6907
6907
|
declare const Product: (props: ProductProps) => string;
|
|
6908
6908
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.1.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@gem-sdk/core": "23.0.0",
|
|
36
|
-
"@gem-sdk/styles": "23.
|
|
36
|
+
"@gem-sdk/styles": "23.1.1",
|
|
37
37
|
"@gem-sdk/system": "23.0.0",
|
|
38
38
|
"@thedutchcoder/postcss-rem-to-px": "0.0.2",
|
|
39
39
|
"@types/react-transition-group": "^4.4.12",
|