@seafile/seafile-editor 2.0.33-alpha.1 → 2.0.34

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.
@@ -24,7 +24,7 @@ const isMacOS = (0, _common.isMac)();
24
24
  const InlineEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
25
25
  let {
26
26
  enableEdit,
27
- defaultAutoFocus,
27
+ autoFocus,
28
28
  value,
29
29
  editorApi,
30
30
  onSave,
@@ -36,7 +36,6 @@ const InlineEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
36
36
  onExpandEditorToggle,
37
37
  handelEnableEdit
38
38
  } = _ref;
39
- console.log('defaultAutoFocus', defaultAutoFocus);
40
39
  const [slateValue, setSlateValue] = (0, _react.useState)(value);
41
40
  const focusRangeRef = (0, _react.useRef)(null);
42
41
  const editor = (0, _react.useMemo)(() => {
@@ -103,7 +102,7 @@ const InlineEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
103
102
  const timer = setTimeout(() => {
104
103
  editor.forceNormalize = false;
105
104
  if (!enableEdit) return;
106
- if (!defaultAutoFocus) return;
105
+ if (!autoFocus) return;
107
106
  focusNode(editor);
108
107
  }, 300);
109
108
  return () => {
@@ -117,7 +116,7 @@ const InlineEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
117
116
  editor.hasMovedSelection = false;
118
117
  return;
119
118
  }
120
- if (!defaultAutoFocus) return;
119
+ if (!autoFocus) return;
121
120
  focusNode(editor, focusRangeRef.current);
122
121
  // eslint-disable-next-line react-hooks/exhaustive-deps
123
122
  }, [enableEdit]);
@@ -17,7 +17,7 @@ require("./index.css");
17
17
  const LongTextInlineEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
18
18
  let {
19
19
  isAlwaysEnableEdit = false,
20
- defaultAutoFocus = true,
20
+ autoFocus = true,
21
21
  autoSave,
22
22
  isCheckBrowser,
23
23
  saveDelay,
@@ -107,7 +107,7 @@ const LongTextInlineEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) =>
107
107
  isCheckBrowser: isCheckBrowser,
108
108
  isImageUploadOnly: isImageUploadOnly,
109
109
  isSupportMultipleFiles: isSupportMultipleFiles,
110
- defaultAutoFocus: defaultAutoFocus,
110
+ autoFocus: autoFocus,
111
111
  editorApi: editorApi,
112
112
  onSaveEditorValue: onSaveEditorValue,
113
113
  onEditorValueChanged: onEditorValueChanged
@@ -25,7 +25,7 @@ const NormalEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
25
25
  isCheckBrowser = false,
26
26
  isImageUploadOnly = true,
27
27
  isSupportMultipleFiles = false,
28
- defaultAutoFocus,
28
+ autoFocus,
29
29
  editorApi,
30
30
  onSaveEditorValue,
31
31
  onEditorValueChanged
@@ -122,7 +122,7 @@ const NormalEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
122
122
  ref: editorRef,
123
123
  enableEdit: enableEdit,
124
124
  isInline: true,
125
- defaultAutoFocus: defaultAutoFocus,
125
+ autoFocus: autoFocus,
126
126
  isImageUploadOnly: isImageUploadOnly,
127
127
  isSupportMultipleFiles: isSupportMultipleFiles,
128
128
  value: valueRef.current.text,
@@ -16,7 +16,7 @@ const SimpleEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
16
16
  let {
17
17
  isInline,
18
18
  isFetching,
19
- defaultAutoFocus,
19
+ autoFocus,
20
20
  value,
21
21
  focusEnd = false,
22
22
  editorApi,
@@ -60,7 +60,7 @@ const SimpleEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
60
60
  isSupportFormula: !!mathJaxSource,
61
61
  value: richValue,
62
62
  focusEnd,
63
- defaultAutoFocus,
63
+ autoFocus,
64
64
  editorApi: editorApi,
65
65
  onSave: propsOnSave,
66
66
  onContentChanged: onContentChanged,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/seafile-editor",
3
- "version": "2.0.33-alpha.1",
3
+ "version": "2.0.34",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {