@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,269 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_SCARCITY_THRESHOLD, DEFAULT_REMAINING_PERCENT, MIN_REMAINING_PERCENT, MAX_REMAINING_PERCENT, DEFAULT_RANGE_STEP, DEFAULT_HIGHLIGHT_TAG, DEFAULT_QUANTITY_TEMPLATE, MIN_PROGRESS_BAR_HEIGHT, MAX_PROGRESS_BAR_HEIGHT, DEFAULT_PROGRESS_BAR_HEIGHT } from '../../const.js';
|
|
2
|
-
|
|
3
|
-
const StockCounterSettings = [
|
|
4
|
-
{
|
|
5
|
-
id: 'setting',
|
|
6
|
-
controls: [
|
|
7
|
-
{
|
|
8
|
-
id: 'displayCondition',
|
|
9
|
-
label: 'Display Condition',
|
|
10
|
-
type: 'group',
|
|
11
|
-
controls: [
|
|
12
|
-
{
|
|
13
|
-
id: 'displayByDefault',
|
|
14
|
-
label: 'Display By Default',
|
|
15
|
-
type: 'toggle',
|
|
16
|
-
default: true
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
id: 'scarcityThreshold',
|
|
20
|
-
label: 'Scarcity Threshold',
|
|
21
|
-
type: 'input:stepper',
|
|
22
|
-
default: DEFAULT_SCARCITY_THRESHOLD,
|
|
23
|
-
info: 'Only show if inventory quantity less than or equal to the above number.'
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
id: 'stockQuantity',
|
|
29
|
-
label: 'Stock Quantity',
|
|
30
|
-
type: 'group',
|
|
31
|
-
controls: [
|
|
32
|
-
{
|
|
33
|
-
id: 'segment',
|
|
34
|
-
type: 'group',
|
|
35
|
-
controls: [
|
|
36
|
-
{
|
|
37
|
-
id: 'remainingPercentage',
|
|
38
|
-
label: 'Remaining Percentage (%)',
|
|
39
|
-
type: 'input:slider',
|
|
40
|
-
default: DEFAULT_REMAINING_PERCENT,
|
|
41
|
-
min: MIN_REMAINING_PERCENT,
|
|
42
|
-
max: MAX_REMAINING_PERCENT,
|
|
43
|
-
step: DEFAULT_RANGE_STEP,
|
|
44
|
-
units: [
|
|
45
|
-
'%'
|
|
46
|
-
],
|
|
47
|
-
useOnlyUnitInit: true
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
id: 'hiddenCounterWhenOutOfStock',
|
|
51
|
-
label: 'Hide counter when out of stock',
|
|
52
|
-
type: 'toggle',
|
|
53
|
-
default: false
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
]
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
id: 'message',
|
|
61
|
-
label: 'Message',
|
|
62
|
-
type: 'group',
|
|
63
|
-
controls: [
|
|
64
|
-
{
|
|
65
|
-
id: 'template',
|
|
66
|
-
label: 'Template',
|
|
67
|
-
type: 'textarea',
|
|
68
|
-
autoHeight: true,
|
|
69
|
-
default: `<${DEFAULT_HIGHLIGHT_TAG}>HURRY!</${DEFAULT_HIGHLIGHT_TAG}> ONLY ${DEFAULT_QUANTITY_TEMPLATE} LEFT`,
|
|
70
|
-
info: `Use ${DEFAULT_QUANTITY_TEMPLATE} to represent remaining number`
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
id: 'outOfStockMessage',
|
|
74
|
-
label: 'Out Of Stock Message',
|
|
75
|
-
type: 'input',
|
|
76
|
-
default: 'OUT OF STOCK'
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
id: 'continueSelling',
|
|
80
|
-
label: 'Continue Selling When Out Of Stock Message',
|
|
81
|
-
type: 'textarea',
|
|
82
|
-
autoHeight: true,
|
|
83
|
-
default: '<mark>Restock soon!</mark> PREORDER NOW',
|
|
84
|
-
info: 'Turn out-of-stock productions into pre-orders'
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
id: 'unlimitedQuantityMessage',
|
|
88
|
-
label: 'Unlimited Quantity Message',
|
|
89
|
-
type: 'textarea',
|
|
90
|
-
autoHeight: true,
|
|
91
|
-
default: '<mark>HURRY!</mark> LET BUY NOW'
|
|
92
|
-
}
|
|
93
|
-
]
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
id: 'icon',
|
|
97
|
-
label: 'Icon',
|
|
98
|
-
type: 'group',
|
|
99
|
-
controls: [
|
|
100
|
-
{
|
|
101
|
-
id: 'showIcon',
|
|
102
|
-
label: 'Show Icon',
|
|
103
|
-
type: 'toggle',
|
|
104
|
-
default: true
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
id: 'icon',
|
|
108
|
-
label: '',
|
|
109
|
-
type: 'icon',
|
|
110
|
-
default: `<svg style="width: 100%; height: 100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"> <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M176.64 11.488A16 16 0 0 1 192 0h128a16 16 0 0 1 15.168 21.056L278.208 192H400a16 16 0 0 1 12.64 25.824l-224 288a16 16 0 0 1 -27.936 -14.528L218.336 304H112a16 16 0 0 1 -15.36 -20.512l80 -272z" /></svg>`
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
]
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
id: 'style',
|
|
118
|
-
controls: [
|
|
119
|
-
{
|
|
120
|
-
id: 'dimension',
|
|
121
|
-
label: 'Dimension',
|
|
122
|
-
type: 'group',
|
|
123
|
-
controls: [
|
|
124
|
-
{
|
|
125
|
-
id: 'fullWidth',
|
|
126
|
-
label: 'Full width',
|
|
127
|
-
type: 'toggle',
|
|
128
|
-
devices: {
|
|
129
|
-
desktop: {
|
|
130
|
-
default: true
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
id: 'width',
|
|
136
|
-
label: 'Width',
|
|
137
|
-
type: 'input:unit',
|
|
138
|
-
units: [
|
|
139
|
-
'px',
|
|
140
|
-
'%'
|
|
141
|
-
],
|
|
142
|
-
devices: {
|
|
143
|
-
desktop: {
|
|
144
|
-
default: '100%'
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
id: 'alignment',
|
|
150
|
-
label: 'Alignment',
|
|
151
|
-
type: 'option:value',
|
|
152
|
-
options: [
|
|
153
|
-
{
|
|
154
|
-
label: 'Left',
|
|
155
|
-
value: 'left',
|
|
156
|
-
type: 'align',
|
|
157
|
-
tooltip: 'Align left',
|
|
158
|
-
iconName: 'gp-align-left'
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
label: 'Center',
|
|
162
|
-
value: 'center',
|
|
163
|
-
type: 'align',
|
|
164
|
-
tooltip: 'Align center',
|
|
165
|
-
iconName: 'gp-align-center'
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
label: 'Right',
|
|
169
|
-
value: 'right',
|
|
170
|
-
type: 'align',
|
|
171
|
-
tooltip: 'Align right',
|
|
172
|
-
iconName: 'gp-align-right'
|
|
173
|
-
}
|
|
174
|
-
],
|
|
175
|
-
devices: {
|
|
176
|
-
desktop: {
|
|
177
|
-
default: 'left'
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
]
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
id: 'display',
|
|
185
|
-
label: 'Display',
|
|
186
|
-
type: 'group',
|
|
187
|
-
controls: [
|
|
188
|
-
{
|
|
189
|
-
id: 'typo',
|
|
190
|
-
type: 'typography-v2',
|
|
191
|
-
label: 'Typography',
|
|
192
|
-
default: {
|
|
193
|
-
type: 'paragraph-1',
|
|
194
|
-
attrs: {
|
|
195
|
-
color: 'text-1'
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
ignoreReRender: true,
|
|
199
|
-
hiddenSetting: {
|
|
200
|
-
textAlign: true
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
id: 'textColor',
|
|
205
|
-
label: 'Text Color',
|
|
206
|
-
type: 'color-picker-v2',
|
|
207
|
-
default: 'text-1'
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
id: 'color',
|
|
211
|
-
label: 'Color',
|
|
212
|
-
type: 'color-picker-v2',
|
|
213
|
-
default: 'line-3'
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
id: 'iconColor',
|
|
217
|
-
label: 'Color',
|
|
218
|
-
type: 'color-picker-v2',
|
|
219
|
-
default: 'text-2'
|
|
220
|
-
}
|
|
221
|
-
]
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
id: 'progressBar',
|
|
225
|
-
label: 'Progress Bar',
|
|
226
|
-
type: 'group',
|
|
227
|
-
controls: [
|
|
228
|
-
{
|
|
229
|
-
id: 'displayProgressBar',
|
|
230
|
-
label: 'Display',
|
|
231
|
-
type: 'toggle',
|
|
232
|
-
default: true
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
id: 'progressBarHeight',
|
|
236
|
-
label: 'Height',
|
|
237
|
-
type: 'input:unit',
|
|
238
|
-
// default: `${DEFAULT_PROGRESS_BAR_HEIGHT}px`,
|
|
239
|
-
// step: DEFAULT_RANGE_STEP,
|
|
240
|
-
min: MIN_PROGRESS_BAR_HEIGHT,
|
|
241
|
-
max: MAX_PROGRESS_BAR_HEIGHT,
|
|
242
|
-
units: [
|
|
243
|
-
'px'
|
|
244
|
-
],
|
|
245
|
-
devices: {
|
|
246
|
-
desktop: {
|
|
247
|
-
default: `${DEFAULT_PROGRESS_BAR_HEIGHT}px`
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
id: 'roundedBorder',
|
|
253
|
-
label: 'Rounded Border',
|
|
254
|
-
type: 'toggle',
|
|
255
|
-
default: true
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
id: 'effect',
|
|
259
|
-
label: 'Effect',
|
|
260
|
-
type: 'toggle',
|
|
261
|
-
default: true
|
|
262
|
-
}
|
|
263
|
-
]
|
|
264
|
-
}
|
|
265
|
-
]
|
|
266
|
-
}
|
|
267
|
-
];
|
|
268
|
-
|
|
269
|
-
export { StockCounterSettings };
|