@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
@@ -10,7 +10,386 @@ const SettingUIV2 = [
10
10
  setting: {
11
11
  id: 'buttonLayout'
12
12
  },
13
- layout: 'vertical'
13
+ layout: 'vertical',
14
+ controlChangeTrigger: {
15
+ settings: [
16
+ {
17
+ condition: 'buttonLayout === "cart-full"',
18
+ source: [
19
+ 'buttonLayout'
20
+ ],
21
+ action: {
22
+ controlId: 'enableIcon',
23
+ groupType: 'style',
24
+ controlType: 'style',
25
+ newValue: true
26
+ }
27
+ },
28
+ {
29
+ condition: 'buttonLayout === "cart-full"',
30
+ source: [
31
+ 'buttonLayout'
32
+ ],
33
+ action: {
34
+ controlId: 'enableTextStyle',
35
+ groupType: 'style',
36
+ controlType: 'style',
37
+ newValue: true
38
+ }
39
+ },
40
+ {
41
+ condition: 'buttonLayout === "cart-full"',
42
+ source: [
43
+ 'buttonLayout'
44
+ ],
45
+ action: {
46
+ controlId: 'enablePrice',
47
+ groupType: 'style',
48
+ controlType: 'style',
49
+ newValue: true
50
+ }
51
+ },
52
+ {
53
+ condition: 'buttonLayout === "cart-full"',
54
+ source: [
55
+ 'buttonLayout'
56
+ ],
57
+ action: {
58
+ controlId: 'enableSeparator',
59
+ groupType: 'style',
60
+ controlType: 'style',
61
+ newValue: true
62
+ }
63
+ },
64
+ {
65
+ condition: 'buttonLayout === "cart-full"',
66
+ source: [
67
+ 'buttonLayout'
68
+ ],
69
+ action: {
70
+ controlId: 'shouldClearSpace',
71
+ groupType: 'setting',
72
+ controlType: 'setting',
73
+ newValue: false
74
+ }
75
+ },
76
+ {
77
+ condition: 'buttonLayout === "cart-price"',
78
+ source: [
79
+ 'buttonLayout'
80
+ ],
81
+ action: {
82
+ controlId: 'enableSeparator',
83
+ groupType: 'style',
84
+ controlType: 'style',
85
+ newValue: true
86
+ }
87
+ },
88
+ {
89
+ condition: 'buttonLayout === "cart-price"',
90
+ source: [
91
+ 'buttonLayout'
92
+ ],
93
+ action: {
94
+ controlId: 'enableTextStyle',
95
+ groupType: 'style',
96
+ controlType: 'style',
97
+ newValue: true
98
+ }
99
+ },
100
+ {
101
+ condition: 'buttonLayout === "cart-price"',
102
+ source: [
103
+ 'buttonLayout'
104
+ ],
105
+ action: {
106
+ controlId: 'enableSeparator',
107
+ groupType: 'style',
108
+ controlType: 'style',
109
+ newValue: true
110
+ }
111
+ },
112
+ {
113
+ condition: 'buttonLayout === "cart-price"',
114
+ source: [
115
+ 'buttonLayout'
116
+ ],
117
+ action: {
118
+ controlId: 'enablePrice',
119
+ groupType: 'style',
120
+ controlType: 'style',
121
+ newValue: true
122
+ }
123
+ },
124
+ {
125
+ condition: 'buttonLayout === "cart-price"',
126
+ source: [
127
+ 'buttonLayout'
128
+ ],
129
+ action: {
130
+ controlId: 'enableIcon',
131
+ groupType: 'style',
132
+ controlType: 'style',
133
+ newValue: false
134
+ }
135
+ },
136
+ {
137
+ condition: 'buttonLayout === "cart-price"',
138
+ source: [
139
+ 'buttonLayout'
140
+ ],
141
+ action: {
142
+ controlId: 'shouldClearSpace',
143
+ groupType: 'setting',
144
+ controlType: 'setting',
145
+ newValue: false
146
+ }
147
+ },
148
+ {
149
+ condition: 'buttonLayout === "cart-only"',
150
+ source: [
151
+ 'buttonLayout'
152
+ ],
153
+ action: {
154
+ controlId: 'enableTextStyle',
155
+ groupType: 'style',
156
+ controlType: 'style',
157
+ newValue: true
158
+ }
159
+ },
160
+ {
161
+ condition: 'buttonLayout === "cart-only"',
162
+ source: [
163
+ 'buttonLayout'
164
+ ],
165
+ action: {
166
+ controlId: 'enableIcon',
167
+ groupType: 'style',
168
+ controlType: 'style',
169
+ newValue: false
170
+ }
171
+ },
172
+ {
173
+ condition: 'buttonLayout === "cart-only"',
174
+ source: [
175
+ 'buttonLayout'
176
+ ],
177
+ action: {
178
+ controlId: 'enableSeparator',
179
+ groupType: 'style',
180
+ controlType: 'style',
181
+ newValue: false
182
+ }
183
+ },
184
+ {
185
+ condition: 'buttonLayout === "cart-only"',
186
+ source: [
187
+ 'buttonLayout'
188
+ ],
189
+ action: {
190
+ controlId: 'enablePrice',
191
+ groupType: 'style',
192
+ controlType: 'style',
193
+ newValue: false
194
+ }
195
+ },
196
+ {
197
+ condition: 'buttonLayout === "cart-only"',
198
+ source: [
199
+ 'buttonLayout'
200
+ ],
201
+ action: {
202
+ controlId: 'shouldClearSpace',
203
+ groupType: 'setting',
204
+ controlType: 'setting',
205
+ newValue: false
206
+ }
207
+ },
208
+ {
209
+ condition: 'buttonLayout === "cart-price-icon"',
210
+ source: [
211
+ 'buttonLayout'
212
+ ],
213
+ action: {
214
+ controlId: 'enableTextStyle',
215
+ groupType: 'style',
216
+ controlType: 'style',
217
+ newValue: true
218
+ }
219
+ },
220
+ {
221
+ condition: 'buttonLayout === "cart-price-icon"',
222
+ source: [
223
+ 'buttonLayout'
224
+ ],
225
+ action: {
226
+ controlId: 'enableIcon',
227
+ groupType: 'style',
228
+ controlType: 'style',
229
+ newValue: true
230
+ }
231
+ },
232
+ {
233
+ condition: 'buttonLayout === "cart-price-icon"',
234
+ source: [
235
+ 'buttonLayout'
236
+ ],
237
+ action: {
238
+ controlId: 'enableSeparator',
239
+ groupType: 'style',
240
+ controlType: 'style',
241
+ newValue: true
242
+ }
243
+ },
244
+ {
245
+ condition: 'buttonLayout === "cart-price-icon"',
246
+ source: [
247
+ 'buttonLayout'
248
+ ],
249
+ action: {
250
+ controlId: 'enablePrice',
251
+ groupType: 'style',
252
+ controlType: 'style',
253
+ newValue: true
254
+ }
255
+ },
256
+ {
257
+ condition: 'buttonLayout === "cart-price-icon"',
258
+ source: [
259
+ 'buttonLayout'
260
+ ],
261
+ action: {
262
+ controlId: 'shouldClearSpace',
263
+ groupType: 'setting',
264
+ controlType: 'setting',
265
+ newValue: false
266
+ }
267
+ },
268
+ {
269
+ condition: 'buttonLayout === "cart-icon"',
270
+ source: [
271
+ 'buttonLayout'
272
+ ],
273
+ action: {
274
+ controlId: 'enableTextStyle',
275
+ groupType: 'style',
276
+ controlType: 'style',
277
+ newValue: true
278
+ }
279
+ },
280
+ {
281
+ condition: 'buttonLayout === "cart-icon"',
282
+ source: [
283
+ 'buttonLayout'
284
+ ],
285
+ action: {
286
+ controlId: 'enableIcon',
287
+ groupType: 'style',
288
+ controlType: 'style',
289
+ newValue: true
290
+ }
291
+ },
292
+ {
293
+ condition: 'buttonLayout === "cart-icon"',
294
+ source: [
295
+ 'buttonLayout'
296
+ ],
297
+ action: {
298
+ controlId: 'enableSeparator',
299
+ groupType: 'style',
300
+ controlType: 'style',
301
+ newValue: false
302
+ }
303
+ },
304
+ {
305
+ condition: 'buttonLayout === "cart-icon"',
306
+ source: [
307
+ 'buttonLayout'
308
+ ],
309
+ action: {
310
+ controlId: 'enablePrice',
311
+ groupType: 'style',
312
+ controlType: 'style',
313
+ newValue: false
314
+ }
315
+ },
316
+ {
317
+ condition: 'buttonLayout === "cart-icon"',
318
+ source: [
319
+ 'buttonLayout'
320
+ ],
321
+ action: {
322
+ controlId: 'shouldClearSpace',
323
+ groupType: 'setting',
324
+ controlType: 'setting',
325
+ newValue: false
326
+ }
327
+ },
328
+ {
329
+ condition: 'buttonLayout === "icon-only"',
330
+ source: [
331
+ 'buttonLayout'
332
+ ],
333
+ action: {
334
+ controlId: 'enableTextStyle',
335
+ groupType: 'style',
336
+ controlType: 'style',
337
+ newValue: false
338
+ }
339
+ },
340
+ {
341
+ condition: 'buttonLayout === "icon-only"',
342
+ source: [
343
+ 'buttonLayout'
344
+ ],
345
+ action: {
346
+ controlId: 'enableIcon',
347
+ groupType: 'style',
348
+ controlType: 'style',
349
+ newValue: true
350
+ }
351
+ },
352
+ {
353
+ condition: 'buttonLayout === "icon-only"',
354
+ source: [
355
+ 'buttonLayout'
356
+ ],
357
+ action: {
358
+ controlId: 'enableSeparator',
359
+ groupType: 'style',
360
+ controlType: 'style',
361
+ newValue: false
362
+ }
363
+ },
364
+ {
365
+ condition: 'buttonLayout === "icon-only"',
366
+ source: [
367
+ 'buttonLayout'
368
+ ],
369
+ action: {
370
+ controlId: 'enablePrice',
371
+ groupType: 'style',
372
+ controlType: 'style',
373
+ newValue: false
374
+ }
375
+ },
376
+ {
377
+ condition: 'buttonLayout === "icon-only"',
378
+ source: [
379
+ 'buttonLayout'
380
+ ],
381
+ action: {
382
+ controlId: 'shouldClearSpace',
383
+ groupType: 'setting',
384
+ controlType: 'setting',
385
+ newValue: true
386
+ }
387
+ }
388
+ ],
389
+ options: {
390
+ noRecordHistory: true
391
+ }
392
+ }
14
393
  }
