@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.
- package/es/assets/images/layout-icon/layout-video-h5-1.png +0 -0
- package/es/common/ImageModal/index.js +75 -31
- package/es/common/LinkModal/BundleCampaign/index.js +2 -2
- package/es/common/LinkModal/CatgTable/index.js +1 -1
- package/es/common/LinkModal/CouponTable/index.js +1 -1
- package/es/common/LinkModal/FilteredProductModal/index.js +5 -5
- package/es/common/LinkModal/FunctionTable/index.js +1 -1
- package/es/common/LinkModal/ProductDetailPage/index.js +3 -3
- package/es/common/LinkModal/index.js +2 -2
- package/es/common/ProductModal/index.js +4 -4
- package/es/common/UrlPicker/index.js +1 -1
- package/es/common/Video/closeImg.png +0 -0
- package/es/common/Video/index.js +14 -1
- package/es/common/Video/index.less +10 -6
- package/es/composite-comp/bol/components/Text/index.js +22 -8
- package/es/composite-comp/bol/components/Text/index.less +4 -6
- package/es/composite-comp/bol/components/Video/components/ShareBtn/index.less +7 -4
- package/es/composite-comp/bol/components/Video/components/VideoTag/index.js +9 -3
- package/es/composite-comp/bol/components/Video/components/VideoTag/index.less +2 -2
- package/es/composite-comp/bol/components/Video/defaultJSON.js +1 -1
- package/es/composite-comp/bol/components/Video/mobile/Layout1/index.js +7 -2
- package/es/composite-comp/bol/components/Video/mobile/Layout1/index.less +2 -2
- package/es/composite-comp/bol/components/Video/mobile/Layout2/index.js +8 -5
- package/es/composite-comp/bol/components/Video/mobile/Layout2/index.less +3 -3
- package/es/composite-comp/bol/components/Video/mobile/Layout3/index.js +17 -8
- package/es/composite-comp/bol/components/Video/mobile/Layout3/index.less +16 -3
- package/es/composite-comp/bol/components/Video/pc/Layout1/index.js +9 -11
- package/es/composite-comp/bol/components/Video/pc/Layout2/index.js +7 -4
- package/es/composite-comp/bol/components/Video/pc/Layout3/index.js +1 -0
- package/es/composite-comp/bol/components/Video/pc/Layout4/index.js +9 -2
- package/es/composite-comp/bol/components/Video/pc/Layout4/index.less +11 -4
- package/es/composite-comp/bol/components/Video/pc/Layout5/index.js +9 -2
- package/es/composite-comp/bol/components/Video/pc/Layout5/index.less +9 -2
- package/es/composite-comp/bol/components/Video/pc/index.js +14 -5
- package/es/composite-comp/common/components/ImageLabel/index.less +3 -2
- package/es/composite-comp/common/components/ProductItem/index.js +3 -2
- package/es/composite-comp/common/components/ProductItem/index.less +4 -9
- package/es/composite-comp/dito/components/PcNavigation/pc/index.js +1 -1
- package/es/composite-comp/dito/components/PcNavigation/pc/index.less +4 -2
- package/es/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +2 -2
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +4 -2
- package/es/composite-comp/dito/components/SearchBar/mobile/index.less +5 -0
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +4 -6
- package/es/constants/index.js +3 -1
- package/es/core/Designer/ConfigPanel/index.js +12 -3
- package/es/core/Designer/LeftTitle/index.js +66 -0
- package/es/core/Designer/LeftTitle/index.less +9 -0
- package/es/core/Designer/QuickMenuBar/index.js +15 -5
- package/es/core/Designer/RenderHtml/index.js +89 -0
- package/es/core/Designer/RenderHtml/index.less +5 -0
- package/es/core/Designer/index.js +223 -4
- package/es/core/Renderer/index.js +5 -2
- package/es/decorator/compositeDecorator.js +2 -2
- package/es/locale/en/en.json +1 -0
- package/es/locale/es/es.json +1 -0
- package/es/locale/id/id.json +1 -0
- package/es/meta-comp/components/Text/index.js +55 -16
- package/es/utils/businessUtil.js +3 -3
- package/es/utils/commonUtil.js +11 -0
- package/es/utils/coreUtil.js +8 -4
- package/lib/assets/images/layout-icon/layout-video-h5-1.png +0 -0
- package/lib/common/ImageModal/index.js +75 -31
- package/lib/common/LinkModal/BundleCampaign/index.js +2 -2
- package/lib/common/LinkModal/CatgTable/index.js +1 -1
- package/lib/common/LinkModal/CouponTable/index.js +1 -1
- package/lib/common/LinkModal/FilteredProductModal/index.js +5 -5
- package/lib/common/LinkModal/FunctionTable/index.js +1 -1
- package/lib/common/LinkModal/ProductDetailPage/index.js +3 -3
- package/lib/common/LinkModal/index.js +2 -2
- package/lib/common/ProductModal/index.js +4 -4
- package/lib/common/UrlPicker/index.js +1 -1
- package/lib/common/Video/closeImg.png +0 -0
- package/lib/common/Video/index.js +14 -1
- package/lib/common/Video/index.less +10 -6
- package/lib/composite-comp/bol/components/Text/index.js +22 -8
- package/lib/composite-comp/bol/components/Text/index.less +4 -6
- package/lib/composite-comp/bol/components/Video/components/ShareBtn/index.less +7 -4
- package/lib/composite-comp/bol/components/Video/components/VideoTag/index.js +9 -3
- package/lib/composite-comp/bol/components/Video/components/VideoTag/index.less +2 -2
- package/lib/composite-comp/bol/components/Video/defaultJSON.js +1 -1
- package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.js +7 -2
- package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.less +2 -2
- package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.js +8 -5
- package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.less +3 -3
- package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.js +17 -8
- package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.less +16 -3
- package/lib/composite-comp/bol/components/Video/pc/Layout1/index.js +9 -11
- package/lib/composite-comp/bol/components/Video/pc/Layout2/index.js +7 -4
- package/lib/composite-comp/bol/components/Video/pc/Layout3/index.js +1 -0
- package/lib/composite-comp/bol/components/Video/pc/Layout4/index.js +9 -2
- package/lib/composite-comp/bol/components/Video/pc/Layout4/index.less +11 -4
- package/lib/composite-comp/bol/components/Video/pc/Layout5/index.js +9 -2
- package/lib/composite-comp/bol/components/Video/pc/Layout5/index.less +9 -2
- package/lib/composite-comp/bol/components/Video/pc/index.js +14 -5
- package/lib/composite-comp/common/components/ImageLabel/index.less +3 -2
- package/lib/composite-comp/common/components/ProductItem/index.js +3 -2
- package/lib/composite-comp/common/components/ProductItem/index.less +4 -9
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +1 -1
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +4 -2
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +2 -2
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +4 -2
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +5 -0
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +4 -6
- package/lib/constants/index.js +3 -1
- package/lib/core/Designer/ConfigPanel/index.js +12 -3
- package/lib/core/Designer/LeftTitle/index.js +66 -0
- package/lib/core/Designer/LeftTitle/index.less +9 -0
- package/lib/core/Designer/QuickMenuBar/index.js +15 -5
- package/lib/core/Designer/RenderHtml/index.js +89 -0
- package/lib/core/Designer/RenderHtml/index.less +5 -0
- package/lib/core/Designer/index.js +223 -4
- package/lib/core/Renderer/index.js +5 -2
- package/lib/decorator/compositeDecorator.js +2 -2
- package/lib/locale/en/en.json +1 -0
- package/lib/locale/es/es.json +1 -0
- package/lib/locale/id/id.json +1 -0
- package/lib/meta-comp/components/Text/index.js +55 -16
- package/lib/utils/businessUtil.js +3 -3
- package/lib/utils/commonUtil.js +11 -0
- package/lib/utils/coreUtil.js +8 -4
- package/package.json +3 -2
|
@@ -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;
|
|
@@ -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
|
-
|
|
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;
|
|
@@ -29,6 +29,10 @@ var _History = _interopRequireDefault(require("./History"));
|
|
|
29
29
|
|
|
30
30
|
var _AppointmentModal = _interopRequireDefault(require("./AppointmentModal"));
|
|
31
31
|
|
|
32
|
+
var _LeftTitle = _interopRequireDefault(require("./LeftTitle"));
|
|
33
|
+
|
|
34
|
+
var _RenderHtml = _interopRequireDefault(require("./RenderHtml"));
|
|
35
|
+
|
|
32
36
|
var _componentTypes = require("../../constants/component-types");
|
|
33
37
|
|
|
34
38
|
var _mobx = require("../../mobx");
|
|
@@ -39,6 +43,8 @@ require("./index.less");
|
|
|
39
43
|
|
|
40
44
|
var _common = require("../../common");
|
|
41
45
|
|
|
46
|
+
var _storeUtil = require("../../utils/storeUtil");
|
|
47
|
+
|
|
42
48
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
43
49
|
|
|
44
50
|
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); }
|
|
@@ -87,6 +93,149 @@ var __assign = void 0 && (void 0).__assign || function () {
|
|
|
87
93
|
return __assign.apply(this, arguments);
|
|
88
94
|
};
|
|
89
95
|
|
|
96
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
97
|
+
function adopt(value) {
|
|
98
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
99
|
+
resolve(value);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
104
|
+
function fulfilled(value) {
|
|
105
|
+
try {
|
|
106
|
+
step(generator.next(value));
|
|
107
|
+
} catch (e) {
|
|
108
|
+
reject(e);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function rejected(value) {
|
|
113
|
+
try {
|
|
114
|
+
step(generator["throw"](value));
|
|
115
|
+
} catch (e) {
|
|
116
|
+
reject(e);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function step(result) {
|
|
121
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
129
|
+
var _ = {
|
|
130
|
+
label: 0,
|
|
131
|
+
sent: function sent() {
|
|
132
|
+
if (t[0] & 1) throw t[1];
|
|
133
|
+
return t[1];
|
|
134
|
+
},
|
|
135
|
+
trys: [],
|
|
136
|
+
ops: []
|
|
137
|
+
},
|
|
138
|
+
f,
|
|
139
|
+
y,
|
|
140
|
+
t,
|
|
141
|
+
g;
|
|
142
|
+
return g = {
|
|
143
|
+
next: verb(0),
|
|
144
|
+
"throw": verb(1),
|
|
145
|
+
"return": verb(2)
|
|
146
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
147
|
+
return this;
|
|
148
|
+
}), g;
|
|
149
|
+
|
|
150
|
+
function verb(n) {
|
|
151
|
+
return function (v) {
|
|
152
|
+
return step([n, v]);
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function step(op) {
|
|
157
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
158
|
+
|
|
159
|
+
while (_) {
|
|
160
|
+
try {
|
|
161
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
162
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
163
|
+
|
|
164
|
+
switch (op[0]) {
|
|
165
|
+
case 0:
|
|
166
|
+
case 1:
|
|
167
|
+
t = op;
|
|
168
|
+
break;
|
|
169
|
+
|
|
170
|
+
case 4:
|
|
171
|
+
_.label++;
|
|
172
|
+
return {
|
|
173
|
+
value: op[1],
|
|
174
|
+
done: false
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
case 5:
|
|
178
|
+
_.label++;
|
|
179
|
+
y = op[1];
|
|
180
|
+
op = [0];
|
|
181
|
+
continue;
|
|
182
|
+
|
|
183
|
+
case 7:
|
|
184
|
+
op = _.ops.pop();
|
|
185
|
+
|
|
186
|
+
_.trys.pop();
|
|
187
|
+
|
|
188
|
+
continue;
|
|
189
|
+
|
|
190
|
+
default:
|
|
191
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
192
|
+
_ = 0;
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
197
|
+
_.label = op[1];
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
202
|
+
_.label = t[1];
|
|
203
|
+
t = op;
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (t && _.label < t[2]) {
|
|
208
|
+
_.label = t[2];
|
|
209
|
+
|
|
210
|
+
_.ops.push(op);
|
|
211
|
+
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (t[2]) _.ops.pop();
|
|
216
|
+
|
|
217
|
+
_.trys.pop();
|
|
218
|
+
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
op = body.call(thisArg, _);
|
|
223
|
+
} catch (e) {
|
|
224
|
+
op = [6, e];
|
|
225
|
+
y = 0;
|
|
226
|
+
} finally {
|
|
227
|
+
f = t = 0;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if (op[0] & 5) throw op[1];
|
|
232
|
+
return {
|
|
233
|
+
value: op[0] ? op[1] : void 0,
|
|
234
|
+
done: true
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
|
|
90
239
|
var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
91
240
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
|
|
92
241
|
s += arguments[i].length;
|
|
@@ -129,6 +278,8 @@ function (_super) {
|
|
|
129
278
|
function Designer(props) {
|
|
130
279
|
var _this = _super.call(this, props) || this;
|
|
131
280
|
|
|
281
|
+
_this.renderHtmlRef = /*#__PURE__*/_react["default"].createRef();
|
|
282
|
+
|
|
132
283
|
_this.closeCompList = function () {
|
|
133
284
|
if (_this.compListRef.current.open) {
|
|
134
285
|
_this.compListRef.current.onClose();
|
|
@@ -366,11 +517,64 @@ function (_super) {
|
|
|
366
517
|
}
|
|
367
518
|
};
|
|
368
519
|
|
|
520
|
+
_this.onHtmlSave = function () {
|
|
521
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
522
|
+
var _a, device, MPageData, renderProps, html;
|
|
523
|
+
|
|
524
|
+
return __generator(this, function (_b) {
|
|
525
|
+
switch (_b.label) {
|
|
526
|
+
case 0:
|
|
527
|
+
_a = this.state, device = _a.device, MPageData = _a.MPageData;
|
|
528
|
+
renderProps = {
|
|
529
|
+
pageData: {
|
|
530
|
+
id: (0, _uuid.v4)(),
|
|
531
|
+
childNodes: MPageData
|
|
532
|
+
},
|
|
533
|
+
device: device
|
|
534
|
+
};
|
|
535
|
+
return [4
|
|
536
|
+
/*yield*/
|
|
537
|
+
, this.renderHtmlRef.current.renderHtml(renderProps)];
|
|
538
|
+
|
|
539
|
+
case 1:
|
|
540
|
+
html = _b.sent();
|
|
541
|
+
(0, _storeUtil.setStore)(_constants.STORAGE_KEY.MAGIC_RENDER_HTML, html);
|
|
542
|
+
(0, _storeUtil.setStore)(_constants.STORAGE_KEY.MAGIC_RENDER_PAGEDATA, renderProps.pageData);
|
|
543
|
+
|
|
544
|
+
if (this.props.onHtmlSave) {
|
|
545
|
+
this.props.onHtmlSave(html);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
return [2
|
|
549
|
+
/*return*/
|
|
550
|
+
];
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
});
|
|
554
|
+
};
|
|
555
|
+
|
|
556
|
+
_this.onHtmlBack = function () {
|
|
557
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
558
|
+
return __generator(this, function (_a) {
|
|
559
|
+
if (this.props.onHtmlBack) {
|
|
560
|
+
this.props.onHtmlBack();
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
return [2
|
|
564
|
+
/*return*/
|
|
565
|
+
];
|
|
566
|
+
});
|
|
567
|
+
});
|
|
568
|
+
};
|
|
569
|
+
|
|
369
570
|
_this.renderHeader = function () {
|
|
370
571
|
return /*#__PURE__*/_react["default"].createElement(_QuickMenuBar["default"], {
|
|
371
572
|
device: _this.state.device,
|
|
372
573
|
language: _this.props.language,
|
|
373
574
|
onBtnClick: _this.onQuickMenuClick,
|
|
575
|
+
onHtmlBack: _this.onHtmlBack,
|
|
576
|
+
onHtmlSave: _this.onHtmlSave,
|
|
577
|
+
outputType: _this.props.outputType,
|
|
374
578
|
redoDisable: !_this.history.redoAble(),
|
|
375
579
|
undoDisable: !_this.history.undoAble()
|
|
376
580
|
});
|
|
@@ -398,6 +602,7 @@ function (_super) {
|
|
|
398
602
|
|
|
399
603
|
var pageData = props.pageData,
|
|
400
604
|
config = props.config,
|
|
605
|
+
outputType = props.outputType,
|
|
401
606
|
locale = props.locale;
|
|
402
607
|
var MPageData = pageData.childNodes || [];
|
|
403
608
|
_this.configRef = /*#__PURE__*/_react["default"].createRef(); // this.viewAreaRef = React.createRef();
|
|
@@ -415,7 +620,9 @@ function (_super) {
|
|
|
415
620
|
device: _constants.deviceTypeMap.PHONE,
|
|
416
621
|
appointmentVisible: false
|
|
417
622
|
};
|
|
418
|
-
setDesignConfig(config)
|
|
623
|
+
setDesignConfig(__assign(__assign({}, config), {
|
|
624
|
+
outputType: outputType
|
|
625
|
+
}));
|
|
419
626
|
return _this;
|
|
420
627
|
}
|
|
421
628
|
|
|
@@ -481,7 +688,17 @@ function (_super) {
|
|
|
481
688
|
pagesManager = _b.pagesManager,
|
|
482
689
|
compSource = _b.compSource,
|
|
483
690
|
pageName = _b.pageName,
|
|
484
|
-
onCancelPublish = _b.onCancelPublish
|
|
691
|
+
onCancelPublish = _b.onCancelPublish,
|
|
692
|
+
leftTitle = _b.leftTitle,
|
|
693
|
+
outputType = _b.outputType;
|
|
694
|
+
var renderPagesManage = pagesManager;
|
|
695
|
+
|
|
696
|
+
if (outputType == 'html') {
|
|
697
|
+
renderPagesManage = /*#__PURE__*/_react["default"].createElement(_LeftTitle["default"], {
|
|
698
|
+
title: leftTitle
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
|
|
485
702
|
return /*#__PURE__*/_react["default"].createElement(_mobxReact.Provider, {
|
|
486
703
|
store: _mobx.store
|
|
487
704
|
}, /*#__PURE__*/_react["default"].createElement(_antd.ConfigProvider, {
|
|
@@ -496,7 +713,7 @@ function (_super) {
|
|
|
496
713
|
onAdd: this.onAdd,
|
|
497
714
|
pageData: MPageData,
|
|
498
715
|
pageName: pageName,
|
|
499
|
-
renderPagesManage:
|
|
716
|
+
renderPagesManage: renderPagesManage,
|
|
500
717
|
setPageData: this.setPageData
|
|
501
718
|
}), /*#__PURE__*/_react["default"].createElement(_CompListPanel["default"], {
|
|
502
719
|
ref: this.compListRef,
|
|
@@ -525,7 +742,9 @@ function (_super) {
|
|
|
525
742
|
},
|
|
526
743
|
onConfirm: this.onAppointmentConfirm,
|
|
527
744
|
visible: appointmentVisible
|
|
528
|
-
})), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_common.SystemNotification, null)))
|
|
745
|
+
})), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_common.SystemNotification, null))), /*#__PURE__*/_react["default"].createElement(_RenderHtml["default"], {
|
|
746
|
+
ref: this.renderHtmlRef
|
|
747
|
+
}));
|
|
529
748
|
};
|
|
530
749
|
|
|
531
750
|
return Designer;
|
|
@@ -58,7 +58,8 @@ var setDesignConfig = function setDesignConfig(props) {
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
var Renderer = function Renderer(props) {
|
|
61
|
-
var pageData = props.pageData
|
|
61
|
+
var pageData = props.pageData,
|
|
62
|
+
outputType = props.outputType; // console.log('pageData: ', pageData);
|
|
62
63
|
|
|
63
64
|
setDesignConfig(props);
|
|
64
65
|
window.magicDesignPageData = pageData;
|
|
@@ -102,7 +103,9 @@ var Renderer = function Renderer(props) {
|
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
var newInstanceProps = __assign(__assign({}, nodeData), {
|
|
105
|
-
nodeData: nodeData
|
|
106
|
+
nodeData: nodeData,
|
|
107
|
+
mode: 'renderer',
|
|
108
|
+
outputType: outputType
|
|
106
109
|
});
|
|
107
110
|
|
|
108
111
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -130,8 +130,8 @@ function compositeDecorator(WrappedComponent) {
|
|
|
130
130
|
wrapStyle.opacity = background.opacity ? background.opacity : 1;
|
|
131
131
|
} else {
|
|
132
132
|
wrapStyle.backgroundImage = "url(" + background.image + ")";
|
|
133
|
-
wrapStyle.backgroundPosition = '
|
|
134
|
-
wrapStyle.backgroundSize = '
|
|
133
|
+
wrapStyle.backgroundPosition = 'center center';
|
|
134
|
+
wrapStyle.backgroundSize = 'cover';
|
|
135
135
|
wrapStyle.backgroundRepeat = 'no-repeat';
|
|
136
136
|
}
|
|
137
137
|
} // 复合组件宽度
|
package/es/locale/en/en.json
CHANGED
package/es/locale/es/es.json
CHANGED