@fonixtree/magic-design 2.0.84 → 2.0.86

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 (65) hide show
  1. package/es/common/CountDown/index.js +20 -11
  2. package/es/common/CropperModal/index.js +126 -0
  3. package/es/common/CropperModal/index.less +29 -0
  4. package/es/common/GroupList/index.js +2 -0
  5. package/es/common/LinkModal/AffiliateStore/index.js +332 -0
  6. package/es/common/LinkModal/index.js +6 -0
  7. package/es/common/UrlPicker/index.js +1 -10
  8. package/es/common/index.js +8 -0
  9. package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +8 -4
  10. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +6 -4
  11. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +2 -2
  12. package/es/composite-comp/dito/components/Orders/defaultJSON.js +2 -2
  13. package/es/composite-comp/dito/components/Orders/mobile/index.js +17 -8
  14. package/es/composite-comp/dito/components/Orders/mobile/index.less +2 -6
  15. package/es/composite-comp/dito/components/PersonalInformation/defaultJSON.js +1 -1
  16. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +147 -11
  17. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +26 -20
  18. package/es/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +4 -1
  19. package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +1 -2
  20. package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +4 -4
  21. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +2 -2
  22. package/es/constants/index.js +3 -3
  23. package/es/core/Designer/ToolBarModal/index.js +5 -1
  24. package/es/core/Renderer/index.js +3 -1
  25. package/es/decorator/compositeDecorator.js +9 -5
  26. package/es/locale/en/en.json +5 -5
  27. package/es/locale/es/es.json +5 -5
  28. package/es/locale/id/id.json +5 -5
  29. package/es/meta-comp/config-panels/TextConfig/index.js +1 -1
  30. package/es/utils/commonUtil.js +12 -5
  31. package/es/utils/coreUtil.js +3 -2
  32. package/lib/common/CountDown/index.js +20 -11
  33. package/lib/common/CropperModal/index.js +126 -0
  34. package/lib/common/CropperModal/index.less +29 -0
  35. package/lib/common/GroupList/index.js +2 -0
  36. package/lib/common/LinkModal/AffiliateStore/index.js +332 -0
  37. package/lib/common/LinkModal/index.js +6 -0
  38. package/lib/common/UrlPicker/index.js +1 -10
  39. package/lib/common/index.js +8 -0
  40. package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +8 -4
  41. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +6 -4
  42. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +2 -2
  43. package/lib/composite-comp/dito/components/Orders/defaultJSON.js +2 -2
  44. package/lib/composite-comp/dito/components/Orders/mobile/index.js +17 -8
  45. package/lib/composite-comp/dito/components/Orders/mobile/index.less +2 -6
  46. package/lib/composite-comp/dito/components/PersonalInformation/defaultJSON.js +1 -1
  47. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +147 -11
  48. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +26 -20
  49. package/lib/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +4 -1
  50. package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +1 -2
  51. package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +4 -4
  52. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +2 -2
  53. package/lib/constants/index.js +3 -3
  54. package/lib/core/Designer/ToolBarModal/index.js +5 -1
  55. package/lib/core/Renderer/index.js +3 -1
  56. package/lib/decorator/compositeDecorator.js +9 -5
  57. package/lib/locale/en/en.json +5 -5
  58. package/lib/locale/es/es.json +5 -5
  59. package/lib/locale/id/id.json +5 -5
  60. package/lib/meta-comp/config-panels/TextConfig/index.js +1 -1
  61. package/lib/utils/commonUtil.js +12 -5
  62. package/lib/utils/coreUtil.js +3 -2
  63. package/package.json +2 -1
  64. package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -1
  65. package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -1
@@ -210,13 +210,13 @@ var orderData = {
210
210
  key: 'toReceiveNum',
211
211
  route: '/main/order/3'
212
212
  },
