@gem-sdk/components 2.0.0-dev.481 → 2.0.0-dev.482
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/components/ArticleList.js +1 -2
- package/dist/cjs/article/components/ArticleList.liquid.js +1 -1
- package/dist/cjs/article/setting/ArticleList.js +7 -591
- package/dist/cjs/article/setting/configs/ArticleList/presets.js +346 -0
- package/dist/cjs/article/setting/configs/ArticleList/settings.js +315 -0
- package/dist/cjs/article/setting/configs/ArticleList/uiV2.js +201 -0
- package/dist/cjs/banner/components/HeroBanner.liquid.js +2 -2
- package/dist/cjs/banner/components/HeroBannerItem.js +15 -7
- package/dist/cjs/banner/components/HeroBannerItem.liquid.js +13 -11
- package/dist/cjs/banner/components/common/common.js +13 -29
- package/dist/cjs/banner/components/common/getClasses.js +2 -1
- package/dist/cjs/banner/components/common/getStyle.js +2 -0
- package/dist/cjs/banner/components/hooks/useHeroBanner.js +2 -7
- package/dist/cjs/banner/setting/setting.js +6 -0
- package/dist/cjs/banner/setting/uiV2.js +15 -3
- package/dist/cjs/product/components/ProductDiscountTag/index.liquid.js +3 -2
- package/dist/cjs/product/components/ProductSKU/Sku.liquid.js +3 -2
- package/dist/cjs/product/setting/product-price/configs/uiV2.js +1 -1
- package/dist/cjs/stock-counter/setting/configs/settingsV2.js +7 -6
- package/dist/cjs/stock-counter/setting/configs/uiV2.js +36 -6
- package/dist/esm/article/components/ArticleList.js +1 -2
- package/dist/esm/article/components/ArticleList.liquid.js +1 -1
- package/dist/esm/article/setting/ArticleList.js +7 -591
- package/dist/esm/article/setting/configs/ArticleList/presets.js +344 -0
- package/dist/esm/article/setting/configs/ArticleList/settings.js +313 -0
- package/dist/esm/article/setting/configs/ArticleList/uiV2.js +199 -0
- package/dist/esm/banner/components/HeroBanner.liquid.js +2 -2
- package/dist/esm/banner/components/HeroBannerItem.js +16 -8
- package/dist/esm/banner/components/HeroBannerItem.liquid.js +12 -10
- package/dist/esm/banner/components/common/common.js +15 -30
- package/dist/esm/banner/components/common/getClasses.js +2 -1
- package/dist/esm/banner/components/common/getStyle.js +2 -0
- package/dist/esm/banner/components/hooks/useHeroBanner.js +4 -9
- package/dist/esm/banner/setting/setting.js +6 -0
- package/dist/esm/banner/setting/uiV2.js +15 -3
- package/dist/esm/product/components/ProductDiscountTag/index.liquid.js +3 -2
- package/dist/esm/product/components/ProductSKU/Sku.liquid.js +4 -3
- package/dist/esm/product/setting/product-price/configs/uiV2.js +1 -1
- package/dist/esm/stock-counter/setting/configs/settingsV2.js +8 -7
- package/dist/esm/stock-counter/setting/configs/uiV2.js +36 -6
- package/dist/types/index.d.ts +2 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_SCARCITY_THRESHOLD,
|
|
1
|
+
import { DEFAULT_SCARCITY_THRESHOLD, DEFAULT_QUANTITY_TEMPLATE, DEFAULT_REMAINING_PERCENT, MIN_REMAINING_PERCENT, MAX_REMAINING_PERCENT, DEFAULT_RANGE_STEP } from '../../const.js';
|
|
2
2
|
|
|
3
3
|
const StockCounterSettingsV2 = [
|
|
4
4
|
{
|
|
@@ -65,7 +65,7 @@ const StockCounterSettingsV2 = [
|
|
|
65
65
|
{
|
|
66
66
|
id: 'remaining',
|
|
67
67
|
type: 'input:stepper',
|
|
68
|
-
default:
|
|
68
|
+
default: 4
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
id: 'displayCondition',
|
|
@@ -101,7 +101,7 @@ const StockCounterSettingsV2 = [
|
|
|
101
101
|
id: 'oosIcon',
|
|
102
102
|
label: '',
|
|
103
103
|
type: 'icon',
|
|
104
|
-
default: `<svg width="100%" height="100%" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> <path d="M7.75193 0.0658784C7.90565 -0.0219595 8.09435 -0.0219595 8.24807 0.0658784L11.9981 2.20874C12.1539 2.29776 12.25 2.46343 12.25 2.64286V6.63841L15.7481 8.63731C15.9039 8.72633 16 8.892 16 9.07143V13.3571C16 13.5366 15.9039 13.7022 15.7481 13.7913L11.9981 15.9341C11.8444 16.022 11.6556 16.022 11.5019 15.9341L8 13.933L4.49807 15.9341C4.34435 16.022 4.15565 16.022 4.00193 15.9341L0.25193 13.7913C0.096143 13.7022 0 13.5366 0 13.3571V9.07143C0 8.892 0.096143 8.72633 0.251931 8.63731L3.75 6.63841V2.64286C3.75 2.46343 3.84614 2.29776 4.00193 2.20874L7.75193 0.0658784ZM4.25 7.50445L1.50778 9.07143L4.25 10.6384L6.99222 9.07143L4.25 7.50445ZM7.5 9.93302L4.75 11.5044V14.6384L7.5 13.067V9.93302ZM8.5 13.067L11.25 14.6384V11.5044L8.5 9.93302V13.067ZM9.00778 9.07143L11.75 10.6384L14.4922 9.07143L11.75 7.50445L9.00778 9.07143ZM11.25 6.63841V3.50445L8.5 5.07588V8.20984L11.25 6.63841ZM7.5 8.20984V5.07588L4.75 3.50445V6.63841L7.5 8.20984ZM5.25778 2.64286L8 4.20984L10.7422 2.64286L8 1.07588L5.25778 2.64286ZM15 9.93302L12.25 11.5044V14.6384L15 13.067V9.93302ZM3.75 14.6384V11.5044L1 9.93302V13.067L3.75 14.6384Z" fill="currentColor"/> </svg>`
|
|
104
|
+
default: `<svg data-name="boxes" width="100%" height="100%" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> <path d="M7.75193 0.0658784C7.90565 -0.0219595 8.09435 -0.0219595 8.24807 0.0658784L11.9981 2.20874C12.1539 2.29776 12.25 2.46343 12.25 2.64286V6.63841L15.7481 8.63731C15.9039 8.72633 16 8.892 16 9.07143V13.3571C16 13.5366 15.9039 13.7022 15.7481 13.7913L11.9981 15.9341C11.8444 16.022 11.6556 16.022 11.5019 15.9341L8 13.933L4.49807 15.9341C4.34435 16.022 4.15565 16.022 4.00193 15.9341L0.25193 13.7913C0.096143 13.7022 0 13.5366 0 13.3571V9.07143C0 8.892 0.096143 8.72633 0.251931 8.63731L3.75 6.63841V2.64286C3.75 2.46343 3.84614 2.29776 4.00193 2.20874L7.75193 0.0658784ZM4.25 7.50445L1.50778 9.07143L4.25 10.6384L6.99222 9.07143L4.25 7.50445ZM7.5 9.93302L4.75 11.5044V14.6384L7.5 13.067V9.93302ZM8.5 13.067L11.25 14.6384V11.5044L8.5 9.93302V13.067ZM9.00778 9.07143L11.75 10.6384L14.4922 9.07143L11.75 7.50445L9.00778 9.07143ZM11.25 6.63841V3.50445L8.5 5.07588V8.20984L11.25 6.63841ZM7.5 8.20984V5.07588L4.75 3.50445V6.63841L7.5 8.20984ZM5.25778 2.64286L8 4.20984L10.7422 2.64286L8 1.07588L5.25778 2.64286ZM15 9.93302L12.25 11.5044V14.6384L15 13.067V9.93302ZM3.75 14.6384V11.5044L1 9.93302V13.067L3.75 14.6384Z" fill="currentColor"/> </svg>`
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
107
|
id: 'hiddenCounterWhenOutOfStock',
|
|
@@ -129,8 +129,9 @@ const StockCounterSettingsV2 = [
|
|
|
129
129
|
type: 'textarea',
|
|
130
130
|
autoHeight: true,
|
|
131
131
|
showPlusBtn: true,
|
|
132
|
-
default:
|
|
132
|
+
default: `Only ${DEFAULT_QUANTITY_TEMPLATE} left`,
|
|
133
133
|
info: `Use ${DEFAULT_QUANTITY_TEMPLATE} to represent remaining number`,
|
|
134
|
+
minHeight: 56,
|
|
134
135
|
suggestContents: [
|
|
135
136
|
{
|
|
136
137
|
message: '%number%',
|
|
@@ -149,7 +150,7 @@ const StockCounterSettingsV2 = [
|
|
|
149
150
|
label: 'Continue Selling When Out Of Stock Message',
|
|
150
151
|
type: 'textarea',
|
|
151
152
|
autoHeight: true,
|
|
152
|
-
default: '
|
|
153
|
+
default: 'Restock soon! PREORDER NOW',
|
|
153
154
|
info: 'Turn out-of-stock productions into pre-orders'
|
|
154
155
|
},
|
|
155
156
|
{
|
|
@@ -157,7 +158,7 @@ const StockCounterSettingsV2 = [
|
|
|
157
158
|
label: 'Unlimited Quantity Message',
|
|
158
159
|
type: 'textarea',
|
|
159
160
|
autoHeight: true,
|
|
160
|
-
default: '
|
|
161
|
+
default: 'Hurry! LET BUY NOW'
|
|
161
162
|
}
|
|
162
163
|
]
|
|
163
164
|
},
|
|
@@ -176,7 +177,7 @@ const StockCounterSettingsV2 = [
|
|
|
176
177
|
id: 'icon',
|
|
177
178
|
label: '',
|
|
178
179
|
type: 'icon',
|
|
179
|
-
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>`
|
|
180
|
+
default: `<svg data-name="Lightning" 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>`
|
|
180
181
|
}
|
|
181
182
|
]
|
|
182
183
|
},
|
|
@@ -361,19 +361,49 @@ const SettingUIV2 = [
|
|
|
361
361
|
controls: [
|
|
362
362
|
{
|
|
363
363
|
label: {
|
|
364
|
+
en: 'Sell when OOS'
|
|
365
|
+
},
|
|
366
|
+
type: 'combo',
|
|
367
|
+
iconName: 'polaris-text-block',
|
|
368
|
+
getValueFromSettingID: 'continueSelling',
|
|
369
|
+
isHideClear: true,
|
|
370
|
+
popoverLabel: {
|
|
364
371
|
en: 'Out of stock sell'
|
|
365
372
|
},
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
373
|
+
controls: [
|
|
374
|
+
{
|
|
375
|
+
label: {
|
|
376
|
+
en: 'Content'
|
|
377
|
+
},
|
|
378
|
+
setting: {
|
|
379
|
+
id: 'continueSelling'
|
|
380
|
+
},
|
|
381
|
+
layout: 'vertical'
|
|
382
|
+
}
|
|
383
|
+
]
|
|
369
384
|
},
|
|
370
385
|
{
|
|
371
386
|
label: {
|
|
387
|
+
en: 'Unlimited stock'
|
|
388
|
+
},
|
|
389
|
+
type: 'combo',
|
|
390
|
+
iconName: 'polaris-text-block',
|
|
391
|
+
getValueFromSettingID: 'unlimitedQuantityMessage',
|
|
392
|
+
isHideClear: true,
|
|
393
|
+
popoverLabel: {
|
|
372
394
|
en: 'Unlimited quantity'
|
|
373
395
|
},
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
396
|
+
controls: [
|
|
397
|
+
{
|
|
398
|
+
label: {
|
|
399
|
+
en: 'Content'
|
|
400
|
+
},
|
|
401
|
+
setting: {
|
|
402
|
+
id: 'unlimitedQuantityMessage'
|
|
403
|
+
},
|
|
404
|
+
layout: 'vertical'
|
|
405
|
+
}
|
|
406
|
+
]
|
|
377
407
|
}
|
|
378
408
|
]
|
|
379
409
|
},
|
package/dist/types/index.d.ts
CHANGED
|
@@ -379,6 +379,7 @@ type ArticleListStyle = {
|
|
|
379
379
|
wrapperBorder?: Border;
|
|
380
380
|
hasActiveShadow?: boolean;
|
|
381
381
|
shadow?: ShadowProps$1;
|
|
382
|
+
padding?: ObjectDevices$1<SizeSettingGlobal>;
|
|
382
383
|
};
|
|
383
384
|
type ArticleListProps = BaseProps<ArticleListSetting, ArticleListStyle> & {
|
|
384
385
|
style?: React.CSSProperties;
|
|
@@ -718,6 +719,7 @@ type Setting$4 = {
|
|
|
718
719
|
aspectRatio?: ObjectDevices$1<string>;
|
|
719
720
|
ratioOptions?: ObjectDevices$1<Ratio>;
|
|
720
721
|
enableLink?: boolean;
|
|
722
|
+
contentBanner?: string;
|
|
721
723
|
} & Pick<NonNullable<RowProps['setting']>, 'layout' | 'horizontalAlign'>;
|
|
722
724
|
type Styles$2 = {
|
|
723
725
|
height?: ObjectDevices$1<string>;
|
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.482",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@gem-sdk/core": "2.0.0-dev.479",
|
|
27
|
-
"@gem-sdk/styles": "2.0.0-dev.
|
|
27
|
+
"@gem-sdk/styles": "2.0.0-dev.482",
|
|
28
28
|
"@gem-sdk/system": "2.0.0-dev.464",
|
|
29
29
|
"@types/react-transition-group": "^4.4.5"
|
|
30
30
|
},
|