@fonixtree/magic-design 2.0.38 → 2.0.39

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.
@@ -584,7 +584,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
584
584
  value: v.storeId
585
585
  }, v.storeName);
586
586
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
587
- label: "Lable"
587
+ label: "Label"
588
588
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
589
589
  defaultValue: [],
590
590
  onChange: handleLabelChange,
@@ -608,7 +608,7 @@ var ProductModal = function ProductModal(props) {
608
608
  value: v.storeId
609
609
  }, v.storeName);
610
610
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
611
- label: "Lable"
611
+ label: "Label"
612
612
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
613
613
  defaultValue: selLabelData.children || null,
614
614
  onChange: function onChange(v, o) {
@@ -240,56 +240,97 @@ function (_super) {
240
240
  var _this = _super !== null && _super.apply(this, arguments) || this;
241
241
 
242
242
  _this.state = {
243
- cashback: 0,
244
- credit: 0,
245
- bnpl: 0,
246
243
  sliderIndex: 0
247
244
  };
248
245
  _this.sliderRef = null;
249
246
  _this.destroy = null;
247
+ _this.userWalletData = {};
250
248
 
251
249
  _this.getMyWalletData = function () {
252
250
  return __awaiter(_this, void 0, void 0, function () {
253
- var _a, userCreditResps, userCashbackValues, creditObj, bnplObj;
254
-
255
- return __generator(this, function (_b) {
256
- switch (_b.label) {
257
- case 0:
258
- return [4
259
- /*yield*/
260
- , (0, _commonUtil.commonFetch)('/designer/v1/h5/mywallet/list', {}, 'GET')];
261
-
262
- case 1:
263
- _a = _b.sent(), userCreditResps = _a.userCreditResps, userCashbackValues = _a.userCashbackValues;
264
- creditObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
265
- return item.creditId === 2 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
266
- });
267
- bnplObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
268
- return item.creditId === 1 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
269
- });
270
- this.setState({
271
- cashback: userCashbackValues === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userCashbackValues),
272
- credit: userCreditResps === null ? '****' : creditObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(creditObj.availableAmount) : 'APPLY',
273
- bnpl: userCreditResps === null ? '****' : bnplObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(bnplObj.availableAmount) : 'APPLY'
274
- });
275
- return [2
276
- /*return*/
277
- ];
278
- }
251
+ var _a, userCreditResps, userCashbackValues, userBalance, userPoint, defaultShowWallet, defaultShowIndex, bnplObj, creditObj, B2BObj;
252
+
253
+ var _b;
254
+
255
+ return __generator(this, function (_c) {
256
+ _a = {
257
+ userCreditResps: [{
258
+ userCreditId: 1023,
259
+ creditId: 1,
260
+ partyType: null,
261
+ state: 'Pass',
262
+ isUrlExpired: false,
263
+ creditLimit: 150000,
264
+ usageAmount: 100000,
265
+ availableAmount: 1000,
266
+ comments: null,
267
+ userNearestBillDto: null
268
+ }, {
269
+ userCreditId: 1026,
270
+ creditId: 2,
271
+ partyType: null,
272
+ state: 'Locked',
273
+ isUrlExpired: false,
274
+ creditLimit: 100000,
275
+ usageAmount: 100000,
276
+ availableAmount: 2000,
277
+ comments: null,
278
+ userNearestBillDto: null
279
+ }, {
280
+ userCreditId: 1027,
281
+ creditId: 3,
282
+ partyType: 'I',
283
+ state: 'Pass',
284
+ isUrlExpired: false,
285
+ creditLimit: 100000000,
286
+ usageAmount: 0,
287
+ availableAmount: 3000,
288
+ comments: 'ty',
289
+ userNearestBillDto: null
290
+ }],
291
+ userCashbackValues: 4000,
292
+ userBalance: 5000,
293
+ userPoint: 6000,
294
+ defaultShowWallet: 'Balance'
295
+ }, userCreditResps = _a.userCreditResps, userCashbackValues = _a.userCashbackValues, userBalance = _a.userBalance, userPoint = _a.userPoint, defaultShowWallet = _a.defaultShowWallet;
296
+ defaultShowIndex = 0;
297
+ this.props.data.groupSource.forEach(function (f, i) {
298
+ if (f.sourceType === defaultShowWallet) defaultShowIndex = i;
299
+ });
300
+ this.sliderRef.slickGoTo(defaultShowIndex);
301
+ bnplObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
302
+ return item.creditId === 1 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
303
+ });
304
+ creditObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
305
+ return item.creditId === 2 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
306
+ });
307
+ B2BObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
308
+ return item.creditId === 3 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
309
+ });
310
+ this.userWalletData = (_b = {}, _b[_constants.walletType.BNPL] = {
311
+ amount: userCreditResps === null ? '****' : bnplObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(bnplObj.availableAmount) : 'APPLY'
312
+ }, _b[_constants.walletType.CREDIT] = {
313
+ amount: userCreditResps === null ? '****' : creditObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(creditObj.availableAmount) : 'APPLY'
314
+ }, _b[_constants.walletType.B2B] = {
315
+ amount: userCreditResps === null ? '****' : B2BObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(B2BObj.availableAmount) : 'APPLY',
316
+ text: B2BObj ? 'Add ore products to your shop!' : '',
317
+ btnText: 'Procure Product'
318
+ }, _b[_constants.walletType.CASHBACK] = {
319
+ amount: userCashbackValues === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userCashbackValues)
320
+ }, _b[_constants.walletType.BALANCE] = {
321
+ amount: userBalance === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userBalance),
322
+ btnText: 'Social Commerce'
323
+ }, _b[_constants.walletType.CENDUIT] = {
324
+ amount: userBalance === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userPoint),
325
+ btnText: 'Cenduit Mall'
326
+ }, _b);
327
+ return [2
328
+ /*return*/
329
+ ];
279
330
  });
