@fonixtree/magic-design 2.0.47 → 2.0.49

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.
@@ -6,9 +6,8 @@
6
6
 
7
7
  .cardItem {
8
8
  width: 100%;
9
- height: 218px;
10
9
  border-radius: 10px;
11
- background-color: pink;
10
+ background-color: #fff;
12
11
  position: absolute;
13
12
 
14
13
  &.active {
@@ -244,14 +244,14 @@ function (_super) {
244
244
 
245
245
  _this.getMyWalletData = function () {
246
246
  return __awaiter(_this, void 0, void 0, function () {
247
- var data, _a, userCreditResps, userCashbackValues, userBalance, userPoint, defaultShowWallet, defaultShowIndex_1, bnplObj, creditObj, B2BObj;
247
+ var data, _a, userCreditResps, userCashbackValues, userBalance, userPoint, defaultShowWallet, bnplObj, creditObj, B2BObj;
248
248
 
249
249
  var _b;
250
250
 
251
- var _c;
251
+ var _this = this;
252
252
 
253
- return __generator(this, function (_d) {
254
- switch (_d.label) {
253
+ return __generator(this, function (_c) {
254
+ switch (_c.label) {
255
255
  case 0:
256
256
  data = this.props.data;
257
257
  return [4
@@ -259,86 +259,60 @@ function (_super) {
259
259
  , (0, _commonUtil.commonFetch)('/designer/v1/h5/mywallet/list', {}, 'GET')];
260
260
 
261
261
  case 1:
262
- _a = _d.sent(), userCreditResps = _a.userCreditResps, userCashbackValues = _a.userCashbackValues, userBalance = _a.userBalance, userPoint = _a.userPoint, defaultShowWallet = _a.defaultShowWallet; // const { userCreditResps, userCashbackValues, userBalance, userPoint, defaultShowWallet } = {
263
- // userCreditResps: [
264
- // {
265
- // userCreditId: 1023,
266
- // creditId: 1,
267
- // partyType: null,
268
- // state: 'Pass',
269
- // isUrlExpired: false,
270
- // creditLimit: 150000,
271
- // usageAmount: 100000,
272
- // availableAmount: 1000,
273
- // comments: null,
274
- // userNearestBillDto: null,
275
- // },
276
- // {
277
- // userCreditId: 1026,
278
- // creditId: 2,
279
- // partyType: null,
280
- // state: 'Locked',
281
- // isUrlExpired: false,
282
- // creditLimit: 100000,
283
- // usageAmount: 100000,
284
- // availableAmount: 2000,
285
- // comments: null,
286
- // userNearestBillDto: null,
287
- // },
288
- // {
289
- // userCreditId: 1027,
290
- // creditId: 3,
291
- // partyType: 'I',
292
- // state: 'Pass',
293
- // isUrlExpired: false,
294
- // creditLimit: 100000000,
295
- // usageAmount: 0,
296
- // availableAmount: 3000,
297
- // comments: 'ty',
298
- // userNearestBillDto: null,
299
- // },
300
- // ],
301
- // userCashbackValues: 4000,
302
- // userBalance: 5000,
303
- // userPoint: 6000,
304
- // defaultShowWallet: 'Balance',
305
- // };
306
-
307
- if (data.customize.layout === 'layout2' && this.carouselRef) {
308
- defaultShowIndex_1 = 0;
309
- data.groupSource.forEach(function (f, i) {
310
- if (f.sourceType === defaultShowWallet) defaultShowIndex_1 = i;
311
- });
312
- (_c = this.carouselRef.current) === null || _c === void 0 ? void 0 : _c.slideTo(defaultShowIndex_1);
313
- }
314
-
262
+ _a = _c.sent(), userCreditResps = _a.userCreditResps, userCashbackValues = _a.userCashbackValues, userBalance = _a.userBalance, userPoint = _a.userPoint, defaultShowWallet = _a.defaultShowWallet;
315
263
  bnplObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
316
- return item.creditId === 1 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
264
+ return item.creditId === 1;
317
265
  });
318
266
  creditObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
319
- return item.creditId === 2 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
267
+ return item.creditId === 2;
320
268
  });
321
269
  B2BObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
322
- return item.creditId === 3 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
270
+ return item.creditId === 3;
323
271
  });
324
272
  this.setState({
325
273
  userWalletData: (_b = {}, _b[_constants.walletType.BNPL] = {
326
- amount: userCreditResps === null ? '****' : bnplObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(bnplObj.availableAmount) : 'APPLY'
274
+ amount: userCreditResps === null ? '****' : bnplObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(bnplObj.availableAmount) : 'APPLY',
275
+ show: userCreditResps === null || [_constants.CREDIT_STATE.APPROVED.KEY].includes(bnplObj === null || bnplObj === void 0 ? void 0 : bnplObj.state)
327
276
  }, _b[_constants.walletType.CREDIT] = {
328
- amount: userCreditResps === null ? '****' : creditObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(creditObj.availableAmount) : 'APPLY'
277
+ amount: userCreditResps === null ? '****' : creditObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(creditObj.availableAmount) : 'APPLY',
278
+ show: userCreditResps === null || [_constants.CREDIT_STATE.APPROVED.KEY].includes(creditObj === null || creditObj === void 0 ? void 0 : creditObj.state)
329
279
  }, _b[_constants.walletType.B2B] = {
330
280
  amount: userCreditResps === null ? '****' : B2BObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(B2BObj.availableAmount) : 'APPLY',
331
- text: B2BObj ? 'Add ore products to your shop!' : '',
332
- btnText: 'Procure Product'
281
+ text: B2BObj ? 'Add more products to your shop!' : '',
282
+ btnText: B2BObj ? 'Procure Product' : '',
283
+ show: userCreditResps === null || [_constants.CREDIT_STATE.APPROVED.KEY].includes(B2BObj === null || B2BObj === void 0 ? void 0 : B2BObj.state)
333
284
  }, _b[_constants.walletType.CASHBACK] = {
334
- amount: userCashbackValues === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userCashbackValues)
285
+ amount: userCashbackValues === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userCashbackValues),
286
+ show: true
335
287
  }, _b[_constants.walletType.BALANCE] = {
336
288
  amount: userBalance === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userBalance),
337
- btnText: 'Social Commerce'
289
+ btnText: userBalance ? 'Social Commerce' : '',
290
+ show: true
338
291
  }, _b[_constants.walletType.CENDUIT] = {
339
- amount: userPoint === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userPoint),
340
- btnText: 'Cenduit Mall'
292
+ amount: userPoint === null ? '****' : userPoint,
293
+ btnText: userPoint ? 'Cenduit Mall' : '',
294
+ show: true
341
295
  }, _b)
296
+ }, function () {
297
+ var _a;
298
+
299
+ if (data.customize.layout === 'layout2' && _this.carouselRef) {
300
+ var userWalletData_1 = _this.state.userWalletData;
301
+
302
+ var _groupSource = data.groupSource.filter(function (f) {
303
+ var _a;
304
+
305
+ return (_a = userWalletData_1[f.sourceType]) === null || _a === void 0 ? void 0 : _a.show;
306
+ });
307
+
308
+ var defaultShowIndex_1 = 0;
309
+
310
+ _groupSource.forEach(function (f, i) {
311
+ if (f.sourceType === defaultShowWallet) defaultShowIndex_1 = i;
312
+ });
313
+
314
+ (_a = _this.carouselRef.current) === null || _a === void 0 ? void 0 : _a.slideTo(defaultShowIndex_1);
315
+ }
342
316
  });
343
317
  return [2
344
318
  /*return*/
@@ -428,11 +402,20 @@ function (_super) {
428
402
  var _a, _b, _c, _d, _e, _f, _g, _h;
429
403
 
430
404
  var data = this.props.data;
431
- var sliderIndex = this.state.sliderIndex;
405
+ var _j = this.state,
406
+ sliderIndex = _j.sliderIndex,
407
+ userWalletData = _j.userWalletData;
432
408
  var colNum = data.customize.rowNum;
433
409
  var autoplay = (_b = (_a = data.setting) === null || _a === void 0 ? void 0 : _a.autoplay) === null || _b === void 0 ? void 0 : _b.open;
410
+
411
+ var _groupSource = data.groupSource.filter(function (f) {
412
+ var _a;
413
+
414
+ return (_a = userWalletData[f.sourceType]) === null || _a === void 0 ? void 0 : _a.show;
415
+ });
434
416
  /** 设计器模式下 如果选中特定group 自动播放关闭 */
435
417
 
418
+
436
419
  if ((0, _coreUtil.isDesignMode)() && _mobx.store.clickedGroup) {
437
420
  autoplay = false;
438
421
  }
@@ -461,36 +444,34 @@ function (_super) {
461
444
  }
462
445
  }
463
446
 
447
+ item.text.text = ((_a = userWalletData[item.sourceType]) === null || _a === void 0 ? void 0 : _a.text) || 'Make money and shop on Cendol!';
464
448
  return /*#__PURE__*/_react["default"].createElement("div", {
465
449
  className: "text-content",
466
450
  style: _bgStyle
467
- }, ((_a = item.title) === null || _a === void 0 ? void 0 : _a.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
451
+ }, ((_b = item.title) === null || _b === void 0 ? void 0 : _b.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
468
452
  className: "title",
469
453
  data: item.title,
470
454
  GAData: __assign(__assign({}, GAData), {
471
455
  groupId: item.id,
472
456
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
473
457
  })
474
- }), ((_b = item.amount) === null || _b === void 0 ? void 0 : _b.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
458
+ }), ((_c = item.amount) === null || _c === void 0 ? void 0 : _c.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
475
459
  className: "amount",
476
460
  data: __assign(__assign({}, item.amount), {
477
- text: (_c = userWalletData[item.sourceType]) === null || _c === void 0 ? void 0 : _c.amount
461
+ text: (_d = userWalletData[item.sourceType]) === null || _d === void 0 ? void 0 : _d.amount
478
462
  }),
479
463
  GAData: __assign(__assign({}, GAData), {
480
464
  groupId: item.id,
481
465
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
482
466
  }),
483
467
  readonly: true
484
- }), ((_d = item.text) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
468
+ }), ((_e = item.text) === null || _e === void 0 ? void 0 : _e.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
485
469
  className: "text",
486
- data: __assign(__assign({}, item.text), {
487
- text: ((_e = userWalletData[item.sourceType]) === null || _e === void 0 ? void 0 : _e.text) || 'Make money and shop on Cendol!'
488
- }),
470
+ data: item.text,
489
471
  GAData: __assign(__assign({}, GAData), {
490
472
  groupId: item.id,
491
473
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
492
- }),
493
- readonly: true
474
+ })
494
475
  }), ((_f = item.button) === null || _f === void 0 ? void 0 : _f.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
495
476
  className: "wallet-btn",
496
477
  data: __assign(__assign({}, item.button), {
@@ -553,7 +534,7 @@ function (_super) {
553
534
  style: (0, _commonUtil.pxToRem)({
554
535
  gap: MOBILE_IMG_SIZE[colNum].gap
555
536
  })
556
- }, data.groupSource.map(function (item) {
537
+ }, _groupSource.map(function (item) {
557
538
  return /*#__PURE__*/_react["default"].createElement("div", {
558
539
  key: item.id,
559
540
  className: "item-wrap",
@@ -563,7 +544,7 @@ function (_super) {
563
544
  }, getItemContent(item));
564
545
  })) : /*#__PURE__*/_react["default"].createElement("div", {
565
546
  className: "carousel-layout"
566
- }, data.setting.navigation.open && data.groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
547
+ }, data.setting.navigation.open && _groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
567
548
  className: "carousel-icon-left",
568
549
  onClick: function onClick() {
569
550
  return _this.carouselRef.current.toPrev();
@@ -581,16 +562,16 @@ function (_super) {
581
562
  sliderIndex: index
582
563
  });
583
564
  }
584
- }, data.groupSource.map(function (item, index) {
585
- var preItemFirst = data.groupSource.length > 1 ? data.groupSource[data.groupSource.length - 1] : null;
586
- var preItemLast = data.groupSource.length > 1 ? data.groupSource[0] : null;
587
- var preItem = index === 0 ? preItemFirst : data.groupSource[index - 1];
588
- var nextItem = index === data.groupSource.length - 1 ? preItemLast : data.groupSource[index + 1];
565
+ }, _groupSource.map(function (item, index) {
566
+ var preItemFirst = _groupSource.length > 1 ? _groupSource[_groupSource.length - 1] : null;
567
+ var preItemLast = _groupSource.length > 1 ? _groupSource[0] : null;
568
+ var preItem = index === 0 ? preItemFirst : _groupSource[index - 1];
569
+ var nextItem = index === _groupSource.length - 1 ? preItemLast : _groupSource[index + 1];
589
570
  return /*#__PURE__*/_react["default"].createElement("div", {
590
571
  key: item.id,
591
572
  className: "item-wrap"
592
573
  }, getItemContent(item, preItem, nextItem));
593
- })), data.setting.navigation.open && data.groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
574
+ })), data.setting.navigation.open && _groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
594
575
  className: "carousel-icon-right",
