@fonixtree/magic-design 2.0.156 → 2.0.160

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 (23) hide show
  1. package/es/composite-comp/common/components/MonpayProductItem/imgs/coupon-orange-big.png +0 -0
  2. package/es/composite-comp/common/components/MonpayProductItem/imgs/coupon-red-big.png +0 -0
  3. package/es/composite-comp/common/components/MonpayProductItem/index.js +14 -7
  4. package/es/composite-comp/common/components/MonpayProductItem/index.less +23 -2
  5. package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +3 -3
  6. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.less +0 -1
  7. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +10 -9
  8. package/es/locale/en/en.json +2 -2
  9. package/es/locale/es/es.json +2 -2
  10. package/es/locale/mn/mn.json +4 -4
  11. package/es/utils/currencyUtil.js +7 -2
  12. package/lib/composite-comp/common/components/MonpayProductItem/imgs/coupon-orange-big.png +0 -0
  13. package/lib/composite-comp/common/components/MonpayProductItem/imgs/coupon-red-big.png +0 -0
  14. package/lib/composite-comp/common/components/MonpayProductItem/index.js +14 -7
  15. package/lib/composite-comp/common/components/MonpayProductItem/index.less +23 -2
  16. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +3 -3
  17. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.less +0 -1
  18. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +10 -9
  19. package/lib/locale/en/en.json +2 -2
  20. package/lib/locale/es/es.json +2 -2
  21. package/lib/locale/mn/mn.json +4 -4
  22. package/lib/utils/currencyUtil.js +7 -2
  23. package/package.json +1 -1
@@ -90,14 +90,18 @@ var renderDiscount = function renderDiscount(data) {
90
90
  var text = '';
91
91
 
92
92
  if (AMT) {
93
- text = (0, _currencyUtil.formatCurrency)(data.discountAmount);
93
+ text = (0, _currencyUtil.formatCurrencyWithSymbol)(data.discountAmount);
94
94
  } else if (DISC) {
95
95
  var temp = (0, _currencyUtil.formatCurrency)(data.discountAmount, 2); // 折扣券处理:100 => 1%
96
96
 
97
97
  text = parseInt(temp, 10) + "%";
98
98
  }
99
99
 
100
- return text;
100
+ return {
101
+ text: text,
102
+ isBig: text.length > 6 && text.length <= 9,
103
+ isHide: text.length > 9
104
+ };
101
105
  };
102
106
 
103
107
  exports.renderDiscount = renderDiscount;
@@ -181,14 +185,14 @@ function (_super) {
181
185
  className: "discount-tag"
182
186
  }, isWill ? (0, _locale.i18n)('COMING_SOON') : data.discountPercent + "% " + (0, _locale.i18n)('OFF'))), /*#__PURE__*/_react["default"].createElement("div", {
183
187
  className: "content-wrap"
184
- }, /*#__PURE__*/_react["default"].createElement("div", {
188
+ }, showProName && panelProps.productName.open && /*#__PURE__*/_react["default"].createElement("div", {
185
189
  className: "product-name-wrap"
186
190
  }, /*#__PURE__*/_react["default"].createElement("div", {
187
191
  className: "box"
188
192
  }, prodLabels.length > 0 && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
189
193
  labels: prodLabels,
190
194
  small: true
191
- }), showProName && panelProps.productName.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
195
+ }), /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
192
196
  data: __assign(__assign({}, panelProps.productName), {
193
197
  text: data.offerName
194
198
  }),
@@ -242,15 +246,18 @@ function (_super) {
242
246
  readonly: true
243
247
  }))), intelligentType === 'Coupon' && data.coupons && data.coupons.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
244
248
  className: "coupons-list"
