@seafile/sdoc-editor 0.1.0 → 0.1.2
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.
- package/dist/{new-editors/editor.js → editor.js} +38 -17
- package/dist/index.js +2 -36
- package/dist/slate-extension/core/transforms/move-children.js +1 -1
- package/dist/slate-extension/plugins/blockquote/helpers.js +3 -3
- package/dist/slate-extension/plugins/index.js +3 -2
- package/dist/slate-extension/plugins/list/transforms/normalize-list-item.js +2 -2
- package/dist/slate-extension/plugins/list/transforms/toggle-list.js +6 -8
- package/dist/slate-extension/plugins/socket/index.js +6 -0
- package/dist/slate-extension/plugins/socket/plugin.js +23 -0
- package/dist/slate-extension/socket/socket-client.js +94 -0
- package/dist/slate-extension/socket/socket-manager.js +63 -0
- package/dist/slate-extension/toolbar/index.js +1 -1
- package/dist/utils/event-bus.js +39 -0
- package/package.json +5 -25
- package/dist/assets/css/comment-dialog.css +0 -50
- package/dist/assets/css/diff-viewer.css +0 -105
- package/dist/assets/css/formula.css +0 -19
- package/dist/assets/css/history-viewer.css +0 -104
- package/dist/assets/css/image.css +0 -134
- package/dist/assets/css/issue-card.css +0 -43
- package/dist/assets/css/keyboard-shortcuts.css +0 -58
- package/dist/assets/css/link.css +0 -7
- package/dist/assets/css/markdown-editor.css +0 -12
- package/dist/assets/css/markdown-viewer.css +0 -69
- package/dist/assets/css/navbar-imgbutton.css +0 -83
- package/dist/assets/css/outline.css +0 -29
- package/dist/assets/css/table.css +0 -57
- package/dist/assets/css/textlink-hovermenu.css +0 -47
- package/dist/assets/css/topbar.css +0 -350
- package/dist/assets/css/tree-view.css +0 -67
- package/dist/assets/css/user-help.css +0 -84
- package/dist/assets/editor/plain-editor.css +0 -30
- package/dist/assets/editor/seatable-editor.css +0 -77
- package/dist/assets/editor/simple-editor.css +0 -77
- package/dist/components/click-outside.js +0 -46
- package/dist/components/context-menu.js +0 -97
- package/dist/components/dialogs/add-formula-dialog.js +0 -116
- package/dist/components/dialogs/add-image-dialog.js +0 -69
- package/dist/components/dialogs/add-link-dialog.js +0 -133
- package/dist/components/dialogs/comment-dialog.js +0 -97
- package/dist/components/dialogs/shortcut-dialog.js +0 -131
- package/dist/components/error-boundary.js +0 -28
- package/dist/components/load-script/index.js +0 -69
- package/dist/components/loading.js +0 -25
- package/dist/components/markdown-lint.js +0 -72
- package/dist/components/menu/index.js +0 -4
- package/dist/components/menu/item.js +0 -49
- package/dist/components/menu/menu.js +0 -38
- package/dist/components/menu/style.css +0 -42
- package/dist/components/modal-portal.js +0 -38
- package/dist/components/outline/index.js +0 -92
- package/dist/components/outline/outline-item.js +0 -58
- package/dist/components/select/_option.js +0 -44
- package/dist/components/select/field-setting.js +0 -106
- package/dist/components/select/index.js +0 -149
- package/dist/components/select/style.css +0 -144
- package/dist/components/svg-icons/check-mark-icon.js +0 -14
- package/dist/components/svg-icons/column-icon.js +0 -17
- package/dist/components/svg-icons/text-icon.js +0 -34
- package/dist/components/text-link-hover-menu/index.js +0 -123
- package/dist/components/toast/alert.js +0 -138
- package/dist/components/toast/index.js +0 -3
- package/dist/components/toast/toast.js +0 -159
- package/dist/components/toast/toastManager.js +0 -139
- package/dist/components/toast/toaster.js +0 -65
- package/dist/components/toolbar/header-list.js +0 -114
- package/dist/components/toolbar/help-group.js +0 -33
- package/dist/components/toolbar/index.js +0 -4
- package/dist/components/toolbar/insert-image.js +0 -106
- package/dist/components/toolbar/insert-table.js +0 -136
- package/dist/components/toolbar/table-group.js +0 -74
- package/dist/components/toolbar/toolbar.js +0 -317
- package/dist/components/toolbar/widgets/button-group.js +0 -24
- package/dist/components/toolbar/widgets/button-item.js +0 -129
- package/dist/components/toolbar/widgets/drop-list.js +0 -88
- package/dist/components/user-help/index.js +0 -179
- package/dist/config-0.js +0 -15
- package/dist/config.js +0 -16
- package/dist/constants/cell-types.js +0 -29
- package/dist/constants/column.js +0 -4
- package/dist/containers/code-highlight-package.js +0 -14
- package/dist/containers/controller/block-element-controller.js +0 -375
- package/dist/containers/controller/index.js +0 -5
- package/dist/containers/controller/inline-element-controller.js +0 -134
- package/dist/containers/controller/normalize-controller.js +0 -95
- package/dist/containers/controller/shortcut-controller.js +0 -385
- package/dist/containers/controller/void-element-controller.js +0 -9
- package/dist/containers/custom/custom.js +0 -18
- package/dist/containers/custom/get-event-transfer.js +0 -33
- package/dist/containers/custom/getNodesByTypeAtRange.js +0 -57
- package/dist/containers/custom/insertNodes.js +0 -120
- package/dist/containers/custom/is-empty-paragraph.js +0 -9
- package/dist/containers/custom/set-event-transfer.js +0 -30
- package/dist/containers/custom/split-nodes-at-point.js +0 -136
- package/dist/containers/custom/unwrap-node-by-type-at-range.js +0 -70
- package/dist/containers/editor-context.js +0 -85
- package/dist/containers/editor-utils/block-element-utils/blockquote-utils.js +0 -80
- package/dist/containers/editor-utils/block-element-utils/code-utils.js +0 -145
- package/dist/containers/editor-utils/block-element-utils/formula-utils.js +0 -51
- package/dist/containers/editor-utils/block-element-utils/index.js +0 -31
- package/dist/containers/editor-utils/block-element-utils/list-utils.js +0 -395
- package/dist/containers/editor-utils/block-element-utils/table-utils.js +0 -412
- package/dist/containers/editor-utils/clear-format-utils.js +0 -84
- package/dist/containers/editor-utils/common-editor-utils.js +0 -492
- package/dist/containers/editor-utils/inline-element-utils/index.js +0 -95
- package/dist/containers/editor-utils/mark-utils.js +0 -20
- package/dist/containers/editor-utils/range-utils.js +0 -7
- package/dist/containers/editor-utils/selection-utils.js +0 -30
- package/dist/containers/editor-utils/text-utils.js +0 -117
- package/dist/containers/editor-widgets/check-list-item.js +0 -53
- package/dist/containers/editor-widgets/code-block.js +0 -128
- package/dist/containers/editor-widgets/column.js +0 -100
- package/dist/containers/editor-widgets/formula.js +0 -67
- package/dist/containers/editor-widgets/image.js +0 -237
- package/dist/containers/editor-widgets/link.js +0 -9
- package/dist/containers/editor-widgets/table.js +0 -144
- package/dist/containers/element-model/blockquote.js +0 -13
- package/dist/containers/element-model/column.js +0 -19
- package/dist/containers/element-model/image.js +0 -16
- package/dist/containers/element-model/link.js +0 -16
- package/dist/containers/element-model/table.js +0 -57
- package/dist/containers/element-model/text.js +0 -10
- package/dist/containers/render-utils/common-utils.js +0 -80
- package/dist/containers/render-utils/editor-utils.js +0 -133
- package/dist/containers/render-utils/viewer-utils.js +0 -198
- package/dist/containers/viewer-widgets/viewer-formula/index.js +0 -54
- package/dist/containers/viewer-widgets/viewer-image/index.js +0 -70
- package/dist/containers/viewer-widgets/viewer-image/viewer-image.css +0 -3
- package/dist/editors/index.js +0 -78
- package/dist/editors/markdown-editor.js +0 -280
- package/dist/editors/plain-markdown-editor.js +0 -285
- package/dist/editors/seatable-editor.js +0 -210
- package/dist/editors/simple-editor.js +0 -200
- package/dist/utils/deserialize-html.js +0 -260
- package/dist/utils/diff/compare-strings.js +0 -35
- package/dist/utils/diff/diff.js +0 -769
- package/dist/utils/diff/index.js +0 -2
- package/dist/utils/seafile-markdown2html.js +0 -52
- package/dist/utils/slate2markdown/deserialize.js +0 -588
- package/dist/utils/slate2markdown/index.js +0 -3
- package/dist/utils/slate2markdown/serialize.js +0 -366
- package/dist/utils/utils.js +0 -69
- package/dist/viewer/diff-viewer.js +0 -85
- package/dist/viewer/index.js +0 -4
- package/dist/viewer/markdown-viewer.js +0 -121
- package/dist/viewer/seatable-viewer.js +0 -63
- package/dist/viewer/slate-viewer.js +0 -71
- /package/dist/assets/css/{new-editor-toolbar.css → sdoc-editor-toolbar.css} +0 -0
- /package/dist/assets/css/{new-editor.css → sdoc-editor.css} +0 -0
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { withTranslation } from 'react-i18next';
|
|
7
|
-
var ContextMenu = /*#__PURE__*/function (_React$Component) {
|
|
8
|
-
_inherits(ContextMenu, _React$Component);
|
|
9
|
-
var _super = _createSuper(ContextMenu);
|
|
10
|
-
function ContextMenu(props) {
|
|
11
|
-
var _this;
|
|
12
|
-
_classCallCheck(this, ContextMenu);
|
|
13
|
-
_this = _super.call(this, props);
|
|
14
|
-
_this.setMenuPosition = function () {
|
|
15
|
-
var menuHeight = _this.menu.offsetHeight;
|
|
16
|
-
// get height of context menu when the menu is drawing completed in this page
|
|
17
|
-
if (menuHeight === 0) {
|
|
18
|
-
requestAnimationFrame(_this.setMenuPosition);
|
|
19
|
-
}
|
|
20
|
-
var top = 0;
|
|
21
|
-
if (_this.position.top + menuHeight > document.body.clientHeight) {
|
|
22
|
-
top = document.body.clientHeight - menuHeight - 5;
|
|
23
|
-
} else {
|
|
24
|
-
top = _this.position.top;
|
|
25
|
-
}
|
|
26
|
-
var left = _this.position.left + 3;
|
|
27
|
-
_this.setState({
|
|
28
|
-
contextStyle: {
|
|
29
|
-
top: top,
|
|
30
|
-
left: left,
|
|
31
|
-
zIndex: '1071',
|
|
32
|
-
display: 'block'
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
_this.state = {
|
|
37
|
-
contextStyle: {}
|
|
38
|
-
};
|
|
39
|
-
_this.tableUtils = props.tableUtils;
|
|
40
|
-
return _this;
|
|
41
|
-
}
|
|
42
|
-
_createClass(ContextMenu, [{
|
|
43
|
-
key: "componentDidMount",
|
|
44
|
-
value: function componentDidMount() {
|
|
45
|
-
this.position = this.props.contextMenuPosition;
|
|
46
|
-
this.setMenuPosition();
|
|
47
|
-
}
|
|
48
|
-
}, {
|
|
49
|
-
key: "componentWillUnmount",
|
|
50
|
-
value: function componentWillUnmount() {
|
|
51
|
-
this.menu = null;
|
|
52
|
-
}
|
|
53
|
-
}, {
|
|
54
|
-
key: "render",
|
|
55
|
-
value: function render() {
|
|
56
|
-
var _this2 = this;
|
|
57
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
58
|
-
role: 'menu',
|
|
59
|
-
style: this.state.contextStyle,
|
|
60
|
-
ref: function ref(_ref) {
|
|
61
|
-
return _this2.menu = _ref;
|
|
62
|
-
},
|
|
63
|
-
className: 'seafile-contextmenu dropdown-menu'
|
|
64
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
65
|
-
onMouseDown: function onMouseDown(event) {
|
|
66
|
-
return _this2.tableUtils.insertRow('before');
|
|
67
|
-
},
|
|
68
|
-
className: 'seafile-contextmenu-item dropdown-item'
|
|
69
|
-
}, this.props.t('Insert_Row_Before')), /*#__PURE__*/React.createElement("button", {
|
|
70
|
-
onMouseDown: function onMouseDown(event) {
|
|
71
|
-
return _this2.tableUtils.insertRow('after');
|
|
72
|
-
},
|
|
73
|
-
className: 'seafile-contextmenu-item dropdown-item'
|
|
74
|
-
}, this.props.t('Insert_Row_After')), /*#__PURE__*/React.createElement("button", {
|
|
75
|
-
onMouseDown: function onMouseDown(event) {
|
|
76
|
-
return _this2.tableUtils.insertColumn('before');
|
|
77
|
-
},
|
|
78
|
-
className: 'seafile-contextmenu-item dropdown-item'
|
|
79
|
-
}, this.props.t('Insert_Column_Before')), /*#__PURE__*/React.createElement("button", {
|
|
80
|
-
onMouseDown: function onMouseDown(event) {
|
|
81
|
-
return _this2.tableUtils.insertColumn('after');
|
|
82
|
-
},
|
|
83
|
-
className: 'seafile-contextmenu-item dropdown-item'
|
|
84
|
-
}, this.props.t('Insert_Column_After')), /*#__PURE__*/React.createElement("div", {
|
|
85
|
-
className: 'seafile-divider dropdown-divider'
|
|
86
|
-
}), /*#__PURE__*/React.createElement("button", {
|
|
87
|
-
onMouseDown: this.tableUtils.removeRow,
|
|
88
|
-
className: 'seafile-contextmenu-item dropdown-item'
|
|
89
|
-
}, this.props.t('Remove_Row')), /*#__PURE__*/React.createElement("button", {
|
|
90
|
-
onMouseDown: this.tableUtils.removeColumn,
|
|
91
|
-
className: 'seafile-contextmenu-item dropdown-item'
|
|
92
|
-
}, this.props.t('Remove_Column')));
|
|
93
|
-
}
|
|
94
|
-
}]);
|
|
95
|
-
return ContextMenu;
|
|
96
|
-
}(React.Component);
|
|
97
|
-
export default withTranslation('seafile-editor')(ContextMenu);
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
-
import React, { Fragment } from 'react';
|
|
6
|
-
import { Button, Modal, ModalHeader, ModalBody, ModalFooter, Input } from 'reactstrap';
|
|
7
|
-
import { withTranslation } from 'react-i18next';
|
|
8
|
-
import { Editor } from 'slate';
|
|
9
|
-
import EditorContext from '../../containers/editor-context';
|
|
10
|
-
var AddFormulaDialog = /*#__PURE__*/function (_React$PureComponent) {
|
|
11
|
-
_inherits(AddFormulaDialog, _React$PureComponent);
|
|
12
|
-
var _super = _createSuper(AddFormulaDialog);
|
|
13
|
-
function AddFormulaDialog(props) {
|
|
14
|
-
var _this;
|
|
15
|
-
_classCallCheck(this, AddFormulaDialog);
|
|
16
|
-
_this = _super.call(this, props);
|
|
17
|
-
_this.setInitialValue = function () {
|
|
18
|
-
var editor = EditorContext.getEditor();
|
|
19
|
-
var nodes = Editor.match(editor, editor.selection, {
|
|
20
|
-
type: 'formula'
|
|
21
|
-
});
|
|
22
|
-
if (nodes) {
|
|
23
|
-
var data = nodes[0].data;
|
|
24
|
-
_this.setState({
|
|
25
|
-
formula: data.formula
|
|
26
|
-
});
|
|
27
|
-
_this.formulaNode = nodes;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
_this.handleFormulaChange = function (event) {
|
|
31
|
-
_this.renderFormula(event.target.value);
|
|
32
|
-
_this.setState({
|
|
33
|
-
formula: event.target.value
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
_this.renderFormula = function (formula) {
|
|
37
|
-
_this.formulaPreviewer.innerHTML = '';
|
|
38
|
-
var dom = window.MathJax.tex2svg(formula);
|
|
39
|
-
_this.formulaPreviewer.appendChild(dom);
|
|
40
|
-
};
|
|
41
|
-
_this.handleSubmit = function (event) {
|
|
42
|
-
event.preventDefault();
|
|
43
|
-
var formula = _this.state.formula;
|
|
44
|
-
if (_this.formulaNode) {
|
|
45
|
-
_this.editorUtils.setFormula({
|
|
46
|
-
formula: formula,
|
|
47
|
-
at: _this.formulaNode[1]
|
|
48
|
-
});
|
|
49
|
-
} else {
|
|
50
|
-
_this.editorUtils.addFormula({
|
|
51
|
-
formula: formula,
|
|
52
|
-
at: _this.editorSelection
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
_this.props.toggleFormulaDialog();
|
|
56
|
-
};
|
|
57
|
-
_this.state = {
|
|
58
|
-
formula: ''
|
|
59
|
-
};
|
|
60
|
-
_this.formulaNode = null;
|
|
61
|
-
_this.editorSelection = null;
|
|
62
|
-
_this.editorUtils = EditorContext.getEditorUtils();
|
|
63
|
-
return _this;
|
|
64
|
-
}
|
|
65
|
-
_createClass(AddFormulaDialog, [{
|
|
66
|
-
key: "componentWillMount",
|
|
67
|
-
value: function componentWillMount() {
|
|
68
|
-
this.setInitialValue();
|
|
69
|
-
}
|
|
70
|
-
}, {
|
|
71
|
-
key: "componentDidMount",
|
|
72
|
-
value: function componentDidMount() {
|
|
73
|
-
var editor = EditorContext.getEditor();
|
|
74
|
-
this.editorSelection = editor.selection;
|
|
75
|
-
if (this.formulaNode) {
|
|
76
|
-
this.renderFormula(this.state.formula);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}, {
|
|
80
|
-
key: "render",
|
|
81
|
-
value: function render() {
|
|
82
|
-
var _this2 = this;
|
|
83
|
-
return /*#__PURE__*/React.createElement(Modal, {
|
|
84
|
-
isOpen: true,
|
|
85
|
-
toggle: this.props.toggleFormulaDialog,
|
|
86
|
-
className: this.props.className,
|
|
87
|
-
returnFocusAfterClose: false
|
|
88
|
-
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
89
|
-
toggle: this.props.toggleFormulaDialog
|
|
90
|
-
}, this.props.t('insert_formula')), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
91
|
-
className: "form-group"
|
|
92
|
-
}, /*#__PURE__*/React.createElement("label", {
|
|
93
|
-
className: "form-check-label"
|
|
94
|
-
}, this.props.t('formula')), /*#__PURE__*/React.createElement(Input, {
|
|
95
|
-
type: "textarea",
|
|
96
|
-
className: "form-control",
|
|
97
|
-
value: this.state.formula,
|
|
98
|
-
onChange: this.handleFormulaChange
|
|
99
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
100
|
-
ref: function ref(_ref) {
|
|
101
|
-
return _this2.formulaPreviewer = _ref;
|
|
102
|
-
},
|
|
103
|
-
className: "formula-preview"
|
|
104
|
-
}))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
105
|
-
color: "secondary",
|
|
106
|
-
onClick: this.props.toggleFormulaDialog
|
|
107
|
-
}, this.props.t('cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
108
|
-
color: "primary",
|
|
109
|
-
disabled: false,
|
|
110
|
-
onClick: this.handleSubmit
|
|
111
|
-
}, this.props.t('insert_formula'))));
|
|
112
|
-
}
|
|
113
|
-
}]);
|
|
114
|
-
return AddFormulaDialog;
|
|
115
|
-
}(React.PureComponent);
|
|
116
|
-
export default withTranslation('seafile-editor')(AddFormulaDialog);
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { Button, Modal, ModalHeader, ModalBody, ModalFooter, Form, FormGroup, Label, Input } from 'reactstrap';
|
|
7
|
-
import { withTranslation } from 'react-i18next';
|
|
8
|
-
import EditorContext from '../../containers/editor-context';
|
|
9
|
-
var AddImageDialog = /*#__PURE__*/function (_React$PureComponent) {
|
|
10
|
-
_inherits(AddImageDialog, _React$PureComponent);
|
|
11
|
-
var _super = _createSuper(AddImageDialog);
|
|
12
|
-
function AddImageDialog(props) {
|
|
13
|
-
var _this;
|
|
14
|
-
_classCallCheck(this, AddImageDialog);
|
|
15
|
-
_this = _super.call(this, props);
|
|
16
|
-
_this.handleUrlChange = function (event) {
|
|
17
|
-
_this.setState({
|
|
18
|
-
url: event.target.value
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
_this.handleSubmit = function (event) {
|
|
22
|
-
_this.props.insertImage({
|
|
23
|
-
url: _this.state.url,
|
|
24
|
-
selection: _this.editorSelection
|
|
25
|
-
});
|
|
26
|
-
_this.props.onToggleImageDialog();
|
|
27
|
-
};
|
|
28
|
-
_this.state = {
|
|
29
|
-
url: ''
|
|
30
|
-
};
|
|
31
|
-
_this.editorSelection = null;
|
|
32
|
-
return _this;
|
|
33
|
-
}
|
|
34
|
-
_createClass(AddImageDialog, [{
|
|
35
|
-
key: "componentDidMount",
|
|
36
|
-
value: function componentDidMount() {
|
|
37
|
-
var editor = EditorContext.getEditor();
|
|
38
|
-
this.editorSelection = editor.selection;
|
|
39
|
-
}
|
|
40
|
-
}, {
|
|
41
|
-
key: "render",
|
|
42
|
-
value: function render() {
|
|
43
|
-
return /*#__PURE__*/React.createElement(Modal, {
|
|
44
|
-
isOpen: true,
|
|
45
|
-
toggle: this.props.onToggleImageDialog,
|
|
46
|
-
className: this.props.className,
|
|
47
|
-
zIndex: 1071
|
|
48
|
-
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
49
|
-
toggle: this.props.onToggleImageDialog
|
|
50
|
-
}, this.props.t('insert_image')), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(FormGroup, null, /*#__PURE__*/React.createElement(Label, {
|
|
51
|
-
for: "columnName"
|
|
52
|
-
}, this.props.t('image_address')), /*#__PURE__*/React.createElement(Input, {
|
|
53
|
-
id: "columnName",
|
|
54
|
-
value: this.state.value,
|
|
55
|
-
onChange: this.handleUrlChange,
|
|
56
|
-
autoFocus: true
|
|
57
|
-
})))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
58
|
-
color: "secondary",
|
|
59
|
-
onClick: this.props.onToggleImageDialog
|
|
60
|
-
}, this.props.t('cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
61
|
-
color: "primary",
|
|
62
|
-
disabled: this.state.url.length === 0,
|
|
63
|
-
onClick: this.handleSubmit
|
|
64
|
-
}, this.props.t('submit')), ' '));
|
|
65
|
-
}
|
|
66
|
-
}]);
|
|
67
|
-
return AddImageDialog;
|
|
68
|
-
}(React.PureComponent);
|
|
69
|
-
export default withTranslation('seafile-editor')(AddImageDialog);
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
-
import React, { Fragment } from 'react';
|
|
6
|
-
import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
|
|
7
|
-
import { withTranslation } from 'react-i18next';
|
|
8
|
-
import EditorContext from '../../containers/editor-context';
|
|
9
|
-
var AddLinkDialog = /*#__PURE__*/function (_React$PureComponent) {
|
|
10
|
-
_inherits(AddLinkDialog, _React$PureComponent);
|
|
11
|
-
var _super = _createSuper(AddLinkDialog);
|
|
12
|
-
function AddLinkDialog(props) {
|
|
13
|
-
var _this;
|
|
14
|
-
_classCallCheck(this, AddLinkDialog);
|
|
15
|
-
_this = _super.call(this, props);
|
|
16
|
-
_this.setInitialValue = function () {
|
|
17
|
-
var text = _this.editorUtils.getSelectedText();
|
|
18
|
-
if (_this.isLinkActive) {
|
|
19
|
-
var linkNode = _this.editorUtils.getCurrentLinkNode();
|
|
20
|
-
_this.setState({
|
|
21
|
-
title: _this.editorUtils.getLinkText(linkNode),
|
|
22
|
-
url: linkNode.data.href
|
|
23
|
-
});
|
|
24
|
-
} else {
|
|
25
|
-
_this.setState({
|
|
26
|
-
title: text,
|
|
27
|
-
url: ''
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
_this.handleUrlChange = function (event) {
|
|
32
|
-
_this.setState({
|
|
33
|
-
url: event.target.value
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
_this.handleTitleChange = function (event) {
|
|
37
|
-
_this.setState({
|
|
38
|
-
title: event.target.value
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
_this.handleSubmit = function (event) {
|
|
42
|
-
event.preventDefault();
|
|
43
|
-
if (_this.state.title.length === 0 || _this.state.url.length === 0) return;
|
|
44
|
-
if (!_this.isLinkActive) {
|
|
45
|
-
_this.editorUtils.insertLink({
|
|
46
|
-
text: _this.state.title,
|
|
47
|
-
url: _this.state.url,
|
|
48
|
-
selection: _this.editorSelection
|
|
49
|
-
});
|
|
50
|
-
} else {
|
|
51
|
-
_this.editorUtils.setLink({
|
|
52
|
-
text: _this.state.title,
|
|
53
|
-
url: _this.state.url,
|
|
54
|
-
selection: _this.editorSelection
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
_this.props.toggleLinkDialog();
|
|
58
|
-
};
|
|
59
|
-
_this.onKeyDown = function (e) {
|
|
60
|
-
if (e.keyCode === 13) {
|
|
61
|
-
_this.handleSubmit(e);
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
_this.editorUtils = EditorContext.getEditorUtils();
|
|
65
|
-
_this.isLinkActive = _this.editorUtils.isLinkActive();
|
|
66
|
-
_this.editorSelection = null;
|
|
67
|
-
_this.state = {
|
|
68
|
-
url: '',
|
|
69
|
-
title: ''
|
|
70
|
-
};
|
|
71
|
-
return _this;
|
|
72
|
-
}
|
|
73
|
-
_createClass(AddLinkDialog, [{
|
|
74
|
-
key: "componentWillMount",
|
|
75
|
-
value: function componentWillMount() {
|
|
76
|
-
this.setInitialValue();
|
|
77
|
-
}
|
|
78
|
-
}, {
|
|
79
|
-
key: "componentDidMount",
|
|
80
|
-
value: function componentDidMount() {
|
|
81
|
-
var editor = EditorContext.getEditor();
|
|
82
|
-
this.editorSelection = editor.selection;
|
|
83
|
-
}
|
|
84
|
-
}, {
|
|
85
|
-
key: "render",
|
|
86
|
-
value: function render() {
|
|
87
|
-
return /*#__PURE__*/React.createElement(Modal, {
|
|
88
|
-
isOpen: true,
|
|
89
|
-
autoFocus: false,
|
|
90
|
-
toggle: this.props.toggleLinkDialog,
|
|
91
|
-
className: this.props.className,
|
|
92
|
-
zIndex: 1071,
|
|
93
|
-
returnFocusAfterClose: false
|
|
94
|
-
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
95
|
-
toggle: this.props.toggleLinkDialog
|
|
96
|
-
}, this.props.t('insert_link')), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
97
|
-
className: "form-group"
|
|
98
|
-
}, /*#__PURE__*/React.createElement("label", {
|
|
99
|
-
className: "form-check-label",
|
|
100
|
-
htmlFor: "addLink"
|
|
101
|
-
}, this.props.t('link_address')), /*#__PURE__*/React.createElement("input", {
|
|
102
|
-
onKeyDown: this.onKeyDown,
|
|
103
|
-
autoFocus: true,
|
|
104
|
-
type: "url",
|
|
105
|
-
className: "form-control",
|
|
106
|
-
id: "addLink",
|
|
107
|
-
value: this.state.url,
|
|
108
|
-
onChange: this.handleUrlChange
|
|
109
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
110
|
-
className: "form-group"
|
|
111
|
-
}, /*#__PURE__*/React.createElement("label", {
|
|
112
|
-
className: "form-check-label",
|
|
113
|
-
htmlFor: "addTitle"
|
|
114
|
-
}, this.props.t('link_title')), /*#__PURE__*/React.createElement("input", {
|
|
115
|
-
onKeyDown: this.onKeyDown,
|
|
116
|
-
type: "text",
|
|
117
|
-
className: "form-control",
|
|
118
|
-
id: "addTitle",
|
|
119
|
-
value: this.state.title,
|
|
120
|
-
onChange: this.handleTitleChange
|
|
121
|
-
})))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
122
|
-
color: "secondary",
|
|
123
|
-
onClick: this.props.toggleLinkDialog
|
|
124
|
-
}, this.props.t('cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
125
|
-
color: "primary",
|
|
126
|
-
disabled: false,
|
|
127
|
-
onClick: this.handleSubmit
|
|
128
|
-
}, this.props.t('add_link'))));
|
|
129
|
-
}
|
|
130
|
-
}]);
|
|
131
|
-
return AddLinkDialog;
|
|
132
|
-
}(React.PureComponent);
|
|
133
|
-
export default withTranslation('seafile-editor')(AddLinkDialog);
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { withTranslation } from 'react-i18next';
|
|
7
|
-
import { Button } from 'reactstrap';
|
|
8
|
-
import { processor } from '../../utils/seafile-markdown2html';
|
|
9
|
-
import '../../assets/css/comment-dialog.css';
|
|
10
|
-
var CommentDialog = /*#__PURE__*/function (_React$Component) {
|
|
11
|
-
_inherits(CommentDialog, _React$Component);
|
|
12
|
-
var _super = _createSuper(CommentDialog);
|
|
13
|
-
function CommentDialog(props) {
|
|
14
|
-
var _this;
|
|
15
|
-
_classCallCheck(this, CommentDialog);
|
|
16
|
-
_this = _super.call(this, props);
|
|
17
|
-
_this.handleCommentChange = function (event) {
|
|
18
|
-
var comment = event.target.value;
|
|
19
|
-
_this.setState({
|
|
20
|
-
comment: comment
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
_this.submitComment = function () {
|
|
24
|
-
var comment = _this.state.comment.trim();
|
|
25
|
-
if (comment.length > 0 && _this.props.quote.length > 0) {
|
|
26
|
-
var detail = {
|
|
27
|
-
quote: _this.props.quote,
|
|
28
|
-
position: _this.props.commentPosition
|
|
29
|
-
};
|
|
30
|
-
var detailJSON = JSON.stringify(detail);
|
|
31
|
-
_this.props.editorApi.postComment(comment, detailJSON).then(function (res) {
|
|
32
|
-
_this.props.onCommentAdded();
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
_this.setQuoteText = function (mdQuote) {
|
|
37
|
-
processor.process(mdQuote).then(function (result) {
|
|
38
|
-
var quote = String(result);
|
|
39
|
-
_this.setState({
|
|
40
|
-
quote: quote
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
_this.state = {
|
|
45
|
-
comment: '',
|
|
46
|
-
quote: ''
|
|
47
|
-
};
|
|
48
|
-
return _this;
|
|
49
|
-
}
|
|
50
|
-
_createClass(CommentDialog, [{
|
|
51
|
-
key: "componentDidMount",
|
|
52
|
-
value: function componentDidMount() {
|
|
53
|
-
this.setQuoteText(this.props.quote);
|
|
54
|
-
}
|
|
55
|
-
}, {
|
|
56
|
-
key: "componentWillReceiveProps",
|
|
57
|
-
value: function componentWillReceiveProps(nextProps) {
|
|
58
|
-
if (this.props.quote !== nextProps.quote) {
|
|
59
|
-
this.setQuoteText(nextProps.quote);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}, {
|
|
63
|
-
key: "render",
|
|
64
|
-
value: function render() {
|
|
65
|
-
var t = this.props.t;
|
|
66
|
-
var _this$state = this.state,
|
|
67
|
-
comment = _this$state.comment,
|
|
68
|
-
quote = _this$state.quote;
|
|
69
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
70
|
-
className: "seafile-editor-comment comment-dialog"
|
|
71
|
-
}, /*#__PURE__*/React.createElement("div", null, this.props.editorApi.name), /*#__PURE__*/React.createElement("blockquote", {
|
|
72
|
-
className: "comment-dialog-quote"
|
|
73
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
74
|
-
dangerouslySetInnerHTML: {
|
|
75
|
-
__html: quote
|
|
76
|
-
}
|
|
77
|
-
})), /*#__PURE__*/React.createElement("textarea", {
|
|
78
|
-
value: comment,
|
|
79
|
-
onChange: this.handleCommentChange
|
|
80
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
81
|
-
className: "button-group"
|
|
82
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
83
|
-
size: "sm",
|
|
84
|
-
color: "primary",
|
|
85
|
-
onClick: this.submitComment
|
|
86
|
-
}, t('submit')), /*#__PURE__*/React.createElement(Button, {
|
|
87
|
-
size: "sm",
|
|
88
|
-
color: "secondary",
|
|
89
|
-
onClick: this.props.toggleCommentDialog
|
|
90
|
-
}, t('cancel'))), /*#__PURE__*/React.createElement("span", {
|
|
91
|
-
className: "comment-dialog-triangle"
|
|
92
|
-
}));
|
|
93
|
-
}
|
|
94
|
-
}]);
|
|
95
|
-
return CommentDialog;
|
|
96
|
-
}(React.Component);
|
|
97
|
-
export default withTranslation('seafile-editor')(CommentDialog);
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
-
import React, { Fragment } from 'react';
|
|
6
|
-
import { Modal, ModalHeader, ModalBody } from 'reactstrap';
|
|
7
|
-
import { withTranslation } from 'react-i18next';
|
|
8
|
-
import '../../assets/css/keyboard-shortcuts.css';
|
|
9
|
-
var isMac = window.navigator.platform.indexOf('Win') < 0 ? true : false;
|
|
10
|
-
var controlKey = isMac ? '⌘' : 'CTRL';
|
|
11
|
-
var KeyboardShortcuts = /*#__PURE__*/function (_React$PureComponent) {
|
|
12
|
-
_inherits(KeyboardShortcuts, _React$PureComponent);
|
|
13
|
-
var _super = _createSuper(KeyboardShortcuts);
|
|
14
|
-
function KeyboardShortcuts() {
|
|
15
|
-
var _this;
|
|
16
|
-
_classCallCheck(this, KeyboardShortcuts);
|
|
17
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
18
|
-
args[_key] = arguments[_key];
|
|
19
|
-
}
|
|
20
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
21
|
-
_this.renderShortcut = function (keys) {
|
|
22
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
23
|
-
className: "keyboard-shortcut"
|
|
24
|
-
}, keys.map(function (key, index) {
|
|
25
|
-
return /*#__PURE__*/React.createElement("kbd", {
|
|
26
|
-
key: index
|
|
27
|
-
}, key);
|
|
28
|
-
})), /*#__PURE__*/React.createElement("br", null));
|
|
29
|
-
};
|
|
30
|
-
_this.renderContainer = function (keys, description) {
|
|
31
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
32
|
-
className: "keyboard-shortcut-container"
|
|
33
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
34
|
-
className: "col-4"
|
|
35
|
-
}, _this.renderShortcut(keys)), /*#__PURE__*/React.createElement("div", {
|
|
36
|
-
className: "col-8"
|
|
37
|
-
}, description));
|
|
38
|
-
};
|
|
39
|
-
return _this;
|
|
40
|
-
}
|
|
41
|
-
_createClass(KeyboardShortcuts, [{
|
|
42
|
-
key: "render",
|
|
43
|
-
value: function render() {
|
|
44
|
-
var _this$props = this.props,
|
|
45
|
-
t = _this$props.t,
|
|
46
|
-
toggleShortcutDialog = _this$props.toggleShortcutDialog,
|
|
47
|
-
userHelp = _this$props.userHelp;
|
|
48
|
-
var userHelpData = userHelp.userHelpData;
|
|
49
|
-
return /*#__PURE__*/React.createElement(Modal, {
|
|
50
|
-
isOpen: true,
|
|
51
|
-
toggle: toggleShortcutDialog,
|
|
52
|
-
className: "keyboard-shortcut-dialog",
|
|
53
|
-
zIndex: 1071
|
|
54
|
-
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
55
|
-
toggle: toggleShortcutDialog
|
|
56
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
57
|
-
className: "mr-2"
|
|
58
|
-
}, t(userHelp.title))), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
59
|
-
className: "pb-2"
|
|
60
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
61
|
-
className: "keyboard-shortcut-title pb-1"
|
|
62
|
-
}, t(userHelpData[1]['shortcutType'])), this.renderContainer(['#', 'space'], t(userHelpData[1].shortcutData['Heading_1'])), this.renderContainer(['##', 'space'], t(userHelpData[1].shortcutData['Heading_2'])), this.renderContainer(['###', 'space'], t(userHelpData[1].shortcutData['Heading_3'])), this.renderContainer(['####', 'space'], t(userHelpData[1].shortcutData['Heading_4'])), this.renderContainer(['#####', 'space'], t(userHelpData[1].shortcutData['Heading_5'])), this.renderContainer(['######', 'space'], t(userHelpData[1].shortcutData['Heading_6']))), /*#__PURE__*/React.createElement("div", {
|
|
63
|
-
className: "pb-2"
|
|
64
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
65
|
-
className: "keyboard-shortcut-title pb-1"
|
|
66
|
-
}, t(userHelpData[0]['shortcutType'])), /*#__PURE__*/React.createElement("div", {
|
|
67
|
-
className: "keyboard-shortcut-container"
|
|
68
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
69
|
-
className: "col-4"
|
|
70
|
-
}, this.renderShortcut(['*', 'space']), this.renderShortcut(['-', 'space'])), /*#__PURE__*/React.createElement("div", {
|
|
71
|
-
className: "col-8"
|
|
72
|
-
}, t(userHelpData[0].shortcutData['Make_list']))), /*#__PURE__*/React.createElement("div", {
|
|
73
|
-
className: "keyboard-shortcut-container"
|
|
74
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
75
|
-
className: "col-4"
|
|
76
|
-
}, this.renderShortcut(['1.', 'space'])), /*#__PURE__*/React.createElement("div", {
|
|
77
|
-
className: "col-8"
|
|
78
|
-
}, t(userHelpData[0].shortcutData['Make_ordered_list']))), this.renderContainer(['Tab'], t(userHelpData[0].shortcutData['Increase_depth'])), this.renderContainer(['Shift', 'Enter'], t(userHelpData[0].shortcutData['Insert_child_in_item'])), this.renderContainer(['Enter'], t(userHelpData[0].shortcutData['Insert_new_item']))), /*#__PURE__*/React.createElement("div", {
|
|
79
|
-
className: "pb-2"
|
|
80
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
81
|
-
className: "keyboard-shortcut-title pb-1"
|
|
82
|
-
}, t(userHelpData[6]['shortcutType'])), /*#__PURE__*/React.createElement("div", {
|
|
83
|
-
className: "keyboard-shortcut-container"
|
|
84
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
85
|
-
className: "col-4"
|
|
86
|
-
}, this.renderShortcut(['**bold**', 'space']), this.renderShortcut(['__bold__', 'space'])), /*#__PURE__*/React.createElement("div", {
|
|
87
|
-
className: "col-8"
|
|
88
|
-
}, t(userHelpData[6].shortcutData['Bold']))), /*#__PURE__*/React.createElement("div", {
|
|
89
|
-
className: "keyboard-shortcut-container"
|
|
90
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
91
|
-
className: "col-4"
|
|
92
|
-
}, this.renderShortcut(['*italic*', 'space']), this.renderShortcut(['_italic_', 'space'])), /*#__PURE__*/React.createElement("div", {
|
|
93
|
-
className: "col-8"
|
|
94
|
-
}, t(userHelpData[6].shortcutData['Italic']))), /*#__PURE__*/React.createElement("div", {
|
|
95
|
-
className: "keyboard-shortcut-container"
|
|
96
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
97
|
-
className: "col-4"
|
|
98
|
-
}, this.renderShortcut(['***italic***', 'space']), this.renderShortcut(['___italic___', 'space'])), /*#__PURE__*/React.createElement("div", {
|
|
99
|
-
className: "col-8"
|
|
100
|
-
}, t(userHelpData[6].shortcutData['Italic_Bold']))), this.renderContainer(['`code`', 'space'], t(userHelpData[6].shortcutData['Inline_code']))), /*#__PURE__*/React.createElement("div", {
|
|
101
|
-
className: "pb-2"
|
|
102
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
103
|
-
className: "keyboard-shortcut-title pb-1"
|
|
104
|
-
}, t(userHelpData[2]['shortcutType'])), /*#__PURE__*/React.createElement("div", {
|
|
105
|
-
className: "keyboard-shortcut-container"
|
|
106
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
107
|
-
className: "col-4"
|
|
108
|
-
}, this.renderShortcut(['```']), this.renderShortcut(['space*4'])), /*#__PURE__*/React.createElement("div", {
|
|
109
|
-
className: "col-8"
|
|
110
|
-
}, t(userHelpData[2].shortcutData['Make_code_block']))), this.renderContainer(['Tab'], t(userHelpData[2].shortcutData['Insert_indent'])), this.renderContainer(['Enter'], t(userHelpData[2].shortcutData['Insert_new_line'])), this.renderContainer([controlKey, 'Enter'], t(userHelpData[2].shortcutData['Escape_code_block']))), /*#__PURE__*/React.createElement("div", {
|
|
111
|
-
className: "pb-2"
|
|
112
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
113
|
-
className: "keyboard-shortcut-title pb-1"
|
|
114
|
-
}, t(userHelpData[3]['shortcutType'])), this.renderContainer(['>', 'space'], t(userHelpData[3].shortcutData['Make_Block_quote'])), this.renderContainer(['Enter'], t(userHelpData[3].shortcutData['Escape_Block_quote']))), /*#__PURE__*/React.createElement("div", {
|
|
115
|
-
className: "pb-2"
|
|
116
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
117
|
-
className: "keyboard-shortcut-title pb-1"
|
|
118
|
-
}, t(userHelpData[4]['shortcutType'])), this.renderContainer(['Enter'], t(userHelpData[4].shortcutData['Insert_Table_Row'])), this.renderContainer([controlKey, 'Enter'], t(userHelpData[4].shortcutData['Escape_table']))), /*#__PURE__*/React.createElement("div", {
|
|
119
|
-
className: "pb-2"
|
|
120
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
121
|
-
className: "keyboard-shortcut-title pb-1"
|
|
122
|
-
}, t(userHelpData[7]['shortcutType'])), this.renderContainer([controlKey, 's'], t(userHelpData[7].shortcutData['Save_file']))), /*#__PURE__*/React.createElement("div", {
|
|
123
|
-
className: "pb-2"
|
|
124
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
125
|
-
className: "keyboard-shortcut-title pb-1"
|
|
126
|
-
}, t(userHelpData[8]['shortcutType'])), this.renderContainer([controlKey, 'v'], t(userHelpData[8].shortcutData['Paste_screen_shot']))))));
|
|
127
|
-
}
|
|
128
|
-
}]);
|
|
129
|
-
return KeyboardShortcuts;
|
|
130
|
-
}(React.PureComponent);
|
|
131
|
-
export default withTranslation('dtable')(KeyboardShortcuts);
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
-
import React, { Children } from 'react';
|
|
6
|
-
var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
7
|
-
_inherits(ErrorBoundary, _React$Component);
|
|
8
|
-
var _super = _createSuper(ErrorBoundary);
|
|
9
|
-
function ErrorBoundary() {
|
|
10
|
-
_classCallCheck(this, ErrorBoundary);
|
|
11
|
-
return _super.apply(this, arguments);
|
|
12
|
-
}
|
|
13
|
-
_createClass(ErrorBoundary, [{
|
|
14
|
-
key: "componentDidCatch",
|
|
15
|
-
value: function componentDidCatch(error) {
|
|
16
|
-
console.error(error);
|
|
17
|
-
this.forceUpdate();
|
|
18
|
-
}
|
|
19
|
-
}, {
|
|
20
|
-
key: "render",
|
|
21
|
-
value: function render() {
|
|
22
|
-
var children = this.props.children;
|
|
23
|
-
return children;
|
|
24
|
-
}
|
|
25
|
-
}]);
|
|
26
|
-
return ErrorBoundary;
|
|
27
|
-
}(React.Component);
|
|
28
|
-
export default ErrorBoundary;
|