@seafile/comment-editor 0.0.1-alpha.6 → 0.0.1-alpha.60
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/_i18n/index.js +37 -0
- package/dist/basic-sdk/context.js +8 -21
- package/dist/basic-sdk/editor/comment-editor.js +14 -23
- package/dist/basic-sdk/extension/commons/color-menu/color-item.js +4 -2
- package/dist/basic-sdk/extension/commons/color-menu/index.js +4 -2
- package/dist/basic-sdk/extension/commons/select/field-setting.js +3 -2
- package/dist/basic-sdk/extension/commons/select-file-dialog/local-files/index.js +4 -2
- package/dist/basic-sdk/extension/plugins/code-block/hover-menu/index.js +5 -3
- package/dist/basic-sdk/extension/plugins/file-link/hover-menu/index.js +5 -3
- package/dist/basic-sdk/extension/plugins/header/menu/index.js +3 -2
- package/dist/basic-sdk/extension/plugins/image/helpers.js +1 -1
- package/dist/basic-sdk/extension/plugins/image/hover-menu/index.js +4 -2
- package/dist/basic-sdk/extension/plugins/image/render-elem.js +5 -3
- package/dist/basic-sdk/extension/plugins/image/use-copy-image.js +1 -1
- package/dist/basic-sdk/extension/plugins/image/use-upload-image.js +1 -1
- package/dist/basic-sdk/extension/plugins/sdoc-link/hover-menu/index.js +4 -2
- package/dist/basic-sdk/extension/plugins/table/menu/color-selector-popover/color-item.js +4 -2
- package/dist/basic-sdk/extension/plugins/table/menu/table-context-menu/index.js +3 -2
- package/dist/basic-sdk/extension/plugins/table/menu/table-context-menu/insert-table-element.js +3 -2
- package/dist/basic-sdk/extension/plugins/table/menu/table-menu/index.js +1 -2
- package/dist/basic-sdk/extension/plugins/text-align/menu/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/text-style/menu/comemnt-editor-menu.js +1 -2
- package/dist/basic-sdk/extension/plugins/text-style/menu/index.js +4 -2
- package/dist/basic-sdk/extension/plugins/video/render-elem.js +1 -2
- package/dist/basic-sdk/extension/toolbar/comment-editor-toolbar/index.js +13 -9
- package/dist/basic-sdk/hooks/use-comment.js +22 -12
- package/dist/basic-sdk/model/index.js +1 -8
- package/dist/basic-sdk/socket/helpers.js +312 -0
- package/dist/components/error-boundary/error-page.js +4 -4
- package/dist/pages/seafile-comment-editor.js +35 -17
- package/package.json +6 -6
- package/dist/basic-sdk/layout/comment-layout/index.css +0 -15
- package/dist/basic-sdk/layout/comment-layout/index.js +0 -87
- package/dist/basic-sdk/layout/comment-layout/resize-width/index.css +0 -38
- package/dist/basic-sdk/layout/comment-layout/resize-width/index.js +0 -132
- package/dist/basic-sdk/layout/editor-container.js +0 -32
- package/dist/basic-sdk/layout/index.js +0 -13
- package/dist/basic-sdk/model/notification.js +0 -18
- package/dist/components/tip-message/index.js +0 -194
- package/dist/components/tip-message/style.css +0 -15
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
require("./index.css");
|
|
10
|
-
const ResizeWidth = _ref => {
|
|
11
|
-
let {
|
|
12
|
-
minWidth,
|
|
13
|
-
maxWidth,
|
|
14
|
-
resizeWidth: resizeWidthAPI,
|
|
15
|
-
resizeWidthEnd
|
|
16
|
-
} = _ref;
|
|
17
|
-
const [isShowHandlerBar, setIsShowHandlerBar] = (0, _react.useState)(false);
|
|
18
|
-
const [drag, setDrag] = (0, _react.useState)(null);
|
|
19
|
-
const handlerRef = (0, _react.useRef)(null);
|
|
20
|
-
const handlerBarRef = (0, _react.useRef)(null);
|
|
21
|
-
const setHandlerBarTop = handlerTop => {
|
|
22
|
-
if (!handlerBarRef.current || handlerTop < 0) return;
|
|
23
|
-
handlerBarRef.current.style.top = handlerTop + 'px';
|
|
24
|
-
};
|
|
25
|
-
const setHandlerBarPosition = event => {
|
|
26
|
-
if (!handlerRef.current) return;
|
|
27
|
-
const {
|
|
28
|
-
top
|
|
29
|
-
} = handlerRef.current.getBoundingClientRect();
|
|
30
|
-
const handlerTop = event.pageY - top - 26 / 2;
|
|
31
|
-
setHandlerBarTop(handlerTop);
|
|
32
|
-
};
|
|
33
|
-
const getWidthFromMouseEvent = event => {
|
|
34
|
-
return event.pageX || event.touches && event.touches[0] && event.touches[0].pageX || event.changedTouches && event.changedTouches[event.changedTouches.length - 1].pageX;
|
|
35
|
-
};
|
|
36
|
-
const calculateResizedWidth = event => {
|
|
37
|
-
const width = getWidthFromMouseEvent(event);
|
|
38
|
-
const resizedWidth = document.body.clientWidth - width;
|
|
39
|
-
if (minWidth && resizedWidth < minWidth || maxWidth && resizedWidth > maxWidth) return -1;
|
|
40
|
-
return resizedWidth;
|
|
41
|
-
};
|
|
42
|
-
const onResizeWidth = event => {
|
|
43
|
-
const resizedWidth = calculateResizedWidth(event);
|
|
44
|
-
if (resizedWidth < 0) return;
|
|
45
|
-
if (resizeWidthAPI) {
|
|
46
|
-
resizeWidthAPI(resizedWidth);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
const onDrag = event => {
|
|
50
|
-
onResizeWidth(event);
|
|
51
|
-
};
|
|
52
|
-
const onDragStart = (0, _react.useCallback)(event => {
|
|
53
|
-
if (event && event.dataTransfer && event.dataTransfer.setData) {
|
|
54
|
-
event.dataTransfer.setData('text/plain', 'dummy');
|
|
55
|
-
}
|
|
56
|
-
}, []);
|
|
57
|
-
const onDragEnd = event => {
|
|
58
|
-
onResizeWidth(event);
|
|
59
|
-
};
|
|
60
|
-
const onMouseLeave = () => {
|
|
61
|
-
setIsShowHandlerBar(false);
|
|
62
|
-
};
|
|
63
|
-
const onMouseEnter = event => {
|
|
64
|
-
setIsShowHandlerBar(true);
|
|
65
|
-
setHandlerBarPosition(event);
|
|
66
|
-
if (handlerRef.current) {
|
|
67
|
-
handlerRef.current.addEventListener('mouseleave', onMouseLeave);
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
const onMouseOver = event => {
|
|
71
|
-
setHandlerBarPosition(event);
|
|
72
|
-
};
|
|
73
|
-
const onMouseDown = event => {
|
|
74
|
-
event.preventDefault && event.preventDefault();
|
|
75
|
-
const currDrag = onDragStart(event);
|
|
76
|
-
if (currDrag === null && event.button !== 0) return;
|
|
77
|
-
window.addEventListener('mouseup', onMouseUp);
|
|
78
|
-
window.addEventListener('mousemove', onMouseMove);
|
|
79
|
-
if (handlerRef.current) {
|
|
80
|
-
handlerRef.current.removeEventListener('mouseleave', onMouseLeave);
|
|
81
|
-
}
|
|
82
|
-
setDrag(currDrag);
|
|
83
|
-
};
|
|
84
|
-
const onMouseMove = event => {
|
|
85
|
-
event.preventDefault && event.preventDefault();
|
|
86
|
-
if (!drag === null) return;
|
|
87
|
-
onDrag(event);
|
|
88
|
-
};
|
|
89
|
-
const onMouseUp = event => {
|
|
90
|
-
window.removeEventListener('mouseup', onMouseUp);
|
|
91
|
-
window.removeEventListener('mousemove', onMouseMove);
|
|
92
|
-
onDragEnd(event, drag);
|
|
93
|
-
setHandlerBarTop(-9999);
|
|
94
|
-
setDrag(null);
|
|
95
|
-
setIsShowHandlerBar(false);
|
|
96
|
-
if (resizeWidthEnd) {
|
|
97
|
-
const resizeWidth = calculateResizedWidth(event);
|
|
98
|
-
if (resizeWidth < 0) return;
|
|
99
|
-
resizeWidthEnd(resizeWidth);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
(0, _react.useEffect)(() => {
|
|
103
|
-
return () => {
|
|
104
|
-
window.removeEventListener('mouseup', onMouseUp);
|
|
105
|
-
window.removeEventListener('mousemove', onMouseMove);
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
// eslint-disable-next-line
|
|
109
|
-
}, []);
|
|
110
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
111
|
-
className: "comment-layout-resize-width-handler resize-handler-placement-right",
|
|
112
|
-
ref: handlerRef,
|
|
113
|
-
onMouseDown: onMouseDown,
|
|
114
|
-
onMouseOver: onMouseOver,
|
|
115
|
-
onMouseEnter: onMouseEnter,
|
|
116
|
-
onDrag: onDrag,
|
|
117
|
-
onDragStart: onDragStart,
|
|
118
|
-
onDragEnd: onDragEnd,
|
|
119
|
-
style: {
|
|
120
|
-
zIndex: 4
|
|
121
|
-
}
|
|
122
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
123
|
-
className: "comment-layout-resize-width-handler-content"
|
|
124
|
-
}, isShowHandlerBar && /*#__PURE__*/_react.default.createElement("div", {
|
|
125
|
-
className: "comment-layout-resize-width-handler-bar",
|
|
126
|
-
ref: handlerBarRef,
|
|
127
|
-
style: {
|
|
128
|
-
height: 26
|
|
129
|
-
}
|
|
130
|
-
})));
|
|
131
|
-
};
|
|
132
|
-
var _default = exports.default = ResizeWidth;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
-
var _commonUtils = require("../utils/common-utils");
|
|
11
|
-
require("../assets/css/layout.css");
|
|
12
|
-
require("../assets/css/default.css");
|
|
13
|
-
require("../assets/css/sdoc-editor-article.css");
|
|
14
|
-
require("../assets/css/sdoc-editor-plugins.css");
|
|
15
|
-
require("../assets/css/sdoc-comment-editor-plugin.css");
|
|
16
|
-
require("../assets/css/dropdown-menu.css");
|
|
17
|
-
const EditorContainer = _ref => {
|
|
18
|
-
let {
|
|
19
|
-
children,
|
|
20
|
-
readonly,
|
|
21
|
-
fullscreen
|
|
22
|
-
} = _ref;
|
|
23
|
-
const className = (0, _classnames.default)('sdoc-editor-container', {
|
|
24
|
-
'mobile': _commonUtils.isMobile,
|
|
25
|
-
'readonly': readonly,
|
|
26
|
-
'fullscreen': fullscreen
|
|
27
|
-
});
|
|
28
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
29
|
-
className: className
|
|
30
|
-
}, children);
|
|
31
|
-
};
|
|
32
|
-
var _default = exports.default = EditorContainer;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
Object.defineProperty(exports, "EditorContainer", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () {
|
|
10
|
-
return _editorContainer.default;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
var _editorContainer = _interopRequireDefault(require("./editor-container"));
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _utils = require("../comment/utils");
|
|
8
|
-
class Notification {
|
|
9
|
-
constructor(options) {
|
|
10
|
-
var _options$detail, _options$detail2, _options$detail3;
|
|
11
|
-
this.id = options.id || '';
|
|
12
|
-
this.comment_id = (options === null || options === void 0 ? void 0 : (_options$detail = options.detail) === null || _options$detail === void 0 ? void 0 : _options$detail.comment_id) || '';
|
|
13
|
-
this.reply_id = (options === null || options === void 0 ? void 0 : (_options$detail2 = options.detail) === null || _options$detail2 === void 0 ? void 0 : _options$detail2.reply_id) || '';
|
|
14
|
-
this.type = (options === null || options === void 0 ? void 0 : (_options$detail3 = options.detail) === null || _options$detail3 === void 0 ? void 0 : _options$detail3.msg_type) || '';
|
|
15
|
-
this.key = this.type !== 'reply' ? (0, _utils.generatorNotificationKey)(this.comment_id) : (0, _utils.generatorNotificationKey)(this.comment_id, this.reply_id);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
var _default = exports.default = Notification;
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _reactI18next = require("react-i18next");
|
|
11
|
-
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
12
|
-
var _basicSdk = require("../../basic-sdk");
|
|
13
|
-
require("./style.css");
|
|
14
|
-
class TipMessage extends _react.default.Component {
|
|
15
|
-
constructor(props) {
|
|
16
|
-
super(props);
|
|
17
|
-
(0, _defineProperty2.default)(this, "onOperationExecuteError", () => {
|
|
18
|
-
const {
|
|
19
|
-
t
|
|
20
|
-
} = this.props;
|
|
21
|
-
const message = t('Failed_to_execute_operation_on_server');
|
|
22
|
-
_basicSdk.toaster.warning(message, {
|
|
23
|
-
hasCloseButton: true
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
(0, _defineProperty2.default)(this, "onSyncServerOperationError", () => {
|
|
27
|
-
const {
|
|
28
|
-
t
|
|
29
|
-
} = this.props;
|
|
30
|
-
const message = t('Failed_to_sync_with_server_operations');
|
|
31
|
-
_basicSdk.toaster.danger(message, {
|
|
32
|
-
hasCloseButton: false,
|
|
33
|
-
duration: null
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
(0, _defineProperty2.default)(this, "onInternalServerExecError", () => {
|
|
37
|
-
const {
|
|
38
|
-
t
|
|
39
|
-
} = this.props;
|
|
40
|
-
const message = t('Internal_server_exec_operations_error');
|
|
41
|
-
_basicSdk.toaster.danger(message, {
|
|
42
|
-
hasCloseButton: false,
|
|
43
|
-
duration: null
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
(0, _defineProperty2.default)(this, "onTokenExpiredError", msg => {
|
|
47
|
-
const {
|
|
48
|
-
t
|
|
49
|
-
} = this.props;
|
|
50
|
-
const message = t('Token_expired_Please_refresh_the_page');
|
|
51
|
-
_basicSdk.toaster.closeAll();
|
|
52
|
-
_basicSdk.toaster.danger(message, {
|
|
53
|
-
duration: null
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
(0, _defineProperty2.default)(this, "onPendingOpExceedLimit", () => {
|
|
57
|
-
const {
|
|
58
|
-
t
|
|
59
|
-
} = this.props;
|
|
60
|
-
_basicSdk.toaster.closeAll();
|
|
61
|
-
const message = t('Pending_operations_exceed_limit');
|
|
62
|
-
_basicSdk.toaster.warning(message, {
|
|
63
|
-
duration: 5
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
(0, _defineProperty2.default)(this, "onDisconnect", () => {
|
|
67
|
-
const {
|
|
68
|
-
t,
|
|
69
|
-
isEditMode
|
|
70
|
-
} = this.props;
|
|
71
|
-
if (!isEditMode) return;
|
|
72
|
-
const message = t('Server_is_not_connected_Operation_will_be_sent_to_server_later');
|
|
73
|
-
_basicSdk.toaster.warning(message, {
|
|
74
|
-
hasCloseButton: true,
|
|
75
|
-
duration: null
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
(0, _defineProperty2.default)(this, "onReconnectError", () => {
|
|
79
|
-
if (!this.isConnectError) {
|
|
80
|
-
this.isConnectError = true;
|
|
81
|
-
const {
|
|
82
|
-
t
|
|
83
|
-
} = this.props;
|
|
84
|
-
const message = t('Server_is_disconnected_Reconnecting');
|
|
85
|
-
_basicSdk.toaster.closeAll();
|
|
86
|
-
_basicSdk.toaster.warning(message, {
|
|
87
|
-
hasCloseButton: true,
|
|
88
|
-
duration: null
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
(0, _defineProperty2.default)(this, "onReconnect", () => {
|
|
93
|
-
this.isConnectError = false;
|
|
94
|
-
const {
|
|
95
|
-
t
|
|
96
|
-
} = this.props;
|
|
97
|
-
const message = t('Server_is_reconnected');
|
|
98
|
-
_basicSdk.toaster.closeAll();
|
|
99
|
-
_basicSdk.toaster.success(message); // close after serval seconds
|
|
100
|
-
});
|
|
101
|
-
(0, _defineProperty2.default)(this, "onDocumentSaving", () => {
|
|
102
|
-
this.setState({
|
|
103
|
-
isSaving: true,
|
|
104
|
-
isSaved: false
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
(0, _defineProperty2.default)(this, "onDocumentSaved", lastSavedAt => {
|
|
108
|
-
if (this.saveTimer) clearTimeout(this.saveTimer);
|
|
109
|
-
if (this.resetTimer) clearTimeout(this.resetTimer);
|
|
110
|
-
this.saveTimer = setTimeout(() => {
|
|
111
|
-
this.setState({
|
|
112
|
-
lastSavedAt,
|
|
113
|
-
isSaving: false,
|
|
114
|
-
isSaved: true
|
|
115
|
-
});
|
|
116
|
-
}, 1000);
|
|
117
|
-
this.resetTimer = setTimeout(() => {
|
|
118
|
-
this.setState({
|
|
119
|
-
isSaving: false,
|
|
120
|
-
isSaved: false
|
|
121
|
-
});
|
|
122
|
-
}, 2000);
|
|
123
|
-
});
|
|
124
|
-
(0, _defineProperty2.default)(this, "render", () => {
|
|
125
|
-
const {
|
|
126
|
-
t
|
|
127
|
-
} = this.props;
|
|
128
|
-
const {
|
|
129
|
-
isSaved,
|
|
130
|
-
isSaving,
|
|
131
|
-
lastSavedAt
|
|
132
|
-
} = this.state;
|
|
133
|
-
if (isSaving && !isSaved) {
|
|
134
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
|
135
|
-
className: "tip-message"
|
|
136
|
-
}, t('Saving'));
|
|
137
|
-
}
|
|
138
|
-
if (!isSaving && isSaved) {
|
|
139
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
|
140
|
-
className: "tip-message"
|
|
141
|
-
}, t('All_changes_saved'));
|
|
142
|
-
}
|
|
143
|
-
if (lastSavedAt) {
|
|
144
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
|
145
|
-
className: "tip-message"
|
|
146
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
147
|
-
className: "sdocfont sdoc-save-tip mr-2"
|
|
148
|
-
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
149
|
-
className: "save-time"
|
|
150
|
-
}, (0, _dayjs.default)(lastSavedAt).format('HH:mm')));
|
|
151
|
-
}
|
|
152
|
-
return null;
|
|
153
|
-
});
|
|
154
|
-
this.state = {
|
|
155
|
-
isSaved: false,
|
|
156
|
-
isSaving: false,
|
|
157
|
-
lastSavedAt: ''
|
|
158
|
-
};
|
|
159
|
-
this.saveTimer = null;
|
|
160
|
-
}
|
|
161
|
-
componentDidMount() {
|
|
162
|
-
const eventBus = _basicSdk.EventBus.getInstance();
|
|
163
|
-
this.unsubscribeSavingEvent = eventBus.subscribe('is-saving', this.onDocumentSaving);
|
|
164
|
-
this.unsubscribeSavedEvent = eventBus.subscribe('saved', this.onDocumentSaved);
|
|
165
|
-
// offline reconnect
|
|
166
|
-
this.unsubscribeDisconnectEvent = eventBus.subscribe('disconnect', this.onDisconnect);
|
|
167
|
-
this.unsubscribeReconnectErrorEvent = eventBus.subscribe('reconnect_error', this.onReconnectError);
|
|
168
|
-
this.unsubscribeReconnectEvent = eventBus.subscribe('reconnect', this.onReconnect);
|
|
169
|
-
|
|
170
|
-
// server return error
|
|
171
|
-
this.unsubscribeOpExecError = eventBus.subscribe('execute_client_operations_error', this.onOperationExecuteError);
|
|
172
|
-
this.unsubscribeSyncServerOpError = eventBus.subscribe('sync_server_operations_error', this.onSyncServerOperationError);
|
|
173
|
-
this.unsubscribeDocumentLoadError = eventBus.subscribe('load_document_content_error', this.onInternalServerExecError);
|
|
174
|
-
this.unsubscribeOperationsSaveError = eventBus.subscribe('save_operations_to_database_error', this.onInternalServerExecError);
|
|
175
|
-
this.unsubscribeOperationsSaveError = eventBus.subscribe('token_expired', this.onTokenExpiredError);
|
|
176
|
-
|
|
177
|
-
// local error
|
|
178
|
-
this.unsubscribePendingOpExceedLimit = eventBus.subscribe('pending_operations_exceed_limit', this.onPendingOpExceedLimit);
|
|
179
|
-
}
|
|
180
|
-
componentWillUnmount() {
|
|
181
|
-
this.unsubscribeSavingEvent();
|
|
182
|
-
this.unsubscribeSavedEvent();
|
|
183
|
-
this.unsubscribeDisconnectEvent();
|
|
184
|
-
this.unsubscribeReconnectErrorEvent();
|
|
185
|
-
this.unsubscribeReconnectEvent();
|
|
186
|
-
this.unsubscribeOpExecError();
|
|
187
|
-
this.unsubscribeSyncServerOpError();
|
|
188
|
-
this.unsubscribePendingOpExceedLimit();
|
|
189
|
-
this.unsubscribeDocumentLoadError();
|
|
190
|
-
this.unsubscribeOperationsSaveError();
|
|
191
|
-
clearTimeout(this.saveTimer);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
var _default = exports.default = (0, _reactI18next.withTranslation)('sdoc-editor')(TipMessage);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
.sdoc-editor-page-wrapper .tip-message {
|
|
2
|
-
margin-left: 12px;
|
|
3
|
-
font-size: 12px;
|
|
4
|
-
opacity: 0.75;
|
|
5
|
-
color: #999;
|
|
6
|
-
width: max-content;
|
|
7
|
-
height: 27px;
|
|
8
|
-
line-height: 27px;
|
|
9
|
-
display: inline-flex;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.sdoc-editor-page-wrapper .tip-message .sdocfont {
|
|
13
|
-
padding-top: 1px;
|
|
14
|
-
font-size: 14px;
|
|
15
|
-
}
|