@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
@@ -36,9 +36,10 @@
36
36
 
37
37
 
38
38
  &.position-6 {
39
- position: relative;
40
- float: left;
39
+ position: unset;
41
40
  height: 18px;
42
41
  margin-right: 5px;
42
+ vertical-align: middle;
43
+ float: left;
43
44
  }
44
45
  }
@@ -186,16 +186,17 @@ function (_super) {
186
186
  });
187
187
  })), /*#__PURE__*/_react["default"].createElement("div", {
188
188
  className: "product-name-wrap"
189
+ }, /*#__PURE__*/_react["default"].createElement("div", {
190
+ className: "box"
189
191
  }, prodLabels.length > 0 && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
190
192
  labels: prodLabels,
191
193
  small: true
192
194
  }), showProName && panelProps.productName.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
193
- className: "product-name",
194
195
  data: __assign(__assign({}, panelProps.productName), {
195
196
  text: data.offerName
196
197
  }),
197
198
  readonly: true
198
- })), panelProps.activityPrice.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
199
+ }))), panelProps.activityPrice.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
199
200
  className: "price",
200
201
  data: __assign(__assign({}, panelProps.activityPrice), {
201
202
  text: _price
@@ -34,18 +34,13 @@
34
34
  }
35
35
 
36
36
  .product-name-wrap {
37
- margin-bottom: 3px;
37
+ overflow: hidden;
38
+ text-overflow: ellipsis;
38
39
  display: -webkit-box;
39
- -webkit-line-clamp: 2;
40
40
  -webkit-box-orient: vertical;
41
- overflow: hidden;
42
- clear: both;
43
- }
44
-
45
- .product-name {
41
+ -webkit-line-clamp: 2;
46
42
  line-height: 18px;
47
- word-break: break-all;
48
- white-space: normal;
43
+ max-height: 40px;
49
44
  }
50
45
 
51
46
  .price {
@@ -256,7 +256,7 @@ var jumpUrlConfig = function jumpUrlConfig(item) {
256
256
  }
257
257
 
258
258
  case 'CustomizedPage':
259
- jumpUrl = "/group/" + objValue.objId;
259
+ jumpUrl = "/poster/" + objValue.objId;
260
260
  (0, _commonUtil.navigateTo)(jumpUrl);
261
261
  break;
262
262
 
@@ -7,7 +7,7 @@
7
7
  display: flex;
8
8
  align-items: center;
9
9
  min-width: 130px;
10
- margin-right: 180px;
10
+ margin-right: 44px;
11
11
 
12
12
  &:hover {
13
13
  @keyframes show-active{
@@ -39,6 +39,7 @@
39
39
  .menu-drop {
40
40
  display: flex;
41
41
  align-items: center;
42
+ flex-shrink: 0;
42
43
  &> img {
43
44
  width: 16px;
44
45
  margin-right: 10px;
@@ -91,11 +92,12 @@
91
92
  .category-group {
92
93
  display: flex;
93
94
  overflow-x: auto;
94
- // flex: 1;
95
+ flex: 1;
95
96
  scroll-snap-type: x;
96
97
  .one-category {
97
98
  margin-right: 44px;
98
99
  scroll-snap-align: end;
100
+ width: fit-content !important;
99
101
  cursor: pointer;
100
102
  &:last-of-type {
101
103
  margin-right: 0;
@@ -100,7 +100,7 @@ var recommendGroupSourceJSON = function recommendGroupSourceJSON(parentId, logo,
100
100
  },
101
101
  sourceType: 'recommend',
102
102
  prodIds: '',
103
- intelligentType: '',
103
+ intelligentType: 'Hot',
104
104
  intelligentValue: [],
105
105
  maxProdNum: 10,
106
106
  hover: {
@@ -283,7 +283,7 @@ function (_super) {
283
283
  };
284
284
 
285
285
  _this.initTab = function (index, hideTabs) {
286
- var selectedTabDom = document.querySelector(".tab-select-wrap .tabTitle:nth-child(" + (index + 1) + ")");
286
+ var selectedTabDom = document.querySelector(".recommend_" + _this.props.panelProps.id + " .tab-select-wrap .tabTitle:nth-child(" + (index + 1) + ")");
287
287
  var tabLeft = 0;
288
288
  var tabWidth = 0;
289
289
 
@@ -589,7 +589,7 @@ function (_super) {
589
589
  if (layout === 'layout1' && contentWidth) imgHeight = (contentWidth - 12) / 2;
590
590
  if (layout === 'layout3' && contentWidth) imgHeight = (contentWidth - 12 * 2) / 3;
591
591
  return /*#__PURE__*/_react["default"].createElement("div", {
592
- className: "m-recommend-mobile"
592
+ className: "m-recommend-mobile recommend_" + panelProps.id
593
593
  }, !hideTabs && /*#__PURE__*/_react["default"].createElement("div", {
594
594
  className: "tab-select-wrap"
595
595
  }, groupSource.map(function (tab, index) {
@@ -278,12 +278,14 @@ function (_super) {
278
278
  type: "icon-ChatDots"
279
279
  }), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
280
280
  className: "num"
281
- }, messageNum))), data.content && ((_j = data.content.logo) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
281
+ }, messageNum))), data.content && ((_j = data.content.logo) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement("div", {
282
+ className: "logo"
283
+ }, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
282
284
  data: data.content.logo,
283
285
  style: {
284
286
  height: 30
285
287
  }
286
- }));
288
+ })));
287
289
  };
288
290
 
289
291
  SearchMobile.defaultProps = {
@@ -47,4 +47,9 @@
47
47
  }
48
48
  }
49
49
  }
