ronds-metadata 1.0.64 → 1.0.67
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/es/comps/Editable/comps/EditableCell.js +22 -5
- package/es/comps/Editable/comps/Texty.css +40 -0
- package/es/comps/Editable/comps/Texty.d.ts +83 -0
- package/es/comps/Editable/comps/Texty.js +277 -0
- package/es/comps/Editable/comps/index.css +7 -4
- package/es/comps/Editable/index.css +7 -0
- package/es/comps/Editable/index.js +4 -5
- package/es/utils.js +2 -5
- package/package.json +7 -6
- package/es/comps/AutoSize/detectElementResize.d.ts +0 -4
- package/es/comps/AutoSize/detectElementResize.js +0 -195
- package/es/comps/AutoSize/index.d.ts +0 -57
- package/es/comps/AutoSize/index.js +0 -158
@@ -2,14 +2,16 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import "antd/es/message/style";
|
3
3
|
import _message from "antd/es/message";
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
5
|
-
var _excluded = ["isAddColumn", "editable", "record", "editableType", "dataIndex", "rowIndex", "children"];
|
5
|
+
var _excluded = ["title", "isAddColumn", "editable", "record", "editableType", "dataIndex", "rowIndex", "children"];
|
6
6
|
import React from 'react';
|
7
7
|
import { EditableContext } from '../interface';
|
8
8
|
import { getDataCell, isFreeEditCell, isFreeEditRow } from '../utils';
|
9
9
|
import "./index.css";
|
10
|
+
import Texty from './Texty';
|
10
11
|
|
11
12
|
var EditableCell = function EditableCell(props) {
|
12
|
-
var
|
13
|
+
var title = props.title,
|
14
|
+
isAddColumn = props.isAddColumn,
|
13
15
|
editable = props.editable,
|
14
16
|
record = props.record,
|
15
17
|
editableType = props.editableType,
|
@@ -64,7 +66,12 @@ var EditableCell = function EditableCell(props) {
|
|
64
66
|
if (editableType === 'single') {
|
65
67
|
return /*#__PURE__*/React.createElement("td", _extends({}, restProps, {
|
66
68
|
className: "ant-table-cell ".concat(isAddColumn && editConfig.editHeardCellKey === dataIndex ? 'border-right' : '', " ")
|
67
|
-
}), editable && editConfig.curRow === rowIndex ? getDataCell(props) :
|
69
|
+
}), editable && editConfig.curRow === rowIndex ? getDataCell(props) : /*#__PURE__*/React.createElement(Texty, {
|
70
|
+
tooltipStyle: {
|
71
|
+
wordWrap: 'break-word'
|
72
|
+
},
|
73
|
+
tooltipMaxWidth: 800
|
74
|
+
}, children));
|
68
75
|
}
|
69
76
|
|
70
77
|
if (editableType === 'freedom') {
|
@@ -73,12 +80,22 @@ var EditableCell = function EditableCell(props) {
|
|
73
80
|
onClick: onCellClick
|
74
81
|
}, restProps, {
|
75
82
|
className: "ant-table-cell ".concat(isAddColumn && editConfig.editHeardCellKey === dataIndex ? 'border-right' : '', " ")
|
76
|
-
}), editable && (isFreeEditRow(editConfig.curRow, rowIndex) || isFreeEditCell(editConfig.editCellKey, dataIndex, rowIndex)) ? getDataCell(props) :
|
83
|
+
}), editable && (isFreeEditRow(editConfig.curRow, rowIndex) || isFreeEditCell(editConfig.editCellKey, dataIndex, rowIndex)) ? getDataCell(props) : /*#__PURE__*/React.createElement(Texty, {
|
84
|
+
tooltipStyle: {
|
85
|
+
wordWrap: 'break-word'
|
86
|
+
},
|
87
|
+
tooltipMaxWidth: 800
|
88
|
+
}, children));
|
77
89
|
}
|
78
90
|
|
79
91
|
return /*#__PURE__*/React.createElement("td", _extends({}, restProps, {
|
80
92
|
className: "ant-table-cell ".concat(isAddColumn && editConfig.editHeardCellKey === dataIndex ? 'border-right' : '', " ")
|
81
|
-
}), editable ? getDataCell(props) :
|
93
|
+
}), editable ? getDataCell(props) : /*#__PURE__*/React.createElement(Texty, {
|
94
|
+
tooltipStyle: {
|
95
|
+
wordWrap: 'break-word'
|
96
|
+
},
|
97
|
+
tooltipMaxWidth: 800
|
98
|
+
}, children));
|
82
99
|
};
|
83
100
|
|
84
101
|
export default EditableCell;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
[data-texty] {
|
2
|
+
width: 100%;
|
3
|
+
display: block;
|
4
|
+
overflow: hidden;
|
5
|
+
text-overflow: ellipsis;
|
6
|
+
white-space: nowrap;
|
7
|
+
}
|
8
|
+
[data-texty-tooltip] {
|
9
|
+
margin: 6px 0;
|
10
|
+
padding: 4px 10px;
|
11
|
+
border-radius: 4px;
|
12
|
+
background-color: #222;
|
13
|
+
color: #fff;
|
14
|
+
z-index: 99999;
|
15
|
+
}
|
16
|
+
[data-texty-arrow] {
|
17
|
+
position: absolute;
|
18
|
+
bottom: -6px;
|
19
|
+
width: 0;
|
20
|
+
height: 0;
|
21
|
+
border-style: solid;
|
22
|
+
border-width: 6px 6px 0;
|
23
|
+
border-color: #222 transparent transparent;
|
24
|
+
}
|
25
|
+
[data-texty-arrow*='bottom'] {
|
26
|
+
top: -6px;
|
27
|
+
bottom: inherit;
|
28
|
+
transform: rotate(180deg);
|
29
|
+
}
|
30
|
+
/* disable the builtin tooltip for truncated text on Safari */
|
31
|
+
@media screen and (-webkit-min-device-pixel-ratio: 0) {
|
32
|
+
@supports (not (-ms-ime-align: auto)) {
|
33
|
+
.EllipsisText::before {
|
34
|
+
content: '';
|
35
|
+
display: block;
|
36
|
+
width: 0;
|
37
|
+
height: 0;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './Texty.less';
|
3
|
+
export interface ITextyProps {
|
4
|
+
/** 样式名 */
|
5
|
+
className?: string;
|
6
|
+
/**
|
7
|
+
* 获取组件的ref 默认undefined
|
8
|
+
*/
|
9
|
+
innerRef?: Function;
|
10
|
+
/**
|
11
|
+
* tooltip的渲染元素 默认div
|
12
|
+
*/
|
13
|
+
tagName?: string;
|
14
|
+
/**
|
15
|
+
* 提示框内容 默认为children
|
16
|
+
*/
|
17
|
+
tooltip?: React.ReactElement;
|
18
|
+
/**
|
19
|
+
* tooltip的className
|
20
|
+
*/
|
21
|
+
tooltipClassName?: string;
|
22
|
+
/**
|
23
|
+
* tooltip的Style
|
24
|
+
*/
|
25
|
+
tooltipStyle?: React.CSSProperties;
|
26
|
+
/**
|
27
|
+
* tooltip的最大宽度
|
28
|
+
*/
|
29
|
+
tooltipMaxWidth?: number;
|
30
|
+
/**
|
31
|
+
* 鼠标移入后 多久显示
|
32
|
+
*/
|
33
|
+
showDelay?: number;
|
34
|
+
/**
|
35
|
+
* 鼠标移出后 多久隐藏
|
36
|
+
*/
|
37
|
+
hideDelay?: number;
|
38
|
+
/**
|
39
|
+
* 箭头的className
|
40
|
+
*/
|
41
|
+
arrowClassName?: string;
|
42
|
+
/**
|
43
|
+
* 隐藏箭头
|
44
|
+
*/
|
45
|
+
hideArrow?: boolean;
|
46
|
+
/**
|
47
|
+
* tooltip位置
|
48
|
+
*/
|
49
|
+
placement?: 'auto' | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end';
|
50
|
+
/**
|
51
|
+
* 附加tooltip的HTML元素**在大多数情况下,您无需手动设置**
|
52
|
+
*/
|
53
|
+
container?: any;
|
54
|
+
/** 鼠标移出事件 */
|
55
|
+
onMouseLeave?: (e: any) => void;
|
56
|
+
/** 鼠标移入事件 */
|
57
|
+
onMouseEnter?: (e: any) => void;
|
58
|
+
}
|
59
|
+
/**
|
60
|
+
* 基于Popper的tooltip
|
61
|
+
*/
|
62
|
+
declare class Texty extends React.PureComponent<ITextyProps, any> {
|
63
|
+
state: {
|
64
|
+
isHovered: boolean;
|
65
|
+
};
|
66
|
+
private listenTimer;
|
67
|
+
private targetNode;
|
68
|
+
private hideTimer;
|
69
|
+
private showTimer;
|
70
|
+
componentDidUpdate(): void;
|
71
|
+
componentWillUnmount(): void;
|
72
|
+
render(): JSX.Element;
|
73
|
+
renderTooltip: ({ ref, style, placement, arrowProps, }: any) => React.ReactPortal;
|
74
|
+
setTargetRef: (ref: any) => void;
|
75
|
+
handleMouseEvent: (e: any) => void;
|
76
|
+
handleScroll: (e: any) => void;
|
77
|
+
_clearListenTimer(): void;
|
78
|
+
_clearShowTimer(): void;
|
79
|
+
_clearHideTimer(): void;
|
80
|
+
handleMouseEnter: (e: any) => void;
|
81
|
+
handleMouseLeave: (e: any) => void;
|
82
|
+
}
|
83
|
+
export default Texty;
|
@@ -0,0 +1,277 @@
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
4
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
5
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
6
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
7
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
8
|
+
var _excluded = ["tagName", "children", "placement", "innerRef", "showDelay", "hideDelay", "tooltip", "tooltipClassName", "tooltipStyle", "tooltipMaxWidth", "hideArrow", "container"];
|
9
|
+
import React from 'react';
|
10
|
+
import ReactDom from 'react-dom';
|
11
|
+
import { Popper } from 'react-popper';
|
12
|
+
import "./Texty.css";
|
13
|
+
var modifiers = [{
|
14
|
+
name: 'preventOverflow',
|
15
|
+
options: {
|
16
|
+
mainAxis: true,
|
17
|
+
padding: 10
|
18
|
+
}
|
19
|
+
}];
|
20
|
+
/**
|
21
|
+
* 基于Popper的tooltip
|
22
|
+
*/
|
23
|
+
|
24
|
+
var Texty = /*#__PURE__*/function (_React$PureComponent) {
|
25
|
+
_inherits(Texty, _React$PureComponent);
|
26
|
+
|
27
|
+
var _super = _createSuper(Texty);
|
28
|
+
|
29
|
+
function Texty() {
|
30
|
+
var _this;
|
31
|
+
|
32
|
+
_classCallCheck(this, Texty);
|
33
|
+
|
34
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
35
|
+
args[_key] = arguments[_key];
|
36
|
+
}
|
37
|
+
|
38
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
39
|
+
_this.state = {
|
40
|
+
isHovered: false
|
41
|
+
};
|
42
|
+
_this.listenTimer = void 0;
|
43
|
+
_this.targetNode = void 0;
|
44
|
+
_this.hideTimer = void 0;
|
45
|
+
_this.showTimer = void 0;
|
46
|
+
|
47
|
+
_this.renderTooltip = function (_ref) {
|
48
|
+
var ref = _ref.ref,
|
49
|
+
style = _ref.style,
|
50
|
+
placement = _ref.placement,
|
51
|
+
arrowProps = _ref.arrowProps;
|
52
|
+
var _this$props = _this.props,
|
53
|
+
children = _this$props.children,
|
54
|
+
container = _this$props.container,
|
55
|
+
tooltip = _this$props.tooltip,
|
56
|
+
tooltipClassName = _this$props.tooltipClassName,
|
57
|
+
tooltipStyle = _this$props.tooltipStyle,
|
58
|
+
tooltipMaxWidth = _this$props.tooltipMaxWidth,
|
59
|
+
arrowClassName = _this$props.arrowClassName,
|
60
|
+
hideArrow = _this$props.hideArrow;
|
61
|
+
var content = tooltip || children;
|
62
|
+
var extraStyle = tooltipMaxWidth ? _objectSpread(_objectSpread({}, tooltipStyle), {}, {
|
63
|
+
maxWidth: tooltipMaxWidth
|
64
|
+
}) : tooltipStyle;
|
65
|
+
return /*#__PURE__*/ReactDom.createPortal( /*#__PURE__*/React.createElement("div", {
|
66
|
+
ref: ref,
|
67
|
+
"data-texty-tooltip": placement,
|
68
|
+
className: tooltipClassName,
|
69
|
+
style: extraStyle ? _objectSpread(_objectSpread({}, style), extraStyle) : style,
|
70
|
+
onClick: _this.handleMouseEvent,
|
71
|
+
onDoubleClick: _this.handleMouseEvent,
|
72
|
+
onContextMenu: _this.handleMouseEvent,
|
73
|
+
onMouseDown: _this.handleMouseEvent,
|
74
|
+
onMouseUp: _this.handleMouseEvent
|
75
|
+
}, content, !hideArrow && /*#__PURE__*/React.createElement("div", {
|
76
|
+
ref: arrowProps.ref,
|
77
|
+
"data-texty-arrow": placement,
|
78
|
+
className: arrowClassName,
|
79
|
+
style: arrowProps.style
|
80
|
+
})), container || _this.targetNode.ownerDocument.body);
|
81
|
+
};
|
82
|
+
|
83
|
+
_this.setTargetRef = function (ref) {
|
84
|
+
_this.props.innerRef && _this.props.innerRef(ref);
|
85
|
+
_this.targetNode = ref; // console.log("setTargetRef",ref,this.targetNode)
|
86
|
+
};
|
87
|
+
|
88
|
+
_this.handleMouseEvent = function (e) {
|
89
|
+
e.stopPropagation();
|
90
|
+
};
|
91
|
+
|
92
|
+
_this.handleScroll = function (e) {
|
93
|
+
var _e$srcElement, _e$srcElement2;
|
94
|
+
|
95
|
+
if ((e === null || e === void 0 ? void 0 : (_e$srcElement = e.srcElement) === null || _e$srcElement === void 0 ? void 0 : _e$srcElement.className) === 'contract-trigger') {
|
96
|
+
return;
|
97
|
+
}
|
98
|
+
|
99
|
+
if ((e === null || e === void 0 ? void 0 : (_e$srcElement2 = e.srcElement) === null || _e$srcElement2 === void 0 ? void 0 : _e$srcElement2.className) === 'texty-scroll') {
|
100
|
+
return;
|
101
|
+
}
|
102
|
+
|
103
|
+
_this.setState({
|
104
|
+
isHovered: false
|
105
|
+
});
|
106
|
+
};
|
107
|
+
|
108
|
+
_this.handleMouseEnter = function (e) {
|
109
|
+
// console.log('handleMouseEnter');
|
110
|
+
// eslint-disable-next-line react/prop-types
|
111
|
+
var _this$props2 = _this.props,
|
112
|
+
showDelay = _this$props2.showDelay,
|
113
|
+
onMouseEnter = _this$props2.onMouseEnter;
|
114
|
+
onMouseEnter && onMouseEnter(e);
|
115
|
+
|
116
|
+
_this._clearHideTimer();
|
117
|
+
|
118
|
+
if (!showDelay) {
|
119
|
+
_this.setState({
|
120
|
+
isHovered: true
|
121
|
+
});
|
122
|
+
|
123
|
+
return;
|
124
|
+
}
|
125
|
+
|
126
|
+
_this.showTimer = setTimeout(function () {
|
127
|
+
_this.setState({
|
128
|
+
isHovered: true
|
129
|
+
});
|
130
|
+
|
131
|
+
delete _this.showTimer;
|
132
|
+
}, showDelay);
|
133
|
+
};
|
134
|
+
|
135
|
+
_this.handleMouseLeave = function (e) {
|
136
|
+
// console.log('handleMouseLeave');
|
137
|
+
// eslint-disable-next-line react/prop-types
|
138
|
+
var _this$props3 = _this.props,
|
139
|
+
hideDelay = _this$props3.hideDelay,
|
140
|
+
onMouseLeave = _this$props3.onMouseLeave;
|
141
|
+
onMouseLeave && onMouseLeave(e);
|
142
|
+
|
143
|
+
_this._clearShowTimer();
|
144
|
+
|
145
|
+
var isHovered = _this.state.isHovered;
|
146
|
+
if (!isHovered) return;
|
147
|
+
|
148
|
+
if (!hideDelay) {
|
149
|
+
_this.setState({
|
150
|
+
isHovered: false
|
151
|
+
});
|
152
|
+
|
153
|
+
return;
|
154
|
+
}
|
155
|
+
|
156
|
+
_this.hideTimer = setTimeout(function () {
|
157
|
+
_this.setState({
|
158
|
+
isHovered: false
|
159
|
+
});
|
160
|
+
|
161
|
+
delete _this.hideTimer;
|
162
|
+
}, hideDelay);
|
163
|
+
};
|
164
|
+
|
165
|
+
return _this;
|
166
|
+
}
|
167
|
+
|
168
|
+
_createClass(Texty, [{
|
169
|
+
key: "componentDidUpdate",
|
170
|
+
value: function componentDidUpdate() {
|
171
|
+
var _this2 = this;
|
172
|
+
|
173
|
+
// console.log(this.state);
|
174
|
+
if (this.state.isHovered) {
|
175
|
+
window.addEventListener('scroll', this.handleScroll, true); // react - virtualized - auto - sizer would trigger scroll events after tooltip shown in some case,we have to skip those scroll events
|
176
|
+
|
177
|
+
this.listenTimer = setTimeout(function () {
|
178
|
+
window.removeEventListener('scroll', _this2.handleScroll, true);
|
179
|
+
window.addEventListener('scroll', _this2.handleScroll, true);
|
180
|
+
delete _this2.listenTimer;
|
181
|
+
}, 50);
|
182
|
+
} else {
|
183
|
+
this._clearListenTimer();
|
184
|
+
|
185
|
+
window.removeEventListener('scroll', this.handleScroll, true);
|
186
|
+
}
|
187
|
+
}
|
188
|
+
}, {
|
189
|
+
key: "componentWillUnmount",
|
190
|
+
value: function componentWillUnmount() {
|
191
|
+
this._clearListenTimer();
|
192
|
+
|
193
|
+
window.removeEventListener('scroll', this.handleScroll, true);
|
194
|
+
|
195
|
+
this._clearShowTimer();
|
196
|
+
|
197
|
+
this._clearHideTimer();
|
198
|
+
}
|
199
|
+
}, {
|
200
|
+
key: "render",
|
201
|
+
value: function render() {
|
202
|
+
/* eslint-disable no-unused-vars */
|
203
|
+
var _this$props4 = this.props,
|
204
|
+
tagName = _this$props4.tagName,
|
205
|
+
children = _this$props4.children,
|
206
|
+
placement = _this$props4.placement,
|
207
|
+
innerRef = _this$props4.innerRef,
|
208
|
+
showDelay = _this$props4.showDelay,
|
209
|
+
hideDelay = _this$props4.hideDelay,
|
210
|
+
tooltip = _this$props4.tooltip,
|
211
|
+
tooltipClassName = _this$props4.tooltipClassName,
|
212
|
+
tooltipStyle = _this$props4.tooltipStyle,
|
213
|
+
tooltipMaxWidth = _this$props4.tooltipMaxWidth,
|
214
|
+
hideArrow = _this$props4.hideArrow,
|
215
|
+
container = _this$props4.container,
|
216
|
+
rest = _objectWithoutProperties(_this$props4, _excluded);
|
217
|
+
/* eslint-enable no-unused-vars */
|
218
|
+
|
219
|
+
|
220
|
+
var Tag = tagName;
|
221
|
+
|
222
|
+
if (!children) {
|
223
|
+
return null; // return <Tag { ...rest } ref={ this.setTargetRef } data-texty={ false } />;
|
224
|
+
}
|
225
|
+
|
226
|
+
var target = this.targetNode;
|
227
|
+
var isTruncated = !!target && target.scrollWidth > target.offsetWidth;
|
228
|
+
var showTooltip = this.state.isHovered && isTruncated; // console.log("showTooltip",showTooltip)
|
229
|
+
|
230
|
+
return /*#__PURE__*/React.createElement(Tag, _extends({}, rest, {
|
231
|
+
ref: this.setTargetRef,
|
232
|
+
"data-texty": showTooltip,
|
233
|
+
onMouseEnter: this.handleMouseEnter,
|
234
|
+
onMouseLeave: this.handleMouseLeave
|
235
|
+
}), children, showTooltip && /*#__PURE__*/React.createElement(Popper, {
|
236
|
+
referenceElement: target,
|
237
|
+
placement: placement,
|
238
|
+
modifiers: modifiers
|
239
|
+
}, this.renderTooltip));
|
240
|
+
}
|
241
|
+
}, {
|
242
|
+
key: "_clearListenTimer",
|
243
|
+
value: function _clearListenTimer() {
|
244
|
+
if (this.listenTimer) {
|
245
|
+
clearTimeout(this.listenTimer);
|
246
|
+
delete this.listenTimer;
|
247
|
+
}
|
248
|
+
}
|
249
|
+
}, {
|
250
|
+
key: "_clearShowTimer",
|
251
|
+
value: function _clearShowTimer() {
|
252
|
+
if (this.showTimer) {
|
253
|
+
clearTimeout(this.showTimer);
|
254
|
+
delete this.showTimer;
|
255
|
+
}
|
256
|
+
}
|
257
|
+
}, {
|
258
|
+
key: "_clearHideTimer",
|
259
|
+
value: function _clearHideTimer() {
|
260
|
+
if (this.hideTimer) {
|
261
|
+
clearTimeout(this.hideTimer);
|
262
|
+
delete this.hideTimer;
|
263
|
+
}
|
264
|
+
}
|
265
|
+
}]);
|
266
|
+
|
267
|
+
return Texty;
|
268
|
+
}(React.PureComponent);
|
269
|
+
|
270
|
+
Texty.defaultProps = {
|
271
|
+
tagName: 'div',
|
272
|
+
showDelay: 150,
|
273
|
+
hideDelay: 150,
|
274
|
+
hideArrow: true,
|
275
|
+
placement: 'top'
|
276
|
+
};
|
277
|
+
export default Texty;
|
@@ -1,12 +1,15 @@
|
|
1
|
+
.ant-table-th {
|
2
|
+
position: relative;
|
3
|
+
}
|
1
4
|
.editable-th-hover-add {
|
2
5
|
position: absolute;
|
3
|
-
right: -
|
4
|
-
top: -
|
6
|
+
right: -3px;
|
7
|
+
top: -8px;
|
5
8
|
}
|
6
9
|
.editable-th-hover-delete {
|
7
10
|
position: absolute;
|
8
|
-
right:
|
9
|
-
top: -
|
11
|
+
right: 15px;
|
12
|
+
top: -8px;
|
10
13
|
}
|
11
14
|
.display-none {
|
12
15
|
display: none;
|
@@ -22,6 +22,13 @@
|
|
22
22
|
background-color: #ebebeb;
|
23
23
|
border-right: 1px solid #f2f2f2;
|
24
24
|
}
|
25
|
+
.ronds-edit-table .ant-table-fixed {
|
26
|
+
table-layout: fixed;
|
27
|
+
}
|
28
|
+
.ronds-edit-table .ant-table-tbody > tr > td {
|
29
|
+
word-wrap: break-word;
|
30
|
+
word-break: break-all;
|
31
|
+
}
|
25
32
|
.ronds-edit-table .ant-table.ant-table-small .ant-table-title,
|
26
33
|
.ronds-edit-table .ant-table.ant-table-small .ant-table-footer,
|
27
34
|
.ronds-edit-table .ant-table.ant-table-small .ant-table-thead > tr > th,
|
@@ -292,8 +292,8 @@ var Editable = function Editable(props) {
|
|
292
292
|
dataKey: '_aciton_',
|
293
293
|
title: '操作',
|
294
294
|
width: 40,
|
295
|
-
frozen: 'right',
|
296
295
|
ellipsis: true,
|
296
|
+
fixed: 'left',
|
297
297
|
render: function render(val, record) {
|
298
298
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(EditableAction, {
|
299
299
|
type: type,
|
@@ -375,9 +375,8 @@ var Editable = function Editable(props) {
|
|
375
375
|
}, /*#__PURE__*/React.createElement(_Table, _extends({
|
376
376
|
className: "ronds-edit-table",
|
377
377
|
bordered: true,
|
378
|
-
tableLayout: "auto",
|
379
378
|
scroll: {
|
380
|
-
x:
|
379
|
+
x: '100%',
|
381
380
|
y: 'calc(100% - 40px)'
|
382
381
|
}
|
383
382
|
}, tableProps, {
|
@@ -405,8 +404,8 @@ var Editable = function Editable(props) {
|
|
405
404
|
block: true,
|
406
405
|
type: "dashed",
|
407
406
|
style: {
|
408
|
-
marginBottom:
|
409
|
-
marginTop:
|
407
|
+
marginBottom: '5px',
|
408
|
+
marginTop: '5px'
|
410
409
|
},
|
411
410
|
onClick: onAddRow
|
412
411
|
}, "\u6DFB\u52A0\u4E00\u884C")));
|
package/es/utils.js
CHANGED
@@ -1,10 +1,7 @@
|
|
1
1
|
/*
|
2
|
-
* @Author:
|
2
|
+
* @Author: wangxian
|
3
3
|
* @Date: 2021-09-18 14:15:04
|
4
|
-
* @LastEditTime:
|
5
|
-
* @LastEditors: your name
|
6
|
-
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
7
|
-
* @FilePath: \ronds.metadata\src\utils.ts
|
4
|
+
* @LastEditTime: 2022-04-13 15:00:29
|
8
5
|
*/
|
9
6
|
import { useCallback, useEffect, useRef } from 'react';
|
10
7
|
/** 防抖 */
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"public": true,
|
3
3
|
"name": "ronds-metadata",
|
4
|
-
"version": "1.0.
|
4
|
+
"version": "1.0.67",
|
5
5
|
"scripts": {
|
6
6
|
"start": "dumi dev",
|
7
7
|
"docs:build": "dumi build",
|
@@ -44,21 +44,22 @@
|
|
44
44
|
"markdown-it": "^12.3.2",
|
45
45
|
"markdown-it-emoji": "^2.0.0",
|
46
46
|
"qs": "^6.10.1",
|
47
|
-
"react": "^
|
47
|
+
"react": "^17.0.2",
|
48
48
|
"react-color": "^2.19.3",
|
49
49
|
"react-markdown-editor-lite": "^1.3.2",
|
50
|
+
"react-popper": "^2.2.3",
|
50
51
|
"rxjs": "^7.5.4"
|
51
52
|
},
|
52
53
|
"peerDependencies": {
|
53
54
|
"antd": ">=4.1.5",
|
54
|
-
"react": ">=16.
|
55
|
-
"react-dom": ">=16.
|
55
|
+
"react": ">=16.14.0",
|
56
|
+
"react-dom": ">=16.14.0",
|
56
57
|
"react-router": ">=5.0.0",
|
57
58
|
"styled-components": ">=4.1.1"
|
58
59
|
},
|
59
60
|
"devDependencies": {
|
60
|
-
"@types/react": "^
|
61
|
-
"@types/react-dom": "^
|
61
|
+
"@types/react": "^17.0.2",
|
62
|
+
"@types/react-dom": "^17.0.2",
|
62
63
|
"@types/react-router": "^5.1.8",
|
63
64
|
"@types/react-window": "^1.8.2",
|
64
65
|
"@types/styled-components": "^5.1.2",
|
@@ -1,195 +0,0 @@
|
|
1
|
-
// @ts-nocheck
|
2
|
-
export default function createDetectElementResize(nonce) {
|
3
|
-
// Check `document` and `window` in case of server-side rendering
|
4
|
-
var _window;
|
5
|
-
|
6
|
-
if (typeof window !== 'undefined') {
|
7
|
-
_window = window;
|
8
|
-
} else {
|
9
|
-
_window = global;
|
10
|
-
}
|
11
|
-
|
12
|
-
var attachEvent = typeof document !== 'undefined' && document.attachEvent;
|
13
|
-
|
14
|
-
if (!attachEvent) {
|
15
|
-
var requestFrame = function () {
|
16
|
-
var raf = _window.requestAnimationFrame || _window.mozRequestAnimationFrame || _window.webkitRequestAnimationFrame || function (fn) {
|
17
|
-
return _window.setTimeout(fn, 20);
|
18
|
-
};
|
19
|
-
|
20
|
-
return function (fn) {
|
21
|
-
return raf(fn);
|
22
|
-
};
|
23
|
-
}();
|
24
|
-
|
25
|
-
var cancelFrame = function () {
|
26
|
-
var cancel = _window.cancelAnimationFrame || _window.mozCancelAnimationFrame || _window.webkitCancelAnimationFrame || _window.clearTimeout;
|
27
|
-
return function (id) {
|
28
|
-
return cancel(id);
|
29
|
-
};
|
30
|
-
}();
|
31
|
-
|
32
|
-
var resetTriggers = function resetTriggers(element) {
|
33
|
-
var triggers = element.__resizeTriggers__,
|
34
|
-
expand = triggers.firstElementChild,
|
35
|
-
contract = triggers.lastElementChild,
|
36
|
-
expandChild = expand.firstElementChild;
|
37
|
-
contract.scrollLeft = contract.scrollWidth;
|
38
|
-
contract.scrollTop = contract.scrollHeight;
|
39
|
-
expandChild.style.width = expand.offsetWidth + 1 + 'px';
|
40
|
-
expandChild.style.height = expand.offsetHeight + 1 + 'px';
|
41
|
-
expand.scrollLeft = expand.scrollWidth;
|
42
|
-
expand.scrollTop = expand.scrollHeight;
|
43
|
-
};
|
44
|
-
|
45
|
-
var checkTriggers = function checkTriggers(element) {
|
46
|
-
return element.offsetWidth !== element.__resizeLast__.width || element.offsetHeight !== element.__resizeLast__.height;
|
47
|
-
};
|
48
|
-
|
49
|
-
var scrollListener = function scrollListener(e) {
|
50
|
-
// Don't measure (which forces) reflow for scrolls that happen inside of children!
|
51
|
-
if (e.target.className.indexOf('contract-trigger') < 0 && e.target.className.indexOf('expand-trigger') < 0) {
|
52
|
-
return;
|
53
|
-
}
|
54
|
-
|
55
|
-
var element = this;
|
56
|
-
resetTriggers(this);
|
57
|
-
|
58
|
-
if (this.__resizeRAF__) {
|
59
|
-
cancelFrame(this.__resizeRAF__);
|
60
|
-
}
|
61
|
-
|
62
|
-
this.__resizeRAF__ = requestFrame(function () {
|
63
|
-
if (checkTriggers(element)) {
|
64
|
-
element.__resizeLast__.width = element.offsetWidth;
|
65
|
-
element.__resizeLast__.height = element.offsetHeight;
|
66
|
-
|
67
|
-
element.__resizeListeners__.forEach(function (fn) {
|
68
|
-
fn.call(element, e);
|
69
|
-
});
|
70
|
-
}
|
71
|
-
});
|
72
|
-
};
|
73
|
-
/* Detect CSS Animations support to detect element display/re-attach */
|
74
|
-
|
75
|
-
|
76
|
-
var animation = false,
|
77
|
-
keyframeprefix = '',
|
78
|
-
animationstartevent = 'animationstart',
|
79
|
-
domPrefixes = 'Webkit Moz O ms'.split(' '),
|
80
|
-
startEvents = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' '),
|
81
|
-
pfx = ''; // {
|
82
|
-
|
83
|
-
var elm = document.createElement('fakeelement');
|
84
|
-
|
85
|
-
if (elm.style.animationName !== undefined) {
|
86
|
-
animation = true;
|
87
|
-
}
|
88
|
-
|
89
|
-
if (animation === false) {
|
90
|
-
for (var i = 0; i < domPrefixes.length; i++) {
|
91
|
-
if (elm.style[domPrefixes[i] + 'AnimationName'] !== undefined) {
|
92
|
-
pfx = domPrefixes[i];
|
93
|
-
keyframeprefix = '-' + pfx.toLowerCase() + '-';
|
94
|
-
animationstartevent = startEvents[i];
|
95
|
-
animation = true;
|
96
|
-
break;
|
97
|
-
}
|
98
|
-
}
|
99
|
-
} // }
|
100
|
-
|
101
|
-
|
102
|
-
var animationName = 'resizeanim';
|
103
|
-
var animationKeyframes = '@' + keyframeprefix + 'keyframes ' + animationName + ' { from { opacity: 0; } to { opacity: 0; } } ';
|
104
|
-
var animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; ';
|
105
|
-
}
|
106
|
-
|
107
|
-
var createStyles = function createStyles(doc) {
|
108
|
-
if (!doc.getElementById('detectElementResize')) {
|
109
|
-
//opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360
|
110
|
-
var css = (animationKeyframes ? animationKeyframes : '') + '.resize-triggers { ' + (animationStyle ? animationStyle : '') + 'visibility: hidden; opacity: 0; } ' + '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',
|
111
|
-
head = doc.head || doc.getElementsByTagName('head')[0],
|
112
|
-
style = doc.createElement('style');
|
113
|
-
style.id = 'detectElementResize';
|
114
|
-
style.type = 'text/css';
|
115
|
-
|
116
|
-
if (nonce !== null) {
|
117
|
-
style.setAttribute('nonce', nonce);
|
118
|
-
}
|
119
|
-
|
120
|
-
if (style.styleSheet) {
|
121
|
-
style.styleSheet.cssText = css;
|
122
|
-
} else {
|
123
|
-
style.appendChild(doc.createTextNode(css));
|
124
|
-
}
|
125
|
-
|
126
|
-
head.appendChild(style);
|
127
|
-
}
|
128
|
-
};
|
129
|
-
|
130
|
-
var addResizeListener = function addResizeListener(element, fn) {
|
131
|
-
if (attachEvent) {
|
132
|
-
element.attachEvent('onresize', fn);
|
133
|
-
} else {
|
134
|
-
if (!element.__resizeTriggers__) {
|
135
|
-
var doc = element.ownerDocument;
|
136
|
-
|
137
|
-
var elementStyle = _window.getComputedStyle(element);
|
138
|
-
|
139
|
-
if (elementStyle && elementStyle.position === 'static') {
|
140
|
-
element.style.position = 'relative';
|
141
|
-
}
|
142
|
-
|
143
|
-
createStyles(doc);
|
144
|
-
element.__resizeLast__ = {};
|
145
|
-
element.__resizeListeners__ = [];
|
146
|
-
(element.__resizeTriggers__ = doc.createElement('div')).className = 'resize-triggers';
|
147
|
-
element.__resizeTriggers__.innerHTML = '<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';
|
148
|
-
element.appendChild(element.__resizeTriggers__);
|
149
|
-
resetTriggers(element);
|
150
|
-
element.addEventListener('scroll', scrollListener, true);
|
151
|
-
/* Listen for a css animation to detect element display/re-attach */
|
152
|
-
|
153
|
-
if (animationstartevent) {
|
154
|
-
element.__resizeTriggers__.__animationListener__ = function animationListener(e) {
|
155
|
-
if (e.animationName === animationName) {
|
156
|
-
resetTriggers(element);
|
157
|
-
}
|
158
|
-
};
|
159
|
-
|
160
|
-
element.__resizeTriggers__.addEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__);
|
161
|
-
}
|
162
|
-
}
|
163
|
-
|
164
|
-
element.__resizeListeners__.push(fn);
|
165
|
-
}
|
166
|
-
};
|
167
|
-
|
168
|
-
var removeResizeListener = function removeResizeListener(element, fn) {
|
169
|
-
if (attachEvent) {
|
170
|
-
element.detachEvent('onresize', fn);
|
171
|
-
} else {
|
172
|
-
element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
|
173
|
-
|
174
|
-
if (!element.__resizeListeners__.length) {
|
175
|
-
element.removeEventListener('scroll', scrollListener, true);
|
176
|
-
|
177
|
-
if (element.__resizeTriggers__.__animationListener__) {
|
178
|
-
element.__resizeTriggers__.removeEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__);
|
179
|
-
|
180
|
-
element.__resizeTriggers__.__animationListener__ = null;
|
181
|
-
}
|
182
|
-
|
183
|
-
try {
|
184
|
-
element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);
|
185
|
-
} catch (e) {// Preact compat; see developit/preact-compat/issues/228
|
186
|
-
}
|
187
|
-
}
|
188
|
-
}
|
189
|
-
};
|
190
|
-
|
191
|
-
return {
|
192
|
-
addResizeListener: addResizeListener,
|
193
|
-
removeResizeListener: removeResizeListener
|
194
|
-
};
|
195
|
-
}
|
@@ -1,57 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
export declare type Size = {
|
3
|
-
height: number;
|
4
|
-
width: number;
|
5
|
-
};
|
6
|
-
export interface Props {
|
7
|
-
/** 子组件 */
|
8
|
-
children: (size: Size) => React.ReactElement;
|
9
|
-
/** 样式名 */
|
10
|
-
className?: string;
|
11
|
-
/** 默认高度 一般用于ssr */
|
12
|
-
defaultHeight?: number;
|
13
|
-
/** 默认高度 */
|
14
|
-
defaultWidth?: number;
|
15
|
-
/** 禁止高度变化 */
|
16
|
-
disableHeight: boolean;
|
17
|
-
/** 禁止宽度变化 */
|
18
|
-
disableWidth: boolean;
|
19
|
-
/** Nonce of the inlined stylesheet for Content Security Policy */
|
20
|
-
nonce?: string;
|
21
|
-
/** Callback to be invoked on-resize */
|
22
|
-
onResize: (size: Size) => void;
|
23
|
-
/** 被隐藏时是否渲染 DOM 结构 默认不渲染 */
|
24
|
-
forceRender?: boolean;
|
25
|
-
/** 样式*/
|
26
|
-
style?: Object;
|
27
|
-
}
|
28
|
-
declare type State = {
|
29
|
-
height: number;
|
30
|
-
width: number;
|
31
|
-
};
|
32
|
-
declare type ResizeHandler = (element: HTMLElement, onResize: () => void) => void;
|
33
|
-
declare type DetectElementResize = {
|
34
|
-
addResizeListener: ResizeHandler;
|
35
|
-
removeResizeListener: ResizeHandler;
|
36
|
-
};
|
37
|
-
export default class AutoSizer extends React.PureComponent<Props, State> {
|
38
|
-
static defaultProps: {
|
39
|
-
onResize: () => void;
|
40
|
-
disableHeight: boolean;
|
41
|
-
disableWidth: boolean;
|
42
|
-
style: {};
|
43
|
-
};
|
44
|
-
state: {
|
45
|
-
height: number;
|
46
|
-
width: number;
|
47
|
-
};
|
48
|
-
_parentNode?: HTMLElement;
|
49
|
-
_autoSizer?: HTMLElement;
|
50
|
-
_detectElementResize: DetectElementResize;
|
51
|
-
componentDidMount(): void;
|
52
|
-
componentWillUnmount(): void;
|
53
|
-
render(): JSX.Element;
|
54
|
-
_onResize: () => void;
|
55
|
-
_setRef: (autoSizer?: HTMLElement) => void;
|
56
|
-
}
|
57
|
-
export {};
|
@@ -1,158 +0,0 @@
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
3
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
6
|
-
import * as React from 'react';
|
7
|
-
import createDetectElementResize from './detectElementResize';
|
8
|
-
|
9
|
-
var AutoSizer = /*#__PURE__*/function (_React$PureComponent) {
|
10
|
-
_inherits(AutoSizer, _React$PureComponent);
|
11
|
-
|
12
|
-
var _super = _createSuper(AutoSizer);
|
13
|
-
|
14
|
-
function AutoSizer() {
|
15
|
-
var _this;
|
16
|
-
|
17
|
-
_classCallCheck(this, AutoSizer);
|
18
|
-
|
19
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
20
|
-
args[_key] = arguments[_key];
|
21
|
-
}
|
22
|
-
|
23
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
24
|
-
_this.state = {
|
25
|
-
height: _this.props.defaultHeight || 0,
|
26
|
-
width: _this.props.defaultWidth || 0
|
27
|
-
};
|
28
|
-
_this._parentNode = void 0;
|
29
|
-
_this._autoSizer = void 0;
|
30
|
-
_this._detectElementResize = void 0;
|
31
|
-
|
32
|
-
_this._onResize = function () {
|
33
|
-
var _this$props = _this.props,
|
34
|
-
disableHeight = _this$props.disableHeight,
|
35
|
-
disableWidth = _this$props.disableWidth,
|
36
|
-
onResize = _this$props.onResize;
|
37
|
-
|
38
|
-
if (_this._parentNode) {
|
39
|
-
// Guard against AutoSizer component being removed from the DOM immediately after being added.
|
40
|
-
// This can result in invalid style values which can result in NaN values if we don't handle them.
|
41
|
-
// See issue #150 for more context.
|
42
|
-
var height = _this._parentNode.offsetHeight || 0;
|
43
|
-
var width = _this._parentNode.offsetWidth || 0;
|
44
|
-
var style = window.getComputedStyle(_this._parentNode) || {};
|
45
|
-
var paddingLeft = parseInt(style.paddingLeft, 10) || 0;
|
46
|
-
var paddingRight = parseInt(style.paddingRight, 10) || 0;
|
47
|
-
var paddingTop = parseInt(style.paddingTop, 10) || 0;
|
48
|
-
var paddingBottom = parseInt(style.paddingBottom, 10) || 0;
|
49
|
-
var newHeight = height - paddingTop - paddingBottom;
|
50
|
-
var newWidth = width - paddingLeft - paddingRight;
|
51
|
-
|
52
|
-
if (!disableHeight && _this.state.height !== newHeight || !disableWidth && _this.state.width !== newWidth) {
|
53
|
-
_this.setState({
|
54
|
-
height: height - paddingTop - paddingBottom,
|
55
|
-
width: width - paddingLeft - paddingRight
|
56
|
-
});
|
57
|
-
|
58
|
-
onResize({
|
59
|
-
height: height,
|
60
|
-
width: width
|
61
|
-
});
|
62
|
-
}
|
63
|
-
}
|
64
|
-
};
|
65
|
-
|
66
|
-
_this._setRef = function (autoSizer) {
|
67
|
-
_this._autoSizer = autoSizer;
|
68
|
-
};
|
69
|
-
|
70
|
-
return _this;
|
71
|
-
}
|
72
|
-
|
73
|
-
_createClass(AutoSizer, [{
|
74
|
-
key: "componentDidMount",
|
75
|
-
value: function componentDidMount() {
|
76
|
-
var nonce = this.props.nonce;
|
77
|
-
|
78
|
-
if (this._autoSizer && this._autoSizer.parentNode && this._autoSizer.parentNode.ownerDocument && this._autoSizer.parentNode.ownerDocument.defaultView && this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement) {
|
79
|
-
// Delay access of parentNode until mount.
|
80
|
-
// This handles edge-cases where the component has already been unmounted before its ref has been set,
|
81
|
-
// As well as libraries like react-lite which have a slightly different lifecycle.
|
82
|
-
this._parentNode = this._autoSizer.parentNode; // Defer requiring resize handler in order to support server-side rendering.
|
83
|
-
// See issue #41
|
84
|
-
|
85
|
-
this._detectElementResize = createDetectElementResize(nonce);
|
86
|
-
|
87
|
-
this._detectElementResize.addResizeListener(this._parentNode, this._onResize);
|
88
|
-
|
89
|
-
this._onResize();
|
90
|
-
}
|
91
|
-
}
|
92
|
-
}, {
|
93
|
-
key: "componentWillUnmount",
|
94
|
-
value: function componentWillUnmount() {
|
95
|
-
if (this._detectElementResize && this._parentNode) {
|
96
|
-
this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);
|
97
|
-
}
|
98
|
-
}
|
99
|
-
}, {
|
100
|
-
key: "render",
|
101
|
-
value: function render() {
|
102
|
-
var _this$props2 = this.props,
|
103
|
-
children = _this$props2.children,
|
104
|
-
className = _this$props2.className,
|
105
|
-
disableHeight = _this$props2.disableHeight,
|
106
|
-
disableWidth = _this$props2.disableWidth,
|
107
|
-
style = _this$props2.style,
|
108
|
-
forceRender = _this$props2.forceRender;
|
109
|
-
var _this$state = this.state,
|
110
|
-
height = _this$state.height,
|
111
|
-
width = _this$state.width; // Outer div should not force width/height since that may prevent containers from shrinking.
|
112
|
-
// Inner component should overflow and use calculated width/height.
|
113
|
-
// See issue #68 for more information.
|
114
|
-
|
115
|
-
var outerStyle = {
|
116
|
-
overflow: 'visible'
|
117
|
-
};
|
118
|
-
var childParams = {}; // Avoid rendering children before the initial measurements have been collected.
|
119
|
-
// At best this would just be wasting cycles.
|
120
|
-
|
121
|
-
var bailoutOnChildren = false;
|
122
|
-
|
123
|
-
if (!disableHeight) {
|
124
|
-
if (height === 0) {
|
125
|
-
bailoutOnChildren = true;
|
126
|
-
}
|
127
|
-
|
128
|
-
outerStyle.height = 0;
|
129
|
-
childParams.height = height;
|
130
|
-
}
|
131
|
-
|
132
|
-
if (!disableWidth) {
|
133
|
-
if (width === 0) {
|
134
|
-
bailoutOnChildren = true;
|
135
|
-
}
|
136
|
-
|
137
|
-
outerStyle.width = 0;
|
138
|
-
childParams.width = width;
|
139
|
-
}
|
140
|
-
|
141
|
-
return /*#__PURE__*/React.createElement("div", {
|
142
|
-
className: className,
|
143
|
-
ref: this._setRef,
|
144
|
-
style: _objectSpread(_objectSpread({}, outerStyle), style)
|
145
|
-
}, (!bailoutOnChildren || forceRender) && children(childParams));
|
146
|
-
}
|
147
|
-
}]);
|
148
|
-
|
149
|
-
return AutoSizer;
|
150
|
-
}(React.PureComponent);
|
151
|
-
|
152
|
-
AutoSizer.defaultProps = {
|
153
|
-
onResize: function onResize() {},
|
154
|
-
disableHeight: false,
|
155
|
-
disableWidth: false,
|
156
|
-
style: {}
|
157
|
-
};
|
158
|
-
export { AutoSizer as default };
|