@gem-sdk/components 6.0.2 → 6.0.5
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/common/classes.js +1 -1
- package/dist/cjs/countdown-timer/components/Countdown.js +1 -1
- package/dist/cjs/countdown-timer/components/Countdown.liquid.js +21 -30
- package/dist/cjs/third-party/components/Trustoo.liquid.js +5 -6
- package/dist/cjs/third-party/settings/Trustoo/index.js +1 -1
- package/dist/cjs/third-party/settings/Trustoo/uiV2.js +1 -1
- package/dist/esm/countdown-timer/common/classes.js +1 -1
- package/dist/esm/countdown-timer/components/Countdown.js +1 -1
- package/dist/esm/countdown-timer/components/Countdown.liquid.js +21 -30
- package/dist/esm/third-party/components/Trustoo.liquid.js +7 -8
- package/dist/esm/third-party/settings/Trustoo/index.js +1 -1
- package/dist/esm/third-party/settings/Trustoo/uiV2.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}const getContentClasses=()=>
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}const getContentClasses=({isLiquid:e,autoHideWhenTimeout:s})=>{let t="gp-flex gp-flex-wrap gp-w-max gp-relative ";return e&&s&&(t+=" !gp-hidden"),{...composeClasses(t)}},getWrapperClasses=e=>{let s="gp-flex";return e&&(s+=` ${e}`),{...composeClasses(s)}},getDateClasses=e=>{let s="gp-flex-1 gp-text-center gp-min-w-max !gp-max-w-max";return e||(s+=" gp-content-center"),{...composeClasses(s)}},getTextFrontClasses=e=>{let s="gp-countdown-number",{colorNumber:t}=e||{};return core.getGlobalColorClass("text",t)&&(s+=` ${core.getGlobalColorClass("text",t)}`),{...composeClasses(s)}},getTextBackClasses=(e,s)=>{let t="",{colorLabel:l}=e||{};return core.getGlobalColorClass("text",l)&&(t+=` ${core.getGlobalColorClass("text",l)}`),s||(t+=" gp-hidden"),{...composeClasses(t)}},getLinkClasses=()=>({...composeClasses("gp-absolute gp-inset-0 gp-z-1 gp-pointer-events-none")}),getTextExpireClasses=()=>({...composeClasses("gp-flex gp-h-12 gp-items-center gp-justify-center gp-bg-[#d6d6d6] gp-opacity-70")});exports.getContentClasses=getContentClasses,exports.getDateClasses=getDateClasses,exports.getLinkClasses=getLinkClasses,exports.getTextBackClasses=getTextBackClasses,exports.getTextExpireClasses=getTextExpireClasses,exports.getTextFrontClasses=getTextFrontClasses,exports.getWrapperClasses=getWrapperClasses;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),helpers=require("../common/helpers.js"),Text=require("../../text/components/Text.js"),core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),attrs=require("../common/attrs.js"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),useCountDownTimer=require("../hooks/useCountDownTimer.js");const Countdown=e=>{let{setting:s,styles:t,builderProps:l,advanced:a}=e,{labelTypo:r,numTypo:i,labelTypography:m,numTypography:n,enableLabelTextStyle:y}=t??{},{weekLabel:c,dayLabel:o,hourLabel:u,minuteLabel:d,secondLabel:x,enableWeek:j,enableDay:C,enableHour:g,enableMinute:p,enableSecond:h,redirectUrl:f}=s??{},
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),helpers=require("../common/helpers.js"),Text=require("../../text/components/Text.js"),core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),attrs=require("../common/attrs.js"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),useCountDownTimer=require("../hooks/useCountDownTimer.js");const Countdown=e=>{let{setting:s,styles:t,builderProps:l,advanced:a}=e,{labelTypo:r,numTypo:i,labelTypography:m,numTypography:n,enableLabelTextStyle:y}=t??{},{weekLabel:c,dayLabel:o,hourLabel:u,minuteLabel:d,secondLabel:x,enableWeek:j,enableDay:C,enableHour:g,enableMinute:p,enableSecond:h,redirectUrl:f,autoHideWhenTimeout:T}=s??{},q=core.useEditorMode(),{week:S,day:k,hour:R,minute:v,second:w,timeLeft:I,ref:N}=useCountDownTimer.default(s,l),b=!!f?.link&&"edit"!==q,D=system.createClass({...classes.getTextExpireClasses()});if(s?.autoHideWhenTimeout&&I<=0)return"edit"!==q?null:jsxRuntime.jsx("div",{className:D,children:jsxRuntime.jsx("span",{children:"Countdown is run out of time (this only visible in the editor)"})});let E=system.createAttr({...attrs.getAttr({uid:l?.uid||""})}),F=system.createStyle({...styles.getWrapperStyle(t)}),W=system.createClass({...classes.getWrapperClasses(a?.cssClass)}),A=system.createClass({...classes.getContentClasses({isLiquid:!1,autoHideWhenTimeout:T})}),B=system.createStyle({...styles.getContainStyle(t)}),L=system.createStyle({...styles.getDateStyle(t)}),M=e=>system.createClass({...classes.getDateClasses(e)}),_=system.createClass({...classes.getTextFrontClasses(t)}),H=system.createStyle({...styles.getTextFrontStyle(t)}),O=system.createStyle({...styles.getTextBackStyle(t)}),P=e=>system.createClass({...classes.getTextBackClasses(t,e)}),z=system.createClass({...classes.getLinkClasses()}),G=(e,s)=>{let t=helpers.formatTime(e);return jsxRuntime.jsxs("div",{style:L,className:M(s),children:[jsxRuntime.jsx(Text.default,{styles:{typography:n,typo:i},setting:{htmlTag:"div",text:t,excludeFlex:!0},className:_,style:H,disableEdit:!0}),system.If(!!y,jsxRuntime.jsx(Text.default,{styles:{typography:m,typo:r},setting:{text:s,htmlTag:"p",excludeFlex:!0},style:O,className:P(s),disableEdit:!0}))]})};return jsxRuntime.jsx("div",{ref:N,...E,className:W,style:F,children:jsxRuntime.jsxs("div",{className:A,style:B,children:[system.If(b,jsxRuntime.jsx("a",{href:f?.link,target:f?.target,"aria-label":"Countdown link",className:z,children:" "})),system.If(j,G(S,c)),system.If(C,G(k,o)),system.If(g,G(R,u)),system.If(p,G(v,d)),system.If(h,G(w,x))]})})};exports.default=Countdown;
|
|
@@ -1,39 +1,30 @@
|
|
|
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")
|
|
2
|
-
<div style="${
|
|
3
|
-
${Text_liquid.default({styles:{typography:
|
|
4
|
-
${system.If(!!
|
|
5
|
-
${Text_liquid.default({styles:{typography:o,typo:
|
|
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:a,advanced:r,pageContext:l}=e,{labelTypo:c,numTypo:i,numTypography:y,labelTypography:o,enableLabelTextStyle:d}=t??{},{weekLabel:n,dayLabel:u,hourLabel:m,minuteLabel:p,secondLabel:g,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,...a}),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:a?.uid||""})}),D=system.createAttr({...attrs.getAttrHref({uid:b.href||""})}),E=system.createStyle({...styles.getWrapperStyle(t)}),F=system.createClass({...classes.getWrapperClasses(r?.cssClass)}),N=system.createClass({...classes.getContentClasses({isLiquid:!0,autoHideWhenTimeout:q})}),O=system.createStyle({...styles.getContainStyle(t)}),R=(e,t,r)=>core.template`
|
|
2
|
+
<div style="${w}" class="${L(t)}">
|
|
3
|
+
${Text_liquid.default({styles:{typography:y,typo:i},setting:{...s,text:"00",excludeFlex:!0,translate:""},style:T,className:A,builderAttrs:{id:e},builderProps:{...a,uid:a?.uid,uidInteraction:`${a?.uid}-text`}})}
|
|
4
|
+
${system.If(!!d,core.template`
|
|
5
|
+
${Text_liquid.default({styles:{typography:o,typo:c},setting:{...s,text:t,excludeFlex:!0,translate:r},style:j,className:_(t),builderProps:{...a,uid:a?.uid,uidInteraction:`${a?.uid}-text`},pageContext:l})}
|
|
6
6
|
`)}
|
|
7
7
|
</div>
|
|
8
|
-
`,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<gp-countdown-timer
|
|
18
|
-
${{...L}}
|
|
19
|
-
${{..._}}
|
|
20
|
-
class="${P}"
|
|
21
|
-
style="${D}"
|
|
22
|
-
gp-data='${JSON.stringify(k).replaceAll("'","'")}'>
|
|
23
|
-
<div id="section-countdown" class="${W}" style="${F}">
|
|
24
|
-
${system.If(w,`<a
|
|
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
|
+
<gp-countdown-timer
|
|
10
|
+
${{...P}}
|
|
11
|
+
${{...D}}
|
|
12
|
+
class="${F}"
|
|
13
|
+
style="${E}"
|
|
14
|
+
gp-data='${JSON.stringify(v).replaceAll("'","'")}'>
|
|
15
|
+
<div id="section-countdown" class="${N}" style="${O}">
|
|
16
|
+
${system.If(I,`<a
|
|
25
17
|
href="${b.href}"
|
|
26
18
|
target="${b?.target}"
|
|
27
19
|
aria-label="Countdown link"
|
|
28
|
-
class="${
|
|
20
|
+
class="${B}"
|
|
29
21
|
> </a>`)}
|
|
30
|
-
${system.If($,
|
|
31
|
-
${system.If(f,
|
|
32
|
-
${system.If(
|
|
33
|
-
${system.If(C,
|
|
34
|
-
${system.If(
|
|
22
|
+
${system.If($,R("week",n,k?"weekLabel":""))}
|
|
23
|
+
${system.If(f,R("day",u,k?"dayLabel":""))}
|
|
24
|
+
${system.If(x,R("hour",m,k?"hourLabel":""))}
|
|
25
|
+
${system.If(C,R("minute",p,k?"minuteLabel":""))}
|
|
26
|
+
${system.If(S,R("second",g,k?"secondLabel":""))}
|
|
35
27
|
</div>
|
|
36
28
|
</gp-countdown-timer>
|
|
37
|
-
{
|
|
38
|
-
${R()}
|
|
29
|
+
${G()}
|
|
39
30
|
`};exports.default=Countdown;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers=require("../../helpers.js"),helpers$1=require("../common/helpers.js");const Trustoo=({setting:e,advanced:t})=>{let{widgetType:s,align:a,version:i,appBlockId:d}=e??{},r=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers=require("../../helpers.js"),helpers$1=require("../common/helpers.js");const Trustoo=({setting:e,advanced:t})=>{let{widgetType:s,align:a,version:i,appBlockId:d}=e??{},r={"review-widget":`
|
|
2
2
|
{% if request.page_type == "product" %}
|
|
3
3
|
<div style="display:block" id="seal-review-widget"></div>
|
|
4
4
|
{% else %}
|
|
5
|
-
<div style="display:block" class="custom-vstar-review-widget" data-product-id="
|
|
6
|
-
{
|
|
7
|
-
`,"star-rating-widget":'<div class="custom-vstar-rating-widget" data-product-id="{{product.id}}"></div>',"text-carousel":'<div id="trustoo-text-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>',"barrage-carousel":'<div id="trustoo-barrage-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>',"card-carousel":'<div id="trustoo-card-carousel-widget" style="display:block;max-width:1200px;margin:0 auto"></div>',"photo-carousel":'<div id="trustoo-photo-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>'},p=()=>"v2"===i?helpers$1.getLiquidForAppBlock(d,a,t?.cssClass):core.template`
|
|
5
|
+
<div style="display:block" class="custom-vstar-review-widget" data-product-id="{{ product.id }}" data-product-title="{{ product.title }}" data-product-image="{{ product.images[0] }}"></div> {% endif %}
|
|
6
|
+
`,"star-rating-widget":'<div class="custom-vstar-rating-widget" data-product-id="{{product.id}}"></div>',"text-carousel":'<div id="trustoo-text-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>',"barrage-carousel":'<div id="trustoo-barrage-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>',"card-carousel":'<div id="trustoo-card-carousel-widget" style="display:block;max-width:1200px;margin:0 auto"></div>',"photo-carousel":'<div id="trustoo-photo-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>'},l=()=>"v2"===i?helpers$1.getLiquidForAppBlock(d,a,t?.cssClass):core.template`
|
|
8
7
|
<div>
|
|
9
8
|
{% if '${s}' == 'starRatingInList' %}
|
|
10
9
|
{% if request.page_type != 'product' %}
|
|
@@ -27,12 +26,12 @@
|
|
|
27
26
|
{% endcase %}
|
|
28
27
|
{% endif %}
|
|
29
28
|
</div>
|
|
30
|
-
`;return i?
|
|
29
|
+
`;return i?l():core.template`
|
|
31
30
|
<div
|
|
32
31
|
class="${t?.cssClass}"
|
|
33
32
|
style="${{...core.makeStyleResponsive("ta",a)}}"
|
|
34
33
|
>
|
|
35
|
-
${s&&
|
|
34
|
+
${s&&r?.[s]}
|
|
36
35
|
<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="https://cdn.vstar.app/static/dist/js/swiper-reviews.min.js" defer="defer"></script>
|
|
37
36
|
<link ${helpers.getSettingPreloadData('class="gps-link" delay',"href")}="https://cdn.vstar.app/static/css/swiper-reviews.min.css" rel="stylesheet" type="text/css" media="all">
|
|
38
37
|
</div>
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
<img class="w-24 border border-dark-200 rounded-medium" src="${Trustoo.default.logoUrl}?width=22&height=22">
|
|
4
4
|
<span class="preset-item-title">${Trustoo.default.label}</span>
|
|
5
5
|
</div>
|
|
6
|
-
`},components:[{tag:Trustoo.default.tag,advanced:{editorData:{cssPlaceholder:".{{rootClassName}} {\n\n}\n\n.{{rootClassName}} #seal-star-rating-widget {\n margin-top: 0px;\n}"}}}]}],settings:[{id:"setting",controls:[{id:"appBlockId",type:"input",default:""},{id:"install",type:"open-link",target:"_blank",linkType:"install",href:helpers.get3rdPartyInstallLink({handle:"trustoo"}),appName:Trustoo.default.label},{id:"
|
|
6
|
+
`},components:[{tag:Trustoo.default.tag,advanced:{editorData:{cssPlaceholder:".{{rootClassName}} {\n\n}\n\n.{{rootClassName}} #seal-star-rating-widget {\n margin-top: 0px;\n}"}}}]}],settings:[{id:"setting",controls:[{id:"appBlockId",type:"input",default:""},{id:"install",type:"open-link",target:"_blank",linkType:"install",href:helpers.get3rdPartyInstallLink({handle:"trustoo"}),appName:Trustoo.default.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/sealapps-product-review",appName:Trustoo.default.label},{id:"widgetType",label:"Choose widget",type:"select",default:"star-rating-widget",disableDefault:!0,options:[{label:"Testimonials",value:"barrage-carousel"},{label:"Card Carousel",value:"card-carousel"},{label:"Photo Carousel",value:"photo-carousel"},{label:"Review Widget",value:"review-widget"},{label:"Star Rating Widget",value:"star-rating-widget"},{label:"Text Carousel",value:"text-carousel"}]},{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:uiV1.default,uiV2:uiV2.default};exports.default=config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const SettingUIV2=[{controls:[{setting:{id:"install"},layout:"vertical"}]},{controls:[{
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const SettingUIV2=[{controls:[{setting:{id:"install"},layout:"vertical"}]},{controls:[{label:{en:"Choose widget"},setting:{id:"widgetType"}}]},{controls:[{setting:{id:"openApp"},layout:"vertical"}]},{controls:[{label:{en:"Align"},setting:{id:"align"}}]}];exports.default=SettingUIV2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getGlobalColorClass as e}from"@gem-sdk/core";function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}let getContentClasses=()=>
|
|
1
|
+
import{getGlobalColorClass as e}from"@gem-sdk/core";function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}let getContentClasses=({isLiquid:e,autoHideWhenTimeout:s})=>{let t="gp-flex gp-flex-wrap gp-w-max gp-relative ";return e&&s&&(t+=" !gp-hidden"),{...composeClasses(t)}},getWrapperClasses=e=>{let s="gp-flex";return e&&(s+=` ${e}`),{...composeClasses(s)}},getDateClasses=e=>{let s="gp-flex-1 gp-text-center gp-min-w-max !gp-max-w-max";return e||(s+=" gp-content-center"),{...composeClasses(s)}},getTextFrontClasses=s=>{let t="gp-countdown-number",{colorNumber:p}=s||{};return e("text",p)&&(t+=` ${e("text",p)}`),{...composeClasses(t)}},getTextBackClasses=(s,t)=>{let p="",{colorLabel:g}=s||{};return e("text",g)&&(p+=` ${e("text",g)}`),t||(p+=" gp-hidden"),{...composeClasses(p)}},getLinkClasses=()=>({...composeClasses("gp-absolute gp-inset-0 gp-z-1 gp-pointer-events-none")}),getTextExpireClasses=()=>({...composeClasses("gp-flex gp-h-12 gp-items-center gp-justify-center gp-bg-[#d6d6d6] gp-opacity-70")});export{getContentClasses,getDateClasses,getLinkClasses,getTextBackClasses,getTextExpireClasses,getTextFrontClasses,getWrapperClasses};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{formatTime as s}from"../common/helpers.js";import o from"../../text/components/Text.js";import{useEditorMode as i}from"@gem-sdk/core";import{createClass as l,createAttr as r,createStyle as m,If as n}from"@gem-sdk/system";import{getAttr as a}from"../common/attrs.js";import{getTextExpireClasses as d,getWrapperClasses as c,getContentClasses as
|
|
2
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{formatTime as s}from"../common/helpers.js";import o from"../../text/components/Text.js";import{useEditorMode as i}from"@gem-sdk/core";import{createClass as l,createAttr as r,createStyle as m,If as n}from"@gem-sdk/system";import{getAttr as a}from"../common/attrs.js";import{getTextExpireClasses as d,getWrapperClasses as c,getContentClasses as u,getTextFrontClasses as p,getLinkClasses as h,getDateClasses as y,getTextBackClasses as f}from"../common/classes.js";import{getWrapperStyle as g,getContainStyle as x,getDateStyle as j,getTextFrontStyle as N,getTextBackStyle as k}from"../common/styles.js";import v from"../hooks/useCountDownTimer.js";let Countdown=C=>{let{setting:w,styles:T,builderProps:b,advanced:E}=C,{labelTypo:F,numTypo:q,labelTypography:D,numTypography:H,enableLabelTextStyle:L}=T??{},{weekLabel:W,dayLabel:z,hourLabel:A,minuteLabel:B,secondLabel:G,enableWeek:I,enableDay:J,enableHour:K,enableMinute:M,enableSecond:O,redirectUrl:P,autoHideWhenTimeout:Q}=w??{},R=i(),{week:S,day:U,hour:V,minute:X,second:Y,timeLeft:Z,ref:$}=v(w,b),_=!!P?.link&&"edit"!==R,ee=l({...d()});if(w?.autoHideWhenTimeout&&Z<=0)return"edit"!==R?null:e("div",{className:ee,children:e("span",{children:"Countdown is run out of time (this only visible in the editor)"})});let et=r({...a({uid:b?.uid||""})}),es=m({...g(T)}),eo=l({...c(E?.cssClass)}),ei=l({...u({isLiquid:!1,autoHideWhenTimeout:Q})}),el=m({...x(T)}),er=m({...j(T)}),em=e=>l({...y(e)}),en=l({...p(T)}),ea=m({...N(T)}),ed=m({...k(T)}),ec=e=>l({...f(T,e)}),eu=l({...h()}),ep=(i,l)=>{let r=s(i);return t("div",{style:er,className:em(l),children:[e(o,{styles:{typography:H,typo:q},setting:{htmlTag:"div",text:r,excludeFlex:!0},className:en,style:ea,disableEdit:!0}),n(!!L,e(o,{styles:{typography:D,typo:F},setting:{text:l,htmlTag:"p",excludeFlex:!0},style:ed,className:ec(l),disableEdit:!0}))]})};return e("div",{ref:$,...et,className:eo,style:es,children:t("div",{className:ei,style:el,children:[n(_,e("a",{href:P?.link,target:P?.target,"aria-label":"Countdown link",className:eu,children:" "})),n(I,ep(S,W)),n(J,ep(U,z)),n(K,ep(V,A)),n(M,ep(X,B)),n(O,ep(Y,G))]})})};export{Countdown as default};
|
|
@@ -1,39 +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 r}from"@gem-sdk/core";import o from"../../text/components/Text.liquid.js";import{getInsertLinkData as i,getSettingPreloadData as l}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 y,getTextBackStyle as f,getWrapperStyle as g,getContainStyle as x}from"../common/styles.js";import{getTextFrontClasses as w,getWrapperClasses as b,getContentClasses as h,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}=i("",H),X=d({...S,...C}),Y=a({...$(A)}),Z=e=>n({...v(e)}),ee=n({...w(A)}),et=a({...y(A)}),es=a({...f(A)}),er=e=>n({...j(A,e)}),eo=c({...m({uid:C?.uid||""})}),ei=c({...p({uid:W.href||""})}),el=a({...g(A)}),ed=n({...b(E?.cssClass)}),ea=n({...h({isLiquid:!0,autoHideWhenTimeout:Q})}),en=a({...x(A)}),ec=(t,s,r)=>e`
|
|
2
|
+
<div style="${Y}" class="${Z(s)}">
|
|
3
|
+
${o({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
|
+
${o({styles:{typography:F,typo:I},setting:{...S,text:s,excludeFlex:!0,translate:r},style:es,className:er(s),builderProps:{...C,uid:C?.uid,uidInteraction:`${C?.uid}-text`},pageContext:N})}
|
|
6
6
|
`)}
|
|
7
7
|
</div>
|
|
8
|
-
`,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
assign typeCountdown = "${C?.behaviour.toString()||""}"
|
|
12
|
-
assign autoHideWhenTimeout = ${!!C?.autoHideWhenTimeout}
|
|
13
|
-
assign current_time = 'now' | date: '%s' | times: 1000
|
|
14
|
-
|
|
15
|
-
-%}
|
|
16
|
-
{% if standardEndDate == nil or current_time <= standardEndDate or typeCountdown != "standard" or autoHideWhenTimeout != true %}
|
|
17
|
-
<gp-countdown-timer
|
|
18
|
-
${{...er}}
|
|
8
|
+
`,eu=n({...k()}),em=()=>t(s,`<script ${l('class="gps-link" delay',"src")}="{{ 'gp-countdown-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${l('class="gps-link" delay',"src")}="${r}/assets-v2/gp-countdown-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return e`
|
|
9
|
+
<gp-countdown-timer
|
|
10
|
+
${{...eo}}
|
|
19
11
|
${{...ei}}
|
|
20
12
|
class="${ed}"
|
|
21
|
-
style="${
|
|
22
|
-
gp-data='${JSON.stringify(
|
|
23
|
-
<div id="section-countdown" class="${
|
|
24
|
-
${
|
|
25
|
-
href="${
|
|
26
|
-
target="${
|
|
13
|
+
style="${el}"
|
|
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}"
|
|
27
19
|
aria-label="Countdown link"
|
|
28
|
-
class="${
|
|
20
|
+
class="${eu}"
|
|
29
21
|
> </a>`)}
|
|
30
|
-
${
|
|
31
|
-
${
|
|
32
|
-
${
|
|
33
|
-
${
|
|
34
|
-
${
|
|
22
|
+
${u(R,ec("week",O,K?"weekLabel":""))}
|
|
23
|
+
${u(V,ec("day",T,K?"dayLabel":""))}
|
|
24
|
+
${u(z,ec("hour",_,K?"hourLabel":""))}
|
|
25
|
+
${u(B,ec("minute",J,K?"minuteLabel":""))}
|
|
26
|
+
${u(D,ec("second",M,K?"secondLabel":""))}
|
|
35
27
|
</div>
|
|
36
28
|
</gp-countdown-timer>
|
|
37
|
-
{
|
|
38
|
-
${ep()}
|
|
29
|
+
${em()}
|
|
39
30
|
`};export{Countdown as default};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import{template as
|
|
1
|
+
import{template as s,makeStyleResponsive as t}from"@gem-sdk/core";import{getSettingPreloadData as e}from"../../helpers.js";import{getLiquidForAppBlock as i}from"../common/helpers.js";let Trustoo=({setting:a,advanced:d})=>{let{widgetType:r,align:o,version:l,appBlockId:c}=a??{},p={"review-widget":`
|
|
2
2
|
{% if request.page_type == "product" %}
|
|
3
3
|
<div style="display:block" id="seal-review-widget"></div>
|
|
4
4
|
{% else %}
|
|
5
|
-
<div style="display:block" class="custom-vstar-review-widget" data-product-id="
|
|
6
|
-
{
|
|
7
|
-
`,"star-rating-widget":'<div class="custom-vstar-rating-widget" data-product-id="{{product.id}}"></div>',"text-carousel":'<div id="trustoo-text-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>',"barrage-carousel":'<div id="trustoo-barrage-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>',"card-carousel":'<div id="trustoo-card-carousel-widget" style="display:block;max-width:1200px;margin:0 auto"></div>',"photo-carousel":'<div id="trustoo-photo-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>'},v=()=>"v2"===c?i(l,o,a?.cssClass):t`
|
|
5
|
+
<div style="display:block" class="custom-vstar-review-widget" data-product-id="{{ product.id }}" data-product-title="{{ product.title }}" data-product-image="{{ product.images[0] }}"></div> {% endif %}
|
|
6
|
+
`,"star-rating-widget":'<div class="custom-vstar-rating-widget" data-product-id="{{product.id}}"></div>',"text-carousel":'<div id="trustoo-text-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>',"barrage-carousel":'<div id="trustoo-barrage-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>',"card-carousel":'<div id="trustoo-card-carousel-widget" style="display:block;max-width:1200px;margin:0 auto"></div>',"photo-carousel":'<div id="trustoo-photo-carousel" style="display:block;max-width:1200px;margin:0 auto" data-type="block"></div>'},n=()=>"v2"===l?i(c,o,d?.cssClass):s`
|
|
8
7
|
<div>
|
|
9
8
|
{% if '${r}' == 'starRatingInList' %}
|
|
10
9
|
{% if request.page_type != 'product' %}
|
|
@@ -27,12 +26,12 @@ import{template as t,makeStyleResponsive as s}from"@gem-sdk/core";import{getSett
|
|
|
27
26
|
{% endcase %}
|
|
28
27
|
{% endif %}
|
|
29
28
|
</div>
|
|
30
|
-
`;return
|
|
29
|
+
`;return l?n():s`
|
|
31
30
|
<div
|
|
32
|
-
class="${
|
|
33
|
-
style="${{...
|
|
31
|
+
class="${d?.cssClass}"
|
|
32
|
+
style="${{...t("ta",o)}}"
|
|
34
33
|
>
|
|
35
|
-
${r&&
|
|
34
|
+
${r&&p?.[r]}
|
|
36
35
|
<script ${e('class="gps-link" delay',"src")}="https://cdn.vstar.app/static/dist/js/swiper-reviews.min.js" defer="defer"></script>
|
|
37
36
|
<link ${e('class="gps-link" delay',"href")}="https://cdn.vstar.app/static/css/swiper-reviews.min.css" rel="stylesheet" type="text/css" media="all">
|
|
38
37
|
</div>
|
|
@@ -3,4 +3,4 @@ import e from"../../configs/Trustoo.js";import t from"./uiV1.js";import l from".
|
|
|
3
3
|
<img class="w-24 border border-dark-200 rounded-medium" src="${e.logoUrl}?width=22&height=22">
|
|
4
4
|
<span class="preset-item-title">${e.label}</span>
|
|
5
5
|
</div>
|
|
6
|
-
`},components:[{tag:e.tag,advanced:{editorData:{cssPlaceholder:".{{rootClassName}} {\n\n}\n\n.{{rootClassName}} #seal-star-rating-widget {\n margin-top: 0px;\n}"}}}]}],settings:[{id:"setting",controls:[{id:"appBlockId",type:"input",default:""},{id:"install",type:"open-link",target:"_blank",linkType:"install",href:a({handle:"trustoo"}),appName:e.label},{id:"
|
|
6
|
+
`},components:[{tag:e.tag,advanced:{editorData:{cssPlaceholder:".{{rootClassName}} {\n\n}\n\n.{{rootClassName}} #seal-star-rating-widget {\n margin-top: 0px;\n}"}}}]}],settings:[{id:"setting",controls:[{id:"appBlockId",type:"input",default:""},{id:"install",type:"open-link",target:"_blank",linkType:"install",href:a({handle:"trustoo"}),appName:e.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/sealapps-product-review",appName:e.label},{id:"widgetType",label:"Choose widget",type:"select",default:"star-rating-widget",disableDefault:!0,options:[{label:"Testimonials",value:"barrage-carousel"},{label:"Card Carousel",value:"card-carousel"},{label:"Photo Carousel",value:"photo-carousel"},{label:"Review Widget",value:"review-widget"},{label:"Star Rating Widget",value:"star-rating-widget"},{label:"Text Carousel",value:"text-carousel"}]},{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:t,uiV2:l};export{config as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{controls:[{setting:{id:"install"},layout:"vertical"}]},{controls:[{
|
|
1
|
+
let SettingUIV2=[{controls:[{setting:{id:"install"},layout:"vertical"}]},{controls:[{label:{en:"Choose widget"},setting:{id:"widgetType"}}]},{controls:[{setting:{id:"openApp"},layout:"vertical"}]},{controls:[{label:{en:"Align"},setting:{id:"align"}}]}];export{SettingUIV2 as default};
|