@fonixtree/magic-design 2.0.127 → 2.0.129

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.
@@ -135,8 +135,13 @@ function (_super) {
135
135
 
136
136
  var promotions = (0, _businessUtil.getPromotionList)(data);
137
137
  var price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
138
- price = data.specialPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.specialPrice) : (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
139
- var oldPrice = data.specialPrice !== null && data.marketPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.marketPrice) : null; // const discount = Number(data.discountPercent) || 0;
138
+ var oldPrice = null;
139
+
140
+ if (data.specialPrice !== null) {
141
+ price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.specialPrice);
142
+ oldPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
143
+ } // const discount = Number(data.discountPercent) || 0;
144
+
140
145
 
141
146
  var salePercent = Number(data.salePercent) / 100 || 0;
142
147
  var imgStyle = {};
@@ -25,7 +25,6 @@
25
25
  .BundleItemWrap .prodList {
26
26
  display: flex;
27
27
  align-items: center;
28
- justify-content: center;
29
28
  overflow: scroll;
30
29
  }
31
30
  .BundleItemWrap .prodList img {
@@ -53,6 +53,12 @@
53
53
  .itemWrap {
54
54
  display: flex;
55
55
  }
56
+ .itemWrap:first-child {
57
+ margin-left: auto;
58
+ }
59
+ .itemWrap:last-child {
60
+ margin-right: auto;
61
+ }
56
62
  .itemWrap .iconPlus {
57
63
  padding: 0.02rem;
58
64
  }
@@ -82,8 +82,14 @@ function (_super) {
82
82
  onItemClick = _d.onItemClick,
83
83
  rest = __rest(_d, ["data", "onItemClick"]);
84
84
 
85
- var price = data.specialPrice !== null ? (0, _currencyUtil.formatCurrency)(data.specialPrice) : null;
86
- var oldPrice = data.salesPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice) : null;
85
+ var price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
86
+ var oldPrice = null;
87
+
88
+ if (data.specialPrice !== null) {
89
+ price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.specialPrice);
90
+ oldPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
91
+ }
92
+
87
93
  var imgLabels = ((_a = data.labels) === null || _a === void 0 ? void 0 : _a.filter(function (f) {
88
94
  return f.position !== '6' && f.position !== '7';
89
95
  })) || [];
