@seafile/sdoc-editor 1.0.147 → 1.0.149
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/basic-sdk/extension/constants/index.js +2 -2
- package/dist/basic-sdk/extension/plugins/seatable-column/menu/index.js +2 -2
- package/dist/basic-sdk/extension/plugins/seatable-tables/menu/index.js +2 -2
- package/dist/basic-sdk/extension/plugins/seatable-tables/seatable-settings/filter-setter/filter-popover-widgets/filters-list.css +4 -0
- package/dist/basic-sdk/extension/plugins/seatable-tables/seatable-settings/filter-setter/filter-popover-widgets/filters-list.js +1 -1
- package/dist/basic-sdk/extension/toolbar/side-toolbar/helpers.js +3 -2
- package/dist/basic-sdk/socket/socket-manager.js +1 -1
- package/dist/components/tip-message/index.js +11 -0
- package/package.json +1 -1
- package/public/locales/cs/sdoc-editor.json +2 -1
- package/public/locales/de/sdoc-editor.json +2 -1
- package/public/locales/en/sdoc-editor.json +2 -1
- package/public/locales/es/sdoc-editor.json +2 -1
- package/public/locales/es_AR/sdoc-editor.json +2 -1
- package/public/locales/es_MX/sdoc-editor.json +2 -1
- package/public/locales/fr/sdoc-editor.json +2 -1
- package/public/locales/it/sdoc-editor.json +2 -1
- package/public/locales/ru/sdoc-editor.json +3 -2
- package/public/locales/zh_CN/sdoc-editor.json +2 -1
|
@@ -522,7 +522,7 @@ const FILE_TYPE = exports.FILE_TYPE = {
|
|
|
522
522
|
[_elementType.FILE_LINK]: 'file',
|
|
523
523
|
[_elementType.SDOC_LINK]: 'sdoc'
|
|
524
524
|
};
|
|
525
|
-
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.
|
|
525
|
+
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];
|
|
526
526
|
const MOUSE_ENTER_EVENT_DISABLED_MAP = exports.MOUSE_ENTER_EVENT_DISABLED_MAP = {
|
|
527
527
|
[_elementType.PARAGRAPH]: [_elementType.CALL_OUT],
|
|
528
528
|
[_elementType.TITLE]: [_elementType.CALL_OUT],
|
|
@@ -540,4 +540,4 @@ const MOUSE_ENTER_EVENT_DISABLED_MAP = exports.MOUSE_ENTER_EVENT_DISABLED_MAP =
|
|
|
540
540
|
[_elementType.HEADER6]: [_elementType.CALL_OUT],
|
|
541
541
|
[_elementType.CALL_OUT]: [_elementType.CALL_OUT]
|
|
542
542
|
};
|
|
543
|
-
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];
|
|
543
|
+
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];
|
|
@@ -19,10 +19,10 @@ const SeaTableColumnMenu = _ref => {
|
|
|
19
19
|
readonly,
|
|
20
20
|
insertPosition,
|
|
21
21
|
toggle,
|
|
22
|
-
isHidden
|
|
22
|
+
isHidden = true
|
|
23
23
|
} = _ref;
|
|
24
24
|
const dropDownMenuRef = (0, _react.useRef)(null);
|
|
25
|
-
const disabled = (0, _helpers.isMenuDisabled)(editor, readonly);
|
|
25
|
+
const disabled = isHidden && (0, _helpers.isMenuDisabled)(editor, readonly);
|
|
26
26
|
const menuConfig = _constants.MENUS_CONFIG_MAP[_constants.ELEMENT_TYPE.SEATABLE_COLUMN];
|
|
27
27
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_dropdownMenuItem.default, {
|
|
28
28
|
disabled: disabled,
|
|
@@ -20,10 +20,10 @@ const SeaTableTableMenu = _ref => {
|
|
|
20
20
|
readonly,
|
|
21
21
|
insertPosition,
|
|
22
22
|
toggle,
|
|
23
|
-
isHidden
|
|
23
|
+
isHidden = true
|
|
24
24
|
} = _ref;
|
|
25
25
|
const dropDownMenuRef = (0, _react.useRef)(null);
|
|
26
|
-
const disabled = (0, _helpers.isInsertSeaTableTableDisabled)(editor, readonly);
|
|
26
|
+
const disabled = isHidden && (0, _helpers.isInsertSeaTableTableDisabled)(editor, readonly);
|
|
27
27
|
const menuConfig = _constants.MENUS_CONFIG_MAP[_constants.SEATABLE_TABLE];
|
|
28
28
|
const onViewClick = (0, _react.useCallback)(item => {
|
|
29
29
|
(0, _helpers.insertSeaTableTable)(editor, item, insertPosition);
|
|
@@ -108,7 +108,7 @@ class FiltersList extends _react.Component {
|
|
|
108
108
|
} = this.props;
|
|
109
109
|
const isEmpty = filters.length === 0;
|
|
110
110
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
111
|
-
className: (0, _classnames.default)('filters-list', {
|
|
111
|
+
className: (0, _classnames.default)('filters-list', 'sdoc-filters-list', {
|
|
112
112
|
'empty-filters-container': isEmpty
|
|
113
113
|
}, {
|
|
114
114
|
[className]: className
|
|
@@ -131,11 +131,12 @@ const isVoidNode = node => {
|
|
|
131
131
|
const isTable = node.type === _constants.TABLE;
|
|
132
132
|
const isCodeBlock = node.type === _constants.CODE_BLOCK;
|
|
133
133
|
const isCallout = node.type === _constants.CALL_OUT;
|
|
134
|
-
|
|
134
|
+
const isSeaTableTable = node.type === _constants.SEATABLE_TABLE;
|
|
135
|
+
return _slate.Node.string(node) === '' && !hasImage && !isVideo && !isTable && !isCodeBlock && !isCallout && !isSeaTableTable;
|
|
135
136
|
};
|
|
136
137
|
exports.isVoidNode = isVoidNode;
|
|
137
138
|
const isNotSupportTransform = node => {
|
|
138
|
-
if (node.type && [_constants.CODE_BLOCK, _constants.TABLE, _constants.CALL_OUT].includes(node.type)) {
|
|
139
|
+
if (node.type && [_constants.CODE_BLOCK, _constants.TABLE, _constants.CALL_OUT, _constants.VIDEO, _constants.SEATABLE_TABLE].includes(node.type)) {
|
|
139
140
|
return true;
|
|
140
141
|
}
|
|
141
142
|
return false;
|
|
@@ -109,7 +109,7 @@ class SocketManager {
|
|
|
109
109
|
const {
|
|
110
110
|
error_type
|
|
111
111
|
} = result;
|
|
112
|
-
if (error_type === 'load_document_content_error' || error_type === 'save_operations_to_database_error') {
|
|
112
|
+
if (error_type === 'load_document_content_error' || error_type === 'save_operations_to_database_error' || error_type === 'token_expired') {
|
|
113
113
|
// load_document_content_error: After a short-term reconnection, the content of the document fails to load
|
|
114
114
|
// save_operation_to_database_error: Save operation to database error
|
|
115
115
|
this.dispatchConnectState(error_type);
|
|
@@ -44,6 +44,16 @@ class TipMessage extends _react.default.Component {
|
|
|
44
44
|
duration: null
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
|
+
(0, _defineProperty2.default)(this, "onTokenExpiredError", msg => {
|
|
48
|
+
const {
|
|
49
|
+
t
|
|
50
|
+
} = this.props;
|
|
51
|
+
const message = t('Token_expired_Please_refresh_the_page');
|
|
52
|
+
_toast.default.closeAll();
|
|
53
|
+
_toast.default.danger(message, {
|
|
54
|
+
duration: null
|
|
55
|
+
});
|
|
56
|
+
});
|
|
47
57
|
(0, _defineProperty2.default)(this, "onPendingOpExceedLimit", () => {
|
|
48
58
|
const {
|
|
49
59
|
t
|
|
@@ -163,6 +173,7 @@ class TipMessage extends _react.default.Component {
|
|
|
163
173
|
this.unsubscribeSyncServerOpError = eventBus.subscribe('sync_server_operations_error', this.onSyncServerOperationError);
|
|
164
174
|
this.unsubscribeDocumentLoadError = eventBus.subscribe('load_document_content_error', this.onInternalServerExecError);
|
|
165
175
|
this.unsubscribeOperationsSaveError = eventBus.subscribe('save_operations_to_database_error', this.onInternalServerExecError);
|
|
176
|
+
this.unsubscribeOperationsSaveError = eventBus.subscribe('token_expired', this.onTokenExpiredError);
|
|
166
177
|
|
|
167
178
|
// local error
|
|
168
179
|
this.unsubscribePendingOpExceedLimit = eventBus.subscribe('pending_operations_exceed_limit', this.onPendingOpExceedLimit);
|
package/package.json
CHANGED
|
@@ -574,5 +574,6 @@
|
|
|
574
574
|
"Full_width_mode": "Full width mode",
|
|
575
575
|
"Video": "Video",
|
|
576
576
|
"Upload_local_video": "Upload_local_video",
|
|
577
|
-
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file"
|
|
577
|
+
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file",
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
579
|
}
|
|
@@ -574,5 +574,6 @@
|
|
|
574
574
|
"Full_width_mode": "Full width mode",
|
|
575
575
|
"Video": "Video",
|
|
576
576
|
"Upload_local_video": "Upload_local_video",
|
|
577
|
-
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file"
|
|
577
|
+
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file",
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
579
|
}
|
|
@@ -574,5 +574,6 @@
|
|
|
574
574
|
"Full_width_mode": "Full width mode",
|
|
575
575
|
"Video": "Video",
|
|
576
576
|
"Upload_local_video": "Upload_local_video",
|
|
577
|
-
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file"
|
|
577
|
+
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file",
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
579
|
}
|
|
@@ -574,5 +574,6 @@
|
|
|
574
574
|
"Full_width_mode": "Full width mode",
|
|
575
575
|
"Video": "Video",
|
|
576
576
|
"Upload_local_video": "Upload_local_video",
|
|
577
|
-
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file"
|
|
577
|
+
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file",
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
579
|
}
|
|
@@ -574,5 +574,6 @@
|
|
|
574
574
|
"Full_width_mode": "Full width mode",
|
|
575
575
|
"Video": "Video",
|
|
576
576
|
"Upload_local_video": "Upload_local_video",
|
|
577
|
-
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file"
|
|
577
|
+
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file",
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
579
|
}
|
|
@@ -574,5 +574,6 @@
|
|
|
574
574
|
"Full_width_mode": "Full width mode",
|
|
575
575
|
"Video": "Video",
|
|
576
576
|
"Upload_local_video": "Upload_local_video",
|
|
577
|
-
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file"
|
|
577
|
+
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file",
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
579
|
}
|
|
@@ -574,5 +574,6 @@
|
|
|
574
574
|
"Full_width_mode": "Full width mode",
|
|
575
575
|
"Video": "Vidéo",
|
|
576
576
|
"Upload_local_video": "Upload_local_video",
|
|
577
|
-
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file"
|
|
577
|
+
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file",
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
579
|
}
|
|
@@ -574,5 +574,6 @@
|
|
|
574
574
|
"Full_width_mode": "Full width mode",
|
|
575
575
|
"Video": "Video",
|
|
576
576
|
"Upload_local_video": "Upload_local_video",
|
|
577
|
-
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file"
|
|
577
|
+
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file",
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
579
|
}
|
|
@@ -573,6 +573,7 @@
|
|
|
573
573
|
"Five_column": "5 столбцов",
|
|
574
574
|
"Full_width_mode": "Режим полной ширины",
|
|
575
575
|
"Video": "Видео",
|
|
576
|
-
"Upload_local_video": "
|
|
577
|
-
"The_current_version_does_not_support_>5MB_video_file": "
|
|
576
|
+
"Upload_local_video": "Загрузка_локального_видео",
|
|
577
|
+
"The_current_version_does_not_support_>5MB_video_file": "Текущая_версия_не_поддерживает_видео_файл_>5_МБ",
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
579
|
}
|
|
@@ -574,5 +574,6 @@
|
|
|
574
574
|
"Full_width_mode": "全宽模式",
|
|
575
575
|
"Video": "视频",
|
|
576
576
|
"Upload_local_video": "上传本地视频",
|
|
577
|
-
"The_current_version_does_not_support_>5MB_video_file": "当前版本不支持大于 5MB 的视频文件"
|
|
577
|
+
"The_current_version_does_not_support_>5MB_video_file": "当前版本不支持大于 5MB 的视频文件",
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token已过期。请刷新页面。"
|
|
578
579
|
}
|