@fonixtree/magic-design 0.0.150 → 0.0.151

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 (123) hide show
  1. package/es/assets/images/layout-icon/layout-video-h5-1.png +0 -0
  2. package/es/common/ImageModal/index.js +75 -31
  3. package/es/common/LinkModal/BundleCampaign/index.js +2 -2
  4. package/es/common/LinkModal/CatgTable/index.js +1 -1
  5. package/es/common/LinkModal/CouponTable/index.js +1 -1
  6. package/es/common/LinkModal/FilteredProductModal/index.js +5 -5
  7. package/es/common/LinkModal/FunctionTable/index.js +1 -1
  8. package/es/common/LinkModal/ProductDetailPage/index.js +3 -3
  9. package/es/common/LinkModal/index.js +2 -2
  10. package/es/common/ProductModal/index.js +4 -4
  11. package/es/common/UrlPicker/index.js +1 -1
  12. package/es/common/Video/closeImg.png +0 -0
  13. package/es/common/Video/index.js +14 -1
  14. package/es/common/Video/index.less +10 -6
  15. package/es/composite-comp/bol/components/Text/index.js +22 -8
  16. package/es/composite-comp/bol/components/Text/index.less +4 -6
  17. package/es/composite-comp/bol/components/Video/components/ShareBtn/index.less +7 -4
  18. package/es/composite-comp/bol/components/Video/components/VideoTag/index.js +9 -3
  19. package/es/composite-comp/bol/components/Video/components/VideoTag/index.less +2 -2
  20. package/es/composite-comp/bol/components/Video/defaultJSON.js +1 -1
  21. package/es/composite-comp/bol/components/Video/mobile/Layout1/index.js +7 -2
  22. package/es/composite-comp/bol/components/Video/mobile/Layout1/index.less +2 -2
  23. package/es/composite-comp/bol/components/Video/mobile/Layout2/index.js +8 -5
  24. package/es/composite-comp/bol/components/Video/mobile/Layout2/index.less +3 -3
  25. package/es/composite-comp/bol/components/Video/mobile/Layout3/index.js +17 -8
  26. package/es/composite-comp/bol/components/Video/mobile/Layout3/index.less +16 -3
  27. package/es/composite-comp/bol/components/Video/pc/Layout1/index.js +9 -11
  28. package/es/composite-comp/bol/components/Video/pc/Layout2/index.js +7 -4
  29. package/es/composite-comp/bol/components/Video/pc/Layout3/index.js +1 -0
  30. package/es/composite-comp/bol/components/Video/pc/Layout4/index.js +9 -2
  31. package/es/composite-comp/bol/components/Video/pc/Layout4/index.less +11 -4
  32. package/es/composite-comp/bol/components/Video/pc/Layout5/index.js +9 -2
  33. package/es/composite-comp/bol/components/Video/pc/Layout5/index.less +9 -2
  34. package/es/composite-comp/bol/components/Video/pc/index.js +14 -5
  35. package/es/composite-comp/common/components/ImageLabel/index.less +3 -2
  36. package/es/composite-comp/common/components/ProductItem/index.js +3 -2
  37. package/es/composite-comp/common/components/ProductItem/index.less +4 -9
  38. package/es/composite-comp/dito/components/PcNavigation/pc/index.js +1 -1
  39. package/es/composite-comp/dito/components/PcNavigation/pc/index.less +4 -2
  40. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
  41. package/es/composite-comp/dito/components/Recommend/mobile/index.js +2 -2
  42. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +4 -2
  43. package/es/composite-comp/dito/components/SearchBar/mobile/index.less +5 -0
  44. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +4 -6
  45. package/es/constants/index.js +3 -1
  46. package/es/core/Designer/ConfigPanel/index.js +12 -3
  47. package/es/core/Designer/LeftTitle/index.js +66 -0
  48. package/es/core/Designer/LeftTitle/index.less +9 -0
  49. package/es/core/Designer/QuickMenuBar/index.js +15 -5
  50. package/es/core/Designer/RenderHtml/index.js +89 -0
  51. package/es/core/Designer/RenderHtml/index.less +5 -0
  52. package/es/core/Designer/index.js +223 -4
  53. package/es/core/Renderer/index.js +5 -2
  54. package/es/decorator/compositeDecorator.js +2 -2
  55. package/es/locale/en/en.json +1 -0
  56. package/es/locale/es/es.json +1 -0
  57. package/es/locale/id/id.json +1 -0
  58. package/es/meta-comp/components/Text/index.js +55 -16
  59. package/es/utils/businessUtil.js +3 -3
  60. package/es/utils/commonUtil.js +11 -0
  61. package/es/utils/coreUtil.js +8 -4
  62. package/lib/assets/images/layout-icon/layout-video-h5-1.png +0 -0
  63. package/lib/common/ImageModal/index.js +75 -31
  64. package/lib/common/LinkModal/BundleCampaign/index.js +2 -2
  65. package/lib/common/LinkModal/CatgTable/index.js +1 -1
  66. package/lib/common/LinkModal/CouponTable/index.js +1 -1
  67. package/lib/common/LinkModal/FilteredProductModal/index.js +5 -5
  68. package/lib/common/LinkModal/FunctionTable/index.js +1 -1
  69. package/lib/common/LinkModal/ProductDetailPage/index.js +3 -3
  70. package/lib/common/LinkModal/index.js +2 -2
  71. package/lib/common/ProductModal/index.js +4 -4
  72. package/lib/common/UrlPicker/index.js +1 -1
  73. package/lib/common/Video/closeImg.png +0 -0
  74. package/lib/common/Video/index.js +14 -1
  75. package/lib/common/Video/index.less +10 -6
  76. package/lib/composite-comp/bol/components/Text/index.js +22 -8
  77. package/lib/composite-comp/bol/components/Text/index.less +4 -6
  78. package/lib/composite-comp/bol/components/Video/components/ShareBtn/index.less +7 -4
  79. package/lib/composite-comp/bol/components/Video/components/VideoTag/index.js +9 -3
  80. package/lib/composite-comp/bol/components/Video/components/VideoTag/index.less +2 -2
  81. package/lib/composite-comp/bol/components/Video/defaultJSON.js +1 -1
  82. package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.js +7 -2
  83. package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.less +2 -2
  84. package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.js +8 -5
  85. package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.less +3 -3
  86. package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.js +17 -8
  87. package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.less +16 -3
  88. package/lib/composite-comp/bol/components/Video/pc/Layout1/index.js +9 -11
  89. package/lib/composite-comp/bol/components/Video/pc/Layout2/index.js +7 -4
  90. package/lib/composite-comp/bol/components/Video/pc/Layout3/index.js +1 -0
  91. package/lib/composite-comp/bol/components/Video/pc/Layout4/index.js +9 -2
  92. package/lib/composite-comp/bol/components/Video/pc/Layout4/index.less +11 -4
  93. package/lib/composite-comp/bol/components/Video/pc/Layout5/index.js +9 -2
  94. package/lib/composite-comp/bol/components/Video/pc/Layout5/index.less +9 -2
  95. package/lib/composite-comp/bol/components/Video/pc/index.js +14 -5
  96. package/lib/composite-comp/common/components/ImageLabel/index.less +3 -2
  97. package/lib/composite-comp/common/components/ProductItem/index.js +3 -2
  98. package/lib/composite-comp/common/components/ProductItem/index.less +4 -9
  99. package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +1 -1
  100. package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +4 -2
  101. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
  102. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +2 -2
  103. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +4 -2
  104. package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +5 -0
  105. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +4 -6
  106. package/lib/constants/index.js +3 -1
  107. package/lib/core/Designer/ConfigPanel/index.js +12 -3
  108. package/lib/core/Designer/LeftTitle/index.js +66 -0
  109. package/lib/core/Designer/LeftTitle/index.less +9 -0
  110. package/lib/core/Designer/QuickMenuBar/index.js +15 -5
  111. package/lib/core/Designer/RenderHtml/index.js +89 -0
  112. package/lib/core/Designer/RenderHtml/index.less +5 -0
  113. package/lib/core/Designer/index.js +223 -4
  114. package/lib/core/Renderer/index.js +5 -2
  115. package/lib/decorator/compositeDecorator.js +2 -2
  116. package/lib/locale/en/en.json +1 -0
  117. package/lib/locale/es/es.json +1 -0
  118. package/lib/locale/id/id.json +1 -0
  119. package/lib/meta-comp/components/Text/index.js +55 -16
  120. package/lib/utils/businessUtil.js +3 -3
  121. package/lib/utils/commonUtil.js +11 -0
  122. package/lib/utils/coreUtil.js +8 -4
  123. package/package.json +3 -2
