@gem-sdk/components 2.0.0-dev.271 → 2.0.0-dev.274

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 (31) hide show
  1. package/dist/cjs/article/components/ArticleImage.js +0 -5
  2. package/dist/cjs/article/components/ArticleList.js +1 -1
  3. package/dist/cjs/form/setting/submit-button/configs/settings.js +2 -2
  4. package/dist/cjs/marquee/setting/configs/childImageTemplate.js +1 -1
  5. package/dist/cjs/post-purchase/advanced-list/components/common/getClasses.js +1 -1
  6. package/dist/cjs/post-purchase/advanced-list/setting/configs/presets.js +3 -1
  7. package/dist/cjs/post-purchase/advanced-list/setting/configs/settings.js +2 -1
  8. package/dist/cjs/post-purchase/advanced-list/setting/template.js +8 -3
  9. package/dist/cjs/post-purchase/callout-banner/setting/config/callout-text/setting.js +0 -7
  10. package/dist/cjs/post-purchase/callout-banner/setting/config/callout-text/uiV2.js +1 -1
  11. package/dist/cjs/post-purchase/image/setting/Image.js +2 -2
  12. package/dist/cjs/post-purchase/image/setting/setting-v2.js +25 -13
  13. package/dist/cjs/post-purchase/image/setting/ui-v2.js +1 -1
  14. package/dist/cjs/post-purchase/link/setting/configs/settings.js +7 -2
  15. package/dist/cjs/post-purchase/product/settings/product-variants/configs/uiV2.js +4 -2
  16. package/dist/esm/article/components/ArticleImage.js +0 -5
  17. package/dist/esm/article/components/ArticleList.js +1 -1
  18. package/dist/esm/form/setting/submit-button/configs/settings.js +2 -2
  19. package/dist/esm/marquee/setting/configs/childImageTemplate.js +1 -1
  20. package/dist/esm/post-purchase/advanced-list/components/common/getClasses.js +1 -1
  21. package/dist/esm/post-purchase/advanced-list/setting/configs/presets.js +3 -1
  22. package/dist/esm/post-purchase/advanced-list/setting/configs/settings.js +2 -1
  23. package/dist/esm/post-purchase/advanced-list/setting/template.js +8 -3
  24. package/dist/esm/post-purchase/callout-banner/setting/config/callout-text/setting.js +0 -7
  25. package/dist/esm/post-purchase/callout-banner/setting/config/callout-text/uiV2.js +1 -1
  26. package/dist/esm/post-purchase/image/setting/Image.js +2 -2
  27. package/dist/esm/post-purchase/image/setting/setting-v2.js +25 -13
  28. package/dist/esm/post-purchase/image/setting/ui-v2.js +1 -1
  29. package/dist/esm/post-purchase/link/setting/configs/settings.js +7 -2
  30. package/dist/esm/post-purchase/product/settings/product-variants/configs/uiV2.js +4 -2
  31. package/package.json +1 -1
