@gem-sdk/components 2.0.0-dev.246 → 2.0.0-dev.248

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 (80) hide show
  1. package/dist/cjs/article/setting/configs/ArticleReadMore/settings.js +1 -1
  2. package/dist/cjs/article/setting/configs/ArticleReadMore/uiV2.js +4 -0
  3. package/dist/cjs/breadcrumb/setting/configs/settings.js +1 -1
  4. package/dist/cjs/breadcrumb/setting/configs/uiV2.js +2 -1
  5. package/dist/cjs/button/setting/configs/settings.js +1 -1
  6. package/dist/cjs/button/setting/configs/uiV2.js +2 -1
  7. package/dist/cjs/collection/setting/collection-description/configs/settings.js +1 -1
  8. package/dist/cjs/collection/setting/collection-description/configs/uiV2.js +2 -1
  9. package/dist/cjs/collection/setting/collection-toolbar/configs/settings.js +1 -1
  10. package/dist/cjs/collection/setting/collection-toolbar/configs/uiV2.js +2 -1
  11. package/dist/cjs/form/setting/submit-button/configs/settings.js +1 -1
  12. package/dist/cjs/form/setting/submit-button/configs/uiV2.js +2 -1
  13. package/dist/cjs/image-comparison/setting/configs/settings.js +1 -1
  14. package/dist/cjs/image-comparison/setting/configs/uiV2.js +2 -1
  15. package/dist/cjs/marquee/setting/configs/settingsV2.js +1 -1
  16. package/dist/cjs/marquee/setting/configs/uiV2.js +2 -1
  17. package/dist/cjs/post-purchase/callout-banner/setting/config/callout-text/setting.js +21 -3
  18. package/dist/cjs/post-purchase/product/common/getAttrs.js +10 -0
  19. package/dist/cjs/post-purchase/product/common/getClasses.js +12 -0
  20. package/dist/cjs/post-purchase/product/common/getSettings.js +9 -0
  21. package/dist/cjs/post-purchase/product/common/getStyles.js +10 -0
  22. package/dist/cjs/post-purchase/product/components/ProductDiscountTag.js +34 -13
  23. package/dist/cjs/post-purchase/product/settings/index.js +1 -1
  24. package/dist/cjs/post-purchase/product/settings/{ProductDiscountTag.js → product-discount-tag/ProductDiscountTag.js} +7 -89
  25. package/dist/cjs/post-purchase/product/settings/product-discount-tag/settingV2.js +63 -0
  26. package/dist/cjs/post-purchase/product/settings/product-discount-tag/uiV1.js +52 -0
  27. package/dist/cjs/post-purchase/product/settings/product-discount-tag/uiV2.js +67 -0
  28. package/dist/cjs/product/setting/product-button/configs/settings.js +2 -2
  29. package/dist/cjs/product/setting/product-button/configs/uiV2.js +4 -2
  30. package/dist/cjs/product/setting/product-description/configs/settings.js +1 -1
  31. package/dist/cjs/product/setting/product-description/configs/uiV2.js +2 -1
  32. package/dist/cjs/product/setting/product-list/configs/settingsV2.js +2 -2
  33. package/dist/cjs/product/setting/product-list/configs/uiV2.js +2 -1
  34. package/dist/cjs/product/setting/product-title/configs/settings.js +2 -2
  35. package/dist/cjs/product/setting/product-title/configs/uiV2.js +2 -1
  36. package/dist/cjs/product/setting/product-vendor/configs/settings.js +1 -1
  37. package/dist/cjs/product/setting/product-vendor/configs/uiV2.js +2 -1
  38. package/dist/cjs/stock-counter/setting/configs/settings.js +2 -2
  39. package/dist/cjs/stock-counter/setting/configs/uiV2.js +2 -1
  40. package/dist/esm/article/setting/configs/ArticleReadMore/settings.js +1 -1
  41. package/dist/esm/article/setting/configs/ArticleReadMore/uiV2.js +4 -0
  42. package/dist/esm/breadcrumb/setting/configs/settings.js +1 -1
  43. package/dist/esm/breadcrumb/setting/configs/uiV2.js +2 -1
  44. package/dist/esm/button/setting/configs/settings.js +1 -1
  45. package/dist/esm/button/setting/configs/uiV2.js +2 -1
  46. package/dist/esm/collection/setting/collection-description/configs/settings.js +1 -1
  47. package/dist/esm/collection/setting/collection-description/configs/uiV2.js +2 -1
  48. package/dist/esm/collection/setting/collection-toolbar/configs/settings.js +1 -1
  49. package/dist/esm/collection/setting/collection-toolbar/configs/uiV2.js +2 -1
  50. package/dist/esm/form/setting/submit-button/configs/settings.js +1 -1
  51. package/dist/esm/form/setting/submit-button/configs/uiV2.js +2 -1
  52. package/dist/esm/image-comparison/setting/configs/settings.js +1 -1
  53. package/dist/esm/image-comparison/setting/configs/uiV2.js +2 -1
  54. package/dist/esm/marquee/setting/configs/settingsV2.js +1 -1
  55. package/dist/esm/marquee/setting/configs/uiV2.js +2 -1
  56. package/dist/esm/post-purchase/callout-banner/setting/config/callout-text/setting.js +21 -3
  57. package/dist/esm/post-purchase/product/common/getAttrs.js +8 -0
  58. package/dist/esm/post-purchase/product/common/getClasses.js +10 -0
  59. package/dist/esm/post-purchase/product/common/getSettings.js +7 -0
  60. package/dist/esm/post-purchase/product/common/getStyles.js +8 -0
  61. package/dist/esm/post-purchase/product/components/ProductDiscountTag.js +35 -14
  62. package/dist/esm/post-purchase/product/settings/index.js +1 -1
  63. package/dist/esm/post-purchase/product/settings/{ProductDiscountTag.js → product-discount-tag/ProductDiscountTag.js} +7 -89
  64. package/dist/esm/post-purchase/product/settings/product-discount-tag/settingV2.js +61 -0
  65. package/dist/esm/post-purchase/product/settings/product-discount-tag/uiV1.js +50 -0
  66. package/dist/esm/post-purchase/product/settings/product-discount-tag/uiV2.js +65 -0
  67. package/dist/esm/product/setting/product-button/configs/settings.js +2 -2
  68. package/dist/esm/product/setting/product-button/configs/uiV2.js +4 -2
  69. package/dist/esm/product/setting/product-description/configs/settings.js +1 -1
  70. package/dist/esm/product/setting/product-description/configs/uiV2.js +2 -1
  71. package/dist/esm/product/setting/product-list/configs/settingsV2.js +2 -2
  72. package/dist/esm/product/setting/product-list/configs/uiV2.js +2 -1
  73. package/dist/esm/product/setting/product-title/configs/settings.js +2 -2
  74. package/dist/esm/product/setting/product-title/configs/uiV2.js +2 -1
  75. package/dist/esm/product/setting/product-vendor/configs/settings.js +1 -1
  76. package/dist/esm/product/setting/product-vendor/configs/uiV2.js +2 -1
  77. package/dist/esm/stock-counter/setting/configs/settings.js +2 -2
  78. package/dist/esm/stock-counter/setting/configs/uiV2.js +2 -1
  79. package/dist/types/index.d.ts +16 -14
  80. package/package.json +2 -2
