@titaui/pc 1.10.44 → 1.10.45
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/lib/components/rich-editor/basic/schema.js +47 -0
- package/lib/components/rich-editor/consts/events.js +12 -0
- package/lib/components/rich-editor/enums.js +42 -0
- package/lib/components/rich-editor/index.js +58 -0
- package/lib/components/rich-editor/keymap.js +119 -0
- package/lib/components/rich-editor/keymaps/index.js +241 -0
- package/lib/components/rich-editor/models/controller.js +18 -0
- package/lib/components/rich-editor/models/editor.js +47 -0
- package/lib/components/rich-editor/models/plugin.js +20 -0
- package/lib/components/rich-editor/models/schema.js +121 -0
- package/lib/components/rich-editor/plugins/block/block-quote/commond.js +27 -0
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +126 -0
- package/lib/components/rich-editor/plugins/block/heading/commonds.js +31 -0
- package/lib/components/rich-editor/plugins/block/heading/index.js +188 -0
- package/lib/components/rich-editor/plugins/block/index.js +57 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/conversions.js +172 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/indent-list-items-selected.js +163 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/indent-list.js +59 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-forward.js +74 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/index.js +45 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +104 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +92 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +89 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-paragraph-with-list.js +48 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-sibling-list-items.js +61 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/merge-lists.js +34 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/outdent-list-items-selected.js +289 -0
- package/lib/components/rich-editor/plugins/block/lists/actions/wrap-and-join-lists.js +180 -0
- package/lib/components/rich-editor/plugins/block/lists/baseCommand.js +328 -0
- package/lib/components/rich-editor/plugins/block/lists/commond/indent-list.js +60 -0
- package/lib/components/rich-editor/plugins/block/lists/commond/index.js +396 -0
- package/lib/components/rich-editor/plugins/block/lists/commond/join-list-item-forward.js +45 -0
- package/lib/components/rich-editor/plugins/block/lists/commond/listBackspace.js +302 -0
- package/lib/components/rich-editor/plugins/block/lists/commond/outdent-list.js +43 -0
- package/lib/components/rich-editor/plugins/block/lists/index.js +222 -0
- package/lib/components/rich-editor/plugins/block/lists/messages.js +38 -0
- package/lib/components/rich-editor/plugins/block/lists/pm-plugins/input-rule.js +152 -0
- package/lib/components/rich-editor/plugins/block/lists/pm-plugins/keymap.js +33 -0
- package/lib/components/rich-editor/plugins/block/lists/pm-plugins/main.js +94 -0
- package/lib/components/rich-editor/plugins/block/lists/styles.js +15 -0
- package/lib/components/rich-editor/plugins/block/lists/transforms.js +347 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/analytics.js +48 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/find.js +126 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/indentation.js +87 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/node.js +144 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/replace-content.js +31 -0
- package/lib/components/rich-editor/plugins/block/lists/utils/selection.js +201 -0
- package/lib/components/rich-editor/plugins/block/lists/utils.js +52 -0
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +91 -0
- package/lib/components/rich-editor/plugins/core/index.js +90 -0
- package/lib/components/rich-editor/plugins/core/pm-plugins/focus-handler.js +67 -0
- package/lib/components/rich-editor/plugins/core/pm-plugins/keymap.js +29 -0
- package/lib/components/rich-editor/plugins/core/pm-plugins/reactNodeView.js +80 -0
- package/lib/components/rich-editor/plugins/extension/alignment/commond.js +24 -0
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +111 -0
- package/lib/components/rich-editor/plugins/extension/alignment/utils.js +19 -0
- package/lib/components/rich-editor/plugins/extension/index.js +18 -0
- package/lib/components/rich-editor/plugins/index.js +44 -0
- package/lib/components/rich-editor/plugins/inline/color/commond.js +128 -0
- package/lib/components/rich-editor/plugins/inline/color/consts.js +43 -0
- package/lib/components/rich-editor/plugins/inline/color/index.css +61 -0
- package/lib/components/rich-editor/plugins/inline/color/index.js +209 -0
- package/lib/components/rich-editor/plugins/inline/color/selector.js +250 -0
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +147 -0
- package/lib/components/rich-editor/plugins/inline/em/index.js +93 -0
- package/lib/components/rich-editor/plugins/inline/index.js +83 -0
- package/lib/components/rich-editor/plugins/inline/link/commands.js +256 -0
- package/lib/components/rich-editor/plugins/inline/link/index.js +149 -0
- package/lib/components/rich-editor/plugins/inline/link/pm-plugins/fake-cursor-for-toolbar.js +77 -0
- package/lib/components/rich-editor/plugins/inline/link/pm-plugins/main.js +293 -0
- package/lib/components/rich-editor/plugins/inline/link/ui/index.css +79 -0
- package/lib/components/rich-editor/plugins/inline/link/ui/linkEditor.js +148 -0
- package/lib/components/rich-editor/plugins/inline/link/ui/linkToolbar.js +88 -0
- package/lib/components/rich-editor/plugins/inline/link/ui/toolbarBtn.js +117 -0
- package/lib/components/rich-editor/plugins/inline/link/utils.js +33 -0
- package/lib/components/rich-editor/plugins/inline/strong/index.js +137 -0
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +145 -0
- package/lib/components/rich-editor/plugins/util.js +281 -0
- package/lib/components/rich-editor/react/reactNodeView.js +383 -0
- package/lib/components/rich-editor/react/uiProvider.js +185 -0
- package/lib/components/rich-editor/schemas/basic.js +309 -0
- package/lib/components/rich-editor/schemas/index.js +19 -0
- package/lib/components/rich-editor/schemas/list.js +342 -0
- package/lib/components/rich-editor/types/commond.js +5 -0
- package/lib/components/rich-editor/types/index.js +18 -0
- package/lib/components/rich-editor/ui/Popup/index.js +247 -0
- package/lib/components/rich-editor/ui/Popup/utils.js +399 -0
- package/lib/components/rich-editor/ui/editor/index.css +144 -0
- package/lib/components/rich-editor/ui/editor/index.js +143 -0
- package/lib/components/rich-editor/ui/normal-toolbar/index.css +29 -0
- package/lib/components/rich-editor/ui/normal-toolbar/index.js +109 -0
- package/lib/components/rich-editor/utils/browser.js +35 -0
- package/lib/components/rich-editor/utils/commands.js +266 -0
- package/lib/components/rich-editor/utils/document.js +160 -0
- package/lib/components/rich-editor/utils/event.js +79 -0
- package/lib/components/rich-editor/utils/helpers.js +16 -0
- package/lib/components/rich-editor/utils/mark.js +168 -0
- package/lib/components/rich-editor/utils/slice.js +85 -0
- package/lib/components/rich-editor/utils/toolbar.js +228 -0
- package/lib/components/upload/index.js +4 -2
- package/lib/components/upload/util.js +2 -0
- package/lib/index.js +8 -0
- package/package.json +20 -2
- package/yarn-error.log +22184 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.flatmap = flatmap;
|
|
7
|
+
exports.getFragmentBackingArray = getFragmentBackingArray;
|
|
8
|
+
exports.mapChildren = mapChildren;
|
|
9
|
+
exports.mapFragment = mapFragment;
|
|
10
|
+
exports.mapSlice = mapSlice;
|
|
11
|
+
|
|
12
|
+
var _prosemirrorModel = require("prosemirror-model");
|
|
13
|
+
|
|
14
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
15
|
+
|
|
16
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
+
|
|
18
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
19
|
+
|
|
20
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
21
|
+
|
|
22
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
23
|
+
|
|
24
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A helper to get the underlying array of a fragment.
|
|
28
|
+
*/
|
|
29
|
+
function getFragmentBackingArray(fragment) {
|
|
30
|
+
return fragment.content;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function mapFragment(content, callback) {
|
|
34
|
+
var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
35
|
+
var children = [];
|
|
36
|
+
|
|
37
|
+
for (var i = 0, size = content.childCount; i < size; i++) {
|
|
38
|
+
var _node = content.child(i);
|
|
39
|
+
|
|
40
|
+
var transformed = _node.isLeaf ? callback(_node, parent, i) : callback(_node.copy(mapFragment(_node.content, callback, _node)), parent, i);
|
|
41
|
+
|
|
42
|
+
if (transformed) {
|
|
43
|
+
if (transformed instanceof _prosemirrorModel.Fragment) {
|
|
44
|
+
children.push.apply(children, _toConsumableArray(getFragmentBackingArray(transformed)));
|
|
45
|
+
} else if (Array.isArray(transformed)) {
|
|
46
|
+
children.push.apply(children, _toConsumableArray(transformed));
|
|
47
|
+
} else {
|
|
48
|
+
children.push(transformed);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return _prosemirrorModel.Fragment.fromArray(children);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function mapSlice(slice, callback) {
|
|
57
|
+
var fragment = mapFragment(slice.content, callback);
|
|
58
|
+
return new _prosemirrorModel.Slice(fragment, slice.openStart, slice.openEnd);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function flatmap(fragment, callback) {
|
|
62
|
+
var fragmentContent = [];
|
|
63
|
+
|
|
64
|
+
for (var i = 0; i < fragment.childCount; i++) {
|
|
65
|
+
var child = callback(fragment.child(i), i, fragment);
|
|
66
|
+
|
|
67
|
+
if (Array.isArray(child)) {
|
|
68
|
+
fragmentContent.push.apply(fragmentContent, _toConsumableArray(child));
|
|
69
|
+
} else {
|
|
70
|
+
fragmentContent.push(child);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return _prosemirrorModel.Fragment.fromArray(fragmentContent);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function mapChildren(node, callback) {
|
|
78
|
+
var array = [];
|
|
79
|
+
|
|
80
|
+
for (var i = 0; i < node.childCount; i++) {
|
|
81
|
+
array.push(callback(node.child(i), i, node instanceof _prosemirrorModel.Fragment ? node : node.content));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return array;
|
|
85
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getMenuDescibitionFromType = getMenuDescibitionFromType;
|
|
7
|
+
exports.handleClickToolMenu = handleClickToolMenu;
|
|
8
|
+
exports.headingIsActive = headingIsActive;
|
|
9
|
+
exports.markActive = markActive;
|
|
10
|
+
exports.orderedListIsActive = orderedListIsActive;
|
|
11
|
+
|
|
12
|
+
var _prosemirrorCommands = require("prosemirror-commands");
|
|
13
|
+
|
|
14
|
+
var _schemas = _interopRequireDefault(require("../schemas"));
|
|
15
|
+
|
|
16
|
+
var _commands = require("./commands");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
function getMenuDescibitionFromType(type) {
|
|
21
|
+
switch (type) {
|
|
22
|
+
case 'h1':
|
|
23
|
+
return {
|
|
24
|
+
title: '一级标题',
|
|
25
|
+
icon: 'tu-icon-text-H1'
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
case 'h2':
|
|
29
|
+
return {
|
|
30
|
+
title: '二级标题',
|
|
31
|
+
icon: 'tu-icon-text-H2'
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
case 'h3':
|
|
35
|
+
return {
|
|
36
|
+
title: '三级标题',
|
|
37
|
+
icon: 'tu-icon-text-H3'
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
case 'strong':
|
|
41
|
+
return {
|
|
42
|
+
title: '加粗',
|
|
43
|
+
icon: 'tu-icon-text-blod'
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
case 'color':
|
|
47
|
+
return {
|
|
48
|
+
title: '文字颜色',
|
|
49
|
+
icon: 'tu-icon-text-color'
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
case 'underLine':
|
|
53
|
+
return {
|
|
54
|
+
title: '下划线',
|
|
55
|
+
icon: 'tu-icon-text-underline'
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
case 'deleteLine':
|
|
59
|
+
return {
|
|
60
|
+
title: '删除线',
|
|
61
|
+
icon: 'tu-icon-text-delline'
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
case 'orderList':
|
|
65
|
+
return {
|
|
66
|
+
title: '有序列表',
|
|
67
|
+
icon: 'tu-icon-text-number-list'
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
case 'unOrderList':
|
|
71
|
+
return {
|
|
72
|
+
title: '无序列表',
|
|
73
|
+
icon: 'tu-icon-text-bullet-list'
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
case 'left':
|
|
77
|
+
return {
|
|
78
|
+
title: '左对齐',
|
|
79
|
+
icon: 'tu-icon-text-left'
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
case 'center':
|
|
83
|
+
return {
|
|
84
|
+
title: '居中对齐',
|
|
85
|
+
icon: 'tu-icon-text-center'
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
case 'right':
|
|
89
|
+
return {
|
|
90
|
+
title: '右对齐',
|
|
91
|
+
icon: 'tu-icon-text-right'
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
case 'task':
|
|
95
|
+
return {
|
|
96
|
+
title: '任务',
|
|
97
|
+
icon: 'tu-icon-text-task'
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
case 'checkList':
|
|
101
|
+
return {
|
|
102
|
+
title: '清单',
|
|
103
|
+
icon: 'tu-icon-text-box'
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
case 'table':
|
|
107
|
+
return {
|
|
108
|
+
title: '表格',
|
|
109
|
+
icon: 'tu-icon-text-table'
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
case 'image':
|
|
113
|
+
return {
|
|
114
|
+
title: '图片/视频',
|
|
115
|
+
icon: 'tu-icon-text-photo'
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
case 'quote':
|
|
119
|
+
return {
|
|
120
|
+
title: '引用',
|
|
121
|
+
icon: 'tu-icon-text-quotel'
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
case 'link':
|
|
125
|
+
return {
|
|
126
|
+
title: '链接',
|
|
127
|
+
icon: 'tu-icon-text-link'
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
case 'at':
|
|
131
|
+
return {
|
|
132
|
+
title: '@人',
|
|
133
|
+
icon: 'tu-icon-text-man'
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
default:
|
|
137
|
+
return {
|
|
138
|
+
title: '',
|
|
139
|
+
icon: ''
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function handleClickToolMenu(state, dispatchTransiction, type) {
|
|
145
|
+
switch (type) {
|
|
146
|
+
case 'h1':
|
|
147
|
+
return (0, _commands.setHeadLine)(state, dispatchTransiction, 1);
|
|
148
|
+
|
|
149
|
+
case 'h2':
|
|
150
|
+
return (0, _commands.setHeadLine)(state, dispatchTransiction, 2);
|
|
151
|
+
|
|
152
|
+
case 'h3':
|
|
153
|
+
return (0, _commands.setHeadLine)(state, dispatchTransiction, 3);
|
|
154
|
+
|
|
155
|
+
case 'strong':
|
|
156
|
+
return (0, _prosemirrorCommands.toggleMark)(_schemas["default"].marks.strong)(state, dispatchTransiction);
|
|
157
|
+
|
|
158
|
+
case 'color':
|
|
159
|
+
return;
|
|
160
|
+
|
|
161
|
+
case 'underLine':
|
|
162
|
+
return (0, _prosemirrorCommands.toggleMark)(_schemas["default"].marks.underLine)(state, dispatchTransiction);
|
|
163
|
+
|
|
164
|
+
case 'deleteLine':
|
|
165
|
+
return (0, _prosemirrorCommands.toggleMark)(_schemas["default"].marks.deleteLine)(state, dispatchTransiction);
|
|
166
|
+
|
|
167
|
+
case 'orderList':
|
|
168
|
+
return (0, _commands.toggleList)(state, dispatchTransiction, _schemas["default"].nodes.ordered_list);
|
|
169
|
+
|
|
170
|
+
case 'unOrderList':
|
|
171
|
+
return (0, _commands.toggleList)(state, dispatchTransiction, _schemas["default"].nodes.bullet_list);
|
|
172
|
+
|
|
173
|
+
case 'left':
|
|
174
|
+
case 'center':
|
|
175
|
+
case 'right':
|
|
176
|
+
return (0, _commands.setAlignment)(state, dispatchTransiction, type);
|
|
177
|
+
|
|
178
|
+
case 'task':
|
|
179
|
+
return;
|
|
180
|
+
|
|
181
|
+
case 'checkList':
|
|
182
|
+
return;
|
|
183
|
+
|
|
184
|
+
case 'table':
|
|
185
|
+
return;
|
|
186
|
+
|
|
187
|
+
case 'image':
|
|
188
|
+
return;
|
|
189
|
+
|
|
190
|
+
case 'quote':
|
|
191
|
+
return;
|
|
192
|
+
|
|
193
|
+
case 'link':
|
|
194
|
+
return;
|
|
195
|
+
|
|
196
|
+
case 'at':
|
|
197
|
+
return;
|
|
198
|
+
|
|
199
|
+
default:
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function headingIsActive(state, level) {
|
|
207
|
+
var $from = state.selection.$from;
|
|
208
|
+
var node = $from.node();
|
|
209
|
+
return node.type === _schemas["default"].nodes.heading && node.attrs.level === level;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function markActive(state, type) {
|
|
213
|
+
var _state$selection = state.selection,
|
|
214
|
+
from = _state$selection.from,
|
|
215
|
+
$from = _state$selection.$from,
|
|
216
|
+
to = _state$selection.to,
|
|
217
|
+
empty = _state$selection.empty;
|
|
218
|
+
if (empty) return type.isInSet(state.storedMarks || $from.marks());else return state.doc.rangeHasMark(from, to, type);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function orderedListIsActive(state) {// const { $from,ranges } = state.selection;
|
|
222
|
+
// const node = $from.node();
|
|
223
|
+
// for(let range of ranges) {
|
|
224
|
+
// state.doc.nodesBetween(range.$from.pos, range.$to.pos, (node, pos) => {
|
|
225
|
+
// // console.log(node)
|
|
226
|
+
// })
|
|
227
|
+
// }
|
|
228
|
+
}
|
|
@@ -501,11 +501,13 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
|
|
|
501
501
|
return Upload;
|
|
502
502
|
}(_react.PureComponent);
|
|
503
503
|
|
|
504
|
-
|
|
504
|
+
Upload.Preview = _uploadedPreview["default"];
|
|
505
505
|
Upload.defaultProps = {
|
|
506
506
|
fileNumLimit: 20,
|
|
507
507
|
fileSizeLimit: 50,
|
|
508
508
|
filesTotal: 50,
|
|
509
509
|
multiple: true,
|
|
510
510
|
attachmentPreviewBox: "MBlog__attachmentViewBox"
|
|
511
|
-
};
|
|
511
|
+
};
|
|
512
|
+
var _default = Upload;
|
|
513
|
+
exports["default"] = _default;
|
|
@@ -22,6 +22,8 @@ var _xls = _interopRequireDefault(require("./img/xls.svg"));
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
23
|
|
|
24
24
|
var getFileSize = function getFileSize(fileSize) {
|
|
25
|
+
if (!fileSize) return '';
|
|
26
|
+
|
|
25
27
|
if (fileSize < 1024) {
|
|
26
28
|
return "".concat(fileSize, "B");
|
|
27
29
|
}
|
package/lib/index.js
CHANGED
|
@@ -375,6 +375,12 @@ Object.defineProperty(exports, "RangePickerPop", {
|
|
|
375
375
|
return _rangePickerPop["default"];
|
|
376
376
|
}
|
|
377
377
|
});
|
|
378
|
+
Object.defineProperty(exports, "RichEditor", {
|
|
379
|
+
enumerable: true,
|
|
380
|
+
get: function get() {
|
|
381
|
+
return _richEditor["default"];
|
|
382
|
+
}
|
|
383
|
+
});
|
|
378
384
|
Object.defineProperty(exports, "Scrollbar", {
|
|
379
385
|
enumerable: true,
|
|
380
386
|
get: function get() {
|
|
@@ -738,6 +744,8 @@ var _uploadPhotoModal = _interopRequireDefault(require("./components/upload-phot
|
|
|
738
744
|
|
|
739
745
|
var _bookDemo = _interopRequireDefault(require("./components/book-demo"));
|
|
740
746
|
|
|
747
|
+
var _richEditor = _interopRequireDefault(require("./components/rich-editor"));
|
|
748
|
+
|
|
741
749
|
var _videoModal = _interopRequireDefault(require("./components/video-modal"));
|
|
742
750
|
|
|
743
751
|
var _supersetCharts = _interopRequireDefault(require("./components/superset-charts"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titaui/pc",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.45",
|
|
4
4
|
"nameCN": "",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"@storybook/addon-knobs": "^6.0.10",
|
|
34
34
|
"@storybook/addon-links": "6.0.10",
|
|
35
35
|
"@storybook/react": "6.0.10",
|
|
36
|
+
"@types/prosemirror-state": "^1.2.8",
|
|
36
37
|
"@types/styled-components": "^5.1.2",
|
|
37
38
|
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
|
38
39
|
"@typescript-eslint/parser": "^5.10.0",
|
|
@@ -76,12 +77,15 @@
|
|
|
76
77
|
"@titaui/rc-trigger": "^5.2.5",
|
|
77
78
|
"@titaui/react-flow-renderer": "9.5.4",
|
|
78
79
|
"@titaui/toast": "^1.0.0",
|
|
80
|
+
"@types/color": "^3.0.3",
|
|
81
|
+
"@types/prosemirror-commands": "^1.0.4",
|
|
82
|
+
"@types/prosemirror-schema-basic": "^1.0.2",
|
|
79
83
|
"axios": "^0.21.1",
|
|
80
84
|
"bowser": "^2.11.0",
|
|
81
85
|
"can-use-dom": "^0.1.0",
|
|
82
86
|
"classnames": "^2.2.6",
|
|
83
87
|
"clone-deep": "^4.0.1",
|
|
84
|
-
"color": "^
|
|
88
|
+
"color": "^4.2.1",
|
|
85
89
|
"cos-js-sdk-v5": "^1.3.3",
|
|
86
90
|
"dayjs": "^1.10.4",
|
|
87
91
|
"html2canvas": "1.3.2",
|
|
@@ -92,7 +96,21 @@
|
|
|
92
96
|
"lodash.throttle": "^4.1.1",
|
|
93
97
|
"lottie-web": "^5.7.12",
|
|
94
98
|
"moment": "^2.29.1",
|
|
99
|
+
"prosemirror-commands": "^1.2.1",
|
|
100
|
+
"prosemirror-example-setup": "^1.1.2",
|
|
101
|
+
"prosemirror-history": "^1.2.0",
|
|
102
|
+
"prosemirror-inputrules": "^1.1.3",
|
|
103
|
+
"prosemirror-keymap": "^1.1.5",
|
|
104
|
+
"prosemirror-model": "^1.16.1",
|
|
105
|
+
"prosemirror-schema-basic": "^1.1.2",
|
|
106
|
+
"prosemirror-schema-list": "^1.1.6",
|
|
107
|
+
"prosemirror-state": "^1.3.4",
|
|
108
|
+
"prosemirror-tables": "^1.1.1",
|
|
109
|
+
"prosemirror-transform": "^1.3.4",
|
|
110
|
+
"prosemirror-utils": "^0.9.6",
|
|
111
|
+
"prosemirror-view": "^1.23.6",
|
|
95
112
|
"qs": "^6.10.1",
|
|
113
|
+
"raf-schd": "^4.0.3",
|
|
96
114
|
"rc-cascader": "^2.2.0",
|
|
97
115
|
"rc-checkbox": "^2.3.2",
|
|
98
116
|
"rc-color-picker": "^1.2.6",
|