@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.
Files changed (43) hide show
  1. package/dist/cjs/article/components/ArticleCategory.liquid.js +0 -1
  2. package/dist/cjs/article/setting/ArticleList.js +6 -62
  3. package/dist/cjs/article/setting/configs/ArticleAuthor/presets.js +0 -15
  4. package/dist/cjs/article/setting/configs/ArticleAuthor/settings.js +3 -5
  5. package/dist/cjs/article/setting/configs/ArticleCategory/settings.js +0 -5
  6. package/dist/cjs/article/setting/configs/ArticleContent/presets.js +0 -5
  7. package/dist/cjs/article/setting/configs/ArticleContent/settings.js +8 -5
  8. package/dist/cjs/article/setting/configs/ArticleDate/presets.js +0 -15
  9. package/dist/cjs/article/setting/configs/ArticleExcerpt/settings.js +4 -1
  10. package/dist/cjs/article/setting/configs/ArticleImage/settings.js +1 -1
  11. package/dist/cjs/article/setting/configs/ArticleImage/uiV2.js +44 -6
  12. package/dist/cjs/article/setting/configs/ArticleReadMore/uiV2.js +10 -1
  13. package/dist/cjs/article/setting/configs/ArticleTag/settings.js +7 -1
  14. package/dist/cjs/article/setting/configs/ArticleTag/uiV2.js +15 -0
  15. package/dist/cjs/article/setting/configs/ArticleTitle/presets.js +4 -1
  16. package/dist/cjs/article/setting/configs/ArticleTitle/settings.js +1 -1
  17. package/dist/cjs/article/setting/configs/ArticleTitle/uiV2.js +1 -1
  18. package/dist/cjs/banner/setting/uiV2.js +1 -2
  19. package/dist/cjs/sticky/components/Sticky.liquid.js +2 -1
  20. package/dist/cjs/text/components/Text.liquid.js +1 -3
  21. package/dist/esm/article/components/ArticleCategory.liquid.js +0 -1
  22. package/dist/esm/article/setting/ArticleList.js +6 -62
  23. package/dist/esm/article/setting/configs/ArticleAuthor/presets.js +0 -15
  24. package/dist/esm/article/setting/configs/ArticleAuthor/settings.js +3 -5
  25. package/dist/esm/article/setting/configs/ArticleCategory/settings.js +0 -5
  26. package/dist/esm/article/setting/configs/ArticleContent/presets.js +0 -5
  27. package/dist/esm/article/setting/configs/ArticleContent/settings.js +8 -5
  28. package/dist/esm/article/setting/configs/ArticleDate/presets.js +0 -15
  29. package/dist/esm/article/setting/configs/ArticleExcerpt/settings.js +4 -1
  30. package/dist/esm/article/setting/configs/ArticleImage/settings.js +1 -1
  31. package/dist/esm/article/setting/configs/ArticleImage/uiV2.js +44 -6
  32. package/dist/esm/article/setting/configs/ArticleReadMore/uiV2.js +10 -1
  33. package/dist/esm/article/setting/configs/ArticleTag/settings.js +7 -1
  34. package/dist/esm/article/setting/configs/ArticleTag/uiV2.js +15 -0
  35. package/dist/esm/article/setting/configs/ArticleTitle/presets.js +4 -1
  36. package/dist/esm/article/setting/configs/ArticleTitle/settings.js +1 -1
  37. package/dist/esm/article/setting/configs/ArticleTitle/uiV2.js +1 -1
  38. package/dist/esm/banner/setting/uiV2.js +1 -2
  39. package/dist/esm/sticky/components/Sticky.liquid.js +2 -1
  40. package/dist/esm/text/components/Text.liquid.js +1 -3
  41. package/package.json +2 -2
  42. package/dist/cjs/text/utils/dynamic-source.js +0 -24
  43. package/dist/esm/text/utils/dynamic-source.js +0 -22
@@ -8,7 +8,6 @@ var Text_liquid = require('../../text/components/Text.liquid.js');
8
8
 
