dtable-ui-component 0.1.88 → 0.1.90-test
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/lib/ImageFormatter/images-lazy-load.js +3 -2
- package/lib/SimpleLongTextFormatter/index.js +61 -8
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +90 -0
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +83 -0
- package/lib/SimpleLongTextFormatter/widgets/longTextEditor.css +352 -0
- package/package.json +3 -2
|
@@ -42,7 +42,7 @@ var ImagesLazyLoad = /*#__PURE__*/function (_React$Component) {
|
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
var server = _this.props.server
|
|
45
|
+
var server = _this.props.server;
|
|
46
46
|
images.forEach(function (item) {
|
|
47
47
|
var url = getImageThumbnailUrl(item, server);
|
|
48
48
|
|
|
@@ -121,7 +121,8 @@ var ImagesLazyLoad = /*#__PURE__*/function (_React$Component) {
|
|
|
121
121
|
marginLeft: '4px'
|
|
122
122
|
};
|
|
123
123
|
return /*#__PURE__*/React.createElement("div", {
|
|
124
|
-
style: style
|
|
124
|
+
style: style,
|
|
125
|
+
className: "d-flex align-items-center"
|
|
125
126
|
}, /*#__PURE__*/React.createElement(Loading, null));
|
|
126
127
|
}
|
|
127
128
|
|
|
@@ -5,6 +5,8 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import cn from 'astro-classname';
|
|
7
7
|
import getPreviewContent from './normalize-long-text-value';
|
|
8
|
+
import LongTextPreview from './widgets/LongTextPreview';
|
|
9
|
+
import ModalPortal from '../ModalPortal';
|
|
8
10
|
import './index.css';
|
|
9
11
|
|
|
10
12
|
var SimpleLongTextFormatter = /*#__PURE__*/function (_React$Component) {
|
|
@@ -12,16 +14,12 @@ var SimpleLongTextFormatter = /*#__PURE__*/function (_React$Component) {
|
|
|
12
14
|
|
|
13
15
|
var _super = _createSuper(SimpleLongTextFormatter);
|
|
14
16
|
|
|
15
|
-
function SimpleLongTextFormatter() {
|
|
17
|
+
function SimpleLongTextFormatter(props) {
|
|
16
18
|
var _this;
|
|
17
19
|
|
|
18
20
|
_classCallCheck(this, SimpleLongTextFormatter);
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
args[_key] = arguments[_key];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
22
|
+
_this = _super.call(this, props);
|
|
25
23
|
|
|
26
24
|
_this.renderLinks = function (value) {
|
|
27
25
|
var links = value.links;
|
|
@@ -78,18 +76,73 @@ var SimpleLongTextFormatter = /*#__PURE__*/function (_React$Component) {
|
|
|
78
76
|
return {};
|
|
79
77
|
};
|
|
80
78
|
|
|
79
|
+
_this.clearTimer = function () {
|
|
80
|
+
if (_this.timer) {
|
|
81
|
+
clearTimeout(_this.timer);
|
|
82
|
+
_this.timer = null;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
_this.onMouseEnter = function () {
|
|
87
|
+
// In link formula, when mouse enter, don't open preview
|
|
88
|
+
|
|
89
|
+
/*
|
|
90
|
+
if (this.props.isFormulaFormatter) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
*/
|
|
94
|
+
_this.clearTimer();
|
|
95
|
+
|
|
96
|
+
if (!window.isMobile && _this.state.value && _this.state.value.text) {
|
|
97
|
+
_this.timer = setTimeout(function () {
|
|
98
|
+
var style = _this.ref.getBoundingClientRect();
|
|
99
|
+
|
|
100
|
+
_this.formatterStyle = style;
|
|
101
|
+
|
|
102
|
+
_this.setState({
|
|
103
|
+
isPreview: true
|
|
104
|
+
});
|
|
105
|
+
}, 2000);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
_this.onMouseLeave = function () {
|
|
110
|
+
_this.clearTimer();
|
|
111
|
+
|
|
112
|
+
if (_this.state.isPreview) {
|
|
113
|
+
_this.setState({
|
|
114
|
+
isPreview: false
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
_this.formatterStyle = null;
|
|
120
|
+
_this.state = {
|
|
121
|
+
isPreview: false
|
|
122
|
+
};
|
|
81
123
|
return _this;
|
|
82
124
|
}
|
|
83
125
|
|
|
84
126
|
_createClass(SimpleLongTextFormatter, [{
|
|
85
127
|
key: "render",
|
|
86
128
|
value: function render() {
|
|
129
|
+
var _this2 = this;
|
|
130
|
+
|
|
131
|
+
var isPreview = this.state.isPreview;
|
|
87
132
|
var containerClassName = this.props.containerClassName;
|
|
88
133
|
var className = cn('dtable-ui cell-formatter-container long-text-formatter', containerClassName);
|
|
89
134
|
var value = this.translateValue();
|
|
90
135
|
return /*#__PURE__*/React.createElement("div", {
|
|
91
|
-
className: className
|
|
92
|
-
|
|
136
|
+
className: className,
|
|
137
|
+
onMouseEnter: this.onMouseEnter,
|
|
138
|
+
onMouseLeave: this.onMouseLeave,
|
|
139
|
+
ref: function ref(_ref) {
|
|
140
|
+
return _this2.ref = _ref;
|
|
141
|
+
}
|
|
142
|
+
}, this.renderLinks(value), this.renderCheckList(value), this.renderImages(value), this.renderContent(value), isPreview && /*#__PURE__*/React.createElement(ModalPortal, null, /*#__PURE__*/React.createElement(LongTextPreview, {
|
|
143
|
+
value: value,
|
|
144
|
+
formatterStyle: this.formatterStyle
|
|
145
|
+
})));
|
|
93
146
|
}
|
|
94
147
|
}]);
|
|
95
148
|
|
|
@@ -0,0 +1,90 @@
|
|
|
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 DtableMarkdownViewer from './dtable-markdown-viewer';
|
|
7
|
+
import './longTextEditor.css';
|
|
8
|
+
|
|
9
|
+
var LongTextPreview = /*#__PURE__*/function (_React$PureComponent) {
|
|
10
|
+
_inherits(LongTextPreview, _React$PureComponent);
|
|
11
|
+
|
|
12
|
+
var _super = _createSuper(LongTextPreview);
|
|
13
|
+
|
|
14
|
+
function LongTextPreview(props) {
|
|
15
|
+
var _this;
|
|
16
|
+
|
|
17
|
+
_classCallCheck(this, LongTextPreview);
|
|
18
|
+
|
|
19
|
+
_this = _super.call(this, props);
|
|
20
|
+
|
|
21
|
+
_this.getStyle = function () {
|
|
22
|
+
var formatterStyle = _this.props.formatterStyle;
|
|
23
|
+
var left = formatterStyle.left,
|
|
24
|
+
top = formatterStyle.top;
|
|
25
|
+
var width = 520;
|
|
26
|
+
var height = _this.state.height;
|
|
27
|
+
var padding = 6;
|
|
28
|
+
left = left - width > 0 ? left - width - 12 : 0;
|
|
29
|
+
top = top - padding;
|
|
30
|
+
|
|
31
|
+
if (top + height > window.innerHeight) {
|
|
32
|
+
top = top - height > 0 ? top - height : 0;
|
|
33
|
+
} else if (left === 0) {
|
|
34
|
+
top = top + window.canvas.getRowHeight();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
left: left,
|
|
39
|
+
top: top,
|
|
40
|
+
opacity: _this.state.opacity
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
_this.state = {
|
|
45
|
+
height: 450,
|
|
46
|
+
opacity: 0
|
|
47
|
+
};
|
|
48
|
+
return _this;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
_createClass(LongTextPreview, [{
|
|
52
|
+
key: "componentDidMount",
|
|
53
|
+
value: function componentDidMount() {
|
|
54
|
+
var _this2 = this;
|
|
55
|
+
|
|
56
|
+
setTimeout(function () {
|
|
57
|
+
if (!_this2.ref) return;
|
|
58
|
+
var domHeight = _this2.ref.offsetHeight;
|
|
59
|
+
|
|
60
|
+
_this2.setState({
|
|
61
|
+
height: domHeight,
|
|
62
|
+
opacity: 1
|
|
63
|
+
});
|
|
64
|
+
}, 0);
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
67
|
+
key: "render",
|
|
68
|
+
value: function render() {
|
|
69
|
+
var _this3 = this;
|
|
70
|
+
|
|
71
|
+
var markdownContent = this.props.value ? this.props.value.text : '';
|
|
72
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
73
|
+
className: "longtext-modal-dialog longtext-preview",
|
|
74
|
+
style: this.getStyle(),
|
|
75
|
+
ref: function ref(_ref) {
|
|
76
|
+
return _this3.ref = _ref;
|
|
77
|
+
}
|
|
78
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
79
|
+
className: "longtext-container longtext-container-scroll"
|
|
80
|
+
}, /*#__PURE__*/React.createElement(DtableMarkdownViewer, {
|
|
81
|
+
markdownContent: markdownContent,
|
|
82
|
+
showTOC: false
|
|
83
|
+
})));
|
|
84
|
+
}
|
|
85
|
+
}]);
|
|
86
|
+
|
|
87
|
+
return LongTextPreview;
|
|
88
|
+
}(React.PureComponent);
|
|
89
|
+
|
|
90
|
+
export default LongTextPreview;
|
|
@@ -0,0 +1,83 @@
|
|
|
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 { MarkdownViewer, processor } from '@seafile/seafile-editor';
|
|
7
|
+
|
|
8
|
+
// Windows old Wechat (3.0 or earlier) inner core is chrome 53 and don't support ECMA6, can't use seafile-editor markdownViewer
|
|
9
|
+
// Windows new Wechat (lastest version 3.3.5) support seafile-editor markdownViewer
|
|
10
|
+
// so use dangerouslySetInnerHTML to preview
|
|
11
|
+
var DtableMarkdownViewer = /*#__PURE__*/function (_React$PureComponent) {
|
|
12
|
+
_inherits(DtableMarkdownViewer, _React$PureComponent);
|
|
13
|
+
|
|
14
|
+
var _super = _createSuper(DtableMarkdownViewer);
|
|
15
|
+
|
|
16
|
+
function DtableMarkdownViewer(props) {
|
|
17
|
+
var _this;
|
|
18
|
+
|
|
19
|
+
_classCallCheck(this, DtableMarkdownViewer);
|
|
20
|
+
|
|
21
|
+
_this = _super.call(this, props);
|
|
22
|
+
|
|
23
|
+
_this.checkBrowser = function () {
|
|
24
|
+
if (window.chrome) {
|
|
25
|
+
var appVersion = navigator.appVersion;
|
|
26
|
+
var appVersionList = appVersion.split(' ');
|
|
27
|
+
var index = appVersionList.findIndex(function (version) {
|
|
28
|
+
return version.indexOf('Chrome') >= 0;
|
|
29
|
+
});
|
|
30
|
+
var chromeVersion = appVersionList[index];
|
|
31
|
+
chromeVersion = parseInt(chromeVersion.slice(chromeVersion.indexOf('/') + 1));
|
|
32
|
+
|
|
33
|
+
if (chromeVersion === 53 && navigator.appVersion && navigator.appVersion.includes('WindowsWechat')) {
|
|
34
|
+
_this.convertMarkdown(_this.props.markdownContent);
|
|
35
|
+
|
|
36
|
+
_this.isWindowsWechat = true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
_this.convertMarkdown = function (mdFile) {
|
|
42
|
+
processor.process(mdFile).then(function (result) {
|
|
43
|
+
var innerHtml = String(result).replace(/<a /ig, '<a target="_blank" tabindex="-1"');
|
|
44
|
+
|
|
45
|
+
_this.setState({
|
|
46
|
+
innerHtml: innerHtml
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
_this.state = {
|
|
52
|
+
innerHtml: null
|
|
53
|
+
};
|
|
54
|
+
_this.isWindowsWechat = false;
|
|
55
|
+
|
|
56
|
+
_this.checkBrowser();
|
|
57
|
+
|
|
58
|
+
return _this;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
_createClass(DtableMarkdownViewer, [{
|
|
62
|
+
key: "render",
|
|
63
|
+
value: function render() {
|
|
64
|
+
if (this.isWindowsWechat) {
|
|
65
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
66
|
+
className: "long-text-container article",
|
|
67
|
+
dangerouslySetInnerHTML: {
|
|
68
|
+
__html: this.state.innerHtml
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return /*#__PURE__*/React.createElement(MarkdownViewer, {
|
|
74
|
+
markdownContent: this.props.markdownContent,
|
|
75
|
+
showTOC: this.props.showTOC
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}]);
|
|
79
|
+
|
|
80
|
+
return DtableMarkdownViewer;
|
|
81
|
+
}(React.PureComponent);
|
|
82
|
+
|
|
83
|
+
export default DtableMarkdownViewer;
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
|
|
2
|
+
.longtext-editor-dialog .longtext-editor-wrapper {
|
|
3
|
+
height: 600px;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.longtext-formatter {
|
|
8
|
+
width: 100%;
|
|
9
|
+
max-width: 100%;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
text-overflow: ellipsis;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.longtext-detail {
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.operation-longtext-formatter .longtext-detail:hover {
|
|
20
|
+
background-color: #f5f5f5;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.operation-longtext-formatter .row-expand-view {
|
|
25
|
+
position: fixed;
|
|
26
|
+
left: 0;
|
|
27
|
+
top: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.row-height-56 .longtext-formatter,
|
|
31
|
+
.row-height-88 .longtext-formatter,
|
|
32
|
+
.row-height-128 .longtext-formatter {
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
display: -webkit-box;
|
|
35
|
+
-webkit-box-orient: vertical;
|
|
36
|
+
text-overflow: -o-ellipsis-lastline;
|
|
37
|
+
white-space: pre-wrap;
|
|
38
|
+
word-wrap: break-word;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.row-height-56 .longtext-formatter {
|
|
42
|
+
max-height: 42px;
|
|
43
|
+
line-height: 1.5;
|
|
44
|
+
-webkit-line-clamp: 2;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.row-height-88 .longtext-formatter {
|
|
48
|
+
max-height: 78px;
|
|
49
|
+
line-height: 1.4;
|
|
50
|
+
-webkit-line-clamp: 4;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.row-height-128 .longtext-formatter {
|
|
54
|
+
max-height: 117px;
|
|
55
|
+
line-height: 1.4;
|
|
56
|
+
-webkit-line-clamp: 6;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.longtext-icon-container {
|
|
60
|
+
border-radius: 3px;
|
|
61
|
+
display: inline-block;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.longtext-formatter-links-container, .longtext-formatter-check-list-container {
|
|
65
|
+
background-color: #f0f0f0;
|
|
66
|
+
color: #9c9c9c;
|
|
67
|
+
padding: 0 3px;
|
|
68
|
+
height: 20px;
|
|
69
|
+
line-height: 20px;
|
|
70
|
+
margin: 0 4px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.longtext-formatter-links-container:hover {
|
|
74
|
+
background-color: #dbdbdd;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.longtext-formatter-link-list-open {
|
|
78
|
+
background-color: #dbdbdd;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.longtext-links-list-container {
|
|
82
|
+
position: absolute;
|
|
83
|
+
background-color: #fff;
|
|
84
|
+
z-index: 3;
|
|
85
|
+
box-shadow: 0 0 5px #ccc;
|
|
86
|
+
padding: 10px;
|
|
87
|
+
border-radius: 4px;
|
|
88
|
+
width: 294px;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
max-height: 320px;
|
|
91
|
+
overflow-y: auto;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.longtext-links-list-container .longtext-formatter-link-item {
|
|
95
|
+
width: 100%;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
text-overflow: ellipsis;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
display: block;
|
|
100
|
+
font-size: 14px;
|
|
101
|
+
line-height: 16px;
|
|
102
|
+
margin-bottom: 14px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.longtext-links-list-container .longtext-formatter-link-item:hover {
|
|
106
|
+
text-decoration: underline;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.longtext-links-list-container .longtext-formatter-link-item:last-child {
|
|
110
|
+
margin-bottom: 0;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.longtext-formatter-image-container {
|
|
114
|
+
margin-right: -10px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.row-height-32 .longtext-formatter-image-container {
|
|
118
|
+
line-height: 30px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.longtext-formatter-image-container img {
|
|
122
|
+
max-width: 28px;
|
|
123
|
+
border: 1px solid #f0f0f0;
|
|
124
|
+
max-height: 28px;
|
|
125
|
+
box-sizing: border-box;
|
|
126
|
+
border-radius: 3px;
|
|
127
|
+
margin-top: -3px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.longtext-formatter-image-container .image-number {
|
|
131
|
+
font-style: normal;
|
|
132
|
+
display: inline-block;
|
|
133
|
+
font-size: 12px;
|
|
134
|
+
border-radius: 6px;
|
|
135
|
+
background-color: #999;
|
|
136
|
+
color: #fff;
|
|
137
|
+
transform: translate(-50%, 6px) scale(0.8);
|
|
138
|
+
min-width: 14px;
|
|
139
|
+
line-height: 14px;
|
|
140
|
+
padding: 0 3px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.row-height-56 .longtext-formatter-image-container .image-number {
|
|
144
|
+
transform: translate(-50%, 3px) scale(0.8);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.row-height-88 .longtext-formatter-image-container .image-number,
|
|
148
|
+
.row-height-128 .longtext-formatter-image-container .image-number {
|
|
149
|
+
transform: translate(-50%, 6px) scale(0.8);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.longtext-formatter-links-container .dtable-font, .longtext-formatter-check-list-container .dtable-font {
|
|
153
|
+
margin-right: 4px;
|
|
154
|
+
font-size: 12px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.longtext-formatter-checklist-completed {
|
|
158
|
+
color: #61BD4F;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.longtext-modal {
|
|
162
|
+
position: fixed;
|
|
163
|
+
background-color:rgba(0, 0, 0, 0.5);
|
|
164
|
+
left: 0;
|
|
165
|
+
top: 0;
|
|
166
|
+
bottom: 0;
|
|
167
|
+
right: 0;
|
|
168
|
+
z-index: 1049;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.longtext-modal-dialog {
|
|
172
|
+
width: 800px;
|
|
173
|
+
border-radius: 3px;
|
|
174
|
+
position: absolute;
|
|
175
|
+
display: flex;
|
|
176
|
+
flex-direction: column;
|
|
177
|
+
margin-left: 50%;
|
|
178
|
+
transform: translateX(-50%);
|
|
179
|
+
top: 20px;
|
|
180
|
+
overflow: hidden;
|
|
181
|
+
bottom: 20px;
|
|
182
|
+
border: 1px solid rgba(0, 0, 0, 0.2);
|
|
183
|
+
background-color: #ffffff;
|
|
184
|
+
background-clip: padding-box;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.longtext-modal-dialog-header {
|
|
188
|
+
box-sizing: border-box;
|
|
189
|
+
padding: 0 8px 0 20px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.longtext-modal-dialog-header .longtext-header {
|
|
193
|
+
height: 36px;
|
|
194
|
+
line-height: 36px;
|
|
195
|
+
display: flex;
|
|
196
|
+
justify-content: space-between;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.longtext-modal-dialog-header .longtext-header-name {
|
|
200
|
+
font-weight: 700;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.longtext-modal-dialog-header-border {
|
|
204
|
+
border-bottom: 1px solid #e9ecef;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.longtext-modal-dialog-header .longtext-compat-info {
|
|
208
|
+
margin-bottom: 8px;
|
|
209
|
+
height: 12px;
|
|
210
|
+
display: flex;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.longtext-modal-dialog-header .longtext-browser-warning {
|
|
214
|
+
margin-right: 4px;
|
|
215
|
+
display: inline-block;
|
|
216
|
+
line-height: 12px;
|
|
217
|
+
transform: scale(0.8);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.longtext-modal-dialog-header .browser-warning-content {
|
|
221
|
+
line-height: 12px;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.longtext-header-tool {
|
|
225
|
+
display: flex;
|
|
226
|
+
align-items: center;
|
|
227
|
+
flex-direction: row;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.longtext-header-tool-item {
|
|
231
|
+
font-size: 16px;
|
|
232
|
+
font-weight: 700;
|
|
233
|
+
color: #000;
|
|
234
|
+
cursor: pointer;
|
|
235
|
+
opacity: .5;
|
|
236
|
+
width: 24px;
|
|
237
|
+
height: 24px;
|
|
238
|
+
text-align: center;
|
|
239
|
+
display: block;
|
|
240
|
+
line-height: 24px;
|
|
241
|
+
border-radius: 3px;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.longtext-header-tool-item:not(.long-text-full-screen):hover {
|
|
245
|
+
opacity: 1;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.longtext-container {
|
|
249
|
+
overflow: hidden;
|
|
250
|
+
flex: 1 1 auto;
|
|
251
|
+
height: fit-content;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.long-text-full-screen {
|
|
255
|
+
background-color: #e0e0e0;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.longtext-container-scroll {
|
|
259
|
+
overflow-y: auto;
|
|
260
|
+
height: fit-content;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.longtext-modal-dialog .btn {
|
|
264
|
+
margin-right: 15px;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.longtext-container .seafile-simple-editor {
|
|
268
|
+
border: none;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.longtext-container .article{
|
|
272
|
+
padding: 10px 30px 10px 30px;
|
|
273
|
+
height: auto;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.longtext-container .seafile-editor-topbar {
|
|
277
|
+
height: 34px;
|
|
278
|
+
padding-left: 10px;
|
|
279
|
+
border-top: 1px solid #e9ecef;
|
|
280
|
+
border-bottom: 1px solid #e9ecef;
|
|
281
|
+
box-shadow: none;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.longtext-container .sf-editor-toolbar {
|
|
285
|
+
height: 32px;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.longtext-container .rich-icon-btn {
|
|
289
|
+
line-height: 24px;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.longtext-container .header-list-container {
|
|
293
|
+
height: 32px;
|
|
294
|
+
padding: 4px 5px;
|
|
295
|
+
border-right: 1px solid #e9ecef;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.longtext-container .list-body div {
|
|
299
|
+
line-height: 24px;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.longtext-container .seafile-editor-topbar .editor-btn-group {
|
|
303
|
+
padding: 3px 0 3px 5px;
|
|
304
|
+
border-right: 1px solid #e9ecef;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.longtext-container .upload-localimg {
|
|
308
|
+
height: 26px;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.upload-localimg .btn {
|
|
312
|
+
height: 26px;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.longtext-container .custom-dropdown-list .dropdown-list-toggle {
|
|
316
|
+
height: 24px;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.longtext-container h2 {
|
|
320
|
+
border-bottom: none;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.longtext-preview {
|
|
324
|
+
width: 520px;
|
|
325
|
+
height: fit-content;
|
|
326
|
+
max-height: 450px;
|
|
327
|
+
margin-left: 0;
|
|
328
|
+
z-index: 100;
|
|
329
|
+
top: 0;
|
|
330
|
+
box-shadow: 0 0 5px #ccc;
|
|
331
|
+
border: 1px solid rgba(0, 40, 100, 0.12);
|
|
332
|
+
transform: none;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.longtext-preview .longtext-container .article {
|
|
336
|
+
padding: 10px 16px;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.row-height-128 .longtext-formatter .article {
|
|
340
|
+
white-space: nowrap;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.row-height-128 .longtext-formatter .article li,
|
|
344
|
+
.row-height-128 .longtext-formatter .article p {
|
|
345
|
+
white-space: pre-wrap;
|
|
346
|
+
margin: 0;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.row-height-128 .longtext-formatter .article pre {
|
|
350
|
+
margin: 0;
|
|
351
|
+
padding: 8px;
|
|
352
|
+
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-ui-component",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.90-test",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@seafile/react-image-lightbox": "0.0.9",
|
|
7
7
|
"@seafile/seafile-calendar": "^0.0.21",
|
|
8
|
+
"@seafile/seafile-editor": "^0.3.103",
|
|
8
9
|
"antd-mobile": "^2.3.3",
|
|
9
10
|
"astro-classname": "^2.1.0",
|
|
10
11
|
"bail": "1.0.5",
|
|
@@ -20,9 +21,9 @@
|
|
|
20
21
|
"react-app-polyfill": "^1.0.6",
|
|
21
22
|
"react-dom": "16.14.0",
|
|
22
23
|
"react-responsive": "^8.0.3",
|
|
24
|
+
"react-select": "4.3.0",
|
|
23
25
|
"react-transition-group": "^4.4.1",
|
|
24
26
|
"reactstrap": "^8.4.1",
|
|
25
|
-
"react-select": "4.3.0",
|
|
26
27
|
"rehype-format": "^2.2.0",
|
|
27
28
|
"rehype-mathjax": "^2.0.0",
|
|
28
29
|
"rehype-raw": "^2.0.0",
|