@fonixtree/magic-design 0.0.90 → 0.0.93

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 (43) hide show
  1. package/es/common/LinkModal/FilteredProductModal/index.js +1 -0
  2. package/es/composite-comp/bol/components/Carousel/mobile/index.js +6 -0
  3. package/es/composite-comp/bol/components/Carousel/pc/index.js +6 -0
  4. package/es/composite-comp/bol/components/ImageText/defaultJSON.js +2 -4
  5. package/es/composite-comp/bol/components/Newsletter/defaultJSON.js +1 -1
  6. package/es/composite-comp/bol/components/Text/defaultJSON.js +1 -1
  7. package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +4 -4
  8. package/es/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg.png +0 -0
  9. package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +23 -23
  10. package/es/composite-comp/dito/components/FlashDeal/pc/imgs/defImg.png +0 -0
  11. package/es/composite-comp/dito/components/FlashDeal/pc/index.js +58 -14
  12. package/es/composite-comp/dito/components/PcNavigation/pc/index.js +3 -1
  13. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +3 -3
  14. package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +2 -0
  15. package/es/composite-comp/dito/components/SearchBar/mobile/index.less +5 -3
  16. package/es/core/Designer/AppointmentModal/index.js +2 -1
  17. package/es/core/Designer/AppointmentModal/index.less +22 -9
  18. package/es/decorator/metaDecorator.js +37 -5
  19. package/es/meta-comp/components/Text/index.js +13 -3
  20. package/es/meta-comp/components/Text/index.less +0 -1
  21. package/es/meta-comp/config-panels/TextConfig/index.js +1 -1
  22. package/lib/common/LinkModal/FilteredProductModal/index.js +1 -0
  23. package/lib/composite-comp/bol/components/Carousel/mobile/index.js +6 -0
  24. package/lib/composite-comp/bol/components/Carousel/pc/index.js +6 -0
  25. package/lib/composite-comp/bol/components/ImageText/defaultJSON.js +2 -4
  26. package/lib/composite-comp/bol/components/Newsletter/defaultJSON.js +1 -1
  27. package/lib/composite-comp/bol/components/Text/defaultJSON.js +1 -1
  28. package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +4 -4
  29. package/lib/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg.png +0 -0
  30. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +23 -23
  31. package/lib/composite-comp/dito/components/FlashDeal/pc/imgs/defImg.png +0 -0
  32. package/lib/composite-comp/dito/components/FlashDeal/pc/index.js +58 -14
  33. package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +3 -1
  34. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +3 -3
  35. package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +2 -0
  36. package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +5 -3
  37. package/lib/core/Designer/AppointmentModal/index.js +2 -1
  38. package/lib/core/Designer/AppointmentModal/index.less +22 -9
  39. package/lib/decorator/metaDecorator.js +37 -5
  40. package/lib/meta-comp/components/Text/index.js +13 -3
  41. package/lib/meta-comp/components/Text/index.less +0 -1
  42. package/lib/meta-comp/config-panels/TextConfig/index.js +1 -1
  43. package/package.json +1 -1
@@ -453,6 +453,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
453
453
  return v.key;
454
454
  }).join(','),
455
455
  labelIds: labelId.key,
456
+ // q: productName,
456
457
  productName: productName,
457
458
  storeId: storeId,
458
459
  minPrice: minimum * precision || '',