@@ -0,0 +1,50 @@
1
+ const uiV1 = [
2
+ {
3
+ type: 'group',
4
+ label: {
5
+ en: ''
6
+ },
7
+ controls: [
8
+ {
9
+ type: 'control',
10
+ label: {
11
+ en: ''
12
+ },
13
+ setting: {
14
+ id: 'discountAndShippingFee'
15
+ },
16
+ layout: 'vertical'
17
+ }
18
+ ]
19
+ },
20
+ {
21
+ type: 'group',
22
+ label: {
23
+ en: 'Text'
24
+ },
25
+ controls: [
26
+ {
27
+ type: 'control',
28
+ label: {
29
+ en: ''
30
+ },
31
+ setting: {
32
+ id: 'message'
33
+ },
34
+ layout: 'vertical'
35
+ },
36
+ {
37
+ type: 'control',
38
+ label: {
39
+ en: ''
40
+ },
41
+ setting: {
42
+ id: 'typo'
43
+ },
44
+ layout: 'vertical'
45
+ }
46
+ ]
47
+ }
48
+ ];
49
+
50
+ export { uiV1 };
@@ -0,0 +1,65 @@
1
+ const uiV2 = [
2
+ {
3
+ controls: [
4
+ {
5
+ type: 'control',
6
+ label: {
7
+ en: ''
8
+ },
9
+ setting: {
10
+ id: 'discountAndShippingFee'
11
+ },
12
+ layout: 'vertical'
13
+ }
14
+ ]
15
+ },
16
+ {
17
+ label: {
18
+ en: 'Text'
19
+ },
20
+ controls: [
21
+ {
22
+ type: 'control',
23
+ label: {
24
+ en: 'Direction'
25
+ },
26
+ setting: {
27
+ id: 'direction'
28
+ }
29
+ },
30
+ {
31
+ type: 'combo',
32
+ label: {
33
+ en: 'Content'
34
+ },
35
+ iconName: 'polaris-text-block',
36
+ getValueFromSettingID: 'message',
37
+ isHideClear: true,
38
+ controls: [
39
+ {
40
+ label: {
41
+ en: 'Content'
42
+ },
43
+ setting: {
44
+ id: 'message'
45
+ },
46
+ layout: 'vertical'
47
+ }
48
+ ],
49
+ layout: 'horizontal'
50
+ },
51
+ {
52
+ type: 'control',
53
+ label: {
54
+ en: ''
55
+ },
56
+ setting: {
57
+ id: 'typo'
58
+ },
59
+ layout: 'vertical'
60
+ }
61
+ ]
62
+ }
63
+ ];
64
+
65
+ export { uiV2 };
@@ -847,12 +847,12 @@ const ProductButtonSettings = [
847
847
  },
