@gem-sdk/components 2.0.0-dev.567 → 2.0.0-dev.569

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 (32) hide show
  1. package/dist/cjs/article/setting/configs/ArticleReadMore/settings.js +3 -1
  2. package/dist/cjs/article/setting/configs/ArticleReadMore/uiV2.js +20 -11
  3. package/dist/cjs/marquee/setting/configs/childImageTemplate.js +1 -1
  4. package/dist/cjs/product/components/ProductButton/common/constants.js +3 -3
  5. package/dist/cjs/product/components/ProductButton/common/data.js +2 -2
  6. package/dist/cjs/product/components/ProductButton/common/helpers.js +4 -12
  7. package/dist/cjs/product/components/ProductButton/common/styles.js +2 -1
  8. package/dist/cjs/product/components/ProductButton/components/PriceLayout.liquid.js +2 -2
  9. package/dist/cjs/product/components/ProductButton/components/ProductButtonPrice.js +1 -1
  10. package/dist/cjs/product/components/ProductButton/components/ProductButtonPrice.liquid.js +1 -1
  11. package/dist/cjs/product/setting/product-button/configs/settings.js +12 -3
  12. package/dist/cjs/product/setting/product-button/configs/uiV2.js +429 -37
  13. package/dist/cjs/video/components/HTML5Embed.js +1 -1
  14. package/dist/cjs/video/components/HTML5Embed.liquid.js +1 -1
  15. package/dist/cjs/video/components/common/getClasses.js +1 -4
  16. package/dist/esm/article/setting/configs/ArticleReadMore/settings.js +3 -1
  17. package/dist/esm/article/setting/configs/ArticleReadMore/uiV2.js +20 -11
  18. package/dist/esm/marquee/setting/configs/childImageTemplate.js +1 -1
  19. package/dist/esm/product/components/ProductButton/common/constants.js +3 -3
  20. package/dist/esm/product/components/ProductButton/common/data.js +2 -2
  21. package/dist/esm/product/components/ProductButton/common/helpers.js +4 -12
  22. package/dist/esm/product/components/ProductButton/common/styles.js +2 -1
  23. package/dist/esm/product/components/ProductButton/components/PriceLayout.liquid.js +2 -2
  24. package/dist/esm/product/components/ProductButton/components/ProductButtonPrice.js +1 -1
  25. package/dist/esm/product/components/ProductButton/components/ProductButtonPrice.liquid.js +1 -1
  26. package/dist/esm/product/setting/product-button/configs/settings.js +12 -3
  27. package/dist/esm/product/setting/product-button/configs/uiV2.js +429 -37
  28. package/dist/esm/video/components/HTML5Embed.js +1 -1
  29. package/dist/esm/video/components/HTML5Embed.liquid.js +1 -1
  30. package/dist/esm/video/components/common/getClasses.js +1 -4
  31. package/dist/types/index.d.ts +1 -0
  32. package/package.json +3 -3
