@gem-sdk/components 7.0.2 → 8.0.0-dev.19
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/carousel-v3/components/swiper/Swiper.js +1 -1
- package/dist/cjs/countdown-timer/common/helpers.js +1 -1
- package/dist/cjs/countdown-timer/hooks/useTimeLeft.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/cjs/post-purchase/product/constants/ProductOfferPlaceholder.js +1 -1
- package/dist/cjs/post-purchase/product/hooks/useGetMoneyLines.js +1 -1
- package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +10 -10
- package/dist/cjs/product/components/product-badge/common/styles.js +1 -1
- package/dist/cjs/product/components/product-badge/utils/common.js +1 -1
- package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +3 -4
- package/dist/cjs/product/components/product-button/hooks/useAddToCart.js +1 -1
- package/dist/cjs/product/components/product-discount-tag/hooks/useGpDiscountTag.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/cjs/product/components/product-price/hooks/useGpPrice.js +1 -1
- package/dist/cjs/product/components/product-variants/OptionVariantsNewFormat.liquid.js +41 -0
- package/dist/cjs/product/components/product-variants/OptionVariantsOldFormat.liquid.js +66 -0
- package/dist/cjs/product/components/product-variants/ProductVariants.liquid.js +25 -79
- package/dist/cjs/product/components/product-variants/common/base/styles.js +1 -1
- package/dist/cjs/product/components/product-variants/common/const.js +1 -0
- package/dist/cjs/product/components/product-variants/components/color/color.liquid.js +3 -3
- package/dist/cjs/product/components/product-view-more/ProductViewMore.liquid.js +1 -1
- package/dist/cjs/product/components/product-view-more/common/helpers.js +1 -1
- package/dist/cjs/product/components/product-wrap/Product.liquid.js +12 -10
- package/dist/cjs/product/helpers/product-bundle.js +1 -1
- package/dist/cjs/third-party/settings/BonLoyaltyRewardsReferrals/index.js +1 -1
- package/dist/esm/carousel-v3/components/swiper/Swiper.js +1 -1
- package/dist/esm/countdown-timer/common/helpers.js +1 -1
- package/dist/esm/countdown-timer/hooks/useTimeLeft.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/esm/post-purchase/product/constants/ProductOfferPlaceholder.js +1 -1
- package/dist/esm/post-purchase/product/hooks/useGetMoneyLines.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +21 -21
- package/dist/esm/product/components/product-badge/common/styles.js +1 -1
- package/dist/esm/product/components/product-badge/utils/common.js +1 -1
- package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +3 -4
- package/dist/esm/product/components/product-button/hooks/useAddToCart.js +1 -1
- package/dist/esm/product/components/product-discount-tag/hooks/useGpDiscountTag.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/esm/product/components/product-price/hooks/useGpPrice.js +1 -1
- package/dist/esm/product/components/product-variants/OptionVariantsNewFormat.liquid.js +41 -0
- package/dist/esm/product/components/product-variants/OptionVariantsOldFormat.liquid.js +66 -0
- package/dist/esm/product/components/product-variants/ProductVariants.liquid.js +40 -94
- package/dist/esm/product/components/product-variants/common/base/styles.js +1 -1
- package/dist/esm/product/components/product-variants/common/const.js +1 -0
- package/dist/esm/product/components/product-variants/components/color/color.liquid.js +3 -3
- package/dist/esm/product/components/product-view-more/ProductViewMore.liquid.js +1 -1
- package/dist/esm/product/components/product-view-more/common/helpers.js +1 -1
- package/dist/esm/product/components/product-wrap/Product.liquid.js +33 -31
- package/dist/esm/product/helpers/product-bundle.js +1 -1
- package/dist/esm/third-party/settings/BonLoyaltyRewardsReferrals/index.js +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import{Liquid as e,LiquidFor as s,LiquidIf as t}from"@gem-sdk/system";import{template as i}from"@gem-sdk/core";let renderOptionValuesOld=a=>{let{renderVariantItem:n,variantPresetsLiquid:o}=a;return i`
|
|
2
|
+
${e("{%- assign optionRendered = false -%}")}
|
|
3
|
+
${e("{%- assign swatches = shop.metafields.GEMPAGES.swatches -%}")}
|
|
4
|
+
${e("{%- assign swatchesItems = swatches | split: '($1)' -%}")}
|
|
5
|
+
|
|
6
|
+
${s("swatchesItem in swatchesItems",`
|
|
7
|
+
${e('{%- assign colorArraysString = "" -%}')}
|
|
8
|
+
${e('{%- assign labelsString = "" -%}')}
|
|
9
|
+
${e('{%- assign imageUrlsString = "" -%}')}
|
|
10
|
+
${e("{%- assign attrItems = swatchesItem | split: '($3)' -%}")}
|
|
11
|
+
|
|
12
|
+
${s("attrItem in attrItems",`
|
|
13
|
+
${e("{%- assign attrs = attrItem | split: '($2)' -%}")}
|
|
14
|
+
${e("{%- assign optionKey = attrs[0] -%}")}
|
|
15
|
+
${e("{%- assign optionValue = attrs[1] -%}")}
|
|
16
|
+
${e(`
|
|
17
|
+
{% if optionKey == 'optionTitle' %}
|
|
18
|
+
{% assign optionTitle = optionValue %}
|
|
19
|
+
{% elsif optionKey == 'optionType' %}
|
|
20
|
+
{% assign optionType = optionValue %}
|
|
21
|
+
{% endif %}
|
|
22
|
+
`)}
|
|
23
|
+
|
|
24
|
+
${t('optionKey == "optionValues"',`
|
|
25
|
+
${e("{%- assign opValueItems = optionValue | split: '($4)' -%}")}
|
|
26
|
+
${s("opValueItem in opValueItems",`
|
|
27
|
+
${e("{%- assign opValueItemAttrs = opValueItem | split: '($6)' -%}")}
|
|
28
|
+
${s("opValueItemAttr in opValueItemAttrs",`
|
|
29
|
+
${e("{%- assign attrs = opValueItemAttr | split: '($5)' -%}")}
|
|
30
|
+
${e("{%- assign opValueItemKey = attrs[0] -%}")}
|
|
31
|
+
${e("{%- assign opValueItemValue = attrs[1] -%}")}
|
|
32
|
+
|
|
33
|
+
${t('opValueItemKey == "label"',`${e("{%- assign labelsString = labelsString | append: opValueItemValue -%}")}
|
|
34
|
+
${e('{%- assign labelsString = labelsString | append: "($8)" -%}')}`)}
|
|
35
|
+
|
|
36
|
+
${t('opValueItemKey == "colors"',`${e("{%- assign colorArraysString = colorArraysString | append: opValueItemValue -%}")}
|
|
37
|
+
${e('{%- assign colorArraysString = colorArraysString | append: "($8)" -%}')}`)}
|
|
38
|
+
|
|
39
|
+
${t('opValueItemKey == "imageUrl"',`${e("{%- assign imageUrlsString = imageUrlsString | append: opValueItemValue -%}")}
|
|
40
|
+
${e('{%- assign imageUrlsString = imageUrlsString | append: "($8)" -%}')}`)}
|
|
41
|
+
`)}
|
|
42
|
+
`)}
|
|
43
|
+
`)}
|
|
44
|
+
`)}
|
|
45
|
+
|
|
46
|
+
${e("{%- assign labels = labelsString | split: '($8)' -%}")}
|
|
47
|
+
${e("{%- assign colorStrings = colorArraysString | split: '($8)' -%}")}
|
|
48
|
+
${e("{%- assign imageUrls = imageUrlsString | split: '($8)' -%}")}
|
|
49
|
+
|
|
50
|
+
${t("optionTitle == option.name",`
|
|
51
|
+
${e(`{%- assign variantPresetString = "${o}" -%}`)}
|
|
52
|
+
${e('{%- assign optionName = option.name | replace: "\'", "'" | replace: \'"\', """ -%}')}
|
|
53
|
+
${e("{%- assign items = variantPresetString | split:'($2)' -%}")}
|
|
54
|
+
${e("{%- assign type = 'dropdown' -%}")}
|
|
55
|
+
${s("item in items",`
|
|
56
|
+
${e("{%- assign itemPreset = item | split:'($1)' -%}")}
|
|
57
|
+
${t("itemPreset[0] == optionName",e("{%- assign type = itemPreset[1] -%}"))}
|
|
58
|
+
${t('itemPreset[0] == "base"',e("{%- assign type = itemPreset[1] -%}"))}
|
|
59
|
+
`)}
|
|
60
|
+
${e("{%- assign optionRendered = true -%}")}
|
|
61
|
+
${n({showDropdown:!0})}
|
|
62
|
+
`)}
|
|
63
|
+
`)}
|
|
64
|
+
|
|
65
|
+
${t("optionRendered == false",n({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
|
|
66
|
+
`};export{renderOptionValuesOld};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import{
|
|
2
|
-
|
|
3
|
-
${v(
|
|
1
|
+
import{template as e,isLocalEnv as t,baseAssetURL as s,DEVICES as i,getResponsiveValueByScreen as o}from"@gem-sdk/core";import a from"../../../text/components/Text.liquid.js";import n from"./components/variants/index.liquid.js";import r from"./components/dropdown-swatches/Dropdown.liquid.js";import p from"./components/dropdown-group/DropdownGroup.liquid.js";import{getSettingPreloadData as l}from"../../../helpers.js";import{mappingVariantStyles as d}from"./utils/mappingVariantStyles.js";import{createClass as m,createStyle as c,createAttr as u,Liquid as f,LiquidIf as v,If as $,LiquidFor as _}from"@gem-sdk/system";import{getAttrs as g}from"./common/main/getAttr.js";import{getVariantOptionGroupStyle as h,getWrapperStyle as y}from"./common/main/styles.js";import{getVariantOptionGroupClass as j,getWrapDropdownClass as w}from"./common/main/classes.js";import{getTextVariantTitleData as S,getDropdownGroupData as A}from"./common/main/getData.js";import{getWrapVariantOptionClass as P}from"./common/variants/classes.js";import{getStyleOfObject as D}from"../../helpers/function.js";import{getMarginBottomStyle as V}from"./common/variants/styles.js";import{renderOptionValuesNewFormatSwatches as b}from"./OptionVariantsNewFormat.liquid.js";import{renderOptionValuesOld as E}from"./OptionVariantsOldFormat.liquid.js";let DEFAULT_ADVANCED_DISPLAY_SETTING={desktop:!0,tablet:!0,mobile:!0},ProductVariants=N=>{let{builderProps:T,styles:O,setting:x,advanced:q}=N,{align:G,swatchItemWidth:C,dropdownItemWidth:F,swatchSpacing:I,optionTypo:k,marginBottom:L}=O??{},{label:J,optionType:z,showAsSwatches:M,layout:U,hasPreSelected:W}=x??{},R=q?.d??DEFAULT_ADVANCED_DISPLAY_SETTING,{uid:Y}=T??{},H="groupOption"===z,K=()=>{let e={};return i.forEach(t=>{let s=o(C,t);e[t]="auto"===s}),e},Q=()=>{let e={};return i.forEach(t=>{e[t]=F?.[t]==="fill"}),e},B=x?.variantPresets?d(x?.variantPresets,O):[],X=B?.map(e=>({...e,presets:{[e.optionType]:e.presets[e.optionType]}})),Z={...x,variantPresetsOptionType:X},ee=e=>{let t={"'":"'",'"':"""},s=e;for(let i in t)e.indexOf(i)>=0&&(s=s.replaceAll(i,t[i]));return s},et=()=>x?.variantPresets?.map(e=>`${ee(e.optionName)}($2)${e.optionType}`).join("($1)"),es=()=>x?.variantPresets?.filter(e=>!!e?.hide)?.map(e=>e.optionName).join(","),ei=({showDropdown:t,isRenderDefault:s,typeOfOption:i})=>e`
|
|
2
|
+
${_("value in values",n({id:"{{option.name | escape}}-{{value | escape}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:M,uid:Y,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:W?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",typeOfOption:i,activeClass:W?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...O,...Z,swatchAutoWidth:K(),optionTypo:k,isRenderDefault:s}))}
|
|
3
|
+
${v(t?'type == "dropdown"':"false",r({...O,...Z,swatchAutoWidth:Q(),optionTypo:k}))}`,eo=x?.variantPresets?.map(e=>({name:ee(e.optionName),type:e.optionType})).map(e=>`${e.name}($1)${e.type}`).join("($2)").toString(),ea={renderVariantItem:ei,variantPresetsLiquid:eo??""},en=m(j(G)),er=c(h(I,I)),ep=S(N,"Liquid"),el=m(P(U,G)),ed=()=>e`
|
|
4
|
+
${f(`{%- assign presets = "${et()}" | split: '($1)' -%}`)}
|
|
5
|
+
${f(`{% assign hiddenPresetOptions = "${es()}" | split: ',' %}`)}
|
|
4
6
|
|
|
5
|
-
${
|
|
7
|
+
${f(`{% assign all_option_names = options | map: 'name' %}
|
|
6
8
|
{% assign filtered_options_string = '' %}
|
|
7
9
|
{% assign delimiter = '||' %}
|
|
8
10
|
|
|
@@ -25,29 +27,29 @@ import{composeMemo as e,template as t,DEVICES as s,getResponsiveValueByScreen as
|
|
|
25
27
|
|
|
26
28
|
{% assign filtered_options_array = filtered_options_string | split: delimiter %}`)}
|
|
27
29
|
|
|
28
|
-
${
|
|
30
|
+
${f("{% assign last_option_name = filtered_options_array | last %}")}
|
|
29
31
|
|
|
30
|
-
${
|
|
32
|
+
${_("option in options",`
|
|
31
33
|
<div
|
|
32
34
|
option-name="{{option.name | escape}}"
|
|
33
|
-
class="${
|
|
34
|
-
style="${
|
|
35
|
+
class="${el} ${v("hiddenPresetOptions contains option.name","gp-hidden")}"
|
|
36
|
+
style="${D(V(L))}${f("{% if forloop.last or option.name == last_option_name %}--mb:0;--mb-mobile:0;--mb-tablet:0;{% endif %}")}"
|
|
35
37
|
>
|
|
36
|
-
${
|
|
37
|
-
${
|
|
38
|
-
${
|
|
39
|
-
${
|
|
40
|
-
${
|
|
38
|
+
${f("{%- assign showVariantClass = 'variant-display' -%}")}
|
|
39
|
+
${f("{%- assign optionName = option.name -%}")}
|
|
40
|
+
${_("preset in presets",`
|
|
41
|
+
${f("{%- assign presetDetail = preset | split: '($2)' -%}")}
|
|
42
|
+
${v("presetDetail[1] == 'dropdown' and presetDetail[0] == optionName",`${f("{%- assign showVariantClass = '' -%}")} ${f("{%- break -%}")}`)}
|
|
41
43
|
`)}
|
|
42
|
-
${
|
|
44
|
+
${$(J,a(ep)," ")}
|
|
43
45
|
<div
|
|
44
46
|
variant-option-name="{{option.name | escape}}"
|
|
45
|
-
class="${
|
|
46
|
-
style="${
|
|
47
|
+
class="${en}"
|
|
48
|
+
style="${D(er)}"
|
|
47
49
|
>
|
|
48
|
-
${
|
|
49
|
-
${
|
|
50
|
-
${
|
|
50
|
+
${f("{%- assign values = option.values -%}")}
|
|
51
|
+
${f("{%- assign rootForloop = forloop.index0 -%}")}
|
|
52
|
+
${f(`
|
|
51
53
|
{%- if option.position == 1 -%}
|
|
52
54
|
{%- assign selectedValue = variant.option1 -%}
|
|
53
55
|
{%- elsif option.position == 2 -%}
|
|
@@ -56,78 +58,22 @@ import{composeMemo as e,template as t,DEVICES as s,getResponsiveValueByScreen as
|
|
|
56
58
|
{%- assign selectedValue = variant.option3 -%}
|
|
57
59
|
{%- endif -%}
|
|
58
60
|
`)}
|
|
59
|
-
${
|
|
60
|
-
${
|
|
61
|
+
${$(!W,f("{%- assign selectedValue = null -%}"),"")}
|
|
62
|
+
${$(M,em(),ei({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
|
|
61
63
|
</div>
|
|
62
64
|
</div>`)}
|
|
63
|
-
`,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
${f("swatchesItem in swatchesItems",`
|
|
69
|
-
${v('{%- assign colorArraysString = "" -%}')}
|
|
70
|
-
${v('{%- assign labelsString = "" -%}')}
|
|
71
|
-
${v('{%- assign imageUrlsString = "" -%}')}
|
|
72
|
-
${v("{%- assign attrItems = swatchesItem | split: '($3)' -%}")}
|
|
73
|
-
|
|
74
|
-
${f("attrItem in attrItems",`${v("{%- assign attrs = attrItem | split: '($2)' -%}")}
|
|
75
|
-
${v("{%- assign optionKey = attrs[0] -%}")}
|
|
76
|
-
${v("{%- assign optionValue = attrs[1] -%}")}
|
|
77
|
-
${v(`
|
|
78
|
-
{% if optionKey == 'optionTitle' %}
|
|
79
|
-
{% assign optionTitle = optionValue %}
|
|
80
|
-
{% elsif optionKey == 'optionType' %}
|
|
81
|
-
{% assign optionType = optionValue %}
|
|
82
|
-
{% endif %}
|
|
83
|
-
`)}
|
|
84
|
-
|
|
85
|
-
${y("optionKey == 'optionValues'",`${v("{%- assign opValueItems = optionValue | split: '($4)' -%}")}
|
|
86
|
-
${f("opValueItem in opValueItems",`${v("{%- assign opValueItemAttrs = opValueItem | split: '($6)' -%}")}
|
|
87
|
-
${f("opValueItemAttr in opValueItemAttrs",`${v("{%- assign attrs = opValueItemAttr | split: '($5)' -%}")}
|
|
88
|
-
${v("{%- assign opValueItemKey = attrs[0] -%}")}
|
|
89
|
-
${v("{%- assign opValueItemValue = attrs[1] -%}")}
|
|
90
|
-
|
|
91
|
-
${y("opValueItemKey == 'label'",`${v("{%- assign labelsString = labelsString | append: opValueItemValue -%}")}${v('{%- assign labelsString = labelsString | append: "($8)" -%}')}`)}
|
|
92
|
-
|
|
93
|
-
${y("opValueItemKey == 'colors'",`${v("{%- assign colorArraysString = colorArraysString | append: opValueItemValue -%}")}${v('{%- assign colorArraysString = colorArraysString | append: "($8)" -%}')}`)}
|
|
94
|
-
|
|
95
|
-
${y("opValueItemKey == 'imageUrl'",`${v("{%- assign imageUrlsString = imageUrlsString | append: opValueItemValue -%}")}${v('{%- assign imageUrlsString = imageUrlsString | append: "($8)" -%}')}`)}`)}`)}`)}
|
|
96
|
-
`)}
|
|
97
|
-
|
|
98
|
-
${v("{%- assign labels = labelsString | split: '($8)' -%}")}
|
|
99
|
-
${v("{%- assign colorStrings = colorArraysString | split: '($8)' -%}")}
|
|
100
|
-
${v("{%- assign imageUrls = imageUrlsString | split: '($8)' -%}")}
|
|
101
|
-
|
|
102
|
-
${y("optionTitle == option.name",`
|
|
103
|
-
${v(`{%- assign variantPresetString = "${en}" -%}`)}
|
|
104
|
-
${v('{%- assign optionName = option.name | replace: "\'", "'" | replace: \'"\', """ -%}')}
|
|
105
|
-
${v("{%- assign items = variantPresetString | split:'($2)' -%}")}
|
|
106
|
-
${v("{%- assign type = 'dropdown' -%}")}
|
|
107
|
-
${f("item in items",`
|
|
108
|
-
${v("{%- assign itemPreset = item | split:'($1)' -%}")}
|
|
109
|
-
${y("itemPreset[0] == optionName",v("{%- assign type = itemPreset[1] -%}"))}
|
|
110
|
-
${y('itemPreset[0] == "base"',v("{%- assign type = itemPreset[1] -%}"))}
|
|
111
|
-
`)}
|
|
112
|
-
${v("{%- assign optionRendered = true -%}")}
|
|
113
|
-
${f("value in values",r({id:"{{option.name | escape}}-{{value | escape}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:L,uid:H,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:W?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",optionType:"optionType",activeClass:W?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...x,...B,swatchAutoWidth:Q(),optionTypo:k}))}
|
|
114
|
-
${y("type == 'dropdown'",p({...x,...B,swatchAutoWidth:Y(),optionTypo:k}))}
|
|
115
|
-
`)}
|
|
116
|
-
`)}
|
|
117
|
-
|
|
118
|
-
${y("optionRendered == false",ep())}
|
|
119
|
-
`,ep=()=>f("value in values",r({id:"{{option.name | escape}}-{{value | escape}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:L,uid:H,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:W?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",typeOfOption:"optionType",activeClass:W?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...x,...B,swatchAutoWidth:Q(),optionTypo:k,isRenderDefault:!0})),el=c(I(U)),em=w(N),ed=()=>`
|
|
120
|
-
<div className="${el}">
|
|
121
|
-
${l(em)}
|
|
65
|
+
`,em=()=>e`
|
|
66
|
+
${v("shop.metafields.GEMPAGES.swatches and shop.metafields.GEMPAGES.swatchesJSONFormat != blank",b(ea),E(ea))}
|
|
67
|
+
`,ec=m(w(G)),eu=A(N),ef=()=>`
|
|
68
|
+
<div className="${ec}">
|
|
69
|
+
${p(eu)}
|
|
122
70
|
</div>
|
|
123
|
-
|
|
124
|
-
${v("{%- assign total_combinations = 1 -%}")}
|
|
125
|
-
${f("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
|
|
71
|
+
`,ev=u(g({uid:Y,hasPreSelected:W,cssClass:q?.cssClass})),e$=c(y(N)),e_=m({"gp-flex gp-flex-col !gp-ml-0":!0}),eg=()=>{let e=t?"{{ 'gp-product-variant-v7-5.js' | asset_url }}":`${s}/assets-v2/gp-product-variant-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${l('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`};return e`
|
|
126
72
|
<gp-product-variants
|
|
127
|
-
${
|
|
73
|
+
${ev}
|
|
128
74
|
gp-data='{
|
|
129
|
-
"setting":${JSON.stringify(
|
|
130
|
-
"styles":${JSON.stringify(
|
|
75
|
+
"setting":${JSON.stringify(Z)?.replaceAll("'","'")},
|
|
76
|
+
"styles":${JSON.stringify(O)},
|
|
131
77
|
"variants":{{product.variants | json | escape}},
|
|
132
78
|
"optionsWithValues": {{product.options_with_values | json | escape}},
|
|
133
79
|
"variantSelected": {{ variant | json | escape }},
|
|
@@ -137,21 +83,21 @@ import{composeMemo as e,template as t,DEVICES as s,getResponsiveValueByScreen as
|
|
|
137
83
|
"productId": {{product.id | json | escape}},
|
|
138
84
|
"productUrl": {{product.url | json | escape}},
|
|
139
85
|
"productHandle": {{product.handle | json | escape}},
|
|
140
|
-
"displayState": ${JSON.stringify(
|
|
86
|
+
"displayState": ${JSON.stringify(R)},
|
|
141
87
|
"totalVariantCombinations": {{total_combinations}},
|
|
142
88
|
"firstAvailableVariant": {{product.selected_or_first_available_variant | json | escape}}
|
|
143
89
|
}
|
|
144
90
|
'>
|
|
145
91
|
<div class="gp-hidden" style="--hvr-shadow: none; --hvr-shadow-tablet: none; --hvr-shadow-mobile: none"></div>
|
|
146
|
-
${
|
|
147
|
-
${
|
|
148
|
-
${
|
|
149
|
-
class="${
|
|
150
|
-
style="${
|
|
92
|
+
${f("{%- assign options = product.options_with_values -%}")}
|
|
93
|
+
${f("{%- assign variants = product.variants -%}")}
|
|
94
|
+
${v("options.size == 0 or options.size == 1 and variants.size == 1 and variants[0].title == 'Default Title' and variants[0].option1 == 'Default Title'","<div></div>",e`<div
|
|
95
|
+
class="${e_}"
|
|
96
|
+
style="${e$}"
|
|
151
97
|
>
|
|
152
|
-
${
|
|
98
|
+
${$(H,ef(),ed())}
|
|
153
99
|
</div>`)}
|
|
154
100
|
</gp-product-variants>
|
|
155
101
|
|
|
156
|
-
${
|
|
102
|
+
${eg()}
|
|
157
103
|
`};export{ProductVariants as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeTypographyStyle as e,getRadiusStyleActiveState as t,getStyleShadow as o,makeStyle as r,getSingleColorVariable as l,composeRadius as i,getGlobalColorStateStyle as p,handleConvertBorderStyle as a,handleConvertBorderWidth as n,handleConvertBorderColor as d,makeStyleResponsive as h}from"@gem-sdk/core";import{filterTruthyObject as c}from"../../../../../helpers.js";let getColorStyleWidth=e=>{let t=e?.height||"32px",o=e?.width||{desktop:t},r=Object.fromEntries(Object.entries(o).map(([e,o])=>{let r=o&&"undefined"!==o&&"auto"!==o?o:t;return[e,r]}));return h("minw",r)},getWrapperStyleActive=i=>{let{preset:p,optionTypography:a,optionTypo:n,typeOfOption:d}=i,h=p?.optionBgColor,
|
|
1
|
+
import{composeTypographyStyle as e,getRadiusStyleActiveState as t,getStyleShadow as o,makeStyle as r,getSingleColorVariable as l,composeRadius as i,getGlobalColorStateStyle as p,handleConvertBorderStyle as a,handleConvertBorderWidth as n,handleConvertBorderColor as d,makeStyleResponsive as h}from"@gem-sdk/core";import{filterTruthyObject as c}from"../../../../../helpers.js";let getColorStyleWidth=e=>{let t=e?.height||"32px",o=e?.width||{desktop:t},r=Object.fromEntries(Object.entries(o).map(([e,o])=>{let r=o&&"undefined"!==o&&"auto"!==o?o:t;return[e,r]}));return h("minw",r)},getWrapperStyleActive=i=>{let{preset:p,optionTypography:a,optionTypo:n,typeOfOption:d}=i,h=p?.optionBgColor,s=p?.optionTextColor,g=p?.optionBorder,b=p?.optionHasShadow,m=p?.optionShadow,u=p?.optionRounded,w="color"===d,x="image"===d||"image_shopify"===d,y=e(n,a),S=e=>{let t=h?.active??h?.normal,o=g?.active??g?.normal;return r({bg:e&&l(t),bs:o?.border,bw:o?.width,bc:l(o?.color)})},v=m?.active??m?.normal,C=b?.active??b?.normal,f=s?.active??s?.normal;return c({...S(!w),...t(u),...o({value:v,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:C},!0),...y,...!w&&!x&&r({c:l(f)}),...w&&getColorStyleWidth(p),...r({h:p?.height})})},getWrapperStyleNormalAndHover=e=>{let{preset:t,optionTransform:l,optionTypography:h,optionTypo:s,typeOfOption:g}=e,b=t?.optionBgColor,m=t?.optionTextColor,u=t?.optionBorder,w=t?.optionHasShadow,x=t?.optionShadow,y=t?.optionRounded,S="color"===g,v="image"===g||"image_shopify"===g,C=["normal","hover"].reduce((e,t)=>({...e,...o({value:x?.[t],state:t,styleAppliedFor:"box-shadow",isEnableShadow:w?.[t]})}),{});return c({...i(y),...C,...!S&&p("bg",b),...!S&&a(u),...!S&&n(u),...!S&&d(u),...!S&&!v&&r({c:l}),...!S&&!v&&p("c",m),...typoStyleNotIn(s,h,["--c"]),...S&&getColorStyleWidth(t),...r({h:t?.height})})};function typoStyleNotIn(t,o,r){let l=e(t,o);return r&&0!==r.length?Object.fromEntries(Object.entries(l).filter(([e])=>!r.includes(e))):l}let getWrapperTextStyle=e=>{let{preset:o,typeOfOption:r,checked:l}=e,p=o?.optionBorder,h=o?.optionRounded,s="color"===r,g=()=>{let e="16px",t={"--pl":"0px","--pr":"0px","--pl-tablet":"0px","--pr-tablet":"0px","--pl-mobile":"0px","--pr-mobile":"0px","--pt":"0px","--pb":"0px"};return o?.width?.desktop?.toLowerCase()!=="auto"&&o?.width?.desktop||(t["--pl"]=e,t["--pr"]=e),o?.width?.tablet?.toLowerCase()!=="auto"&&o?.width?.tablet||(t["--pl-tablet"]=e,t["--pr-tablet"]=e),o?.width?.mobile?.toLowerCase()!=="auto"&&o?.width?.mobile||(t["--pl-mobile"]=e,t["--pr-mobile"]=e),(o?.height?.toLowerCase()==="auto"||o?.height)&&(t["--pt"]="8px",t["--pb"]="8px"),t},b={...h,active:{...h?.active||{},radiusType:"custom"}},m=l?t(b):i(h),u=!l&&s?{...a(p),...n(p),...d(p)}:{};return c({...!s&&g(),...s&&m,...u})},getColorStyle=({optionBorder:e,optionRounded:t,isActive:o,color:r})=>{let l=()=>r?r?.startsWith("linear-gradient")?{backgroundImage:r}:{backgroundColor:r}:{},p=t=>t?{"--bs":"none"}:a(e),h=o=>({"--d":"flex","--jc":"center"," --ai":"center","--w":"100%","--h":"100%","--of":"hidden","--hvr-c":"unset",...p(o),...n(e),...d(e),...i(t),...l()});return h(!!o)},getTextStyle=({optionTypo:t,optionTypography:o})=>{let r=e(t,o);return delete r["--c"],c({...r})};export{getColorStyle,getTextStyle,getWrapperStyleActive,getWrapperStyleNormalAndHover,getWrapperTextStyle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let OPTION_VALUES_DELIMITER="|||";export{OPTION_VALUES_DELIMITER};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{template as o}from"@gem-sdk/core";import
|
|
1
|
+
import{template as o}from"@gem-sdk/core";import r from"../base/base.liquid.js";import{optionRoundedColorDefault as l}from"../../utils/mappingVariantStyles.js";import{OPTION_VALUES_DELIMITER as i}from"../../common/const.js";let ColorVariant=({isVariantOutStock:s,swatchValue:n,...t})=>o`
|
|
2
2
|
{% assign colorsString = null %}
|
|
3
3
|
{% assign colors = null %}
|
|
4
4
|
{% for label in labels %}
|
|
@@ -7,7 +7,7 @@ import{template as o}from"@gem-sdk/core";import l from"../base/base.liquid.js";i
|
|
|
7
7
|
{% endif %}
|
|
8
8
|
{% endfor %}
|
|
9
9
|
{% if colorsString != null %}
|
|
10
|
-
{% assign colors = colorsString | split: '
|
|
10
|
+
{% assign colors = colorsString | split: '${i}' %}
|
|
11
11
|
{% endif %}
|
|
12
|
-
${
|
|
12
|
+
${r({...t,typeOfOption:"color",optionRounded:l})}
|
|
13
13
|
`;export{ColorVariant as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{If as e}from"@gem-sdk/system";import{getButtonStyle as r}from"./common/styles.js";import{getSettingPreloadData as s}from"../../../helpers.js";import o from"../../../button/components/Button.liquid.js";import{template as t,isLocalEnv as m,baseAssetURL as p}from"@gem-sdk/core";import{getButtonSettings as i,getButtonLiquidSettings as d}from"./common/helpers.js";let ProductViewMore=({style:c,styles:l,setting:a,advanced:u,builderProps:f,builderAttrs:n,pageContext:v})=>t`
|
|
2
2
|
<gp-product-view-more>
|
|
3
|
-
${o({styles:l,advanced:u,builderProps:f,builderAttrs:n,setting:{...i(a),...d(a)},style:{...r(c,l)},pageContext:v,className:"btn-view-more"})}
|
|
3
|
+
${o({styles:l,advanced:u,builderProps:f,builderAttrs:n,setting:{...i(a),...d(a,v)},style:{...r(c,l)},pageContext:v,className:"btn-view-more"})}
|
|
4
4
|
${e(m,`<script ${s('class="gps-link" delay',"src")}="{{ 'gp-product-view-more-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${s('class="gps-link" delay',"src")}="${p}/assets-v2/gp-product-view-more-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
5
5
|
</gp-product-view-more>
|
|
6
6
|
`;export{ProductViewMore as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let getButtonSettings=t=>{let{label:e,iconSvg:n,iconAlign:
|
|
1
|
+
let getButtonSettings=t=>{let{label:e,iconSvg:n,iconAlign:l,iconVisible:i,shouldClearSpace:u,enableHoverEffect:o}=t??{};return{label:e,iconSvg:n,iconAlign:l,iconVisible:i,shouldClearSpace:u,htmlType:"submit",enableHoverEffect:o}},getButtonLiquidSettings=(t,e)=>{let{translate:n,redirectNewTab:l}=t??{},i=e?.hasCollectionHandle?"{% if collection %}{{ collection.url }}{{ product.url }}{% else %}{{ product.url }}{% endif %}":"{{ product.url }}";return{translate:n,btnLink:{link:i,target:l?"_blank":"_self"},enableBtnLink:!0}};export{getButtonLiquidSettings,getButtonSettings};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as
|
|
1
|
+
import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as o}from"@gem-sdk/core";import r from"../../../grid/components/row/Row.liquid.js";import{LiquidIf as a,If as n,Liquid as d,LiquidFor as s}from"@gem-sdk/system";import{getSettingPreloadData as c,getStaticLocale as p}from"../../../helpers.js";import{getData as l,DYNAMIC_PRODUCT_STATUS as u,STATIC_PRODUCT_STATUS as f,PRODUCT_ID_LATEST as m}from"./common/helpers.js";let Product=g=>{let{children:_,setting:v,style:y,builderProps:$,rawChildren:b,advanced:I}=g,{isSyncProduct:S}=v??{},{rowSetting:j,rowStyles:h,formatVariantId:q,formatProductId:V,productStatus:P,preSelectedOptionIds:k,productHandle:w,advancedStyle:E}=l(g),x=()=>t`
|
|
2
2
|
{%- liquid
|
|
3
3
|
if request.page_type == 'product'
|
|
4
|
-
if '${
|
|
5
|
-
if '${
|
|
4
|
+
if '${P}' == '${f}'
|
|
5
|
+
if '${V}' == '${m}'
|
|
6
6
|
paginate collections.all.products by 100000
|
|
7
7
|
assign product = collections.all.products | sort: 'created_at' | reverse | first
|
|
8
8
|
endpaginate
|
|
9
9
|
else
|
|
10
|
-
assign product = all_products['${
|
|
11
|
-
assign productId = '${
|
|
10
|
+
assign product = all_products['${w}']
|
|
11
|
+
assign productId = '${V}' | times: 1
|
|
12
12
|
if product == empty or product == null
|
|
13
13
|
paginate collections.all.products by 100000
|
|
14
14
|
for item in collections.all.products
|
|
@@ -21,13 +21,13 @@ import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as r}from"@gem-s
|
|
|
21
21
|
endif
|
|
22
22
|
endif
|
|
23
23
|
else
|
|
24
|
-
if '${
|
|
24
|
+
if '${V}' == '${m}'
|
|
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
|
-
assign product = all_products['${
|
|
30
|
-
assign productId = '${
|
|
29
|
+
assign product = all_products['${w}']
|
|
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,11 +40,11 @@ import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as r}from"@gem-s
|
|
|
40
40
|
endif
|
|
41
41
|
endif
|
|
42
42
|
-%}
|
|
43
|
-
`,
|
|
43
|
+
`,A=()=>t`
|
|
44
44
|
{%- liquid
|
|
45
45
|
if request.page_type != 'product'
|
|
46
|
-
assign product = all_products['${
|
|
47
|
-
assign productId = '${
|
|
46
|
+
assign product = all_products['${w}']
|
|
47
|
+
assign productId = '${V}' | times: 1
|
|
48
48
|
if product == empty or product == null
|
|
49
49
|
paginate collections.all.products by 100000
|
|
50
50
|
for item in collections.all.products
|
|
@@ -56,30 +56,32 @@ import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as r}from"@gem-s
|
|
|
56
56
|
endif
|
|
57
57
|
endif
|
|
58
58
|
-%}
|
|
59
|
-
`,
|
|
59
|
+
`,B=()=>t`
|
|
60
60
|
{%- assign gpBkProduct = product -%}
|
|
61
|
-
${
|
|
62
|
-
`,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
${n(P==u,A(),x())}
|
|
62
|
+
`,G=()=>t`
|
|
63
|
+
${d("{%- assign total_combinations = 1 -%}")}
|
|
64
|
+
${s("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
|
|
65
|
+
{%- assign initVariantId = ${q} -%}
|
|
66
|
+
{%- assign product_form_id = 'product-form-' | append: "${$?.uid}" -%}
|
|
67
|
+
${q?"{%- assign variant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign variant = product.selected_or_first_available_variant -%}"}
|
|
68
|
+
${q?"{%- assign productSelectedVariant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign productSelectedVariant = product.selected_or_first_available_variant -%}"}
|
|
67
69
|
{%-if productSelectedVariant == empty or productSelectedVariant == null -%}
|
|
68
70
|
{%- assign productSelectedVariant = product.selected_or_first_available_variant -%}
|
|
69
71
|
{%- endif -%}
|
|
70
72
|
{%-if variant == empty or variant == null -%}
|
|
71
73
|
{%- assign variant = product.selected_or_first_available_variant -%}
|
|
72
74
|
{%- endif -%}
|
|
73
|
-
`,
|
|
74
|
-
<div class="gp-text-center">${
|
|
75
|
-
`,
|
|
76
|
-
${
|
|
75
|
+
`,H=()=>t`
|
|
76
|
+
<div class="gp-text-center">${p("Product","product_not_found")}</div>
|
|
77
|
+
`,O=()=>t`
|
|
78
|
+
${G()}
|
|
77
79
|
<gp-product
|
|
78
|
-
data-uid="${
|
|
79
|
-
data-id="${
|
|
80
|
-
style="${
|
|
81
|
-
class="${
|
|
82
|
-
gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${
|
|
80
|
+
data-uid="${$?.uid}"
|
|
81
|
+
data-id="${$?.uid}"
|
|
82
|
+
style="${E}"
|
|
83
|
+
class="${I?.cssClass}"
|
|
84
|
+
gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${k}], "isSyncProduct": "${S}", "variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "inventoryQuantity": {{ variant.inventory_quantity }}, "quantity": 1, "formId": "{{ product_form_id }}" }'
|
|
83
85
|
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
86
|
>
|
|
85
87
|
<product-form class="product-form">
|
|
@@ -87,13 +89,13 @@ import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as r}from"@gem-s
|
|
|
87
89
|
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
88
90
|
<input type="hidden" name="quantity" value="{{ quantity }}" />
|
|
89
91
|
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
90
|
-
${
|
|
92
|
+
${r({builderProps:{...$,uid:$?.uid,uidInteraction:`${$?.uid}-row`},style:y,styles:h,setting:j,children:_,rawChildren:b})}
|
|
91
93
|
{%- endform -%}
|
|
92
94
|
</product-form>
|
|
93
95
|
</gp-product>
|
|
94
96
|
{%- assign product = gpBkProduct -%}
|
|
95
97
|
`;return t`
|
|
96
|
-
${
|
|
97
|
-
${a("product != empty and product != null",
|
|
98
|
-
${e(i,`<script ${
|
|
98
|
+
${B()}
|
|
99
|
+
${a("product != empty and product != null",O(),H())}
|
|
100
|
+
${e(i,`<script ${c('class="gps-link" delay',"src")}="{{ 'gp-product-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${c('class="gps-link" delay',"src")}="${o}/assets-v2/gp-product-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
99
101
|
`};export{Product as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{formatMoney as
|
|
1
|
+
import{convertDecimalToNumber as t,formatMoney as e}from"@gem-sdk/core";import{DiscountType as n}from"../components/constants/product-bundle.js";let noDiscount=t=>({discountPercentAmount:0,discountAmount:e("0",t)}),applyBundleDiscountAmount=o=>{let{currentVariant:u,bundleItem:c,options:r}=o;if(!r?.useProductCompareAtPrice&&c?.discountType===n.NoDiscount||!c||!u?.price)return noDiscount(r?.moneyFormat||"${{amount}}");let i=t(u?.price)??0,a=t(u?.salePrice)??i,m=Number(c?.quantity),s=calculateBundleFixedDiscount(i,c),d=discountPercentAmount(s,m*i),l=i*m-s,p=a*m;return a<=i&&s<=0?noDiscount(r?.moneyFormat||"${{amount}}"):{discountPercentAmount:r?.useProductCompareAtPrice?calculateDiffPercentPrice(l,p):d,discountAmount:r?.useProductCompareAtPrice?calculateDiffFixedPrice(l,p,r?.moneyFormat):e(s.toString(),r?.moneyFormat)}},calculateDiffPercentPrice=(t,e)=>{let n=(e-t)/e*100;return Math.round(n)},calculateDiffFixedPrice=(t,n,o)=>e((n-t).toString(),o),calculateBundleFixedDiscount=(t,e)=>{let o=parseInt(e?.discountValue);return e?.discountType===n.Percentage?t*e.quantity*o/100:e?.discountType===n.FixedAmount?o:0},discountPercentAmount=(t,e)=>Math.round(t/e*100);export{applyBundleDiscountAmount};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import e from"../../configs/BonLoyaltyRewardsReferrals.js";import l from"./uiV1.js";import a from"./uiV2.js";import{get3rdPartyInstallLink as t}from"../../common/helpers.js";let config={tag:e.tag,label:e.label,icon:'<img class="gp-w-[24px] gp-border gp-border-[#494949] gp-rounded-[3px]" src="https://cdn.shopify.com/app-store/listing_images/f367f56199c88dba9296f532dfc5b383/icon/CLS4vPSugoUDEAE=.jpeg?width=22&height=22">',editorConfigs:{component:{isThirdParty:!0}},presets:[{id:e.id,name:{en: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="https://cdn.shopify.com/app-store/listing_images/f367f56199c88dba9296f532dfc5b383/icon/CLS4vPSugoUDEAE=.jpeg?width=22&height=22">
|
|
3
3
|
<span class="preset-item-title">BON: Loyalty Rewards Referrals</span>
|
|
4
|
-
</div>`},components:[{tag:e.tag}]}],settings:[{id:"setting",controls:[{id:"appBlockId",type:"input",default:""},{id:"widgetType",label:"Choose widget",type:"select",options:[{label:"Loyalty Page Block",value:"loyalty-page-block"},{label:"Loyalty Page Earning Block",value:"loyalty-page-earning-block"},{label:"Loyalty Page Header Block",value:"loyalty-page-header-block"},{label:"Loyalty Page Profile Block",value:"loyalty-page-profile-block"},{label:"Loyalty Page Redeem Block",value:"loyalty-page-redeem-block"},{label:"Loyalty Page Referral Block",value:"loyalty-page-referral-block"},{label:"Loyalty Page Tier Block",value:"loyalty-page-tier-block"},{label:"Product Point Review",value:"product-point-preview"},{label:"Point On Product Page",value:"product-point-preview"}],default:"loyalty-page-block"},{id:"install",type:"open-link",target:"_blank",linkType:"install",href:t({handle:"bon-loyalty-rewards-referrals"}),appName:e.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/bon-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:l,uiV2:a};export{config as default};
|
|
4
|
+
</div>`},components:[{tag:e.tag}]}],settings:[{id:"setting",controls:[{id:"appBlockId",type:"input",default:""},{id:"widgetType",label:"Choose widget",type:"select",options:[{label:"Loyalty Page Block",value:"loyalty-page-block"},{label:"Loyalty Page Earning Block",value:"loyalty-page-earning-block"},{label:"Loyalty Page Header Block",value:"loyalty-page-header-block"},{label:"Loyalty Page Profile Block",value:"loyalty-page-profile-block"},{label:"Loyalty Page Redeem Block",value:"loyalty-page-redeem-block"},{label:"Loyalty Page Referral Block",value:"loyalty-page-referral-block"},{label:"Loyalty Page Tier Block",value:"loyalty-page-tier-block"},{label:"Product Point Review",value:"product-point-preview"},{label:"Point On Product Page",value:"product-point-preview"},{label:"Ways to redeem points",value:"bloy-loyalty-ways-redeem"}],default:"loyalty-page-block"},{id:"install",type:"open-link",target:"_blank",linkType:"install",href:t({handle:"bon-loyalty-rewards-referrals"}),appName:e.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/bon-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:l,uiV2:a};export{config as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-dev.19",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "
|
|
30
|
-
"@gem-sdk/styles": "7.0.
|
|
31
|
-
"@gem-sdk/system": "7.0.
|
|
29
|
+
"@gem-sdk/core": "8.0.0-dev.19",
|
|
30
|
+
"@gem-sdk/styles": "7.0.1-dev.6",
|
|
31
|
+
"@gem-sdk/system": "7.0.1-dev.6",
|
|
32
32
|
"@types/react-transition-group": "^4.4.12",
|
|
33
33
|
"tsup": "^8.5.0",
|
|
34
34
|
"postcss-import": "^16.1.1",
|