280
331
  });
281
332
  };
282
333
 
283
- _this.getAmount = function (type) {
284
- var _a = _this.state,
285
- cashback = _a.cashback,
286
- credit = _a.credit,
287
- bnpl = _a.bnpl;
288
- if (type === 'Cashback') return cashback;
289
- if (type === 'Credit') return credit;
290
- if (type === 'BNPL') return bnpl;
291
- };
292
-
293
334
  _this.mouseEnterBtn = function (e) {
294
335
  var _a, _b;
295
336
 
@@ -363,7 +404,6 @@ function (_super) {
363
404
 
364
405
  var data = this.props.data;
365
406
  var sliderIndex = this.state.sliderIndex;
366
- var GAData = (0, _commonUtil.getGAData)(data);
367
407
  var colNum = data.customize.rowNum;
368
408
  var autoplay = data.setting.autoplay.open;
369
409
  /** 设计器模式下 如果选中特定group 自动播放关闭 */
@@ -392,19 +432,12 @@ function (_super) {
392
432
  fontSize: (0, _commonUtil.convertToRem)(data.setting.navigation.size),
393
433
  color: data.setting.navigation.color
394
434
  };
395
- return /*#__PURE__*/_react["default"].createElement("div", {
396
- className: "m-Wallet-mobile"
397
- }, data.title.headline.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
398
- className: "headline",
399
- data: data.title.headline
400
- }), data.customize.layout === 'layout1' ? /*#__PURE__*/_react["default"].createElement("div", {
401
- className: "column-layout column_" + colNum,
402
- style: (0, _commonUtil.pxToRem)({
403
- gap: MOBILE_IMG_SIZE[colNum].gap
404
- })
405
- }, data.groupSource.map(function (item) {
406
- var _amount = _this.getAmount(item.sourceType);
407
435
 
436
+ var getItemContent = function getItemContent(item, preItem, nextItem) {
437
+ var _a, _b, _c, _d, _e, _f, _g;
438
+
439
+ var data = _this.props.data;
440
+ var GAData = (0, _commonUtil.getGAData)(data);
408
441
  var _bgStyle = {};
409
442
 
410
443
  if (item.background) {
@@ -419,12 +452,6 @@ function (_super) {
419
452
  }
420
453
 
421
454
  return /*#__PURE__*/_react["default"].createElement("div", {
422
- key: item.id,
423
- className: "item-wrap",
424
- style: (0, _commonUtil.pxToRem)({
425
- width: "calc((100% - " + (0, _commonUtil.convertToRem)(MOBILE_IMG_SIZE[colNum].gap * (colNum - 1)) + ") / " + colNum + ")"
426
- })
427
- }, /*#__PURE__*/_react["default"].createElement("div", {
428
455
  className: "text-content",
429
456
  style: _bgStyle
430
457
  }, item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
@@ -437,7 +464,7 @@ function (_super) {
437
464
  }), item.amount.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
438
465
  className: "amount",
439
466
  data: __assign(__assign({}, item.amount), {
440
- text: _amount
467
+ text: (_a = _this.userWalletData[item.sourceType]) === null || _a === void 0 ? void 0 : _a.amount
441
468
  }),
442
469
  GAData: __assign(__assign({}, GAData), {
443
470
  groupId: item.id,
@@ -446,7 +473,9 @@ function (_super) {
446
473
  readonly: true
447
474
  }), item.text.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
448
475
  className: "text",
449
- data: item.text,
476
+ data: __assign(__assign({}, item.text), {
477
+ text: ((_b = _this.userWalletData[item.sourceType]) === null || _b === void 0 ? void 0 : _b.text) || 'Make money and shop on Cendol!'
478
+ }),
450
479
  GAData: __assign(__assign({}, GAData), {
451
480
  groupId: item.id,
452
481
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
@@ -455,33 +484,75 @@ function (_super) {
455
484
  }), item.button.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
456
485
  className: "wallet-btn",
457
486
  data: __assign(__assign({}, item.button), {
458
- text: 'Lets Go!'
487
+ text: ((_c = _this.userWalletData[item.sourceType]) === null || _c === void 0 ? void 0 : _c.btnText) || 'Lets Go!'
459
488
  }),
460
489
  GAData: __assign(__assign({}, GAData), {
461
490
  groupId: item.id,
462
491
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
463
492
  })
464
- }), item.peek.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
465
- className: "peek left",
493
+ }), data.customize.layout === 'layout2' && item.peek.open && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
494
+ className: "peek left"
495
+ }, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
496
+ data: __assign(__assign({}, item.peek), {
497
+ text: "" + (((_d = preItem === null || preItem === void 0 ? void 0 : preItem.title) === null || _d === void 0 ? void 0 : _d.text) || '')
498
+ }),
499
+ GAData: __assign(__assign({}, GAData), {
500
+ groupId: item.id,
501
+ groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
502
+ }),
503
+ readonly: true
504
+ }), /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
466
505
  data: __assign(__assign({}, item.peek), {
467
- text: 'B2B 30,000'
506
+ text: "" + (((_e = _this.userWalletData[preItem === null || preItem === void 0 ? void 0 : preItem.sourceType]) === null || _e === void 0 ? void 0 : _e.amount) || '')
468
507
  }),
469
508
  GAData: __assign(__assign({}, GAData), {
470
509
  groupId: item.id,
471
510
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
472
511
  }),
473
512
  readonly: true
474
- }), item.peek.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
475
- className: "peek right",
513
+ })), /*#__PURE__*/_react["default"].createElement("div", {
514
+ className: "peek right"
515
+ }, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
476
516
  data: __assign(__assign({}, item.peek), {
477
- text: 'Cenduit 30,000'
517
+ text: "" + (((_f = nextItem === null || nextItem === void 0 ? void 0 : nextItem.title) === null || _f === void 0 ? void 0 : _f.text) || '')
478
518
  }),
479
519
  GAData: __assign(__assign({}, GAData), {
480
520
  groupId: item.id,
481
521
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
482
522
  }),
483
523
  readonly: true
484
- })));
524
+ }), /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
525
+ data: __assign(__assign({}, item.peek), {
526
+ text: "" + (((_g = _this.userWalletData[nextItem === null || nextItem === void 0 ? void 0 : nextItem.sourceType]) === null || _g === void 0 ? void 0 : _g.amount) || '')
527
+ }),
528
+ GAData: __assign(__assign({}, GAData), {
529
+ groupId: item.id,
530
+ groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
531
+ }),
532
+ readonly: true
533
+ }))));
534
+ };
535
+
536
+ return /*#__PURE__*/_react["default"].createElement("div", {
537
+ className: "m-Wallet-mobile"
538
+ }, data.title.headline.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
539
+ className: "headline",
540
+ data: data.title.headline
541
+ }), data.customize.layout === 'layout1' ? /*#__PURE__*/_react["default"].createElement("div", {
542
+ className: "column-layout column_" + colNum,
543
+ style: (0, _commonUtil.pxToRem)({
544
+ gap: MOBILE_IMG_SIZE[colNum].gap
545
+ })
546
+ }, data.groupSource.map(function (item, index) {
547
+ var preItem = index === 0 ? {} : data.groupSource[index - 1];
548
+ var nextItem = index === data.groupSource.length ? {} : data.groupSource[index + 1];
549
+ return /*#__PURE__*/_react["default"].createElement("div", {
550
+ key: item.id,
551
+ className: "item-wrap",
552
+ style: (0, _commonUtil.pxToRem)({
553
+ width: "calc((100% - " + (0, _commonUtil.convertToRem)(MOBILE_IMG_SIZE[colNum].gap * (colNum - 1)) + ") / " + colNum + ")"
554
+ })
555
+ }, getItemContent(item, preItem, nextItem));
485
556
  })) : /*#__PURE__*/_react["default"].createElement("div", {
486
557
  className: "carousel-layout"
487
558
  }, data.setting.navigation.open && data.groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
@@ -497,83 +568,13 @@ function (_super) {
497
568
  ref: function ref(slider) {
498
569
  return _this.sliderRef = slider;
499
570
  }
500
- }, settings), data.groupSource.map(function (item) {
501
- var _amount = _this.getAmount(item.sourceType);
502
-
503
- var _bgStyle = {};
504
-
505
- if (item.background) {
506
- if (item.background.bgType === 'color') {
507
- _bgStyle.backgroundColor = item.background.color;
508
- _bgStyle.opacity = item.background.opacity ? item.background.opacity : 1;
509
- } else {
510
- _bgStyle.backgroundImage = "url(" + item.background.image + ")";
511
- _bgStyle.backgroundPosition = 'center';
512
- _bgStyle.backgroundSize = 'cover';
513
- }
514
- }
515
-
571
+ }, settings), data.groupSource.map(function (item, index) {
572
+ var preItem = index === 0 ? {} : data.groupSource[index - 1];
573
+ var nextItem = index === data.groupSource.length ? {} : data.groupSource[index + 1];
516
574
  return /*#__PURE__*/_react["default"].createElement("div", {
517
575
  key: item.id,
518
576
  className: "item-wrap"
519
- }, /*#__PURE__*/_react["default"].createElement("div", {
520
- className: "text-content",
521
- style: _bgStyle
522
- }, item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
523
- className: "title",
524
- data: item.title,
525
- GAData: __assign(__assign({}, GAData), {
526
- groupId: item.id,
527
- groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
528
- })
529
- }), item.amount.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
530
- className: "amount",
531
- data: __assign(__assign({}, item.amount), {
532
- text: _amount
533
- }),
534
- GAData: __assign(__assign({}, GAData), {
535
- groupId: item.id,
536
- groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
537
- }),
538
- readonly: true
539
- }), item.text.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
540
- className: "text",
541
- data: item.text,
542
- GAData: __assign(__assign({}, GAData), {
543
- groupId: item.id,
544
- groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
545
- }),
546
- readonly: true
547
- }), item.button.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
548
- className: "wallet-btn",
549
- data: __assign(__assign({}, item.button), {
550
- text: 'Lets Go!'
551
- }),
552
- GAData: __assign(__assign({}, GAData), {
553
- groupId: item.id,
554
- groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
555
- })
556
- }), item.peek.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
557
- className: "peek left",
558
- data: __assign(__assign({}, item.peek), {
559
- text: 'B2B 30,000'
560
- }),
561
- GAData: __assign(__assign({}, GAData), {
562
- groupId: item.id,
563
- groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
564
- }),
565
- readonly: true
566
- }), item.peek.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
567
- className: "peek right",
568
- data: __assign(__assign({}, item.peek), {
569
- text: 'Cenduit 30,000'
570
- }),
571
- GAData: __assign(__assign({}, GAData), {
572
- groupId: item.id,
573
- groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
574
- }),
575
- readonly: true
576
- })));
577
+ }, getItemContent(item, preItem, nextItem));
577
578
  })), data.setting.navigation.open && data.groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
