@seafile/seafile-sdoc-editor 3.0.152 → 3.0.153
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.
|
@@ -105,6 +105,20 @@ var MoreOperations = function MoreOperations(_ref) {
|
|
|
105
105
|
}
|
|
106
106
|
eventBus.dispatch(_constants.EXTERNAL_EVENT.INTERNAL_LINK_CLICK);
|
|
107
107
|
}, [isSdocRevision]);
|
|
108
|
+
var handleExportMarkdown = (0, _react.useCallback)(function () {
|
|
109
|
+
var serviceUrl = _sdocEditor.context.getSetting('serviceUrl');
|
|
110
|
+
var repoID = _sdocEditor.context.getSetting('repoID');
|
|
111
|
+
var selectedFilePath = _sdocEditor.context.getSetting('docPath');
|
|
112
|
+
var exportUrl = "".concat(serviceUrl, "/repo/sdoc_export_to_markdown/").concat(repoID, "/?file_path=").concat(selectedFilePath);
|
|
113
|
+
window.location.href = exportUrl;
|
|
114
|
+
}, []);
|
|
115
|
+
var handleExportDocx = (0, _react.useCallback)(function () {
|
|
116
|
+
var serviceUrl = _sdocEditor.context.getSetting('serviceUrl');
|
|
117
|
+
var repoID = _sdocEditor.context.getSetting('repoID');
|
|
118
|
+
var selectedFilePath = _sdocEditor.context.getSetting('docPath');
|
|
119
|
+
var exportToDocxUrl = serviceUrl + '/repo/sdoc_export_to_docx/' + repoID + '/?file_path=' + selectedFilePath;
|
|
120
|
+
window.location.href = exportToDocxUrl;
|
|
121
|
+
}, []);
|
|
108
122
|
return /*#__PURE__*/_react["default"].createElement(_reactstrap.Dropdown, {
|
|
109
123
|
className: "sdoc-operator-folder ".concat(mobileLogin ? 'mobile-login' : ''),
|
|
110
124
|
isOpen: isDropdownOpen,
|
|
@@ -157,7 +171,13 @@ var MoreOperations = function MoreOperations(_ref) {
|
|
|
157
171
|
placeholder: t('Full_width_mode'),
|
|
158
172
|
className: "sdoc-full-width-mode-wrapper w-100",
|
|
159
173
|
onChange: onSwitchMode
|
|
160
|
-
})),
|
|
174
|
+
})), /*#__PURE__*/_react["default"].createElement(_reactstrap.DropdownItem, {
|
|
175
|
+
className: "sdoc-dropdown-menu-item",
|
|
176
|
+
onClick: handleExportMarkdown
|
|
177
|
+
}, t('Export_as_markdown')), /*#__PURE__*/_react["default"].createElement(_reactstrap.DropdownItem, {
|
|
178
|
+
className: "sdoc-dropdown-menu-item",
|
|
179
|
+
onClick: handleExportDocx
|
|
180
|
+
}, t('Export_as_docx')), parentFolderURL && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
161
181
|
className: "sdoc-operator-folder-divider"
|
|
162
182
|
}), /*#__PURE__*/_react["default"].createElement(_reactstrap.DropdownItem, {
|
|
163
183
|
className: "sdoc-dropdown-menu-item",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/seafile-sdoc-editor",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.153",
|
|
4
4
|
"author": "shuntian <978987373@qq.com>",
|
|
5
5
|
"homepage": "https://github.com/seafileltd/sea-sdoc-editor#readme",
|
|
6
6
|
"license": "ISC",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"description": "",
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@seafile/print-js": "1.6.6",
|
|
32
|
-
"@seafile/sdoc-editor": "^3.0.
|
|
32
|
+
"@seafile/sdoc-editor": "^3.0.153",
|
|
33
33
|
"classnames": "2.3.2",
|
|
34
34
|
"dayjs": "1.10.7"
|
|
35
35
|
},
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "9129cbfbb80cc4290cdf3318791fa5ea94adf1fd"
|
|
49
49
|
}
|