@fonixtree/magic-design 2.0.35 → 2.0.37

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 (57) hide show
  1. package/es/assets/fonts/Trueno-Light.otf +0 -0
  2. package/es/assets/fonts/Trueno-Regular.otf +0 -0
  3. package/es/assets/fonts/TruenoBd.otf +0 -0
  4. package/es/assets/images/layout-icon/walletLayout2.png +0 -0
  5. package/es/assets/less/cylon-antd.less +7246 -1686
  6. package/es/assets/less/font.less +22 -0
  7. package/es/composite-comp/bol/components/Wallet/defaultJSON.js +112 -88
  8. package/es/composite-comp/bol/components/Wallet/mobile/index.js +277 -24
  9. package/es/composite-comp/bol/components/Wallet/mobile/index.less +81 -13
  10. package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigImageGroup/index.js +1 -6
  11. package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.js +201 -0
  12. package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.less +9 -0
  13. package/es/composite-comp/bol/config-panels/WalletConfig/index.js +11 -2
  14. package/es/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +50 -81
  15. package/es/composite-comp/bol/second-config-panels/WalletSecondConfig/index.less +2 -0
  16. package/es/composite-comp/common/components/AffiliateProductItem/index.js +8 -6
  17. package/es/composite-comp/common/components/AffiliateProductItem/index.less +8 -0
  18. package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
  19. package/es/composite-comp/common/config-panels/CustomizeConfig/index.less +3 -2
  20. package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +9 -8
  21. package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +5 -2
  22. package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/index.js +1 -1
  23. package/es/constants/layout.js +40 -1
  24. package/es/core/Designer/ConfigPanel/index.js +1 -1
  25. package/es/locale/en/en.json +1 -0
  26. package/es/locale/es/es.json +1 -0
  27. package/es/locale/id/id.json +1 -0
  28. package/es/utils/currencyUtil.js +9 -2
  29. package/lib/assets/fonts/Trueno-Light.otf +0 -0
  30. package/lib/assets/fonts/Trueno-Regular.otf +0 -0
  31. package/lib/assets/fonts/TruenoBd.otf +0 -0
  32. package/lib/assets/images/layout-icon/walletLayout2.png +0 -0
  33. package/lib/assets/less/cylon-antd.less +7246 -1686
  34. package/lib/assets/less/font.less +22 -0
  35. package/lib/composite-comp/bol/components/Wallet/defaultJSON.js +112 -88
  36. package/lib/composite-comp/bol/components/Wallet/mobile/index.js +277 -24
  37. package/lib/composite-comp/bol/components/Wallet/mobile/index.less +81 -13
  38. package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigImageGroup/index.js +1 -6
  39. package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.js +201 -0
  40. package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.less +9 -0
  41. package/lib/composite-comp/bol/config-panels/WalletConfig/index.js +11 -2
  42. package/lib/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +50 -81
  43. package/lib/composite-comp/bol/second-config-panels/WalletSecondConfig/index.less +2 -0
  44. package/lib/composite-comp/common/components/AffiliateProductItem/index.js +8 -6
  45. package/lib/composite-comp/common/components/AffiliateProductItem/index.less +8 -0
  46. package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
  47. package/lib/composite-comp/common/config-panels/CustomizeConfig/index.less +3 -2
  48. package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +9 -8
  49. package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +5 -2
  50. package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/index.js +1 -1
  51. package/lib/constants/layout.js +40 -1
  52. package/lib/core/Designer/ConfigPanel/index.js +1 -1
  53. package/lib/locale/en/en.json +1 -0
  54. package/lib/locale/es/es.json +1 -0
  55. package/lib/locale/id/id.json +1 -0
  56. package/lib/utils/currencyUtil.js +9 -2
  57. package/package.json +1 -1
@@ -45,4 +45,26 @@
45
45
  src: url(../fonts/Montserrat-Bold.ttf);
46
46
  font-weight: 700;
47
47
  font-style: normal;
48
+ }
49
+
50
+ @font-face {
51
+ font-family: 'Trueno';
52
+ src: url('../fonts/Trueno-Light.otf');
53
+ font-weight: 300;
54
+ font-style: normal;
55
+ }
56
+
57
+ @font-face {
58
+ font-family: 'Trueno';
59
+ src: url('../fonts/Trueno-Regular.otf');
60
+ font-weight: 400;
61
+ font-style: normal;
62
+ }
63
+
64
+ @font-face {
65
+ font-family: 'Trueno';
66
+ src: url(../fonts/TruenoBd.otf);
67
+ font-weight: 600;
68
+ font-style: normal;
69
+ font-display: swap;
48
70
  }