@@ -213,9 +213,8 @@ var defaultData = [{
213
213
  url: _card["default"]
214
214
  },
215
215
  offerName: 'Product Name',
216
- salesPrice: 20000000,
217
- specialPrice: 18000000,
218
- marketPrice: 19000000,
216
+ salesPrice: 10000,
217
+ specialPrice: 800,
219
218
  discountPercent: 10,
220
219
  salePercent: 500,
221
220
  salesCnt: 501,
@@ -225,9 +224,8 @@ var defaultData = [{
225
224
  url: _card["default"]
226
225
  },
227
226
  offerName: 'Product Name',
228
- salesPrice: 20000000,
229
- specialPrice: 18000000,
230
- marketPrice: 19000000,
227
+ salesPrice: 20000,
228
+ specialPrice: null,
231
229
  discountPercent: null,
232
230
  salePercent: 500,
233
231
  salesCnt: 501,
@@ -239,7 +237,6 @@ var defaultData = [{
239
237
  offerName: 'Product Name',
240
238
  salesPrice: 20000000,
241
239
  specialPrice: 18000000,
242
- marketPrice: 19000000,
243
240
  discountPercent: 10,
244
241
  salePercent: 500,
245
242
  salesCnt: 501,
@@ -251,7 +248,6 @@ var defaultData = [{
251
248
  offerName: 'Product Name',
252
249
  salesPrice: 20000000,
253
250
  specialPrice: 18000000,
254
- marketPrice: 19000000,
255
251
  discountPercent: 10,
256
252
  salePercent: 500,
257
253
  salesCnt: 200,
@@ -29,7 +29,8 @@ var getDefaultJSON = function getDefaultJSON() {
29
29
  fontFamily: 'Open Sans',
30
30
  fontWeight: 600,
31
31
  fontSize: 16,
32
- color: '#000'
32
+ color: '#000',
33
+ urlDisabled: true
33
34
  },
34
35
  underline: {
35
36
  open: false,
@@ -45,6 +46,7 @@ var getDefaultJSON = function getDefaultJSON() {
45
46
  text: 'Follow',
46
47
  content: {
47
48
  url: '',
49
+ urlDisabled: true,
48
50
  backgroundColor: '#FF8650'
49
51
  },
50
52
  buttonText: {
@@ -148,6 +148,7 @@ function (_super) {
148
148
  split: true,
149
149
  title: (0, _locale.i18n)('URL')
150
150
  }, /*#__PURE__*/_react["default"].createElement(_common.UrlPicker, {
151
+ disabled: data.content.urlDisabled,
151
152
  onChange: function onChange(value) {
152
153
  _this.updateAttr(data.content, 'url', value);
153
154
  },
@@ -362,6 +363,7 @@ function (_super) {
362
363
  data: {
363
364
  content: {
364
365
  url: '',
366
+ urlDisabled: false,
365
367
  backgroundColor: '#2F54EB'
366
368
  },
367
369
  buttonText: {
@@ -484,6 +484,7 @@ var getPromotionList = function getPromotionList(offer) {
484
484
  2: 'FLASH',
485
485
  4: 'Group',
486
486
  12: 'Bargain',
487
+ 14: 'Discount',
487
488
  C: 'Discount',
488
489
  D: 'Discount',
489
490
  G: 'Gift'
@@ -135,8 +135,13 @@ function (_super) {
135
135
 
136
136
  var promotions = (0, _businessUtil.getPromotionList)(data);
137
137
  var price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
138
- price = data.specialPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.specialPrice) : (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
139
- var oldPrice = data.specialPrice !== null && data.marketPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.marketPrice) : null; // const discount = Number(data.discountPercent) || 0;
138
+ var oldPrice = null;
139
+
140
+ if (data.specialPrice !== null) {
141
+ price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.specialPrice);
142
+ oldPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
143
+ } // const discount = Number(data.discountPercent) || 0;
144
+
140
145
 
141
146
  var salePercent = Number(data.salePercent) / 100 || 0;
142
147
  var imgStyle = {};
@@ -25,7 +25,6 @@
25
25
  .BundleItemWrap .prodList {
26
26
  display: flex;
27
27
  align-items: center;
28
- justify-content: center;
29
28
  overflow: scroll;
30
29
  }
31
30
  .BundleItemWrap .prodList img {
@@ -53,6 +53,12 @@
53
53
  .itemWrap {
54
54
  display: flex;
55
55
  }
56
+ .itemWrap:first-child {
57
+ margin-left: auto;
58
+ }
59
+ .itemWrap:last-child {
60
+ margin-right: auto;
61
+ }
56
62
  .itemWrap .iconPlus {
57
63
  padding: 0.02rem;
58
64
  }
@@ -82,8 +82,14 @@ function (_super) {
82
82
  onItemClick = _d.onItemClick,
83
83
  rest = __rest(_d, ["data", "onItemClick"]);
84
84
 
85
- var price = data.specialPrice !== null ? (0, _currencyUtil.formatCurrency)(data.specialPrice) : null;
86
- var oldPrice = data.salesPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice) : null;
85
+ var price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
86
+ var oldPrice = null;
87
+
88
+ if (data.specialPrice !== null) {
89
+ price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.specialPrice);
90
+ oldPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
91
+ }
92
+
87
93
  var imgLabels = ((_a = data.labels) === null || _a === void 0 ? void 0 : _a.filter(function (f) {
88
94
  return f.position !== '6' && f.position !== '7';
89
95
  })) || [];
@@ -213,9 +213,8 @@ var defaultData = [{
213
213
  url: _card["default"]
214
214
  },
215
215
  offerName: 'Product Name',
216
- salesPrice: 20000000,
217
- specialPrice: 18000000,
218
- marketPrice: 19000000,
216
+ salesPrice: 10000,
217
+ specialPrice: 800,
219
218
  discountPercent: 10,
220
219
  salePercent: 500,
221
220
  salesCnt: 501,
@@ -225,9 +224,8 @@ var defaultData = [{
225
224
  url: _card["default"]
226
225
  },
227
226
  offerName: 'Product Name',
228
- salesPrice: 20000000,
229
- specialPrice: 18000000,
230
- marketPrice: 19000000,
227
+ salesPrice: 20000,
228
+ specialPrice: null,
231
229
  discountPercent: null,
232
230
  salePercent: 500,
233
231
  salesCnt: 501,
@@ -239,7 +237,6 @@ var defaultData = [{
239
237
  offerName: 'Product Name',
240
238
  salesPrice: 20000000,
241
239
  specialPrice: 18000000,
242
- marketPrice: 19000000,
243
240
  discountPercent: 10,
244
241
  salePercent: 500,
245
242
  salesCnt: 501,
@@ -251,7 +248,6 @@ var defaultData = [{
251
248
  offerName: 'Product Name',
252
249
  salesPrice: 20000000,
253
250
  specialPrice: 18000000,
254
- marketPrice: 19000000,
255
251
  discountPercent: 10,
256
252
  salePercent: 500,
257
253
  salesCnt: 200,
@@ -29,7 +29,8 @@ var getDefaultJSON = function getDefaultJSON() {
29
29
  fontFamily: 'Open Sans',
30
30
  fontWeight: 600,
31
31
  fontSize: 16,
32
- color: '#000'
32
+ color: '#000',
33
+ urlDisabled: true
33
34
  },
34
35
  underline: {
35
36
  open: false,
@@ -45,6 +46,7 @@ var getDefaultJSON = function getDefaultJSON() {
45
46
  text: 'Follow',
46
47
  content: {
47
48
  url: '',
49
+ urlDisabled: true,
48
50
  backgroundColor: '#FF8650'
49
51
  },
50
52
  buttonText: {
@@ -148,6 +148,7 @@ function (_super) {
148
148
  split: true,
149
149
  title: (0, _locale.i18n)('URL')
150
150
  }, /*#__PURE__*/_react["default"].createElement(_common.UrlPicker, {
151
+ disabled: data.content.urlDisabled,
151
152
  onChange: function onChange(value) {
152
153
  _this.updateAttr(data.content, 'url', value);
153
154
  },
@@ -362,6 +363,7 @@ function (_super) {
362
363
  data: {
363
364
  content: {
364
365
  url: '',
366
+ urlDisabled: false,
365
367
  backgroundColor: '#2F54EB'
366
368
  },
367
369
  buttonText: {
@@ -484,6 +484,7 @@ var getPromotionList = function getPromotionList(offer) {
484
484
  2: 'FLASH',
485
485
  4: 'Group',
486
486
  12: 'Bargain',
487
+ 14: 'Discount',
487
488
  C: 'Discount',
488
489
  D: 'Discount',
489
490
  G: 'Gift'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "2.0.127",
4
+ "version": "2.0.129",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",