@gem-sdk/components 2.0.0-dev.350 → 2.0.0-dev.352
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/article/setting/configs/ArticleAuthor/uiV2.js +9 -2
- package/dist/cjs/article/setting/configs/ArticleDate/uiV2.js +13 -6
- package/dist/cjs/article/setting/configs/ArticleExcerpt/settings.js +1 -1
- package/dist/cjs/article/setting/configs/ArticleExcerpt/uiV2.js +11 -1
- package/dist/cjs/article/setting/configs/ArticleReadMore/presets.js +9 -9
- package/dist/cjs/article/setting/configs/ArticleReadMore/settings.js +4 -4
- package/dist/cjs/article/setting/configs/ArticleReadMore/uiV2.js +16 -12
- package/dist/cjs/banner/components/HeroBanner.liquid.js +1 -1
- package/dist/cjs/banner/setting/presets/heroBanner1Col.js +0 -9
- package/dist/cjs/banner/setting/presets/heroBannerContentLeft.js +0 -9
- package/dist/cjs/banner/setting/presets/heroBannerContentRight.js +0 -9
- package/dist/cjs/banner/setting/presets/heroBannerParallax.js +0 -9
- package/dist/cjs/banner/setting/presets/heroBannerVideo.js +6 -0
- package/dist/cjs/banner/setting/setting.js +9 -5
- package/dist/cjs/stock-counter/components/StockCounter.js +104 -112
- package/dist/cjs/stock-counter/components/StockCounter.liquid.js +116 -141
- package/dist/cjs/stock-counter/components/common/getAttrs.js +44 -0
- package/dist/cjs/stock-counter/components/common/getClasses.js +68 -0
- package/dist/cjs/stock-counter/components/common/getContent.js +71 -0
- package/dist/cjs/stock-counter/components/common/getInlineCss.js +39 -0
- package/dist/cjs/stock-counter/components/common/getStyles.js +73 -0
- package/dist/cjs/stock-counter/components/hook/useStockCounter.js +37 -0
- package/dist/cjs/stock-counter/const.js +0 -6
- package/dist/cjs/stock-counter/helpers.js +0 -14
- package/dist/cjs/stock-counter/index.js +3 -1
- package/dist/cjs/stock-counter/setting/StockCounter.js +2 -2
- package/dist/cjs/stock-counter/setting/configs/presets.js +3 -0
- package/dist/cjs/stock-counter/setting/configs/{settings.js → settingsV2.js} +211 -42
- package/dist/cjs/stock-counter/setting/configs/uiV2.js +228 -41
- package/dist/esm/article/setting/configs/ArticleAuthor/uiV2.js +9 -2
- package/dist/esm/article/setting/configs/ArticleDate/uiV2.js +13 -6
- package/dist/esm/article/setting/configs/ArticleExcerpt/settings.js +1 -1
- package/dist/esm/article/setting/configs/ArticleExcerpt/uiV2.js +11 -1
- package/dist/esm/article/setting/configs/ArticleReadMore/presets.js +9 -9
- package/dist/esm/article/setting/configs/ArticleReadMore/settings.js +4 -4
- package/dist/esm/article/setting/configs/ArticleReadMore/uiV2.js +16 -12
- package/dist/esm/banner/components/HeroBanner.liquid.js +1 -1
- package/dist/esm/banner/setting/presets/heroBanner1Col.js +0 -9
- package/dist/esm/banner/setting/presets/heroBannerContentLeft.js +0 -9
- package/dist/esm/banner/setting/presets/heroBannerContentRight.js +0 -9
- package/dist/esm/banner/setting/presets/heroBannerParallax.js +0 -9
- package/dist/esm/banner/setting/presets/heroBannerVideo.js +6 -0
- package/dist/esm/banner/setting/setting.js +9 -5
- package/dist/esm/stock-counter/components/StockCounter.js +106 -114
- package/dist/esm/stock-counter/components/StockCounter.liquid.js +116 -141
- package/dist/esm/stock-counter/components/common/getAttrs.js +39 -0
- package/dist/esm/stock-counter/components/common/getClasses.js +60 -0
- package/dist/esm/stock-counter/components/common/getContent.js +68 -0
- package/dist/esm/stock-counter/components/common/getInlineCss.js +37 -0
- package/dist/esm/stock-counter/components/common/getStyles.js +67 -0
- package/dist/esm/stock-counter/components/hook/useStockCounter.js +35 -0
- package/dist/esm/stock-counter/const.js +1 -4
- package/dist/esm/stock-counter/helpers.js +1 -14
- package/dist/esm/stock-counter/index.js +3 -1
- package/dist/esm/stock-counter/setting/StockCounter.js +2 -2
- package/dist/esm/stock-counter/setting/configs/presets.js +3 -0
- package/dist/esm/stock-counter/setting/configs/settingsV2.js +438 -0
- package/dist/esm/stock-counter/setting/configs/uiV2.js +228 -41
- package/dist/types/index.d.ts +13 -5
- package/package.json +1 -1
- package/dist/esm/stock-counter/setting/configs/settings.js +0 -269
|
@@ -1,51 +1,128 @@
|
|
|
1
1
|
const SettingUIV2 = [
|
|
2
2
|
{
|
|
3
|
+
label: {
|
|
4
|
+
en: 'layout'
|
|
5
|
+
},
|
|
6
|
+
controls: [
|
|
7
|
+
{
|
|
8
|
+
setting: {
|
|
9
|
+
id: 'layout'
|
|
10
|
+
},
|
|
11
|
+
layout: 'vertical',
|
|
12
|
+
controlChangeTrigger: {
|
|
13
|
+
settings: [
|
|
14
|
+
{
|
|
15
|
+
action: {
|
|
16
|
+
controlId: 'displayProgressBar',
|
|
17
|
+
newValue: true,
|
|
18
|
+
groupType: 'style',
|
|
19
|
+
controlType: 'style'
|
|
20
|
+
},
|
|
21
|
+
source: [
|
|
22
|
+
'layout'
|
|
23
|
+
],
|
|
24
|
+
condition: `layout !== 'icon-and-text' && layout !== 'text-only'`
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
action: {
|
|
28
|
+
controlId: 'displayProgressBar',
|
|
29
|
+
newValue: false,
|
|
30
|
+
groupType: 'style',
|
|
31
|
+
controlType: 'style'
|
|
32
|
+
},
|
|
33
|
+
source: [
|
|
34
|
+
'layout'
|
|
35
|
+
],
|
|
36
|
+
condition: `layout === 'icon-and-text' || layout === 'text-only'`
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
action: {
|
|
40
|
+
controlId: 'showIcon',
|
|
41
|
+
newValue: true,
|
|
42
|
+
groupType: 'setting',
|
|
43
|
+
controlType: 'setting'
|
|
44
|
+
},
|
|
45
|
+
source: [
|
|
46
|
+
'layout'
|
|
47
|
+
],
|
|
48
|
+
condition: `layout === 'full' || layout === 'icon-and-text'`
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
action: {
|
|
52
|
+
controlId: 'showIcon',
|
|
53
|
+
newValue: false,
|
|
54
|
+
groupType: 'setting',
|
|
55
|
+
controlType: 'setting'
|
|
56
|
+
},
|
|
57
|
+
source: [
|
|
58
|
+
'layout'
|
|
59
|
+
],
|
|
60
|
+
condition: `layout === 'text-and-progress-bar' || layout === 'progress-bar' || layout === 'text-only'`
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
options: {
|
|
64
|
+
noRecordHistory: true
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
label: {
|
|
72
|
+
en: 'Stock'
|
|
73
|
+
},
|
|
3
74
|
controls: [
|
|
4
75
|
{
|
|
5
76
|
label: {
|
|
6
|
-
en: '
|
|
77
|
+
en: 'Source'
|
|
7
78
|
},
|
|
8
79
|
setting: {
|
|
9
|
-
id: '
|
|
80
|
+
id: 'source'
|
|
10
81
|
},
|
|
11
|
-
|
|
12
|
-
labelVariant: 'primary'
|
|
13
|
-
}
|
|
82
|
+
layout: 'horizontal'
|
|
14
83
|
},
|
|
15
84
|
{
|
|
16
|
-
conditionDisplay: '
|
|
85
|
+
conditionDisplay: 'source === "custom"',
|
|
17
86
|
label: {
|
|
18
|
-
en: '
|
|
87
|
+
en: 'Remaining'
|
|
19
88
|
},
|
|
20
89
|
setting: {
|
|
21
|
-
id: '
|
|
22
|
-
}
|
|
23
|
-
|
|
90
|
+
id: 'remaining'
|
|
91
|
+
},
|
|
92
|
+
layout: 'horizontal'
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
controls: [
|
|
24
98
|
{
|
|
25
|
-
conditionDisplay: 'displayProgressBar == true',
|
|
26
99
|
label: {
|
|
27
|
-
en: '
|
|
100
|
+
en: 'Progress bar'
|
|
28
101
|
},
|
|
29
102
|
setting: {
|
|
30
|
-
id: '
|
|
103
|
+
id: 'displayProgressBar'
|
|
104
|
+
},
|
|
105
|
+
options: {
|
|
106
|
+
labelVariant: 'primary',
|
|
107
|
+
toggleStyle: 'switch'
|
|
31
108
|
}
|
|
32
109
|
},
|
|
33
110
|
{
|
|
34
111
|
conditionDisplay: 'displayProgressBar == true',
|
|
35
112
|
label: {
|
|
36
|
-
en: '
|
|
113
|
+
en: 'Percentage left'
|
|
37
114
|
},
|
|
38
115
|
setting: {
|
|
39
|
-
id: '
|
|
116
|
+
id: 'remainingPercentage'
|
|
40
117
|
}
|
|
41
118
|
},
|
|
42
119
|
{
|
|
43
120
|
conditionDisplay: 'displayProgressBar == true',
|
|
44
121
|
label: {
|
|
45
|
-
en: '
|
|
122
|
+
en: 'Color'
|
|
46
123
|
},
|
|
47
124
|
setting: {
|
|
48
|
-
id: '
|
|
125
|
+
id: 'color'
|
|
49
126
|
}
|
|
50
127
|
},
|
|
51
128
|
{
|
|
@@ -57,7 +134,39 @@ const SettingUIV2 = [
|
|
|
57
134
|
id: 'effect'
|
|
58
135
|
}
|
|
59
136
|
}
|
|
60
|
-
]
|
|
137
|
+
],
|
|
138
|
+
moreSettings: {
|
|
139
|
+
type: 'collapse',
|
|
140
|
+
controls: [
|
|
141
|
+
{
|
|
142
|
+
conditionDisplay: 'displayProgressBar == true',
|
|
143
|
+
label: {
|
|
144
|
+
en: 'Height'
|
|
145
|
+
},
|
|
146
|
+
setting: {
|
|
147
|
+
id: 'progressBarHeight'
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
conditionDisplay: 'displayProgressBar == true',
|
|
152
|
+
label: {
|
|
153
|
+
en: 'Position'
|
|
154
|
+
},
|
|
155
|
+
setting: {
|
|
156
|
+
id: 'progressBarPosition'
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
conditionDisplay: 'displayProgressBar == true',
|
|
161
|
+
label: {
|
|
162
|
+
en: 'Corner'
|
|
163
|
+
},
|
|
164
|
+
setting: {
|
|
165
|
+
id: 'borderRadius'
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
}
|
|
61
170
|
},
|
|
62
171
|
{
|
|
63
172
|
controls: [
|
|
@@ -74,20 +183,58 @@ const SettingUIV2 = [
|
|
|
74
183
|
}
|
|
75
184
|
},
|
|
76
185
|
{
|
|
186
|
+
label: {
|
|
187
|
+
en: 'Icon'
|
|
188
|
+
},
|
|
77
189
|
conditionDisplay: 'showIcon == true',
|
|
78
190
|
setting: {
|
|
79
191
|
id: 'icon'
|
|
80
192
|
},
|
|
81
|
-
layout: '
|
|
193
|
+
layout: 'horizontal'
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
label: {
|
|
197
|
+
en: 'Size'
|
|
198
|
+
},
|
|
199
|
+
conditionDisplay: 'showIcon == true',
|
|
200
|
+
setting: {
|
|
201
|
+
id: 'iconSize'
|
|
202
|
+
},
|
|
203
|
+
layout: 'horizontal'
|
|
82
204
|
},
|
|
83
205
|
{
|
|
84
206
|
conditionDisplay: 'showIcon == true',
|
|
85
207
|
label: {
|
|
86
|
-
en: '
|
|
208
|
+
en: 'Color'
|
|
87
209
|
},
|
|
88
210
|
setting: {
|
|
89
211
|
id: 'iconColor'
|
|
90
212
|
}
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
label: {
|
|
216
|
+
en: 'Position'
|
|
217
|
+
},
|
|
218
|
+
conditionDisplay: 'showIcon == true',
|
|
219
|
+
setting: {
|
|
220
|
+
id: 'iconPosition'
|
|
221
|
+
},
|
|
222
|
+
layout: 'horizontal'
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
label: {
|
|
228
|
+
en: 'Size'
|
|
229
|
+
},
|
|
230
|
+
controls: [
|
|
231
|
+
{
|
|
232
|
+
label: {
|
|
233
|
+
en: 'Width'
|
|
234
|
+
},
|
|
235
|
+
setting: {
|
|
236
|
+
id: 'width'
|
|
237
|
+
}
|
|
91
238
|
}
|
|
92
239
|
]
|
|
93
240
|
},
|
|
@@ -96,6 +243,26 @@ const SettingUIV2 = [
|
|
|
96
243
|
en: 'Text styles'
|
|
97
244
|
},
|
|
98
245
|
controls: [
|
|
246
|
+
{
|
|
247
|
+
label: {
|
|
248
|
+
en: 'Content'
|
|
249
|
+
},
|
|
250
|
+
type: 'combo',
|
|
251
|
+
iconName: 'polaris-text-block',
|
|
252
|
+
getValueFromSettingID: 'template',
|
|
253
|
+
isHideClear: true,
|
|
254
|
+
controls: [
|
|
255
|
+
{
|
|
256
|
+
label: {
|
|
257
|
+
en: 'Content'
|
|
258
|
+
},
|
|
259
|
+
setting: {
|
|
260
|
+
id: 'template'
|
|
261
|
+
},
|
|
262
|
+
layout: 'vertical'
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
},
|
|
99
266
|
{
|
|
100
267
|
setting: {
|
|
101
268
|
id: 'typo'
|
|
@@ -119,73 +286,93 @@ const SettingUIV2 = [
|
|
|
119
286
|
},
|
|
120
287
|
{
|
|
121
288
|
label: {
|
|
122
|
-
en: '
|
|
289
|
+
en: 'Stock'
|
|
123
290
|
},
|
|
124
291
|
conditionDisplay: 'displayByDefault == false',
|
|
125
292
|
setting: {
|
|
126
293
|
id: 'scarcityThreshold'
|
|
127
294
|
}
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
label: {
|
|
131
|
-
en: 'Hide counter when out of stock'
|
|
132
|
-
},
|
|
133
|
-
setting: {
|
|
134
|
-
id: 'hiddenCounterWhenOutOfStock'
|
|
135
|
-
}
|
|
136
295
|
}
|
|
137
296
|
]
|
|
138
297
|
},
|
|
139
298
|
{
|
|
140
299
|
label: {
|
|
141
|
-
en: '
|
|
300
|
+
en: 'Out of stock state'
|
|
142
301
|
},
|
|
143
302
|
controls: [
|
|
144
303
|
{
|
|
145
304
|
label: {
|
|
146
|
-
en: '
|
|
305
|
+
en: 'Action'
|
|
147
306
|
},
|
|
148
307
|
setting: {
|
|
149
|
-
id: '
|
|
308
|
+
id: 'hiddenCounterWhenOutOfStock'
|
|
150
309
|
}
|
|
151
310
|
},
|
|
152
311
|
{
|
|
153
312
|
label: {
|
|
154
|
-
en: '
|
|
313
|
+
en: 'Icon'
|
|
155
314
|
},
|
|
156
315
|
setting: {
|
|
157
|
-
id: '
|
|
316
|
+
id: 'oosIcon'
|
|
158
317
|
}
|
|
159
318
|
},
|
|
160
319
|
{
|
|
161
320
|
label: {
|
|
162
|
-
en: '
|
|
321
|
+
en: 'Content'
|
|
322
|
+
},
|
|
323
|
+
type: 'combo',
|
|
324
|
+
iconName: 'polaris-text-block',
|
|
325
|
+
getValueFromSettingID: 'outOfStockMessage',
|
|
326
|
+
isHideClear: true,
|
|
327
|
+
controls: [
|
|
328
|
+
{
|
|
329
|
+
label: {
|
|
330
|
+
en: 'Content'
|
|
331
|
+
},
|
|
332
|
+
setting: {
|
|
333
|
+
id: 'outOfStockMessage'
|
|
334
|
+
},
|
|
335
|
+
layout: 'vertical'
|
|
336
|
+
}
|
|
337
|
+
]
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
label: {
|
|
341
|
+
en: 'Icon Color'
|
|
163
342
|
},
|
|
164
343
|
setting: {
|
|
165
|
-
id: '
|
|
344
|
+
id: 'oosIconColor'
|
|
166
345
|
}
|
|
167
346
|
},
|
|
168
347
|
{
|
|
169
348
|
label: {
|
|
170
|
-
en: '
|
|
349
|
+
en: 'Text Color'
|
|
171
350
|
},
|
|
172
351
|
setting: {
|
|
173
|
-
id: '
|
|
352
|
+
id: 'oosTextColor'
|
|
174
353
|
}
|
|
175
354
|
}
|
|
176
355
|
]
|
|
177
356
|
},
|
|
178
357
|
{
|
|
179
358
|
label: {
|
|
180
|
-
en: '
|
|
359
|
+
en: 'Message'
|
|
181
360
|
},
|
|
182
361
|
controls: [
|
|
183
362
|
{
|
|
184
363
|
label: {
|
|
185
|
-
en: '
|
|
364
|
+
en: 'Out of stock sell'
|
|
186
365
|
},
|
|
187
366
|
setting: {
|
|
188
|
-
id: '
|
|
367
|
+
id: 'continueSelling'
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
label: {
|
|
372
|
+
en: 'Unlimited quantity'
|
|
373
|
+
},
|
|
374
|
+
setting: {
|
|
375
|
+
id: 'unlimitedQuantityMessage'
|
|
189
376
|
}
|
|
190
377
|
}
|
|
191
378
|
]
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5338,7 +5338,6 @@ type StockCounterSettings = {
|
|
|
5338
5338
|
displayByDefault?: boolean;
|
|
5339
5339
|
scarcityThreshold?: number;
|
|
5340
5340
|
remainingPercentage?: number;
|
|
5341
|
-
remainingQuantity?: number;
|
|
5342
5341
|
showIcon?: boolean;
|
|
5343
5342
|
hiddenCounterWhenOutOfStock?: boolean;
|
|
5344
5343
|
icon?: string;
|
|
@@ -5347,6 +5346,13 @@ type StockCounterSettings = {
|
|
|
5347
5346
|
continueSelling?: string;
|
|
5348
5347
|
unlimitedQuantityMessage?: string;
|
|
5349
5348
|
translate?: string;
|
|
5349
|
+
layout?: 'full' | 'text-and-progress-bar' | 'icon-and-text' | 'progress-bar' | 'text-only';
|
|
5350
|
+
source?: 'custom' | 'built-in';
|
|
5351
|
+
remaining?: number;
|
|
5352
|
+
oosIcon?: string;
|
|
5353
|
+
progressBarPosition?: 'top' | 'bottom';
|
|
5354
|
+
iconPosition?: 'left' | 'right';
|
|
5355
|
+
iconSize?: ObjectDevices$1<number>;
|
|
5350
5356
|
};
|
|
5351
5357
|
type StockCounterStyles = {
|
|
5352
5358
|
fullWidth?: ObjectDevices$1<boolean>;
|
|
@@ -5361,12 +5367,14 @@ type StockCounterStyles = {
|
|
|
5361
5367
|
iconColor?: ColorValueType$1;
|
|
5362
5368
|
textColor?: ColorValueType$1;
|
|
5363
5369
|
displayProgressBar?: boolean;
|
|
5364
|
-
progressBarHeight?: ObjectDevices$1<string>;
|
|
5370
|
+
progressBarHeight?: ObjectDevices$1<number | string>;
|
|
5365
5371
|
roundedBorder?: boolean;
|
|
5366
5372
|
effect?: boolean;
|
|
5373
|
+
oosIconColor?: ColorValueType$1;
|
|
5374
|
+
oosTextColor?: ColorValueType$1;
|
|
5375
|
+
borderRadius?: ObjectDevices$1<CornerRadius>;
|
|
5367
5376
|
};
|
|
5368
|
-
type StockCounterProps =
|
|
5369
|
-
type StockCounterPropsLiquid = BasePropsWrap<StockCounterSettings, StockCounterStyles>;
|
|
5377
|
+
type StockCounterProps = BasePropsWrap<StockCounterSettings, StockCounterStyles>;
|
|
5370
5378
|
|
|
5371
5379
|
declare const StockCounter$1: React.FC<StockCounterProps>;
|
|
5372
5380
|
|
|
@@ -6350,7 +6358,7 @@ declare const Tabs: (props: TabsProps) => string;
|
|
|
6350
6358
|
|
|
6351
6359
|
declare const TabItem: (props: TabItemProps) => string;
|
|
6352
6360
|
|
|
6353
|
-
declare const StockCounter: ({ setting, styles, style, advanced, builderProps
|
|
6361
|
+
declare const StockCounter: ({ setting, styles, style, advanced, builderProps }: StockCounterProps) => string;
|
|
6354
6362
|
|
|
6355
6363
|
declare const Klaviyo: ({ setting, advanced }: KlaviyoProps) => string;
|
|
6356
6364
|
|