@fonixtree/magic-design 0.0.178 → 0.0.180
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/composite-comp/bol/components/Text/defaultJSON.js +28 -30
- package/es/composite-comp/bol/components/Text/index.js +4 -4
- package/es/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +1 -1
- package/es/composite-comp/bol/second-config-panels/TextSecondConfig/index.js +1 -1
- package/es/core/Designer/ConfigPanel/index.js +1 -1
- package/es/core/Designer/RenderHtml/index.js +1 -0
- package/es/core/Renderer/index.js +6 -2
- package/es/utils/coreUtil.js +1 -1
- package/lib/composite-comp/bol/components/Text/defaultJSON.js +28 -30
- package/lib/composite-comp/bol/components/Text/index.js +4 -4
- package/lib/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +1 -1
- package/lib/composite-comp/bol/second-config-panels/TextSecondConfig/index.js +1 -1
- package/lib/core/Designer/ConfigPanel/index.js +1 -1
- package/lib/core/Designer/RenderHtml/index.js +1 -0
- package/lib/core/Renderer/index.js +6 -2
- package/lib/utils/coreUtil.js +1 -1
- package/package.json +1 -1
|
@@ -57,36 +57,34 @@ var textGroupSourceJSON = function textGroupSourceJSON(parentId) {
|
|
|
57
57
|
return {
|
|
58
58
|
id: groupId,
|
|
59
59
|
parentId: parentId,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
})
|
|
89
|
-
}
|
|
60
|
+
title: __assign(__assign({
|
|
61
|
+
parentId: groupId,
|
|
62
|
+
id: (0, _uuid.v4)()
|
|
63
|
+
}, getDefaultMetaTextJson()), {
|
|
64
|
+
text: 'Group Name',
|
|
65
|
+
content: {
|
|
66
|
+
sizeType: 'Customize font styles',
|
|
67
|
+
fontFamily: 'Open Sans',
|
|
68
|
+
fontWeight: 600,
|
|
69
|
+
fontSize: 22,
|
|
70
|
+
pcFontSize: 22,
|
|
71
|
+
color: '#232F46'
|
|
72
|
+
}
|
|
73
|
+
}),
|
|
74
|
+
text: __assign(__assign({
|
|
75
|
+
parentId: groupId,
|
|
76
|
+
id: (0, _uuid.v4)()
|
|
77
|
+
}, getDefaultMetaTextJson()), {
|
|
78
|
+
text: 'For the text area, you can enter a subtitle or description, the default width is the same as title.',
|
|
79
|
+
content: {
|
|
80
|
+
sizeType: 'Body 1',
|
|
81
|
+
fontFamily: 'Open Sans',
|
|
82
|
+
fontWeight: 400,
|
|
83
|
+
fontSize: 18,
|
|
84
|
+
pcFontSize: 18,
|
|
85
|
+
color: '#232F46'
|
|
86
|
+
}
|
|
87
|
+
})
|
|
90
88
|
};
|
|
91
89
|
};
|
|
92
90
|
|
|
@@ -103,16 +103,16 @@ function (_super) {
|
|
|
103
103
|
style: {
|
|
104
104
|
textAlign: nodeData.customize.align
|
|
105
105
|
}
|
|
106
|
-
}, group.
|
|
106
|
+
}, group.title.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
107
107
|
className: "group-title"
|
|
108
108
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
109
|
-
data: group.
|
|
109
|
+
data: group.title,
|
|
110
110
|
mode: mode,
|
|
111
111
|
outputType: outputType
|
|
112
|
-
})), group.
|
|
112
|
+
})), group.text.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
113
113
|
className: "group-content"
|
|
114
114
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
115
|
-
data: group.
|
|
115
|
+
data: group.text,
|
|
116
116
|
mode: mode,
|
|
117
117
|
outputType: outputType
|
|
118
118
|
}))));
|
|
@@ -106,7 +106,7 @@ function (_super) {
|
|
|
106
106
|
className: "card_wrap"
|
|
107
107
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
108
108
|
className: "name"
|
|
109
|
-
}, src.
|
|
109
|
+
}, src.title.text));
|
|
110
110
|
};
|
|
111
111
|
|
|
112
112
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -76,7 +76,7 @@ function (_super) {
|
|
|
76
76
|
name: (0, _locale.i18n)('CONTENT'),
|
|
77
77
|
value: /*#__PURE__*/_react["default"].createElement(_TextContentConfigContent["default"], {
|
|
78
78
|
outputType: outputType,
|
|
79
|
-
source: panelProps
|
|
79
|
+
source: panelProps
|
|
80
80
|
})
|
|
81
81
|
}],
|
|
82
82
|
type: "triangle"
|
|
@@ -78,6 +78,7 @@ function (_super) {
|
|
|
78
78
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
79
79
|
id: "render-html-wrap"
|
|
80
80
|
}, /*#__PURE__*/_react["default"].createElement(_Renderer["default"], _extends({}, renderProps, {
|
|
81
|
+
noSetWindow: true,
|
|
81
82
|
outputType: "html"
|
|
82
83
|
})));
|
|
83
84
|
};
|
|
@@ -59,9 +59,13 @@ var setDesignConfig = function setDesignConfig(props) {
|
|
|
59
59
|
|
|
60
60
|
var Renderer = function Renderer(props) {
|
|
61
61
|
var pageData = props.pageData,
|
|
62
|
-
outputType = props.outputType
|
|
62
|
+
outputType = props.outputType,
|
|
63
|
+
noSetWindow = props.noSetWindow; // console.log('pageData: ', pageData);
|
|
64
|
+
|
|
65
|
+
if (!noSetWindow) {
|
|
66
|
+
setDesignConfig(props);
|
|
67
|
+
}
|
|
63
68
|
|
|
64
|
-
setDesignConfig(props);
|
|
65
69
|
window.magicDesignPageData = pageData;
|
|
66
70
|
var pageBackground = window.magicDesign.pageBackground; // 根据楼层展示设备进行过滤
|
|
67
71
|
|
package/es/utils/coreUtil.js
CHANGED
|
@@ -367,7 +367,7 @@ var copyNode = function copyNode(value, parentId) {
|
|
|
367
367
|
if (name === 'parentId') {
|
|
368
368
|
newNode.parentId = parentId;
|
|
369
369
|
} else {
|
|
370
|
-
newNode[name] = copyNode(value[name], newNode.id);
|
|
370
|
+
newNode[name] = copyNode(value[name], newNode.id || parentId);
|
|
371
371
|
}
|
|
372
372
|
});
|
|
373
373
|
return newNode;
|
|
@@ -57,36 +57,34 @@ var textGroupSourceJSON = function textGroupSourceJSON(parentId) {
|
|
|
57
57
|
return {
|
|
58
58
|
id: groupId,
|
|
59
59
|
parentId: parentId,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
})
|
|
89
|
-
}
|
|
60
|
+
title: __assign(__assign({
|
|
61
|
+
parentId: groupId,
|
|
62
|
+
id: (0, _uuid.v4)()
|
|
63
|
+
}, getDefaultMetaTextJson()), {
|
|
64
|
+
text: 'Group Name',
|
|
65
|
+
content: {
|
|
66
|
+
sizeType: 'Customize font styles',
|
|
67
|
+
fontFamily: 'Open Sans',
|
|
68
|
+
fontWeight: 600,
|
|
69
|
+
fontSize: 22,
|
|
70
|
+
pcFontSize: 22,
|
|
71
|
+
color: '#232F46'
|
|
72
|
+
}
|
|
73
|
+
}),
|
|
74
|
+
text: __assign(__assign({
|
|
75
|
+
parentId: groupId,
|
|
76
|
+
id: (0, _uuid.v4)()
|
|
77
|
+
}, getDefaultMetaTextJson()), {
|
|
78
|
+
text: 'For the text area, you can enter a subtitle or description, the default width is the same as title.',
|
|
79
|
+
content: {
|
|
80
|
+
sizeType: 'Body 1',
|
|
81
|
+
fontFamily: 'Open Sans',
|
|
82
|
+
fontWeight: 400,
|
|
83
|
+
fontSize: 18,
|
|
84
|
+
pcFontSize: 18,
|
|
85
|
+
color: '#232F46'
|
|
86
|
+
}
|
|
87
|
+
})
|
|
90
88
|
};
|
|
91
89
|
};
|
|
92
90
|
|
|
@@ -103,16 +103,16 @@ function (_super) {
|
|
|
103
103
|
style: {
|
|
104
104
|
textAlign: nodeData.customize.align
|
|
105
105
|
}
|
|
106
|
-
}, group.
|
|
106
|
+
}, group.title.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
107
107
|
className: "group-title"
|
|
108
108
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
109
|
-
data: group.
|
|
109
|
+
data: group.title,
|
|
110
110
|
mode: mode,
|
|
111
111
|
outputType: outputType
|
|
112
|
-
})), group.
|
|
112
|
+
})), group.text.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
113
113
|
className: "group-content"
|
|
114
114
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
115
|
-
data: group.
|
|
115
|
+
data: group.text,
|
|
116
116
|
mode: mode,
|
|
117
117
|
outputType: outputType
|
|
118
118
|
}))));
|
|
@@ -106,7 +106,7 @@ function (_super) {
|
|
|
106
106
|
className: "card_wrap"
|
|
107
107
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
108
108
|
className: "name"
|
|
109
|
-
}, src.
|
|
109
|
+
}, src.title.text));
|
|
110
110
|
};
|
|
111
111
|
|
|
112
112
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -76,7 +76,7 @@ function (_super) {
|
|
|
76
76
|
name: (0, _locale.i18n)('CONTENT'),
|
|
77
77
|
value: /*#__PURE__*/_react["default"].createElement(_TextContentConfigContent["default"], {
|
|
78
78
|
outputType: outputType,
|
|
79
|
-
source: panelProps
|
|
79
|
+
source: panelProps
|
|
80
80
|
})
|
|
81
81
|
}],
|
|
82
82
|
type: "triangle"
|
|
@@ -78,6 +78,7 @@ function (_super) {
|
|
|
78
78
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
79
79
|
id: "render-html-wrap"
|
|
80
80
|
}, /*#__PURE__*/_react["default"].createElement(_Renderer["default"], _extends({}, renderProps, {
|
|
81
|
+
noSetWindow: true,
|
|
81
82
|
outputType: "html"
|
|
82
83
|
})));
|
|
83
84
|
};
|
|
@@ -59,9 +59,13 @@ var setDesignConfig = function setDesignConfig(props) {
|
|
|
59
59
|
|
|
60
60
|
var Renderer = function Renderer(props) {
|
|
61
61
|
var pageData = props.pageData,
|
|
62
|
-
outputType = props.outputType
|
|
62
|
+
outputType = props.outputType,
|
|
63
|
+
noSetWindow = props.noSetWindow; // console.log('pageData: ', pageData);
|
|
64
|
+
|
|
65
|
+
if (!noSetWindow) {
|
|
66
|
+
setDesignConfig(props);
|
|
67
|
+
}
|
|
63
68
|
|
|
64
|
-
setDesignConfig(props);
|
|
65
69
|
window.magicDesignPageData = pageData;
|
|
66
70
|
var pageBackground = window.magicDesign.pageBackground; // 根据楼层展示设备进行过滤
|
|
67
71
|
|
package/lib/utils/coreUtil.js
CHANGED
|
@@ -367,7 +367,7 @@ var copyNode = function copyNode(value, parentId) {
|
|
|
367
367
|
if (name === 'parentId') {
|
|
368
368
|
newNode.parentId = parentId;
|
|
369
369
|
} else {
|
|
370
|
-
newNode[name] = copyNode(value[name], newNode.id);
|
|
370
|
+
newNode[name] = copyNode(value[name], newNode.id || parentId);
|
|
371
371
|
}
|
|
372
372
|
});
|
|
373
373
|
return newNode;
|