rsuite 4.10.5 → 4.10.6
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/CHANGELOG.md +11 -0
- package/dist/rsuite.js +27 -3
- package/dist/rsuite.min.js +10 -2
- package/dist/rsuite.min.js.map +1 -1
- package/es/Modal/BaseModal.js +24 -4
- package/es/Modal/ModalDialog.js +1 -0
- package/lib/Modal/BaseModal.js +24 -4
- package/lib/Modal/ModalDialog.js +1 -0
- package/package.json +3 -3
- package/src/Modal/BaseModal.tsx +26 -4
- package/src/Modal/ModalDialog.tsx +1 -0
- package/src/Modal/test/ModalSpec.js +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
<a name="4.10.6"></a>
|
|
2
|
+
## [4.10.6](https://github.com/rsuite/rsuite/compare/v4.10.5...v4.10.6) (2021-12-17)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* **Modal:** fix Modal not focused when opened ([#2221](https://github.com/rsuite/rsuite/issues/2221)) ([25cf056](https://github.com/rsuite/rsuite/commit/25cf056))
|
|
8
|
+
* **Table:** bump rsuite-table 3.16.0 ([#2232](https://github.com/rsuite/rsuite/issues/2232)) ([ff6ae0f](https://github.com/rsuite/rsuite/commit/ff6ae0f))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
1
12
|
<a name="4.10.5"></a>
|
|
2
13
|
## [4.10.5](https://github.com/rsuite/rsuite/compare/v4.10.4...v4.10.5) (2021-11-26)
|
|
3
14
|
|
package/dist/rsuite.js
CHANGED
|
@@ -5086,7 +5086,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab
|
|
|
5086
5086
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5087
5087
|
|
|
5088
5088
|
"use strict";
|
|
5089
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/isFunction */ \"./node_modules/rsuite-table/node_modules/lodash/isFunction.js\");\n/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash/flatten */ \"./node_modules/rsuite-table/node_modules/lodash/flatten.js\");\n/* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash_flatten__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash/debounce */ \"./node_modules/rsuite-table/node_modules/lodash/debounce.js\");\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash/isEqual */ \"./node_modules/rsuite-table/node_modules/lodash/isEqual.js\");\n/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash_eq__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash/eq */ \"./node_modules/rsuite-table/node_modules/lodash/eq.js\");\n/* harmony import */ var lodash_eq__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash_eq__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash/omit */ \"./node_modules/rsuite-table/node_modules/lodash/omit.js\");\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash_omit__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash/merge */ \"./node_modules/rsuite-table/node_modules/lodash/merge.js\");\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash_merge__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var element_resize_event__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! element-resize-event */ \"./node_modules/element-resize-event/index.js\");\n/* harmony import */ var element_resize_event__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(element_resize_event__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var dom_lib_lib_transition_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! dom-lib/lib/transition/translateDOMPositionXY */ \"./node_modules/dom-lib/lib/transition/translateDOMPositionXY.js\");\n/* harmony import */ var dom_lib_lib_transition_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(dom_lib_lib_transition_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var dom_lib__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! dom-lib */ \"./node_modules/dom-lib/es/index.js\");\n/* harmony import */ var _Row__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Row */ \"./node_modules/rsuite-table/es/Row.js\");\n/* harmony import */ var _CellGroup__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./CellGroup */ \"./node_modules/rsuite-table/es/CellGroup.js\");\n/* harmony import */ var _Scrollbar__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Scrollbar */ \"./node_modules/rsuite-table/es/Scrollbar.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/rsuite-table/es/TableContext.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./constants */ \"./node_modules/rsuite-table/es/constants.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n/* harmony import */ var _ColumnGroup__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./ColumnGroup */ \"./node_modules/rsuite-table/es/ColumnGroup.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar SORT_TYPE = {\n DESC: 'desc',\n ASC: 'asc'\n};\nvar propTypes = {\n autoHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n affixHeader: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number]),\n affixHorizontalScrollbar: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number]),\n bordered: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n bodyRef: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n classPrefix: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.any,\n cellBordered: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n data: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object),\n defaultExpandAllRows: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n defaultExpandedRowKeys: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number])),\n defaultSortType: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string]),\n disabledScroll: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n expandedRowKeys: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number])),\n hover: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n height: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n headerHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n locale: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n loading: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n loadAnimation: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n minHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n rowKey: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number]),\n rowHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func]),\n renderTreeToggle: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n renderRowExpanded: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n rowExpandedHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n renderEmpty: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n renderLoading: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n rowClassName: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string]),\n rtl: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n sortColumn: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n sortType: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string]),\n showHeader: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n shouldUpdateScroll: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n translate3d: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n wordWrap: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n width: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n virtualized: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n isTree: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n onRowClick: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onRowContextMenu: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onScroll: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onSortColumn: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onExpandChange: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onTouchStart: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onTouchMove: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onDataUpdated: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func\n};\n\nvar Table = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Table, _React$Component);\n\n Table.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n if (props.data !== state.cacheData || props.isTree !== state.isTree) {\n return {\n cacheData: props.data,\n isTree: props.isTree,\n data: props.isTree ? Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"flattenData\"])(props.data) : props.data\n };\n }\n\n return null;\n };\n\n function Table(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.translateDOMPositionXY = null;\n _this.scrollListener = null;\n _this.tableRef = void 0;\n _this.scrollbarYRef = void 0;\n _this.scrollbarXRef = void 0;\n _this.tableBodyRef = void 0;\n _this.affixHeaderWrapperRef = void 0;\n _this.mouseAreaRef = void 0;\n _this.headerWrapperRef = void 0;\n _this.tableHeaderRef = void 0;\n _this.wheelWrapperRef = void 0;\n _this.tableRows = {};\n _this.mounted = false;\n _this.disableEventsTimeoutId = null;\n _this.scrollY = 0;\n _this.scrollX = 0;\n _this.wheelHandler = void 0;\n _this.minScrollY = void 0;\n _this.minScrollX = void 0;\n _this.mouseArea = void 0;\n _this.touchX = void 0;\n _this.touchY = void 0;\n _this.wheelListener = void 0;\n _this.touchStartListener = void 0;\n _this.touchMoveListener = void 0;\n _this._cacheCells = null;\n _this._cacheChildrenSize = 0;\n _this._visibleRows = [];\n\n _this.listenWheel = function (deltaX, deltaY) {\n var _this$scrollbarXRef$c, _this$scrollbarXRef$c2, _this$scrollbarYRef$c, _this$scrollbarYRef$c2;\n\n _this.handleWheel(deltaX, deltaY);\n\n (_this$scrollbarXRef$c = _this.scrollbarXRef.current) === null || _this$scrollbarXRef$c === void 0 ? void 0 : (_this$scrollbarXRef$c2 = _this$scrollbarXRef$c.onWheelScroll) === null || _this$scrollbarXRef$c2 === void 0 ? void 0 : _this$scrollbarXRef$c2.call(_this$scrollbarXRef$c, deltaX);\n (_this$scrollbarYRef$c = _this.scrollbarYRef.current) === null || _this$scrollbarYRef$c === void 0 ? void 0 : (_this$scrollbarYRef$c2 = _this$scrollbarYRef$c.onWheelScroll) === null || _this$scrollbarYRef$c2 === void 0 ? void 0 : _this$scrollbarYRef$c2.call(_this$scrollbarYRef$c, deltaY);\n };\n\n _this.setOffsetByAffix = function () {\n var _this$headerWrapperRe, _this$tableRef;\n\n var _this$props = _this.props,\n affixHeader = _this$props.affixHeader,\n affixHorizontalScrollbar = _this$props.affixHorizontalScrollbar;\n var headerNode = (_this$headerWrapperRe = _this.headerWrapperRef) === null || _this$headerWrapperRe === void 0 ? void 0 : _this$headerWrapperRe.current;\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHeader) && headerNode) {\n _this.setState(function () {\n return {\n headerOffset: Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getOffset\"])(headerNode)\n };\n });\n }\n\n var tableNode = (_this$tableRef = _this.tableRef) === null || _this$tableRef === void 0 ? void 0 : _this$tableRef.current;\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHorizontalScrollbar) && tableNode) {\n _this.setState(function () {\n return {\n tableOffset: Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getOffset\"])(tableNode)\n };\n });\n }\n };\n\n _this.handleWindowScroll = function () {\n var _this$props2 = _this.props,\n affixHeader = _this$props2.affixHeader,\n affixHorizontalScrollbar = _this$props2.affixHorizontalScrollbar;\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHeader)) {\n _this.affixTableHeader();\n }\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHorizontalScrollbar)) {\n _this.affixHorizontalScrollbar();\n }\n };\n\n _this.affixHorizontalScrollbar = function () {\n var _this$scrollbarXRef, _this$scrollbarXRef$c3, _this$scrollbarXRef$c4;\n\n var scrollY = window.scrollY || window.pageYOffset;\n var windowHeight = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getHeight\"])(window);\n\n var height = _this.getTableHeight();\n\n var _this$state = _this.state,\n tableOffset = _this$state.tableOffset,\n fixedHorizontalScrollbar = _this$state.fixedHorizontalScrollbar;\n var affixHorizontalScrollbar = _this.props.affixHorizontalScrollbar;\n\n var headerHeight = _this.getTableHeaderHeight();\n\n var bottom = typeof affixHorizontalScrollbar === 'number' ? affixHorizontalScrollbar : 0;\n var fixedScrollbar = scrollY + windowHeight < height + (tableOffset.top + bottom) && scrollY + windowHeight - headerHeight > tableOffset.top + bottom;\n\n if ((_this$scrollbarXRef = _this.scrollbarXRef) !== null && _this$scrollbarXRef !== void 0 && (_this$scrollbarXRef$c3 = _this$scrollbarXRef.current) !== null && _this$scrollbarXRef$c3 !== void 0 && (_this$scrollbarXRef$c4 = _this$scrollbarXRef$c3.barRef) !== null && _this$scrollbarXRef$c4 !== void 0 && _this$scrollbarXRef$c4.current && fixedHorizontalScrollbar !== fixedScrollbar) {\n _this.setState({\n fixedHorizontalScrollbar: fixedScrollbar\n });\n }\n };\n\n _this.affixTableHeader = function () {\n var affixHeader = _this.props.affixHeader;\n var top = typeof affixHeader === 'number' ? affixHeader : 0;\n var _this$state2 = _this.state,\n headerOffset = _this$state2.headerOffset,\n contentHeight = _this$state2.contentHeight;\n var scrollY = window.scrollY || window.pageYOffset;\n var fixedHeader = scrollY - (headerOffset.top - top) >= 0 && scrollY < headerOffset.top - top + contentHeight;\n\n if (_this.affixHeaderWrapperRef.current) {\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"toggleClass\"])(_this.affixHeaderWrapperRef.current, 'fixed', fixedHeader);\n }\n };\n\n _this.handleSortColumn = function (dataKey) {\n var _this$props$onSortCol, _this$props3;\n\n var sortType = _this.getSortType();\n\n if (_this.props.sortColumn === dataKey) {\n sortType = sortType === SORT_TYPE.ASC ? SORT_TYPE.DESC : SORT_TYPE.ASC;\n\n _this.setState({\n sortType: sortType\n });\n }\n\n (_this$props$onSortCol = (_this$props3 = _this.props).onSortColumn) === null || _this$props$onSortCol === void 0 ? void 0 : _this$props$onSortCol.call(_this$props3, dataKey, sortType);\n };\n\n _this.handleColumnResizeEnd = function (columnWidth, _cursorDelta, dataKey, index) {\n var _this$setState;\n\n _this._cacheCells = null;\n\n _this.setState((_this$setState = {\n isColumnResizing: false\n }, _this$setState[dataKey + \"_\" + index + \"_width\"] = columnWidth, _this$setState));\n\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(_this.mouseAreaRef.current, {\n display: 'none'\n });\n };\n\n _this.handleColumnResizeStart = function (width, left, fixed) {\n _this.setState({\n isColumnResizing: true\n });\n\n _this.handleColumnResizeMove(width, left, fixed);\n };\n\n _this.handleColumnResizeMove = function (width, left, fixed) {\n var _addStyle;\n\n var mouseAreaLeft = width + left;\n var x = mouseAreaLeft;\n var dir = 'left';\n\n if (_this.isRTL()) {\n mouseAreaLeft += _this.minScrollX + _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"];\n dir = 'right';\n }\n\n if (!fixed) {\n x = mouseAreaLeft + (_this.isRTL() ? -_this.scrollX : _this.scrollX);\n }\n\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(_this.mouseAreaRef.current, (_addStyle = {\n display: 'block'\n }, _addStyle[dir] = x + \"px\", _addStyle));\n };\n\n _this.handleTreeToggle = function (rowKey, _rowIndex, rowData) {\n var _this$props$onExpandC, _this$props4;\n\n var expandedRowKeys = _this.getExpandedRowKeys();\n\n var open = false;\n var nextExpandedRowKeys = [];\n\n for (var i = 0; i < expandedRowKeys.length; i++) {\n var _key = expandedRowKeys[i];\n\n if (_key === rowKey) {\n open = true;\n } else {\n nextExpandedRowKeys.push(_key);\n }\n }\n\n if (!open) {\n nextExpandedRowKeys.push(rowKey);\n }\n\n _this.setState({\n expandedRowKeys: nextExpandedRowKeys\n });\n\n (_this$props$onExpandC = (_this$props4 = _this.props).onExpandChange) === null || _this$props$onExpandC === void 0 ? void 0 : _this$props$onExpandC.call(_this$props4, !open, rowData);\n };\n\n _this.handleScrollX = function (delta) {\n _this.handleWheel(delta, 0);\n };\n\n _this.handleScrollY = function (delta) {\n _this.handleWheel(0, delta);\n };\n\n _this.handleWheel = function (deltaX, deltaY) {\n var _this$props5 = _this.props,\n onScroll = _this$props5.onScroll,\n virtualized = _this$props5.virtualized;\n var _this$state3 = _this.state,\n contentWidth = _this$state3.contentWidth,\n width = _this$state3.width;\n\n if (!_this.tableRef.current) {\n return;\n }\n\n var nextScrollX = contentWidth <= width ? 0 : _this.scrollX - deltaX;\n var nextScrollY = _this.scrollY - deltaY;\n _this.scrollY = Math.min(0, nextScrollY < _this.minScrollY ? _this.minScrollY : nextScrollY);\n _this.scrollX = Math.min(0, nextScrollX < _this.minScrollX ? _this.minScrollX : nextScrollX);\n\n _this.updatePosition();\n\n onScroll === null || onScroll === void 0 ? void 0 : onScroll(_this.scrollX, _this.scrollY);\n\n if (virtualized) {\n _this.setState({\n isScrolling: true,\n scrollY: _this.scrollY\n });\n\n if (_this.disableEventsTimeoutId) {\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"cancelAnimationTimeout\"])(_this.disableEventsTimeoutId);\n }\n\n _this.disableEventsTimeoutId = Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"requestAnimationTimeout\"])(_this.debounceScrollEndedCallback, 150);\n }\n };\n\n _this.debounceScrollEndedCallback = function () {\n _this.disableEventsTimeoutId = null;\n\n _this.setState({\n isScrolling: false\n });\n };\n\n _this.handleTouchStart = function (event) {\n var _this$props$onTouchSt, _this$props6;\n\n if (event.touches) {\n var _event$touches$ = event.touches[0],\n pageX = _event$touches$.pageX,\n pageY = _event$touches$.pageY;\n _this.touchX = pageX;\n _this.touchY = pageY;\n }\n\n (_this$props$onTouchSt = (_this$props6 = _this.props).onTouchStart) === null || _this$props$onTouchSt === void 0 ? void 0 : _this$props$onTouchSt.call(_this$props6, event);\n };\n\n _this.handleTouchMove = function (event) {\n var _this$props$onTouchMo, _this$props7;\n\n var autoHeight = _this.props.autoHeight;\n\n if (event.touches) {\n var _event$preventDefault, _this$scrollbarXRef$c5, _this$scrollbarXRef$c6, _this$scrollbarYRef$c3, _this$scrollbarYRef$c4;\n\n var _event$touches$2 = event.touches[0],\n pageX = _event$touches$2.pageX,\n pageY = _event$touches$2.pageY;\n var deltaX = _this.touchX - pageX;\n var deltaY = autoHeight ? 0 : _this.touchY - pageY;\n\n if (!_this.shouldHandleWheelY(deltaY) && !_this.shouldHandleWheelX(deltaX)) {\n return;\n }\n\n (_event$preventDefault = event.preventDefault) === null || _event$preventDefault === void 0 ? void 0 : _event$preventDefault.call(event);\n\n _this.handleWheel(deltaX, deltaY);\n\n (_this$scrollbarXRef$c5 = _this.scrollbarXRef.current) === null || _this$scrollbarXRef$c5 === void 0 ? void 0 : (_this$scrollbarXRef$c6 = _this$scrollbarXRef$c5.onWheelScroll) === null || _this$scrollbarXRef$c6 === void 0 ? void 0 : _this$scrollbarXRef$c6.call(_this$scrollbarXRef$c5, deltaX);\n (_this$scrollbarYRef$c3 = _this.scrollbarYRef.current) === null || _this$scrollbarYRef$c3 === void 0 ? void 0 : (_this$scrollbarYRef$c4 = _this$scrollbarYRef$c3.onWheelScroll) === null || _this$scrollbarYRef$c4 === void 0 ? void 0 : _this$scrollbarYRef$c4.call(_this$scrollbarYRef$c3, deltaY);\n _this.touchX = pageX;\n _this.touchY = pageY;\n }\n\n (_this$props$onTouchMo = (_this$props7 = _this.props).onTouchMove) === null || _this$props$onTouchMo === void 0 ? void 0 : _this$props$onTouchMo.call(_this$props7, event);\n };\n\n _this.handleBodyScroll = function (event) {\n if (event.target !== _this.tableBodyRef.current) {\n return;\n }\n\n var left = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"scrollLeft\"])(event.target);\n var top = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"scrollTop\"])(event.target);\n\n if (top === 0 && left === 0) {\n return;\n }\n\n _this.listenWheel(left, top);\n\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"scrollLeft\"])(event.target, 0);\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"scrollTop\"])(event.target, 0);\n };\n\n _this.shouldHandleWheelX = function (delta) {\n var _this$props8 = _this.props,\n disabledScroll = _this$props8.disabledScroll,\n loading = _this$props8.loading;\n\n if (delta === 0 || disabledScroll || loading) {\n return false;\n }\n\n return true;\n };\n\n _this.shouldHandleWheelY = function (delta) {\n var _this$props9 = _this.props,\n disabledScroll = _this$props9.disabledScroll,\n loading = _this$props9.loading;\n\n if (delta === 0 || disabledScroll || loading) {\n return false;\n }\n\n return delta >= 0 && _this.scrollY > _this.minScrollY || delta < 0 && _this.scrollY < 0;\n };\n\n _this.addPrefix = function (name) {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"prefix\"])(_this.props.classPrefix)(name);\n };\n\n _this.calculateTableWidth = function () {\n var _this$tableRef2;\n\n var table = (_this$tableRef2 = _this.tableRef) === null || _this$tableRef2 === void 0 ? void 0 : _this$tableRef2.current;\n var width = _this.state.width;\n\n if (table) {\n var nextWidth = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getWidth\"])(table);\n\n if (width !== nextWidth) {\n var _this$scrollbarXRef2, _this$scrollbarXRef2$;\n\n _this.scrollX = 0;\n (_this$scrollbarXRef2 = _this.scrollbarXRef) === null || _this$scrollbarXRef2 === void 0 ? void 0 : (_this$scrollbarXRef2$ = _this$scrollbarXRef2.current) === null || _this$scrollbarXRef2$ === void 0 ? void 0 : _this$scrollbarXRef2$.resetScrollBarPosition();\n }\n\n _this._cacheCells = null;\n\n _this.setState({\n width: nextWidth\n });\n }\n\n _this.setOffsetByAffix();\n };\n\n _this.scrollTop = function (top) {\n var _this$scrollbarYRef, _this$scrollbarYRef$c5, _this$scrollbarYRef$c6;\n\n if (top === void 0) {\n top = 0;\n }\n\n var _this$getControlledSc = _this.getControlledScrollTopValue(top),\n scrollY = _this$getControlledSc[0],\n handleScrollY = _this$getControlledSc[1];\n\n _this.scrollY = scrollY;\n (_this$scrollbarYRef = _this.scrollbarYRef) === null || _this$scrollbarYRef === void 0 ? void 0 : (_this$scrollbarYRef$c5 = _this$scrollbarYRef.current) === null || _this$scrollbarYRef$c5 === void 0 ? void 0 : (_this$scrollbarYRef$c6 = _this$scrollbarYRef$c5.resetScrollBarPosition) === null || _this$scrollbarYRef$c6 === void 0 ? void 0 : _this$scrollbarYRef$c6.call(_this$scrollbarYRef$c5, handleScrollY);\n\n _this.updatePosition();\n /**\n * 当开启 virtualized,调用 scrollTop 后会出现白屏现象,\n * 原因是直接操作 DOM 的坐标,但是组件没有重新渲染,需要调用 forceUpdate 重新进入 render。\n * Fix: rsuite#1044\n */\n\n\n if (_this.props.virtualized && _this.state.contentHeight > _this.props.height) {\n _this.forceUpdate();\n }\n };\n\n _this.scrollLeft = function (left) {\n var _this$scrollbarXRef3, _this$scrollbarXRef3$, _this$scrollbarXRef3$2;\n\n if (left === void 0) {\n left = 0;\n }\n\n var _this$getControlledSc2 = _this.getControlledScrollLeftValue(left),\n scrollX = _this$getControlledSc2[0],\n handleScrollX = _this$getControlledSc2[1];\n\n _this.scrollX = scrollX;\n (_this$scrollbarXRef3 = _this.scrollbarXRef) === null || _this$scrollbarXRef3 === void 0 ? void 0 : (_this$scrollbarXRef3$ = _this$scrollbarXRef3.current) === null || _this$scrollbarXRef3$ === void 0 ? void 0 : (_this$scrollbarXRef3$2 = _this$scrollbarXRef3$.resetScrollBarPosition) === null || _this$scrollbarXRef3$2 === void 0 ? void 0 : _this$scrollbarXRef3$2.call(_this$scrollbarXRef3$, handleScrollX);\n\n _this.updatePosition();\n };\n\n _this.scrollTo = function (coord) {\n var _ref = coord || {},\n x = _ref.x,\n y = _ref.y;\n\n if (typeof x === 'number') {\n _this.scrollLeft(x);\n }\n\n if (typeof y === 'number') {\n _this.scrollTop(y);\n }\n };\n\n _this.bindTableRowsRef = function (index, rowData) {\n return function (ref) {\n if (ref) {\n _this.tableRows[index] = [ref, rowData];\n }\n };\n };\n\n _this.bindRowClick = function (rowData) {\n return function (event) {\n var _this$props$onRowClic, _this$props10;\n\n (_this$props$onRowClic = (_this$props10 = _this.props).onRowClick) === null || _this$props$onRowClic === void 0 ? void 0 : _this$props$onRowClic.call(_this$props10, rowData, event);\n };\n };\n\n _this.bindRowContextMenu = function (rowData) {\n return function (event) {\n var _this$props$onRowCont, _this$props11;\n\n (_this$props$onRowCont = (_this$props11 = _this.props).onRowContextMenu) === null || _this$props$onRowCont === void 0 ? void 0 : _this$props$onRowCont.call(_this$props11, rowData, event);\n };\n };\n\n var _width = props.width,\n data = props.data,\n _rowKey = props.rowKey,\n defaultExpandAllRows = props.defaultExpandAllRows,\n renderRowExpanded = props.renderRowExpanded,\n defaultExpandedRowKeys = props.defaultExpandedRowKeys,\n _props$children = props.children,\n children = _props$children === void 0 ? [] : _props$children,\n isTree = props.isTree,\n defaultSortType = props.defaultSortType;\n\n var _expandedRowKeys = defaultExpandAllRows ? Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"findRowKeys\"])(data, _rowKey, lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default()(renderRowExpanded)) : defaultExpandedRowKeys || [];\n\n var shouldFixedColumn = Array.from(lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(children)).some(function (child) {\n return child && child.props && child.props.fixed;\n });\n\n if (isTree && !_rowKey) {\n throw new Error('The `rowKey` is required when set isTree');\n }\n\n _this.state = {\n isTree: isTree,\n expandedRowKeys: _expandedRowKeys,\n shouldFixedColumn: shouldFixedColumn,\n cacheData: data,\n data: isTree ? Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"flattenData\"])(data) : data,\n width: _width || 0,\n columnWidth: 0,\n dataKey: 0,\n contentHeight: 0,\n contentWidth: 0,\n tableRowsMaxHeight: [],\n sortType: defaultSortType,\n scrollY: 0,\n isScrolling: false,\n fixedHeader: false\n };\n _this.scrollY = 0;\n _this.scrollX = 0;\n _this.wheelHandler = new dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"WheelHandler\"](_this.listenWheel, _this.shouldHandleWheelX, _this.shouldHandleWheelY, false);\n _this._cacheChildrenSize = lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(children).length;\n _this.translateDOMPositionXY = Object(dom_lib_lib_transition_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_14__[\"getTranslateDOMPositionXY\"])({\n enable3DTransform: props.translate3d\n });\n _this.tableRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.scrollbarYRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.scrollbarXRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.tableBodyRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.affixHeaderWrapperRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.mouseAreaRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.headerWrapperRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.wheelWrapperRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.tableHeaderRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n return _this;\n }\n\n var _proto = Table.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this$props13, _this$props13$bodyRef;\n\n this.calculateTableWidth();\n this.calculateTableContextHeight();\n this.calculateRowMaxHeight();\n this.setOffsetByAffix();\n this.initPosition();\n element_resize_event__WEBPACK_IMPORTED_MODULE_13___default()(this.tableRef.current, lodash_debounce__WEBPACK_IMPORTED_MODULE_8___default()(this.calculateTableWidth, 400));\n var options = {\n passive: false\n };\n var tableBody = this.tableBodyRef.current;\n\n if (tableBody) {\n this.wheelListener = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"on\"])(tableBody, 'wheel', this.wheelHandler.onWheel, options);\n this.touchStartListener = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"on\"])(tableBody, 'touchstart', this.handleTouchStart, options);\n this.touchMoveListener = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"on\"])(tableBody, 'touchmove', this.handleTouchMove, options);\n }\n\n var _this$props12 = this.props,\n affixHeader = _this$props12.affixHeader,\n affixHorizontalScrollbar = _this$props12.affixHorizontalScrollbar;\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHeader) || Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHorizontalScrollbar)) {\n this.scrollListener = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"on\"])(window, 'scroll', this.handleWindowScroll);\n }\n\n (_this$props13 = this.props) === null || _this$props13 === void 0 ? void 0 : (_this$props13$bodyRef = _this$props13.bodyRef) === null || _this$props13$bodyRef === void 0 ? void 0 : _this$props13$bodyRef.call(_this$props13, this.wheelWrapperRef.current);\n };\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) {\n var _cacheChildrenSize = lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(nextProps.children || []).length;\n /**\n * 单元格列的信息在初始化后会被缓存,在某些属性被更新以后,需要清除缓存。\n */\n\n if (_cacheChildrenSize !== this._cacheChildrenSize) {\n this._cacheChildrenSize = _cacheChildrenSize;\n this._cacheCells = null;\n } else if (this.props.children !== nextProps.children || this.props.sortColumn !== nextProps.sortColumn || this.props.sortType !== nextProps.sortType) {\n this._cacheCells = null;\n }\n\n return !lodash_eq__WEBPACK_IMPORTED_MODULE_10___default()(this.props, nextProps) || !lodash_isEqual__WEBPACK_IMPORTED_MODULE_9___default()(this.state, nextState);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n var rowHeight = prevProps.rowHeight,\n data = prevProps.data,\n height = prevProps.height;\n\n if (data !== this.props.data) {\n var _this$props$onDataUpd, _this$props14;\n\n this.calculateRowMaxHeight();\n (_this$props$onDataUpd = (_this$props14 = this.props).onDataUpdated) === null || _this$props$onDataUpd === void 0 ? void 0 : _this$props$onDataUpd.call(_this$props14, this.props.data, this.scrollTo);\n var maxHeight = this.props.data.length * (typeof rowHeight === 'function' ? rowHeight(null) : rowHeight); // 当开启允许更新滚动条,或者滚动条位置大于表格的最大高度,则初始滚动条位置\n\n if (this.props.shouldUpdateScroll || Math.abs(this.scrollY) > maxHeight) {\n this.scrollTo({\n x: 0,\n y: 0\n });\n }\n } else {\n this.updatePosition();\n }\n\n if ( // 当 Table 的 data 发生变化,需要重新计算高度\n data !== this.props.data || // 当 Table 的 height 属性发生变化,需要重新计算 Table 高度\n height !== this.props.height || // 当 Table 内容区的高度发生变化需要重新计算\n prevState.contentHeight !== this.state.contentHeight || // 当 expandedRowKeys 发生变化,需要重新计算 Table 高度,如果重算会导致滚动条不显示。\n prevState.expandedRowKeys !== this.state.expandedRowKeys || prevProps.expandedRowKeys !== this.props.expandedRowKeys) {\n this.calculateTableContextHeight(prevProps);\n }\n\n this.calculateTableContentWidth(prevProps);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var _this$wheelListener, _this$touchStartListe, _this$touchMoveListen, _this$scrollListener;\n\n this.wheelHandler = null;\n\n if (this.tableRef.current) {\n Object(element_resize_event__WEBPACK_IMPORTED_MODULE_13__[\"unbind\"])(this.tableRef.current);\n }\n\n (_this$wheelListener = this.wheelListener) === null || _this$wheelListener === void 0 ? void 0 : _this$wheelListener.off();\n (_this$touchStartListe = this.touchStartListener) === null || _this$touchStartListe === void 0 ? void 0 : _this$touchStartListe.off();\n (_this$touchMoveListen = this.touchMoveListener) === null || _this$touchMoveListen === void 0 ? void 0 : _this$touchMoveListen.off();\n (_this$scrollListener = this.scrollListener) === null || _this$scrollListener === void 0 ? void 0 : _this$scrollListener.off();\n };\n\n _proto.getExpandedRowKeys = function getExpandedRowKeys() {\n var expandedRowKeys = this.props.expandedRowKeys;\n return typeof expandedRowKeys === 'undefined' ? this.state.expandedRowKeys : expandedRowKeys;\n };\n\n _proto.getSortType = function getSortType() {\n var sortType = this.props.sortType;\n return typeof sortType === 'undefined' ? this.state.sortType : sortType;\n };\n\n _proto.getScrollCellGroups = function getScrollCellGroups() {\n var _this$tableRef$curren;\n\n return (_this$tableRef$curren = this.tableRef.current) === null || _this$tableRef$curren === void 0 ? void 0 : _this$tableRef$curren.querySelectorAll(\".\" + this.addPrefix('cell-group-scroll'));\n };\n\n _proto.getFixedLeftCellGroups = function getFixedLeftCellGroups() {\n var _this$tableRef$curren2;\n\n return (_this$tableRef$curren2 = this.tableRef.current) === null || _this$tableRef$curren2 === void 0 ? void 0 : _this$tableRef$curren2.querySelectorAll(\".\" + this.addPrefix('cell-group-fixed-left'));\n };\n\n _proto.getFixedRightCellGroups = function getFixedRightCellGroups() {\n var _this$tableRef$curren3;\n\n return (_this$tableRef$curren3 = this.tableRef.current) === null || _this$tableRef$curren3 === void 0 ? void 0 : _this$tableRef$curren3.querySelectorAll(\".\" + this.addPrefix('cell-group-fixed-right'));\n };\n\n _proto.isRTL = function isRTL() {\n return this.props.rtl || Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isRTL\"])();\n };\n\n _proto.getRowHeight = function getRowHeight(rowData) {\n if (rowData === void 0) {\n rowData = {};\n }\n\n var rowHeight = this.props.rowHeight;\n return typeof rowHeight === 'function' ? rowHeight(rowData) : rowHeight;\n }\n /**\n * 获取表头高度\n */\n ;\n\n _proto.getTableHeaderHeight = function getTableHeaderHeight() {\n var _this$props15 = this.props,\n headerHeight = _this$props15.headerHeight,\n showHeader = _this$props15.showHeader;\n return showHeader ? headerHeight : 0;\n }\n /**\n * 获取 Table 需要渲染的高度\n */\n ;\n\n _proto.getTableHeight = function getTableHeight() {\n var contentHeight = this.state.contentHeight;\n var _this$props16 = this.props,\n minHeight = _this$props16.minHeight,\n height = _this$props16.height,\n autoHeight = _this$props16.autoHeight,\n data = _this$props16.data;\n var headerHeight = this.getTableHeaderHeight();\n\n if (data.length === 0 && autoHeight) {\n return height;\n }\n\n return autoHeight ? Math.max(headerHeight + contentHeight, minHeight) : height;\n }\n /**\n * 获取 columns ReactElement 数组\n * - 处理 children 中存在 <Column> 数组的情况\n * - 过滤 children 中的空项\n */\n ;\n\n _proto.getTableColumns = function getTableColumns() {\n var children = this.props.children;\n\n if (!Array.isArray(children)) {\n return children;\n }\n\n var flattenColumns = lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(children).map(function (column) {\n if ((column === null || column === void 0 ? void 0 : column.type) === _ColumnGroup__WEBPACK_IMPORTED_MODULE_22__[\"default\"]) {\n var _column$props = column === null || column === void 0 ? void 0 : column.props,\n header = _column$props.header,\n childColumns = _column$props.children,\n align = _column$props.align,\n fixed = _column$props.fixed,\n verticalAlign = _column$props.verticalAlign;\n\n return childColumns.map(function (childColumn, index) {\n // 把 ColumnGroup 设置的属性覆盖到 Column\n var groupCellProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, childColumn === null || childColumn === void 0 ? void 0 : childColumn.props, {\n align: align,\n fixed: fixed,\n verticalAlign: verticalAlign\n });\n /**\n * 为分组中的第一列设置属性:\n * groupCount: 分组子项个数\n * groupHeader: 分组标题\n * resizable: 设置为不可自定义列宽\n */\n\n\n if (index === 0) {\n groupCellProps.groupCount = childColumns.length;\n groupCellProps.groupHeader = header;\n groupCellProps.resizable = false;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](childColumn, groupCellProps);\n });\n }\n\n return column;\n }); // 把 Columns 中的数组,展平为一维数组,计算 lastColumn 与 firstColumn。\n\n return lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(flattenColumns).filter(function (col) {\n return col;\n });\n };\n\n _proto.getCellDescriptor = function getCellDescriptor() {\n var _this2 = this;\n\n if (this._cacheCells) {\n return this._cacheCells;\n }\n\n var hasCustomTreeCol = false;\n var left = 0; // Cell left margin\n\n var headerCells = []; // Table header cell\n\n var bodyCells = []; // Table body cell\n\n var children = this.props.children;\n\n if (!children) {\n this._cacheCells = {\n headerCells: headerCells,\n bodyCells: bodyCells,\n hasCustomTreeCol: hasCustomTreeCol,\n allColumnsWidth: left\n };\n return this._cacheCells;\n }\n\n var columns = this.getTableColumns();\n var tableWidth = this.state.width;\n var _this$props17 = this.props,\n sortColumn = _this$props17.sortColumn,\n rowHeight = _this$props17.rowHeight,\n showHeader = _this$props17.showHeader;\n\n var _getTotalByColumns = Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"getTotalByColumns\"])(columns),\n totalFlexGrow = _getTotalByColumns.totalFlexGrow,\n totalWidth = _getTotalByColumns.totalWidth;\n\n var headerHeight = this.getTableHeaderHeight();\n react__WEBPACK_IMPORTED_MODULE_3__[\"Children\"].forEach(columns, function (column, index) {\n if ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"isValidElement\"](column)) {\n var columnChildren = column.props.children;\n var _column$props2 = column.props,\n width = _column$props2.width,\n resizable = _column$props2.resizable,\n flexGrow = _column$props2.flexGrow,\n minWidth = _column$props2.minWidth,\n onResize = _column$props2.onResize,\n treeCol = _column$props2.treeCol;\n\n if (treeCol) {\n hasCustomTreeCol = true;\n }\n\n if (resizable && flexGrow) {\n console.warn(\"Cannot set 'resizable' and 'flexGrow' together in <Column>, column index: \" + index);\n }\n\n if (columnChildren.length !== 2) {\n throw new Error(\"Component <HeaderCell> and <Cell> is required, column index: \" + index + \" \");\n }\n\n var nextWidth = _this2.state[columnChildren[1].props.dataKey + \"_\" + index + \"_width\"] || width || 0;\n\n if (tableWidth && flexGrow && totalFlexGrow) {\n nextWidth = Math.max((tableWidth - totalWidth) / totalFlexGrow * flexGrow, minWidth || 60);\n }\n\n var cellProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, lodash_omit__WEBPACK_IMPORTED_MODULE_11___default()(column.props, ['children']), {\n 'aria-colindex': index + 1,\n left: left,\n headerHeight: headerHeight,\n key: index,\n width: nextWidth,\n height: rowHeight,\n firstColumn: index === 0,\n lastColumn: index === columns.length - 1\n });\n\n if (showHeader && headerHeight) {\n var headerCellProps = {\n // index 用于拖拽列宽时候(Resizable column),定义的序号\n index: index,\n dataKey: columnChildren[1].props.dataKey,\n isHeaderCell: true,\n sortable: column.props.sortable,\n onSortColumn: _this2.handleSortColumn,\n sortType: _this2.getSortType(),\n sortColumn: sortColumn,\n flexGrow: flexGrow\n };\n\n if (resizable) {\n lodash_merge__WEBPACK_IMPORTED_MODULE_12___default()(headerCellProps, {\n onResize: onResize,\n onColumnResizeEnd: _this2.handleColumnResizeEnd,\n onColumnResizeStart: _this2.handleColumnResizeStart,\n onColumnResizeMove: _this2.handleColumnResizeMove\n });\n }\n\n headerCells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](columnChildren[0], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, cellProps, headerCellProps)));\n }\n\n bodyCells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](columnChildren[1], cellProps));\n left += nextWidth;\n }\n });\n return this._cacheCells = {\n headerCells: headerCells,\n bodyCells: bodyCells,\n allColumnsWidth: left,\n hasCustomTreeCol: hasCustomTreeCol\n };\n };\n\n _proto.initPosition = function initPosition() {\n var _this3 = this;\n\n if (this.isRTL()) {\n setTimeout(function () {\n var _this3$scrollbarXRef, _this3$scrollbarXRef$, _this3$scrollbarXRef$2;\n\n var _this3$state = _this3.state,\n contentWidth = _this3$state.contentWidth,\n width = _this3$state.width;\n _this3.scrollX = width - contentWidth - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"];\n\n _this3.updatePosition();\n\n (_this3$scrollbarXRef = _this3.scrollbarXRef) === null || _this3$scrollbarXRef === void 0 ? void 0 : (_this3$scrollbarXRef$ = _this3$scrollbarXRef.current) === null || _this3$scrollbarXRef$ === void 0 ? void 0 : (_this3$scrollbarXRef$2 = _this3$scrollbarXRef$.resetScrollBarPosition) === null || _this3$scrollbarXRef$2 === void 0 ? void 0 : _this3$scrollbarXRef$2.call(_this3$scrollbarXRef$, -_this3.scrollX);\n }, 0);\n }\n };\n\n _proto.updatePosition = function updatePosition() {\n var _this$tableHeaderRef;\n\n /**\n * 当存在锁定列情况处理\n */\n if (this.state.shouldFixedColumn) {\n this.updatePositionByFixedCell();\n } else {\n var _this$wheelWrapperRef, _this$headerWrapperRe2, _this$affixHeaderWrap, _affixHeaderElement$h;\n\n var wheelStyle = {};\n var headerStyle = {};\n this.translateDOMPositionXY(wheelStyle, this.scrollX, this.scrollY);\n this.translateDOMPositionXY(headerStyle, this.scrollX, 0);\n var wheelElement = (_this$wheelWrapperRef = this.wheelWrapperRef) === null || _this$wheelWrapperRef === void 0 ? void 0 : _this$wheelWrapperRef.current;\n var headerElement = (_this$headerWrapperRe2 = this.headerWrapperRef) === null || _this$headerWrapperRe2 === void 0 ? void 0 : _this$headerWrapperRe2.current;\n var affixHeaderElement = (_this$affixHeaderWrap = this.affixHeaderWrapperRef) === null || _this$affixHeaderWrap === void 0 ? void 0 : _this$affixHeaderWrap.current;\n wheelElement && Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(wheelElement, wheelStyle);\n headerElement && Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(headerElement, headerStyle);\n\n if (affixHeaderElement !== null && affixHeaderElement !== void 0 && (_affixHeaderElement$h = affixHeaderElement.hasChildNodes) !== null && _affixHeaderElement$h !== void 0 && _affixHeaderElement$h.call(affixHeaderElement)) {\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(affixHeaderElement.firstChild, headerStyle);\n }\n }\n\n if ((_this$tableHeaderRef = this.tableHeaderRef) !== null && _this$tableHeaderRef !== void 0 && _this$tableHeaderRef.current) {\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"toggleClass\"])(this.tableHeaderRef.current, this.addPrefix('cell-group-shadow'), this.scrollY < 0);\n }\n };\n\n _proto.updatePositionByFixedCell = function updatePositionByFixedCell() {\n var _this$wheelWrapperRef2;\n\n var wheelGroupStyle = {};\n var wheelStyle = {};\n var scrollGroups = this.getScrollCellGroups();\n var fixedLeftGroups = this.getFixedLeftCellGroups();\n var fixedRightGroups = this.getFixedRightCellGroups();\n var _this$state4 = this.state,\n contentWidth = _this$state4.contentWidth,\n width = _this$state4.width;\n this.translateDOMPositionXY(wheelGroupStyle, this.scrollX, 0);\n this.translateDOMPositionXY(wheelStyle, 0, this.scrollY);\n var scrollArrayGroups = Array.from(scrollGroups);\n\n for (var i = 0; i < scrollArrayGroups.length; i++) {\n var group = scrollArrayGroups[i];\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(group, wheelGroupStyle);\n }\n\n if ((_this$wheelWrapperRef2 = this.wheelWrapperRef) !== null && _this$wheelWrapperRef2 !== void 0 && _this$wheelWrapperRef2.current) {\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(this.wheelWrapperRef.current, wheelStyle);\n }\n\n var leftShadowClassName = this.addPrefix('cell-group-left-shadow');\n var rightShadowClassName = this.addPrefix('cell-group-right-shadow');\n var showLeftShadow = this.scrollX < 0;\n var showRightShadow = width - contentWidth - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"] !== this.scrollX;\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"toggleClass\"])(fixedLeftGroups, leftShadowClassName, showLeftShadow);\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"toggleClass\"])(fixedRightGroups, rightShadowClassName, showRightShadow);\n };\n\n _proto.shouldRenderExpandedRow = function shouldRenderExpandedRow(rowData) {\n var _this$props18 = this.props,\n rowKey = _this$props18.rowKey,\n renderRowExpanded = _this$props18.renderRowExpanded,\n isTree = _this$props18.isTree;\n var expandedRowKeys = this.getExpandedRowKeys() || [];\n return lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default()(renderRowExpanded) && !isTree && expandedRowKeys.some(function (key) {\n return key === rowData[rowKey];\n });\n };\n\n _proto.calculateRowMaxHeight = function calculateRowMaxHeight() {\n var wordWrap = this.props.wordWrap;\n\n if (wordWrap) {\n var tableRowsMaxHeight = [];\n var tableRows = Object.values(this.tableRows);\n\n for (var i = 0; i < tableRows.length; i++) {\n var _tableRows$i = tableRows[i],\n row = _tableRows$i[0];\n\n if (row) {\n var cells = row.querySelectorAll(\".\" + this.addPrefix('cell-wrap')) || [];\n var cellArray = Array.from(cells);\n var maxHeight = 0;\n\n for (var j = 0; j < cellArray.length; j++) {\n var cell = cellArray[j];\n var h = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getHeight\"])(cell);\n maxHeight = Math.max(maxHeight, h);\n }\n\n tableRowsMaxHeight.push(maxHeight);\n }\n }\n\n this.setState({\n tableRowsMaxHeight: tableRowsMaxHeight\n });\n }\n };\n\n _proto.calculateTableContentWidth = function calculateTableContentWidth(prevProps) {\n var _this$tableRef3;\n\n var table = (_this$tableRef3 = this.tableRef) === null || _this$tableRef3 === void 0 ? void 0 : _this$tableRef3.current;\n var row = table.querySelector(\".\" + this.addPrefix('row') + \":not(.virtualized)\");\n var contentWidth = row ? Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getWidth\"])(row) : 0;\n this.setState({\n contentWidth: contentWidth\n }); // 这里 -SCROLLBAR_WIDTH 是为了让滚动条不挡住内容部分\n\n this.minScrollX = -(contentWidth - this.state.width) - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"];\n /**\n * 1.判断 Table 列数是否发生变化\n * 2.判断 Table 内容区域是否宽度有变化\n *\n * 满足 1 和 2 则更新横向滚动条位置\n */\n\n if (lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(this.props.children).length !== lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(prevProps.children).length && this.state.contentWidth !== contentWidth) {\n this.scrollLeft(0);\n }\n };\n\n _proto.calculateTableContextHeight = function calculateTableContextHeight(prevProps) {\n var table = this.tableRef.current;\n var rows = table.querySelectorAll(\".\" + this.addPrefix('row')) || [];\n var _this$props19 = this.props,\n height = _this$props19.height,\n autoHeight = _this$props19.autoHeight,\n rowHeight = _this$props19.rowHeight,\n affixHeader = _this$props19.affixHeader;\n var headerHeight = this.getTableHeaderHeight();\n var contentHeight = rows.length ? Array.from(rows).map(function (row) {\n return Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getHeight\"])(row) || rowHeight;\n }).reduce(function (x, y) {\n return x + y;\n }) : 0; // 当设置 affixHeader 属性后要减掉两个 header 的高度\n\n var nextContentHeight = contentHeight - (affixHeader ? headerHeight * 2 : headerHeight);\n\n if (nextContentHeight !== this.state.contentHeight) {\n this.setState({\n contentHeight: nextContentHeight\n });\n }\n\n if (prevProps && ( // 当 data 更新,或者表格高度更新,则更新滚动条\n prevProps.height !== height || prevProps.data !== this.props.data) && this.scrollY !== 0) {\n this.scrollTop(Math.abs(this.scrollY));\n this.updatePosition();\n }\n\n if (!autoHeight) {\n // 这里 -SCROLLBAR_WIDTH 是为了让滚动条不挡住内容部分\n this.minScrollY = -(contentHeight - height) - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"];\n } // 如果内容区域的高度小于表格的高度,则重置 Y 坐标滚动条\n\n\n if (contentHeight < height) {\n this.scrollTop(0);\n } // 如果 scrollTop 的值大于可以滚动的范围 ,则重置 Y 坐标滚动条\n // 当 Table 为 virtualized 时, wheel 事件触发每次都会进入该逻辑, 避免在滚动到底部后滚动条重置, +SCROLLBAR_WIDTH\n\n\n if (Math.abs(this.scrollY) + height - headerHeight > nextContentHeight + _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]) {\n this.scrollTop(this.scrollY);\n }\n };\n\n _proto.getControlledScrollTopValue = function getControlledScrollTopValue(value) {\n if (this.props.autoHeight) {\n return [0, 0];\n }\n\n var contentHeight = this.state.contentHeight;\n var headerHeight = this.getTableHeaderHeight();\n var height = this.getTableHeight(); // 滚动值的最大范围判断\n\n value = Math.min(value, Math.max(0, contentHeight - (height - headerHeight))); // value 值是表格理论滚动位置的一个值,通过 value 计算出 scrollY 坐标值与滚动条位置的值\n\n return [-value, value / contentHeight * (height - headerHeight)];\n };\n\n _proto.getControlledScrollLeftValue = function getControlledScrollLeftValue(value) {\n var _this$state5 = this.state,\n contentWidth = _this$state5.contentWidth,\n width = _this$state5.width; // 滚动值的最大范围判断\n\n value = Math.min(value, Math.max(0, contentWidth - width));\n return [-value, value / contentWidth * width];\n }\n /**\n * public method\n */\n ;\n\n _proto.renderRowData = function renderRowData(bodyCells, rowData, props, shouldRenderExpandedRow) {\n var _this$props20 = this.props,\n renderTreeToggle = _this$props20.renderTreeToggle,\n rowKey = _this$props20.rowKey,\n wordWrap = _this$props20.wordWrap,\n isTree = _this$props20.isTree;\n var hasChildren = isTree && rowData.children && Array.isArray(rowData.children);\n var nextRowKey = typeof rowData[rowKey] !== 'undefined' ? rowData[rowKey] : props.key;\n\n var rowProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, props, {\n key: nextRowKey,\n 'aria-rowindex': props.key + 2,\n rowRef: this.bindTableRowsRef(props.key, rowData),\n onClick: this.bindRowClick(rowData),\n onContextMenu: this.bindRowContextMenu(rowData)\n });\n\n var expandedRowKeys = this.getExpandedRowKeys() || [];\n var expanded = expandedRowKeys.some(function (key) {\n return key === rowData[rowKey];\n });\n var cells = [];\n\n for (var i = 0; i < bodyCells.length; i++) {\n var cell = bodyCells[i];\n cells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](cell, {\n hasChildren: hasChildren,\n rowData: rowData,\n wordWrap: wordWrap,\n renderTreeToggle: renderTreeToggle,\n height: props.height,\n rowIndex: props.key,\n depth: props.depth,\n onTreeToggle: this.handleTreeToggle,\n rowKey: nextRowKey,\n expanded: expanded\n }));\n }\n\n return this.renderRow(rowProps, cells, shouldRenderExpandedRow, rowData);\n };\n\n _proto.renderRow = function renderRow(props, cells, shouldRenderExpandedRow, rowData) {\n var rowClassName = this.props.rowClassName;\n var _this$state6 = this.state,\n shouldFixedColumn = _this$state6.shouldFixedColumn,\n width = _this$state6.width,\n contentWidth = _this$state6.contentWidth;\n\n var depth = props.depth,\n restRowProps = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"depth\"]);\n\n if (typeof rowClassName === 'function') {\n restRowProps.className = rowClassName(rowData);\n } else {\n restRowProps.className = rowClassName;\n }\n\n var rowStyles = {};\n var rowRight = 0;\n\n if (this.isRTL() && contentWidth > width) {\n rowRight = width - contentWidth;\n rowStyles.right = rowRight;\n } // IF there are fixed columns, add a fixed group\n\n\n if (shouldFixedColumn && contentWidth > width) {\n var fixedLeftCells = [];\n var fixedRightCells = [];\n var scrollCells = [];\n var fixedLeftCellGroupWidth = 0;\n var fixedRightCellGroupWidth = 0;\n\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n var _cell$props = cell.props,\n fixed = _cell$props.fixed,\n _width2 = _cell$props.width;\n var isFixedStart = fixed === 'left' || fixed === true;\n var isFixedEnd = fixed === 'right';\n\n if (this.isRTL()) {\n isFixedStart = fixed === 'right';\n isFixedEnd = fixed === 'left' || fixed === true;\n }\n\n if (isFixedStart) {\n fixedLeftCells.push(cell);\n fixedLeftCellGroupWidth += _width2;\n } else if (isFixedEnd) {\n fixedRightCells.push(cell);\n fixedRightCellGroupWidth += _width2;\n } else {\n scrollCells.push(cell);\n }\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, restRowProps, {\n \"data-depth\": depth,\n style: rowStyles\n }), fixedLeftCellGroupWidth ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n fixed: \"left\",\n height: props.isHeaderRow ? props.headerHeight : props.height,\n width: fixedLeftCellGroupWidth,\n style: this.isRTL() ? {\n right: width - fixedLeftCellGroupWidth - rowRight\n } : null\n }, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"resetLeftForCells\"])(fixedLeftCells))) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], null, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(scrollCells)), fixedRightCellGroupWidth ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n fixed: \"right\",\n style: this.isRTL() ? {\n right: 0 - rowRight\n } : {\n left: width - fixedRightCellGroupWidth - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]\n },\n height: props.isHeaderRow ? props.headerHeight : props.height,\n width: fixedRightCellGroupWidth + _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]\n }, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"resetLeftForCells\"])(fixedRightCells, _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]))) : null, shouldRenderExpandedRow && this.renderRowExpanded(rowData));\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, restRowProps, {\n \"data-depth\": depth,\n style: rowStyles\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], null, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(cells)), shouldRenderExpandedRow && this.renderRowExpanded(rowData));\n };\n\n _proto.renderRowExpanded = function renderRowExpanded(rowData) {\n var _this$props21 = this.props,\n renderRowExpanded = _this$props21.renderRowExpanded,\n rowExpandedHeight = _this$props21.rowExpandedHeight;\n var styles = {\n height: rowExpandedHeight\n };\n\n if (typeof renderRowExpanded === 'function') {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('row-expanded'),\n style: styles\n }, renderRowExpanded(rowData));\n }\n\n return null;\n };\n\n _proto.renderMouseArea = function renderMouseArea() {\n var headerHeight = this.getTableHeaderHeight();\n var styles = {\n height: this.getTableHeight()\n };\n var spanStyles = {\n height: headerHeight - 1\n };\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n ref: this.mouseAreaRef,\n className: this.addPrefix('mouse-area'),\n style: styles\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", {\n style: spanStyles\n }));\n };\n\n _proto.renderTableHeader = function renderTableHeader(headerCells, rowWidth) {\n var affixHeader = this.props.affixHeader;\n var tableWidth = this.state.width;\n var top = typeof affixHeader === 'number' ? affixHeader : 0;\n var headerHeight = this.getTableHeaderHeight();\n var rowProps = {\n 'aria-rowindex': 1,\n rowRef: this.tableHeaderRef,\n width: rowWidth,\n height: this.getRowHeight(),\n headerHeight: headerHeight,\n isHeaderRow: true,\n top: 0\n };\n var fixedStyle = {\n position: 'fixed',\n overflow: 'hidden',\n height: this.getTableHeaderHeight(),\n width: tableWidth,\n top: top\n }; // Affix header\n\n var header = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_5___default()(this.addPrefix('affix-header')),\n style: fixedStyle,\n ref: this.affixHeaderWrapperRef\n }, this.renderRow(rowProps, headerCells));\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_3__[\"Fragment\"], null, (affixHeader === 0 || affixHeader) && header, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n role: \"rowgroup\",\n className: this.addPrefix('header-row-wrapper'),\n ref: this.headerWrapperRef\n }, this.renderRow(rowProps, headerCells)));\n };\n\n _proto.renderTableBody = function renderTableBody(bodyCells, rowWidth) {\n var _this$props22 = this.props,\n rowExpandedHeight = _this$props22.rowExpandedHeight,\n renderRowExpanded = _this$props22.renderRowExpanded,\n isTree = _this$props22.isTree,\n rowKey = _this$props22.rowKey,\n wordWrap = _this$props22.wordWrap,\n virtualized = _this$props22.virtualized,\n rowHeight = _this$props22.rowHeight;\n var headerHeight = this.getTableHeaderHeight();\n var _this$state7 = this.state,\n tableRowsMaxHeight = _this$state7.tableRowsMaxHeight,\n isScrolling = _this$state7.isScrolling,\n data = _this$state7.data;\n var height = this.getTableHeight();\n var bodyHeight = height - headerHeight;\n var bodyStyles = {\n top: headerHeight,\n height: bodyHeight\n };\n var contentHeight = 0;\n var topHideHeight = 0;\n var bottomHideHeight = 0;\n this._visibleRows = [];\n\n if (data) {\n var top = 0; // Row position\n\n var minTop = Math.abs(this.scrollY);\n var maxTop = minTop + height + rowExpandedHeight;\n var isCustomRowHeight = typeof rowHeight === 'function';\n var isUncertainHeight = !!(renderRowExpanded || isCustomRowHeight || isTree);\n /**\n 如果开启了 virtualized 同时 Table 中的的行高是可变的,\n 则需要循环遍历 data, 获取每一行的高度。\n */\n\n if (isUncertainHeight && virtualized || !virtualized) {\n for (var index = 0; index < data.length; index++) {\n var rowData = data[index];\n var maxHeight = tableRowsMaxHeight[index];\n var shouldRenderExpandedRow = this.shouldRenderExpandedRow(rowData);\n var nextRowHeight = 0;\n var depth = 0;\n\n if (typeof rowHeight === 'function') {\n nextRowHeight = rowHeight(rowData);\n } else {\n nextRowHeight = maxHeight ? Math.max(maxHeight + _constants__WEBPACK_IMPORTED_MODULE_20__[\"CELL_PADDING_HEIGHT\"], rowHeight) : rowHeight;\n\n if (shouldRenderExpandedRow) {\n nextRowHeight += rowExpandedHeight;\n }\n }\n\n if (isTree) {\n var parents = Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"findAllParents\"])(rowData, rowKey);\n var expandedRowKeys = this.getExpandedRowKeys();\n depth = parents.length; // 如果是 Tree Table, 判断当前的行是否展开/折叠,如果是折叠则不显示该行。\n\n if (!Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"shouldShowRowByExpanded\"])(expandedRowKeys, parents)) {\n continue;\n }\n }\n\n contentHeight += nextRowHeight;\n var rowProps = {\n key: index,\n top: top,\n width: rowWidth,\n depth: depth,\n height: nextRowHeight\n };\n top += nextRowHeight;\n\n if (virtualized && !wordWrap) {\n if (top + nextRowHeight < minTop) {\n topHideHeight += nextRowHeight;\n continue;\n } else if (top > maxTop) {\n bottomHideHeight += nextRowHeight;\n continue;\n }\n }\n\n this._visibleRows.push(this.renderRowData(bodyCells, rowData, rowProps, shouldRenderExpandedRow));\n }\n } else {\n /**\n 如果 Table 的行高是固定的,则直接通过行高与行数进行计算,\n 减少遍历所有 data 带来的性能消耗\n */\n var _nextRowHeight = this.getRowHeight();\n\n var startIndex = Math.max(Math.floor(minTop / _nextRowHeight), 0);\n var endIndex = Math.min(startIndex + Math.ceil(bodyHeight / _nextRowHeight), data.length);\n contentHeight = data.length * _nextRowHeight;\n topHideHeight = startIndex * _nextRowHeight;\n bottomHideHeight = (data.length - endIndex) * _nextRowHeight;\n\n for (var _index = startIndex; _index < endIndex; _index++) {\n var _rowData = data[_index];\n var _rowProps = {\n key: _index,\n top: _index * _nextRowHeight,\n width: rowWidth,\n height: _nextRowHeight\n };\n\n this._visibleRows.push(this.renderRowData(bodyCells, _rowData, _rowProps, false));\n }\n }\n }\n\n var wheelStyles = {\n position: 'absolute',\n height: contentHeight,\n minHeight: height,\n pointerEvents: isScrolling ? 'none' : undefined\n };\n var topRowStyles = {\n height: topHideHeight\n };\n var bottomRowStyles = {\n height: bottomHideHeight\n };\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n ref: this.tableBodyRef,\n role: \"rowgroup\",\n className: this.addPrefix('body-row-wrapper'),\n style: bodyStyles,\n onScroll: this.handleBodyScroll\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n style: wheelStyles,\n className: this.addPrefix('body-wheel-area'),\n ref: this.wheelWrapperRef\n }, topHideHeight ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n style: topRowStyles,\n className: \"virtualized\"\n }) : null, this._visibleRows, bottomHideHeight ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n style: bottomRowStyles,\n className: \"virtualized\"\n }) : null), this.renderInfo(), this.renderScrollbar(), this.renderLoading());\n };\n\n _proto.renderInfo = function renderInfo() {\n var _this$props23 = this.props,\n locale = _this$props23.locale,\n renderEmpty = _this$props23.renderEmpty,\n loading = _this$props23.loading;\n\n if (this._visibleRows.length || loading) {\n return null;\n }\n\n var emptyMessage = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('body-info')\n }, locale.emptyMessage);\n return renderEmpty ? renderEmpty(emptyMessage) : emptyMessage;\n };\n\n _proto.renderScrollbar = function renderScrollbar() {\n var _this$props24 = this.props,\n disabledScroll = _this$props24.disabledScroll,\n affixHorizontalScrollbar = _this$props24.affixHorizontalScrollbar,\n id = _this$props24.id;\n var _this$state8 = this.state,\n contentWidth = _this$state8.contentWidth,\n contentHeight = _this$state8.contentHeight,\n width = _this$state8.width,\n fixedHorizontalScrollbar = _this$state8.fixedHorizontalScrollbar;\n var bottom = typeof affixHorizontalScrollbar === 'number' ? affixHorizontalScrollbar : 0;\n var headerHeight = this.getTableHeaderHeight();\n var height = this.getTableHeight();\n\n if (disabledScroll) {\n return null;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Scrollbar__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n tableId: id,\n className: classnames__WEBPACK_IMPORTED_MODULE_5___default()({\n fixed: fixedHorizontalScrollbar\n }),\n style: {\n width: width,\n bottom: fixedHorizontalScrollbar ? bottom : undefined\n },\n length: this.state.width,\n onScroll: this.handleScrollX,\n scrollLength: contentWidth,\n ref: this.scrollbarXRef\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Scrollbar__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n vertical: true,\n tableId: id,\n length: height - headerHeight,\n scrollLength: contentHeight,\n onScroll: this.handleScrollY,\n ref: this.scrollbarYRef\n }));\n }\n /**\n * show loading\n */\n ;\n\n _proto.renderLoading = function renderLoading() {\n var _this$props25 = this.props,\n locale = _this$props25.locale,\n loading = _this$props25.loading,\n loadAnimation = _this$props25.loadAnimation,\n renderLoading = _this$props25.renderLoading;\n\n if (!loadAnimation && !loading) {\n return null;\n }\n\n var loadingElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('loader-wrapper')\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('loader')\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"i\", {\n className: this.addPrefix('loader-icon')\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", {\n className: this.addPrefix('loader-text')\n }, locale.loading)));\n return renderLoading ? renderLoading(loadingElement) : loadingElement;\n };\n\n _proto.render = function render() {\n var _classNames;\n\n var _this$props26 = this.props,\n children = _this$props26.children,\n className = _this$props26.className,\n data = _this$props26.data,\n _this$props26$width = _this$props26.width,\n width = _this$props26$width === void 0 ? 0 : _this$props26$width,\n style = _this$props26.style,\n isTree = _this$props26.isTree,\n hover = _this$props26.hover,\n bordered = _this$props26.bordered,\n cellBordered = _this$props26.cellBordered,\n wordWrap = _this$props26.wordWrap,\n classPrefix = _this$props26.classPrefix,\n loading = _this$props26.loading,\n showHeader = _this$props26.showHeader,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_this$props26, [\"children\", \"className\", \"data\", \"width\", \"style\", \"isTree\", \"hover\", \"bordered\", \"cellBordered\", \"wordWrap\", \"classPrefix\", \"loading\", \"showHeader\"]);\n\n var isColumnResizing = this.state.isColumnResizing;\n\n var _this$getCellDescript = this.getCellDescriptor(),\n headerCells = _this$getCellDescript.headerCells,\n bodyCells = _this$getCellDescript.bodyCells,\n allColumnsWidth = _this$getCellDescript.allColumnsWidth,\n hasCustomTreeCol = _this$getCellDescript.hasCustomTreeCol;\n\n var rowWidth = allColumnsWidth > width ? allColumnsWidth : width;\n var clesses = classnames__WEBPACK_IMPORTED_MODULE_5___default()(classPrefix, className, (_classNames = {}, _classNames[this.addPrefix('word-wrap')] = wordWrap, _classNames[this.addPrefix('treetable')] = isTree, _classNames[this.addPrefix('bordered')] = bordered, _classNames[this.addPrefix('cell-bordered')] = cellBordered, _classNames[this.addPrefix('column-resizing')] = isColumnResizing, _classNames[this.addPrefix('hover')] = hover, _classNames[this.addPrefix('loading')] = loading, _classNames));\n\n var styles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n width: width || 'auto',\n height: this.getTableHeight()\n }, style);\n\n var unhandled = Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"getUnhandledProps\"])(propTypes, rest);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_TableContext__WEBPACK_IMPORTED_MODULE_19__[\"default\"].Provider, {\n value: {\n translateDOMPositionXY: this.translateDOMPositionXY,\n rtl: this.isRTL(),\n isTree: isTree,\n hasCustomTreeCol: hasCustomTreeCol\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n role: isTree ? 'treegrid' : 'grid' // The aria-rowcount is specified on the element with the table.\n // Its value is an integer equal to the total number of rows available, including header rows.\n ,\n \"aria-rowcount\": data.length + 1,\n \"aria-colcount\": this._cacheChildrenSize\n }, unhandled, {\n className: clesses,\n style: styles,\n ref: this.tableRef\n }), showHeader && this.renderTableHeader(headerCells, rowWidth), children && this.renderTableBody(bodyCells, rowWidth), showHeader && this.renderMouseArea()));\n };\n\n return Table;\n}(react__WEBPACK_IMPORTED_MODULE_3__[\"Component\"]);\n\nTable.propTypes = propTypes;\nTable.defaultProps = {\n classPrefix: Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"defaultClassPrefix\"])('table'),\n data: [],\n defaultSortType: SORT_TYPE.DESC,\n height: 200,\n rowHeight: 46,\n headerHeight: 40,\n minHeight: 0,\n rowExpandedHeight: 100,\n hover: true,\n showHeader: true,\n rowKey: 'key',\n translate3d: true,\n shouldUpdateScroll: true,\n locale: {\n emptyMessage: 'No data found',\n loading: 'Loading...'\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Table);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/Table.js?");
|
|
5089
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/isFunction */ \"./node_modules/rsuite-table/node_modules/lodash/isFunction.js\");\n/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash/flatten */ \"./node_modules/rsuite-table/node_modules/lodash/flatten.js\");\n/* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash_flatten__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash/debounce */ \"./node_modules/rsuite-table/node_modules/lodash/debounce.js\");\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash/isEqual */ \"./node_modules/rsuite-table/node_modules/lodash/isEqual.js\");\n/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash_eq__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash/eq */ \"./node_modules/rsuite-table/node_modules/lodash/eq.js\");\n/* harmony import */ var lodash_eq__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash_eq__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash/omit */ \"./node_modules/rsuite-table/node_modules/lodash/omit.js\");\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash_omit__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash/merge */ \"./node_modules/rsuite-table/node_modules/lodash/merge.js\");\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash_merge__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var element_resize_event__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! element-resize-event */ \"./node_modules/element-resize-event/index.js\");\n/* harmony import */ var element_resize_event__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(element_resize_event__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var dom_lib_lib_transition_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! dom-lib/lib/transition/translateDOMPositionXY */ \"./node_modules/dom-lib/lib/transition/translateDOMPositionXY.js\");\n/* harmony import */ var dom_lib_lib_transition_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(dom_lib_lib_transition_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var dom_lib__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! dom-lib */ \"./node_modules/dom-lib/es/index.js\");\n/* harmony import */ var _Row__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Row */ \"./node_modules/rsuite-table/es/Row.js\");\n/* harmony import */ var _CellGroup__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./CellGroup */ \"./node_modules/rsuite-table/es/CellGroup.js\");\n/* harmony import */ var _Scrollbar__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Scrollbar */ \"./node_modules/rsuite-table/es/Scrollbar.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/rsuite-table/es/TableContext.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./constants */ \"./node_modules/rsuite-table/es/constants.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n/* harmony import */ var _ColumnGroup__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./ColumnGroup */ \"./node_modules/rsuite-table/es/ColumnGroup.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! react-is */ \"./node_modules/rsuite-table/node_modules/react-is/index.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_23__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar SORT_TYPE = {\n DESC: 'desc',\n ASC: 'asc'\n};\nvar propTypes = {\n autoHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n affixHeader: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number]),\n affixHorizontalScrollbar: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number]),\n bordered: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n bodyRef: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n classPrefix: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.any,\n cellBordered: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n data: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object),\n defaultExpandAllRows: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n defaultExpandedRowKeys: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number])),\n defaultSortType: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string]),\n disabledScroll: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n expandedRowKeys: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number])),\n hover: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n height: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n headerHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n locale: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n loading: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n loadAnimation: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n minHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n rowKey: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number]),\n rowHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func]),\n renderTreeToggle: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n renderRowExpanded: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n rowExpandedHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n renderEmpty: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n renderLoading: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n rowClassName: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string]),\n rtl: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n sortColumn: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n sortType: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string]),\n showHeader: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n shouldUpdateScroll: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n translate3d: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n wordWrap: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n width: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n virtualized: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n isTree: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n onRowClick: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onRowContextMenu: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onScroll: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onSortColumn: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onExpandChange: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onTouchStart: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onTouchMove: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onDataUpdated: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func\n};\n\nvar Table = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Table, _React$Component);\n\n Table.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n if (props.data !== state.cacheData || props.isTree !== state.isTree) {\n return {\n cacheData: props.data,\n isTree: props.isTree,\n data: props.isTree ? Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"flattenData\"])(props.data) : props.data\n };\n }\n\n return null;\n };\n\n function Table(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.translateDOMPositionXY = null;\n _this.scrollListener = null;\n _this.tableRef = void 0;\n _this.scrollbarYRef = void 0;\n _this.scrollbarXRef = void 0;\n _this.tableBodyRef = void 0;\n _this.affixHeaderWrapperRef = void 0;\n _this.mouseAreaRef = void 0;\n _this.headerWrapperRef = void 0;\n _this.tableHeaderRef = void 0;\n _this.wheelWrapperRef = void 0;\n _this.tableRows = {};\n _this.mounted = false;\n _this.disableEventsTimeoutId = null;\n _this.scrollY = 0;\n _this.scrollX = 0;\n _this.wheelHandler = void 0;\n _this.minScrollY = void 0;\n _this.minScrollX = void 0;\n _this.mouseArea = void 0;\n _this.touchX = void 0;\n _this.touchY = void 0;\n _this.wheelListener = void 0;\n _this.touchStartListener = void 0;\n _this.touchMoveListener = void 0;\n _this._cacheCells = null;\n _this._cacheChildrenSize = 0;\n _this._visibleRows = [];\n\n _this.listenWheel = function (deltaX, deltaY) {\n var _this$scrollbarXRef$c, _this$scrollbarXRef$c2, _this$scrollbarYRef$c, _this$scrollbarYRef$c2;\n\n _this.handleWheel(deltaX, deltaY);\n\n (_this$scrollbarXRef$c = _this.scrollbarXRef.current) === null || _this$scrollbarXRef$c === void 0 ? void 0 : (_this$scrollbarXRef$c2 = _this$scrollbarXRef$c.onWheelScroll) === null || _this$scrollbarXRef$c2 === void 0 ? void 0 : _this$scrollbarXRef$c2.call(_this$scrollbarXRef$c, deltaX);\n (_this$scrollbarYRef$c = _this.scrollbarYRef.current) === null || _this$scrollbarYRef$c === void 0 ? void 0 : (_this$scrollbarYRef$c2 = _this$scrollbarYRef$c.onWheelScroll) === null || _this$scrollbarYRef$c2 === void 0 ? void 0 : _this$scrollbarYRef$c2.call(_this$scrollbarYRef$c, deltaY);\n };\n\n _this.setOffsetByAffix = function () {\n var _this$headerWrapperRe, _this$tableRef;\n\n var _this$props = _this.props,\n affixHeader = _this$props.affixHeader,\n affixHorizontalScrollbar = _this$props.affixHorizontalScrollbar;\n var headerNode = (_this$headerWrapperRe = _this.headerWrapperRef) === null || _this$headerWrapperRe === void 0 ? void 0 : _this$headerWrapperRe.current;\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHeader) && headerNode) {\n _this.setState(function () {\n return {\n headerOffset: Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getOffset\"])(headerNode)\n };\n });\n }\n\n var tableNode = (_this$tableRef = _this.tableRef) === null || _this$tableRef === void 0 ? void 0 : _this$tableRef.current;\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHorizontalScrollbar) && tableNode) {\n _this.setState(function () {\n return {\n tableOffset: Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getOffset\"])(tableNode)\n };\n });\n }\n };\n\n _this.handleWindowScroll = function () {\n var _this$props2 = _this.props,\n affixHeader = _this$props2.affixHeader,\n affixHorizontalScrollbar = _this$props2.affixHorizontalScrollbar;\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHeader)) {\n _this.affixTableHeader();\n }\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHorizontalScrollbar)) {\n _this.affixHorizontalScrollbar();\n }\n };\n\n _this.affixHorizontalScrollbar = function () {\n var _this$scrollbarXRef, _this$scrollbarXRef$c3, _this$scrollbarXRef$c4;\n\n var scrollY = window.scrollY || window.pageYOffset;\n var windowHeight = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getHeight\"])(window);\n\n var height = _this.getTableHeight();\n\n var _this$state = _this.state,\n tableOffset = _this$state.tableOffset,\n fixedHorizontalScrollbar = _this$state.fixedHorizontalScrollbar;\n var affixHorizontalScrollbar = _this.props.affixHorizontalScrollbar;\n\n var headerHeight = _this.getTableHeaderHeight();\n\n var bottom = typeof affixHorizontalScrollbar === 'number' ? affixHorizontalScrollbar : 0;\n var fixedScrollbar = scrollY + windowHeight < height + (tableOffset.top + bottom) && scrollY + windowHeight - headerHeight > tableOffset.top + bottom;\n\n if ((_this$scrollbarXRef = _this.scrollbarXRef) !== null && _this$scrollbarXRef !== void 0 && (_this$scrollbarXRef$c3 = _this$scrollbarXRef.current) !== null && _this$scrollbarXRef$c3 !== void 0 && (_this$scrollbarXRef$c4 = _this$scrollbarXRef$c3.barRef) !== null && _this$scrollbarXRef$c4 !== void 0 && _this$scrollbarXRef$c4.current && fixedHorizontalScrollbar !== fixedScrollbar) {\n _this.setState({\n fixedHorizontalScrollbar: fixedScrollbar\n });\n }\n };\n\n _this.affixTableHeader = function () {\n var affixHeader = _this.props.affixHeader;\n var top = typeof affixHeader === 'number' ? affixHeader : 0;\n var _this$state2 = _this.state,\n headerOffset = _this$state2.headerOffset,\n contentHeight = _this$state2.contentHeight;\n var scrollY = window.scrollY || window.pageYOffset;\n var fixedHeader = scrollY - (headerOffset.top - top) >= 0 && scrollY < headerOffset.top - top + contentHeight;\n\n if (_this.affixHeaderWrapperRef.current) {\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"toggleClass\"])(_this.affixHeaderWrapperRef.current, 'fixed', fixedHeader);\n }\n };\n\n _this.handleSortColumn = function (dataKey) {\n var _this$props$onSortCol, _this$props3;\n\n var sortType = _this.getSortType();\n\n if (_this.props.sortColumn === dataKey) {\n sortType = sortType === SORT_TYPE.ASC ? SORT_TYPE.DESC : SORT_TYPE.ASC;\n\n _this.setState({\n sortType: sortType\n });\n }\n\n (_this$props$onSortCol = (_this$props3 = _this.props).onSortColumn) === null || _this$props$onSortCol === void 0 ? void 0 : _this$props$onSortCol.call(_this$props3, dataKey, sortType);\n };\n\n _this.handleColumnResizeEnd = function (columnWidth, _cursorDelta, dataKey, index) {\n var _this$setState;\n\n _this._cacheCells = null;\n\n _this.setState((_this$setState = {\n isColumnResizing: false\n }, _this$setState[dataKey + \"_\" + index + \"_width\"] = columnWidth, _this$setState));\n\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(_this.mouseAreaRef.current, {\n display: 'none'\n });\n };\n\n _this.handleColumnResizeStart = function (width, left, fixed) {\n _this.setState({\n isColumnResizing: true\n });\n\n _this.handleColumnResizeMove(width, left, fixed);\n };\n\n _this.handleColumnResizeMove = function (width, left, fixed) {\n var _addStyle;\n\n var mouseAreaLeft = width + left;\n var x = mouseAreaLeft;\n var dir = 'left';\n\n if (_this.isRTL()) {\n mouseAreaLeft += _this.minScrollX + _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"];\n dir = 'right';\n }\n\n if (!fixed) {\n x = mouseAreaLeft + (_this.isRTL() ? -_this.scrollX : _this.scrollX);\n }\n\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(_this.mouseAreaRef.current, (_addStyle = {\n display: 'block'\n }, _addStyle[dir] = x + \"px\", _addStyle));\n };\n\n _this.handleTreeToggle = function (rowKey, _rowIndex, rowData) {\n var _this$props$onExpandC, _this$props4;\n\n var expandedRowKeys = _this.getExpandedRowKeys();\n\n var open = false;\n var nextExpandedRowKeys = [];\n\n for (var i = 0; i < expandedRowKeys.length; i++) {\n var _key = expandedRowKeys[i];\n\n if (_key === rowKey) {\n open = true;\n } else {\n nextExpandedRowKeys.push(_key);\n }\n }\n\n if (!open) {\n nextExpandedRowKeys.push(rowKey);\n }\n\n _this.setState({\n expandedRowKeys: nextExpandedRowKeys\n });\n\n (_this$props$onExpandC = (_this$props4 = _this.props).onExpandChange) === null || _this$props$onExpandC === void 0 ? void 0 : _this$props$onExpandC.call(_this$props4, !open, rowData);\n };\n\n _this.handleScrollX = function (delta) {\n _this.handleWheel(delta, 0);\n };\n\n _this.handleScrollY = function (delta) {\n _this.handleWheel(0, delta);\n };\n\n _this.handleWheel = function (deltaX, deltaY) {\n var _this$props5 = _this.props,\n onScroll = _this$props5.onScroll,\n virtualized = _this$props5.virtualized;\n var _this$state3 = _this.state,\n contentWidth = _this$state3.contentWidth,\n width = _this$state3.width;\n\n if (!_this.tableRef.current) {\n return;\n }\n\n var nextScrollX = contentWidth <= width ? 0 : _this.scrollX - deltaX;\n var nextScrollY = _this.scrollY - deltaY;\n _this.scrollY = Math.min(0, nextScrollY < _this.minScrollY ? _this.minScrollY : nextScrollY);\n _this.scrollX = Math.min(0, nextScrollX < _this.minScrollX ? _this.minScrollX : nextScrollX);\n\n _this.updatePosition();\n\n onScroll === null || onScroll === void 0 ? void 0 : onScroll(_this.scrollX, _this.scrollY);\n\n if (virtualized) {\n _this.setState({\n isScrolling: true,\n scrollY: _this.scrollY\n });\n\n if (_this.disableEventsTimeoutId) {\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"cancelAnimationTimeout\"])(_this.disableEventsTimeoutId);\n }\n\n _this.disableEventsTimeoutId = Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"requestAnimationTimeout\"])(_this.debounceScrollEndedCallback, 150);\n }\n };\n\n _this.debounceScrollEndedCallback = function () {\n _this.disableEventsTimeoutId = null;\n\n _this.setState({\n isScrolling: false\n });\n };\n\n _this.handleTouchStart = function (event) {\n var _this$props$onTouchSt, _this$props6;\n\n if (event.touches) {\n var _event$touches$ = event.touches[0],\n pageX = _event$touches$.pageX,\n pageY = _event$touches$.pageY;\n _this.touchX = pageX;\n _this.touchY = pageY;\n }\n\n (_this$props$onTouchSt = (_this$props6 = _this.props).onTouchStart) === null || _this$props$onTouchSt === void 0 ? void 0 : _this$props$onTouchSt.call(_this$props6, event);\n };\n\n _this.handleTouchMove = function (event) {\n var _this$props$onTouchMo, _this$props7;\n\n var autoHeight = _this.props.autoHeight;\n\n if (event.touches) {\n var _event$preventDefault, _this$scrollbarXRef$c5, _this$scrollbarXRef$c6, _this$scrollbarYRef$c3, _this$scrollbarYRef$c4;\n\n var _event$touches$2 = event.touches[0],\n pageX = _event$touches$2.pageX,\n pageY = _event$touches$2.pageY;\n var deltaX = _this.touchX - pageX;\n var deltaY = autoHeight ? 0 : _this.touchY - pageY;\n\n if (!_this.shouldHandleWheelY(deltaY) && !_this.shouldHandleWheelX(deltaX)) {\n return;\n }\n\n (_event$preventDefault = event.preventDefault) === null || _event$preventDefault === void 0 ? void 0 : _event$preventDefault.call(event);\n\n _this.handleWheel(deltaX, deltaY);\n\n (_this$scrollbarXRef$c5 = _this.scrollbarXRef.current) === null || _this$scrollbarXRef$c5 === void 0 ? void 0 : (_this$scrollbarXRef$c6 = _this$scrollbarXRef$c5.onWheelScroll) === null || _this$scrollbarXRef$c6 === void 0 ? void 0 : _this$scrollbarXRef$c6.call(_this$scrollbarXRef$c5, deltaX);\n (_this$scrollbarYRef$c3 = _this.scrollbarYRef.current) === null || _this$scrollbarYRef$c3 === void 0 ? void 0 : (_this$scrollbarYRef$c4 = _this$scrollbarYRef$c3.onWheelScroll) === null || _this$scrollbarYRef$c4 === void 0 ? void 0 : _this$scrollbarYRef$c4.call(_this$scrollbarYRef$c3, deltaY);\n _this.touchX = pageX;\n _this.touchY = pageY;\n }\n\n (_this$props$onTouchMo = (_this$props7 = _this.props).onTouchMove) === null || _this$props$onTouchMo === void 0 ? void 0 : _this$props$onTouchMo.call(_this$props7, event);\n };\n\n _this.handleBodyScroll = function (event) {\n if (event.target !== _this.tableBodyRef.current) {\n return;\n }\n\n var left = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"scrollLeft\"])(event.target);\n var top = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"scrollTop\"])(event.target);\n\n if (top === 0 && left === 0) {\n return;\n }\n\n _this.listenWheel(left, top);\n\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"scrollLeft\"])(event.target, 0);\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"scrollTop\"])(event.target, 0);\n };\n\n _this.shouldHandleWheelX = function (delta) {\n var _this$props8 = _this.props,\n disabledScroll = _this$props8.disabledScroll,\n loading = _this$props8.loading;\n\n if (delta === 0 || disabledScroll || loading) {\n return false;\n }\n\n return true;\n };\n\n _this.shouldHandleWheelY = function (delta) {\n var _this$props9 = _this.props,\n disabledScroll = _this$props9.disabledScroll,\n loading = _this$props9.loading;\n\n if (delta === 0 || disabledScroll || loading) {\n return false;\n }\n\n return delta >= 0 && _this.scrollY > _this.minScrollY || delta < 0 && _this.scrollY < 0;\n };\n\n _this.addPrefix = function (name) {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"prefix\"])(_this.props.classPrefix)(name);\n };\n\n _this.calculateTableWidth = function () {\n var _this$tableRef2;\n\n var table = (_this$tableRef2 = _this.tableRef) === null || _this$tableRef2 === void 0 ? void 0 : _this$tableRef2.current;\n var width = _this.state.width;\n\n if (table) {\n var nextWidth = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getWidth\"])(table);\n\n if (width !== nextWidth) {\n var _this$scrollbarXRef2, _this$scrollbarXRef2$;\n\n _this.scrollX = 0;\n (_this$scrollbarXRef2 = _this.scrollbarXRef) === null || _this$scrollbarXRef2 === void 0 ? void 0 : (_this$scrollbarXRef2$ = _this$scrollbarXRef2.current) === null || _this$scrollbarXRef2$ === void 0 ? void 0 : _this$scrollbarXRef2$.resetScrollBarPosition();\n }\n\n _this._cacheCells = null;\n\n _this.setState({\n width: nextWidth\n });\n }\n\n _this.setOffsetByAffix();\n };\n\n _this.scrollTop = function (top) {\n var _this$scrollbarYRef, _this$scrollbarYRef$c5, _this$scrollbarYRef$c6;\n\n if (top === void 0) {\n top = 0;\n }\n\n var _this$getControlledSc = _this.getControlledScrollTopValue(top),\n scrollY = _this$getControlledSc[0],\n handleScrollY = _this$getControlledSc[1];\n\n _this.scrollY = scrollY;\n (_this$scrollbarYRef = _this.scrollbarYRef) === null || _this$scrollbarYRef === void 0 ? void 0 : (_this$scrollbarYRef$c5 = _this$scrollbarYRef.current) === null || _this$scrollbarYRef$c5 === void 0 ? void 0 : (_this$scrollbarYRef$c6 = _this$scrollbarYRef$c5.resetScrollBarPosition) === null || _this$scrollbarYRef$c6 === void 0 ? void 0 : _this$scrollbarYRef$c6.call(_this$scrollbarYRef$c5, handleScrollY);\n\n _this.updatePosition();\n /**\n * 当开启 virtualized,调用 scrollTop 后会出现白屏现象,\n * 原因是直接操作 DOM 的坐标,但是组件没有重新渲染,需要调用 forceUpdate 重新进入 render。\n * Fix: rsuite#1044\n */\n\n\n if (_this.props.virtualized && _this.state.contentHeight > _this.props.height) {\n _this.forceUpdate();\n }\n };\n\n _this.scrollLeft = function (left) {\n var _this$scrollbarXRef3, _this$scrollbarXRef3$, _this$scrollbarXRef3$2;\n\n if (left === void 0) {\n left = 0;\n }\n\n var _this$getControlledSc2 = _this.getControlledScrollLeftValue(left),\n scrollX = _this$getControlledSc2[0],\n handleScrollX = _this$getControlledSc2[1];\n\n _this.scrollX = scrollX;\n (_this$scrollbarXRef3 = _this.scrollbarXRef) === null || _this$scrollbarXRef3 === void 0 ? void 0 : (_this$scrollbarXRef3$ = _this$scrollbarXRef3.current) === null || _this$scrollbarXRef3$ === void 0 ? void 0 : (_this$scrollbarXRef3$2 = _this$scrollbarXRef3$.resetScrollBarPosition) === null || _this$scrollbarXRef3$2 === void 0 ? void 0 : _this$scrollbarXRef3$2.call(_this$scrollbarXRef3$, handleScrollX);\n\n _this.updatePosition();\n };\n\n _this.scrollTo = function (coord) {\n var _ref = coord || {},\n x = _ref.x,\n y = _ref.y;\n\n if (typeof x === 'number') {\n _this.scrollLeft(x);\n }\n\n if (typeof y === 'number') {\n _this.scrollTop(y);\n }\n };\n\n _this.bindTableRowsRef = function (index, rowData) {\n return function (ref) {\n if (ref) {\n _this.tableRows[index] = [ref, rowData];\n }\n };\n };\n\n _this.bindRowClick = function (rowData) {\n return function (event) {\n var _this$props$onRowClic, _this$props10;\n\n (_this$props$onRowClic = (_this$props10 = _this.props).onRowClick) === null || _this$props$onRowClic === void 0 ? void 0 : _this$props$onRowClic.call(_this$props10, rowData, event);\n };\n };\n\n _this.bindRowContextMenu = function (rowData) {\n return function (event) {\n var _this$props$onRowCont, _this$props11;\n\n (_this$props$onRowCont = (_this$props11 = _this.props).onRowContextMenu) === null || _this$props$onRowCont === void 0 ? void 0 : _this$props$onRowCont.call(_this$props11, rowData, event);\n };\n };\n\n var _width = props.width,\n data = props.data,\n _rowKey = props.rowKey,\n defaultExpandAllRows = props.defaultExpandAllRows,\n renderRowExpanded = props.renderRowExpanded,\n defaultExpandedRowKeys = props.defaultExpandedRowKeys,\n _props$children = props.children,\n children = _props$children === void 0 ? [] : _props$children,\n isTree = props.isTree,\n defaultSortType = props.defaultSortType;\n\n var _expandedRowKeys = defaultExpandAllRows ? Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"findRowKeys\"])(data, _rowKey, lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default()(renderRowExpanded)) : defaultExpandedRowKeys || [];\n\n var shouldFixedColumn = Array.from(lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(children)).some(function (child) {\n return child && child.props && child.props.fixed;\n });\n\n if (isTree && !_rowKey) {\n throw new Error('The `rowKey` is required when set isTree');\n }\n\n _this.state = {\n isTree: isTree,\n expandedRowKeys: _expandedRowKeys,\n shouldFixedColumn: shouldFixedColumn,\n cacheData: data,\n data: isTree ? Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"flattenData\"])(data) : data,\n width: _width || 0,\n columnWidth: 0,\n dataKey: 0,\n contentHeight: 0,\n contentWidth: 0,\n tableRowsMaxHeight: [],\n sortType: defaultSortType,\n scrollY: 0,\n isScrolling: false,\n fixedHeader: false\n };\n _this.scrollY = 0;\n _this.scrollX = 0;\n _this.wheelHandler = new dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"WheelHandler\"](_this.listenWheel, _this.shouldHandleWheelX, _this.shouldHandleWheelY, false);\n _this._cacheChildrenSize = lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(children).length;\n _this.translateDOMPositionXY = Object(dom_lib_lib_transition_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_14__[\"getTranslateDOMPositionXY\"])({\n enable3DTransform: props.translate3d\n });\n _this.tableRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.scrollbarYRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.scrollbarXRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.tableBodyRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.affixHeaderWrapperRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.mouseAreaRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.headerWrapperRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.wheelWrapperRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.tableHeaderRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n return _this;\n }\n\n var _proto = Table.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this$props13, _this$props13$bodyRef;\n\n this.calculateTableWidth();\n this.calculateTableContextHeight();\n this.calculateRowMaxHeight();\n this.setOffsetByAffix();\n this.initPosition();\n element_resize_event__WEBPACK_IMPORTED_MODULE_13___default()(this.tableRef.current, lodash_debounce__WEBPACK_IMPORTED_MODULE_8___default()(this.calculateTableWidth, 400));\n var options = {\n passive: false\n };\n var tableBody = this.tableBodyRef.current;\n\n if (tableBody) {\n this.wheelListener = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"on\"])(tableBody, 'wheel', this.wheelHandler.onWheel, options);\n this.touchStartListener = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"on\"])(tableBody, 'touchstart', this.handleTouchStart, options);\n this.touchMoveListener = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"on\"])(tableBody, 'touchmove', this.handleTouchMove, options);\n }\n\n var _this$props12 = this.props,\n affixHeader = _this$props12.affixHeader,\n affixHorizontalScrollbar = _this$props12.affixHorizontalScrollbar;\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHeader) || Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHorizontalScrollbar)) {\n this.scrollListener = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"on\"])(window, 'scroll', this.handleWindowScroll);\n }\n\n (_this$props13 = this.props) === null || _this$props13 === void 0 ? void 0 : (_this$props13$bodyRef = _this$props13.bodyRef) === null || _this$props13$bodyRef === void 0 ? void 0 : _this$props13$bodyRef.call(_this$props13, this.wheelWrapperRef.current);\n };\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) {\n var _cacheChildrenSize = lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(nextProps.children || []).length;\n /**\n * 单元格列的信息在初始化后会被缓存,在某些属性被更新以后,需要清除缓存。\n */\n\n if (_cacheChildrenSize !== this._cacheChildrenSize) {\n this._cacheChildrenSize = _cacheChildrenSize;\n this._cacheCells = null;\n } else if (this.props.children !== nextProps.children || this.props.sortColumn !== nextProps.sortColumn || this.props.sortType !== nextProps.sortType) {\n this._cacheCells = null;\n }\n\n return !lodash_eq__WEBPACK_IMPORTED_MODULE_10___default()(this.props, nextProps) || !lodash_isEqual__WEBPACK_IMPORTED_MODULE_9___default()(this.state, nextState);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n var rowHeight = prevProps.rowHeight,\n data = prevProps.data,\n height = prevProps.height;\n\n if (data !== this.props.data) {\n var _this$props$onDataUpd, _this$props14;\n\n this.calculateRowMaxHeight();\n (_this$props$onDataUpd = (_this$props14 = this.props).onDataUpdated) === null || _this$props$onDataUpd === void 0 ? void 0 : _this$props$onDataUpd.call(_this$props14, this.props.data, this.scrollTo);\n var maxHeight = this.props.data.length * (typeof rowHeight === 'function' ? rowHeight(null) : rowHeight); // 当开启允许更新滚动条,或者滚动条位置大于表格的最大高度,则初始滚动条位置\n\n if (this.props.shouldUpdateScroll || Math.abs(this.scrollY) > maxHeight) {\n this.scrollTo({\n x: 0,\n y: 0\n });\n }\n } else {\n this.updatePosition();\n }\n\n if ( // 当 Table 的 data 发生变化,需要重新计算高度\n data !== this.props.data || // 当 Table 的 height 属性发生变化,需要重新计算 Table 高度\n height !== this.props.height || // 当 Table 内容区的高度发生变化需要重新计算\n prevState.contentHeight !== this.state.contentHeight || // 当 expandedRowKeys 发生变化,需要重新计算 Table 高度,如果重算会导致滚动条不显示。\n prevState.expandedRowKeys !== this.state.expandedRowKeys || prevProps.expandedRowKeys !== this.props.expandedRowKeys) {\n this.calculateTableContextHeight(prevProps);\n }\n\n this.calculateTableContentWidth(prevProps);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var _this$wheelListener, _this$touchStartListe, _this$touchMoveListen, _this$scrollListener;\n\n this.wheelHandler = null;\n\n if (this.tableRef.current) {\n Object(element_resize_event__WEBPACK_IMPORTED_MODULE_13__[\"unbind\"])(this.tableRef.current);\n }\n\n (_this$wheelListener = this.wheelListener) === null || _this$wheelListener === void 0 ? void 0 : _this$wheelListener.off();\n (_this$touchStartListe = this.touchStartListener) === null || _this$touchStartListe === void 0 ? void 0 : _this$touchStartListe.off();\n (_this$touchMoveListen = this.touchMoveListener) === null || _this$touchMoveListen === void 0 ? void 0 : _this$touchMoveListen.off();\n (_this$scrollListener = this.scrollListener) === null || _this$scrollListener === void 0 ? void 0 : _this$scrollListener.off();\n };\n\n _proto.getExpandedRowKeys = function getExpandedRowKeys() {\n var expandedRowKeys = this.props.expandedRowKeys;\n return typeof expandedRowKeys === 'undefined' ? this.state.expandedRowKeys : expandedRowKeys;\n };\n\n _proto.getSortType = function getSortType() {\n var sortType = this.props.sortType;\n return typeof sortType === 'undefined' ? this.state.sortType : sortType;\n };\n\n _proto.getScrollCellGroups = function getScrollCellGroups() {\n var _this$tableRef$curren;\n\n return (_this$tableRef$curren = this.tableRef.current) === null || _this$tableRef$curren === void 0 ? void 0 : _this$tableRef$curren.querySelectorAll(\".\" + this.addPrefix('cell-group-scroll'));\n };\n\n _proto.getFixedLeftCellGroups = function getFixedLeftCellGroups() {\n var _this$tableRef$curren2;\n\n return (_this$tableRef$curren2 = this.tableRef.current) === null || _this$tableRef$curren2 === void 0 ? void 0 : _this$tableRef$curren2.querySelectorAll(\".\" + this.addPrefix('cell-group-fixed-left'));\n };\n\n _proto.getFixedRightCellGroups = function getFixedRightCellGroups() {\n var _this$tableRef$curren3;\n\n return (_this$tableRef$curren3 = this.tableRef.current) === null || _this$tableRef$curren3 === void 0 ? void 0 : _this$tableRef$curren3.querySelectorAll(\".\" + this.addPrefix('cell-group-fixed-right'));\n };\n\n _proto.isRTL = function isRTL() {\n return this.props.rtl || Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isRTL\"])();\n };\n\n _proto.getRowHeight = function getRowHeight(rowData) {\n if (rowData === void 0) {\n rowData = {};\n }\n\n var rowHeight = this.props.rowHeight;\n return typeof rowHeight === 'function' ? rowHeight(rowData) : rowHeight;\n }\n /**\n * 获取表头高度\n */\n ;\n\n _proto.getTableHeaderHeight = function getTableHeaderHeight() {\n var _this$props15 = this.props,\n headerHeight = _this$props15.headerHeight,\n showHeader = _this$props15.showHeader;\n return showHeader ? headerHeight : 0;\n }\n /**\n * 获取 Table 需要渲染的高度\n */\n ;\n\n _proto.getTableHeight = function getTableHeight() {\n var contentHeight = this.state.contentHeight;\n var _this$props16 = this.props,\n minHeight = _this$props16.minHeight,\n height = _this$props16.height,\n autoHeight = _this$props16.autoHeight,\n data = _this$props16.data;\n var headerHeight = this.getTableHeaderHeight();\n\n if (data.length === 0 && autoHeight) {\n return height;\n }\n\n return autoHeight ? Math.max(headerHeight + contentHeight, minHeight) : height;\n }\n /**\n * 获取 columns ReactElement 数组\n * - 处理 children 中存在 <Column> 数组的情况\n * - 过滤 children 中的空项\n */\n ;\n\n _proto.getTableColumns = function getTableColumns(children) {\n if (!Array.isArray(children)) {\n if (Object(react_is__WEBPACK_IMPORTED_MODULE_23__[\"isFragment\"])(children)) {\n return this.getTableColumns(children.props.children);\n }\n\n return children;\n }\n\n var flattenColumns = lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(children).map(function (column) {\n if ((column === null || column === void 0 ? void 0 : column.type) === _ColumnGroup__WEBPACK_IMPORTED_MODULE_22__[\"default\"]) {\n var _column$props = column === null || column === void 0 ? void 0 : column.props,\n header = _column$props.header,\n childColumns = _column$props.children,\n align = _column$props.align,\n fixed = _column$props.fixed,\n verticalAlign = _column$props.verticalAlign;\n\n return childColumns.map(function (childColumn, index) {\n // 把 ColumnGroup 设置的属性覆盖到 Column\n var groupCellProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, childColumn === null || childColumn === void 0 ? void 0 : childColumn.props, {\n align: align,\n fixed: fixed,\n verticalAlign: verticalAlign\n });\n /**\n * 为分组中的第一列设置属性:\n * groupCount: 分组子项个数\n * groupHeader: 分组标题\n * resizable: 设置为不可自定义列宽\n */\n\n\n if (index === 0) {\n groupCellProps.groupCount = childColumns.length;\n groupCellProps.groupHeader = header;\n groupCellProps.resizable = false;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](childColumn, groupCellProps);\n });\n }\n\n return column;\n }); // 把 Columns 中的数组,展平为一维数组,计算 lastColumn 与 firstColumn。\n\n return lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(flattenColumns).filter(function (col) {\n return col;\n });\n };\n\n _proto.getCellDescriptor = function getCellDescriptor() {\n var _this2 = this;\n\n if (this._cacheCells) {\n return this._cacheCells;\n }\n\n var hasCustomTreeCol = false;\n var left = 0; // Cell left margin\n\n var headerCells = []; // Table header cell\n\n var bodyCells = []; // Table body cell\n\n var children = this.props.children;\n\n if (!children) {\n this._cacheCells = {\n headerCells: headerCells,\n bodyCells: bodyCells,\n hasCustomTreeCol: hasCustomTreeCol,\n allColumnsWidth: left\n };\n return this._cacheCells;\n }\n\n var columns = this.getTableColumns(children);\n var tableWidth = this.state.width;\n var _this$props17 = this.props,\n sortColumn = _this$props17.sortColumn,\n rowHeight = _this$props17.rowHeight,\n showHeader = _this$props17.showHeader;\n\n var _getTotalByColumns = Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"getTotalByColumns\"])(columns),\n totalFlexGrow = _getTotalByColumns.totalFlexGrow,\n totalWidth = _getTotalByColumns.totalWidth;\n\n var headerHeight = this.getTableHeaderHeight();\n react__WEBPACK_IMPORTED_MODULE_3__[\"Children\"].forEach(columns, function (column, index) {\n if ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"isValidElement\"](column)) {\n var columnChildren = column.props.children;\n var _column$props2 = column.props,\n width = _column$props2.width,\n resizable = _column$props2.resizable,\n flexGrow = _column$props2.flexGrow,\n minWidth = _column$props2.minWidth,\n onResize = _column$props2.onResize,\n treeCol = _column$props2.treeCol;\n\n if (treeCol) {\n hasCustomTreeCol = true;\n }\n\n if (resizable && flexGrow) {\n console.warn(\"Cannot set 'resizable' and 'flexGrow' together in <Column>, column index: \" + index);\n }\n\n if (columnChildren.length !== 2) {\n throw new Error(\"Component <HeaderCell> and <Cell> is required, column index: \" + index + \" \");\n }\n\n var nextWidth = _this2.state[columnChildren[1].props.dataKey + \"_\" + index + \"_width\"] || width || 0;\n\n if (tableWidth && flexGrow && totalFlexGrow) {\n nextWidth = Math.max((tableWidth - totalWidth) / totalFlexGrow * flexGrow, minWidth || 60);\n }\n\n var cellProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, lodash_omit__WEBPACK_IMPORTED_MODULE_11___default()(column.props, ['children']), {\n 'aria-colindex': index + 1,\n left: left,\n headerHeight: headerHeight,\n key: index,\n width: nextWidth,\n height: rowHeight,\n firstColumn: index === 0,\n lastColumn: index === columns.length - 1\n });\n\n if (showHeader && headerHeight) {\n var headerCellProps = {\n // index 用于拖拽列宽时候(Resizable column),定义的序号\n index: index,\n dataKey: columnChildren[1].props.dataKey,\n isHeaderCell: true,\n sortable: column.props.sortable,\n onSortColumn: _this2.handleSortColumn,\n sortType: _this2.getSortType(),\n sortColumn: sortColumn,\n flexGrow: flexGrow\n };\n\n if (resizable) {\n lodash_merge__WEBPACK_IMPORTED_MODULE_12___default()(headerCellProps, {\n onResize: onResize,\n onColumnResizeEnd: _this2.handleColumnResizeEnd,\n onColumnResizeStart: _this2.handleColumnResizeStart,\n onColumnResizeMove: _this2.handleColumnResizeMove\n });\n }\n\n headerCells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](columnChildren[0], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, cellProps, headerCellProps)));\n }\n\n bodyCells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](columnChildren[1], cellProps));\n left += nextWidth;\n }\n });\n return this._cacheCells = {\n headerCells: headerCells,\n bodyCells: bodyCells,\n allColumnsWidth: left,\n hasCustomTreeCol: hasCustomTreeCol\n };\n };\n\n _proto.initPosition = function initPosition() {\n var _this3 = this;\n\n if (this.isRTL()) {\n setTimeout(function () {\n var _this3$scrollbarXRef, _this3$scrollbarXRef$, _this3$scrollbarXRef$2;\n\n var _this3$state = _this3.state,\n contentWidth = _this3$state.contentWidth,\n width = _this3$state.width;\n _this3.scrollX = width - contentWidth - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"];\n\n _this3.updatePosition();\n\n (_this3$scrollbarXRef = _this3.scrollbarXRef) === null || _this3$scrollbarXRef === void 0 ? void 0 : (_this3$scrollbarXRef$ = _this3$scrollbarXRef.current) === null || _this3$scrollbarXRef$ === void 0 ? void 0 : (_this3$scrollbarXRef$2 = _this3$scrollbarXRef$.resetScrollBarPosition) === null || _this3$scrollbarXRef$2 === void 0 ? void 0 : _this3$scrollbarXRef$2.call(_this3$scrollbarXRef$, -_this3.scrollX);\n }, 0);\n }\n };\n\n _proto.updatePosition = function updatePosition() {\n var _this$tableHeaderRef;\n\n /**\n * 当存在锁定列情况处理\n */\n if (this.state.shouldFixedColumn) {\n this.updatePositionByFixedCell();\n } else {\n var _this$wheelWrapperRef, _this$headerWrapperRe2, _this$affixHeaderWrap, _affixHeaderElement$h;\n\n var wheelStyle = {};\n var headerStyle = {};\n this.translateDOMPositionXY(wheelStyle, this.scrollX, this.scrollY);\n this.translateDOMPositionXY(headerStyle, this.scrollX, 0);\n var wheelElement = (_this$wheelWrapperRef = this.wheelWrapperRef) === null || _this$wheelWrapperRef === void 0 ? void 0 : _this$wheelWrapperRef.current;\n var headerElement = (_this$headerWrapperRe2 = this.headerWrapperRef) === null || _this$headerWrapperRe2 === void 0 ? void 0 : _this$headerWrapperRe2.current;\n var affixHeaderElement = (_this$affixHeaderWrap = this.affixHeaderWrapperRef) === null || _this$affixHeaderWrap === void 0 ? void 0 : _this$affixHeaderWrap.current;\n wheelElement && Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(wheelElement, wheelStyle);\n headerElement && Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(headerElement, headerStyle);\n\n if (affixHeaderElement !== null && affixHeaderElement !== void 0 && (_affixHeaderElement$h = affixHeaderElement.hasChildNodes) !== null && _affixHeaderElement$h !== void 0 && _affixHeaderElement$h.call(affixHeaderElement)) {\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(affixHeaderElement.firstChild, headerStyle);\n }\n }\n\n if ((_this$tableHeaderRef = this.tableHeaderRef) !== null && _this$tableHeaderRef !== void 0 && _this$tableHeaderRef.current) {\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"toggleClass\"])(this.tableHeaderRef.current, this.addPrefix('cell-group-shadow'), this.scrollY < 0);\n }\n };\n\n _proto.updatePositionByFixedCell = function updatePositionByFixedCell() {\n var _this$wheelWrapperRef2;\n\n var wheelGroupStyle = {};\n var wheelStyle = {};\n var scrollGroups = this.getScrollCellGroups();\n var fixedLeftGroups = this.getFixedLeftCellGroups();\n var fixedRightGroups = this.getFixedRightCellGroups();\n var _this$state4 = this.state,\n contentWidth = _this$state4.contentWidth,\n width = _this$state4.width;\n this.translateDOMPositionXY(wheelGroupStyle, this.scrollX, 0);\n this.translateDOMPositionXY(wheelStyle, 0, this.scrollY);\n var scrollArrayGroups = Array.from(scrollGroups);\n\n for (var i = 0; i < scrollArrayGroups.length; i++) {\n var group = scrollArrayGroups[i];\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(group, wheelGroupStyle);\n }\n\n if ((_this$wheelWrapperRef2 = this.wheelWrapperRef) !== null && _this$wheelWrapperRef2 !== void 0 && _this$wheelWrapperRef2.current) {\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(this.wheelWrapperRef.current, wheelStyle);\n }\n\n var leftShadowClassName = this.addPrefix('cell-group-left-shadow');\n var rightShadowClassName = this.addPrefix('cell-group-right-shadow');\n var showLeftShadow = this.scrollX < 0;\n var showRightShadow = width - contentWidth - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"] !== this.scrollX;\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"toggleClass\"])(fixedLeftGroups, leftShadowClassName, showLeftShadow);\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"toggleClass\"])(fixedRightGroups, rightShadowClassName, showRightShadow);\n };\n\n _proto.shouldRenderExpandedRow = function shouldRenderExpandedRow(rowData) {\n var _this$props18 = this.props,\n rowKey = _this$props18.rowKey,\n renderRowExpanded = _this$props18.renderRowExpanded,\n isTree = _this$props18.isTree;\n var expandedRowKeys = this.getExpandedRowKeys() || [];\n return lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default()(renderRowExpanded) && !isTree && expandedRowKeys.some(function (key) {\n return key === rowData[rowKey];\n });\n };\n\n _proto.calculateRowMaxHeight = function calculateRowMaxHeight() {\n var wordWrap = this.props.wordWrap;\n\n if (wordWrap) {\n var tableRowsMaxHeight = [];\n var tableRows = Object.values(this.tableRows);\n\n for (var i = 0; i < tableRows.length; i++) {\n var _tableRows$i = tableRows[i],\n row = _tableRows$i[0];\n\n if (row) {\n var cells = row.querySelectorAll(\".\" + this.addPrefix('cell-wrap')) || [];\n var cellArray = Array.from(cells);\n var maxHeight = 0;\n\n for (var j = 0; j < cellArray.length; j++) {\n var cell = cellArray[j];\n var h = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getHeight\"])(cell);\n maxHeight = Math.max(maxHeight, h);\n }\n\n tableRowsMaxHeight.push(maxHeight);\n }\n }\n\n this.setState({\n tableRowsMaxHeight: tableRowsMaxHeight\n });\n }\n };\n\n _proto.calculateTableContentWidth = function calculateTableContentWidth(prevProps) {\n var _this$tableRef3;\n\n var table = (_this$tableRef3 = this.tableRef) === null || _this$tableRef3 === void 0 ? void 0 : _this$tableRef3.current;\n var row = table.querySelector(\".\" + this.addPrefix('row') + \":not(.virtualized)\");\n var contentWidth = row ? Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getWidth\"])(row) : 0;\n this.setState({\n contentWidth: contentWidth\n }); // 这里 -SCROLLBAR_WIDTH 是为了让滚动条不挡住内容部分\n\n this.minScrollX = -(contentWidth - this.state.width) - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"];\n /**\n * 1.判断 Table 列数是否发生变化\n * 2.判断 Table 内容区域是否宽度有变化\n *\n * 满足 1 和 2 则更新横向滚动条位置\n */\n\n if (lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(this.props.children).length !== lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(prevProps.children).length && this.state.contentWidth !== contentWidth) {\n this.scrollLeft(0);\n }\n };\n\n _proto.calculateTableContextHeight = function calculateTableContextHeight(prevProps) {\n var table = this.tableRef.current;\n var rows = table.querySelectorAll(\".\" + this.addPrefix('row')) || [];\n var _this$props19 = this.props,\n height = _this$props19.height,\n autoHeight = _this$props19.autoHeight,\n rowHeight = _this$props19.rowHeight,\n affixHeader = _this$props19.affixHeader;\n var headerHeight = this.getTableHeaderHeight();\n var contentHeight = rows.length ? Array.from(rows).map(function (row) {\n return Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getHeight\"])(row) || rowHeight;\n }).reduce(function (x, y) {\n return x + y;\n }) : 0; // 当设置 affixHeader 属性后要减掉两个 header 的高度\n\n var nextContentHeight = contentHeight - (affixHeader ? headerHeight * 2 : headerHeight);\n\n if (nextContentHeight !== this.state.contentHeight) {\n this.setState({\n contentHeight: nextContentHeight\n });\n }\n\n if (prevProps && ( // 当 data 更新,或者表格高度更新,则更新滚动条\n prevProps.height !== height || prevProps.data !== this.props.data) && this.scrollY !== 0) {\n this.scrollTop(Math.abs(this.scrollY));\n this.updatePosition();\n }\n\n if (!autoHeight) {\n // 这里 -SCROLLBAR_WIDTH 是为了让滚动条不挡住内容部分\n this.minScrollY = -(contentHeight - height) - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"];\n } // 如果内容区域的高度小于表格的高度,则重置 Y 坐标滚动条\n\n\n if (contentHeight < height) {\n this.scrollTop(0);\n } // 如果 scrollTop 的值大于可以滚动的范围 ,则重置 Y 坐标滚动条\n // 当 Table 为 virtualized 时, wheel 事件触发每次都会进入该逻辑, 避免在滚动到底部后滚动条重置, +SCROLLBAR_WIDTH\n\n\n if (Math.abs(this.scrollY) + height - headerHeight > nextContentHeight + _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]) {\n this.scrollTop(this.scrollY);\n }\n };\n\n _proto.getControlledScrollTopValue = function getControlledScrollTopValue(value) {\n if (this.props.autoHeight) {\n return [0, 0];\n }\n\n var contentHeight = this.state.contentHeight;\n var headerHeight = this.getTableHeaderHeight();\n var height = this.getTableHeight(); // 滚动值的最大范围判断\n\n value = Math.min(value, Math.max(0, contentHeight - (height - headerHeight))); // value 值是表格理论滚动位置的一个值,通过 value 计算出 scrollY 坐标值与滚动条位置的值\n\n return [-value, value / contentHeight * (height - headerHeight)];\n };\n\n _proto.getControlledScrollLeftValue = function getControlledScrollLeftValue(value) {\n var _this$state5 = this.state,\n contentWidth = _this$state5.contentWidth,\n width = _this$state5.width; // 滚动值的最大范围判断\n\n value = Math.min(value, Math.max(0, contentWidth - width));\n return [-value, value / contentWidth * width];\n }\n /**\n * public method\n */\n ;\n\n _proto.renderRowData = function renderRowData(bodyCells, rowData, props, shouldRenderExpandedRow) {\n var _this$props20 = this.props,\n renderTreeToggle = _this$props20.renderTreeToggle,\n rowKey = _this$props20.rowKey,\n wordWrap = _this$props20.wordWrap,\n isTree = _this$props20.isTree;\n var hasChildren = isTree && rowData.children && Array.isArray(rowData.children);\n var nextRowKey = typeof rowData[rowKey] !== 'undefined' ? rowData[rowKey] : props.key;\n\n var rowProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, props, {\n key: nextRowKey,\n 'aria-rowindex': props.key + 2,\n rowRef: this.bindTableRowsRef(props.key, rowData),\n onClick: this.bindRowClick(rowData),\n onContextMenu: this.bindRowContextMenu(rowData)\n });\n\n var expandedRowKeys = this.getExpandedRowKeys() || [];\n var expanded = expandedRowKeys.some(function (key) {\n return key === rowData[rowKey];\n });\n var cells = [];\n\n for (var i = 0; i < bodyCells.length; i++) {\n var cell = bodyCells[i];\n cells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](cell, {\n hasChildren: hasChildren,\n rowData: rowData,\n wordWrap: wordWrap,\n renderTreeToggle: renderTreeToggle,\n height: props.height,\n rowIndex: props.key,\n depth: props.depth,\n onTreeToggle: this.handleTreeToggle,\n rowKey: nextRowKey,\n expanded: expanded\n }));\n }\n\n return this.renderRow(rowProps, cells, shouldRenderExpandedRow, rowData);\n };\n\n _proto.renderRow = function renderRow(props, cells, shouldRenderExpandedRow, rowData) {\n var rowClassName = this.props.rowClassName;\n var _this$state6 = this.state,\n shouldFixedColumn = _this$state6.shouldFixedColumn,\n width = _this$state6.width,\n contentWidth = _this$state6.contentWidth;\n\n var depth = props.depth,\n restRowProps = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"depth\"]);\n\n if (typeof rowClassName === 'function') {\n restRowProps.className = rowClassName(rowData);\n } else {\n restRowProps.className = rowClassName;\n }\n\n var rowStyles = {};\n var rowRight = 0;\n\n if (this.isRTL() && contentWidth > width) {\n rowRight = width - contentWidth;\n rowStyles.right = rowRight;\n } // IF there are fixed columns, add a fixed group\n\n\n if (shouldFixedColumn && contentWidth > width) {\n var fixedLeftCells = [];\n var fixedRightCells = [];\n var scrollCells = [];\n var fixedLeftCellGroupWidth = 0;\n var fixedRightCellGroupWidth = 0;\n\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n var _cell$props = cell.props,\n fixed = _cell$props.fixed,\n _width2 = _cell$props.width;\n var isFixedStart = fixed === 'left' || fixed === true;\n var isFixedEnd = fixed === 'right';\n\n if (this.isRTL()) {\n isFixedStart = fixed === 'right';\n isFixedEnd = fixed === 'left' || fixed === true;\n }\n\n if (isFixedStart) {\n fixedLeftCells.push(cell);\n fixedLeftCellGroupWidth += _width2;\n } else if (isFixedEnd) {\n fixedRightCells.push(cell);\n fixedRightCellGroupWidth += _width2;\n } else {\n scrollCells.push(cell);\n }\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, restRowProps, {\n \"data-depth\": depth,\n style: rowStyles\n }), fixedLeftCellGroupWidth ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n fixed: \"left\",\n height: props.isHeaderRow ? props.headerHeight : props.height,\n width: fixedLeftCellGroupWidth,\n style: this.isRTL() ? {\n right: width - fixedLeftCellGroupWidth - rowRight\n } : null\n }, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"resetLeftForCells\"])(fixedLeftCells))) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], null, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(scrollCells)), fixedRightCellGroupWidth ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n fixed: \"right\",\n style: this.isRTL() ? {\n right: 0 - rowRight\n } : {\n left: width - fixedRightCellGroupWidth - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]\n },\n height: props.isHeaderRow ? props.headerHeight : props.height,\n width: fixedRightCellGroupWidth + _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]\n }, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"resetLeftForCells\"])(fixedRightCells, _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]))) : null, shouldRenderExpandedRow && this.renderRowExpanded(rowData));\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, restRowProps, {\n \"data-depth\": depth,\n style: rowStyles\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], null, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(cells)), shouldRenderExpandedRow && this.renderRowExpanded(rowData));\n };\n\n _proto.renderRowExpanded = function renderRowExpanded(rowData) {\n var _this$props21 = this.props,\n renderRowExpanded = _this$props21.renderRowExpanded,\n rowExpandedHeight = _this$props21.rowExpandedHeight;\n var styles = {\n height: rowExpandedHeight\n };\n\n if (typeof renderRowExpanded === 'function') {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('row-expanded'),\n style: styles\n }, renderRowExpanded(rowData));\n }\n\n return null;\n };\n\n _proto.renderMouseArea = function renderMouseArea() {\n var headerHeight = this.getTableHeaderHeight();\n var styles = {\n height: this.getTableHeight()\n };\n var spanStyles = {\n height: headerHeight - 1\n };\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n ref: this.mouseAreaRef,\n className: this.addPrefix('mouse-area'),\n style: styles\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", {\n style: spanStyles\n }));\n };\n\n _proto.renderTableHeader = function renderTableHeader(headerCells, rowWidth) {\n var affixHeader = this.props.affixHeader;\n var tableWidth = this.state.width;\n var top = typeof affixHeader === 'number' ? affixHeader : 0;\n var headerHeight = this.getTableHeaderHeight();\n var rowProps = {\n 'aria-rowindex': 1,\n rowRef: this.tableHeaderRef,\n width: rowWidth,\n height: this.getRowHeight(),\n headerHeight: headerHeight,\n isHeaderRow: true,\n top: 0\n };\n var fixedStyle = {\n position: 'fixed',\n overflow: 'hidden',\n height: this.getTableHeaderHeight(),\n width: tableWidth,\n top: top\n }; // Affix header\n\n var header = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_5___default()(this.addPrefix('affix-header')),\n style: fixedStyle,\n ref: this.affixHeaderWrapperRef\n }, this.renderRow(rowProps, headerCells));\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_3__[\"Fragment\"], null, (affixHeader === 0 || affixHeader) && header, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n role: \"rowgroup\",\n className: this.addPrefix('header-row-wrapper'),\n ref: this.headerWrapperRef\n }, this.renderRow(rowProps, headerCells)));\n };\n\n _proto.renderTableBody = function renderTableBody(bodyCells, rowWidth) {\n var _this$props22 = this.props,\n rowExpandedHeight = _this$props22.rowExpandedHeight,\n renderRowExpanded = _this$props22.renderRowExpanded,\n isTree = _this$props22.isTree,\n rowKey = _this$props22.rowKey,\n wordWrap = _this$props22.wordWrap,\n virtualized = _this$props22.virtualized,\n rowHeight = _this$props22.rowHeight;\n var headerHeight = this.getTableHeaderHeight();\n var _this$state7 = this.state,\n tableRowsMaxHeight = _this$state7.tableRowsMaxHeight,\n isScrolling = _this$state7.isScrolling,\n data = _this$state7.data;\n var height = this.getTableHeight();\n var bodyHeight = height - headerHeight;\n var bodyStyles = {\n top: headerHeight,\n height: bodyHeight\n };\n var contentHeight = 0;\n var topHideHeight = 0;\n var bottomHideHeight = 0;\n this._visibleRows = [];\n\n if (data) {\n var top = 0; // Row position\n\n var minTop = Math.abs(this.scrollY);\n var maxTop = minTop + height + rowExpandedHeight;\n var isCustomRowHeight = typeof rowHeight === 'function';\n var isUncertainHeight = !!(renderRowExpanded || isCustomRowHeight || isTree);\n /**\n 如果开启了 virtualized 同时 Table 中的的行高是可变的,\n 则需要循环遍历 data, 获取每一行的高度。\n */\n\n if (isUncertainHeight && virtualized || !virtualized) {\n for (var index = 0; index < data.length; index++) {\n var rowData = data[index];\n var maxHeight = tableRowsMaxHeight[index];\n var shouldRenderExpandedRow = this.shouldRenderExpandedRow(rowData);\n var nextRowHeight = 0;\n var depth = 0;\n\n if (typeof rowHeight === 'function') {\n nextRowHeight = rowHeight(rowData);\n } else {\n nextRowHeight = maxHeight ? Math.max(maxHeight + _constants__WEBPACK_IMPORTED_MODULE_20__[\"CELL_PADDING_HEIGHT\"], rowHeight) : rowHeight;\n\n if (shouldRenderExpandedRow) {\n nextRowHeight += rowExpandedHeight;\n }\n }\n\n if (isTree) {\n var parents = Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"findAllParents\"])(rowData, rowKey);\n var expandedRowKeys = this.getExpandedRowKeys();\n depth = parents.length; // 如果是 Tree Table, 判断当前的行是否展开/折叠,如果是折叠则不显示该行。\n\n if (!Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"shouldShowRowByExpanded\"])(expandedRowKeys, parents)) {\n continue;\n }\n }\n\n contentHeight += nextRowHeight;\n var rowProps = {\n key: index,\n top: top,\n width: rowWidth,\n depth: depth,\n height: nextRowHeight\n };\n top += nextRowHeight;\n\n if (virtualized && !wordWrap) {\n if (top + nextRowHeight < minTop) {\n topHideHeight += nextRowHeight;\n continue;\n } else if (top > maxTop) {\n bottomHideHeight += nextRowHeight;\n continue;\n }\n }\n\n this._visibleRows.push(this.renderRowData(bodyCells, rowData, rowProps, shouldRenderExpandedRow));\n }\n } else {\n /**\n 如果 Table 的行高是固定的,则直接通过行高与行数进行计算,\n 减少遍历所有 data 带来的性能消耗\n */\n var _nextRowHeight = this.getRowHeight();\n\n var startIndex = Math.max(Math.floor(minTop / _nextRowHeight), 0);\n var endIndex = Math.min(startIndex + Math.ceil(bodyHeight / _nextRowHeight), data.length);\n contentHeight = data.length * _nextRowHeight;\n topHideHeight = startIndex * _nextRowHeight;\n bottomHideHeight = (data.length - endIndex) * _nextRowHeight;\n\n for (var _index = startIndex; _index < endIndex; _index++) {\n var _rowData = data[_index];\n var _rowProps = {\n key: _index,\n top: _index * _nextRowHeight,\n width: rowWidth,\n height: _nextRowHeight\n };\n\n this._visibleRows.push(this.renderRowData(bodyCells, _rowData, _rowProps, false));\n }\n }\n }\n\n var wheelStyles = {\n position: 'absolute',\n height: contentHeight,\n minHeight: height,\n pointerEvents: isScrolling ? 'none' : undefined\n };\n var topRowStyles = {\n height: topHideHeight\n };\n var bottomRowStyles = {\n height: bottomHideHeight\n };\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n ref: this.tableBodyRef,\n role: \"rowgroup\",\n className: this.addPrefix('body-row-wrapper'),\n style: bodyStyles,\n onScroll: this.handleBodyScroll\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n style: wheelStyles,\n className: this.addPrefix('body-wheel-area'),\n ref: this.wheelWrapperRef\n }, topHideHeight ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n style: topRowStyles,\n className: \"virtualized\"\n }) : null, this._visibleRows, bottomHideHeight ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n style: bottomRowStyles,\n className: \"virtualized\"\n }) : null), this.renderInfo(), this.renderScrollbar(), this.renderLoading());\n };\n\n _proto.renderInfo = function renderInfo() {\n var _this$props23 = this.props,\n locale = _this$props23.locale,\n renderEmpty = _this$props23.renderEmpty,\n loading = _this$props23.loading;\n\n if (this._visibleRows.length || loading) {\n return null;\n }\n\n var emptyMessage = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('body-info')\n }, locale.emptyMessage);\n return renderEmpty ? renderEmpty(emptyMessage) : emptyMessage;\n };\n\n _proto.renderScrollbar = function renderScrollbar() {\n var _this$props24 = this.props,\n disabledScroll = _this$props24.disabledScroll,\n affixHorizontalScrollbar = _this$props24.affixHorizontalScrollbar,\n id = _this$props24.id;\n var _this$state8 = this.state,\n contentWidth = _this$state8.contentWidth,\n contentHeight = _this$state8.contentHeight,\n width = _this$state8.width,\n fixedHorizontalScrollbar = _this$state8.fixedHorizontalScrollbar;\n var bottom = typeof affixHorizontalScrollbar === 'number' ? affixHorizontalScrollbar : 0;\n var headerHeight = this.getTableHeaderHeight();\n var height = this.getTableHeight();\n\n if (disabledScroll) {\n return null;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Scrollbar__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n tableId: id,\n className: classnames__WEBPACK_IMPORTED_MODULE_5___default()({\n fixed: fixedHorizontalScrollbar\n }),\n style: {\n width: width,\n bottom: fixedHorizontalScrollbar ? bottom : undefined\n },\n length: this.state.width,\n onScroll: this.handleScrollX,\n scrollLength: contentWidth,\n ref: this.scrollbarXRef\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Scrollbar__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n vertical: true,\n tableId: id,\n length: height - headerHeight,\n scrollLength: contentHeight,\n onScroll: this.handleScrollY,\n ref: this.scrollbarYRef\n }));\n }\n /**\n * show loading\n */\n ;\n\n _proto.renderLoading = function renderLoading() {\n var _this$props25 = this.props,\n locale = _this$props25.locale,\n loading = _this$props25.loading,\n loadAnimation = _this$props25.loadAnimation,\n renderLoading = _this$props25.renderLoading;\n\n if (!loadAnimation && !loading) {\n return null;\n }\n\n var loadingElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('loader-wrapper')\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('loader')\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"i\", {\n className: this.addPrefix('loader-icon')\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", {\n className: this.addPrefix('loader-text')\n }, locale.loading)));\n return renderLoading ? renderLoading(loadingElement) : loadingElement;\n };\n\n _proto.render = function render() {\n var _classNames;\n\n var _this$props26 = this.props,\n children = _this$props26.children,\n className = _this$props26.className,\n data = _this$props26.data,\n _this$props26$width = _this$props26.width,\n width = _this$props26$width === void 0 ? 0 : _this$props26$width,\n style = _this$props26.style,\n isTree = _this$props26.isTree,\n hover = _this$props26.hover,\n bordered = _this$props26.bordered,\n cellBordered = _this$props26.cellBordered,\n wordWrap = _this$props26.wordWrap,\n classPrefix = _this$props26.classPrefix,\n loading = _this$props26.loading,\n showHeader = _this$props26.showHeader,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_this$props26, [\"children\", \"className\", \"data\", \"width\", \"style\", \"isTree\", \"hover\", \"bordered\", \"cellBordered\", \"wordWrap\", \"classPrefix\", \"loading\", \"showHeader\"]);\n\n var isColumnResizing = this.state.isColumnResizing;\n\n var _this$getCellDescript = this.getCellDescriptor(),\n headerCells = _this$getCellDescript.headerCells,\n bodyCells = _this$getCellDescript.bodyCells,\n allColumnsWidth = _this$getCellDescript.allColumnsWidth,\n hasCustomTreeCol = _this$getCellDescript.hasCustomTreeCol;\n\n var rowWidth = allColumnsWidth > width ? allColumnsWidth : width;\n var clesses = classnames__WEBPACK_IMPORTED_MODULE_5___default()(classPrefix, className, (_classNames = {}, _classNames[this.addPrefix('word-wrap')] = wordWrap, _classNames[this.addPrefix('treetable')] = isTree, _classNames[this.addPrefix('bordered')] = bordered, _classNames[this.addPrefix('cell-bordered')] = cellBordered, _classNames[this.addPrefix('column-resizing')] = isColumnResizing, _classNames[this.addPrefix('hover')] = hover, _classNames[this.addPrefix('loading')] = loading, _classNames));\n\n var styles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n width: width || 'auto',\n height: this.getTableHeight()\n }, style);\n\n var unhandled = Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"getUnhandledProps\"])(propTypes, rest);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_TableContext__WEBPACK_IMPORTED_MODULE_19__[\"default\"].Provider, {\n value: {\n translateDOMPositionXY: this.translateDOMPositionXY,\n rtl: this.isRTL(),\n isTree: isTree,\n hasCustomTreeCol: hasCustomTreeCol\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n role: isTree ? 'treegrid' : 'grid' // The aria-rowcount is specified on the element with the table.\n // Its value is an integer equal to the total number of rows available, including header rows.\n ,\n \"aria-rowcount\": data.length + 1,\n \"aria-colcount\": this._cacheChildrenSize\n }, unhandled, {\n className: clesses,\n style: styles,\n ref: this.tableRef\n }), showHeader && this.renderTableHeader(headerCells, rowWidth), children && this.renderTableBody(bodyCells, rowWidth), showHeader && this.renderMouseArea()));\n };\n\n return Table;\n}(react__WEBPACK_IMPORTED_MODULE_3__[\"Component\"]);\n\nTable.propTypes = propTypes;\nTable.defaultProps = {\n classPrefix: Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"defaultClassPrefix\"])('table'),\n data: [],\n defaultSortType: SORT_TYPE.DESC,\n height: 200,\n rowHeight: 46,\n headerHeight: 40,\n minHeight: 0,\n rowExpandedHeight: 100,\n hover: true,\n showHeader: true,\n rowKey: 'key',\n translate3d: true,\n shouldUpdateScroll: true,\n locale: {\n emptyMessage: 'No data found',\n loading: 'Loading...'\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Table);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/Table.js?");
|
|
5090
5090
|
|
|
5091
5091
|
/***/ }),
|
|
5092
5092
|
|
|
@@ -6886,6 +6886,30 @@ eval("/**\n * This method returns the first argument it receives.\n *\n * @stati
|
|
|
6886
6886
|
|
|
6887
6887
|
/***/ }),
|
|
6888
6888
|
|
|
6889
|
+
/***/ "./node_modules/rsuite-table/node_modules/react-is/cjs/react-is.development.js":
|
|
6890
|
+
/*!*************************************************************************************!*\
|
|
6891
|
+
!*** ./node_modules/rsuite-table/node_modules/react-is/cjs/react-is.development.js ***!
|
|
6892
|
+
\*************************************************************************************/
|
|
6893
|
+
/*! no static exports found */
|
|
6894
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
6895
|
+
|
|
6896
|
+
"use strict";
|
|
6897
|
+
eval("/** @license React v17.0.2\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n'use strict';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar REACT_ELEMENT_TYPE = 0xeac7;\nvar REACT_PORTAL_TYPE = 0xeaca;\nvar REACT_FRAGMENT_TYPE = 0xeacb;\nvar REACT_STRICT_MODE_TYPE = 0xeacc;\nvar REACT_PROFILER_TYPE = 0xead2;\nvar REACT_PROVIDER_TYPE = 0xeacd;\nvar REACT_CONTEXT_TYPE = 0xeace;\nvar REACT_FORWARD_REF_TYPE = 0xead0;\nvar REACT_SUSPENSE_TYPE = 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = 0xead8;\nvar REACT_MEMO_TYPE = 0xead3;\nvar REACT_LAZY_TYPE = 0xead4;\nvar REACT_BLOCK_TYPE = 0xead9;\nvar REACT_SERVER_BLOCK_TYPE = 0xeada;\nvar REACT_FUNDAMENTAL_TYPE = 0xead5;\nvar REACT_SCOPE_TYPE = 0xead7;\nvar REACT_OPAQUE_ID_TYPE = 0xeae0;\nvar REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;\nvar REACT_OFFSCREEN_TYPE = 0xeae2;\nvar REACT_LEGACY_HIDDEN_TYPE = 0xeae3;\n\nif (typeof Symbol === 'function' && Symbol.for) {\n var symbolFor = Symbol.for;\n REACT_ELEMENT_TYPE = symbolFor('react.element');\n REACT_PORTAL_TYPE = symbolFor('react.portal');\n REACT_FRAGMENT_TYPE = symbolFor('react.fragment');\n REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');\n REACT_PROFILER_TYPE = symbolFor('react.profiler');\n REACT_PROVIDER_TYPE = symbolFor('react.provider');\n REACT_CONTEXT_TYPE = symbolFor('react.context');\n REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');\n REACT_SUSPENSE_TYPE = symbolFor('react.suspense');\n REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');\n REACT_MEMO_TYPE = symbolFor('react.memo');\n REACT_LAZY_TYPE = symbolFor('react.lazy');\n REACT_BLOCK_TYPE = symbolFor('react.block');\n REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');\n REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');\n REACT_SCOPE_TYPE = symbolFor('react.scope');\n REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');\n REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');\n REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');\n REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');\n}\n\n// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n}\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false;\nvar hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isConcurrentMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsConcurrentMode) {\n hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/node_modules/react-is/cjs/react-is.development.js?");
|
|
6898
|
+
|
|
6899
|
+
/***/ }),
|
|
6900
|
+
|
|
6901
|
+
/***/ "./node_modules/rsuite-table/node_modules/react-is/index.js":
|
|
6902
|
+
/*!******************************************************************!*\
|
|
6903
|
+
!*** ./node_modules/rsuite-table/node_modules/react-is/index.js ***!
|
|
6904
|
+
\******************************************************************/
|
|
6905
|
+
/*! no static exports found */
|
|
6906
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
6907
|
+
|
|
6908
|
+
"use strict";
|
|
6909
|
+
eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ \"./node_modules/rsuite-table/node_modules/react-is/cjs/react-is.development.js\");\n}\n\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/node_modules/react-is/index.js?");
|
|
6910
|
+
|
|
6911
|
+
/***/ }),
|
|
6912
|
+
|
|
6889
6913
|
/***/ "./node_modules/schema-typed/es/ArrayType.js":
|
|
6890
6914
|
/*!***************************************************!*\
|
|
6891
6915
|
!*** ./node_modules/schema-typed/es/ArrayType.js ***!
|
|
@@ -8764,7 +8788,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/he
|
|
|
8764
8788
|
/***/ (function(module, exports, __webpack_require__) {
|
|
8765
8789
|
|
|
8766
8790
|
"use strict";
|
|
8767
|
-
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nvar _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ \"./node_modules/@babel/runtime/helpers/interopRequireWildcard.js\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\"));\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/inheritsLoose.js\"));\n\nvar React = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nvar _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\"));\n\nvar _domLib = __webpack_require__(/*! dom-lib */ \"./node_modules/dom-lib/es/index.js\");\n\nvar _canUseDOM = _interopRequireDefault(__webpack_require__(/*! dom-lib/lib/query/canUseDOM */ \"./node_modules/dom-lib/lib/query/canUseDOM.js\"));\n\nvar _Portal = _interopRequireDefault(__webpack_require__(/*! ../Portal */ \"./src/Portal/index.tsx\"));\n\nvar _ModalManager = _interopRequireDefault(__webpack_require__(/*! ./ModalManager */ \"./src/Modal/ModalManager.ts\"));\n\nvar _Fade = _interopRequireDefault(__webpack_require__(/*! ../Animation/Fade */ \"./src/Animation/Fade.tsx\"));\n\nvar _getDOMNode = _interopRequireDefault(__webpack_require__(/*! ../utils/getDOMNode */ \"./src/utils/getDOMNode.ts\"));\n\nvar _mergeRefs = _interopRequireDefault(__webpack_require__(/*! ../utils/mergeRefs */ \"./src/utils/mergeRefs.ts\"));\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/Modal/BaseModal.tsx\";\n\nvar RefHolder =\n/*#__PURE__*/\nfunction (_React$Component) {\n (0, _inheritsLoose2.default)(RefHolder, _React$Component);\n\n function RefHolder() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = RefHolder.prototype;\n\n _proto.render = function render() {\n return this.props.children || null;\n };\n\n return RefHolder;\n}(React.Component);\n\nvar modalManager = new _ModalManager.default();\n\nvar BaseModal =\n/*#__PURE__*/\nfunction (_React$Component2) {\n (0, _inheritsLoose2.default)(BaseModal, _React$Component2);\n\n function BaseModal(props) {\n var _this;\n\n _this = _React$Component2.call(this, props) || this;\n _this.mountNode = null;\n _this.modalNodeRef = null;\n _this.backdropRef = null;\n _this.dialogRef = null;\n _this.lastFocus = null;\n _this.onDocumentKeyupListener = null;\n _this.onFocusinListener = null;\n\n _this.setMountNodeRef = function (ref) {\n var _ref$getMountNode;\n\n _this.mountNode = ref === null || ref === void 0 ? void 0 : (_ref$getMountNode = ref.getMountNode) === null || _ref$getMountNode === void 0 ? void 0 : _ref$getMountNode.call(ref);\n };\n\n _this.handleHidden = function (args) {\n var _this$props$onExited, _this$props;\n\n _this.setState({\n exited: true\n });\n\n _this.onHide();\n\n (_this$props$onExited = (_this$props = _this.props).onExited) === null || _this$props$onExited === void 0 ? void 0 : _this$props$onExited.call(_this$props, args);\n };\n\n _this.handleBackdropClick = function (event) {\n if (event.target !== event.currentTarget) {\n return;\n }\n\n var _this$props2 = _this.props,\n onBackdropClick = _this$props2.onBackdropClick,\n backdrop = _this$props2.backdrop,\n onHide = _this$props2.onHide;\n onBackdropClick === null || onBackdropClick === void 0 ? void 0 : onBackdropClick(event);\n backdrop && (onHide === null || onHide === void 0 ? void 0 : onHide(event));\n };\n\n _this.handleDocumentKeyUp = function (event) {\n var _this$props3 = _this.props,\n keyboard = _this$props3.keyboard,\n onHide = _this$props3.onHide,\n onEscapeKeyUp = _this$props3.onEscapeKeyUp;\n\n if (keyboard && event.keyCode === 27 && _this.isTopModal()) {\n onEscapeKeyUp === null || onEscapeKeyUp === void 0 ? void 0 : onEscapeKeyUp(event);\n onHide === null || onHide === void 0 ? void 0 : onHide(event);\n }\n };\n\n _this.enforceFocus = function () {\n var enforceFocus = _this.props.enforceFocus;\n\n if (!enforceFocus || !_this.isTopModal()) {\n return;\n }\n\n var active = (0, _domLib.activeElement)((0, _domLib.ownerDocument)((0, _assertThisInitialized2.default)(_this)));\n\n var modal = _this.getDialogElement();\n\n if (modal && modal !== active && !(0, _domLib.contains)(modal, active)) {\n modal.focus();\n }\n };\n\n _this.state = {\n exited: !props.show\n };\n _this.backdropRef = React.createRef();\n _this.modalNodeRef = React.createRef();\n _this.dialogRef = React.createRef();\n return _this;\n }\n\n var _proto2 = BaseModal.prototype;\n\n _proto2.componentDidMount = function componentDidMount() {\n if (this.props.show) {\n this.onShow();\n }\n };\n\n BaseModal.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps) {\n if (nextProps.show) {\n return {\n exited: false\n };\n } else if (!nextProps.transition) {\n // Otherwise let handleHidden take care of marking exited.\n return {\n exited: true\n };\n }\n\n return null;\n };\n\n _proto2.getSnapshotBeforeUpdate = function getSnapshotBeforeUpdate(prevProps) {\n if (this.props.show && !prevProps.show) {\n this.checkForFocus();\n }\n\n return null;\n };\n\n _proto2.componentDidUpdate = function componentDidUpdate(prevProps) {\n var transition = this.props.transition;\n\n if (prevProps.show && !this.props.show && !transition) {\n // Otherwise handleHidden will call this.\n this.onHide();\n } else if (!prevProps.show && this.props.show) {\n this.onShow();\n }\n };\n\n _proto2.componentWillUnmount = function componentWillUnmount() {\n var _this$props4 = this.props,\n show = _this$props4.show,\n transition = _this$props4.transition;\n\n if (show || transition && !this.state.exited) {\n this.onHide();\n }\n };\n\n _proto2.onShow = function onShow() {\n var _this$props$onShow, _this$props5;\n\n var doc = (0, _domLib.ownerDocument)(this);\n var container = (0, _domLib.getContainer)(this.props.container, doc.body);\n var containerClassName = this.props.containerClassName;\n modalManager.add(this, container, containerClassName);\n this.onDocumentKeyupListener = (0, _domLib.on)(doc, 'keyup', this.handleDocumentKeyUp);\n this.onFocusinListener = (0, _domLib.on)(doc, 'focus', this.enforceFocus);\n (_this$props$onShow = (_this$props5 = this.props).onShow) === null || _this$props$onShow === void 0 ? void 0 : _this$props$onShow.call(_this$props5);\n };\n\n _proto2.onHide = function onHide() {\n var _this$onDocumentKeyup, _this$onFocusinListen;\n\n modalManager.remove(this);\n (_this$onDocumentKeyup = this.onDocumentKeyupListener) === null || _this$onDocumentKeyup === void 0 ? void 0 : _this$onDocumentKeyup.off();\n (_this$onFocusinListen = this.onFocusinListener) === null || _this$onFocusinListen === void 0 ? void 0 : _this$onFocusinListen.off();\n this.restoreLastFocus();\n };\n\n _proto2.getDialogElement = function getDialogElement() {\n return (0, _getDOMNode.default)(this.dialogRef.current);\n };\n\n _proto2.isTopModal = function isTopModal() {\n return modalManager.isTopModal(this);\n };\n\n _proto2.checkForFocus = function checkForFocus() {\n if (_canUseDOM.default) {\n this.lastFocus = (0, _domLib.activeElement)();\n }\n };\n\n _proto2.restoreLastFocus = function restoreLastFocus() {\n // Support: <=IE11 doesn't support `focus()` on svg elements\n if (this.lastFocus) {\n var _this$lastFocus$focus, _this$lastFocus;\n\n (_this$lastFocus$focus = (_this$lastFocus = this.lastFocus).focus) === null || _this$lastFocus$focus === void 0 ? void 0 : _this$lastFocus$focus.call(_this$lastFocus);\n this.lastFocus = null;\n }\n };\n\n _proto2.renderBackdrop = function renderBackdrop() {\n var _this2 = this;\n\n var _this$props6 = this.props,\n transition = _this$props6.transition,\n backdrop = _this$props6.backdrop,\n backdropTransitionTimeout = _this$props6.backdropTransitionTimeout,\n backdropStyle = _this$props6.backdropStyle,\n backdropClassName = _this$props6.backdropClassName;\n var backdropPorps = {\n style: backdropStyle,\n onClick: backdrop === true ? this.handleBackdropClick : undefined\n };\n\n if (transition) {\n return React.createElement(_Fade.default, {\n transitionAppear: true,\n in: this.props.show,\n timeout: backdropTransitionTimeout,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 204\n },\n __self: this\n }, function (props, ref) {\n var className = props.className,\n rest = (0, _objectWithoutPropertiesLoose2.default)(props, [\"className\"]);\n return React.createElement(\"div\", (0, _extends2.default)({}, rest, backdropPorps, {\n className: (0, _classnames.default)(backdropClassName, className),\n ref: (0, _mergeRefs.default)(_this2.backdropRef, ref),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 208\n },\n __self: this\n }));\n });\n }\n\n return React.createElement(\"div\", (0, _extends2.default)({\n ref: this.backdropRef,\n className: backdropClassName\n }, backdropPorps, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 220\n },\n __self: this\n }));\n };\n\n _proto2.render = function render() {\n var _this$props7 = this.props,\n children = _this$props7.children,\n Transition = _this$props7.transition,\n backdrop = _this$props7.backdrop,\n dialogTransitionTimeout = _this$props7.dialogTransitionTimeout,\n style = _this$props7.style,\n className = _this$props7.className,\n container = _this$props7.container,\n animationProps = _this$props7.animationProps,\n onExit = _this$props7.onExit,\n onExiting = _this$props7.onExiting,\n onEnter = _this$props7.onEnter,\n onEntering = _this$props7.onEntering,\n onEntered = _this$props7.onEntered,\n rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props7, [\"children\", \"transition\", \"backdrop\", \"dialogTransitionTimeout\", \"style\", \"className\", \"container\", \"animationProps\", \"onExit\", \"onExiting\", \"onEnter\", \"onEntering\", \"onEntered\"]);\n var show = !!rest.show;\n var mountModal = show || Transition && !this.state.exited;\n\n if (!mountModal) {\n return null;\n }\n\n var dialog = children;\n\n if (Transition) {\n dialog = React.createElement(Transition, (0, _extends2.default)({}, animationProps, {\n transitionAppear: true,\n unmountOnExit: true,\n in: show,\n timeout: dialogTransitionTimeout,\n onExit: onExit,\n onExiting: onExiting,\n onExited: this.handleHidden,\n onEnter: onEnter,\n onEntering: onEntering,\n onEntered: onEntered,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 252\n },\n __self: this\n }), dialog);\n }\n\n return React.createElement(_Portal.default, {\n ref: this.setMountNodeRef,\n container: container,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 271\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: this.modalNodeRef,\n role: rest.role,\n style: style,\n className: className,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 272\n },\n __self: this\n }, backdrop && this.renderBackdrop(), React.createElement(RefHolder, {\n ref: this.dialogRef,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 274\n },\n __self: this\n }, dialog)));\n };\n\n return BaseModal;\n}(React.Component);\n\nBaseModal.manager = modalManager;\nBaseModal.defaultProps = {\n backdrop: true,\n keyboard: true,\n autoFocus: true,\n enforceFocus: true\n};\nvar _default = BaseModal;\nexports.default = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./src/Modal/BaseModal.tsx?");
|
|
8791
|
+
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nvar _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ \"./node_modules/@babel/runtime/helpers/interopRequireWildcard.js\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\"));\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/inheritsLoose.js\"));\n\nvar React = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nvar _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\"));\n\nvar _domLib = __webpack_require__(/*! dom-lib */ \"./node_modules/dom-lib/es/index.js\");\n\nvar _canUseDOM = _interopRequireDefault(__webpack_require__(/*! dom-lib/lib/query/canUseDOM */ \"./node_modules/dom-lib/lib/query/canUseDOM.js\"));\n\nvar _Portal = _interopRequireDefault(__webpack_require__(/*! ../Portal */ \"./src/Portal/index.tsx\"));\n\nvar _ModalManager = _interopRequireDefault(__webpack_require__(/*! ./ModalManager */ \"./src/Modal/ModalManager.ts\"));\n\nvar _Fade = _interopRequireDefault(__webpack_require__(/*! ../Animation/Fade */ \"./src/Animation/Fade.tsx\"));\n\nvar _getDOMNode = _interopRequireDefault(__webpack_require__(/*! ../utils/getDOMNode */ \"./src/utils/getDOMNode.ts\"));\n\nvar _mergeRefs = _interopRequireDefault(__webpack_require__(/*! ../utils/mergeRefs */ \"./src/utils/mergeRefs.ts\"));\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/Modal/BaseModal.tsx\";\n\nvar RefHolder =\n/*#__PURE__*/\nfunction (_React$Component) {\n (0, _inheritsLoose2.default)(RefHolder, _React$Component);\n\n function RefHolder() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = RefHolder.prototype;\n\n _proto.render = function render() {\n return this.props.children || null;\n };\n\n return RefHolder;\n}(React.Component);\n\nvar modalManager = new _ModalManager.default();\n\nvar BaseModal =\n/*#__PURE__*/\nfunction (_React$Component2) {\n (0, _inheritsLoose2.default)(BaseModal, _React$Component2);\n\n function BaseModal(props) {\n var _this;\n\n _this = _React$Component2.call(this, props) || this;\n _this.mountNode = null;\n _this.modalNodeRef = null;\n _this.backdropRef = null;\n _this.dialogRef = null;\n _this.lastFocus = null;\n _this.onDocumentKeyupListener = null;\n _this.onFocusinListener = null;\n _this._isMounted = null;\n\n _this.setMountNodeRef = function (ref) {\n var _ref$getMountNode;\n\n _this.mountNode = ref === null || ref === void 0 ? void 0 : (_ref$getMountNode = ref.getMountNode) === null || _ref$getMountNode === void 0 ? void 0 : _ref$getMountNode.call(ref);\n };\n\n _this.handleHidden = function (args) {\n var _this$props$onExited, _this$props;\n\n _this.setState({\n exited: true\n });\n\n _this.onHide();\n\n (_this$props$onExited = (_this$props = _this.props).onExited) === null || _this$props$onExited === void 0 ? void 0 : _this$props$onExited.call(_this$props, args);\n };\n\n _this.handleBackdropClick = function (event) {\n if (event.target !== event.currentTarget) {\n return;\n }\n\n var _this$props2 = _this.props,\n onBackdropClick = _this$props2.onBackdropClick,\n backdrop = _this$props2.backdrop,\n onHide = _this$props2.onHide;\n onBackdropClick === null || onBackdropClick === void 0 ? void 0 : onBackdropClick(event);\n backdrop && (onHide === null || onHide === void 0 ? void 0 : onHide(event));\n };\n\n _this.handleDocumentKeyUp = function (event) {\n var _this$props3 = _this.props,\n keyboard = _this$props3.keyboard,\n onHide = _this$props3.onHide,\n onEscapeKeyUp = _this$props3.onEscapeKeyUp;\n\n if (keyboard && event.keyCode === 27 && _this.isTopModal()) {\n onEscapeKeyUp === null || onEscapeKeyUp === void 0 ? void 0 : onEscapeKeyUp(event);\n onHide === null || onHide === void 0 ? void 0 : onHide(event);\n }\n };\n\n _this.enforceFocus = function () {\n var enforceFocus = _this.props.enforceFocus;\n\n if (!enforceFocus || !_this._isMounted || !_this.isTopModal()) {\n return;\n }\n\n var currentActiveElement = (0, _domLib.activeElement)((0, _domLib.ownerDocument)((0, _assertThisInitialized2.default)(_this)));\n\n var modal = _this.getDialogElement();\n\n if (modal && modal !== currentActiveElement && !(0, _domLib.contains)(modal, currentActiveElement)) {\n modal.focus();\n }\n };\n\n _this.handlePortalRendered = function () {\n if (!_this.props.autoFocus) {\n return;\n }\n\n var modal = _this.getDialogElement();\n\n var currentActiveElement = (0, _domLib.activeElement)((0, _domLib.ownerDocument)((0, _assertThisInitialized2.default)(_this)));\n\n if (modal && modal !== currentActiveElement && !(0, _domLib.contains)(modal, currentActiveElement)) {\n _this.lastFocus = currentActiveElement;\n modal.focus();\n }\n };\n\n _this.state = {\n exited: !props.show\n };\n _this.backdropRef = React.createRef();\n _this.modalNodeRef = React.createRef();\n _this.dialogRef = React.createRef();\n return _this;\n }\n\n var _proto2 = BaseModal.prototype;\n\n _proto2.componentDidMount = function componentDidMount() {\n this._isMounted = true;\n\n if (this.props.show) {\n this.onShow();\n }\n };\n\n BaseModal.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps) {\n if (nextProps.show) {\n return {\n exited: false\n };\n } else if (!nextProps.transition) {\n // Otherwise let handleHidden take care of marking exited.\n return {\n exited: true\n };\n }\n\n return null;\n };\n\n _proto2.getSnapshotBeforeUpdate = function getSnapshotBeforeUpdate(prevProps) {\n if (this.props.show && !prevProps.show) {\n this.checkForFocus();\n }\n\n return null;\n };\n\n _proto2.componentDidUpdate = function componentDidUpdate(prevProps) {\n var transition = this.props.transition;\n\n if (prevProps.show && !this.props.show && !transition) {\n // Otherwise handleHidden will call this.\n this.onHide();\n } else if (!prevProps.show && this.props.show) {\n this.onShow();\n }\n };\n\n _proto2.componentWillUnmount = function componentWillUnmount() {\n var _this$props4 = this.props,\n show = _this$props4.show,\n transition = _this$props4.transition;\n this._isMounted = false;\n\n if (show || transition && !this.state.exited) {\n this.onHide();\n }\n };\n\n _proto2.onShow = function onShow() {\n var _this$props$onShow, _this$props5;\n\n var doc = (0, _domLib.ownerDocument)(this);\n var container = (0, _domLib.getContainer)(this.props.container, doc.body);\n var containerClassName = this.props.containerClassName;\n modalManager.add(this, container, containerClassName);\n this.onDocumentKeyupListener = (0, _domLib.on)(doc, 'keyup', this.handleDocumentKeyUp);\n this.onFocusinListener = (0, _domLib.on)(doc, 'focus', this.enforceFocus);\n (_this$props$onShow = (_this$props5 = this.props).onShow) === null || _this$props$onShow === void 0 ? void 0 : _this$props$onShow.call(_this$props5);\n };\n\n _proto2.onHide = function onHide() {\n var _this$onDocumentKeyup, _this$onFocusinListen;\n\n modalManager.remove(this);\n (_this$onDocumentKeyup = this.onDocumentKeyupListener) === null || _this$onDocumentKeyup === void 0 ? void 0 : _this$onDocumentKeyup.off();\n (_this$onFocusinListen = this.onFocusinListener) === null || _this$onFocusinListen === void 0 ? void 0 : _this$onFocusinListen.off();\n this.restoreLastFocus();\n };\n\n _proto2.getDialogElement = function getDialogElement() {\n return (0, _getDOMNode.default)(this.dialogRef.current);\n };\n\n _proto2.isTopModal = function isTopModal() {\n return modalManager.isTopModal(this);\n };\n\n _proto2.checkForFocus = function checkForFocus() {\n if (_canUseDOM.default) {\n this.lastFocus = (0, _domLib.activeElement)();\n }\n };\n\n _proto2.restoreLastFocus = function restoreLastFocus() {\n // Support: <=IE11 doesn't support `focus()` on svg elements\n if (this.lastFocus) {\n var _this$lastFocus$focus, _this$lastFocus;\n\n (_this$lastFocus$focus = (_this$lastFocus = this.lastFocus).focus) === null || _this$lastFocus$focus === void 0 ? void 0 : _this$lastFocus$focus.call(_this$lastFocus);\n this.lastFocus = null;\n }\n };\n\n _proto2.renderBackdrop = function renderBackdrop() {\n var _this2 = this;\n\n var _this$props6 = this.props,\n transition = _this$props6.transition,\n backdrop = _this$props6.backdrop,\n backdropTransitionTimeout = _this$props6.backdropTransitionTimeout,\n backdropStyle = _this$props6.backdropStyle,\n backdropClassName = _this$props6.backdropClassName;\n var backdropPorps = {\n style: backdropStyle,\n onClick: backdrop === true ? this.handleBackdropClick : undefined\n };\n\n if (transition) {\n return React.createElement(_Fade.default, {\n transitionAppear: true,\n in: this.props.show,\n timeout: backdropTransitionTimeout,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 222\n },\n __self: this\n }, function (props, ref) {\n var className = props.className,\n rest = (0, _objectWithoutPropertiesLoose2.default)(props, [\"className\"]);\n return React.createElement(\"div\", (0, _extends2.default)({}, rest, backdropPorps, {\n className: (0, _classnames.default)(backdropClassName, className),\n ref: (0, _mergeRefs.default)(_this2.backdropRef, ref),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 226\n },\n __self: this\n }));\n });\n }\n\n return React.createElement(\"div\", (0, _extends2.default)({\n ref: this.backdropRef,\n className: backdropClassName\n }, backdropPorps, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 238\n },\n __self: this\n }));\n };\n\n _proto2.render = function render() {\n var _this$props7 = this.props,\n children = _this$props7.children,\n Transition = _this$props7.transition,\n backdrop = _this$props7.backdrop,\n dialogTransitionTimeout = _this$props7.dialogTransitionTimeout,\n style = _this$props7.style,\n className = _this$props7.className,\n container = _this$props7.container,\n animationProps = _this$props7.animationProps,\n onExit = _this$props7.onExit,\n onExiting = _this$props7.onExiting,\n onEnter = _this$props7.onEnter,\n onEntering = _this$props7.onEntering,\n onEntered = _this$props7.onEntered,\n rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props7, [\"children\", \"transition\", \"backdrop\", \"dialogTransitionTimeout\", \"style\", \"className\", \"container\", \"animationProps\", \"onExit\", \"onExiting\", \"onEnter\", \"onEntering\", \"onEntered\"]);\n var show = !!rest.show;\n var mountModal = show || Transition && !this.state.exited;\n\n if (!mountModal) {\n return null;\n }\n\n var dialog = children;\n\n if (Transition) {\n dialog = React.createElement(Transition, (0, _extends2.default)({}, animationProps, {\n transitionAppear: true,\n unmountOnExit: true,\n in: show,\n timeout: dialogTransitionTimeout,\n onExit: onExit,\n onExiting: onExiting,\n onExited: this.handleHidden,\n onEnter: onEnter,\n onEntering: onEntering,\n onEntered: onEntered,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 270\n },\n __self: this\n }), dialog);\n }\n\n return React.createElement(_Portal.default, {\n ref: this.setMountNodeRef,\n container: container,\n onRendered: this.handlePortalRendered,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 289\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: this.modalNodeRef,\n role: rest.role,\n style: style,\n className: className,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 294\n },\n __self: this\n }, backdrop && this.renderBackdrop(), React.createElement(RefHolder, {\n ref: this.dialogRef,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 296\n },\n __self: this\n }, dialog)));\n };\n\n return BaseModal;\n}(React.Component);\n\nBaseModal.manager = modalManager;\nBaseModal.defaultProps = {\n backdrop: true,\n keyboard: true,\n autoFocus: true,\n enforceFocus: true\n};\nvar _default = BaseModal;\nexports.default = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./src/Modal/BaseModal.tsx?");
|
|
8768
8792
|
|
|
8769
8793
|
/***/ }),
|
|
8770
8794
|
|
|
@@ -8812,7 +8836,7 @@ eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _utils =
|
|
|
8812
8836
|
/***/ (function(module, exports, __webpack_require__) {
|
|
8813
8837
|
|
|
8814
8838
|
"use strict";
|
|
8815
|
-
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nvar _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ \"./node_modules/@babel/runtime/helpers/interopRequireWildcard.js\");\n\nexports.__esModule = true;\nexports.default = exports.modalDialogPropTypes = void 0;\n\nvar _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\"));\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/inheritsLoose.js\"));\n\nvar React = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\"));\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _mergeRefs = _interopRequireDefault(__webpack_require__(/*! ../utils/mergeRefs */ \"./src/utils/mergeRefs.ts\"));\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/Modal/ModalDialog.tsx\";\nvar modalDialogPropTypes = {\n className: _propTypes.default.string,\n classPrefix: _propTypes.default.string,\n dialogClassName: _propTypes.default.string,\n style: _propTypes.default.object,\n dialogStyle: _propTypes.default.object,\n children: _propTypes.default.node,\n dialogRef: _utils.refType,\n id: _propTypes.default.string,\n 'aria-labelledby': _propTypes.default.string\n};\nexports.modalDialogPropTypes = modalDialogPropTypes;\n\nvar ModalDialog =\n/*#__PURE__*/\nfunction (_React$Component) {\n (0, _inheritsLoose2.default)(ModalDialog, _React$Component);\n\n function ModalDialog() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.htmlElement = null;\n\n _this.bindHtmlRef = function (ref) {\n _this.htmlElement = ref;\n };\n\n return _this;\n }\n\n var _proto = ModalDialog.prototype;\n\n _proto.getHTMLElement = function getHTMLElement() {\n return this.htmlElement;\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n style = _this$props.style,\n children = _this$props.children,\n dialogClassName = _this$props.dialogClassName,\n dialogStyle = _this$props.dialogStyle,\n classPrefix = _this$props.classPrefix,\n className = _this$props.className,\n dialogRef = _this$props.dialogRef,\n props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, [\"style\", \"children\", \"dialogClassName\", \"dialogStyle\", \"classPrefix\", \"className\", \"dialogRef\"]);\n var modalStyle = (0, _extends2.default)({\n display: 'block'\n }, style);\n var addPrefix = (0, _utils.prefix)(classPrefix);\n var dialogClasses = (0, _classnames.default)(addPrefix('dialog'), dialogClassName);\n return React.createElement(\"div\", (0, _extends2.default)({}, props, {\n title: null,\n role: \"dialog\",\n ref: (0, _mergeRefs.default)(this.bindHtmlRef, dialogRef),\n className: (0, _classnames.default)(classPrefix, className),\n style: modalStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 52\n },\n __self: this\n }), React.createElement(\"div\", {\n className: dialogClasses,\n style: dialogStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber:
|
|
8839
|
+
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nvar _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ \"./node_modules/@babel/runtime/helpers/interopRequireWildcard.js\");\n\nexports.__esModule = true;\nexports.default = exports.modalDialogPropTypes = void 0;\n\nvar _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\"));\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/inheritsLoose.js\"));\n\nvar React = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\"));\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _mergeRefs = _interopRequireDefault(__webpack_require__(/*! ../utils/mergeRefs */ \"./src/utils/mergeRefs.ts\"));\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/Modal/ModalDialog.tsx\";\nvar modalDialogPropTypes = {\n className: _propTypes.default.string,\n classPrefix: _propTypes.default.string,\n dialogClassName: _propTypes.default.string,\n style: _propTypes.default.object,\n dialogStyle: _propTypes.default.object,\n children: _propTypes.default.node,\n dialogRef: _utils.refType,\n id: _propTypes.default.string,\n 'aria-labelledby': _propTypes.default.string\n};\nexports.modalDialogPropTypes = modalDialogPropTypes;\n\nvar ModalDialog =\n/*#__PURE__*/\nfunction (_React$Component) {\n (0, _inheritsLoose2.default)(ModalDialog, _React$Component);\n\n function ModalDialog() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.htmlElement = null;\n\n _this.bindHtmlRef = function (ref) {\n _this.htmlElement = ref;\n };\n\n return _this;\n }\n\n var _proto = ModalDialog.prototype;\n\n _proto.getHTMLElement = function getHTMLElement() {\n return this.htmlElement;\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n style = _this$props.style,\n children = _this$props.children,\n dialogClassName = _this$props.dialogClassName,\n dialogStyle = _this$props.dialogStyle,\n classPrefix = _this$props.classPrefix,\n className = _this$props.className,\n dialogRef = _this$props.dialogRef,\n props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, [\"style\", \"children\", \"dialogClassName\", \"dialogStyle\", \"classPrefix\", \"className\", \"dialogRef\"]);\n var modalStyle = (0, _extends2.default)({\n display: 'block'\n }, style);\n var addPrefix = (0, _utils.prefix)(classPrefix);\n var dialogClasses = (0, _classnames.default)(addPrefix('dialog'), dialogClassName);\n return React.createElement(\"div\", (0, _extends2.default)({}, props, {\n title: null,\n role: \"dialog\",\n tabIndex: -1,\n ref: (0, _mergeRefs.default)(this.bindHtmlRef, dialogRef),\n className: (0, _classnames.default)(classPrefix, className),\n style: modalStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 52\n },\n __self: this\n }), React.createElement(\"div\", {\n className: dialogClasses,\n style: dialogStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"div\", {\n className: addPrefix('content'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, children)));\n };\n\n return ModalDialog;\n}(React.Component);\n\nModalDialog.propTypes = modalDialogPropTypes;\n\nvar _default = (0, _utils.compose)((0, _utils.withStyleProps)({\n hasSize: true\n}), (0, _utils.defaultProps)({\n classPrefix: 'modal'\n}))(ModalDialog);\n\nexports.default = _default;\n\n//# sourceURL=webpack://rsuite/./src/Modal/ModalDialog.tsx?");
|
|
8816
8840
|
|
|
8817
8841
|
/***/ }),
|
|
8818
8842
|
|