@gem-sdk/components 2.0.0-dev.249 → 2.0.0-dev.252

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.
@@ -3,28 +3,33 @@
3
3
  const postPurchaseSpacingV2 = [
4
4
  {
5
5
  label: 'XSmall',
6
- title: '5px',
7
- value: 'xtight'
6
+ displayValue: '5px',
7
+ value: 'xtight',
8
+ showValue: true
8
9
  },
9
10
  {
10
11
  label: 'Small',
11
- title: '9px',
12
- value: 'tight'
12
+ displayValue: '9px',
13
+ value: 'tight',
14
+ showValue: true
13
15
  },
14
16
  {
15
17
  label: 'Medium',
16
- title: '14px',
17
- value: 'medium'
18
+ displayValue: '14px',
19
+ value: 'medium',
20
+ showValue: true
18
21
  },
19
22
  {
20
23
  label: 'Large',
21
- title: '21px',
22
- value: 'large'
24
+ displayValue: '21px',
25
+ value: 'large',
26
+ showValue: true
23
27
  },
24
28
  {
25
29
  label: 'XLarge',
26
- title: '38px',
27
- value: 'xlarge'
30
+ displayValue: '38px',
31
+ value: 'xlarge',
32
+ showValue: true
28
33
  }
29
34
  ];
