@seafile/sdoc-editor 3.0.112 → 3.0.114
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.
|
@@ -57,6 +57,7 @@ var QuickInsertBlockMenu = function QuickInsertBlockMenu(_ref) {
|
|
|
57
57
|
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
58
58
|
quickInsertMenuSearchMap = _useState4[0],
|
|
59
59
|
setQuickInsertMenuSearchMap = _useState4[1];
|
|
60
|
+
var enableMetadataManagement = _context["default"].getSetting('enableMetadataManagement');
|
|
60
61
|
var onInsertImageToggle = (0, _react.useCallback)(function () {
|
|
61
62
|
callback && callback();
|
|
62
63
|
var eventBus = _eventBus["default"].getInstance();
|
|
@@ -298,7 +299,7 @@ var QuickInsertBlockMenu = function QuickInsertBlockMenu(_ref) {
|
|
|
298
299
|
key: "sdoc-insert-menu-check-list",
|
|
299
300
|
menuConfig: (0, _objectSpread6["default"])({}, _constants2.SIDE_INSERT_MENUS_CONFIG[_constants2.ELEMENT_TYPE.CHECK_LIST_ITEM]),
|
|
300
301
|
onClick: onInsertCheckList
|
|
301
|
-
})), editor.editorType === _constants.WIKI_EDITOR && (0, _defineProperty2["default"])({}, _constants2.FILE_VIEW,
|
|
302
|
+
})), editor.editorType === _constants.WIKI_EDITOR && enableMetadataManagement && (0, _defineProperty2["default"])({}, _constants2.FILE_VIEW,
|
|
302
303
|
/*#__PURE__*/
|
|
303
304
|
// eslint-disable-next-line react/jsx-indent
|
|
304
305
|
_react["default"].createElement(_dropdownMenuItem["default"], {
|
|
@@ -41,6 +41,7 @@ var InsertBlockMenu = function InsertBlockMenu(_ref) {
|
|
|
41
41
|
var editor = (0, _slateReact.useSlateStatic)();
|
|
42
42
|
var _useTranslation = (0, _reactI18next.useTranslation)('sdoc-editor'),
|
|
43
43
|
t = _useTranslation.t;
|
|
44
|
+
var enableMetadataManagement = _context["default"].getSetting('enableMetadataManagement');
|
|
44
45
|
var onInsertImageToggle = (0, _react.useCallback)(function () {
|
|
45
46
|
var eventBus = _eventBus["default"].getInstance();
|
|
46
47
|
if (insertPosition === _constants2.INSERT_POSITION.CURRENT) {
|
|
@@ -193,7 +194,7 @@ var InsertBlockMenu = function InsertBlockMenu(_ref) {
|
|
|
193
194
|
isHidden: !insertMenuSearchMap[_constants2.ELEMENT_TYPE.CHECK_LIST_ITEM],
|
|
194
195
|
menuConfig: (0, _objectSpread2["default"])({}, _constants2.SIDE_INSERT_MENUS_CONFIG[_constants2.ELEMENT_TYPE.CHECK_LIST_ITEM]),
|
|
195
196
|
onClick: onInsertCheckList
|
|
196
|
-
}), editor.editorType === _constants.WIKI_EDITOR && /*#__PURE__*/_react["default"].createElement(_dropdownMenuItem["default"], {
|
|
197
|
+
}), editor.editorType === _constants.WIKI_EDITOR && enableMetadataManagement && /*#__PURE__*/_react["default"].createElement(_dropdownMenuItem["default"], {
|
|
197
198
|
isHidden: !insertMenuSearchMap[_constants2.ELEMENT_TYPE.FILE_VIEW],
|
|
198
199
|
key: "sdoc-insert-menu-file-view",
|
|
199
200
|
menuConfig: (0, _objectSpread2["default"])({}, _constants2.SIDE_INSERT_MENUS_CONFIG[_constants2.ELEMENT_TYPE.FILE_VIEW]),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.114",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "5eaccca57c89bb7c49082207ca8fd4bda957a02d"
|
|
76
76
|
}
|