@fonixtree/magic-design 2.0.61 → 2.0.63
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/fonts/.DS_Store +0 -0
- package/es/assets/fonts/magic-box-iconfont.css +18 -6
- package/es/assets/fonts/magic-box-iconfont.css.bak +15 -12
- package/es/assets/fonts/magic-box-iconfont.js +1 -5
- package/es/assets/fonts/magic-box-iconfont.js.bak +1 -5
- package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/es/composite-comp/bol/components/Video/index.js +1 -2
- package/es/composite-comp/common/components/AffiliateProductItem/index.less +17 -1
- package/es/composite-comp/common/components/ProductItem/index.less +4 -1
- package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +6 -5
- package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +1 -12
- package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.js +6 -5
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -6
- package/es/composite-comp/dito/components/FlashDeal/pc/index.js +8 -6
- package/es/composite-comp/dito/components/HeadNavigation/defaultJSON.js +87 -0
- package/es/composite-comp/dito/components/MenuNavigation/defaultJSON.js +79 -0
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +6 -5
- package/es/composite-comp/dito/components/Recommend/pc/index.js +6 -5
- package/es/core/Designer/ChatRobot/index.js +18 -14
- package/es/core/Designer/ChatRobot/index.less +30 -9
- package/es/core/Designer/RenderHtml/index.js +18 -15
- package/es/core/Designer/RenderHtml/index.less +1 -1
- package/es/core/Designer/ToolBarModal/index.js +8 -7
- package/es/core/Designer/index.js +7 -0
- package/es/meta-comp/components/Text/formats/textAlign.js +58 -0
- package/es/meta-comp/components/Text/index.js +2 -0
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/magic-box-iconfont.css +18 -6
- package/lib/assets/fonts/magic-box-iconfont.css.bak +15 -12
- package/lib/assets/fonts/magic-box-iconfont.js +1 -5
- package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -5
- package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/lib/composite-comp/bol/components/Video/index.js +1 -2
- package/lib/composite-comp/common/components/AffiliateProductItem/index.less +17 -1
- package/lib/composite-comp/common/components/ProductItem/index.less +4 -1
- package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +6 -5
- package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +1 -12
- package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.js +6 -5
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -6
- package/lib/composite-comp/dito/components/FlashDeal/pc/index.js +8 -6
- package/lib/composite-comp/dito/components/HeadNavigation/defaultJSON.js +87 -0
- package/lib/composite-comp/dito/components/MenuNavigation/defaultJSON.js +79 -0
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +6 -5
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +6 -5
- package/lib/core/Designer/ChatRobot/index.js +18 -14
- package/lib/core/Designer/ChatRobot/index.less +30 -9
- package/lib/core/Designer/RenderHtml/index.js +18 -15
- package/lib/core/Designer/RenderHtml/index.less +1 -1
- package/lib/core/Designer/ToolBarModal/index.js +8 -7
- package/lib/core/Designer/index.js +7 -0
- package/lib/meta-comp/components/Text/formats/textAlign.js +58 -0
- package/lib/meta-comp/components/Text/index.js +2 -0
- package/package.json +1 -1
|
@@ -59,6 +59,8 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
59
59
|
};
|
|
60
60
|
}();
|
|
61
61
|
|
|
62
|
+
var TextArea = _antd.Input.TextArea;
|
|
63
|
+
|
|
62
64
|
var ChatRobot =
|
|
63
65
|
/** @class */
|
|
64
66
|
function (_super) {
|
|
@@ -218,14 +220,17 @@ function (_super) {
|
|
|
218
220
|
closable: false,
|
|
219
221
|
footer: /*#__PURE__*/_react["default"].createElement("div", {
|
|
220
222
|
className: "dialog_bottom"
|
|
221
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
223
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
224
|
+
className: "bottom_input"
|
|
225
|
+
}, /*#__PURE__*/_react["default"].createElement(TextArea, {
|
|
226
|
+
autoSize: true,
|
|
227
|
+
className: "text_area",
|
|
222
228
|
onChange: this.onMessageChage,
|
|
223
229
|
onPressEnter: this.onEnter,
|
|
224
230
|
placeholder: "Send a message",
|
|
225
231
|
value: message
|
|
226
|
-
}), /*#__PURE__*/_react["default"].createElement(
|
|
227
|
-
className: "
|
|
228
|
-
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
232
|
+
}), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
233
|
+
className: "image_btn",
|
|
229
234
|
color: "#2F54EB",
|
|
230
235
|
onClick: this.generateImage,
|
|
231
236
|
size: 20,
|
|
@@ -233,15 +238,12 @@ function (_super) {
|
|
|
233
238
|
cursor: 'pointer'
|
|
234
239
|
},
|
|
235
240
|
type: "icon-image"
|
|
236
|
-
}), /*#__PURE__*/_react["default"].createElement(
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
},
|
|
243
|
-
type: message.length > 0 ? 'icon-send1' : 'icon-send'
|
|
244
|
-
}))),
|
|
241
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
242
|
+
className: (0, _classnames["default"])('generate_btn', {
|
|
243
|
+
disable_btn: message.length === 0
|
|
244
|
+
}),
|
|
245
|
+
onClick: this.onEnter
|
|
246
|
+
}, "Generate")),
|
|
245
247
|
footerStyle: {
|
|
246
248
|
padding: 12
|
|
247
249
|
},
|
|
@@ -321,7 +323,9 @@ function (_super) {
|
|
|
321
323
|
marginRight: 5
|
|
322
324
|
},
|
|
323
325
|
type: "icon-refresh"
|
|
324
|
-
}), "Regenerate Response")
|
|
326
|
+
}), "Regenerate Response"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
327
|
+
className: "more_condition"
|
|
328
|
+
}))), /*#__PURE__*/_react["default"].createElement(_AiImageGenerator["default"], {
|
|
325
329
|
onClose: function onClose() {
|
|
326
330
|
return _this.setState({
|
|
327
331
|
aiImageVisible: false
|
|
@@ -121,18 +121,39 @@
|
|
|
121
121
|
.dialog_bottom {
|
|
122
122
|
position: relative;
|
|
123
123
|
font-size: 14px;
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
.bottom_input{
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: flex-start;
|
|
127
|
+
.text_area {
|
|
128
|
+
max-height: 200px;
|
|
129
|
+
padding-right: 30px;
|
|
130
|
+
}
|
|
131
|
+
.image_btn {
|
|
132
|
+
position: absolute;
|
|
133
|
+
right: 10px;
|
|
134
|
+
top: 6px;
|
|
135
|
+
}
|
|
136
|
+
.toggle_btn {
|
|
137
|
+
padding: 4px 0 4px 10px;
|
|
138
|
+
cursor: pointer;
|
|
139
|
+
}
|
|
126
140
|
}
|
|
127
|
-
.
|
|
128
|
-
position: absolute;
|
|
129
|
-
right: 15px;
|
|
130
|
-
top: 0px;
|
|
131
|
-
width: 50px;
|
|
132
|
-
height: 36px;
|
|
141
|
+
.generate_btn {
|
|
133
142
|
display: flex;
|
|
134
143
|
align-items: center;
|
|
135
|
-
justify-content:
|
|
144
|
+
justify-content: center;
|
|
145
|
+
margin-top: 8px;
|
|
146
|
+
height: 36px;
|
|
147
|
+
background: #2F54EB;
|
|
148
|
+
border-radius: 6px;
|
|
149
|
+
color:#FFF;
|
|
150
|
+
font-family: Open Sans;
|
|
151
|
+
font-size: 14px;
|
|
152
|
+
font-weight: 600;
|
|
153
|
+
cursor: pointer;
|
|
154
|
+
}
|
|
155
|
+
.disable_btn {
|
|
156
|
+
background: #C1C9D7;
|
|
136
157
|
}
|
|
137
158
|
}
|
|
138
159
|
}
|
|
@@ -58,21 +58,24 @@ function (_super) {
|
|
|
58
58
|
_this.setState({
|
|
59
59
|
renderProps: renderProps
|
|
60
60
|
}, function () {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
61
|
+
/** 兼容分批加载 */
|
|
62
|
+
setTimeout(function () {
|
|
63
|
+
document.querySelector('#render-html-wrap > div').style = 'max-width:600px;margin:auto;';
|
|
64
|
+
/** 去除设计器模式下元素 */
|
|
65
|
+
|
|
66
|
+
document.querySelectorAll('#render-html-wrap > div .composite_mask').forEach(function (el) {
|
|
67
|
+
el.remove();
|
|
68
|
+
});
|
|
69
|
+
var html = document.querySelector('#render-html-wrap').innerHTML;
|
|
70
|
+
/** 处理背景图资源引号问题 */
|
|
71
|
+
|
|
72
|
+
html = html.replace(/url\("((\S|\s)*)"\)/g, 'url($1)');
|
|
73
|
+
resolve(html);
|
|
74
|
+
|
|
75
|
+
_this.setState({
|
|
76
|
+
renderProps: null
|
|
77
|
+
});
|
|
78
|
+
}, 1000);
|
|
76
79
|
});
|
|
77
80
|
});
|
|
78
81
|
};
|
|
@@ -160,6 +160,8 @@ function (_super) {
|
|
|
160
160
|
_this.props.quillRef.format('font', value);
|
|
161
161
|
} else if (type == 'font-weight') {
|
|
162
162
|
_this.props.quillRef.format('font-weight', value);
|
|
163
|
+
} else if (type == 'text-align') {
|
|
164
|
+
_this.props.quillRef.format('text-align', value);
|
|
163
165
|
} else if (type == 'font-style') {
|
|
164
166
|
_this.props.quillRef.format('font-style', 'italic' === quillFormat['font-style'] ? '' : 'italic');
|
|
165
167
|
} else if (type == 'font-family') {
|
|
@@ -231,7 +233,6 @@ function (_super) {
|
|
|
231
233
|
var _this = this;
|
|
232
234
|
|
|
233
235
|
var quillFormat = this.state.quillFormat;
|
|
234
|
-
console.log('quillFormat render', quillFormat);
|
|
235
236
|
|
|
236
237
|
var _fontWeightList = quillFormat['font-family'] === 'OpenSans' ? OpenSansFontWeightList : fontWeightList;
|
|
237
238
|
|
|
@@ -370,25 +371,25 @@ function (_super) {
|
|
|
370
371
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
371
372
|
className: "tool-item"
|
|
372
373
|
}, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
|
|
373
|
-
active: quillFormat['align'] ===
|
|
374
|
+
active: quillFormat['text-align'] === 'left',
|
|
374
375
|
onChange: function onChange() {
|
|
375
|
-
_this.onToolBtnClick('align', '');
|
|
376
|
+
_this.onToolBtnClick('text-align', 'left');
|
|
376
377
|
},
|
|
377
378
|
type: "alignLeft"
|
|
378
379
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
379
380
|
className: "tool-item"
|
|
380
381
|
}, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
|
|
381
|
-
active: quillFormat['align'] === 'center',
|
|
382
|
+
active: quillFormat['text-align'] === 'center',
|
|
382
383
|
onChange: function onChange() {
|
|
383
|
-
_this.onToolBtnClick('align', 'center');
|
|
384
|
+
_this.onToolBtnClick('text-align', 'center');
|
|
384
385
|
},
|
|
385
386
|
type: "alignCenter"
|
|
386
387
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
387
388
|
className: "tool-item"
|
|
388
389
|
}, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
|
|
389
|
-
active: quillFormat['align'] === 'right',
|
|
390
|
+
active: quillFormat['text-align'] === 'right',
|
|
390
391
|
onChange: function onChange() {
|
|
391
|
-
_this.onToolBtnClick('align', 'right');
|
|
392
|
+
_this.onToolBtnClick('text-align', 'right');
|
|
392
393
|
},
|
|
393
394
|
type: "alignRight"
|
|
394
395
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -271,6 +271,13 @@ var setDesignConfig = function setDesignConfig(data) {
|
|
|
271
271
|
};
|
|
272
272
|
|
|
273
273
|
var debug = require('debug')('worker:Designer');
|
|
274
|
+
|
|
275
|
+
_antd.message.config({
|
|
276
|
+
getContainer: function getContainer() {
|
|
277
|
+
return document.querySelector('[magic_design]');
|
|
278
|
+
},
|
|
279
|
+
prefixCls: 'cylon-message'
|
|
280
|
+
});
|
|
274
281
|
/**
|
|
275
282
|
* @class Designer
|
|
276
283
|
* 主入口。
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TextAlignStyleAttributor = exports.TextAlignStyle = void 0;
|
|
7
|
+
|
|
8
|
+
var _quill = _interopRequireDefault(require("quill"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
13
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
14
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
15
|
+
__proto__: []
|
|
16
|
+
} instanceof Array && function (d, b) {
|
|
17
|
+
d.__proto__ = b;
|
|
18
|
+
} || function (d, b) {
|
|
19
|
+
for (var p in b) {
|
|
20
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return _extendStatics(d, b);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return function (d, b) {
|
|
28
|
+
_extendStatics(d, b);
|
|
29
|
+
|
|
30
|
+
function __() {
|
|
31
|
+
this.constructor = d;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
35
|
+
};
|
|
36
|
+
}();
|
|
37
|
+
|
|
38
|
+
var Parchment = _quill["default"]["import"]('parchment');
|
|
39
|
+
|
|
40
|
+
var TextAlignStyleAttributor =
|
|
41
|
+
/** @class */
|
|
42
|
+
function (_super) {
|
|
43
|
+
__extends(TextAlignStyleAttributor, _super);
|
|
44
|
+
|
|
45
|
+
function TextAlignStyleAttributor() {
|
|
46
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return TextAlignStyleAttributor;
|
|
50
|
+
}(Parchment.Attributor.Style);
|
|
51
|
+
|
|
52
|
+
exports.TextAlignStyleAttributor = TextAlignStyleAttributor;
|
|
53
|
+
var TextAlignStyle = new TextAlignStyleAttributor('text-align', 'text-align', {
|
|
54
|
+
scope: Parchment.Scope.BLOCK_BLOT
|
|
55
|
+
});
|
|
56
|
+
exports.TextAlignStyle = TextAlignStyle;
|
|
57
|
+
|
|
58
|
+
_quill["default"].register('formats/text-align', TextAlignStyle, true);
|
|
Binary file
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
@font-face {
|
|
2
|
-
font-family: "magic-box-iconfont";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
url('magic-box-iconfont.ttf?t=1699520254143') format('truetype');
|
|
2
|
+
font-family: "magic-box-iconfont"; /* Project id 3317752 */
|
|
3
|
+
src: url('magic-box-iconfont.woff2?t=1700809570587') format('woff2'),
|
|
4
|
+
url('magic-box-iconfont.woff?t=1700809570587') format('woff'),
|
|
5
|
+
url('magic-box-iconfont.ttf?t=1700809570587') format('truetype');
|
|
7
6
|
}
|
|
8
7
|
|
|
9
8
|
.magic-box-iconfont {
|
|
@@ -14,6 +13,18 @@
|
|
|
14
13
|
-moz-osx-font-smoothing: grayscale;
|
|
15
14
|
}
|
|
16
15
|
|
|
16
|
+
.magic-box-icon-circle-down:before {
|
|
17
|
+
content: "\e686";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.magic-box-icon-circle-up:before {
|
|
21
|
+
content: "\e687";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.magic-box-icon-Sidebar:before {
|
|
25
|
+
content: "\e685";
|
|
26
|
+
}
|
|
27
|
+
|
|
17
28
|
.magic-box-icon-text-align-center:before {
|
|
18
29
|
content: "\e682";
|
|
19
30
|
}
|
|
@@ -504,4 +515,5 @@
|
|
|
504
515
|
|
|
505
516
|
.magic-box-icon-image:before {
|
|
506
517
|
content: "\e608";
|
|
507
|
-
}
|
|
518
|
+
}
|
|
519
|
+
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: "magic-box-iconfont"; /* Project id 3317752 */
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
url('magic-box-iconfont.
|
|
6
|
-
url('magic-box-iconfont.ttf?t=1699520254143') format('truetype');
|
|
7
|
-
=======
|
|
8
|
-
src: url('magic-box-iconfont.woff2?t=1698821773295') format('woff2'),
|
|
9
|
-
url('magic-box-iconfont.woff?t=1698821773295') format('woff'),
|
|
10
|
-
url('magic-box-iconfont.ttf?t=1698821773295') format('truetype');
|
|
11
|
-
>>>>>>> 86531b2d2d408d9c7659ae4abbc8532b5abc431d
|
|
3
|
+
src: url('magic-box-iconfont.woff2?t=1700809570587') format('woff2'),
|
|
4
|
+
url('magic-box-iconfont.woff?t=1700809570587') format('woff'),
|
|
5
|
+
url('magic-box-iconfont.ttf?t=1700809570587') format('truetype');
|
|
12
6
|
}
|
|
13
7
|
|
|
14
8
|
.magic-box-iconfont {
|
|
@@ -19,7 +13,18 @@
|
|
|
19
13
|
-moz-osx-font-smoothing: grayscale;
|
|
20
14
|
}
|
|
21
15
|
|
|
22
|
-
|
|
16
|
+
.icon-circle-down:before {
|
|
17
|
+
content: "\e686";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.icon-circle-up:before {
|
|
21
|
+
content: "\e687";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.icon-Sidebar:before {
|
|
25
|
+
content: "\e685";
|
|
26
|
+
}
|
|
27
|
+
|
|
23
28
|
.icon-text-align-center:before {
|
|
24
29
|
content: "\e682";
|
|
25
30
|
}
|
|
@@ -32,8 +37,6 @@
|
|
|
32
37
|
content: "\e684";
|
|
33
38
|
}
|
|
34
39
|
|
|
35
|
-
=======
|
|
36
|
-
>>>>>>> 86531b2d2d408d9c7659ae4abbc8532b5abc431d
|
|
37
40
|
.icon-Wallet:before {
|
|
38
41
|
content: "\e681";
|
|
39
42
|
}
|