@seafile/sdoc-editor 0.5.49 → 0.5.50
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/comment/components/global-comment/index.css +1 -1
- package/dist/basic-sdk/extension/constants/menus-config.js +0 -10
- package/dist/basic-sdk/extension/plugins/code-block/prismjs.js +2 -2
- package/dist/basic-sdk/extension/plugins/table/menu/active-table-menu/index.js +0 -20
- package/dist/basic-sdk/utils/rebase.js +25 -13
- package/dist/components/doc-operations/revision-operations/index.js +37 -1
- package/dist/constants/index.js +6 -3
- package/package.json +1 -1
- package/public/locales/cs/sdoc-editor.json +7 -3
- package/public/locales/de/sdoc-editor.json +8 -4
- package/public/locales/en/sdoc-editor.json +2 -1
- package/public/locales/es/sdoc-editor.json +7 -3
- package/public/locales/fr/sdoc-editor.json +7 -3
- package/public/locales/it/sdoc-editor.json +7 -3
- package/public/locales/ru/sdoc-editor.json +8 -4
- package/public/locales/zh_CN/sdoc-editor.json +2 -1
- package/dist/basic-sdk/extension/plugins/table/menu/active-table-menu/combine-cells.js +0 -32
- package/dist/basic-sdk/extension/plugins/table/menu/active-table-menu/remove-table-menu.js +0 -30
- package/dist/basic-sdk/extension/plugins/table/menu/active-table-menu/table-column-menu.js +0 -38
- package/dist/basic-sdk/extension/plugins/table/menu/active-table-menu/table-row-menu.js +0 -38
|
@@ -86,16 +86,6 @@ export const MENUS_CONFIG_MAP = {
|
|
|
86
86
|
iconClass: 'sdocfont sdoc-table',
|
|
87
87
|
text: 'Insert_table'
|
|
88
88
|
},
|
|
89
|
-
[REMOVE_TABLE]: {
|
|
90
|
-
id: "sdoc_".concat(REMOVE_TABLE),
|
|
91
|
-
iconClass: 'sdocfont sdoc-delete-table',
|
|
92
|
-
text: 'Delete_table'
|
|
93
|
-
},
|
|
94
|
-
[COMBINE_CELL]: {
|
|
95
|
-
id: "sdoc_".concat(COMBINE_CELL),
|
|
96
|
-
iconClass: 'sdocfont sdoc-merge-cell',
|
|
97
|
-
text: 'Combine_cell'
|
|
98
|
-
},
|
|
99
89
|
[TEXT_STYLE]: [{
|
|
100
90
|
id: ITALIC,
|
|
101
91
|
iconClass: 'sdocfont sdoc-italic',
|
|
@@ -4,10 +4,6 @@ import { MenuGroup } from '../../../../commons';
|
|
|
4
4
|
import { isAllInTable } from '../../helpers';
|
|
5
5
|
import CellBackgroundColorMenu from './cell-bg-color-menu';
|
|
6
6
|
import CellTextAlignMenu from './cell-text-align-menu';
|
|
7
|
-
import CombineCells from './combine-cells';
|
|
8
|
-
import RemoveTable from './remove-table-menu';
|
|
9
|
-
import TableColumnMenu from './table-column-menu';
|
|
10
|
-
import TableRowMenu from './table-row-menu';
|
|
11
7
|
import ColumnVerticalAlignmentMenu from './column-vertical-alignment-menu';
|
|
12
8
|
import './index.css';
|
|
13
9
|
const ActiveTableMenu = _ref => {
|
|
@@ -26,27 +22,11 @@ const ActiveTableMenu = _ref => {
|
|
|
26
22
|
}), /*#__PURE__*/React.createElement(ColumnVerticalAlignmentMenu, {
|
|
27
23
|
editor: editor,
|
|
28
24
|
readonly: readonly
|
|
29
|
-
}), /*#__PURE__*/React.createElement(TableColumnMenu, {
|
|
30
|
-
editor: editor,
|
|
31
|
-
readonly: readonly
|
|
32
|
-
}), /*#__PURE__*/React.createElement(TableRowMenu, {
|
|
33
|
-
editor: editor,
|
|
34
|
-
readonly: readonly
|
|
35
25
|
}), /*#__PURE__*/React.createElement(CellBackgroundColorMenu, {
|
|
36
26
|
editor: editor,
|
|
37
27
|
isRichEditor: isRichEditor,
|
|
38
28
|
className: className,
|
|
39
29
|
readonly: readonly
|
|
40
|
-
}), /*#__PURE__*/React.createElement(CombineCells, {
|
|
41
|
-
editor: editor,
|
|
42
|
-
isRichEditor: isRichEditor,
|
|
43
|
-
className: className,
|
|
44
|
-
readonly: readonly
|
|
45
|
-
}), /*#__PURE__*/React.createElement(RemoveTable, {
|
|
46
|
-
editor: editor,
|
|
47
|
-
isRichEditor: isRichEditor,
|
|
48
|
-
className: className,
|
|
49
|
-
readonly: readonly
|
|
50
30
|
}));
|
|
51
31
|
};
|
|
52
32
|
export default withTranslation('sdoc-editor')(ActiveTableMenu);
|
|
@@ -169,9 +169,7 @@ const getMergeElement = (diffElement, baseElement) => {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
// The content of the subnode has changed and needs to be solved manually.
|
|
172
|
-
const
|
|
173
|
-
content: childrenContent
|
|
174
|
-
} = getMergeContent(baseElement, diffElement.children);
|
|
172
|
+
const childrenContent = getMergeContent(baseElement, diffElement.children);
|
|
175
173
|
return [_objectSpread(_objectSpread({}, newElement), {}, {
|
|
176
174
|
children: childrenContent
|
|
177
175
|
})];
|
|
@@ -194,11 +192,28 @@ const getMergeContent = (baseContent, diffChanges) => {
|
|
|
194
192
|
const mergeElements = getMergeElement(diffElement, baseElement);
|
|
195
193
|
content.push(...mergeElements);
|
|
196
194
|
});
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
195
|
+
return content;
|
|
196
|
+
};
|
|
197
|
+
export const canMerge = (content, reference) => {
|
|
198
|
+
if (hasConflict(content)) return false;
|
|
199
|
+
if (!Array.isArray(reference) || reference.length === 0) return true;
|
|
200
|
+
const {
|
|
201
|
+
map: referenceMap
|
|
202
|
+
} = generateIdMapAndIds(reference);
|
|
203
|
+
let flag = true;
|
|
204
|
+
for (let i = 0; i < content.length; i++) {
|
|
205
|
+
const element = content[i];
|
|
206
|
+
let referenceElement = referenceMap[element.id];
|
|
207
|
+
if (!referenceElement) {
|
|
208
|
+
flag = false;
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
flag = canMerge(element.children, referenceElement.children);
|
|
212
|
+
if (flag === false) {
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return flag;
|
|
202
217
|
};
|
|
203
218
|
export const getRebase = (masterContent, baseContent, revisionContent) => {
|
|
204
219
|
// master no changes, merged directly
|
|
@@ -219,12 +234,9 @@ export const getRebase = (masterContent, baseContent, revisionContent) => {
|
|
|
219
234
|
};
|
|
220
235
|
}
|
|
221
236
|
const diffChanges = getChanges(masterContent, revisionContent);
|
|
222
|
-
const
|
|
223
|
-
canMerge,
|
|
224
|
-
content
|
|
225
|
-
} = getMergeContent(baseContent, diffChanges);
|
|
237
|
+
const content = getMergeContent(baseContent, diffChanges);
|
|
226
238
|
return {
|
|
227
|
-
canMerge,
|
|
239
|
+
canMerge: canMerge(content, revisionContent.children),
|
|
228
240
|
isNeedReplaceMaster: true,
|
|
229
241
|
value: _objectSpread(_objectSpread({}, revisionContent), {}, {
|
|
230
242
|
children: content,
|
|
@@ -32,6 +32,41 @@ const RevisionOperations = _ref => {
|
|
|
32
32
|
const {
|
|
33
33
|
loadDocument
|
|
34
34
|
} = useDocument();
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (isShowChanges) return;
|
|
37
|
+
setShowTip(true);
|
|
38
|
+
setTipType(TIP_TYPE.CHECKING);
|
|
39
|
+
const revisionPromise = loadDocument();
|
|
40
|
+
const baseVersionPromise = context.getRevisionBaseVersionContent();
|
|
41
|
+
const originVersionPromise = context.getSeadocOriginFileContent();
|
|
42
|
+
Promise.all([revisionPromise, baseVersionPromise, originVersionPromise]).then(results => {
|
|
43
|
+
const [revisionContent, baseRes, masterRes] = results;
|
|
44
|
+
const baseContent = JSON.parse(baseRes.data.content);
|
|
45
|
+
const masterContent = JSON.parse(masterRes.data.content);
|
|
46
|
+
|
|
47
|
+
// no changes
|
|
48
|
+
if (masterContent.version === baseContent.version) {
|
|
49
|
+
setShowTip(false);
|
|
50
|
+
setTipType('');
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const {
|
|
54
|
+
value
|
|
55
|
+
} = getRebase(masterContent, baseContent, revisionContent);
|
|
56
|
+
setMergeValue(value);
|
|
57
|
+
setTipType(TIP_TYPE.SOURCE_DOCUMENT_CHANGED);
|
|
58
|
+
}).catch(error => {
|
|
59
|
+
if (typeof error === 'string') {
|
|
60
|
+
toaster.danger(t(error));
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
toaster.danger(t('Error'));
|
|
64
|
+
setShowTip(false);
|
|
65
|
+
setTipType('');
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
69
|
+
}, []);
|
|
35
70
|
const onDocumentReplaced = useCallback(() => {
|
|
36
71
|
if (isShowTip) return;
|
|
37
72
|
setTipType(TIP_TYPE.HAS_BEEN_REPLACED);
|
|
@@ -150,6 +185,7 @@ const RevisionOperations = _ref => {
|
|
|
150
185
|
const onSubmit = useCallback(() => {
|
|
151
186
|
if (tipType === TIP_TYPE.HAS_BEEN_PUBLISHED) {
|
|
152
187
|
// nothing todo
|
|
188
|
+
return;
|
|
153
189
|
}
|
|
154
190
|
if (tipType === TIP_TYPE.DELETE_NO_CHANGES_REVISION) {
|
|
155
191
|
context.deleteSdocRevision().then(res => {
|
|
@@ -161,7 +197,7 @@ const RevisionOperations = _ref => {
|
|
|
161
197
|
});
|
|
162
198
|
return;
|
|
163
199
|
}
|
|
164
|
-
if (tipType === TIP_TYPE.MERGE) {
|
|
200
|
+
if (tipType === TIP_TYPE.MERGE || tipType === TIP_TYPE.SOURCE_DOCUMENT_CHANGED) {
|
|
165
201
|
const {
|
|
166
202
|
username
|
|
167
203
|
} = context.getUserInfo();
|
package/dist/constants/index.js
CHANGED
|
@@ -31,7 +31,8 @@ export const TIP_TYPE = {
|
|
|
31
31
|
HAS_BEEN_REMOVED: 'has_been_removed',
|
|
32
32
|
CHECKING: 'checking',
|
|
33
33
|
PUBLISHING: 'publishing',
|
|
34
|
-
DELETE_REVISION: 'delete_revision'
|
|
34
|
+
DELETE_REVISION: 'delete_revision',
|
|
35
|
+
SOURCE_DOCUMENT_CHANGED: 'source_document_changed'
|
|
35
36
|
};
|
|
36
37
|
export const TIP_TITLE = {
|
|
37
38
|
[TIP_TYPE.DELETE_NO_CHANGES_REVISION]: 'Tip',
|
|
@@ -43,7 +44,8 @@ export const TIP_TITLE = {
|
|
|
43
44
|
[TIP_TYPE.HAS_BEEN_REMOVED]: 'Tip',
|
|
44
45
|
[TIP_TYPE.CHECKING]: 'Tip',
|
|
45
46
|
[TIP_TYPE.PUBLISHING]: 'Tip',
|
|
46
|
-
[TIP_TYPE.DELETE_REVISION]: 'Delete_revision'
|
|
47
|
+
[TIP_TYPE.DELETE_REVISION]: 'Delete_revision',
|
|
48
|
+
[TIP_TYPE.SOURCE_DOCUMENT_CHANGED]: 'Tip'
|
|
47
49
|
};
|
|
48
50
|
export const TIP_CONTENT = {
|
|
49
51
|
[TIP_TYPE.DELETE_NO_CHANGES_REVISION]: 'Rebase_delete_no_change_revision_tip',
|
|
@@ -55,6 +57,7 @@ export const TIP_CONTENT = {
|
|
|
55
57
|
[TIP_TYPE.HAS_BEEN_REMOVED]: 'Has_been_removed_tip',
|
|
56
58
|
[TIP_TYPE.CHECKING]: 'Checking',
|
|
57
59
|
[TIP_TYPE.PUBLISHING]: 'Publishing',
|
|
58
|
-
[TIP_TYPE.DELETE_REVISION]: 'Delete_tip'
|
|
60
|
+
[TIP_TYPE.DELETE_REVISION]: 'Delete_tip',
|
|
61
|
+
[TIP_TYPE.SOURCE_DOCUMENT_CHANGED]: 'Source_document_changed_tip'
|
|
59
62
|
};
|
|
60
63
|
export { KeyCodes, TransferTypes };
|
package/package.json
CHANGED
|
@@ -274,8 +274,8 @@
|
|
|
274
274
|
"Delete_reply": "Delete reply",
|
|
275
275
|
"Are_you_sure_to_delete_this_comment": "Are you sure to delete this comment?",
|
|
276
276
|
"Are_you_sure_to_delete_this_reply": "Are you sure to delete this reply?",
|
|
277
|
-
"Enter_comment_Enter_for_new_line_shift_enter_to_send": "Enter
|
|
278
|
-
"Enter_reply_Enter_for_new_line_Shift_Enter_to_send": "Enter
|
|
277
|
+
"Enter_comment_Enter_for_new_line_shift_enter_to_send": "Enter comment, Enter for new line, Shift + Enter to send",
|
|
278
|
+
"Enter_reply_Enter_for_new_line_Shift_Enter_to_send": "Enter reply, Enter for new line, Shift + Enter to send",
|
|
279
279
|
"Reopen_discussion": "Adding a reply will reopen this discussion",
|
|
280
280
|
"Confirm": "Potvrdit",
|
|
281
281
|
"View_changes": "View changes",
|
|
@@ -452,5 +452,9 @@
|
|
|
452
452
|
"Move_column_count": "Moving {{count}} column(s)",
|
|
453
453
|
"Move_row_count": "Moving {{count}} row(s)",
|
|
454
454
|
"Mark_all_as_read": "Mark all as read",
|
|
455
|
-
"Alignment_type": "Alignment"
|
|
455
|
+
"Alignment_type": "Alignment",
|
|
456
|
+
"Print": "Print",
|
|
457
|
+
"Enter_more_character_start_search": "Enter more characters to start search",
|
|
458
|
+
"Create_file_name_sdoc": "Create {{file_name_sdoc}}",
|
|
459
|
+
"Source_document_changed_tip": "Original document has concurrent modifications. Do you like to merge these modifications to the revision?"
|
|
456
460
|
}
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"Copy_internal_link": "Der interne Link wurde in den Zwischenspeicher kopiert.",
|
|
60
60
|
"Internal_link_desc": "Interne Links sind Verweise auf Dateien bzw. Ordner, die nur von Benutzer/innen mit mindestens Leserechten für die Dateien bzw. Ordner genutzt werden können. Interne Links eignen sich insbesondere für die interne Kommunikation in Ticket-/CRM-Systemen sowie E-Mails und Chats.",
|
|
61
61
|
"Share": "Freigeben",
|
|
62
|
-
"Share_link": "
|
|
62
|
+
"Share_link": "Freigabe-Link",
|
|
63
63
|
"Generate": "Erstellen",
|
|
64
64
|
"Add_password_protection": "Passwort hinzufügen",
|
|
65
65
|
"Password": "Passwort",
|
|
@@ -274,8 +274,8 @@
|
|
|
274
274
|
"Delete_reply": "Delete reply",
|
|
275
275
|
"Are_you_sure_to_delete_this_comment": "Are you sure to delete this comment?",
|
|
276
276
|
"Are_you_sure_to_delete_this_reply": "Are you sure to delete this reply?",
|
|
277
|
-
"Enter_comment_Enter_for_new_line_shift_enter_to_send": "Enter
|
|
278
|
-
"Enter_reply_Enter_for_new_line_Shift_Enter_to_send": "Enter
|
|
277
|
+
"Enter_comment_Enter_for_new_line_shift_enter_to_send": "Enter comment, Enter for new line, Shift + Enter to send",
|
|
278
|
+
"Enter_reply_Enter_for_new_line_Shift_Enter_to_send": "Enter reply, Enter for new line, Shift + Enter to send",
|
|
279
279
|
"Reopen_discussion": "Adding a reply will reopen this discussion",
|
|
280
280
|
"Confirm": "Bestätigen",
|
|
281
281
|
"View_changes": "View changes",
|
|
@@ -452,5 +452,9 @@
|
|
|
452
452
|
"Move_column_count": "Moving {{count}} column(s)",
|
|
453
453
|
"Move_row_count": "Moving {{count}} row(s)",
|
|
454
454
|
"Mark_all_as_read": "Alle als gelesen markieren",
|
|
455
|
-
"Alignment_type": "Alignment"
|
|
455
|
+
"Alignment_type": "Alignment",
|
|
456
|
+
"Print": "Drucken",
|
|
457
|
+
"Enter_more_character_start_search": "Enter more characters to start search",
|
|
458
|
+
"Create_file_name_sdoc": "Create {{file_name_sdoc}}",
|
|
459
|
+
"Source_document_changed_tip": "Original document has concurrent modifications. Do you like to merge these modifications to the revision?"
|
|
456
460
|
}
|
|
@@ -455,5 +455,6 @@
|
|
|
455
455
|
"Alignment_type": "Alignment",
|
|
456
456
|
"Print": "Print",
|
|
457
457
|
"Enter_more_character_start_search": "Enter more characters to start search",
|
|
458
|
-
"Create_file_name_sdoc": "Create {{file_name_sdoc}}"
|
|
458
|
+
"Create_file_name_sdoc": "Create {{file_name_sdoc}}",
|
|
459
|
+
"Source_document_changed_tip": "Original document has concurrent modifications. Do you like to merge these modifications to the revision?"
|
|
459
460
|
}
|
|
@@ -274,8 +274,8 @@
|
|
|
274
274
|
"Delete_reply": "Delete reply",
|
|
275
275
|
"Are_you_sure_to_delete_this_comment": "Are you sure to delete this comment?",
|
|
276
276
|
"Are_you_sure_to_delete_this_reply": "Are you sure to delete this reply?",
|
|
277
|
-
"Enter_comment_Enter_for_new_line_shift_enter_to_send": "Enter
|
|
278
|
-
"Enter_reply_Enter_for_new_line_Shift_Enter_to_send": "Enter
|
|
277
|
+
"Enter_comment_Enter_for_new_line_shift_enter_to_send": "Enter comment, Enter for new line, Shift + Enter to send",
|
|
278
|
+
"Enter_reply_Enter_for_new_line_Shift_Enter_to_send": "Enter reply, Enter for new line, Shift + Enter to send",
|
|
279
279
|
"Reopen_discussion": "Adding a reply will reopen this discussion",
|
|
280
280
|
"Confirm": "Confirmar",
|
|
281
281
|
"View_changes": "View changes",
|
|
@@ -452,5 +452,9 @@
|
|
|
452
452
|
"Move_column_count": "Moving {{count}} column(s)",
|
|
453
453
|
"Move_row_count": "Moving {{count}} row(s)",
|
|
454
454
|
"Mark_all_as_read": "Mark all as read",
|
|
455
|
-
"Alignment_type": "Alignment"
|
|
455
|
+
"Alignment_type": "Alignment",
|
|
456
|
+
"Print": "Print",
|
|
457
|
+
"Enter_more_character_start_search": "Enter more characters to start search",
|
|
458
|
+
"Create_file_name_sdoc": "Create {{file_name_sdoc}}",
|
|
459
|
+
"Source_document_changed_tip": "Original document has concurrent modifications. Do you like to merge these modifications to the revision?"
|
|
456
460
|
}
|
|
@@ -274,8 +274,8 @@
|
|
|
274
274
|
"Delete_reply": "Supprimer la réponse",
|
|
275
275
|
"Are_you_sure_to_delete_this_comment": "Êtes-vous sûr de vouloir supprimer ce commentaire ?",
|
|
276
276
|
"Are_you_sure_to_delete_this_reply": "Êtes-vous sûr de vouloir supprimer cette réponse ?",
|
|
277
|
-
"Enter_comment_Enter_for_new_line_shift_enter_to_send": "
|
|
278
|
-
"Enter_reply_Enter_for_new_line_Shift_Enter_to_send": "
|
|
277
|
+
"Enter_comment_Enter_for_new_line_shift_enter_to_send": "Enter comment, Enter for new line, Shift + Enter to send",
|
|
278
|
+
"Enter_reply_Enter_for_new_line_Shift_Enter_to_send": "Enter reply, Enter for new line, Shift + Enter to send",
|
|
279
279
|
"Reopen_discussion": "L'ajout d'une réponse rouvrira la discussion.",
|
|
280
280
|
"Confirm": "Confirmer",
|
|
281
281
|
"View_changes": "Afficher les modifications",
|
|
@@ -452,5 +452,9 @@
|
|
|
452
452
|
"Move_column_count": "Moving {{count}} column(s)",
|
|
453
453
|
"Move_row_count": "Moving {{count}} row(s)",
|
|
454
454
|
"Mark_all_as_read": "Mark all as read",
|
|
455
|
-
"Alignment_type": "Alignment"
|
|
455
|
+
"Alignment_type": "Alignment",
|
|
456
|
+
"Print": "Imprimer",
|
|
457
|
+
"Enter_more_character_start_search": "Enter more characters to start search",
|
|
458
|
+
"Create_file_name_sdoc": "Create {{file_name_sdoc}}",
|
|
459
|
+
"Source_document_changed_tip": "Original document has concurrent modifications. Do you like to merge these modifications to the revision?"
|
|
456
460
|
}
|
|
@@ -274,8 +274,8 @@
|
|
|
274
274
|
"Delete_reply": "Delete reply",
|
|
275
275
|
"Are_you_sure_to_delete_this_comment": "Are you sure to delete this comment?",
|
|
276
276
|
"Are_you_sure_to_delete_this_reply": "Are you sure to delete this reply?",
|
|
277
|
-
"Enter_comment_Enter_for_new_line_shift_enter_to_send": "Enter
|
|
278
|
-
"Enter_reply_Enter_for_new_line_Shift_Enter_to_send": "Enter
|
|
277
|
+
"Enter_comment_Enter_for_new_line_shift_enter_to_send": "Enter comment, Enter for new line, Shift + Enter to send",
|
|
278
|
+
"Enter_reply_Enter_for_new_line_Shift_Enter_to_send": "Enter reply, Enter for new line, Shift + Enter to send",
|
|
279
279
|
"Reopen_discussion": "Adding a reply will reopen this discussion",
|
|
280
280
|
"Confirm": "Confirm",
|
|
281
281
|
"View_changes": "View changes",
|
|
@@ -452,5 +452,9 @@
|
|
|
452
452
|
"Move_column_count": "Moving {{count}} column(s)",
|
|
453
453
|
"Move_row_count": "Moving {{count}} row(s)",
|
|
454
454
|
"Mark_all_as_read": "Mark all as read",
|
|
455
|
-
"Alignment_type": "Alignment"
|
|
455
|
+
"Alignment_type": "Alignment",
|
|
456
|
+
"Print": "Print",
|
|
457
|
+
"Enter_more_character_start_search": "Enter more characters to start search",
|
|
458
|
+
"Create_file_name_sdoc": "Create {{file_name_sdoc}}",
|
|
459
|
+
"Source_document_changed_tip": "Original document has concurrent modifications. Do you like to merge these modifications to the revision?"
|
|
456
460
|
}
|
|
@@ -274,8 +274,8 @@
|
|
|
274
274
|
"Delete_reply": "Удалить ответ",
|
|
275
275
|
"Are_you_sure_to_delete_this_comment": "Вы уверены, что удалите этот комментарий?",
|
|
276
276
|
"Are_you_sure_to_delete_this_reply": "Вы уверены, что удалите этот ответ?",
|
|
277
|
-
"Enter_comment_Enter_for_new_line_shift_enter_to_send": "Введите
|
|
278
|
-
"Enter_reply_Enter_for_new_line_Shift_Enter_to_send": "Введите
|
|
277
|
+
"Enter_comment_Enter_for_new_line_shift_enter_to_send": "Введите комментарий, Enter для новой строки, Shift + Enter для отправки",
|
|
278
|
+
"Enter_reply_Enter_for_new_line_Shift_Enter_to_send": "Введите ответ, Enter для новой строки, Shift + Enter для отправки.",
|
|
279
279
|
"Reopen_discussion": "Добавление ответа приведёт к возобновлению обсуждения.",
|
|
280
280
|
"Confirm": "Подтвердить",
|
|
281
281
|
"View_changes": "Просмотр изменений",
|
|
@@ -400,7 +400,7 @@
|
|
|
400
400
|
"Delete_failed": "Не удалось удалить",
|
|
401
401
|
"Insert_caption": "Вставить подпись",
|
|
402
402
|
"No_collaborators_available": "Нет доступных соавторов",
|
|
403
|
-
"Search_collaborator": "
|
|
403
|
+
"Search_collaborator": "Поиск соавтора",
|
|
404
404
|
"Doc_comments": "Комментарии к документу",
|
|
405
405
|
"Tag_not_found": "Тег не найден",
|
|
406
406
|
"Create_a_new_tag": "Создать новый тег",
|
|
@@ -452,5 +452,9 @@
|
|
|
452
452
|
"Move_column_count": "Перемещение {{count}} столбцов",
|
|
453
453
|
"Move_row_count": "Перемещение {{count}} строк",
|
|
454
454
|
"Mark_all_as_read": "Отметить все как прочитанное",
|
|
455
|
-
"Alignment_type": "
|
|
455
|
+
"Alignment_type": "Выравнивание",
|
|
456
|
+
"Print": "Печать",
|
|
457
|
+
"Enter_more_character_start_search": "Введите больше символов, чтобы начать поиск",
|
|
458
|
+
"Create_file_name_sdoc": "Создать {{file_name_sdoc}}",
|
|
459
|
+
"Source_document_changed_tip": "Original document has concurrent modifications. Do you like to merge these modifications to the revision?"
|
|
456
460
|
}
|
|
@@ -455,5 +455,6 @@
|
|
|
455
455
|
"Alignment_type": "对齐方式",
|
|
456
456
|
"Print": "打印",
|
|
457
457
|
"Enter_more_character_start_search": "输入更多字符开始搜索",
|
|
458
|
-
"Create_file_name_sdoc": "新建 {{file_name_sdoc}}"
|
|
458
|
+
"Create_file_name_sdoc": "新建 {{file_name_sdoc}}",
|
|
459
|
+
"Source_document_changed_tip": "源文档有并发的改动。你需要合并这些改动到修订稿吗?"
|
|
459
460
|
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import React, { useCallback, useEffect, useState } from 'react';
|
|
3
|
-
import { MenuItem } from '../../../../commons';
|
|
4
|
-
import { MENUS_CONFIG_MAP, COMBINE_CELL } from '../../../../constants';
|
|
5
|
-
import { isCombineCellsDisabled, combineCells } from '../../helpers';
|
|
6
|
-
const CombineCells = _ref => {
|
|
7
|
-
let {
|
|
8
|
-
isRichEditor,
|
|
9
|
-
className,
|
|
10
|
-
editor,
|
|
11
|
-
readonly
|
|
12
|
-
} = _ref;
|
|
13
|
-
const [disabled, setDisabled] = useState(false);
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
const disabled = isCombineCellsDisabled(editor, readonly);
|
|
16
|
-
setDisabled(disabled);
|
|
17
|
-
}, [editor, editor.tableSelectedRange, readonly]);
|
|
18
|
-
const _combineCells = useCallback(() => {
|
|
19
|
-
if (readonly) return;
|
|
20
|
-
combineCells(editor);
|
|
21
|
-
}, [editor, readonly]);
|
|
22
|
-
const menuConfig = MENUS_CONFIG_MAP[COMBINE_CELL];
|
|
23
|
-
const props = _objectSpread(_objectSpread({
|
|
24
|
-
isRichEditor,
|
|
25
|
-
disabled: disabled,
|
|
26
|
-
isActive: false
|
|
27
|
-
}, menuConfig), {}, {
|
|
28
|
-
onMouseDown: _combineCells
|
|
29
|
-
});
|
|
30
|
-
return /*#__PURE__*/React.createElement(MenuItem, props);
|
|
31
|
-
};
|
|
32
|
-
export default CombineCells;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import React, { useCallback } from 'react';
|
|
3
|
-
import classnames from 'classnames';
|
|
4
|
-
import { MenuItem } from '../../../../commons';
|
|
5
|
-
import { MENUS_CONFIG_MAP, REMOVE_TABLE } from '../../../../constants';
|
|
6
|
-
import { removeTableElement } from '../../helpers';
|
|
7
|
-
import { TABLE_ELEMENT } from '../../constants';
|
|
8
|
-
const RemoveTable = _ref => {
|
|
9
|
-
let {
|
|
10
|
-
isRichEditor,
|
|
11
|
-
className,
|
|
12
|
-
editor,
|
|
13
|
-
readonly
|
|
14
|
-
} = _ref;
|
|
15
|
-
const removeTable = useCallback(() => {
|
|
16
|
-
if (readonly) return;
|
|
17
|
-
removeTableElement(editor, TABLE_ELEMENT.TABLE);
|
|
18
|
-
}, [editor, readonly]);
|
|
19
|
-
const menuConfig = MENUS_CONFIG_MAP[REMOVE_TABLE];
|
|
20
|
-
const props = _objectSpread(_objectSpread({
|
|
21
|
-
isRichEditor,
|
|
22
|
-
className: classnames(className, 'sdoc-remove-table menu-group-item'),
|
|
23
|
-
disabled: readonly,
|
|
24
|
-
isActive: false
|
|
25
|
-
}, menuConfig), {}, {
|
|
26
|
-
onMouseDown: removeTable
|
|
27
|
-
});
|
|
28
|
-
return /*#__PURE__*/React.createElement(MenuItem, props);
|
|
29
|
-
};
|
|
30
|
-
export default RemoveTable;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useRef } from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import CommonMenu from './common-menu';
|
|
4
|
-
import { insertTableElement, removeTableElement } from '../../helpers';
|
|
5
|
-
import { TABLE_ELEMENT } from '../../constants';
|
|
6
|
-
const TableColumnMenu = _ref => {
|
|
7
|
-
let {
|
|
8
|
-
editor,
|
|
9
|
-
readonly
|
|
10
|
-
} = _ref;
|
|
11
|
-
const tableColumnRef = useRef(null);
|
|
12
|
-
const {
|
|
13
|
-
t
|
|
14
|
-
} = useTranslation();
|
|
15
|
-
const insertColumn = useCallback(type => {
|
|
16
|
-
if (readonly) return;
|
|
17
|
-
insertTableElement(editor, type);
|
|
18
|
-
tableColumnRef.current && tableColumnRef.current.hidePopover();
|
|
19
|
-
}, [editor, readonly]);
|
|
20
|
-
const removeColumn = useCallback(type => {
|
|
21
|
-
if (readonly) return;
|
|
22
|
-
removeTableElement(editor, type);
|
|
23
|
-
tableColumnRef.current && tableColumnRef.current.hidePopover();
|
|
24
|
-
}, [editor, readonly]);
|
|
25
|
-
return /*#__PURE__*/React.createElement(CommonMenu, {
|
|
26
|
-
id: "table-column",
|
|
27
|
-
iconClass: "sdocfont sdoc-column",
|
|
28
|
-
ref: tableColumnRef,
|
|
29
|
-
disabled: readonly
|
|
30
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
31
|
-
className: "sdoc-dropdown-menu-item",
|
|
32
|
-
onClick: () => insertColumn(TABLE_ELEMENT.COLUMN)
|
|
33
|
-
}, t('Insert_column')), /*#__PURE__*/React.createElement("div", {
|
|
34
|
-
className: "sdoc-dropdown-menu-item",
|
|
35
|
-
onClick: () => removeColumn(TABLE_ELEMENT.COLUMN)
|
|
36
|
-
}, t('Remove_column')));
|
|
37
|
-
};
|
|
38
|
-
export default TableColumnMenu;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useRef } from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import CommonMenu from './common-menu';
|
|
4
|
-
import { insertTableElement, removeTableElement } from '../../helpers';
|
|
5
|
-
import { TABLE_ELEMENT } from '../../constants';
|
|
6
|
-
const TableRowMenu = _ref => {
|
|
7
|
-
let {
|
|
8
|
-
editor,
|
|
9
|
-
readonly
|
|
10
|
-
} = _ref;
|
|
11
|
-
const tableRowRef = useRef(null);
|
|
12
|
-
const {
|
|
13
|
-
t
|
|
14
|
-
} = useTranslation();
|
|
15
|
-
const insertRow = useCallback(type => {
|
|
16
|
-
if (readonly) return;
|
|
17
|
-
insertTableElement(editor, type);
|
|
18
|
-
tableRowRef.current && tableRowRef.current.hidePopover();
|
|
19
|
-
}, [editor, readonly]);
|
|
20
|
-
const removeRow = useCallback(type => {
|
|
21
|
-
if (readonly) return;
|
|
22
|
-
removeTableElement(editor, type);
|
|
23
|
-
tableRowRef.current && tableRowRef.current.hidePopover();
|
|
24
|
-
}, [editor, readonly]);
|
|
25
|
-
return /*#__PURE__*/React.createElement(CommonMenu, {
|
|
26
|
-
id: "table-row",
|
|
27
|
-
iconClass: "sdocfont sdoc-row",
|
|
28
|
-
ref: tableRowRef,
|
|
29
|
-
disabled: readonly
|
|
30
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
31
|
-
className: "sdoc-dropdown-menu-item",
|
|
32
|
-
onClick: () => insertRow(TABLE_ELEMENT.ROW)
|
|
33
|
-
}, t('Insert_row')), /*#__PURE__*/React.createElement("div", {
|
|
34
|
-
className: "sdoc-dropdown-menu-item",
|
|
35
|
-
onClick: () => removeRow(TABLE_ELEMENT.ROW)
|
|
36
|
-
}, t('Remove_row')));
|
|
37
|
-
};
|
|
38
|
-
export default TableRowMenu;
|