9
9
  const ArticleCategory = ({ setting, styles, advanced, builderProps })=>{
10
10
  return core.template`
11
-
12
11
  ${Text_liquid.default({
13
12
  styles: styles,
14
13
  setting: {
@@ -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-2'
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-2',
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-2'
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
@@ -51,11 +51,6 @@ const ArticleCategorySettings = [
51
51
  default: {
52
52
  type: 'subheading-3',
53
53
  custom: {
54
- lineHeight: {
55
- desktop: '120%',
56
- tablet: '120%',
57
- mobile: '120%'
58
- },
59
54
  letterSpacing: '0px'
60
55
  }
61
56
  },
@@ -21,11 +21,6 @@ const ArticleContentPresets = [
21
21
  desktop: 'product-link'
22
22
  }
23
23
  },
24
- styles: {
25
- typo: {
26
- type: 'paragraph-2'
27
- }
28
- },
29
24
  advanced: {
30
25
  'spacing-setting': {
31
26
  desktop: {
@@ -12,12 +12,15 @@ const ArticleContentSettings = [
12
12
  id: 'typo',
13
13
  type: 'typography-v2',
14
14
  default: {
15
- type: 'subheading-3'
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
  }
@@ -50,8 +50,11 @@ const ArticleExcerptSettings = [
50
50
  type: 'typography-v2',
51
51
  default: {
52
52
  type: 'subheading-3',
53
+ custom: {
54
+ letterSpacing: '0px'
55
+ },
53
56
  attrs: {
54
- color: '#212121'
57
+ color: 'text-1'
55
58
  }
56
59
  },
57
60
  ignoreReRender: true
@@ -241,7 +241,7 @@ const ArticleImageSettings = [
241
241
  },
242
242
  {
243
243
  id: 'shadow',
244
- type: 'boxShadow',
244
+ type: 'shadow-v2',
245
245
  label: 'Button Shadow',
246
246
  default: {
247
247
  type: 'none',
@@ -63,11 +63,48 @@ const uiV2 = [
63
63
  label: {
64
64
  en: 'Shadow'
65
65
  },
66
- controlConfig: {
67
- id: 'shadow',
68
- type: 'shadow-v2',
69
- linkWithSetting: {
70
- name: 'shadow'
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: 'BG color'
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
  },
@@ -40,6 +40,21 @@ const uiV2 = [
40
40
  noRecordHistory: true
41
41
  }
42
42
  }
43
+ },
44
+ {
45
+ label: {
46
+ en: 'SEO'
47
+ },
48
+ controls: [
49
+ {
50
+ label: {
51
+ en: 'HTML tag'
52
+ },
53
+ setting: {
54
+ id: 'htmlTag'
55
+ }
56
+ }
57
+ ]
43
58
  }
44
59
  ]
45
60
  }
@@ -22,7 +22,10 @@ const ArticleTitlePresets = [
22
22
  },
23
23
  styles: {
24
24
  typo: {
25
- type: 'heading-4'
25
+ type: 'subheading-3',
26
+ attrs: {
27
+ color: 'text-1'
28
+ }
26
29
  }
27
30
  },
28
31
  advanced: {
@@ -101,7 +101,7 @@ const ArticleTitleSettings = [
101
101
  default: {
102
102
  type: 'subheading-3',
103
103
  attrs: {
104
- color: '#212121'
104
+ color: 'text-1'
105
105
  }
106
106
  },
107
107
  ignoreReRender: true
@@ -117,7 +117,7 @@ const uiV2 = [
117
117
  }
118
118
  },
119
119
  {
120
- conditionDisplay: 'enableLink === true',
120
+ conditionDisplay: 'enableLink === true && linkArticle === "go-to-article"',
121
121
  label: {
122
122
  en: 'Open new tab'
123
123
  },
@@ -238,8 +238,7 @@ const SettingUIV2 = [
238
238
  en: 'Shadow'
239
239
  },
240
240
  setting: {
241
- id: 'shadowBg',
242
- state: 'normal'
241
+ id: 'shadowBg'
243
242
  }
244
243
  }
245
244
  ]
@@ -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
- let outputText = system.createContent(displayText);
62
- outputText = dynamicSource.injectProductVariantScript(outputText);
60
+ const outputText = system.createContent(displayText);
63
61
  return core.template`
64
62
  <div ${{
65
63
  ...attrs
@@ -4,7 +4,6 @@ import Text from '../../text/components/Text.liquid.js';
4
4
 
5
5
  const ArticleCategory = ({ setting, styles, advanced, builderProps })=>{
6
6
  return template`
7
-
8
7
  ${Text({
9
8
  styles: styles,
10
9
  setting: {
@@ -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-2'
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-2',
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-2'
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
@@ -49,11 +49,6 @@ const ArticleCategorySettings = [
49
49
  default: {
50
50
  type: 'subheading-3',
51
51
  custom: {
52
- lineHeight: {
53
- desktop: '120%',
54
- tablet: '120%',
55
- mobile: '120%'
56
- },
57
52
  letterSpacing: '0px'
58
53
  }
59
54
  },
@@ -19,11 +19,6 @@ const ArticleContentPresets = [
19
19
  desktop: 'product-link'
20
20
  }
21
21
  },
22
- styles: {
23
- typo: {
24
- type: 'paragraph-2'
25
- }
26
- },
27
22
  advanced: {
28
23
  'spacing-setting': {
29
24
  desktop: {
@@ -10,12 +10,15 @@ const ArticleContentSettings = [
10
10
  id: 'typo',
11
11
  type: 'typography-v2',
12
12
  default: {
13
- type: 'subheading-3'
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
  }
@@ -48,8 +48,11 @@ const ArticleExcerptSettings = [
48
48
  type: 'typography-v2',
49
49
  default: {
50
50
  type: 'subheading-3',
51
+ custom: {
52
+ letterSpacing: '0px'
53
+ },
51
54
  attrs: {
52
- color: '#212121'
55
+ color: 'text-1'
53
56
  }
54
57
  },
55
58
  ignoreReRender: true
@@ -239,7 +239,7 @@ const ArticleImageSettings = [
239
239
  },
240
240
  {
241
241
  id: 'shadow',
242
- type: 'boxShadow',
242
+ type: 'shadow-v2',
243
243
  label: 'Button Shadow',
244
244
  default: {
245
245
  type: 'none',
@@ -61,11 +61,48 @@ const uiV2 = [
61
61
  label: {
62
62
  en: 'Shadow'
63
63
  },
64
- controlConfig: {
65
- id: 'shadow',
66
- type: 'shadow-v2',
67
- linkWithSetting: {
68
- name: 'shadow'
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: 'BG color'
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
  },
@@ -38,6 +38,21 @@ const uiV2 = [
38
38
  noRecordHistory: true
39
39
  }
40
40
  }
41
+ },
42
+ {
43
+ label: {
44
+ en: 'SEO'
45
+ },
46
+ controls: [
47
+ {
48
+ label: {
49
+ en: 'HTML tag'
50
+ },
51
+ setting: {
52
+ id: 'htmlTag'
53
+ }
54
+ }
55
+ ]
41
56
  }
42
57
  ]
43
58
  }
@@ -20,7 +20,10 @@ const ArticleTitlePresets = [
20
20
  },
21
21
  styles: {
22
22
  typo: {
23
- type: 'heading-4'
23
+ type: 'subheading-3',
24
+ attrs: {
25
+ color: 'text-1'
26
+ }
24
27
  }
25
28
  },
26
29
  advanced: {
@@ -99,7 +99,7 @@ const ArticleTitleSettings = [
99
99
  default: {
100
100
  type: 'subheading-3',
101
101
  attrs: {
102
- color: '#212121'
102
+ color: 'text-1'
103
103
  }
104
104
  },
105
105
  ignoreReRender: true
@@ -115,7 +115,7 @@ const uiV2 = [
115
115
  }
116
116
  },
117
117
  {
118
- conditionDisplay: 'enableLink === true',
118
+ conditionDisplay: 'enableLink === true && linkArticle === "go-to-article"',
119
119
  label: {
120
120
  en: 'Open new tab'
121
121
  },
@@ -236,8 +236,7 @@ const SettingUIV2 = [
236
236
  en: 'Shadow'
237
237
  },
238
238
  setting: {
239
- id: 'shadowBg',
240
- state: 'normal'
239
+ id: 'shadowBg'
241
240
  }
242
241
  }
243
242
  ]
@@ -17,7 +17,8 @@ const Sticky = ({ children, builderAttrs, setting, style, builderProps, advanced
17
17
  const createDataState = createStateOrContext({
18
18
  uid: builderProps?.uid,
19
19
  setting: {
20
- display
20
+ display,
21
+ isScrollToTop
21
22
  },
22
23
  advanced: {
23
24
  d: advancedDisplay
@@ -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
- let outputText = createContent(displayText);
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.437",
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.433",
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 };