15
394
  ]
16
395
  },
@@ -204,7 +583,6 @@ const SettingUIV2 = [
204
583
  ]
205
584
  },
206
585
  {
207
- conditionDisplay: '["cart-full", "cart-icon", "cart-price-icon", "icon-only"].includes(buttonLayout ?? "")',
208
586
  controls: [
209
587
  {
210
588
  label: {
@@ -253,9 +631,20 @@ const SettingUIV2 = [
253
631
  {
254
632
  controls: [
255
633
  {
256
- id: 'typo',
257
634
  label: {
258
- en: 'Basic'
635
+ en: 'Text style'
636
+ },
637
+ setting: {
638
+ id: 'enableTextStyle'
639
+ },
640
+ options: {
641
+ labelVariant: 'primary',
642
+ toggleStyle: 'switch'
643
+ }
644
+ },
645
+ {
646
+ label: {
647
+ en: 'Text'
259
648
  },
260
649
  setting: {
261
650
  id: 'typo'
@@ -270,7 +659,6 @@ const SettingUIV2 = [
270
659
  ]
271
660
  },
272
661
  {
273
- conditionDisplay: '["cart-full", "cart-price", "cart-price-icon"].includes(buttonLayout ?? "")',
274
662
  controls: [
275
663
  {
276
664
  label: {
@@ -296,7 +684,6 @@ const SettingUIV2 = [
296
684
  ]
297
685
  },
298
686
  {
299
- conditionDisplay: '["cart-full", "cart-price", "cart-price-icon"].includes(buttonLayout ?? "")',
300
687
  controls: [
301
688
  {
302
689
  label: {
@@ -312,7 +699,7 @@ const SettingUIV2 = [
312
699
  },
313
700
  {
314
701
  label: {
315
- en: 'Product price'
702
+ en: 'Price text style'
316
703
  },
317
704
  conditionDisplay: 'enablePrice === true',
318
705
  type: 'combo',
@@ -330,7 +717,7 @@ const SettingUIV2 = [
330
717
  },
331
718
  {
332
719
  label: {
333
- en: 'Compare At'
720
+ en: 'Price text style'
334
721
  },
335
722
  conditionDisplay: 'enablePrice === true',
336
723
  type: 'combo',
@@ -460,16 +847,16 @@ const SettingUIV2 = [
460
847
  {
461
848
  type: 'combo',
462
849
  label: {
463
- en: 'Message'
850
+ en: 'Content'
464
851
  },
465
- iconName: 'polaris-text-title',
852
+ iconName: 'polaris-text-block',
466
853
  fixedValue: 'Out of stock',
467
854
  getValueFromSettingID: 'outOfStockLabel',
468
855
  isHideClear: true,
469
856
  controls: [
470
857
  {
471
858
  label: {
472
- en: 'Message'
859
+ en: 'Content'
473
860
  },
474
861
  setting: {
475
862
  id: 'outOfStockLabel'
@@ -501,35 +888,40 @@ const SettingUIV2 = [
501
888
  }
502
889
  }
503
890
  }
504
- },
505
- {
506
- label: {
507
- en: 'Border'
508
- },
509
- setting: {
510
- id: 'oosBorderV2',
511
- state: 'normal'
512
- }
513
- },
514
- {
515
- label: {
516
- en: 'Corner'
891
+ }
892
+ ],
893
+ moreSettings: {
894
+ type: 'collapse',
895
+ controls: [
896
+ {
897
+ label: {
898
+ en: 'Border'
899
+ },
900
+ setting: {
901
+ id: 'oosBorderV2',
902
+ state: 'normal'
903
+ }
517
904
  },
518
- setting: {
519
- id: 'oosRoundedV2',
520
- state: 'normal'
521
- }
522
- },
523
- {
524
- label: {
525
- en: 'Shadow'
905
+ {
906
+ label: {
907
+ en: 'Corner'
908
+ },
909
+ setting: {
910
+ id: 'oosRoundedV2',
911
+ state: 'normal'
912
+ }
526
913
  },
527
- setting: {
528
- id: 'oosShadowV2',
529
- state: 'normal'
914
+ {
915
+ label: {
916
+ en: 'Shadow'
917
+ },
918
+ setting: {
919
+ id: 'oosShadowV2',
920
+ state: 'normal'
921
+ }
530
922
  }
531
- }
532
- ]
923
+ ]
924
+ }
533
925
  },
534
926
  {
535
927
  label: {
@@ -49,7 +49,7 @@ const HTML5Embed = (props)=>{
49
49
  ...getClasses.getImageThumbnailClasses()
50
50
  });
51
51
  const videoYoutubeClasses = system.createClass({
52
- ...getClasses.getVideoYoutubeClasses(className, offLazyLoad, autoplay)
52
+ ...getClasses.getVideoYoutubeClasses(className, offLazyLoad)
53
53
  });
54
54
  const initPreloadPoster = ()=>{
55
55
  if (!preloadThumbnail) return '';
@@ -44,7 +44,7 @@ const HTML5Embed = (props)=>{
44
44
  ...getClasses.getImageThumbnailClasses()
45
45
  });
46
46
  const videoYoutubeClasses = system.createClass({
47
- ...getClasses.getVideoYoutubeClasses(className, offLazyLoad, autoplay)
47
+ ...getClasses.getVideoYoutubeClasses(className, offLazyLoad)
48
48
  });
49
49
  const initPreloadPoster = ()=>{
50
50
  if (!preloadThumbnail) return '';
@@ -59,7 +59,7 @@ const getArticleVimeoClasses = (posterUrl, aspectRatio)=>{
59
59
  ...composeClasses(classList)
60
60
  };
61
61
  };
62
- const getVideoYoutubeClasses = (className, offLazyLoad, autoplay)=>{
62
+ const getVideoYoutubeClasses = (className, offLazyLoad)=>{
63
63
  let classList = `gp-w-full`;
64
64
  if (className) {
65
65
  classList += ` ${className}`;
@@ -67,9 +67,6 @@ const getVideoYoutubeClasses = (className, offLazyLoad, autoplay)=>{
67
67
  if (!offLazyLoad) {
68
68
  classList += ` gp-lazyload-video`;
69
69
  }
70
- if (autoplay) {
71
- classList += ` gp-object-cover`;
72
- }
73
70
  return {
74
71
  ...composeClasses(classList)
75
72
  };
@@ -181,10 +181,12 @@ const ArticleReadMoreSettings = [
181
181
  controls: [
182
182
  {
183
183
  id: 'iconSpacing',
184
- type: 'input:unit',
184
+ type: 'input:slider',
185
185
  units: [
186
186
  'px'
187
187
  ],
188
+ step: 1,
189
+ max: 40,
188
190
  devices: {
189
191
  desktop: {
190
192
  default: '8px'
@@ -140,11 +140,6 @@ const uiV2 = [
140
140
  label: 'Full',
141
141
  value: '100%',
142
142
  showValue: true
143
- },
144
- {
145
- label: 'Default',
146
- value: 'default',
147
- showValue: true
148
143
  }
149
144
  ]
150
145
  },
@@ -314,7 +309,7 @@ const uiV2 = [
314
309
  setting: {
315
310
  id: 'iconAlign'
316
311
  },
317
- conditionDisplay: 'iconVisible == true'
312
+ conditionDisplay: `iconVisible == true && readMoreType != 'text'`
318
313
  },
319
314
  {
320
315
  type: 'control',
@@ -322,9 +317,9 @@ const uiV2 = [
322
317
  en: 'Gap'
323
318
  },
324
319
  setting: {
325
- id: 'spacing'
320
+ id: 'iconSpacing'
326
321
  },
327
- conditionDisplay: 'iconVisible == true'
322
+ conditionDisplay: `iconVisible == true && readMoreType != 'text'`
328
323
  }
329
324
  ]
330
325
  },
@@ -391,10 +386,24 @@ const uiV2 = [
391
386
  label: {
392
387
  en: 'Content'
393
388
  },
389
+ getValueFromSettingID: 'label',
390
+ iconName: 'gp-prefix',
391
+ type: 'combo',
394
392
  conditionDisplay: `readMoreType === 'text'`,
395
- setting: {
396
- id: 'label'
397
- }
393
+ defaultValueWhenClear: '',
394
+ controls: [
395
+ {
396
+ label: {
397
+ en: 'Content'
398
+ },
399
+ type: 'control',
400
+ setting: {
401
+ id: 'label'
402
+ },
403
+ layout: 'vertical',
404
+ defaultValueWhenClear: ''
405
+ }
406
+ ]
398
407
  },
399
408
  {
400
409
  id: 'typo',
@@ -68,7 +68,7 @@ const renderChildImageTemplate = (imgSrc)=>({
68
68
  height: 110
69
69
  }
70
70
  },
71
- isAdaptive: true,
71
+ isAdaptive: false,
72
72
  isNotLazyload: true
73
73
  }
74
74
  }