@@ -12,39 +12,40 @@ var imagesGroupSourceJSON = function imagesGroupSourceJSON(parentId) {
12
12
  return {
13
13
  id: groupId,
14
14
  parentId: parentId,
15
- image: {
15
+ title: {
16
16
  parentId: groupId,
17
17
  id: (0, _uuid.v4)(),
18
18
  open: true,
19
- type: 'IMAGE',
19
+ type: 'TEXT',
20
+ specialContent: [],
21
+ text: 'Cashback',
20
22
  content: {
21
- h5Name: 'Group Name',
22
- pcName: 'Group Name',
23
- h5ImgSrc: '',
24
- pcImgSrc: '',
25
- clickUrl: ''
23
+ sizeType: 'Customize font styles',
24
+ fontFamily: 'Open Sans',
25
+ fontWeight: 700,
26
+ fontSize: 18,
27
+ color: '#fff',
28
+ textAlign: 'center'
26
29
  },
27
- hover: {
30
+ underline: {
28
31
  open: false,
29
- backgroundType: 'enlarge',
30
- magnification: 1.5,
31
- pcImgHoverUrl: '',
32
- h5ImgHoverUrl: ''
33
- }
32
+ textDecorationColor: '',
33
+ textDecorationStyle: 'solid'
34
+ },
35
+ vertical: {}
34
36
  },
35
- title: {
37
+ amount: {
36
38
  parentId: groupId,
37
39
  id: (0, _uuid.v4)(),
38
40
  open: true,
39
41
  type: 'TEXT',
40
42
  specialContent: [],
41
- text: 'Cashback',
43
+ text: 'RM1000',
42
44
  content: {
43
45
  sizeType: 'Customize font styles',
44
46
  fontFamily: 'Open Sans',
45
- fontWeight: 400,
46
- fontSize: 14,
47
- pcFontSize: 20,
47
+ fontWeight: 700,
48
+ fontSize: 38,
48
49
  color: '#fff',
49
50
  textAlign: 'center'
50
51
  },
@@ -55,19 +56,19 @@ var imagesGroupSourceJSON = function imagesGroupSourceJSON(parentId) {
55
56
  },
56
57
  vertical: {}
57
58
  },
58
- amount: {
59
+ sourceType: 'Cashback',
60
+ text: {
59
61
  parentId: groupId,
60
62
  id: (0, _uuid.v4)(),
61
63
  open: true,
62
64
  type: 'TEXT',
63
65
  specialContent: [],
64
- text: 'RM1000',
66
+ text: 'Make money and shop on Cendol!',
65
67
  content: {
66
68
  sizeType: 'Customize font styles',
67
69
  fontFamily: 'Open Sans',
68
- fontWeight: 700,
69
- fontSize: 18,
70
- pcFontSize: 42,
70
+ fontWeight: 400,
71
+ fontSize: 14,
71
72
  color: '#fff',
72
73
  textAlign: 'center'
73
74
  },
@@ -78,75 +79,75 @@ var imagesGroupSourceJSON = function imagesGroupSourceJSON(parentId) {
78
79
  },
79
80
  vertical: {}
80
81
  },
81
- sourceType: 'Cashback',
82
- hover: {
83
- open: false,
84
- image: {
85
- parentId: groupId,
86
- id: (0, _uuid.v4)(),
87
- open: true,
88
- type: 'IMAGE',
89
- content: {
90
- h5Name: 'Group Name',
91
- pcName: 'Group Name',
92
- h5ImgSrc: '',
93
- pcImgSrc: '',
94
- clickUrl: ''
95
- },
96
- hover: {
97
- open: false,
98
- backgroundType: 'enlarge',
99
- magnification: 1.5,
100
- pcImgHoverUrl: '',
101
- h5ImgHoverUrl: ''
102
- }
82
+ button: {
83
+ parentId: groupId,
84
+ id: (0, _uuid.v4)(),
85
+ open: true,
86
+ type: 'BUTTON',
87
+ text: 'Button',
88
+ content: {
89
+ url: '',
90
+ backgroundColor: '#fff'
103
91
  },
104
- title: {
105
- parentId: groupId,
106
- id: (0, _uuid.v4)(),
107
- open: true,
108
- type: 'TEXT',
109
- specialContent: [],
110
- text: 'Cashback',
111
- content: {
112
- sizeType: 'Customize font styles',
113
- fontFamily: 'Open Sans',
114
- fontWeight: 400,
115
- fontSize: 14,
116
- pcFontSize: 20,
117
- color: '#fff',
118
- textAlign: 'center'
119
- },
120
- underline: {
121
- open: false,
122
- textDecorationColor: '',
123
- textDecorationStyle: 'solid'
124
- },
125
- vertical: {}
92
+ buttonText: {
93
+ sizeType: 'Customize font styles',
94
+ fontFamily: 'Open Sans',
95
+ fontWeight: 700,
96
+ fontSize: 13,
97
+ fontStyle: 'normal',
98
+ color: '#F52D85'
126
99
  },
127
- amount: {
128
- parentId: groupId,
129
- id: (0, _uuid.v4)(),
100
+ buttonBorder: {
130
101
  open: true,
131
- type: 'TEXT',
132
- specialContent: [],
133
- text: 'RM1000',
134
- content: {
135
- sizeType: 'Customize font styles',
136
- fontFamily: 'Open Sans',
137
- fontWeight: 700,
138
- fontSize: 18,
139
- pcFontSize: 42,
140
- color: '#fff',
141
- textAlign: 'center'
142
- },
143
- underline: {
144
- open: false,
145
- textDecorationColor: '',
146
- textDecorationStyle: 'solid'
102
+ borderColor: '',
103
+ borderRadius: 4
104
+ },
105
+ buttonIcon: {
106
+ iconUrl: '',
107
+ layout: 'right'
108
+ },
109
+ spacing: {
110
+ pc: {
111
+ paddingTop: 6,
112
+ paddingBottom: 6,
113
+ paddingLeft: 16,
114
+ paddingRight: 16
147
115
  },
148
- vertical: {}
116
+ mobile: {
117
+ paddingTop: 6,
118
+ paddingBottom: 6,
119
+ paddingLeft: 16,
120
+ paddingRight: 16
121
+ }
149
122
  }
123
+ },
124
+ peek: {
125
+ parentId: groupId,
126
+ id: (0, _uuid.v4)(),
127
+ open: true,
128
+ type: 'TEXT',
129
+ specialContent: [],
130
+ text: '',
131
+ content: {
132
+ sizeType: 'Customize font styles',
133
+ fontFamily: 'Open Sans',
134
+ fontWeight: 400,
135
+ fontSize: 12,
136
+ color: '#fff',
137
+ textAlign: 'center'
138
+ },
139
+ underline: {
140
+ open: false,
141
+ textDecorationColor: '',
142
+ textDecorationStyle: 'solid'
143
+ },
144
+ vertical: {}
145
+ },
146
+ background: {
147
+ opacity: 100,
148
+ color: '#F52D85',
149
+ image: '',
150
+ bgType: 'color'
150
151
  }
151
152
  };
152
153
  };
@@ -185,7 +186,30 @@ var getDefaultJSON = function getDefaultJSON() {
185
186
  }
186
187
  }
187
188
  },
188
- groupSource: [imagesGroupSourceJSON(groupId), imagesGroupSourceJSON(groupId)],
189
+ groupSource: [imagesGroupSourceJSON(groupId)],
190
+ setting: {
191
+ // 自动轮播
192
+ autoplay: {
193
+ open: true,
194
+ interval: 3
195
+ },
196
+ // 切换按钮
197
+ navigation: {
198
+ open: true,
199
+ size: 16,
200
+ hoverSize: 16,
201
+ color: '#eee',
202
+ hoverColor: '#fff'
203
+ },
204
+ // 面板指示点
205
+ dots: {
206
+ open: true,
207
+ color: '#eee',
208
+ hoverColor: '#fff',
209
+ size: 8,
210
+ hoverSize: 8
211
+ }
212
+ },
189
213
  spacing: {
190
214
  pc: {
191
215
  paddingTop: 48,
@@ -7,10 +7,20 @@ exports["default"] = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
+ var _reactSlick = _interopRequireDefault(require("react-slick"));
11
+
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+
10
14
  var _components = require("../../../../../meta-comp/components");
11
15
 
16
+ var _mobx = require("../../../../../mobx");
17
+
18
+ var _coreUtil = require("../../../../../utils/coreUtil");
19
+
12
20
  var _commonUtil = require("../../../../../utils/commonUtil");
13
21
 
22
+ var _Iconfont = _interopRequireDefault(require("../../../../../common/Iconfont"));
23
+
14
24
  var _constants = require("../../../../../constants");
15
25
 
16
26
  var _currencyUtil = require("../../../../../utils/currencyUtil");
@@ -21,6 +31,8 @@ require("./index.less");
21
31
 
22
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
33
 
34
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
35
+
24
36
  var __extends = void 0 && (void 0).__extends || function () {
25
37
  var _extendStatics = function extendStatics(d, b) {
26
38
  _extendStatics = Object.setPrototypeOf || {
@@ -230,8 +242,11 @@ function (_super) {
230
242
  _this.state = {
231
243
  cashback: 0,
232
244
  credit: 0,
233
- bnpl: 0
245
+ bnpl: 0,
246
+ sliderIndex: 0
234
247
  };
248
+ _this.sliderRef = null;
249
+ _this.destroy = null;
235
250
 
236
251
  _this.getMyWalletData = function () {
237
252
  return __awaiter(_this, void 0, void 0, function () {
@@ -275,69 +290,245 @@ function (_super) {
275
290
  if (type === 'BNPL') return bnpl;
276
291
  };
277
292
 
293
+ _this.mouseEnterBtn = function (e) {
294
+ var _a, _b;
295
+
296
+ var data = _this.props.data;
297
+
298
+ if ((_a = data.setting.navigation) === null || _a === void 0 ? void 0 : _a.hoverColor) {
299
+ e.target.style.color = data.setting.navigation.hoverColor;
300
+ }
301
+
302
+ if ((_b = data.setting.navigation) === null || _b === void 0 ? void 0 : _b.hoverSize) {
303
+ e.target.style.fontSize = data.setting.navigation.hoverSize;
304
+ }
305
+ };
306
+
307
+ _this.mouseLeaveBtn = function (e) {
308
+ var _a, _b;
309
+
310
+ var data = _this.props.data;
311
+
312
+ if ((_a = data.setting.navigation) === null || _a === void 0 ? void 0 : _a.color) {
313
+ e.target.style.color = data.setting.navigation.color;
314
+ }
315
+
316
+ if ((_b = data.setting.navigation) === null || _b === void 0 ? void 0 : _b.size) {
317
+ e.target.style.fontSize = data.setting.navigation.size;
318
+ }
319
+ };
320
+
321
+ _this.sliderGoTo = function (groupSource) {
322
+ var nextIndex = groupSource.findIndex(function (item) {
323
+ return item.id === _mobx.store.clickedGroup;
324
+ });
325
+
326
+ if (nextIndex != -1 && nextIndex != _this.state.sliderIndex) {
327
+ _this.sliderRef.slickGoTo(nextIndex);
328
+ }
329
+ };
330
+
278
331
  return _this;
279
332
  }
280
333
 
281
334
  WalletMobile.prototype.componentDidMount = function () {
335
+ var _this = this;
336
+
282
337
  this.getMyWalletData();
338
+ this.destroy = (0, _mobx.autorun)(function () {
339
+ _this.sliderGoTo(_this.props.data.groupSource);
340
+ /** 设计器模式下 如果选中特定group 自动播放关闭 */
341
+
342
+
343
+ if ((0, _coreUtil.isDesignMode)() && _mobx.store.clickedGroup) {
344
+ _this.sliderRef.slickPause();
345
+ }
346
+ });
347
+ };
348
+
349
+ WalletMobile.prototype.componentWillReceiveProps = function (nextProps) {
350
+ if (nextProps.data.customize.layout === 'layout2' && this.sliderRef) {
351
+ this.sliderGoTo(nextProps.data.groupSource);
352
+
353
+ if (nextProps.data.setting.autoplay.open) {
354
+ this.sliderRef.slickPlay();
355
+ } else {
356
+ this.sliderRef.slickPause();
357
+ }
358
+ }
283
359
  };
284
360
 
285
361
  WalletMobile.prototype.render = function () {
286
362
  var _this = this;
287
363
 
288
364
  var data = this.props.data;
365
+ var sliderIndex = this.state.sliderIndex;
289
366
  var GAData = (0, _commonUtil.getGAData)(data);
290
367
  var colNum = data.customize.rowNum;
368
+ var autoplay = data.setting.autoplay.open;
369
+ /** 设计器模式下 如果选中特定group 自动播放关闭 */
370
+
371
+ if ((0, _coreUtil.isDesignMode)() && _mobx.store.clickedGroup) {
372
+ autoplay = false;
373
+ }
374
+
375
+ var settings = {
376
+ className: 'slider-wrap',
377
+ arrows: false,
378
+ dots: false,
379
+ autoplay: autoplay,
380
+ autoplaySpeed: data.setting.autoplay.interval * 1000,
381
+ speed: 500,
382
+ draggable: window.magicDesign.mode === 'renderer',
383
+ slidesToShow: 1,
384
+ slidesToScroll: 1,
385
+ beforeChange: function beforeChange(oldIndex, newIndex) {
386
+ _this.setState({
387
+ sliderIndex: newIndex
388
+ });
389
+ }
390
+ };
391
+ var navStyle = {
392
+ fontSize: (0, _commonUtil.convertToRem)(data.setting.navigation.size),
393
+ color: data.setting.navigation.color
394
+ };
291
395
  return /*#__PURE__*/_react["default"].createElement("div", {
292
396
  className: "m-Wallet-mobile"
293
397
  }, data.title.headline.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
294
398
  className: "headline",
295
399
  data: data.title.headline
296
- }), /*#__PURE__*/_react["default"].createElement("div", {
297
- className: "content column_" + colNum,
400
+ }), data.customize.layout === 'layout1' ? /*#__PURE__*/_react["default"].createElement("div", {
401
+ className: "column-layout column_" + colNum,
298
402
  style: (0, _commonUtil.pxToRem)({
299
403
  gap: MOBILE_IMG_SIZE[colNum].gap
300
404
  })
301
405
  }, data.groupSource.map(function (item) {
302
406
  var _amount = _this.getAmount(item.sourceType);
303
407
 
408
+ var _bgStyle = {};
409
+
410
+ if (item.background) {
411
+ if (item.background.bgType === 'color') {
412
+ _bgStyle.backgroundColor = item.background.color;
413
+ _bgStyle.opacity = item.background.opacity ? item.background.opacity : 1;
414
+ } else {
415
+ _bgStyle.backgroundImage = "url(" + item.background.image + ")";
416
+ _bgStyle.backgroundPosition = 'center';
417
+ _bgStyle.backgroundSize = 'cover';
418
+ }
419
+ }
420
+
304
421
  return /*#__PURE__*/_react["default"].createElement("div", {
305
422
  key: item.id,
306
423
  className: "item-wrap",
307
- onMouseEnter: function onMouseEnter() {
308
- var _a;
309
-
310
- return _this.setState((_a = {}, _a["hover_" + item.id] = true, _a));
311
- },
312
- onMouseLeave: function onMouseLeave() {
313
- var _a;
314
-
315
- return _this.setState((_a = {}, _a["hover_" + item.id] = false, _a));
316
- },
317
424
  style: (0, _commonUtil.pxToRem)({
318
425
  width: "calc((100% - " + (0, _commonUtil.convertToRem)(MOBILE_IMG_SIZE[colNum].gap * (colNum - 1)) + ") / " + colNum + ")"
319
426
  })
320
- }, item.image.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
321
- className: "image",
322
- data: item.hover.open && item.hover.image.open && _this.state["hover_" + item.id] ? item.hover.image : item.image,
427
+ }, /*#__PURE__*/_react["default"].createElement("div", {
428
+ className: "text-content",
429
+ style: _bgStyle
430
+ }, item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
431
+ className: "title",
432
+ data: item.title,
323
433
  GAData: __assign(__assign({}, GAData), {
324
434
  groupId: item.id,
325
435
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
326
- }) // maxHeight={MOBILE_IMG_SIZE[colNum].maxH}
327
- ,
328
- maxWidth: "100%"
329
- }), /*#__PURE__*/_react["default"].createElement("div", {
330
- className: "text-content"
436
+ })
437
+ }), item.amount.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
438
+ className: "amount",
439
+ data: __assign(__assign({}, item.amount), {
440
+ text: _amount
441
+ }),
442
+ GAData: __assign(__assign({}, GAData), {
443
+ groupId: item.id,
444
+ groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
445
+ }),
446
+ readonly: true
447
+ }), item.text.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
448
+ className: "text",
449
+ data: item.text,
450
+ GAData: __assign(__assign({}, GAData), {
451
+ groupId: item.id,
452
+ groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
453
+ }),
454
+ readonly: true
455
+ }), item.button.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
456
+ className: "wallet-btn",
457
+ data: __assign(__assign({}, item.button), {
458
+ text: 'Lets Go!'
459
+ }),
460
+ GAData: __assign(__assign({}, GAData), {
461
+ groupId: item.id,
462
+ groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
463
+ })
464
+ }), item.peek.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
465
+ className: "peek left",
466
+ data: __assign(__assign({}, item.peek), {
467
+ text: 'B2B 30,000'
468
+ }),
469
+ GAData: __assign(__assign({}, GAData), {
470
+ groupId: item.id,
471
+ groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
472
+ }),
473
+ readonly: true
474
+ }), item.peek.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
475
+ className: "peek right",
476
+ data: __assign(__assign({}, item.peek), {
477
+ text: 'Cenduit 30,000'
478
+ }),
479
+ GAData: __assign(__assign({}, GAData), {
480
+ groupId: item.id,
481
+ groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
482
+ }),
483
+ readonly: true
484
+ })));
485
+ })) : /*#__PURE__*/_react["default"].createElement("div", {
486
+ className: "carousel-layout"
487
+ }, data.setting.navigation.open && data.groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
488
+ className: "carousel-icon-left",
489
+ onClick: function onClick() {
490
+ return _this.sliderRef.slickPrev();
491
+ },
492
+ onMouseEnter: this.mouseEnterBtn,
493
+ onMouseLeave: this.mouseLeaveBtn,
494
+ style: navStyle,
495
+ type: "icon-left"
496
+ }), /*#__PURE__*/_react["default"].createElement(_reactSlick["default"], _extends({
497
+ ref: function ref(slider) {
498
+ return _this.sliderRef = slider;
499
+ }
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
+
516
+ return /*#__PURE__*/_react["default"].createElement("div", {
517
+ key: item.id,
518
+ className: "item-wrap"
519
+ }, /*#__PURE__*/_react["default"].createElement("div", {
520
+ className: "text-content",
521
+ style: _bgStyle
331
522
  }, item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
332
523
  className: "title",
333
- data: item.hover.open && item.hover.title.open && _this.state["hover_" + item.id] ? item.hover.title : item.title,
524
+ data: item.title,
334
525
  GAData: __assign(__assign({}, GAData), {
335
526
  groupId: item.id,
336
527
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
337
528
  })
338
529
  }), item.amount.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
339
530
  className: "amount",
340
- data: __assign(__assign({}, item.hover.open && item.hover.amount.open && _this.state["hover_" + item.id] ? item.hover.amount : item.amount), {
531
+ data: __assign(__assign({}, item.amount), {
341
532
  text: _amount
342
533
  }),
343
534
  GAData: __assign(__assign({}, GAData), {
@@ -345,8 +536,70 @@ function (_super) {
345
536
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
346
537
  }),
347
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
348
576
  })));
349
- })));
577
+ })), data.setting.navigation.open && data.groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
578
+ className: "carousel-icon-right",
579
+ onClick: function onClick() {
580
+ return _this.sliderRef.slickNext();
581
+ },
582
+ onMouseEnter: this.mouseEnterBtn,
583
+ onMouseLeave: this.mouseLeaveBtn,
584
+ style: navStyle,
585
+ type: "icon-right"
586
+ }), data.setting.dots.open && data.groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement("div", {
587
+ className: "swiper-ban"
588
+ }, data.groupSource.map(function (item, i) {
589
+ return /*#__PURE__*/_react["default"].createElement("div", {
590
+ key: i,
591
+ className: (0, _classnames["default"])('ban', {
592
+ active: i == sliderIndex
593
+ }),
594
+ onClick: function onClick() {
595
+ return _this.sliderRef.slickGoTo(i);
596
+ },
597
+ style: (0, _commonUtil.pxToRem)({
598
+ backgroundColor: i == sliderIndex ? data.setting.dots.hoverColor : data.setting.dots.color,
599
+ fontSize: i == sliderIndex ? data.setting.dots.hoverSize : data.setting.dots.size
600
+ })
601
+ });
602
+ }))));
350
603
  };
351
604
 
352
605
  WalletMobile.defaultProps = {