@gem-sdk/components 2.0.0-dev.437 → 2.0.0-dev.440
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/article/components/ArticleCategory.liquid.js +0 -1
- package/dist/cjs/article/setting/ArticleList.js +6 -62
- package/dist/cjs/article/setting/configs/ArticleAuthor/presets.js +0 -15
- package/dist/cjs/article/setting/configs/ArticleAuthor/settings.js +3 -5
- package/dist/cjs/article/setting/configs/ArticleCategory/settings.js +0 -5
- package/dist/cjs/article/setting/configs/ArticleContent/presets.js +0 -5
- package/dist/cjs/article/setting/configs/ArticleContent/settings.js +8 -5
- package/dist/cjs/article/setting/configs/ArticleDate/presets.js +0 -15
- package/dist/cjs/article/setting/configs/ArticleExcerpt/settings.js +4 -1
- package/dist/cjs/article/setting/configs/ArticleImage/settings.js +1 -1
- package/dist/cjs/article/setting/configs/ArticleImage/uiV2.js +44 -6
- package/dist/cjs/article/setting/configs/ArticleReadMore/uiV2.js +10 -1
- package/dist/cjs/article/setting/configs/ArticleTag/settings.js +7 -1
- package/dist/cjs/article/setting/configs/ArticleTag/uiV2.js +15 -0
- package/dist/cjs/article/setting/configs/ArticleTitle/presets.js +4 -1
- package/dist/cjs/article/setting/configs/ArticleTitle/settings.js +1 -1
- package/dist/cjs/article/setting/configs/ArticleTitle/uiV2.js +1 -1
- package/dist/cjs/banner/setting/uiV2.js +1 -2
- package/dist/cjs/sticky/components/Sticky.liquid.js +2 -1
- package/dist/cjs/text/components/Text.liquid.js +1 -3
- package/dist/esm/article/components/ArticleCategory.liquid.js +0 -1
- package/dist/esm/article/setting/ArticleList.js +6 -62
- package/dist/esm/article/setting/configs/ArticleAuthor/presets.js +0 -15
- package/dist/esm/article/setting/configs/ArticleAuthor/settings.js +3 -5
- package/dist/esm/article/setting/configs/ArticleCategory/settings.js +0 -5
- package/dist/esm/article/setting/configs/ArticleContent/presets.js +0 -5
- package/dist/esm/article/setting/configs/ArticleContent/settings.js +8 -5
- package/dist/esm/article/setting/configs/ArticleDate/presets.js +0 -15
- package/dist/esm/article/setting/configs/ArticleExcerpt/settings.js +4 -1
- package/dist/esm/article/setting/configs/ArticleImage/settings.js +1 -1
- package/dist/esm/article/setting/configs/ArticleImage/uiV2.js +44 -6
- package/dist/esm/article/setting/configs/ArticleReadMore/uiV2.js +10 -1
- package/dist/esm/article/setting/configs/ArticleTag/settings.js +7 -1
- package/dist/esm/article/setting/configs/ArticleTag/uiV2.js +15 -0
- package/dist/esm/article/setting/configs/ArticleTitle/presets.js +4 -1
- package/dist/esm/article/setting/configs/ArticleTitle/settings.js +1 -1
- package/dist/esm/article/setting/configs/ArticleTitle/uiV2.js +1 -1
- package/dist/esm/banner/setting/uiV2.js +1 -2
- package/dist/esm/sticky/components/Sticky.liquid.js +2 -1
- package/dist/esm/text/components/Text.liquid.js +1 -3
- package/package.json +2 -2
- package/dist/cjs/text/utils/dynamic-source.js +0 -24
- package/dist/esm/text/utils/dynamic-source.js +0 -22
|
@@ -608,21 +608,6 @@ const config = {
|
|
|
608
608
|
styles: {
|
|
609
609
|
typo: {
|
|
610
610
|
type: 'paragraph-3',
|
|
611
|
-
custom: {
|
|
612
|
-
fontSize: {
|
|
613
|
-
desktop: '12px',
|
|
614
|
-
tablet: '12px',
|
|
615
|
-
mobile: '12px',
|
|
616
|
-
edited: [
|
|
617
|
-
'desktop'
|
|
618
|
-
]
|
|
619
|
-
},
|
|
620
|
-
lineHeight: {
|
|
621
|
-
desktop: '120%',
|
|
622
|
-
tablet: '120%',
|
|
623
|
-
mobile: '120%'
|
|
624
|
-
}
|
|
625
|
-
},
|
|
626
611
|
attrs: {
|
|
627
612
|
color: 'text-1'
|
|
628
613
|
}
|
|
@@ -675,21 +660,6 @@ const config = {
|
|
|
675
660
|
styles: {
|
|
676
661
|
typo: {
|
|
677
662
|
type: 'paragraph-3',
|
|
678
|
-
custom: {
|
|
679
|
-
fontSize: {
|
|
680
|
-
desktop: '12px',
|
|
681
|
-
tablet: '12px',
|
|
682
|
-
mobile: '12px',
|
|
683
|
-
edited: [
|
|
684
|
-
'desktop'
|
|
685
|
-
]
|
|
686
|
-
},
|
|
687
|
-
lineHeight: {
|
|
688
|
-
desktop: '120%',
|
|
689
|
-
tablet: '120%',
|
|
690
|
-
mobile: '120%'
|
|
691
|
-
}
|
|
692
|
-
},
|
|
693
663
|
attrs: {
|
|
694
664
|
color: 'text-1'
|
|
695
665
|
}
|
|
@@ -742,21 +712,6 @@ const config = {
|
|
|
742
712
|
styles: {
|
|
743
713
|
typo: {
|
|
744
714
|
type: 'paragraph-3',
|
|
745
|
-
custom: {
|
|
746
|
-
fontSize: {
|
|
747
|
-
desktop: '12px',
|
|
748
|
-
tablet: '12px',
|
|
749
|
-
mobile: '12px',
|
|
750
|
-
edited: [
|
|
751
|
-
'desktop'
|
|
752
|
-
]
|
|
753
|
-
},
|
|
754
|
-
lineHeight: {
|
|
755
|
-
desktop: '120%',
|
|
756
|
-
tablet: '120%',
|
|
757
|
-
mobile: '120%'
|
|
758
|
-
}
|
|
759
|
-
},
|
|
760
715
|
attrs: {
|
|
761
716
|
color: 'text-1'
|
|
762
717
|
}
|
|
@@ -778,7 +733,10 @@ const config = {
|
|
|
778
733
|
},
|
|
779
734
|
styles: {
|
|
780
735
|
typo: {
|
|
781
|
-
type: 'subheading-
|
|
736
|
+
type: 'subheading-3',
|
|
737
|
+
attrs: {
|
|
738
|
+
color: 'text-1'
|
|
739
|
+
}
|
|
782
740
|
},
|
|
783
741
|
color: {
|
|
784
742
|
normal: 'text-2'
|
|
@@ -822,24 +780,10 @@ const config = {
|
|
|
822
780
|
},
|
|
823
781
|
styles: {
|
|
824
782
|
typo: {
|
|
825
|
-
type: 'paragraph-
|
|
826
|
-
custom: {
|
|
827
|
-
fontSize: {
|
|
828
|
-
desktop: '12px',
|
|
829
|
-
tablet: '14px',
|
|
830
|
-
mobile: '12px'
|
|
831
|
-
},
|
|
832
|
-
fontWeight: '400',
|
|
833
|
-
lineHeight: {
|
|
834
|
-
desktop: '180%',
|
|
835
|
-
tablet: '180%',
|
|
836
|
-
mobile: '180%'
|
|
837
|
-
},
|
|
838
|
-
fontFamily: 'Assistant'
|
|
839
|
-
}
|
|
783
|
+
type: 'paragraph-1'
|
|
840
784
|
},
|
|
841
785
|
color: {
|
|
842
|
-
normal: 'text-
|
|
786
|
+
normal: 'text-1'
|
|
843
787
|
}
|
|
844
788
|
},
|
|
845
789
|
advanced: {
|
|
@@ -23,21 +23,6 @@ const ArticleAuthorPresets = [
|
|
|
23
23
|
styles: {
|
|
24
24
|
typo: {
|
|
25
25
|
type: 'paragraph-3',
|
|
26
|
-
custom: {
|
|
27
|
-
fontSize: {
|
|
28
|
-
desktop: '12px',
|
|
29
|
-
tablet: '12px',
|
|
30
|
-
mobile: '12px',
|
|
31
|
-
edited: [
|
|
32
|
-
'desktop'
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
|
-
lineHeight: {
|
|
36
|
-
desktop: '120%',
|
|
37
|
-
tablet: '120%',
|
|
38
|
-
mobile: '120%'
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
26
|
attrs: {
|
|
42
27
|
color: 'text-1'
|
|
43
28
|
}
|
|
@@ -58,12 +58,10 @@ const ArticleAuthorSettings = [
|
|
|
58
58
|
default: {
|
|
59
59
|
type: 'subheading-3',
|
|
60
60
|
custom: {
|
|
61
|
-
lineHeight: {
|
|
62
|
-
desktop: '120%',
|
|
63
|
-
tablet: '120%',
|
|
64
|
-
mobile: '120%'
|
|
65
|
-
},
|
|
66
61
|
letterSpacing: '0px'
|
|
62
|
+
},
|
|
63
|
+
attrs: {
|
|
64
|
+
color: 'text-1'
|
|
67
65
|
}
|
|
68
66
|
},
|
|
69
67
|
ignoreReRender: true
|
|
@@ -12,12 +12,15 @@ const ArticleContentSettings = [
|
|
|
12
12
|
id: 'typo',
|
|
13
13
|
type: 'typography-v2',
|
|
14
14
|
default: {
|
|
15
|
-
type: '
|
|
15
|
+
type: 'paragraph-1',
|
|
16
|
+
custom: {
|
|
17
|
+
letterSpacing: '0px'
|
|
18
|
+
},
|
|
19
|
+
attrs: {
|
|
20
|
+
color: 'text-1'
|
|
21
|
+
}
|
|
16
22
|
},
|
|
17
|
-
ignoreReRender: true
|
|
18
|
-
hiddenSetting: {
|
|
19
|
-
color: true
|
|
20
|
-
}
|
|
23
|
+
ignoreReRender: true
|
|
21
24
|
},
|
|
22
25
|
{
|
|
23
26
|
id: 'textAlign',
|
|
@@ -22,21 +22,6 @@ const ArticleDatePresets = [
|
|
|
22
22
|
styles: {
|
|
23
23
|
typo: {
|
|
24
24
|
type: 'paragraph-3',
|
|
25
|
-
custom: {
|
|
26
|
-
fontSize: {
|
|
27
|
-
desktop: '12px',
|
|
28
|
-
tablet: '12px',
|
|
29
|
-
mobile: '12px',
|
|
30
|
-
edited: [
|
|
31
|
-
'desktop'
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
lineHeight: {
|
|
35
|
-
desktop: '120%',
|
|
36
|
-
tablet: '120%',
|
|
37
|
-
mobile: '120%'
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
25
|
attrs: {
|
|
41
26
|
color: '#212121'
|
|
42
27
|
}
|
|
@@ -63,11 +63,48 @@ const uiV2 = [
|
|
|
63
63
|
label: {
|
|
64
64
|
en: 'Shadow'
|
|
65
65
|
},
|
|
66
|
-
|
|
67
|
-
id: 'shadow'
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
setting: {
|
|
67
|
+
id: 'shadow'
|
|
68
|
+
},
|
|
69
|
+
options: {
|
|
70
|
+
updateFields: [
|
|
71
|
+
{
|
|
72
|
+
field: 'enable',
|
|
73
|
+
settingId: 'hasActiveShadow'
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
controlChangeTrigger: {
|
|
78
|
+
settings: [
|
|
79
|
+
{
|
|
80
|
+
condition: `shadow.enable === true`,
|
|
81
|
+
source: [
|
|
82
|
+
'shadow',
|
|
83
|
+
'hasActiveShadow'
|
|
84
|
+
],
|
|
85
|
+
action: {
|
|
86
|
+
controlId: 'hasActiveShadow',
|
|
87
|
+
groupType: 'advanced',
|
|
88
|
+
controlType: 'advanced',
|
|
89
|
+
newValue: true
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
condition: `shadow.enable === false`,
|
|
94
|
+
source: [
|
|
95
|
+
'shadow',
|
|
96
|
+
'hasActiveShadow'
|
|
97
|
+
],
|
|
98
|
+
action: {
|
|
99
|
+
controlId: 'hasActiveShadow',
|
|
100
|
+
groupType: 'advanced',
|
|
101
|
+
controlType: 'advanced',
|
|
102
|
+
newValue: false
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
options: {
|
|
107
|
+
noRecordHistory: true
|
|
71
108
|
}
|
|
72
109
|
}
|
|
73
110
|
}
|
|
@@ -103,7 +140,8 @@ const uiV2 = [
|
|
|
103
140
|
},
|
|
104
141
|
setting: {
|
|
105
142
|
id: 'openNewTab'
|
|
106
|
-
}
|
|
143
|
+
},
|
|
144
|
+
conditionDisplay: "enableLink === true && linkArticle === 'go-to-article'"
|
|
107
145
|
},
|
|
108
146
|
{
|
|
109
147
|
type: 'control',
|
|
@@ -461,13 +461,22 @@ const uiV2 = [
|
|
|
461
461
|
controls: [
|
|
462
462
|
{
|
|
463
463
|
label: {
|
|
464
|
-
en: '
|
|
464
|
+
en: 'Color'
|
|
465
465
|
},
|
|
466
466
|
setting: {
|
|
467
467
|
id: 'backgroundColorV2',
|
|
468
468
|
state: 'hover'
|
|
469
469
|
}
|
|
470
470
|
},
|
|
471
|
+
{
|
|
472
|
+
label: {
|
|
473
|
+
en: 'Image'
|
|
474
|
+
},
|
|
475
|
+
setting: {
|
|
476
|
+
id: 'backgroundImage',
|
|
477
|
+
state: 'hover'
|
|
478
|
+
}
|
|
479
|
+
},
|
|
471
480
|
{
|
|
472
481
|
label: {
|
|
473
482
|
en: 'Text color'
|
|
@@ -49,7 +49,13 @@ const ArticleTagSettings = [
|
|
|
49
49
|
id: 'typo',
|
|
50
50
|
type: 'typography-v2',
|
|
51
51
|
default: {
|
|
52
|
-
type: 'subheading-3'
|
|
52
|
+
type: 'subheading-3',
|
|
53
|
+
custom: {
|
|
54
|
+
letterSpacing: '0px'
|
|
55
|
+
},
|
|
56
|
+
attrs: {
|
|
57
|
+
color: 'text-1'
|
|
58
|
+
}
|
|
53
59
|
},
|
|
54
60
|
ignoreReRender: true
|
|
55
61
|
},
|
|
@@ -21,7 +21,8 @@ const Sticky = ({ children, builderAttrs, setting, style, builderProps, advanced
|
|
|
21
21
|
const createDataState = system.createStateOrContext({
|
|
22
22
|
uid: builderProps?.uid,
|
|
23
23
|
setting: {
|
|
24
|
-
display
|
|
24
|
+
display,
|
|
25
|
+
isScrollToTop
|
|
25
26
|
},
|
|
26
27
|
advanced: {
|
|
27
28
|
d: advancedDisplay
|
|
@@ -8,7 +8,6 @@ var getAttr = require('./common/getAttr.js');
|
|
|
8
8
|
var getStyle = require('./common/getStyle.js');
|
|
9
9
|
var getDisplayText = require('./common/getDisplayText.js');
|
|
10
10
|
var getClasses = require('./common/getClasses.js');
|
|
11
|
-
var dynamicSource = require('../utils/dynamic-source.js');
|
|
12
11
|
|
|
13
12
|
const Text = ({ styles, builderAttrs, style, setting, advanced, builderProps, className, isText, pageContext, elementAttrs })=>{
|
|
14
13
|
const { htmlTag: Element = 'div', excludeFlex } = setting ?? {};
|
|
@@ -58,8 +57,7 @@ const Text = ({ styles, builderAttrs, style, setting, advanced, builderProps, cl
|
|
|
58
57
|
builderProps,
|
|
59
58
|
pageContext
|
|
60
59
|
});
|
|
61
|
-
|
|
62
|
-
outputText = dynamicSource.injectProductVariantScript(outputText);
|
|
60
|
+
const outputText = system.createContent(displayText);
|
|
63
61
|
return core.template`
|
|
64
62
|
<div ${{
|
|
65
63
|
...attrs
|
|
@@ -604,21 +604,6 @@ const config = {
|
|
|
604
604
|
styles: {
|
|
605
605
|
typo: {
|
|
606
606
|
type: 'paragraph-3',
|
|
607
|
-
custom: {
|
|
608
|
-
fontSize: {
|
|
609
|
-
desktop: '12px',
|
|
610
|
-
tablet: '12px',
|
|
611
|
-
mobile: '12px',
|
|
612
|
-
edited: [
|
|
613
|
-
'desktop'
|
|
614
|
-
]
|
|
615
|
-
},
|
|
616
|
-
lineHeight: {
|
|
617
|
-
desktop: '120%',
|
|
618
|
-
tablet: '120%',
|
|
619
|
-
mobile: '120%'
|
|
620
|
-
}
|
|
621
|
-
},
|
|
622
607
|
attrs: {
|
|
623
608
|
color: 'text-1'
|
|
624
609
|
}
|
|
@@ -671,21 +656,6 @@ const config = {
|
|
|
671
656
|
styles: {
|
|
672
657
|
typo: {
|
|
673
658
|
type: 'paragraph-3',
|
|
674
|
-
custom: {
|
|
675
|
-
fontSize: {
|
|
676
|
-
desktop: '12px',
|
|
677
|
-
tablet: '12px',
|
|
678
|
-
mobile: '12px',
|
|
679
|
-
edited: [
|
|
680
|
-
'desktop'
|
|
681
|
-
]
|
|
682
|
-
},
|
|
683
|
-
lineHeight: {
|
|
684
|
-
desktop: '120%',
|
|
685
|
-
tablet: '120%',
|
|
686
|
-
mobile: '120%'
|
|
687
|
-
}
|
|
688
|
-
},
|
|
689
659
|
attrs: {
|
|
690
660
|
color: 'text-1'
|
|
691
661
|
}
|
|
@@ -738,21 +708,6 @@ const config = {
|
|
|
738
708
|
styles: {
|
|
739
709
|
typo: {
|
|
740
710
|
type: 'paragraph-3',
|
|
741
|
-
custom: {
|
|
742
|
-
fontSize: {
|
|
743
|
-
desktop: '12px',
|
|
744
|
-
tablet: '12px',
|
|
745
|
-
mobile: '12px',
|
|
746
|
-
edited: [
|
|
747
|
-
'desktop'
|
|
748
|
-
]
|
|
749
|
-
},
|
|
750
|
-
lineHeight: {
|
|
751
|
-
desktop: '120%',
|
|
752
|
-
tablet: '120%',
|
|
753
|
-
mobile: '120%'
|
|
754
|
-
}
|
|
755
|
-
},
|
|
756
711
|
attrs: {
|
|
757
712
|
color: 'text-1'
|
|
758
713
|
}
|
|
@@ -774,7 +729,10 @@ const config = {
|
|
|
774
729
|
},
|
|
775
730
|
styles: {
|
|
776
731
|
typo: {
|
|
777
|
-
type: 'subheading-
|
|
732
|
+
type: 'subheading-3',
|
|
733
|
+
attrs: {
|
|
734
|
+
color: 'text-1'
|
|
735
|
+
}
|
|
778
736
|
},
|
|
779
737
|
color: {
|
|
780
738
|
normal: 'text-2'
|
|
@@ -818,24 +776,10 @@ const config = {
|
|
|
818
776
|
},
|
|
819
777
|
styles: {
|
|
820
778
|
typo: {
|
|
821
|
-
type: 'paragraph-
|
|
822
|
-
custom: {
|
|
823
|
-
fontSize: {
|
|
824
|
-
desktop: '12px',
|
|
825
|
-
tablet: '14px',
|
|
826
|
-
mobile: '12px'
|
|
827
|
-
},
|
|
828
|
-
fontWeight: '400',
|
|
829
|
-
lineHeight: {
|
|
830
|
-
desktop: '180%',
|
|
831
|
-
tablet: '180%',
|
|
832
|
-
mobile: '180%'
|
|
833
|
-
},
|
|
834
|
-
fontFamily: 'Assistant'
|
|
835
|
-
}
|
|
779
|
+
type: 'paragraph-1'
|
|
836
780
|
},
|
|
837
781
|
color: {
|
|
838
|
-
normal: 'text-
|
|
782
|
+
normal: 'text-1'
|
|
839
783
|
}
|
|
840
784
|
},
|
|
841
785
|
advanced: {
|
|
@@ -21,21 +21,6 @@ const ArticleAuthorPresets = [
|
|
|
21
21
|
styles: {
|
|
22
22
|
typo: {
|
|
23
23
|
type: 'paragraph-3',
|
|
24
|
-
custom: {
|
|
25
|
-
fontSize: {
|
|
26
|
-
desktop: '12px',
|
|
27
|
-
tablet: '12px',
|
|
28
|
-
mobile: '12px',
|
|
29
|
-
edited: [
|
|
30
|
-
'desktop'
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
lineHeight: {
|
|
34
|
-
desktop: '120%',
|
|
35
|
-
tablet: '120%',
|
|
36
|
-
mobile: '120%'
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
24
|
attrs: {
|
|
40
25
|
color: 'text-1'
|
|
41
26
|
}
|
|
@@ -56,12 +56,10 @@ const ArticleAuthorSettings = [
|
|
|
56
56
|
default: {
|
|
57
57
|
type: 'subheading-3',
|
|
58
58
|
custom: {
|
|
59
|
-
lineHeight: {
|
|
60
|
-
desktop: '120%',
|
|
61
|
-
tablet: '120%',
|
|
62
|
-
mobile: '120%'
|
|
63
|
-
},
|
|
64
59
|
letterSpacing: '0px'
|
|
60
|
+
},
|
|
61
|
+
attrs: {
|
|
62
|
+
color: 'text-1'
|
|
65
63
|
}
|
|
66
64
|
},
|
|
67
65
|
ignoreReRender: true
|
|
@@ -10,12 +10,15 @@ const ArticleContentSettings = [
|
|
|
10
10
|
id: 'typo',
|
|
11
11
|
type: 'typography-v2',
|
|
12
12
|
default: {
|
|
13
|
-
type: '
|
|
13
|
+
type: 'paragraph-1',
|
|
14
|
+
custom: {
|
|
15
|
+
letterSpacing: '0px'
|
|
16
|
+
},
|
|
17
|
+
attrs: {
|
|
18
|
+
color: 'text-1'
|
|
19
|
+
}
|
|
14
20
|
},
|
|
15
|
-
ignoreReRender: true
|
|
16
|
-
hiddenSetting: {
|
|
17
|
-
color: true
|
|
18
|
-
}
|
|
21
|
+
ignoreReRender: true
|
|
19
22
|
},
|
|
20
23
|
{
|
|
21
24
|
id: 'textAlign',
|
|
@@ -20,21 +20,6 @@ const ArticleDatePresets = [
|
|
|
20
20
|
styles: {
|
|
21
21
|
typo: {
|
|
22
22
|
type: 'paragraph-3',
|
|
23
|
-
custom: {
|
|
24
|
-
fontSize: {
|
|
25
|
-
desktop: '12px',
|
|
26
|
-
tablet: '12px',
|
|
27
|
-
mobile: '12px',
|
|
28
|
-
edited: [
|
|
29
|
-
'desktop'
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
lineHeight: {
|
|
33
|
-
desktop: '120%',
|
|
34
|
-
tablet: '120%',
|
|
35
|
-
mobile: '120%'
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
23
|
attrs: {
|
|
39
24
|
color: '#212121'
|
|
40
25
|
}
|
|
@@ -61,11 +61,48 @@ const uiV2 = [
|
|
|
61
61
|
label: {
|
|
62
62
|
en: 'Shadow'
|
|
63
63
|
},
|
|
64
|
-
|
|
65
|
-
id: 'shadow'
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
setting: {
|
|
65
|
+
id: 'shadow'
|
|
66
|
+
},
|
|
67
|
+
options: {
|
|
68
|
+
updateFields: [
|
|
69
|
+
{
|
|
70
|
+
field: 'enable',
|
|
71
|
+
settingId: 'hasActiveShadow'
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
controlChangeTrigger: {
|
|
76
|
+
settings: [
|
|
77
|
+
{
|
|
78
|
+
condition: `shadow.enable === true`,
|
|
79
|
+
source: [
|
|
80
|
+
'shadow',
|
|
81
|
+
'hasActiveShadow'
|
|
82
|
+
],
|
|
83
|
+
action: {
|
|
84
|
+
controlId: 'hasActiveShadow',
|
|
85
|
+
groupType: 'advanced',
|
|
86
|
+
controlType: 'advanced',
|
|
87
|
+
newValue: true
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
condition: `shadow.enable === false`,
|
|
92
|
+
source: [
|
|
93
|
+
'shadow',
|
|
94
|
+
'hasActiveShadow'
|
|
95
|
+
],
|
|
96
|
+
action: {
|
|
97
|
+
controlId: 'hasActiveShadow',
|
|
98
|
+
groupType: 'advanced',
|
|
99
|
+
controlType: 'advanced',
|
|
100
|
+
newValue: false
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
options: {
|
|
105
|
+
noRecordHistory: true
|
|
69
106
|
}
|
|
70
107
|
}
|
|
71
108
|
}
|
|
@@ -101,7 +138,8 @@ const uiV2 = [
|
|
|
101
138
|
},
|
|
102
139
|
setting: {
|
|
103
140
|
id: 'openNewTab'
|
|
104
|
-
}
|
|
141
|
+
},
|
|
142
|
+
conditionDisplay: "enableLink === true && linkArticle === 'go-to-article'"
|
|
105
143
|
},
|
|
106
144
|
{
|
|
107
145
|
type: 'control',
|
|
@@ -459,13 +459,22 @@ const uiV2 = [
|
|
|
459
459
|
controls: [
|
|
460
460
|
{
|
|
461
461
|
label: {
|
|
462
|
-
en: '
|
|
462
|
+
en: 'Color'
|
|
463
463
|
},
|
|
464
464
|
setting: {
|
|
465
465
|
id: 'backgroundColorV2',
|
|
466
466
|
state: 'hover'
|
|
467
467
|
}
|
|
468
468
|
},
|
|
469
|
+
{
|
|
470
|
+
label: {
|
|
471
|
+
en: 'Image'
|
|
472
|
+
},
|
|
473
|
+
setting: {
|
|
474
|
+
id: 'backgroundImage',
|
|
475
|
+
state: 'hover'
|
|
476
|
+
}
|
|
477
|
+
},
|
|
469
478
|
{
|
|
470
479
|
label: {
|
|
471
480
|
en: 'Text color'
|
|
@@ -47,7 +47,13 @@ const ArticleTagSettings = [
|
|
|
47
47
|
id: 'typo',
|
|
48
48
|
type: 'typography-v2',
|
|
49
49
|
default: {
|
|
50
|
-
type: 'subheading-3'
|
|
50
|
+
type: 'subheading-3',
|
|
51
|
+
custom: {
|
|
52
|
+
letterSpacing: '0px'
|
|
53
|
+
},
|
|
54
|
+
attrs: {
|
|
55
|
+
color: 'text-1'
|
|
56
|
+
}
|
|
51
57
|
},
|
|
52
58
|
ignoreReRender: true
|
|
53
59
|
},
|
|
@@ -4,7 +4,6 @@ import { getAttr, getTextAttr } from './common/getAttr.js';
|
|
|
4
4
|
import { getStyle, getContainerStyle, getTextStyle } from './common/getStyle.js';
|
|
5
5
|
import { getDisplayText } from './common/getDisplayText.js';
|
|
6
6
|
import { getClasses, getTextClasses } from './common/getClasses.js';
|
|
7
|
-
import { injectProductVariantScript } from '../utils/dynamic-source.js';
|
|
8
7
|
|
|
9
8
|
const Text = ({ styles, builderAttrs, style, setting, advanced, builderProps, className, isText, pageContext, elementAttrs })=>{
|
|
10
9
|
const { htmlTag: Element = 'div', excludeFlex } = setting ?? {};
|
|
@@ -54,8 +53,7 @@ const Text = ({ styles, builderAttrs, style, setting, advanced, builderProps, cl
|
|
|
54
53
|
builderProps,
|
|
55
54
|
pageContext
|
|
56
55
|
});
|
|
57
|
-
|
|
58
|
-
outputText = injectProductVariantScript(outputText);
|
|
56
|
+
const outputText = createContent(displayText);
|
|
59
57
|
return template`
|
|
60
58
|
<div ${{
|
|
61
59
|
...attrs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.440",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@gem-sdk/core": "2.0.0-dev.435",
|
|
27
27
|
"@gem-sdk/styles": "2.0.0-dev.381",
|
|
28
|
-
"@gem-sdk/system": "2.0.0-dev.
|
|
28
|
+
"@gem-sdk/system": "2.0.0-dev.439",
|
|
29
29
|
"@types/react-transition-group": "^4.4.5"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var core = require('@gem-sdk/core');
|
|
4
|
-
var helpers = require('../../helpers.js');
|
|
5
|
-
|
|
6
|
-
const injectProductVariantScript = (text)=>{
|
|
7
|
-
try {
|
|
8
|
-
const hasTargetTag = /<gp-text-variant[^>]*data-gp-source-ownertype="PRODUCTVARIANT"[^>]*>/.test(text);
|
|
9
|
-
if (!hasTargetTag) return text;
|
|
10
|
-
// eslint-disable-next-line max-params
|
|
11
|
-
const result = text.replace(/(<gp-text-variant[^>]*>)([^<]*)(<\/gp-text-variant>)/g, (_, openTag, content, closeTag)=>{
|
|
12
|
-
return `${openTag}
|
|
13
|
-
${content}
|
|
14
|
-
${core.RenderIf(core.isLocalEnv, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-text-variant.js' | asset_url }}" defer="defer"></script>`, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="${core.baseAssetURL}/assets-v2/gp-text-variant.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
15
|
-
${closeTag}`;
|
|
16
|
-
});
|
|
17
|
-
return result;
|
|
18
|
-
} catch (error) {
|
|
19
|
-
console.error(`Error injecting product variant script: ${error}`);
|
|
20
|
-
return text;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
exports.injectProductVariantScript = injectProductVariantScript;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { RenderIf, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
|
|
2
|
-
import { getSettingPreloadData } from '../../helpers.js';
|
|
3
|
-
|
|
4
|
-
const injectProductVariantScript = (text)=>{
|
|
5
|
-
try {
|
|
6
|
-
const hasTargetTag = /<gp-text-variant[^>]*data-gp-source-ownertype="PRODUCTVARIANT"[^>]*>/.test(text);
|
|
7
|
-
if (!hasTargetTag) return text;
|
|
8
|
-
// eslint-disable-next-line max-params
|
|
9
|
-
const result = text.replace(/(<gp-text-variant[^>]*>)([^<]*)(<\/gp-text-variant>)/g, (_, openTag, content, closeTag)=>{
|
|
10
|
-
return `${openTag}
|
|
11
|
-
${content}
|
|
12
|
-
${RenderIf(isLocalEnv, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-text-variant.js' | asset_url }}" defer="defer"></script>`, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="${baseAssetURL}/assets-v2/gp-text-variant.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
13
|
-
${closeTag}`;
|
|
14
|
-
});
|
|
15
|
-
return result;
|
|
16
|
-
} catch (error) {
|
|
17
|
-
console.error(`Error injecting product variant script: ${error}`);
|
|
18
|
-
return text;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export { injectProductVariantScript };
|