@gem-sdk/components 2.5.3-staging.5 → 2.5.3
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/banner/components/hero-banner/index.liquid.js +2 -13
- package/dist/cjs/banner/setting/HeroBanner.js +6 -50
- package/dist/cjs/button/components/Button.liquid.js +2 -11
- package/dist/cjs/button/setting/Button.js +5 -112
- package/dist/cjs/icon/components/Icon.liquid.js +2 -10
- package/dist/cjs/icon/setting/Icon.js +5 -69
- package/dist/cjs/image/components/Image.liquid.js +3 -12
- package/dist/cjs/image/setting/Image.js +16 -207
- package/dist/cjs/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js +1 -6
- package/dist/cjs/product/setting/product-image-v2/ProductFeatureImage.js +6 -11
- package/dist/cjs/third-party/components/Trustoo.liquid.js +7 -24
- package/dist/cjs/third-party/setting/Trustoo.js +111 -4
- package/dist/esm/banner/components/hero-banner/index.liquid.js +2 -13
- package/dist/esm/banner/setting/HeroBanner.js +6 -50
- package/dist/esm/button/components/Button.liquid.js +2 -11
- package/dist/esm/button/setting/Button.js +5 -112
- package/dist/esm/icon/components/Icon.liquid.js +2 -10
- package/dist/esm/icon/setting/Icon.js +5 -69
- package/dist/esm/image/components/Image.liquid.js +3 -12
- package/dist/esm/image/setting/Image.js +16 -207
- package/dist/esm/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js +1 -6
- package/dist/esm/product/setting/product-image-v2/ProductFeatureImage.js +6 -11
- package/dist/esm/third-party/components/Trustoo.liquid.js +7 -24
- package/dist/esm/third-party/setting/Trustoo.js +111 -4
- package/dist/types/index.d.ts +2 -26
- package/package.json +2 -2
- package/dist/cjs/banner/setting/presets/heroBanner1ColPreSalesPage.js +0 -134
- package/dist/cjs/banner/setting/presets/heroBannerContentLeftPreSalesPage.js +0 -154
- package/dist/cjs/banner/setting/presets/heroBannerContentRightPreSalesPage.js +0 -162
- package/dist/cjs/banner/setting/presets/heroBannerParallaxPreSalesPage.js +0 -134
- package/dist/cjs/banner/setting/presets/heroBannerVideoPreSalesPage.js +0 -130
- package/dist/cjs/constants.js +0 -5
- package/dist/esm/banner/setting/presets/heroBanner1ColPreSalesPage.js +0 -132
- package/dist/esm/banner/setting/presets/heroBannerContentLeftPreSalesPage.js +0 -152
- package/dist/esm/banner/setting/presets/heroBannerContentRightPreSalesPage.js +0 -160
- package/dist/esm/banner/setting/presets/heroBannerParallaxPreSalesPage.js +0 -132
- package/dist/esm/banner/setting/presets/heroBannerVideoPreSalesPage.js +0 -128
- package/dist/esm/constants.js +0 -3
|
@@ -64,17 +64,6 @@ const config = {
|
|
|
64
64
|
target: '_self'
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
|
-
{
|
|
68
|
-
id: 'isGoToSalesPage',
|
|
69
|
-
type: 'toggle',
|
|
70
|
-
label: 'Go to Sales page',
|
|
71
|
-
default: false
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
id: 'linkedToPreSalesPageBanner',
|
|
75
|
-
type: 'banner-pre-sales-page',
|
|
76
|
-
default: false
|
|
77
|
-
},
|
|
78
67
|
{
|
|
79
68
|
id: 'seo',
|
|
80
69
|
type: 'group',
|
|
@@ -405,37 +394,14 @@ const config = {
|
|
|
405
394
|
]
|
|
406
395
|
},
|
|
407
396
|
{
|
|
408
|
-
type: '
|
|
397
|
+
type: 'control',
|
|
409
398
|
label: {
|
|
410
399
|
en: 'Insert link'
|
|
411
400
|
},
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
setting: {
|
|
417
|
-
id: 'linkedToPreSalesPageBanner'
|
|
418
|
-
}
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
type: 'control',
|
|
422
|
-
condition: 'pageType == "GP_PRE_SALE_PAGE"',
|
|
423
|
-
setting: {
|
|
424
|
-
id: 'isGoToSalesPage'
|
|
425
|
-
},
|
|
426
|
-
label: {
|
|
427
|
-
en: 'Go to Sales page'
|
|
428
|
-
}
|
|
429
|
-
},
|
|
430
|
-
{
|
|
431
|
-
type: 'control',
|
|
432
|
-
condition: 'isGoToSalesPage === false || pageType != "GP_PRE_SALE_PAGE"',
|
|
433
|
-
layout: 'vertical',
|
|
434
|
-
setting: {
|
|
435
|
-
id: 'imageLink'
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
]
|
|
401
|
+
setting: {
|
|
402
|
+
id: 'imageLink'
|
|
403
|
+
},
|
|
404
|
+
layout: 'vertical'
|
|
439
405
|
},
|
|
440
406
|
{
|
|
441
407
|
type: 'group',
|
|
@@ -641,19 +607,19 @@ const config = {
|
|
|
641
607
|
}
|
|
642
608
|
},
|
|
643
609
|
borderRadius: {
|
|
644
|
-
btrr:
|
|
645
|
-
bblr:
|
|
646
|
-
bbrr:
|
|
647
|
-
btlr:
|
|
648
|
-
radiusType:
|
|
610
|
+
btrr: "999999px",
|
|
611
|
+
bblr: "999999px",
|
|
612
|
+
bbrr: "999999px",
|
|
613
|
+
btlr: "999999px",
|
|
614
|
+
radiusType: "custom"
|
|
649
615
|
},
|
|
650
616
|
wrapperBorder: {
|
|
651
|
-
borderType:
|
|
652
|
-
border:
|
|
653
|
-
width:
|
|
654
|
-
position:
|
|
655
|
-
borderWidth:
|
|
656
|
-
color:
|
|
617
|
+
borderType: "none",
|
|
618
|
+
border: "none",
|
|
619
|
+
width: "1px 1px 1px 1px",
|
|
620
|
+
position: "all",
|
|
621
|
+
borderWidth: "1px",
|
|
622
|
+
color: "#000000",
|
|
657
623
|
isCustom: true
|
|
658
624
|
}
|
|
659
625
|
},
|
|
@@ -671,163 +637,6 @@ const config = {
|
|
|
671
637
|
}
|
|
672
638
|
}
|
|
673
639
|
]
|
|
674
|
-
},
|
|
675
|
-
{
|
|
676
|
-
id: 'image-pre-sales-page',
|
|
677
|
-
name: {
|
|
678
|
-
en: 'Image'
|
|
679
|
-
},
|
|
680
|
-
icon: {
|
|
681
|
-
desktop: `
|
|
682
|
-
<svg width="96" height="48" viewBox="0 0 96 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
683
|
-
<rect width="96" height="48" rx="3" fill="#424242"/>
|
|
684
|
-
<circle cx="37" cy="17" r="3" fill="#D6D6D6"/>
|
|
685
|
-
<path d="M32.42 30.9518L37.1407 25.1338C37.3005 24.9364 37.498 24.7768 37.7203 24.6653C37.9427 24.5538 38.1848 24.4929 38.431 24.4866C38.6772 24.4803 38.9218 24.5287 39.149 24.6287C39.3762 24.7288 39.5809 24.8781 39.7496 25.0671L41.957 27.5361L50.5857 16.6629C50.7546 16.4499 50.967 16.2797 51.2069 16.165C51.4469 16.0503 51.7083 15.9941 51.9718 16.0005C52.2352 16.0069 52.4939 16.0758 52.7285 16.202C52.9632 16.3283 53.1679 16.5086 53.3273 16.7297L63.6435 31.0236C63.8408 31.2976 63.9615 31.6242 63.9922 31.9666C64.0229 32.3089 63.9623 32.6535 63.8173 32.9616C63.6723 33.2697 63.4485 33.529 63.1712 33.7105C62.8939 33.8919 62.5741 33.9883 62.2476 33.9887L33.7537 34C33.4185 33.9999 33.0904 33.8986 32.8082 33.7082C32.526 33.5177 32.3014 33.2461 32.1611 32.9255C32.0208 32.6048 31.9706 32.2485 32.0165 31.8988C32.0624 31.549 32.2024 31.2204 32.42 30.9518Z" fill="#D6D6D6"/>
|
|
686
|
-
</svg>
|
|
687
|
-
`
|
|
688
|
-
},
|
|
689
|
-
components: [
|
|
690
|
-
{
|
|
691
|
-
tag: 'Image',
|
|
692
|
-
advanced: {
|
|
693
|
-
'spacing-setting': {
|
|
694
|
-
desktop: {
|
|
695
|
-
margin: {
|
|
696
|
-
bottom: 'var(--g-s-l)'
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
},
|
|
700
|
-
editorData: {
|
|
701
|
-
cssPlaceholder: '.{{rootClassName}} {\n\n}\n.{{rootClassName}} > figure > img {\n\n}'
|
|
702
|
-
}
|
|
703
|
-
},
|
|
704
|
-
settings: {
|
|
705
|
-
isGoToSalesPage: true
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
],
|
|
709
|
-
flowTagComponents: {
|
|
710
|
-
Marquee: [
|
|
711
|
-
{
|
|
712
|
-
tag: 'Image',
|
|
713
|
-
styles: {
|
|
714
|
-
shape: {
|
|
715
|
-
desktop: {
|
|
716
|
-
width: 'auto',
|
|
717
|
-
height: 'auto'
|
|
718
|
-
}
|
|
719
|
-
},
|
|
720
|
-
enableBorder: 'none'
|
|
721
|
-
},
|
|
722
|
-
advanced: {
|
|
723
|
-
'spacing-setting': {
|
|
724
|
-
desktop: {
|
|
725
|
-
margin: {
|
|
726
|
-
bottom: 'var(--g-s-l)'
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
},
|
|
730
|
-
editorData: {
|
|
731
|
-
rootClassName: '{{rootClassName}}',
|
|
732
|
-
css: '.{{rootClassName}} {\n\n}\n.{{rootClassName}} > figure > img {\n\n}'
|
|
733
|
-
}
|
|
734
|
-
},
|
|
735
|
-
settings: {
|
|
736
|
-
isNotLazyload: true
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
]
|
|
740
|
-
}
|
|
741
|
-
},
|
|
742
|
-
{
|
|
743
|
-
id: 'image-circle-pre-sales-page',
|
|
744
|
-
name: {
|
|
745
|
-
en: 'Image'
|
|
746
|
-
},
|
|
747
|
-
icon: {
|
|
748
|
-
desktop: `
|
|
749
|
-
<svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
750
|
-
<rect x="2" y="2" width="52" height="52" rx="26" fill="#424242"/>
|
|
751
|
-
<ellipse cx="20.4375" cy="22.9688" rx="2.0625" ry="1.96875" fill="#F9F9F9"/>
|
|
752
|
-
<path d="M17.2887 32.9997L20.5342 29.1816C20.6441 29.052 20.7799 28.9473 20.9327 28.8741C21.0856 28.8009 21.2521 28.761 21.4213 28.7568C21.5905 28.7527 21.7587 28.7845 21.915 28.8501C22.0712 28.9158 22.2118 29.0138 22.3278 29.1378L23.8454 30.758L29.7777 23.6225C29.8938 23.4827 30.0398 23.371 30.2048 23.2958C30.3697 23.2205 30.5495 23.1836 30.7306 23.1878C30.9117 23.192 31.0895 23.2372 31.2509 23.3201C31.4122 23.4029 31.5529 23.5213 31.6625 23.6663L38.7549 33.0467C38.8905 33.2266 38.9735 33.4409 38.9947 33.6656C39.0158 33.8902 38.9741 34.1164 38.8744 34.3186C38.7747 34.5207 38.6209 34.6909 38.4302 34.81C38.2396 34.9291 38.0197 34.9923 37.7952 34.9926L18.2057 35C17.9753 34.9999 17.7497 34.9334 17.5557 34.8085C17.3616 34.6835 17.2072 34.5053 17.1108 34.2948C17.0143 34.0844 16.9798 33.8506 17.0113 33.6211C17.0429 33.3915 17.1391 33.1759 17.2887 32.9997Z" fill="#F9F9F9"/>
|
|
753
|
-
</svg>
|
|
754
|
-
`
|
|
755
|
-
},
|
|
756
|
-
components: [
|
|
757
|
-
{
|
|
758
|
-
tag: 'Image',
|
|
759
|
-
settings: {
|
|
760
|
-
imageStyle: 'circle',
|
|
761
|
-
isGoToSalesPage: true
|
|
762
|
-
},
|
|
763
|
-
styles: {
|
|
764
|
-
shape: {
|
|
765
|
-
desktop: {
|
|
766
|
-
shape: 'square',
|
|
767
|
-
shapeValue: '1/1',
|
|
768
|
-
width: '80px',
|
|
769
|
-
shapeLinked: true
|
|
770
|
-
}
|
|
771
|
-
},
|
|
772
|
-
borderRadius: {
|
|
773
|
-
btrr: '999999px',
|
|
774
|
-
bblr: '999999px',
|
|
775
|
-
bbrr: '999999px',
|
|
776
|
-
btlr: '999999px',
|
|
777
|
-
radiusType: 'custom'
|
|
778
|
-
},
|
|
779
|
-
wrapperBorder: {
|
|
780
|
-
borderType: 'none',
|
|
781
|
-
border: 'none',
|
|
782
|
-
width: '1px 1px 1px 1px',
|
|
783
|
-
position: 'all',
|
|
784
|
-
borderWidth: '1px',
|
|
785
|
-
color: '#000000',
|
|
786
|
-
isCustom: true
|
|
787
|
-
}
|
|
788
|
-
},
|
|
789
|
-
advanced: {
|
|
790
|
-
'spacing-setting': {
|
|
791
|
-
desktop: {
|
|
792
|
-
margin: {
|
|
793
|
-
bottom: 'var(--g-s-l)'
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
},
|
|
797
|
-
editorData: {
|
|
798
|
-
cssplaceholder: '.{{rootClassName}} {\n\n}\n.{{rootClassName}} > figure > img {\n\n}'
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
],
|
|
803
|
-
rootOverride: {
|
|
804
|
-
styles: {
|
|
805
|
-
shape: {
|
|
806
|
-
desktop: {
|
|
807
|
-
shape: 'square',
|
|
808
|
-
shapeValue: '1/1',
|
|
809
|
-
width: '80px',
|
|
810
|
-
shapeLinked: true
|
|
811
|
-
}
|
|
812
|
-
},
|
|
813
|
-
borderRadius: {
|
|
814
|
-
btrr: '999999px',
|
|
815
|
-
bblr: '999999px',
|
|
816
|
-
bbrr: '999999px',
|
|
817
|
-
btlr: '999999px',
|
|
818
|
-
radiusType: 'custom'
|
|
819
|
-
}
|
|
820
|
-
},
|
|
821
|
-
advanced: {
|
|
822
|
-
'spacing-setting': {
|
|
823
|
-
desktop: {
|
|
824
|
-
margin: {
|
|
825
|
-
bottom: 0
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
}
|
|
831
640
|
}
|
|
832
641
|
],
|
|
833
642
|
rootOverride: {
|
package/dist/cjs/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js
CHANGED
|
@@ -123,12 +123,7 @@ const ProductFeaturedImageCarousel = ({ builderPropUID, children, enableLazyload
|
|
|
123
123
|
return core.template`
|
|
124
124
|
{% assign src = featureMedia.src %}
|
|
125
125
|
${hasHoverEffect && setting.hoverEffect == 'other' ? `
|
|
126
|
-
{% assign
|
|
127
|
-
{% assign other_image_index = ${setting.otherImage} | plus: 0 %}
|
|
128
|
-
{% if other_image_index >= media_length %}
|
|
129
|
-
{% assign other_image_index = media_length | minus: 1 %}
|
|
130
|
-
{% endif %}
|
|
131
|
-
{% assign otherImage = product.media[other_image_index] %}
|
|
126
|
+
{% assign otherImage = product.media[${setting.otherImage}] %}
|
|
132
127
|
{% assign src = otherImage.src %}
|
|
133
128
|
{% if otherImage.media_type != 'image' %}
|
|
134
129
|
{% assign src = otherImage.preview_image.src %}
|
|
@@ -70,28 +70,23 @@ const productFeatureImageSetting = [
|
|
|
70
70
|
{
|
|
71
71
|
id: 'otherImage',
|
|
72
72
|
label: 'Other image',
|
|
73
|
-
type: '
|
|
74
|
-
|
|
75
|
-
useOnlyUnitInit: true,
|
|
76
|
-
hideUnit: true,
|
|
77
|
-
isReturnNumber: true,
|
|
78
|
-
isIndexValue: true,
|
|
79
|
-
displayOptions: [
|
|
73
|
+
type: 'select',
|
|
74
|
+
options: [
|
|
80
75
|
{
|
|
81
76
|
label: 'Image 1',
|
|
82
|
-
value:
|
|
77
|
+
value: 0
|
|
83
78
|
},
|
|
84
79
|
{
|
|
85
80
|
label: 'Image 2',
|
|
86
|
-
value:
|
|
81
|
+
value: 1
|
|
87
82
|
},
|
|
88
83
|
{
|
|
89
84
|
label: 'Image 3',
|
|
90
|
-
value:
|
|
85
|
+
value: 2
|
|
91
86
|
},
|
|
92
87
|
{
|
|
93
88
|
label: 'Image 4',
|
|
94
|
-
value:
|
|
89
|
+
value: 3
|
|
95
90
|
},
|
|
96
91
|
{
|
|
97
92
|
label: 'Last image',
|
|
@@ -8,17 +8,13 @@ var thirdParty = require('../helpers/thirdParty.js');
|
|
|
8
8
|
|
|
9
9
|
const Trustoo = ({ setting, advanced })=>{
|
|
10
10
|
const { widgetType, align, version, appBlockId } = setting ?? {};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
'
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
const renderOldVersionTrustoo = ()=>{
|
|
20
|
-
return version === 'v2' ? thirdParty.getLiquidForAppBlock(appBlockId, align, advanced?.cssClass) : core.template`
|
|
21
|
-
<div>
|
|
11
|
+
return version === 'v2' ? thirdParty.getLiquidForAppBlock(appBlockId, align, advanced?.cssClass) : core.template`
|
|
12
|
+
<div
|
|
13
|
+
class="${advanced?.cssClass}"
|
|
14
|
+
style="${{
|
|
15
|
+
...core.makeStyleResponsive('ta', align)
|
|
16
|
+
}}"
|
|
17
|
+
>
|
|
22
18
|
{% if '${widgetType}' == 'starRatingInList' %}
|
|
23
19
|
{% if request.page_type != 'product' %}
|
|
24
20
|
<div class="custom-vstar-rating-widget" product-id="{{ product.id }}"></div>
|
|
@@ -41,19 +37,6 @@ const Trustoo = ({ setting, advanced })=>{
|
|
|
41
37
|
{% endif %}
|
|
42
38
|
</div>
|
|
43
39
|
`;
|
|
44
|
-
};
|
|
45
|
-
return !!version ? renderOldVersionTrustoo() : core.template`
|
|
46
|
-
<div
|
|
47
|
-
class="${advanced?.cssClass}"
|
|
48
|
-
style="${{
|
|
49
|
-
...core.makeStyleResponsive('ta', align)
|
|
50
|
-
}}"
|
|
51
|
-
>
|
|
52
|
-
${widgetType && widgetTypeMap?.[widgetType]}
|
|
53
|
-
<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="https://cdn.vstar.app/static/dist/js/swiper-reviews.min.js" defer="defer"></script>
|
|
54
|
-
<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">
|
|
55
|
-
</div>
|
|
56
|
-
`;
|
|
57
40
|
};
|
|
58
41
|
|
|
59
42
|
exports.default = Trustoo;
|
|
@@ -65,11 +65,76 @@ const config = {
|
|
|
65
65
|
href: 'https://admin.shopify.com/?redirect=/apps/sealapps-product-review',
|
|
66
66
|
appName: Trustoo.default.label
|
|
67
67
|
},
|
|
68
|
+
{
|
|
69
|
+
id: 'version',
|
|
70
|
+
label: 'Choose version',
|
|
71
|
+
type: 'select',
|
|
72
|
+
default: 'v1',
|
|
73
|
+
options: [
|
|
74
|
+
{
|
|
75
|
+
label: 'V1',
|
|
76
|
+
value: 'v1'
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: 'V2',
|
|
80
|
+
value: 'v2'
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
68
84
|
{
|
|
69
85
|
id: 'widgetType',
|
|
70
86
|
label: 'Choose widget',
|
|
71
87
|
type: 'select',
|
|
72
|
-
default: '
|
|
88
|
+
default: 'starRating',
|
|
89
|
+
options: [
|
|
90
|
+
{
|
|
91
|
+
label: 'Star Rating',
|
|
92
|
+
value: 'starRating',
|
|
93
|
+
hideOnPage: [
|
|
94
|
+
'GP_ARTICLE',
|
|
95
|
+
'GP_BLOG',
|
|
96
|
+
'GP_COLLECTION',
|
|
97
|
+
'GP_INDEX',
|
|
98
|
+
'GP_STATIC'
|
|
99
|
+
],
|
|
100
|
+
flowTag: [
|
|
101
|
+
'Product'
|
|
102
|
+
],
|
|
103
|
+
condition: 'or'
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
label: 'Star Rating List',
|
|
107
|
+
value: 'starRatingInList',
|
|
108
|
+
hideOnPage: [
|
|
109
|
+
'GP_ARTICLE',
|
|
110
|
+
'GP_BLOG',
|
|
111
|
+
'GP_COLLECTION',
|
|
112
|
+
'GP_INDEX',
|
|
113
|
+
'GP_STATIC'
|
|
114
|
+
],
|
|
115
|
+
flowTag: [
|
|
116
|
+
'ProductList'
|
|
117
|
+
],
|
|
118
|
+
condition: 'or'
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
label: 'Reviews',
|
|
122
|
+
value: 'reviews',
|
|
123
|
+
hideOnPage: [
|
|
124
|
+
'GP_ARTICLE',
|
|
125
|
+
'GP_BLOG',
|
|
126
|
+
'GP_COLLECTION',
|
|
127
|
+
'GP_INDEX',
|
|
128
|
+
'GP_STATIC'
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: 'widgetTypeV2',
|
|
135
|
+
label: 'Choose widget',
|
|
136
|
+
type: 'select',
|
|
137
|
+
default: 'barrage-carousel',
|
|
73
138
|
options: [
|
|
74
139
|
{
|
|
75
140
|
label: 'Testimonials',
|
|
@@ -85,11 +150,33 @@ const config = {
|
|
|
85
150
|
},
|
|
86
151
|
{
|
|
87
152
|
label: 'Review Widget',
|
|
88
|
-
value: 'review-widget'
|
|
153
|
+
value: 'review-widget',
|
|
154
|
+
hideOnPage: [
|
|
155
|
+
'ARTICLE',
|
|
156
|
+
'BLOG',
|
|
157
|
+
'COLLECTION',
|
|
158
|
+
'GP_ARTICLE',
|
|
159
|
+
'GP_BLOG',
|
|
160
|
+
'GP_COLLECTION',
|
|
161
|
+
'GP_INDEX',
|
|
162
|
+
'GP_STATIC',
|
|
163
|
+
'STATIC'
|
|
164
|
+
]
|
|
89
165
|
},
|
|
90
166
|
{
|
|
91
167
|
label: 'Star Rating Widget',
|
|
92
|
-
value: 'star-rating-widget'
|
|
168
|
+
value: 'star-rating-widget',
|
|
169
|
+
hideOnPage: [
|
|
170
|
+
'ARTICLE',
|
|
171
|
+
'BLOG',
|
|
172
|
+
'COLLECTION',
|
|
173
|
+
'GP_ARTICLE',
|
|
174
|
+
'GP_BLOG',
|
|
175
|
+
'GP_COLLECTION',
|
|
176
|
+
'GP_INDEX',
|
|
177
|
+
'GP_STATIC',
|
|
178
|
+
'STATIC'
|
|
179
|
+
]
|
|
93
180
|
},
|
|
94
181
|
{
|
|
95
182
|
label: 'Text Carousel',
|
|
@@ -139,6 +226,15 @@ const config = {
|
|
|
139
226
|
id: 'install'
|
|
140
227
|
}
|
|
141
228
|
},
|
|
229
|
+
{
|
|
230
|
+
type: 'control',
|
|
231
|
+
label: {
|
|
232
|
+
en: 'Choose version'
|
|
233
|
+
},
|
|
234
|
+
setting: {
|
|
235
|
+
id: 'version'
|
|
236
|
+
}
|
|
237
|
+
},
|
|
142
238
|
{
|
|
143
239
|
type: 'control',
|
|
144
240
|
label: {
|
|
@@ -146,7 +242,18 @@ const config = {
|
|
|
146
242
|
},
|
|
147
243
|
setting: {
|
|
148
244
|
id: 'widgetType'
|
|
149
|
-
}
|
|
245
|
+
},
|
|
246
|
+
condition: 'version === "v1"'
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
type: 'control',
|
|
250
|
+
label: {
|
|
251
|
+
en: 'Choose widget'
|
|
252
|
+
},
|
|
253
|
+
setting: {
|
|
254
|
+
id: 'widgetTypeV2'
|
|
255
|
+
},
|
|
256
|
+
condition: 'version === "v2"'
|
|
150
257
|
},
|
|
151
258
|
{
|
|
152
259
|
type: 'control',
|
|
@@ -9,21 +9,9 @@ import useAspectRatioSettings from './hooks/useAspectRatioSettings.js';
|
|
|
9
9
|
import NextImage from '../../../image/components/NextImage.liquid.js';
|
|
10
10
|
import { getImageSrc, DEVICES } from '../../../image/helpers/getSrcSet.js';
|
|
11
11
|
import { createBlurDataURL } from '../../../image/components/helpers.js';
|
|
12
|
-
import { HREF_TO_SALES_PAGE } from '../../../constants.js';
|
|
13
12
|
|
|
14
13
|
const HeroBanner = ({ builderAttrs, builderProps, setting, styles, style, children, rawChildren, advanced, enableLazyloadImage = true })=>{
|
|
15
|
-
const { link
|
|
16
|
-
const link = isGoToSalesPage ? {
|
|
17
|
-
link: HREF_TO_SALES_PAGE,
|
|
18
|
-
target: '_self'
|
|
19
|
-
} : rawLink;
|
|
20
|
-
let { urlData } = getInsertLinkData('', link);
|
|
21
|
-
if (isGoToSalesPage) {
|
|
22
|
-
urlData = {
|
|
23
|
-
href: HREF_TO_SALES_PAGE,
|
|
24
|
-
target: '_self'
|
|
25
|
-
};
|
|
26
|
-
}
|
|
14
|
+
const { link, layout, verticalAlign, order, alignBanner, alt, title } = setting ?? {};
|
|
27
15
|
const { background, overlayEnable, overlayColor, overlayOpacity, verticalGutter, contentWidth, hoverEffect, hoverEffectDuration, hoverEffectScale, cornerBg, borderBg, hasActiveShadow, shadowBg, sizeSetting, contentPadding } = styles ?? {};
|
|
28
16
|
const enableParallax = setting?.enableParallax || false;
|
|
29
17
|
const speedParallax = Number(setting?.speedParallax) || 0;
|
|
@@ -136,6 +124,7 @@ const HeroBanner = ({ builderAttrs, builderProps, setting, styles, style, childr
|
|
|
136
124
|
}
|
|
137
125
|
return;
|
|
138
126
|
};
|
|
127
|
+
const { urlData } = getInsertLinkData('', link);
|
|
139
128
|
const imagePlaceholder = {
|
|
140
129
|
desktop: createBlurDataURL(srcSet?.desktop?.width ?? 0, srcSet?.desktop?.height ?? 0),
|
|
141
130
|
tablet: createBlurDataURL(srcSet?.tablet?.width ?? srcSet?.desktop?.width ?? 0, srcSet?.tablet?.height ?? srcSet?.desktop?.width ?? 0),
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { heroBanner1Col } from './presets/heroBanner1Col.js';
|
|
2
|
-
import { heroBanner1ColPreSalesPage } from './presets/heroBanner1ColPreSalesPage.js';
|
|
3
2
|
import { heroBannerContentLeft } from './presets/heroBannerContentLeft.js';
|
|
4
|
-
import { heroBannerContentLeftPreSalesPage } from './presets/heroBannerContentLeftPreSalesPage.js';
|
|
5
3
|
import { heroBannerContentRight } from './presets/heroBannerContentRight.js';
|
|
6
|
-
import { heroBannerContentRightPreSalesPage } from './presets/heroBannerContentRightPreSalesPage.js';
|
|
7
4
|
import { heroBannerVideo } from './presets/heroBannerVideo.js';
|
|
8
|
-
import { heroBannerVideoPreSalesPage } from './presets/heroBannerVideoPreSalesPage.js';
|
|
9
5
|
import { heroBannerParallax } from './presets/heroBannerParallax.js';
|
|
10
|
-
import { heroBannerParallaxPreSalesPage } from './presets/heroBannerParallaxPreSalesPage.js';
|
|
11
6
|
|
|
12
7
|
const config = {
|
|
13
8
|
tag: 'HeroBanner',
|
|
@@ -197,17 +192,6 @@ const config = {
|
|
|
197
192
|
label: 'Preload',
|
|
198
193
|
default: false
|
|
199
194
|
},
|
|
200
|
-
{
|
|
201
|
-
id: 'isGoToSalesPage',
|
|
202
|
-
type: 'toggle',
|
|
203
|
-
label: 'Go to Sales page',
|
|
204
|
-
default: false
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
id: 'linkedToPreSalesPageBanner',
|
|
208
|
-
type: 'banner-pre-sales-page',
|
|
209
|
-
default: false
|
|
210
|
-
},
|
|
211
195
|
{
|
|
212
196
|
id: 'link',
|
|
213
197
|
type: 'pick-link',
|
|
@@ -1082,37 +1066,14 @@ const config = {
|
|
|
1082
1066
|
]
|
|
1083
1067
|
},
|
|
1084
1068
|
{
|
|
1085
|
-
type: '
|
|
1069
|
+
type: 'control',
|
|
1086
1070
|
label: {
|
|
1087
1071
|
en: 'Link'
|
|
1088
1072
|
},
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
setting: {
|
|
1094
|
-
id: 'linkedToPreSalesPageBanner'
|
|
1095
|
-
}
|
|
1096
|
-
},
|
|
1097
|
-
{
|
|
1098
|
-
type: 'control',
|
|
1099
|
-
condition: 'pageType == "GP_PRE_SALE_PAGE"',
|
|
1100
|
-
setting: {
|
|
1101
|
-
id: 'isGoToSalesPage'
|
|
1102
|
-
},
|
|
1103
|
-
label: {
|
|
1104
|
-
en: 'Go to Sales page'
|
|
1105
|
-
}
|
|
1106
|
-
},
|
|
1107
|
-
{
|
|
1108
|
-
type: 'control',
|
|
1109
|
-
condition: 'isGoToSalesPage === false || pageType != "GP_PRE_SALE_PAGE"',
|
|
1110
|
-
layout: 'vertical',
|
|
1111
|
-
setting: {
|
|
1112
|
-
id: 'link'
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
]
|
|
1073
|
+
setting: {
|
|
1074
|
+
id: 'link'
|
|
1075
|
+
},
|
|
1076
|
+
layout: 'vertical'
|
|
1116
1077
|
},
|
|
1117
1078
|
{
|
|
1118
1079
|
type: 'group',
|
|
@@ -1392,15 +1353,10 @@ const config = {
|
|
|
1392
1353
|
],
|
|
1393
1354
|
presets: [
|
|
1394
1355
|
heroBanner1Col,
|
|
1395
|
-
heroBanner1ColPreSalesPage,
|
|
1396
1356
|
heroBannerContentLeft,
|
|
1397
|
-
heroBannerContentLeftPreSalesPage,
|
|
1398
1357
|
heroBannerContentRight,
|
|
1399
|
-
heroBannerContentRightPreSalesPage,
|
|
1400
1358
|
heroBannerVideo,
|
|
1401
|
-
|
|
1402
|
-
heroBannerParallax,
|
|
1403
|
-
heroBannerParallaxPreSalesPage
|
|
1359
|
+
heroBannerParallax
|
|
1404
1360
|
],
|
|
1405
1361
|
editorConfigs: {
|
|
1406
1362
|
slots: {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { splitStyle, makeStyleResponsive, makeGlobalSize, composeTypographyClassName, composeTypographyStyle, composeBorderCss, composeCornerCss, getSingleColorVariable, template, cls, getGlobalColorStateClass, getGlobalColorStateStyle, composeRadius, getStyleShadowState, composeSize, getGradientBgrStyleForButton, RenderIf } from '@gem-sdk/core';
|
|
2
2
|
import { getInsertLinkData, getDynamicSourceLocales } from '../../helpers.js';
|
|
3
|
-
import { HREF_TO_SALES_PAGE } from '../../constants.js';
|
|
4
3
|
|
|
5
4
|
const Button = ({ className, builderProps, customAttrs, pageContext, setting = {}, styles = {}, style, wrapClassName = '', advanced, nodePrice, dataId, isUseTranslatedValue = true })=>{
|
|
6
5
|
const { align, size, backgroundColor, textColor, roundedBtn, iconSpacing, globalSize } = styles;
|
|
7
|
-
const { label, iconSvg, btnLink, htmlType, disabled, loading, iconAlign, iconVisible, translate, disabledLoading = true
|
|
6
|
+
const { label, iconSvg, btnLink, htmlType, disabled, loading, iconAlign, iconVisible, translate, disabledLoading = true } = setting;
|
|
8
7
|
const [wrapStyle, restStyle] = splitStyle([
|
|
9
8
|
'pos',
|
|
10
9
|
'top',
|
|
@@ -13,15 +12,7 @@ const Button = ({ className, builderProps, customAttrs, pageContext, setting = {
|
|
|
13
12
|
'right',
|
|
14
13
|
'z'
|
|
15
14
|
], style);
|
|
16
|
-
|
|
17
|
-
if (isGoToSalesPage) {
|
|
18
|
-
Wrap = 'a';
|
|
19
|
-
urlData = {
|
|
20
|
-
href: HREF_TO_SALES_PAGE,
|
|
21
|
-
target: '_self'
|
|
22
|
-
};
|
|
23
|
-
shouldRenderLink = true;
|
|
24
|
-
}
|
|
15
|
+
const { Wrap, urlData, shouldRenderLink } = getInsertLinkData('button', btnLink, htmlType);
|
|
25
16
|
const spacingDefault = {
|
|
26
17
|
desktop: '8px'
|
|
27
18
|
};
|