@seafile/seafile-editor 0.3.94 → 0.3.96-test-2

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.
@@ -25,12 +25,6 @@ var CommentPanel = /*#__PURE__*/function (_React$Component) {
25
25
 
26
26
  _this = _super.call(this, props);
27
27
 
28
- _this.toggleResolvedComment = function () {
29
- _this.setState({
30
- showResolvedComment: !_this.state.showResolvedComment
31
- });
32
- };
33
-
34
28
  _this.listComments = function (isScroll) {
35
29
  _this.props.editorApi.listComments().then(function (res) {
36
30
  _this.setState({
@@ -178,25 +172,8 @@ var CommentPanel = /*#__PURE__*/function (_React$Component) {
178
172
  var participants = this.props.participants;
179
173
  return /*#__PURE__*/React.createElement("div", {
180
174
  className: "seafile-comment"
181
- }, /*#__PURE__*/React.createElement("div", {
182
- className: "seafile-comment-toggle-resolved"
183
- }, /*#__PURE__*/React.createElement("div", {
184
- className: 'seafile-comment-title-text'
185
- }, t('Show_resolved_comments')), /*#__PURE__*/React.createElement("div", {
186
- className: 'seafile-comment-title-toggle d-flex'
187
- }, /*#__PURE__*/React.createElement("label", {
188
- className: "custom-switch",
189
- id: "toggle-resolved-comments"
190
- }, /*#__PURE__*/React.createElement("input", {
191
- type: "checkbox",
192
- name: "option",
193
- className: "custom-switch-input",
194
- onChange: this.toggleResolvedComment,
195
- checked: this.state.showResolvedComment && 'checked'
196
- }), /*#__PURE__*/React.createElement("span", {
197
- className: "custom-switch-indicator"
198
- })))), /*#__PURE__*/React.createElement("ul", {
199
- className: window.showParticipants ? 'seafile-comment-list show-participants' : 'seafile-comment-list',
175
+ }, /*#__PURE__*/React.createElement("ul", {
176
+ className: "flex-fill seafile-comment-list ".concat(window.showParticipants ? 'show-participants' : ''),
200
177
  ref: "commentsList"
201
178
  }, this.state.commentsList.length > 0 && this.state.commentsList.map(function (item) {
202
179
  var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
@@ -219,7 +196,7 @@ var CommentPanel = /*#__PURE__*/function (_React$Component) {
219
196
  }), this.state.commentsList.length === 0 && /*#__PURE__*/React.createElement("li", {
220
197
  className: "comment-vacant"
221
198
  }, t('no_comment_yet'))), /*#__PURE__*/React.createElement("div", {
222
- className: "seafile-comment-footer"
199
+ className: "seafile-comment-footer flex-shrink-0"
223
200
  }, participants && window.showParticipants && /*#__PURE__*/React.createElement(ParticipantsList, {
224
201
  openDialogs: this.props.openDialogs,
225
202
  participants: participants,
@@ -248,12 +225,14 @@ var CommentPanel = /*#__PURE__*/function (_React$Component) {
248
225
  clos: "100",
249
226
  rows: "3",
250
227
  warp: "virtual"
251
- }), /*#__PURE__*/React.createElement(Button, {
228
+ }), /*#__PURE__*/React.createElement("div", {
229
+ className: "comment-submit-container"
230
+ }, /*#__PURE__*/React.createElement(Button, {
252
231
  className: "submit-comment",
253
232
  color: "primary",
254
233
  size: "sm",
255
234
  onClick: this.onSubmit
256
- }, t('submit'))));
235
+ }, t('submit')))));
257
236
  }
258
237
  }]);
259
238
 
@@ -59,11 +59,9 @@ var DetailListView = /*#__PURE__*/function (_React$Component) {
59
59
  var _this$props = this.props,
60
60
  fileTagList = _this$props.fileTagList,
61
61
  fileInfo = _this$props.fileInfo;
62
- var _this$props$editorApi = this.props.editorApi,
63
- filePath = _this$props$editorApi.filePath,
64
- serviceUrl = _this$props$editorApi.serviceUrl;
62
+ var filePath = this.props.editorApi.filePath;
65
63
  return /*#__PURE__*/React.createElement("div", {
66
- className: "dirent-table-container"
64
+ className: "dirent-table-container p-2"
67
65
  }, /*#__PURE__*/React.createElement("table", {
68
66
  className: "table-thead-hidden"
69
67
  }, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", {
@@ -109,7 +109,7 @@ var OutlineView = /*#__PURE__*/function (_React$PureComponent2) {
109
109
 
110
110
  var headerList = this.state.headerList;
111
111
  return /*#__PURE__*/React.createElement("div", {
112
- className: "seafile-editor-outline"
112
+ className: "seafile-editor-outline py-2 pr-4"
113
113
  }, headerList && headerList.length > 0 ? headerList.map(function (node, index) {
114
114
  return /*#__PURE__*/React.createElement(OutlineItem, {
115
115
  key: index,
@@ -116,9 +116,9 @@ var SidePanel = /*#__PURE__*/function (_React$PureComponent) {
116
116
  }
117
117
 
118
118
  return /*#__PURE__*/React.createElement("div", {
119
- className: "side-panel"
119
+ className: "side-panel d-flex flex-column"
120
120
  }, /*#__PURE__*/React.createElement("ul", {
121
- className: "nav justify-content-center"
121
+ className: "flex-shrink-0 nav justify-content-around bg-white"
122
122
  }, /*#__PURE__*/React.createElement("li", {
123
123
  className: "nav-item"
124
124
  }, /*#__PURE__*/React.createElement("a", {
@@ -144,7 +144,7 @@ var SidePanel = /*#__PURE__*/function (_React$PureComponent) {
144
144
  }, /*#__PURE__*/React.createElement("i", {
145
145
  className: 'iconfont icon-comment'
146
146
  })))), /*#__PURE__*/React.createElement("div", {
147
- className: "side-panel-content"
147
+ className: "side-panel-content flex-fill"
148
148
  }, this.state.navItem === 'outline' && /*#__PURE__*/React.createElement(OutlineView, {
149
149
  editor: this.props.editor,
150
150
  document: this.props.document,
@@ -102,4 +102,4 @@
102
102
  .article .diff-replaced .new-paragraph {
103
103
  background-color: #e6ffed;
104
104
  margin-top: 0;
105
- }
105
+ }
@@ -1,5 +1,5 @@
1
1
  .keyboard-shortcut-dialog {
2
- max-width: 560px;
2
+ max-width: 500px;
3
3
  }
4
4
 
5
5
  .keyboard-shortcut-dialog .modal-body {
@@ -73,4 +73,4 @@
73
73
  .sf-files-tag .file-tag-name {
74
74
  margin-left: 5px;
75
75
  white-space: nowrap;
76
- }
76
+ }
@@ -66,4 +66,4 @@
66
66
  .seafile-md-viewer-content {
67
67
  padding: 20px;
68
68
  }
69
- }
69
+ }
@@ -34,14 +34,15 @@ var defaultStyle = {
34
34
  minHeight: 90,
35
35
  height: 90,
36
36
  border: '1px solid #e6e6dd',
37
- borderRadius: '5px',
37
+ borderBottom: 'none',
38
+ borderRadius: '5px 5px 0 0',
38
39
  overfflowY: 'auto',
39
40
  '&focused': {
40
41
  backgroundColor: '#cee4e5',
41
42
  outlineOffset: '-2px',
42
43
  outlineColor: '-webkit-focus-ring-color',
43
44
  outlineStyle: 'auto',
44
- outlineWidth: '5px'
45
+ outlineWidth: '0px'
45
46
  }
46
47
  }
47
48
  },
@@ -1,30 +1,10 @@
1
1
  .seafile-comment {
2
2
  display: flex;
3
3
  flex-direction: column;
4
- position: relative;
5
4
  height: 100%;
6
- margin-top: -8px;
7
- margin-bottom: -8px;
8
- }
9
- .seafile-comment-toggle-resolved {
10
- width: 100%;
11
- border-bottom: 1px solid #e5e5e5;
12
- padding: 5px 10px;
13
- display: flex;
14
- position: absolute;
15
- justify-content: space-between;
16
- background-color: #fff;
17
5
  }
18
6
  .seafile-comment-list {
19
- height: calc(100% - 135px);
20
- margin-bottom: 135px;
21
- margin-top: 32px;
22
7
  overflow-y: auto;
23
- background-color: #fff;
24
- }
25
- .seafile-comment-list.show-participants {
26
- height: calc(100% - 165px);
27
- margin-bottom: 155px;
28
8
  }
29
9
  .seafile-comment-list .comment-vacant {
30
10
  padding: 1em;
@@ -71,6 +51,9 @@
71
51
  }
72
52
  .seafile-comment-item .seafile-comment-content {
73
53
  margin-left: 42px;
54
+ padding: 5px 10px;
55
+ border-radius: 4px;
56
+ background: #fff;
74
57
  }
75
58
  .seafile-comment-item .seafile-comment-content p {
76
59
  word-break: break-all;
@@ -92,16 +75,12 @@
92
75
  background-color: #e6ffed;
93
76
  }
94
77
  .seafile-comment-footer {
95
- background-color: #fafaf9;
96
78
  padding: 10px 10px;
97
79
  border-top: 1px solid #e5e5e5;
98
80
  display: flex;
99
81
  flex-direction: column;
100
82
  min-height: 150px;
101
83
  max-height: 300px;
102
- position: absolute;
103
- bottom: -16px;
104
- width: 100%;
105
84
  }
106
85
  .seafile-comment-footer .add-comment-input,
107
86
  .seafile-edit-comment .edit-comment-input {
@@ -112,11 +91,32 @@
112
91
  background-color: #fff;
113
92
  width: 100%;
114
93
  }
94
+ .seafile-comment-footer .add-comment-input {
95
+ border-bottom: none;
96
+ border-radius: 5px 5px 0 0;
97
+ }
98
+ .seafile-comment-footer .add-comment-input:focus {
99
+ outline: none;
100
+ }
101
+ .seafile-comment-footer .comment-submit-container {
102
+ border: 1px solid #e6e6dd;
103
+ border-top: none;
104
+ border-radius: 0 0 5px 5px;
105
+ padding: 5px;
106
+ background: #fff;
107
+ text-align: right;
108
+ position: relative;
109
+ }
110
+ .seafile-comment-footer .comment-submit-container::before {
111
+ border-top: 1px solid #e6e6dd;
112
+ content: '';
113
+ position: absolute;
114
+ left: 5px;
115
+ right: 5px;
116
+ top: 0;
117
+ }
115
118
  .seafile-comment-footer .submit-comment {
116
- margin-top: 5px;
117
- width: fit-content;
118
119
  height: 28px;
119
- display: inline-block;
120
120
  }
121
121
  .seafile-edit-comment .comment-btn {
122
122
  height: 28px;
@@ -181,4 +181,4 @@
181
181
  .comment-dialog .comment-dialog-quote ul,
182
182
  .comment-dialog .comment-dialog-quote ol {
183
183
  padding-left: 1rem;
184
- }
184
+ }
@@ -1,16 +1,7 @@
1
- .dirent-table-container {
2
- padding: 0px 10px;
3
- display: flex;
4
- }
5
-
6
1
  .dirent-table-container tr {
7
2
  border: none;
8
3
  }
9
4
 
10
- .dirent-table-container table {
11
- flex: 1;
12
- }
13
-
14
5
  .dirent-table-container th,
15
6
  .dirent-table-container td {
16
7
  padding: 5px 3px;
@@ -54,4 +54,4 @@
54
54
 
55
55
  .seafile-editor-module .rc-calendar-table tr {
56
56
  height: 1.75rem;
57
- }
57
+ }
@@ -16,4 +16,4 @@
16
16
  border: 2px dashed #ebebeb;
17
17
  min-height: 40px;
18
18
  overflow-x: auto;
19
- }
19
+ }
@@ -3,9 +3,11 @@
3
3
  display: inline-block;
4
4
  max-width: 100%;
5
5
  }
6
+
6
7
  .seafile-ed-image .seafile-ed-image-inResizing {
7
8
  box-shadow: 0 0 0 2px #007bff;
8
9
  }
10
+
9
11
  .seafile-ed-image .image-resizer {
10
12
  width: 10px;
11
13
  height: 10px;
@@ -17,6 +19,7 @@
17
19
  border: 1px solid #fff;
18
20
  cursor: se-resize;
19
21
  }
22
+
20
23
  .image-size {
21
24
  display: inline-block;
22
25
  padding: 5px;
@@ -99,40 +102,33 @@
99
102
  }
100
103
 
101
104
  /* set button font style in image previewer */
105
+ .sf-editor-image-previewer button.dtable-icon-fork-number,
106
+ .sf-editor-image-previewer .dtable-icon-right,
102
107
  .sf-editor-image-previewer .dtable-icon-left {
103
108
  font-family: "iconfont" !important;
104
- font-size: 16px;
105
109
  font-style: normal;
106
110
  -webkit-font-smoothing: antialiased;
107
111
  -moz-osx-font-smoothing: grayscale;
108
112
  }
109
113
 
110
- .sf-editor-image-previewer .dtable-icon-left:before {
111
- content: "\e756";
112
- }
113
-
114
- .sf-editor-image-previewer .dtable-icon-right {
115
- font-family: "iconfont" !important;
114
+ .sf-editor-image-previewer button.dtable-icon-fork-number {
116
115
  font-size: 16px;
117
- font-style: normal;
118
- -webkit-font-smoothing: antialiased;
119
- -moz-osx-font-smoothing: grayscale;
120
116
  line-height: normal;
121
117
  }
122
118
 
123
- .sf-editor-image-previewer .dtable-icon-right:before {
124
- content: "\e755";
119
+ .sf-editor-image-previewer .dtable-icon-left:before {
120
+ content: "\e756";
125
121
  }
126
122
 
127
- .sf-editor-image-previewer button.dtable-icon-fork-number {
128
- font-family: "iconfont" !important;
129
- font-size: 16px;
130
- font-style: normal;
131
- -webkit-font-smoothing: antialiased;
132
- -moz-osx-font-smoothing: grayscale;
133
- line-height: normal;
123
+ .sf-editor-image-previewer .dtable-icon-right:before {
124
+ content: "\e755";
134
125
  }
135
126
 
136
127
  .sf-editor-image-previewer .dtable-icon-fork-number:before {
137
128
  content: "\e6ce";
138
129
  }
130
+
131
+ .sf-editor-image-previewer.ril__outer .ril__navButtonPrev.dtable-font,
132
+ .sf-editor-image-previewer.ril__outer .ril__navButtonNext.dtable-font {
133
+ padding: 40px 30px 80px;
134
+ }
@@ -4,4 +4,4 @@
4
4
 
5
5
  .article .virtual-link:hover {
6
6
  text-decoration: underline;
7
- }
7
+ }
@@ -80,4 +80,4 @@
80
80
  .rich-menu .side-panel-btn {
81
81
  display: block;
82
82
  }
83
- }
83
+ }
@@ -19,4 +19,4 @@
19
19
  }
20
20
  .participants .participant-avatar, .participants .add-participants {
21
21
  margin-right: -0.5rem;
22
- }
22
+ }
@@ -39,4 +39,4 @@
39
39
  flex: 1, 1, auto;
40
40
  height: 100%;
41
41
  margin: 0 auto;
42
- }
42
+ }
@@ -81,4 +81,4 @@
81
81
 
82
82
  .help-shortcut-right-container:not(:first-child) {
83
83
  margin-top: 10px;
84
- }
84
+ }
@@ -1,7 +1,7 @@
1
1
  .seafile-editor-module .side-panel {
2
2
  user-select: none;
3
3
  height:100%;
4
- background-color: #f5f7fa;
4
+ background-color: #f5f5f5;
5
5
  }
6
6
  .seafile-editor-module .side-panel .nav {
7
7
  border-bottom: 1px solid #eee;
@@ -31,11 +31,8 @@
31
31
  font-size: 0.875rem;
32
32
  }
33
33
  .seafile-editor-module .side-panel-content {
34
- padding-top: 8px;
35
- padding-bottom: 8px;
36
- height: calc(100% - 36px);
37
- overflow: hidden;
38
34
  font-size: 0.937rem;
35
+ overflow: hidden;
39
36
  }
40
37
 
41
38
  .seafile-editor-module .side-panel-content:hover {
@@ -127,10 +124,6 @@
127
124
  }
128
125
  }
129
126
 
130
- .seafile-editor-outline {
131
- margin-right: 1rem;
132
- }
133
-
134
127
  .outline-h2, .outline-h3 {
135
128
  white-space: nowrap;
136
129
  overflow: hidden;
@@ -54,4 +54,4 @@
54
54
  margin: -1px;
55
55
  border-right: 1px double #ffa94d;
56
56
  z-index: 2;
57
- }
57
+ }
@@ -64,4 +64,4 @@
64
64
 
65
65
  .seafile-editor-module .folder-toggle-icon.folder-caret-right {
66
66
  left: -2.5px;
67
- }
67
+ }
@@ -449,4 +449,4 @@ p.tip {
449
449
 
450
450
  .seafile-simple-editor .header-list-container {
451
451
  border-left: 0;
452
- }
452
+ }
@@ -1,7 +1,7 @@
1
1
  import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
3
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
- import { Editor, Path, Node } from 'slate';
4
+ import { Editor, Path } from 'slate';
5
5
  import ListUtils from '../editor-utils/block-element-utils/list-utils';
6
6
  import CodeUtils from '../editor-utils/block-element-utils/code-utils';
7
7
  import { isRangeCollapsed } from '../editor-utils/range-utils';
@@ -233,13 +233,13 @@ var ImagePreviewer = /*#__PURE__*/function (_React$Component2) {
233
233
  _createClass(ImagePreviewer, [{
234
234
  key: "render",
235
235
  value: function render() {
236
- var imageUrl = this.props.imageUrl;
237
236
  var imageIndex = this.state.imageIndex;
238
237
  var imageItemsLength = this.images.length;
238
+ var mainSrc = this.images[imageIndex];
239
239
  var imageTitle = '';
240
240
 
241
241
  try {
242
- imageTitle = imageUrl ? decodeURI(imageUrl.slice(imageUrl.lastIndexOf('/') + 1)) : '';
242
+ imageTitle = mainSrc ? decodeURI(mainSrc.slice(mainSrc.lastIndexOf('/') + 1)) : '';
243
243
  } catch (error) {
244
244
  // eslint-disable-next-line no-console
245
245
  console.log(error);
@@ -252,7 +252,6 @@ var ImagePreviewer = /*#__PURE__*/function (_React$Component2) {
252
252
  }, imageTitle), /*#__PURE__*/React.createElement("span", {
253
253
  className: "flex-shrink-0"
254
254
  }, "(", imageIndex + 1, "/", this.images.length, ")"));
255
- var mainSrc = this.images[imageIndex];
256
255
  return /*#__PURE__*/React.createElement(Lightbox, {
257
256
  wrapperClassName: "sf-editor-image-previewer",
258
257
  imageTitle: imageTitleEl,
@@ -343,7 +343,7 @@ var EditorUtils = /*#__PURE__*/function () {
343
343
 
344
344
  if (listAncesstor.type && listAncesstor.type.includes('list')) {
345
345
  _this.editor.exec({
346
- type: "modify_sublist_type",
346
+ type: 'modify_sublist_type',
347
347
  target_list_type: type
348
348
  });
349
349
 
@@ -371,7 +371,7 @@ var SimpleEditor = /*#__PURE__*/function (_React$Component) {
371
371
  _this.state = {
372
372
  value: props.value,
373
373
  leftNavMode: 'files',
374
- mainPanelWidth: 80,
374
+ mainPanelWidth: (window.innerWidth - 300) / window.innerWidth * 100,
375
375
  resizeFlag: false,
376
376
  isShowHelpDialog: false,
377
377
  isShowSidePanel: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/seafile-editor",
3
- "version": "0.3.94",
3
+ "version": "0.3.96-test-2",
4
4
  "private": false,
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "^0.0.9",
@@ -11166,4 +11166,4 @@ Icon input
11166
11166
  box-shadow: 0 0 0 2px rgba(241, 150, 69, 0.25); }
11167
11167
 
11168
11168
 
11169
- /*# sourceMappingURL=seafile-ui.map*/
11169
+ /*# sourceMappingURL=seafile-ui.map*/