@gem-sdk/components 8.0.0-dev.125 → 8.0.0-dev.126
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 +7 -5
- 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 +9 -7
- package/dist/esm/third-party/settings/Trustoo/index.js +2 -2
- package/dist/esm/third-party/settings/Trustoo/uiV2.js +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,11 @@
|
|
|
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:
|
|
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:d,appBlockId:i,productSetting:r}=e??{},l={"review-widget":`
|
|
2
2
|
{% if request.page_type == "product" %}
|
|
3
3
|
<div style="display:block" id="seal-review-widget"></div>
|
|
4
4
|
{% else %}
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
{% assign productSelected = product | default: all_products['${r?.productHandle}'] %}
|
|
6
|
+
<div style="display:block" class="custom-vstar-review-widget" data-product-id="{{ productSelected.id }}" data-product-title="{{ productSelected.title }}" data-product-image="{{ productSelected.images[0] }}"></div>
|
|
7
|
+
{% endif %}
|
|
8
|
+
`,"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>'},c=()=>"v2"===d?helpers$1.getLiquidForAppBlock(i,a,t?.cssClass):core.template`
|
|
7
9
|
<div>
|
|
8
10
|
{% if '${s}' == 'starRatingInList' %}
|
|
9
11
|
{% if request.page_type != 'product' %}
|
|
@@ -26,12 +28,12 @@
|
|
|
26
28
|
{% endcase %}
|
|
27
29
|
{% endif %}
|
|
28
30
|
</div>
|
|
29
|
-
`;return
|
|
31
|
+
`;return d?c():core.template`
|
|
30
32
|
<div
|
|
31
33
|
class="${t?.cssClass}"
|
|
32
34
|
style="${{...core.makeStyleResponsive("ta",a)}}"
|
|
33
35
|
>
|
|
34
|
-
${s&&
|
|
36
|
+
${s&&l?.[s]}
|
|
35
37
|
<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="https://cdn.vstar.app/static/dist/js/swiper-reviews.min.js" defer="defer"></script>
|
|
36
38
|
<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">
|
|
37
39
|
</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:"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:[],uiV2:uiV2.default};exports.default=config;
|
|
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:"productSetting",type:"product",label:"Product source"},{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:[],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:[{label:{en:"Choose widget"},setting:{id:"widgetType"}}]},{controls:[{setting:{id:"openApp"},layout:"vertical"}]},{controls:[{label:{en:"Align"},setting:{id:"align"}}]}];exports.default=SettingUIV2;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const SettingUIV2=[{controls:[{label:{en:"Product source"},controlConfig:{id:"gp-to-product",type:"product-source"},conditionDisplay:'pageType != "GP_PRODUCT" && widgetType === "review-widget"',layout:"vertical",options:{onlyShowInTags:["Product"],labelVariant:"primary"}}]},{controls:[{label:{en:"Product source"},setting:{id:"productSetting"},conditionDisplay:'pageType != "GP_PRODUCT" && widgetType === "review-widget"',layout:"vertical",options:{notShowInTags:["Product"]}}]},{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,9 +1,11 @@
|
|
|
1
|
-
import{template as s,makeStyleResponsive as t}from"@gem-sdk/core";import{getSettingPreloadData as e}from"../../helpers.js";import{getLiquidForAppBlock as
|
|
1
|
+
import{template as s,makeStyleResponsive as t}from"@gem-sdk/core";import{getSettingPreloadData as e}from"../../helpers.js";import{getLiquidForAppBlock as d}from"../common/helpers.js";let Trustoo=({setting:a,advanced:i})=>{let{widgetType:r,align:l,version:c,appBlockId:o,productSetting:p}=a??{},n={"review-widget":`
|
|
2
2
|
{% if request.page_type == "product" %}
|
|
3
3
|
<div style="display:block" id="seal-review-widget"></div>
|
|
4
4
|
{% else %}
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
{% assign productSelected = product | default: all_products['${p?.productHandle}'] %}
|
|
6
|
+
<div style="display:block" class="custom-vstar-review-widget" data-product-id="{{ productSelected.id }}" data-product-title="{{ productSelected.title }}" data-product-image="{{ productSelected.images[0] }}"></div>
|
|
7
|
+
{% endif %}
|
|
8
|
+
`,"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>'},u=()=>"v2"===c?d(o,l,i?.cssClass):s`
|
|
7
9
|
<div>
|
|
8
10
|
{% if '${r}' == 'starRatingInList' %}
|
|
9
11
|
{% if request.page_type != 'product' %}
|
|
@@ -26,12 +28,12 @@ import{template as s,makeStyleResponsive as t}from"@gem-sdk/core";import{getSett
|
|
|
26
28
|
{% endcase %}
|
|
27
29
|
{% endif %}
|
|
28
30
|
</div>
|
|
29
|
-
`;return
|
|
31
|
+
`;return c?u():s`
|
|
30
32
|
<div
|
|
31
|
-
class="${
|
|
32
|
-
style="${{...t("ta",
|
|
33
|
+
class="${i?.cssClass}"
|
|
34
|
+
style="${{...t("ta",l)}}"
|
|
33
35
|
>
|
|
34
|
-
${r&&
|
|
36
|
+
${r&&n?.[r]}
|
|
35
37
|
<script ${e('class="gps-link" delay',"src")}="https://cdn.vstar.app/static/dist/js/swiper-reviews.min.js" defer="defer"></script>
|
|
36
38
|
<link ${e('class="gps-link" delay',"href")}="https://cdn.vstar.app/static/css/swiper-reviews.min.css" rel="stylesheet" type="text/css" media="all">
|
|
37
39
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import e from"../../configs/Trustoo.js";import
|
|
1
|
+
import e from"../../configs/Trustoo.js";import t from"./uiV2.js";import{get3rdPartyInstallLink as l}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="${e.logoUrl}?width=22&height=22">`,editorConfigs:{component:{isThirdParty:!0}},presets:[{id:e.id,name:{en:e.label},hideTextContent:!0,icon:{desktop:`
|
|
2
2
|
<div class="w-full flex flex-col items-center">
|
|
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:
|
|
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:"productSetting",type:"product",label:"Product source"},{id:"appBlockId",type:"input",default:""},{id:"install",type:"open-link",target:"_blank",linkType:"install",href:l({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:[],uiV2:t};export{config as default};
|
|
@@ -1 +1 @@
|
|
|
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};
|
|
1
|
+
let SettingUIV2=[{controls:[{label:{en:"Product source"},controlConfig:{id:"gp-to-product",type:"product-source"},conditionDisplay:'pageType != "GP_PRODUCT" && widgetType === "review-widget"',layout:"vertical",options:{onlyShowInTags:["Product"],labelVariant:"primary"}}]},{controls:[{label:{en:"Product source"},setting:{id:"productSetting"},conditionDisplay:'pageType != "GP_PRODUCT" && widgetType === "review-widget"',layout:"vertical",options:{notShowInTags:["Product"]}}]},{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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "8.0.0-dev.
|
|
3
|
+
"version": "8.0.0-dev.126",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"i18n:generate": "node ./scripts/update-locales-to-setting.js"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@gem-sdk/core": "8.0.0-dev.
|
|
30
|
+
"@gem-sdk/core": "8.0.0-dev.126",
|
|
31
31
|
"@gem-sdk/styles": "8.0.0-dev.115",
|
|
32
32
|
"@gem-sdk/system": "8.0.0-dev.115",
|
|
33
33
|
"@types/react-transition-group": "4.4.12",
|