@fonixtree/magic-design 2.0.121 → 2.0.122

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 (51) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +11 -3
  2. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  3. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  4. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  5. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  6. package/es/assets/images/layout-icon/monpaySignBoardLayout1.png +0 -0
  7. package/es/common/Iconfont/index.js +5 -2
  8. package/es/composite-comp/dito/components/Bargain/defaultJSON.js +3 -3
  9. package/es/composite-comp/dito/components/Bargain/index.js +10 -10
  10. package/es/composite-comp/dito/components/Bargain/mobile/index.js +16 -13
  11. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +3 -3
  12. package/es/composite-comp/monpay/components/MonpaySignBoard/defaultJSON.js +111 -0
  13. package/es/composite-comp/monpay/components/MonpaySignBoard/index.js +86 -0
  14. package/es/composite-comp/monpay/components/MonpaySignBoard/mobile/index.js +446 -0
  15. package/es/composite-comp/monpay/components/MonpaySignBoard/mobile/index.less +107 -0
  16. package/es/composite-comp/monpay/config-panels/MonpaySignBoardConfig/ConfigContent/index.js +155 -0
  17. package/es/composite-comp/monpay/config-panels/MonpaySignBoardConfig/index.js +104 -0
  18. package/es/constants/component-types.js +6 -2
  19. package/es/constants/index.js +4 -0
  20. package/es/constants/layout.js +10 -2
  21. package/es/core/Designer/QuickMenuBar/index.js +3 -3
  22. package/es/locale/en/en.json +11 -1
  23. package/es/locale/es/es.json +11 -1
  24. package/es/locale/id/id.json +11 -1
  25. package/es/utils/commonUtil.js +28 -1
  26. package/lib/assets/fonts/magic-box-iconfont.css +11 -3
  27. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  28. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  29. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  30. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  31. package/lib/assets/images/layout-icon/monpaySignBoardLayout1.png +0 -0
  32. package/lib/common/Iconfont/index.js +5 -2
  33. package/lib/composite-comp/dito/components/Bargain/defaultJSON.js +3 -3
  34. package/lib/composite-comp/dito/components/Bargain/index.js +10 -10
  35. package/lib/composite-comp/dito/components/Bargain/mobile/index.js +16 -13
  36. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +3 -3
  37. package/lib/composite-comp/monpay/components/MonpaySignBoard/defaultJSON.js +111 -0
  38. package/lib/composite-comp/monpay/components/MonpaySignBoard/index.js +86 -0
  39. package/lib/composite-comp/monpay/components/MonpaySignBoard/mobile/index.js +446 -0
  40. package/lib/composite-comp/monpay/components/MonpaySignBoard/mobile/index.less +107 -0
  41. package/lib/composite-comp/monpay/config-panels/MonpaySignBoardConfig/ConfigContent/index.js +155 -0
  42. package/lib/composite-comp/monpay/config-panels/MonpaySignBoardConfig/index.js +104 -0
  43. package/lib/constants/component-types.js +6 -2
  44. package/lib/constants/index.js +4 -0
  45. package/lib/constants/layout.js +10 -2
  46. package/lib/core/Designer/QuickMenuBar/index.js +3 -3
  47. package/lib/locale/en/en.json +11 -1
  48. package/lib/locale/es/es.json +11 -1
  49. package/lib/locale/id/id.json +11 -1
  50. package/lib/utils/commonUtil.js +28 -1
  51. package/package.json +1 -1