595
576
  onClick: function onClick() {
596
577
  return _this.carouselRef.current.toNext();
@@ -599,9 +580,9 @@ function (_super) {
599
580
  onMouseLeave: this.mouseLeaveBtn,
600
581
  style: navStyle,
601
582
  type: "icon-right"
602
- }), data.setting.dots.open && data.groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement("div", {
583
+ }), data.setting.dots.open && _groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement("div", {
603
584
  className: "swiper-ban"
604
- }, data.groupSource.map(function (item, i) {
585
+ }, _groupSource.map(function (item, i) {
605
586
  return /*#__PURE__*/_react["default"].createElement("div", {
606
587
  key: i,
607
588
  className: (0, _classnames["default"])('ban', {
@@ -121,6 +121,7 @@ function (_super) {
121
121
  onChange: function onChange(v) {
122
122
  panelProps.sourceType = v;
123
123
  panelProps.title.text = v;
124
+ panelProps.title.html = '';
124
125
 
125
126
  _this.selfRender();
126
127
  },
@@ -102,8 +102,7 @@ var Renderer = function Renderer(props) {
102
102
  magic_design: "",
103
103
  style: {
104
104
  height: '100%',
105
- background: pageBackground,
106
- overflow: 'auto'
105
+ background: pageBackground
107
106
  }
108
107
  }, floors.length > 0 && floors.map(function (nodeData, moduleIndex) {
109
108
  var Clazz = _componentTypes.componentMap[nodeData.type];
@@ -6,9 +6,8 @@
6
6
 
7
7
  .cardItem {
8
8
  width: 100%;
9
- height: 218px;
10
9
  border-radius: 10px;
11
- background-color: pink;
10
+ background-color: #fff;
12
11
  position: absolute;
13
12
 
14
13
  &.active {
@@ -244,14 +244,14 @@ function (_super) {
244
244
 
245
245
  _this.getMyWalletData = function () {
246
246
  return __awaiter(_this, void 0, void 0, function () {
247
- var data, _a, userCreditResps, userCashbackValues, userBalance, userPoint, defaultShowWallet, defaultShowIndex_1, bnplObj, creditObj, B2BObj;
247
+ var data, _a, userCreditResps, userCashbackValues, userBalance, userPoint, defaultShowWallet, bnplObj, creditObj, B2BObj;
248
248
 
249
249
  var _b;
250
250
 
251
- var _c;
251
+ var _this = this;
252
252
 
253
- return __generator(this, function (_d) {
254
- switch (_d.label) {
253
+ return __generator(this, function (_c) {
254
+ switch (_c.label) {
255
255
  case 0:
256
256
  data = this.props.data;
257
257
  return [4
@@ -259,86 +259,60 @@ function (_super) {
259
259
  , (0, _commonUtil.commonFetch)('/designer/v1/h5/mywallet/list', {}, 'GET')];
260
260
 
261
261
  case 1:
262
- _a = _d.sent(), userCreditResps = _a.userCreditResps, userCashbackValues = _a.userCashbackValues, userBalance = _a.userBalance, userPoint = _a.userPoint, defaultShowWallet = _a.defaultShowWallet; // const { userCreditResps, userCashbackValues, userBalance, userPoint, defaultShowWallet } = {
263
- // userCreditResps: [
264
- // {
265
- // userCreditId: 1023,
266
- // creditId: 1,
267
- // partyType: null,
268
- // state: 'Pass',
269
- // isUrlExpired: false,
270
- // creditLimit: 150000,
271
- // usageAmount: 100000,
272
- // availableAmount: 1000,
273
- // comments: null,
274
- // userNearestBillDto: null,
275
- // },
276
- // {
277
- // userCreditId: 1026,
278
- // creditId: 2,
279
- // partyType: null,
280
- // state: 'Locked',
281
- // isUrlExpired: false,
282
- // creditLimit: 100000,
283
- // usageAmount: 100000,
284
- // availableAmount: 2000,
285
- // comments: null,
286
- // userNearestBillDto: null,
287
- // },
288
- // {
289
- // userCreditId: 1027,
290
- // creditId: 3,
291
- // partyType: 'I',
292
- // state: 'Pass',
293
- // isUrlExpired: false,
294
- // creditLimit: 100000000,
295
- // usageAmount: 0,
296
- // availableAmount: 3000,
297
- // comments: 'ty',
298
- // userNearestBillDto: null,
299
- // },
300
- // ],
301
- // userCashbackValues: 4000,
302
- // userBalance: 5000,
303
- // userPoint: 6000,
304
- // defaultShowWallet: 'Balance',
305
- // };
306
-
307
- if (data.customize.layout === 'layout2' && this.carouselRef) {
308
- defaultShowIndex_1 = 0;
309
- data.groupSource.forEach(function (f, i) {
310
- if (f.sourceType === defaultShowWallet) defaultShowIndex_1 = i;
311
- });
312
- (_c = this.carouselRef.current) === null || _c === void 0 ? void 0 : _c.slideTo(defaultShowIndex_1);
313
- }
314
-
262
+ _a = _c.sent(), userCreditResps = _a.userCreditResps, userCashbackValues = _a.userCashbackValues, userBalance = _a.userBalance, userPoint = _a.userPoint, defaultShowWallet = _a.defaultShowWallet;
315
263
  bnplObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
316
- return item.creditId === 1 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
264
+ return item.creditId === 1;
317
265
  });
318
266
  creditObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
319
- return item.creditId === 2 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
267
+ return item.creditId === 2;
320
268
  });
321
269
  B2BObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
322
- return item.creditId === 3 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
270
+ return item.creditId === 3;
323
271
  });
324
272
  this.setState({
325
273
  userWalletData: (_b = {}, _b[_constants.walletType.BNPL] = {
326
- amount: userCreditResps === null ? '****' : bnplObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(bnplObj.availableAmount) : 'APPLY'
274
+ amount: userCreditResps === null ? '****' : bnplObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(bnplObj.availableAmount) : 'APPLY',
275
+ show: userCreditResps === null || [_constants.CREDIT_STATE.APPROVED.KEY].includes(bnplObj === null || bnplObj === void 0 ? void 0 : bnplObj.state)
327
276
  }, _b[_constants.walletType.CREDIT] = {
328
- amount: userCreditResps === null ? '****' : creditObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(creditObj.availableAmount) : 'APPLY'
277
+ amount: userCreditResps === null ? '****' : creditObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(creditObj.availableAmount) : 'APPLY',
278
+ show: userCreditResps === null || [_constants.CREDIT_STATE.APPROVED.KEY].includes(creditObj === null || creditObj === void 0 ? void 0 : creditObj.state)
329
279
  }, _b[_constants.walletType.B2B] = {
330
280
  amount: userCreditResps === null ? '****' : B2BObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(B2BObj.availableAmount) : 'APPLY',
331
- text: B2BObj ? 'Add ore products to your shop!' : '',
332
- btnText: 'Procure Product'
281
+ text: B2BObj ? 'Add more products to your shop!' : '',
282
+ btnText: B2BObj ? 'Procure Product' : '',
283
+ show: userCreditResps === null || [_constants.CREDIT_STATE.APPROVED.KEY].includes(B2BObj === null || B2BObj === void 0 ? void 0 : B2BObj.state)
333
284
  }, _b[_constants.walletType.CASHBACK] = {
334
- amount: userCashbackValues === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userCashbackValues)
285
+ amount: userCashbackValues === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userCashbackValues),
286
+ show: true
335
287
  }, _b[_constants.walletType.BALANCE] = {
336
288
  amount: userBalance === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userBalance),
337
- btnText: 'Social Commerce'
289
+ btnText: userBalance ? 'Social Commerce' : '',
290
+ show: true
338
291
  }, _b[_constants.walletType.CENDUIT] = {
339
- amount: userPoint === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userPoint),
340
- btnText: 'Cenduit Mall'
292
+ amount: userPoint === null ? '****' : userPoint,
293
+ btnText: userPoint ? 'Cenduit Mall' : '',
294
+ show: true
341
295
  }, _b)
296
+ }, function () {
297
+ var _a;
298
+
299
+ if (data.customize.layout === 'layout2' && _this.carouselRef) {
300
+ var userWalletData_1 = _this.state.userWalletData;
301
+
302
+ var _groupSource = data.groupSource.filter(function (f) {
303
+ var _a;
304
+
305
+ return (_a = userWalletData_1[f.sourceType]) === null || _a === void 0 ? void 0 : _a.show;
306
+ });
307
+
308
+ var defaultShowIndex_1 = 0;
309
+
310
+ _groupSource.forEach(function (f, i) {
311
+ if (f.sourceType === defaultShowWallet) defaultShowIndex_1 = i;
312
+ });
313
+
314
+ (_a = _this.carouselRef.current) === null || _a === void 0 ? void 0 : _a.slideTo(defaultShowIndex_1);
315
+ }
342
316
  });
343
317
  return [2
344
318
  /*return*/
@@ -428,11 +402,20 @@ function (_super) {
428
402
  var _a, _b, _c, _d, _e, _f, _g, _h;
429
403
 
430
404
  var data = this.props.data;
431
- var sliderIndex = this.state.sliderIndex;
405
+ var _j = this.state,
406
+ sliderIndex = _j.sliderIndex,
407
+ userWalletData = _j.userWalletData;
432
408
  var colNum = data.customize.rowNum;
433
409
  var autoplay = (_b = (_a = data.setting) === null || _a === void 0 ? void 0 : _a.autoplay) === null || _b === void 0 ? void 0 : _b.open;
410
+
411
+ var _groupSource = data.groupSource.filter(function (f) {
412
+ var _a;
413
+
414
+ return (_a = userWalletData[f.sourceType]) === null || _a === void 0 ? void 0 : _a.show;
415
+ });
434
416
  /** 设计器模式下 如果选中特定group 自动播放关闭 */
435
417
 
418
+
436
419
  if ((0, _coreUtil.isDesignMode)() && _mobx.store.clickedGroup) {
437
420
  autoplay = false;
438
421
  }
@@ -461,36 +444,34 @@ function (_super) {
461
444
  }
462
445
  }
463
446
 
447
+ item.text.text = ((_a = userWalletData[item.sourceType]) === null || _a === void 0 ? void 0 : _a.text) || 'Make money and shop on Cendol!';
464
448
  return /*#__PURE__*/_react["default"].createElement("div", {
465
449
  className: "text-content",
466
450
  style: _bgStyle
467
- }, ((_a = item.title) === null || _a === void 0 ? void 0 : _a.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
451
+ }, ((_b = item.title) === null || _b === void 0 ? void 0 : _b.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
468
452
  className: "title",
469
453
  data: item.title,
470
454
  GAData: __assign(__assign({}, GAData), {
471
455
  groupId: item.id,
472
456
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
473
457
  })
474
- }), ((_b = item.amount) === null || _b === void 0 ? void 0 : _b.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
458
+ }), ((_c = item.amount) === null || _c === void 0 ? void 0 : _c.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
475
459
  className: "amount",
476
460
  data: __assign(__assign({}, item.amount), {
477
- text: (_c = userWalletData[item.sourceType]) === null || _c === void 0 ? void 0 : _c.amount
461
+ text: (_d = userWalletData[item.sourceType]) === null || _d === void 0 ? void 0 : _d.amount
478
462
  }),
479
463
  GAData: __assign(__assign({}, GAData), {
480
464
  groupId: item.id,
481
465
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
482
466
  }),
483
467
  readonly: true
484
- }), ((_d = item.text) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
468
+ }), ((_e = item.text) === null || _e === void 0 ? void 0 : _e.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
485
469
  className: "text",
486
- data: __assign(__assign({}, item.text), {
487
- text: ((_e = userWalletData[item.sourceType]) === null || _e === void 0 ? void 0 : _e.text) || 'Make money and shop on Cendol!'
488
- }),
470
+ data: item.text,
489
471
  GAData: __assign(__assign({}, GAData), {
490
472
  groupId: item.id,
491
473
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
492
- }),
493
- readonly: true
474
+ })
494
475
  }), ((_f = item.button) === null || _f === void 0 ? void 0 : _f.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
495
476
  className: "wallet-btn",
496
477
  data: __assign(__assign({}, item.button), {
@@ -553,7 +534,7 @@ function (_super) {
553
534
  style: (0, _commonUtil.pxToRem)({
554
535
  gap: MOBILE_IMG_SIZE[colNum].gap
555
536
  })
556
- }, data.groupSource.map(function (item) {
537
+ }, _groupSource.map(function (item) {
557
538
  return /*#__PURE__*/_react["default"].createElement("div", {
558
539
  key: item.id,
559
540
  className: "item-wrap",
@@ -563,7 +544,7 @@ function (_super) {
563
544
  }, getItemContent(item));
564
545
  })) : /*#__PURE__*/_react["default"].createElement("div", {
565
546
  className: "carousel-layout"
566
- }, data.setting.navigation.open && data.groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
547
+ }, data.setting.navigation.open && _groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
567
548
  className: "carousel-icon-left",
568
549
  onClick: function onClick() {
569
550
  return _this.carouselRef.current.toPrev();
@@ -581,16 +562,16 @@ function (_super) {
581
562
  sliderIndex: index
582
563
  });
583
564
  }
584
- }, data.groupSource.map(function (item, index) {
585
- var preItemFirst = data.groupSource.length > 1 ? data.groupSource[data.groupSource.length - 1] : null;
586
- var preItemLast = data.groupSource.length > 1 ? data.groupSource[0] : null;
587
- var preItem = index === 0 ? preItemFirst : data.groupSource[index - 1];
588
- var nextItem = index === data.groupSource.length - 1 ? preItemLast : data.groupSource[index + 1];
565
+ }, _groupSource.map(function (item, index) {
566
+ var preItemFirst = _groupSource.length > 1 ? _groupSource[_groupSource.length - 1] : null;
567
+ var preItemLast = _groupSource.length > 1 ? _groupSource[0] : null;
568
+ var preItem = index === 0 ? preItemFirst : _groupSource[index - 1];
569
+ var nextItem = index === _groupSource.length - 1 ? preItemLast : _groupSource[index + 1];
589
570
  return /*#__PURE__*/_react["default"].createElement("div", {
590
571
  key: item.id,
591
572
  className: "item-wrap"
592
573
  }, getItemContent(item, preItem, nextItem));
593
- })), data.setting.navigation.open && data.groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
574
+ })), data.setting.navigation.open && _groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
594
575
  className: "carousel-icon-right",
595
576
  onClick: function onClick() {
596
577
  return _this.carouselRef.current.toNext();
@@ -599,9 +580,9 @@ function (_super) {
599
580
  onMouseLeave: this.mouseLeaveBtn,
600
581
  style: navStyle,
601
582
  type: "icon-right"
602
- }), data.setting.dots.open && data.groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement("div", {
583
+ }), data.setting.dots.open && _groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement("div", {
603
584
  className: "swiper-ban"
604
- }, data.groupSource.map(function (item, i) {
585
+ }, _groupSource.map(function (item, i) {
605
586
  return /*#__PURE__*/_react["default"].createElement("div", {
606
587
  key: i,
607
588
  className: (0, _classnames["default"])('ban', {
@@ -121,6 +121,7 @@ function (_super) {
121
121
  onChange: function onChange(v) {
122
122
  panelProps.sourceType = v;
123
123
  panelProps.title.text = v;
124
+ panelProps.title.html = '';
124
125
 
125
126
  _this.selfRender();
126
127
  },
@@ -102,8 +102,7 @@ var Renderer = function Renderer(props) {
102
102
  magic_design: "",
103
103
  style: {
104
104
  height: '100%',
105
- background: pageBackground,
106
- overflow: 'auto'
105
+ background: pageBackground
107
106
  }
108
107
  }, floors.length > 0 && floors.map(function (nodeData, moduleIndex) {
109
108
  var Clazz = _componentTypes.componentMap[nodeData.type];
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.47",
4
+ "version": "2.0.49",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",