@seafile/sdoc-editor 0.2.28 → 0.2.29-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.
Files changed (49) hide show
  1. package/dist/api/seafile-api.js +26 -0
  2. package/dist/basic-sdk/comment/hooks/use-comment-mount.js +7 -0
  3. package/dist/basic-sdk/editor/sdoc-editor.js +2 -3
  4. package/dist/basic-sdk/extension/constants/element-type.js +0 -1
  5. package/dist/basic-sdk/extension/constants/index.js +2 -2
  6. package/dist/basic-sdk/extension/plugins/html/helper.js +0 -1
  7. package/dist/basic-sdk/extension/plugins/html/rules/list.js +3 -3
  8. package/dist/basic-sdk/extension/plugins/list/helpers.js +0 -1
  9. package/dist/basic-sdk/extension/plugins/list/model.js +3 -3
  10. package/dist/basic-sdk/extension/plugins/list/plugin/insert-fragment-list.js +4 -4
  11. package/dist/basic-sdk/extension/plugins/list/plugin/normalize-list.js +2 -13
  12. package/dist/basic-sdk/extension/plugins/list/transforms/insert-list-item.js +13 -11
  13. package/dist/basic-sdk/extension/plugins/list/transforms/move-list-items.js +2 -2
  14. package/dist/basic-sdk/extension/plugins/list/transforms/normalize-list-item.js +7 -7
  15. package/dist/basic-sdk/extension/plugins/list/transforms/toggle-list.js +16 -19
  16. package/dist/basic-sdk/extension/plugins/list/transforms/unwrap-list.js +5 -13
  17. package/dist/basic-sdk/extension/plugins/table/helpers.js +0 -1
  18. package/dist/basic-sdk/extension/render/custom-element.js +14 -14
  19. package/dist/basic-sdk/socket/socket-client.js +7 -0
  20. package/dist/basic-sdk/socket/socket-manager.js +3 -0
  21. package/dist/components/doc-operations/index.js +2 -1
  22. package/dist/components/doc-operations/notifications-operation/index.css +14 -0
  23. package/dist/components/doc-operations/notifications-operation/index.js +170 -0
  24. package/dist/components/doc-operations/notifications-operation/notifications-dialog/index.css +97 -0
  25. package/dist/components/doc-operations/notifications-operation/notifications-dialog/index.js +107 -0
  26. package/dist/components/doc-operations/notifications-operation/notifications-dialog/notification.js +25 -0
  27. package/dist/components/doc-operations/notifications-operation/notifications-popover/index.css +173 -0
  28. package/dist/components/doc-operations/notifications-operation/notifications-popover/index.js +78 -0
  29. package/dist/components/doc-operations/notifications-operation/notifications-popover/notification.js +54 -0
  30. package/dist/components/tip-dialog/index.css +17 -0
  31. package/dist/components/tip-dialog/index.js +7 -0
  32. package/dist/constants/index.js +2 -1
  33. package/dist/context.js +26 -0
  34. package/dist/layout/index.js +2 -1
  35. package/dist/layout/other.js +8 -0
  36. package/dist/model/index.js +2 -1
  37. package/dist/model/notification.js +21 -0
  38. package/dist/pages/simple-editor.js +3 -3
  39. package/dist/utils/index.js +2 -1
  40. package/dist/utils/notification-utils.js +46 -0
  41. package/package.json +1 -1
  42. package/public/locales/en/sdoc-editor.json +12 -1
  43. package/public/locales/zh_CN/sdoc-editor.json +3 -1
  44. package/public/media/sdoc-editor-font/iconfont.eot +0 -0
  45. package/public/media/sdoc-editor-font/iconfont.svg +2 -0
  46. package/public/media/sdoc-editor-font/iconfont.ttf +0 -0
  47. package/public/media/sdoc-editor-font/iconfont.woff +0 -0
  48. package/public/media/sdoc-editor-font/iconfont.woff2 +0 -0
  49. package/public/media/sdoc-editor-font.css +4 -0
@@ -242,6 +242,32 @@ var SeafileAPI = /*#__PURE__*/function () {
242
242
  };
243
243
  return this.req.put(url, params);
244
244
  }
245
+
246
+ // notification
247
+ }, {
248
+ key: "listNotifications",
249
+ value: function listNotifications(docUuid, page, perPage) {
250
+ var url = "/api/v2.1/seadoc/notifications/".concat(docUuid, "/?page=").concat(page, "&per_page=").concat(perPage);
251
+ return this.req.get(url);
252
+ }
253
+ }, {
254
+ key: "markAllNotificationsRead",
255
+ value: function markAllNotificationsRead(docUuid) {
256
+ var url = "/api/v2.1/seadoc/notifications/".concat(docUuid, "/");
257
+ return this.req.put(url);
258
+ }
259
+ }, {
260
+ key: "markNotificationRead",
261
+ value: function markNotificationRead(docUuid, notificationId) {
262
+ var url = "/api/v2.1/seadoc/notifications/".concat(docUuid, "/").concat(notificationId, "/");
263
+ return this.req.put(url);
264
+ }
265
+ }, {
266
+ key: "deleteAllNotifications",
267
+ value: function deleteAllNotifications(docUuid) {
268
+ var url = "/api/v2.1/seadoc/notifications/".concat(docUuid, "/");
269
+ return this.req.delete(url);
270
+ }
245
271
  }]);
