@gem-sdk/components 2.5.3-staging.3 → 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/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/types/index.d.ts +0 -25
- 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',
|
|
@@ -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
|
};
|
|
@@ -31,17 +31,6 @@ const config = {
|
|
|
31
31
|
target: '_self'
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
|
-
{
|
|
35
|
-
id: 'isGoToSalesPage',
|
|
36
|
-
type: 'toggle',
|
|
37
|
-
label: 'Go to Sales page',
|
|
38
|
-
default: false
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
id: 'linkedToPreSalesPageBanner',
|
|
42
|
-
type: 'banner-pre-sales-page',
|
|
43
|
-
default: false
|
|
44
|
-
},
|
|
45
34
|
{
|
|
46
35
|
id: 'iconGroup',
|
|
47
36
|
type: 'group',
|
|
@@ -499,37 +488,14 @@ const config = {
|
|
|
499
488
|
]
|
|
500
489
|
},
|
|
501
490
|
{
|
|
502
|
-
type: '
|
|
491
|
+
type: 'control',
|
|
503
492
|
label: {
|
|
504
493
|
en: 'Insert link'
|
|
505
494
|
},
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
setting: {
|
|
511
|
-
id: 'linkedToPreSalesPageBanner'
|
|
512
|
-
}
|
|
513
|
-
},
|
|
514
|
-
{
|
|
515
|
-
type: 'control',
|
|
516
|
-
condition: 'pageType == "GP_PRE_SALE_PAGE"',
|
|
517
|
-
setting: {
|
|
518
|
-
id: 'isGoToSalesPage'
|
|
519
|
-
},
|
|
520
|
-
label: {
|
|
521
|
-
en: 'Go to Sales page'
|
|
522
|
-
}
|
|
523
|
-
},
|
|
524
|
-
{
|
|
525
|
-
type: 'control',
|
|
526
|
-
condition: 'isGoToSalesPage === false || pageType != "GP_PRE_SALE_PAGE"',
|
|
527
|
-
layout: 'vertical',
|
|
528
|
-
setting: {
|
|
529
|
-
id: 'btnLink'
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
]
|
|
495
|
+
layout: 'vertical',
|
|
496
|
+
setting: {
|
|
497
|
+
id: 'btnLink'
|
|
498
|
+
}
|
|
533
499
|
},
|
|
534
500
|
{
|
|
535
501
|
type: 'group',
|
|
@@ -814,79 +780,6 @@ const config = {
|
|
|
814
780
|
}
|
|
815
781
|
}
|
|
816
782
|
]
|
|
817
|
-
},
|
|
818
|
-
{
|
|
819
|
-
id: 'button-pre-sales-page',
|
|
820
|
-
name: {
|
|
821
|
-
en: 'Button'
|
|
822
|
-
},
|
|
823
|
-
icon: {
|
|
824
|
-
desktop: `
|
|
825
|
-
<svg width="96" height="48" viewBox="0 0 96 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
826
|
-
<rect width="96" height="48" rx="3" fill="#424242"/>
|
|
827
|
-
<rect x="21.5" y="20" width="53" height="8" rx="4" fill="#757575"/>
|
|
828
|
-
</svg>
|
|
829
|
-
`
|
|
830
|
-
},
|
|
831
|
-
components: [
|
|
832
|
-
{
|
|
833
|
-
tag: 'Button',
|
|
834
|
-
advanced: {
|
|
835
|
-
'spacing-setting': {
|
|
836
|
-
desktop: {
|
|
837
|
-
margin: {
|
|
838
|
-
bottom: 'var(--g-s-l)'
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
},
|
|
842
|
-
editorData: {
|
|
843
|
-
cssPlaceholder: 'button.{{rootClassName}} {\n\n}'
|
|
844
|
-
}
|
|
845
|
-
},
|
|
846
|
-
settings: {
|
|
847
|
-
isGoToSalesPage: true
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
]
|
|
851
|
-
},
|
|
852
|
-
{
|
|
853
|
-
id: 'button-icon-pre-sales-page',
|
|
854
|
-
name: {
|
|
855
|
-
en: 'Button'
|
|
856
|
-
},
|
|
857
|
-
icon: {
|
|
858
|
-
desktop: `
|
|
859
|
-
<svg width="96" height="48" viewBox="0 0 96 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
860
|
-
<rect width="96" height="48" rx="3" fill="#424242"/>
|
|
861
|
-
<path d="M23.6415 17.8126C23.7882 17.5153 24.2121 17.5153 24.3589 17.8126L26.1255 21.3922C26.1838 21.5102 26.2964 21.5921 26.4267 21.611L30.377 22.185C30.7051 22.2327 30.8361 22.6359 30.5987 22.8673L27.7402 25.6536C27.6459 25.7455 27.6029 25.8779 27.6252 26.0077L28.3 29.9421C28.356 30.2688 28.0131 30.518 27.7196 30.3638L24.1863 28.5062C24.0698 28.4449 23.9306 28.4449 23.814 28.5062L20.2807 30.3637C19.9873 30.518 19.6443 30.2688 19.7004 29.9421L20.3752 26.0077C20.3974 25.8779 20.3544 25.7455 20.2601 25.6536L17.4016 22.8673C17.1642 22.6359 17.2952 22.2327 17.6233 22.185L21.5737 21.611C21.7039 21.5921 21.8166 21.5102 21.8748 21.3922L23.6415 17.8126Z" fill="#F9F9F9"/>
|
|
862
|
-
<rect x="40" y="20" width="40" height="8" rx="4" fill="#757575"/>
|
|
863
|
-
</svg>
|
|
864
|
-
`
|
|
865
|
-
},
|
|
866
|
-
components: [
|
|
867
|
-
{
|
|
868
|
-
tag: 'Button',
|
|
869
|
-
settings: {
|
|
870
|
-
iconVisible: true,
|
|
871
|
-
iconAlign: 'left',
|
|
872
|
-
iconSvg: '<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" className="w-6 h-6" viewBox="0 0 512 512" fill="currentColor"> <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M115.584 494.176c-12.352 6.336 -26.368 -4.768 -23.872 -18.944l26.56 -151.36L5.536 216.48c-10.528 -10.048 -5.056 -28.416 9.056 -30.4l156.736 -22.272L241.216 25.344c6.304 -12.48 23.36 -12.48 29.664 0l69.888 138.464 156.736 22.272c14.112 1.984 19.584 20.352 9.024 30.4l-112.704 107.392 26.56 151.36c2.496 14.176 -11.52 25.28 -23.872 18.944L256 421.984l-140.448 72.192z" /></svg>',
|
|
873
|
-
isGoToSalesPage: true,
|
|
874
|
-
enableBtnLink: true
|
|
875
|
-
},
|
|
876
|
-
advanced: {
|
|
877
|
-
'spacing-setting': {
|
|
878
|
-
desktop: {
|
|
879
|
-
margin: {
|
|
880
|
-
bottom: 0
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
},
|
|
884
|
-
editorData: {
|
|
885
|
-
cssPlaceholder: 'button.{{rootClassName}} {\n\n}'
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
]
|
|
890
783
|
}
|
|
891
784
|
],
|
|
892
785
|
rootOverride: {
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
import { makeGlobalSizeIcon, template, makeStyleResponsive, cls, handleConvertClassColor, getGlobalColorStateClass, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor, composeRadius, getGlobalColorStateStyle, RenderIf, makeStyle } from '@gem-sdk/core';
|
|
2
2
|
import { getInsertLinkData } from '../../helpers.js';
|
|
3
|
-
import { HREF_TO_SALES_PAGE } from '../../constants.js';
|
|
4
3
|
|
|
5
4
|
const Icon = ({ className, style, builderAttrs, builderProps, setting = {}, styles, advanced })=>{
|
|
6
|
-
const { iconSvg, iconLink
|
|
5
|
+
const { iconSvg, iconLink } = setting;
|
|
7
6
|
const { bgColor, color, iconBorder, align, iconRotate, spin, iconRounded, globalSize } = styles ?? {};
|
|
8
|
-
|
|
9
|
-
if (isGoToSalesPage) {
|
|
10
|
-
WrapLink = 'a';
|
|
11
|
-
urlData = {
|
|
12
|
-
href: HREF_TO_SALES_PAGE,
|
|
13
|
-
target: '_self'
|
|
14
|
-
};
|
|
15
|
-
}
|
|
7
|
+
const { Wrap: WrapLink, urlData } = getInsertLinkData('div', iconLink);
|
|
16
8
|
const composeGlobalSize = makeGlobalSizeIcon(globalSize);
|
|
17
9
|
const setRotateIcon = ()=>{
|
|
18
10
|
if (spin) return 0;
|