213
- Rating: {
213
+ Done: {
214
214
  key: 'toRatingNum',
215
- route: '/rating-list'
215
+ route: '/main/order/4'
216
216
  },
217
- Return: {
217
+ Cancelled: {
218
218
  key: 'returnsNum',
219
- route: '/aftersale-list'
219
+ route: '/main/order/5'
220
220
  }
221
221
  };
222
222
  exports.orderData = orderData;
@@ -234,8 +234,13 @@ function (_super) {
234
234
  };
235
235
 
236
236
  _this.onItemClick = function (v) {
237
- var url = orderData[v].route;
238
- (0, _commonUtil.navigateTo)(url);
237
+ var _a;
238
+
239
+ var routeUrl = (_a = orderData[v]) === null || _a === void 0 ? void 0 : _a.route;
240
+ var selfUrl = (0, _commonUtil.ensure)(function () {
241
+ return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
242
+ }, '');
243
+ (0, _commonUtil.navigateTo)(routeUrl || selfUrl);
239
244
  };
240
245
 
241
246
  _this.getInit = function () {
@@ -266,7 +271,9 @@ function (_super) {
266
271
 
267
272
  _this.getImageHtml = function (item) {
268
273
  var orderStatus = _this.state.orderStatus;
269
- var num = orderStatus[orderData[item.sourceType].key];
274
+ var num = (0, _commonUtil.ensure)(function () {
275
+ return orderStatus[orderData[item.sourceType].key];
276
+ }, '');
270
277
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
271
278
  data: item.image,
272
279
  maxWidth: "100%"
@@ -321,7 +328,9 @@ function (_super) {
321
328
  }, item.image.open && _this.getImageHtml(item)), item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
322
329
  className: "title",
323
330
  data: item.title,
324
- readonly: true
331
+ onTextInput: function onTextInput(text) {
332
+ item.title.text = text;
333
+ }
325
334
  }));
326
335
  }))));
327
336
  };
@@ -1,5 +1,5 @@
1
1
  .orders-mobile {
2
- height: 1.4rem;
2
+ padding: 0 0.32rem;
3
3
  }
4
4
  .orders-mobile .fixed-wrap {
5
5
  display: flex;
@@ -8,11 +8,6 @@
8
8
  box-shadow: 0 0.06rem 0.12rem rgba(0, 0, 0, 0.16);
9
9
  border-radius: 0.32rem;
10
10
  width: auto;
11
- position: absolute;
12
- z-index: 3;
13
- left: 0.32rem;
14
- right: 0.32rem;
15
- top: -1.4rem;
16
11
  padding: 0.32rem;
17
12
  }
18
13
  .orders-mobile .fixed-wrap .top {
@@ -44,6 +39,7 @@
44
39
  display: flex;
45
40
  flex-direction: row;
46
41
  justify-content: space-between;
42
+ height: 1.32rem;
47
43
  margin-top: 0.48rem;
48
44
  margin-bottom: 0.02rem;
49
45
  }