@@ -8,7 +8,386 @@ const SettingUIV2 = [
8
8
  setting: {
9
9
  id: 'buttonLayout'
10
10
  },
11
- layout: 'vertical'
11
+ layout: 'vertical',
12
+ controlChangeTrigger: {
13
+ settings: [
14
+ {
15
+ condition: 'buttonLayout === "cart-full"',
16
+ source: [
17
+ 'buttonLayout'
18
+ ],
19
+ action: {
20
+ controlId: 'enableIcon',
21
+ groupType: 'style',
22
+ controlType: 'style',
23
+ newValue: true
24
+ }
25
+ },
26
+ {
27
+ condition: 'buttonLayout === "cart-full"',
28
+ source: [
29
+ 'buttonLayout'
30
+ ],
31
+ action: {
32
+ controlId: 'enableTextStyle',
33
+ groupType: 'style',
34
+ controlType: 'style',
35
+ newValue: true
36
+ }
37
+ },
38
+ {
39
+ condition: 'buttonLayout === "cart-full"',
40
+ source: [
41
+ 'buttonLayout'
42
+ ],
43
+ action: {
44
+ controlId: 'enablePrice',
45
+ groupType: 'style',
46
+ controlType: 'style',
47
+ newValue: true
48
+ }
49
+ },
50
+ {
51
+ condition: 'buttonLayout === "cart-full"',
52
+ source: [
53
+ 'buttonLayout'
54
+ ],
55
+ action: {
56
+ controlId: 'enableSeparator',
57
+ groupType: 'style',
58
+ controlType: 'style',
59
+ newValue: true
60
+ }
61
+ },
62
+ {
63
+ condition: 'buttonLayout === "cart-full"',
64
+ source: [
65
+ 'buttonLayout'
66
+ ],
67
+ action: {
68
+ controlId: 'shouldClearSpace',
69
+ groupType: 'setting',
70
+ controlType: 'setting',
71
+ newValue: false
72
+ }
73
+ },
74
+ {
75
+ condition: 'buttonLayout === "cart-price"',
76
+ source: [
77
+ 'buttonLayout'
78
+ ],
79
+ action: {
80
+ controlId: 'enableSeparator',
81
+ groupType: 'style',
82
+ controlType: 'style',
83
+ newValue: true
84
+ }
85
+ },
86
+ {
87
+ condition: 'buttonLayout === "cart-price"',
88
+ source: [
89
+ 'buttonLayout'
90
+ ],
91
+ action: {
92
+ controlId: 'enableTextStyle',
93
+ groupType: 'style',
94
+ controlType: 'style',
95
+ newValue: true
96
+ }
97
+ },
98
+ {
99
+ condition: 'buttonLayout === "cart-price"',
100
+ source: [
101
+ 'buttonLayout'
102
+ ],
103
+ action: {
104
+ controlId: 'enableSeparator',
105
+ groupType: 'style',
106
+ controlType: 'style',
107
+ newValue: true
108
+ }
109
+ },
110
+ {
111
+ condition: 'buttonLayout === "cart-price"',
112
+ source: [
113
+ 'buttonLayout'
114
+ ],
115
+ action: {
116
+ controlId: 'enablePrice',
117
+ groupType: 'style',
118
+ controlType: 'style',
119
+ newValue: true
120
+ }
121
+ },
122
+ {
123
+ condition: 'buttonLayout === "cart-price"',
124
+ source: [
125
+ 'buttonLayout'
126
+ ],
127
+ action: {
128
+ controlId: 'enableIcon',
129
+ groupType: 'style',
130
+ controlType: 'style',
131
+ newValue: false
132
+ }
133
+ },
134
+ {
135
+ condition: 'buttonLayout === "cart-price"',
136
+ source: [
137
+ 'buttonLayout'
138
+ ],
139
+ action: {
140
+ controlId: 'shouldClearSpace',
141
+ groupType: 'setting',
142
+ controlType: 'setting',
143
+ newValue: false
144
+ }
145
+ },
146
+ {
147
+ condition: 'buttonLayout === "cart-only"',
148
+ source: [
149
+ 'buttonLayout'
150
+ ],
151
+ action: {
152
+ controlId: 'enableTextStyle',
153
+ groupType: 'style',
154
+ controlType: 'style',
155
+ newValue: true
156
+ }
157
+ },
158
+ {
159
+ condition: 'buttonLayout === "cart-only"',
160
+ source: [
161
+ 'buttonLayout'
162
+ ],
163
+ action: {
164
+ controlId: 'enableIcon',
165
+ groupType: 'style',
166
+ controlType: 'style',
167
+ newValue: false
168
+ }
169
+ },
170
+ {
171
+ condition: 'buttonLayout === "cart-only"',
172
+ source: [
173
+ 'buttonLayout'
174
+ ],
175
+ action: {
176
+ controlId: 'enableSeparator',
177
+ groupType: 'style',
178
+ controlType: 'style',
179
+ newValue: false
180
+ }
181
+ },
182
+ {
183
+ condition: 'buttonLayout === "cart-only"',
184
+ source: [
185
+ 'buttonLayout'
186
+ ],
187
+ action: {
188
+ controlId: 'enablePrice',
189
+ groupType: 'style',
190
+ controlType: 'style',
191
+ newValue: false
192
+ }
193
+ },
194
+ {
195
+ condition: 'buttonLayout === "cart-only"',
196
+ source: [
197
+ 'buttonLayout'
198
+ ],
199
+ action: {
200
+ controlId: 'shouldClearSpace',
201
+ groupType: 'setting',
202
+ controlType: 'setting',
203
+ newValue: false
204
+ }
205
+ },
206
+ {
207
+ condition: 'buttonLayout === "cart-price-icon"',
208
+ source: [
209
+ 'buttonLayout'
210
+ ],
211
+ action: {
212
+ controlId: 'enableTextStyle',
213
+ groupType: 'style',
214
+ controlType: 'style',
215
+ newValue: true
216
+ }
217
+ },
218
+ {
219
+ condition: 'buttonLayout === "cart-price-icon"',
220
+ source: [
221
+ 'buttonLayout'
222
+ ],
223
+ action: {
224
+ controlId: 'enableIcon',
225
+ groupType: 'style',
226
+ controlType: 'style',
227
+ newValue: true
228
+ }
229
+ },
230
+ {
231
+ condition: 'buttonLayout === "cart-price-icon"',
232
+ source: [
233
+ 'buttonLayout'
234
+ ],
235
+ action: {
236
+ controlId: 'enableSeparator',
237
+ groupType: 'style',
238
+ controlType: 'style',
239
+ newValue: true
240
+ }
241
+ },
242
+ {
243
+ condition: 'buttonLayout === "cart-price-icon"',
244
+ source: [
245
+ 'buttonLayout'
246
+ ],
247
+ action: {
248
+ controlId: 'enablePrice',
249
+ groupType: 'style',
250
+ controlType: 'style',
251
+ newValue: true
252
+ }
253
+ },
254
+ {
255
+ condition: 'buttonLayout === "cart-price-icon"',
256
+ source: [
257
+ 'buttonLayout'
258
+ ],
259
+ action: {
260
+ controlId: 'shouldClearSpace',
261
+ groupType: 'setting',
262
+ controlType: 'setting',
263
+ newValue: false
264
+ }
265
+ },
266
+ {
267
+ condition: 'buttonLayout === "cart-icon"',
268
+ source: [
269
+ 'buttonLayout'
270
+ ],
271
+ action: {
272
+ controlId: 'enableTextStyle',
273
+ groupType: 'style',
274
+ controlType: 'style',
275
+ newValue: true
276
+ }
277
+ },
278
+ {
279
+ condition: 'buttonLayout === "cart-icon"',
280
+ source: [
281
+ 'buttonLayout'
282
+ ],
283
+ action: {
284
+ controlId: 'enableIcon',
285
+ groupType: 'style',
286
+ controlType: 'style',
287
+ newValue: true
288
+ }
289
+ },
290
+ {
291
+ condition: 'buttonLayout === "cart-icon"',
292
+ source: [
293
+ 'buttonLayout'
294
+ ],
295
+ action: {
296
+ controlId: 'enableSeparator',
297
+ groupType: 'style',
298
+ controlType: 'style',
299
+ newValue: false
300
+ }
301
+ },
302
+ {
303
+ condition: 'buttonLayout === "cart-icon"',
304
+ source: [
305
+ 'buttonLayout'
306
+ ],
307
+ action: {
308
+ controlId: 'enablePrice',
309
+ groupType: 'style',
310
+ controlType: 'style',
311
+ newValue: false
312
+ }
313
+ },
314
+ {
315
+ condition: 'buttonLayout === "cart-icon"',
316
+ source: [
317
+ 'buttonLayout'
318
+ ],
319
+ action: {
320
+ controlId: 'shouldClearSpace',
321
+ groupType: 'setting',
322
+ controlType: 'setting',
323
+ newValue: false
324
+ }
325
+ },
326
+ {
327
+ condition: 'buttonLayout === "icon-only"',
328
+ source: [
329
+ 'buttonLayout'
330
+ ],
331
+ action: {
332
+ controlId: 'enableTextStyle',
333
+ groupType: 'style',
334
+ controlType: 'style',
335
+ newValue: false
336
+ }
337
+ },
338
+ {
339
+ condition: 'buttonLayout === "icon-only"',
340
+ source: [
341
+ 'buttonLayout'
342
+ ],
343
+ action: {
344
+ controlId: 'enableIcon',
345
+ groupType: 'style',
346
+ controlType: 'style',
347
+ newValue: true
348
+ }
349
+ },
350
+ {
351
+ condition: 'buttonLayout === "icon-only"',
352
+ source: [
353
+ 'buttonLayout'
354
+ ],
355
+ action: {
356
+ controlId: 'enableSeparator',
357
+ groupType: 'style',
358
+ controlType: 'style',
359
+ newValue: false
360
+ }
361
+ },
362
+ {
363
+ condition: 'buttonLayout === "icon-only"',
364
+ source: [
365
+ 'buttonLayout'
366
+ ],
367
+ action: {
368
+ controlId: 'enablePrice',
369
+ groupType: 'style',
370
+ controlType: 'style',
371
+ newValue: false
372
+ }
373
+ },
374
+ {
375
+ condition: 'buttonLayout === "icon-only"',
376
+ source: [
377
+ 'buttonLayout'
378
+ ],
379
+ action: {
380
+ controlId: 'shouldClearSpace',
381
+ groupType: 'setting',
382
+ controlType: 'setting',
383
+ newValue: true
384
+ }
385
+ }
386
+ ],
387
+ options: {
388
+ noRecordHistory: true
389
+ }
390
+ }
12
391
  }