578
579
  className: "carousel-icon-right",
579
580
  onClick: function onClick() {
@@ -16,7 +16,8 @@
16
16
  .m-Wallet-mobile .item-wrap .text-content .peek {
17
17
  position: absolute;
18
18
  bottom: 0.32rem;
19
- width: 0.8rem !important;
19
+ width: 1.2rem !important;
20
+ white-space: nowrap;
20
21
  }
21
22
  .m-Wallet-mobile .item-wrap .text-content .peek.left {
22
23
  left: 0.8rem;
@@ -29,7 +30,7 @@
29
30
  flex-wrap: wrap;
30
31
  }
31
32
  .m-Wallet-mobile .column-layout .text-content {
32
- padding: 0.2rem 0 1.2rem 0;
33
+ padding: 0.2rem 0 0.4rem 0;
33
34
  }
34
35
  .m-Wallet-mobile .column-layout .text-content .wallet-btn {
35
36
  margin-top: 0.2rem;
@@ -17,6 +17,8 @@ var _TextConfig = _interopRequireDefault(require("../../../../meta-comp/config-p
17
17
 
18
18
  var _ButtonConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ButtonConfig"));
19
19
 
20
+ var _constants = require("../../../../constants");
21
+
20
22
  var _BaseConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/BaseConfig"));
21
23
 
22
24
  var _BackgroundConfig = _interopRequireDefault(require("../../../common/config-panels/BackgroundConfig"));
@@ -124,17 +126,17 @@ function (_super) {
124
126
  },
125
127
  value: panelProps.sourceType
126
128
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
127
- value: "Balance"
129
+ value: _constants.walletType.BALANCE
128
130
  }, (0, _locale.i18n)('Balance')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
129
- value: "B2B PayLater"
131
+ value: _constants.walletType.B2B
130
132
  }, (0, _locale.i18n)('B2B PayLater')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
131
- value: "Cenduit"
133
+ value: _constants.walletType.CENDUIT
132
134
  }, (0, _locale.i18n)('Cenduit')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
133
- value: "BNPL"
135
+ value: _constants.walletType.BNPL
134
136
  }, (0, _locale.i18n)('BNPL')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