@@ -70,7 +70,7 @@ var getDefaultJSON = function getDefaultJSON() {
70
70
  login: {
71
71
  open: true
72
72
  },
73
- groupSource: [PersonalInfoGroupSourceJSON('Wishlist'), PersonalInfoGroupSourceJSON('Stores'), PersonalInfoGroupSourceJSON('Coupons'), PersonalInfoGroupSourceJSON('Recently Viewed')],
73
+ groupSource: [PersonalInfoGroupSourceJSON('Wishlist'), PersonalInfoGroupSourceJSON('Stores'), PersonalInfoGroupSourceJSON('Vouchers'), PersonalInfoGroupSourceJSON('Recently Viewed')],
74
74
  spacing: {
75
75
  pc: {
76
76
  paddingTop: 0,
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.setAccountPageValue = exports["default"] = void 0;
6
+ exports.setAccountPageValue = exports.pInfoData = exports["default"] = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -29,6 +29,8 @@ var _index = require("../../../../../constants/index");
29
29
 
30
30
  var _storeUtil = require("../../../../../utils/storeUtil");
31
31
 
32
+ var _common = require("../../../../../common");
33
+
32
34
  require("./index.less");
33
35
 
34
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -218,7 +220,23 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
218
220
  }
219
221
  };
220
222
 
223
+ var pInfoData = {
224
+ Wishlist: {
225
+ route: '/favourite/list'
226
+ },
227
+ Stores: {
228
+ route: '/collect-store'
229
+ },
230
+ Vouchers: {
231
+ route: '/my-coupon'
232
+ },
233
+ 'Recently Viewed': {
234
+ route: '/review-list'
235
+ }
236
+ };
237
+ exports.pInfoData = pInfoData;
221
238
  var LPObj = (0, _storeUtil.getSessionStore)('channelPurchase') || {};
239
+ var currentUser = JSON.parse(localStorage.getItem('currentUser')) || {};
222
240
 
223
241
  var setAccountPageValue = function setAccountPageValue(obj) {
224
242
  var accountPageValue = JSON.parse(localStorage.getItem('accountPageValue'));
@@ -237,7 +255,10 @@ function (_super) {
237
255
 
238
256
  _this.state = {
239
257
  messageNum: '',
240
- userInfo: {}
258
+ userInfo: currentUser,
259
+ loading: false,
260
+ selectedImgFile: {},
261
+ editImgModalVisible: false
241
262
  };
242
263
 
243
264
  _this.getNum = function (v) {
@@ -247,7 +268,7 @@ function (_super) {
247
268
  return userInfo.userCollectionNum || 0;
248
269
  } else if (v === _index.personalInfoType.STORES) {
249
270
  return userInfo.userCollectionStoreNum || 0;
250
- } else if (v === _index.personalInfoType.COUPONS) {
271
+ } else if (v === _index.personalInfoType.VOUCHERS) {
251
272
  return userInfo.couponNum || 0;
252
273
  } else if (v === _index.personalInfoType.VIEWED) {
253
274
  return userInfo.recentViewNum || 0;
@@ -264,8 +285,12 @@ function (_super) {
264
285
  return;
265
286
  }
266
287
 
267
- setSelectedImgFile(file);
268
- setEditImgModalVisible(true);
288
+ _this.hideBottomBar();
289
+
290
+ _this.setState({
291
+ editImgModalVisible: true,
292
+ selectedImgFile: file
293
+ });
269
294
  }
270
295
 
271
296
  e.target.value = '';
@@ -292,7 +317,7 @@ function (_super) {
292
317
  };
293
318
 
294
319
  _this.goLoginPage = function () {
295
- if (browserVersion().isApp) {
320
+ if ((0, _androidUtil.browserVersion)().isApp) {
296
321
  (0, _androidUtil.goToLoginApp)();
297
322
  } else {
298
323
  (0, _commonUtil.goLogin)();
@@ -349,6 +374,101 @@ function (_super) {
349
374
  });
350
375
  };
351
376
 
377
+ _this.modifyPhoto = function (params) {
378
+ return __awaiter(_this, void 0, void 0, function () {
379
+ return __generator(this, function (_a) {
380
+ switch (_a.label) {
381
+ case 0:
382
+ return [4
383
+ /*yield*/
384
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/users/modify', params, 'POST')];
385
+
386
+ case 1:
387
+ _a.sent();
388
+
389
+ this.showBottomBar();
390
+ this.setState(function (preState, props) {
391
+ return {
392
+ userInfo: __assign(__assign({}, preState.userInfo), {
393
+ photo: params.photo
394
+ }),
395
+ loading: false,
396
+ editImgModalVisible: false
397
+ };
398
+ });
399
+ return [2
400
+ /*return*/
401
+ ];
402
+ }
403
+ });
404
+ });
405
+ };
406
+
407
+ _this.hideBottomBar = function () {
408
+ var homeNavBar = document.querySelector('.home-navigation');
409
+ console.log('homeNavBar', homeNavBar);
410
+ if (homeNavBar) homeNavBar.style.visibility = 'hidden';
411
+ };
412
+
413
+ _this.showBottomBar = function () {
414
+ var homeNavBar = document.querySelector('.home-navigation');
415
+ if (homeNavBar) homeNavBar.style.visibility = 'visible';
416
+ };
417
+
418
+ _this.onUploadImg = function (formData) {
419
+ if (_this.state.loading) return;
420
+
421
+ _this.setState({
422
+ loading: true
423
+ });
424
+
425
+ fetch('/designer/v1/h5/image', {
426
+ method: 'POST',
427
+ body: formData
428
+ }).then(function (response) {
429
+ return response.json();
430
+ }).then(function (responseData) {
431
+ var _a;
432
+
433
+ if (((_a = responseData === null || responseData === void 0 ? void 0 : responseData.fileUrl) === null || _a === void 0 ? void 0 : _a.length) > 120) {
434
+ _antd.message.toast({
435
+ type: 'error',
436
+ message: (0, _locale.i18n)('IMAGE_NAME_IS_TOO_LONG'),
437
+ duration: 3000
438
+ });
439
+
440
+ return;
441
+ }
442
+
443
+ _this.modifyPhoto({
444
+ photo: responseData.fileUrl
445
+ });
446
+ })["catch"](function (err) {
447
+ _antd.message.toast({
448
+ type: 'error',
449
+ message: err === null || err === void 0 ? void 0 : err.data,
450
+ duration: 5000
451
+ });
452
+
453
+ _this.showBottomBar();
454
+
455
+ _this.setState({
456
+ editImgModalVisible: false,
457
+ loading: false
458
+ });
459
+ });
460
+ };
461
+
462
+ _this.onItemClick = function (v) {
463
+ var _a;
464
+
465
+ var routeUrl = (_a = pInfoData[v]) === null || _a === void 0 ? void 0 : _a.route;
466
+ var selfUrl = (0, _commonUtil.ensure)(function () {
467
+ return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
468
+ }, '');
469
+ (0, _commonUtil.navigateTo)(routeUrl || selfUrl);
470
+ };
471
+
352
472
  return _this;
353
473
  }
354
474
 
@@ -366,7 +486,9 @@ function (_super) {
366
486
  var data = this.props.data;
367
487
  var _a = this.state,
368
488
  messageNum = _a.messageNum,
369
- userInfo = _a.userInfo;
489
+ userInfo = _a.userInfo,
490
+ editImgModalVisible = _a.editImgModalVisible,
491
+ selectedImgFile = _a.selectedImgFile;
370
492
  return /*#__PURE__*/_react["default"].createElement("div", {
371
493
  className: (0, _classnames["default"])('personal-information-mobile')
372
494
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -386,7 +508,6 @@ function (_super) {
386
508
  }
387
509
  }), /*#__PURE__*/_react["default"].createElement("input", {
388
510
  accept: "image/*",
389
- disabled: !(0, _lodash.isEmpty)(LPObj),
390
511
  id: "userPhoto",
391
512
  onChange: this.handleFileChange,
392
513
  type: "file"
@@ -395,7 +516,9 @@ function (_super) {
395
516
  }, /*#__PURE__*/_react["default"].createElement("p", {
396
517
  className: "name",
397
518
  onClick: this.clickName
398
- }, userInfo.firstName || userInfo.nickName))) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
519
+ }, userInfo.firstName || userInfo.nickName), /*#__PURE__*/_react["default"].createElement("p", {
520
+ className: "phone"
521
+ }, userInfo.mobilePhone))) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
399
522
  className: "photo"
400
523
  }, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
401
524
  color: "#fff",
@@ -424,7 +547,10 @@ function (_super) {
424
547
  className: "bottom"
425
548
  }, data.groupSource.map(function (item) {
426
549
  return /*#__PURE__*/_react["default"].createElement("div", {
427
- className: "item"
550
+ className: "item",
551
+ onClick: function onClick() {
552
+ return _this.onItemClick(item.sourceType);
553
+ }
428
554
  }, item.number.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
429
555
  className: "number",
430
556
  data: __assign(__assign({}, item.number), {
@@ -438,7 +564,17 @@ function (_super) {
438
564
  item.title.text = text;
439
565
  }
440
566
  }));
441
- })));
567
+ })), editImgModalVisible && /*#__PURE__*/_react["default"].createElement(_common.CropperModal, {
568
+ onClose: function onClose() {
569
+ _this.setState({
570
+ editImgModalVisible: false
571
+ });
572
+
573
+ _this.showBottomBar();
574
+ },
575
+ onSubmit: this.onUploadImg,
576
+ uploadedImageFile: selectedImgFile
577
+ }));
442
578
  };
