@seafile/sdoc-editor 2.0.132 → 2.0.134

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.
@@ -55,7 +55,7 @@ var SelectSdocFileDialog = function SelectSdocFileDialog(_ref) {
55
55
  modalTitle = 'Select_video_file';
56
56
  break;
57
57
  case _constants.ELEMENT_TYPE.WHITEBOARD:
58
- modalTitle = 'Select_Excalidraw_document';
58
+ modalTitle = 'Select_Excalidraw_file';
59
59
  break;
60
60
  default:
61
61
  break;
@@ -87,7 +87,7 @@ function AIModule(_ref) {
87
87
  var selectElements = (0, _helpers.handleSelectElements)(editor);
88
88
  var _content = '';
89
89
  if (selectElements) {
90
- if ((0, _helpers.validateNestedStructure)(selectElements[0])) {
90
+ if (selectElements.length === 1 && (0, _helpers.validateNestedStructure)(selectElements[0])) {
91
91
  // list.length === 1
92
92
  _content = window.getSelection().toString();
93
93
  } else {
@@ -51,9 +51,9 @@ var WhiteboardMenu = function WhiteboardMenu(_ref) {
51
51
  }, /*#__PURE__*/_react["default"].createElement("div", {
52
52
  className: "sdoc-dropdown-menu-item",
53
53
  onClick: openSelectWhiteboardFileDialog
54
- }, t('Select_Excalidraw_document')), /*#__PURE__*/_react["default"].createElement("div", {
54
+ }, t('Select_Excalidraw_file')), /*#__PURE__*/_react["default"].createElement("div", {
55
55
  className: "sdoc-dropdown-menu-item",
56
56
  onClick: onCreateFile
57
- }, t('Create_new_excalidraw')))));
57
+ }, t('New_Excalidraw_file')))));
58
58
  };
59
59
  var _default = exports["default"] = WhiteboardMenu;
@@ -5,7 +5,12 @@
5
5
  min-width: 360px;
6
6
  position: relative;
7
7
  right: 0;
8
- animation: rightdrawer .3s 1ms;
8
+ margin-right: -360px;
9
+ transition: margin-right .3s ease-in-out;
10
+ }
11
+
12
+ .sdoc-content-right-panel-wrapper.open {
13
+ margin-right: 0;
9
14
  }
10
15
 
11
16
  .sdoc-content-right-panel-wrapper .sdoc-content-right-panel {
@@ -14,13 +19,3 @@
14
19
  overflow: hidden;
15
20
  border-left: 1px solid #d8d8d8;
16
21
  }
17
-
18
- @keyframes rightdrawer {
19
- 0% {
20
- transform: translate(100%);
21
- }
22
-
23
- 100% {
24
- transform: translate(0);
25
- }
26
- }
@@ -60,12 +60,15 @@ var RightPanel = function RightPanel(_ref) {
60
60
  (0, _react.useEffect)(function () {
61
61
  var isShowGlobalComments = displayPluginName === 'sdoc-comment' ? true : false;
62
62
  var commentBox = document.querySelector('.sdoc-content-right-panel-wrapper');
63
- var editorEl = document.querySelector('#sdoc-scroll-container');
63
+ var editorEl = document.querySelector('.sdoc-scroll-container');
64
64
  var commentWidth = commentBox === null || commentBox === void 0 ? void 0 : commentBox.offsetWidth;
65
- editorEl.scrollTo({
66
- left: commentWidth + 36,
67
- behavior: 'smooth'
68
- });
65
+ commentBox === null || commentBox === void 0 ? void 0 : commentBox.classList.add('open');
66
+ setTimeout(function () {
67
+ editorEl.scrollTo({
68
+ left: commentWidth + 36,
69
+ behavior: 'smooth'
70
+ });
71
+ }, 300);
69
72
  var settings = _localStorageUtils["default"].getItem(_constants.SDOC_STORAGE) || {};
70
73
  _localStorageUtils["default"].setItem(_constants.SDOC_STORAGE, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, settings), {}, {
71
74
  isShowGlobalComments: isShowGlobalComments
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "2.0.132",
3
+ "version": "2.0.134",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -70,5 +70,5 @@
70
70
  "publishConfig": {
71
71
  "access": "public"
72
72
  },
73
- "gitHead": "7d4ba52369aee54fc7bbd9f59e4eb415411ee113"
73
+ "gitHead": "5ab8c21594b1d82f829e8d8fe6fa39954e2ed463"
74
74
  }