@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.
Files changed (42) hide show
  1. package/dist/cjs/article/components/ArticleList.js +1 -2
  2. package/dist/cjs/article/components/ArticleList.liquid.js +1 -1
  3. package/dist/cjs/article/setting/ArticleList.js +7 -591
  4. package/dist/cjs/article/setting/configs/ArticleList/presets.js +346 -0
  5. package/dist/cjs/article/setting/configs/ArticleList/settings.js +315 -0
  6. package/dist/cjs/article/setting/configs/ArticleList/uiV2.js +201 -0
  7. package/dist/cjs/banner/components/HeroBanner.liquid.js +2 -2
  8. package/dist/cjs/banner/components/HeroBannerItem.js +15 -7
  9. package/dist/cjs/banner/components/HeroBannerItem.liquid.js +13 -11
  10. package/dist/cjs/banner/components/common/common.js +13 -29
  11. package/dist/cjs/banner/components/common/getClasses.js +2 -1
  12. package/dist/cjs/banner/components/common/getStyle.js +2 -0
  13. package/dist/cjs/banner/components/hooks/useHeroBanner.js +2 -7
  14. package/dist/cjs/banner/setting/setting.js +6 -0
  15. package/dist/cjs/banner/setting/uiV2.js +15 -3
  16. package/dist/cjs/product/components/ProductDiscountTag/index.liquid.js +3 -2
  17. package/dist/cjs/product/components/ProductSKU/Sku.liquid.js +3 -2
  18. package/dist/cjs/product/setting/product-price/configs/uiV2.js +1 -1
  19. package/dist/cjs/stock-counter/setting/configs/settingsV2.js +7 -6
  20. package/dist/cjs/stock-counter/setting/configs/uiV2.js +36 -6
  21. package/dist/esm/article/components/ArticleList.js +1 -2
  22. package/dist/esm/article/components/ArticleList.liquid.js +1 -1
  23. package/dist/esm/article/setting/ArticleList.js +7 -591
  24. package/dist/esm/article/setting/configs/ArticleList/presets.js +344 -0
  25. package/dist/esm/article/setting/configs/ArticleList/settings.js +313 -0
  26. package/dist/esm/article/setting/configs/ArticleList/uiV2.js +199 -0
  27. package/dist/esm/banner/components/HeroBanner.liquid.js +2 -2
  28. package/dist/esm/banner/components/HeroBannerItem.js +16 -8
  29. package/dist/esm/banner/components/HeroBannerItem.liquid.js +12 -10
  30. package/dist/esm/banner/components/common/common.js +15 -30
  31. package/dist/esm/banner/components/common/getClasses.js +2 -1
  32. package/dist/esm/banner/components/common/getStyle.js +2 -0
  33. package/dist/esm/banner/components/hooks/useHeroBanner.js +4 -9
  34. package/dist/esm/banner/setting/setting.js +6 -0
  35. package/dist/esm/banner/setting/uiV2.js +15 -3
  36. package/dist/esm/product/components/ProductDiscountTag/index.liquid.js +3 -2
  37. package/dist/esm/product/components/ProductSKU/Sku.liquid.js +4 -3
  38. package/dist/esm/product/setting/product-price/configs/uiV2.js +1 -1
  39. package/dist/esm/stock-counter/setting/configs/settingsV2.js +8 -7
  40. package/dist/esm/stock-counter/setting/configs/uiV2.js +36 -6
  41. package/dist/types/index.d.ts +2 -0
  42. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { DEFAULT_SCARCITY_THRESHOLD, DEFAULT_HIGHLIGHT_TAG, DEFAULT_QUANTITY_TEMPLATE, DEFAULT_REMAINING_PERCENT, MIN_REMAINING_PERCENT, MAX_REMAINING_PERCENT, DEFAULT_RANGE_STEP } from '../../const.js';
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: 16
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: `<${DEFAULT_HIGHLIGHT_TAG}>HURRY!</${DEFAULT_HIGHLIGHT_TAG}> ONLY ${DEFAULT_QUANTITY_TEMPLATE} LEFT`,
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: '<mark>Restock soon!</mark> PREORDER NOW',
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: '<mark>HURRY!</mark> LET BUY NOW'
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
- setting: {
367
- id: 'continueSelling'
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
- setting: {
375
- id: 'unlimitedQuantityMessage'
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
  },
@@ -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.481",
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.464",
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
  },