@gem-sdk/components 2.0.0-dev.343 → 2.0.0-dev.345
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.
- package/dist/cjs/grid/row/setting/configs/uiV2.js +24 -8
- package/dist/cjs/product/setting/product/configs/uiV2.js +4 -2
- package/dist/cjs/third-party/components/Releasit.liquid.js +4 -2
- package/dist/cjs/third-party/setting/Releasit.js +59 -2
- package/dist/esm/grid/row/setting/configs/uiV2.js +24 -8
- package/dist/esm/product/setting/product/configs/uiV2.js +4 -2
- package/dist/esm/third-party/components/Releasit.liquid.js +4 -2
- package/dist/esm/third-party/setting/Releasit.js +59 -2
- package/dist/types/index.d.ts +4 -0
- package/package.json +2 -2
|
@@ -92,7 +92,9 @@ const SettingUIV2 = [
|
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
label: {
|
|
95
|
-
en: 'Size'
|
|
95
|
+
en: 'Size',
|
|
96
|
+
cn: '尺寸',
|
|
97
|
+
es: 'Tamaño'
|
|
96
98
|
},
|
|
97
99
|
options: {
|
|
98
100
|
disableMessage: 'Setting is available when the number of columns is > 1'
|
|
@@ -103,13 +105,17 @@ const SettingUIV2 = [
|
|
|
103
105
|
id: 'width'
|
|
104
106
|
},
|
|
105
107
|
label: {
|
|
106
|
-
en: 'Width'
|
|
108
|
+
en: 'Width',
|
|
109
|
+
es: 'Ancho',
|
|
110
|
+
cn: '宽度'
|
|
107
111
|
},
|
|
108
112
|
layout: 'horizontal'
|
|
109
113
|
},
|
|
110
114
|
{
|
|
111
115
|
label: {
|
|
112
|
-
en: 'Padding'
|
|
116
|
+
en: 'Padding',
|
|
117
|
+
cn: '填充',
|
|
118
|
+
es: 'Relleno'
|
|
113
119
|
},
|
|
114
120
|
conditionDisplay: `pageType != "POST_PURCHASE"`,
|
|
115
121
|
controlConfig: {
|
|
@@ -125,7 +131,9 @@ const SettingUIV2 = [
|
|
|
125
131
|
},
|
|
126
132
|
{
|
|
127
133
|
label: {
|
|
128
|
-
en: 'Background'
|
|
134
|
+
en: 'Background',
|
|
135
|
+
cn: '背景',
|
|
136
|
+
es: 'Fondo'
|
|
129
137
|
},
|
|
130
138
|
conditionDisplay: 'pageType != "POST_PURCHASE"',
|
|
131
139
|
controls: [
|
|
@@ -163,13 +171,17 @@ const SettingUIV2 = [
|
|
|
163
171
|
},
|
|
164
172
|
{
|
|
165
173
|
label: {
|
|
166
|
-
en: 'Shape'
|
|
174
|
+
en: 'Shape',
|
|
175
|
+
cn: '形状',
|
|
176
|
+
es: 'Forma'
|
|
167
177
|
},
|
|
168
178
|
conditionDisplay: 'pageType != "POST_PURCHASE"',
|
|
169
179
|
controls: [
|
|
170
180
|
{
|
|
171
181
|
label: {
|
|
172
|
-
en: 'Border'
|
|
182
|
+
en: 'Border',
|
|
183
|
+
cn: '边界',
|
|
184
|
+
es: 'Borde'
|
|
173
185
|
},
|
|
174
186
|
setting: {
|
|
175
187
|
id: 'border',
|
|
@@ -178,7 +190,9 @@ const SettingUIV2 = [
|
|
|
178
190
|
},
|
|
179
191
|
{
|
|
180
192
|
label: {
|
|
181
|
-
en: 'Corner'
|
|
193
|
+
en: 'Corner',
|
|
194
|
+
cn: '角落',
|
|
195
|
+
es: 'Esquina'
|
|
182
196
|
},
|
|
183
197
|
setting: {
|
|
184
198
|
id: 'rounded',
|
|
@@ -187,7 +201,9 @@ const SettingUIV2 = [
|
|
|
187
201
|
},
|
|
188
202
|
{
|
|
189
203
|
label: {
|
|
190
|
-
en: 'Shadow'
|
|
204
|
+
en: 'Shadow',
|
|
205
|
+
cn: '阴影',
|
|
206
|
+
es: 'Sombra'
|
|
191
207
|
},
|
|
192
208
|
setting: {
|
|
193
209
|
id: 'boxShadow',
|
|
@@ -185,11 +185,13 @@ const SettingUIV2 = [
|
|
|
185
185
|
options: [
|
|
186
186
|
{
|
|
187
187
|
label: 'Link variants, quantity <br> between same products',
|
|
188
|
-
value: true
|
|
188
|
+
value: true,
|
|
189
|
+
svgIcon: 'gp-sync-product-on'
|
|
189
190
|
},
|
|
190
191
|
{
|
|
191
192
|
label: 'Unlink variants, quantity <br> between same products',
|
|
192
|
-
value: false
|
|
193
|
+
value: false,
|
|
194
|
+
svgIcon: 'gp-sync-product-off'
|
|
193
195
|
}
|
|
194
196
|
],
|
|
195
197
|
linkWithSetting: {
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var thirdParty = require('../helpers/thirdParty.js');
|
|
5
6
|
var core = require('@gem-sdk/core');
|
|
6
7
|
|
|
7
8
|
const Releasit = ({ setting, advanced })=>{
|
|
8
|
-
const { align } = setting ?? {};
|
|
9
|
-
|
|
9
|
+
const { align, version, appBlockId } = setting ?? {};
|
|
10
|
+
console.log('version', version);
|
|
11
|
+
return version === 'v2' ? thirdParty.getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''}!gp-block`) : core.template`
|
|
10
12
|
<div
|
|
11
13
|
class="${advanced?.cssClass}"
|
|
12
14
|
style="${{
|
|
@@ -11,6 +11,11 @@ const config = {
|
|
|
11
11
|
editorConfigs: {
|
|
12
12
|
component: {
|
|
13
13
|
isThirdParty: true
|
|
14
|
+
},
|
|
15
|
+
placeholder: {
|
|
16
|
+
flowTag: [
|
|
17
|
+
'Product'
|
|
18
|
+
]
|
|
14
19
|
}
|
|
15
20
|
},
|
|
16
21
|
presets: [
|
|
@@ -39,6 +44,16 @@ const config = {
|
|
|
39
44
|
{
|
|
40
45
|
id: 'setting',
|
|
41
46
|
controls: [
|
|
47
|
+
{
|
|
48
|
+
id: 'appBlockId',
|
|
49
|
+
type: 'input',
|
|
50
|
+
default: ''
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: 'productHandle',
|
|
54
|
+
type: 'input',
|
|
55
|
+
default: ''
|
|
56
|
+
},
|
|
42
57
|
{
|
|
43
58
|
id: 'install',
|
|
44
59
|
type: 'open-link',
|
|
@@ -55,6 +70,38 @@ const config = {
|
|
|
55
70
|
href: 'https://admin.shopify.com/?redirect=/apps/releasit-cod-order-form',
|
|
56
71
|
appName: Releasit.default.label
|
|
57
72
|
},
|
|
73
|
+
{
|
|
74
|
+
id: 'version',
|
|
75
|
+
label: 'Choose version',
|
|
76
|
+
type: 'select',
|
|
77
|
+
default: 'v1',
|
|
78
|
+
options: [
|
|
79
|
+
{
|
|
80
|
+
label: 'V1',
|
|
81
|
+
value: 'v1'
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
label: 'V2',
|
|
85
|
+
value: 'v2'
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: 'widgetTypeV2',
|
|
91
|
+
label: 'Choose widget',
|
|
92
|
+
type: 'select',
|
|
93
|
+
default: 'button-app-block',
|
|
94
|
+
options: [
|
|
95
|
+
{
|
|
96
|
+
label: 'Releasit button',
|
|
97
|
+
value: 'button-app-block'
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
label: 'Releasit embedded form',
|
|
101
|
+
value: 'form-app-block'
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
58
105
|
{
|
|
59
106
|
id: 'align',
|
|
60
107
|
label: 'Alignment',
|
|
@@ -95,12 +142,22 @@ const config = {
|
|
|
95
142
|
{
|
|
96
143
|
type: 'control',
|
|
97
144
|
label: {
|
|
98
|
-
en: 'Choose
|
|
145
|
+
en: 'Choose version'
|
|
99
146
|
},
|
|
100
147
|
setting: {
|
|
101
|
-
id: '
|
|
148
|
+
id: 'version'
|
|
102
149
|
}
|
|
103
150
|
},
|
|
151
|
+
{
|
|
152
|
+
type: 'control',
|
|
153
|
+
label: {
|
|
154
|
+
en: 'Choose widget'
|
|
155
|
+
},
|
|
156
|
+
setting: {
|
|
157
|
+
id: 'widgetTypeV2'
|
|
158
|
+
},
|
|
159
|
+
condition: 'version === "v2"'
|
|
160
|
+
},
|
|
104
161
|
{
|
|
105
162
|
type: 'control',
|
|
106
163
|
setting: {
|
|
@@ -90,7 +90,9 @@ const SettingUIV2 = [
|
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
label: {
|
|
93
|
-
en: 'Size'
|
|
93
|
+
en: 'Size',
|
|
94
|
+
cn: '尺寸',
|
|
95
|
+
es: 'Tamaño'
|
|
94
96
|
},
|
|
95
97
|
options: {
|
|
96
98
|
disableMessage: 'Setting is available when the number of columns is > 1'
|
|
@@ -101,13 +103,17 @@ const SettingUIV2 = [
|
|
|
101
103
|
id: 'width'
|
|
102
104
|
},
|
|
103
105
|
label: {
|
|
104
|
-
en: 'Width'
|
|
106
|
+
en: 'Width',
|
|
107
|
+
es: 'Ancho',
|
|
108
|
+
cn: '宽度'
|
|
105
109
|
},
|
|
106
110
|
layout: 'horizontal'
|
|
107
111
|
},
|
|
108
112
|
{
|
|
109
113
|
label: {
|
|
110
|
-
en: 'Padding'
|
|
114
|
+
en: 'Padding',
|
|
115
|
+
cn: '填充',
|
|
116
|
+
es: 'Relleno'
|
|
111
117
|
},
|
|
112
118
|
conditionDisplay: `pageType != "POST_PURCHASE"`,
|
|
113
119
|
controlConfig: {
|
|
@@ -123,7 +129,9 @@ const SettingUIV2 = [
|
|
|
123
129
|
},
|
|
124
130
|
{
|
|
125
131
|
label: {
|
|
126
|
-
en: 'Background'
|
|
132
|
+
en: 'Background',
|
|
133
|
+
cn: '背景',
|
|
134
|
+
es: 'Fondo'
|
|
127
135
|
},
|
|
128
136
|
conditionDisplay: 'pageType != "POST_PURCHASE"',
|
|
129
137
|
controls: [
|
|
@@ -161,13 +169,17 @@ const SettingUIV2 = [
|
|
|
161
169
|
},
|
|
162
170
|
{
|
|
163
171
|
label: {
|
|
164
|
-
en: 'Shape'
|
|
172
|
+
en: 'Shape',
|
|
173
|
+
cn: '形状',
|
|
174
|
+
es: 'Forma'
|
|
165
175
|
},
|
|
166
176
|
conditionDisplay: 'pageType != "POST_PURCHASE"',
|
|
167
177
|
controls: [
|
|
168
178
|
{
|
|
169
179
|
label: {
|
|
170
|
-
en: 'Border'
|
|
180
|
+
en: 'Border',
|
|
181
|
+
cn: '边界',
|
|
182
|
+
es: 'Borde'
|
|
171
183
|
},
|
|
172
184
|
setting: {
|
|
173
185
|
id: 'border',
|
|
@@ -176,7 +188,9 @@ const SettingUIV2 = [
|
|
|
176
188
|
},
|
|
177
189
|
{
|
|
178
190
|
label: {
|
|
179
|
-
en: 'Corner'
|
|
191
|
+
en: 'Corner',
|
|
192
|
+
cn: '角落',
|
|
193
|
+
es: 'Esquina'
|
|
180
194
|
},
|
|
181
195
|
setting: {
|
|
182
196
|
id: 'rounded',
|
|
@@ -185,7 +199,9 @@ const SettingUIV2 = [
|
|
|
185
199
|
},
|
|
186
200
|
{
|
|
187
201
|
label: {
|
|
188
|
-
en: 'Shadow'
|
|
202
|
+
en: 'Shadow',
|
|
203
|
+
cn: '阴影',
|
|
204
|
+
es: 'Sombra'
|
|
189
205
|
},
|
|
190
206
|
setting: {
|
|
191
207
|
id: 'boxShadow',
|
|
@@ -183,11 +183,13 @@ const SettingUIV2 = [
|
|
|
183
183
|
options: [
|
|
184
184
|
{
|
|
185
185
|
label: 'Link variants, quantity <br> between same products',
|
|
186
|
-
value: true
|
|
186
|
+
value: true,
|
|
187
|
+
svgIcon: 'gp-sync-product-on'
|
|
187
188
|
},
|
|
188
189
|
{
|
|
189
190
|
label: 'Unlink variants, quantity <br> between same products',
|
|
190
|
-
value: false
|
|
191
|
+
value: false,
|
|
192
|
+
svgIcon: 'gp-sync-product-off'
|
|
191
193
|
}
|
|
192
194
|
],
|
|
193
195
|
linkWithSetting: {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { getLiquidForAppBlock } from '../helpers/thirdParty.js';
|
|
1
2
|
import { template, makeStyleResponsive } from '@gem-sdk/core';
|
|
2
3
|
|
|
3
4
|
const Releasit = ({ setting, advanced })=>{
|
|
4
|
-
const { align } = setting ?? {};
|
|
5
|
-
|
|
5
|
+
const { align, version, appBlockId } = setting ?? {};
|
|
6
|
+
console.log('version', version);
|
|
7
|
+
return version === 'v2' ? getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''}!gp-block`) : template`
|
|
6
8
|
<div
|
|
7
9
|
class="${advanced?.cssClass}"
|
|
8
10
|
style="${{
|
|
@@ -7,6 +7,11 @@ const config = {
|
|
|
7
7
|
editorConfigs: {
|
|
8
8
|
component: {
|
|
9
9
|
isThirdParty: true
|
|
10
|
+
},
|
|
11
|
+
placeholder: {
|
|
12
|
+
flowTag: [
|
|
13
|
+
'Product'
|
|
14
|
+
]
|
|
10
15
|
}
|
|
11
16
|
},
|
|
12
17
|
presets: [
|
|
@@ -35,6 +40,16 @@ const config = {
|
|
|
35
40
|
{
|
|
36
41
|
id: 'setting',
|
|
37
42
|
controls: [
|
|
43
|
+
{
|
|
44
|
+
id: 'appBlockId',
|
|
45
|
+
type: 'input',
|
|
46
|
+
default: ''
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: 'productHandle',
|
|
50
|
+
type: 'input',
|
|
51
|
+
default: ''
|
|
52
|
+
},
|
|
38
53
|
{
|
|
39
54
|
id: 'install',
|
|
40
55
|
type: 'open-link',
|
|
@@ -51,6 +66,38 @@ const config = {
|
|
|
51
66
|
href: 'https://admin.shopify.com/?redirect=/apps/releasit-cod-order-form',
|
|
52
67
|
appName: ReleasitConfig.label
|
|
53
68
|
},
|
|
69
|
+
{
|
|
70
|
+
id: 'version',
|
|
71
|
+
label: 'Choose version',
|
|
72
|
+
type: 'select',
|
|
73
|
+
default: 'v1',
|
|
74
|
+
options: [
|
|
75
|
+
{
|
|
76
|
+
label: 'V1',
|
|
77
|
+
value: 'v1'
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
label: 'V2',
|
|
81
|
+
value: 'v2'
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: 'widgetTypeV2',
|
|
87
|
+
label: 'Choose widget',
|
|
88
|
+
type: 'select',
|
|
89
|
+
default: 'button-app-block',
|
|
90
|
+
options: [
|
|
91
|
+
{
|
|
92
|
+
label: 'Releasit button',
|
|
93
|
+
value: 'button-app-block'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
label: 'Releasit embedded form',
|
|
97
|
+
value: 'form-app-block'
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
},
|
|
54
101
|
{
|
|
55
102
|
id: 'align',
|
|
56
103
|
label: 'Alignment',
|
|
@@ -91,12 +138,22 @@ const config = {
|
|
|
91
138
|
{
|
|
92
139
|
type: 'control',
|
|
93
140
|
label: {
|
|
94
|
-
en: 'Choose
|
|
141
|
+
en: 'Choose version'
|
|
95
142
|
},
|
|
96
143
|
setting: {
|
|
97
|
-
id: '
|
|
144
|
+
id: 'version'
|
|
98
145
|
}
|
|
99
146
|
},
|
|
147
|
+
{
|
|
148
|
+
type: 'control',
|
|
149
|
+
label: {
|
|
150
|
+
en: 'Choose widget'
|
|
151
|
+
},
|
|
152
|
+
setting: {
|
|
153
|
+
id: 'widgetTypeV2'
|
|
154
|
+
},
|
|
155
|
+
condition: 'version === "v2"'
|
|
156
|
+
},
|
|
100
157
|
{
|
|
101
158
|
type: 'control',
|
|
102
159
|
setting: {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4500,6 +4500,10 @@ type ReleasitProps = BaseProps<{
|
|
|
4500
4500
|
align?: ObjectDevices<AlignProp>;
|
|
4501
4501
|
openApp?: any;
|
|
4502
4502
|
install?: any;
|
|
4503
|
+
version?: 'v1' | 'v2';
|
|
4504
|
+
widgetTypeV2?: string;
|
|
4505
|
+
appBlockId?: string;
|
|
4506
|
+
productHandle?: string;
|
|
4503
4507
|
}>;
|
|
4504
4508
|
declare const Releasit$1: React.FC<ReleasitProps>;
|
|
4505
4509
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.345",
|
|
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.
|
|
25
|
+
"@gem-sdk/core": "2.0.0-dev.345",
|
|
26
26
|
"@gem-sdk/styles": "2.0.0-dev.324",
|
|
27
27
|
"@gem-sdk/system": "2.0.0-dev.324",
|
|
28
28
|
"@types/react-transition-group": "^4.4.5"
|