@gem-sdk/components 8.0.0-dev.66 → 8.0.0-dev.68
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/countdown-timer/components/Countdown.liquid.js +11 -11
- package/dist/cjs/post-purchase/product/settings/product-discount-tag/configs/setting-v2.js +1 -1
- package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.liquid.js +1 -1
- package/dist/esm/countdown-timer/components/Countdown.liquid.js +21 -21
- package/dist/esm/post-purchase/product/settings/product-discount-tag/configs/setting-v2.js +1 -1
- package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.liquid.js +1 -1
- package/package.json +1 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),Text_liquid=require("../../text/components/Text.liquid.js"),helpers=require("../../helpers.js"),system=require("@gem-sdk/system"),attrs=require("../common/attrs.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),Text_liquid=require("../../text/components/Text.liquid.js"),helpers=require("../../helpers.js"),system=require("@gem-sdk/system"),attrs=require("../common/attrs.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js");const Countdown=e=>{let{setting:s,styles:t,builderProps:l,advanced:a,pageContext:r}=e,{labelTypo:c,numTypo:i,numTypography:n,labelTypography:y,enableLabelTextStyle:o}=t??{},{weekLabel:d,dayLabel:u,hourLabel:m,minuteLabel:g,secondLabel:p,enableWeek:$,enableDay:f,enableHour:x,enableMinute:C,enableSecond:S,redirectUrl:h,translate:k,autoHideWhenTimeout:q}=s??{},I=!!h?.link,{urlData:b}=helpers.getInsertLinkData("",h),v=system.createStateOrContext({...s,...l}),w=system.createStyle({...styles.getDateStyle(t)}),L=e=>system.createClass({...classes.getDateClasses(e)}),A=system.createClass({...classes.getTextFrontClasses(t)}),T=system.createStyle({...styles.getTextFrontStyle(t)}),j=system.createStyle({...styles.getTextBackStyle(t)}),_=e=>system.createClass({...classes.getTextBackClasses(t,e)}),P=system.createAttr({...attrs.getAttr({uid:l?.uid||""})}),D=system.createAttr({...attrs.getAttrHref({uid:b.href||""})}),E=system.createStyle({...styles.getWrapperStyle(t)}),F=system.createClass({...classes.getWrapperClasses(a?.cssClass)}),N=system.createClass({...classes.getContentClasses({isLiquid:!0,autoHideWhenTimeout:q})}),O=system.createStyle({...styles.getContainStyle(t)}),R=(e,t,a)=>core.template`
|
|
2
2
|
<div style="${w}" class="${L(t)}">
|
|
3
|
-
${Text_liquid.default({styles:{typography:
|
|
4
|
-
${system.If(!!
|
|
5
|
-
${Text_liquid.default({styles:{typography:y,typo:c},setting:{...s,text:t,excludeFlex:!0,translate:
|
|
3
|
+
${Text_liquid.default({styles:{typography:n,typo:i},setting:{...s,text:"00",excludeFlex:!0,translate:""},style:T,className:A,builderAttrs:{id:e},builderProps:{...l,uid:l?.uid,uidInteraction:`${l?.uid}-text`}})}
|
|
4
|
+
${system.If(!!o,core.template`
|
|
5
|
+
${Text_liquid.default({styles:{typography:y,typo:c},setting:{...s,text:t,excludeFlex:!0,translate:a},style:j,className:_(t),builderProps:{...l,uid:l?.uid,uidInteraction:`${l?.uid}-text`},pageContext:r})}
|
|
6
6
|
`)}
|
|
7
7
|
</div>
|
|
8
8
|
`,B=system.createClass({...classes.getLinkClasses()}),G=()=>core.RenderIf(core.isLocalEnv,`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-countdown-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="${core.baseAssetURL}/assets-v2/gp-countdown-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return core.template`
|
|
9
9
|
<gp-countdown-timer
|
|
10
10
|
${{...P}}
|
|
11
11
|
${{...D}}
|
|
12
|
-
class="${
|
|
12
|
+
class="${F}"
|
|
13
13
|
style="${E}"
|
|
14
14
|
gp-data='${JSON.stringify(v).replaceAll("'","'")}'>
|
|
15
|
-
<div id="section-countdown" class="${
|
|
15
|
+
<div id="section-countdown" class="${N}" style="${O}">
|
|
16
16
|
${system.If(I,`<a
|
|
17
17
|
href="${b.href}"
|
|
18
18
|
target="${b?.target}"
|
|
19
19
|
aria-label="Countdown link"
|
|
20
20
|
class="${B}"
|
|
21
21
|
> </a>`)}
|
|
22
|
-
${system.If($,
|
|
23
|
-
${system.If(f,
|
|
24
|
-
${system.If(x,
|
|
25
|
-
${system.If(C,
|
|
26
|
-
${system.If(S,
|
|
22
|
+
${system.If($,R("week",d,k?.length?"weekLabel":""))}
|
|
23
|
+
${system.If(f,R("day",u,k?.length?"dayLabel":""))}
|
|
24
|
+
${system.If(x,R("hour",m,k?.length?"hourLabel":""))}
|
|
25
|
+
${system.If(C,R("minute",g,k?.length?"minuteLabel":""))}
|
|
26
|
+
${system.If(S,R("second",p,k?.length?"secondLabel":""))}
|
|
27
27
|
</div>
|
|
28
28
|
</gp-countdown-timer>
|
|
29
29
|
${G()}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const settingV2=[{id:"setting",controls:[{id:"discountAndShippingFee",type:"discount-and-shipping-fee-product-offer",multiple:!1},{id:"message",label:"",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"(Save {
|
|
1
|
+
"use strict";const settingV2=[{id:"setting",controls:[{id:"discountAndShippingFee",type:"discount-and-shipping-fee-product-offer",multiple:!1},{id:"message",label:"",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"(Save {Offer_discount})",suggestContents:[{message:"{Offer_discount}",eg:"E.g: 50%"},{message:"{Shopify_percent_discount}",eg:"E.g: 20%"},{message:"{Shopify_amount_discount}",eg:"E.g: $400.00"}]}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"critical",fontWeight:"bold",textTransform:"none"}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"}]}];exports.settingV2=settingV2;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
>
|
|
22
22
|
<div class="${y}" style="${u}">
|
|
23
23
|
<div class="${g}" style="${o}">
|
|
24
|
-
${Text_liquid.default({styles:s,id:`p-tag-${t?.uid}`,setting:{...e,translate:
|
|
24
|
+
${Text_liquid.default({styles:s,id:`p-tag-${t?.uid}`,setting:{...e,translate:"",text:"{{ pricePercentage }}",excludeFlex:!0}})}
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as
|
|
2
|
-
<div style="${
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
${
|
|
1
|
+
import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as l}from"@gem-sdk/core";import r from"../../text/components/Text.liquid.js";import{getInsertLinkData as o,getSettingPreloadData as i}from"../../helpers.js";import{createStateOrContext as d,createStyle as a,createClass as n,createAttr as c,If as u}from"@gem-sdk/system";import{getAttr as m,getAttrHref as p}from"../common/attrs.js";import{getDateStyle as $,getTextFrontStyle as g,getTextBackStyle as y,getWrapperStyle as f,getContainStyle as h}from"../common/styles.js";import{getTextFrontClasses as x,getWrapperClasses as w,getContentClasses as b,getLinkClasses as k,getDateClasses as v,getTextBackClasses as j}from"../common/classes.js";let Countdown=L=>{let{setting:S,styles:A,builderProps:C,advanced:E,pageContext:N}=L,{labelTypo:I,numTypo:P,numTypography:q,labelTypography:F,enableLabelTextStyle:G}=A??{},{weekLabel:O,dayLabel:T,hourLabel:_,minuteLabel:J,secondLabel:M,enableWeek:R,enableDay:V,enableHour:z,enableMinute:B,enableSecond:D,redirectUrl:H,translate:K,autoHideWhenTimeout:Q}=S??{},U=!!H?.link,{urlData:W}=o("",H),X=d({...S,...C}),Y=a({...$(A)}),Z=e=>n({...v(e)}),ee=n({...x(A)}),et=a({...g(A)}),es=a({...y(A)}),el=e=>n({...j(A,e)}),er=c({...m({uid:C?.uid||""})}),eo=c({...p({uid:W.href||""})}),ei=a({...f(A)}),ed=n({...w(E?.cssClass)}),ea=n({...b({isLiquid:!0,autoHideWhenTimeout:Q})}),en=a({...h(A)}),ec=(t,s,l)=>e`
|
|
2
|
+
<div style="${Y}" class="${Z(s)}">
|
|
3
|
+
${r({styles:{typography:q,typo:P},setting:{...S,text:"00",excludeFlex:!0,translate:""},style:et,className:ee,builderAttrs:{id:t},builderProps:{...C,uid:C?.uid,uidInteraction:`${C?.uid}-text`}})}
|
|
4
|
+
${u(!!G,e`
|
|
5
|
+
${r({styles:{typography:F,typo:I},setting:{...S,text:s,excludeFlex:!0,translate:l},style:es,className:el(s),builderProps:{...C,uid:C?.uid,uidInteraction:`${C?.uid}-text`},pageContext:N})}
|
|
6
6
|
`)}
|
|
7
7
|
</div>
|
|
8
|
-
`,
|
|
8
|
+
`,eu=n({...k()}),em=()=>t(s,`<script ${i('class="gps-link" delay',"src")}="{{ 'gp-countdown-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${i('class="gps-link" delay',"src")}="${l}/assets-v2/gp-countdown-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return e`
|
|
9
9
|
<gp-countdown-timer
|
|
10
|
-
${{...
|
|
11
|
-
${{...
|
|
10
|
+
${{...er}}
|
|
11
|
+
${{...eo}}
|
|
12
12
|
class="${ed}"
|
|
13
|
-
style="${
|
|
14
|
-
gp-data='${JSON.stringify(
|
|
15
|
-
<div id="section-countdown" class="${
|
|
16
|
-
${
|
|
17
|
-
href="${
|
|
18
|
-
target="${
|
|
13
|
+
style="${ei}"
|
|
14
|
+
gp-data='${JSON.stringify(X).replaceAll("'","'")}'>
|
|
15
|
+
<div id="section-countdown" class="${ea}" style="${en}">
|
|
16
|
+
${u(U,`<a
|
|
17
|
+
href="${W.href}"
|
|
18
|
+
target="${W?.target}"
|
|
19
19
|
aria-label="Countdown link"
|
|
20
|
-
class="${
|
|
20
|
+
class="${eu}"
|
|
21
21
|
> </a>`)}
|
|
22
|
-
${
|
|
23
|
-
${
|
|
24
|
-
${
|
|
25
|
-
${
|
|
26
|
-
${
|
|
22
|
+
${u(R,ec("week",O,K?.length?"weekLabel":""))}
|
|
23
|
+
${u(V,ec("day",T,K?.length?"dayLabel":""))}
|
|
24
|
+
${u(z,ec("hour",_,K?.length?"hourLabel":""))}
|
|
25
|
+
${u(B,ec("minute",J,K?.length?"minuteLabel":""))}
|
|
26
|
+
${u(D,ec("second",M,K?.length?"secondLabel":""))}
|
|
27
27
|
</div>
|
|
28
28
|
</gp-countdown-timer>
|
|
29
|
-
${
|
|
29
|
+
${em()}
|
|
30
30
|
`};export{Countdown as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let settingV2=[{id:"setting",controls:[{id:"discountAndShippingFee",type:"discount-and-shipping-fee-product-offer",multiple:!1},{id:"message",label:"",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"(Save {
|
|
1
|
+
let settingV2=[{id:"setting",controls:[{id:"discountAndShippingFee",type:"discount-and-shipping-fee-product-offer",multiple:!1},{id:"message",label:"",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"(Save {Offer_discount})",suggestContents:[{message:"{Offer_discount}",eg:"E.g: 50%"},{message:"{Shopify_percent_discount}",eg:"E.g: 20%"},{message:"{Shopify_amount_discount}",eg:"E.g: $400.00"}]}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"critical",fontWeight:"bold",textTransform:"none"}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"}]}];export{settingV2};
|
|
@@ -21,7 +21,7 @@ import{template as e,isLocalEnv as i,baseAssetURL as a}from"@gem-sdk/core";impor
|
|
|
21
21
|
>
|
|
22
22
|
<div class="${F}" style="${C}">
|
|
23
23
|
<div class="${E}" style="${w}">
|
|
24
|
-
${p({styles:y,id:`p-tag-${x?.uid}`,setting:{...$,translate:
|
|
24
|
+
${p({styles:y,id:`p-tag-${x?.uid}`,setting:{...$,translate:"",text:"{{ pricePercentage }}",excludeFlex:!0}})}
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
27
|
|