135
- value: "Credit"
137
+ value: _constants.walletType.CREDIT
136
138
  }, (0, _locale.i18n)('Credit')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
137
- value: "Cashback"
139
+ value: _constants.walletType.CASHBACK
138
140
  }, (0, _locale.i18n)('Cashback'))))), /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
139
141
  divider: "dashed",
140
142
  headerSize: "middle",
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.urlTypeMap = exports.urlType = exports.respCodeMap = exports.quickMenuCode = exports.partyTypeMap = exports.metaType = exports.metaInst = exports.metaInsType = exports.magicMode = exports.eventType = exports.deviceTypeWidthMap = exports.deviceTypeMap = exports.compInfoMap = exports.STORAGE_KEY = exports.CREDIT_STATE = void 0;
6
+ exports.walletType = exports.urlTypeMap = exports.urlType = exports.respCodeMap = exports.quickMenuCode = exports.partyTypeMap = exports.metaType = exports.metaInst = exports.metaInsType = exports.magicMode = exports.eventType = exports.deviceTypeWidthMap = exports.deviceTypeMap = exports.compInfoMap = exports.STORAGE_KEY = exports.CREDIT_STATE = void 0;
7
7
  var STORAGE_KEY = {
8
8
  LOCALE: 'magicLocale',
9
9
  MAGIC_RENDER_HTML: 'MAGIC_RENDER_HTML',
@@ -36,6 +36,15 @@ var CREDIT_STATE = {
36
36
  }
37
37
  };
38
38
  exports.CREDIT_STATE = CREDIT_STATE;
39
+ var walletType = {
40
+ CASHBACK: 'Cashback',
41
+ CREDIT: 'Credit',
42
+ BNPL: 'BNPL',
43
+ B2B: 'B2B PayLater',
44
+ BALANCE: 'Balance',
45
+ CENDUIT: 'Cenduit'
46
+ };
47
+ exports.walletType = walletType;
39
48
  var urlType = {
40
49
  PRODUCT_DETAIL: 'proDetail',
41
50
  CATG_PROD_LIST: 'catg',
@@ -584,7 +584,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
584
584
  value: v.storeId
585
585
  }, v.storeName);