@@ -31,11 +31,6 @@ const ArticleImage = ({ className, setting = {}, styles = {}, advanced, builderP
31
31
  ...setting,
32
32
  alt: image.alt,
33
33
  image,
34
- srcSet: {
35
- desktop: {
36
- src: image.src ?? ''
37
- }
38
- },
39
34
  disableNoDataState: true
40
35
  },
41
36
  styles: styles,
@@ -15,7 +15,7 @@ const ArticleList = ({ styles, setting, className, children, builderProps })=>{
15
15
  const { articleSetting, numberOfArticle } = setting ?? {};
16
16
  const { articleIds, articlePickType } = articleSetting ?? {};
17
17
  const articlesQuery = {
18
- first: 10,
18
+ first: articleIds?.length ?? 50,
19
19
  where: {
20
20
  baseIDIn: [
21
21
  ...articleSetting?.articleIds ?? []
@@ -321,8 +321,8 @@ const SubmitButtonSettings = [
321
321
  height: 'Auto',
322
322
  padding: {
323
323
  type: 'medium',
324
- top: '8px',
325
- bottom: '8px',
324
+ top: '12px',
325
+ bottom: '12px',
326
326
  left: '24px',
327
327
  right: '24px'
328
328
  }
@@ -70,7 +70,7 @@ const renderChildImageTemplate = (imgSrc)=>({
70
70
  height: 110
71
71
  }
72
72
  },
73
- isAdaptive: false,
73
+ isAdaptive: true,
74
74
  isNotLazyload: true
75
75
  }
76
76
  }
@@ -13,7 +13,7 @@ const getClasses = (uid, align)=>{
13
13
  };
14
14
  };
15
15
  const getContainerClasses = ()=>{
16
- const classList = 'gp-inline-flex gp-flex-col';
16
+ const classList = 'gp-inline-flex gp-flex-col gp-w-full';
17
17
  return core.composeClasses(classList);
18
18
  };
19
19
 
@@ -24,7 +24,8 @@ const ConfigPreset = [
24
24
  settings: {
25
25
  childItem: [
26
26
  'Item 1',
27
- 'Item 2'
27
+ 'Item 2',
28
+ 'Item 3'
28
29
  ]
29
30
  },
30
31
  advanced: {
@@ -32,6 +33,7 @@ const ConfigPreset = [
32
33
  inlinePadding: 'none'
33
34
  },
34
35
  childrens: [
36
+ template.ChildTemplate,
35
37
  template.ChildTemplate,
36
38
  template.ChildTemplate
37
39
  ]
@@ -12,8 +12,9 @@ const ConfigSettings = [
12
12
  label: 'Item management',
13
13
  type: 'child-item',
14
14
  default: [
15
+ 'Item 1',
15
16
  'Item 2',
16
- 'Item 2'
17
+ 'Item 3'
17
18
  ],
18
19
  childTemplate: template.ChildTemplate
19
20
  }
@@ -36,14 +36,16 @@ const ChildTemplate = {
36
36
  label: 'Image',
37
37
  styles: {
38
38
  width: {
39
- desktop: '100px'
39
+ desktop: '32px'
40
40
  },
41
+ aspectRatio: '1',
42
+ align: 'left',
41
43
  enableBorder: 'none'
42
44
  },
43
45
  settings: {
44
46
  srcSet: {
45
47
  desktop: {
46
- src: 'https://ucarecdn.com/ee6d5074-1640-4cc7-8933-47c8589c3dee/-/format/auto/'
48
+ src: 'https://cdn.shopify.com/s/files/1/0791/2780/6265/files/gempages_468220687216018311-d69940af-f03e-4864-a612-63cd9a4dce36.png'
47
49
  }
48
50
  }
49
51
  }
@@ -61,7 +63,7 @@ const ChildTemplate = {
61
63
  text: 'Your custom text goes here'
62
64
  },
63
65
  advanced: {
64
- blockPadding: 'base'
66
+ blockPadding: 'extraTight'
65
67
  },
66
68
  styles: {
67
69
  typo: {
@@ -69,6 +71,9 @@ const ChildTemplate = {
69
71
  textColor: 'default',
70
72
  fontWeight: 'normal',
71
73
  textTransform: 'none'
74
+ },
75
+ width: {
76
+ desktop: '100%'
72
77
  }
73
78
  }
74
79
  }
@@ -78,13 +78,6 @@ const CalloutTextSettings = [
78
78
  type: 'text',
79
79
  tooltip: 'Align right',
80
80
  iconName: 'polaris-text-align-right'
81
- },
82
- {
83
- label: 'Justify',
84
- value: 'justify',
85
- type: 'text',
86
- tooltip: 'Align justify',
87
- iconName: 'gp-text-align-justify'
88
81
  }
89
82
  ],
90
83
  default: 'left'
@@ -92,7 +92,7 @@ const SettingUIV2 = [
92
92
  {
93
93
  type: 'control',
94
94
  label: {
95
- en: 'Text align'
95
+ en: 'Align'
96
96
  },
97
97
  setting: {
98
98
  id: 'textAlign'
@@ -92,7 +92,7 @@ const config = {
92
92
  hideUnit: false,
93
93
  devices: {
94
94
  desktop: {
95
- default: undefined
95
+ default: '500px'
96
96
  }
97
97
  },
98
98
  displayOptions: [
@@ -148,7 +148,7 @@ const config = {
148
148
  tooltip: 'Align right'
149
149
  }
150
150
  ],
151
- default: 'center'
151
+ default: 'left'
152
152
  },
153
153
  {
154
154
  id: 'enableBorder',
@@ -43,39 +43,51 @@ const ImagePostPurchaseSettingV2 = [
43
43
  type: 'select',
44
44
  default: 'auto',
45
45
  options: [
46
- {
47
- label: 'Original',
48
- value: 'auto'
49
- },
50
46
  {
51
47
  label: 'Square',
52
48
  value: '1',
53
49
  type: 'image-shape',
54
- icon: 'image-shape-square'
50
+ icon: 'gp-image-shape-square'
55
51
  },
56
52
  {
57
53
  label: 'Vertical',
58
54
  value: '3/4',
59
55
  type: 'image-shape',
60
- icon: 'image-shape-vertical'
56
+ icon: 'gp-image-shape-vertical'
61
57
  },
62
58
  {
63
59
  label: 'Horizontal',
64
60
  value: '4/3',
65
61
  type: 'image-shape',
66
- icon: 'image-shape-horizontal'
62
+ icon: 'gp-image-shape-horizontal'
63
+ },
64
+ {
65
+ label: 'Original',
66
+ value: 'auto'
67
67
  }
68
68
  ]
69
69
  },
70
70
  {
71
71
  id: 'width',
72
- type: 'input:unit',
72
+ type: 'dropdown:input',
73
73
  label: 'Width',
74
- min: 0,
74
+ inputType: 'number',
75
75
  units: [
76
76
  'px',
77
77
  '%'
78
78
  ],
79
+ displayOptions: [
80
+ {
81
+ label: 'Full',
82
+ value: '100%',
83
+ showValue: true
84
+ },
85
+ {
86
+ label: 'Default',
87
+ value: '1200px',
88
+ showValue: true
89
+ }
90
+ ],
79
91
  devices: {
80
92
  desktop: {
81
93
  default: '500px'
@@ -130,21 +142,21 @@ const ImagePostPurchaseSettingV2 = [
130
142
  iconName: 'gp-align-right'
131
143
  }
132
144
  ],
133
- default: 'center'
145
+ default: 'left'
134
146
  },
135
147
  {
136
148
  id: 'enableBorder',
137
- type: 'option:value',
149
+ type: 'segment',
138
150
  default: 'none',
139
151
  options: [
140
152
  {
141
- label: 'None',
142
153
  value: 'none',
154
+ iconName: 'gp-cursor-none',
143
155
  type: 'border'
144
156
  },
145
157
  {
146
- label: 'Solid',
147
158
  value: 'solid',
159
+ iconName: 'gp-line',
148
160
  type: 'border'
149
161
  }
150
162
  ]
@@ -70,7 +70,7 @@ const SettingUIV2 = [
70
70
  },
71
71
  options: {
72
72
  labelVariant: 'primary',
73
- disableMessage: `Align is not supported when width is 100%`
73
+ disableMessage: 'Horizontal alignment is disabled when the width is set to 100% or greater'
74
74
  }
75
75
  }
76
76
  ]
@@ -36,14 +36,19 @@ const PostPurchaseLinkSettings = [
36
36
  },
37
37
  displayOptions: [
38
38
  {
39
- label: 'Full',
40
- value: '100%',
39
+ label: 'Fit content',
40
+ value: 'Auto',
41
41
  showValue: true
42
42
  },
43
43
  {
44
44
  label: 'Default',
45
45
  value: '1200px',
46
46
  showValue: true
47
+ },
48
+ {
49
+ label: 'Full',
50
+ value: '100%',
51
+ showValue: true
47
52
  }
48
53
  ]
49
54
  }
@@ -148,7 +148,6 @@ const ProductVariantsSettingUIV2 = [
148
148
  ]
149
149
  },
150
150
  {
151
- conditionDisplay: "width !== '100%'",
152
151
  controls: [
153
152
  {
154
153
  label: {
@@ -157,8 +156,11 @@ const ProductVariantsSettingUIV2 = [
157
156
  setting: {
158
157
  id: 'align'
159
158
  },
159
+ conditionEnable: '!(parseInt(width) == 100 && width?.includes("%"))',
160
160
  options: {
161
- labelVariant: 'primary'
161
+ labelVariant: 'primary',
162
+ fullWidth: true,
163
+ disableMessage: `Horizontal alignment is disabled when the width is set to 100% or greater`
162
164
  }
163
165
  }
164
166
  ]
@@ -27,11 +27,6 @@ const ArticleImage = ({ className, setting = {}, styles = {}, advanced, builderP
27
27
  ...setting,
28
28
  alt: image.alt,
29
29
  image,
30
- srcSet: {
31
- desktop: {
32
- src: image.src ?? ''
33
- }
34
- },
35
30
  disableNoDataState: true
36
31
  },
37
32
  styles: styles,
@@ -11,7 +11,7 @@ const ArticleList = ({ styles, setting, className, children, builderProps })=>{
11
11
  const { articleSetting, numberOfArticle } = setting ?? {};
12
12
  const { articleIds, articlePickType } = articleSetting ?? {};
13
13
  const articlesQuery = {
14
- first: 10,
14
+ first: articleIds?.length ?? 50,
15
15
  where: {
16
16
  baseIDIn: [
17
17
  ...articleSetting?.articleIds ?? []
@@ -319,8 +319,8 @@ const SubmitButtonSettings = [
319
319
  height: 'Auto',
320
320
  padding: {
321
321
  type: 'medium',
322
- top: '8px',
323
- bottom: '8px',
322
+ top: '12px',
323
+ bottom: '12px',
324
324
  left: '24px',
325
325
  right: '24px'
326
326
  }
@@ -68,7 +68,7 @@ const renderChildImageTemplate = (imgSrc)=>({
68
68
  height: 110
69
69
  }
70
70
  },
71
- isAdaptive: false,
71
+ isAdaptive: true,
72
72
  isNotLazyload: true
73
73
  }
74
74
  }
@@ -11,7 +11,7 @@ const getClasses = (uid, align)=>{
11
11
  };
12
12
  };
13
13
  const getContainerClasses = ()=>{
14
- const classList = 'gp-inline-flex gp-flex-col';
14
+ const classList = 'gp-inline-flex gp-flex-col gp-w-full';
15
15
  return composeClasses(classList);
16
16
  };
17
17
 
@@ -22,7 +22,8 @@ const ConfigPreset = [
22
22
  settings: {
23
23
  childItem: [
24
24
  'Item 1',
25
- 'Item 2'
25
+ 'Item 2',
26
+ 'Item 3'
26
27
  ]
27
28
  },
28
29
  advanced: {
@@ -30,6 +31,7 @@ const ConfigPreset = [
30
31
  inlinePadding: 'none'
31
32
  },
32
33
  childrens: [
34
+ ChildTemplate,
33
35
  ChildTemplate,
34
36
  ChildTemplate
35
37
  ]
@@ -10,8 +10,9 @@ const ConfigSettings = [
10
10
  label: 'Item management',
11
11
  type: 'child-item',
12
12
  default: [
13
+ 'Item 1',
13
14
  'Item 2',
14
- 'Item 2'
15
+ 'Item 3'
15
16
  ],
16
17
  childTemplate: ChildTemplate
17
18
  }
@@ -34,14 +34,16 @@ const ChildTemplate = {
34
34
  label: 'Image',
35
35
  styles: {
36
36
  width: {
37
- desktop: '100px'
37
+ desktop: '32px'
38
38
  },
39
+ aspectRatio: '1',
40
+ align: 'left',
39
41
  enableBorder: 'none'
40
42
  },
41
43
  settings: {
42
44
  srcSet: {
43
45
  desktop: {
44
- src: 'https://ucarecdn.com/ee6d5074-1640-4cc7-8933-47c8589c3dee/-/format/auto/'
46
+ src: 'https://cdn.shopify.com/s/files/1/0791/2780/6265/files/gempages_468220687216018311-d69940af-f03e-4864-a612-63cd9a4dce36.png'
45
47
  }
46
48
  }
47
49
  }
@@ -59,7 +61,7 @@ const ChildTemplate = {
59
61
  text: 'Your custom text goes here'
60
62
  },
61
63
  advanced: {
62
- blockPadding: 'base'
64
+ blockPadding: 'extraTight'
63
65
  },
64
66
  styles: {
65
67
  typo: {
@@ -67,6 +69,9 @@ const ChildTemplate = {
67
69
  textColor: 'default',
68
70
  fontWeight: 'normal',
69
71
  textTransform: 'none'
72
+ },
73
+ width: {
74
+ desktop: '100%'
70
75
  }
71
76
  }
72
77
  }
@@ -76,13 +76,6 @@ const CalloutTextSettings = [
76
76
  type: 'text',
77
77
  tooltip: 'Align right',
78
78
  iconName: 'polaris-text-align-right'
79
- },
80
- {
81
- label: 'Justify',
82
- value: 'justify',
83
- type: 'text',
84
- tooltip: 'Align justify',
85
- iconName: 'gp-text-align-justify'
86
79
  }
87
80
  ],
88
81
  default: 'left'
@@ -90,7 +90,7 @@ const SettingUIV2 = [
90
90
  {
91
91
  type: 'control',
92
92
  label: {
93
- en: 'Text align'
93
+ en: 'Align'
94
94
  },
95
95
  setting: {
96
96
  id: 'textAlign'
@@ -88,7 +88,7 @@ const config = {
88
88
  hideUnit: false,
89
89
  devices: {
90
90
  desktop: {
91
- default: undefined
91
+ default: '500px'
92
92
  }
93
93
  },
94
94
  displayOptions: [
@@ -144,7 +144,7 @@ const config = {
144
144
  tooltip: 'Align right'
145
145
  }
146
146
  ],
147
- default: 'center'
147
+ default: 'left'
148
148
  },
149
149
  {
150
150
  id: 'enableBorder',
@@ -41,39 +41,51 @@ const ImagePostPurchaseSettingV2 = [
41
41
  type: 'select',
42
42
  default: 'auto',
43
43
  options: [
44
- {
45
- label: 'Original',
46
- value: 'auto'
47
- },
48
44
  {
49
45
  label: 'Square',
50
46
  value: '1',
51
47
  type: 'image-shape',
52
- icon: 'image-shape-square'
48
+ icon: 'gp-image-shape-square'
53
49
  },
54
50
  {
55
51
  label: 'Vertical',
56
52
  value: '3/4',
57
53
  type: 'image-shape',
58
- icon: 'image-shape-vertical'
54
+ icon: 'gp-image-shape-vertical'
59
55
  },
60
56
  {
61
57
  label: 'Horizontal',
62
58
  value: '4/3',
63
59
  type: 'image-shape',
64
- icon: 'image-shape-horizontal'
60
+ icon: 'gp-image-shape-horizontal'
61
+ },
62
+ {
63
+ label: 'Original',
64
+ value: 'auto'
65
65
  }
66
66
  ]
67
67
  },
68
68
  {
69
69
  id: 'width',
70
- type: 'input:unit',
70
+ type: 'dropdown:input',
71
71
  label: 'Width',
72
- min: 0,
72
+ inputType: 'number',
73
73
  units: [
74
74
  'px',
75
75
  '%'
76
76
  ],
77
+ displayOptions: [
78
+ {
79
+ label: 'Full',
80
+ value: '100%',
81
+ showValue: true
82
+ },
83
+ {
84
+ label: 'Default',
85
+ value: '1200px',
86
+ showValue: true
87
+ }
88
+ ],
77
89
  devices: {
78
90
  desktop: {
79
91
  default: '500px'
@@ -128,21 +140,21 @@ const ImagePostPurchaseSettingV2 = [
128
140
  iconName: 'gp-align-right'
129
141
  }
130
142
  ],
131
- default: 'center'
143
+ default: 'left'
132
144
  },
133
145
  {
134
146
  id: 'enableBorder',
135
- type: 'option:value',
147
+ type: 'segment',
136
148
  default: 'none',
137
149
  options: [
138
150
  {
139
- label: 'None',
140
151
  value: 'none',
152
+ iconName: 'gp-cursor-none',
141
153
  type: 'border'
142
154
  },
143
155
  {
144
- label: 'Solid',
145
156
  value: 'solid',
157
+ iconName: 'gp-line',
146
158
  type: 'border'
147
159
  }
148
160
  ]
@@ -68,7 +68,7 @@ const SettingUIV2 = [
68
68
  },
69
69
  options: {
70
70
  labelVariant: 'primary',
71
- disableMessage: `Align is not supported when width is 100%`
71
+ disableMessage: 'Horizontal alignment is disabled when the width is set to 100% or greater'
72
72
  }
73
73
  }
74
74
  ]
@@ -34,14 +34,19 @@ const PostPurchaseLinkSettings = [
34
34
  },
35
35
  displayOptions: [
36
36
  {
37
- label: 'Full',
38
- value: '100%',
37
+ label: 'Fit content',
38
+ value: 'Auto',
39
39
  showValue: true
40
40
  },
41
41
  {
42
42
  label: 'Default',
43
43
  value: '1200px',
44
44
  showValue: true
45
+ },
46
+ {
47
+ label: 'Full',
48
+ value: '100%',
49
+ showValue: true
45
50
  }
46
51
  ]
47
52
  }
@@ -146,7 +146,6 @@ const ProductVariantsSettingUIV2 = [
146
146
  ]
147
147
  },
148
148
  {
149
- conditionDisplay: "width !== '100%'",
150
149
  controls: [
151
150
  {
152
151
  label: {
@@ -155,8 +154,11 @@ const ProductVariantsSettingUIV2 = [
155
154
  setting: {
156
155
  id: 'align'
157
156
  },
157
+ conditionEnable: '!(parseInt(width) == 100 && width?.includes("%"))',
158
158
  options: {
159
- labelVariant: 'primary'
159
+ labelVariant: 'primary',
160
+ fullWidth: true,
161
+ disableMessage: `Horizontal alignment is disabled when the width is set to 100% or greater`
160
162
  }
161
163
  }
162
164
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.271",
3
+ "version": "2.0.0-dev.274",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",