@seafile/sdoc-editor 1.0.196 → 1.0.198

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.
Files changed (64) hide show
  1. package/dist/basic-sdk/comment/components/comment-all-participants/index.js +1 -1
  2. package/dist/basic-sdk/comment/components/comment-delete-popover.js +1 -1
  3. package/dist/basic-sdk/comment/components/comment-editor.js +1 -1
  4. package/dist/basic-sdk/comment/components/comment-participants-editor/index.js +1 -1
  5. package/dist/basic-sdk/comment/components/comment-participants-editor/searched-collaborators.js +1 -1
  6. package/dist/basic-sdk/comment/components/comment-participants-editor/selected-participants.js +1 -1
  7. package/dist/basic-sdk/comment/components/global-comment/global-comment-body-header.js +2 -2
  8. package/dist/basic-sdk/comment/components/global-comment/global-comment-header.js +1 -1
  9. package/dist/basic-sdk/comment/hooks/notification-hooks/use-notification-mount.js +1 -1
  10. package/dist/basic-sdk/comment/provider/participants-content-provider.js +1 -1
  11. package/dist/basic-sdk/extension/commons/dropdown-menu-item/index.js +1 -1
  12. package/dist/basic-sdk/extension/commons/file-insert-dialog/index.js +1 -1
  13. package/dist/basic-sdk/extension/commons/insert-element-dialog/index.js +1 -1
  14. package/dist/basic-sdk/extension/commons/menu/menu-item.js +1 -1
  15. package/dist/basic-sdk/extension/commons/select-file-dialog/index.js +1 -1
  16. package/dist/basic-sdk/extension/commons/wiki-file-insert-dialog/index.js +1 -1
  17. package/dist/basic-sdk/extension/core/utils/index.js +1 -1
  18. package/dist/basic-sdk/extension/plugins/ai/ai-menu/menu-item.js +1 -1
  19. package/dist/basic-sdk/extension/plugins/callout/menu/index.js +1 -1
  20. package/dist/basic-sdk/extension/plugins/callout/render-elem/callout-hover-menu/index.js +1 -1
  21. package/dist/basic-sdk/extension/plugins/callout/render-elem/index.js +1 -1
  22. package/dist/basic-sdk/extension/plugins/code-block/hover-menu/index.js +1 -1
  23. package/dist/basic-sdk/extension/plugins/font/menu/font-family/font-item.js +1 -1
  24. package/dist/basic-sdk/extension/plugins/font/menu/font-family/index.js +1 -1
  25. package/dist/basic-sdk/extension/plugins/font/menu/font-size/index.js +1 -1
  26. package/dist/basic-sdk/extension/plugins/image/menu/index.js +1 -1
  27. package/dist/basic-sdk/extension/plugins/link/dialog/add-link-dialog/index.js +1 -1
  28. package/dist/basic-sdk/extension/plugins/link/hover/index.js +1 -1
  29. package/dist/basic-sdk/extension/plugins/search-replace/popover/index.js +1 -1
  30. package/dist/basic-sdk/extension/plugins/search-replace/popover/replace-all-confirm-modal.js +1 -1
  31. package/dist/basic-sdk/extension/plugins/seatable-tables/op-menu/index.js +3 -3
  32. package/dist/basic-sdk/extension/plugins/seatable-tables/render-element/seatable-table.js +1 -1
  33. package/dist/basic-sdk/extension/plugins/seatable-tables/seatable-settings/filter-setter/filter-popover-widgets/department-filter/department-multiple-select-filter.js +1 -1
  34. package/dist/basic-sdk/extension/plugins/seatable-tables/seatable-settings/filter-setter/filter-popover-widgets/department-filter/department-multiple-select.js +1 -1
  35. package/dist/basic-sdk/extension/plugins/seatable-tables/seatable-settings/filter-setter/filter-popover-widgets/department-filter/department-single-select-filter.js +1 -1
  36. package/dist/basic-sdk/extension/plugins/seatable-tables/seatable-settings/filter-setter/filter-popover-widgets/department-filter/selected-departments.js +1 -1
  37. package/dist/basic-sdk/extension/plugins/seatable-tables/seatable-settings/index.js +1 -1
  38. package/dist/basic-sdk/extension/plugins/table/dialogs/custom-table-size-dialog/index.js +1 -1
  39. package/dist/basic-sdk/extension/plugins/table/dialogs/split-cell-setting-dialog.js +1 -1
  40. package/dist/basic-sdk/extension/plugins/table/menu/color-selector-popover/index.js +1 -1
  41. package/dist/basic-sdk/extension/plugins/table/menu/horizontal-align-popover/index.js +1 -1
  42. package/dist/basic-sdk/extension/plugins/table/menu/vertical-align-popover/index.js +1 -1
  43. package/dist/basic-sdk/extension/plugins/table/popover/table-size-popover/index.js +1 -1
  44. package/dist/basic-sdk/extension/plugins/table/render/table-header/index.js +1 -1
  45. package/dist/basic-sdk/extension/plugins/text-align/menu/index.js +1 -1
  46. package/dist/basic-sdk/extension/plugins/video/menu/index.js +1 -1
  47. package/dist/basic-sdk/extension/render/element-decorate/rebase-decorate/rebase-delete-modify-decorate.js +1 -1
  48. package/dist/basic-sdk/extension/render/element-decorate/rebase-decorate/rebase-modify-delete-decorate.js +1 -1
  49. package/dist/basic-sdk/extension/render/element-decorate/rebase-decorate/rebase-modify-modify-decorate.js +1 -1
  50. package/dist/basic-sdk/extension/toolbar/header-toolbar/insert-toolbar/index.js +1 -1
  51. package/dist/basic-sdk/extension/toolbar/insert-element-toolbar/index.js +1 -1
  52. package/dist/basic-sdk/extension/toolbar/side-toolbar/insert-block-menu.js +4 -3
  53. package/dist/basic-sdk/extension/toolbar/side-toolbar/side-menu.css +5 -0
  54. package/dist/basic-sdk/extension/toolbar/side-toolbar/side-menu.js +4 -2
  55. package/dist/basic-sdk/wiki-outline/index.js +1 -1
  56. package/dist/components/doc-operations/revision-operations/changes-count/index.js +1 -1
  57. package/dist/components/doc-operations/revision-operations/index.js +1 -1
  58. package/dist/components/doc-operations/revision-operations/publish-revision/index.js +1 -1
  59. package/dist/components/doc-operations/revision-operations/revisions/index.js +1 -1
  60. package/dist/components/doc-operations/revision-operations/revisions/revisions-dialog/index.js +1 -1
  61. package/dist/components/doc-operations/revision-operations/view-changes/index.js +1 -1
  62. package/dist/components/tip-dialog/index.js +1 -1
  63. package/dist/pages/published-revision-viewer.js +1 -1
  64. 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, () => ({
@@ -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) {
@@ -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;
@@ -23,7 +23,7 @@ const DropdownMenuItem = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
23
23
  } = props;
24
24
  const {
25
25
  t
26
- } = (0, _reactI18next.useTranslation)();
26
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
27
27
  const {
28
28
  iconClass
29
29
  } = menuConfig;
@@ -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'));
@@ -37,7 +37,7 @@ const InsertElementDialog = _ref => {
37
37
  const [handleSubmit, setHandleSubmit] = (0, _react.useState)(() => void 0);
38
38
  const {
39
39
  t
40
- } = (0, _reactI18next.useTranslation)();
40
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
41
41
  const uploadLocalImageInputRef = (0, _react.useRef)();
42
42
  const uploadLocalVideoInputRef = (0, _react.useRef)();
43
43
  const onFileChanged = (0, _react.useCallback)(event => {
@@ -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);
@@ -26,7 +26,7 @@ const SelectSdocFileDialog = _ref => {
26
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)('');
@@ -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'));
@@ -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}`;
@@ -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');
@@ -16,7 +16,7 @@ const SplitCellSettingDialog = _ref => {
16
16
  } = _ref;
17
17
  const {
18
18
  t
19
- } = (0, _reactI18next.useTranslation)();
19
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
20
20
  const {
21
21
  cell
22
22
  } = (0, _helpers.getSelectedInfo)(editor);
@@ -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, {
@@ -24,7 +24,7 @@ const VerticalAlignPopover = _ref => {
24
24
  } = _ref;
25
25
  const {
26
26
  t
27
- } = (0, _reactI18next.useTranslation)();
27
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
28
28
  const setVerticalAlignStyle = (0, _react.useCallback)(position => {
29
29
  if (readonly) return;
30
30
  const alignItems = (0, _KebabToCamel.default)(_constants.TABLE_CELL_STYLE.ALIGN_ITEMS);
@@ -253,7 +253,7 @@ const MenuItem = _ref2 => {
253
253
  } = _ref2;
254
254
  const {
255
255
  t
256
- } = (0, _reactI18next.useTranslation)();
256
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
257
257
  return /*#__PURE__*/_react.default.createElement("div", {
258
258
  id: id,
259
259
  className: (0, _classnames.default)('sdoc-selected-table-size-custom', {
@@ -25,7 +25,7 @@ const TableHeader = _ref => {
25
25
  } = _ref;
26
26
  const {
27
27
  t
28
- } = (0, _reactI18next.useTranslation)();
28
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
29
29
  const columns = (0, _hooks.useResizeHandlersContext)();
30
30
  const selectedRange = (0, _hooks.useTableSelectedRangeContext)() || _constants.EMPTY_SELECTED_RANGE;
31
31
  const selectColumn = (0, _react.useCallback)(columnIndex => {
@@ -27,7 +27,7 @@ const TextAlignMenu = _ref => {
27
27
  const buttonId = 'sdoc-button-text-align';
28
28
  const {
29
29
  t
30
- } = (0, _reactI18next.useTranslation)();
30
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
31
31
  const toggle = (0, _react.useCallback)(event => {
32
32
  popoverRef.current.toggle();
33
33
  setMenuShow(!isShowMenu);
@@ -23,7 +23,7 @@ const VideoMenu = _ref => {
23
23
  const menuConfig = _constants.MENUS_CONFIG_MAP[_constants.VIDEO];
24
24
  const {
25
25
  t
26
- } = (0, _reactI18next.useTranslation)();
26
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
27
27
  const openLocalVideoDialog = (0, _react.useCallback)(() => {
28
28
  eventBus.dispatch(_constants2.INTERNAL_EVENT.INSERT_ELEMENT, {
29
29
  type: _constants.LOCAL_VIDEO,
@@ -19,7 +19,7 @@ const RebaseDeleteModifyDecorate = _ref => {
19
19
  } = _ref;
20
20
  const {
21
21
  t
22
- } = (0, _reactI18next.useTranslation)();
22
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
23
23
  const editor = (0, _slateReact.useSlateStatic)();
24
24
  const deleteElement = (0, _react.useCallback)(() => {
25
25
  const path = (0, _core.findPath)(editor, element);
@@ -19,7 +19,7 @@ const RebaseModifyDeleteDecorate = _ref => {
19
19
  } = _ref;
20
20
  const {
21
21
  t
22
- } = (0, _reactI18next.useTranslation)();
22
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
23
23
  const editor = (0, _slateReact.useSlateStatic)();
24
24
  const deleteElement = (0, _react.useCallback)(() => {
25
25
  const path = (0, _core.findPath)(editor, element);
@@ -21,7 +21,7 @@ const RebaseModifyModifyDecorate = _ref => {
21
21
  } = _ref;
22
22
  const {
23
23
  t
24
- } = (0, _reactI18next.useTranslation)();
24
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
25
25
  const editor = (0, _slateReact.useSlateStatic)();
26
26
  const useMasterChanges = (0, _react.useCallback)(() => {
27
27
  const path = (0, _core.findPath)(editor, element);
@@ -32,7 +32,7 @@ const InsertToolbar = _ref => {
32
32
  const [isShowMenu, setMenuShow] = (0, _react.useState)(false);
33
33
  const {
34
34
  t
35
- } = (0, _reactI18next.useTranslation)();
35
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
36
36
  const popoverRef = (0, _react.useRef)(null);
37
37
  const disabled = readonly;
38
38
  const insertButtonRef = (0, _react.useRef)(null);
@@ -168,7 +168,7 @@ const QuickInsertBlockMenu = _ref => {
168
168
  // eslint-disable-next-line react/jsx-indent
169
169
  _react.default.createElement(_dropdownMenuItem.default, {
170
170
  isHidden: !quickInsertMenuSearchMap[_constants.TABLE],
171
- key: "sdoc-insert-menu-tabe",
171
+ key: "sdoc-insert-menu-table",
172
172
  menuConfig: {
173
173
  ..._constants.SIDE_INSERT_MENUS_CONFIG[_constants.ELEMENT_TYPE.TABLE]
174
174
  },
@@ -34,7 +34,7 @@ const InsertBlockMenu = _ref => {
34
34
  const editor = (0, _slateReact.useSlateStatic)();
35
35
  const {
36
36
  t
37
- } = (0, _reactI18next.useTranslation)();
37
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
38
38
  const onInsertImageToggle = (0, _react.useCallback)(() => {
39
39
  const eventBus = _eventBus.default.getInstance();
40
40
  if (insertPosition === _constants.INSERT_POSITION.CURRENT) {
@@ -150,6 +150,7 @@ const InsertBlockMenu = _ref => {
150
150
  onClick: onInsertVideoToggle
151
151
  }), /*#__PURE__*/_react.default.createElement(_dropdownMenuItem.default, {
152
152
  isHidden: !insertMenuSearchMap[_constants.ELEMENT_TYPE.TABLE],
153
+ key: "sdoc-insert-menu-table",
153
154
  menuConfig: {
154
155
  ..._constants.SIDE_INSERT_MENUS_CONFIG[_constants.ELEMENT_TYPE.TABLE]
155
156
  },
@@ -160,8 +161,8 @@ const InsertBlockMenu = _ref => {
160
161
  editor: editor,
161
162
  target: "sdoc-side-menu-item-table",
162
163
  trigger: "hover",
163
- placement: "right-start",
164
- popperClassName: "sdoc-side-menu-table-size",
164
+ placement: "left-start",
165
+ popperClassName: "sdoc-side-menu-table-size sdoc-insert-element-table-size-wrapper",
165
166
  createTable: createTable
166
167
  })), /*#__PURE__*/_react.default.createElement(_dropdownMenuItem.default, {
167
168
  isHidden: !insertMenuSearchMap[_constants.ELEMENT_TYPE.LINK],
@@ -23,6 +23,11 @@
23
23
  font-size: 14px;
24
24
  }
25
25
 
26
+ .sdoc-side-menu .sdoc-side-menu-insert-wrapper {
27
+ max-height: 278px;
28
+ overflow-y: auto;
29
+ }
30
+
26
31
  .sdoc-side-menu-insert-below-popover .popover {
27
32
  background-color: #fff;
28
33
  min-width: 150px;
@@ -150,11 +150,13 @@ const SideMenu = (_ref, ref) => {
150
150
  onChange: onChange,
151
151
  onCompositionStart: onCompositionStart,
152
152
  onCompositionEnd: onCompositionEnd
153
- })), isNodeEmpty && /*#__PURE__*/_react.default.createElement(_insertBlockMenu.default, {
153
+ })), isNodeEmpty && /*#__PURE__*/_react.default.createElement("div", {
154
+ className: "sdoc-side-menu-insert-wrapper"
155
+ }, /*#__PURE__*/_react.default.createElement(_insertBlockMenu.default, {
154
156
  isNodeEmpty: isNodeEmpty,
155
157
  slateNode: slateNode,
156
158
  insertMenuSearchMap: insertMenuSearchMap
157
- }), !isNodeEmpty && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, transformMenuSearchMap['searching'] && isDisplayCategoryTitle(transformMenuSearchMap, insertBelowMenuSearchMap) && /*#__PURE__*/_react.default.createElement(_dropdownMenuItem.default, {
159
+ })), !isNodeEmpty && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, transformMenuSearchMap['searching'] && isDisplayCategoryTitle(transformMenuSearchMap, insertBelowMenuSearchMap) && /*#__PURE__*/_react.default.createElement(_dropdownMenuItem.default, {
158
160
  menuConfig: {
159
161
  text: 'Transform_to'
160
162
  },
@@ -26,7 +26,7 @@ const Outline = _ref => {
26
26
  } = _ref;
27
27
  const {
28
28
  t
29
- } = (0, _reactI18next.useTranslation)();
29
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
30
30
  const scrollRef = (0, _useScrollContext.useScrollContext)();
31
31
  const [headerList, setHeaderList] = (0, _react.useState)([]);
32
32
  const [activeId, setActiveId] = (0, _react.useState)('');
@@ -17,7 +17,7 @@ const ChangesCount = _ref => {
17
17
  } = _ref;
18
18
  const {
19
19
  t
20
- } = (0, _reactI18next.useTranslation)();
20
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
21
21
  const [currentDiffIndex, setDiffIndex] = (0, _react.useState)(0);
22
22
  const [changes, setChanges] = (0, _react.useState)([]);
23
23
  const intervalRef = (0, _react.useRef)();
@@ -32,7 +32,7 @@ const RevisionOperations = _ref => {
32
32
  const isSdocRevision = _context.default.getSetting('isSdocRevision');
33
33
  const {
34
34
  t
35
- } = (0, _reactI18next.useTranslation)();
35
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
36
36
  const [isShowTip, setShowTip] = (0, _react.useState)(false);
37
37
  const [tipType, setTipType] = (0, _react.useState)('');
38
38
  const [mergeValue, setMergeValue] = (0, _react.useState)(null);
@@ -14,7 +14,7 @@ const PublishRevision = _ref => {
14
14
  } = _ref;
15
15
  const {
16
16
  t
17
- } = (0, _reactI18next.useTranslation)();
17
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
18
18
  const onPublishRevision = (0, _react.useCallback)(event => {
19
19
  event.stopPropagation();
20
20
  event.nativeEvent.stopImmediatePropagation();
@@ -19,7 +19,7 @@ const Revisions = () => {
19
19
  const eventBus = _basicSdk.EventBus.getInstance();
20
20
  const {
21
21
  t
22
- } = (0, _reactI18next.useTranslation)();
22
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
23
23
  const [revisionsCount, setRevisionsCount] = (0, _react.useState)(0);
24
24
  const [isShowRevisions, setShowRevisions] = (0, _react.useState)(false);
25
25
  const autoIncrementRevisionsCount = (0, _react.useCallback)(() => {
@@ -29,7 +29,7 @@ const RevisionsDialog = _ref => {
29
29
  const revisionListRef = (0, _react.useRef)(null);
30
30
  const {
31
31
  t
32
- } = (0, _reactI18next.useTranslation)();
32
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
33
33
  const [isLoading, setLoading] = (0, _react.useState)(true);
34
34
  const [revisions, setRevisions] = (0, _react.useState)([]);
35
35
  const [page, setPage] = (0, _react.useState)(1);
@@ -19,7 +19,7 @@ const ViewChanges = _ref => {
19
19
  } = _ref;
20
20
  const {
21
21
  t
22
- } = (0, _reactI18next.useTranslation)();
22
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
23
23
  (0, _react.useEffect)(() => {
24
24
  const url = new URL(window.location.href);
25
25
  const searchParams = new URLSearchParams(url.search);
@@ -26,7 +26,7 @@ const TipDialog = _ref => {
26
26
  } = _ref;
27
27
  const {
28
28
  t
29
- } = (0, _reactI18next.useTranslation)();
29
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
30
30
  const [isSubmitting, setSubmitting] = (0, _react.useState)();
31
31
  const closeDialog = (0, _react.useCallback)(() => {
32
32
  if (NOT_CLOSE_DIALOG_TIP_TYPE.includes(tipType)) return;
@@ -22,7 +22,7 @@ const PublishedRevisionViewer = () => {
22
22
  _context.default.initApi();
23
23
  const {
24
24
  t
25
- } = (0, _reactI18next.useTranslation)();
25
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
26
26
  const [isFirstLoading, setIsFirstLoading] = (0, _react.useState)(true);
27
27
  const [errorMessage, setErrorMessage] = (0, _react.useState)('');
28
28
  const [isShowChanges, setShowChanges] = (0, _react.useState)(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "1.0.196",
3
+ "version": "1.0.198",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",