@@ -319,7 +319,8 @@ function (_super) {
319
319
  node.appendChild(closeNode);
320
320
  };
321
321
 
322
- _this.renderText = function (data) {
322
+ _this.renderText = function (data, mode) {
323
+ var outputType = _this.props.outputType || window.magicDesign.outputType;
323
324
  if (!_this.textRef.current) return;
324
325
 
325
326
  _this.textRef.current.blur();
@@ -332,23 +333,57 @@ function (_super) {
332
333
  /** 渲染html */
333
334
 
334
335
  if (data.specialContent.length == 0) {
335
- _this.textRef.current.innerHTML = data.text;
336
+ if (outputType == 'html' && mode == 'renderer') {
337
+ if (data === null || data === void 0 ? void 0 : data.content.clickUrl) {
338
+ var a = document.createElement('a');
339
+ a.href = data.content.clickUrl;
340
+ a.target = '_blank';
341
+ a.innerHTML = data.text;
342
+ _this.textRef.current.innerHTML = '';
343
+
344
+ _this.textRef.current.appendChild(a);
345
+ } else {
346
+ _this.textRef.current.innerHTML = data.text;
347
+ }
348
+ } else {
349
+ _this.textRef.current.innerHTML = data.text;
350
+ }
336
351
  } else {
337
352
  _this.textRef.current.innerHTML = '';
338
353
  data.specialContent.forEach(function (c, index) {
339
- var _a;
354
+ var _a, _b, _c;
340
355
 
341
356
  var node = document.createElement('span');
342
357
  node.style = (0, _commonUtil.styleStringify)(contentStyle(c.content));
343
- node.innerText = (_a = data.text).slice.apply(_a, c.range);
344
358
 
345
- node.onclick = function (e) {
346
- if (c.content.clickUrl) {
347
- e.stopPropagation();
348
- }
359
+ if (c === null || c === void 0 ? void 0 : c.content.clickUrl) {
360
+ if (outputType == 'html' && mode == 'renderer') {
361
+ var a = document.createElement('a');
362
+ a.href = c.content.clickUrl;
363
+ a.target = '_blank';
364
+
365
+ if (mode == 'designer') {
366
+ a.onclick = function (e) {
367
+ e.preventDefault();
368
+ };
369
+ }
349
370
 
350
- (0, _coreUtil.clickUrl)(c.content.clickUrl);
351
- };
371
+ a.innerText = (_a = data.text).slice.apply(_a, c.range);
372
+ node.appendChild(a);
373
+ } else {
374
+ node.innerText = (_b = data.text).slice.apply(_b, c.range);
375
+
376
+ node.onclick = function (e) {
377
+ if (c.content.clickUrl) {
378
+ e.stopPropagation();
379
+ }
380
+
381
+ (0, _coreUtil.clickUrl)(c.content.clickUrl);
382
+ };
383
+ }
384
+ } else {
385
+ node.innerText = (_c = data.text).slice.apply(_c, c.range);
386
+ }
352
387
 
353
388
  _this.selectionRefMap[JSON.stringify(c.range)] = node;
354
389
 
@@ -356,7 +391,7 @@ function (_super) {
356
391
  /** 找到当前选中的区域 */
357
392
 
358
393
 
359
- if (_mobx.store.textSelection == c.content) {
394
+ if (_mobx.store.textSelection == (c === null || c === void 0 ? void 0 : c.content)) {
360
395
  /** 添加删除按钮 */
361
396
  _this.createHoverClose(node, function () {
362
397
  /** 第一步去除选中区域 */
@@ -402,14 +437,14 @@ function (_super) {
402
437
  Text.prototype.componentDidMount = function () {
403
438
  var _this = this;
404
439
 
405
- this.renderText(this.props.data);
440
+ this.renderText(this.props.data, this.props.mode);
406
441
  initSelectionEvent();
407
442
  appendSelectionTarget({
408
443
  target: this.textRef.current,
409
444
  data: this.props.data,
410
445
  selectionRefMap: this.selectionRefMap,
411
446
  refresh: function refresh() {
412
- _this.renderText(_this.props.data);
447
+ _this.renderText(_this.props.data, _this.props.mode);
413
448
  }
414
449
  });
415
450
  };
@@ -421,7 +456,7 @@ function (_super) {
421
456
  var result = should1 || should2 || should3;
422
457
 
423
458
  if (result) {
424
- this.renderText(nextProps.data);
459
+ this.renderText(nextProps.data, this.props.mode);
425
460
  }
426
461
 
427
462
  return result;
@@ -438,7 +473,8 @@ function (_super) {
438
473
  data = _a.data,
439
474
  className = _a.className,
440
475
  readonly = _a.readonly,
441
- onTextInput = _a.onTextInput;
476
+ onTextInput = _a.onTextInput,
477
+ mode = _a.mode;
442
478
  var style = contentStyle(data.content);
443
479
 
444
480
  if (data.underline) {
@@ -461,12 +497,14 @@ function (_super) {
461
497
  // textDecorationColor: data?.underline.textDecorationColor,
462
498
  // textDecorationStyle: data?.underline.textDecorationStyle,
463
499
  // };
500
+ // mode == 'designer' && !readonly
501
+ // console.log('!readonly: ', mode, readonly);
464
502
 
465
503
 
466
504
  return /*#__PURE__*/_react["default"].createElement("div", {
467
505
  ref: this.textRef,
468
506
  className: (0, _classnames["default"])('m-meta-text', className),
469
- contentEditable: (0, _coreUtil.isDesignMode)() && !readonly,
507
+ contentEditable: mode == 'designer' && !readonly,
470
508
  onClick: function onClick() {
471
509
  (0, _coreUtil.clickUrl)(data.content.clickUrl);
472
510
  },
@@ -495,6 +533,7 @@ function (_super) {
495
533
 
496
534
  Text.defaultProps = {
497
535
  readonly: false,
536
+ mode: 'designer',
498
537
  onTextInput: function onTextInput() {}
499
538
  };
500
539
  Text = __decorate([_decorator.metaDecorator], Text);
@@ -57,12 +57,12 @@ var parseUrl = function parseUrl(url) {
57
57
 
58
58
  case _constants.urlType.CUSTOMIZED:
59
59
  // 自定义页面
60
- pcLink = "/group/" + arg1;
61
- h5Link = "/group/" + arg1;
60
+ pcLink = "/poster/" + arg1;
61
+ h5Link = "/poster/" + arg1;
62
62
  params = {
63
63
  type: 'CUSTOMIZED',
64
64
  data: {
65
- url: "/group/" + arg1
65
+ url: "/poster/" + arg1
66
66
  }
67
67
  };
68
68
  break;
@@ -9,6 +9,7 @@ exports.checkFileName = exports.calcLastTime = void 0;
9
9
  exports.commonFetch = commonFetch;
10
10
  exports.convertImageUrl = convertImageUrl;
11
11
  exports.copy2ClipBoard = copy2ClipBoard;
12
+ exports.covertKey = covertKey;
12
13
  exports.dragSource = void 0;
13
14
  exports.ensure = ensure;
14
15
  exports.getColorRgba = void 0;
@@ -22,6 +23,8 @@ exports.styleStringify = void 0;
22
23
 
23
24
  var _axios = _interopRequireDefault(require("axios"));
24
25
 
26
+ var _lodash = require("lodash");
27
+
25
28
  var _qs = _interopRequireDefault(require("qs"));
26
29
 
27
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -463,4 +466,12 @@ function pushGA(data) {
463
466
  pageName_moduleName_groupName: 'pageName_moduleName_groupName' + random,
464
467
  pageName_moduleName_groupName_elementNam: 'pageName_moduleName_groupName_elementNam' + random
465
468
  }, data)); // }, 1000);
469
+ }
470
+ /** react key 计算 */
471
+
472
+
473
+ function covertKey(data, func) {
474
+ var newData = (0, _lodash.cloneDeep)(data);
475
+ func(newData);
476
+ return JSON.stringify(newData);
466
477
  }
@@ -287,9 +287,9 @@ var getCoupon = function getCoupon(couponId) {
287
287
  };
288
288
 
289
289
  var clickUrl = function clickUrl(url) {
290
- console.log('url', url);
290
+ console.log('clickUrl...', url);
291
291
 
292
- if (window.magicDesign.readOnly || window.magicDesign.mode !== 'renderer' || !url) {
292
+ if (window.magicDesign.readOnly || window.magicDesign.mode !== 'renderer' || !url || window.magicDesign.outputType == 'html') {
293
293
  return;
294
294
  }
295
295
 
@@ -310,9 +310,13 @@ var clickUrl = function clickUrl(url) {
310
310
  if (url.startsWith('/')) {
311
311
  (0, _commonUtil.navigateTo)(url);
312
312
  } else {
313
- // location.href = url;
314
313
  var newUrl = isPc() ? pcLink : h5Link;
315
- (0, _commonUtil.navigateTo)(newUrl);
314
+
315
+ if (newUrl.startsWith('/')) {
316
+ (0, _commonUtil.navigateTo)(newUrl);
317
+ } else {
318
+ window.location.href = newUrl;
319
+ }
316
320
  }
317
321
 
318
322
  return;
@@ -243,45 +243,49 @@ function ImageModal(_a) {
243
243
  selectedPics = _f[0],
244
244
  setSelectedPics = _f[1];
245
245
 
246
- var _g = (0, _react.useState)([]),
247
- contents = _g[0],
248
- setContents = _g[1];
246
+ var _g = (0, _react.useState)(''),
247
+ wapUrl = _g[0],
248
+ setWapUrl = _g[1];
249
249
 
250
- var _h = (0, _react.useState)(0),
251
- total = _h[0],
252
- setTotal = _h[1];
250
+ var _h = (0, _react.useState)([]),
251
+ contents = _h[0],
252
+ setContents = _h[1];
253
253
 
254
- var _j = (0, _react.useState)(1),
255
- pageIndex = _j[0],
256
- setPageIndex = _j[1];
254
+ var _j = (0, _react.useState)(0),
255
+ total = _j[0],
256
+ setTotal = _j[1];
257
257
 
258
- var _k = (0, _react.useState)(20),
259
- pageSize = _k[0],
260
- setPageSize = _k[1];
258
+ var _k = (0, _react.useState)(1),
259
+ pageIndex = _k[0],
260
+ setPageIndex = _k[1];
261
261
 
262
- var _l = (0, _react.useState)(false),
263
- spinning = _l[0],
264
- setSpinning = _l[1];
262
+ var _l = (0, _react.useState)(20),
263
+ pageSize = _l[0],
264
+ setPageSize = _l[1];
265
265
 
266
- var _m = (0, _react.useState)(''),
267
- name = _m[0],
268
- setName = _m[1];
266
+ var _m = (0, _react.useState)(false),
267
+ spinning = _m[0],
268
+ setSpinning = _m[1];
269
269
 
270
- var _o = (0, _react.useState)([]),
271
- contentcatgsList = _o[0],
272
- setContentcatgsList = _o[1];
270
+ var _o = (0, _react.useState)(''),
271
+ name = _o[0],
272
+ setName = _o[1];
273
273
 
274
- var _p = (0, _react.useState)(''),
275
- searchValue = _p[0],
276
- setSearchValue = _p[1];
274
+ var _p = (0, _react.useState)([]),
275
+ contentcatgsList = _p[0],
276
+ setContentcatgsList = _p[1];
277
277
 
278
- var _q = (0, _react.useState)([]),
279
- expandedKeys = _q[0],
280
- setExpandedKeys = _q[1];
278
+ var _q = (0, _react.useState)(''),
279
+ searchValue = _q[0],
280
+ setSearchValue = _q[1];
281
281
 
282
- var _r = (0, _react.useState)(true),
283
- autoExpandParent = _r[0],
284
- setAutoExpandParent = _r[1]; // const currentUser = sessionUtil.getUser() || {};
282
+ var _r = (0, _react.useState)([]),
283
+ expandedKeys = _r[0],
284
+ setExpandedKeys = _r[1];
285
+
286
+ var _s = (0, _react.useState)(true),
287
+ autoExpandParent = _s[0],
288
+ setAutoExpandParent = _s[1]; // const currentUser = sessionUtil.getUser() || {};
285
289
  // const { _csrf } = currentUser;
286
290
  // const headers = {};
287
291
  // if (_csrf && _csrf.headerName) {
@@ -425,8 +429,44 @@ function ImageModal(_a) {
425
429
  });
426
430
  };
427
431
 
432
+ var getPreConfig = function getPreConfig() {
433
+ return __awaiter(_this, void 0, void 0, function () {
434
+ var wapUrl_1, error_1;
435
+ return __generator(this, function (_a) {
436
+ switch (_a.label) {
437
+ case 0:
438
+ _a.trys.push([0, 2,, 3]);
439
+
440
+ return [4
441
+ /*yield*/
442
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/pages/platforminfo")];
443
+
444
+ case 1:
445
+ wapUrl_1 = _a.sent().wapUrl;
446
+ setWapUrl(wapUrl_1);
447
+ return [3
448
+ /*break*/
449
+ , 3];
450
+
451
+ case 2:
452
+ error_1 = _a.sent();
453
+ console.error(error_1);
454
+ return [3
455
+ /*break*/
456
+ , 3];
457
+
458
+ case 3:
459
+ return [2
460
+ /*return*/
461
+ ];
462
+ }
463
+ });
464
+ });
465
+ };
466
+
428
467
  (0, _react.useEffect)(function () {
429
468
  getContentCatgs();
469
+ getPreConfig();
430
470
  }, []);
431
471
 
432
472
  var selectFolder = function selectFolder(id) {
@@ -676,7 +716,11 @@ function ImageModal(_a) {
676
716
  },
677
717
  onCancel: onCancel,
678
718
  onOk: function onOk() {
679
- return _onOk(selectedPics);
719
+ return _onOk(selectedPics.map(function (item) {
720
+ return __assign(__assign({}, item), {
721
+ url: wapUrl + item.url
722
+ });
723
+ }));
680
724
  },
681
725
  visible: visible
682
726
  }, /*#__PURE__*/_react["default"].createElement(_antd.Row, {
@@ -251,7 +251,7 @@ var BundleCampaign = function BundleCampaign(props) {
251
251
  case 0:
252
252
  return [4
253
253
  /*yield*/
254
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/bundle/list", params, 'GET')];
254
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/bundle/list", params, 'GET')];
255
255
 
256
256
  case 1:
257
257
  res = _a.sent();
@@ -284,7 +284,7 @@ var BundleCampaign = function BundleCampaign(props) {
284
284
  case 0:
285
285
  return [4
286
286
  /*yield*/
287
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/stores/list", {}, 'GET')];
287
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/stores/list", {}, 'GET')];
288
288
 
289
289
  case 1:
290
290
  res = _a.sent();
@@ -184,7 +184,7 @@ function CatgTable(props) {
184
184
  setLoading(true);
185
185
  return [4
186
186
  /*yield*/
187
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/offercatgs/list", {}, 'GET')];
187
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/offercatgs/list", {}, 'GET')];
188
188
 
189
189
  case 1:
190
190
  res = _a.sent();
@@ -250,7 +250,7 @@ function CouponTable(props) {
250
250
  setLoading(true);
251
251
  return [4
252
252
  /*yield*/
253
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/coupons/couponList/page?tableFlag=effective&isPublic=Y&state=A&pageTotal=false&couponLocation=Promotion", params, 'GET')];
253
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/coupons/couponList/page?tableFlag=effective&isPublic=Y&state=A&pageTotal=false&couponLocation=Promotion", params, 'GET')];
254
254
 
255
255
  case 1:
256
256
  res = _a.sent();
@@ -346,7 +346,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
346
346
  case 0:
347
347
  return [4
348
348
  /*yield*/
349
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/offercatgs/list", {}, 'GET')];
349
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/offercatgs/list", {}, 'GET')];
350
350
 
351
351
  case 1:
352
352
  res = _a.sent();
@@ -368,7 +368,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
368
368
  case 0:
369
369
  return [4
370
370
  /*yield*/
371
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/brands/list", {}, 'GET')];
371
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/brands/list", {}, 'GET')];
372
372
 
373
373
  case 1:
374
374
  res = _a.sent();
@@ -390,7 +390,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
390
390
  case 0:
391
391
  return [4
392
392
  /*yield*/
393
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/labels/list", {}, 'GET')];
393
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/labels/list", {}, 'GET')];
394
394
 
395
395
  case 1:
396
396
  res = _a.sent();
@@ -412,7 +412,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
412
412
  case 0:
413
413
  return [4
414
414
  /*yield*/
415
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/stores/list", {}, 'GET')];
415
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/stores/list", {}, 'GET')];
416
416
 
417
417
  case 1:
418
418
  res = _a.sent();
@@ -468,7 +468,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
468
468
  };
469
469
  return [4
470
470
  /*yield*/
471
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/offers/es", params, 'POST')];
471
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/offers/es", params, 'POST')];
472
472
 
473
473
  case 1:
474
474
  res = _a.sent(); // const res = await commonFetch(`${window.magicDesign.MBaseUrl}/products`, params, 'GET');
@@ -193,7 +193,7 @@ function FunctionTable(props) {
193
193
  setLoading(true);
194
194
  return [4
195
195
  /*yield*/
196
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/pages/functions", {}, 'GET')];
196
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/pages/functions", {}, 'GET')];
197
197
 
198
198
  case 1:
199
199
  res = _a.sent();
@@ -279,7 +279,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
279
279
  case 0:
280
280
  return [4
281
281
  /*yield*/
282
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/products", params, 'GET')];
282
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/products", params, 'GET')];
283
283
 
284
284
  case 1:
285
285
  res = _a.sent();
@@ -304,7 +304,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
304
304
  case 0:
305
305
  return [4
306
306
  /*yield*/
307
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/brands/list", {}, 'GET')];
307
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/brands/list", {}, 'GET')];
308
308
 
309
309
  case 1:
310
310
  res = _a.sent();
@@ -326,7 +326,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
326
326
  case 0:
327
327
  return [4
328
328
  /*yield*/
329
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/stores/list", {}, 'GET')];
329
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/stores/list", {}, 'GET')];
330
330
 
331
331
  case 1:
332
332
  res = _a.sent();
@@ -276,11 +276,11 @@ var LinkModal = function LinkModal(props) {
276
276
  onChange: function onChange(value) {
277
277
  return setLinkUrl(value);
278
278
  }
279
- }), selected === 'ProductDetailsPage' && /*#__PURE__*/_react["default"].createElement(_ProductDetailPage["default"], {
279
+ }), selected === 'ProductDetailPage' && /*#__PURE__*/_react["default"].createElement(_ProductDetailPage["default"], {
280
280
  setUrl: function setUrl(url) {
281
281
  return setLinkUrl(url);
282
282
  }
283
- }), selected === 'FilteredProducts' && /*#__PURE__*/_react["default"].createElement(_FilteredProductModal["default"], {
283
+ }), selected === 'FilteredProduct' && /*#__PURE__*/_react["default"].createElement(_FilteredProductModal["default"], {
284
284
  onDataChange: function onDataChange(url, t) {
285
285
  setLinkUrl(url);
286
286
  setTotal(t);
@@ -356,7 +356,7 @@ var ProductModal = function ProductModal(props) {
356
356
  case 0:
357
357
  return [4
358
358
  /*yield*/
359
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/products", data, 'GET')];
359
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/products", data, 'GET')];
360
360
 
361
361
  case 1:
362
362
  res = _a.sent();
@@ -407,7 +407,7 @@ var ProductModal = function ProductModal(props) {
407
407
  case 0:
408
408
  return [4
409
409
  /*yield*/
410
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/offerdiscatgs/brands", {}, 'GET')];
410
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/offerdiscatgs/brands", {}, 'GET')];
411
411
 
412
412
  case 1:
413
413
  res = _a.sent();
@@ -429,7 +429,7 @@ var ProductModal = function ProductModal(props) {
429
429
  case 0:
430
430
  return [4
431
431
  /*yield*/
432
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/labels/list", {}, 'GET')];
432
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/labels/list", {}, 'GET')];
433
433
 
434
434
  case 1:
435
435
  res = _a.sent();
@@ -451,7 +451,7 @@ var ProductModal = function ProductModal(props) {
451
451
  case 0:
452
452
  return [4
453
453
  /*yield*/
454
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/stores/list", {}, 'GET')];
454
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/stores/list", {}, 'GET')];
455
455
 
456
456
  case 1:
457
457
  res = _a.sent();
@@ -80,7 +80,7 @@ function (_super) {
80
80
  value: value
81
81
  }), /*#__PURE__*/_react["default"].createElement("div", {
82
82
  className: "icon-btns"
83
- }, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
83
+ }, window.magicDesign.outputType != 'html' && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
84
84
  color: "#000",
85
85
  onClick: function onClick() {
86
86
  return _this.setState({
Binary file
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _components = _interopRequireDefault(require("./components"));
11
11
 
12
+ var _closeImg = _interopRequireDefault(require("./closeImg.png"));
13
+
12
14
  var _commonUtil = require("../../utils/commonUtil");
13
15
 
14
16
  require("./index.less");
@@ -329,9 +331,20 @@ function (_super) {
329
331
  var videoDom = document.createElement('div');
330
332
  videoDom.id = 'video-modal-' + videoId;
331
333
  contentWrap.appendChild(videoDom);
334
+ var closeImgDom = document.createElement('img');
335
+ closeImgDom.src = _closeImg["default"];
336
+ closeImgDom.className = 'close-img-wrap';
337
+
338
+ closeImgDom.onclick = function () {
339
+ var _a;
340
+
341
+ (_a = document.querySelector("[video-id=\"" + videoId + "\"]")) === null || _a === void 0 ? void 0 : _a.remove();
342
+ };
343
+
344
+ contentWrap.appendChild(closeImgDom);
332
345
  modelWrap.appendChild(shadowWrap);
333
346
  modelWrap.appendChild(contentWrap);
334
- document.body.appendChild(modelWrap);
347
+ (document.querySelector('[magic_designer]') || document.body).document.body.appendChild(modelWrap);
335
348
  createVideo('-modal-' + videoId, __assign(__assign({}, _this.props.opts), {
336
349
  autoplay: true
337
350
  }));
@@ -1,12 +1,7 @@
1
1
  .video-container {
2
2
  position: relative;
3
3
  height: 100%;
4
- background: url(./background.png);
5
- background-size: cover;
6
- // .prism-player .prism-liveshift-progress,
7
- // .prism-player .prism-progress {
8
- // bottom: 10px !important;
9
- // }
4
+ background-image: linear-gradient(0, rgba(0, 0, 0, .2), rgba(0, 0, 0, .1), rgba(0, 0, 0, .2));
10
5
 
11
6
  .prism-player .prism-cover {
12
7
  z-index: 0;
@@ -43,5 +38,14 @@
43
38
  border-radius: 5px;
44
39
  z-index: 1001;
45
40
  position: fixed;
41
+
42
+ .close-img-wrap {
43
+ position: absolute;
44
+ right: 14px;
45
+ top: 14px;
46
+ width: 20px;
47
+ height: 20px;
48
+ cursor: pointer;
49
+ }
46
50
  }
47
51
  }