13
392
  ]
14
393
  },
@@ -202,7 +581,6 @@ const SettingUIV2 = [
202
581
  ]
203
582
  },
204
583
  {
205
- conditionDisplay: '["cart-full", "cart-icon", "cart-price-icon", "icon-only"].includes(buttonLayout ?? "")',
206
584
  controls: [
207
585
  {
208
586
  label: {
@@ -251,9 +629,20 @@ const SettingUIV2 = [
251
629
  {
252
630
  controls: [
253
631
  {
254
- id: 'typo',
255
632
  label: {
256
- en: 'Basic'
633
+ en: 'Text style'
634
+ },
635
+ setting: {
636
+ id: 'enableTextStyle'
637
+ },
638
+ options: {
639
+ labelVariant: 'primary',
640
+ toggleStyle: 'switch'
641
+ }
642
+ },
643
+ {
644
+ label: {
645
+ en: 'Text'
257
646
  },
258
647
  setting: {
259
648
  id: 'typo'
@@ -268,7 +657,6 @@ const SettingUIV2 = [
268
657
  ]
269
658
  },
270
659
  {
271
- conditionDisplay: '["cart-full", "cart-price", "cart-price-icon"].includes(buttonLayout ?? "")',
272
660
  controls: [
273
661
  {
274
662
  label: {
@@ -294,7 +682,6 @@ const SettingUIV2 = [
294
682
  ]
295
683
  },
296
684
  {
297
- conditionDisplay: '["cart-full", "cart-price", "cart-price-icon"].includes(buttonLayout ?? "")',
298
685
  controls: [
299
686
  {
300
687
  label: {
@@ -310,7 +697,7 @@ const SettingUIV2 = [
310
697
  },
311
698
  {
312
699
  label: {
313
- en: 'Product price'
700
+ en: 'Price text style'
314
701
  },
315
702
  conditionDisplay: 'enablePrice === true',
316
703
  type: 'combo',
@@ -328,7 +715,7 @@ const SettingUIV2 = [
328
715
  },
329
716
  {
330
717
  label: {
331
- en: 'Compare At'
718
+ en: 'Price text style'
332
719
  },
333
720
  conditionDisplay: 'enablePrice === true',
334
721
  type: 'combo',
@@ -458,16 +845,16 @@ const SettingUIV2 = [
458
845
  {
459
846
  type: 'combo',
460
847
  label: {
461
- en: 'Message'
848
+ en: 'Content'
462
849
  },
463
- iconName: 'polaris-text-title',
850
+ iconName: 'polaris-text-block',
464
851
  fixedValue: 'Out of stock',
465
852
  getValueFromSettingID: 'outOfStockLabel',
466
853
  isHideClear: true,
467
854
  controls: [
468
855
  {
469
856
  label: {
470
- en: 'Message'
857
+ en: 'Content'
471
858
  },
472
859
  setting: {
473
860
  id: 'outOfStockLabel'
@@ -499,35 +886,40 @@ const SettingUIV2 = [
499
886
  }
500
887
  }
501
888
  }
502
- },
503
- {
504
- label: {
505
- en: 'Border'
506
- },
507
- setting: {
508
- id: 'oosBorderV2',
509
- state: 'normal'
510
- }
511
- },
512
- {
513
- label: {
514
- en: 'Corner'
889
+ }
890
+ ],
891
+ moreSettings: {
892
+ type: 'collapse',
893
+ controls: [
894
+ {
895
+ label: {
896
+ en: 'Border'
897
+ },
898
+ setting: {
899
+ id: 'oosBorderV2',
900
+ state: 'normal'
901
+ }
515
902
  },
516
- setting: {
517
- id: 'oosRoundedV2',
518
- state: 'normal'
519
- }
520
- },
521
- {
522
- label: {
523
- en: 'Shadow'
903
+ {
904
+ label: {
905
+ en: 'Corner'
906
+ },
907
+ setting: {
908
+ id: 'oosRoundedV2',
909
+ state: 'normal'
910
+ }
524
911
  },
525
- setting: {
526
- id: 'oosShadowV2',
527
- state: 'normal'
912
+ {
913
+ label: {
914
+ en: 'Shadow'
915
+ },
916
+ setting: {
917
+ id: 'oosShadowV2',
918
+ state: 'normal'
919
+ }
528
920
  }
529
- }
530
- ]
921
+ ]
922
+ }
531
923
  },
532
924
  {
533
925
  label: {
@@ -45,7 +45,7 @@ const HTML5Embed = (props)=>{
45
45
  ...getImageThumbnailClasses()
46
46
  });
47
47
  const videoYoutubeClasses = createClass({
48
- ...getVideoYoutubeClasses(className, offLazyLoad, autoplay)
48
+ ...getVideoYoutubeClasses(className, offLazyLoad)
49
49
  });
50
50
  const initPreloadPoster = ()=>{
51
51
  if (!preloadThumbnail) return '';
@@ -40,7 +40,7 @@ const HTML5Embed = (props)=>{
40
40
  ...getImageThumbnailClasses()
41
41
  });
42
42
  const videoYoutubeClasses = createClass({
43
- ...getVideoYoutubeClasses(className, offLazyLoad, autoplay)
43
+ ...getVideoYoutubeClasses(className, offLazyLoad)
44
44
  });
45
45
  const initPreloadPoster = ()=>{
46
46
  if (!preloadThumbnail) return '';
@@ -57,7 +57,7 @@ const getArticleVimeoClasses = (posterUrl, aspectRatio)=>{
57
57
  ...composeClasses(classList)
58
58
  };
59
59
  };
60
- const getVideoYoutubeClasses = (className, offLazyLoad, autoplay)=>{
60
+ const getVideoYoutubeClasses = (className, offLazyLoad)=>{
61
61
  let classList = `gp-w-full`;
62
62
  if (className) {
63
63
  classList += ` ${className}`;
@@ -65,9 +65,6 @@ const getVideoYoutubeClasses = (className, offLazyLoad, autoplay)=>{
65
65
  if (!offLazyLoad) {
66
66
  classList += ` gp-lazyload-video`;
67
67
  }
68
- if (autoplay) {
69
- classList += ` gp-object-cover`;
70
- }
71
68
  return {
72
69
  ...composeClasses(classList)
73
70
  };
@@ -447,6 +447,7 @@ type ArticleReadMoreStyles = TextProps['styles'] & ButtonProps['styles'] & {
447
447
  alignBtn?: ObjectDevices$1<AlignProp>;
448
448
  alignText?: ObjectDevices$1<AlignProp>;
449
449
  background?: ObjectDevices$1<BackgroundMedia>;
450
+ iconSpacing?: ObjectDevices$1<string>;
450
451
  };
451
452
  type ArticleReadMoreProps = BasePropsWrap<ArticleReadMoreSetting, ArticleReadMoreStyles> & {
452
453
  className?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.567",
3
+ "version": "2.0.0-dev.569",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -23,8 +23,8 @@
23
23
  "update-img-src-3rd": "node ./scripts/update-img-src-3rd.js"
24
24
  },
25
25
  "devDependencies": {
26
- "@gem-sdk/core": "2.0.0-dev.561",
27
- "@gem-sdk/styles": "2.0.0-dev.535",
26
+ "@gem-sdk/core": "2.0.0-dev.569",
27
+ "@gem-sdk/styles": "2.0.0-dev.569",
28
28
  "@gem-sdk/system": "2.0.0-dev.504",
29
29
  "@types/react-transition-group": "^4.4.5"
30
30
  },