246
272
  return SeafileAPI;
247
273
  }();
@@ -2,6 +2,8 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
2
2
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
3
  import { useCallback, useEffect } from 'react';
4
4
  import context from '../../../context';
5
+ import EventBus from '../../utils/event-bus';
6
+ import { EXTERNAL_EVENT } from '../../../constants';
5
7
  export var useCommentsMount = function useCommentsMount(dispatch) {
6
8
  var request = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7
9
  var res, comments;
@@ -38,5 +40,10 @@ export var useCommentsMount = function useCommentsMount(dispatch) {
38
40
  })), []);
39
41
  useEffect(function () {
40
42
  request();
43
+ var eventBus = EventBus.getInstance();
44
+ var unsubscribeNewNotification = eventBus.subscribe(EXTERNAL_EVENT.NEW_NOTIFICATION, request);
45
+ return function () {
46
+ unsubscribeNewNotification();
47
+ };
41
48
  }, [request]);
42
49
  };
@@ -18,7 +18,6 @@ import { ColorProvider } from '../hooks/use-color-context';
18
18
  import { HeaderToolbar } from '../extension';
19
19
  import ReadOnlyArticle from '../views/readonly-article';
20
20
  import { isMobile } from '../../utils';
21
- import { CollaboratorsProvider } from '../../hooks';
22
21
  var SdocEditor = forwardRef(function (_ref, ref) {
23
22
  var document = _ref.document,
24
23
  isReloading = _ref.isReloading;
@@ -116,7 +115,7 @@ var SdocEditor = forwardRef(function (_ref, ref) {
116
115
  }
117
116
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(EditorContainer, {
118
117
  editor: editor
119
- }, /*#__PURE__*/React.createElement(CollaboratorsProvider, null, /*#__PURE__*/React.createElement(ColorProvider, null, /*#__PURE__*/React.createElement(HeaderToolbar, {
118
+ }, /*#__PURE__*/React.createElement(ColorProvider, null, /*#__PURE__*/React.createElement(HeaderToolbar, {
120
119
  editor: editor
121
120
  }), /*#__PURE__*/React.createElement(EditorContent, {
122
121
  docValue: slateValue,
@@ -125,7 +124,7 @@ var SdocEditor = forwardRef(function (_ref, ref) {
125
124
  editor: editor,
126
125
  slateValue: slateValue,
127
126
  updateSlateValue: _setSlateValue
128
- }))))), /*#__PURE__*/React.createElement(InsertElementDialog, {
127
+ })))), /*#__PURE__*/React.createElement(InsertElementDialog, {
129
128
  editor: editor
130
129
  }));
131
130
  });
@@ -11,7 +11,6 @@ export var HEADER6 = 'header6';
11
11
  export var ORDERED_LIST = 'ordered_list';
12
12
  export var UNORDERED_LIST = 'unordered_list';
13
13
  export var LIST_ITEM = 'list_item';
14
- export var LIST_LIC = 'list_lic'; // placeholder
15
14
  export var CHECK_LIST_ITEM = 'check_list_item';
16
15
  export var PARAGRAPH = 'paragraph';
17
16
  export var CODE_BLOCK = 'code_block';
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  var _HEADER_TITLE_MAP, _FILE_TYPE;
3
3
  // extension plugin
4
4
  import * as ELEMENT_TYPE from './element-type';
5
- import { BLOCKQUOTE, TITLE, SUBTITLE, HEADER, HEADER1, HEADER2, HEADER3, HEADER4, HEADER5, HEADER6, PARAGRAPH, ORDERED_LIST, UNORDERED_LIST, LIST_ITEM, LIST_LIC, CHECK_LIST_ITEM, CODE_BLOCK, CODE_LINE, TABLE, TABLE_CELL, TABLE_ROW, LINK, SDOC_LINK, FILE_LINK, IMAGE, TOP_LEVEL_TYPES, INLINE_LEVEL_TYPES } from './element-type';
5
+ import { BLOCKQUOTE, TITLE, SUBTITLE, HEADER, HEADER1, HEADER2, HEADER3, HEADER4, HEADER5, HEADER6, PARAGRAPH, ORDERED_LIST, UNORDERED_LIST, LIST_ITEM, CHECK_LIST_ITEM, CODE_BLOCK, CODE_LINE, TABLE, TABLE_CELL, TABLE_ROW, LINK, SDOC_LINK, FILE_LINK, IMAGE, TOP_LEVEL_TYPES, INLINE_LEVEL_TYPES } from './element-type';
6
6
  export { DEFAULT_COLORS, STANDARD_COLORS, DEFAULT_RECENT_USED_LIST, DEFAULT_FONT_COLOR, RECENT_USED_HIGHLIGHT_COLORS_KEY, RECENT_USED_FONT_COLORS_KEY, RECENT_USED_TABLE_CELL_BACKGROUND_COLORS_KEY, DEFAULT_LAST_USED_FONT_COLOR, DEFAULT_LAST_USED_HIGHLIGHT_COLOR, DEFAULT_LAST_USED_TABLE_CELL_BACKGROUND_COLOR } from './color';
