@seafile/sdoc-editor 1.0.196 → 1.0.198-test0.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/assets/css/sdoc-editor-plugins.css +4 -0
- package/dist/basic-sdk/comment/components/comment-all-participants/index.js +1 -1
- package/dist/basic-sdk/comment/components/comment-delete-popover.js +1 -1
- package/dist/basic-sdk/comment/components/comment-editor.js +1 -1
- package/dist/basic-sdk/comment/components/comment-participants-editor/index.js +1 -1
- package/dist/basic-sdk/comment/components/comment-participants-editor/searched-collaborators.js +1 -1
- package/dist/basic-sdk/comment/components/comment-participants-editor/selected-participants.js +1 -1
- package/dist/basic-sdk/comment/components/global-comment/global-comment-body-header.js +2 -2
- package/dist/basic-sdk/comment/components/global-comment/global-comment-header.js +1 -1
- package/dist/basic-sdk/comment/hooks/notification-hooks/use-notification-mount.js +1 -1
- package/dist/basic-sdk/comment/provider/participants-content-provider.js +1 -1
- package/dist/basic-sdk/extension/commons/dropdown-menu-item/index.js +1 -1
- package/dist/basic-sdk/extension/commons/file-insert-dialog/index.js +1 -1
- package/dist/basic-sdk/extension/commons/insert-element-dialog/index.js +15 -1
- package/dist/basic-sdk/extension/commons/menu/menu-item.js +1 -1
- package/dist/basic-sdk/extension/commons/select-file-dialog/index.js +31 -4
- package/dist/basic-sdk/extension/commons/select-file-dialog/local-files/index.js +2 -1
- package/dist/basic-sdk/extension/commons/wiki-file-insert-dialog/index.js +1 -1
- package/dist/basic-sdk/extension/constants/element-type.js +2 -1
- package/dist/basic-sdk/extension/constants/index.js +10 -3
- package/dist/basic-sdk/extension/constants/menus-config.js +5 -0
- package/dist/basic-sdk/extension/core/utils/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/ai/ai-menu/menu-item.js +1 -1
- package/dist/basic-sdk/extension/plugins/callout/menu/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/callout/render-elem/callout-hover-menu/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/callout/render-elem/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/code-block/hover-menu/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/font/menu/font-family/font-item.js +1 -1
- package/dist/basic-sdk/extension/plugins/font/menu/font-family/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/font/menu/font-size/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/image/menu/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/link/dialog/add-link-dialog/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/link/hover/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/search-replace/popover/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/search-replace/popover/replace-all-confirm-modal.js +1 -1
- package/dist/basic-sdk/extension/plugins/seatable-tables/op-menu/index.js +3 -3
- package/dist/basic-sdk/extension/plugins/seatable-tables/render-element/seatable-table.js +1 -1
- package/dist/basic-sdk/extension/plugins/seatable-tables/seatable-settings/filter-setter/filter-popover-widgets/department-filter/department-multiple-select-filter.js +1 -1
- package/dist/basic-sdk/extension/plugins/seatable-tables/seatable-settings/filter-setter/filter-popover-widgets/department-filter/department-multiple-select.js +1 -1
- package/dist/basic-sdk/extension/plugins/seatable-tables/seatable-settings/filter-setter/filter-popover-widgets/department-filter/department-single-select-filter.js +1 -1
- package/dist/basic-sdk/extension/plugins/seatable-tables/seatable-settings/filter-setter/filter-popover-widgets/department-filter/selected-departments.js +1 -1
- package/dist/basic-sdk/extension/plugins/seatable-tables/seatable-settings/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/table/dialogs/custom-table-size-dialog/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/table/dialogs/split-cell-setting-dialog.js +1 -1
- package/dist/basic-sdk/extension/plugins/table/menu/color-selector-popover/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/table/menu/horizontal-align-popover/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/table/menu/vertical-align-popover/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/table/popover/table-size-popover/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/table/render/table-header/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/text-align/menu/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/video/menu/index.js +2 -2
- package/dist/basic-sdk/extension/plugins/whiteboard/helpers.js +60 -0
- package/dist/basic-sdk/extension/plugins/whiteboard/index.css +5 -0
- package/dist/basic-sdk/extension/plugins/whiteboard/index.js +20 -0
- package/dist/basic-sdk/extension/plugins/whiteboard/menu/index.js +63 -0
- package/dist/basic-sdk/extension/plugins/whiteboard/plugin.js +28 -0
- package/dist/basic-sdk/extension/plugins/whiteboard/render-elem.js +39 -0
- package/dist/basic-sdk/extension/render/custom-element.js +7 -0
- package/dist/basic-sdk/extension/render/element-decorate/rebase-decorate/rebase-delete-modify-decorate.js +1 -1
- package/dist/basic-sdk/extension/render/element-decorate/rebase-decorate/rebase-modify-delete-decorate.js +1 -1
- package/dist/basic-sdk/extension/render/element-decorate/rebase-decorate/rebase-modify-modify-decorate.js +1 -1
- package/dist/basic-sdk/extension/render/render-comment-editor-element.js +9 -0
- package/dist/basic-sdk/extension/toolbar/header-toolbar/insert-toolbar/index.js +3 -2
- package/dist/basic-sdk/extension/toolbar/insert-element-toolbar/index.js +1 -1
- package/dist/basic-sdk/extension/toolbar/side-toolbar/helpers.js +1 -1
- package/dist/basic-sdk/extension/toolbar/side-toolbar/insert-block-menu.js +4 -3
- package/dist/basic-sdk/extension/toolbar/side-toolbar/side-menu.css +5 -0
- package/dist/basic-sdk/extension/toolbar/side-toolbar/side-menu.js +4 -2
- package/dist/basic-sdk/wiki-outline/index.js +1 -1
- package/dist/components/doc-operations/revision-operations/changes-count/index.js +1 -1
- package/dist/components/doc-operations/revision-operations/index.js +1 -1
- package/dist/components/doc-operations/revision-operations/publish-revision/index.js +1 -1
- package/dist/components/doc-operations/revision-operations/revisions/index.js +1 -1
- package/dist/components/doc-operations/revision-operations/revisions/revisions-dialog/index.js +1 -1
- package/dist/components/doc-operations/revision-operations/view-changes/index.js +1 -1
- package/dist/components/tip-dialog/index.js +1 -1
- package/dist/constants/index.js +2 -0
- package/dist/pages/published-revision-viewer.js +1 -1
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@ const CommentAllParticipants = () => {
|
|
|
20
20
|
} = (0, _useParticipants.useParticipantsContext)();
|
|
21
21
|
const {
|
|
22
22
|
t
|
|
23
|
-
} = (0, _reactI18next.useTranslation)();
|
|
23
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
24
24
|
const addParticipantId = 'sdoc-add-participants';
|
|
25
25
|
const commentsParticipantsId = 'sdoc-comments-participants';
|
|
26
26
|
const [isDidMount, setDidMount] = (0, _react.useState)(false);
|
|
@@ -19,7 +19,7 @@ const CommentDeletePopover = _ref => {
|
|
|
19
19
|
} = _ref;
|
|
20
20
|
const {
|
|
21
21
|
t
|
|
22
|
-
} = (0, _reactI18next.useTranslation)();
|
|
22
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
23
23
|
const onDeleteCancel = (0, _react.useCallback)(event => {
|
|
24
24
|
event.stopPropagation();
|
|
25
25
|
setIsShowDeleteModal(false);
|
|
@@ -44,7 +44,7 @@ const CommentEditor = _ref => {
|
|
|
44
44
|
const commentWrapperRef = (0, _react.useRef)();
|
|
45
45
|
const {
|
|
46
46
|
t
|
|
47
|
-
} = (0, _reactI18next.useTranslation)();
|
|
47
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
48
48
|
const {
|
|
49
49
|
addParticipants
|
|
50
50
|
} = (0, _useParticipants.useParticipantsContext)();
|
|
@@ -25,7 +25,7 @@ const CommentParticipantsEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref
|
|
|
25
25
|
} = (0, _hooks.useCollaborators)();
|
|
26
26
|
const {
|
|
27
27
|
t
|
|
28
|
-
} = (0, _reactI18next.useTranslation)();
|
|
28
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
29
29
|
const [searchValue, setSearchValue] = (0, _react.useState)('');
|
|
30
30
|
const [searchedCollaborators, setSearchedCollaborators] = (0, _react.useState)([]);
|
|
31
31
|
(0, _react.useImperativeHandle)(ref, () => ({
|
package/dist/basic-sdk/comment/components/comment-participants-editor/searched-collaborators.js
CHANGED
|
@@ -20,7 +20,7 @@ const SearchedCollaborators = _ref => {
|
|
|
20
20
|
} = (0, _useParticipants.useParticipantsContext)();
|
|
21
21
|
const {
|
|
22
22
|
t
|
|
23
|
-
} = (0, _reactI18next.useTranslation)();
|
|
23
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
24
24
|
const onSelectParticipant = (0, _react.useCallback)((event, participant, isSelected) => {
|
|
25
25
|
(0, _mouseEvent.eventStopPropagation)(event);
|
|
26
26
|
if (isSelected) {
|
package/dist/basic-sdk/comment/components/comment-participants-editor/selected-participants.js
CHANGED
|
@@ -15,7 +15,7 @@ const SelectedParticipants = () => {
|
|
|
15
15
|
} = (0, _useParticipants.useParticipantsContext)();
|
|
16
16
|
const {
|
|
17
17
|
t
|
|
18
|
-
} = (0, _reactI18next.useTranslation)();
|
|
18
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
19
19
|
const onDeleteParticipant = (0, _react.useCallback)(participant => {
|
|
20
20
|
deleteParticipant(participant.username);
|
|
21
21
|
}, [deleteParticipant]);
|
|
@@ -17,7 +17,7 @@ const CommentTypeDropdownItem = _ref => {
|
|
|
17
17
|
} = _ref;
|
|
18
18
|
const {
|
|
19
19
|
t
|
|
20
|
-
} = (0, _reactI18next.useTranslation)();
|
|
20
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
21
21
|
const handleCommentTypeChanged = (0, _react.useCallback)((event, type) => {
|
|
22
22
|
(0, _mouseEvent.eventStopPropagation)(event);
|
|
23
23
|
setCommentType(type);
|
|
@@ -38,7 +38,7 @@ const GlobalCommentBodyHeader = _ref2 => {
|
|
|
38
38
|
} = _ref2;
|
|
39
39
|
const {
|
|
40
40
|
t
|
|
41
|
-
} = (0, _reactI18next.useTranslation)();
|
|
41
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
42
42
|
const [isDropdownOpen, setDropdownOpen] = (0, _react.useState)(false);
|
|
43
43
|
let commentTip = null;
|
|
44
44
|
if (commentList.length === 1) {
|
|
@@ -22,7 +22,7 @@ const GlobalCommentHeader = _ref => {
|
|
|
22
22
|
} = _ref;
|
|
23
23
|
const {
|
|
24
24
|
t
|
|
25
|
-
} = (0, _reactI18next.useTranslation)();
|
|
25
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
26
26
|
const panelHeaderRef = (0, _react.useRef)(null);
|
|
27
27
|
const [isMounted, setIsMounted] = (0, _react.useState)(false);
|
|
28
28
|
(0, _react.useEffect)(() => {
|
|
@@ -17,7 +17,7 @@ var _constants3 = require("../../../constants");
|
|
|
17
17
|
const useNotificationsMount = dispatch => {
|
|
18
18
|
const {
|
|
19
19
|
t
|
|
20
|
-
} = (0, _reactI18next.useTranslation)();
|
|
20
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
21
21
|
const {
|
|
22
22
|
collaborators
|
|
23
23
|
} = (0, _hooks.useCollaborators)();
|
|
@@ -24,7 +24,7 @@ const ParticipantsProvider = _ref => {
|
|
|
24
24
|
const [participants, setParticipants] = (0, _react.useState)([]);
|
|
25
25
|
const {
|
|
26
26
|
t
|
|
27
|
-
} = (0, _reactI18next.useTranslation)();
|
|
27
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
28
28
|
const updateLocalParticipants = (0, _react.useCallback)(function () {
|
|
29
29
|
let added = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
30
30
|
if (!Array.isArray(added) || added.length === 0) return;
|
|
@@ -30,7 +30,7 @@ const FileLinkInsertDialog = _ref => {
|
|
|
30
30
|
} = _ref;
|
|
31
31
|
const {
|
|
32
32
|
t
|
|
33
|
-
} = (0, _reactI18next.useTranslation)();
|
|
33
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
34
34
|
const eventBus = _eventBus.default.getInstance();
|
|
35
35
|
const fileLinkInsertRef = (0, _react.useRef)(null);
|
|
36
36
|
const historyFileWrapperRef = (0, _react.useRef)(document.querySelector('.sdoc-history-files-wrapper'));
|
|
@@ -34,10 +34,11 @@ const InsertElementDialog = _ref => {
|
|
|
34
34
|
const [insertLinkCallback, setInsertLinkCallback] = (0, _react.useState)(null);
|
|
35
35
|
const [validEditor, setValidEditor] = (0, _react.useState)(editor);
|
|
36
36
|
const [linkTitle, setLinkTitle] = (0, _react.useState)('');
|
|
37
|
+
const [insertWhiteboardFile, setInsertWhiteboardFile] = (0, _react.useState)(null);
|
|
37
38
|
const [handleSubmit, setHandleSubmit] = (0, _react.useState)(() => void 0);
|
|
38
39
|
const {
|
|
39
40
|
t
|
|
40
|
-
} = (0, _reactI18next.useTranslation)();
|
|
41
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
41
42
|
const uploadLocalImageInputRef = (0, _react.useRef)();
|
|
42
43
|
const uploadLocalVideoInputRef = (0, _react.useRef)();
|
|
43
44
|
const onFileChanged = (0, _react.useCallback)(event => {
|
|
@@ -90,6 +91,7 @@ const InsertElementDialog = _ref => {
|
|
|
90
91
|
slateNode,
|
|
91
92
|
insertFileLinkCallback,
|
|
92
93
|
insertSdocFileLinkCallback,
|
|
94
|
+
insertWhiteboard,
|
|
93
95
|
editor: paramEditor,
|
|
94
96
|
linkTitle,
|
|
95
97
|
// link shortcut wrapping link
|
|
@@ -103,6 +105,7 @@ const InsertElementDialog = _ref => {
|
|
|
103
105
|
insertSdocFileLinkCallback,
|
|
104
106
|
insertFileLinkCallback
|
|
105
107
|
});
|
|
108
|
+
setInsertWhiteboardFile(insertWhiteboard);
|
|
106
109
|
setLinkTitle(linkTitle);
|
|
107
110
|
setHandleSubmit(handleSubmit);
|
|
108
111
|
// Apply for comment editor, as it has a different editor instance
|
|
@@ -124,6 +127,7 @@ const InsertElementDialog = _ref => {
|
|
|
124
127
|
setElement('');
|
|
125
128
|
setDialogType('');
|
|
126
129
|
setInsertLinkCallback(null);
|
|
130
|
+
setInsertWhiteboardFile(null);
|
|
127
131
|
setValidEditor(null);
|
|
128
132
|
setLinkTitle('');
|
|
129
133
|
}, []);
|
|
@@ -169,6 +173,16 @@ const InsertElementDialog = _ref => {
|
|
|
169
173
|
};
|
|
170
174
|
return /*#__PURE__*/_react.default.createElement(_index.default, fileLinkProps);
|
|
171
175
|
}
|
|
176
|
+
case _constants2.ELEMENT_TYPE.WHITEBOARD:
|
|
177
|
+
{
|
|
178
|
+
const whiteboardProps = {
|
|
179
|
+
editor: validEditor,
|
|
180
|
+
dialogType,
|
|
181
|
+
insertWhiteboardFile,
|
|
182
|
+
closeDialog
|
|
183
|
+
};
|
|
184
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, whiteboardProps);
|
|
185
|
+
}
|
|
172
186
|
case _constants2.LOCAL_IMAGE:
|
|
173
187
|
{
|
|
174
188
|
return /*#__PURE__*/_react.default.createElement("input", {
|
|
@@ -26,7 +26,7 @@ const MenuItem = _ref => {
|
|
|
26
26
|
} = _ref;
|
|
27
27
|
const {
|
|
28
28
|
t
|
|
29
|
-
} = (0, _reactI18next.useTranslation)();
|
|
29
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
30
30
|
const onClick = (0, _react.useCallback)(event => {
|
|
31
31
|
if (disabled) return;
|
|
32
32
|
onMouseDown(event, type);
|
|
@@ -21,16 +21,30 @@ const SelectSdocFileDialog = _ref => {
|
|
|
21
21
|
editor,
|
|
22
22
|
dialogType,
|
|
23
23
|
closeDialog,
|
|
24
|
-
insertLinkCallback
|
|
24
|
+
insertLinkCallback,
|
|
25
|
+
insertWhiteboardFile
|
|
25
26
|
} = _ref;
|
|
26
|
-
const modalTitle = dialogType === _constants.ELEMENT_TYPE.FILE_LINK ? 'Select_file' : 'Select_sdoc_document';
|
|
27
27
|
const {
|
|
28
28
|
t
|
|
29
|
-
} = (0, _reactI18next.useTranslation)();
|
|
29
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
30
30
|
const [currentSelectedFile, setCurrentSelectedFile] = (0, _react.useState)(null);
|
|
31
31
|
const [temSearchContent, setTemSearchContent] = (0, _react.useState)('');
|
|
32
32
|
const [searchContent, setSearchContent] = (0, _react.useState)('');
|
|
33
33
|
const [isOpenSearch, setIsOpenSearch] = (0, _react.useState)(false);
|
|
34
|
+
let modalTitle;
|
|
35
|
+
switch (dialogType) {
|
|
36
|
+
case _constants.ELEMENT_TYPE.FILE_LINK:
|
|
37
|
+
modalTitle = 'Select_file';
|
|
38
|
+
break;
|
|
39
|
+
case _constants.ELEMENT_TYPE.SDOC_LINK:
|
|
40
|
+
modalTitle = 'Select_sdoc_document';
|
|
41
|
+
break;
|
|
42
|
+
case _constants.ELEMENT_TYPE.WHITEBOARD:
|
|
43
|
+
modalTitle = 'Select_whiteboard_document';
|
|
44
|
+
break;
|
|
45
|
+
default:
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
34
48
|
const onSelectedFile = (0, _react.useCallback)(fileInfo => {
|
|
35
49
|
setCurrentSelectedFile(fileInfo);
|
|
36
50
|
}, []);
|
|
@@ -44,7 +58,20 @@ const SelectSdocFileDialog = _ref => {
|
|
|
44
58
|
} else {
|
|
45
59
|
insertSdocFileLinkCallback && insertSdocFileLinkCallback(editor, fileInfo.name, fileInfo.file_uuid);
|
|
46
60
|
}
|
|
47
|
-
|
|
61
|
+
switch (dialogType) {
|
|
62
|
+
case _constants.ELEMENT_TYPE.FILE_LINK:
|
|
63
|
+
insertFileLinkCallback && insertFileLinkCallback(editor, fileInfo.name, fileInfo.file_uuid);
|
|
64
|
+
break;
|
|
65
|
+
case _constants.ELEMENT_TYPE.SDOC_LINK:
|
|
66
|
+
insertSdocFileLinkCallback && insertSdocFileLinkCallback(editor, fileInfo.name, fileInfo.file_uuid);
|
|
67
|
+
break;
|
|
68
|
+
case _constants.ELEMENT_TYPE.WHITEBOARD:
|
|
69
|
+
insertWhiteboardFile && insertWhiteboardFile(editor, fileInfo.name, fileInfo.file_uuid);
|
|
70
|
+
break;
|
|
71
|
+
default:
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
}, [insertLinkCallback, insertWhiteboardFile, dialogType, editor]);
|
|
48
75
|
const onSubmit = (0, _react.useCallback)(() => {
|
|
49
76
|
if (!currentSelectedFile) return;
|
|
50
77
|
const {
|
|
@@ -46,6 +46,7 @@ const LocalFiles = _ref => {
|
|
|
46
46
|
}, []);
|
|
47
47
|
const getTreeData = (0, _react.useCallback)((p, indexId, treeData) => {
|
|
48
48
|
return _context.default.getSdocLocalFiles(p, fileType).then(res => {
|
|
49
|
+
console.log(9, res);
|
|
49
50
|
res.data.forEach(item => {
|
|
50
51
|
item.indexId = _slugid.default.nice();
|
|
51
52
|
});
|
|
@@ -155,7 +156,7 @@ const LocalFiles = _ref => {
|
|
|
155
156
|
className: "sdoc-folder-children"
|
|
156
157
|
}, ((_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.length) === 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
157
158
|
className: "sdoc-folder-children-empty"
|
|
158
|
-
}, `(${t('Empty')})`), ((_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.length) > 0 && renderFileTree(item.children))),
|
|
159
|
+
}, `(${t('Empty')})`), ((_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.length) > 0 && renderFileTree(item.children))), ['file', 'draw'].includes(type) && /*#__PURE__*/_react.default.createElement("div", {
|
|
159
160
|
className: (0, _classnames.default)('sdoc-file-info', {
|
|
160
161
|
'active': selected
|
|
161
162
|
}),
|
|
@@ -27,7 +27,7 @@ const WikiFileLinkInsertDialog = _ref => {
|
|
|
27
27
|
} = _ref;
|
|
28
28
|
const {
|
|
29
29
|
t
|
|
30
|
-
} = (0, _reactI18next.useTranslation)();
|
|
30
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
31
31
|
const eventBus = _eventBus.default.getInstance();
|
|
32
32
|
const fileLinkInsertRef = (0, _react.useRef)(null);
|
|
33
33
|
const historyFileWrapperRef = (0, _react.useRef)(document.querySelector('.sdoc-history-files-wrapper'));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.WIKI_LINK = exports.VIDEO = exports.UNORDERED_LIST = exports.TWO_COLUMN = exports.TOP_LEVEL_TYPES = exports.TITLE = exports.THREE_COLUMN = exports.TABLE_ROW = exports.TABLE_CELL = exports.TABLE = exports.SUBTITLE = exports.SEATABLE_TABLE = exports.SEATABLE_COLUMN = exports.SDOC_LINK = exports.QUICK_INSERT = exports.PARAGRAPH = exports.ORDERED_LIST = exports.MULTI_COLUMN = exports.MENTION_TEMP = exports.MENTION = exports.LIST_ITEM = exports.LINK = exports.INLINE_LEVEL_TYPES = exports.IMAGE_BLOCK = exports.IMAGE = exports.HEADER6 = exports.HEADER5 = exports.HEADER4 = exports.HEADER3 = exports.HEADER2 = exports.HEADER1 = exports.HEADER = exports.FOUR_COLUMN = exports.FONT_SIZE_REDUCE = exports.FONT_SIZE_INCREASE = exports.FONT_SIZE = exports.FIVE_COLUMN = exports.FILE_LINK_INSET_INPUT_TEMP = exports.FILE_LINK = exports.COLUMN = exports.CODE_LINE = exports.CODE_BLOCK = exports.CHECK_LIST_ITEM = exports.CALL_OUT = exports.BLOCKQUOTE = exports.ASK_AI = void 0;
|
|
6
|
+
exports.WIKI_LINK = exports.WHITEBOARD = exports.VIDEO = exports.UNORDERED_LIST = exports.TWO_COLUMN = exports.TOP_LEVEL_TYPES = exports.TITLE = exports.THREE_COLUMN = exports.TABLE_ROW = exports.TABLE_CELL = exports.TABLE = exports.SUBTITLE = exports.SEATABLE_TABLE = exports.SEATABLE_COLUMN = exports.SDOC_LINK = exports.QUICK_INSERT = exports.PARAGRAPH = exports.ORDERED_LIST = exports.MULTI_COLUMN = exports.MENTION_TEMP = exports.MENTION = exports.LIST_ITEM = exports.LINK = exports.INLINE_LEVEL_TYPES = exports.IMAGE_BLOCK = exports.IMAGE = exports.HEADER6 = exports.HEADER5 = exports.HEADER4 = exports.HEADER3 = exports.HEADER2 = exports.HEADER1 = exports.HEADER = exports.FOUR_COLUMN = exports.FONT_SIZE_REDUCE = exports.FONT_SIZE_INCREASE = exports.FONT_SIZE = exports.FIVE_COLUMN = exports.FILE_LINK_INSET_INPUT_TEMP = exports.FILE_LINK = exports.COLUMN = exports.CODE_LINE = exports.CODE_BLOCK = exports.CHECK_LIST_ITEM = exports.CALL_OUT = exports.BLOCKQUOTE = exports.ASK_AI = void 0;
|
|
7
7
|
const BLOCKQUOTE = exports.BLOCKQUOTE = 'blockquote';
|
|
8
8
|
const TITLE = exports.TITLE = 'title';
|
|
9
9
|
const SUBTITLE = exports.SUBTITLE = 'subtitle';
|
|
@@ -42,6 +42,7 @@ const MENTION = exports.MENTION = 'mention';
|
|
|
42
42
|
const MENTION_TEMP = exports.MENTION_TEMP = 'mention_temp';
|
|
43
43
|
const FILE_LINK_INSET_INPUT_TEMP = exports.FILE_LINK_INSET_INPUT_TEMP = 'file_link_insert_input_temp';
|
|
44
44
|
const QUICK_INSERT = exports.QUICK_INSERT = 'quick_insert';
|
|
45
|
+
const WHITEBOARD = exports.WHITEBOARD = 'whiteboard';
|
|
45
46
|
const SEATABLE_COLUMN = exports.SEATABLE_COLUMN = 'seatable_column';
|
|
46
47
|
const SEATABLE_TABLE = exports.SEATABLE_TABLE = 'seatable_table';
|
|
47
48
|
const ASK_AI = exports.ASK_AI = 'ask_ai';
|
|
@@ -484,6 +484,12 @@ Object.defineProperty(exports, "VIDEO", {
|
|
|
484
484
|
return _elementType.VIDEO;
|
|
485
485
|
}
|
|
486
486
|
});
|
|
487
|
+
Object.defineProperty(exports, "WHITEBOARD", {
|
|
488
|
+
enumerable: true,
|
|
489
|
+
get: function () {
|
|
490
|
+
return _elementType.WHITEBOARD;
|
|
491
|
+
}
|
|
492
|
+
});
|
|
487
493
|
Object.defineProperty(exports, "WIN_HOTKEYS", {
|
|
488
494
|
enumerable: true,
|
|
489
495
|
get: function () {
|
|
@@ -532,9 +538,10 @@ const LIST_ITEM_SUPPORTED_TRANSFORMATION = exports.LIST_ITEM_SUPPORTED_TRANSFORM
|
|
|
532
538
|
const ADD_POSITION_OFFSET_TYPE = exports.ADD_POSITION_OFFSET_TYPE = [_elementType.PARAGRAPH, _elementType.SUBTITLE, _elementType.HEADER1, _elementType.HEADER2, _elementType.HEADER3, _elementType.HEADER4, _elementType.HEADER5, _elementType.HEADER6, _elementType.CHECK_LIST_ITEM, _elementType.IMAGE_BLOCK];
|
|
533
539
|
const FILE_TYPE = exports.FILE_TYPE = {
|
|
534
540
|
[_elementType.FILE_LINK]: 'file',
|
|
535
|
-
[_elementType.SDOC_LINK]: 'sdoc'
|
|
541
|
+
[_elementType.SDOC_LINK]: 'sdoc',
|
|
542
|
+
[_elementType.WHITEBOARD]: 'draw'
|
|
536
543
|
};
|
|
537
|
-
const SUPPORTED_SIDE_OPERATION_TYPE = exports.SUPPORTED_SIDE_OPERATION_TYPE = [_elementType.PARAGRAPH, _elementType.SUBTITLE, _elementType.HEADER1, _elementType.HEADER2, _elementType.HEADER3, _elementType.HEADER4, _elementType.HEADER5, _elementType.HEADER6, _elementType.CHECK_LIST_ITEM, _elementType.CODE_BLOCK, _elementType.TABLE, _elementType.BLOCKQUOTE, _elementType.CALL_OUT, _elementType.IMAGE_BLOCK, _elementType.VIDEO, _elementType.SEATABLE_TABLE, _elementType.MULTI_COLUMN];
|
|
544
|
+
const SUPPORTED_SIDE_OPERATION_TYPE = exports.SUPPORTED_SIDE_OPERATION_TYPE = [_elementType.PARAGRAPH, _elementType.SUBTITLE, _elementType.HEADER1, _elementType.HEADER2, _elementType.HEADER3, _elementType.HEADER4, _elementType.HEADER5, _elementType.HEADER6, _elementType.CHECK_LIST_ITEM, _elementType.CODE_BLOCK, _elementType.TABLE, _elementType.BLOCKQUOTE, _elementType.CALL_OUT, _elementType.IMAGE_BLOCK, _elementType.VIDEO, _elementType.WHITEBOARD, _elementType.SEATABLE_TABLE, _elementType.MULTI_COLUMN];
|
|
538
545
|
const MOUSE_ENTER_EVENT_DISABLED_MAP = exports.MOUSE_ENTER_EVENT_DISABLED_MAP = {
|
|
539
546
|
[_elementType.PARAGRAPH]: [_elementType.CALL_OUT],
|
|
540
547
|
[_elementType.TITLE]: [_elementType.CALL_OUT],
|
|
@@ -552,4 +559,4 @@ const MOUSE_ENTER_EVENT_DISABLED_MAP = exports.MOUSE_ENTER_EVENT_DISABLED_MAP =
|
|
|
552
559
|
[_elementType.HEADER6]: [_elementType.CALL_OUT],
|
|
553
560
|
[_elementType.CALL_OUT]: [_elementType.CALL_OUT]
|
|
554
561
|
};
|
|
555
|
-
const ROOT_ELEMENT_TYPES = exports.ROOT_ELEMENT_TYPES = [_elementType.PARAGRAPH, _elementType.TITLE, _elementType.SUBTITLE, _elementType.CHECK_LIST_ITEM, _elementType.ORDERED_LIST, _elementType.UNORDERED_LIST, _elementType.BLOCKQUOTE, _elementType.HEADER1, _elementType.HEADER2, _elementType.HEADER3, _elementType.HEADER4, _elementType.HEADER5, _elementType.HEADER6, _elementType.CALL_OUT, _elementType.TABLE, _elementType.CODE_BLOCK, _elementType.IMAGE_BLOCK, _elementType.VIDEO, _elementType.SEATABLE_TABLE];
|
|
562
|
+
const ROOT_ELEMENT_TYPES = exports.ROOT_ELEMENT_TYPES = [_elementType.PARAGRAPH, _elementType.TITLE, _elementType.SUBTITLE, _elementType.CHECK_LIST_ITEM, _elementType.ORDERED_LIST, _elementType.UNORDERED_LIST, _elementType.BLOCKQUOTE, _elementType.HEADER1, _elementType.HEADER2, _elementType.HEADER3, _elementType.HEADER4, _elementType.HEADER5, _elementType.HEADER6, _elementType.CALL_OUT, _elementType.TABLE, _elementType.CODE_BLOCK, _elementType.IMAGE_BLOCK, _elementType.VIDEO, _elementType.SEATABLE_TABLE, _elementType.WHITEBOARD];
|
|
@@ -233,6 +233,11 @@ const MENUS_CONFIG_MAP = exports.MENUS_CONFIG_MAP = {
|
|
|
233
233
|
iconClass: 'sdocfont sdoc-seatable-table',
|
|
234
234
|
type: _elementType.SEATABLE_TABLE,
|
|
235
235
|
text: 'SeaTable_table'
|
|
236
|
+
},
|
|
237
|
+
[_elementType.WHITEBOARD]: {
|
|
238
|
+
id: `sdoc_${_elementType.WHITEBOARD}`,
|
|
239
|
+
iconClass: 'sdocfont sdoc-document',
|
|
240
|
+
text: 'Whiteboard'
|
|
236
241
|
}
|
|
237
242
|
};
|
|
238
243
|
|
|
@@ -58,7 +58,7 @@ function Placeholder(props) {
|
|
|
58
58
|
} = props;
|
|
59
59
|
const {
|
|
60
60
|
t
|
|
61
|
-
} = (0, _reactI18next.useTranslation)();
|
|
61
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
62
62
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
63
63
|
contentEditable: "false",
|
|
64
64
|
suppressContentEditableWarning: true,
|
|
@@ -26,7 +26,7 @@ const MenuItem = _ref => {
|
|
|
26
26
|
} = _ref;
|
|
27
27
|
const {
|
|
28
28
|
t
|
|
29
|
-
} = (0, _reactI18next.useTranslation)();
|
|
29
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
30
30
|
const onClick = (0, _react.useCallback)(event => {
|
|
31
31
|
if (disabled) return;
|
|
32
32
|
onMouseDown(event, type);
|
|
@@ -25,7 +25,7 @@ const CalloutMenu = _ref => {
|
|
|
25
25
|
} = _ref;
|
|
26
26
|
const {
|
|
27
27
|
t
|
|
28
|
-
} = (0, _reactI18next.useTranslation)();
|
|
28
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
29
29
|
const handleDisplayAlert = (0, _react.useCallback)(type => {
|
|
30
30
|
setTimeout(() => {
|
|
31
31
|
_toast.default.warning(`${t('The_current_location_does_not_support_pasting')}${t(type && type.at(0).toUpperCase() + type.slice(1))}`);
|
|
@@ -24,7 +24,7 @@ function CalloutHoverMenu(_ref) {
|
|
|
24
24
|
const [isShowIcon, setIsShowIcon] = (0, _react.useState)(false);
|
|
25
25
|
const {
|
|
26
26
|
t
|
|
27
|
-
} = (0, _reactI18next.useTranslation)();
|
|
27
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
28
28
|
const onColorSelectorToggle = (0, _react.useCallback)(event => {
|
|
29
29
|
event.stopPropagation();
|
|
30
30
|
if (!isShowColorSelector) {
|
|
@@ -30,7 +30,7 @@ const renderCallout = (_ref, editor) => {
|
|
|
30
30
|
const isSelected = (0, _slateReact.useSelected)();
|
|
31
31
|
const {
|
|
32
32
|
t
|
|
33
|
-
} = (0, _reactI18next.useTranslation)();
|
|
33
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
34
34
|
const calloutRef = (0, _react.useRef)();
|
|
35
35
|
const [isShowColorSelector, setIsShowColorSelector] = (0, _react.useState)(false);
|
|
36
36
|
const [popoverPosition, setPopoverPosition] = (0, _react.useState)({
|
|
@@ -23,7 +23,7 @@ const LangList = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
23
23
|
} = _ref;
|
|
24
24
|
const {
|
|
25
25
|
t
|
|
26
|
-
} = (0, _reactI18next.useTranslation)();
|
|
26
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
27
27
|
if (!langsData.length) {
|
|
28
28
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
29
29
|
className: "langs-list-empty"
|
|
@@ -18,7 +18,7 @@ const FontItem = _ref => {
|
|
|
18
18
|
} = _ref;
|
|
19
19
|
const {
|
|
20
20
|
t
|
|
21
|
-
} = (0, _reactI18next.useTranslation)();
|
|
21
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
22
22
|
const fontName = fontObject.name;
|
|
23
23
|
const isSelected = selectedFont === fontName;
|
|
24
24
|
const isFontLoad = (0, _helpers.hasFontLoaded)(fontObject, 400);
|
|
@@ -30,7 +30,7 @@ const FontFamily = _ref => {
|
|
|
30
30
|
const [fontList, setFontList] = (0, _react.useState)(_constants.FONT);
|
|
31
31
|
const {
|
|
32
32
|
t
|
|
33
|
-
} = (0, _reactI18next.useTranslation)();
|
|
33
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
34
34
|
const popoverRef = (0, _react.useRef)(null);
|
|
35
35
|
const disabled = (0, _helpers.isMenuDisabled)(editor, readonly);
|
|
36
36
|
const fontSizeButtonId = 'sdoc-button-font';
|
|
@@ -24,7 +24,7 @@ const FontSize = _ref => {
|
|
|
24
24
|
const [isShowMenu, setMenuShow] = (0, _react.useState)(false);
|
|
25
25
|
const {
|
|
26
26
|
t
|
|
27
|
-
} = (0, _reactI18next.useTranslation)();
|
|
27
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
28
28
|
const popoverRef = (0, _react.useRef)(null);
|
|
29
29
|
const disabled = (0, _helpers.isMenuDisabled)(editor, readonly);
|
|
30
30
|
const fontSizeButtonId = 'sdoc-button-font-size';
|
|
@@ -26,7 +26,7 @@ const ImageMenu = _ref => {
|
|
|
26
26
|
const menuConfig = _constants.MENUS_CONFIG_MAP[_constants.IMAGE];
|
|
27
27
|
const {
|
|
28
28
|
t
|
|
29
|
-
} = (0, _reactI18next.useTranslation)();
|
|
29
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
30
30
|
const openInsertLocalImage = (0, _react.useCallback)(() => {
|
|
31
31
|
eventBus.dispatch(_constants2.INTERNAL_EVENT.INSERT_ELEMENT, {
|
|
32
32
|
type: _constants.LOCAL_IMAGE,
|
|
@@ -23,7 +23,7 @@ const AddLinkDialog = _ref => {
|
|
|
23
23
|
} = _ref;
|
|
24
24
|
const {
|
|
25
25
|
t
|
|
26
|
-
} = (0, _reactI18next.useTranslation)();
|
|
26
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
27
27
|
const [linkErrorMessage, setLinkErrorMessage] = (0, _react.useState)('');
|
|
28
28
|
const [titleErrorMessage, setTitleErrorMessage] = (0, _react.useState)('');
|
|
29
29
|
const {
|
|
@@ -22,7 +22,7 @@ const LinkHover = _ref => {
|
|
|
22
22
|
const readOnly = (0, _slateReact.useReadOnly)();
|
|
23
23
|
const {
|
|
24
24
|
t
|
|
25
|
-
} = (0, _reactI18next.useTranslation)();
|
|
25
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
26
26
|
const onMouseDown = (0, _react.useCallback)(event => {
|
|
27
27
|
event.stopPropagation();
|
|
28
28
|
if (!(0, _helpers.isWeChat)()) {
|
|
@@ -43,7 +43,7 @@ const SearchReplacePopover = _ref => {
|
|
|
43
43
|
const searchInputRef = (0, _react.useRef)(null);
|
|
44
44
|
const {
|
|
45
45
|
t
|
|
46
|
-
} = (0, _reactI18next.useTranslation)();
|
|
46
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
47
47
|
const searchInputSuffixContent = (0, _react.useMemo)(() => {
|
|
48
48
|
if (!!searchContent.length && !highlightInfos.length) return t('Search_not_found');
|
|
49
49
|
if (highlightInfos.length) return `${currentSelectIndex + 1} / ${highlightInfos.length}`;
|
package/dist/basic-sdk/extension/plugins/search-replace/popover/replace-all-confirm-modal.js
CHANGED
|
@@ -19,7 +19,7 @@ const ReplaceAllConfirmModal = _ref => {
|
|
|
19
19
|
} = _ref;
|
|
20
20
|
const {
|
|
21
21
|
t
|
|
22
|
-
} = (0, _reactI18next.useTranslation)();
|
|
22
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
23
23
|
const modalContent = replacedWord === '' ? t('Are_you_sure_to_clear_all_number_xxx_in_this_document', {
|
|
24
24
|
number,
|
|
25
25
|
originalWord
|
|
@@ -26,7 +26,7 @@ const TablesList = _ref => {
|
|
|
26
26
|
} = _ref;
|
|
27
27
|
const {
|
|
28
28
|
t
|
|
29
|
-
} = (0, _reactI18next.useTranslation)();
|
|
29
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
30
30
|
if (!tablesData.length) {
|
|
31
31
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
32
32
|
className: "tables-list-empty"
|
|
@@ -58,7 +58,7 @@ const TablesSettings = _ref2 => {
|
|
|
58
58
|
} = _ref2;
|
|
59
59
|
const {
|
|
60
60
|
t
|
|
61
|
-
} = (0, _reactI18next.useTranslation)();
|
|
61
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
62
62
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
63
63
|
className: "seatable-setting-container"
|
|
64
64
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -94,7 +94,7 @@ function OpMenu(_ref3) {
|
|
|
94
94
|
} = _ref3;
|
|
95
95
|
const {
|
|
96
96
|
t
|
|
97
|
-
} = (0, _reactI18next.useTranslation)();
|
|
97
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
98
98
|
const scrollRef = (0, _useScrollContext.useScrollContext)();
|
|
99
99
|
const timer = (0, _react.useRef)(null);
|
|
100
100
|
const tablesData = editor.tables;
|
|
@@ -45,7 +45,7 @@ function SeaTableTable(_ref) {
|
|
|
45
45
|
const tableInfoRef = (0, _react.useRef)(null);
|
|
46
46
|
const {
|
|
47
47
|
t
|
|
48
|
-
} = (0, _reactI18next.useTranslation)();
|
|
48
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
49
49
|
|
|
50
50
|
// menu control
|
|
51
51
|
const seaTableRef = (0, _react.useRef)(null);
|
|
@@ -22,7 +22,7 @@ function DepartmentMultipleSelectFilter(props) {
|
|
|
22
22
|
const selectorRef = (0, _react.useRef)(null);
|
|
23
23
|
const {
|
|
24
24
|
t
|
|
25
|
-
} = (0, _reactI18next.useTranslation)();
|
|
25
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
26
26
|
(0, _useClickOutside.default)({
|
|
27
27
|
currDOM: selectorRef.current,
|
|
28
28
|
onClickOutside: () => setIsShowSelector(false)
|
|
@@ -29,7 +29,7 @@ function DepartmentMultipleSelect(props) {
|
|
|
29
29
|
const validDepartmentsRef = (0, _react.useRef)([]);
|
|
30
30
|
const {
|
|
31
31
|
t
|
|
32
|
-
} = (0, _reactI18next.useTranslation)();
|
|
32
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
33
33
|
(0, _react.useEffect)(() => {
|
|
34
34
|
if (departmentContainerRef.current) {
|
|
35
35
|
resetContainerPosition();
|
|
@@ -23,7 +23,7 @@ function DepartmentSingleSelectFilter(props) {
|
|
|
23
23
|
const selectorRef = (0, _react.useRef)(null);
|
|
24
24
|
const {
|
|
25
25
|
t
|
|
26
|
-
} = (0, _reactI18next.useTranslation)();
|
|
26
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
27
27
|
let selectedDepartmentIds = [];
|
|
28
28
|
selectedDepartmentIds.push(value);
|
|
29
29
|
(0, _useClickOutside.default)({
|
|
@@ -20,7 +20,7 @@ function SelectedDepartments(props) {
|
|
|
20
20
|
} = props;
|
|
21
21
|
const {
|
|
22
22
|
t
|
|
23
|
-
} = (0, _reactI18next.useTranslation)();
|
|
23
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
24
24
|
const idDepartmentMap = (0, _react.useMemo)(() => {
|
|
25
25
|
let idDepartmentMap = {};
|
|
26
26
|
departments.forEach(department => {
|
|
@@ -25,7 +25,7 @@ function TableSettings(_ref) {
|
|
|
25
25
|
const [columns, setColumns] = (0, _react.useState)([]);
|
|
26
26
|
const {
|
|
27
27
|
t
|
|
28
|
-
} = (0, _reactI18next.useTranslation)();
|
|
28
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
29
29
|
const timer = (0, _react.useRef)(null);
|
|
30
30
|
(0, _react.useEffect)(() => {
|
|
31
31
|
const {
|
|
@@ -21,7 +21,7 @@ const CustomTableSizeDialog = _ref => {
|
|
|
21
21
|
} = _ref;
|
|
22
22
|
const {
|
|
23
23
|
t
|
|
24
|
-
} = (0, _reactI18next.useTranslation)();
|
|
24
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
25
25
|
const [errorMessage, setErrorMessage] = (0, _react.useState)('');
|
|
26
26
|
const [rows, setRows] = (0, _react.useState)('1');
|
|
27
27
|
const [cols, setCols] = (0, _react.useState)('1');
|
|
@@ -28,7 +28,7 @@ const ColorSelectorPopover = _ref => {
|
|
|
28
28
|
} = _ref;
|
|
29
29
|
const {
|
|
30
30
|
t
|
|
31
|
-
} = (0, _reactI18next.useTranslation)();
|
|
31
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
32
32
|
const {
|
|
33
33
|
lastUsedTableCellBackgroundColor: lastUsedColor,
|
|
34
34
|
updateLastUsedTableCellBackgroundColor: updateLastUsedColor
|
|
@@ -23,7 +23,7 @@ const HorizontalAlignPopover = _ref => {
|
|
|
23
23
|
} = _ref;
|
|
24
24
|
const {
|
|
25
25
|
t
|
|
26
|
-
} = (0, _reactI18next.useTranslation)();
|
|
26
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
27
27
|
const setTextAlignStyle = (0, _react.useCallback)(textAlign => {
|
|
28
28
|
if (readonly) return;
|
|
29
29
|
(0, _helpers.setCellStyle)(editor, {
|