@fonixtree/magic-design 0.0.151 → 0.0.152
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/common/ImageModal/CommonModal/index.js +6 -5
- package/es/core/Designer/RenderHtml/index.js +2 -1
- package/es/core/Designer/index.js +6 -0
- package/lib/common/ImageModal/CommonModal/index.js +6 -5
- package/lib/core/Designer/RenderHtml/index.js +2 -1
- package/lib/core/Designer/index.js +6 -0
- package/package.json +2 -3
|
@@ -25,20 +25,21 @@ function CommonModal(_a) {
|
|
|
25
25
|
cancelText = _a.cancelText,
|
|
26
26
|
confirmLoading = _a.confirmLoading;
|
|
27
27
|
var modalCommonProps = {
|
|
28
|
-
title:
|
|
28
|
+
title: 'Modal',
|
|
29
29
|
visible: visible,
|
|
30
30
|
width: _const.size.NORMAL,
|
|
31
31
|
wrapClassName: 'modal-container',
|
|
32
32
|
centered: true,
|
|
33
33
|
maskClosable: false,
|
|
34
34
|
destroyOnClose: true,
|
|
35
|
-
okText: okText ||
|
|
36
|
-
cancelText: cancelText ||
|
|
35
|
+
okText: okText || 'Confirm',
|
|
36
|
+
cancelText: cancelText || 'Cancel'
|
|
37
37
|
};
|
|
38
|
+
console.log('CommonModal render');
|
|
38
39
|
return /*#__PURE__*/_react["default"].createElement(_antd.Modal, _extends({}, modalCommonProps, modalOpts, {
|
|
39
|
-
|
|
40
|
+
confirmLoading: confirmLoading,
|
|
40
41
|
onCancel: onCancel,
|
|
41
|
-
|
|
42
|
+
onOk: onOk
|
|
42
43
|
}), children);
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -58,8 +58,9 @@ function (_super) {
|
|
|
58
58
|
_this.setState({
|
|
59
59
|
renderProps: renderProps
|
|
60
60
|
}, function () {
|
|
61
|
+
document.querySelector('#render-html-wrap > div').style = 'max-width:800px';
|
|
61
62
|
var html = document.querySelector('#render-html-wrap').innerHTML;
|
|
62
|
-
resolve(html.replace(/url\(
|
|
63
|
+
resolve(html.replace(/url\("((\S|\s)*)"\)/g, 'url($1)'));
|
|
63
64
|
|
|
64
65
|
_this.setState({
|
|
65
66
|
renderProps: null
|
|
@@ -279,6 +279,7 @@ function (_super) {
|
|
|
279
279
|
var _this = _super.call(this, props) || this;
|
|
280
280
|
|
|
281
281
|
_this.renderHtmlRef = /*#__PURE__*/_react["default"].createRef();
|
|
282
|
+
_this.ready = false;
|
|
282
283
|
|
|
283
284
|
_this.closeCompList = function () {
|
|
284
285
|
if (_this.compListRef.current.open) {
|
|
@@ -623,6 +624,10 @@ function (_super) {
|
|
|
623
624
|
setDesignConfig(__assign(__assign({}, config), {
|
|
624
625
|
outputType: outputType
|
|
625
626
|
}));
|
|
627
|
+
_this.ready = true;
|
|
628
|
+
|
|
629
|
+
_this.setState({});
|
|
630
|
+
|
|
626
631
|
return _this;
|
|
627
632
|
}
|
|
628
633
|
|
|
@@ -680,6 +685,7 @@ function (_super) {
|
|
|
680
685
|
Designer.prototype.render = function () {
|
|
681
686
|
var _this = this;
|
|
682
687
|
|
|
688
|
+
if (!this.ready) return null;
|
|
683
689
|
var _a = this.state,
|
|
684
690
|
MPageData = _a.MPageData,
|
|
685
691
|
device = _a.device,
|
|
@@ -25,20 +25,21 @@ function CommonModal(_a) {
|
|
|
25
25
|
cancelText = _a.cancelText,
|
|
26
26
|
confirmLoading = _a.confirmLoading;
|
|
27
27
|
var modalCommonProps = {
|
|
28
|
-
title:
|
|
28
|
+
title: 'Modal',
|
|
29
29
|
visible: visible,
|
|
30
30
|
width: _const.size.NORMAL,
|
|
31
31
|
wrapClassName: 'modal-container',
|
|
32
32
|
centered: true,
|
|
33
33
|
maskClosable: false,
|
|
34
34
|
destroyOnClose: true,
|
|
35
|
-
okText: okText ||
|
|
36
|
-
cancelText: cancelText ||
|
|
35
|
+
okText: okText || 'Confirm',
|
|
36
|
+
cancelText: cancelText || 'Cancel'
|
|
37
37
|
};
|
|
38
|
+
console.log('CommonModal render');
|
|
38
39
|
return /*#__PURE__*/_react["default"].createElement(_antd.Modal, _extends({}, modalCommonProps, modalOpts, {
|
|
39
|
-
|
|
40
|
+
confirmLoading: confirmLoading,
|
|
40
41
|
onCancel: onCancel,
|
|
41
|
-
|
|
42
|
+
onOk: onOk
|
|
42
43
|
}), children);
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -58,8 +58,9 @@ function (_super) {
|
|
|
58
58
|
_this.setState({
|
|
59
59
|
renderProps: renderProps
|
|
60
60
|
}, function () {
|
|
61
|
+
document.querySelector('#render-html-wrap > div').style = 'max-width:800px';
|
|
61
62
|
var html = document.querySelector('#render-html-wrap').innerHTML;
|
|
62
|
-
resolve(html.replace(/url\(
|
|
63
|
+
resolve(html.replace(/url\("((\S|\s)*)"\)/g, 'url($1)'));
|
|
63
64
|
|
|
64
65
|
_this.setState({
|
|
65
66
|
renderProps: null
|
|
@@ -279,6 +279,7 @@ function (_super) {
|
|
|
279
279
|
var _this = _super.call(this, props) || this;
|
|
280
280
|
|
|
281
281
|
_this.renderHtmlRef = /*#__PURE__*/_react["default"].createRef();
|
|
282
|
+
_this.ready = false;
|
|
282
283
|
|
|
283
284
|
_this.closeCompList = function () {
|
|
284
285
|
if (_this.compListRef.current.open) {
|
|
@@ -623,6 +624,10 @@ function (_super) {
|
|
|
623
624
|
setDesignConfig(__assign(__assign({}, config), {
|
|
624
625
|
outputType: outputType
|
|
625
626
|
}));
|
|
627
|
+
_this.ready = true;
|
|
628
|
+
|
|
629
|
+
_this.setState({});
|
|
630
|
+
|
|
626
631
|
return _this;
|
|
627
632
|
}
|
|
628
633
|
|
|
@@ -680,6 +685,7 @@ function (_super) {
|
|
|
680
685
|
Designer.prototype.render = function () {
|
|
681
686
|
var _this = this;
|
|
682
687
|
|
|
688
|
+
if (!this.ready) return null;
|
|
683
689
|
var _a = this.state,
|
|
684
690
|
MPageData = _a.MPageData,
|
|
685
691
|
device = _a.device,
|
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.
|
|
4
|
+
"version": "0.0.152",
|
|
5
5
|
"description": "Magic Design",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -35,8 +35,7 @@
|
|
|
35
35
|
"react-slick": "^0.29.0",
|
|
36
36
|
"replace": "^1.2.1",
|
|
37
37
|
"shortid": "^2.2.16",
|
|
38
|
-
"slick-carousel": "^1.8.1"
|
|
39
|
-
"styled-components": "^5.3.9"
|
|
38
|
+
"slick-carousel": "^1.8.1"
|
|
40
39
|
},
|
|
41
40
|
"peerDependencies": {
|
|
42
41
|
"react": ">=16.11.0",
|