443
579
 
444
580
  PersonalInfoMobile.defaultProps = {
@@ -1,38 +1,42 @@
1
1
  .personal-information-mobile {
2
- height: 4.6rem;
2
+ height: 3.24rem;
3
3
  padding: 0.32rem;
4
4
  box-sizing: border-box;
5
5
  }
6
- .top {
6
+ .personal-information-mobile .top {
7
7
  display: flex;
8
8
  justify-content: space-between;
9
- align-items: start;
9
+ align-items: flex-start;
10
10
  }
11
- .top .pInfoWrap {
11
+ .personal-information-mobile .top .pInfoWrap {
12
12
  display: flex;
13
13
  align-items: center;
14
14
  }
15
- .top .pInfoWrap .photoWrap {
15
+ .personal-information-mobile .top .pInfoWrap .photoWrap {
16
16
  position: relative;
17
17
  display: inline-block;
18
18
  vertical-align: middle;
19
+ margin-right: 0.3rem;
20
+ height: 0.88rem;
21
+ width: 0.88rem;
19
22
  }
20
- .top .pInfoWrap .photoWrap > input {
23
+ .personal-information-mobile .top .pInfoWrap .photoWrap > input {
21
24
  position: absolute;
25
+ z-index: 1;
22
26
  top: 0;
23
27
  left: 0;
24
28
  width: 100%;
25
29
  height: 100%;
26
30
  opacity: 0;
27
31
  }
28
- .top .pInfoWrap .userInfo {
32
+ .personal-information-mobile .top .pInfoWrap .userInfo {
29
33
  display: inline-block;
30
34
  vertical-align: middle;
31
35
  }
32
- .top .pInfoWrap .userInfo p {
36
+ .personal-information-mobile .top .pInfoWrap .userInfo p {
33
37
  margin: 0;
34
38
  }
35
- .top .pInfoWrap .userInfo .name {
39
+ .personal-information-mobile .top .pInfoWrap .userInfo .name {
36
40
  font-size: 0.28rem;
37
41
  font-weight: 500;
38
42
  color: #ffffff;
@@ -42,13 +46,13 @@
42
46
  overflow: hidden;
43
47
  word-break: break-all;
44
48
  }
45
- .top .pInfoWrap .userInfo .phone {
49
+ .personal-information-mobile .top .pInfoWrap .userInfo .phone {
46
50
  font-size: 0.28rem;
47
51
  font-weight: 400;
48
52
  color: #ffffff;
49
53
  margin-top: 0.1rem;
50
54
  }
51
- .top .pInfoWrap .photo {
55
+ .personal-information-mobile .top .pInfoWrap .photo {
52
56
  display: inline-block;
53
57
  width: 0.88rem;
54
58
  height: 0.88rem;
@@ -58,18 +62,18 @@
58
62
  margin-right: 0.3rem;
59
63
  border-radius: 50%;
60
64
  }
61
- .top .pInfoWrap .btnLogin {
65
+ .personal-information-mobile .top .pInfoWrap .btnLogin {
62
66
  font-size: 0.28rem;
63
67
  font-weight: 400;
64
68
  color: #ffffff;
65
69
  font-family: Montserrat;
66
70
  }
67
- .top .btnGroup .iconWrap {
71
+ .personal-information-mobile .top .btnGroup .iconWrap {
68
72
  display: inline-block;
69
73
  margin-left: 0.3rem;
70
74
  position: relative;
71
75
  }
72
- .top .btnGroup .num {
76
+ .personal-information-mobile .top .btnGroup .num {
73
77
  position: absolute;
74
78
  top: -0.04rem;
75
79
  left: 0.28rem;
@@ -84,14 +88,14 @@
84
88
  font-size: 0.12rem;
85
89
  color: #ffffff;
86
90
  }
87
- .bottom {
91
+ .personal-information-mobile .bottom {
88
92
  display: flex;
89
93
  flex-direction: row;
90
94
  justify-content: space-around;
91
95
  width: 100%;
92
96
  margin-top: 0.48rem;
93
97
  }
94
- .bottom .item {
98
+ .personal-information-mobile .bottom .item {
95
99
  display: flex;
96
100
  flex-direction: column;
97
101
  justify-content: flex-start;
@@ -99,7 +103,7 @@
99
103
  flex: 1;
100
104
  position: relative;
101
105
  }
102
- .bottom .item:after {
106
+ .personal-information-mobile .bottom .item:after {
103
107
  content: '';
104
108
  display: inline-block;
105
109
  width: 0.02rem;
@@ -109,16 +113,18 @@
109
113
  top: 0.12rem;
110
114
  background: #ccc;
111
115
  }
112
- .bottom .item:last-child:after {
116
+ .personal-information-mobile .bottom .item:last-child:after {
113
117
  display: none;
114
118
  }
115
- .bottom .item .number {
119
+ .personal-information-mobile .bottom .item .number {
120
+ width: 70% !important;
116
121
  font-size: 0.36rem;
117
122
  font-weight: 600;
118
123
  color: #ffffff;
119
124
  text-align: center;
120
125
  }
121
- .bottom .item .title {
126
+ .personal-information-mobile .bottom .item .title {
127
+ width: 70% !important;
122
128
  font-size: 0.24rem;
123
129
  font-weight: 400;
124
130
  color: #ffffff;
@@ -97,7 +97,9 @@ function (_super) {
97
97
  }
98
98
 
99
99
  ImageTextConfigGroup.prototype.render = function () {
100
- var source = this.props.source;
100
+ var _a = this.props,
101
+ source = _a.source,
102
+ maxNum = _a.maxNum;
101
103
  return /*#__PURE__*/_react["default"].createElement("div", {
102
104
  className: "banner_group"
103
105
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -111,6 +113,7 @@ function (_super) {
111
113
  })), /*#__PURE__*/_react["default"].createElement("div", {
112
114
  className: "btn_wrap"
113
115
  }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
116
+ disabled: source.length >= maxNum,
114
117
  icon: "icon-add",
115
118
  onClick: this.onAddClick,
116
119
  type: "primary"
@@ -17,8 +17,6 @@ var _coreUtil = require("../../../../utils/coreUtil");
17
17
 
18
18
  var _locale = require("../../../../locale");
19
19
 
20
- require("./index.less");
21
-
22
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
21
 
24
22
  var __extends = void 0 && (void 0).__extends || function () {
@@ -47,6 +45,7 @@ var __extends = void 0 && (void 0).__extends || function () {
47
45
  };
48
46
  }();
49
47
 
48
+ // import './index.less';
50
49
  var CommonFunctionsSecondConfig =
51
50
  /** @class */
52
51
  function (_super) {
@@ -114,10 +114,10 @@ function (_super) {
114
114
  }, (0, _locale.i18n)('TO_SHIP')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
115
115
  value: _index.orderStatusType.RECEIVE
116
116
  }, (0, _locale.i18n)('TO_RECEIVE')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
117
- value: _index.orderStatusType.RATING
118
- }, (0, _locale.i18n)('RATING')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
119
- value: _index.orderStatusType.RETURN
120
- }, (0, _locale.i18n)('RETURN'))))));
117
+ value: _index.orderStatusType.DONE
118
+ }, (0, _locale.i18n)('DONE')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
119
+ value: _index.orderStatusType.CANCELLED
120
+ }, (0, _locale.i18n)('CANCELLED'))))));
121
121
  };
122
122
 
123
123
  return _this;
@@ -109,8 +109,8 @@ function (_super) {
109
109
  }, (0, _locale.i18n)('WISHLIST')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
110
110
  value: _index.personalInfoType.STORES
111
111
  }, (0, _locale.i18n)('STORES')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
112
- value: _index.personalInfoType.COUPONS
113
- }, (0, _locale.i18n)('COUPONS')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
112
+ value: _index.personalInfoType.VOUCHERS
113
+ }, (0, _locale.i18n)('VOUCHERS')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
114
114
  value: _index.personalInfoType.VIEWED
115
115
  }, (0, _locale.i18n)('RECENTLY_VIEWED'))))));