848
848
  {
849
849
  id: 'enableIcon',
850
- type: 'switch',
850
+ type: 'toggle',
851
851
  default: true
852
852
  },
853
853
  {
854
854
  id: 'enableTextStyle',
855
- type: 'switch',
855
+ type: 'toggle',
856
856
  default: true
857
857
  },
858
858
  {
@@ -211,7 +211,8 @@ const SettingUIV2 = [
211
211
  id: 'enableIcon'
212
212
  },
213
213
  options: {
214
- labelVariant: 'primary'
214
+ labelVariant: 'primary',
215
+ toggleStyle: 'switch'
215
216
  }
216
217
  },
217
218
  {
@@ -256,7 +257,8 @@ const SettingUIV2 = [
256
257
  id: 'enableTextStyle'
257
258
  },
258
259
  options: {
259
- labelVariant: 'primary'
260
+ labelVariant: 'primary',
261
+ toggleStyle: 'switch'
260
262
  }
261
263
  },
262
264
  {
@@ -27,7 +27,7 @@ const ProductDescriptionSettings = [
27
27
  {
28
28
  id: 'hasLineClamp',
29
29
  label: 'Enable View More',
30
- type: 'switch',
30
+ type: 'toggle',
31
31
  devices: {
32
32
  desktop: {
33
33
  default: true
@@ -37,7 +37,8 @@ const SettingUIV2 = [
37
37
  id: 'hasLineClamp'
38
38
  },
39
39
  options: {
40
- labelVariant: 'primary'
40
+ labelVariant: 'primary',
41
+ toggleStyle: 'switch'
41
42
  }
42
43
  },
43
44
  {
@@ -52,7 +52,7 @@ const ProductListSettingsV2 = [
52
52
  {
53
53
  id: 'dot',
54
54
  label: 'Dot',
55
- type: 'switch',
55
+ type: 'toggle',
56
56
  devices: {
57
57
  desktop: {
58
58
  default: false
@@ -133,7 +133,7 @@ const ProductListSettingsV2 = [
133
133
  {
134
134
  id: 'arrow',
135
135
  label: 'Next/Prev Arrow',
136
- type: 'switch',
136
+ type: 'toggle',
137
137
  devices: {
138
138
  desktop: {
139
139
  default: false
@@ -156,7 +156,8 @@ const SettingUIV2 = [
156
156
  id: 'dot'
157
157
  },
158
158
  options: {
159
- labelVariant: 'primary'
159
+ labelVariant: 'primary',
160
+ toggleStyle: 'switch'
160
161
  }
161
162
  },
162
163
  {
@@ -41,7 +41,7 @@ const ProductTitleSettings = [
41
41
  {
42
42
  id: 'linkProduct',
43
43
  label: 'Link To Product',
44
- type: 'switch',
44
+ type: 'toggle',
45
45
  default: false,
46
46
  info: 'Ability to click on product title to goto product detail page.'
47
47
  }
@@ -98,7 +98,7 @@ const ProductTitleSettings = [
98
98
  },
99
99
  {
100
100
  id: 'hasLineClamp',
101
- type: 'switch',
101
+ type: 'toggle',
102
102
  label: 'Has Line Clamp',
103
103
  devices: {
104
104
  desktop: {
@@ -73,7 +73,8 @@ const SettingUIV2 = [
73
73
  id: 'linkProduct'
74
74
  },
75
75
  options: {
76
- labelVariant: 'primary'
76
+ labelVariant: 'primary',
77
+ toggleStyle: 'switch'
77
78
  }
78
79
  }
79
80
  ]
@@ -11,7 +11,7 @@ const ProductVendorSettings = [
11
11
  {
12
12
  id: 'url',
13
13
  label: 'Open collection URL',
14
- type: 'switch',
14
+ type: 'toggle',
15
15
  default: false
16
16
  },
17
17
  {
@@ -100,7 +100,8 @@ const SettingUIV2 = [
100
100
  id: 'url'
101
101
  },
102
102
  options: {
103
- labelVariant: 'primary'
103
+ labelVariant: 'primary',
104
+ toggleStyle: 'switch'
104
105
  },
105
106
  help: {
106
107
  content: `Click to open a collection page with all products from the same vendor.`
@@ -100,7 +100,7 @@ const StockCounterSettings = [
100
100
  {
101
101
  id: 'showIcon',
102
102
  label: 'Show Icon',
103
- type: 'switch',
103
+ type: 'toggle',
104
104
  default: true
105
105
  },
106
106
  {
@@ -225,7 +225,7 @@ const StockCounterSettings = [
225
225
  {
226
226
  id: 'displayProgressBar',
227
227
  label: 'Display',
228
- type: 'switch',
228
+ type: 'toggle',
229
229
  default: true
230
230
  },
231
231
  {
@@ -69,7 +69,8 @@ const SettingUIV2 = [
69
69
  id: 'showIcon'
70
70
  },
71
71
  options: {
72
- labelVariant: 'primary'
72
+ labelVariant: 'primary',
73
+ toggleStyle: 'switch'
73
74
  }
74
75
  },
75
76
  {
@@ -4748,6 +4748,19 @@ declare const PostPurchaseProductQuantity: React.FC<PostPurchaseProductQuantityP
4748
4748
 
4749
4749
  type PostPurchaseTextColor = 'critical' | 'warning' | 'success' | 'defaultButton' | 'defaultLink' | 'default' | 'boldDefault' | 'info' | undefined;
4750
4750
 
4751
+ type Styles$1 = {
4752
+ typo?: PostPurchaseTypo;
4753
+ direction?: 'ltr' | 'rtl';
4754
+ };
4755
+ type ProductDiscountTagSettings = {
4756
+ message?: string;
4757
+ discountAndShippingFee?: boolean;
4758
+ };
4759
+ type PostPurchaseProductDiscountTagProps = BasePropsWrap<ProductDiscountTagSettings, Styles$1> & {
4760
+ advanced?: AdvancedType;
4761
+ children?: ReactNode;
4762
+ };
4763
+
4751
4764
  type VariantTypeof = 'dropdown' | 'rectangle_list' | 'image_shopify' | 'color' | 'image' | string;
4752
4765
  type VariantBaseSetting = {
4753
4766
  fullWidth?: Partial<Record<NameDevices, boolean>>;
@@ -4787,7 +4800,7 @@ declare const PostPurchaseProductOffer: React.FC<PostPurchaseProductOfferProps>;
4787
4800
 
4788
4801
  type Spacing = 'none' | 'xtight' | 'tight' | 'loose' | 'xloose' | undefined;
4789
4802
 
4790
- type Settings$1 = {
4803
+ type Settings = {
4791
4804
  subTotalLabel?: string;
4792
4805
  discountLabel?: string;
4793
4806
  shippingLabel?: string;
@@ -4797,7 +4810,7 @@ type Settings$1 = {
4797
4810
  contentShow?: string;
4798
4811
  contentHide?: string;
4799
4812
  };
4800
- type Styles$1 = {
4813
+ type Styles = {
4801
4814
  labelStyle?: PostPurchaseTypo;
4802
4815
  moneyStyle?: PostPurchaseTypo;
4803
4816
  align?: 'left' | 'right' | 'center';
@@ -4811,24 +4824,13 @@ type Styles$1 = {
4811
4824
  isShowTotalLabel?: boolean;
4812
4825
  direction?: 'ltr' | 'rtl';
4813
4826
  };
4814
- type PostPurchaseProductPriceBreakdownProps$1 = BasePropsWrap<Settings$1, Styles$1> & {
4827
+ type PostPurchaseProductPriceBreakdownProps$1 = BasePropsWrap<Settings, Styles> & {
4815
4828
  advanced?: AdvancedType;
4816
4829
  children?: ReactNode;
4817
4830
  };
4818
4831
 
4819
4832
  declare const PostPurchaseProductPriceBreakdown: React.FC<PostPurchaseProductPriceBreakdownProps$1>;
4820
4833
 
4821
- type Settings = {
4822
- message?: string;
4823
- discountAndShippingFee?: boolean;
4824
- };
4825
- type Styles = {
4826
- typo?: PostPurchaseTypo;
4827
- };
4828
- type PostPurchaseProductDiscountTagProps = BasePropsWrap<Settings, Styles> & {
4829
- advanced?: AdvancedType;
4830
- children?: ReactNode;
4831
- };
4832
4834
  declare const PostPurchaseProductDiscountTag: React.FC<PostPurchaseProductDiscountTagProps>;
4833
4835
 
4834
4836
  type FeatureImagStyle = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.246",
3
+ "version": "2.0.0-dev.248",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -22,7 +22,7 @@
22
22
  "relationship": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/get-control-relationship.js && node ./scripts/get-element-relationship.js"
23
23
  },
24
24
  "devDependencies": {
25
- "@gem-sdk/core": "2.0.0-dev.239",
25
+ "@gem-sdk/core": "2.0.0-dev.248",
26
26
  "@gem-sdk/styles": "2.0.0-dev.234",
27
27
  "@gem-sdk/system": "2.0.0-dev.234",
28
28
  "@types/react-transition-group": "^4.4.5"