@seafile/sdoc-editor 0.1.76 → 0.1.77
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.
|
@@ -3,22 +3,21 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { withTranslation } from 'react-i18next';
|
|
7
6
|
import './style.css';
|
|
8
|
-
var
|
|
9
|
-
_inherits(
|
|
10
|
-
var _super = _createSuper(
|
|
11
|
-
function
|
|
7
|
+
var MoreDropdownMenu = /*#__PURE__*/function (_React$Component) {
|
|
8
|
+
_inherits(MoreDropdownMenu, _React$Component);
|
|
9
|
+
var _super = _createSuper(MoreDropdownMenu);
|
|
10
|
+
function MoreDropdownMenu(props) {
|
|
12
11
|
var _this;
|
|
13
|
-
_classCallCheck(this,
|
|
12
|
+
_classCallCheck(this, MoreDropdownMenu);
|
|
14
13
|
_this = _super.call(this, props);
|
|
15
14
|
_this.registerEventHandler = function () {
|
|
16
|
-
document.addEventListener('click', _this.
|
|
15
|
+
document.addEventListener('click', _this.onHideMoreDropdownMenu);
|
|
17
16
|
};
|
|
18
17
|
_this.unregisterEventHandler = function () {
|
|
19
|
-
document.removeEventListener('click', _this.
|
|
18
|
+
document.removeEventListener('click', _this.onHideMoreDropdownMenu);
|
|
20
19
|
};
|
|
21
|
-
_this.
|
|
20
|
+
_this.onHideMoreDropdownMenu = function () {
|
|
22
21
|
_this.setState({
|
|
23
22
|
isDropdownMenuOpen: false
|
|
24
23
|
}, function () {
|
|
@@ -48,7 +47,7 @@ var TextAlignMenu = /*#__PURE__*/function (_React$Component) {
|
|
|
48
47
|
};
|
|
49
48
|
return _this;
|
|
50
49
|
}
|
|
51
|
-
_createClass(
|
|
50
|
+
_createClass(MoreDropdownMenu, [{
|
|
52
51
|
key: "render",
|
|
53
52
|
value: function render() {
|
|
54
53
|
var isDropdownMenuOpen = this.state.isDropdownMenuOpen;
|
|
@@ -64,6 +63,6 @@ var TextAlignMenu = /*#__PURE__*/function (_React$Component) {
|
|
|
64
63
|
}, this.props.children));
|
|
65
64
|
}
|
|
66
65
|
}]);
|
|
67
|
-
return
|
|
66
|
+
return MoreDropdownMenu;
|
|
68
67
|
}(React.Component);
|
|
69
|
-
export default
|
|
68
|
+
export default MoreDropdownMenu;
|