@gem-sdk/components 8.0.0-dev.20 → 8.0.0-dev.21
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/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/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,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-reviews"}),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-reviews"}),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,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-reviews"}),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-reviews"}),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};
|