116
116
  };
@@ -49,14 +49,14 @@ var orderStatusType = {
49
49
  PAY: 'To Pay',
50
50
  SHIP: 'To Ship',
51
51
  RECEIVE: 'To Receive',
52
- RATING: 'Rating',
53
- RETURN: 'Return'
52
+ DONE: 'Done',
53
+ CANCELLED: 'Cancelled'
54
54
  };
55
55
  exports.orderStatusType = orderStatusType;
56
56
  var personalInfoType = {
57
57
  WISHLIST: 'Wishlist',
58
58
  STORES: 'Stores',
59
- COUPONS: 'Coupons',
59
+ VOUCHERS: 'Vouchers',
60
60
  VIEWED: 'Recently Viewed'
61
61
  };
62
62
  exports.personalInfoType = personalInfoType;
@@ -153,7 +153,11 @@ function (_super) {
153
153
 
154
154
  _this.props.quillRef.format('list', currentListType == 'bullet' ? '' : 'bullet');
155
155
  } else if (type == 'link') {
156
- _this.props.quillRef.format('link', JSON.stringify(value));
156
+ if (window.magicDesign.outputType === 'html') {
157
+ _this.props.quillRef.format('link', value.name);
158
+ } else {
159
+ _this.props.quillRef.format('link', JSON.stringify(value));
160
+ }
157
161
  } else if (type == 'size') {
158
162
  _this.props.quillRef.format('size', value + 'px');
159
163
  } else if (type == 'font') {
@@ -137,7 +137,9 @@ var Renderer = function Renderer(props) {
137
137
  };
138
138
  }