245
- }, data.coupons.slice(0, 4).map(function (m) {
249
+ }, data.coupons.map(function (m) {
246
250
  return /*#__PURE__*/_react["default"].createElement("div", {
247
251
  key: m.couponId,
248
- className: (0, _classnames["default"])('item', m.discountMethod)
252
+ className: (0, _classnames["default"])('item', m.discountMethod, {
253
+ big: renderDiscount(m).isBig,
254
+ hide: renderDiscount(m).isHide
255
+ })
249
256
  }, /*#__PURE__*/_react["default"].createElement("div", {
250
257
  className: "name"
251
258
  }, (0, _locale.i18n)('DISCOUNT')), /*#__PURE__*/_react["default"].createElement("div", {
252
259
  className: "num"
253
- }, renderDiscount(m)));
260
+ }, renderDiscount(m).text));
254
261
  })), showProgress && /*#__PURE__*/_react["default"].createElement("div", {
255
262
  className: "progress-wrap"
256
263
  }, ((_j = panelProps.salesProgress) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement("div", {
@@ -10,7 +10,7 @@
10
10
  .img-wrap {
11
11
  position: relative;
12
12
  border-radius: 8px;
13
- overflow: hidden;
13
+ // overflow: hidden;
14
14
 
15
15
  .product-img {
16
16
  width: 140px;
@@ -156,6 +156,8 @@
156
156
  display: flex;
157
157
  flex-wrap: wrap;
158
158
  margin-top: 8px;
159
+ max-height: 48px;
160
+ overflow: hidden;
159
161
 
160
162
  .item {
161
163
  display: block;
@@ -164,7 +166,7 @@
164
166
  color: #F47A46;
165
167
  background: url('./imgs/coupon-orange.png') no-repeat center;
166
168
  background-size: 100% !important;
167
- margin-right: 6px;
169
+ margin-right: 5px;
168
170
  margin-bottom: 4px;
169
171
  line-height: 1;
170
172
  text-align: center;
@@ -175,6 +177,24 @@
175
177
  background: url('./imgs/coupon-red.png') no-repeat center;
176
178
  }
177
179
 
180
+ &.DISC.big {
181
+ background: url('./imgs/coupon-red-big.png') no-repeat center;
182
+ }
183
+
184
+ &.big {
185
+ width: 75px;
186
+ background: url('./imgs/coupon-orange-big.png') no-repeat center;
187
+
188
+ .num,
189
+ .name {
190
+ width: 62px;
191
+ }
192
+ }
193
+
194
+ &.hide {
195
+ display: none;
196
+ }
197
+
178
198
  .name {
179
199
  font-size: 5px;
180
200
  width: 40px;
@@ -239,6 +259,7 @@
239
259
 
240
260
  .img-wrap {
241
261
  border-radius: 8px 0 0 8px;
262
+ margin-right: 8px;
242
263
 
243
264
  .product-img {
244
265
  width: 100px;
@@ -76,12 +76,12 @@
76
76
  justify-content: flex-start;
77
77
  }
78
78
  .m-flash-deal-mobile .flash-deal-list-vertical .m-product-item-wrap {
79
- width: 2.84rem;
79
+ width: 2.44rem;
80
80
  margin-right: 0.16rem;
81
81
  }
82
82
  .m-flash-deal-mobile .flash-deal-list-vertical .m-product-item-wrap .product-img {
83
- height: 2.8rem;
84
- width: 2.8rem;
83
+ height: 2.4rem;
84
+ width: 2.4rem;
85
85
  }
86
86
  .m-flash-deal-mobile .flash-deal-list-horizontal {
87
87
  display: flex;
@@ -28,7 +28,6 @@
28
28
  border-radius: 0.52rem;
29
29
  font-size: 0.24rem;
30
30
  font-weight: 400;
31
- width: fit-content;
32
31
  flex-shrink: 0;
33
32
  }
34
33
  .searchCondWrap .sortItem .filterText {
@@ -236,32 +236,32 @@ var defaultData = [{
236
236
  imgUrlContent: {
237
237
  url: _card["default"]
238
238
  },
239
- offerName: 'Product Name',
239
+ offerName: 'Product Name Long Long Long Long Long',
240
240
  salesPrice: 10000,
241
- specialPrice: 8000,
241
+ specialPrice: null,
242
242
  marketPrice: 20000,
243
243
  salePercent: 500,
244
244
  discountPercent: 90,
245
245
  coupons: [{
246
246
  couponId: '1',
247
247
  discountMethod: 'DISC',
248
- discountAmount: 30
248
+ discountAmount: 3000
249
249
  }, {
250
250
  couponId: '2',
251
251
  discountMethod: 'AMT',
252
- discountAmount: 10000
252
+ discountAmount: 100
253
253
  }, {
254
254
  couponId: '3',
255
- discountMethod: 'DISC',
256
- discountAmount: 30
255
+ discountMethod: 'AMT',
256
+ discountAmount: 1000
257
257
  }, {
258
258
  couponId: '4',
259
259
  discountMethod: 'AMT',
260
260
  discountAmount: 10000
261
261
  }, {
262
262
  couponId: '5',
263
- discountMethod: 'DISC',
264
- discountAmount: 30
263
+ discountMethod: 'AMT',
264
+ discountAmount: 100000
265
265
  }]
266
266
  }, {
267
267
  imgUrlContent: {
@@ -276,7 +276,7 @@ var defaultData = [{
276
276
  imgUrlContent: {
277
277
  url: _card["default"]
278
278
  },
279
- offerName: 'Product Name',
279
+ offerName: 'Product Name Long Long Long Long Long',
280
280
  salesPrice: 18000000,
281
281
  specialPrice: 18000000,
282
282
  marketPrice: 19000000,
@@ -857,6 +857,7 @@ function (_super) {
857
857
  return /*#__PURE__*/_react["default"].createElement(_MonpayProductItem["default"], {
858
858
  key: "scroll_" + item.productId,
859
859
  data: item,
860
+ fixHeight: true,
860
861
  imgHeight: imgHeight,
861
862
  imgWidth: imgWidth,
862
863
  intelligentType: (_a = groupSource[tabIndex]) === null || _a === void 0 ? void 0 : _a.intelligentType,
@@ -140,11 +140,12 @@
140
140
  "RATINGS": "Ratings",
141
141
  "STAR": "Star",
142
142
  "SORT_BY": "Sort by",
143
- "PROMOTION": "Promotion",
144
143
  "HIGHEST_RATED": "Highest rated",
145
144
  "MOST_SOLD": "Most sold",
146
145
  "LOWEST_PRICE": "Lowest price",
147
146
  "EARLIEST": "Earliest",
147
+ "FILTER": "Filter",
148
+ "PROMOTION": "Promotion",
148
149
  "BUY_NOW": "Buy Now",
149
150
  "TOTAL": "Total",
150
151
  "RECENTLY": "Recently",
@@ -155,7 +156,6 @@
155
156
  "DISCOUNT_LABEL": "Discount Label",
156
157
  "SESSION_TIME": "Session Time",
157
158
  "COUNTDOWN": "Countdown",
158
- "FILTER": "Filter",
159
159
  "SOLD": "Sold",
160
160
  "EVALUATION_SCORE": "Evaluation Score",
161
161
  "SEARCH_BAR_KEYWORD": "Search Bar Keyword",
@@ -140,11 +140,12 @@
140
140
  "RATINGS": "Ratings",
141
141
  "STAR": "Star",
142
142
  "SORT_BY": "Sort by",
143
- "PROMOTION": "Promotion",
144
143
  "HIGHEST_RATED": "Highest rated",
145
144
  "MOST_SOLD": "Most sold",
146
145
  "LOWEST_PRICE": "Lowest price",
147
146
  "EARLIEST": "Earliest",
147
+ "FILTER": "Filter",
148
+ "PROMOTION": "Promotion",
148
149
  "BUY_NOW": "Buy Now",
149
150
  "TOTAL": "Total",
150
151
  "RECENTLY": "Recently",
@@ -155,7 +156,6 @@
155
156
  "DISCOUNT_LABEL": "Discount Label",
156
157
  "SESSION_TIME": "Session Time",
157
158
  "COUNTDOWN": "Countdown",
158
- "FILTER": "Filter",
159
159
  "SOLD": "Sold",
160
160
  "EVALUATION_SCORE": "Evaluation Score",
161
161
  "SEARCH_BAR_KEYWORD": "Search Bar Keyword",
@@ -140,11 +140,12 @@
140
140
  "RATINGS": "Үнэлгээ",
141
141
  "STAR": "Од",
142
142
  "SORT_BY": "Эрэмбэлэх",
143
- "PROMOTION": "Урамшуулал",
144
143
  "HIGHEST_RATED": "Хамгийн өндөр үнэлгээтэй",
145
- "MOST_SOLD": "Хамгийн өндөр үнэлгээтэй",
146
- "LOWEST_PRICE": "Хамгийн бага үнэ",
144
+ "MOST_SOLD": "Хамгийн их зарагдсан",
145
+ "LOWEST_PRICE": "Хамгийн хямд",
147
146
  "EARLIEST": "Хамгийн эрт",
147
+ "FILTER": "Шүүлт",
148
+ "PROMOTION": "Урамшуулал",
148
149
  "BUY_NOW": "Төлөх",
149
150
  "TOTAL": "Нийт",
150
151
  "RECENTLY": "Саяхан",
@@ -155,7 +156,6 @@
155
156
  "DISCOUNT_LABEL": "Хөнгөлөлтийн шошго",
156
157
  "SESSION_TIME": "Сеанс цаг",
157
158
  "COUNTDOWN": "Countdown",
158
- "FILTER": "Шүүлтүүр",
159
159
  "SOLD": "Sold",
160
160
  "EVALUATION_SCORE": "Үнэлгээний оноо",
161
161
  "SEARCH_BAR_KEYWORD": "Хайлтын мөрний түлхүүр үг",
@@ -78,7 +78,7 @@ var formatBackendCurrency = function formatBackendCurrency(num) {
78
78
 
79
79
  exports.formatBackendCurrency = formatBackendCurrency;
80
80
 
81
- var formatCurrency = function formatCurrency(num) {
81
+ var formatCurrency = function formatCurrency(num, initPercision) {
82
82
  var displayPrecision = (0, _commonUtil.ensure)(function () {
83
83
  return window.systemParams.displayCurrencyPrecision;
84
84
  }, '0');
@@ -88,14 +88,19 @@ var formatCurrency = function formatCurrency(num) {
88
88
  var pricePrefix = (0, _commonUtil.ensure)(function () {
89
89
  return window.systemParams.prefix;
90
90
  }, 'Rp');
91
+ var newPercision = initPercision || precision;
91
92
  var numVal = num;
92
93
 
93
94
  if (Number.isNaN(num) || !Number.isFinite(num)) {
94
95
  numVal = 0;
95
96
  }
96
97
 
98
+ if (newPercision <= 0) {
99
+ return addSeparators(numVal, ',', '.');
100
+ }
101
+
97
102
  var displayNum = displayPrecision != null && displayPrecision !== '' ? displayPrecision : precision;
98
- var ret = numVal / Math.pow(10, precision);
103
+ var ret = numVal / Math.pow(10, newPercision);
99
104
  return addSeparators(ret.toFixed(displayNum), pricePrefix === "IDR" || pricePrefix === "Rp" ? '.' : ',', '.');
100
105
  };
101
106
 
@@ -90,14 +90,18 @@ var renderDiscount = function renderDiscount(data) {
90
90
  var text = '';
91
91
 
92
92
  if (AMT) {
93
- text = (0, _currencyUtil.formatCurrency)(data.discountAmount);
93
+ text = (0, _currencyUtil.formatCurrencyWithSymbol)(data.discountAmount);
94
94
  } else if (DISC) {
95
95
  var temp = (0, _currencyUtil.formatCurrency)(data.discountAmount, 2); // 折扣券处理:100 => 1%
96
96
 
97
97
  text = parseInt(temp, 10) + "%";
98
98
  }
99
99
 
100
- return text;
100
+ return {
101
+ text: text,
102
+ isBig: text.length > 6 && text.length <= 9,
103
+ isHide: text.length > 9
104
+ };
101
105
  };
102
106
 
103
107
  exports.renderDiscount = renderDiscount;
@@ -181,14 +185,14 @@ function (_super) {
181
185
  className: "discount-tag"
182
186
  }, isWill ? (0, _locale.i18n)('COMING_SOON') : data.discountPercent + "% " + (0, _locale.i18n)('OFF'))), /*#__PURE__*/_react["default"].createElement("div", {
183
187
  className: "content-wrap"
184
- }, /*#__PURE__*/_react["default"].createElement("div", {
188
+ }, showProName && panelProps.productName.open && /*#__PURE__*/_react["default"].createElement("div", {
185
189
  className: "product-name-wrap"
186
190
  }, /*#__PURE__*/_react["default"].createElement("div", {
187
191
  className: "box"
188
192
  }, prodLabels.length > 0 && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
189
193
  labels: prodLabels,
190
194
  small: true
191
- }), showProName && panelProps.productName.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
195
+ }), /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
192
196
  data: __assign(__assign({}, panelProps.productName), {
193
197
  text: data.offerName
194
198
  }),
@@ -242,15 +246,18 @@ function (_super) {
242
246
  readonly: true
243
247
  }))), intelligentType === 'Coupon' && data.coupons && data.coupons.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
244
248
  className: "coupons-list"
245
- }, data.coupons.slice(0, 4).map(function (m) {
249
+ }, data.coupons.map(function (m) {
246
250
  return /*#__PURE__*/_react["default"].createElement("div", {
247
251
  key: m.couponId,
248
- className: (0, _classnames["default"])('item', m.discountMethod)
252
+ className: (0, _classnames["default"])('item', m.discountMethod, {
253
+ big: renderDiscount(m).isBig,
254
+ hide: renderDiscount(m).isHide
255
+ })
249
256
  }, /*#__PURE__*/_react["default"].createElement("div", {
250
257
  className: "name"
251
258
  }, (0, _locale.i18n)('DISCOUNT')), /*#__PURE__*/_react["default"].createElement("div", {
252
259
  className: "num"
253
- }, renderDiscount(m)));
260
+ }, renderDiscount(m).text));
254
261
  })), showProgress && /*#__PURE__*/_react["default"].createElement("div", {
255
262
  className: "progress-wrap"
256
263
  }, ((_j = panelProps.salesProgress) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement("div", {
@@ -10,7 +10,7 @@
10
10
  .img-wrap {
11
11
  position: relative;
12
12
  border-radius: 8px;
13
- overflow: hidden;
13
+ // overflow: hidden;
14
14
 
15
15
  .product-img {
16
16
  width: 140px;
@@ -156,6 +156,8 @@
156
156
  display: flex;
157
157
  flex-wrap: wrap;
158
158
  margin-top: 8px;
159
+ max-height: 48px;
160
+ overflow: hidden;
159
161
 
160
162
  .item {
161
163
  display: block;
@@ -164,7 +166,7 @@
164
166
  color: #F47A46;
165
167
  background: url('./imgs/coupon-orange.png') no-repeat center;
166
168
  background-size: 100% !important;
167
- margin-right: 6px;
169
+ margin-right: 5px;
168
170
  margin-bottom: 4px;
169
171
  line-height: 1;
170
172
  text-align: center;
@@ -175,6 +177,24 @@
175
177
  background: url('./imgs/coupon-red.png') no-repeat center;
176
178
  }
177
179
 
180
+ &.DISC.big {
181
+ background: url('./imgs/coupon-red-big.png') no-repeat center;
182
+ }
183
+
184
+ &.big {
185
+ width: 75px;
186
+ background: url('./imgs/coupon-orange-big.png') no-repeat center;
187
+
188
+ .num,
189
+ .name {
190
+ width: 62px;
191
+ }
192
+ }
193
+
194
+ &.hide {
195
+ display: none;
196
+ }
197
+
178
198
  .name {
179
199
  font-size: 5px;
180
200
  width: 40px;
@@ -239,6 +259,7 @@
239
259
 
240
260
  .img-wrap {
241
261
  border-radius: 8px 0 0 8px;
262
+ margin-right: 8px;
242
263
 
243
264
  .product-img {
244
265
  width: 100px;
@@ -76,12 +76,12 @@
76
76
  justify-content: flex-start;
77
77
  }
78
78
  .m-flash-deal-mobile .flash-deal-list-vertical .m-product-item-wrap {
79
- width: 2.84rem;
79
+ width: 2.44rem;
80
80
  margin-right: 0.16rem;
81
81
  }
82
82
  .m-flash-deal-mobile .flash-deal-list-vertical .m-product-item-wrap .product-img {
83
- height: 2.8rem;
84
- width: 2.8rem;
83
+ height: 2.4rem;
84
+ width: 2.4rem;
85
85
  }
86
86
  .m-flash-deal-mobile .flash-deal-list-horizontal {
87
87
  display: flex;
@@ -28,7 +28,6 @@
28
28
  border-radius: 0.52rem;
29
29
  font-size: 0.24rem;
30
30
  font-weight: 400;
31
- width: fit-content;
32
31
  flex-shrink: 0;
33
32
  }
34
33
  .searchCondWrap .sortItem .filterText {
@@ -236,32 +236,32 @@ var defaultData = [{
236
236
  imgUrlContent: {
237
237
  url: _card["default"]
238
238
  },
239
- offerName: 'Product Name',
239
+ offerName: 'Product Name Long Long Long Long Long',
240
240
  salesPrice: 10000,
241
- specialPrice: 8000,
241
+ specialPrice: null,
242
242
  marketPrice: 20000,
243
243
  salePercent: 500,
244
244
  discountPercent: 90,
245
245
  coupons: [{
246
246
  couponId: '1',
247
247
  discountMethod: 'DISC',
248
- discountAmount: 30
248
+ discountAmount: 3000
249
249
  }, {
250
250
  couponId: '2',
251
251
  discountMethod: 'AMT',
252
- discountAmount: 10000
252
+ discountAmount: 100
253
253
  }, {
254
254
  couponId: '3',
255
- discountMethod: 'DISC',
256
- discountAmount: 30
255
+ discountMethod: 'AMT',
256
+ discountAmount: 1000
257
257
  }, {
258
258
  couponId: '4',
259
259
  discountMethod: 'AMT',
260
260
  discountAmount: 10000
261
261
  }, {
262
262
  couponId: '5',
263
- discountMethod: 'DISC',
264
- discountAmount: 30
263
+ discountMethod: 'AMT',
264
+ discountAmount: 100000
265
265
  }]
266
266
  }, {
267
267
  imgUrlContent: {
@@ -276,7 +276,7 @@ var defaultData = [{
276
276
  imgUrlContent: {
277
277
  url: _card["default"]
278
278
  },
279
- offerName: 'Product Name',
279
+ offerName: 'Product Name Long Long Long Long Long',
280
280
  salesPrice: 18000000,
281
281
  specialPrice: 18000000,
282
282
  marketPrice: 19000000,
@@ -857,6 +857,7 @@ function (_super) {
857
857
  return /*#__PURE__*/_react["default"].createElement(_MonpayProductItem["default"], {
858
858
  key: "scroll_" + item.productId,
859
859
  data: item,
860
+ fixHeight: true,
860
861
  imgHeight: imgHeight,
861
862
  imgWidth: imgWidth,
862
863
  intelligentType: (_a = groupSource[tabIndex]) === null || _a === void 0 ? void 0 : _a.intelligentType,
@@ -140,11 +140,12 @@
140
140
  "RATINGS": "Ratings",
141
141
  "STAR": "Star",
142
142
  "SORT_BY": "Sort by",
143
- "PROMOTION": "Promotion",
144
143
  "HIGHEST_RATED": "Highest rated",
145
144
  "MOST_SOLD": "Most sold",
146
145
  "LOWEST_PRICE": "Lowest price",
147
146
  "EARLIEST": "Earliest",
147
+ "FILTER": "Filter",
148
+ "PROMOTION": "Promotion",
148
149
  "BUY_NOW": "Buy Now",
149
150
  "TOTAL": "Total",
150
151
  "RECENTLY": "Recently",
@@ -155,7 +156,6 @@
155
156
  "DISCOUNT_LABEL": "Discount Label",
156
157
  "SESSION_TIME": "Session Time",
157
158
  "COUNTDOWN": "Countdown",
158
- "FILTER": "Filter",
159
159
  "SOLD": "Sold",
160
160
  "EVALUATION_SCORE": "Evaluation Score",
161
161
  "SEARCH_BAR_KEYWORD": "Search Bar Keyword",
@@ -140,11 +140,12 @@
140
140
  "RATINGS": "Ratings",
141
141
  "STAR": "Star",
142
142
  "SORT_BY": "Sort by",
143
- "PROMOTION": "Promotion",
144
143
  "HIGHEST_RATED": "Highest rated",
145
144
  "MOST_SOLD": "Most sold",
146
145
  "LOWEST_PRICE": "Lowest price",
147
146
  "EARLIEST": "Earliest",
147
+ "FILTER": "Filter",
148
+ "PROMOTION": "Promotion",
148
149
  "BUY_NOW": "Buy Now",
149
150
  "TOTAL": "Total",
150
151
  "RECENTLY": "Recently",
@@ -155,7 +156,6 @@
155
156
  "DISCOUNT_LABEL": "Discount Label",
156
157
  "SESSION_TIME": "Session Time",
157
158
  "COUNTDOWN": "Countdown",
158
- "FILTER": "Filter",
159
159
  "SOLD": "Sold",
160
160
  "EVALUATION_SCORE": "Evaluation Score",
161
161
  "SEARCH_BAR_KEYWORD": "Search Bar Keyword",
@@ -140,11 +140,12 @@
140
140
  "RATINGS": "Үнэлгээ",
141
141
  "STAR": "Од",
142
142
  "SORT_BY": "Эрэмбэлэх",
143
- "PROMOTION": "Урамшуулал",
144
143
  "HIGHEST_RATED": "Хамгийн өндөр үнэлгээтэй",
145
- "MOST_SOLD": "Хамгийн өндөр үнэлгээтэй",
146
- "LOWEST_PRICE": "Хамгийн бага үнэ",
144
+ "MOST_SOLD": "Хамгийн их зарагдсан",
145
+ "LOWEST_PRICE": "Хамгийн хямд",
147
146
  "EARLIEST": "Хамгийн эрт",
147
+ "FILTER": "Шүүлт",
148
+ "PROMOTION": "Урамшуулал",
148
149
  "BUY_NOW": "Төлөх",
149
150
  "TOTAL": "Нийт",
150
151
  "RECENTLY": "Саяхан",
@@ -155,7 +156,6 @@
155
156
  "DISCOUNT_LABEL": "Хөнгөлөлтийн шошго",
156
157
  "SESSION_TIME": "Сеанс цаг",
157
158
  "COUNTDOWN": "Countdown",
158
- "FILTER": "Шүүлтүүр",
159
159
  "SOLD": "Sold",
160
160
  "EVALUATION_SCORE": "Үнэлгээний оноо",
161
161
  "SEARCH_BAR_KEYWORD": "Хайлтын мөрний түлхүүр үг",
@@ -78,7 +78,7 @@ var formatBackendCurrency = function formatBackendCurrency(num) {
78
78
 
79
79
  exports.formatBackendCurrency = formatBackendCurrency;
80
80
 
81
- var formatCurrency = function formatCurrency(num) {
81
+ var formatCurrency = function formatCurrency(num, initPercision) {
82
82
  var displayPrecision = (0, _commonUtil.ensure)(function () {
83
83
  return window.systemParams.displayCurrencyPrecision;
84
84
  }, '0');
@@ -88,14 +88,19 @@ var formatCurrency = function formatCurrency(num) {
88
88
  var pricePrefix = (0, _commonUtil.ensure)(function () {
89
89
  return window.systemParams.prefix;
90
90
  }, 'Rp');
91
+ var newPercision = initPercision || precision;
91
92
  var numVal = num;
92
93
 
93
94
  if (Number.isNaN(num) || !Number.isFinite(num)) {
94
95
  numVal = 0;
95
96
  }
96
97
 
98
+ if (newPercision <= 0) {
99
+ return addSeparators(numVal, ',', '.');
100
+ }
101
+
97
102
  var displayNum = displayPrecision != null && displayPrecision !== '' ? displayPrecision : precision;
98
- var ret = numVal / Math.pow(10, precision);
103
+ var ret = numVal / Math.pow(10, newPercision);
99
104
  return addSeparators(ret.toFixed(displayNum), pricePrefix === "IDR" || pricePrefix === "Rp" ? '.' : ',', '.');
100
105
  };
101
106
 
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.156",
4
+ "version": "2.0.160",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",