@seafile/sdoc-editor 0.1.21-test → 0.1.21

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,49 +3,32 @@ 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, { Fragment } from 'react';
6
- import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
7
6
  import CollaboratorsOperation from './collaborators-operation';
8
7
  import context from '../../context';
9
- import { withTranslation } from 'react-i18next';
10
8
  import './style.css';
11
9
  var DocOperations = /*#__PURE__*/function (_React$Component) {
12
10
  _inherits(DocOperations, _React$Component);
13
11
  var _super = _createSuper(DocOperations);
14
- function DocOperations(props) {
12
+ function DocOperations() {
15
13
  var _this;
16
14
  _classCallCheck(this, DocOperations);
17
- _this = _super.call(this, props);
18
- _this.toggleDropdown = function () {
19
- _this.setState({
20
- isDropdownOpen: !_this.state.isDropdownOpen
21
- });
22
- };
15
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
16
+ args[_key] = arguments[_key];
17
+ }
18
+ _this = _super.call.apply(_super, [this].concat(args));
23
19
  _this.toggleHistory = function (event) {
24
20
  event.stopPropagation();
25
21
  event.nativeEvent.stopImmediatePropagation();
26
22
  var historyURL = context.getSetting('historyURL');
27
23
  window.location.href = historyURL;
28
24
  };
29
- _this.state = {
30
- isDropdownOpen: false
31
- };
32
25
  return _this;
33
26
  }
34
27
  _createClass(DocOperations, [{
35
28
  key: "render",
36
29
  value: function render() {
37
- var t = this.props.t;
38
- var isDropdownOpen = this.state.isDropdownOpen;
39
30
  var docPerm = context.getSetting('docPerm');
40
31
  var historyURL = context.getSetting('historyURL');
41
- var parentFolderURL = context.getSetting('parentFolderURL');
42
- var dropdownItems = [];
43
- if (parentFolderURL) {
44
- dropdownItems.push({
45
- text: t('Open_parent_folder'),
46
- URL: parentFolderURL
47
- });
48
- }
49
32
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
50
33
  className: "doc-ops"
51
34
  }, /*#__PURE__*/React.createElement("span", {
@@ -57,25 +40,13 @@ var DocOperations = /*#__PURE__*/function (_React$Component) {
57
40
  onClick: this.toggleHistory
58
41
  }, /*#__PURE__*/React.createElement("i", {
59
42
  className: "iconfont icon-history"
60
- })), /*#__PURE__*/React.createElement(CollaboratorsOperation, null), dropdownItems.length > 0 && /*#__PURE__*/React.createElement(Dropdown, {
61
- isOpen: isDropdownOpen,
62
- toggle: this.toggleDropdown
63
- }, /*#__PURE__*/React.createElement(DropdownToggle, {
64
- className: "op-item",
65
- tag: "span"
43
+ })), /*#__PURE__*/React.createElement(CollaboratorsOperation, null), /*#__PURE__*/React.createElement("span", {
44
+ className: "op-item"
66
45
  }, /*#__PURE__*/React.createElement("i", {
67
46
  className: "iconfont icon-menu"
68
- })), /*#__PURE__*/React.createElement(DropdownMenu, {
69
- right: true
70
- }, dropdownItems.map(function (item, index) {
71
- return /*#__PURE__*/React.createElement(DropdownItem, {
72
- tag: "a",
73
- href: item.URL,
74
- key: index
75
- }, item.text);
76
- })))));
47
+ }))));
77
48
  }
78
49
  }]);
79
50
  return DocOperations;
80
51
  }(React.Component);
81
- export default withTranslation('sdoc-editor')(DocOperations);
52
+ export default DocOperations;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "0.1.21-test",
3
+ "version": "0.1.21",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",
@@ -235,6 +235,5 @@
235
235
  "Server_is_disconnected_Reconnecting": "Server is disconnected. Reconnecting...",
236
236
  "Server_is_reconnected": "Server is reconnected.",
237
237
  "Outline": "Outline",
238
- "Headings_you_add_to_the_document_will_appear_here": "Headings you add to the document will appear here",
239
- "Open_parent_folder": "Open parent folder"
238
+ "Headings_you_add_to_the_document_will_appear_here": "Headings you add to the document will appear here"
240
239
  }