@seafile/seafile-editor 1.0.132 → 2.0.0

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.
@@ -14,9 +14,9 @@ var _constants = require("../../../constants");
14
14
  const MenuDropDown = props => {
15
15
  const {
16
16
  readonly,
17
- className,
17
+ className = '',
18
18
  isDisabled,
19
- dropDownList,
19
+ dropDownList = [],
20
20
  id,
21
21
  text,
22
22
  iconClass,
@@ -91,10 +91,4 @@ const MenuDropDown = props => {
91
91
  target: containerId
92
92
  }, t(text))));
93
93
  };
94
- MenuDropDown.defaultProps = {
95
- className: '',
96
- dropDownList: [],
97
- isShowMenuItemTooltip: false,
98
- isShowListItemIcon: false
99
- };
100
94
  var _default = exports.default = MenuDropDown;
@@ -6,13 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- const MenuGroup = props => {
9
+ const MenuGroup = _ref => {
10
+ let {
11
+ className = 'sf-menu-group',
12
+ children
13
+ } = _ref;
10
14
  return /*#__PURE__*/_react.default.createElement("div", {
11
- className: 'btn-group ' + props.className,
15
+ className: 'btn-group ' + className,
12
16
  role: 'group'
13
- }, props.children);
14
- };
15
- MenuGroup.defaultProps = {
16
- className: 'sf-menu-group'
17
+ }, children);
17
18
  };
18
19
  var _default = exports.default = MenuGroup;
@@ -15,10 +15,10 @@ const MenuItem = _ref => {
15
15
  let {
16
16
  disabled,
17
17
  isActive,
18
- isRichEditor,
18
+ isRichEditor = true,
19
19
  type,
20
20
  onMouseDown,
21
- className,
21
+ className = 'sf-menu-group-item',
22
22
  iconClass,
23
23
  id,
24
24
  text
@@ -48,11 +48,10 @@ const MenuItem = _ref => {
48
48
  }, /*#__PURE__*/_react.default.createElement("i", {
49
49
  className: iconClass
50
50
  })), /*#__PURE__*/_react.default.createElement(_tooltip.default, {
51
- target: id
51
+ target: id,
52
+ transition: {
53
+ timeout: 150
54
+ }
52
55
  }, t(text)));
53
56
  };
54
- MenuItem.defaultProps = {
55
- isRichEditor: true,
56
- className: 'sf-menu-group-item'
57
- };
58
57
  var _default = exports.default = MenuItem;
@@ -103,7 +103,4 @@ const Toolbar = _ref => {
103
103
  editor: editor
104
104
  }));
105
105
  };
106
- Toolbar.defaultProps = {
107
- readonly: false
108
- };
109
106
  var _default = exports.default = Toolbar;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/seafile-editor",
3
- "version": "1.0.132",
3
+ "version": "2.0.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -13,7 +13,7 @@
13
13
  "prepublishOnly": "npm run clean && npm run pub:dist",
14
14
  "lint-fix": "eslint --fix --ext .js,.jsx src/"
15
15
  },
16
- "keywords": [ ],
16
+ "keywords": [],
17
17
  "author": "",
18
18
  "license": "Apache-2.0",
19
19
  "files": [
@@ -42,7 +42,6 @@
42
42
  "eslint": "8.49.0",
43
43
  "eslint-config-react-app": "7.0.1",
44
44
  "file-loader": "6.2.0",
45
- "glamor": "2.20.40",
46
45
  "i18next": "22.4.9",
47
46
  "i18next-browser-languagedetector": "7.0.1",
48
47
  "i18next-xhr-backend": "3.2.2",
@@ -60,8 +59,8 @@
60
59
  "postcss-loader": "7.3.3",
61
60
  "prop-types": "15.8.1",
62
61
  "raw-loader": "4.0.2",
63
- "react": "17.0.0",
64
- "react-dom": "17.0.0",
62
+ "react": "18.3.1",
63
+ "react-dom": "18.3.1",
65
64
  "react-i18next": "12.1.4",
66
65
  "react-router": "6.16.0",
67
66
  "react-router-dom": "6.16.0",
@@ -86,13 +85,13 @@
86
85
  ]
87
86
  },
88
87
  "dependencies": {
89
- "@seafile/react-image-lightbox": "3.0.1",
88
+ "@seafile/react-image-lightbox": "4.0.0",
90
89
  "classnames": "2.3.2",
91
90
  "deep-copy": "1.4.2",
92
91
  "deepmerge": "4.3.1",
93
92
  "is-url": "^1.2.4",
94
93
  "prismjs": "1.29.0",
95
- "reactstrap": "8.9.0",
94
+ "reactstrap": "9.2.3",
96
95
  "rehype-format": "5.0.0",
97
96
  "rehype-mathjax": "5.0.0",
98
97
  "rehype-raw": "7.0.0",
@@ -32,15 +32,15 @@
32
32
  "Switch_to_rich_text_editor": "切换至富文本编辑器",
33
33
  "Switch_to_viewer": "切换到只读模式",
34
34
  "Help": "帮助",
35
- "Remove_table": "清除表格",
35
+ "Delete_table": "删除表格",
36
36
  "Column": "列",
37
37
  "Row": "行",
38
38
  "Insert_row_before": "上方插入行",
39
39
  "Insert_row_after": "下方插入行",
40
40
  "Insert_column_before": "左边插入列",
41
41
  "Insert_column_after": "右边插入列",
42
- "Remove_row": "删除当前行",
43
- "Remove_column": "删除当前列",
42
+ "Delete_row": "删除当前行",
43
+ "Delete_column": "删除当前列",
44
44
  "Insert_row": "插入行",
45
45
  "Insert_column": "插入列",
46
46
  "Set_align": "对齐方式",
@@ -118,6 +118,7 @@
118
118
  "Chooser_document_type": "选择文档类型",
119
119
  "Empty": "暂无",
120
120
  "No_related_files": "没有相关文件",
121
+ "Outline": "目录",
121
122
  "No_outline": "没有大纲",
122
123
  "Editing_files_in_this_browser_can_lead_to_slight_display_problems": "在此浏览器中,编辑文件可能导致轻微的显示问题。",
123
124
  "No_document_improvement_suggestion": "没有文档改进建议",
@@ -220,5 +221,14 @@
220
221
  },
221
222
  "Select_field": "选中字段",
222
223
  "Font_style": "字体样式",
223
- "Open_link": "打开链接"
224
+ "Open_link": "打开链接",
225
+ "Image_is_uploading": "图片正在上传",
226
+ "Image_loading_failed": "图片加载失败",
227
+ "Expand_editor": "展开编辑器",
228
+ "Insert_below": "在下方插入",
229
+ "Insert_above": "在上方插入",
230
+ "Insert_on_the_right": "在右侧插入",
231
+ "Insert_on_the_left": "在左侧插入",
232
+ "Row(s)": "行",
233
+ "Column(s)": "列"
224
234
  }