@seafile/sdoc-editor 1.0.22 → 1.0.24

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.
@@ -39,7 +39,7 @@
39
39
 
40
40
  .sdoc-editor-container .article .sdoc-checkbox-container .sdoc-checkbox-input-wrapper {
41
41
  display: flex;
42
- align-items: baseline;
42
+ align-items: normal;
43
43
  }
44
44
 
45
45
  .sdoc-editor-container .article .sdoc-checkbox-container .sdoc-checkbox-input-wrapper .sdoc-checkbox-input {
@@ -7,7 +7,7 @@ import debounce from '../../../../utils/debounce';
7
7
  import { handleReplaceKeyword, getHighlightInfos, drawHighlights } from '../helper';
8
8
  import ReplaceAllConfirmModal from './replace-all-confirm-modal';
9
9
  import EventBus from '../../../../utils/event-bus';
10
- import { INTERNAL_EVENT } from '../../../../constants';
10
+ import { DOCUMENT_PLUGIN_EDITOR, INTERNAL_EVENT } from '../../../../constants';
11
11
  import context from '../../../../../context';
12
12
  import './index.css';
13
13
  const SearchReplacePopover = _ref => {
@@ -41,10 +41,15 @@ const SearchReplacePopover = _ref => {
41
41
  if (highlightInfos.length) return "".concat(currentSelectIndex + 1, " / ").concat(highlightInfos.length);
42
42
  }, [currentSelectIndex, highlightInfos.length, searchContent.length, t]);
43
43
  useEffect(() => {
44
+ let y = 95;
45
+ if (editor.editorType === DOCUMENT_PLUGIN_EDITOR) {
46
+ y = 201;
47
+ }
44
48
  setPopoverPosition({
45
49
  x: pageInnerSizeRef.current.x - 420,
46
- y: 95
50
+ y
47
51
  });
52
+ // eslint-disable-next-line react-hooks/exhaustive-deps
48
53
  }, []);
49
54
  const isOwnReplacePermission = useMemo(() => {
50
55
  if (readonly) return false;
@@ -23,6 +23,8 @@ export const EMAIL = 'email';
23
23
  export const DURATION = 'duration';
24
24
  export const BUTTON = 'button';
25
25
  export const RATE = 'rate';
26
+ export const DIGITAL_SIGN = 'digital-sign';
27
+ export const DEPARTMENT_SINGLE_SELECT = 'department-single-select';
26
28
 
27
29
  // formula | link-formula column calculate result type
28
30
  export const BOOL = 'bool';
@@ -1,5 +1,5 @@
1
1
  import * as CellType from './cell-types';
2
- export const COLUMNS_ICON_CONFIG = {
2
+ const COLUMNS_ICON_CONFIG = {
3
3
  [CellType.DEFAULT]: 'dtable-font dtable-icon-single-line-text',
4
4
  [CellType.TEXT]: 'dtable-font dtable-icon-single-line-text',
5
5
  [CellType.NUMBER]: 'dtable-font dtable-icon-number',
@@ -24,5 +24,8 @@ export const COLUMNS_ICON_CONFIG = {
24
24
  [CellType.EMAIL]: 'dtable-font dtable-icon-email',
25
25
  [CellType.DURATION]: 'dtable-font dtable-icon-duration',
26
26
  [CellType.BUTTON]: 'dtable-font dtable-icon-button',
27
- [CellType.RATE]: 'dtable-font dtable-icon-rate'
28
- };
27
+ [CellType.RATE]: 'dtable-font dtable-icon-rate',
28
+ [CellType.DIGITAL_SIGN]: 'dtable-font dtable-icon-handwritten-signature',
29
+ [CellType.DEPARTMENT_SINGLE_SELECT]: 'dtable-font dtable-icon-department-single-selection'
30
+ };
31
+ export { COLUMNS_ICON_CONFIG };
@@ -1,9 +1,15 @@
1
+ .seatable-column-popover {
2
+ padding: 0;
3
+ }
4
+
1
5
  .column-list-menu {
2
6
  position: absolute;
3
7
  left: -8px;
4
8
  background-color: #fff;
5
9
  min-width: 12rem;
6
10
  width: 200px;
11
+ max-height: 500px;
12
+ overflow: auto;
7
13
  }
8
14
 
9
15
  .column-list-menu .column-list-menu-item-container {
@@ -15,11 +21,14 @@
15
21
  width: 100%;
16
22
  display: flex;
17
23
  align-items: center;
24
+ min-height: 32px;
18
25
  }
19
26
 
20
27
  .column-list-menu .column-list-menu-item-container .column-list-menu-item .control-icon {
21
28
  margin-right: 10px;
22
29
  flex-shrink: 0;
30
+ font-size: 12px;
31
+ color: #444;
23
32
  }
24
33
 
25
34
  .column-list-menu .column-list-menu-item-container .column-list-menu-item .control-label {
@@ -27,6 +36,7 @@
27
36
  overflow: hidden;
28
37
  text-overflow: ellipsis;
29
38
  flex-grow: 1;
39
+ font-size: 14px;
30
40
  }
31
41
 
32
42
  .column-list-menu .column-list-menu-item-container:hover {
@@ -22,7 +22,8 @@ const SeaTableColumnMenu = _ref => {
22
22
  trigger: "hover",
23
23
  placement: "right-start",
24
24
  hideArrow: true,
25
- fade: false
25
+ fade: false,
26
+ popperClassName: "seatable-column-popover"
26
27
  }, /*#__PURE__*/React.createElement(ColumnListMenu, {
27
28
  editor: editor,
28
29
  readonly: readonly
@@ -33,7 +33,6 @@ export default function TableSettings(_ref) {
33
33
  if (timer.current) {
34
34
  clearTimeout(timer.current);
35
35
  }
36
- console.log(updateProperties);
37
36
  timer.current = setTimeout(() => {
38
37
  updateSeaTableTable(editor, updateProperties);
39
38
  }, 300);
@@ -80,11 +79,11 @@ export default function TableSettings(_ref) {
80
79
  alternate_color: value
81
80
  });
82
81
  }, [updatePageSettings]);
83
- const onSelectModuleChange = useCallback(value => {
84
- updatePageSettings({
85
- select_column_display_option_color: value
86
- });
87
- }, [updatePageSettings]);
82
+
83
+ // const onSelectModuleChange = useCallback((value) => {
84
+ // updatePageSettings({ select_column_display_option_color: value });
85
+ // }, [updatePageSettings]);
86
+
88
87
  return /*#__PURE__*/React.createElement("div", {
89
88
  className: "document-seatable-settings-wrapper"
90
89
  }, /*#__PURE__*/React.createElement("div", {
@@ -1,6 +1,7 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import context from '../../context';
3
3
  import { getDiff } from '../utils/diff';
4
+ import InsertElementDialog from '../extension/commons/insert-element-dialog';
4
5
  import SDocViewer from './sdoc-viewer';
5
6
  import Loading from '../../components/loading';
6
7
  import { CollaboratorsProvider } from '../../hooks';
@@ -48,6 +49,8 @@ const RevisionDiffViewer = _ref => {
48
49
  showToolbar: true,
49
50
  showOutline: true,
50
51
  showComment: true
52
+ }), /*#__PURE__*/React.createElement(InsertElementDialog, {
53
+ editor: editor
51
54
  }));
52
55
  };
53
56
  export default RevisionDiffViewer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",