@@ -105,7 +105,8 @@ function (_super) {
105
105
  color = _a.color,
106
106
  svg = _a.svg,
107
107
  className = _a.className,
108
- rest = __rest(_a, ["type", "size", "color", "svg", "className"]);
108
+ fontWeight = _a.fontWeight,
109
+ rest = __rest(_a, ["type", "size", "color", "svg", "className", "fontWeight"]);
109
110
 
110
111
  var _size = size;
111
112
 
@@ -124,7 +125,8 @@ function (_super) {
124
125
  className: (0, _classnames["default"])('icon_container', className),
125
126
  style: {
126
127
  fontSize: _size,
127
- color: color
128
+ color: color,
129
+ fontWeight: fontWeight
128
130
  }
129
131
  }, rest), svg ? /*#__PURE__*/_react["default"].createElement("svg", {
130
132
  "aria-hidden": "true",
@@ -139,6 +141,7 @@ function (_super) {
139
141
  Iconfont.defaultProps = {
140
142
  type: 'icon-cart',
141
143
  size: '20px',
144
+ fontWeight: 400,
142
145
  svg: false
143
146
  };
144
147
  return Iconfont;
@@ -139,7 +139,7 @@ var getDefaultJSON = function getDefaultJSON() {
139
139
  open: true,
140
140
  type: 'TEXT',
141
141
  specialContent: [],
142
- text: 'Flash Deal',
142
+ text: '',
143
143
  content: {
144
144
  sizeType: 'Customize font styles',
145
145
  fontFamily: 'Open Sans',
@@ -163,7 +163,7 @@ var getDefaultJSON = function getDefaultJSON() {
163
163
  open: true,
164
164
  type: 'TEXT',
165
165
  specialContent: [],
166
- text: 'Flash Deal',
166
+ text: '',
167
167
  content: {
168
168
  sizeType: 'Customize font styles',
169
169
  fontFamily: 'Open Sans',
@@ -187,7 +187,7 @@ var getDefaultJSON = function getDefaultJSON() {
187
187
  open: true,
188
188
  type: 'TEXT',
189
189
  specialContent: [],
190
- text: 'Flash Deal',
190
+ text: '',
191
191
  content: {
192
192
  sizeType: 'Customize font styles',
193
193
  fontFamily: 'Open Sans',
@@ -59,28 +59,28 @@ var __decorate = void 0 && (void 0).__decorate || function (decorators, target,
59
59
  return c > 3 && r && Object.defineProperty(target, key, r), r;
60
60
  };
61
61
 
62
- var FlashDeal =
62
+ var AComponent =
63
63
  /** @class */
64
64
  function (_super) {
65
- __extends(FlashDeal, _super);
65
+ __extends(AComponent, _super);
66
66
 
67
- function FlashDeal() {
67
+ function AComponent() {
68
68
  return _super !== null && _super.apply(this, arguments) || this;
69
69
  }
70
70
 
71
- FlashDeal.prototype.render = function () {
71
+ AComponent.prototype.render = function () {
72
72
  var nodeData = this.props.nodeData;
73
73
  return /*#__PURE__*/_react["default"].createElement("div", null, (0, _coreUtil.isPc)() ? null : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
74
74
  panelProps: nodeData
75
75
  }));
76
76
  };
77
77
 
78
- FlashDeal.defaultProps = {};
79
- FlashDeal.type = 'BARGAIN';
80
- FlashDeal.getDefaultJSON = _defaultJSON.getDefaultJSON;
81
- FlashDeal = __decorate([_compositeDecorator["default"]], FlashDeal);
82
- return FlashDeal;
78
+ AComponent.defaultProps = {};
79
+ AComponent.type = 'BARGAIN';
80
+ AComponent.getDefaultJSON = _defaultJSON.getDefaultJSON;
81
+ AComponent = __decorate([_compositeDecorator["default"]], AComponent);
82
+ return AComponent;
83
83
  }(_react.Component);
84
84
 
85
- var _default = FlashDeal;
85
+ var _default = AComponent;
86
86
  exports["default"] = _default;
@@ -243,12 +243,12 @@ var defaultData = [{
243
243
  sppType: '12'
244
244
  }];
245
245
 
246
- var FlashDealMobile =
246
+ var Mobile =
247
247
  /** @class */
248
248
  function (_super) {
249
- __extends(FlashDealMobile, _super);
249
+ __extends(Mobile, _super);
250
250
 
251
- function FlashDealMobile() {
251
+ function Mobile() {
252
252
  var _this = _super !== null && _super.apply(this, arguments) || this; // 商品列表排序方式
253
253
 
254
254
 
@@ -262,8 +262,11 @@ function (_super) {
262
262
  _this.getData = function () {
263
263
  return __awaiter(_this, void 0, void 0, function () {
264
264
  var res, pageId, list;
265
- return __generator(this, function (_a) {
266
- switch (_a.label) {
265
+
266
+ var _a;
267
+
268
+ return __generator(this, function (_b) {
269
+ switch (_b.label) {
267
270
  case 0:
268
271
  return [4
269
272
  /*yield*/
@@ -274,9 +277,9 @@ function (_super) {
274
277
  })];
275
278
 
276
279
  case 1:
277
- res = _a.sent();
280
+ res = _b.sent();
278
281
  pageId = window.magicDesign.pageId || '';
279
- list = res.pageInfo.list || [];
282
+ list = ((_a = res.pageInfo) === null || _a === void 0 ? void 0 : _a.list) || [];
280
283
 
281
284
  if (!(0, _coreUtil.isDesignMode)()) {
282
285
  (0, _storeUtil.setMagicStore)("bargain_" + pageId + "_" + this.props.panelProps.id, list);
@@ -296,19 +299,19 @@ function (_super) {
296
299
  return _this;
297
300
  }
298
301
 
299
- FlashDealMobile.prototype.componentDidMount = function () {
302
+ Mobile.prototype.componentDidMount = function () {
300
303
  this.sortType = this.props.panelProps.content.sortType;
301
304
  this.getData();
302
305
  };
303
306
 
304
- FlashDealMobile.prototype.componentWillReceiveProps = function (nextProps) {
307
+ Mobile.prototype.componentWillReceiveProps = function (nextProps) {
305
308
  if (nextProps.panelProps.content.sortType !== this.sortType) {
306
309
  this.sortType = nextProps.panelProps.content.sortType;
307
310
  this.getData();
308
311
  }
309
312
  };
310
313
 
311
- FlashDealMobile.prototype.render = function () {
314
+ Mobile.prototype.render = function () {
312
315
  var panelProps = this.props.panelProps;
313
316
  var list = this.state.list;
314
317
 
@@ -360,11 +363,11 @@ function (_super) {
360
363
  }))));
361
364
  };
362
365
 
363
- FlashDealMobile.defaultProps = {
366
+ Mobile.defaultProps = {
364
367
  panelProps: {}
365
368
  };
366
- return FlashDealMobile;
369
+ return Mobile;
367
370
  }(_react["default"].Component);
368
371
 
369
- var _default = FlashDealMobile;
372
+ var _default = Mobile;
370
373
  exports["default"] = _default;
@@ -9,7 +9,7 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
12
- var _lodash = require("lodash");
12
+ var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
13
13
 
14
14
  var _antd = require("antd4");
15
15
 
@@ -309,7 +309,7 @@ function (_super) {
309
309
  };
310
310
 
311
311
  _this.clickName = function () {
312
- if (!(0, _lodash.isEmpty)(LPObj)) {
312
+ if (!(0, _isEmpty["default"])(LPObj)) {
313
313
  return;
314
314
  }
315
315
 
@@ -531,7 +531,7 @@ function (_super) {
531
531
  onClick: this.goLoginPage
532
532
  }, (0, _locale.i18n)('LOGIN_OR_REGISTER')))), /*#__PURE__*/_react["default"].createElement("div", {
533
533
  className: "btnGroup"
534
- }, (0, _lodash.isEmpty)(LPObj) && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
534
+ }, (0, _isEmpty["default"])(LPObj) && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
535
535
  color: "#fff",
536
536
  onClick: this.goSettings,
537
537
  size: 24,
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getDefaultJSON = void 0;
7
+
8
+ var _uuid = require("uuid");
9
+
10
+ var getDefaultJSON = function getDefaultJSON() {
11
+ return {
12
+ id: (0, _uuid.v4)(),
13
+ type: 'MONPAY_SIGN_BOARD',
14
+ content: {
15
+ box: {
16
+ id: (0, _uuid.v4)(),
17
+ open: true,
18
+ color: '#A4A4A4',
19
+ backgroundColor: '#F2F2F2'
20
+ },
21
+ storeName: {
22
+ id: (0, _uuid.v4)(),
23
+ open: true,
24
+ type: 'TEXT',
25
+ specialContent: [],
26
+ text: 'Store Name',
27
+ content: {
28
+ sizeType: 'Customize font styles',
29
+ fontFamily: 'Open Sans',
30
+ fontWeight: 600,
31
+ fontSize: 16,
32
+ color: '#000'
33
+ },
34
+ underline: {
35
+ open: false,
36
+ textDecorationColor: '',
37
+ textDecorationStyle: 'solid'
38
+ },
39
+ vertical: {}
40
+ },
41
+ followButton: {
42
+ id: (0, _uuid.v4)(),
43
+ open: true,
44
+ type: 'BUTTON',
45
+ text: 'Follow',
46
+ content: {
47
+ url: '',
48
+ backgroundColor: '#FF8650'
49
+ },
50
+ buttonText: {
51
+ sizeType: 'Customize font styles',
52
+ fontFamily: 'Open Sans',
53
+ fontWeight: 400,
54
+ fontSize: 12,
55
+ fontStyle: 'normal',
56
+ color: '#fff'
57
+ },
58
+ buttonBorder: {
59
+ open: true,
60
+ borderColor: '',
61
+ borderRadius: 8
62
+ },
63
+ spacing: {
64
+ mobile: {
65
+ paddingTop: 8,
66
+ paddingBottom: 8,
67
+ paddingLeft: 24,
68
+ paddingRight: 24
69
+ }
70
+ },
71
+ buttonIcon: {
72
+ iconUrl: '',
73
+ layout: 'right'
74
+ },
75
+ hover: null
76
+ },
77
+ rating: {
78
+ id: (0, _uuid.v4)(),
79
+ open: true
80
+ },
81
+ followers: {
82
+ id: (0, _uuid.v4)(),
83
+ open: true
84
+ },
85
+ ratingDetails: {
86
+ id: (0, _uuid.v4)(),
87
+ open: true
88
+ }
89
+ },
90
+ spacing: {
91
+ mobile: {
92
+ paddingTop: 0,
93
+ paddingBottom: 0,
94
+ paddingLeft: 0,
95
+ paddingRight: 0,
96
+ marginBottom: window.magicDesign.compSpacing
97
+ }
98
+ },
99
+ customize: {
100
+ layout: 'layout1'
101
+ },
102
+ background: {
103
+ opacity: 100,
104
+ color: '#F6F6F6',
105
+ image: '',
106
+ bgType: 'color'
107
+ }
108
+ };
109
+ };
110
+
111
+ exports.getDefaultJSON = getDefaultJSON;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireWildcard(require("react"));
9
+
10
+ var _defaultJSON = require("./defaultJSON");
11
+
12
+ var _index = _interopRequireDefault(require("./mobile/index"));
13
+
14
+ var _coreUtil = require("../../../../utils/coreUtil");
15
+
16
+ var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
+
20
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
+
22
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+
24
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
25
+
26
+ var __extends = void 0 && (void 0).__extends || function () {
27
+ var _extendStatics = function extendStatics(d, b) {
28
+ _extendStatics = Object.setPrototypeOf || {
29
+ __proto__: []
30
+ } instanceof Array && function (d, b) {
31
+ d.__proto__ = b;
32
+ } || function (d, b) {
33
+ for (var p in b) {
34
+ if (b.hasOwnProperty(p)) d[p] = b[p];
35
+ }
36
+ };
37
+
38
+ return _extendStatics(d, b);
39
+ };
40
+
41
+ return function (d, b) {
42
+ _extendStatics(d, b);
43
+
44
+ function __() {
45
+ this.constructor = d;
46
+ }
47
+
48
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49
+ };
50
+ }();
51
+
52
+ var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
53
+ var c = arguments.length,
54
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
55
+ d;
56
+ if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
57
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
58
+ }
59
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
60
+ };
61
+
62
+ var AComponent =
63
+ /** @class */
64
+ function (_super) {
65
+ __extends(AComponent, _super);
66
+
67
+ function AComponent() {
68
+ return _super !== null && _super.apply(this, arguments) || this;
69
+ }
70
+
71
+ AComponent.prototype.render = function () {
72
+ var nodeData = this.props.nodeData;
73
+ return /*#__PURE__*/_react["default"].createElement("div", null, (0, _coreUtil.isPc)() ? null : /*#__PURE__*/_react["default"].createElement(_index["default"], {
74
+ data: nodeData
75
+ }));
76
+ };
77
+
78
+ AComponent.defaultProps = {};
79
+ AComponent.type = 'MONPAY_SIGN_BOARD';
80
+ AComponent.getDefaultJSON = _defaultJSON.getDefaultJSON;
81
+ AComponent = __decorate([_compositeDecorator["default"]], AComponent);
82
+ return AComponent;
83
+ }(_react.Component);
84
+
85
+ var _default = AComponent;
86
+ exports["default"] = _default;