@seafile/sdoc-editor 0.2.29-beta → 0.2.30-beta
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/api/seafile-api.js +11 -18
- package/dist/basic-sdk/comment/components/comment-item-content.js +9 -1
- package/dist/basic-sdk/comment/components/comment-item-reply.js +9 -1
- package/dist/basic-sdk/comment/components/comment-item-wrapper.js +1 -1
- package/dist/basic-sdk/comment/components/comment-list.css +29 -0
- package/dist/basic-sdk/comment/components/comment-list.js +5 -3
- package/dist/basic-sdk/comment/components/editor-comment.js +5 -3
- package/dist/basic-sdk/comment/components/global-comment/index.js +10 -7
- package/dist/basic-sdk/comment/constants/index.js +8 -1
- package/dist/basic-sdk/comment/hooks/{use-comment-list.js → comment-hooks/use-comment-list.js} +1 -1
- package/dist/basic-sdk/comment/hooks/{use-comment-mount.js → comment-hooks/use-comment-mount.js} +36 -5
- package/dist/basic-sdk/comment/hooks/notification-hooks/index.js +2 -0
- package/dist/basic-sdk/comment/hooks/notification-hooks/use-notification-context.js +11 -0
- package/dist/basic-sdk/comment/hooks/notification-hooks/use-notification-mount.js +85 -0
- package/dist/basic-sdk/comment/index.js +46 -7
- package/dist/basic-sdk/comment/{comment-context-provider.js → provider/comment-context-provider.js} +3 -3
- package/dist/basic-sdk/comment/provider/index.js +8 -0
- package/dist/basic-sdk/comment/provider/notification-context-provider.js +26 -0
- package/dist/basic-sdk/comment/reducer/notification-reducer.js +70 -0
- package/dist/basic-sdk/comment/utils/index.js +2 -1
- package/dist/{utils → basic-sdk/comment/utils}/notification-utils.js +9 -3
- package/dist/basic-sdk/constants/index.js +5 -1
- package/dist/basic-sdk/editor/editable-article.js +1 -2
- package/dist/basic-sdk/editor/sdoc-editor.js +3 -2
- package/dist/components/doc-operations/{notifications-operation → comments-operation}/index.css +2 -2
- package/dist/components/doc-operations/comments-operation/index.js +23 -4
- package/dist/components/doc-operations/index.js +1 -2
- package/dist/components/doc-operations/revision-operations/view-changes/index.js +37 -2
- package/dist/context.js +7 -19
- package/dist/layout/index.js +1 -2
- package/dist/model/notification.js +6 -14
- package/dist/pages/simple-editor.js +3 -3
- package/dist/utils/index.js +1 -2
- package/package.json +3 -3
- package/public/locales/cs/sdoc-editor.json +4 -2
- package/public/locales/de/sdoc-editor.json +4 -2
- package/public/locales/en/sdoc-editor.json +1 -9
- package/public/locales/es/sdoc-editor.json +4 -2
- package/public/locales/fr/sdoc-editor.json +4 -2
- package/public/locales/it/sdoc-editor.json +4 -2
- package/public/locales/ru/sdoc-editor.json +6 -4
- package/public/locales/zh_CN/sdoc-editor.json +3 -3
- package/public/media/sdoc-editor-font/iconfont.eot +0 -0
- package/public/media/sdoc-editor-font/iconfont.svg +0 -2
- package/public/media/sdoc-editor-font/iconfont.ttf +0 -0
- package/public/media/sdoc-editor-font/iconfont.woff +0 -0
- package/public/media/sdoc-editor-font/iconfont.woff2 +0 -0
- package/public/media/sdoc-editor-font.css +0 -4
- package/dist/components/doc-operations/notifications-operation/index.js +0 -170
- package/dist/components/doc-operations/notifications-operation/notifications-dialog/index.css +0 -97
- package/dist/components/doc-operations/notifications-operation/notifications-dialog/index.js +0 -107
- package/dist/components/doc-operations/notifications-operation/notifications-dialog/notification.js +0 -25
- package/dist/components/doc-operations/notifications-operation/notifications-popover/index.css +0 -173
- package/dist/components/doc-operations/notifications-operation/notifications-popover/index.js +0 -78
- package/dist/components/doc-operations/notifications-operation/notifications-popover/notification.js +0 -54
- package/dist/layout/other.js +0 -8
- /package/dist/basic-sdk/comment/hooks/{use-comment-context.js → comment-hooks/use-comment-context.js} +0 -0
package/dist/components/doc-operations/notifications-operation/notifications-popover/notification.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
2
|
-
import { textToHtml } from '../../../../basic-sdk/comment/utils';
|
|
3
|
-
var Notification = function Notification(_ref) {
|
|
4
|
-
var notification = _ref.notification,
|
|
5
|
-
markNotificationRead = _ref.markNotificationRead;
|
|
6
|
-
var onMarkNotificationRead = useCallback(function () {
|
|
7
|
-
markNotificationRead(notification.id);
|
|
8
|
-
}, [notification, markNotificationRead]);
|
|
9
|
-
if (!notification) return null;
|
|
10
|
-
var seen = notification.seen,
|
|
11
|
-
username = notification.username,
|
|
12
|
-
userAvatarURL = notification.userAvatarURL,
|
|
13
|
-
time = notification.time,
|
|
14
|
-
detail = notification.detail,
|
|
15
|
-
msgType = notification.msgType;
|
|
16
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
-
className: "sdoc-notification-item",
|
|
18
|
-
onClick: onMarkNotificationRead
|
|
19
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
20
|
-
className: "sdoc-notification-item-header"
|
|
21
|
-
}, !seen && /*#__PURE__*/React.createElement("span", {
|
|
22
|
-
className: "sdoc-notification-point"
|
|
23
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
24
|
-
className: "sdoc-notification-header-info"
|
|
25
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
26
|
-
className: "sdoc-notification-user-detail"
|
|
27
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
28
|
-
src: userAvatarURL,
|
|
29
|
-
alt: "",
|
|
30
|
-
width: "20",
|
|
31
|
-
height: "20",
|
|
32
|
-
style: {
|
|
33
|
-
borderRadius: '50%'
|
|
34
|
-
}
|
|
35
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
36
|
-
className: "sdoc-notification-user-name"
|
|
37
|
-
}, username)), /*#__PURE__*/React.createElement("span", {
|
|
38
|
-
className: "sdoc-notification-time"
|
|
39
|
-
}, time))), /*#__PURE__*/React.createElement("div", {
|
|
40
|
-
className: "sdoc-notification-content-wrapper"
|
|
41
|
-
}, msgType === 'comment' ? 'added_a_new_comment' : 'added_a_reply'), /*#__PURE__*/React.createElement("div", {
|
|
42
|
-
className: "sdoc-notification-content-wrapper"
|
|
43
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
44
|
-
className: "sdoc-notification-content-quotes"
|
|
45
|
-
}, "\""), /*#__PURE__*/React.createElement("div", {
|
|
46
|
-
dangerouslySetInnerHTML: {
|
|
47
|
-
__html: textToHtml(detail)
|
|
48
|
-
},
|
|
49
|
-
className: "sdoc-notification-comment-content"
|
|
50
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
51
|
-
className: "sdoc-notification-content-quotes"
|
|
52
|
-
}, "\"")));
|
|
53
|
-
};
|
|
54
|
-
export default Notification;
|
package/dist/layout/other.js
DELETED
|
File without changes
|