@gem-sdk/components 2.0.0-dev.581 → 2.0.0-dev.582

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 (33) hide show
  1. package/dist/cjs/button/components/Button.js +4 -0
  2. package/dist/cjs/button/components/Button.liquid.js +1 -1
  3. package/dist/cjs/button/components/ButtonLabel.js +2 -1
  4. package/dist/cjs/button/components/common/styles.js +2 -2
  5. package/dist/cjs/product/components/ProductButton/common/helpers.js +0 -4
  6. package/dist/cjs/product/components/ProductButton/components/PriceLayout.js +2 -2
  7. package/dist/cjs/product/components/ProductButton/components/PriceLayout.liquid.js +5 -5
  8. package/dist/cjs/product/components/ProductButton/components/ProductButtonPrice.js +1 -3
  9. package/dist/cjs/product/components/ProductButton/components/ProductButtonPrice.liquid.js +1 -3
  10. package/dist/cjs/product/components/ProductButton/components/Separator.js +1 -0
  11. package/dist/cjs/product/components/ProductButton/components/Separator.liquid.js +1 -0
  12. package/dist/cjs/product/setting/product-button/configs/settings.js +17 -20
  13. package/dist/cjs/product/setting/product-button/configs/uiV2.js +63 -142
  14. package/dist/cjs/product/setting/product-list/configs/presets.js +10 -4
  15. package/dist/cjs/product/setting/product-view-more/configs/uiV2.js +71 -66
  16. package/dist/cjs/sticky/setting/preset-config.js +8 -2
  17. package/dist/esm/button/components/Button.js +5 -1
  18. package/dist/esm/button/components/Button.liquid.js +1 -1
  19. package/dist/esm/button/components/ButtonLabel.js +2 -1
  20. package/dist/esm/button/components/common/styles.js +2 -3
  21. package/dist/esm/product/components/ProductButton/common/helpers.js +1 -4
  22. package/dist/esm/product/components/ProductButton/components/PriceLayout.js +2 -2
  23. package/dist/esm/product/components/ProductButton/components/PriceLayout.liquid.js +5 -5
  24. package/dist/esm/product/components/ProductButton/components/ProductButtonPrice.js +2 -4
  25. package/dist/esm/product/components/ProductButton/components/ProductButtonPrice.liquid.js +2 -4
  26. package/dist/esm/product/components/ProductButton/components/Separator.js +1 -0
  27. package/dist/esm/product/components/ProductButton/components/Separator.liquid.js +1 -0
  28. package/dist/esm/product/setting/product-button/configs/settings.js +17 -20
  29. package/dist/esm/product/setting/product-button/configs/uiV2.js +63 -142
  30. package/dist/esm/product/setting/product-list/configs/presets.js +10 -4
  31. package/dist/esm/product/setting/product-view-more/configs/uiV2.js +71 -66
  32. package/dist/esm/sticky/setting/preset-config.js +8 -2
  33. package/package.json +1 -1
@@ -23,18 +23,6 @@ const SettingUIV2 = [
23
23
  newValue: true
24
24
  }
