@seafile/sdoc-editor 2.0.31 → 2.0.33-alph-0.0.1
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/dist/basic-sdk/extension/plugins/link/hover/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/search-replace/menu/index.js +2 -2
- package/dist/basic-sdk/extension/plugins/search-replace/popover/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/seatable-row/dialog/add-seatable-row-dialog/index.css +17 -12
- package/dist/basic-sdk/extension/plugins/seatable-row/dialog/add-seatable-row-dialog/index.js +2 -2
- package/dist/basic-sdk/extension/plugins/seatable-row/dialog/add-seatable-row-dialog/row-card-header.js +1 -1
- package/dist/basic-sdk/extension/plugins/seatable-row/menu/seatable-list.js +32 -1
- package/dist/basic-sdk/extension/plugins/seatable-row/render-elem/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/seatable-tables/seatable-settings/dtable-search-input/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/seatable-tables/seatable-settings/filter-setter/filter-popover-widgets/filter-item.js +1 -1
- package/dist/basic-sdk/extension/plugins/table/popover/table-size-popover/index.js +1 -1
- package/dist/basic-sdk/extension/toolbar/context-toolbar/index.js +1 -1
- package/dist/basic-sdk/extension/toolbar/side-toolbar/helpers.js +98 -1
- package/dist/basic-sdk/extension/toolbar/side-toolbar/insert-block-menu.js +1 -0
- package/dist/components/doc-operations/more-operations.js +1 -1
- package/dist/components/doc-operations/revision-operations/more-revision-operations/index.js +1 -1
- package/dist/components/modal-header/index.js +2 -2
- package/dist/components/toast/toaster.js +1 -1
- package/package.json +3 -3
- package/public/media/seafile-ui.css +4 -3
|
@@ -32,7 +32,7 @@ const LinkHover = _ref => {
|
|
|
32
32
|
location.href = element.href;
|
|
33
33
|
}
|
|
34
34
|
}, [element.href]);
|
|
35
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/(0, _reactDom.createPortal)(
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/_react.default.createElement("div", {
|
|
36
36
|
id: "link-op-menu",
|
|
37
37
|
className: "link-op-menu",
|
|
38
38
|
style: menuPosition
|
|
@@ -54,7 +54,7 @@ const SearchReplaceMenu = _ref => {
|
|
|
54
54
|
const canvasList = [];
|
|
55
55
|
for (let index = 0; index < generateCount; index++) {
|
|
56
56
|
const top = index * 5000;
|
|
57
|
-
canvasList.push(
|
|
57
|
+
canvasList.push(/*#__PURE__*/_react.default.createElement("canvas", {
|
|
58
58
|
key: 'sdoc-find-search-' + index,
|
|
59
59
|
id: `sdoc-find-search-${index}`,
|
|
60
60
|
className: "sdoc-find-search-highlight-canvas",
|
|
@@ -79,7 +79,7 @@ const SearchReplaceMenu = _ref => {
|
|
|
79
79
|
readonly: readonly,
|
|
80
80
|
isOpen: isOpenPopover,
|
|
81
81
|
closePopover: onMouseDown
|
|
82
|
-
}), isOpenPopover && /*#__PURE__*/(0, _reactDom.createPortal)(
|
|
82
|
+
}), isOpenPopover && /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/_react.default.createElement("div", {
|
|
83
83
|
style: {
|
|
84
84
|
height: articleContainerSize.clientHeight
|
|
85
85
|
},
|
|
@@ -168,7 +168,7 @@ const SearchReplacePopover = _ref => {
|
|
|
168
168
|
if ((0, _isHotkey.default)('enter', e)) handleNext();
|
|
169
169
|
if ((0, _isHotkey.default)('enter+shift', e)) handleLast();
|
|
170
170
|
};
|
|
171
|
-
return /*#__PURE__*/(0, _reactDom.createPortal)(
|
|
171
|
+
return /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
172
172
|
className: "sdoc-search-replace-popover-container",
|
|
173
173
|
onMouseDown: handleStartMove,
|
|
174
174
|
onMouseMove: handleMouseMove,
|
package/dist/basic-sdk/extension/plugins/seatable-row/dialog/add-seatable-row-dialog/index.css
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.seatable-rows-select-dialog {
|
|
2
|
-
max-width:
|
|
2
|
+
max-width: 620px;
|
|
3
|
+
height: 520px;
|
|
3
4
|
}
|
|
4
5
|
|
|
5
6
|
.seatable-rows-select-dialog .sdoc-seatable-rows-select-footer {
|
|
@@ -35,10 +36,8 @@
|
|
|
35
36
|
padding: 0 !important;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
.seatable-rows-select-dialog .modal-body .form-
|
|
39
|
-
margin:
|
|
40
|
-
padding-bottom: 1rem;
|
|
41
|
-
border-bottom: 1px solid #e2e2e2;
|
|
39
|
+
.seatable-rows-select-dialog .modal-body .form-group {
|
|
40
|
+
margin: 0 !important;
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
.seatable-rows-close-dialog {
|
|
@@ -61,10 +60,10 @@
|
|
|
61
60
|
}
|
|
62
61
|
|
|
63
62
|
.seatable-rows-select-dialog .seatable-table-wrapper {
|
|
64
|
-
height:
|
|
63
|
+
height: 382px;
|
|
65
64
|
overflow-x: auto;
|
|
66
65
|
overflow-y: hidden;
|
|
67
|
-
border: 2px solid transparent;
|
|
66
|
+
/* border: 2px solid transparent; */
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
.seatable-rows-select-dialog .row-card-container {
|
|
@@ -85,6 +84,10 @@
|
|
|
85
84
|
align-items: center;
|
|
86
85
|
}
|
|
87
86
|
|
|
87
|
+
.row-card-header {
|
|
88
|
+
border-bottom: 1px solid #e9ecef;
|
|
89
|
+
}
|
|
90
|
+
|
|
88
91
|
.row-card-header .row-card-column-names {
|
|
89
92
|
padding: 8px 32px;
|
|
90
93
|
width: 100%;
|
|
@@ -153,12 +156,14 @@
|
|
|
153
156
|
}
|
|
154
157
|
|
|
155
158
|
.seatable-rows-select-dialog .row-card-container .row-card-list {
|
|
156
|
-
height: calc(100% -
|
|
159
|
+
height: calc(100% - 46px);
|
|
157
160
|
width: 100%;
|
|
158
161
|
min-width: 100%;
|
|
159
|
-
padding:
|
|
162
|
+
padding: 12px 20px 10px;
|
|
160
163
|
overflow-y: auto;
|
|
161
|
-
margin
|
|
164
|
+
margin: 0 !important;
|
|
165
|
+
/* margin-top: 1px; */
|
|
166
|
+
background-color: #f5f5f5;
|
|
162
167
|
}
|
|
163
168
|
|
|
164
169
|
.row-card-list .no-records-tips {
|
|
@@ -200,7 +205,7 @@
|
|
|
200
205
|
}
|
|
201
206
|
|
|
202
207
|
.row-card-item:last-child {
|
|
203
|
-
margin-bottom:
|
|
208
|
+
margin-bottom: 0 !important;
|
|
204
209
|
}
|
|
205
210
|
|
|
206
211
|
.row-card-item:hover {
|
|
@@ -241,7 +246,7 @@
|
|
|
241
246
|
.row-card-item .row-card-item-name {
|
|
242
247
|
height: 100%;
|
|
243
248
|
flex: 1 1;
|
|
244
|
-
font-weight:
|
|
249
|
+
font-weight: 500;
|
|
245
250
|
}
|
|
246
251
|
|
|
247
252
|
.row-card-item .row-card-item-check {
|
package/dist/basic-sdk/extension/plugins/seatable-row/dialog/add-seatable-row-dialog/index.js
CHANGED
|
@@ -56,7 +56,7 @@ const AddSeatableRowDialog = _ref => {
|
|
|
56
56
|
onClick: closeDialog
|
|
57
57
|
})), /*#__PURE__*/_react.default.createElement(_reactstrap.ModalBody, null, /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
58
58
|
className: "form-group"
|
|
59
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement(_seatableTableRecord.default, {
|
|
60
60
|
table: table,
|
|
61
61
|
setSelectedRow: setSelectedRow
|
|
62
62
|
}), rowRecordsErrorMessage && /*#__PURE__*/_react.default.createElement(_reactstrap.Alert, {
|
|
@@ -71,6 +71,6 @@ const AddSeatableRowDialog = _ref => {
|
|
|
71
71
|
color: "primary",
|
|
72
72
|
disabled: false,
|
|
73
73
|
onClick: submit
|
|
74
|
-
}, t('
|
|
74
|
+
}, t('Submit'))));
|
|
75
75
|
};
|
|
76
76
|
var _default = exports.default = AddSeatableRowDialog;
|
|
@@ -78,7 +78,7 @@ class RowCardHeader extends _react.default.Component {
|
|
|
78
78
|
// Start from the second column without name
|
|
79
79
|
for (let i = 1; i < renderedColumns.length; i++) {
|
|
80
80
|
const renderedColumn = renderedColumns[i];
|
|
81
|
-
cardHeaderCells.push(
|
|
81
|
+
cardHeaderCells.push(/*#__PURE__*/_react.default.createElement(_rowCardHeaderCell.default, {
|
|
82
82
|
key: renderedColumn.key,
|
|
83
83
|
column: renderedColumn,
|
|
84
84
|
rowCardType: rowCardType,
|
|
@@ -11,14 +11,20 @@ var _utils = require("../../../utils");
|
|
|
11
11
|
var _eventBus = _interopRequireDefault(require("../../../../utils/event-bus"));
|
|
12
12
|
var _constants = require("../../../../constants");
|
|
13
13
|
var _constants2 = require("../../../constants");
|
|
14
|
+
var _reactstrap = require("reactstrap");
|
|
15
|
+
var _reactI18next = require("react-i18next");
|
|
14
16
|
const SeaTableList = _ref => {
|
|
15
17
|
let {
|
|
16
18
|
editor,
|
|
17
19
|
toggle
|
|
18
20
|
} = _ref;
|
|
21
|
+
const {
|
|
22
|
+
t
|
|
23
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
19
24
|
const seatableRef = (0, _react.useRef)(null);
|
|
25
|
+
const isComposingRef = (0, _react.useRef)(null);
|
|
20
26
|
const [computedStyle, setComputedStyle] = (0, _react.useState)({});
|
|
21
|
-
const tables = editor.tables;
|
|
27
|
+
const [tables, setTables] = (0, _react.useState)(editor.tables || []);
|
|
22
28
|
(0, _react.useEffect)(() => {
|
|
23
29
|
if (seatableRef.current) {
|
|
24
30
|
// bottom overflow
|
|
@@ -33,6 +39,16 @@ const SeaTableList = _ref => {
|
|
|
33
39
|
});
|
|
34
40
|
}
|
|
35
41
|
}, []);
|
|
42
|
+
const onChange = (0, _react.useCallback)(event => {
|
|
43
|
+
if (isComposingRef.current) return;
|
|
44
|
+
const value = event.target.value.trim().toUpperCase();
|
|
45
|
+
if (value) {
|
|
46
|
+
const list = editor.tables.filter(item => item.name.toUpperCase().includes(value));
|
|
47
|
+
setTables(list);
|
|
48
|
+
} else {
|
|
49
|
+
setTables(editor.tables);
|
|
50
|
+
}
|
|
51
|
+
}, [editor.tables]);
|
|
36
52
|
const openSelectSeatableTableDialog = (0, _react.useCallback)(item => {
|
|
37
53
|
const eventBus = _eventBus.default.getInstance();
|
|
38
54
|
eventBus.dispatch(_constants.INTERNAL_EVENT.INSERT_ELEMENT, {
|
|
@@ -45,11 +61,26 @@ const SeaTableList = _ref => {
|
|
|
45
61
|
|
|
46
62
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
47
63
|
}, [toggle]);
|
|
64
|
+
const onCompositionStart = (0, _react.useCallback)(() => {
|
|
65
|
+
isComposingRef.current = true;
|
|
66
|
+
}, []);
|
|
67
|
+
const onCompositionEnd = (0, _react.useCallback)(e => {
|
|
68
|
+
isComposingRef.current = false;
|
|
69
|
+
onChange(e);
|
|
70
|
+
}, [onChange]);
|
|
48
71
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
49
72
|
ref: seatableRef,
|
|
50
73
|
className: "sdoc-dropdown-menu-container sdoc-seatable-selected-table-list-wrapper",
|
|
51
74
|
style: computedStyle
|
|
52
75
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
76
|
+
className: "sdoc-seatable-list-search-wrapper"
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement(_reactstrap.Input, {
|
|
78
|
+
placeholder: t('Search_action'),
|
|
79
|
+
onChange: onChange,
|
|
80
|
+
autoFocus: true,
|
|
81
|
+
onCompositionStart: onCompositionStart,
|
|
82
|
+
onCompositionEnd: onCompositionEnd
|
|
83
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
53
84
|
className: "sdoc-seatable-list-wrapper"
|
|
54
85
|
}, tables.map(item => {
|
|
55
86
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -42,7 +42,6 @@ const RowRecord = _ref => {
|
|
|
42
42
|
(0, _react.useEffect)(() => {
|
|
43
43
|
async function initTableData() {
|
|
44
44
|
const table = await editor.getTableById(table_id);
|
|
45
|
-
setRowRecordName(table.rows[0]['0000']);
|
|
46
45
|
if (!tableInfoRef.current) {
|
|
47
46
|
tableInfoRef.current = {};
|
|
48
47
|
}
|
|
@@ -57,6 +56,7 @@ const RowRecord = _ref => {
|
|
|
57
56
|
}
|
|
58
57
|
const shownRecord = table.rows.filter(item => row_id === item._id);
|
|
59
58
|
setShownRecord(shownRecord);
|
|
59
|
+
setRowRecordName(shownRecord[0]['0000']);
|
|
60
60
|
const updatedColumnWidthMap = Object.fromEntries(Object.entries(columnWidthMap).map(_ref2 => {
|
|
61
61
|
let [key, value] = _ref2;
|
|
62
62
|
return [key, value];
|
|
@@ -70,7 +70,7 @@ class DtableSearchInput extends _react.Component {
|
|
|
70
70
|
const {
|
|
71
71
|
ClearIndicator
|
|
72
72
|
} = components;
|
|
73
|
-
if (
|
|
73
|
+
if (/*#__PURE__*/_react.default.isValidElement(ClearIndicator)) {
|
|
74
74
|
return /*#__PURE__*/_react.default.cloneElement(ClearIndicator, {
|
|
75
75
|
clearValue: this.clearSearch
|
|
76
76
|
});
|
|
@@ -310,7 +310,7 @@ class FilterItem extends _react.default.Component {
|
|
|
310
310
|
background: inOption.color,
|
|
311
311
|
color: inOption.textColor || null
|
|
312
312
|
};
|
|
313
|
-
labelArray.push(
|
|
313
|
+
labelArray.push(/*#__PURE__*/_react.default.createElement("span", {
|
|
314
314
|
className: className,
|
|
315
315
|
style: optionStyle,
|
|
316
316
|
key: 'option_' + item,
|
|
@@ -205,7 +205,7 @@ const TableSizePopover = _ref => {
|
|
|
205
205
|
});
|
|
206
206
|
children.push(child);
|
|
207
207
|
}
|
|
208
|
-
tableSize.push(
|
|
208
|
+
tableSize.push(/*#__PURE__*/_react.default.createElement("div", {
|
|
209
209
|
key: `sdoc-table-size-row-${i}`,
|
|
210
210
|
className: "sdoc-table-size-row d-flex"
|
|
211
211
|
}, children));
|
|
@@ -62,7 +62,7 @@ const ContextToolbar = () => {
|
|
|
62
62
|
el.removeAttribute('style');
|
|
63
63
|
}
|
|
64
64
|
}, []);
|
|
65
|
-
return /*#__PURE__*/(0, _reactDom.createPortal)(
|
|
65
|
+
return /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/_react.default.createElement("div", {
|
|
66
66
|
ref: ref,
|
|
67
67
|
className: "sdoc-context-toolbar",
|
|
68
68
|
onMouseDown: onMouseDown,
|
|
@@ -21,16 +21,82 @@ var _constants3 = require("../../../constants");
|
|
|
21
21
|
var _helpers3 = require("../../../node-id/helpers");
|
|
22
22
|
var _documentUtils = require("../../../utils/document-utils");
|
|
23
23
|
var _helper2 = require("../../plugins/multi-column/helper");
|
|
24
|
+
var _helpers4 = require("../../plugins/blockquote/helpers");
|
|
25
|
+
var _helpers5 = require("../../plugins/header/helpers");
|
|
24
26
|
const onSetNodeType = (editor, element, type) => {
|
|
27
|
+
const {
|
|
28
|
+
selection
|
|
29
|
+
} = editor;
|
|
25
30
|
if (!type) return;
|
|
26
31
|
if (type === _constants.CALL_OUT) {
|
|
32
|
+
if (_constants.IMAGE_BLOCK === element.type) {
|
|
33
|
+
_slate.Transforms.setNodes(editor, {
|
|
34
|
+
type: _constants.PARAGRAPH
|
|
35
|
+
});
|
|
36
|
+
}
|
|
27
37
|
(0, _helper.wrapCallout)(editor);
|
|
28
38
|
return;
|
|
29
39
|
}
|
|
30
40
|
if ([_constants.ORDERED_LIST, _constants.UNORDERED_LIST].includes(type)) {
|
|
41
|
+
if ([_constants.IMAGE_BLOCK].includes(element.type)) return;
|
|
31
42
|
(0, _transforms.toggleList)(editor, type);
|
|
43
|
+
const path = (0, _core.findPath)(editor, element);
|
|
44
|
+
const [targetNode] = _slate.Editor.node(editor, [path[0]]) || [];
|
|
45
|
+
if ([_constants.MULTI_COLUMN, _constants.BLOCKQUOTE].includes(targetNode.type)) {
|
|
46
|
+
if (targetNode.type === _constants.BLOCKQUOTE) {
|
|
47
|
+
(0, _helpers4.setBlockQuoteType)(editor, true);
|
|
48
|
+
} else {
|
|
49
|
+
const currentNodeInColumn = (0, _core.getNode)(editor, selection.anchor.path.slice(0, 3));
|
|
50
|
+
if ([_constants.BLOCKQUOTE].includes(currentNodeInColumn.type)) {
|
|
51
|
+
(0, _helpers4.setBlockQuoteType)(editor, true);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
32
55
|
return;
|
|
33
56
|
}
|
|
57
|
+
if ([_constants.PARAGRAPH, ..._constants.HEADERS].includes(type)) {
|
|
58
|
+
var _getTopLevelBlockNode;
|
|
59
|
+
// Transform list-item, blockquote, callout to paragraph or header
|
|
60
|
+
const topNodeType = (_getTopLevelBlockNode = (0, _core.getTopLevelBlockNode)(editor)[0]) === null || _getTopLevelBlockNode === void 0 ? void 0 : _getTopLevelBlockNode.type;
|
|
61
|
+
if (topNodeType === _constants.MULTI_COLUMN) {
|
|
62
|
+
const currentNodeInColumn = (0, _core.getNode)(editor, selection.anchor.path.slice(0, 3));
|
|
63
|
+
// Callout, List-item, Blockquote in multi_column
|
|
64
|
+
if ([_constants.CALL_OUT].includes(currentNodeInColumn.type)) {
|
|
65
|
+
(0, _helper.unwrapCallout)(editor);
|
|
66
|
+
}
|
|
67
|
+
if ([_constants.ORDERED_LIST, _constants.UNORDERED_LIST].includes(currentNodeInColumn.type)) {
|
|
68
|
+
(0, _transforms.toggleList)(editor, currentNodeInColumn.type);
|
|
69
|
+
if ([..._constants.HEADERS].includes(type)) {
|
|
70
|
+
(0, _helpers5.setHeaderType)(editor, type);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if ([_constants.BLOCKQUOTE].includes(currentNodeInColumn.type)) {
|
|
74
|
+
if ([..._constants.HEADERS].includes(type)) {
|
|
75
|
+
(0, _helpers5.setHeaderType)(editor, type);
|
|
76
|
+
}
|
|
77
|
+
(0, _helpers4.setBlockQuoteType)(editor, true);
|
|
78
|
+
}
|
|
79
|
+
return;
|
|
80
|
+
} else {
|
|
81
|
+
// List-item, blockquote, callout is top node
|
|
82
|
+
if ([_constants.ORDERED_LIST, _constants.UNORDERED_LIST].includes(topNodeType)) {
|
|
83
|
+
(0, _transforms.toggleList)(editor, topNodeType);
|
|
84
|
+
if ([..._constants.HEADERS].includes(type)) {
|
|
85
|
+
(0, _helpers5.setHeaderType)(editor, type);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if ([_constants.BLOCKQUOTE].includes(topNodeType)) {
|
|
89
|
+
if ([..._constants.HEADERS].includes(type)) {
|
|
90
|
+
(0, _helpers5.setHeaderType)(editor, type);
|
|
91
|
+
}
|
|
92
|
+
(0, _helpers4.setBlockQuoteType)(editor, true);
|
|
93
|
+
}
|
|
94
|
+
if ([_constants.CALL_OUT].includes(topNodeType)) {
|
|
95
|
+
(0, _helper.unwrapCallout)(editor);
|
|
96
|
+
}
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
34
100
|
if (type === _constants.CHECK_LIST_ITEM) {
|
|
35
101
|
const path = (0, _core.findPath)(editor, element);
|
|
36
102
|
const [targetNode, targetPath] = _slate.Editor.node(editor, [path[0]]) || [];
|
|
@@ -42,8 +108,31 @@ const onSetNodeType = (editor, element, type) => {
|
|
|
42
108
|
_slate.Transforms.setNodes(editor, {
|
|
43
109
|
type: newType
|
|
44
110
|
});
|
|
111
|
+
if ([_constants.MULTI_COLUMN, _constants.BLOCKQUOTE].includes(targetNode.type)) {
|
|
112
|
+
if (targetNode.type === _constants.BLOCKQUOTE) {
|
|
113
|
+
(0, _helpers4.setBlockQuoteType)(editor, true);
|
|
114
|
+
} else {
|
|
115
|
+
const currentNodeInColumn = (0, _core.getNode)(editor, selection.anchor.path.slice(0, 3));
|
|
116
|
+
if ([_constants.BLOCKQUOTE].includes(currentNodeInColumn.type)) {
|
|
117
|
+
(0, _helpers4.setBlockQuoteType)(editor, true);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
45
121
|
return;
|
|
46
122
|
}
|
|
123
|
+
if (type === _constants.BLOCKQUOTE && !_constants.LIST_ITEM_CORRELATION_TYPE.includes(element.type)) {
|
|
124
|
+
if (element.type === _constants.BLOCKQUOTE) return;
|
|
125
|
+
const isBlockQuoteParent = (0, _core.getAboveNode)(editor, {
|
|
126
|
+
match: {
|
|
127
|
+
type: _constants.BLOCKQUOTE
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
if (isBlockQuoteParent) return;
|
|
131
|
+
if (!isBlockQuoteParent && ![_constants.BLOCKQUOTE].includes(element.type)) {
|
|
132
|
+
(0, _helpers4.setBlockQuoteType)(editor, false);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
47
136
|
if (type === _constants.BLOCKQUOTE && _constants.LIST_ITEM_CORRELATION_TYPE.includes(element.type)) {
|
|
48
137
|
_slate.Transforms.wrapNodes(editor, {
|
|
49
138
|
id: _slugid.default.nice(),
|
|
@@ -167,7 +256,7 @@ const isVoidNode = node => {
|
|
|
167
256
|
};
|
|
168
257
|
exports.isVoidNode = isVoidNode;
|
|
169
258
|
const isNotSupportTransform = node => {
|
|
170
|
-
if (node.type && [_constants.CODE_BLOCK, _constants.TABLE, _constants.
|
|
259
|
+
if (node.type && [_constants.CODE_BLOCK, _constants.TABLE, _constants.VIDEO, _constants.SEATABLE_TABLE, _constants.SEATABLE_ROW].includes(node.type)) {
|
|
171
260
|
return true;
|
|
172
261
|
}
|
|
173
262
|
return false;
|
|
@@ -313,6 +402,9 @@ const onWrapMultiListItemToNonListTypeTarget = (editor, targetPath, sourceNodes,
|
|
|
313
402
|
exports.onWrapMultiListItemToNonListTypeTarget = onWrapMultiListItemToNonListTypeTarget;
|
|
314
403
|
const getTransformMenusConfig = (editor, slateNode) => {
|
|
315
404
|
let newSideMenusConfig = _constants.SIDE_TRANSFORM_MENUS_CONFIG;
|
|
405
|
+
if ([_constants.CALL_OUT].includes(slateNode.type)) {
|
|
406
|
+
return newSideMenusConfig = _constants.SIDE_TRANSFORM_MENUS_CONFIG.filter(item => [_constants.PARAGRAPH].includes(item.type));
|
|
407
|
+
}
|
|
316
408
|
if (_constants.LIST_ITEM_CORRELATION_TYPE.includes(slateNode.type)) {
|
|
317
409
|
newSideMenusConfig = _constants.SIDE_TRANSFORM_MENUS_CONFIG.filter(item => _constants.LIST_ITEM_SUPPORTED_TRANSFORMATION.includes(item.type));
|
|
318
410
|
}
|
|
@@ -330,6 +422,11 @@ const getTransformMenusConfig = (editor, slateNode) => {
|
|
|
330
422
|
}
|
|
331
423
|
}
|
|
332
424
|
|
|
425
|
+
// Image-block can't be nested by ordered-list, ordered-list and check-list
|
|
426
|
+
if (_constants.IMAGE_BLOCK.includes(highestNode.type)) {
|
|
427
|
+
newSideMenusConfig = _constants.SIDE_TRANSFORM_MENUS_CONFIG.filter(item => ![_constants.ORDERED_LIST, _constants.UNORDERED_LIST, _constants.CHECK_LIST_ITEM].includes(item.type));
|
|
428
|
+
}
|
|
429
|
+
|
|
333
430
|
// headers can't be nested by quote block
|
|
334
431
|
if (_constants.HEADERS.includes(highestNode.type)) {
|
|
335
432
|
newSideMenusConfig = _constants.SIDE_TRANSFORM_MENUS_CONFIG.filter(item => item.type !== _constants.BLOCKQUOTE);
|
|
@@ -25,6 +25,7 @@ var _menu = _interopRequireDefault(require("../../plugins/seatable-column/menu")
|
|
|
25
25
|
var _menu2 = _interopRequireDefault(require("../../plugins/seatable-tables/menu"));
|
|
26
26
|
var _helper = require("../../plugins/callout/helper");
|
|
27
27
|
var _helper2 = require("../../plugins/multi-column/helper");
|
|
28
|
+
var _menu3 = _interopRequireDefault(require("../../plugins/seatable-row/menu"));
|
|
28
29
|
const InsertBlockMenu = _ref => {
|
|
29
30
|
let {
|
|
30
31
|
insertPosition = _constants.INSERT_POSITION.CURRENT,
|
|
@@ -114,7 +114,7 @@ const MoreOperations = _ref => {
|
|
|
114
114
|
className: "sdocfont sdoc-more"
|
|
115
115
|
})), /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownMenu, {
|
|
116
116
|
className: "sdoc-dropdown-menu",
|
|
117
|
-
|
|
117
|
+
end: true
|
|
118
118
|
}, mobileLogin && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownItem, {
|
|
119
119
|
className: "sdoc-dropdown-menu-item",
|
|
120
120
|
onClick: toggleStar
|
package/dist/components/doc-operations/revision-operations/more-revision-operations/index.js
CHANGED
|
@@ -48,7 +48,7 @@ const MoreRevisionOperations = _ref => {
|
|
|
48
48
|
className: `sdocfont sdoc-${isDropdownOpen ? 'caret-up' : 'drop-down'}`
|
|
49
49
|
})), /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownMenu, {
|
|
50
50
|
className: "sdoc-dropdown-menu",
|
|
51
|
-
|
|
51
|
+
end: true
|
|
52
52
|
}, /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownItem, {
|
|
53
53
|
className: "sdoc-dropdown-menu-item",
|
|
54
54
|
onClick: startRevise
|
|
@@ -16,10 +16,10 @@ function SdocModalHeader(_ref) {
|
|
|
16
16
|
let close = null;
|
|
17
17
|
if (toggle) {
|
|
18
18
|
close = /*#__PURE__*/_react.default.createElement("span", {
|
|
19
|
-
|
|
19
|
+
className: "sdoc-add-link-close-icon",
|
|
20
20
|
onClick: toggle
|
|
21
21
|
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
22
|
-
|
|
22
|
+
className: "sdocfont sdoc-sm-close",
|
|
23
23
|
"aria-hidden": "true"
|
|
24
24
|
}));
|
|
25
25
|
}
|
|
@@ -67,7 +67,7 @@ class Toaster {
|
|
|
67
67
|
container.setAttribute('data-evergreen-toaster-container', '');
|
|
68
68
|
document.body.appendChild(container);
|
|
69
69
|
const root = (0, _client.createRoot)(container);
|
|
70
|
-
root.render(
|
|
70
|
+
root.render(/*#__PURE__*/_react.default.createElement(_toastManager.default, {
|
|
71
71
|
bindNotify: this._bindNotify,
|
|
72
72
|
bindGetToasts: this._bindGetToasts,
|
|
73
73
|
bindCloseAll: this._bindCloseAll
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.33-alph-0.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "This is a sdoc editor",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"copy-to-clipboard": "^3.3.3",
|
|
17
17
|
"dayjs": "1.10.7",
|
|
18
18
|
"deep-copy": "1.4.2",
|
|
19
|
-
"dtable-ui-component": "^6.0.
|
|
19
|
+
"dtable-ui-component": "^6.0.9",
|
|
20
20
|
"is-hotkey": "0.2.0",
|
|
21
21
|
"is-url": "^1.2.4",
|
|
22
22
|
"lodash.isequal": "4.5.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"remark-parse": "11.0.0",
|
|
39
39
|
"remark-rehype": "11.0.0",
|
|
40
40
|
"remark-stringify": "11.0.0",
|
|
41
|
-
"sea-chart": "^2.0.
|
|
41
|
+
"sea-chart": "^2.0.5",
|
|
42
42
|
"slugid": "3.2.0",
|
|
43
43
|
"socket.io-client": "4.8.1",
|
|
44
44
|
"type-of": "2.0.1",
|