@seafile/sdoc-editor 1.0.198-test0.2 → 1.0.198-test0.3
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.
|
@@ -53,11 +53,6 @@ const SelectSdocFileDialog = _ref => {
|
|
|
53
53
|
insertFileLinkCallback,
|
|
54
54
|
insertSdocFileLinkCallback
|
|
55
55
|
} = insertLinkCallback;
|
|
56
|
-
if (dialogType === _constants.ELEMENT_TYPE.FILE_LINK) {
|
|
57
|
-
insertFileLinkCallback && insertFileLinkCallback(editor, fileInfo.name, fileInfo.file_uuid);
|
|
58
|
-
} else {
|
|
59
|
-
insertSdocFileLinkCallback && insertSdocFileLinkCallback(editor, fileInfo.name, fileInfo.file_uuid);
|
|
60
|
-
}
|
|
61
56
|
switch (dialogType) {
|
|
62
57
|
case _constants.ELEMENT_TYPE.FILE_LINK:
|
|
63
58
|
insertFileLinkCallback && insertFileLinkCallback(editor, fileInfo.name, fileInfo.file_uuid);
|
|
@@ -80,6 +75,7 @@ const SelectSdocFileDialog = _ref => {
|
|
|
80
75
|
let fileInfo = {
|
|
81
76
|
...currentSelectedFile
|
|
82
77
|
};
|
|
78
|
+
console.log(3, fileInfo);
|
|
83
79
|
// File has no id
|
|
84
80
|
if (!file_uuid || file_uuid === '') {
|
|
85
81
|
_context.default.getSdocLocalFileId(currentSelectedFile.path).then(res => {
|
|
@@ -89,6 +85,7 @@ const SelectSdocFileDialog = _ref => {
|
|
|
89
85
|
file_uuid: res.data.file_uuid
|
|
90
86
|
};
|
|
91
87
|
}
|
|
88
|
+
console.log(99, res, fileInfo);
|
|
92
89
|
insertFile(fileInfo);
|
|
93
90
|
closeDialog();
|
|
94
91
|
}).catch(error => {
|
|
@@ -42,7 +42,9 @@ const isInsertWhiteboardMenuDisabled = (editor, readonly) => {
|
|
|
42
42
|
return false;
|
|
43
43
|
};
|
|
44
44
|
exports.isInsertWhiteboardMenuDisabled = isInsertWhiteboardMenuDisabled;
|
|
45
|
-
const insertWhiteboard = ()
|
|
45
|
+
const insertWhiteboard = function (editor, videoFiles, srcList, selection) {
|
|
46
|
+
let position = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : _constants.INSERT_POSITION.CURRENT;
|
|
47
|
+
};
|
|
46
48
|
exports.insertWhiteboard = insertWhiteboard;
|
|
47
49
|
const onCreateWhiteboardFile = editor => {
|
|
48
50
|
// e.stopPropagation();
|
|
@@ -52,7 +54,6 @@ const onCreateWhiteboardFile = editor => {
|
|
|
52
54
|
fileType: 'draw',
|
|
53
55
|
editor
|
|
54
56
|
};
|
|
55
|
-
console.log(2, external_props.insertWhiteboard);
|
|
56
57
|
eventBus.dispatch(_constants2.EXTERNAL_EVENT.CREATE_WHITEBOARD_FILE, {
|
|
57
58
|
...external_props
|
|
58
59
|
});
|
|
@@ -12,13 +12,18 @@ var _constants = require("../../../../constants");
|
|
|
12
12
|
require("./index.css");
|
|
13
13
|
const Whiteboard = _ref => {
|
|
14
14
|
let {
|
|
15
|
-
editor
|
|
15
|
+
editor,
|
|
16
|
+
repoID,
|
|
17
|
+
filePath
|
|
16
18
|
} = _ref;
|
|
17
19
|
// const whiteboardContainer = document.getElementById('sdoc-whiteboard-container');
|
|
18
20
|
const [tldraw, setTldraw] = (0, _react.useState)(null);
|
|
19
21
|
const renderWhiteboardEditor = Tldraw => {
|
|
20
22
|
console.log(4, Tldraw);
|
|
21
|
-
setTldraw( /*#__PURE__*/_react.default.createElement(Tldraw,
|
|
23
|
+
setTldraw( /*#__PURE__*/_react.default.createElement(Tldraw, {
|
|
24
|
+
repoID: repoID,
|
|
25
|
+
filePath: filePath
|
|
26
|
+
}));
|
|
22
27
|
};
|
|
23
28
|
(0, _react.useEffect)(() => {
|
|
24
29
|
const eventBus = _eventBus.default.getInstance();
|