586
586
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
587
- label: "Lable"
587
+ label: "Label"
588
588
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
589
589
  defaultValue: [],
590
590
  onChange: handleLabelChange,
@@ -608,7 +608,7 @@ var ProductModal = function ProductModal(props) {
608
608
  value: v.storeId
609
609
  }, v.storeName);
610
610
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
611
- label: "Lable"
611
+ label: "Label"
612
612
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
613
613
  defaultValue: selLabelData.children || null,
614
614
  onChange: function onChange(v, o) {
@@ -240,56 +240,97 @@ function (_super) {
240
240
  var _this = _super !== null && _super.apply(this, arguments) || this;
241
241
 
242
242
  _this.state = {
243
- cashback: 0,
244
- credit: 0,
245
- bnpl: 0,
246
243
  sliderIndex: 0
247
244
  };
248
245
  _this.sliderRef = null;
249
246
  _this.destroy = null;
247
+ _this.userWalletData = {};
250
248
 
251
249
  _this.getMyWalletData = function () {
252
250
  return __awaiter(_this, void 0, void 0, function () {
253
- var _a, userCreditResps, userCashbackValues, creditObj, bnplObj;
254
-
255
- return __generator(this, function (_b) {
256
- switch (_b.label) {
257
- case 0:
258
- return [4
259
- /*yield*/
260
- , (0, _commonUtil.commonFetch)('/designer/v1/h5/mywallet/list', {}, 'GET')];
261
-
262
- case 1:
263
- _a = _b.sent(), userCreditResps = _a.userCreditResps, userCashbackValues = _a.userCashbackValues;
264
- creditObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
265
- return item.creditId === 2 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
266
- });
267
- bnplObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
268
- return item.creditId === 1 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
269
- });
270
- this.setState({
271
- cashback: userCashbackValues === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userCashbackValues),
272
- credit: userCreditResps === null ? '****' : creditObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(creditObj.availableAmount) : 'APPLY',
273
- bnpl: userCreditResps === null ? '****' : bnplObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(bnplObj.availableAmount) : 'APPLY'
274
- });
275
- return [2
276
- /*return*/
277
- ];
278
- }
251
+ var _a, userCreditResps, userCashbackValues, userBalance, userPoint, defaultShowWallet, defaultShowIndex, bnplObj, creditObj, B2BObj;
252
+
253
+ var _b;
254
+
255
+ return __generator(this, function (_c) {
256
+ _a = {
257
+ userCreditResps: [{
258
+ userCreditId: 1023,
259
+ creditId: 1,
260
+ partyType: null,
261
+ state: 'Pass',
262
+ isUrlExpired: false,
263
+ creditLimit: 150000,
264
+ usageAmount: 100000,
265
+ availableAmount: 1000,
266
+ comments: null,
267
+ userNearestBillDto: null
268
+ }, {
269
+ userCreditId: 1026,
270
+ creditId: 2,
271
+ partyType: null,
272
+ state: 'Locked',
273
+ isUrlExpired: false,
274
+ creditLimit: 100000,
275
+ usageAmount: 100000,
276
+ availableAmount: 2000,
277
+ comments: null,
278
+ userNearestBillDto: null
279
+ }, {
280
+ userCreditId: 1027,
281
+ creditId: 3,
282
+ partyType: 'I',
283
+ state: 'Pass',
284
+ isUrlExpired: false,
285
+ creditLimit: 100000000,
286
+ usageAmount: 0,
287
+ availableAmount: 3000,
288
+ comments: 'ty',
289
+ userNearestBillDto: null
290
+ }],
291
+ userCashbackValues: 4000,
292
+ userBalance: 5000,
293
+ userPoint: 6000,
294
+ defaultShowWallet: 'Balance'
295
+ }, userCreditResps = _a.userCreditResps, userCashbackValues = _a.userCashbackValues, userBalance = _a.userBalance, userPoint = _a.userPoint, defaultShowWallet = _a.defaultShowWallet;
296
+ defaultShowIndex = 0;
297
+ this.props.data.groupSource.forEach(function (f, i) {
298
+ if (f.sourceType === defaultShowWallet) defaultShowIndex = i;
299
+ });
300
+ this.sliderRef.slickGoTo(defaultShowIndex);
301
+ bnplObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
302
+ return item.creditId === 1 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
303
+ });
304
+ creditObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
305
+ return item.creditId === 2 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
306
+ });
307
+ B2BObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
308
+ return item.creditId === 3 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
309
+ });
310
+ this.userWalletData = (_b = {}, _b[_constants.walletType.BNPL] = {
311
+ amount: userCreditResps === null ? '****' : bnplObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(bnplObj.availableAmount) : 'APPLY'
312
+ }, _b[_constants.walletType.CREDIT] = {
313
+ amount: userCreditResps === null ? '****' : creditObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(creditObj.availableAmount) : 'APPLY'
314
+ }, _b[_constants.walletType.B2B] = {
315
+ amount: userCreditResps === null ? '****' : B2BObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(B2BObj.availableAmount) : 'APPLY',
316
+ text: B2BObj ? 'Add ore products to your shop!' : '',
317
+ btnText: 'Procure Product'
318
+ }, _b[_constants.walletType.CASHBACK] = {
319
+ amount: userCashbackValues === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userCashbackValues)
320
+ }, _b[_constants.walletType.BALANCE] = {
321
+ amount: userBalance === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userBalance),
322
+ btnText: 'Social Commerce'
323
+ }, _b[_constants.walletType.CENDUIT] = {
324
+ amount: userBalance === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userPoint),
325
+ btnText: 'Cenduit Mall'
326
+ }, _b);
327
+ return [2
328
+ /*return*/
329
+ ];
279
330
  });
