@gem-sdk/components 19.0.0-dev.11 → 19.0.0-dev.14
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/product-wrap/Product.liquid.js +12 -9
- package/dist/cjs/third-party/settings/AppstleLoyaltyRewardProgram/index.js +1 -1
- package/dist/esm/product/components/product-wrap/Product.liquid.js +16 -13
- package/dist/esm/third-party/settings/AppstleLoyaltyRewardProgram/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@gem-sdk/core"),e=require("../../../grid/components/row/Row.liquid.js"),i=require("@gem-sdk/system"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@gem-sdk/core"),e=require("../../../grid/components/row/Row.liquid.js"),i=require("@gem-sdk/system"),a=require("../../../helpers.js"),r=require("./common/helpers.js");exports.default=d=>{let{children:s,setting:n,style:o,builderProps:c,rawChildren:l,advanced:p}=d,{isSyncProduct:u,productSetting:f}=n??{},g=f?.hasPreSelected??!1,{rowSetting:m,rowStyles:_,formatVariantId:v,formatProductId:y,productStatus:$,preSelectedOptionIds:S,productHandle:I,advancedStyle:P}=r.getData(d);return t.template`
|
|
2
2
|
${t.template`
|
|
3
3
|
{%- assign gpBkProduct = product -%}
|
|
4
|
-
${i.If($==
|
|
4
|
+
${i.If($==r.DYNAMIC_PRODUCT_STATUS,t.template`
|
|
5
5
|
{%- liquid
|
|
6
6
|
if request.page_type != 'product'
|
|
7
7
|
assign product = all_products['${I}']
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
`,t.template`
|
|
21
21
|
{%- liquid
|
|
22
22
|
if request.page_type == 'product'
|
|
23
|
-
if '${$}' == '${
|
|
24
|
-
if '${y}' == '${
|
|
23
|
+
if '${$}' == '${r.STATIC_PRODUCT_STATUS}'
|
|
24
|
+
if '${y}' == '${r.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
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
endif
|
|
41
41
|
endif
|
|
42
42
|
else
|
|
43
|
-
if '${y}' == '${
|
|
43
|
+
if '${y}' == '${r.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
|
|
@@ -73,11 +73,14 @@
|
|
|
73
73
|
{%-if variant == empty or variant == null -%}
|
|
74
74
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
75
75
|
{%- endif -%}
|
|
76
|
+
{% unless isSettingSameHeightProductList %}
|
|
77
|
+
{%- assign isSettingSameHeightProductList = false -%}
|
|
78
|
+
{% endunless %}
|
|
76
79
|
`}
|
|
77
80
|
<gp-product
|
|
78
81
|
data-uid="${c?.uid}"
|
|
79
82
|
data-id="${c?.uid}"
|
|
80
|
-
style="${
|
|
83
|
+
style="${P}"
|
|
81
84
|
class="${p?.cssClass}"
|
|
82
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 }}" }'
|
|
83
86
|
gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }}}'
|
|
@@ -87,13 +90,13 @@
|
|
|
87
90
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
88
91
|
<input type="hidden" name="quantity" value="{{ quantity }}" />
|
|
89
92
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
90
|
-
${e.default({builderProps:{...c,uid:c?.uid,uidInteraction:`${c?.uid}-row`},style:
|
|
93
|
+
${e.default({builderProps:{...c,uid:c?.uid,uidInteraction:`${c?.uid}-row`},style:o,styles:_,setting:m,children:s,rawChildren:l})}
|
|
91
94
|
{%- endform -%}
|
|
92
95
|
</product-form>
|
|
93
96
|
</gp-product>
|
|
94
97
|
{%- assign product = gpBkProduct -%}
|
|
95
98
|
`,t.template`
|
|
96
|
-
<div class="gp-text-center">${
|
|
99
|
+
<div class="gp-text-center">${a.getStaticLocale("Product","product_not_found")}</div>
|
|
97
100
|
`)}
|
|
98
|
-
${t.RenderIf(t.isLocalEnv,`<script ${
|
|
101
|
+
${t.RenderIf(t.isLocalEnv,`<script ${a.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-product-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${a.getSettingPreloadData('class="gps-link" delay',"src")}="${t.baseAssetURL}/assets-v2/gp-product-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
99
102
|
`};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../configs/AppstleLoyaltyRewardProgram.js"),l=require("./uiV2.js");const t={tag:e.default.tag,label:e.default.label,icon:`<img class="gp-w-[24px] gp-border gp-border-[#494949] gp-rounded-[3px]" src="${e.default.logoUrl}">`,editorConfigs:{component:{isThirdParty:!0}},presets:[{id:e.default.id,name:e.default.label,hideTextContent:!0,icon:{desktop:`<div class="w-full flex flex-col items-center">
|
|
2
2
|
<img class="w-24 border border-dark-200 rounded-medium" src="${e.default.logoUrl}">
|
|
3
3
|
<span class="preset-item-title">${e.default.label}</span>
|
|
4
|
-
</div>`},components:[{tag:e.default.tag}]}],settings:[{id:"setting",controls:[{id:"install",type:"open-link",target:"_blank",linkType:"install",href:"https://apps.shopify.com/appstle-loyalty?utm_source=gempages",appName:e.default.label},{id:"widgetType",label:"Choose widget",type:"select",default:"loyalty_dedicated_page",options:[{label:"Loyalty Dedicated Page",value:"loyalty_dedicated_page"},{label:"Points Display on Product",value:"points_display_on_product",hideOnPage:["ARTICLE","BLOG","COLLECTION","GP_ARTICLE","GP_BLOG","GP_COLLECTION","GP_INDEX","GP_STATIC","STATIC"]}
|
|
4
|
+
</div>`},components:[{tag:e.default.tag}]}],settings:[{id:"setting",controls:[{id:"install",type:"open-link",target:"_blank",linkType:"install",href:"https://apps.shopify.com/appstle-loyalty?utm_source=gempages",appName:e.default.label},{id:"widgetType",label:"Choose widget",type:"select",default:"loyalty_dedicated_page",options:[{label:"Loyalty Dedicated Page",value:"loyalty_dedicated_page"},{label:"Points Display on Product",value:"points_display_on_product",hideOnPage:["ARTICLE","BLOG","COLLECTION","GP_ARTICLE","GP_BLOG","GP_COLLECTION","GP_INDEX","GP_STATIC","STATIC"]}]},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/appstle-loyalty",appName:e.default.label},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}],devices:{desktop:{default:"left"}}}]}],ui:[],uiV2:l.default};exports.default=t;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-sdk/core";import a from"../../../grid/components/row/Row.liquid.js";import{LiquidIf as d,If as o}from"@gem-sdk/system";import{getSettingPreloadData as n,getStaticLocale as s}from"../../../helpers.js";import{getData as c,DYNAMIC_PRODUCT_STATUS as
|
|
1
|
+
import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-sdk/core";import a from"../../../grid/components/row/Row.liquid.js";import{LiquidIf as d,If as o}from"@gem-sdk/system";import{getSettingPreloadData as n,getStaticLocale as s}from"../../../helpers.js";import{getData as c,DYNAMIC_PRODUCT_STATUS as l,STATIC_PRODUCT_STATUS as p,PRODUCT_ID_LATEST as u}from"./common/helpers.js";let f=f=>{let{children:m,setting:g,style:y,builderProps:v,rawChildren:_,advanced:$}=f,{isSyncProduct:S,productSetting:h}=g??{},I=h?.hasPreSelected??!1,{rowSetting:b,rowStyles:j,formatVariantId:P,formatProductId:q,productStatus:V,preSelectedOptionIds:k,productHandle:w,advancedStyle:E}=c(f);return r`
|
|
2
2
|
${r`
|
|
3
3
|
{%- assign gpBkProduct = product -%}
|
|
4
|
-
${o(V==
|
|
4
|
+
${o(V==l,r`
|
|
5
5
|
{%- liquid
|
|
6
6
|
if request.page_type != 'product'
|
|
7
7
|
assign product = all_products['${w}']
|
|
8
|
-
assign productId = '${
|
|
8
|
+
assign productId = '${q}' | times: 1
|
|
9
9
|
if product == empty or product == null
|
|
10
10
|
paginate collections.all.products by 100000
|
|
11
11
|
for item in collections.all.products
|
|
@@ -20,14 +20,14 @@ import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-s
|
|
|
20
20
|
`,r`
|
|
21
21
|
{%- liquid
|
|
22
22
|
if request.page_type == 'product'
|
|
23
|
-
if '${V}' == '${
|
|
24
|
-
if '${
|
|
23
|
+
if '${V}' == '${p}'
|
|
24
|
+
if '${q}' == '${u}'
|
|
25
25
|
paginate collections.all.products by 100000
|
|
26
26
|
assign product = collections.all.products | sort: 'created_at' | reverse | first
|
|
27
27
|
endpaginate
|
|
28
28
|
else
|
|
29
29
|
assign product = all_products['${w}']
|
|
30
|
-
assign productId = '${
|
|
30
|
+
assign productId = '${q}' | times: 1
|
|
31
31
|
if product == empty or product == null
|
|
32
32
|
paginate collections.all.products by 100000
|
|
33
33
|
for item in collections.all.products
|
|
@@ -40,13 +40,13 @@ import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-s
|
|
|
40
40
|
endif
|
|
41
41
|
endif
|
|
42
42
|
else
|
|
43
|
-
if '${
|
|
43
|
+
if '${q}' == '${u}'
|
|
44
44
|
paginate collections.all.products by 100000
|
|
45
45
|
assign product = collections.all.products | sort: 'created_at'| reverse | first
|
|
46
46
|
endpaginate
|
|
47
47
|
else
|
|
48
48
|
assign product = all_products['${w}']
|
|
49
|
-
assign productId = '${
|
|
49
|
+
assign productId = '${q}' | times: 1
|
|
50
50
|
if product == empty or product == null
|
|
51
51
|
paginate collections.all.products by 100000
|
|
52
52
|
for item in collections.all.products
|
|
@@ -63,23 +63,26 @@ import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-s
|
|
|
63
63
|
`}
|
|
64
64
|
${d("product != empty and product != null",r`
|
|
65
65
|
${r`
|
|
66
|
-
{%- assign initVariantId = ${
|
|
66
|
+
{%- assign initVariantId = ${P} -%}
|
|
67
67
|
{%- assign product_form_id = 'product-form-' | append: "${v?.uid}" -%}
|
|
68
|
-
${
|
|
69
|
-
${
|
|
68
|
+
${P?"{%- assign variant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign variant = product.selected_or_first_available_variant -%}"}
|
|
69
|
+
${P?"{%- assign productSelectedVariant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign productSelectedVariant = product.selected_or_first_available_variant -%}"}
|
|
70
70
|
{%-if productSelectedVariant == empty or productSelectedVariant == null -%}
|
|
71
71
|
{%- assign productSelectedVariant = product.selected_or_first_available_variant -%}
|
|
72
72
|
{%- endif -%}
|
|
73
73
|
{%-if variant == empty or variant == null -%}
|
|
74
74
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
75
75
|
{%- endif -%}
|
|
76
|
+
{% unless isSettingSameHeightProductList %}
|
|
77
|
+
{%- assign isSettingSameHeightProductList = false -%}
|
|
78
|
+
{% endunless %}
|
|
76
79
|
`}
|
|
77
80
|
<gp-product
|
|
78
81
|
data-uid="${v?.uid}"
|
|
79
82
|
data-id="${v?.uid}"
|
|
80
83
|
style="${E}"
|
|
81
84
|
class="${$?.cssClass}"
|
|
82
|
-
gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${k}], "isSyncProduct": "${S}", "hasPreSelected": ${
|
|
85
|
+
gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${k}], "isSyncProduct": "${S}", "hasPreSelected": ${I}, "variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "quantity": 1, "formId": "{{ product_form_id }}" }'
|
|
83
86
|
gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }}}'
|
|
84
87
|
>
|
|
85
88
|
<product-form class="product-form">
|
|
@@ -87,7 +90,7 @@ import{RenderIf as t,isLocalEnv as e,baseAssetURL as i,template as r}from"@gem-s
|
|
|
87
90
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
88
91
|
<input type="hidden" name="quantity" value="{{ quantity }}" />
|
|
89
92
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
90
|
-
${a({builderProps:{...v,uid:v?.uid,uidInteraction:`${v?.uid}-row`},style:y,styles:
|
|
93
|
+
${a({builderProps:{...v,uid:v?.uid,uidInteraction:`${v?.uid}-row`},style:y,styles:j,setting:b,children:m,rawChildren:_})}
|
|
91
94
|
{%- endform -%}
|
|
92
95
|
</product-form>
|
|
93
96
|
</gp-product>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import e from"../../configs/AppstleLoyaltyRewardProgram.js";import l from"./uiV2.js";let t={tag:e.tag,label:e.label,icon:`<img class="gp-w-[24px] gp-border gp-border-[#494949] gp-rounded-[3px]" src="${e.logoUrl}">`,editorConfigs:{component:{isThirdParty:!0}},presets:[{id:e.id,name:e.label,hideTextContent:!0,icon:{desktop:`<div class="w-full flex flex-col items-center">
|
|
2
2
|
<img class="w-24 border border-dark-200 rounded-medium" src="${e.logoUrl}">
|
|
3
3
|
<span class="preset-item-title">${e.label}</span>
|
|
4
|
-
</div>`},components:[{tag:e.tag}]}],settings:[{id:"setting",controls:[{id:"install",type:"open-link",target:"_blank",linkType:"install",href:"https://apps.shopify.com/appstle-loyalty?utm_source=gempages",appName:e.label},{id:"widgetType",label:"Choose widget",type:"select",default:"loyalty_dedicated_page",options:[{label:"Loyalty Dedicated Page",value:"loyalty_dedicated_page"},{label:"Points Display on Product",value:"points_display_on_product",hideOnPage:["ARTICLE","BLOG","COLLECTION","GP_ARTICLE","GP_BLOG","GP_COLLECTION","GP_INDEX","GP_STATIC","STATIC"]}
|
|
4
|
+
</div>`},components:[{tag:e.tag}]}],settings:[{id:"setting",controls:[{id:"install",type:"open-link",target:"_blank",linkType:"install",href:"https://apps.shopify.com/appstle-loyalty?utm_source=gempages",appName:e.label},{id:"widgetType",label:"Choose widget",type:"select",default:"loyalty_dedicated_page",options:[{label:"Loyalty Dedicated Page",value:"loyalty_dedicated_page"},{label:"Points Display on Product",value:"points_display_on_product",hideOnPage:["ARTICLE","BLOG","COLLECTION","GP_ARTICLE","GP_BLOG","GP_COLLECTION","GP_INDEX","GP_STATIC","STATIC"]}]},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/appstle-loyalty",appName:e.label},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}],devices:{desktop:{default:"left"}}}]}],ui:[],uiV2:l};export{t as default};
|