139
139
 
140
- return {};
140
+ return {
141
+ overflow: 'auto'
142
+ };
141
143
  };
142
144
 
143
145
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -87,7 +87,11 @@ function compositeDecorator(WrappedComponent) {
87
87
  }; // 复合组件点击事件
88
88
 
89
89
  _this.onCompositeCompClick = function (event) {
90
- // 触发左侧楼层的滚动
90
+ if (window.magicDesign.mode === 'renderer') {
91
+ return;
92
+ } // 触发左侧楼层的滚动
93
+
94
+
91
95
  if (document.getElementById("card" + _this.props.nodeData.id)) {
92
96
  document.getElementById("card" + _this.props.nodeData.id).scrollIntoView({
93
97
  behavior: 'smooth'
@@ -115,19 +119,20 @@ function compositeDecorator(WrappedComponent) {
115
119
  device = _b.device,
116
120
  compWidth = _b.compWidth;
117
121
  var zIndex = '0';
122
+ var position = 'relative';
118
123
 
119
124
  if (nodeData.type === 'CAROUSEL' || nodeData.type === 'IMAGE_GALLERY' || nodeData.type === 'ORDERS') {
120
125
  zIndex = '1';
121
126
  } // 解决pc导航hover上去,类目被下面组件遮罩的问题
122
127
 
123
128
 
124
- if (nodeData.type === 'PC_NAVIGATION') {
129
+ if (nodeData.type === 'PC_NAVIGATION' || nodeData.type === 'PERSONAL_INFOMATION') {
125
130
  zIndex = '2';
126
131
  }
127
132
 
128
133
  var wrapStyle = {
129
134
  border: 'none',
130
- position: 'relative',
135
+ position: position,
131
136
  zIndex: zIndex,
132
137
  margin: '0 auto'
133
138
  }; // 复合组件内边距
@@ -205,8 +210,7 @@ function compositeDecorator(WrappedComponent) {
205
210
  };
206
211
 
207
212
  _this.getWrapStyle = function () {
208
- var mode = window.magicDesign.mode; // const { nodeData } = this.props;
209
-
213
+ var mode = window.magicDesign.mode;
210
214
  var style = {
211
215
  position: 'relative',
212
216
  zIndex: '1'
@@ -1,13 +1,14 @@
1
1
  {
2
- "RETURN": "Return",
3
- "RATING": "Rating",
2
+ "SUBMIT": "Submit",
3
+ "CANCELLED": "Cancelled",
4
+ "DONE": "Done",
4
5
  "TO_RECEIVE": "To Receive",
5
6
  "TO_SHIP": "To ship",
6
7
  "TO_PAY": "To Pay",
7
8
  "VIEW_ALL_ORDERS": "View All Orders",
8
- "ORDERS": "ORDERS",
9
+ "ORDERS": "Orders",
9
10
  "RECENTLY_VIEWED": "Recently Viewed",
10
- "COUPONS": "Coupons",
11
+ "VOUCHERS": "Vouchers",
11
12
  "STORES": "Stores",
12
13
  "WISHLIST": "Wishlist",
13
14
  "IMAGE_NAME_IS_TOO_LONG": "Image name is too long",
@@ -128,7 +129,6 @@
128
129
  "MOVE_DOWN": "Move Down",
129
130
  "COPY": "Copy",
130
131
  "DELETE": "Delete",
131
- "DONE": "Done",
132
132
  "ADD_COMPONENT": "Add Component",
133
133
  "ALL": "ALL",
134
134
  "HOT": "Hot",