@@ -166,6 +166,12 @@ function (_super) {
166
166
 
167
167
  this.destroy = (0, _mobx.autorun)(function () {
168
168
  _this.sliderGoTo(_this.props.data.groupSource);
169
+ /** 设计器模式下 如果选中特定group 自动播放关闭 */
170
+
171
+
172
+ if ((0, _coreUtil.isDesignMode)() && _mobx.store.clickedGroup) {
173
+ _this.sliderRef.slickPause();
174
+ }
169
175
  });
170
176
  this.listenWidth();
171
177
  window.addEventListener('resize', (0, _lodash.debounce)(this.listenWidth));
@@ -159,6 +159,12 @@ function (_super) {
159
159
 
160
160
  this.destroy = (0, _mobx.autorun)(function () {
161
161
  _this.sliderGoTo(_this.props.data.groupSource);
162
+ /** 设计器模式下 如果选中特定group 自动播放关闭 */
163
+
164
+
165
+ if ((0, _coreUtil.isDesignMode)() && _mobx.store.clickedGroup) {
166
+ _this.sliderRef.slickPause();
167
+ }
162
168
  });
163
169
  this.listenWidth();
164
170
  window.addEventListener('resize', (0, _lodash.debounce)(this.listenWidth));
@@ -48,8 +48,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
48
48
  fontFamily: 'Open Sans',
49
49
  fontWeight: 600,
50
50
  fontSize: 12,
51
- color: '#232F46',
52
- width: 0
51
+ color: '#232F46'
53
52
  },
54
53
  underline: {
55
54
  open: false,
@@ -70,8 +69,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
70
69
  fontFamily: 'Open Sans',
71
70
  fontWeight: 400,
72
71
  fontSize: 10,
73
- color: '#8493AF',
74
- width: 0
72
+ color: '#8493AF'
75
73
  },
76
74
  underline: {},
77
75
  vertical: {}
@@ -30,7 +30,7 @@ var getDefaultMetaTextJson = function getDefaultMetaTextJson() {
30
30
  return {
31
31
  id: (0, _uuid.v4)(),
32
32
  open: true,
33
- type: 'Text',
33
+ type: 'TEXT',
34
34
  specialContent: [],
35
35
  text: 'Thank you for you subscription',
36
36
  content: {
@@ -30,7 +30,7 @@ var getDefaultMetaTextJson = function getDefaultMetaTextJson() {
30
30
  return {
31
31
  id: (0, _uuid.v4)(),
32
32
  open: true,
33
- type: 'Text',
33
+ type: 'TEXT',
34
34
  specialContent: [],
35
35
  text: 'Flash Deal',
36
36
  content: {
@@ -21,7 +21,7 @@ var getDefaultJSON = function getDefaultJSON() {
21
21
  headline: {
22
22
  id: (0, _uuid.v4)(),
23
23
  open: true,
24
- type: 'Text',
24
+ type: 'TEXT',
25
25
  specialContent: [],
26
26
  text: 'Flash Deal',
27
27
  content: {
@@ -135,7 +135,7 @@ var getDefaultJSON = function getDefaultJSON() {
135
135
  id: (0, _uuid.v4)(),
136
136
  contentId: contentId,
137
137
  open: true,
138
- type: 'Text',
138
+ type: 'TEXT',
139
139
  specialContent: [],
140
140
  text: 'Flash Deal',
141
141
  content: {
@@ -159,7 +159,7 @@ var getDefaultJSON = function getDefaultJSON() {
159
159
  id: (0, _uuid.v4)(),
160
160
  contentId: contentId,
161
161
  open: true,
162
- type: 'Text',
162
+ type: 'TEXT',
163
163
  specialContent: [],
164
164
  text: 'Flash Deal',
165
165
  content: {
@@ -183,7 +183,7 @@ var getDefaultJSON = function getDefaultJSON() {
183
183
  id: (0, _uuid.v4)(),
184
184
  contentId: contentId,
185
185
  open: true,
186
- type: 'Text',
186
+ type: 'TEXT',
187
187
  specialContent: [],
188
188
  text: 'Flash Deal',
189
189
  content: {
@@ -9,11 +9,7 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  require("./index.less");
11
11
 
12
- var _defImg = _interopRequireDefault(require("./imgs/defImg1.png"));
13
-
14
- var _defImg2 = _interopRequireDefault(require("./imgs/defImg2.png"));
15
-
16
- var _defImg3 = _interopRequireDefault(require("./imgs/defImg3.png"));
12
+ var _defImg = _interopRequireDefault(require("./imgs/defImg.png"));
17
13
 
18
14
  var _ProductItem = _interopRequireDefault(require("../../../../common/components/ProductItem"));
19
15
 
@@ -222,30 +218,34 @@ var defaultData = [{
222
218
  imgUrlContent: {
223
219
  url: _defImg["default"]
224
220
  },
225
- offerName: 'DITO STARTER PACK + 3GB Data',
226
- salesPrice: 1100,
227
- marketPrice: 100,
228
- discountPercent: 51,
229
- salePercent: 5000
221
+ offerName: 'Product Name',
222
+ salesPrice: 18000000,
223
+ specialPrice: 18000000,
224
+ marketPrice: 19000000,
225
+ discountPercent: 10,
226
+ salePercent: 500,
227
+ sppType: '2'
230
228
  }, {
231
229
  imgUrlContent: {
232
- url: _defImg2["default"]
230
+ url: _defImg["default"]
233
231
  },
234
- offerName: 'DITO Level Up 99 x 365 days',
235
- salesPrice: 594,
236
- marketPrice: 1188,
237
- discountPercent: 50,
238
- salePercent: 5000,
232
+ offerName: 'Product Name',
233
+ salesPrice: 18000000,
234
+ specialPrice: 18000000,
235
+ marketPrice: 19000000,
236
+ discountPercent: 10,
237
+ salePercent: 500,
239
238
  sppType: '2'
240
239
  }, {
241
240
  imgUrlContent: {
242
- url: _defImg3["default"]
241
+ url: _defImg["default"]
243
242
  },
244
- offerName: 'DITO Level-Up Pack 99 7GB',
245
- salesPrice: 99,
246
- marketPrice: 138,
247
- discountPercent: 28,
248
- salePercent: 5000,
243
+ offerName: 'Product Name',
244
+ salesPrice: 18000000,
245
+ specialPrice: 18000000,
246
+ marketPrice: 19000000,
247
+ discountPercent: 10,
248
+ salePercent: 500,
249
249
  sppType: '2'
250
250
  }];
251
251
 
@@ -266,7 +266,7 @@ function (_super) {
266
266
  effDate: '',
267
267
  expDate: '',
268
268
  now: '',
269
- isWill: true
269
+ isWill: false
270
270
  };
271
271
 
272
272
  _this.getFlashData = function (pageSize, campaign) {
@@ -11,9 +11,7 @@ require("./index.less");
11
11
 
12
12
  var _lodash = _interopRequireDefault(require("lodash.throttle"));
13
13
 
14
- var _defImg = _interopRequireDefault(require("./imgs/defImg1.png"));
15
-
16
- var _defImg2 = _interopRequireDefault(require("./imgs/defImg2.png"));
14
+ var _defImg = _interopRequireDefault(require("./imgs/defImg.png"));
17
15
 
18
16
  var _ProductItem = _interopRequireDefault(require("../../../../common/components/ProductItem"));
19
17
 
@@ -224,21 +222,67 @@ var defaultData = [{
224
222
  imgUrlContent: {
225
223
  url: _defImg["default"]
226
224
  },
227
- offerName: 'DITO STARTER PACK + 3GB Data',
228
- salesPrice: 49,
229
- marketPrice: 100,
230
- discountPercent: 51,
231
- salePercent: 5000,
225
+ offerName: 'Product Name Long text',
226
+ salesPrice: 18000000,
227
+ specialPrice: 18000000,
228
+ marketPrice: 19000000,
229
+ discountPercent: 10,
230
+ salePercent: 500,
231
+ sppType: '2'
232
+ }, {
233
+ imgUrlContent: {
234
+ url: _defImg["default"]
235
+ },
236
+ offerName: 'Product Name Long text',
237
+ salesPrice: 18000000,
238
+ specialPrice: 18000000,
239
+ marketPrice: 19000000,
240
+ discountPercent: 10,
241
+ salePercent: 500,
242
+ sppType: '2'
243
+ }, {
244
+ imgUrlContent: {
245
+ url: _defImg["default"]
246
+ },
247
+ offerName: 'Product Name Long text',
248
+ salesPrice: 18000000,
249
+ specialPrice: 18000000,
250
+ marketPrice: 19000000,
251
+ discountPercent: 10,
252
+ salePercent: 500,
232
253
  sppType: '2'
233
254
  }, {
234
255
  imgUrlContent: {
235
- url: _defImg2["default"]
256
+ url: _defImg["default"]
257
+ },
258
+ offerName: 'Product Name Long text',
259
+ salesPrice: 18000000,
260
+ specialPrice: 18000000,
261
+ marketPrice: 19000000,
262
+ discountPercent: 10,
263
+ salePercent: 500,
264
+ sppType: '2'
265
+ }, {
266
+ imgUrlContent: {
267
+ url: _defImg["default"]
268
+ },
269
+ offerName: 'Product Name Long text',
270
+ salesPrice: 18000000,
271
+ specialPrice: 18000000,
272
+ marketPrice: 19000000,
273
+ discountPercent: 10,
274
+ salePercent: 500,
275
+ sppType: '2'
276
+ }, {
277
+ imgUrlContent: {
278
+ url: _defImg["default"]
236
279
  },
237
- offerName: 'DITO Level Up 99 x 365 days',
238
- salesPrice: 594,
239
- marketPrice: 1188,
240
- discountPercent: 50,
241
- salePercent: 5000,
280
+ offerName: 'Product Name Long text',
281
+ salesPrice: 18000000,
282
+ specialPrice: 18000000,
283
+ marketPrice: 19000000,
284
+ discountPercent: 10,
285
+ salePercent: 500,
242
286
  sppType: '2'
243
287
  }];
244
288
 
@@ -304,7 +304,9 @@ function (_super) {
304
304
 
305
305
  return [4
306
306
  /*yield*/
307
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/h5/pages/buyer/displaycatgs", {}, 'GET')];
307
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/h5/pages/buyer/displaycatgs", {
308
+ terminalType: 'PC'
309
+ }, 'GET')];
308
310
 
309
311
  case 1:
310
312
  res = _a.sent();
@@ -204,7 +204,7 @@ var getDefaultJSON = function getDefaultJSON() {
204
204
  productName: {
205
205
  id: (0, _uuid.v4)(),
206
206
  open: true,
207
- type: 'Text',
207
+ type: 'TEXT',
208
208
  specialContent: [],
209
209
  text: 'Flash Deal',
210
210
  content: {
@@ -227,7 +227,7 @@ var getDefaultJSON = function getDefaultJSON() {
227
227
  activityPrice: {
228
228
  id: (0, _uuid.v4)(),
229
229
  open: true,
230
- type: 'Text',
230
+ type: 'TEXT',
231
231
  specialContent: [],
232
232
  text: 'Flash Deal',
233
233
  content: {
@@ -250,7 +250,7 @@ var getDefaultJSON = function getDefaultJSON() {
250
250
  salesPrice: {
251
251
  id: (0, _uuid.v4)(),
252
252
  open: true,
253
- type: 'Text',
253
+ type: 'TEXT',
254
254
  specialContent: [],
255
255
  text: 'Flash Deal',
256
256
  content: {
@@ -63,6 +63,8 @@ var getDefaultJSON = function getDefaultJSON() {
63
63
  mobile: {
64
64
  paddingTop: 8,
65
65
  paddingBottom: 8,
66
+ paddingLeft: 15,
67
+ paddingRight: 15,
66
68
  marginBottom: 0
67
69
  }
68
70
  },
@@ -1,6 +1,6 @@
1
1
  .m-search-bar {
2
2
  height: 48px;
3
- padding: 8px 16px;
3
+ padding: 8px 0;
4
4
  display: flex;
5
5
  flex-direction: row-reverse;
6
6
  align-items: center;
@@ -9,11 +9,13 @@
9
9
 
10
10
  .right {
11
11
  display: flex;
12
+ flex: 1;
13
+ margin-left: 15px;
12
14
  align-items: center;
13
15
  justify-content: space-between;
14
16
 
15
17
  .search-input-wrap {
16
- width: 195px;
18
+ flex: 1;
17
19
  background: #fff;
18
20
  border-radius: 4px;
19
21
  border: 1px solid #D2D9E5;
@@ -24,7 +26,7 @@
24
26
 
25
27
  .message-wrap {
26
28
  position: relative;
27
- margin-left: 16px;
29
+ margin-left: 10px;
28
30
 
29
31
  .num {
30
32
  position: absolute;
@@ -57,7 +57,8 @@ function AppointmentModal(props) {
57
57
  onCancel: onClose,
58
58
  title: (0, _locale.i18n)('PUBLISH_LATER'),
59
59
  visible: visible,
60
- width: 500
60
+ width: 500,
61
+ wrapClassName: "m-appointment-modal"
61
62
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form, {
62
63
  autoComplete: "off",
63
64
  form: form,
@@ -1,10 +1,23 @@
1
- .footer {
2
- display: flex;
3
- justify-content: flex-end;
4
- }
5
- .tips {
6
- font-size: 13px;
7
- line-height: 18px;
8
- color: #A3AEC3;
9
- margin-bottom:40px;
1
+ [magic_design] .m-appointment-modal {
2
+
3
+ .footer {
4
+ display: flex;
5
+ justify-content: flex-end;
6
+ }
7
+
8
+ .tips {
9
+ font-size: 13px;
10
+ line-height: 18px;
11
+ color: #A3AEC3;
12
+ margin-bottom: 40px;
13
+ }
14
+
15
+ .ant-modal-body {
16
+ overflow: unset;
17
+ }
18
+
19
+ .ant-picker-ok button {
20
+ color: #fff;
21
+ }
22
+
10
23
  }
@@ -41,6 +41,22 @@ var __extends = void 0 && (void 0).__extends || function () {
41
41
  };
42
42
  }();
43
43
 
44
+ var __assign = void 0 && (void 0).__assign || function () {
45
+ __assign = Object.assign || function (t) {
46
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
47
+ s = arguments[i];
48
+
49
+ for (var p in s) {
50
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
51
+ }
52
+ }
53
+
54
+ return t;
55
+ };
56
+
57
+ return __assign.apply(this, arguments);
58
+ };
59
+
44
60
  var __rest = void 0 && (void 0).__rest || function (s, e) {
45
61
  var t = {};
46
62
 
@@ -133,7 +149,7 @@ function metaDecorator(WrappedComponent) {
133
149
  return false;
134
150
  };
135
151
 
136
- _this.getStyle = function () {
152
+ _this.getInteractStyle = function () {
137
153
  var _a = _this.state,
138
154
  hoveredMeta = _a.hoveredMeta,
139
155
  clickedMeta = _a.clickedMeta;
@@ -154,6 +170,22 @@ function metaDecorator(WrappedComponent) {
154
170
  }
155
171
 
156
172
  return style;
173
+ }; // text元组件在选中或悬浮时 需要实时展示其宽度
174
+
175
+
176
+ _this.getStyle = function () {
177
+ var _a = _this.props,
178
+ style = _a.style,
179
+ rest = __rest(_a, ["style"]);
180
+
181
+ var newStyle = __assign({}, style);
182
+
183
+ if (rest.data.type === 'TEXT') {
184
+ var width = window.magicDesign.device === 'pc' ? rest.data.content.pcWidth : rest.data.content.width;
185
+ newStyle.width = (width || 100) + "%";
186
+ }
187
+
188
+ return newStyle;
157
189
  };
158
190
 
159
191
  return _this;
@@ -177,13 +209,13 @@ function metaDecorator(WrappedComponent) {
177
209
  Wrapper.prototype.render = function () {
178
210
  var _a = this.props,
179
211
  className = _a.className,
180
- style = _a.style,
181
- rest = __rest(_a, ["className", "style"]);
212
+ rest = __rest(_a, ["className"]);
182
213
 
183
- var hoverStyle = this.getStyle();
214
+ var hoverStyle = this.getInteractStyle();
215
+ console.log(rest);
184
216
  return /*#__PURE__*/_react["default"].createElement("div", {
185
217
  className: className,
186
- style: style
218
+ style: this.getStyle()
187
219
  }, /*#__PURE__*/_react["default"].createElement("div", {
188
220
  className: "meta_wrap",
189
221
  onClick: this.onMetaClick,
@@ -94,7 +94,6 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
94
94
  };
95
95
 
96
96
  var contentStyle = function contentStyle(content) {
97
- var baseWidth = (window.magicDesign.device == 'pc' ? content.pcWidth : content.width) || 100;
98
97
  return {
99
98
  fontSize: window.magicDesign.device == 'pc' ? content.pcFontSize : content.fontSize,
100
99
  fontFamily: content.fontFamily,
@@ -103,8 +102,7 @@ var contentStyle = function contentStyle(content) {
103
102
  color: content.color,
104
103
  backgroundColor: content.backgroundColor,
105
104
  textAlign: content.textAlign,
106
- // width: (window.magicDesign.device == 'pc' ? content.pcWidth : content.width) || 'fit-content',
107
- width: Math.min(baseWidth, 100) + "%"
105
+ width: '100%'
108
106
  };
109
107
  };
110
108
  /** 从父级数组中 分离出 片段数组 */
@@ -343,6 +341,15 @@ function (_super) {
343
341
  var node = document.createElement('span');
344
342
  node.style = (0, _commonUtil.styleStringify)(contentStyle(c.content));
345
343
  node.innerText = (_a = data.text).slice.apply(_a, c.range);
344
+
345
+ node.onclick = function (e) {
346
+ if (c.content.clickUrl) {
347
+ e.stopPropagation();
348
+ }
349
+
350
+ (0, _coreUtil.clickUrl)(c.content.clickUrl);
351
+ };
352
+
346
353
  _this.selectionRefMap[JSON.stringify(c.range)] = node;
347
354
 
348
355
  _this.textRef.current.appendChild(node);
@@ -460,6 +467,9 @@ function (_super) {
460
467
  ref: this.textRef,
461
468
  className: (0, _classnames["default"])('m-meta-text', className),
462
469
  contentEditable: (0, _coreUtil.isDesignMode)() && !readonly,
470
+ onClick: function onClick() {
471
+ (0, _coreUtil.clickUrl)(data.content.clickUrl);
472
+ },
463
473
  onInput: function onInput(e) {
464
474
  var text = e.target.textContent;
465
475
  data.text = text;
@@ -1,6 +1,5 @@
1
1
  .m-meta-text {
2
2
  display: block;
3
- margin: 0 auto;
4
3
 
5
4
  .select-container {
6
5
  position: relative;
@@ -274,7 +274,7 @@ function (_super) {
274
274
 
275
275
  _this.selfRender();
276
276
  },
277
- value: data.content.clickUrl
277
+ value: textData.clickUrl
278
278
  })), /*#__PURE__*/_react["default"].createElement(_common.Field, {
279
279
  title: (0, _locale.i18n)('CONTENT_WIDTH')
280
280
  }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
@@ -453,6 +453,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
453
453
  return v.key;
454
454
  }).join(','),
455
455
  labelIds: labelId.key,
456
+ // q: productName,
456
457
  productName: productName,
457
458
  storeId: storeId,
458
459
  minPrice: minimum * precision || '',
@@ -166,6 +166,12 @@ function (_super) {
166
166
 
167
167
  this.destroy = (0, _mobx.autorun)(function () {
168
168
  _this.sliderGoTo(_this.props.data.groupSource);
169
+ /** 设计器模式下 如果选中特定group 自动播放关闭 */
170
+
171
+
172
+ if ((0, _coreUtil.isDesignMode)() && _mobx.store.clickedGroup) {
173
+ _this.sliderRef.slickPause();
174
+ }
169
175
  });
170
176
  this.listenWidth();
171
177
  window.addEventListener('resize', (0, _lodash.debounce)(this.listenWidth));
@@ -159,6 +159,12 @@ function (_super) {
159
159
 
160
160
  this.destroy = (0, _mobx.autorun)(function () {
161
161
  _this.sliderGoTo(_this.props.data.groupSource);
162
+ /** 设计器模式下 如果选中特定group 自动播放关闭 */
163
+
164
+
165
+ if ((0, _coreUtil.isDesignMode)() && _mobx.store.clickedGroup) {
166
+ _this.sliderRef.slickPause();
167
+ }
162
168
  });
163
169
  this.listenWidth();
164
170
  window.addEventListener('resize', (0, _lodash.debounce)(this.listenWidth));
@@ -48,8 +48,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
48
48
  fontFamily: 'Open Sans',
49
49
  fontWeight: 600,
50
50
  fontSize: 12,
51
- color: '#232F46',
52
- width: 0
51
+ color: '#232F46'
53
52
  },
54
53
  underline: {
55
54
  open: false,
@@ -70,8 +69,7 @@ var ImageTextGroupSourceJSON = function ImageTextGroupSourceJSON() {
70
69
  fontFamily: 'Open Sans',
71
70
  fontWeight: 400,
72
71
  fontSize: 10,
73
- color: '#8493AF',
74
- width: 0
72
+ color: '#8493AF'
75
73
  },
76
74
  underline: {},
77
75
  vertical: {}
@@ -30,7 +30,7 @@ var getDefaultMetaTextJson = function getDefaultMetaTextJson() {
30
30
  return {
31
31
  id: (0, _uuid.v4)(),
32
32
  open: true,
33
- type: 'Text',
33
+ type: 'TEXT',
34
34
  specialContent: [],
35
35
  text: 'Thank you for you subscription',
36
36
  content: {
@@ -30,7 +30,7 @@ var getDefaultMetaTextJson = function getDefaultMetaTextJson() {
30
30
  return {
31
31
  id: (0, _uuid.v4)(),
32
32
  open: true,
33
- type: 'Text',
33
+ type: 'TEXT',
34
34
  specialContent: [],
35
35
  text: 'Flash Deal',
36
36
  content: {
@@ -21,7 +21,7 @@ var getDefaultJSON = function getDefaultJSON() {
21
21
  headline: {
22
22
  id: (0, _uuid.v4)(),
23
23
  open: true,
24
- type: 'Text',
24
+ type: 'TEXT',
25
25
  specialContent: [],
26
26
  text: 'Flash Deal',
27
27
  content: {
@@ -135,7 +135,7 @@ var getDefaultJSON = function getDefaultJSON() {
135
135
  id: (0, _uuid.v4)(),
136
136
  contentId: contentId,
137
137
  open: true,
138
- type: 'Text',
138
+ type: 'TEXT',
139
139
  specialContent: [],
140
140
  text: 'Flash Deal',
141
141
  content: {
@@ -159,7 +159,7 @@ var getDefaultJSON = function getDefaultJSON() {
159
159
  id: (0, _uuid.v4)(),
160
160
  contentId: contentId,
161
161
  open: true,
162
- type: 'Text',
162
+ type: 'TEXT',
163
163
  specialContent: [],
164
164
  text: 'Flash Deal',
165
165
  content: {
@@ -183,7 +183,7 @@ var getDefaultJSON = function getDefaultJSON() {
183
183
  id: (0, _uuid.v4)(),
184
184
  contentId: contentId,
185
185
  open: true,
186
- type: 'Text',
186
+ type: 'TEXT',
187
187
  specialContent: [],
188
188
  text: 'Flash Deal',
189
189
  content: {
@@ -9,11 +9,7 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  require("./index.less");
11
11
 
12
- var _defImg = _interopRequireDefault(require("./imgs/defImg1.png"));
13
-
14
- var _defImg2 = _interopRequireDefault(require("./imgs/defImg2.png"));
15
-
16
- var _defImg3 = _interopRequireDefault(require("./imgs/defImg3.png"));
12
+ var _defImg = _interopRequireDefault(require("./imgs/defImg.png"));
17
13
 
18
14
  var _ProductItem = _interopRequireDefault(require("../../../../common/components/ProductItem"));
19
15
 
@@ -222,30 +218,34 @@ var defaultData = [{
222
218
  imgUrlContent: {
223
219
  url: _defImg["default"]
224
220
  },
225
- offerName: 'DITO STARTER PACK + 3GB Data',
226
- salesPrice: 1100,
227
- marketPrice: 100,
228
- discountPercent: 51,
229
- salePercent: 5000
221
+ offerName: 'Product Name',
222
+ salesPrice: 18000000,
223
+ specialPrice: 18000000,
224
+ marketPrice: 19000000,
225
+ discountPercent: 10,
226
+ salePercent: 500,
227
+ sppType: '2'
230
228
  }, {
231
229
  imgUrlContent: {
232
- url: _defImg2["default"]
230
+ url: _defImg["default"]
233
231
  },
234
- offerName: 'DITO Level Up 99 x 365 days',
235
- salesPrice: 594,
236
- marketPrice: 1188,
237
- discountPercent: 50,
238
- salePercent: 5000,
232
+ offerName: 'Product Name',
233
+ salesPrice: 18000000,
234
+ specialPrice: 18000000,
235
+ marketPrice: 19000000,
236
+ discountPercent: 10,
237
+ salePercent: 500,
239
238
  sppType: '2'
240
239
  }, {
241
240
  imgUrlContent: {
242
- url: _defImg3["default"]
241
+ url: _defImg["default"]
243
242
  },
244
- offerName: 'DITO Level-Up Pack 99 7GB',
245
- salesPrice: 99,
246
- marketPrice: 138,
247
- discountPercent: 28,
248
- salePercent: 5000,
243
+ offerName: 'Product Name',
244
+ salesPrice: 18000000,
245
+ specialPrice: 18000000,
246
+ marketPrice: 19000000,
247
+ discountPercent: 10,
248
+ salePercent: 500,
249
249
  sppType: '2'
250
250
  }];
251
251
 
@@ -266,7 +266,7 @@ function (_super) {
266
266
  effDate: '',
267
267
  expDate: '',
268
268
  now: '',
269
- isWill: true
269
+ isWill: false
270
270
  };
271
271
 
272
272
  _this.getFlashData = function (pageSize, campaign) {
@@ -11,9 +11,7 @@ require("./index.less");
11
11
 
12
12
  var _lodash = _interopRequireDefault(require("lodash.throttle"));
13
13
 
14
- var _defImg = _interopRequireDefault(require("./imgs/defImg1.png"));
15
-
16
- var _defImg2 = _interopRequireDefault(require("./imgs/defImg2.png"));
14
+ var _defImg = _interopRequireDefault(require("./imgs/defImg.png"));
17
15
 
18
16
  var _ProductItem = _interopRequireDefault(require("../../../../common/components/ProductItem"));
19
17
 
@@ -224,21 +222,67 @@ var defaultData = [{
224
222
  imgUrlContent: {
225
223
  url: _defImg["default"]
226
224
  },
227
- offerName: 'DITO STARTER PACK + 3GB Data',
228
- salesPrice: 49,
229
- marketPrice: 100,
230
- discountPercent: 51,
231
- salePercent: 5000,
225
+ offerName: 'Product Name Long text',
226
+ salesPrice: 18000000,
227
+ specialPrice: 18000000,
228
+ marketPrice: 19000000,
229
+ discountPercent: 10,
230
+ salePercent: 500,
231
+ sppType: '2'
232
+ }, {
233
+ imgUrlContent: {
234
+ url: _defImg["default"]
235
+ },
236
+ offerName: 'Product Name Long text',
237
+ salesPrice: 18000000,
238
+ specialPrice: 18000000,
239
+ marketPrice: 19000000,
240
+ discountPercent: 10,
241
+ salePercent: 500,
242
+ sppType: '2'
243
+ }, {
244
+ imgUrlContent: {
245
+ url: _defImg["default"]
246
+ },
247
+ offerName: 'Product Name Long text',
248
+ salesPrice: 18000000,
249
+ specialPrice: 18000000,
250
+ marketPrice: 19000000,
251
+ discountPercent: 10,
252
+ salePercent: 500,
232
253
  sppType: '2'
233
254
  }, {
234
255
  imgUrlContent: {
235
- url: _defImg2["default"]
256
+ url: _defImg["default"]
257
+ },
258
+ offerName: 'Product Name Long text',
259
+ salesPrice: 18000000,
260
+ specialPrice: 18000000,
261
+ marketPrice: 19000000,
262
+ discountPercent: 10,
263
+ salePercent: 500,
264
+ sppType: '2'
265
+ }, {
266
+ imgUrlContent: {
267
+ url: _defImg["default"]
268
+ },
269
+ offerName: 'Product Name Long text',
270
+ salesPrice: 18000000,
271
+ specialPrice: 18000000,
272
+ marketPrice: 19000000,
273
+ discountPercent: 10,
274
+ salePercent: 500,
275
+ sppType: '2'
276
+ }, {
277
+ imgUrlContent: {
278
+ url: _defImg["default"]
236
279
  },
237
- offerName: 'DITO Level Up 99 x 365 days',
238
- salesPrice: 594,
239
- marketPrice: 1188,
240
- discountPercent: 50,
241
- salePercent: 5000,
280
+ offerName: 'Product Name Long text',
281
+ salesPrice: 18000000,
282
+ specialPrice: 18000000,
283
+ marketPrice: 19000000,
284
+ discountPercent: 10,
285
+ salePercent: 500,
242
286
  sppType: '2'
243
287
  }];
244
288
 
@@ -304,7 +304,9 @@ function (_super) {
304
304
 
305
305
  return [4
306
306
  /*yield*/
307
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/h5/pages/buyer/displaycatgs", {}, 'GET')];
307
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/h5/pages/buyer/displaycatgs", {
308
+ terminalType: 'PC'
309
+ }, 'GET')];
308
310
 
309
311
  case 1:
310
312
  res = _a.sent();
@@ -204,7 +204,7 @@ var getDefaultJSON = function getDefaultJSON() {
204
204
  productName: {
205
205
  id: (0, _uuid.v4)(),
206
206
  open: true,
207
- type: 'Text',
207
+ type: 'TEXT',
208
208
  specialContent: [],
209
209
  text: 'Flash Deal',
210
210
  content: {
@@ -227,7 +227,7 @@ var getDefaultJSON = function getDefaultJSON() {
227
227
  activityPrice: {
228
228
  id: (0, _uuid.v4)(),
229
229
  open: true,
230
- type: 'Text',
230
+ type: 'TEXT',
231
231
  specialContent: [],
232
232
  text: 'Flash Deal',
233
233
  content: {
@@ -250,7 +250,7 @@ var getDefaultJSON = function getDefaultJSON() {
250
250
  salesPrice: {
251
251
  id: (0, _uuid.v4)(),
252
252
  open: true,
253
- type: 'Text',
253
+ type: 'TEXT',
254
254
  specialContent: [],
255
255
  text: 'Flash Deal',
256
256
  content: {
@@ -63,6 +63,8 @@ var getDefaultJSON = function getDefaultJSON() {
63
63
  mobile: {
64
64
  paddingTop: 8,
65
65
  paddingBottom: 8,
66
+ paddingLeft: 15,
67
+ paddingRight: 15,
66
68
  marginBottom: 0
67
69
  }
68
70
  },
@@ -1,6 +1,6 @@
1
1
  .m-search-bar {
2
2
  height: 48px;
3
- padding: 8px 16px;
3
+ padding: 8px 0;
4
4
  display: flex;
5
5
  flex-direction: row-reverse;
6
6
  align-items: center;
@@ -9,11 +9,13 @@
9
9
 
10
10
  .right {
11
11
  display: flex;
12
+ flex: 1;
13
+ margin-left: 15px;
12
14
  align-items: center;
13
15
  justify-content: space-between;
14
16
 
15
17
  .search-input-wrap {
16
- width: 195px;
18
+ flex: 1;
17
19
  background: #fff;
18
20
  border-radius: 4px;
19
21
  border: 1px solid #D2D9E5;
@@ -24,7 +26,7 @@
24
26
 
25
27
  .message-wrap {
26
28
  position: relative;
27
- margin-left: 16px;
29
+ margin-left: 10px;
28
30
 
29
31
  .num {
30
32
  position: absolute;
@@ -57,7 +57,8 @@ function AppointmentModal(props) {
57
57
  onCancel: onClose,
58
58
  title: (0, _locale.i18n)('PUBLISH_LATER'),
59
59
  visible: visible,
60
- width: 500
60
+ width: 500,
61
+ wrapClassName: "m-appointment-modal"
61
62
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form, {
62
63
  autoComplete: "off",
63
64
  form: form,
@@ -1,10 +1,23 @@
1
- .footer {
2
- display: flex;
3
- justify-content: flex-end;
4
- }
5
- .tips {
6
- font-size: 13px;
7
- line-height: 18px;
8
- color: #A3AEC3;
9
- margin-bottom:40px;
1
+ [magic_design] .m-appointment-modal {
2
+
3
+ .footer {
4
+ display: flex;
5
+ justify-content: flex-end;
6
+ }
7
+
8
+ .tips {
9
+ font-size: 13px;
10
+ line-height: 18px;
11
+ color: #A3AEC3;
12
+ margin-bottom: 40px;
13
+ }
14
+
15
+ .ant-modal-body {
16
+ overflow: unset;
17
+ }
18
+
19
+ .ant-picker-ok button {
20
+ color: #fff;
21
+ }
22
+
10
23
  }
@@ -41,6 +41,22 @@ var __extends = void 0 && (void 0).__extends || function () {
41
41
  };
42
42
  }();
43
43
 
44
+ var __assign = void 0 && (void 0).__assign || function () {
45
+ __assign = Object.assign || function (t) {
46
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
47
+ s = arguments[i];
48
+
49
+ for (var p in s) {
50
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
51
+ }
52
+ }
53
+
54
+ return t;
55
+ };
56
+
57
+ return __assign.apply(this, arguments);
58
+ };
59
+
44
60
  var __rest = void 0 && (void 0).__rest || function (s, e) {
45
61
  var t = {};
46
62
 
@@ -133,7 +149,7 @@ function metaDecorator(WrappedComponent) {
133
149
  return false;
134
150
  };
135
151
 
136
- _this.getStyle = function () {
152
+ _this.getInteractStyle = function () {
137
153
  var _a = _this.state,
138
154
  hoveredMeta = _a.hoveredMeta,
139
155
  clickedMeta = _a.clickedMeta;
@@ -154,6 +170,22 @@ function metaDecorator(WrappedComponent) {
154
170
  }
155
171
 
156
172
  return style;
173
+ }; // text元组件在选中或悬浮时 需要实时展示其宽度
174
+
175
+
176
+ _this.getStyle = function () {
177
+ var _a = _this.props,
178
+ style = _a.style,
179
+ rest = __rest(_a, ["style"]);
180
+
181
+ var newStyle = __assign({}, style);
182
+
183
+ if (rest.data.type === 'TEXT') {
184
+ var width = window.magicDesign.device === 'pc' ? rest.data.content.pcWidth : rest.data.content.width;
185
+ newStyle.width = (width || 100) + "%";
186
+ }
187
+
188
+ return newStyle;
157
189
  };
158
190
 
159
191
  return _this;
@@ -177,13 +209,13 @@ function metaDecorator(WrappedComponent) {
177
209
  Wrapper.prototype.render = function () {
178
210
  var _a = this.props,
179
211
  className = _a.className,
180
- style = _a.style,
181
- rest = __rest(_a, ["className", "style"]);
212
+ rest = __rest(_a, ["className"]);
182
213
 
183
- var hoverStyle = this.getStyle();
214
+ var hoverStyle = this.getInteractStyle();
215
+ console.log(rest);
184
216
  return /*#__PURE__*/_react["default"].createElement("div", {
185
217
  className: className,
186
- style: style
218
+ style: this.getStyle()
187
219
  }, /*#__PURE__*/_react["default"].createElement("div", {
188
220
  className: "meta_wrap",
189
221
  onClick: this.onMetaClick,
@@ -94,7 +94,6 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
94
94
  };
95
95
 
96
96
  var contentStyle = function contentStyle(content) {
97
- var baseWidth = (window.magicDesign.device == 'pc' ? content.pcWidth : content.width) || 100;
98
97
  return {
99
98
  fontSize: window.magicDesign.device == 'pc' ? content.pcFontSize : content.fontSize,
100
99
  fontFamily: content.fontFamily,
@@ -103,8 +102,7 @@ var contentStyle = function contentStyle(content) {
103
102
  color: content.color,
104
103
  backgroundColor: content.backgroundColor,
105
104
  textAlign: content.textAlign,
106
- // width: (window.magicDesign.device == 'pc' ? content.pcWidth : content.width) || 'fit-content',
107
- width: Math.min(baseWidth, 100) + "%"
105
+ width: '100%'
108
106
  };
109
107
  };
110
108
  /** 从父级数组中 分离出 片段数组 */
@@ -343,6 +341,15 @@ function (_super) {
343
341
  var node = document.createElement('span');
344
342
  node.style = (0, _commonUtil.styleStringify)(contentStyle(c.content));
345
343
  node.innerText = (_a = data.text).slice.apply(_a, c.range);
344
+
345
+ node.onclick = function (e) {
346
+ if (c.content.clickUrl) {
347
+ e.stopPropagation();
348
+ }
349
+
350
+ (0, _coreUtil.clickUrl)(c.content.clickUrl);
351
+ };
352
+
346
353
  _this.selectionRefMap[JSON.stringify(c.range)] = node;
347
354
 
348
355
  _this.textRef.current.appendChild(node);
@@ -460,6 +467,9 @@ function (_super) {
460
467
  ref: this.textRef,
461
468
  className: (0, _classnames["default"])('m-meta-text', className),
462
469
  contentEditable: (0, _coreUtil.isDesignMode)() && !readonly,
470
+ onClick: function onClick() {
471
+ (0, _coreUtil.clickUrl)(data.content.clickUrl);
472
+ },
463
473
  onInput: function onInput(e) {
464
474
  var text = e.target.textContent;
465
475
  data.text = text;
@@ -1,6 +1,5 @@
1
1
  .m-meta-text {
2
2
  display: block;
3
- margin: 0 auto;
4
3
 
5
4
  .select-container {
6
5
  position: relative;
@@ -274,7 +274,7 @@ function (_super) {
274
274
 
275
275
  _this.selfRender();
276
276
  },
277
- value: data.content.clickUrl
277
+ value: textData.clickUrl
278
278
  })), /*#__PURE__*/_react["default"].createElement(_common.Field, {
279
279
  title: (0, _locale.i18n)('CONTENT_WIDTH')
280
280
  }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.0.90",
4
+ "version": "0.0.93",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",