rsuite 4.8.8 → 4.8.9
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 +14 -5
- package/dist/rsuite.js +7 -7
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/dist/styles/rsuite-dark-rtl.css +2 -5
- package/dist/styles/rsuite-dark-rtl.min.css +1 -1
- package/dist/styles/rsuite-dark-rtl.min.css.map +1 -1
- package/dist/styles/rsuite-dark.css +2 -5
- package/dist/styles/rsuite-dark.min.css +1 -1
- package/dist/styles/rsuite-dark.min.css.map +1 -1
- package/dist/styles/rsuite-default-rtl.css +2 -5
- package/dist/styles/rsuite-default-rtl.min.css +1 -1
- package/dist/styles/rsuite-default-rtl.min.css.map +1 -1
- package/dist/styles/rsuite-default.css +2 -5
- package/dist/styles/rsuite-default.min.css +1 -1
- package/dist/styles/rsuite-default.min.css.map +1 -1
- package/es/InputPicker/InputAutosize.js +11 -6
- package/es/InputPicker/styles/common.less +2 -2
- package/es/Modal/BaseModal.js +1 -1
- package/es/Modal/ModalDialog.js +3 -1
- package/es/Picker/propTypes.js +1 -1
- package/es/Table/styles/common.less +0 -4
- package/lib/InputPicker/InputAutosize.js +11 -6
- package/lib/InputPicker/styles/common.less +2 -2
- package/lib/Modal/BaseModal.js +1 -1
- package/lib/Modal/ModalDialog.js +3 -1
- package/lib/Picker/propTypes.js +1 -1
- package/lib/Table/styles/common.less +0 -4
- package/package.json +2 -2
- package/src/Drawer/test/DrawerSpec.js +14 -0
- package/src/InputPicker/InputAutosize.tsx +15 -10
- package/src/InputPicker/styles/common.less +2 -2
- package/src/Modal/BaseModal.tsx +1 -6
- package/src/Modal/ModalDialog.tsx +3 -1
- package/src/Modal/test/ModalSpec.js +13 -0
- package/src/Picker/propTypes.ts +1 -1
- package/src/Table/styles/common.less +0 -4
package/dist/rsuite.js
CHANGED
|
@@ -5385,7 +5385,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop
|
|
|
5385
5385
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5386
5386
|
|
|
5387
5387
|
"use strict";
|
|
5388
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__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 _utils_prefix__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/prefix */ \"./node_modules/rsuite-table/es/utils/prefix.js\");\n\n\n\n\n\n\nvar ColumnGroup = react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function (props, ref) {\n var header = props.header,\n className = props.className,\n children = props.children,\n
|
|
5388
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__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 _utils_prefix__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/prefix */ \"./node_modules/rsuite-table/es/utils/prefix.js\");\n\n\n\n\n\n\nvar ColumnGroup = react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function (props, ref) {\n var header = props.header,\n className = props.className,\n children = props.children,\n classPrefix = props.classPrefix,\n headerHeight = props.headerHeight,\n verticalAlign = props.verticalAlign,\n width = props.width,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"header\", \"className\", \"children\", \"classPrefix\", \"headerHeight\", \"verticalAlign\", \"width\"]);\n\n var height = headerHeight / 2;\n var styles = {\n height: height,\n width: width\n };\n\n var contentStyles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, styles, {\n verticalAlign: verticalAlign\n });\n\n var addPrefix = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function (name) {\n return Object(_utils_prefix__WEBPACK_IMPORTED_MODULE_5__[\"prefix\"])(classPrefix)(name);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ref: ref,\n className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(classPrefix, className)\n }, rest), react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: addPrefix('header'),\n style: styles\n }, react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: addPrefix('header-content'),\n style: contentStyles\n }, header)), react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].map(children, function (node) {\n var _node$props, _node$props2, _node$props2$style;\n\n var nodeStyles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n height: height\n }, (_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.style, {\n top: styles.height\n });\n\n var width = (_node$props2 = node.props) === null || _node$props2 === void 0 ? void 0 : (_node$props2$style = _node$props2.style) === null || _node$props2$style === void 0 ? void 0 : _node$props2$style.width;\n var nodeContentStyles = {\n height: height,\n width: width,\n verticalAlign: verticalAlign\n };\n return react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](node, {\n className: addPrefix('cell'),\n style: nodeStyles,\n children: react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: addPrefix('cell-content'),\n style: nodeContentStyles\n }, node.props.children)\n });\n }));\n});\nColumnGroup.displayName = 'ColumnGroup';\nColumnGroup.defaultProps = {\n headerHeight: 80,\n classPrefix: Object(_utils_prefix__WEBPACK_IMPORTED_MODULE_5__[\"defaultClassPrefix\"])('table-column-group')\n};\nColumnGroup.propTypes = {\n header: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n classPrefix: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n verticalAlign: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['top', 'middle', 'bottom'])\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ColumnGroup);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/ColumnGroup.js?");
|
|
5389
5389
|
|
|
5390
5390
|
/***/ }),
|
|
5391
5391
|
|
|
@@ -5445,7 +5445,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab
|
|
|
5445
5445
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5446
5446
|
|
|
5447
5447
|
"use strict";
|
|
5448
|
-
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/@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/@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/@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/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/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/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/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/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/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/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};\n\nvar Table =\n/*#__PURE__*/\nfunction (_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 ? void 0 : (_this$scrollbarXRef$c3 = _this$scrollbarXRef.current) === null || _this$scrollbarXRef$c3 === void 0 ? void 0 : (_this$scrollbarXRef$c4 = _this$scrollbarXRef$c3.barRef) === null || _this$scrollbarXRef$c4 === void 0 ? 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 = react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.scrollbarYRef = react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.scrollbarXRef = react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.tableBodyRef = react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.affixHeaderWrapperRef = react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.mouseAreaRef = react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.headerWrapperRef = react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.wheelWrapperRef = react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.tableHeaderRef = 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 = children.map(function (column) {\n if ((column === null || column === void 0 ? void 0 : column.type) === _ColumnGroup__WEBPACK_IMPORTED_MODULE_22__[\"default\"]) {\n var _ref2 = column === null || column === void 0 ? void 0 : column.props,\n header = _ref2.header,\n childColumns = _ref2.children,\n align = _ref2.align,\n fixed = _ref2.fixed,\n verticalAlign = _ref2.verticalAlign;\n\n return childColumns.map(function (childColumn, index) {\n // 把 ColumnGroup 设置的属性覆盖到 Column\n var groupCellProps = {\n align: align,\n fixed: fixed,\n verticalAlign: verticalAlign\n };\n /**\n * 为分组中的第一列设置属性:\n * groupCount: 分组子项个数\n * groupHeader: 分组标题\n * resizable: 设置为不可自定义列宽\n */\n\n if (index === 0) {\n groupCellProps.groupCount = childColumns.length;\n groupCellProps.groupHeader = header;\n groupCellProps.resizable = false;\n }\n\n return 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 (react__WEBPACK_IMPORTED_MODULE_3__[\"isValidElement\"](column)) {\n var columnChildren = column.props.children;\n var _column$props = column.props,\n width = _column$props.width,\n resizable = _column$props.resizable,\n flexGrow = _column$props.flexGrow,\n minWidth = _column$props.minWidth,\n onResize = _column$props.onResize,\n treeCol = _column$props.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(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(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 ? void 0 : (_affixHeaderElement$h = affixHeaderElement.hasChildNodes) === null || _affixHeaderElement$h === void 0 ? 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 ? 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 ? 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 '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(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 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 ? 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, react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], null, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(scrollCells)), fixedRightCellGroupWidth ? react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n fixed: \"right\",\n style: this.isRTL() ? {\n right: 0 - rowRight - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]\n } : {\n left: width - fixedRightCellGroupWidth - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]\n },\n height: props.isHeaderRow ? props.headerHeight : props.height,\n width: fixedRightCellGroupWidth\n }, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"resetLeftForCells\"])(fixedRightCells))) : null, shouldRenderExpandedRow && this.renderRowExpanded(rowData));\n }\n\n return 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 }), 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 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 react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n ref: this.mouseAreaRef,\n className: this.addPrefix('mouse-area'),\n style: styles\n }, 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 = 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 react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_3__[\"Fragment\"], null, (affixHeader === 0 || affixHeader) && header, 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 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 }, react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n style: wheelStyles,\n className: this.addPrefix('body-wheel-area'),\n ref: this.wheelWrapperRef\n }, topHideHeight ? react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n style: topRowStyles,\n className: \"virtualized\"\n }) : null, this._visibleRows, bottomHideHeight ? 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 = 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 react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", null, 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 }), 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 = react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('loader-wrapper')\n }, react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('loader')\n }, react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"i\", {\n className: this.addPrefix('loader-icon')\n }), 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\"])(Table, rest);\n return 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 }, 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 = {\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};\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?");
|
|
5448
|
+
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/@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/@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/@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/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/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/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/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/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/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/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};\n\nvar Table =\n/*#__PURE__*/\nfunction (_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 ? void 0 : (_this$scrollbarXRef$c3 = _this$scrollbarXRef.current) === null || _this$scrollbarXRef$c3 === void 0 ? void 0 : (_this$scrollbarXRef$c4 = _this$scrollbarXRef$c3.barRef) === null || _this$scrollbarXRef$c4 === void 0 ? 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 = react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.scrollbarYRef = react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.scrollbarXRef = react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.tableBodyRef = react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.affixHeaderWrapperRef = react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.mouseAreaRef = react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.headerWrapperRef = react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.wheelWrapperRef = react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.tableHeaderRef = 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 = children.map(function (column) {\n if ((column === null || column === void 0 ? void 0 : column.type) === _ColumnGroup__WEBPACK_IMPORTED_MODULE_22__[\"default\"]) {\n var _ref2 = column === null || column === void 0 ? void 0 : column.props,\n header = _ref2.header,\n childColumns = _ref2.children,\n align = _ref2.align,\n fixed = _ref2.fixed,\n verticalAlign = _ref2.verticalAlign;\n\n return childColumns.map(function (childColumn, index) {\n // 把 ColumnGroup 设置的属性覆盖到 Column\n var groupCellProps = {\n align: align,\n fixed: fixed,\n verticalAlign: verticalAlign\n };\n /**\n * 为分组中的第一列设置属性:\n * groupCount: 分组子项个数\n * groupHeader: 分组标题\n * resizable: 设置为不可自定义列宽\n */\n\n if (index === 0) {\n groupCellProps.groupCount = childColumns.length;\n groupCellProps.groupHeader = header;\n groupCellProps.resizable = false;\n }\n\n return 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 (react__WEBPACK_IMPORTED_MODULE_3__[\"isValidElement\"](column)) {\n var columnChildren = column.props.children;\n var _column$props = column.props,\n width = _column$props.width,\n resizable = _column$props.resizable,\n flexGrow = _column$props.flexGrow,\n minWidth = _column$props.minWidth,\n onResize = _column$props.onResize,\n treeCol = _column$props.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(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(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 ? void 0 : (_affixHeaderElement$h = affixHeaderElement.hasChildNodes) === null || _affixHeaderElement$h === void 0 ? 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 ? 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 ? 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(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 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 ? 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, react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], null, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(scrollCells)), fixedRightCellGroupWidth ? 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 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 }), 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 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 react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n ref: this.mouseAreaRef,\n className: this.addPrefix('mouse-area'),\n style: styles\n }, 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 = 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 react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_3__[\"Fragment\"], null, (affixHeader === 0 || affixHeader) && header, 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 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 }, react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n style: wheelStyles,\n className: this.addPrefix('body-wheel-area'),\n ref: this.wheelWrapperRef\n }, topHideHeight ? react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n style: topRowStyles,\n className: \"virtualized\"\n }) : null, this._visibleRows, bottomHideHeight ? 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 = 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 react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", null, 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 }), 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 = react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('loader-wrapper')\n }, react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('loader')\n }, react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"i\", {\n className: this.addPrefix('loader-icon')\n }), 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\"])(Table, rest);\n return 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 }, 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 = {\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};\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?");
|
|
5449
5449
|
|
|
5450
5450
|
/***/ }),
|
|
5451
5451
|
|
|
@@ -5649,7 +5649,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
5649
5649
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5650
5650
|
|
|
5651
5651
|
"use strict";
|
|
5652
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return resetLeftForCells; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction resetLeftForCells(cells) {\n var left = 0;\n var nextCells = [];\n\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n var nextCell = react__WEBPACK_IMPORTED_MODULE_0__[\"cloneElement\"](cell, {\n left: left\n });\n left += cell.props.width;\n nextCells.push(nextCell);\n }\n\n return nextCells;\n}\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/utils/resetLeftForCells.js?");
|
|
5652
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return resetLeftForCells; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * 重置数组中所有 cell 的相对 left 的距离。\n * @param cells\n * @param extraWidth 额外为最后一个元素添加的的宽度,当存在纵向滚动条的时候设置。\n */\n\nfunction resetLeftForCells(cells, extraWidth) {\n var left = 0;\n var nextCells = [];\n\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n var nextCell = react__WEBPACK_IMPORTED_MODULE_0__[\"cloneElement\"](cell, {\n left: left,\n width: i === cells.length - 1 && extraWidth ? cell.props.width + extraWidth : cell.props.width\n });\n left += cell.props.width;\n nextCells.push(nextCell);\n }\n\n return nextCells;\n}\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/utils/resetLeftForCells.js?");
|
|
5653
5653
|
|
|
5654
5654
|
/***/ }),
|
|
5655
5655
|
|
|
@@ -7350,7 +7350,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/he
|
|
|
7350
7350
|
/***/ (function(module, exports, __webpack_require__) {
|
|
7351
7351
|
|
|
7352
7352
|
"use strict";
|
|
7353
|
-
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 _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 _utils = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/InputPicker/InputAutosize.tsx\";\nvar sizerStyle = {\n position: 'absolute',\n top: 0,\n left: 0,\n visibility: 'hidden',\n height: 0,\n overflow: 'scroll',\n whiteSpace: 'pre'\n};\n\nvar copyStyles = function copyStyles(styles, node) {\n node.style.fontSize = styles.fontSize;\n node.style.fontFamily = styles.fontFamily;\n node.style.fontWeight = styles.fontWeight;\n node.style.fontStyle = styles.fontStyle;\n node.style.letterSpacing = styles.letterSpacing;\n node.style.textTransform = styles.textTransform;\n};\n\nvar InputAutosize =\n/*#__PURE__*/\nfunction (_React$Component) {\n (0, _inheritsLoose2.default)(InputAutosize, _React$Component);\n\n function InputAutosize(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.inputRef = void 0;\n _this.sizerRef = void 0;\n _this.placeHolderSizerRef = void 0;\n _this.state = {\n inputWidth: props.minWidth\n };\n _this.inputRef = React.createRef();\n _this.sizerRef = React.createRef();\n _this.placeHolderSizerRef = React.createRef();\n return _this;\n }\n\n var _proto = InputAutosize.prototype;\n\n _proto.getInputInstance = function getInputInstance() {\n return this.inputRef.current;\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this.copyInputStyles();\n this.updateInputWidth();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(_prevProps, prevState) {\n var inputWidth = this.state.inputWidth;\n\n if (prevState.inputWidth !== inputWidth) {\n var _this$props$onAutosiz, _this$props;\n\n (_this$props$onAutosiz = (_this$props = this.props).onAutosize) === null || _this$props$onAutosiz === void 0 ? void 0 : _this$props$onAutosiz.call(_this$props, inputWidth);\n }\n\n this.updateInputWidth();\n };\n\n _proto.copyInputStyles = function copyInputStyles() {\n if (!this.inputRef.current || !window.getComputedStyle) {\n return;\n }\n\n var inputStyles = this.inputRef.current && window.getComputedStyle(this.inputRef.current);\n\n if (!inputStyles) {\n return;\n }\n\n if (this.sizerRef.current) {\n copyStyles(inputStyles, this.sizerRef.current);\n }\n\n if (this.placeHolderSizerRef.current) {\n copyStyles(inputStyles, this.placeHolderSizerRef.current);\n }\n };\n\n _proto.updateInputWidth = function updateInputWidth() {\n if (!this.sizerRef.current || typeof this.sizerRef.current.scrollWidth === 'undefined') {\n return;\n }\n\n var _this$props2 = this.props,\n minWidth = _this$props2.minWidth,\n placeholder = _this$props2.placeholder,\n value = _this$props2.value;\n var newInputWidth;\n\n if (placeholder && !value && this.placeHolderSizerRef.current) {\n newInputWidth = Math.max(this.sizerRef.current.scrollWidth, this.placeHolderSizerRef.current.scrollWidth) + 2;\n } else {\n newInputWidth = this.sizerRef.current.scrollWidth + 2;\n }\n\n if (newInputWidth < minWidth) {\n newInputWidth = minWidth;\n }\n\n if (newInputWidth !== this.state.inputWidth) {\n this.setState({\n inputWidth: newInputWidth\n });\n }\n };\n\n _proto.renderStyles = function renderStyles() {\n var inputId = this.
|
|
7353
|
+
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 _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 _utils = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/InputPicker/InputAutosize.tsx\";\nvar sizerStyle = {\n position: 'absolute',\n top: 0,\n left: 0,\n visibility: 'hidden',\n height: 0,\n overflow: 'scroll',\n whiteSpace: 'pre'\n};\n\nvar copyStyles = function copyStyles(styles, node) {\n node.style.fontSize = styles.fontSize;\n node.style.fontFamily = styles.fontFamily;\n node.style.fontWeight = styles.fontWeight;\n node.style.fontStyle = styles.fontStyle;\n node.style.letterSpacing = styles.letterSpacing;\n node.style.textTransform = styles.textTransform;\n};\n\nvar InputAutosize =\n/*#__PURE__*/\nfunction (_React$Component) {\n (0, _inheritsLoose2.default)(InputAutosize, _React$Component);\n\n function InputAutosize(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.inputRef = void 0;\n _this.sizerRef = void 0;\n _this.placeHolderSizerRef = void 0;\n\n _this.getInputId = function () {\n return _this.props.inputId || _this.state.inputId;\n };\n\n _this.state = {\n inputId: '_' + Math.random().toString(36).substr(2, 12),\n inputWidth: props.minWidth\n };\n _this.inputRef = React.createRef();\n _this.sizerRef = React.createRef();\n _this.placeHolderSizerRef = React.createRef();\n return _this;\n }\n\n var _proto = InputAutosize.prototype;\n\n _proto.getInputInstance = function getInputInstance() {\n return this.inputRef.current;\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this.copyInputStyles();\n this.updateInputWidth();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(_prevProps, prevState) {\n var inputWidth = this.state.inputWidth;\n\n if (prevState.inputWidth !== inputWidth) {\n var _this$props$onAutosiz, _this$props;\n\n (_this$props$onAutosiz = (_this$props = this.props).onAutosize) === null || _this$props$onAutosiz === void 0 ? void 0 : _this$props$onAutosiz.call(_this$props, inputWidth);\n }\n\n this.updateInputWidth();\n };\n\n _proto.copyInputStyles = function copyInputStyles() {\n if (!this.inputRef.current || !window.getComputedStyle) {\n return;\n }\n\n var inputStyles = this.inputRef.current && window.getComputedStyle(this.inputRef.current);\n\n if (!inputStyles) {\n return;\n }\n\n if (this.sizerRef.current) {\n copyStyles(inputStyles, this.sizerRef.current);\n }\n\n if (this.placeHolderSizerRef.current) {\n copyStyles(inputStyles, this.placeHolderSizerRef.current);\n }\n };\n\n _proto.updateInputWidth = function updateInputWidth() {\n if (!this.sizerRef.current || typeof this.sizerRef.current.scrollWidth === 'undefined') {\n return;\n }\n\n var _this$props2 = this.props,\n minWidth = _this$props2.minWidth,\n placeholder = _this$props2.placeholder,\n value = _this$props2.value;\n var newInputWidth;\n\n if (placeholder && !value && this.placeHolderSizerRef.current) {\n newInputWidth = Math.max(this.sizerRef.current.scrollWidth, this.placeHolderSizerRef.current.scrollWidth) + 2;\n } else {\n newInputWidth = this.sizerRef.current.scrollWidth + 2;\n }\n\n if (newInputWidth < minWidth) {\n newInputWidth = minWidth;\n }\n\n if (newInputWidth !== this.state.inputWidth) {\n this.setState({\n inputWidth: newInputWidth\n });\n }\n };\n\n _proto.renderStyles = function renderStyles() {\n var inputId = this.getInputId();\n return (0, _utils.isIE)() ? React.createElement(\"style\", {\n dangerouslySetInnerHTML: {\n __html: \"input#\" + inputId + \"::-ms-clear {display: none;}\"\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 145\n },\n __self: this\n }) : null;\n };\n\n _proto.render = function render() {\n var inputWidth = this.state.inputWidth;\n var _this$props3 = this.props,\n defaultValue = _this$props3.defaultValue,\n value = _this$props3.value,\n style = _this$props3.style,\n className = _this$props3.className,\n placeholder = _this$props3.placeholder,\n inputClassName = _this$props3.inputClassName,\n inputStyle = _this$props3.inputStyle;\n var inputId = this.getInputId();\n var sizerValue = [defaultValue, value, ''].reduce(function (previousValue, currentValue) {\n if (previousValue !== null && previousValue !== undefined) {\n return previousValue;\n }\n\n return currentValue;\n });\n var wrapperStyle = (0, _extends2.default)({}, style);\n\n if (!wrapperStyle.display) {\n wrapperStyle.display = 'inline-block';\n }\n\n var nextInputStyle = (0, _extends2.default)({\n boxSizing: 'content-box',\n width: inputWidth + \"px\"\n }, inputStyle);\n\n var _partitionHTMLProps = (0, _utils.partitionHTMLProps)(this.props),\n htmlInputProps = _partitionHTMLProps[0];\n\n htmlInputProps.className = inputClassName;\n htmlInputProps.id = inputId || inputId;\n htmlInputProps.style = nextInputStyle;\n return React.createElement(\"div\", {\n className: className,\n style: wrapperStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 190\n },\n __self: this\n }, this.renderStyles(), React.createElement(\"input\", (0, _extends2.default)({}, htmlInputProps, {\n ref: this.inputRef,\n type: \"text\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 192\n },\n __self: this\n })), React.createElement(\"div\", {\n ref: this.sizerRef,\n style: sizerStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 193\n },\n __self: this\n }, sizerValue), placeholder ? React.createElement(\"div\", {\n ref: this.placeHolderSizerRef,\n style: sizerStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 197\n },\n __self: this\n }, placeholder) : null);\n };\n\n return InputAutosize;\n}(React.Component);\n\nInputAutosize.propTypes = {\n className: _propTypes.default.string,\n defaultValue: _propTypes.default.any,\n inputId: _propTypes.default.string,\n inputClassName: _propTypes.default.string,\n inputStyle: _propTypes.default.object,\n minWidth: _propTypes.default.number,\n onChange: _propTypes.default.func,\n placeholder: _propTypes.default.string,\n style: _propTypes.default.object,\n value: _propTypes.default.any,\n onAutosize: _propTypes.default.func\n};\nInputAutosize.defaultProps = {\n minWidth: 1\n};\nvar _default = InputAutosize;\nexports.default = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./src/InputPicker/InputAutosize.tsx?");
|
|
7354
7354
|
|
|
7355
7355
|
/***/ }),
|
|
7356
7356
|
|
|
@@ -7614,7 +7614,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/he
|
|
|
7614
7614
|
/***/ (function(module, exports, __webpack_require__) {
|
|
7615
7615
|
|
|
7616
7616
|
"use strict";
|
|
7617
|
-
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 || 'dialog',\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: 279\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?");
|
|
7617
|
+
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?");
|
|
7618
7618
|
|
|
7619
7619
|
/***/ }),
|
|
7620
7620
|
|
|
@@ -7662,7 +7662,7 @@ eval("\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _utils =
|
|
|
7662
7662
|
/***/ (function(module, exports, __webpack_require__) {
|
|
7663
7663
|
|
|
7664
7664
|
"use strict";
|
|
7665
|
-
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 _recompose = __webpack_require__(/*! recompose */ \"./node_modules/recompose/dist/Recompose.esm.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};\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:
|
|
7665
|
+
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 _recompose = __webpack_require__(/*! recompose */ \"./node_modules/recompose/dist/Recompose.esm.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: 53\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, _recompose.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?");
|
|
7666
7666
|
|
|
7667
7667
|
/***/ }),
|
|
7668
7668
|
|
|
@@ -8202,7 +8202,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/he
|
|
|
8202
8202
|
/***/ (function(module, exports, __webpack_require__) {
|
|
8203
8203
|
|
|
8204
8204
|
"use strict";
|
|
8205
|
-
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports.listPickerDefaultProps = exports.pickerDefaultProps = exports.listPickerPropTypes = exports.pickerPropTypes = void 0;\n\nvar _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\"));\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _constants = __webpack_require__(/*! ../constants */ \"./src/constants.ts\");\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _propTypes2 = __webpack_require__(/*! ../Animation/propTypes */ \"./src/Animation/propTypes.ts\");\n\nvar pickerPropTypes = (0, _extends2.default)({}, _propTypes2.animationPropTypes, {\n classPrefix: _propTypes.default.string,\n className: _propTypes.default.string,\n style: _propTypes.default.object,\n locale: _propTypes.default.object,\n appearance: _propTypes.default.oneOf(['default', 'subtle']),\n block: _propTypes.default.bool,\n containerPadding: _propTypes.default.number,\n container: _propTypes.default.
|
|
8205
|
+
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports.listPickerDefaultProps = exports.pickerDefaultProps = exports.listPickerPropTypes = exports.pickerPropTypes = void 0;\n\nvar _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\"));\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _constants = __webpack_require__(/*! ../constants */ \"./src/constants.ts\");\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _propTypes2 = __webpack_require__(/*! ../Animation/propTypes */ \"./src/Animation/propTypes.ts\");\n\nvar pickerPropTypes = (0, _extends2.default)({}, _propTypes2.animationPropTypes, {\n classPrefix: _propTypes.default.string,\n className: _propTypes.default.string,\n style: _propTypes.default.object,\n locale: _propTypes.default.object,\n appearance: _propTypes.default.oneOf(['default', 'subtle']),\n block: _propTypes.default.bool,\n containerPadding: _propTypes.default.number,\n container: _propTypes.default.any,\n disabled: _propTypes.default.bool,\n toggleComponentClass: _propTypes.default.elementType,\n menuClassName: _propTypes.default.string,\n menuStyle: _propTypes.default.object,\n placeholder: _propTypes.default.node,\n placement: _propTypes.default.oneOf(_constants.PLACEMENT),\n\n /**\n * Prevent floating element overflow\n */\n preventOverflow: _propTypes.default.bool,\n open: _propTypes.default.bool,\n defaultOpen: _propTypes.default.bool,\n cleanable: _propTypes.default.bool,\n renderExtraFooter: _propTypes.default.func,\n renderValue: _propTypes.default.func,\n positionRef: _utils.refType,\n onOpen: _propTypes.default.func,\n onClose: _propTypes.default.func,\n onClean: _propTypes.default.func,\n\n /** @deprecated Use `onClose` instead */\n onHide: _propTypes.default.func\n});\nexports.pickerPropTypes = pickerPropTypes;\nvar listPickerPropTypes = (0, _extends2.default)({}, pickerPropTypes, {\n data: _propTypes.default.array,\n valueKey: _propTypes.default.string,\n labelKey: _propTypes.default.string,\n childrenKey: _propTypes.default.string,\n disabledItemValues: _propTypes.default.array,\n value: _propTypes.default.any,\n defaultValue: _propTypes.default.any,\n onChange: _propTypes.default.func\n});\nexports.listPickerPropTypes = listPickerPropTypes;\nvar pickerDefaultProps = {\n cleanable: true,\n placement: 'bottomStart',\n appearance: 'default'\n};\nexports.pickerDefaultProps = pickerDefaultProps;\nvar listPickerDefaultProps = (0, _extends2.default)({}, pickerDefaultProps, {\n data: [],\n disabledItemValues: [],\n childrenKey: 'children',\n valueKey: 'value',\n labelKey: 'label'\n});\nexports.listPickerDefaultProps = listPickerDefaultProps;\n\n//# sourceURL=webpack://rsuite/./src/Picker/propTypes.ts?");
|
|
8206
8206
|
|
|
8207
8207
|
/***/ }),
|
|
8208
8208
|
|