25
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
26
  {
39
27
  condition: 'buttonLayout === "cart-full"',
40
28
  source: [
@@ -83,18 +71,6 @@ const SettingUIV2 = [
83
71
  newValue: true
84
72
  }
85
73
  },
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
74
  {
99
75
  condition: 'buttonLayout === "cart-price"',
100
76
  source: [
@@ -143,18 +119,6 @@ const SettingUIV2 = [
143
119
  newValue: false
144
120
  }
145
121
  },
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
122
  {
159
123
  condition: 'buttonLayout === "cart-only"',
160
124
  source: [
@@ -203,18 +167,6 @@ const SettingUIV2 = [
203
167
  newValue: false
204
168
  }
205
169
  },
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
170
  {
219
171
  condition: 'buttonLayout === "cart-price-icon"',
220
172
  source: [
@@ -263,18 +215,6 @@ const SettingUIV2 = [
263
215
  newValue: false
264
216
  }
265
217
  },
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
218
  {
279
219
  condition: 'buttonLayout === "cart-icon"',
280
220
  source: [
@@ -322,66 +262,6 @@ const SettingUIV2 = [
322
262
  controlType: 'setting',
323
263
  newValue: false
324
264
  }
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
265
  }
386
266
  ],
387
267
  options: {
@@ -612,7 +492,7 @@ const SettingUIV2 = [
612
492
  setting: {
613
493
  id: 'iconAlign'
614
494
  },
615
- conditionDisplay: 'enableIcon === true && (["cart-full", "cart-icon", "cart-price-icon", "icon-only"].includes(buttonLayout))'
495
+ conditionDisplay: 'enableIcon === true'
616
496
  },
617
497
  {
618
498
  type: 'control',
@@ -622,36 +502,39 @@ const SettingUIV2 = [
622
502
  setting: {
623
503
  id: 'iconSpacing'
624
504
  },
625
- conditionDisplay: 'enableIcon === true && (buttonLayout == "cart-icon" || buttonLayout == "cart-price-icon")'
505
+ conditionDisplay: 'enableIcon === true'
626
506
  }
627
507
  ]
628
508
  },
629
509
  {
510
+ label: {
511
+ en: 'Text'
512
+ },
630
513
  controls: [
631
514
  {
515
+ type: 'combo',
632
516
  label: {
633
- en: 'Text style'
634
- },
635
- setting: {
636
- id: 'enableTextStyle'
517
+ en: 'Content'
637
518
  },
638
- options: {
639
- labelVariant: 'primary',
640
- toggleStyle: 'switch'
641
- }
519
+ iconName: 'polaris-text-block',
520
+ fixedValue: 'Add to cart',
521
+ getValueFromSettingID: 'label',
522
+ isHideClear: true,
523
+ controls: [
524
+ {
525
+ label: {
526
+ en: 'Content'
527
+ },
528
+ setting: {
529
+ id: 'label'
530
+ }
531
+ }
532
+ ]
642
533
  },
643
534
  {
644
- label: {
645
- en: 'Text'
646
- },
647
535
  setting: {
648
536
  id: 'typo'
649
537
  },
650
- conditionDisplay: 'enableTextStyle === true',
651
- options: {
652
- hideLabel: true,
653
- fullWidth: true
654
- },
655
538
  layout: 'vertical'
656
539
  }
657
540
  ]
@@ -697,12 +580,15 @@ const SettingUIV2 = [
697
580
  },
698
581
  {
699
582
  label: {
700
- en: 'Price text style'
583
+ en: 'Product price'
701
584
  },
702
585
  conditionDisplay: 'enablePrice === true',
703
586
  type: 'combo',
704
587
  fixedValue: 'Edit',
705
588
  iconName: 'polaris-text-title',
589
+ popoverLabel: {
590
+ en: 'Price text style'
591
+ },
706
592
  isHideClear: true,
707
593
  controls: [
708
594
  {
@@ -715,12 +601,15 @@ const SettingUIV2 = [
715
601
  },
716
602
  {
717
603
  label: {
718
- en: 'Price text style'
604
+ en: 'Compare-at'
719
605
  },
720
606
  conditionDisplay: 'enablePrice === true',
721
607
  type: 'combo',
722
608
  fixedValue: 'Edit',
723
609
  iconName: 'polaris-text-title',
610
+ popoverLabel: {
611
+ en: 'Price text style'
612
+ },
724
613
  isHideClear: true,
725
614
  controls: [
726
615
  {
@@ -959,8 +848,11 @@ const SettingUIV2 = [
959
848
  conditionDisplay: "enableMessage === true && actionEffect === 'continue-shopping'",
960
849
  type: 'combo',
961
850
  getValueFromSettingID: 'successMessage',
962
- iconName: 'polaris-text-title',
851
+ iconName: 'polaris-check-circle',
963
852
  isHideClear: true,
853
+ popoverLabel: {
854
+ en: 'Success message'
855
+ },
964
856
  controls: [
965
857
  {
966
858
  label: {
@@ -985,10 +877,39 @@ const SettingUIV2 = [
985
877
  conditionDisplay: "enableMessage === true && actionEffect === 'continue-shopping'",
986
878
  type: 'combo',
987
879
  fixedValue: 'Edit',
988
- iconName: 'polaris-text-title',
880
+ iconName: 'polaris-alert-bubble',
989
881
  getValueFromSettingID: 'errorMessage',
990
882
  isHideClear: true,
883
+ popoverLabel: {
884
+ en: 'Error message'
885
+ },
991
886
  controls: [
887
+ {
888
+ label: {
889
+ en: 'Source'
890
+ },
891
+ setting: {
892
+ id: 'errorType'
893
+ }
894
+ },
895
+ {
896
+ label: {
897
+ en: 'Add failed'
898
+ },
899
+ conditionDisplay: "errorType === 'custom'",
900
+ setting: {
901
+ id: 'errorMessage'
902
+ }
903
+ },
904
+ {
905
+ label: {
906
+ en: 'Not select variant'
907
+ },
908
+ conditionDisplay: "errorType === 'custom'",
909
+ setting: {
910
+ id: 'variantSelectionRequiredMessage'
911
+ }
912
+ },
992
913
  {
993
914
  label: {
994
915
  en: 'Content'
@@ -358,7 +358,7 @@ const ProductListPreset = [
358
358
  },
359
359
  settings: {
360
360
  actionEffect: 'open-cart-drawer',
361
- label: 'Add To cart',
361
+ label: 'Add to cart',
362
362
  outOfStockLabel: 'Out Of Stock',
363
363
  successMessage: 'Add product to cart successfully',
364
364
  errorMessage: 'Cannot add product to cart',
@@ -371,7 +371,10 @@ const ProductListPreset = [
371
371
  desktop: {
372
372
  width: '100%'
373
373
  }
374
- }
374
+ },
375
+ enableIcon: true,
376
+ enablePrice: false,
377
+ enableSeparator: false
375
378
  }
376
379
  }
377
380
  ]
@@ -749,7 +752,7 @@ const ProductListPreset = [
749
752
  },
750
753
  settings: {
751
754
  actionEffect: 'open-cart-drawer',
752
- label: 'Add To cart',
755
+ label: 'Add to cart',
753
756
  outOfStockLabel: 'Out Of Stock',
754
757
  successMessage: 'Add product to cart successfully',
755
758
  errorMessage: 'Cannot add product to cart',
@@ -762,7 +765,10 @@ const ProductListPreset = [
762
765
  desktop: {
763
766
  width: '100%'
764
767
  }
765
- }
768
+ },
769
+ enableIcon: true,
770
+ enablePrice: false,
771
+ enableSeparator: false
766
772
  }
767
773
  }
768
774
  ]
@@ -356,79 +356,84 @@ const SettingUIV2 = [
356
356
  id: 'textColorHover',
357
357
  state: 'hover'
358
358
  }
359
- },
360
- {
361
- label: {
362
- en: 'Border'
363
- },
364
- setting: {
365
- id: 'borderBtnV2',
366
- state: 'hover'
367
- }
368
- },
369
- {
370
- label: {
371
- en: 'Corner'
372
- },
373
- setting: {
374
- id: 'roundedBtnV2',
375
- state: 'hover'
376
- }
377
- },
378
- {
379
- label: {
380
- en: 'Shadow'
381
- },
382
- setting: {
383
- id: 'boxShadowBtnV2',
384
- state: 'hover'
359
+ }
360
+ ],
361
+ moreSettings: {
362
+ type: 'collapse',
363
+ controls: [
364
+ {
365
+ label: {
366
+ en: 'Border'
367
+ },
368
+ setting: {
369
+ id: 'borderBtnV2',
370
+ state: 'hover'
371
+ }
385
372
  },
386
- options: {
387
- updateFields: [
388
- {
389
- field: 'enable',
390
- settingId: 'hasBoxShadowBtn',
391
- state: 'hover'
392
- }
393
- ]
373
+ {
374
+ label: {
375
+ en: 'Corner'
376
+ },
377
+ setting: {
378
+ id: 'roundedBtnV2',
379
+ state: 'hover'
380
+ }
394
381
  },
395
- controlChangeTrigger: {
396
- settings: [
397
- {
398
- condition: `boxShadowBtnV2.hover.enable === true`,
399
- source: [
400
- 'boxShadowBtnV2',
401
- 'hasBoxShadowBtn'
402
- ],
403
- action: {
404
- controlId: 'hasBoxShadowBtn',
405
- groupType: 'advanced',
406
- controlType: 'advanced',
407
- state: 'hover',
408
- newValue: true
382
+ {
383
+ label: {
384
+ en: 'Shadow'
385
+ },
386
+ setting: {
387
+ id: 'boxShadowBtnV2',
388
+ state: 'hover'
389
+ },
390
+ options: {
391
+ updateFields: [
392
+ {
393
+ field: 'enable',
394
+ settingId: 'hasBoxShadowBtn',
395
+ state: 'hover'
409
396
  }
410
- },
411
- {
412
- condition: `boxShadowBtnV2.normal.enable === false`,
413
- source: [
414
- 'boxShadowBtnV2',
415
- 'hasBoxShadowBtn'
416
- ],
417
- action: {
418
- controlId: 'hasBoxShadowBtn',
419
- groupType: 'advanced',
420
- controlType: 'advanced',
421
- state: 'normal',
422
- newValue: false
397
+ ]
398
+ },
399
+ controlChangeTrigger: {
400
+ settings: [
401
+ {
402
+ condition: `boxShadowBtnV2.hover.enable === true`,
403
+ source: [
404
+ 'boxShadowBtnV2',
405
+ 'hasBoxShadowBtn'
406
+ ],
407
+ action: {
408
+ controlId: 'hasBoxShadowBtn',
409
+ groupType: 'advanced',
410
+ controlType: 'advanced',
411
+ state: 'hover',
412
+ newValue: true
413
+ }
414
+ },
415
+ {
416
+ condition: `boxShadowBtnV2.normal.enable === false`,
417
+ source: [
418
+ 'boxShadowBtnV2',
419
+ 'hasBoxShadowBtn'
420
+ ],
421
+ action: {
422
+ controlId: 'hasBoxShadowBtn',
423
+ groupType: 'advanced',
424
+ controlType: 'advanced',
425
+ state: 'normal',
426
+ newValue: false
427
+ }
423
428
  }
429
+ ],
430
+ options: {
431
+ noRecordHistory: true
424
432
  }
425
- ],
426
- options: {
427
- noRecordHistory: true
428
433
  }
429
434
  }
430
- }
431
- ]
435
+ ]
436
+ }
432
437
  },
433
438
  {
434
439
  label: {
@@ -884,7 +884,10 @@ const StickyPreset = {
884
884
  desktop: {
885
885
  width: '100%'
886
886
  }
887
- }
887
+ },
888
+ enableIcon: false,
889
+ enablePrice: false,
890
+ enableSeparator: false
888
891
  },
889
892
  advanced: {
890
893
  'spacing-setting': {
@@ -2013,7 +2016,10 @@ const StickyPresetProduct = {
2013
2016
  desktop: {
2014
2017
  width: '100%'
2015
2018
  }
2016
- }
2019
+ },
2020
+ enableIcon: false,
2021
+ enablePrice: false,
2022
+ enableSeparator: false
2017
2023
  },
2018
2024
  advanced: {
2019
2025
  'spacing-setting': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.581",
3
+ "version": "2.0.0-dev.582",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",