30
35
  const postPurchaseSpacingValueV2 = {
@@ -42,7 +42,7 @@ const Link = ({ builderAttrs, setting = {}, styles, builderProps })=>{
42
42
  children: /*#__PURE__*/ jsxRuntime.jsx("div", {
43
43
  style: wrapperStyle,
44
44
  children: /*#__PURE__*/ jsxRuntime.jsx(Component, {
45
- href: link?.link,
45
+ href: link,
46
46
  target: "_blank",
47
47
  rel: "noreferrer",
48
48
  className: componentClasses,
@@ -3,7 +3,7 @@
3
3
  var helper = require('../../../utils/helper.js');
4
4
 
5
5
  const getComponentTag = (link)=>{
6
- const isValidLink = helper.checkIsValidURL(link?.link || '');
6
+ const isValidLink = helper.checkIsValidURL(link || '');
7
7
  return isValidLink ? 'a' : 'div';
8
8
  };
9
9
 
@@ -17,13 +17,13 @@ const getClasses = ({ builderProps, styles })=>{
17
17
  };
18
18
  };
19
19
  const getComponentClasses = (link)=>{
20
- const isValidLink = helper.checkIsValidURL(link?.link || '');
20
+ const isValidLink = helper.checkIsValidURL(link || '');
21
21
  return {
22
22
  'gp-underline': !isValidLink
23
23
  };
24
24
  };
25
25
  const getTextClasses = (link)=>{
26
- const isValidLink = helper.checkIsValidURL(link?.link || '');
26
+ const isValidLink = helper.checkIsValidURL(link || '');
27
27
  const classList = '!gp-break-normal gp-leading-[15px] gp-min-w-fit [&>*]:gp-text-center [&>*]:gp-inline-block ';
28
28
  return {
29
29
  ...core.composeClasses(classList),
@@ -6,23 +6,18 @@ const PostPurchaseLinkSettings = [
6
6
  controls: [
7
7
  {
8
8
  id: 'link',
9
- type: 'pick-link',
10
- pickLinkLabel: 'Link',
11
- label: 'Pick Link',
12
- default: {
13
- link: '',
14
- target: '_blank'
15
- },
16
- isHiddenInsertLink: true,
17
- isHiddenOpenLinkSelect: true
9
+ label: 'Link',
10
+ type: 'input',
11
+ default: '',
12
+ placeholder: 'E.g. gempages.net'
18
13
  },
19
14
  {
20
15
  id: 'label',
21
16
  label: 'Text',
22
- type: 'post-purchase-textarea',
17
+ type: 'textarea',
23
18
  default: 'Preview Sample',
24
19
  autoHeight: true,
25
- isFallback: true
20
+ lazyUpdate: true
26
21
  },
27
22
  {
28
23
  id: 'width',
@@ -7,8 +7,9 @@ const PostPurchaseLinkUIV2 = [
7
7
  },
8
8
  controls: [
9
9
  {
10
- type: 'control',
11
- layout: 'vertical',
10
+ label: {
11
+ en: 'Link'
12
+ },
12
13
  setting: {
13
14
  id: 'link'
14
15
  }
@@ -81,25 +81,29 @@ const settingV2 = [
81
81
  label: 'Left',
82
82
  value: 'left',
83
83
  type: 'text',
84
- tooltip: 'Align left'
84
+ tooltip: 'Align left',
85
+ iconName: 'polaris-text-align-left'
85
86
  },
86
87
  {
87
88
  label: 'Center',
88
89
  value: 'center',
89
90
  type: 'text',
90
- tooltip: 'Align center'
91
+ tooltip: 'Align center',
92
+ iconName: 'polaris-text-align-center'
91
93
  },
92
94
  {
93
95
  label: 'Right',
94
96
  value: 'right',
95
97
  type: 'text',
96
- tooltip: 'Align right'
98
+ tooltip: 'Align right',
99
+ iconName: 'polaris-text-align-right'
97
100
  },
98
101
  {
99
102
  label: 'Justify',
100
103
  value: 'justify',
101
104
  type: 'text',
102
- tooltip: 'Align justify'
105
+ tooltip: 'Align justify',
106
+ iconName: 'gp-text-align-justify'
103
107
  }
104
108
  ],
105
109
  default: 'left'
@@ -82,7 +82,7 @@ const uiV2 = [
82
82
  options: {
83
83
  labelVariant: 'primary',
84
84
  fullWidth: true,
85
- disableMessage: `Align is not supported when width is 100%`
85
+ disableMessage: `This option is disabled because the width is set to 100%`
86
86
  }
87
87
  }
88
88
  ]
@@ -1,28 +1,33 @@
1
1
  const postPurchaseSpacingV2 = [
2
2
  {
3
3
  label: 'XSmall',
4
- title: '5px',
5
- value: 'xtight'
4
+ displayValue: '5px',
5
+ value: 'xtight',
6
+ showValue: true
6
7
  },
7
8
  {
8
9
  label: 'Small',
9
- title: '9px',
10
- value: 'tight'
10
+ displayValue: '9px',
11
+ value: 'tight',
12
+ showValue: true
11
13
  },
12
14
  {
13
15
  label: 'Medium',
14
- title: '14px',
15
- value: 'medium'
16
+ displayValue: '14px',
17
+ value: 'medium',
18
+ showValue: true
16
19
  },
17
20
  {
18
21
  label: 'Large',
19
- title: '21px',
20
- value: 'large'
22
+ displayValue: '21px',
23
+ value: 'large',
24
+ showValue: true
21
25
  },
22
26
  {
23
27
  label: 'XLarge',
24
- title: '38px',
25
- value: 'xlarge'
28
+ displayValue: '38px',
29
+ value: 'xlarge',
30
+ showValue: true
26
31
  }
27
32
  ];
28
33
  const postPurchaseSpacingValueV2 = {
@@ -38,7 +38,7 @@ const Link = ({ builderAttrs, setting = {}, styles, builderProps })=>{
38
38
  children: /*#__PURE__*/ jsx("div", {
39
39
  style: wrapperStyle,
40
40
  children: /*#__PURE__*/ jsx(Component, {
41
- href: link?.link,
41
+ href: link,
42
42
  target: "_blank",
43
43
  rel: "noreferrer",
44
44
  className: componentClasses,
@@ -1,7 +1,7 @@
1
1
  import { checkIsValidURL } from '../../../utils/helper.js';
2
2
 
3
3
  const getComponentTag = (link)=>{
4
- const isValidLink = checkIsValidURL(link?.link || '');
4
+ const isValidLink = checkIsValidURL(link || '');
5
5
  return isValidLink ? 'a' : 'div';
6
6
  };
7
7
 
@@ -15,13 +15,13 @@ const getClasses = ({ builderProps, styles })=>{
15
15
  };
16
16
  };
17
17
  const getComponentClasses = (link)=>{
18
- const isValidLink = checkIsValidURL(link?.link || '');
18
+ const isValidLink = checkIsValidURL(link || '');
19
19
  return {
20
20
  'gp-underline': !isValidLink
21
21
  };
22
22
  };
23
23
  const getTextClasses = (link)=>{
24
- const isValidLink = checkIsValidURL(link?.link || '');
24
+ const isValidLink = checkIsValidURL(link || '');
25
25
  const classList = '!gp-break-normal gp-leading-[15px] gp-min-w-fit [&>*]:gp-text-center [&>*]:gp-inline-block ';
26
26
  return {
27
27
  ...composeClasses(classList),
@@ -4,23 +4,18 @@ const PostPurchaseLinkSettings = [
4
4
  controls: [
5
5
  {
6
6
  id: 'link',
7
- type: 'pick-link',
8
- pickLinkLabel: 'Link',
9
- label: 'Pick Link',
10
- default: {
11
- link: '',
12
- target: '_blank'
13
- },
14
- isHiddenInsertLink: true,
15
- isHiddenOpenLinkSelect: true
7
+ label: 'Link',
8
+ type: 'input',
9
+ default: '',
10
+ placeholder: 'E.g. gempages.net'
16
11
  },
17
12
  {
18
13
  id: 'label',
19
14
  label: 'Text',
20
- type: 'post-purchase-textarea',
15
+ type: 'textarea',
21
16
  default: 'Preview Sample',
22
17
  autoHeight: true,
23
- isFallback: true
18
+ lazyUpdate: true
24
19
  },
25
20
  {
26
21
  id: 'width',
@@ -5,8 +5,9 @@ const PostPurchaseLinkUIV2 = [
5
5
  },
6
6
  controls: [
7
7
  {
8
- type: 'control',
9
- layout: 'vertical',
8
+ label: {
9
+ en: 'Link'
10
+ },
10
11
  setting: {
11
12
  id: 'link'
12
13
  }
@@ -79,25 +79,29 @@ const settingV2 = [
79
79
  label: 'Left',
80
80
  value: 'left',
81
81
  type: 'text',
82
- tooltip: 'Align left'
82
+ tooltip: 'Align left',
83
+ iconName: 'polaris-text-align-left'
83
84
  },
84
85
  {
85
86
  label: 'Center',
86
87
  value: 'center',
87
88
  type: 'text',
88
- tooltip: 'Align center'
89
+ tooltip: 'Align center',
90
+ iconName: 'polaris-text-align-center'
89
91
  },
90
92
  {
91
93
  label: 'Right',
92
94
  value: 'right',
93
95
  type: 'text',
94
- tooltip: 'Align right'
96
+ tooltip: 'Align right',
97
+ iconName: 'polaris-text-align-right'
95
98
  },
96
99
  {
97
100
  label: 'Justify',
98
101
  value: 'justify',
99
102
  type: 'text',
100
- tooltip: 'Align justify'
103
+ tooltip: 'Align justify',
104
+ iconName: 'gp-text-align-justify'
101
105
  }
102
106
  ],
103
107
  default: 'left'
@@ -80,7 +80,7 @@ const uiV2 = [
80
80
  options: {
81
81
  labelVariant: 'primary',
82
82
  fullWidth: true,
83
- disableMessage: `Align is not supported when width is 100%`
83
+ disableMessage: `This option is disabled because the width is set to 100%`
84
84
  }
85
85
  }
86
86
  ]
@@ -5011,10 +5011,7 @@ declare const _default$7: {
5011
5011
  };
5012
5012
 
5013
5013
  type PostPurchaseLinkProps = BasePropsWrap<{
5014
- link?: {
5015
- link?: string;
5016
- target?: string;
5017
- };
5014
+ link?: string;
5018
5015
  label?: string;
5019
5016
  width?: ObjectDevices<string>;
5020
5017
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.249",
3
+ "version": "2.0.0-dev.252",
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.249",
25
+ "@gem-sdk/core": "2.0.0-dev.251",
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"