280
331
  });
281
332
  };
282
333
 
283
- _this.getAmount = function (type) {
284
- var _a = _this.state,
285
- cashback = _a.cashback,
286
- credit = _a.credit,
287
- bnpl = _a.bnpl;
288
- if (type === 'Cashback') return cashback;
289
- if (type === 'Credit') return credit;
290
- if (type === 'BNPL') return bnpl;
291
- };
292
-
293
334
  _this.mouseEnterBtn = function (e) {
294
335
  var _a, _b;
295
336
 
@@ -363,7 +404,6 @@ function (_super) {
363
404
 
364
405
  var data = this.props.data;
365
406
  var sliderIndex = this.state.sliderIndex;
366
- var GAData = (0, _commonUtil.getGAData)(data);
367
407
  var colNum = data.customize.rowNum;
368
408
  var autoplay = data.setting.autoplay.open;
369
409
  /** 设计器模式下 如果选中特定group 自动播放关闭 */
@@ -392,19 +432,12 @@ function (_super) {
392
432
  fontSize: (0, _commonUtil.convertToRem)(data.setting.navigation.size),
393
433
  color: data.setting.navigation.color
394
434
  };
395
- return /*#__PURE__*/_react["default"].createElement("div", {
396
- className: "m-Wallet-mobile"
397
- }, data.title.headline.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
398
- className: "headline",
399
- data: data.title.headline
400
- }), data.customize.layout === 'layout1' ? /*#__PURE__*/_react["default"].createElement("div", {
401
- className: "column-layout column_" + colNum,
402
- style: (0, _commonUtil.pxToRem)({
403
- gap: MOBILE_IMG_SIZE[colNum].gap
404
- })
405
- }, data.groupSource.map(function (item) {
406
- var _amount = _this.getAmount(item.sourceType);
407
435
 
436
+ var getItemContent = function getItemContent(item, preItem, nextItem) {
437
+ var _a, _b, _c, _d, _e, _f, _g;
438
+
439
+ var data = _this.props.data;
440
+ var GAData = (0, _commonUtil.getGAData)(data);
408
441
  var _bgStyle = {};
409
442
 
410
443
  if (item.background) {
@@ -419,12 +452,6 @@ function (_super) {
419
452
  }
420
453
 
421
454
  return /*#__PURE__*/_react["default"].createElement("div", {
422
- key: item.id,
423
- className: "item-wrap",
424
- style: (0, _commonUtil.pxToRem)({
425
- width: "calc((100% - " + (0, _commonUtil.convertToRem)(MOBILE_IMG_SIZE[colNum].gap * (colNum - 1)) + ") / " + colNum + ")"
426
- })
427
- }, /*#__PURE__*/_react["default"].createElement("div", {
428
455
  className: "text-content",
429
456
  style: _bgStyle
430
457
  }, item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
@@ -437,7 +464,7 @@ function (_super) {
437
464
  }), item.amount.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
438
465
  className: "amount",
439
466
  data: __assign(__assign({}, item.amount), {
440
- text: _amount
467
+ text: (_a = _this.userWalletData[item.sourceType]) === null || _a === void 0 ? void 0 : _a.amount
441
468
  }),
442
469
  GAData: __assign(__assign({}, GAData), {
443
470
  groupId: item.id,
@@ -446,7 +473,9 @@ function (_super) {
446
473
  readonly: true
447
474
  }), item.text.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
448
475
  className: "text",
449
- data: item.text,
476
+ data: __assign(__assign({}, item.text), {
477
+ text: ((_b = _this.userWalletData[item.sourceType]) === null || _b === void 0 ? void 0 : _b.text) || 'Make money and shop on Cendol!'
478
+ }),
450
479
  GAData: __assign(__assign({}, GAData), {
451
480
  groupId: item.id,
452
481
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
@@ -455,33 +484,75 @@ function (_super) {
455
484
  }), item.button.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
456
485
  className: "wallet-btn",
457
486
  data: __assign(__assign({}, item.button), {
458
- text: 'Lets Go!'
487
+ text: ((_c = _this.userWalletData[item.sourceType]) === null || _c === void 0 ? void 0 : _c.btnText) || 'Lets Go!'
459
488
  }),
460
489
  GAData: __assign(__assign({}, GAData), {
461
490
  groupId: item.id,
462
491
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
463
492
  })
464
- }), item.peek.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
465
- className: "peek left",
493
+ }), data.customize.layout === 'layout2' && item.peek.open && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
494
+ className: "peek left"
495
+ }, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
496
+ data: __assign(__assign({}, item.peek), {
497
+ text: "" + (((_d = preItem === null || preItem === void 0 ? void 0 : preItem.title) === null || _d === void 0 ? void 0 : _d.text) || '')
498
+ }),
499
+ GAData: __assign(__assign({}, GAData), {
500
+ groupId: item.id,
501
+ groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
502
+ }),
503
+ readonly: true
504
+ }), /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
466
505
  data: __assign(__assign({}, item.peek), {
467
- text: 'B2B 30,000'
506
+ text: "" + (((_e = _this.userWalletData[preItem === null || preItem === void 0 ? void 0 : preItem.sourceType]) === null || _e === void 0 ? void 0 : _e.amount) || '')
468
507
  }),
469
508
  GAData: __assign(__assign({}, GAData), {
470
509
  groupId: item.id,
471
510
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
472
511
  }),
473
512
  readonly: true
474
- }), item.peek.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
475
- className: "peek right",
513
+ })), /*#__PURE__*/_react["default"].createElement("div", {
514
+ className: "peek right"
515
+ }, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
476
516
  data: __assign(__assign({}, item.peek), {
477
- text: 'Cenduit 30,000'
517
+ text: "" + (((_f = nextItem === null || nextItem === void 0 ? void 0 : nextItem.title) === null || _f === void 0 ? void 0 : _f.text) || '')
478
518
  }),
479
519
  GAData: __assign(__assign({}, GAData), {
480
520
  groupId: item.id,
481
521
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
482
522
  }),
483
523
  readonly: true
484
- })));
524
+ }), /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
525
+ data: __assign(__assign({}, item.peek), {
526
+ text: "" + (((_g = _this.userWalletData[nextItem === null || nextItem === void 0 ? void 0 : nextItem.sourceType]) === null || _g === void 0 ? void 0 : _g.amount) || '')
527
+ }),
528
+ GAData: __assign(__assign({}, GAData), {
529
+ groupId: item.id,
530
+ groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
531
+ }),
532
+ readonly: true
533
+ }))));
534
+ };
535
+
536
+ return /*#__PURE__*/_react["default"].createElement("div", {
537
+ className: "m-Wallet-mobile"
538
+ }, data.title.headline.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
539
+ className: "headline",
540
+ data: data.title.headline
541
+ }), data.customize.layout === 'layout1' ? /*#__PURE__*/_react["default"].createElement("div", {
542
+ className: "column-layout column_" + colNum,
543
+ style: (0, _commonUtil.pxToRem)({
544
+ gap: MOBILE_IMG_SIZE[colNum].gap
545
+ })
546
+ }, data.groupSource.map(function (item, index) {
547
+ var preItem = index === 0 ? {} : data.groupSource[index - 1];
548
+ var nextItem = index === data.groupSource.length ? {} : data.groupSource[index + 1];
549
+ return /*#__PURE__*/_react["default"].createElement("div", {
550
+ key: item.id,
551
+ className: "item-wrap",
552
+ style: (0, _commonUtil.pxToRem)({
553
+ width: "calc((100% - " + (0, _commonUtil.convertToRem)(MOBILE_IMG_SIZE[colNum].gap * (colNum - 1)) + ") / " + colNum + ")"
554
+ })
555
+ }, getItemContent(item, preItem, nextItem));
485
556
  })) : /*#__PURE__*/_react["default"].createElement("div", {
486
557
  className: "carousel-layout"
487
558
  }, data.setting.navigation.open && data.groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
@@ -497,83 +568,13 @@ function (_super) {
497
568
  ref: function ref(slider) {
498
569
  return _this.sliderRef = slider;
499
570
  }
500
- }, settings), data.groupSource.map(function (item) {
501
- var _amount = _this.getAmount(item.sourceType);
502
-
503
- var _bgStyle = {};
504
-
505
- if (item.background) {
506
- if (item.background.bgType === 'color') {
507
- _bgStyle.backgroundColor = item.background.color;
508
- _bgStyle.opacity = item.background.opacity ? item.background.opacity : 1;
509
- } else {
510
- _bgStyle.backgroundImage = "url(" + item.background.image + ")";
511
- _bgStyle.backgroundPosition = 'center';
512
- _bgStyle.backgroundSize = 'cover';
513
- }
514
- }
515
-
571
+ }, settings), data.groupSource.map(function (item, index) {
572
+ var preItem = index === 0 ? {} : data.groupSource[index - 1];
573
+ var nextItem = index === data.groupSource.length ? {} : data.groupSource[index + 1];
516
574
  return /*#__PURE__*/_react["default"].createElement("div", {
517
575
  key: item.id,
518
576
  className: "item-wrap"
519
- }, /*#__PURE__*/_react["default"].createElement("div", {
520
- className: "text-content",
521
- style: _bgStyle
522
- }, item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
523
- className: "title",
524
- data: item.title,
525
- GAData: __assign(__assign({}, GAData), {
526
- groupId: item.id,
527
- groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
528
- })
529
- }), item.amount.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
530
- className: "amount",
531
- data: __assign(__assign({}, item.amount), {
532
- text: _amount
533
- }),
534
- GAData: __assign(__assign({}, GAData), {
535
- groupId: item.id,
536
- groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
537
- }),
538
- readonly: true
539
- }), item.text.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
540
- className: "text",
541
- data: item.text,
542
- GAData: __assign(__assign({}, GAData), {
543
- groupId: item.id,
544
- groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
545
- }),
546
- readonly: true
547
- }), item.button.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
548
- className: "wallet-btn",
549
- data: __assign(__assign({}, item.button), {
550
- text: 'Lets Go!'
551
- }),
552
- GAData: __assign(__assign({}, GAData), {
553
- groupId: item.id,
554
- groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
555
- })
556
- }), item.peek.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
557
- className: "peek left",
558
- data: __assign(__assign({}, item.peek), {
559
- text: 'B2B 30,000'
560
- }),
561
- GAData: __assign(__assign({}, GAData), {
562
- groupId: item.id,
563
- groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
564
- }),
565
- readonly: true
566
- }), item.peek.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
567
- className: "peek right",
568
- data: __assign(__assign({}, item.peek), {
569
- text: 'Cenduit 30,000'
570
- }),
571
- GAData: __assign(__assign({}, GAData), {
572
- groupId: item.id,
573
- groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
574
- }),
575
- readonly: true
576
- })));
577
+ }, getItemContent(item, preItem, nextItem));
577
578
  })), data.setting.navigation.open && data.groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
