@fonixtree/magic-design 2.0.62 → 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 +1 -1
- package/es/composite-comp/common/components/ProductItem/index.less +4 -1
- package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +1 -1
- package/es/composite-comp/dito/components/HeadNavigation/defaultJSON.js +87 -0
- package/es/composite-comp/dito/components/MenuNavigation/defaultJSON.js +79 -0
- 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 +1 -1
- package/lib/composite-comp/common/components/ProductItem/index.less +4 -1
- package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +1 -1
- package/lib/composite-comp/dito/components/HeadNavigation/defaultJSON.js +87 -0
- package/lib/composite-comp/dito/components/MenuNavigation/defaultJSON.js +79 -0
- 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
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -91,8 +91,7 @@ function (_super) {
|
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
Video.prototype.render = function () {
|
|
94
|
-
var nodeData = this.props.nodeData;
|
|
95
|
-
|
|
94
|
+
var nodeData = this.props.nodeData;
|
|
96
95
|
return /*#__PURE__*/_react["default"].createElement("div", null, window.magicDesign.device === 'pc' ? /*#__PURE__*/_react["default"].createElement(_pc["default"], {
|
|
97
96
|
data: nodeData
|
|
98
97
|
}) : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
|
|
@@ -62,9 +62,11 @@
|
|
|
62
62
|
text-overflow: ellipsis;
|
|
63
63
|
flex-wrap: wrap;
|
|
64
64
|
line-height: 15px;
|
|
65
|
+
|
|
65
66
|
.old-price-wrap {
|
|
66
67
|
display: flex;
|
|
67
68
|
line-height: 13px;
|
|
69
|
+
|
|
68
70
|
.discount {
|
|
69
71
|
margin-right: 3px;
|
|
70
72
|
font-family: 'Montserrat';
|
|
@@ -76,6 +78,7 @@
|
|
|
76
78
|
padding: 0 4px;
|
|
77
79
|
background-color: #CE1126;
|
|
78
80
|
}
|
|
81
|
+
|
|
79
82
|
.old-price {
|
|
80
83
|
text-decoration: line-through;
|
|
81
84
|
width: fit-content;
|
|
@@ -85,7 +88,7 @@
|
|
|
85
88
|
.sold-count {
|
|
86
89
|
color: #7b7b7b;
|
|
87
90
|
font-size: 12px;
|
|
88
|
-
text-align: right
|
|
91
|
+
text-align: right;
|
|
89
92
|
flex-grow: 1;
|
|
90
93
|
}
|
|
91
94
|
}
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
.m-recommend-mobile .scrollContainer .scrollProductListRow {
|
|
71
71
|
display: flex;
|
|
72
72
|
flex-direction: row;
|
|
73
|
-
align-items:
|
|
73
|
+
align-items: flex-start;
|
|
74
74
|
}
|
|
75
75
|
.m-recommend-mobile .scrollContainer .scrollProductListRow .productCardRow {
|
|
76
76
|
margin-right: 0.16rem;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getDefaultJSON = void 0;
|
|
7
|
+
|
|
8
|
+
var _uuid = require("uuid");
|
|
9
|
+
|
|
10
|
+
var getDefaultJSON = function getDefaultJSON() {
|
|
11
|
+
return {
|
|
12
|
+
id: (0, _uuid.v4)(),
|
|
13
|
+
type: 'HEAD_NAVIGATION',
|
|
14
|
+
content: {
|
|
15
|
+
logo: {
|
|
16
|
+
id: (0, _uuid.v4)(),
|
|
17
|
+
open: true,
|
|
18
|
+
type: 'IMAGE',
|
|
19
|
+
content: {
|
|
20
|
+
h5Name: 'name2',
|
|
21
|
+
pcName: 'name2',
|
|
22
|
+
h5ImgSrc: '',
|
|
23
|
+
pcImgSrc: '',
|
|
24
|
+
clickUrl: ''
|
|
25
|
+
},
|
|
26
|
+
hover: {
|
|
27
|
+
open: false,
|
|
28
|
+
backgroundType: 'enlarge',
|
|
29
|
+
magnification: 1.5,
|
|
30
|
+
pcImgHoverUrl: '',
|
|
31
|
+
h5ImgHoverUrl: ''
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
box: {
|
|
35
|
+
id: (0, _uuid.v4)(),
|
|
36
|
+
open: true,
|
|
37
|
+
color: {
|
|
38
|
+
pc: '#D92929',
|
|
39
|
+
mobile: '#8493AF'
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
icon: {
|
|
43
|
+
id: (0, _uuid.v4)(),
|
|
44
|
+
open: true,
|
|
45
|
+
color: {
|
|
46
|
+
pc: '#D92929',
|
|
47
|
+
mobile: '#232F46'
|
|
48
|
+
},
|
|
49
|
+
cartIcon: {
|
|
50
|
+
pc: true,
|
|
51
|
+
mobile: true
|
|
52
|
+
},
|
|
53
|
+
messageIcon: {
|
|
54
|
+
pc: false,
|
|
55
|
+
mobile: true
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
spacing: {
|
|
60
|
+
pc: {
|
|
61
|
+
paddingTop: 20,
|
|
62
|
+
paddingBottom: 30,
|
|
63
|
+
marginBottom: window.magicDesign.compSpacing * 1.5,
|
|
64
|
+
fillUp: false
|
|
65
|
+
},
|
|
66
|
+
mobile: {
|
|
67
|
+
paddingTop: 8,
|
|
68
|
+
paddingBottom: 8,
|
|
69
|
+
paddingLeft: 15,
|
|
70
|
+
paddingRight: 15,
|
|
71
|
+
marginBottom: window.magicDesign.compSpacing
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
customize: {
|
|
75
|
+
layout: 'left',
|
|
76
|
+
align: 'left'
|
|
77
|
+
},
|
|
78
|
+
background: {
|
|
79
|
+
opacity: 100,
|
|
80
|
+
color: '#fff',
|
|
81
|
+
image: '',
|
|
82
|
+
bgType: 'color'
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
exports.getDefaultJSON = getDefaultJSON;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getDefaultJSON = void 0;
|
|
7
|
+
|
|
8
|
+
var _uuid = require("uuid");
|
|
9
|
+
|
|
10
|
+
var defaultMenuName = [{
|
|
11
|
+
name: 'Home',
|
|
12
|
+
icon: '',
|
|
13
|
+
selectedIcon: '',
|
|
14
|
+
clickUrl: ''
|
|
15
|
+
}, {
|
|
16
|
+
name: 'Category',
|
|
17
|
+
icon: '',
|
|
18
|
+
selectedIcon: '',
|
|
19
|
+
clickUrl: ''
|
|
20
|
+
}, {
|
|
21
|
+
name: 'Community',
|
|
22
|
+
icon: '',
|
|
23
|
+
selectedIcon: '',
|
|
24
|
+
clickUrl: ''
|
|
25
|
+
}, {
|
|
26
|
+
name: 'Cart',
|
|
27
|
+
icon: '',
|
|
28
|
+
selectedIcon: '',
|
|
29
|
+
clickUrl: ''
|
|
30
|
+
}, {
|
|
31
|
+
name: 'Account',
|
|
32
|
+
icon: '',
|
|
33
|
+
selectedIcon: '',
|
|
34
|
+
clickUrl: ''
|
|
35
|
+
}];
|
|
36
|
+
|
|
37
|
+
var getDefaultJSON = function getDefaultJSON() {
|
|
38
|
+
var groupId = (0, _uuid.v4)();
|
|
39
|
+
return {
|
|
40
|
+
id: groupId,
|
|
41
|
+
type: 'MENU_NAVIGATION',
|
|
42
|
+
groupSource: defaultMenuName.map(function (group) {
|
|
43
|
+
var itemId = (0, _uuid.v4)();
|
|
44
|
+
return {
|
|
45
|
+
id: itemId,
|
|
46
|
+
parentId: groupId,
|
|
47
|
+
type: group.name,
|
|
48
|
+
image: {
|
|
49
|
+
parentId: itemId,
|
|
50
|
+
id: (0, _uuid.v4)(),
|
|
51
|
+
open: true,
|
|
52
|
+
type: 'IMAGE',
|
|
53
|
+
content: {
|
|
54
|
+
h5Name: 'name2',
|
|
55
|
+
pcName: 'name2',
|
|
56
|
+
h5ImgSrc: '',
|
|
57
|
+
pcImgSrc: '',
|
|
58
|
+
clickUrl: ''
|
|
59
|
+
},
|
|
60
|
+
hover: {
|
|
61
|
+
open: true,
|
|
62
|
+
backgroundType: 'enlarge',
|
|
63
|
+
magnification: 1.5,
|
|
64
|
+
pcImgHoverUrl: '',
|
|
65
|
+
h5ImgHoverUrl: ''
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}),
|
|
70
|
+
background: {
|
|
71
|
+
opacity: 100,
|
|
72
|
+
color: '#fff',
|
|
73
|
+
image: '',
|
|
74
|
+
bgType: 'color'
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
exports.getDefaultJSON = getDefaultJSON;
|
|
@@ -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);
|