@gem-sdk/components 2.0.0-dev.645 → 2.0.0-dev.647

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.
@@ -55,7 +55,7 @@ const Countdown = (props)=>{
55
55
  ...getStyle.getDateStyle(styles)
56
56
  });
57
57
  const dateClasses = (dateLabel)=>system.createClass({
58
- ...getClasses.getDateClasses(styles, dateLabel)
58
+ ...getClasses.getDateClasses(dateLabel)
59
59
  });
60
60
  const textFrontClasses = system.createClass({
61
61
  ...getClasses.getTextFrontClasses(styles)
@@ -24,7 +24,7 @@ const Countdown = (props)=>{
24
24
  ...getStyle.getDateStyle(styles)
25
25
  });
26
26
  const dateClasses = (dateLabel)=>system.createClass({
27
- ...getClasses.getDateClasses(styles, dateLabel)
27
+ ...getClasses.getDateClasses(dateLabel)
28
28
  });
29
29
  const textFrontClasses = system.createClass({
30
30
  ...getClasses.getTextFrontClasses(styles)
@@ -21,10 +21,8 @@ const getWrapperClasses = (advancedCssClass)=>{
21
21
  ...composeClasses(classList)
22
22
  };
23
23
  };
24
- const getDateClasses = (styles, dateLabel)=>{
24
+ const getDateClasses = (dateLabel)=>{
25
25
  let classList = 'gp-flex-1 gp-text-center gp-min-w-max !gp-max-w-max';
26
- const { itemPadding } = styles || {};
27
- if (itemPadding?.type) classList += ` ${core.genSizeClass(itemPadding?.type)}`;
28
26
  if (!dateLabel) classList += ` gp-content-center`;
29
27
  return {
30
28
  ...composeClasses(classList)
@@ -22,7 +22,7 @@ const getContainStyle = (styles)=>{
22
22
  const getDateStyle = (styles)=>{
23
23
  const { borderState, itemPadding, backgroundItemColor, roundedState } = styles || {};
24
24
  const composeStyles = {
25
- ...core.getPaddingStyleByDevice(itemPadding),
25
+ ...core.getResponsiveStylePadding(itemPadding),
26
26
  ...core.handleConvertBorderStyle(borderState),
27
27
  ...core.handleConvertBorderWidth(borderState),
28
28
  ...core.handleConvertBorderColor(borderState),
@@ -531,11 +531,25 @@ const CountdownSettings = [
531
531
  id: 'itemPadding',
532
532
  label: 'Padding',
533
533
  type: 'padding-v2',
534
- default: {
535
- top: '8px',
536
- left: '24px',
537
- right: '24px',
538
- bottom: '8px'
534
+ devices: {
535
+ desktop: {
536
+ default: {
537
+ top: '8px',
538
+ bottom: '8px',
539
+ left: '24px',
540
+ right: '24px'
541
+ }
542
+ }
543
+ },
544
+ compoDefaultValue: {
545
+ desktop: {
546
+ default: {
547
+ top: '8px',
548
+ bottom: '8px',
549
+ left: '24px',
550
+ right: '24px'
551
+ }
552
+ }
539
553
  }
540
554
  }
541
555
  ]
@@ -15,7 +15,7 @@ const mapWidgetLabel = {
15
15
  message: 'Cart message',
16
16
  ['classic-bundle']: 'Classic bundle',
17
17
  ['quantity-break']: 'Quantity break',
18
- 'mix-match': ''
18
+ 'mix-match': 'Frequently Bought Together'
19
19
  };
20
20
  const BogosSampleContent = ({ setting })=>{
21
21
  const widgetLabel = setting?.widgetType && mapWidgetLabel[setting.widgetType];
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var BogosConfig = {
6
6
  id: 'bogos',
7
7
  label: 'BOGOS',
8
- logoUrl: 'https://s3-ap-southeast-1.amazonaws.com/gemtickets/production/dashboard/d82f3b5d-4ea3-44bc-aba9-4e5add3acd7d.png?width=22&height=22',
8
+ logoUrl: 'https://ucarecdn.com/9a9512e9-5675-4316-9569-0e12bc1c808d/-/format/auto/-/preview/3000x3000/-/quality/lighter/Icon%20n%E1%BB%81n%20xanh_2x.webp',
9
9
  tag: 'Bogos'
10
10
  };
11
11
 
@@ -93,7 +93,7 @@ const config = {
93
93
  value: 'classic-bundle'
94
94
  },
95
95
  {
96
- label: 'Mix and match',
96
+ label: 'Frequently Bought Together',
97
97
  value: 'mix-match'
98
98
  }
99
99
  ]
@@ -99,11 +99,6 @@ const config = {
99
99
  }
100
100
  ]
101
101
  },
102
- {
103
- id: 'starRatingInList',
104
- info: 'Note: Star Rating List widget is not appearing on the product page',
105
- type: 'group'
106
- },
107
102
  {
108
103
  id: 'align',
109
104
  label: 'Alignment',
@@ -13,18 +13,6 @@ const SettingUIV2 = [
13
13
  }
14
14
  ]
15
15
  },
16
- {
17
- controls: [
18
- {
19
- label: {
20
- en: 'Choose version'
21
- },
22
- setting: {
23
- id: 'version'
24
- }
25
- }
26
- ]
27
- },
28
16
  {
29
17
  controls: [
30
18
  {
@@ -37,20 +25,6 @@ const SettingUIV2 = [
37
25
  }
38
26
  ]
39
27
  },
40
- {
41
- controls: [
42
- {
43
- setting: {
44
- id: 'starRatingInList'
45
- }
46
- }
47
- ],
48
- messageConfig: {
49
- type: 'info',
50
- message: 'Note: Star Rating List widget is not appearing on the product page'
51
- },
52
- conditionDisplay: 'widgetType === "starRatingInList"'
53
- },
54
28
  {
55
29
  controls: [
56
30
  {
@@ -51,7 +51,7 @@ const Countdown = (props)=>{
51
51
  ...getDateStyle(styles)
52
52
  });
53
53
  const dateClasses = (dateLabel)=>createClass({
54
- ...getDateClasses(styles, dateLabel)
54
+ ...getDateClasses(dateLabel)
55
55
  });
56
56
  const textFrontClasses = createClass({
57
57
  ...getTextFrontClasses(styles)
@@ -20,7 +20,7 @@ const Countdown = (props)=>{
20
20
  ...getDateStyle(styles)
21
21
  });
22
22
  const dateClasses = (dateLabel)=>createClass({
23
- ...getDateClasses(styles, dateLabel)
23
+ ...getDateClasses(dateLabel)
24
24
  });
25
25
  const textFrontClasses = createClass({
26
26
  ...getTextFrontClasses(styles)
@@ -1,4 +1,4 @@
1
- import { getGlobalColorClass, genSizeClass } from '@gem-sdk/core';
1
+ import { getGlobalColorClass } from '@gem-sdk/core';
2
2
 
3
3
  function composeClasses(classList) {
4
4
  return classList.split(' ').reduce((acc, item)=>{
@@ -19,10 +19,8 @@ const getWrapperClasses = (advancedCssClass)=>{
19
19
  ...composeClasses(classList)
20
20
  };
21
21
  };
22
- const getDateClasses = (styles, dateLabel)=>{
22
+ const getDateClasses = (dateLabel)=>{
23
23
  let classList = 'gp-flex-1 gp-text-center gp-min-w-max !gp-max-w-max';
24
- const { itemPadding } = styles || {};
25
- if (itemPadding?.type) classList += ` ${genSizeClass(itemPadding?.type)}`;
26
24
  if (!dateLabel) classList += ` gp-content-center`;
27
25
  return {
28
26
  ...composeClasses(classList)
@@ -1,4 +1,4 @@
1
- import { makeStyleResponsive, getPaddingStyleByDevice, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor, composeRadius, makeStyle, getGlobalColorCSSProp } from '@gem-sdk/core';
1
+ import { makeStyleResponsive, getResponsiveStylePadding, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor, composeRadius, makeStyle, getGlobalColorCSSProp } from '@gem-sdk/core';
2
2
 
3
3
  function filterTruthyStyles(styles) {
4
4
  return Object.fromEntries(Object.entries(styles || {}).filter(([, value])=>!!value));
@@ -20,7 +20,7 @@ const getContainStyle = (styles)=>{
20
20
  const getDateStyle = (styles)=>{
21
21
  const { borderState, itemPadding, backgroundItemColor, roundedState } = styles || {};
22
22
  const composeStyles = {
23
- ...getPaddingStyleByDevice(itemPadding),
23
+ ...getResponsiveStylePadding(itemPadding),
24
24
  ...handleConvertBorderStyle(borderState),
25
25
  ...handleConvertBorderWidth(borderState),
26
26
  ...handleConvertBorderColor(borderState),
@@ -529,11 +529,25 @@ const CountdownSettings = [
529
529
  id: 'itemPadding',
530
530
  label: 'Padding',
531
531
  type: 'padding-v2',
532
- default: {
533
- top: '8px',
534
- left: '24px',
535
- right: '24px',
536
- bottom: '8px'
532
+ devices: {
533
+ desktop: {
534
+ default: {
535
+ top: '8px',
536
+ bottom: '8px',
537
+ left: '24px',
538
+ right: '24px'
539
+ }
540
+ }
541
+ },
542
+ compoDefaultValue: {
543
+ desktop: {
544
+ default: {
545
+ top: '8px',
546
+ bottom: '8px',
547
+ left: '24px',
548
+ right: '24px'
549
+ }
550
+ }
537
551
  }
538
552
  }
539
553
  ]
@@ -11,7 +11,7 @@ const mapWidgetLabel = {
11
11
  message: 'Cart message',
12
12
  ['classic-bundle']: 'Classic bundle',
13
13
  ['quantity-break']: 'Quantity break',
14
- 'mix-match': ''
14
+ 'mix-match': 'Frequently Bought Together'
15
15
  };
16
16
  const BogosSampleContent = ({ setting })=>{
17
17
  const widgetLabel = setting?.widgetType && mapWidgetLabel[setting.widgetType];
@@ -1,7 +1,7 @@
1
1
  var BogosConfig = {
2
2
  id: 'bogos',
3
3
  label: 'BOGOS',
4
- logoUrl: 'https://s3-ap-southeast-1.amazonaws.com/gemtickets/production/dashboard/d82f3b5d-4ea3-44bc-aba9-4e5add3acd7d.png?width=22&height=22',
4
+ logoUrl: 'https://ucarecdn.com/9a9512e9-5675-4316-9569-0e12bc1c808d/-/format/auto/-/preview/3000x3000/-/quality/lighter/Icon%20n%E1%BB%81n%20xanh_2x.webp',
5
5
  tag: 'Bogos'
6
6
  };
7
7
 
@@ -89,7 +89,7 @@ const config = {
89
89
  value: 'classic-bundle'
90
90
  },
91
91
  {
92
- label: 'Mix and match',
92
+ label: 'Frequently Bought Together',
93
93
  value: 'mix-match'
94
94
  }
95
95
  ]
@@ -95,11 +95,6 @@ const config = {
95
95
  }
96
96
  ]
97
97
  },
98
- {
99
- id: 'starRatingInList',
100
- info: 'Note: Star Rating List widget is not appearing on the product page',
101
- type: 'group'
102
- },
103
98
  {
104
99
  id: 'align',
105
100
  label: 'Alignment',
@@ -9,18 +9,6 @@ const SettingUIV2 = [
9
9
  }
10
10
  ]
11
11
  },
12
- {
13
- controls: [
14
- {
15
- label: {
16
- en: 'Choose version'
17
- },
18
- setting: {
19
- id: 'version'
20
- }
21
- }
22
- ]
23
- },
24
12
  {
25
13
  controls: [
26
14
  {
@@ -33,20 +21,6 @@ const SettingUIV2 = [
33
21
  }
34
22
  ]
35
23
  },
36
- {
37
- controls: [
38
- {
39
- setting: {
40
- id: 'starRatingInList'
41
- }
42
- }
43
- ],
44
- messageConfig: {
45
- type: 'info',
46
- message: 'Note: Star Rating List widget is not appearing on the product page'
47
- },
48
- conditionDisplay: 'widgetType === "starRatingInList"'
49
- },
50
24
  {
51
25
  controls: [
52
26
  {
@@ -1357,7 +1357,7 @@ type CountdownProps = BaseProps<{
1357
1357
  roundedState?: StateProp<CornerRadius>;
1358
1358
  verticalGap?: string;
1359
1359
  horizontalGap?: string;
1360
- itemPadding?: PaddingType$2;
1360
+ itemPadding?: ObjectDevices$1<PaddingType$2>;
1361
1361
  }> & {
1362
1362
  pageContext?: PageContext;
1363
1363
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.645",
3
+ "version": "2.0.0-dev.647",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",