50
+ .logo {
51
+ img {
52
+ width: auto;
53
+ }
54
+ }
50
55
  }
@@ -215,7 +215,7 @@ function (_super) {
215
215
  var _this = _super !== null && _super.apply(this, arguments) || this;
216
216
 
217
217
  _this.state = {
218
- intelligentType: 'ALL',
218
+ intelligentType: 'Hot',
219
219
  intelligentValue: [],
220
220
  categoryData: [],
221
221
  brandData: [],
@@ -255,7 +255,7 @@ function (_super) {
255
255
  ];
256
256
  return [4
257
257
  /*yield*/
258
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/offercatgs/list")];
258
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/offercatgs/list")];
259
259
 
260
260
  case 1:
261
261
  res = _a.sent();
@@ -275,7 +275,7 @@ function (_super) {
275
275
  ];
276
276
  return [4
277
277
  /*yield*/
278
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/brands/list")];
278
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/brands/list")];
279
279
 
280
280
  case 3:
281
281
  res = _a.sent();
@@ -295,7 +295,7 @@ function (_super) {
295
295
  ];
296
296
  return [4
297
297
  /*yield*/
298
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/labels/list")];
298
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/operation/v1/labels/list")];
299
299
 
300
300
  case 5:
301
301
  res = _a.sent();
@@ -356,8 +356,6 @@ function (_super) {
356
356
  showSearch: true,
357
357
  value: intelligentType
358
358
  }, /*#__PURE__*/_react["default"].createElement(Option, {
359
- value: "ALL"
360
- }, (0, _locale.i18n)('ALL')), /*#__PURE__*/_react["default"].createElement(Option, {
361
359
  value: "Hot"
362
360
  }, (0, _locale.i18n)('HOT')), /*#__PURE__*/_react["default"].createElement(Option, {
363
361
  value: "Like"
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.urlType = exports.respCodeMap = exports.quickMenuCode = exports.metaType = exports.metaInst = exports.metaInsType = exports.magicMode = exports.eventType = exports.deviceTypeWidthMap = exports.deviceTypeMap = exports.compInfoMap = exports.STORAGE_KEY = exports.CREDIT_STATE = void 0;
7
7
  var STORAGE_KEY = {
8
- LOCALE: 'magicLocale'
8
+ LOCALE: 'magicLocale',
9
+ MAGIC_RENDER_HTML: 'MAGIC_RENDER_HTML',
10
+ MAGIC_RENDER_PAGEDATA: 'MAGIC_RENDER_PAGEDATA'
9
11
  };
10
12
  /** 授信状态 */
11
13
 
@@ -217,7 +217,7 @@ function (_super) {
217
217
  };
218
218
 
219
219
  _this.getSecondConfigName = function () {
220
- var _a, _b, _c, _d, _e, _f;
220
+ var _a, _b, _c, _d, _e;
221
221
 
222
222
  var selectedNode = _this.state.selectedNode;
223
223
 
@@ -228,6 +228,9 @@ function (_super) {
228
228
  var panelProps = selectedNode.groupSource.find(function (src) {
229
229
  return src.id === _this.state.clickedGroup;
230
230
  });
231
+ var panelIndex = selectedNode.groupSource.findIndex(function (src) {
232
+ return src.id === _this.state.clickedGroup;
233
+ });
231
234
 
232
235
  if (!panelProps) {
233
236
  return;
@@ -249,14 +252,20 @@ function (_super) {
249
252
 
250
253
  case 'MOBILE_NAVIGATION':
251
254
  case 'PC_NAVIGATION':
252
- groupName = ((_f = panelProps.groupName) === null || _f === void 0 ? void 0 : _f.title.text) || (0, _locale.i18n)('NAVIGATION_NAME');
255
+ groupName = (panelProps === null || panelProps === void 0 ? void 0 : panelProps.title.text) || (0, _locale.i18n)('NAVIGATION_NAME');
253
256
  break;
254
257
 
255
258
  case 'RECOMMEND':
256
259
  groupName = panelProps.groupName.text;
260
+ break;
261
+
262
+ case 'VIDEO':
263
+ groupName = 'Video' + (panelIndex + 1);
264
+ break;
257
265
 
258
266
  case 'TAG':
259
- groupName = '';
267
+ groupName = panelProps.button.text;
268
+ break;
260
269
  }
261
270
 
262
271
  return groupName || 'Group Name';
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ require("./index.less");
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+
14
+ var __extends = void 0 && (void 0).__extends || function () {
15
+ var _extendStatics = function extendStatics(d, b) {
16
+ _extendStatics = Object.setPrototypeOf || {
17
+ __proto__: []
18
+ } instanceof Array && function (d, b) {
19
+ d.__proto__ = b;
20
+ } || function (d, b) {
21
+ for (var p in b) {
22
+ if (b.hasOwnProperty(p)) d[p] = b[p];
23
+ }
24
+ };
25
+
26
+ return _extendStatics(d, b);
27
+ };
28
+
29
+ return function (d, b) {
30
+ _extendStatics(d, b);
31
+
32
+ function __() {
33
+ this.constructor = d;
34
+ }
35
+
36
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
37
+ };
38
+ }();
39
+
40
+ var LeftTitle =
41
+ /** @class */
42
+ function (_super) {
43
+ __extends(LeftTitle, _super);
44
+
45
+ function LeftTitle() {
46
+ var _this = _super !== null && _super.apply(this, arguments) || this;
47
+
48
+ _this.state = {};
49
+ return _this;
50
+ }
51
+
52
+ LeftTitle.prototype.render = function () {
53
+ var title = this.props.title;
54
+ return /*#__PURE__*/_react["default"].createElement("div", {
55
+ className: "left-title-container"
56
+ }, title);
57
+ };
58
+
59
+ LeftTitle.defaultProps = {
60
+ title: '邮件模板'
61
+ };
62
+ return LeftTitle;
63
+ }(_react["default"].Component);
64
+
65
+ var _default = LeftTitle;
66
+ exports["default"] = _default;
@@ -0,0 +1,9 @@
1
+ .left-title-container {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ font-size: 18px;
6
+ font-weight: 700;
7
+ height: 100%;
8
+ color: #232F46;
9
+ }
@@ -11,6 +11,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
 
14
+ var _antd = require("antd");
15
+
14
16
  var _mobx = require("../../../mobx");
15
17
 
16
18
  var _Button = _interopRequireDefault(require("../../../common/Button"));
@@ -19,11 +21,9 @@ var _Iconfont = _interopRequireDefault(require("../../../common/Iconfont"));
19
21
 
20
22
  var _constants = require("../../../constants");
21
23
 
22
- require("./index.less");
23
-
24
24
  var _locale = require("../../../locale");
25
25
 
26
- var _antd = require("antd");
26
+ require("./index.less");
27
27
 
28
28
  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); }
29
29
 
@@ -113,7 +113,10 @@ function (_super) {
113
113
  device = _a.device,
114
114
  undoDisable = _a.undoDisable,
115
115
  redoDisable = _a.redoDisable,
116
- language = _a.language;
116
+ language = _a.language,
117
+ outputType = _a.outputType,
118
+ onHtmlSave = _a.onHtmlSave,
119
+ onHtmlBack = _a.onHtmlBack;
117
120
  var languageTemp = langBook[language] || {};
118
121
  return /*#__PURE__*/_react["default"].createElement("div", {
119
122
  className: "quick_menu_wrap"
@@ -169,7 +172,14 @@ function (_super) {
169
172
  icon: "icon-next",
170
173
  onClick: this.onBtnClick,
171
174
  type: "icon"
172
- }))), /*#__PURE__*/_react["default"].createElement("div", {
175
+ }))), outputType == 'html' ? /*#__PURE__*/_react["default"].createElement("div", {
176
+ className: "menu_right"
177
+ }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
178
+ onClick: onHtmlBack
179
+ }, (0, _locale.i18n)('BACK')), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
180
+ onClick: onHtmlSave,
181
+ type: "light"
182
+ }, (0, _locale.i18n)('SAVE'))) : /*#__PURE__*/_react["default"].createElement("div", {
173
183
  className: "menu_right"
174
184
  }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
175
185
  "data-code": _constants.quickMenuCode.PREVIEW,
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _Renderer = _interopRequireDefault(require("../../Renderer"));
11
+
12
+ require("./index.less");
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+
16
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
+
18
+ var __extends = void 0 && (void 0).__extends || function () {
19
+ var _extendStatics = function extendStatics(d, b) {
20
+ _extendStatics = Object.setPrototypeOf || {
21
+ __proto__: []
22
+ } instanceof Array && function (d, b) {
23
+ d.__proto__ = b;
24
+ } || function (d, b) {
25
+ for (var p in b) {
26
+ if (b.hasOwnProperty(p)) d[p] = b[p];
27
+ }
28
+ };
29
+
30
+ return _extendStatics(d, b);
31
+ };
32
+
33
+ return function (d, b) {
34
+ _extendStatics(d, b);
35
+
36
+ function __() {
37
+ this.constructor = d;
38
+ }
39
+
40
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41
+ };
42
+ }();
43
+
44
+ var RenderHtml =
45
+ /** @class */
46
+ function (_super) {
47
+ __extends(RenderHtml, _super);
48
+
49
+ function RenderHtml() {
50
+ var _this = _super !== null && _super.apply(this, arguments) || this;
51
+
52
+ _this.state = {
53
+ renderProps: null
54
+ };
55
+
56
+ _this.renderHtml = function (renderProps) {
57
+ return new Promise(function (resolve) {
58
+ _this.setState({
59
+ renderProps: renderProps
60
+ }, function () {
61
+ var html = document.querySelector('#render-html-wrap').innerHTML;
62
+ resolve(html.replace(/url\("((\S|\s)*)"\)/g, 'url($1)'));
63
+
64
+ _this.setState({
65
+ renderProps: null
66
+ });
67
+ });
68
+ });
69
+ };
70
+
71
+ return _this;
72
+ }
73
+
74
+ RenderHtml.prototype.render = function () {
75
+ var renderProps = this.state.renderProps;
76
+ if (!renderProps) return null;
77
+ return /*#__PURE__*/_react["default"].createElement("div", {
78
+ id: "render-html-wrap"
79
+ }, /*#__PURE__*/_react["default"].createElement(_Renderer["default"], _extends({}, renderProps, {
80
+ outputType: "html"
81
+ })));
82
+ };
83
+
84
+ RenderHtml.defaultProps = {};
85
+ return RenderHtml;
86
+ }(_react["default"].Component);
87
+
88
+ var _default = RenderHtml;
89
+ exports["default"] = _default;
@@ -0,0 +1,5 @@
1
+ #render-html-wrap {
2
+ position: fixed;
3
+ top: 10px;
4
+ left: 0;
5
+ }