7
7
  export { FONT_SIZE, DEFAULT_FONT, FONT, GOOGLE_FONT_CLASS, RECENT_USED_FONTS_KEY, SDOC_FONT_SIZE } from './font';
8
8
  export { DIFF_TYPE, ADDED_STYLE, DELETED_STYLE } from './diff-view';
@@ -25,4 +25,4 @@ export var LIST_ITEM_CORRELATION_TYPE = [UNORDERED_LIST, ORDERED_LIST, LIST_ITEM
25
25
  export var LIST_ITEM_SUPPORTED_TRANSFORMATION = [UNORDERED_LIST, ORDERED_LIST, 'left', 'center', 'right', BLOCKQUOTE];
26
26
  export var ADD_POSITION_OFFSET_TYPE = [PARAGRAPH, SUBTITLE, HEADER1, HEADER2, HEADER3, HEADER4, HEADER5, HEADER6, CHECK_LIST_ITEM];
27
27
  export var FILE_TYPE = (_FILE_TYPE = {}, _defineProperty(_FILE_TYPE, FILE_LINK, 'file'), _defineProperty(_FILE_TYPE, SDOC_LINK, 'sdoc'), _FILE_TYPE);
28
- export { ELEMENT_TYPE, BLOCKQUOTE, TITLE, SUBTITLE, HEADER, HEADER1, HEADER2, HEADER3, HEADER4, HEADER5, HEADER6, PARAGRAPH, ORDERED_LIST, UNORDERED_LIST, LIST_ITEM, LIST_LIC, CHECK_LIST_ITEM, CODE_BLOCK, CODE_LINE, TABLE, TABLE_CELL, TABLE_ROW, LINK, SDOC_LINK, FILE_LINK, IMAGE, TOP_LEVEL_TYPES, INLINE_LEVEL_TYPES };
28
+ export { ELEMENT_TYPE, BLOCKQUOTE, TITLE, SUBTITLE, HEADER, HEADER1, HEADER2, HEADER3, HEADER4, HEADER5, HEADER6, PARAGRAPH, ORDERED_LIST, UNORDERED_LIST, LIST_ITEM, CHECK_LIST_ITEM, CODE_BLOCK, CODE_LINE, TABLE, TABLE_CELL, TABLE_ROW, LINK, SDOC_LINK, FILE_LINK, IMAGE, TOP_LEVEL_TYPES, INLINE_LEVEL_TYPES };
@@ -89,7 +89,6 @@ var formatElementNodes = function formatElementNodes(nodes) {
89
89
 
90
90
  // The following types will not appear individually during the pasting process
91
91
  // code_line
92
- // list_lic
93
92
  // table_row | table_cell
94
93
 
95
94
  // text | image | link
@@ -1,5 +1,5 @@
1
1
  import slugid from 'slugid';
2
- import { LIST_ITEM, LIST_LIC, ORDERED_LIST, UNORDERED_LIST } from '../../../constants';
2
+ import { LIST_ITEM, ORDERED_LIST, PARAGRAPH, UNORDERED_LIST } from '../../../constants';
3
3
  var PARAGRAPH_TAGS = ['DIV', 'P'];
4
4
  var listRule = function listRule(element, parseChild) {
5
5
  var nodeName = element.nodeName,
@@ -31,7 +31,7 @@ var listRule = function listRule(element, parseChild) {
31
31
  type: LIST_ITEM,
32
32
  children: [{
33
33
  id: slugid.nice(),
34
- type: LIST_LIC,
34
+ type: PARAGRAPH,
35
35
  children: parseChild(childNodes)
36
36
  }]
37
37
  };
@@ -39,7 +39,7 @@ var listRule = function listRule(element, parseChild) {
39
39
  if (PARAGRAPH_TAGS.includes(nodeName) && element.parentElement.nodeName === 'LI') {
40
40
  return {
41
41
  id: slugid.nice(),
42
- type: LIST_LIC,
42
+ type: PARAGRAPH,
43
43
  children: parseChild(childNodes)
44
44
  };
45
45
  }
@@ -2,7 +2,6 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
2
  import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
3
3
  import { Editor, Element, Node, Range, Text } from '@seafile/slate';
4
4
  import { CHECK_LIST_ITEM, CODE_BLOCK, CODE_LINE, LIST_ITEM, PARAGRAPH, TABLE } from '../../constants';
5
- import { isRangeAcrossBlocks } from '../../core';
6
5
  import { toggleList } from './transforms';
7
6
  import { getListTypes } from './queries';
8
7
  export var isMenuDisabled = function isMenuDisabled(editor, readonly) {
@@ -1,7 +1,7 @@
1
1
  import _createClass from "@babel/runtime/helpers/esm/createClass";
2
2
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
3
  import slugid from 'slugid';
4
- import { LIST_ITEM, LIST_LIC, UNORDERED_LIST } from '../../constants';
4
+ import { LIST_ITEM, PARAGRAPH, UNORDERED_LIST } from '../../constants';
5
5
  import { generateEmptyElement } from '../../core';
6
6
  var List = /*#__PURE__*/_createClass(function List(options) {
7
7
  _classCallCheck(this, List);
@@ -18,8 +18,8 @@ export var generateEmptyListItem = function generateEmptyListItem() {
18
18
  children: []
19
19
  };
20
20
  };
21
- export var generateEmptyListLic = function generateEmptyListLic() {
22
- return generateEmptyElement(LIST_LIC);
21
+ export var generateEmptyListContent = function generateEmptyListContent() {
22
+ return generateEmptyElement(PARAGRAPH);
23
23
  };
24
24
  export var generateEmptyList = function generateEmptyList(type) {
25
25
  return {
@@ -3,7 +3,7 @@ import _toArray from "@babel/runtime/helpers/esm/toArray";
3
3
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
4
  import { Element, Path, Transforms, Node, Editor } from '@seafile/slate';
5
5
  import slugid from 'slugid';
6
- import { LIST_ITEM, LIST_LIC } from '../../../constants';
6
+ import { LIST_ITEM, PARAGRAPH } from '../../../constants';
7
7
  import { findNode, generateDefaultText, getCommonNode, getNode, getNodes } from '../../../core';
8
8
  import { getListTypes } from '../queries';
9
9
  var isListRoot = function isListRoot(node) {
@@ -20,7 +20,7 @@ var getFirstAncestorOfType = function getFirstAncestorOfType(root, entry, _ref)
20
20
  var findListItemsWithContent = function findListItemsWithContent(first) {
21
21
  var prev = null;
22
22
  var node = first;
23
- while (isListRoot(node) || node.type === LIST_ITEM && node.children[0].type !== LIST_LIC) {
23
+ while (isListRoot(node) || node.type === LIST_ITEM && node.children[0].type !== PARAGRAPH) {
24
24
  prev = node;
25
25
  var _node$children = _slicedToArray(node.children, 1);
26
26
  node = _node$children[0];
@@ -63,7 +63,7 @@ var isSingleLic = function isSingleLic(fragment) {
63
63
  }).filter(function (_ref4) {
64
64
  var _ref5 = _slicedToArray(_ref4, 1),
65
65
  node = _ref5[0];
66
- return node.type === LIST_LIC;
66
+ return node.type === PARAGRAPH;
67
67
  }).length === 1;
68
68
  };
69
69
  export var getTextAndListItemNodes = function getTextAndListItemNodes(editor, fragment, liEntry, licEntry) {
@@ -159,7 +159,7 @@ export var insertFragmentList = function insertFragmentList(editor) {
159
159
  });
160
160
  var licEntry = findNode(editor, {
161
161
  match: {
162
- type: LIST_LIC
162
+ type: PARAGRAPH
163
163
  },
164
164
  mode: 'lowest'
165
165
  });
@@ -1,6 +1,6 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
- import { Node, Element, Transforms, Path } from '@seafile/slate';
3
- import { LIST_ITEM, LIST_LIC, PARAGRAPH } from '../../../constants';
2
+ import { Element, Transforms, Path } from '@seafile/slate';
3
+ import { LIST_ITEM } from '../../../constants';
4
4
  import { getChildren, getNode, getPreviousPath, match } from '../../../core';
5
5
  import { getListTypes } from '../queries';
6
6
  import { moveListItemsToList, normalizeListItem, normalizeNestedList } from '../transforms';
@@ -71,17 +71,6 @@ export var normalizeList = function normalizeList(editor) {
71
71
  return;
72
72
  }
73
73
  }
74
- if (node.type === LIST_LIC && LIST_LIC !== PARAGRAPH) {
75
- var _node = Node.parent(editor, path);
76
- if ((_node === null || _node === void 0 ? void 0 : _node.type) !== LIST_ITEM) {
77
- Transforms.setNodes(editor, {
78
- type: PARAGRAPH
79
- }, {
80
- at: path
81
- });
82
- return;
83
- }
84
- }
85
74
  normalizeNode([node, path]);
86
75
  };
87
76
  };
@@ -1,18 +1,20 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import { Transforms, Editor, Path, Range } from '@seafile/slate';
4
- import { LIST_ITEM, LIST_LIC } from '../../../constants';
4
+ import { LIST_ITEM, PARAGRAPH } from '../../../constants';
5
5
  import { getAboveNode, isBlockTextEmptyAfterSelection, isStartPoint } from '../../../core';
6
- import { generateEmptyListItem, generateEmptyListLic } from '../model';
6
+ import { generateEmptyListContent, generateEmptyListItem } from '../model';
7
+
8
+ // list > list_item > paragraph
7
9
  export var insertListItem = function insertListItem(editor) {
8
- var licEntry = getAboveNode(editor, {
10
+ var paragraphEntry = getAboveNode(editor, {
9
11
  match: {
10
- type: LIST_LIC
12
+ type: PARAGRAPH
11
13
  }
12
14
  });
13
- if (!licEntry) return false;
14
- var _licEntry = _slicedToArray(licEntry, 2),
15
- paragraphPath = _licEntry[1];
15
+ if (!paragraphEntry) return false;
16
+ var _paragraphEntry = _slicedToArray(paragraphEntry, 2),
17
+ paragraphPath = _paragraphEntry[1];
16
18
  var listItemEntry = Editor.parent(editor, paragraphPath);
17
19
  if (!listItemEntry) return false;
18
20
  var _listItemEntry = _slicedToArray(listItemEntry, 2),
@@ -34,8 +36,8 @@ export var insertListItem = function insertListItem(editor) {
34
36
  var nextListItemPath = Path.next(listItemPath);
35
37
  if (_isStartPoint) {
36
38
  // listItem 有内容,光标在开始
37
- var licItem = generateEmptyListLic();
38
- Transforms.insertNodes(editor, licItem, {
39
+ var itemContent = generateEmptyListContent();
40
+ Transforms.insertNodes(editor, itemContent, {
39
41
  at: listItemPath
40
42
  });
41
43
  var listItem = generateEmptyListItem();
@@ -65,8 +67,8 @@ export var insertListItem = function insertListItem(editor) {
65
67
  var _Editor$marks;
66
68
  // listItem 有内容,光标在结尾
67
69
  var marks = (_Editor$marks = Editor.marks(editor)) === null || _Editor$marks === void 0 ? void 0 : _Editor$marks.key;
68
- var _licItem = generateEmptyListLic();
69
- Transforms.insertNodes(editor, _objectSpread(_objectSpread({}, _licItem), marks), {
70
+ var _itemContent = generateEmptyListContent();
71
+ Transforms.insertNodes(editor, _objectSpread(_objectSpread({}, _itemContent), marks), {
70
72
  at: nextListItemPath
71
73
  });
72
74
  var _listItem2 = generateEmptyListItem();
@@ -1,5 +1,5 @@
1
1
  import { Editor, Path } from '@seafile/slate';
2
- import { LIST_LIC } from '../../../constants';
2
+ import { PARAGRAPH } from '../../../constants';
3
3
  import { getNodeEntries } from '../../../core';
4
4
  import { isListNested } from '../queries';
5
5
  import { movedListItemDown } from './move-list-item-down';
@@ -15,7 +15,7 @@ export var moveListItems = function moveListItems(editor) {
15
15
  var _nodes = getNodeEntries(editor, {
16
16
  at: at,
17
17
  match: {
18
- type: [LIST_LIC]
18
+ type: [PARAGRAPH]
19
19
  }
20
20
  });
21
21
  var lics = Array.from(_nodes);
@@ -2,15 +2,15 @@ import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIt
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
4
4
  import { Transforms, Editor, Path, Element } from '@seafile/slate';
5
- import { LIST_LIC } from '../../../constants';
5
+ import { PARAGRAPH } from '../../../constants';
6
6
  import { getChildren, getDeepInlineChildren, match } from '../../../core';
7
7
  import { getListTypes } from '../queries';
8
8
  import { movedListItemUp } from './move-list-item-up';
9
- import { generateEmptyListLic } from '../model';
9
+ import { generateEmptyListContent } from '../model';
10
10
  export var normalizeListItem = function normalizeListItem(editor, _ref) {
11
11
  var listItem = _ref.listItem;
12
12
  var changed = false;
13
- var validLiChildrenTypes = [].concat(_toConsumableArray(getListTypes()), [LIST_LIC]);
13
+ var validLiChildrenTypes = [].concat(_toConsumableArray(getListTypes()), [PARAGRAPH]);
14
14
  var _listItem = _slicedToArray(listItem, 2),
15
15
  liPath = _listItem[1];
16
16
  var liChildren = getChildren(listItem);
@@ -29,14 +29,14 @@ export var normalizeListItem = function normalizeListItem(editor, _ref) {
29
29
  firstLiChildNode = _ref7[0],
30
30
  firstLiChildPath = _ref7[1];
31
31
  if (!firstLiChild || !Editor.isBlock(editor, firstLiChildNode)) {
32
- var emptyLic = generateEmptyListLic();
33
- Transforms.insertNodes(editor, emptyLic, {
32
+ var itemContent = generateEmptyListContent();
33
+ Transforms.insertNodes(editor, itemContent, {
34
34
  at: liPath.concat([0])
35
35
  });
36
36
  return true;
37
37
  }
38
38
  if (Editor.isBlock(editor, firstLiChildNode) && !match(firstLiChildNode, [], {
39
- type: [LIST_LIC]
39
+ type: [PARAGRAPH]
40
40
  })) {
41
41
  if (match(firstLiChildNode, [], {
42
42
  type: getListTypes()
@@ -59,7 +59,7 @@ export var normalizeListItem = function normalizeListItem(editor, _ref) {
59
59
  return true;
60
60
  }
61
61
  Transforms.setNodes(editor, {
62
- type: LIST_LIC
62
+ type: PARAGRAPH
63
63
  }, {
64
64
  at: firstLiChildPath
65
65
  });
@@ -1,25 +1,23 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import { Node, Range, Transforms, Element, Editor } from '@seafile/slate';
4
- import { LIST_ITEM, LIST_LIC, PARAGRAPH, INSERT_POSITION } from '../../../constants';
5
- import { findNode, getNodeEntries, getNodeType, getSelectedNodeEntryByType, isRangeAcrossBlocks, generateEmptyElement } from '../../../core';
4
+ import { LIST_ITEM, PARAGRAPH, INSERT_POSITION } from '../../../constants';
5
+ import { findNode, getNodeEntries, getNodeType, getSelectedNodeEntryByType, isRangeAcrossBlocks } from '../../../core';
6
6
  import { getListItemEntry, getListTypes } from '../queries';
7
7
  import { unwrapList } from './unwrap-list';
8
- import { generateEmptyList, generateEmptyListItem } from '../model';
8
+ import { generateEmptyList, generateEmptyListContent, generateEmptyListItem } from '../model';
9
9
  var wrapLineList = function wrapLineList(editor, type) {
10
10
  var list = generateEmptyList(type);
11
11
  Transforms.wrapNodes(editor, list);
12
12
  var nodeEntry = getSelectedNodeEntryByType(editor, PARAGRAPH);
13
13
  if (!nodeEntry) return;
14
+
15
+ // select is paragraph
16
+ // 1 handle paragraph
17
+
18
+ // 2 wrap list_item
14
19
  var _nodeEntry = _slicedToArray(nodeEntry, 2),
15
- node = _nodeEntry[0],
16
20
  path = _nodeEntry[1];
17
- if (node.type !== LIST_LIC) {
18
- // paragraph to list-lic
19
- Transforms.setNodes(editor, {
20
- type: LIST_LIC
21
- });
22
- }
23
21
  var listItem = generateEmptyListItem();
24
22
  Transforms.wrapNodes(editor, listItem, {
25
23
  at: path
@@ -91,17 +89,16 @@ var wrapRangeList = function wrapRangeList(editor, type) {
91
89
  mode: 'all'
92
90
  });
93
91
  } else {
94
- if (![LIST_LIC].includes(n[0].type)) {
95
- Transforms.setNodes(editor, {
96
- type: LIST_LIC
97
- }, {
98
- at: n[1]
99
- });
100
- }
92
+ // select content is paragraph
93
+ // 1 handle content
94
+
95
+ // 2. wrap list_item
101
96
  var listItem = generateEmptyListItem();
102
97
  Transforms.wrapNodes(editor, listItem, {
103
98
  at: n[1]
104
99
  });
100
+
101
+ // 3. wrap list
105
102
  var list = generateEmptyList(type);
106
103
  Transforms.wrapNodes(editor, list, {
107
104
  at: n[1]
@@ -113,9 +110,9 @@ var wrapRangeList = function wrapRangeList(editor, type) {
113
110
  var toggleList = function toggleList(editor, type, insertPosition) {
114
111
  if (insertPosition === INSERT_POSITION.AFTER) {
115
112
  var list = generateEmptyList(type);
116
- var p = generateEmptyElement(PARAGRAPH);
113
+ var listContent = generateEmptyListContent();
117
114
  var path = Editor.path(editor, editor.selection);
118
- Transforms.insertNodes(editor, p, {
115
+ Transforms.insertNodes(editor, listContent, {
119
116
  at: [path[0] + 1]
120
117
  });
121
118
  Transforms.select(editor, [path[0] + 1]);
@@ -1,6 +1,6 @@
1
1
  import { Editor, Transforms, Element, Node } from '@seafile/slate';
2
- import { LIST_ITEM, LIST_LIC, PARAGRAPH } from '../../../constants';
3
- import { getAboveBlockNode, getAboveNode, getNodeType } from '../../../core';
2
+ import { LIST_ITEM } from '../../../constants';
3
+ import { getAboveNode, getNodeType } from '../../../core';
4
4
  import { getListTypes } from '../queries';
5
5
  export var unwrapList = function unwrapList(editor) {
6
6
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
@@ -25,17 +25,7 @@ export var unwrapList = function unwrapList(editor) {
25
25
  };
26
26
  Editor.withoutNormalizing(editor, function () {
27
27
  do {
28
- var licEntry = getAboveBlockNode(editor, {
29
- at: at,
30
- match: {
31
- type: LIST_LIC
32
- }
33
- });
34
- if (licEntry) {
35
- Transforms.setNodes(editor, {
36
- type: PARAGRAPH
37
- });
38
- }
28
+ // unwrap list_item
39
29
  Transforms.unwrapNodes(editor, {
40
30
  at: at,
41
31
  match: function match(n) {
@@ -43,6 +33,8 @@ export var unwrapList = function unwrapList(editor) {
43
33
  },
44
34
  split: true
45
35
  });
36
+
37
+ // unwrap list
46
38
  Transforms.unwrapNodes(editor, {
47
39
  at: at,
48
40
  match: function match(n) {
@@ -31,7 +31,6 @@ export var isTableMenuDisabled = function isTableMenuDisabled(editor, readonly)
31
31
  if (type === ELEMENT_TYPE.UNORDERED_LIST) return true;
32
32
  if (type === ELEMENT_TYPE.BLOCKQUOTE) return true;
33
33
  if (type === ELEMENT_TYPE.LIST_ITEM) return true;
34
- if (type === ELEMENT_TYPE.LIST_LIC) return true;
35
34
  if (type === ELEMENT_TYPE.TABLE) return true;
36
35
  if (type === ELEMENT_TYPE.TABLE_CELL) return true;
37
36
  if (type === ELEMENT_TYPE.TABLE_ROW) return true;
@@ -2,7 +2,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import { useCallback } from 'react';
4
4
  import { useSlateStatic } from '@seafile/slate-react';
5
- import { BLOCKQUOTE, LINK, CHECK_LIST_ITEM, HEADER1, HEADER2, HEADER3, HEADER4, HEADER5, HEADER6, LIST_ITEM, LIST_LIC, ORDERED_LIST, PARAGRAPH, UNORDERED_LIST, CODE_BLOCK, CODE_LINE, IMAGE, ELEMENT_TYPE, SDOC_LINK, FILE_LINK, TITLE, SUBTITLE } from '../constants';
5
+ import { BLOCKQUOTE, LINK, CHECK_LIST_ITEM, HEADER1, HEADER2, HEADER3, HEADER4, HEADER5, HEADER6, LIST_ITEM, ORDERED_LIST, PARAGRAPH, UNORDERED_LIST, CODE_BLOCK, CODE_LINE, IMAGE, ELEMENT_TYPE, SDOC_LINK, FILE_LINK, TITLE, SUBTITLE } from '../constants';
6
6
  import { BlockquotePlugin, LinkPlugin, CheckListPlugin, HeaderPlugin, ListPlugin, CodeBlockPlugin, ImagePlugin, TablePlugin, SdocLinkPlugin, ParagraphPlugin, FileLinkPlugin } from '../plugins';
7
7
  import EventBus from '../../utils/event-bus';
8
8
  import { INTERNAL_EVENT } from '../../constants';
@@ -19,9 +19,15 @@ var CustomRenderElement = function CustomRenderElement(props) {
19
19
  switch (element.type) {
20
20
  case PARAGRAPH:
21
21
  {
22
+ var parentNode = getParentNode(editor.children, element.id);
23
+ if (parentNode && parentNode.type === LIST_ITEM) {
24
+ var _ParagraphPlugin$rend = _slicedToArray(ParagraphPlugin.renderElements, 1),
25
+ _renderParagraph = _ParagraphPlugin$rend[0];
26
+ return _renderParagraph(props);
27
+ }
22
28
  attributes['onMouseEnter'] = onMouseEnter;
23
- var _ParagraphPlugin$rend = _slicedToArray(ParagraphPlugin.renderElements, 1),
24
- renderParagraph = _ParagraphPlugin$rend[0];
29
+ var _ParagraphPlugin$rend2 = _slicedToArray(ParagraphPlugin.renderElements, 1),
30
+ renderParagraph = _ParagraphPlugin$rend2[0];
25
31
  return renderParagraph(props);
26
32
  }
27
33
  case TITLE:
@@ -76,12 +82,6 @@ var CustomRenderElement = function CustomRenderElement(props) {
76
82
  renderListItem = _ListPlugin$renderEle2[1];
77
83
  return renderListItem(props, editor);
78
84
  }
79
- case LIST_LIC:
80
- {
81
- var _ListPlugin$renderEle3 = _slicedToArray(ListPlugin.renderElements, 3),
82
- renderListLic = _ListPlugin$renderEle3[2];
83
- return renderListLic(props, editor);
84
- }
85
85
  case CHECK_LIST_ITEM:
86
86
  {
87
87
  attributes['onMouseEnter'] = onMouseEnter;
@@ -105,8 +105,8 @@ var CustomRenderElement = function CustomRenderElement(props) {
105
105
  case IMAGE:
106
106
  {
107
107
  var _editor$element_comme;
108
- var parentNode = getParentNode(editor.children, element.id);
109
- var comments = ((_editor$element_comme = editor.element_comments_map) === null || _editor$element_comme === void 0 ? void 0 : _editor$element_comme[parentNode.id]) || [];
108
+ var _parentNode = getParentNode(editor.children, element.id);
109
+ var comments = ((_editor$element_comme = editor.element_comments_map) === null || _editor$element_comme === void 0 ? void 0 : _editor$element_comme[_parentNode.id]) || [];
110
110
  var unresolvedComments = comments && comments.filter(function (item) {
111
111
  return !item.resolved;
112
112
  });
@@ -153,9 +153,9 @@ var CustomRenderElement = function CustomRenderElement(props) {
153
153
  }
154
154
  default:
155
155
  {
156
- var _ParagraphPlugin$rend2 = _slicedToArray(ParagraphPlugin.renderElements, 1),
157
- _renderParagraph = _ParagraphPlugin$rend2[0];
158
- return _renderParagraph(props);
156
+ var _ParagraphPlugin$rend3 = _slicedToArray(ParagraphPlugin.renderElements, 1),
157
+ _renderParagraph2 = _ParagraphPlugin$rend3[0];
158
+ return _renderParagraph2(props);
159
159
  }
160
160
  }
161
161
  };
@@ -143,6 +143,10 @@ var SocketClient = /*#__PURE__*/_createClass(function SocketClient(config) {
143
143
  var socketManager = SocketManager.getInstance();
144
144
  socketManager.receiveRemoveDocumentError();
145
145
  };
146
+ this.receiveNewNotification = function (notification) {
147
+ var socketManager = SocketManager.getInstance();
148
+ socketManager.receiveNewNotification(notification);
149
+ };
146
150
  this.config = config;
147
151
  this.isReconnect = false;
148
152
  this.socket = io(config.sdocServer, {
@@ -170,6 +174,9 @@ var SocketClient = /*#__PURE__*/_createClass(function SocketClient(config) {
170
174
  this.socket.on('doc-removed', this.receiveRemoveDocument);
171
175
  this.socket.on('doc-removed-error', this.receiveRemoveDocumentError);
172
176
  this.socket.on('update-cursor', this.receiveCursorLocation);
177
+
178
+ // notification
179
+ this.socket.on('new-notification', this.receiveNewNotification);
173
180
  this.socket.io.on('reconnect', this.onReconnect);
174
181
  this.socket.io.on('reconnect_attempt', this.onReconnectAttempt);
175
182
  this.socket.io.on('reconnect_error', this.onReconnectError);
@@ -48,6 +48,9 @@ var SocketManager = /*#__PURE__*/_createClass(function SocketManager(editor, _do
48
48
  this.receiveDocumentReplacedError = function () {
49
49
  _this.eventBus.dispatch(EXTERNAL_EVENT.DOCUMENT_REPLACED_ERROR);
50
50
  };
51
+ this.receiveNewNotification = function (notification) {
52
+ _this.eventBus.dispatch(EXTERNAL_EVENT.NEW_NOTIFICATION, notification);
53
+ };
51
54
  this.onReceiveLocalOperations = function (operations) {
52
55
  _this.pendingOperationList.push(operations);
53
56
  var lastOpBeginTime = new Date().getTime();
@@ -9,6 +9,7 @@ import CommentsOperation from './comments-operation';
9
9
  import ShareOperation from './share-operation';
10
10
  import TagOperation from './tag-operation';
11
11
  import { isMobile } from '../../utils';
12
+ import NotificationOperation from './notifications-operation';
12
13
  import './style.css';
13
14
  var DocOperations = function DocOperations(_ref) {
14
15
  var isShowChanges = _ref.isShowChanges,
@@ -33,6 +34,6 @@ var DocOperations = function DocOperations(_ref) {
33
34
  handleViewChangesToggle: handleViewChangesToggle,
34
35
  handleRevisionMerged: handleRevisionMerged,
35
36
  handleRevisionPublished: handleRevisionPublished
36
- }), !isPublished && /*#__PURE__*/React.createElement(TagOperation, null), !isPublished && /*#__PURE__*/React.createElement(CommentsOperation, null), !isSdocRevision && /*#__PURE__*/React.createElement(ShareOperation, null), /*#__PURE__*/React.createElement(HistoryOperation, null), !isPublished && /*#__PURE__*/React.createElement(CollaboratorsOperation, null), !isSdocRevision && /*#__PURE__*/React.createElement(MoreOperations, null));
37
+ }), !isPublished && /*#__PURE__*/React.createElement(TagOperation, null), !isPublished && /*#__PURE__*/React.createElement(NotificationOperation, null), !isPublished && /*#__PURE__*/React.createElement(CommentsOperation, null), !isSdocRevision && /*#__PURE__*/React.createElement(ShareOperation, null), /*#__PURE__*/React.createElement(HistoryOperation, null), !isPublished && /*#__PURE__*/React.createElement(CollaboratorsOperation, null), !isSdocRevision && /*#__PURE__*/React.createElement(MoreOperations, null));
37
38
  };
38
39
  export default withTranslation('sdoc-editor')(DocOperations);
@@ -0,0 +1,14 @@
1
+ .sdoc-notification-icon-container .sdoc-notification-count {
2
+ position: absolute;
3
+ color: #fff;
4
+ font-size: 12px;
5
+ top: -7px;
6
+ right: -6px;
7
+ padding: 2px;
8
+ background: #fc6440;
9
+ border-radius: 50%;
10
+ min-width: 20px;
11
+ min-height: 20px;
12
+ transform: scale(.7);
13
+ text-align: center;
14
+ }