578
579
  className: "carousel-icon-right",
579
580
  onClick: function onClick() {
@@ -16,7 +16,8 @@
16
16
  .m-Wallet-mobile .item-wrap .text-content .peek {
17
17
  position: absolute;
18
18
  bottom: 0.32rem;
19
- width: 0.8rem !important;
19
+ width: 1.2rem !important;
20
+ white-space: nowrap;
20
21
  }
21
22
  .m-Wallet-mobile .item-wrap .text-content .peek.left {
22
23
  left: 0.8rem;
@@ -29,7 +30,7 @@
29
30
  flex-wrap: wrap;
30
31
  }
31
32
  .m-Wallet-mobile .column-layout .text-content {
32
- padding: 0.2rem 0 1.2rem 0;
33
+ padding: 0.2rem 0 0.4rem 0;
33
34
  }
34
35
  .m-Wallet-mobile .column-layout .text-content .wallet-btn {
35
36
  margin-top: 0.2rem;
@@ -17,6 +17,8 @@ var _TextConfig = _interopRequireDefault(require("../../../../meta-comp/config-p
17
17
 
18
18
  var _ButtonConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ButtonConfig"));
19
19
 
20
+ var _constants = require("../../../../constants");
21
+
20
22
  var _BaseConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/BaseConfig"));
21
23
 
22
24
  var _BackgroundConfig = _interopRequireDefault(require("../../../common/config-panels/BackgroundConfig"));
@@ -124,17 +126,17 @@ function (_super) {
124
126
  },
125
127
  value: panelProps.sourceType
126
128
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
127
- value: "Balance"
129
+ value: _constants.walletType.BALANCE
128
130
  }, (0, _locale.i18n)('Balance')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
129
- value: "B2B PayLater"
131
+ value: _constants.walletType.B2B
130
132
  }, (0, _locale.i18n)('B2B PayLater')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
131
- value: "Cenduit"
133
+ value: _constants.walletType.CENDUIT
132
134
  }, (0, _locale.i18n)('Cenduit')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
133
- value: "BNPL"
135
+ value: _constants.walletType.BNPL
134
136
  }, (0, _locale.i18n)('BNPL')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
