@fonixtree/magic-design 1.0.10 → 1.0.12
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/dito/components/SignBoard/mobile/index.js +10 -13
- package/es/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
- package/es/core/Designer/ToolBarModal/index.js +16 -4
- package/es/meta-comp/components/Text/formats/fontStyle.js +58 -0
- package/es/meta-comp/components/Text/index.js +2 -0
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +10 -13
- package/lib/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
- package/lib/core/Designer/ToolBarModal/index.js +16 -4
- package/lib/meta-comp/components/Text/formats/fontStyle.js +58 -0
- package/lib/meta-comp/components/Text/index.js +2 -0
- package/package.json +1 -1
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +0 -99
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +0 -54
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +0 -27
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +0 -27
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +0 -27
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +0 -96
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +0 -26
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +0 -101
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +0 -26
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +0 -99
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +0 -39
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +0 -93
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +0 -26
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BackgroundSVG.js +0 -27
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +0 -29
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +0 -49
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +0 -29
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +0 -26
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +0 -27
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +0 -31
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +0 -34
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +0 -41
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +0 -136
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +0 -25
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +0 -1
- package/es/core/Designer/TextEditModal/ToolBar/index.js +0 -219
- package/es/core/Designer/TextEditModal/ToolBar/index.less +0 -19
- package/es/core/Designer/TextEditModal/index.js +0 -100
- package/es/core/Designer/TextEditModal/index.less +0 -4
- package/es/core/Designer/TextEditModal_old/index.js +0 -142
- package/es/core/Designer/TextEditModal_old/index.less +0 -25
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +0 -99
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +0 -54
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +0 -27
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +0 -27
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +0 -27
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +0 -96
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +0 -26
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +0 -101
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +0 -26
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +0 -99
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +0 -39
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +0 -93
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +0 -26
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BackgroundSVG.js +0 -27
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +0 -29
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +0 -49
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +0 -29
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +0 -26
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +0 -27
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +0 -31
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +0 -34
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +0 -41
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +0 -136
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +0 -25
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +0 -1
- package/lib/core/Designer/TextEditModal/ToolBar/index.js +0 -219
- package/lib/core/Designer/TextEditModal/ToolBar/index.less +0 -19
- package/lib/core/Designer/TextEditModal/index.js +0 -100
- package/lib/core/Designer/TextEditModal/index.less +0 -4
- package/lib/core/Designer/TextEditModal_old/index.js +0 -142
- package/lib/core/Designer/TextEditModal_old/index.less +0 -25
|
@@ -210,10 +210,9 @@ function (_super) {
|
|
|
210
210
|
|
|
211
211
|
_this.getStoreInfo = function () {
|
|
212
212
|
return __awaiter(_this, void 0, void 0, function () {
|
|
213
|
-
var storeId,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
switch (_b.label) {
|
|
213
|
+
var storeId, storeDetailInfo;
|
|
214
|
+
return __generator(this, function (_a) {
|
|
215
|
+
switch (_a.label) {
|
|
217
216
|
case 0:
|
|
218
217
|
storeId = window.magicDesign.storeId;
|
|
219
218
|
if (!storeId) return [3
|
|
@@ -221,17 +220,15 @@ function (_super) {
|
|
|
221
220
|
, 2];
|
|
222
221
|
return [4
|
|
223
222
|
/*yield*/
|
|
224
|
-
,
|
|
225
|
-
storeId: storeId
|
|
226
|
-
})])];
|
|
223
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET')];
|
|
227
224
|
|
|
228
225
|
case 1:
|
|
229
|
-
|
|
226
|
+
storeDetailInfo = _a.sent();
|
|
230
227
|
this.setState({
|
|
231
|
-
storeInfo:
|
|
232
|
-
isFollow:
|
|
228
|
+
storeInfo: storeDetailInfo,
|
|
229
|
+
isFollow: storeDetailInfo.userHasFollowed == 'Y'
|
|
233
230
|
});
|
|
234
|
-
|
|
231
|
+
_a.label = 2;
|
|
235
232
|
|
|
236
233
|
case 2:
|
|
237
234
|
return [2
|
|
@@ -320,8 +317,8 @@ function (_super) {
|
|
|
320
317
|
action: 'operation',
|
|
321
318
|
params: {
|
|
322
319
|
type: 'CHAT',
|
|
323
|
-
storeId: storeInfo.storeId,
|
|
324
|
-
sysAccount: storeInfo.sysAccount
|
|
320
|
+
storeId: storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeId,
|
|
321
|
+
sysAccount: storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.sysAccount
|
|
325
322
|
}
|
|
326
323
|
};
|
|
327
324
|
window.magicDesign.handleAction(params);
|
|
@@ -212,10 +212,9 @@ function (_super) {
|
|
|
212
212
|
|
|
213
213
|
_this.getStoreInfo = function () {
|
|
214
214
|
return __awaiter(_this, void 0, void 0, function () {
|
|
215
|
-
var storeId,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
switch (_b.label) {
|
|
215
|
+
var storeId, storeDetailInfo;
|
|
216
|
+
return __generator(this, function (_a) {
|
|
217
|
+
switch (_a.label) {
|
|
219
218
|
case 0:
|
|
220
219
|
storeId = window.magicDesign.storeId;
|
|
221
220
|
if (!storeId) return [3
|
|
@@ -223,17 +222,15 @@ function (_super) {
|
|
|
223
222
|
, 2];
|
|
224
223
|
return [4
|
|
225
224
|
/*yield*/
|
|
226
|
-
,
|
|
227
|
-
storeId: storeId
|
|
228
|
-
})])];
|
|
225
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET')];
|
|
229
226
|
|
|
230
227
|
case 1:
|
|
231
|
-
|
|
228
|
+
storeDetailInfo = _a.sent();
|
|
232
229
|
this.setState({
|
|
233
|
-
storeInfo:
|
|
234
|
-
isFollow:
|
|
230
|
+
storeInfo: storeDetailInfo,
|
|
231
|
+
isFollow: storeDetailInfo.userHasFollowed == 'Y'
|
|
235
232
|
});
|
|
236
|
-
|
|
233
|
+
_a.label = 2;
|
|
237
234
|
|
|
238
235
|
case 2:
|
|
239
236
|
return [2
|
|
@@ -146,18 +146,30 @@ function (_super) {
|
|
|
146
146
|
_this.props.quillRef.format('font', value);
|
|
147
147
|
} else if (type == 'font-weight') {
|
|
148
148
|
_this.props.quillRef.format('font-weight', value);
|
|
149
|
+
} else if (type == 'font-style') {
|
|
150
|
+
_this.props.quillRef.format('font-style', 'italic' === quillFormat['font-style'] ? '' : 'italic');
|
|
149
151
|
} else if (type == 'font-family') {
|
|
150
152
|
_this.props.quillRef.format('font-family', value);
|
|
151
153
|
} else if (type == 'text-decoration-style') {
|
|
154
|
+
_this.props.quillRef.format('underline', true);
|
|
155
|
+
|
|
152
156
|
_this.props.quillRef.format('text-decoration-style', value);
|
|
153
157
|
} else if (type == 'bullet') {
|
|
154
158
|
_this.props.quillRef.format('list-style-type', value);
|
|
155
159
|
|
|
156
|
-
|
|
160
|
+
if (value === quillFormat['list-style-type']) {
|
|
161
|
+
_this.props.quillRef.format('list', '');
|
|
162
|
+
} else {
|
|
163
|
+
_this.props.quillRef.format('list', 'bullet');
|
|
164
|
+
}
|
|
157
165
|
} else if (type == 'ordered') {
|
|
158
166
|
_this.props.quillRef.format('list-style-type', value);
|
|
159
167
|
|
|
160
|
-
|
|
168
|
+
if (value === quillFormat['list-style-type']) {
|
|
169
|
+
_this.props.quillRef.format('list', '');
|
|
170
|
+
} else {
|
|
171
|
+
_this.props.quillRef.format('list', 'ordered');
|
|
172
|
+
}
|
|
161
173
|
} else if (type == 'text-decoration-color') {
|
|
162
174
|
if (value) {
|
|
163
175
|
_this.props.quillRef.format('underline', true);
|
|
@@ -269,9 +281,9 @@ function (_super) {
|
|
|
269
281
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
270
282
|
className: "tool-item"
|
|
271
283
|
}, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
|
|
272
|
-
active: quillFormat['italic'
|
|
284
|
+
active: quillFormat['font-style'] === 'italic',
|
|
273
285
|
onChange: function onChange() {
|
|
274
|
-
_this.onToolBtnClick('
|
|
286
|
+
_this.onToolBtnClick('font-style');
|
|
275
287
|
},
|
|
276
288
|
type: "italic"
|
|
277
289
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FontStyleAttributor = exports.FontStyle = 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 FontStyleAttributor =
|
|
41
|
+
/** @class */
|
|
42
|
+
function (_super) {
|
|
43
|
+
__extends(FontStyleAttributor, _super);
|
|
44
|
+
|
|
45
|
+
function FontStyleAttributor() {
|
|
46
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return FontStyleAttributor;
|
|
50
|
+
}(Parchment.Attributor.Style);
|
|
51
|
+
|
|
52
|
+
exports.FontStyleAttributor = FontStyleAttributor;
|
|
53
|
+
var FontStyle = new FontStyleAttributor('font-style', 'font-style', {
|
|
54
|
+
scope: Parchment.Scope.INLINE
|
|
55
|
+
});
|
|
56
|
+
exports.FontStyle = FontStyle;
|
|
57
|
+
|
|
58
|
+
_quill["default"].register('formats/font-style', FontStyle, true);
|
|
@@ -210,10 +210,9 @@ function (_super) {
|
|
|
210
210
|
|
|
211
211
|
_this.getStoreInfo = function () {
|
|
212
212
|
return __awaiter(_this, void 0, void 0, function () {
|
|
213
|
-
var storeId,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
switch (_b.label) {
|
|
213
|
+
var storeId, storeDetailInfo;
|
|
214
|
+
return __generator(this, function (_a) {
|
|
215
|
+
switch (_a.label) {
|
|
217
216
|
case 0:
|
|
218
217
|
storeId = window.magicDesign.storeId;
|
|
219
218
|
if (!storeId) return [3
|
|
@@ -221,17 +220,15 @@ function (_super) {
|
|
|
221
220
|
, 2];
|
|
222
221
|
return [4
|
|
223
222
|
/*yield*/
|
|
224
|
-
,
|
|
225
|
-
storeId: storeId
|
|
226
|
-
})])];
|
|
223
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET')];
|
|
227
224
|
|
|
228
225
|
case 1:
|
|
229
|
-
|
|
226
|
+
storeDetailInfo = _a.sent();
|
|
230
227
|
this.setState({
|
|
231
|
-
storeInfo:
|
|
232
|
-
isFollow:
|
|
228
|
+
storeInfo: storeDetailInfo,
|
|
229
|
+
isFollow: storeDetailInfo.userHasFollowed == 'Y'
|
|
233
230
|
});
|
|
234
|
-
|
|
231
|
+
_a.label = 2;
|
|
235
232
|
|
|
236
233
|
case 2:
|
|
237
234
|
return [2
|
|
@@ -320,8 +317,8 @@ function (_super) {
|
|
|
320
317
|
action: 'operation',
|
|
321
318
|
params: {
|
|
322
319
|
type: 'CHAT',
|
|
323
|
-
storeId: storeInfo.storeId,
|
|
324
|
-
sysAccount: storeInfo.sysAccount
|
|
320
|
+
storeId: storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeId,
|
|
321
|
+
sysAccount: storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.sysAccount
|
|
325
322
|
}
|
|
326
323
|
};
|
|
327
324
|
window.magicDesign.handleAction(params);
|
|
@@ -212,10 +212,9 @@ function (_super) {
|
|
|
212
212
|
|
|
213
213
|
_this.getStoreInfo = function () {
|
|
214
214
|
return __awaiter(_this, void 0, void 0, function () {
|
|
215
|
-
var storeId,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
switch (_b.label) {
|
|
215
|
+
var storeId, storeDetailInfo;
|
|
216
|
+
return __generator(this, function (_a) {
|
|
217
|
+
switch (_a.label) {
|
|
219
218
|
case 0:
|
|
220
219
|
storeId = window.magicDesign.storeId;
|
|
221
220
|
if (!storeId) return [3
|
|
@@ -223,17 +222,15 @@ function (_super) {
|
|
|
223
222
|
, 2];
|
|
224
223
|
return [4
|
|
225
224
|
/*yield*/
|
|
226
|
-
,
|
|
227
|
-
storeId: storeId
|
|
228
|
-
})])];
|
|
225
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET')];
|
|
229
226
|
|
|
230
227
|
case 1:
|
|
231
|
-
|
|
228
|
+
storeDetailInfo = _a.sent();
|
|
232
229
|
this.setState({
|
|
233
|
-
storeInfo:
|
|
234
|
-
isFollow:
|
|
230
|
+
storeInfo: storeDetailInfo,
|
|
231
|
+
isFollow: storeDetailInfo.userHasFollowed == 'Y'
|
|
235
232
|
});
|
|
236
|
-
|
|
233
|
+
_a.label = 2;
|
|
237
234
|
|
|
238
235
|
case 2:
|
|
239
236
|
return [2
|
|
@@ -146,18 +146,30 @@ function (_super) {
|
|
|
146
146
|
_this.props.quillRef.format('font', value);
|
|
147
147
|
} else if (type == 'font-weight') {
|
|
148
148
|
_this.props.quillRef.format('font-weight', value);
|
|
149
|
+
} else if (type == 'font-style') {
|
|
150
|
+
_this.props.quillRef.format('font-style', 'italic' === quillFormat['font-style'] ? '' : 'italic');
|
|
149
151
|
} else if (type == 'font-family') {
|
|
150
152
|
_this.props.quillRef.format('font-family', value);
|
|
151
153
|
} else if (type == 'text-decoration-style') {
|
|
154
|
+
_this.props.quillRef.format('underline', true);
|
|
155
|
+
|
|
152
156
|
_this.props.quillRef.format('text-decoration-style', value);
|
|
153
157
|
} else if (type == 'bullet') {
|
|
154
158
|
_this.props.quillRef.format('list-style-type', value);
|
|
155
159
|
|
|
156
|
-
|
|
160
|
+
if (value === quillFormat['list-style-type']) {
|
|
161
|
+
_this.props.quillRef.format('list', '');
|
|
162
|
+
} else {
|
|
163
|
+
_this.props.quillRef.format('list', 'bullet');
|
|
164
|
+
}
|
|
157
165
|
} else if (type == 'ordered') {
|
|
158
166
|
_this.props.quillRef.format('list-style-type', value);
|
|
159
167
|
|
|
160
|
-
|
|
168
|
+
if (value === quillFormat['list-style-type']) {
|
|
169
|
+
_this.props.quillRef.format('list', '');
|
|
170
|
+
} else {
|
|
171
|
+
_this.props.quillRef.format('list', 'ordered');
|
|
172
|
+
}
|
|
161
173
|
} else if (type == 'text-decoration-color') {
|
|
162
174
|
if (value) {
|
|
163
175
|
_this.props.quillRef.format('underline', true);
|
|
@@ -269,9 +281,9 @@ function (_super) {
|
|
|
269
281
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
270
282
|
className: "tool-item"
|
|
271
283
|
}, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
|
|
272
|
-
active: quillFormat['italic'
|
|
284
|
+
active: quillFormat['font-style'] === 'italic',
|
|
273
285
|
onChange: function onChange() {
|
|
274
|
-
_this.onToolBtnClick('
|
|
286
|
+
_this.onToolBtnClick('font-style');
|
|
275
287
|
},
|
|
276
288
|
type: "italic"
|
|
277
289
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FontStyleAttributor = exports.FontStyle = 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 FontStyleAttributor =
|
|
41
|
+
/** @class */
|
|
42
|
+
function (_super) {
|
|
43
|
+
__extends(FontStyleAttributor, _super);
|
|
44
|
+
|
|
45
|
+
function FontStyleAttributor() {
|
|
46
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return FontStyleAttributor;
|
|
50
|
+
}(Parchment.Attributor.Style);
|
|
51
|
+
|
|
52
|
+
exports.FontStyleAttributor = FontStyleAttributor;
|
|
53
|
+
var FontStyle = new FontStyleAttributor('font-style', 'font-style', {
|
|
54
|
+
scope: Parchment.Scope.INLINE
|
|
55
|
+
});
|
|
56
|
+
exports.FontStyle = FontStyle;
|
|
57
|
+
|
|
58
|
+
_quill["default"].register('formats/font-style', FontStyle, true);
|
package/package.json
CHANGED
|
@@ -1,99 +0,0 @@
|
|
|
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 _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
|
|
12
|
-
var _AlignLeftSVG = _interopRequireDefault(require("../images/AlignLeftSVG"));
|
|
13
|
-
|
|
14
|
-
var _AlignCenterSVG = _interopRequireDefault(require("../images/AlignCenterSVG"));
|
|
15
|
-
|
|
16
|
-
var _AlignRightSVG = _interopRequireDefault(require("../images/AlignRightSVG"));
|
|
17
|
-
|
|
18
|
-
require("./index.less");
|
|
19
|
-
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
-
|
|
22
|
-
var __extends = void 0 && (void 0).__extends || function () {
|
|
23
|
-
var _extendStatics = function extendStatics(d, b) {
|
|
24
|
-
_extendStatics = Object.setPrototypeOf || {
|
|
25
|
-
__proto__: []
|
|
26
|
-
} instanceof Array && function (d, b) {
|
|
27
|
-
d.__proto__ = b;
|
|
28
|
-
} || function (d, b) {
|
|
29
|
-
for (var p in b) {
|
|
30
|
-
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
return _extendStatics(d, b);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return function (d, b) {
|
|
38
|
-
_extendStatics(d, b);
|
|
39
|
-
|
|
40
|
-
function __() {
|
|
41
|
-
this.constructor = d;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
45
|
-
};
|
|
46
|
-
}();
|
|
47
|
-
|
|
48
|
-
var AlignSelectPicker =
|
|
49
|
-
/** @class */
|
|
50
|
-
function (_super) {
|
|
51
|
-
__extends(AlignSelectPicker, _super);
|
|
52
|
-
|
|
53
|
-
function AlignSelectPicker() {
|
|
54
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
AlignSelectPicker.prototype.render = function () {
|
|
58
|
-
var _a = this.props,
|
|
59
|
-
visibility = _a.visibility,
|
|
60
|
-
value = _a.value,
|
|
61
|
-
_onChange = _a.onChange;
|
|
62
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
63
|
-
className: "align-select-picker-panel"
|
|
64
|
-
}, visibility && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
65
|
-
className: "panel-bg"
|
|
66
|
-
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
67
|
-
className: "select-modal-content"
|
|
68
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
69
|
-
className: (0, _classnames["default"])('select-item', {
|
|
70
|
-
active: value == 'left'
|
|
71
|
-
})
|
|
72
|
-
}, /*#__PURE__*/_react["default"].createElement(_AlignLeftSVG["default"], {
|
|
73
|
-
onChange: function onChange() {
|
|
74
|
-
return _onChange('');
|
|
75
|
-
}
|
|
76
|
-
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
77
|
-
className: (0, _classnames["default"])('select-item', {
|
|
78
|
-
active: value == 'center'
|
|
79
|
-
})
|
|
80
|
-
}, /*#__PURE__*/_react["default"].createElement(_AlignCenterSVG["default"], {
|
|
81
|
-
onChange: function onChange() {
|
|
82
|
-
return _onChange('center');
|
|
83
|
-
}
|
|
84
|
-
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
85
|
-
className: (0, _classnames["default"])('select-item', {
|
|
86
|
-
active: value == 'right'
|
|
87
|
-
})
|
|
88
|
-
}, /*#__PURE__*/_react["default"].createElement(_AlignRightSVG["default"], {
|
|
89
|
-
onChange: function onChange() {
|
|
90
|
-
return _onChange('right');
|
|
91
|
-
}
|
|
92
|
-
})))));
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
return AlignSelectPicker;
|
|
96
|
-
}(_react["default"].Component);
|
|
97
|
-
|
|
98
|
-
var _default = AlignSelectPicker;
|
|
99
|
-
exports["default"] = _default;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
.align-select-picker-panel {
|
|
2
|
-
z-index: 999;
|
|
3
|
-
position: absolute;
|
|
4
|
-
top: 100%;
|
|
5
|
-
left: 0;
|
|
6
|
-
|
|
7
|
-
.panel-bg {
|
|
8
|
-
position: fixed;
|
|
9
|
-
z-index: 0;
|
|
10
|
-
top: 0;
|
|
11
|
-
left: 0;
|
|
12
|
-
right: 0;
|
|
13
|
-
bottom: 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.select-modal-content {
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
padding: 5px;
|
|
20
|
-
background-color: #fff;
|
|
21
|
-
border: 1px solid #E7E9E8;
|
|
22
|
-
box-shadow: 0 8px 16px 4px hsla(0, 0%, 0%, 0.04);
|
|
23
|
-
color: #262626;
|
|
24
|
-
border-radius: 6px;
|
|
25
|
-
|
|
26
|
-
.select-item {
|
|
27
|
-
width: 26px;
|
|
28
|
-
height: 26px;
|
|
29
|
-
display: flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
border-radius: 6px;
|
|
34
|
-
padding: 0;
|
|
35
|
-
border: none;
|
|
36
|
-
transition: .2s all linear;
|
|
37
|
-
position: relative;
|
|
38
|
-
margin: 0 5px;
|
|
39
|
-
|
|
40
|
-
&:hover {
|
|
41
|
-
background: #f8f8f8;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&.active {
|
|
45
|
-
background: #E7E9E8;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
svg {
|
|
49
|
-
height: 18px;
|
|
50
|
-
height: 18px;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
|
-
var _default = function _default(_a) {
|
|
13
|
-
var onChange = _a.onChange;
|
|
14
|
-
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
15
|
-
id: "ne-t-alignment-center",
|
|
16
|
-
onClick: onChange,
|
|
17
|
-
viewBox: "0 0 256 256",
|
|
18
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
19
|
-
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
20
|
-
fill: "currentColor",
|
|
21
|
-
fillRule: "nonzero"
|
|
22
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
23
|
-
d: "M181 148c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L181 168H76c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L76 148h105ZM218 89c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L218 109H38c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L38 89h180ZM181 30c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L181 50H76c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L76 30h105ZM218 207c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L218 227H38c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L38 207h180Z"
|
|
24
|
-
})));
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
exports["default"] = _default;
|
package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
|
-
var _default = function _default(_a) {
|
|
13
|
-
var onChange = _a.onChange;
|
|
14
|
-
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
15
|
-
id: "ne-t-alignment-left",
|
|
16
|
-
onClick: onChange,
|
|
17
|
-
viewBox: "0 0 256 256",
|
|
18
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
19
|
-
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
20
|
-
fill: "currentColor",
|
|
21
|
-
fillRule: "nonzero"
|
|
22
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
23
|
-
d: "M143 148c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L143 168H38c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L38 148h105ZM218 89c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L218 109H38c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L38 89h180ZM143 30c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L143 50H38c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L38 30h105ZM218 207c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L218 227H38c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L38 207h180Z"
|
|
24
|
-
})));
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
exports["default"] = _default;
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
|
-
var _default = function _default(_a) {
|
|
13
|
-
var onChange = _a.onChange;
|
|
14
|
-
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
15
|
-
id: "ne-t-alignment-right",
|
|
16
|
-
onClick: onChange,
|
|
17
|
-
viewBox: "0 0 256 256",
|
|
18
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
19
|
-
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
20
|
-
fill: "currentColor",
|
|
21
|
-
fillRule: "nonzero"
|
|
22
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
23
|
-
d: "M218 148c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L218 168H113c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L113 148h105ZM218 89c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L218 109H38c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L38 89h180ZM218 30c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L218 50H113c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L113 30h105ZM218 207c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L218 227H38c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L38 207h180Z"
|
|
24
|
-
})));
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
exports["default"] = _default;
|