@seafile/sdoc-editor 0.1.161-beta2 → 0.1.162
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/constants/index.js +1 -1
- package/dist/basic-sdk/extension/constants/menus-config.js +68 -20
- package/dist/basic-sdk/extension/plugins/check-list/helpers.js +11 -3
- package/dist/basic-sdk/extension/plugins/list/transforms/toggle-list.js +16 -5
- package/dist/basic-sdk/extension/toolbar/side-toolbar/helpers.js +17 -7
- package/dist/basic-sdk/extension/toolbar/side-toolbar/insert-block-menu.js +44 -15
- package/dist/basic-sdk/extension/toolbar/side-toolbar/side-menu.js +1 -1
- package/dist/basic-sdk/extension/toolbar/side-toolbar/transform-menus.js +5 -5
- package/dist/components/tip-dialog/index.js +8 -24
- package/dist/constants/index.js +3 -5
- package/dist/pages/simple-editor.js +2 -11
- package/package.json +1 -1
- package/public/locales/cs/sdoc-editor.json +1 -3
- package/public/locales/de/sdoc-editor.json +1 -3
- package/public/locales/en/sdoc-editor.json +1 -3
- package/public/locales/es/sdoc-editor.json +1 -3
- package/public/locales/fr/sdoc-editor.json +1 -3
- package/public/locales/it/sdoc-editor.json +1 -3
- package/public/locales/ru/sdoc-editor.json +11 -13
- package/public/locales/zh_CN/sdoc-editor.json +1 -3
- package/dist/components/tip-dialog/index.css +0 -6
|
@@ -7,7 +7,7 @@ export { DEFAULT_COLORS, STANDARD_COLORS, DEFAULT_RECENT_USED_LIST, DEFAULT_FONT
|
|
|
7
7
|
export { FONT_SIZE, DEFAULT_FONT, FONT, GOOGLE_FONT_CLASS, RECENT_USED_FONTS_KEY, SDOC_FONT_SIZE } from './font';
|
|
8
8
|
export { DIFF_TYPE, ADDED_STYLE, DELETED_STYLE } from './diff-view';
|
|
9
9
|
export { KEYBOARD, MAC_HOTKEYS, WIN_HOTKEYS } from './keyboard';
|
|
10
|
-
export { UNDO, REDO, TEXT_STYLE, TEXT_STYLE_MAP, TEXT_STYLE_MORE, TEXT_ALIGN, REMOVE_TABLE, CLEAR_FORMAT, MENUS_CONFIG_MAP,
|
|
10
|
+
export { UNDO, REDO, TEXT_STYLE, TEXT_STYLE_MAP, TEXT_STYLE_MORE, TEXT_ALIGN, REMOVE_TABLE, CLEAR_FORMAT, MENUS_CONFIG_MAP, SIDE_TRANSFORM_MENUS_CONFIG, SIDE_INSERT_MENUS_CONFIG } from './menus-config';
|
|
11
11
|
export var HEADERS = [HEADER1, HEADER2, HEADER3, HEADER4, HEADER5, HEADER6];
|
|
12
12
|
export var HEADER_TITLE_MAP = (_HEADER_TITLE_MAP = {}, _defineProperty(_HEADER_TITLE_MAP, TITLE, 'Title'), _defineProperty(_HEADER_TITLE_MAP, SUBTITLE, 'Subtitle'), _defineProperty(_HEADER_TITLE_MAP, HEADER1, 'Header_one'), _defineProperty(_HEADER_TITLE_MAP, HEADER2, 'Header_two'), _defineProperty(_HEADER_TITLE_MAP, HEADER3, 'Header_three'), _defineProperty(_HEADER_TITLE_MAP, HEADER4, 'Header_four'), _defineProperty(_HEADER_TITLE_MAP, HEADER5, 'Header_five'), _defineProperty(_HEADER_TITLE_MAP, HEADER6, 'Header_six'), _defineProperty(_HEADER_TITLE_MAP, PARAGRAPH, 'Paragraph'), _HEADER_TITLE_MAP);
|
|
13
13
|
export var TRANSPARENT = 'transparent';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
var _MENUS_CONFIG_MAP;
|
|
2
|
+
var _MENUS_CONFIG_MAP, _SIDE_INSERT_MENUS_CO;
|
|
3
3
|
import { RECENT_USED_HIGHLIGHT_COLORS_KEY, DEFAULT_LAST_USED_HIGHLIGHT_COLOR, RECENT_USED_FONT_COLORS_KEY, DEFAULT_FONT_COLOR, DEFAULT_LAST_USED_FONT_COLOR } from './color';
|
|
4
|
-
import { BLOCKQUOTE, HEADER1, HEADER2, HEADER3, HEADER4, HEADER5, HEADER6, ORDERED_LIST, UNORDERED_LIST, CHECK_LIST_ITEM, CODE_BLOCK, LINK, IMAGE, TABLE, SDOC_LINK, FILE_LINK, PARAGRAPH } from './element-type';
|
|
4
|
+
import { BLOCKQUOTE, HEADER, HEADER1, HEADER2, HEADER3, HEADER4, HEADER5, HEADER6, ORDERED_LIST, UNORDERED_LIST, CHECK_LIST_ITEM, CODE_BLOCK, LINK, IMAGE, TABLE, SDOC_LINK, FILE_LINK, PARAGRAPH } from './element-type';
|
|
5
5
|
export var UNDO = 'undo';
|
|
6
6
|
export var REDO = 'redo';
|
|
7
7
|
export var CLEAR_FORMAT = 'clear_format';
|
|
@@ -166,8 +166,8 @@ export var MENUS_CONFIG_MAP = (_MENUS_CONFIG_MAP = {}, _defineProperty(_MENUS_CO
|
|
|
166
166
|
text: 'Link_file'
|
|
167
167
|
}), _MENUS_CONFIG_MAP);
|
|
168
168
|
|
|
169
|
-
//
|
|
170
|
-
export var
|
|
169
|
+
// Side transform menu config
|
|
170
|
+
export var SIDE_TRANSFORM_MENUS_CONFIG = [{
|
|
171
171
|
id: PARAGRAPH,
|
|
172
172
|
iconClass: 'sdocfont sdoc-text',
|
|
173
173
|
type: PARAGRAPH,
|
|
@@ -217,24 +217,72 @@ export var SIDE_MENUS_CONFIG = [{
|
|
|
217
217
|
iconClass: 'sdocfont sdoc-check-square',
|
|
218
218
|
type: CHECK_LIST_ITEM,
|
|
219
219
|
text: 'Check_list_item'
|
|
220
|
-
}, {
|
|
221
|
-
id: ALIGN_LEFT,
|
|
222
|
-
iconClass: 'sdocfont sdoc-align-left',
|
|
223
|
-
type: 'left',
|
|
224
|
-
text: 'Left'
|
|
225
|
-
}, {
|
|
226
|
-
id: ALIGN_CENTER,
|
|
227
|
-
iconClass: 'sdocfont sdoc-align-center',
|
|
228
|
-
type: 'center',
|
|
229
|
-
text: 'Center'
|
|
230
|
-
}, {
|
|
231
|
-
id: ALIGN_RIGHT,
|
|
232
|
-
iconClass: 'sdocfont sdoc-align-right',
|
|
233
|
-
type: 'right',
|
|
234
|
-
text: 'Right'
|
|
235
220
|
}, {
|
|
236
221
|
id: BLOCKQUOTE,
|
|
237
222
|
iconClass: 'sdocfont sdoc-quote1',
|
|
238
223
|
type: BLOCKQUOTE,
|
|
239
224
|
text: 'Quote'
|
|
240
|
-
}];
|
|
225
|
+
}];
|
|
226
|
+
|
|
227
|
+
// Side insert menu config
|
|
228
|
+
export var SIDE_INSERT_MENUS_CONFIG = (_SIDE_INSERT_MENUS_CO = {}, _defineProperty(_SIDE_INSERT_MENUS_CO, IMAGE, {
|
|
229
|
+
id: '',
|
|
230
|
+
iconClass: 'sdocfont sdoc-image',
|
|
231
|
+
type: IMAGE,
|
|
232
|
+
text: 'Insert_image'
|
|
233
|
+
}), _defineProperty(_SIDE_INSERT_MENUS_CO, TABLE, {
|
|
234
|
+
id: 'sdoc-side-menu-item-table',
|
|
235
|
+
iconClass: 'sdocfont sdoc-table',
|
|
236
|
+
type: TABLE,
|
|
237
|
+
text: 'Insert_table'
|
|
238
|
+
}), _defineProperty(_SIDE_INSERT_MENUS_CO, LINK, {
|
|
239
|
+
id: '',
|
|
240
|
+
iconClass: 'sdocfont sdoc-link',
|
|
241
|
+
type: LINK,
|
|
242
|
+
text: 'Insert_link'
|
|
243
|
+
}), _defineProperty(_SIDE_INSERT_MENUS_CO, CODE_BLOCK, {
|
|
244
|
+
id: '',
|
|
245
|
+
iconClass: 'sdocfont sdoc-code-block',
|
|
246
|
+
type: CODE_BLOCK,
|
|
247
|
+
text: 'Code_block'
|
|
248
|
+
}), _defineProperty(_SIDE_INSERT_MENUS_CO, ORDERED_LIST, {
|
|
249
|
+
id: '',
|
|
250
|
+
iconClass: 'sdocfont sdoc-list-ol',
|
|
251
|
+
type: ORDERED_LIST,
|
|
252
|
+
text: 'Ordered_list'
|
|
253
|
+
}), _defineProperty(_SIDE_INSERT_MENUS_CO, UNORDERED_LIST, {
|
|
254
|
+
id: '',
|
|
255
|
+
iconClass: 'sdocfont sdoc-list-ul',
|
|
256
|
+
type: UNORDERED_LIST,
|
|
257
|
+
text: 'Unordered_list'
|
|
258
|
+
}), _defineProperty(_SIDE_INSERT_MENUS_CO, CHECK_LIST_ITEM, {
|
|
259
|
+
id: '',
|
|
260
|
+
iconClass: 'sdocfont sdoc-check-square',
|
|
261
|
+
type: CHECK_LIST_ITEM,
|
|
262
|
+
text: 'Check_list_item'
|
|
263
|
+
}), _defineProperty(_SIDE_INSERT_MENUS_CO, PARAGRAPH, {
|
|
264
|
+
id: PARAGRAPH,
|
|
265
|
+
iconClass: 'sdocfont sdoc-text',
|
|
266
|
+
type: PARAGRAPH,
|
|
267
|
+
text: 'Paragraph'
|
|
268
|
+
}), _defineProperty(_SIDE_INSERT_MENUS_CO, HEADER, [{
|
|
269
|
+
id: HEADER1,
|
|
270
|
+
iconClass: 'sdocfont sdoc-header1',
|
|
271
|
+
type: HEADER1,
|
|
272
|
+
text: 'Header_one'
|
|
273
|
+
}, {
|
|
274
|
+
id: HEADER2,
|
|
275
|
+
iconClass: 'sdocfont sdoc-header2',
|
|
276
|
+
type: HEADER2,
|
|
277
|
+
text: 'Header_two'
|
|
278
|
+
}, {
|
|
279
|
+
id: HEADER3,
|
|
280
|
+
iconClass: 'sdocfont sdoc-header3',
|
|
281
|
+
type: HEADER3,
|
|
282
|
+
text: 'Header_three'
|
|
283
|
+
}, {
|
|
284
|
+
id: HEADER4,
|
|
285
|
+
iconClass: 'sdocfont sdoc-header4',
|
|
286
|
+
type: HEADER4,
|
|
287
|
+
text: 'Header_four'
|
|
288
|
+
}]), _SIDE_INSERT_MENUS_CO);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
2
|
import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
|
|
3
3
|
import { Transforms, Editor, Element } from '@seafile/slate';
|
|
4
|
-
import { CHECK_LIST_ITEM, PARAGRAPH, ELEMENT_TYPE } from '../../constants';
|
|
5
|
-
import { getSelectedNodeByType } from '../../core';
|
|
4
|
+
import { CHECK_LIST_ITEM, PARAGRAPH, ELEMENT_TYPE, INSERT_POSITION } from '../../constants';
|
|
5
|
+
import { getSelectedNodeByType, generateEmptyElement } from '../../core';
|
|
6
6
|
export var isMenuDisabled = function isMenuDisabled(editor, readonly) {
|
|
7
7
|
if (readonly) return true;
|
|
8
8
|
if (editor.selection == null) return true;
|
|
@@ -43,7 +43,15 @@ export var getCheckListItemType = function getCheckListItemType(editor) {
|
|
|
43
43
|
if (!node) return PARAGRAPH;
|
|
44
44
|
return node.type;
|
|
45
45
|
};
|
|
46
|
-
export var setCheckListItemType = function setCheckListItemType(editor, newType) {
|
|
46
|
+
export var setCheckListItemType = function setCheckListItemType(editor, newType, insertPosition) {
|
|
47
|
+
if (insertPosition === INSERT_POSITION.AFTER) {
|
|
48
|
+
var p = generateEmptyElement(PARAGRAPH);
|
|
49
|
+
var path = Editor.path(editor, editor.selection);
|
|
50
|
+
Transforms.insertNodes(editor, p, {
|
|
51
|
+
at: [path[0] + 1]
|
|
52
|
+
});
|
|
53
|
+
Transforms.select(editor, [path[0] + 1]);
|
|
54
|
+
}
|
|
47
55
|
Transforms.setNodes(editor, {
|
|
48
56
|
type: newType
|
|
49
57
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import { Node, Range, Transforms, Element, Editor } from '@seafile/slate';
|
|
4
|
-
import { LIST_ITEM, LIST_LIC, PARAGRAPH } from '../../../constants';
|
|
5
|
-
import { findNode, getNodeEntries, getNodeType, getSelectedNodeEntryByType, isRangeAcrossBlocks } from '../../../core';
|
|
4
|
+
import { LIST_ITEM, LIST_LIC, PARAGRAPH, INSERT_POSITION } from '../../../constants';
|
|
5
|
+
import { findNode, getNodeEntries, getNodeType, getSelectedNodeEntryByType, isRangeAcrossBlocks, generateEmptyElement } from '../../../core';
|
|
6
6
|
import { getListItemEntry, getListTypes } from '../queries';
|
|
7
7
|
import { unwrapList } from './unwrap-list';
|
|
8
8
|
import { generateEmptyList, generateEmptyListItem } from '../model';
|
|
@@ -110,7 +110,18 @@ var wrapRangeList = function wrapRangeList(editor, type) {
|
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
112
|
};
|
|
113
|
-
var toggleList = function toggleList(editor, type) {
|
|
113
|
+
var toggleList = function toggleList(editor, type, insertPosition) {
|
|
114
|
+
if (insertPosition === INSERT_POSITION.AFTER) {
|
|
115
|
+
var list = generateEmptyList(type);
|
|
116
|
+
var p = generateEmptyElement(PARAGRAPH);
|
|
117
|
+
var path = Editor.path(editor, editor.selection);
|
|
118
|
+
Transforms.insertNodes(editor, p, {
|
|
119
|
+
at: [path[0] + 1]
|
|
120
|
+
});
|
|
121
|
+
Transforms.select(editor, [path[0] + 1]);
|
|
122
|
+
Transforms.wrapNodes(editor, list);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
114
125
|
Editor.withoutNormalizing(editor, function () {
|
|
115
126
|
var selection = editor.selection;
|
|
116
127
|
if (!selection) return false;
|
|
@@ -120,9 +131,9 @@ var toggleList = function toggleList(editor, type) {
|
|
|
120
131
|
if (Range.isCollapsed(selection) || !isRangeAcrossBlocks(editor)) {
|
|
121
132
|
var res = getListItemEntry(editor);
|
|
122
133
|
if (res) {
|
|
123
|
-
var
|
|
134
|
+
var _list = res.list;
|
|
124
135
|
// 选中内容的类型是另一个类型, 如: select_type: ordered_list, 将被切换为 unordered_list
|
|
125
|
-
if (
|
|
136
|
+
if (_list[0].type !== type) {
|
|
126
137
|
var match = function match(n) {
|
|
127
138
|
return getListTypes().includes(getNodeType(n));
|
|
128
139
|
};
|
|
@@ -3,7 +3,8 @@ import slugid from 'slugid';
|
|
|
3
3
|
import { ReactEditor } from '@seafile/slate-react';
|
|
4
4
|
import copy from 'copy-to-clipboard';
|
|
5
5
|
import { toggleList } from '../../plugins/list/transforms';
|
|
6
|
-
import {
|
|
6
|
+
import { generateEmptyElement } from '../../core';
|
|
7
|
+
import { ORDERED_LIST, UNORDERED_LIST, PARAGRAPH, CHECK_LIST_ITEM, IMAGE, TABLE, CODE_BLOCK, BLOCKQUOTE, LIST_ITEM_CORRELATION_TYPE, ADD_POSITION_OFFSET_TYPE, INSERT_POSITION } from '../../constants';
|
|
7
8
|
export var onSetNodeType = function onSetNodeType(editor, element, type) {
|
|
8
9
|
if (!type) return;
|
|
9
10
|
if ([ORDERED_LIST, UNORDERED_LIST].includes(type)) {
|
|
@@ -17,12 +18,6 @@ export var onSetNodeType = function onSetNodeType(editor, element, type) {
|
|
|
17
18
|
});
|
|
18
19
|
return;
|
|
19
20
|
}
|
|
20
|
-
if (['left', 'center', 'right'].includes(type)) {
|
|
21
|
-
Transforms.setNodes(editor, {
|
|
22
|
-
'align': type
|
|
23
|
-
});
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
21
|
if (type === BLOCKQUOTE && LIST_ITEM_CORRELATION_TYPE.includes(element.type)) {
|
|
27
22
|
Transforms.wrapNodes(editor, {
|
|
28
23
|
id: slugid.nice(),
|
|
@@ -88,4 +83,19 @@ export var isNotSupportTransform = function isNotSupportTransform(node) {
|
|
|
88
83
|
return true;
|
|
89
84
|
}
|
|
90
85
|
return false;
|
|
86
|
+
};
|
|
87
|
+
export var insertElement = function insertElement(editor, type, insertPosition) {
|
|
88
|
+
if (insertPosition === INSERT_POSITION.AFTER) {
|
|
89
|
+
var p = generateEmptyElement(PARAGRAPH);
|
|
90
|
+
var path = Editor.path(editor, editor.selection);
|
|
91
|
+
Transforms.insertNodes(editor, p, {
|
|
92
|
+
at: [path[0] + 1]
|
|
93
|
+
});
|
|
94
|
+
Transforms.select(editor, [path[0] + 1]);
|
|
95
|
+
}
|
|
96
|
+
if (type !== PARAGRAPH) {
|
|
97
|
+
Transforms.setNodes(editor, {
|
|
98
|
+
type: type
|
|
99
|
+
});
|
|
100
|
+
}
|
|
91
101
|
};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
1
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
3
|
import React, { useCallback } from 'react';
|
|
3
4
|
import { useSlateStatic } from '@seafile/slate-react';
|
|
4
5
|
import { Transforms } from '@seafile/slate';
|
|
6
|
+
import { insertElement } from './helpers';
|
|
5
7
|
import { insertTable } from '../../plugins/table/helpers';
|
|
6
8
|
import TableSizePopover from '../../plugins/table/popover/table-size-popover';
|
|
7
9
|
import { changeToCodeBlock } from '../../plugins/code-block/helpers';
|
|
8
|
-
import {
|
|
10
|
+
import { toggleList } from '../../plugins/list/transforms';
|
|
11
|
+
import { setCheckListItemType } from '../../plugins/check-list/helpers';
|
|
12
|
+
import { ELEMENT_TYPE, INSERT_POSITION, LOCAL_IMAGE, SIDE_INSERT_MENUS_CONFIG } from '../../constants';
|
|
9
13
|
import EventBus from '../../../utils/event-bus';
|
|
10
14
|
import { INTERNAL_EVENT } from '../../../constants';
|
|
11
15
|
import DropdownMenuItem from '../../commons/dropdown-menu-item';
|
|
@@ -27,7 +31,7 @@ var InsertBlockMenu = function InsertBlockMenu(_ref) {
|
|
|
27
31
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
28
32
|
}, [editor, insertPosition]);
|
|
29
33
|
var createTable = useCallback(function (size) {
|
|
30
|
-
var newInsertPosition = slateNode.type === LIST_ITEM ? INSERT_POSITION.AFTER : insertPosition;
|
|
34
|
+
var newInsertPosition = slateNode.type === ELEMENT_TYPE.LIST_ITEM ? INSERT_POSITION.AFTER : insertPosition;
|
|
31
35
|
insertTable(editor, size, editor.selection, newInsertPosition);
|
|
32
36
|
|
|
33
37
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -43,7 +47,7 @@ var InsertBlockMenu = function InsertBlockMenu(_ref) {
|
|
|
43
47
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
44
48
|
}, [insertPosition]);
|
|
45
49
|
var onInsertCodeBlock = useCallback(function () {
|
|
46
|
-
var newInsertPosition = slateNode.type === LIST_ITEM ? INSERT_POSITION.AFTER : insertPosition;
|
|
50
|
+
var newInsertPosition = slateNode.type === ELEMENT_TYPE.LIST_ITEM ? INSERT_POSITION.AFTER : insertPosition;
|
|
47
51
|
changeToCodeBlock(editor, 'plaintext', newInsertPosition);
|
|
48
52
|
|
|
49
53
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -57,15 +61,23 @@ var InsertBlockMenu = function InsertBlockMenu(_ref) {
|
|
|
57
61
|
|
|
58
62
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
59
63
|
}, [insertPosition]);
|
|
64
|
+
var onInsertList = useCallback(function (type) {
|
|
65
|
+
toggleList(editor, type, insertPosition);
|
|
66
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
67
|
+
}, [editor, insertPosition, slateNode]);
|
|
68
|
+
var onInsertCheckList = useCallback(function () {
|
|
69
|
+
setCheckListItemType(editor, ELEMENT_TYPE.CHECK_LIST_ITEM, insertPosition);
|
|
70
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
71
|
+
}, [editor, insertPosition, slateNode]);
|
|
72
|
+
var onInsert = useCallback(function (type) {
|
|
73
|
+
insertElement(editor, type, insertPosition);
|
|
74
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75
|
+
}, [editor, insertPosition, slateNode]);
|
|
60
76
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DropdownMenuItem, {
|
|
61
|
-
menuConfig: _objectSpread(
|
|
62
|
-
id: ''
|
|
63
|
-
}),
|
|
77
|
+
menuConfig: _objectSpread({}, SIDE_INSERT_MENUS_CONFIG[ELEMENT_TYPE.IMAGE]),
|
|
64
78
|
onClick: onInsertImageToggle
|
|
65
79
|
}), /*#__PURE__*/React.createElement(DropdownMenuItem, {
|
|
66
|
-
menuConfig: _objectSpread(
|
|
67
|
-
id: 'sdoc-side-menu-item-table'
|
|
68
|
-
}),
|
|
80
|
+
menuConfig: _objectSpread({}, SIDE_INSERT_MENUS_CONFIG[ELEMENT_TYPE.TABLE]),
|
|
69
81
|
className: "pr-2"
|
|
70
82
|
}, /*#__PURE__*/React.createElement("i", {
|
|
71
83
|
className: "sdocfont sdoc-right-slide sdoc-dropdown-item-right-icon"
|
|
@@ -77,15 +89,32 @@ var InsertBlockMenu = function InsertBlockMenu(_ref) {
|
|
|
77
89
|
createTable: createTable,
|
|
78
90
|
openDialog: openTableDialog
|
|
79
91
|
})), /*#__PURE__*/React.createElement(DropdownMenuItem, {
|
|
80
|
-
menuConfig: _objectSpread(
|
|
81
|
-
id: ''
|
|
82
|
-
}),
|
|
92
|
+
menuConfig: _objectSpread({}, SIDE_INSERT_MENUS_CONFIG[ELEMENT_TYPE.LINK]),
|
|
83
93
|
onClick: openLinkDialog
|
|
84
94
|
}), /*#__PURE__*/React.createElement(DropdownMenuItem, {
|
|
85
|
-
menuConfig: _objectSpread(
|
|
86
|
-
id: ''
|
|
87
|
-
}),
|
|
95
|
+
menuConfig: _objectSpread({}, SIDE_INSERT_MENUS_CONFIG[ELEMENT_TYPE.CODE_BLOCK]),
|
|
88
96
|
onClick: onInsertCodeBlock
|
|
97
|
+
}), /*#__PURE__*/React.createElement(DropdownMenuItem, {
|
|
98
|
+
menuConfig: _objectSpread({}, SIDE_INSERT_MENUS_CONFIG[ELEMENT_TYPE.UNORDERED_LIST]),
|
|
99
|
+
onClick: function onClick() {
|
|
100
|
+
onInsertList(ELEMENT_TYPE.UNORDERED_LIST);
|
|
101
|
+
}
|
|
102
|
+
}), /*#__PURE__*/React.createElement(DropdownMenuItem, {
|
|
103
|
+
menuConfig: _objectSpread({}, SIDE_INSERT_MENUS_CONFIG[ELEMENT_TYPE.ORDERED_LIST]),
|
|
104
|
+
onClick: function onClick() {
|
|
105
|
+
onInsertList(ELEMENT_TYPE.ORDERED_LIST);
|
|
106
|
+
}
|
|
107
|
+
}), /*#__PURE__*/React.createElement(DropdownMenuItem, {
|
|
108
|
+
menuConfig: _objectSpread({}, SIDE_INSERT_MENUS_CONFIG[ELEMENT_TYPE.CHECK_LIST_ITEM]),
|
|
109
|
+
onClick: onInsertCheckList
|
|
110
|
+
}), [SIDE_INSERT_MENUS_CONFIG[ELEMENT_TYPE.PARAGRAPH]].concat(_toConsumableArray(SIDE_INSERT_MENUS_CONFIG[ELEMENT_TYPE.HEADER])).map(function (item) {
|
|
111
|
+
return /*#__PURE__*/React.createElement(DropdownMenuItem, {
|
|
112
|
+
key: item.id,
|
|
113
|
+
menuConfig: item,
|
|
114
|
+
onClick: function onClick() {
|
|
115
|
+
return onInsert(item.type);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
89
118
|
}));
|
|
90
119
|
};
|
|
91
120
|
InsertBlockMenu.defaultProps = {
|
|
@@ -58,7 +58,7 @@ var SideMenu = function SideMenu(_ref) {
|
|
|
58
58
|
}, /*#__PURE__*/React.createElement("div", {
|
|
59
59
|
className: "sdoc-side-menu sdoc-dropdown-menu",
|
|
60
60
|
ref: sideMenuRef
|
|
61
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, null, !isNotSupportTransform(slateNode) && /*#__PURE__*/React.createElement(DropdownMenuItem, {
|
|
61
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, !isNodeEmpty && !isNotSupportTransform(slateNode) && /*#__PURE__*/React.createElement(DropdownMenuItem, {
|
|
62
62
|
menuConfig: {
|
|
63
63
|
id: 'sdoc-side-menu-item-transform',
|
|
64
64
|
text: 'Transform_to',
|
|
@@ -3,7 +3,7 @@ import { UncontrolledPopover } from 'reactstrap';
|
|
|
3
3
|
import { withTranslation } from 'react-i18next';
|
|
4
4
|
import { useSlateStatic } from '@seafile/slate-react';
|
|
5
5
|
import { onSetNodeType } from './helpers';
|
|
6
|
-
import {
|
|
6
|
+
import { SIDE_TRANSFORM_MENUS_CONFIG, LIST_ITEM_SUPPORTED_TRANSFORMATION, LIST_ITEM_CORRELATION_TYPE } from '../../constants';
|
|
7
7
|
import DropdownMenuItem from '../../commons/dropdown-menu-item';
|
|
8
8
|
var TransformMenus = function TransformMenus(_ref) {
|
|
9
9
|
var target = _ref.target,
|
|
@@ -16,10 +16,10 @@ var TransformMenus = function TransformMenus(_ref) {
|
|
|
16
16
|
onReset();
|
|
17
17
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
18
18
|
}, []);
|
|
19
|
-
var getSideMenusConfig = useCallback(function (
|
|
20
|
-
var newSideMenusConfig =
|
|
19
|
+
var getSideMenusConfig = useCallback(function (SIDE_TRANSFORM_MENUS_CONFIG) {
|
|
20
|
+
var newSideMenusConfig = SIDE_TRANSFORM_MENUS_CONFIG;
|
|
21
21
|
if (LIST_ITEM_CORRELATION_TYPE.includes(slateNode.type)) {
|
|
22
|
-
newSideMenusConfig =
|
|
22
|
+
newSideMenusConfig = SIDE_TRANSFORM_MENUS_CONFIG.filter(function (item) {
|
|
23
23
|
return LIST_ITEM_SUPPORTED_TRANSFORMATION.includes(item.type);
|
|
24
24
|
});
|
|
25
25
|
}
|
|
@@ -36,7 +36,7 @@ var TransformMenus = function TransformMenus(_ref) {
|
|
|
36
36
|
fade: false
|
|
37
37
|
}, /*#__PURE__*/React.createElement("div", {
|
|
38
38
|
className: "sdoc-dropdown-menu-container"
|
|
39
|
-
}, getSideMenusConfig(
|
|
39
|
+
}, getSideMenusConfig(SIDE_TRANSFORM_MENUS_CONFIG).map(function (item) {
|
|
40
40
|
return /*#__PURE__*/React.createElement(DropdownMenuItem, {
|
|
41
41
|
key: item.id,
|
|
42
42
|
menuConfig: item,
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React, { useCallback, useState } from 'react';
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
3
2
|
import { useTranslation } from 'react-i18next';
|
|
4
3
|
import { Modal, ModalHeader, ModalBody, ModalFooter, Button } from 'reactstrap';
|
|
5
4
|
import classnames from 'classnames';
|
|
6
5
|
import { TIP_TYPE, TIP_TITLE } from '../../constants';
|
|
7
6
|
import TipContent from './tip-content';
|
|
8
|
-
|
|
9
|
-
import './index.css';
|
|
10
|
-
var NOT_CLOSE_DIALOG_TIP_TYPE = [TIP_TYPE.HAS_BEEN_REPLACED, TIP_TYPE.HAS_BEEN_PUBLISHED, TIP_TYPE.CHECKING, TIP_TYPE.PUBLISHING];
|
|
7
|
+
var NOT_CLOSE_DIALOG_TIP_TYPE = [TIP_TYPE.HAS_BEEN_REPLACED, TIP_TYPE.HAS_BEEN_PUBLISHED];
|
|
11
8
|
var TipDialog = function TipDialog(_ref) {
|
|
12
9
|
var className = _ref.className,
|
|
13
10
|
tipType = _ref.tipType,
|
|
@@ -15,25 +12,17 @@ var TipDialog = function TipDialog(_ref) {
|
|
|
15
12
|
submit = _ref.submit;
|
|
16
13
|
var _useTranslation = useTranslation(),
|
|
17
14
|
t = _useTranslation.t;
|
|
18
|
-
var _useState = useState(false),
|
|
19
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
-
isSubmitting = _useState2[0],
|
|
21
|
-
setSubmitting = _useState2[1];
|
|
22
15
|
var closeDialog = useCallback(function () {
|
|
23
16
|
if (NOT_CLOSE_DIALOG_TIP_TYPE.includes(tipType)) return;
|
|
24
|
-
if (isSubmitting) return;
|
|
25
17
|
toggle && toggle();
|
|
26
18
|
|
|
27
19
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
28
|
-
}, [tipType
|
|
20
|
+
}, [tipType]);
|
|
29
21
|
var confirmTip = useCallback(function () {
|
|
30
|
-
submit && submit(
|
|
31
|
-
console.log(submitting);
|
|
32
|
-
setSubmitting(submitting);
|
|
33
|
-
});
|
|
22
|
+
submit && submit();
|
|
34
23
|
|
|
35
24
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
36
|
-
}, [
|
|
25
|
+
}, []);
|
|
37
26
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
38
27
|
isOpen: true,
|
|
39
28
|
autoFocus: false,
|
|
@@ -54,13 +43,8 @@ var TipDialog = function TipDialog(_ref) {
|
|
|
54
43
|
onClick: closeDialog
|
|
55
44
|
}, t('Cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
56
45
|
color: "primary",
|
|
57
|
-
className:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
onClick: confirmTip,
|
|
61
|
-
disabled: isSubmitting
|
|
62
|
-
}, isSubmitting && /*#__PURE__*/React.createElement("span", {
|
|
63
|
-
className: "submit-loading-container mr-2"
|
|
64
|
-
}, /*#__PURE__*/React.createElement(CommonLoading, null)), t('Confirm'))));
|
|
46
|
+
className: "highlight-bg-color",
|
|
47
|
+
onClick: confirmTip
|
|
48
|
+
}, t('Confirm'))));
|
|
65
49
|
};
|
|
66
50
|
export default TipDialog;
|
package/dist/constants/index.js
CHANGED
|
@@ -24,9 +24,7 @@ export var TIP_TYPE = {
|
|
|
24
24
|
HAS_BEEN_PUBLISHED: 'has_been_published',
|
|
25
25
|
HAS_BEEN_REPLACED: 'has_been_merge',
|
|
26
26
|
HAS_CONFLICT_BEFORE_VIEW_CHANGES: 'has_conflict_before_view_changes',
|
|
27
|
-
HAS_BEEN_REMOVED: 'has_been_removed'
|
|
28
|
-
CHECKING: 'checking',
|
|
29
|
-
PUBLISHING: 'publishing'
|
|
27
|
+
HAS_BEEN_REMOVED: 'has_been_removed'
|
|
30
28
|
};
|
|
31
|
-
export var TIP_TITLE = (_TIP_TITLE = {}, _defineProperty(_TIP_TITLE, TIP_TYPE.DELETE_NO_CHANGES_REVISION, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.MERGE, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.HAS_CONFLICT_BEFORE_PUBLISH, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.HAS_BEEN_PUBLISHED, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.HAS_BEEN_REPLACED, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.HAS_CONFLICT_BEFORE_VIEW_CHANGES, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.HAS_BEEN_REMOVED, 'Tip'),
|
|
32
|
-
export var TIP_CONTENT = (_TIP_CONTENT = {}, _defineProperty(_TIP_CONTENT, TIP_TYPE.DELETE_NO_CHANGES_REVISION, 'Rebase_delete_no_change_revision_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.MERGE, 'Merge_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.HAS_CONFLICT_BEFORE_PUBLISH, 'Has_conflict_before_publish_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.HAS_BEEN_PUBLISHED, 'Has_been_published_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.HAS_BEEN_REPLACED, 'Has_been_replaced_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.HAS_CONFLICT_BEFORE_VIEW_CHANGES, 'Has_conflict_before_view_changes_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.HAS_BEEN_REMOVED, 'Has_been_removed_tip'),
|
|
29
|
+
export var TIP_TITLE = (_TIP_TITLE = {}, _defineProperty(_TIP_TITLE, TIP_TYPE.DELETE_NO_CHANGES_REVISION, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.MERGE, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.HAS_CONFLICT_BEFORE_PUBLISH, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.HAS_BEEN_PUBLISHED, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.HAS_BEEN_REPLACED, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.HAS_CONFLICT_BEFORE_VIEW_CHANGES, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.HAS_BEEN_REMOVED, 'Tip'), _TIP_TITLE);
|
|
30
|
+
export var TIP_CONTENT = (_TIP_CONTENT = {}, _defineProperty(_TIP_CONTENT, TIP_TYPE.DELETE_NO_CHANGES_REVISION, 'Rebase_delete_no_change_revision_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.MERGE, 'Merge_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.HAS_CONFLICT_BEFORE_PUBLISH, 'Has_conflict_before_publish_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.HAS_BEEN_PUBLISHED, 'Has_been_published_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.HAS_BEEN_REPLACED, 'Has_been_replaced_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.HAS_CONFLICT_BEFORE_VIEW_CHANGES, 'Has_conflict_before_view_changes_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.HAS_BEEN_REMOVED, 'Has_been_removed_tip'), _TIP_CONTENT);
|
|
@@ -195,8 +195,6 @@ var SimpleEditor = function SimpleEditor(_ref) {
|
|
|
195
195
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
196
196
|
while (1) switch (_context.prev = _context.next) {
|
|
197
197
|
case 0:
|
|
198
|
-
setTipType(TIP_TYPE.CHECKING);
|
|
199
|
-
setShowTip(true);
|
|
200
198
|
loadDocument(function (document) {
|
|
201
199
|
var revisionContent = document;
|
|
202
200
|
if (hasConflict(revisionContent.children)) {
|
|
@@ -218,7 +216,6 @@ var SimpleEditor = function SimpleEditor(_ref) {
|
|
|
218
216
|
isNeedReplaceMaster = _getRebase.isNeedReplaceMaster,
|
|
219
217
|
value = _getRebase.value;
|
|
220
218
|
if (canMerge && isNeedReplaceMaster) {
|
|
221
|
-
setTipType(TIP_TYPE.PUBLISHING);
|
|
222
219
|
context.publishRevision().then(function (res) {
|
|
223
220
|
setTipType(TIP_TYPE.HAS_BEEN_PUBLISHED);
|
|
224
221
|
setShowTip(true);
|
|
@@ -243,7 +240,7 @@ var SimpleEditor = function SimpleEditor(_ref) {
|
|
|
243
240
|
});
|
|
244
241
|
|
|
245
242
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
246
|
-
case
|
|
243
|
+
case 1:
|
|
247
244
|
case "end":
|
|
248
245
|
return _context.stop();
|
|
249
246
|
}
|
|
@@ -262,22 +259,18 @@ var SimpleEditor = function SimpleEditor(_ref) {
|
|
|
262
259
|
|
|
263
260
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
264
261
|
}, [tipType]);
|
|
265
|
-
var tipSubmit = useCallback(function (
|
|
262
|
+
var tipSubmit = useCallback(function () {
|
|
266
263
|
if (tipType === TIP_TYPE.DELETE_NO_CHANGES_REVISION) {
|
|
267
|
-
callback && callback(true);
|
|
268
264
|
context.deleteSdocRevision().then(function (res) {
|
|
269
|
-
callback && callback(false);
|
|
270
265
|
setShowTip(false);
|
|
271
266
|
var originFileURL = context.getSetting('originFileURL');
|
|
272
267
|
jumpToURL(originFileURL);
|
|
273
268
|
}).catch(function (error) {
|
|
274
|
-
callback && callback(false);
|
|
275
269
|
toaster.danger(t('Error'));
|
|
276
270
|
});
|
|
277
271
|
return;
|
|
278
272
|
}
|
|
279
273
|
if (tipType === TIP_TYPE.MERGE) {
|
|
280
|
-
callback && callback(true);
|
|
281
274
|
var _context$getUserInfo = context.getUserInfo(),
|
|
282
275
|
username = _context$getUserInfo.username;
|
|
283
276
|
var doc = {
|
|
@@ -288,7 +281,6 @@ var SimpleEditor = function SimpleEditor(_ref) {
|
|
|
288
281
|
last_modify_user: username
|
|
289
282
|
};
|
|
290
283
|
context.updateSdocRevision(doc).then(function (res) {
|
|
291
|
-
callback && callback(false);
|
|
292
284
|
var origin_file_version = res.data.origin_file_version;
|
|
293
285
|
context.updateSettings({
|
|
294
286
|
'originFileVersion': origin_file_version
|
|
@@ -301,7 +293,6 @@ var SimpleEditor = function SimpleEditor(_ref) {
|
|
|
301
293
|
editorRef.current.setLoading(false);
|
|
302
294
|
setShowTip(false);
|
|
303
295
|
}).catch(function (error) {
|
|
304
|
-
callback && callback(false);
|
|
305
296
|
toaster.danger(t('Error'));
|
|
306
297
|
});
|
|
307
298
|
return;
|
package/package.json
CHANGED
|
@@ -375,7 +375,5 @@
|
|
|
375
375
|
"Has_conflict_before_publish_tip": "There are conflicts in the document, please resolve it before publishing!",
|
|
376
376
|
"Merge_tip": "There are conflicts in the documents. Do you want to merge them?",
|
|
377
377
|
"Has_conflict_before_view_changes_tip": "There are conflicts in the document. Please resolve the conflict before viewing the changes!",
|
|
378
|
-
"Has_been_removed_tip": "Document has been removed, please view other documents."
|
|
379
|
-
"Checking": "Checking...",
|
|
380
|
-
"Publishing": "Publishing..."
|
|
378
|
+
"Has_been_removed_tip": "Document has been removed, please view other documents."
|
|
381
379
|
}
|
|
@@ -375,7 +375,5 @@
|
|
|
375
375
|
"Has_conflict_before_publish_tip": "There are conflicts in the document, please resolve it before publishing!",
|
|
376
376
|
"Merge_tip": "There are conflicts in the documents. Do you want to merge them?",
|
|
377
377
|
"Has_conflict_before_view_changes_tip": "There are conflicts in the document. Please resolve the conflict before viewing the changes!",
|
|
378
|
-
"Has_been_removed_tip": "Document has been removed, please view other documents."
|
|
379
|
-
"Checking": "Checking...",
|
|
380
|
-
"Publishing": "Publishing..."
|
|
378
|
+
"Has_been_removed_tip": "Document has been removed, please view other documents."
|
|
381
379
|
}
|
|
@@ -375,7 +375,5 @@
|
|
|
375
375
|
"Has_conflict_before_publish_tip": "There are conflicts in the document, please resolve it before publishing!",
|
|
376
376
|
"Merge_tip": "There are conflicts in the documents. Do you want to merge them?",
|
|
377
377
|
"Has_conflict_before_view_changes_tip": "There are conflicts in the document. Please resolve the conflict before viewing the changes!",
|
|
378
|
-
"Has_been_removed_tip": "Document has been removed, please view other documents."
|
|
379
|
-
"Checking": "Checking...",
|
|
380
|
-
"Publishing": "Publishing..."
|
|
378
|
+
"Has_been_removed_tip": "Document has been removed, please view other documents."
|
|
381
379
|
}
|
|
@@ -375,7 +375,5 @@
|
|
|
375
375
|
"Has_conflict_before_publish_tip": "There are conflicts in the document, please resolve it before publishing!",
|
|
376
376
|
"Merge_tip": "There are conflicts in the documents. Do you want to merge them?",
|
|
377
377
|
"Has_conflict_before_view_changes_tip": "There are conflicts in the document. Please resolve the conflict before viewing the changes!",
|
|
378
|
-
"Has_been_removed_tip": "Document has been removed, please view other documents."
|
|
379
|
-
"Checking": "Checking...",
|
|
380
|
-
"Publishing": "Publishing..."
|
|
378
|
+
"Has_been_removed_tip": "Document has been removed, please view other documents."
|
|
381
379
|
}
|
|
@@ -375,7 +375,5 @@
|
|
|
375
375
|
"Has_conflict_before_publish_tip": "There are conflicts in the document, please resolve it before publishing!",
|
|
376
376
|
"Merge_tip": "There are conflicts in the documents. Do you want to merge them?",
|
|
377
377
|
"Has_conflict_before_view_changes_tip": "There are conflicts in the document. Please resolve the conflict before viewing the changes!",
|
|
378
|
-
"Has_been_removed_tip": "Document has been removed, please view other documents."
|
|
379
|
-
"Checking": "Checking...",
|
|
380
|
-
"Publishing": "Publishing..."
|
|
378
|
+
"Has_been_removed_tip": "Document has been removed, please view other documents."
|
|
381
379
|
}
|
|
@@ -375,7 +375,5 @@
|
|
|
375
375
|
"Has_conflict_before_publish_tip": "There are conflicts in the document, please resolve it before publishing!",
|
|
376
376
|
"Merge_tip": "There are conflicts in the documents. Do you want to merge them?",
|
|
377
377
|
"Has_conflict_before_view_changes_tip": "There are conflicts in the document. Please resolve the conflict before viewing the changes!",
|
|
378
|
-
"Has_been_removed_tip": "Document has been removed, please view other documents."
|
|
379
|
-
"Checking": "Checking...",
|
|
380
|
-
"Publishing": "Publishing..."
|
|
378
|
+
"Has_been_removed_tip": "Document has been removed, please view other documents."
|
|
381
379
|
}
|
|
@@ -365,17 +365,15 @@
|
|
|
365
365
|
"Subtitle": "Подзаголовок",
|
|
366
366
|
"Link_sdoc": "Ссылка на sdoc",
|
|
367
367
|
"Link_file": "Ссылка на файл",
|
|
368
|
-
"Keep_my_modification": "
|
|
369
|
-
"Keep_other_modification": "
|
|
370
|
-
"Keep_both_modification": "
|
|
371
|
-
"Tip": "
|
|
372
|
-
"Rebase_delete_no_change_revision_tip": "
|
|
373
|
-
"Has_been_replaced_tip": "
|
|
374
|
-
"Has_been_published_tip": "
|
|
375
|
-
"Has_conflict_before_publish_tip": "
|
|
376
|
-
"Merge_tip": "
|
|
377
|
-
"Has_conflict_before_view_changes_tip": "
|
|
378
|
-
"Has_been_removed_tip": "
|
|
379
|
-
"Checking": "Checking...",
|
|
380
|
-
"Publishing": "Publishing..."
|
|
368
|
+
"Keep_my_modification": "Keep my modification",
|
|
369
|
+
"Keep_other_modification": "Keep other's modification",
|
|
370
|
+
"Keep_both_modification": "Keep my modification",
|
|
371
|
+
"Tip": "Tip",
|
|
372
|
+
"Rebase_delete_no_change_revision_tip": "Revision has not made any change compared to original document. Do you want to delete this revision?",
|
|
373
|
+
"Has_been_replaced_tip": "Document content has been replaced. Please refresh the page.",
|
|
374
|
+
"Has_been_published_tip": "Revision has been published, Automatically jump to source content after {{ time }} seconds.",
|
|
375
|
+
"Has_conflict_before_publish_tip": "There are conflicts in the document, please resolve it before publishing!",
|
|
376
|
+
"Merge_tip": "There are conflicts in the documents. Do you want to merge them?",
|
|
377
|
+
"Has_conflict_before_view_changes_tip": "There are conflicts in the document. Please resolve the conflict before viewing the changes!",
|
|
378
|
+
"Has_been_removed_tip": "Document has been removed, please view other documents."
|
|
381
379
|
}
|
|
@@ -375,7 +375,5 @@
|
|
|
375
375
|
"Has_conflict_before_publish_tip": "文档有冲突,请解决冲突后再发布!",
|
|
376
376
|
"Merge_tip": "文档有冲突,是否合并?",
|
|
377
377
|
"Has_conflict_before_view_changes_tip": "文档有冲突,请解决冲突后再查看更改!",
|
|
378
|
-
"Has_been_removed_tip": "文档已经被删除,请查看其他文档"
|
|
379
|
-
"Checking": "检查中...",
|
|
380
|
-
"Publishing": "发布中..."
|
|
378
|
+
"Has_been_removed_tip": "文档已经被删除,请查看其他文档"
|
|
381
379
|
}
|