135
- value: "Credit"
137
+ value: _constants.walletType.CREDIT
136
138
  }, (0, _locale.i18n)('Credit')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
137
- value: "Cashback"
139
+ value: _constants.walletType.CASHBACK
138
140
  }, (0, _locale.i18n)('Cashback'))))), /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
139
141
  divider: "dashed",
140
142
  headerSize: "middle",
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.urlTypeMap = exports.urlType = exports.respCodeMap = exports.quickMenuCode = exports.partyTypeMap = exports.metaType = exports.metaInst = exports.metaInsType = exports.magicMode = exports.eventType = exports.deviceTypeWidthMap = exports.deviceTypeMap = exports.compInfoMap = exports.STORAGE_KEY = exports.CREDIT_STATE = void 0;
6
+ exports.walletType = exports.urlTypeMap = exports.urlType = exports.respCodeMap = exports.quickMenuCode = exports.partyTypeMap = exports.metaType = exports.metaInst = exports.metaInsType = exports.magicMode = exports.eventType = exports.deviceTypeWidthMap = exports.deviceTypeMap = exports.compInfoMap = exports.STORAGE_KEY = exports.CREDIT_STATE = void 0;
7
7
  var STORAGE_KEY = {
8
8
  LOCALE: 'magicLocale',
9
9
  MAGIC_RENDER_HTML: 'MAGIC_RENDER_HTML',
@@ -36,6 +36,15 @@ var CREDIT_STATE = {
36
36
  }
37
37
  };
38
38
  exports.CREDIT_STATE = CREDIT_STATE;
39
+ var walletType = {
40
+ CASHBACK: 'Cashback',
41
+ CREDIT: 'Credit',
42
+ BNPL: 'BNPL',
43
+ B2B: 'B2B PayLater',
44
+ BALANCE: 'Balance',
45
+ CENDUIT: 'Cenduit'
46
+ };
47
+ exports.walletType = walletType;
39
48
  var urlType = {
40
49
  PRODUCT_DETAIL: 'proDetail',
41
50
  CATG_PROD_LIST: 'catg',
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.38",
4
+ "version": "2.0.39",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",
Binary file
Binary file